mirror of
https://github.com/Kir-Antipov/mc-publish.git
synced 2024-11-24 17:30:59 -05:00
58 lines
No EOL
578 KiB
JavaScript
58 lines
No EOL
578 KiB
JavaScript
import './sourcemap-register.cjs';import{createRequire as t}from"module";var r={3803:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.createFileSystemAdapter=r.FILE_SYSTEM_ADAPTER=void 0;const s=n(7147);r.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};function createFileSystemAdapter(t){if(t===undefined){return r.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},r.FILE_SYSTEM_ADAPTER),t)}r.createFileSystemAdapter=createFileSystemAdapter},8838:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.IS_SUPPORT_READDIR_WITH_FILE_TYPES=void 0;const n=process.versions.node.split(".");if(n[0]===undefined||n[1]===undefined){throw new Error(`Unexpected behavior. The 'process.versions.node' variable has invalid value: ${process.versions.node}`)}const s=Number.parseInt(n[0],10);const i=Number.parseInt(n[1],10);const o=10;const a=10;const l=s>o;const c=s===o&&i>=a;r.IS_SUPPORT_READDIR_WITH_FILE_TYPES=l||c},5667:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.Settings=r.scandirSync=r.scandir=void 0;const s=n(4507);const i=n(9560);const o=n(8662);r.Settings=o.default;function scandir(t,r,n){if(typeof r==="function"){s.read(t,getSettings(),r);return}s.read(t,getSettings(r),n)}r.scandir=scandir;function scandirSync(t,r){const n=getSettings(r);return i.read(t,n)}r.scandirSync=scandirSync;function getSettings(t={}){if(t instanceof o.default){return t}return new o.default(t)}},4507:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.readdir=r.readdirWithFileTypes=r.read=void 0;const s=n(109);const i=n(5288);const o=n(8838);const a=n(6297);const l=n(3847);function read(t,r,n){if(!r.stats&&o.IS_SUPPORT_READDIR_WITH_FILE_TYPES){readdirWithFileTypes(t,r,n);return}readdir(t,r,n)}r.read=read;function readdirWithFileTypes(t,r,n){r.fs.readdir(t,{withFileTypes:true},((s,o)=>{if(s!==null){callFailureCallback(n,s);return}const a=o.map((n=>({dirent:n,name:n.name,path:l.joinPathSegments(t,n.name,r.pathSegmentSeparator)})));if(!r.followSymbolicLinks){callSuccessCallback(n,a);return}const c=a.map((t=>makeRplTaskEntry(t,r)));i(c,((t,r)=>{if(t!==null){callFailureCallback(n,t);return}callSuccessCallback(n,r)}))}))}r.readdirWithFileTypes=readdirWithFileTypes;function makeRplTaskEntry(t,r){return n=>{if(!t.dirent.isSymbolicLink()){n(null,t);return}r.fs.stat(t.path,((s,i)=>{if(s!==null){if(r.throwErrorOnBrokenSymbolicLink){n(s);return}n(null,t);return}t.dirent=a.fs.createDirentFromStats(t.name,i);n(null,t)}))}}function readdir(t,r,n){r.fs.readdir(t,((o,c)=>{if(o!==null){callFailureCallback(n,o);return}const u=c.map((n=>{const i=l.joinPathSegments(t,n,r.pathSegmentSeparator);return t=>{s.stat(i,r.fsStatSettings,((s,o)=>{if(s!==null){t(s);return}const l={name:n,path:i,dirent:a.fs.createDirentFromStats(n,o)};if(r.stats){l.stats=o}t(null,l)}))}}));i(u,((t,r)=>{if(t!==null){callFailureCallback(n,t);return}callSuccessCallback(n,r)}))}))}r.readdir=readdir;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},3847:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.joinPathSegments=void 0;function joinPathSegments(t,r,n){if(t.endsWith(n)){return t+r}return t+n+r}r.joinPathSegments=joinPathSegments},9560:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.readdir=r.readdirWithFileTypes=r.read=void 0;const s=n(109);const i=n(8838);const o=n(6297);const a=n(3847);function read(t,r){if(!r.stats&&i.IS_SUPPORT_READDIR_WITH_FILE_TYPES){return readdirWithFileTypes(t,r)}return readdir(t,r)}r.read=read;function readdirWithFileTypes(t,r){const n=r.fs.readdirSync(t,{withFileTypes:true});return n.map((n=>{const s={dirent:n,name:n.name,path:a.joinPathSegments(t,n.name,r.pathSegmentSeparator)};if(s.dirent.isSymbolicLink()&&r.followSymbolicLinks){try{const t=r.fs.statSync(s.path);s.dirent=o.fs.createDirentFromStats(s.name,t)}catch(t){if(r.throwErrorOnBrokenSymbolicLink){throw t}}}return s}))}r.readdirWithFileTypes=readdirWithFileTypes;function readdir(t,r){const n=r.fs.readdirSync(t);return n.map((n=>{const i=a.joinPathSegments(t,n,r.pathSegmentSeparator);const l=s.statSync(i,r.fsStatSettings);const c={name:n,path:i,dirent:o.fs.createDirentFromStats(n,l)};if(r.stats){c.stats=l}return c}))}r.readdir=readdir},8662:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(1017);const i=n(109);const o=n(3803);class Settings{constructor(t={}){this._options=t;this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,false);this.fs=o.createFileSystemAdapter(this._options.fs);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.stats=this._getValue(this._options.stats,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true);this.fsStatSettings=new i.Settings({followSymbolicLink:this.followSymbolicLinks,fs:this.fs,throwErrorOnBrokenSymbolicLink:this.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},883:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.createDirentFromStats=void 0;class DirentFromStats{constructor(t,r){this.name=t;this.isBlockDevice=r.isBlockDevice.bind(r);this.isCharacterDevice=r.isCharacterDevice.bind(r);this.isDirectory=r.isDirectory.bind(r);this.isFIFO=r.isFIFO.bind(r);this.isFile=r.isFile.bind(r);this.isSocket=r.isSocket.bind(r);this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function createDirentFromStats(t,r){return new DirentFromStats(t,r)}r.createDirentFromStats=createDirentFromStats},6297:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.fs=void 0;const s=n(883);r.fs=s},2987:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.createFileSystemAdapter=r.FILE_SYSTEM_ADAPTER=void 0;const s=n(7147);r.FILE_SYSTEM_ADAPTER={lstat:s.lstat,stat:s.stat,lstatSync:s.lstatSync,statSync:s.statSync};function createFileSystemAdapter(t){if(t===undefined){return r.FILE_SYSTEM_ADAPTER}return Object.assign(Object.assign({},r.FILE_SYSTEM_ADAPTER),t)}r.createFileSystemAdapter=createFileSystemAdapter},109:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.statSync=r.stat=r.Settings=void 0;const s=n(4147);const i=n(4527);const o=n(2410);r.Settings=o.default;function stat(t,r,n){if(typeof r==="function"){s.read(t,getSettings(),r);return}s.read(t,getSettings(r),n)}r.stat=stat;function statSync(t,r){const n=getSettings(r);return i.read(t,n)}r.statSync=statSync;function getSettings(t={}){if(t instanceof o.default){return t}return new o.default(t)}},4147:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.read=void 0;function read(t,r,n){r.fs.lstat(t,((s,i)=>{if(s!==null){callFailureCallback(n,s);return}if(!i.isSymbolicLink()||!r.followSymbolicLink){callSuccessCallback(n,i);return}r.fs.stat(t,((t,s)=>{if(t!==null){if(r.throwErrorOnBrokenSymbolicLink){callFailureCallback(n,t);return}callSuccessCallback(n,i);return}if(r.markSymbolicLink){s.isSymbolicLink=()=>true}callSuccessCallback(n,s)}))}))}r.read=read;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},4527:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.read=void 0;function read(t,r){const n=r.fs.lstatSync(t);if(!n.isSymbolicLink()||!r.followSymbolicLink){return n}try{const n=r.fs.statSync(t);if(r.markSymbolicLink){n.isSymbolicLink=()=>true}return n}catch(t){if(!r.throwErrorOnBrokenSymbolicLink){return n}throw t}}r.read=read},2410:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(2987);class Settings{constructor(t={}){this._options=t;this.followSymbolicLink=this._getValue(this._options.followSymbolicLink,true);this.fs=s.createFileSystemAdapter(this._options.fs);this.markSymbolicLink=this._getValue(this._options.markSymbolicLink,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,true)}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},6026:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.Settings=r.walkStream=r.walkSync=r.walk=void 0;const s=n(7523);const i=n(6737);const o=n(3068);const a=n(141);r.Settings=a.default;function walk(t,r,n){if(typeof r==="function"){new s.default(t,getSettings()).read(r);return}new s.default(t,getSettings(r)).read(n)}r.walk=walk;function walkSync(t,r){const n=getSettings(r);const s=new o.default(t,n);return s.read()}r.walkSync=walkSync;function walkStream(t,r){const n=getSettings(r);const s=new i.default(t,n);return s.read()}r.walkStream=walkStream;function getSettings(t={}){if(t instanceof a.default){return t}return new a.default(t)}},7523:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5732);class AsyncProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new s.default(this._root,this._settings);this._storage=[]}read(t){this._reader.onError((r=>{callFailureCallback(t,r)}));this._reader.onEntry((t=>{this._storage.push(t)}));this._reader.onEnd((()=>{callSuccessCallback(t,this._storage)}));this._reader.read()}}r["default"]=AsyncProvider;function callFailureCallback(t,r){t(r)}function callSuccessCallback(t,r){t(null,r)}},6737:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(2781);const i=n(5732);class StreamProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new i.default(this._root,this._settings);this._stream=new s.Readable({objectMode:true,read:()=>{},destroy:()=>{if(!this._reader.isDestroyed){this._reader.destroy()}}})}read(){this._reader.onError((t=>{this._stream.emit("error",t)}));this._reader.onEntry((t=>{this._stream.push(t)}));this._reader.onEnd((()=>{this._stream.push(null)}));this._reader.read();return this._stream}}r["default"]=StreamProvider},3068:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(3595);class SyncProvider{constructor(t,r){this._root=t;this._settings=r;this._reader=new s.default(this._root,this._settings)}read(){return this._reader.read()}}r["default"]=SyncProvider},5732:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(2361);const i=n(5667);const o=n(7340);const a=n(7988);const l=n(8311);class AsyncReader extends l.default{constructor(t,r){super(t,r);this._settings=r;this._scandir=i.scandir;this._emitter=new s.EventEmitter;this._queue=o(this._worker.bind(this),this._settings.concurrency);this._isFatalError=false;this._isDestroyed=false;this._queue.drain=()=>{if(!this._isFatalError){this._emitter.emit("end")}}}read(){this._isFatalError=false;this._isDestroyed=false;setImmediate((()=>{this._pushToQueue(this._root,this._settings.basePath)}));return this._emitter}get isDestroyed(){return this._isDestroyed}destroy(){if(this._isDestroyed){throw new Error("The reader is already destroyed")}this._isDestroyed=true;this._queue.killAndDrain()}onEntry(t){this._emitter.on("entry",t)}onError(t){this._emitter.once("error",t)}onEnd(t){this._emitter.once("end",t)}_pushToQueue(t,r){const n={directory:t,base:r};this._queue.push(n,(t=>{if(t!==null){this._handleError(t)}}))}_worker(t,r){this._scandir(t.directory,this._settings.fsScandirSettings,((n,s)=>{if(n!==null){r(n,undefined);return}for(const r of s){this._handleEntry(r,t.base)}r(null,undefined)}))}_handleError(t){if(this._isDestroyed||!a.isFatalError(this._settings,t)){return}this._isFatalError=true;this._isDestroyed=true;this._emitter.emit("error",t)}_handleEntry(t,r){if(this._isDestroyed||this._isFatalError){return}const n=t.path;if(r!==undefined){t.path=a.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)}if(a.isAppliedFilter(this._settings.entryFilter,t)){this._emitEntry(t)}if(t.dirent.isDirectory()&&a.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(n,r===undefined?undefined:t.path)}}_emitEntry(t){this._emitter.emit("entry",t)}}r["default"]=AsyncReader},7988:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.joinPathSegments=r.replacePathSegmentSeparator=r.isAppliedFilter=r.isFatalError=void 0;function isFatalError(t,r){if(t.errorFilter===null){return true}return!t.errorFilter(r)}r.isFatalError=isFatalError;function isAppliedFilter(t,r){return t===null||t(r)}r.isAppliedFilter=isAppliedFilter;function replacePathSegmentSeparator(t,r){return t.split(/[/\\]/).join(r)}r.replacePathSegmentSeparator=replacePathSegmentSeparator;function joinPathSegments(t,r,n){if(t===""){return r}if(t.endsWith(n)){return t+r}return t+n+r}r.joinPathSegments=joinPathSegments},8311:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(7988);class Reader{constructor(t,r){this._root=t;this._settings=r;this._root=s.replacePathSegmentSeparator(t,r.pathSegmentSeparator)}}r["default"]=Reader},3595:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5667);const i=n(7988);const o=n(8311);class SyncReader extends o.default{constructor(){super(...arguments);this._scandir=s.scandirSync;this._storage=[];this._queue=new Set}read(){this._pushToQueue(this._root,this._settings.basePath);this._handleQueue();return this._storage}_pushToQueue(t,r){this._queue.add({directory:t,base:r})}_handleQueue(){for(const t of this._queue.values()){this._handleDirectory(t.directory,t.base)}}_handleDirectory(t,r){try{const n=this._scandir(t,this._settings.fsScandirSettings);for(const t of n){this._handleEntry(t,r)}}catch(t){this._handleError(t)}}_handleError(t){if(!i.isFatalError(this._settings,t)){return}throw t}_handleEntry(t,r){const n=t.path;if(r!==undefined){t.path=i.joinPathSegments(r,t.name,this._settings.pathSegmentSeparator)}if(i.isAppliedFilter(this._settings.entryFilter,t)){this._pushToStorage(t)}if(t.dirent.isDirectory()&&i.isAppliedFilter(this._settings.deepFilter,t)){this._pushToQueue(n,r===undefined?undefined:t.path)}}_pushToStorage(t){this._storage.push(t)}}r["default"]=SyncReader},141:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(1017);const i=n(5667);class Settings{constructor(t={}){this._options=t;this.basePath=this._getValue(this._options.basePath,undefined);this.concurrency=this._getValue(this._options.concurrency,Number.POSITIVE_INFINITY);this.deepFilter=this._getValue(this._options.deepFilter,null);this.entryFilter=this._getValue(this._options.entryFilter,null);this.errorFilter=this._getValue(this._options.errorFilter,null);this.pathSegmentSeparator=this._getValue(this._options.pathSegmentSeparator,s.sep);this.fsScandirSettings=new i.Settings({followSymbolicLinks:this._options.followSymbolicLinks,fs:this._options.fs,pathSegmentSeparator:this._options.pathSegmentSeparator,stats:this._options.stats,throwErrorOnBrokenSymbolicLink:this._options.throwErrorOnBrokenSymbolicLink})}_getValue(t,r){return t!==null&&t!==void 0?t:r}}r["default"]=Settings},610:(t,r,n)=>{const s=n(8750);const i=n(9434);const o=n(5873);const a=n(6477);const braces=(t,r={})=>{let n=[];if(Array.isArray(t)){for(let s of t){let t=braces.create(s,r);if(Array.isArray(t)){n.push(...t)}else{n.push(t)}}}else{n=[].concat(braces.create(t,r))}if(r&&r.expand===true&&r.nodupes===true){n=[...new Set(n)]}return n};braces.parse=(t,r={})=>a(t,r);braces.stringify=(t,r={})=>{if(typeof t==="string"){return s(braces.parse(t,r),r)}return s(t,r)};braces.compile=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}return i(t,r)};braces.expand=(t,r={})=>{if(typeof t==="string"){t=braces.parse(t,r)}let n=o(t,r);if(r.noempty===true){n=n.filter(Boolean)}if(r.nodupes===true){n=[...new Set(n)]}return n};braces.create=(t,r={})=>{if(t===""||t.length<3){return[t]}return r.expand!==true?braces.compile(t,r):braces.expand(t,r)};t.exports=braces},9434:(t,r,n)=>{const s=n(6330);const i=n(5207);const compile=(t,r={})=>{let walk=(t,n={})=>{let o=i.isInvalidBrace(n);let a=t.invalid===true&&r.escapeInvalid===true;let l=o===true||a===true;let c=r.escapeInvalid===true?"\\":"";let u="";if(t.isOpen===true){return c+t.value}if(t.isClose===true){return c+t.value}if(t.type==="open"){return l?c+t.value:"("}if(t.type==="close"){return l?c+t.value:")"}if(t.type==="comma"){return t.prev.type==="comma"?"":l?t.value:"|"}if(t.value){return t.value}if(t.nodes&&t.ranges>0){let n=i.reduce(t.nodes);let o=s(...n,{...r,wrap:false,toRegex:true});if(o.length!==0){return n.length>1&&o.length>1?`(${o})`:o}}if(t.nodes){for(let r of t.nodes){u+=walk(r,t)}}return u};return walk(t)};t.exports=compile},8774:t=>{t.exports={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"}},5873:(t,r,n)=>{const s=n(6330);const i=n(8750);const o=n(5207);const append=(t="",r="",n=false)=>{let s=[];t=[].concat(t);r=[].concat(r);if(!r.length)return t;if(!t.length){return n?o.flatten(r).map((t=>`{${t}}`)):r}for(let i of t){if(Array.isArray(i)){for(let t of i){s.push(append(t,r,n))}}else{for(let t of r){if(n===true&&typeof t==="string")t=`{${t}}`;s.push(Array.isArray(t)?append(i,t,n):i+t)}}}return o.flatten(s)};const expand=(t,r={})=>{let n=r.rangeLimit===void 0?1e3:r.rangeLimit;let walk=(t,a={})=>{t.queue=[];let l=a;let c=a.queue;while(l.type!=="brace"&&l.type!=="root"&&l.parent){l=l.parent;c=l.queue}if(t.invalid||t.dollar){c.push(append(c.pop(),i(t,r)));return}if(t.type==="brace"&&t.invalid!==true&&t.nodes.length===2){c.push(append(c.pop(),["{}"]));return}if(t.nodes&&t.ranges>0){let a=o.reduce(t.nodes);if(o.exceedsLimit(...a,r.step,n)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let l=s(...a,r);if(l.length===0){l=i(t,r)}c.push(append(c.pop(),l));t.nodes=[];return}let u=o.encloseBrace(t);let d=t.queue;let p=t;while(p.type!=="brace"&&p.type!=="root"&&p.parent){p=p.parent;d=p.queue}for(let r=0;r<t.nodes.length;r++){let n=t.nodes[r];if(n.type==="comma"&&t.type==="brace"){if(r===1)d.push("");d.push("");continue}if(n.type==="close"){c.push(append(c.pop(),d,u));continue}if(n.value&&n.type!=="open"){d.push(append(d.pop(),n.value));continue}if(n.nodes){walk(n,t)}}return d};return o.flatten(walk(t))};t.exports=expand},6477:(t,r,n)=>{const s=n(8750);const{MAX_LENGTH:i,CHAR_BACKSLASH:o,CHAR_BACKTICK:a,CHAR_COMMA:l,CHAR_DOT:c,CHAR_LEFT_PARENTHESES:u,CHAR_RIGHT_PARENTHESES:d,CHAR_LEFT_CURLY_BRACE:p,CHAR_RIGHT_CURLY_BRACE:h,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_RIGHT_SQUARE_BRACKET:g,CHAR_DOUBLE_QUOTE:y,CHAR_SINGLE_QUOTE:b,CHAR_NO_BREAK_SPACE:_,CHAR_ZERO_WIDTH_NOBREAK_SPACE:S}=n(8774);const parse=(t,r={})=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}let n=r||{};let E=typeof n.maxLength==="number"?Math.min(i,n.maxLength):i;if(t.length>E){throw new SyntaxError(`Input length (${t.length}), exceeds max characters (${E})`)}let v={type:"root",input:t,nodes:[]};let R=[v];let w=v;let C=v;let A=0;let T=t.length;let I=0;let P=0;let N;let D={};const advance=()=>t[I++];const push=t=>{if(t.type==="text"&&C.type==="dot"){C.type="text"}if(C&&C.type==="text"&&t.type==="text"){C.value+=t.value;return}w.nodes.push(t);t.parent=w;t.prev=C;C=t;return t};push({type:"bos"});while(I<T){w=R[R.length-1];N=advance();if(N===S||N===_){continue}if(N===o){push({type:"text",value:(r.keepEscaping?N:"")+advance()});continue}if(N===g){push({type:"text",value:"\\"+N});continue}if(N===m){A++;let t=true;let r;while(I<T&&(r=advance())){N+=r;if(r===m){A++;continue}if(r===o){N+=advance();continue}if(r===g){A--;if(A===0){break}}}push({type:"text",value:N});continue}if(N===u){w=push({type:"paren",nodes:[]});R.push(w);push({type:"text",value:N});continue}if(N===d){if(w.type!=="paren"){push({type:"text",value:N});continue}w=R.pop();push({type:"text",value:N});w=R[R.length-1];continue}if(N===y||N===b||N===a){let t=N;let n;if(r.keepQuotes!==true){N=""}while(I<T&&(n=advance())){if(n===o){N+=n+advance();continue}if(n===t){if(r.keepQuotes===true)N+=n;break}N+=n}push({type:"text",value:N});continue}if(N===p){P++;let t=C.value&&C.value.slice(-1)==="$"||w.dollar===true;let r={type:"brace",open:true,close:false,dollar:t,depth:P,commas:0,ranges:0,nodes:[]};w=push(r);R.push(w);push({type:"open",value:N});continue}if(N===h){if(w.type!=="brace"){push({type:"text",value:N});continue}let t="close";w=R.pop();w.close=true;push({type:t,value:N});P--;w=R[R.length-1];continue}if(N===l&&P>0){if(w.ranges>0){w.ranges=0;let t=w.nodes.shift();w.nodes=[t,{type:"text",value:s(w)}]}push({type:"comma",value:N});w.commas++;continue}if(N===c&&P>0&&w.commas===0){let t=w.nodes;if(P===0||t.length===0){push({type:"text",value:N});continue}if(C.type==="dot"){w.range=[];C.value+=N;C.type="range";if(w.nodes.length!==3&&w.nodes.length!==5){w.invalid=true;w.ranges=0;C.type="text";continue}w.ranges++;w.args=[];continue}if(C.type==="range"){t.pop();let r=t[t.length-1];r.value+=C.value+N;C=r;w.ranges--;continue}push({type:"dot",value:N});continue}push({type:"text",value:N})}do{w=R.pop();if(w.type!=="root"){w.nodes.forEach((t=>{if(!t.nodes){if(t.type==="open")t.isOpen=true;if(t.type==="close")t.isClose=true;if(!t.nodes)t.type="text";t.invalid=true}}));let t=R[R.length-1];let r=t.nodes.indexOf(w);t.nodes.splice(r,1,...w.nodes)}}while(R.length>0);push({type:"eos"});return v};t.exports=parse},8750:(t,r,n)=>{const s=n(5207);t.exports=(t,r={})=>{let stringify=(t,n={})=>{let i=r.escapeInvalid&&s.isInvalidBrace(n);let o=t.invalid===true&&r.escapeInvalid===true;let a="";if(t.value){if((i||o)&&s.isOpenOrClose(t)){return"\\"+t.value}return t.value}if(t.value){return t.value}if(t.nodes){for(let r of t.nodes){a+=stringify(r)}}return a};return stringify(t)}},5207:(t,r)=>{r.isInteger=t=>{if(typeof t==="number"){return Number.isInteger(t)}if(typeof t==="string"&&t.trim()!==""){return Number.isInteger(Number(t))}return false};r.find=(t,r)=>t.nodes.find((t=>t.type===r));r.exceedsLimit=(t,n,s=1,i)=>{if(i===false)return false;if(!r.isInteger(t)||!r.isInteger(n))return false;return(Number(n)-Number(t))/Number(s)>=i};r.escapeNode=(t,r=0,n)=>{let s=t.nodes[r];if(!s)return;if(n&&s.type===n||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};r.encloseBrace=t=>{if(t.type!=="brace")return false;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}return false};r.isInvalidBrace=t=>{if(t.type!=="brace")return false;if(t.invalid===true||t.dollar)return true;if(t.commas>>0+t.ranges>>0===0){t.invalid=true;return true}if(t.open!==true||t.close!==true){t.invalid=true;return true}return false};r.isOpenOrClose=t=>{if(t.type==="open"||t.type==="close"){return true}return t.open===true||t.close===true};r.reduce=t=>t.reduce(((t,r)=>{if(r.type==="text")t.push(r.value);if(r.type==="range")r.type="text";return t}),[]);r.flatten=(...t)=>{const r=[];const flat=t=>{for(let n=0;n<t.length;n++){let s=t[n];Array.isArray(s)?flat(s,r):s!==void 0&&r.push(s)}return r};flat(t);return r}},4460:(t,r,n)=>{var s=n(4466);var i=n(1017).posix.dirname;var o=n(2037).platform()==="win32";var a="/";var l=/\\/g;var c=/[\{\[].*[\}\]]$/;var u=/(^|[^\\])([\{\[]|\([^\)]+$)/;var d=/\\([\!\*\?\|\[\]\(\)\{\}])/g;t.exports=function globParent(t,r){var n=Object.assign({flipBackslashes:true},r);if(n.flipBackslashes&&o&&t.indexOf(a)<0){t=t.replace(l,a)}if(c.test(t)){t+=a}t+="a";do{t=i(t)}while(s(t)||u.test(t));return t.replace(d,"$1")}},3664:(t,r,n)=>{const s=n(2708);const i=n(5679);const o=n(4630);const a=n(2405);const l=n(952);const c=n(5444);async function FastGlob(t,r){assertPatternsInput(t);const n=getWorks(t,i.default,r);const s=await Promise.all(n);return c.array.flatten(s)}(function(t){t.glob=t;t.globSync=sync;t.globStream=stream;t.async=t;function sync(t,r){assertPatternsInput(t);const n=getWorks(t,a.default,r);return c.array.flatten(n)}t.sync=sync;function stream(t,r){assertPatternsInput(t);const n=getWorks(t,o.default,r);return c.stream.merge(n)}t.stream=stream;function generateTasks(t,r){assertPatternsInput(t);const n=[].concat(t);const i=new l.default(r);return s.generate(n,i)}t.generateTasks=generateTasks;function isDynamicPattern(t,r){assertPatternsInput(t);const n=new l.default(r);return c.pattern.isDynamicPattern(t,n)}t.isDynamicPattern=isDynamicPattern;function escapePath(t){assertPatternsInput(t);return c.path.escape(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return c.path.convertPathToPattern(t)}t.convertPathToPattern=convertPathToPattern;let r;(function(t){function escapePath(t){assertPatternsInput(t);return c.path.escapePosixPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return c.path.convertPosixPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(r=t.posix||(t.posix={}));let n;(function(t){function escapePath(t){assertPatternsInput(t);return c.path.escapeWindowsPath(t)}t.escapePath=escapePath;function convertPathToPattern(t){assertPatternsInput(t);return c.path.convertWindowsPathToPattern(t)}t.convertPathToPattern=convertPathToPattern})(n=t.win32||(t.win32={}))})(FastGlob||(FastGlob={}));function getWorks(t,r,n){const i=[].concat(t);const o=new l.default(n);const a=s.generate(i,o);const c=new r(o);return a.map(c.read,c)}function assertPatternsInput(t){const r=[].concat(t);const n=r.every((t=>c.string.isString(t)&&!c.string.isEmpty(t)));if(!n){throw new TypeError("Patterns must be a string (non empty) or an array of strings")}}t.exports=FastGlob},2708:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.convertPatternGroupToTask=r.convertPatternGroupsToTasks=r.groupPatternsByBaseDirectory=r.getNegativePatternsAsPositive=r.getPositivePatterns=r.convertPatternsToTasks=r.generate=void 0;const s=n(5444);function generate(t,r){const n=processPatterns(t,r);const i=processPatterns(r.ignore,r);const o=getPositivePatterns(n);const a=getNegativePatternsAsPositive(n,i);const l=o.filter((t=>s.pattern.isStaticPattern(t,r)));const c=o.filter((t=>s.pattern.isDynamicPattern(t,r)));const u=convertPatternsToTasks(l,a,false);const d=convertPatternsToTasks(c,a,true);return u.concat(d)}r.generate=generate;function processPatterns(t,r){let n=t;if(r.braceExpansion){n=s.pattern.expandPatternsWithBraceExpansion(n)}if(r.baseNameMatch){n=n.map((t=>t.includes("/")?t:`**/${t}`))}return n.map((t=>s.pattern.removeDuplicateSlashes(t)))}function convertPatternsToTasks(t,r,n){const i=[];const o=s.pattern.getPatternsOutsideCurrentDirectory(t);const a=s.pattern.getPatternsInsideCurrentDirectory(t);const l=groupPatternsByBaseDirectory(o);const c=groupPatternsByBaseDirectory(a);i.push(...convertPatternGroupsToTasks(l,r,n));if("."in c){i.push(convertPatternGroupToTask(".",a,r,n))}else{i.push(...convertPatternGroupsToTasks(c,r,n))}return i}r.convertPatternsToTasks=convertPatternsToTasks;function getPositivePatterns(t){return s.pattern.getPositivePatterns(t)}r.getPositivePatterns=getPositivePatterns;function getNegativePatternsAsPositive(t,r){const n=s.pattern.getNegativePatterns(t).concat(r);const i=n.map(s.pattern.convertToPositivePattern);return i}r.getNegativePatternsAsPositive=getNegativePatternsAsPositive;function groupPatternsByBaseDirectory(t){const r={};return t.reduce(((t,r)=>{const n=s.pattern.getBaseDirectory(r);if(n in t){t[n].push(r)}else{t[n]=[r]}return t}),r)}r.groupPatternsByBaseDirectory=groupPatternsByBaseDirectory;function convertPatternGroupsToTasks(t,r,n){return Object.keys(t).map((s=>convertPatternGroupToTask(s,t[s],r,n)))}r.convertPatternGroupsToTasks=convertPatternGroupsToTasks;function convertPatternGroupToTask(t,r,n,i){return{dynamic:i,positive:r,negative:n,base:t,patterns:[].concat(r,n.map(s.pattern.convertToNegativePattern))}}r.convertPatternGroupToTask=convertPatternGroupToTask},5679:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(7747);const i=n(257);class ProviderAsync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}async read(t){const r=this._getRootDirectory(t);const n=this._getReaderOptions(t);const s=await this.api(r,t,n);return s.map((t=>n.transform(t)))}api(t,r,n){if(r.dynamic){return this._reader.dynamic(t,n)}return this._reader.static(r.patterns,n)}}r["default"]=ProviderAsync},6983:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5444);const i=n(5295);class DeepFilter{constructor(t,r){this._settings=t;this._micromatchOptions=r}getFilter(t,r,n){const s=this._getMatcher(r);const i=this._getNegativePatternsRe(n);return r=>this._filter(t,r,s,i)}_getMatcher(t){return new i.default(t,this._settings,this._micromatchOptions)}_getNegativePatternsRe(t){const r=t.filter(s.pattern.isAffectDepthOfReadingPattern);return s.pattern.convertPatternsToRe(r,this._micromatchOptions)}_filter(t,r,n,i){if(this._isSkippedByDeep(t,r.path)){return false}if(this._isSkippedSymbolicLink(r)){return false}const o=s.path.removeLeadingDotSegment(r.path);if(this._isSkippedByPositivePatterns(o,n)){return false}return this._isSkippedByNegativePatterns(o,i)}_isSkippedByDeep(t,r){if(this._settings.deep===Infinity){return false}return this._getEntryLevel(t,r)>=this._settings.deep}_getEntryLevel(t,r){const n=r.split("/").length;if(t===""){return n}const s=t.split("/").length;return n-s}_isSkippedSymbolicLink(t){return!this._settings.followSymbolicLinks&&t.dirent.isSymbolicLink()}_isSkippedByPositivePatterns(t,r){return!this._settings.baseNameMatch&&!r.match(t)}_isSkippedByNegativePatterns(t,r){return!s.pattern.matchAny(t,r)}}r["default"]=DeepFilter},1343:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5444);class EntryFilter{constructor(t,r){this._settings=t;this._micromatchOptions=r;this.index=new Map}getFilter(t,r){const n=s.pattern.convertPatternsToRe(t,this._micromatchOptions);const i=s.pattern.convertPatternsToRe(r,Object.assign(Object.assign({},this._micromatchOptions),{dot:true}));return t=>this._filter(t,n,i)}_filter(t,r,n){const i=s.path.removeLeadingDotSegment(t.path);if(this._settings.unique&&this._isDuplicateEntry(i)){return false}if(this._onlyFileFilter(t)||this._onlyDirectoryFilter(t)){return false}if(this._isSkippedByAbsoluteNegativePatterns(i,n)){return false}const o=t.dirent.isDirectory();const a=this._isMatchToPatterns(i,r,o)&&!this._isMatchToPatterns(i,n,o);if(this._settings.unique&&a){this._createIndexRecord(i)}return a}_isDuplicateEntry(t){return this.index.has(t)}_createIndexRecord(t){this.index.set(t,undefined)}_onlyFileFilter(t){return this._settings.onlyFiles&&!t.dirent.isFile()}_onlyDirectoryFilter(t){return this._settings.onlyDirectories&&!t.dirent.isDirectory()}_isSkippedByAbsoluteNegativePatterns(t,r){if(!this._settings.absolute){return false}const n=s.path.makeAbsolute(this._settings.cwd,t);return s.pattern.matchAny(n,r)}_isMatchToPatterns(t,r,n){const i=s.pattern.matchAny(t,r);if(!i&&n){return s.pattern.matchAny(t+"/",r)}return i}}r["default"]=EntryFilter},6654:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5444);class ErrorFilter{constructor(t){this._settings=t}getFilter(){return t=>this._isNonFatalError(t)}_isNonFatalError(t){return s.errno.isEnoentCodeError(t)||this._settings.suppressErrors}}r["default"]=ErrorFilter},2576:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5444);class Matcher{constructor(t,r,n){this._patterns=t;this._settings=r;this._micromatchOptions=n;this._storage=[];this._fillStorage()}_fillStorage(){for(const t of this._patterns){const r=this._getPatternSegments(t);const n=this._splitSegmentsIntoSections(r);this._storage.push({complete:n.length<=1,pattern:t,segments:r,sections:n})}}_getPatternSegments(t){const r=s.pattern.getPatternParts(t,this._micromatchOptions);return r.map((t=>{const r=s.pattern.isDynamicPattern(t,this._settings);if(!r){return{dynamic:false,pattern:t}}return{dynamic:true,pattern:t,patternRe:s.pattern.makeRe(t,this._micromatchOptions)}}))}_splitSegmentsIntoSections(t){return s.array.splitWhen(t,(t=>t.dynamic&&s.pattern.hasGlobStar(t.pattern)))}}r["default"]=Matcher},5295:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(2576);class PartialMatcher extends s.default{match(t){const r=t.split("/");const n=r.length;const s=this._storage.filter((t=>!t.complete||t.segments.length>n));for(const t of s){const s=t.sections[0];if(!t.complete&&n>s.length){return true}const i=r.every(((r,n)=>{const s=t.segments[n];if(s.dynamic&&s.patternRe.test(r)){return true}if(!s.dynamic&&s.pattern===r){return true}return false}));if(i){return true}}return false}}r["default"]=PartialMatcher},257:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(1017);const i=n(6983);const o=n(1343);const a=n(6654);const l=n(4029);class Provider{constructor(t){this._settings=t;this.errorFilter=new a.default(this._settings);this.entryFilter=new o.default(this._settings,this._getMicromatchOptions());this.deepFilter=new i.default(this._settings,this._getMicromatchOptions());this.entryTransformer=new l.default(this._settings)}_getRootDirectory(t){return s.resolve(this._settings.cwd,t.base)}_getReaderOptions(t){const r=t.base==="."?"":t.base;return{basePath:r,pathSegmentSeparator:"/",concurrency:this._settings.concurrency,deepFilter:this.deepFilter.getFilter(r,t.positive,t.negative),entryFilter:this.entryFilter.getFilter(t.positive,t.negative),errorFilter:this.errorFilter.getFilter(),followSymbolicLinks:this._settings.followSymbolicLinks,fs:this._settings.fs,stats:this._settings.stats,throwErrorOnBrokenSymbolicLink:this._settings.throwErrorOnBrokenSymbolicLink,transform:this.entryTransformer.getTransformer()}}_getMicromatchOptions(){return{dot:this._settings.dot,matchBase:this._settings.baseNameMatch,nobrace:!this._settings.braceExpansion,nocase:!this._settings.caseSensitiveMatch,noext:!this._settings.extglob,noglobstar:!this._settings.globstar,posix:true,strictSlashes:false}}}r["default"]=Provider},4630:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(2781);const i=n(2083);const o=n(257);class ProviderStream extends o.default{constructor(){super(...arguments);this._reader=new i.default(this._settings)}read(t){const r=this._getRootDirectory(t);const n=this._getReaderOptions(t);const i=this.api(r,t,n);const o=new s.Readable({objectMode:true,read:()=>{}});i.once("error",(t=>o.emit("error",t))).on("data",(t=>o.emit("data",n.transform(t)))).once("end",(()=>o.emit("end")));o.once("close",(()=>i.destroy()));return o}api(t,r,n){if(r.dynamic){return this._reader.dynamic(t,n)}return this._reader.static(r.patterns,n)}}r["default"]=ProviderStream},2405:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(6234);const i=n(257);class ProviderSync extends i.default{constructor(){super(...arguments);this._reader=new s.default(this._settings)}read(t){const r=this._getRootDirectory(t);const n=this._getReaderOptions(t);const s=this.api(r,t,n);return s.map(n.transform)}api(t,r,n){if(r.dynamic){return this._reader.dynamic(t,n)}return this._reader.static(r.patterns,n)}}r["default"]=ProviderSync},4029:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(5444);class EntryTransformer{constructor(t){this._settings=t}getTransformer(){return t=>this._transform(t)}_transform(t){let r=t.path;if(this._settings.absolute){r=s.path.makeAbsolute(this._settings.cwd,r);r=s.path.unixify(r)}if(this._settings.markDirectories&&t.dirent.isDirectory()){r+="/"}if(!this._settings.objectMode){return r}return Object.assign(Object.assign({},t),{path:r})}}r["default"]=EntryTransformer},7747:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(6026);const i=n(5582);const o=n(2083);class ReaderAsync extends i.default{constructor(){super(...arguments);this._walkAsync=s.walk;this._readerStream=new o.default(this._settings)}dynamic(t,r){return new Promise(((n,s)=>{this._walkAsync(t,r,((t,r)=>{if(t===null){n(r)}else{s(t)}}))}))}async static(t,r){const n=[];const s=this._readerStream.static(t,r);return new Promise(((t,r)=>{s.once("error",r);s.on("data",(t=>n.push(t)));s.once("end",(()=>t(n)))}))}}r["default"]=ReaderAsync},5582:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(1017);const i=n(109);const o=n(5444);class Reader{constructor(t){this._settings=t;this._fsStatSettings=new i.Settings({followSymbolicLink:this._settings.followSymbolicLinks,fs:this._settings.fs,throwErrorOnBrokenSymbolicLink:this._settings.followSymbolicLinks})}_getFullEntryPath(t){return s.resolve(this._settings.cwd,t)}_makeEntry(t,r){const n={name:r,path:r,dirent:o.fs.createDirentFromStats(r,t)};if(this._settings.stats){n.stats=t}return n}_isFatalError(t){return!o.errno.isEnoentCodeError(t)&&!this._settings.suppressErrors}}r["default"]=Reader},2083:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(2781);const i=n(109);const o=n(6026);const a=n(5582);class ReaderStream extends a.default{constructor(){super(...arguments);this._walkStream=o.walkStream;this._stat=i.stat}dynamic(t,r){return this._walkStream(t,r)}static(t,r){const n=t.map(this._getFullEntryPath,this);const i=new s.PassThrough({objectMode:true});i._write=(s,o,a)=>this._getEntry(n[s],t[s],r).then((t=>{if(t!==null&&r.entryFilter(t)){i.push(t)}if(s===n.length-1){i.end()}a()})).catch(a);for(let t=0;t<n.length;t++){i.write(t)}return i}_getEntry(t,r,n){return this._getStat(t).then((t=>this._makeEntry(t,r))).catch((t=>{if(n.errorFilter(t)){return null}throw t}))}_getStat(t){return new Promise(((r,n)=>{this._stat(t,this._fsStatSettings,((t,s)=>t===null?r(s):n(t)))}))}}r["default"]=ReaderStream},6234:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});const s=n(109);const i=n(6026);const o=n(5582);class ReaderSync extends o.default{constructor(){super(...arguments);this._walkSync=i.walkSync;this._statSync=s.statSync}dynamic(t,r){return this._walkSync(t,r)}static(t,r){const n=[];for(const s of t){const t=this._getFullEntryPath(s);const i=this._getEntry(t,s,r);if(i===null||!r.entryFilter(i)){continue}n.push(i)}return n}_getEntry(t,r,n){try{const n=this._getStat(t);return this._makeEntry(n,r)}catch(t){if(n.errorFilter(t)){return null}throw t}}_getStat(t){return this._statSync(t,this._fsStatSettings)}}r["default"]=ReaderSync},952:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.DEFAULT_FILE_SYSTEM_ADAPTER=void 0;const s=n(7147);const i=n(2037);const o=Math.max(i.cpus().length,1);r.DEFAULT_FILE_SYSTEM_ADAPTER={lstat:s.lstat,lstatSync:s.lstatSync,stat:s.stat,statSync:s.statSync,readdir:s.readdir,readdirSync:s.readdirSync};class Settings{constructor(t={}){this._options=t;this.absolute=this._getValue(this._options.absolute,false);this.baseNameMatch=this._getValue(this._options.baseNameMatch,false);this.braceExpansion=this._getValue(this._options.braceExpansion,true);this.caseSensitiveMatch=this._getValue(this._options.caseSensitiveMatch,true);this.concurrency=this._getValue(this._options.concurrency,o);this.cwd=this._getValue(this._options.cwd,process.cwd());this.deep=this._getValue(this._options.deep,Infinity);this.dot=this._getValue(this._options.dot,false);this.extglob=this._getValue(this._options.extglob,true);this.followSymbolicLinks=this._getValue(this._options.followSymbolicLinks,true);this.fs=this._getFileSystemMethods(this._options.fs);this.globstar=this._getValue(this._options.globstar,true);this.ignore=this._getValue(this._options.ignore,[]);this.markDirectories=this._getValue(this._options.markDirectories,false);this.objectMode=this._getValue(this._options.objectMode,false);this.onlyDirectories=this._getValue(this._options.onlyDirectories,false);this.onlyFiles=this._getValue(this._options.onlyFiles,true);this.stats=this._getValue(this._options.stats,false);this.suppressErrors=this._getValue(this._options.suppressErrors,false);this.throwErrorOnBrokenSymbolicLink=this._getValue(this._options.throwErrorOnBrokenSymbolicLink,false);this.unique=this._getValue(this._options.unique,true);if(this.onlyDirectories){this.onlyFiles=false}if(this.stats){this.objectMode=true}this.ignore=[].concat(this.ignore)}_getValue(t,r){return t===undefined?r:t}_getFileSystemMethods(t={}){return Object.assign(Object.assign({},r.DEFAULT_FILE_SYSTEM_ADAPTER),t)}}r["default"]=Settings},5325:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.splitWhen=r.flatten=void 0;function flatten(t){return t.reduce(((t,r)=>[].concat(t,r)),[])}r.flatten=flatten;function splitWhen(t,r){const n=[[]];let s=0;for(const i of t){if(r(i)){s++;n[s]=[]}else{n[s].push(i)}}return n}r.splitWhen=splitWhen},1230:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.isEnoentCodeError=void 0;function isEnoentCodeError(t){return t.code==="ENOENT"}r.isEnoentCodeError=isEnoentCodeError},7543:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.createDirentFromStats=void 0;class DirentFromStats{constructor(t,r){this.name=t;this.isBlockDevice=r.isBlockDevice.bind(r);this.isCharacterDevice=r.isCharacterDevice.bind(r);this.isDirectory=r.isDirectory.bind(r);this.isFIFO=r.isFIFO.bind(r);this.isFile=r.isFile.bind(r);this.isSocket=r.isSocket.bind(r);this.isSymbolicLink=r.isSymbolicLink.bind(r)}}function createDirentFromStats(t,r){return new DirentFromStats(t,r)}r.createDirentFromStats=createDirentFromStats},5444:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.string=r.stream=r.pattern=r.path=r.fs=r.errno=r.array=void 0;const s=n(5325);r.array=s;const i=n(1230);r.errno=i;const o=n(7543);r.fs=o;const a=n(3873);r.path=a;const l=n(1221);r.pattern=l;const c=n(8382);r.stream=c;const u=n(2203);r.string=u},3873:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.convertPosixPathToPattern=r.convertWindowsPathToPattern=r.convertPathToPattern=r.escapePosixPath=r.escapeWindowsPath=r.escape=r.removeLeadingDotSegment=r.makeAbsolute=r.unixify=void 0;const s=n(2037);const i=n(1017);const o=s.platform()==="win32";const a=2;const l=/(\\?)([()*?[\]{|}]|^!|[!+@](?=\()|\\(?![!()*+?@[\]{|}]))/g;const c=/(\\?)([()[\]{}]|^!|[!+@](?=\())/g;const u=/^\\\\([.?])/;const d=/\\(?![!()+@[\]{}])/g;function unixify(t){return t.replace(/\\/g,"/")}r.unixify=unixify;function makeAbsolute(t,r){return i.resolve(t,r)}r.makeAbsolute=makeAbsolute;function removeLeadingDotSegment(t){if(t.charAt(0)==="."){const r=t.charAt(1);if(r==="/"||r==="\\"){return t.slice(a)}}return t}r.removeLeadingDotSegment=removeLeadingDotSegment;r.escape=o?escapeWindowsPath:escapePosixPath;function escapeWindowsPath(t){return t.replace(c,"\\$2")}r.escapeWindowsPath=escapeWindowsPath;function escapePosixPath(t){return t.replace(l,"\\$2")}r.escapePosixPath=escapePosixPath;r.convertPathToPattern=o?convertWindowsPathToPattern:convertPosixPathToPattern;function convertWindowsPathToPattern(t){return escapeWindowsPath(t).replace(u,"//$1").replace(d,"/")}r.convertWindowsPathToPattern=convertWindowsPathToPattern;function convertPosixPathToPattern(t){return escapePosixPath(t)}r.convertPosixPathToPattern=convertPosixPathToPattern},1221:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.removeDuplicateSlashes=r.matchAny=r.convertPatternsToRe=r.makeRe=r.getPatternParts=r.expandBraceExpansion=r.expandPatternsWithBraceExpansion=r.isAffectDepthOfReadingPattern=r.endsWithSlashGlobStar=r.hasGlobStar=r.getBaseDirectory=r.isPatternRelatedToParentDirectory=r.getPatternsOutsideCurrentDirectory=r.getPatternsInsideCurrentDirectory=r.getPositivePatterns=r.getNegativePatterns=r.isPositivePattern=r.isNegativePattern=r.convertToNegativePattern=r.convertToPositivePattern=r.isDynamicPattern=r.isStaticPattern=void 0;const s=n(1017);const i=n(4460);const o=n(6228);const a="**";const l="\\";const c=/[*?]|^!/;const u=/\[[^[]*]/;const d=/(?:^|[^!*+?@])\([^(]*\|[^|]*\)/;const p=/[!*+?@]\([^(]*\)/;const h=/,|\.\./;const m=/(?!^)\/{2,}/g;function isStaticPattern(t,r={}){return!isDynamicPattern(t,r)}r.isStaticPattern=isStaticPattern;function isDynamicPattern(t,r={}){if(t===""){return false}if(r.caseSensitiveMatch===false||t.includes(l)){return true}if(c.test(t)||u.test(t)||d.test(t)){return true}if(r.extglob!==false&&p.test(t)){return true}if(r.braceExpansion!==false&&hasBraceExpansion(t)){return true}return false}r.isDynamicPattern=isDynamicPattern;function hasBraceExpansion(t){const r=t.indexOf("{");if(r===-1){return false}const n=t.indexOf("}",r+1);if(n===-1){return false}const s=t.slice(r,n);return h.test(s)}function convertToPositivePattern(t){return isNegativePattern(t)?t.slice(1):t}r.convertToPositivePattern=convertToPositivePattern;function convertToNegativePattern(t){return"!"+t}r.convertToNegativePattern=convertToNegativePattern;function isNegativePattern(t){return t.startsWith("!")&&t[1]!=="("}r.isNegativePattern=isNegativePattern;function isPositivePattern(t){return!isNegativePattern(t)}r.isPositivePattern=isPositivePattern;function getNegativePatterns(t){return t.filter(isNegativePattern)}r.getNegativePatterns=getNegativePatterns;function getPositivePatterns(t){return t.filter(isPositivePattern)}r.getPositivePatterns=getPositivePatterns;function getPatternsInsideCurrentDirectory(t){return t.filter((t=>!isPatternRelatedToParentDirectory(t)))}r.getPatternsInsideCurrentDirectory=getPatternsInsideCurrentDirectory;function getPatternsOutsideCurrentDirectory(t){return t.filter(isPatternRelatedToParentDirectory)}r.getPatternsOutsideCurrentDirectory=getPatternsOutsideCurrentDirectory;function isPatternRelatedToParentDirectory(t){return t.startsWith("..")||t.startsWith("./..")}r.isPatternRelatedToParentDirectory=isPatternRelatedToParentDirectory;function getBaseDirectory(t){return i(t,{flipBackslashes:false})}r.getBaseDirectory=getBaseDirectory;function hasGlobStar(t){return t.includes(a)}r.hasGlobStar=hasGlobStar;function endsWithSlashGlobStar(t){return t.endsWith("/"+a)}r.endsWithSlashGlobStar=endsWithSlashGlobStar;function isAffectDepthOfReadingPattern(t){const r=s.basename(t);return endsWithSlashGlobStar(t)||isStaticPattern(r)}r.isAffectDepthOfReadingPattern=isAffectDepthOfReadingPattern;function expandPatternsWithBraceExpansion(t){return t.reduce(((t,r)=>t.concat(expandBraceExpansion(r))),[])}r.expandPatternsWithBraceExpansion=expandPatternsWithBraceExpansion;function expandBraceExpansion(t){const r=o.braces(t,{expand:true,nodupes:true,keepEscaping:true});r.sort(((t,r)=>t.length-r.length));return r.filter((t=>t!==""))}r.expandBraceExpansion=expandBraceExpansion;function getPatternParts(t,r){let{parts:n}=o.scan(t,Object.assign(Object.assign({},r),{parts:true}));if(n.length===0){n=[t]}if(n[0].startsWith("/")){n[0]=n[0].slice(1);n.unshift("")}return n}r.getPatternParts=getPatternParts;function makeRe(t,r){return o.makeRe(t,r)}r.makeRe=makeRe;function convertPatternsToRe(t,r){return t.map((t=>makeRe(t,r)))}r.convertPatternsToRe=convertPatternsToRe;function matchAny(t,r){return r.some((r=>r.test(t)))}r.matchAny=matchAny;function removeDuplicateSlashes(t){return t.replace(m,"/")}r.removeDuplicateSlashes=removeDuplicateSlashes},8382:(t,r,n)=>{Object.defineProperty(r,"__esModule",{value:true});r.merge=void 0;const s=n(2578);function merge(t){const r=s(t);t.forEach((t=>{t.once("error",(t=>r.emit("error",t)))}));r.once("close",(()=>propagateCloseEventToSources(t)));r.once("end",(()=>propagateCloseEventToSources(t)));return r}r.merge=merge;function propagateCloseEventToSources(t){t.forEach((t=>t.emit("close")))}},2203:(t,r)=>{Object.defineProperty(r,"__esModule",{value:true});r.isEmpty=r.isString=void 0;function isString(t){return typeof t==="string"}r.isString=isString;function isEmpty(t){return t===""}r.isEmpty=isEmpty},7340:(t,r,n)=>{var s=n(2113);function fastqueue(t,r,n){if(typeof t==="function"){n=r;r=t;t=null}if(n<1){throw new Error("fastqueue concurrency must be greater than 1")}var i=s(Task);var o=null;var a=null;var l=0;var c=null;var u={push:push,drain:noop,saturated:noop,pause:pause,paused:false,concurrency:n,running:running,resume:resume,idle:idle,length:length,getQueue:getQueue,unshift:unshift,empty:noop,kill:kill,killAndDrain:killAndDrain,error:error};return u;function running(){return l}function pause(){u.paused=true}function length(){var t=o;var r=0;while(t){t=t.next;r++}return r}function getQueue(){var t=o;var r=[];while(t){r.push(t.value);t=t.next}return r}function resume(){if(!u.paused)return;u.paused=false;for(var t=0;t<u.concurrency;t++){l++;release()}}function idle(){return l===0&&u.length()===0}function push(n,s){var d=i.get();d.context=t;d.release=release;d.value=n;d.callback=s||noop;d.errorHandler=c;if(l===u.concurrency||u.paused){if(a){a.next=d;a=d}else{o=d;a=d;u.saturated()}}else{l++;r.call(t,d.value,d.worked)}}function unshift(n,s){var d=i.get();d.context=t;d.release=release;d.value=n;d.callback=s||noop;d.errorHandler=c;if(l===u.concurrency||u.paused){if(o){d.next=o;o=d}else{o=d;a=d;u.saturated()}}else{l++;r.call(t,d.value,d.worked)}}function release(n){if(n){i.release(n)}var s=o;if(s){if(!u.paused){if(a===o){a=null}o=s.next;s.next=null;r.call(t,s.value,s.worked);if(a===null){u.empty()}}else{l--}}else if(--l===0){u.drain()}}function kill(){o=null;a=null;u.drain=noop}function killAndDrain(){o=null;a=null;u.drain();u.drain=noop}function error(t){c=t}}function noop(){}function Task(){this.value=null;this.callback=noop;this.next=null;this.release=noop;this.context=null;this.errorHandler=null;var t=this;this.worked=function worked(r,n){var s=t.callback;var i=t.errorHandler;var o=t.value;t.value=null;t.callback=noop;if(t.errorHandler){i(r,o)}s.call(t.context,r,n);t.release(t)}}function queueAsPromised(t,r,n){if(typeof t==="function"){n=r;r=t;t=null}function asyncWrapper(t,n){r.call(this,t).then((function(t){n(null,t)}),n)}var s=fastqueue(t,asyncWrapper,n);var i=s.push;var o=s.unshift;s.push=push;s.unshift=unshift;s.drained=drained;return s;function push(t){var r=new Promise((function(r,n){i(t,(function(t,s){if(t){n(t);return}r(s)}))}));r.catch(noop);return r}function unshift(t){var r=new Promise((function(r,n){o(t,(function(t,s){if(t){n(t);return}r(s)}))}));r.catch(noop);return r}function drained(){if(s.idle()){return new Promise((function(t){t()}))}var t=s.drain;var r=new Promise((function(r){s.drain=function(){t();r()}}));return r}}t.exports=fastqueue;t.exports.promise=queueAsPromised},6330:(t,r,n)=>{
|
||
/*!
|
||
* fill-range <https://github.com/jonschlinkert/fill-range>
|
||
*
|
||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||
* Licensed under the MIT License.
|
||
*/
|
||
const s=n(3837);const i=n(1861);const isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);const transform=t=>r=>t===true?Number(r):String(r);const isValidValue=t=>typeof t==="number"||typeof t==="string"&&t!=="";const isNumber=t=>Number.isInteger(+t);const zeros=t=>{let r=`${t}`;let n=-1;if(r[0]==="-")r=r.slice(1);if(r==="0")return false;while(r[++n]==="0");return n>0};const stringify=(t,r,n)=>{if(typeof t==="string"||typeof r==="string"){return true}return n.stringify===true};const pad=(t,r,n)=>{if(r>0){let n=t[0]==="-"?"-":"";if(n)t=t.slice(1);t=n+t.padStart(n?r-1:r,"0")}if(n===false){return String(t)}return t};const toMaxLen=(t,r)=>{let n=t[0]==="-"?"-":"";if(n){t=t.slice(1);r--}while(t.length<r)t="0"+t;return n?"-"+t:t};const toSequence=(t,r)=>{t.negatives.sort(((t,r)=>t<r?-1:t>r?1:0));t.positives.sort(((t,r)=>t<r?-1:t>r?1:0));let n=r.capture?"":"?:";let s="";let i="";let o;if(t.positives.length){s=t.positives.join("|")}if(t.negatives.length){i=`-(${n}${t.negatives.join("|")})`}if(s&&i){o=`${s}|${i}`}else{o=s||i}if(r.wrap){return`(${n}${o})`}return o};const toRange=(t,r,n,s)=>{if(n){return i(t,r,{wrap:false,...s})}let o=String.fromCharCode(t);if(t===r)return o;let a=String.fromCharCode(r);return`[${o}-${a}]`};const toRegex=(t,r,n)=>{if(Array.isArray(t)){let r=n.wrap===true;let s=n.capture?"":"?:";return r?`(${s}${t.join("|")})`:t.join("|")}return i(t,r,n)};const rangeError=(...t)=>new RangeError("Invalid range arguments: "+s.inspect(...t));const invalidRange=(t,r,n)=>{if(n.strictRanges===true)throw rangeError([t,r]);return[]};const invalidStep=(t,r)=>{if(r.strictRanges===true){throw new TypeError(`Expected step "${t}" to be a number`)}return[]};const fillNumbers=(t,r,n=1,s={})=>{let i=Number(t);let o=Number(r);if(!Number.isInteger(i)||!Number.isInteger(o)){if(s.strictRanges===true)throw rangeError([t,r]);return[]}if(i===0)i=0;if(o===0)o=0;let a=i>o;let l=String(t);let c=String(r);let u=String(n);n=Math.max(Math.abs(n),1);let d=zeros(l)||zeros(c)||zeros(u);let p=d?Math.max(l.length,c.length,u.length):0;let h=d===false&&stringify(t,r,s)===false;let m=s.transform||transform(h);if(s.toRegex&&n===1){return toRange(toMaxLen(t,p),toMaxLen(r,p),true,s)}let g={negatives:[],positives:[]};let push=t=>g[t<0?"negatives":"positives"].push(Math.abs(t));let y=[];let b=0;while(a?i>=o:i<=o){if(s.toRegex===true&&n>1){push(i)}else{y.push(pad(m(i,b),p,h))}i=a?i-n:i+n;b++}if(s.toRegex===true){return n>1?toSequence(g,s):toRegex(y,null,{wrap:false,...s})}return y};const fillLetters=(t,r,n=1,s={})=>{if(!isNumber(t)&&t.length>1||!isNumber(r)&&r.length>1){return invalidRange(t,r,s)}let i=s.transform||(t=>String.fromCharCode(t));let o=`${t}`.charCodeAt(0);let a=`${r}`.charCodeAt(0);let l=o>a;let c=Math.min(o,a);let u=Math.max(o,a);if(s.toRegex&&n===1){return toRange(c,u,false,s)}let d=[];let p=0;while(l?o>=a:o<=a){d.push(i(o,p));o=l?o-n:o+n;p++}if(s.toRegex===true){return toRegex(d,null,{wrap:false,options:s})}return d};const fill=(t,r,n,s={})=>{if(r==null&&isValidValue(t)){return[t]}if(!isValidValue(t)||!isValidValue(r)){return invalidRange(t,r,s)}if(typeof n==="function"){return fill(t,r,1,{transform:n})}if(isObject(n)){return fill(t,r,0,n)}let i={...s};if(i.capture===true)i.wrap=true;n=n||i.step||1;if(!isNumber(n)){if(n!=null&&!isObject(n))return invalidStep(n,i);return fill(t,r,1,n)}if(isNumber(t)&&isNumber(r)){return fillNumbers(t,r,n,i)}return fillLetters(t,r,Math.max(Math.abs(n),1),i)};t.exports=fill},6435:t=>{
|
||
/*!
|
||
* is-extglob <https://github.com/jonschlinkert/is-extglob>
|
||
*
|
||
* Copyright (c) 2014-2016, Jon Schlinkert.
|
||
* Licensed under the MIT License.
|
||
*/
|
||
t.exports=function isExtglob(t){if(typeof t!=="string"||t===""){return false}var r;while(r=/(\\).|([@?!+*]\(.*\))/g.exec(t)){if(r[2])return true;t=t.slice(r.index+r[0].length)}return false}},4466:(t,r,n)=>{
|
||
/*!
|
||
* is-glob <https://github.com/jonschlinkert/is-glob>
|
||
*
|
||
* Copyright (c) 2014-2017, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/
|
||
var s=n(6435);var i={"{":"}","(":")","[":"]"};var strictCheck=function(t){if(t[0]==="!"){return true}var r=0;var n=-2;var s=-2;var o=-2;var a=-2;var l=-2;while(r<t.length){if(t[r]==="*"){return true}if(t[r+1]==="?"&&/[\].+)]/.test(t[r])){return true}if(s!==-1&&t[r]==="["&&t[r+1]!=="]"){if(s<r){s=t.indexOf("]",r)}if(s>r){if(l===-1||l>s){return true}l=t.indexOf("\\",r);if(l===-1||l>s){return true}}}if(o!==-1&&t[r]==="{"&&t[r+1]!=="}"){o=t.indexOf("}",r);if(o>r){l=t.indexOf("\\",r);if(l===-1||l>o){return true}}}if(a!==-1&&t[r]==="("&&t[r+1]==="?"&&/[:!=]/.test(t[r+2])&&t[r+3]!==")"){a=t.indexOf(")",r);if(a>r){l=t.indexOf("\\",r);if(l===-1||l>a){return true}}}if(n!==-1&&t[r]==="("&&t[r+1]!=="|"){if(n<r){n=t.indexOf("|",r)}if(n!==-1&&t[n+1]!==")"){a=t.indexOf(")",n);if(a>n){l=t.indexOf("\\",n);if(l===-1||l>a){return true}}}}if(t[r]==="\\"){var c=t[r+1];r+=2;var u=i[c];if(u){var d=t.indexOf(u,r);if(d!==-1){r=d+1}}if(t[r]==="!"){return true}}else{r++}}return false};var relaxedCheck=function(t){if(t[0]==="!"){return true}var r=0;while(r<t.length){if(/[*?{}()[\]]/.test(t[r])){return true}if(t[r]==="\\"){var n=t[r+1];r+=2;var s=i[n];if(s){var o=t.indexOf(s,r);if(o!==-1){r=o+1}}if(t[r]==="!"){return true}}else{r++}}return false};t.exports=function isGlob(t,r){if(typeof t!=="string"||t===""){return false}if(s(t)){return true}var n=strictCheck;if(r&&r.strict===false){n=relaxedCheck}return n(t)}},5680:t=>{
|
||
/*!
|
||
* is-number <https://github.com/jonschlinkert/is-number>
|
||
*
|
||
* Copyright (c) 2014-present, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/
|
||
t.exports=function(t){if(typeof t==="number"){return t-t===0}if(typeof t==="string"&&t.trim()!==""){return Number.isFinite?Number.isFinite(+t):isFinite(+t)}return false}},2578:(t,r,n)=>{const s=n(2781);const i=s.PassThrough;const o=Array.prototype.slice;t.exports=merge2;function merge2(){const t=[];const r=o.call(arguments);let n=false;let s=r[r.length-1];if(s&&!Array.isArray(s)&&s.pipe==null){r.pop()}else{s={}}const a=s.end!==false;const l=s.pipeError===true;if(s.objectMode==null){s.objectMode=true}if(s.highWaterMark==null){s.highWaterMark=64*1024}const c=i(s);function addStream(){for(let r=0,n=arguments.length;r<n;r++){t.push(pauseStreams(arguments[r],s))}mergeStream();return this}function mergeStream(){if(n){return}n=true;let r=t.shift();if(!r){process.nextTick(endStream);return}if(!Array.isArray(r)){r=[r]}let s=r.length+1;function next(){if(--s>0){return}n=false;mergeStream()}function pipe(t){function onend(){t.removeListener("merge2UnpipeEnd",onend);t.removeListener("end",onend);if(l){t.removeListener("error",onerror)}next()}function onerror(t){c.emit("error",t)}if(t._readableState.endEmitted){return next()}t.on("merge2UnpipeEnd",onend);t.on("end",onend);if(l){t.on("error",onerror)}t.pipe(c,{end:false});t.resume()}for(let t=0;t<r.length;t++){pipe(r[t])}next()}function endStream(){n=false;c.emit("queueDrain");if(a){c.end()}}c.setMaxListeners(0);c.add=addStream;c.on("unpipe",(function(t){t.emit("merge2UnpipeEnd")}));if(r.length){addStream.apply(null,r)}return c}function pauseStreams(t,r){if(!Array.isArray(t)){if(!t._readableState&&t.pipe){t=t.pipe(i(r))}if(!t._readableState||!t.pause||!t.pipe){throw new Error("Only readable stream can be merged.")}t.pause()}else{for(let n=0,s=t.length;n<s;n++){t[n]=pauseStreams(t[n],r)}}return t}},6228:(t,r,n)=>{const s=n(3837);const i=n(610);const o=n(8569);const a=n(479);const isEmptyString=t=>t===""||t==="./";const micromatch=(t,r,n)=>{r=[].concat(r);t=[].concat(t);let s=new Set;let i=new Set;let a=new Set;let l=0;let onResult=t=>{a.add(t.output);if(n&&n.onResult){n.onResult(t)}};for(let a=0;a<r.length;a++){let c=o(String(r[a]),{...n,onResult:onResult},true);let u=c.state.negated||c.state.negatedExtglob;if(u)l++;for(let r of t){let t=c(r,true);let n=u?!t.isMatch:t.isMatch;if(!n)continue;if(u){s.add(t.output)}else{s.delete(t.output);i.add(t.output)}}}let c=l===r.length?[...a]:[...i];let u=c.filter((t=>!s.has(t)));if(n&&u.length===0){if(n.failglob===true){throw new Error(`No matches found for "${r.join(", ")}"`)}if(n.nonull===true||n.nullglob===true){return n.unescape?r.map((t=>t.replace(/\\/g,""))):r}}return u};micromatch.match=micromatch;micromatch.matcher=(t,r)=>o(t,r);micromatch.isMatch=(t,r,n)=>o(r,n)(t);micromatch.any=micromatch.isMatch;micromatch.not=(t,r,n={})=>{r=[].concat(r).map(String);let s=new Set;let i=[];let onResult=t=>{if(n.onResult)n.onResult(t);i.push(t.output)};let o=new Set(micromatch(t,r,{...n,onResult:onResult}));for(let t of i){if(!o.has(t)){s.add(t)}}return[...s]};micromatch.contains=(t,r,n)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}if(Array.isArray(r)){return r.some((r=>micromatch.contains(t,r,n)))}if(typeof r==="string"){if(isEmptyString(t)||isEmptyString(r)){return false}if(t.includes(r)||t.startsWith("./")&&t.slice(2).includes(r)){return true}}return micromatch.isMatch(t,r,{...n,contains:true})};micromatch.matchKeys=(t,r,n)=>{if(!a.isObject(t)){throw new TypeError("Expected the first argument to be an object")}let s=micromatch(Object.keys(t),r,n);let i={};for(let r of s)i[r]=t[r];return i};micromatch.some=(t,r,n)=>{let s=[].concat(t);for(let t of[].concat(r)){let r=o(String(t),n);if(s.some((t=>r(t)))){return true}}return false};micromatch.every=(t,r,n)=>{let s=[].concat(t);for(let t of[].concat(r)){let r=o(String(t),n);if(!s.every((t=>r(t)))){return false}}return true};micromatch.all=(t,r,n)=>{if(typeof t!=="string"){throw new TypeError(`Expected a string: "${s.inspect(t)}"`)}return[].concat(r).every((r=>o(r,n)(t)))};micromatch.capture=(t,r,n)=>{let s=a.isWindows(n);let i=o.makeRe(String(t),{...n,capture:true});let l=i.exec(s?a.toPosixSlashes(r):r);if(l){return l.slice(1).map((t=>t===void 0?"":t))}};micromatch.makeRe=(...t)=>o.makeRe(...t);micromatch.scan=(...t)=>o.scan(...t);micromatch.parse=(t,r)=>{let n=[];for(let s of[].concat(t||[])){for(let t of i(String(s),r)){n.push(o.parse(t,r))}}return n};micromatch.braces=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");if(r&&r.nobrace===true||!/\{.*\}/.test(t)){return[t]}return i(t,r)};micromatch.braceExpand=(t,r)=>{if(typeof t!=="string")throw new TypeError("Expected a string");return micromatch.braces(t,{...r,expand:true})};t.exports=micromatch},7760:(t,r,n)=>{
|
||
/*! node-domexception. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */
|
||
if(!globalThis.DOMException){try{const{MessageChannel:t}=n(1267),r=(new t).port1,s=new ArrayBuffer;r.postMessage(s,[s,s])}catch(t){t.constructor.name==="DOMException"&&(globalThis.DOMException=t.constructor)}}t.exports=globalThis.DOMException},8119:(t,r,n)=>{
|
||
/**
|
||
* @license node-stream-zip | (c) 2020 Antelle | https://github.com/antelle/node-stream-zip/blob/master/LICENSE
|
||
* Portions copyright https://github.com/cthackers/adm-zip | https://raw.githubusercontent.com/cthackers/adm-zip/master/LICENSE
|
||
*/
|
||
let s=n(7147);const i=n(3837);const o=n(1017);const a=n(2361);const l=n(9796);const c=n(2781);const u={LOCHDR:30,LOCSIG:67324752,LOCVER:4,LOCFLG:6,LOCHOW:8,LOCTIM:10,LOCCRC:14,LOCSIZ:18,LOCLEN:22,LOCNAM:26,LOCEXT:28,EXTSIG:134695760,EXTHDR:16,EXTCRC:4,EXTSIZ:8,EXTLEN:12,CENHDR:46,CENSIG:33639248,CENVEM:4,CENVER:6,CENFLG:8,CENHOW:10,CENTIM:12,CENCRC:16,CENSIZ:20,CENLEN:24,CENNAM:28,CENEXT:30,CENCOM:32,CENDSK:34,CENATT:36,CENATX:38,CENOFF:42,ENDHDR:22,ENDSIG:101010256,ENDSIGFIRST:80,ENDSUB:8,ENDTOT:10,ENDSIZ:12,ENDOFF:16,ENDCOM:20,MAXFILECOMMENT:65535,ENDL64HDR:20,ENDL64SIG:117853008,ENDL64SIGFIRST:80,ENDL64OFS:8,END64HDR:56,END64SIG:101075792,END64SIGFIRST:80,END64SUB:24,END64TOT:32,END64SIZ:40,END64OFF:48,STORED:0,SHRUNK:1,REDUCED1:2,REDUCED2:3,REDUCED3:4,REDUCED4:5,IMPLODED:6,DEFLATED:8,ENHANCED_DEFLATED:9,PKWARE:10,BZIP2:12,LZMA:14,IBM_TERSE:18,IBM_LZ77:19,FLG_ENC:0,FLG_COMP1:1,FLG_COMP2:2,FLG_DESC:4,FLG_ENH:8,FLG_STR:16,FLG_LNG:1024,FLG_MSK:4096,FLG_ENTRY_ENC:1,EF_ID:0,EF_SIZE:2,ID_ZIP64:1,ID_AVINFO:7,ID_PFS:8,ID_OS2:9,ID_NTFS:10,ID_OPENVMS:12,ID_UNIX:13,ID_FORK:14,ID_PATCH:15,ID_X509_PKCS7:20,ID_X509_CERTID_F:21,ID_X509_CERTID_C:22,ID_STRONGENC:23,ID_RECORD_MGT:24,ID_X509_PKCS7_RL:25,ID_IBM1:101,ID_IBM2:102,ID_POSZIP:18064,EF_ZIP64_OR_32:4294967295,EF_ZIP64_OR_16:65535};const StreamZip=function(t){let r,n,i,c,d,p;const h=false,m=this,g=t.storeEntries!==false?{}:null,y=t.file,b=t.nameEncoding?new TextDecoder(t.nameEncoding):null;open();function open(){if(t.fd){r=t.fd;readFile()}else{s.open(y,"r",((t,n)=>{if(t){return m.emit("error",t)}r=n;readFile()}))}}function readFile(){s.fstat(r,((r,s)=>{if(r){return m.emit("error",r)}n=s.size;i=t.chunkSize||Math.round(n/1e3);i=Math.max(Math.min(i,Math.min(128*1024,n)),Math.min(1024,n));readCentralDirectory()}))}function readUntilFoundCallback(t,r){if(t||!r){return m.emit("error",t||new Error("Archive read error"))}let n=c.lastPos;let s=n-c.win.position;const i=c.win.buffer;const o=c.minPos;while(--n>=o&&--s>=0){if(i.length-s>=4&&i[s]===c.firstByte){if(i.readUInt32LE(s)===c.sig){c.lastBufferPosition=s;c.lastBytesRead=r;c.complete();return}}}if(n===o){return m.emit("error",new Error("Bad archive"))}c.lastPos=n+1;c.chunkSize*=2;if(n<=o){return m.emit("error",new Error("Bad archive"))}const a=Math.min(c.chunkSize,n-o);c.win.expandLeft(a,readUntilFoundCallback)}function readCentralDirectory(){const t=Math.min(u.ENDHDR+u.MAXFILECOMMENT,n);c={win:new FileWindowBuffer(r),totalReadLength:t,minPos:n-t,lastPos:n,chunkSize:Math.min(1024,i),firstByte:u.ENDSIGFIRST,sig:u.ENDSIG,complete:readCentralDirectoryComplete};c.win.read(n-c.chunkSize,c.chunkSize,readUntilFoundCallback)}function readCentralDirectoryComplete(){const t=c.win.buffer;const r=c.lastBufferPosition;try{d=new CentralDirectoryHeader;d.read(t.slice(r,r+u.ENDHDR));d.headerOffset=c.win.position+r;if(d.commentLength){m.comment=t.slice(r+u.ENDHDR,r+u.ENDHDR+d.commentLength).toString()}else{m.comment=null}m.entriesCount=d.volumeEntries;m.centralDirectory=d;if(d.volumeEntries===u.EF_ZIP64_OR_16&&d.totalEntries===u.EF_ZIP64_OR_16||d.size===u.EF_ZIP64_OR_32||d.offset===u.EF_ZIP64_OR_32){readZip64CentralDirectoryLocator()}else{c={};readEntries()}}catch(t){m.emit("error",t)}}function readZip64CentralDirectoryLocator(){const t=u.ENDL64HDR;if(c.lastBufferPosition>t){c.lastBufferPosition-=t;readZip64CentralDirectoryLocatorComplete()}else{c={win:c.win,totalReadLength:t,minPos:c.win.position-t,lastPos:c.win.position,chunkSize:c.chunkSize,firstByte:u.ENDL64SIGFIRST,sig:u.ENDL64SIG,complete:readZip64CentralDirectoryLocatorComplete};c.win.read(c.lastPos-c.chunkSize,c.chunkSize,readUntilFoundCallback)}}function readZip64CentralDirectoryLocatorComplete(){const t=c.win.buffer;const r=new CentralDirectoryLoc64Header;r.read(t.slice(c.lastBufferPosition,c.lastBufferPosition+u.ENDL64HDR));const s=n-r.headerOffset;c={win:c.win,totalReadLength:s,minPos:r.headerOffset,lastPos:c.lastPos,chunkSize:c.chunkSize,firstByte:u.END64SIGFIRST,sig:u.END64SIG,complete:readZip64CentralDirectoryComplete};c.win.read(n-c.chunkSize,c.chunkSize,readUntilFoundCallback)}function readZip64CentralDirectoryComplete(){const t=c.win.buffer;const r=new CentralDirectoryZip64Header;r.read(t.slice(c.lastBufferPosition,c.lastBufferPosition+u.END64HDR));m.centralDirectory.volumeEntries=r.volumeEntries;m.centralDirectory.totalEntries=r.totalEntries;m.centralDirectory.size=r.size;m.centralDirectory.offset=r.offset;m.entriesCount=r.volumeEntries;c={};readEntries()}function readEntries(){c={win:new FileWindowBuffer(r),pos:d.offset,chunkSize:i,entriesLeft:d.volumeEntries};c.win.read(c.pos,Math.min(i,n-c.pos),readEntriesCallback)}function readEntriesCallback(r,n){if(r||!n){return m.emit("error",r||new Error("Entries read error"))}let s=c.pos-c.win.position;let o=c.entry;const a=c.win.buffer;const l=a.length;try{while(c.entriesLeft>0){if(!o){o=new ZipEntry;o.readHeader(a,s);o.headerOffset=c.win.position+s;c.entry=o;c.pos+=u.CENHDR;s+=u.CENHDR}const r=o.fnameLen+o.extraLen+o.comLen;const n=r+(c.entriesLeft>1?u.CENHDR:0);if(l-s<n){c.win.moveRight(i,readEntriesCallback,s);c.move=true;return}o.read(a,s,b);if(!t.skipEntryNameValidation){o.validateName()}if(g){g[o.name]=o}m.emit("entry",o);c.entry=o=null;c.entriesLeft--;c.pos+=r;s+=r}m.emit("ready")}catch(r){m.emit("error",r)}}function checkEntriesExist(){if(!g){throw new Error("storeEntries disabled")}}Object.defineProperty(this,"ready",{get(){return h}});this.entry=function(t){checkEntriesExist();return g[t]};this.entries=function(){checkEntriesExist();return g};this.stream=function(t,n){return this.openEntry(t,((t,s)=>{if(t){return n(t)}const i=dataOffset(s);let o=new EntryDataReaderStream(r,i,s.compressedSize);if(s.method===u.STORED){}else if(s.method===u.DEFLATED){o=o.pipe(l.createInflateRaw())}else{return n(new Error("Unknown compression method: "+s.method))}if(canVerifyCrc(s)){o=o.pipe(new EntryVerifyStream(o,s.crc,s.size))}n(null,o)}),false)};this.entryDataSync=function(t){let n=null;this.openEntry(t,((r,s)=>{n=r;t=s}),true);if(n){throw n}let s=Buffer.alloc(t.compressedSize);new FsRead(r,s,0,t.compressedSize,dataOffset(t),(t=>{n=t})).read(true);if(n){throw n}if(t.method===u.STORED){}else if(t.method===u.DEFLATED||t.method===u.ENHANCED_DEFLATED){s=l.inflateRawSync(s)}else{throw new Error("Unknown compression method: "+t.method)}if(s.length!==t.size){throw new Error("Invalid size")}if(canVerifyCrc(t)){const r=new CrcVerify(t.crc,t.size);r.data(s)}return s};this.openEntry=function(t,n,s){if(typeof t==="string"){checkEntriesExist();t=g[t];if(!t){return n(new Error("Entry not found"))}}if(!t.isFile){return n(new Error("Entry is not file"))}if(!r){return n(new Error("Archive closed"))}const i=Buffer.alloc(u.LOCHDR);new FsRead(r,i,0,i.length,t.offset,(r=>{if(r){return n(r)}let s;try{t.readDataHeader(i);if(t.encrypted){s=new Error("Entry encrypted")}}catch(t){s=t}n(s,t)})).read(s)};function dataOffset(t){return t.offset+u.LOCHDR+t.fnameLen+t.extraLen}function canVerifyCrc(t){return(t.flags&8)!==8}function extract(t,n,i){m.stream(t,((o,a)=>{if(o){i(o)}else{let o,l;a.on("error",(t=>{l=t;if(o){a.unpipe(o);o.close((()=>{i(t)}))}}));s.open(n,"w",((c,u)=>{if(c){return i(c)}if(l){s.close(r,(()=>{i(l)}));return}o=s.createWriteStream(n,{fd:u});o.on("finish",(()=>{m.emit("extract",t,n);if(!l){i()}}));a.pipe(o)}))}}))}function createDirectories(t,r,n){if(!r.length){return n()}let i=r.shift();i=o.join(t,o.join(...i));s.mkdir(i,{recursive:true},(s=>{if(s&&s.code!=="EEXIST"){return n(s)}createDirectories(t,r,n)}))}function extractFiles(t,r,n,s,i){if(!n.length){return s(null,i)}const a=n.shift();const l=o.join(t,a.name.replace(r,""));extract(a,l,(o=>{if(o){return s(o,i)}extractFiles(t,r,n,s,i+1)}))}this.extract=function(t,r,n){let i=t||"";if(typeof t==="string"){t=this.entry(t);if(t){i=t.name}else{if(i.length&&i[i.length-1]!=="/"){i+="/"}}}if(!t||t.isDirectory){const t=[],s=[],a={};for(const r in g){if(Object.prototype.hasOwnProperty.call(g,r)&&r.lastIndexOf(i,0)===0){let n=r.replace(i,"");const l=g[r];if(l.isFile){t.push(l);n=o.dirname(n)}if(n&&!a[n]&&n!=="."){a[n]=true;let t=n.split("/").filter((t=>t));if(t.length){s.push(t)}while(t.length>1){t=t.slice(0,t.length-1);const r=t.join("/");if(a[r]||r==="."){break}a[r]=true;s.push(t)}}}}s.sort(((t,r)=>t.length-r.length));if(s.length){createDirectories(r,s,(s=>{if(s){n(s)}else{extractFiles(r,i,t,n,0)}}))}else{extractFiles(r,i,t,n,0)}}else{s.stat(r,((s,i)=>{if(i&&i.isDirectory()){extract(t,o.join(r,o.basename(t.name)),n)}else{extract(t,r,n)}}))}};this.close=function(t){if(p||!r){p=true;if(t){t()}}else{p=true;s.close(r,(n=>{r=null;if(t){t(n)}}))}};const _=a.EventEmitter.prototype.emit;this.emit=function(...t){if(!p){return _.call(this,...t)}}};StreamZip.setFs=function(t){s=t};StreamZip.debugLog=(...t)=>{if(StreamZip.debug){console.log(...t)}};i.inherits(StreamZip,a.EventEmitter);const d=Symbol("zip");StreamZip.async=class StreamZipAsync extends a.EventEmitter{constructor(t){super();const r=new StreamZip(t);r.on("entry",(t=>this.emit("entry",t)));r.on("extract",((t,r)=>this.emit("extract",t,r)));this[d]=new Promise(((t,n)=>{r.on("ready",(()=>{r.removeListener("error",n);t(r)}));r.on("error",n)}))}get entriesCount(){return this[d].then((t=>t.entriesCount))}get comment(){return this[d].then((t=>t.comment))}async entry(t){const r=await this[d];return r.entry(t)}async entries(){const t=await this[d];return t.entries()}async stream(t){const r=await this[d];return new Promise(((n,s)=>{r.stream(t,((t,r)=>{if(t){s(t)}else{n(r)}}))}))}async entryData(t){const r=await this.stream(t);return new Promise(((t,n)=>{const s=[];r.on("data",(t=>s.push(t)));r.on("end",(()=>{t(Buffer.concat(s))}));r.on("error",(t=>{r.removeAllListeners("end");n(t)}))}))}async extract(t,r){const n=await this[d];return new Promise(((s,i)=>{n.extract(t,r,((t,r)=>{if(t){i(t)}else{s(r)}}))}))}async close(){const t=await this[d];return new Promise(((r,n)=>{t.close((t=>{if(t){n(t)}else{r()}}))}))}};class CentralDirectoryHeader{read(t){if(t.length!==u.ENDHDR||t.readUInt32LE(0)!==u.ENDSIG){throw new Error("Invalid central directory")}this.volumeEntries=t.readUInt16LE(u.ENDSUB);this.totalEntries=t.readUInt16LE(u.ENDTOT);this.size=t.readUInt32LE(u.ENDSIZ);this.offset=t.readUInt32LE(u.ENDOFF);this.commentLength=t.readUInt16LE(u.ENDCOM)}}class CentralDirectoryLoc64Header{read(t){if(t.length!==u.ENDL64HDR||t.readUInt32LE(0)!==u.ENDL64SIG){throw new Error("Invalid zip64 central directory locator")}this.headerOffset=readUInt64LE(t,u.ENDSUB)}}class CentralDirectoryZip64Header{read(t){if(t.length!==u.END64HDR||t.readUInt32LE(0)!==u.END64SIG){throw new Error("Invalid central directory")}this.volumeEntries=readUInt64LE(t,u.END64SUB);this.totalEntries=readUInt64LE(t,u.END64TOT);this.size=readUInt64LE(t,u.END64SIZ);this.offset=readUInt64LE(t,u.END64OFF)}}class ZipEntry{readHeader(t,r){if(t.length<r+u.CENHDR||t.readUInt32LE(r)!==u.CENSIG){throw new Error("Invalid entry header")}this.verMade=t.readUInt16LE(r+u.CENVEM);this.version=t.readUInt16LE(r+u.CENVER);this.flags=t.readUInt16LE(r+u.CENFLG);this.method=t.readUInt16LE(r+u.CENHOW);const n=t.readUInt16LE(r+u.CENTIM);const s=t.readUInt16LE(r+u.CENTIM+2);this.time=parseZipTime(n,s);this.crc=t.readUInt32LE(r+u.CENCRC);this.compressedSize=t.readUInt32LE(r+u.CENSIZ);this.size=t.readUInt32LE(r+u.CENLEN);this.fnameLen=t.readUInt16LE(r+u.CENNAM);this.extraLen=t.readUInt16LE(r+u.CENEXT);this.comLen=t.readUInt16LE(r+u.CENCOM);this.diskStart=t.readUInt16LE(r+u.CENDSK);this.inattr=t.readUInt16LE(r+u.CENATT);this.attr=t.readUInt32LE(r+u.CENATX);this.offset=t.readUInt32LE(r+u.CENOFF)}readDataHeader(t){if(t.readUInt32LE(0)!==u.LOCSIG){throw new Error("Invalid local header")}this.version=t.readUInt16LE(u.LOCVER);this.flags=t.readUInt16LE(u.LOCFLG);this.method=t.readUInt16LE(u.LOCHOW);const r=t.readUInt16LE(u.LOCTIM);const n=t.readUInt16LE(u.LOCTIM+2);this.time=parseZipTime(r,n);this.crc=t.readUInt32LE(u.LOCCRC)||this.crc;const s=t.readUInt32LE(u.LOCSIZ);if(s&&s!==u.EF_ZIP64_OR_32){this.compressedSize=s}const i=t.readUInt32LE(u.LOCLEN);if(i&&i!==u.EF_ZIP64_OR_32){this.size=i}this.fnameLen=t.readUInt16LE(u.LOCNAM);this.extraLen=t.readUInt16LE(u.LOCEXT)}read(t,r,n){const s=t.slice(r,r+=this.fnameLen);this.name=n?n.decode(new Uint8Array(s)):s.toString("utf8");const i=t[r-1];this.isDirectory=i===47||i===92;if(this.extraLen){this.readExtra(t,r);r+=this.extraLen}this.comment=this.comLen?t.slice(r,r+this.comLen).toString():null}validateName(){if(/\\|^\w+:|^\/|(^|\/)\.\.(\/|$)/.test(this.name)){throw new Error("Malicious entry: "+this.name)}}readExtra(t,r){let n,s;const i=r+this.extraLen;while(r<i){n=t.readUInt16LE(r);r+=2;s=t.readUInt16LE(r);r+=2;if(u.ID_ZIP64===n){this.parseZip64Extra(t,r,s)}r+=s}}parseZip64Extra(t,r,n){if(n>=8&&this.size===u.EF_ZIP64_OR_32){this.size=readUInt64LE(t,r);r+=8;n-=8}if(n>=8&&this.compressedSize===u.EF_ZIP64_OR_32){this.compressedSize=readUInt64LE(t,r);r+=8;n-=8}if(n>=8&&this.offset===u.EF_ZIP64_OR_32){this.offset=readUInt64LE(t,r);r+=8;n-=8}if(n>=4&&this.diskStart===u.EF_ZIP64_OR_16){this.diskStart=t.readUInt32LE(r)}}get encrypted(){return(this.flags&u.FLG_ENTRY_ENC)===u.FLG_ENTRY_ENC}get isFile(){return!this.isDirectory}}class FsRead{constructor(t,r,n,s,i,o){this.fd=t;this.buffer=r;this.offset=n;this.length=s;this.position=i;this.callback=o;this.bytesRead=0;this.waiting=false}read(t){StreamZip.debugLog("read",this.position,this.bytesRead,this.length,this.offset);this.waiting=true;let r;if(t){let n=0;try{n=s.readSync(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead)}catch(t){r=t}this.readCallback(t,r,r?n:null)}else{s.read(this.fd,this.buffer,this.offset+this.bytesRead,this.length-this.bytesRead,this.position+this.bytesRead,this.readCallback.bind(this,t))}}readCallback(t,r,n){if(typeof n==="number"){this.bytesRead+=n}if(r||!n||this.bytesRead===this.length){this.waiting=false;return this.callback(r,this.bytesRead)}else{this.read(t)}}}class FileWindowBuffer{constructor(t){this.position=0;this.buffer=Buffer.alloc(0);this.fd=t;this.fsOp=null}checkOp(){if(this.fsOp&&this.fsOp.waiting){throw new Error("Operation in progress")}}read(t,r,n){this.checkOp();if(this.buffer.length<r){this.buffer=Buffer.alloc(r)}this.position=t;this.fsOp=new FsRead(this.fd,this.buffer,0,r,this.position,n).read()}expandLeft(t,r){this.checkOp();this.buffer=Buffer.concat([Buffer.alloc(t),this.buffer]);this.position-=t;if(this.position<0){this.position=0}this.fsOp=new FsRead(this.fd,this.buffer,0,t,this.position,r).read()}expandRight(t,r){this.checkOp();const n=this.buffer.length;this.buffer=Buffer.concat([this.buffer,Buffer.alloc(t)]);this.fsOp=new FsRead(this.fd,this.buffer,n,t,this.position+n,r).read()}moveRight(t,r,n){this.checkOp();if(n){this.buffer.copy(this.buffer,0,n)}else{n=0}this.position+=n;this.fsOp=new FsRead(this.fd,this.buffer,this.buffer.length-n,n,this.position+this.buffer.length-n,r).read()}}class EntryDataReaderStream extends c.Readable{constructor(t,r,n){super();this.fd=t;this.offset=r;this.length=n;this.pos=0;this.readCallback=this.readCallback.bind(this)}_read(t){const r=Buffer.alloc(Math.min(t,this.length-this.pos));if(r.length){s.read(this.fd,r,0,r.length,this.offset+this.pos,this.readCallback)}else{this.push(null)}}readCallback(t,r,n){this.pos+=r;if(t){this.emit("error",t);this.push(null)}else if(!r){this.push(null)}else{if(r!==n.length){n=n.slice(0,r)}this.push(n)}}}class EntryVerifyStream extends c.Transform{constructor(t,r,n){super();this.verify=new CrcVerify(r,n);t.on("error",(t=>{this.emit("error",t)}))}_transform(t,r,n){let s;try{this.verify.data(t)}catch(t){s=t}n(s,t)}}class CrcVerify{constructor(t,r){this.crc=t;this.size=r;this.state={crc:~0,size:0}}data(t){const r=CrcVerify.getCrcTable();let n=this.state.crc;let s=0;let i=t.length;while(--i>=0){n=r[(n^t[s++])&255]^n>>>8}this.state.crc=n;this.state.size+=t.length;if(this.state.size>=this.size){const t=Buffer.alloc(4);t.writeInt32LE(~this.state.crc&4294967295,0);n=t.readUInt32LE(0);if(n!==this.crc){throw new Error("Invalid CRC")}if(this.state.size!==this.size){throw new Error("Invalid size")}}}static getCrcTable(){let t=CrcVerify.crcTable;if(!t){CrcVerify.crcTable=t=[];const r=Buffer.alloc(4);for(let n=0;n<256;n++){let s=n;for(let t=8;--t>=0;){if((s&1)!==0){s=3988292384^s>>>1}else{s=s>>>1}}if(s<0){r.writeInt32LE(s,0);s=r.readUInt32LE(0)}t[n]=s}}return t}}function parseZipTime(t,r){const n=toBits(t,16);const s=toBits(r,16);const i={h:parseInt(n.slice(0,5).join(""),2),m:parseInt(n.slice(5,11).join(""),2),s:parseInt(n.slice(11,16).join(""),2)*2,Y:parseInt(s.slice(0,7).join(""),2)+1980,M:parseInt(s.slice(7,11).join(""),2),D:parseInt(s.slice(11,16).join(""),2)};const o=[i.Y,i.M,i.D].join("-")+" "+[i.h,i.m,i.s].join(":")+" GMT+0";return new Date(o).getTime()}function toBits(t,r){let n=(t>>>0).toString(2);while(n.length<r){n="0"+n}return n.split("")}function readUInt64LE(t,r){return t.readUInt32LE(r+4)*4294967296+t.readUInt32LE(r)}t.exports=StreamZip},8569:(t,r,n)=>{t.exports=n(3322)},6099:(t,r,n)=>{const s=n(1017);const i="\\\\/";const o=`[^${i}]`;const a="\\.";const l="\\+";const c="\\?";const u="\\/";const d="(?=.)";const p="[^/]";const h=`(?:${u}|$)`;const m=`(?:^|${u})`;const g=`${a}{1,2}${h}`;const y=`(?!${a})`;const b=`(?!${m}${g})`;const _=`(?!${a}{0,1}${h})`;const S=`(?!${g})`;const E=`[^.${u}]`;const v=`${p}*?`;const R={DOT_LITERAL:a,PLUS_LITERAL:l,QMARK_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,QMARK:p,END_ANCHOR:h,DOTS_SLASH:g,NO_DOT:y,NO_DOTS:b,NO_DOT_SLASH:_,NO_DOTS_SLASH:S,QMARK_NO_DOT:E,STAR:v,START_ANCHOR:m};const w={...R,SLASH_LITERAL:`[${i}]`,QMARK:o,STAR:`${o}*?`,DOTS_SLASH:`${a}{1,2}(?:[${i}]|$)`,NO_DOT:`(?!${a})`,NO_DOTS:`(?!(?:^|[${i}])${a}{1,2}(?:[${i}]|$))`,NO_DOT_SLASH:`(?!${a}{0,1}(?:[${i}]|$))`,NO_DOTS_SLASH:`(?!${a}{1,2}(?:[${i}]|$))`,QMARK_NO_DOT:`[^.${i}]`,START_ANCHOR:`(?:^|[${i}])`,END_ANCHOR:`(?:[${i}]|$)`};const C={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};t.exports={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:C,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:s.sep,extglobChars(t){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${t.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(t){return t===true?w:R}}},2139:(t,r,n)=>{const s=n(6099);const i=n(479);const{MAX_LENGTH:o,POSIX_REGEX_SOURCE:a,REGEX_NON_SPECIAL_CHARS:l,REGEX_SPECIAL_CHARS_BACKREF:c,REPLACEMENTS:u}=s;const expandRange=(t,r)=>{if(typeof r.expandRange==="function"){return r.expandRange(...t,r)}t.sort();const n=`[${t.join("-")}]`;try{new RegExp(n)}catch(r){return t.map((t=>i.escapeRegex(t))).join("..")}return n};const syntaxError=(t,r)=>`Missing ${t}: "${r}" - use "\\\\${r}" to match literal characters`;const parse=(t,r)=>{if(typeof t!=="string"){throw new TypeError("Expected a string")}t=u[t]||t;const n={...r};const d=typeof n.maxLength==="number"?Math.min(o,n.maxLength):o;let p=t.length;if(p>d){throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${d}`)}const h={type:"bos",value:"",output:n.prepend||""};const m=[h];const g=n.capture?"":"?:";const y=i.isWindows(r);const b=s.globChars(y);const _=s.extglobChars(b);const{DOT_LITERAL:S,PLUS_LITERAL:E,SLASH_LITERAL:v,ONE_CHAR:R,DOTS_SLASH:w,NO_DOT:C,NO_DOT_SLASH:A,NO_DOTS_SLASH:T,QMARK:I,QMARK_NO_DOT:P,STAR:N,START_ANCHOR:D}=b;const globstar=t=>`(${g}(?:(?!${D}${t.dot?w:S}).)*?)`;const O=n.dot?"":C;const k=n.dot?I:P;let $=n.bash===true?globstar(n):N;if(n.capture){$=`(${$})`}if(typeof n.noext==="boolean"){n.noextglob=n.noext}const L={input:t,index:-1,start:0,dot:n.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:m};t=i.removePrefix(t,L);p=t.length;const F=[];const M=[];const B=[];let j=h;let W;const eos=()=>L.index===p-1;const U=L.peek=(r=1)=>t[L.index+r];const q=L.advance=()=>t[++L.index]||"";const remaining=()=>t.slice(L.index+1);const consume=(t="",r=0)=>{L.consumed+=t;L.index+=r};const append=t=>{L.output+=t.output!=null?t.output:t.value;consume(t.value)};const negate=()=>{let t=1;while(U()==="!"&&(U(2)!=="("||U(3)==="?")){q();L.start++;t++}if(t%2===0){return false}L.negated=true;L.start++;return true};const increment=t=>{L[t]++;B.push(t)};const decrement=t=>{L[t]--;B.pop()};const push=t=>{if(j.type==="globstar"){const r=L.braces>0&&(t.type==="comma"||t.type==="brace");const n=t.extglob===true||F.length&&(t.type==="pipe"||t.type==="paren");if(t.type!=="slash"&&t.type!=="paren"&&!r&&!n){L.output=L.output.slice(0,-j.output.length);j.type="star";j.value="*";j.output=$;L.output+=j.output}}if(F.length&&t.type!=="paren"){F[F.length-1].inner+=t.value}if(t.value||t.output)append(t);if(j&&j.type==="text"&&t.type==="text"){j.value+=t.value;j.output=(j.output||"")+t.value;return}t.prev=j;m.push(t);j=t};const extglobOpen=(t,r)=>{const s={..._[r],conditions:1,inner:""};s.prev=j;s.parens=L.parens;s.output=L.output;const i=(n.capture?"(":"")+s.open;increment("parens");push({type:t,value:r,output:L.output?"":R});push({type:"paren",extglob:true,value:q(),output:i});F.push(s)};const extglobClose=t=>{let s=t.close+(n.capture?")":"");let i;if(t.type==="negate"){let o=$;if(t.inner&&t.inner.length>1&&t.inner.includes("/")){o=globstar(n)}if(o!==$||eos()||/^\)+$/.test(remaining())){s=t.close=`)$))${o}`}if(t.inner.includes("*")&&(i=remaining())&&/^\.[^\\/.]+$/.test(i)){const n=parse(i,{...r,fastpaths:false}).output;s=t.close=`)${n})${o})`}if(t.prev.type==="bos"){L.negatedExtglob=true}}push({type:"paren",extglob:true,value:W,output:s});decrement("parens")};if(n.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(t)){let s=false;let o=t.replace(c,((t,r,n,i,o,a)=>{if(i==="\\"){s=true;return t}if(i==="?"){if(r){return r+i+(o?I.repeat(o.length):"")}if(a===0){return k+(o?I.repeat(o.length):"")}return I.repeat(n.length)}if(i==="."){return S.repeat(n.length)}if(i==="*"){if(r){return r+i+(o?$:"")}return $}return r?t:`\\${t}`}));if(s===true){if(n.unescape===true){o=o.replace(/\\/g,"")}else{o=o.replace(/\\+/g,(t=>t.length%2===0?"\\\\":t?"\\":""))}}if(o===t&&n.contains===true){L.output=t;return L}L.output=i.wrapOutput(o,L,r);return L}while(!eos()){W=q();if(W==="\0"){continue}if(W==="\\"){const t=U();if(t==="/"&&n.bash!==true){continue}if(t==="."||t===";"){continue}if(!t){W+="\\";push({type:"text",value:W});continue}const r=/^\\+/.exec(remaining());let s=0;if(r&&r[0].length>2){s=r[0].length;L.index+=s;if(s%2!==0){W+="\\"}}if(n.unescape===true){W=q()}else{W+=q()}if(L.brackets===0){push({type:"text",value:W});continue}}if(L.brackets>0&&(W!=="]"||j.value==="["||j.value==="[^")){if(n.posix!==false&&W===":"){const t=j.value.slice(1);if(t.includes("[")){j.posix=true;if(t.includes(":")){const t=j.value.lastIndexOf("[");const r=j.value.slice(0,t);const n=j.value.slice(t+2);const s=a[n];if(s){j.value=r+s;L.backtrack=true;q();if(!h.output&&m.indexOf(j)===1){h.output=R}continue}}}}if(W==="["&&U()!==":"||W==="-"&&U()==="]"){W=`\\${W}`}if(W==="]"&&(j.value==="["||j.value==="[^")){W=`\\${W}`}if(n.posix===true&&W==="!"&&j.value==="["){W="^"}j.value+=W;append({value:W});continue}if(L.quotes===1&&W!=='"'){W=i.escapeRegex(W);j.value+=W;append({value:W});continue}if(W==='"'){L.quotes=L.quotes===1?0:1;if(n.keepQuotes===true){push({type:"text",value:W})}continue}if(W==="("){increment("parens");push({type:"paren",value:W});continue}if(W===")"){if(L.parens===0&&n.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const t=F[F.length-1];if(t&&L.parens===t.parens+1){extglobClose(F.pop());continue}push({type:"paren",value:W,output:L.parens?")":"\\)"});decrement("parens");continue}if(W==="["){if(n.nobracket===true||!remaining().includes("]")){if(n.nobracket!==true&&n.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}W=`\\${W}`}else{increment("brackets")}push({type:"bracket",value:W});continue}if(W==="]"){if(n.nobracket===true||j&&j.type==="bracket"&&j.value.length===1){push({type:"text",value:W,output:`\\${W}`});continue}if(L.brackets===0){if(n.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:W,output:`\\${W}`});continue}decrement("brackets");const t=j.value.slice(1);if(j.posix!==true&&t[0]==="^"&&!t.includes("/")){W=`/${W}`}j.value+=W;append({value:W});if(n.literalBrackets===false||i.hasRegexChars(t)){continue}const r=i.escapeRegex(j.value);L.output=L.output.slice(0,-j.value.length);if(n.literalBrackets===true){L.output+=r;j.value=r;continue}j.value=`(${g}${r}|${j.value})`;L.output+=j.value;continue}if(W==="{"&&n.nobrace!==true){increment("braces");const t={type:"brace",value:W,output:"(",outputIndex:L.output.length,tokensIndex:L.tokens.length};M.push(t);push(t);continue}if(W==="}"){const t=M[M.length-1];if(n.nobrace===true||!t){push({type:"text",value:W,output:W});continue}let r=")";if(t.dots===true){const t=m.slice();const s=[];for(let r=t.length-1;r>=0;r--){m.pop();if(t[r].type==="brace"){break}if(t[r].type!=="dots"){s.unshift(t[r].value)}}r=expandRange(s,n);L.backtrack=true}if(t.comma!==true&&t.dots!==true){const n=L.output.slice(0,t.outputIndex);const s=L.tokens.slice(t.tokensIndex);t.value=t.output="\\{";W=r="\\}";L.output=n;for(const t of s){L.output+=t.output||t.value}}push({type:"brace",value:W,output:r});decrement("braces");M.pop();continue}if(W==="|"){if(F.length>0){F[F.length-1].conditions++}push({type:"text",value:W});continue}if(W===","){let t=W;const r=M[M.length-1];if(r&&B[B.length-1]==="braces"){r.comma=true;t="|"}push({type:"comma",value:W,output:t});continue}if(W==="/"){if(j.type==="dot"&&L.index===L.start+1){L.start=L.index+1;L.consumed="";L.output="";m.pop();j=h;continue}push({type:"slash",value:W,output:v});continue}if(W==="."){if(L.braces>0&&j.type==="dot"){if(j.value===".")j.output=S;const t=M[M.length-1];j.type="dots";j.output+=W;j.value+=W;t.dots=true;continue}if(L.braces+L.parens===0&&j.type!=="bos"&&j.type!=="slash"){push({type:"text",value:W,output:S});continue}push({type:"dot",value:W,output:S});continue}if(W==="?"){const t=j&&j.value==="(";if(!t&&n.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("qmark",W);continue}if(j&&j.type==="paren"){const t=U();let r=W;if(t==="<"&&!i.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(j.value==="("&&!/[!=<:]/.test(t)||t==="<"&&!/<([!=]|\w+>)/.test(remaining())){r=`\\${W}`}push({type:"text",value:W,output:r});continue}if(n.dot!==true&&(j.type==="slash"||j.type==="bos")){push({type:"qmark",value:W,output:P});continue}push({type:"qmark",value:W,output:I});continue}if(W==="!"){if(n.noextglob!==true&&U()==="("){if(U(2)!=="?"||!/[!=<:]/.test(U(3))){extglobOpen("negate",W);continue}}if(n.nonegate!==true&&L.index===0){negate();continue}}if(W==="+"){if(n.noextglob!==true&&U()==="("&&U(2)!=="?"){extglobOpen("plus",W);continue}if(j&&j.value==="("||n.regex===false){push({type:"plus",value:W,output:E});continue}if(j&&(j.type==="bracket"||j.type==="paren"||j.type==="brace")||L.parens>0){push({type:"plus",value:W});continue}push({type:"plus",value:E});continue}if(W==="@"){if(n.noextglob!==true&&U()==="("&&U(2)!=="?"){push({type:"at",extglob:true,value:W,output:""});continue}push({type:"text",value:W});continue}if(W!=="*"){if(W==="$"||W==="^"){W=`\\${W}`}const t=l.exec(remaining());if(t){W+=t[0];L.index+=t[0].length}push({type:"text",value:W});continue}if(j&&(j.type==="globstar"||j.star===true)){j.type="star";j.star=true;j.value+=W;j.output=$;L.backtrack=true;L.globstar=true;consume(W);continue}let r=remaining();if(n.noextglob!==true&&/^\([^?]/.test(r)){extglobOpen("star",W);continue}if(j.type==="star"){if(n.noglobstar===true){consume(W);continue}const s=j.prev;const i=s.prev;const o=s.type==="slash"||s.type==="bos";const a=i&&(i.type==="star"||i.type==="globstar");if(n.bash===true&&(!o||r[0]&&r[0]!=="/")){push({type:"star",value:W,output:""});continue}const l=L.braces>0&&(s.type==="comma"||s.type==="brace");const c=F.length&&(s.type==="pipe"||s.type==="paren");if(!o&&s.type!=="paren"&&!l&&!c){push({type:"star",value:W,output:""});continue}while(r.slice(0,3)==="/**"){const n=t[L.index+4];if(n&&n!=="/"){break}r=r.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){j.type="globstar";j.value+=W;j.output=globstar(n);L.output=j.output;L.globstar=true;consume(W);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!a&&eos()){L.output=L.output.slice(0,-(s.output+j.output).length);s.output=`(?:${s.output}`;j.type="globstar";j.output=globstar(n)+(n.strictSlashes?")":"|$)");j.value+=W;L.globstar=true;L.output+=s.output+j.output;consume(W);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&r[0]==="/"){const t=r[1]!==void 0?"|$":"";L.output=L.output.slice(0,-(s.output+j.output).length);s.output=`(?:${s.output}`;j.type="globstar";j.output=`${globstar(n)}${v}|${v}${t})`;j.value+=W;L.output+=s.output+j.output;L.globstar=true;consume(W+q());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&r[0]==="/"){j.type="globstar";j.value+=W;j.output=`(?:^|${v}|${globstar(n)}${v})`;L.output=j.output;L.globstar=true;consume(W+q());push({type:"slash",value:"/",output:""});continue}L.output=L.output.slice(0,-j.output.length);j.type="globstar";j.output=globstar(n);j.value+=W;L.output+=j.output;L.globstar=true;consume(W);continue}const s={type:"star",value:W,output:$};if(n.bash===true){s.output=".*?";if(j.type==="bos"||j.type==="slash"){s.output=O+s.output}push(s);continue}if(j&&(j.type==="bracket"||j.type==="paren")&&n.regex===true){s.output=W;push(s);continue}if(L.index===L.start||j.type==="slash"||j.type==="dot"){if(j.type==="dot"){L.output+=A;j.output+=A}else if(n.dot===true){L.output+=T;j.output+=T}else{L.output+=O;j.output+=O}if(U()!=="*"){L.output+=R;j.output+=R}}push(s)}while(L.brackets>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));L.output=i.escapeLast(L.output,"[");decrement("brackets")}while(L.parens>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));L.output=i.escapeLast(L.output,"(");decrement("parens")}while(L.braces>0){if(n.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));L.output=i.escapeLast(L.output,"{");decrement("braces")}if(n.strictSlashes!==true&&(j.type==="star"||j.type==="bracket")){push({type:"maybe_slash",value:"",output:`${v}?`})}if(L.backtrack===true){L.output="";for(const t of L.tokens){L.output+=t.output!=null?t.output:t.value;if(t.suffix){L.output+=t.suffix}}}return L};parse.fastpaths=(t,r)=>{const n={...r};const a=typeof n.maxLength==="number"?Math.min(o,n.maxLength):o;const l=t.length;if(l>a){throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`)}t=u[t]||t;const c=i.isWindows(r);const{DOT_LITERAL:d,SLASH_LITERAL:p,ONE_CHAR:h,DOTS_SLASH:m,NO_DOT:g,NO_DOTS:y,NO_DOTS_SLASH:b,STAR:_,START_ANCHOR:S}=s.globChars(c);const E=n.dot?y:g;const v=n.dot?b:g;const R=n.capture?"":"?:";const w={negated:false,prefix:""};let C=n.bash===true?".*?":_;if(n.capture){C=`(${C})`}const globstar=t=>{if(t.noglobstar===true)return C;return`(${R}(?:(?!${S}${t.dot?m:d}).)*?)`};const create=t=>{switch(t){case"*":return`${E}${h}${C}`;case".*":return`${d}${h}${C}`;case"*.*":return`${E}${C}${d}${h}${C}`;case"*/*":return`${E}${C}${p}${h}${v}${C}`;case"**":return E+globstar(n);case"**/*":return`(?:${E}${globstar(n)}${p})?${v}${h}${C}`;case"**/*.*":return`(?:${E}${globstar(n)}${p})?${v}${C}${d}${h}${C}`;case"**/.*":return`(?:${E}${globstar(n)}${p})?${d}${h}${C}`;default:{const r=/^(.*?)\.(\w+)$/.exec(t);if(!r)return;const n=create(r[1]);if(!n)return;return n+d+r[2]}}};const A=i.removePrefix(t,w);let T=create(A);if(T&&n.strictSlashes!==true){T+=`${p}?`}return T};t.exports=parse},3322:(t,r,n)=>{const s=n(1017);const i=n(2429);const o=n(2139);const a=n(479);const l=n(6099);const isObject=t=>t&&typeof t==="object"&&!Array.isArray(t);const picomatch=(t,r,n=false)=>{if(Array.isArray(t)){const s=t.map((t=>picomatch(t,r,n)));const arrayMatcher=t=>{for(const r of s){const n=r(t);if(n)return n}return false};return arrayMatcher}const s=isObject(t)&&t.tokens&&t.input;if(t===""||typeof t!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const i=r||{};const o=a.isWindows(r);const l=s?picomatch.compileRe(t,r):picomatch.makeRe(t,r,false,true);const c=l.state;delete l.state;let isIgnored=()=>false;if(i.ignore){const t={...r,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(i.ignore,t,n)}const matcher=(n,s=false)=>{const{isMatch:a,match:u,output:d}=picomatch.test(n,l,r,{glob:t,posix:o});const p={glob:t,state:c,regex:l,posix:o,input:n,output:d,match:u,isMatch:a};if(typeof i.onResult==="function"){i.onResult(p)}if(a===false){p.isMatch=false;return s?p:false}if(isIgnored(n)){if(typeof i.onIgnore==="function"){i.onIgnore(p)}p.isMatch=false;return s?p:false}if(typeof i.onMatch==="function"){i.onMatch(p)}return s?p:true};if(n){matcher.state=c}return matcher};picomatch.test=(t,r,n,{glob:s,posix:i}={})=>{if(typeof t!=="string"){throw new TypeError("Expected input to be a string")}if(t===""){return{isMatch:false,output:""}}const o=n||{};const l=o.format||(i?a.toPosixSlashes:null);let c=t===s;let u=c&&l?l(t):t;if(c===false){u=l?l(t):t;c=u===s}if(c===false||o.capture===true){if(o.matchBase===true||o.basename===true){c=picomatch.matchBase(t,r,n,i)}else{c=r.exec(u)}}return{isMatch:Boolean(c),match:c,output:u}};picomatch.matchBase=(t,r,n,i=a.isWindows(n))=>{const o=r instanceof RegExp?r:picomatch.makeRe(r,n);return o.test(s.basename(t))};picomatch.isMatch=(t,r,n)=>picomatch(r,n)(t);picomatch.parse=(t,r)=>{if(Array.isArray(t))return t.map((t=>picomatch.parse(t,r)));return o(t,{...r,fastpaths:false})};picomatch.scan=(t,r)=>i(t,r);picomatch.compileRe=(t,r,n=false,s=false)=>{if(n===true){return t.output}const i=r||{};const o=i.contains?"":"^";const a=i.contains?"":"$";let l=`${o}(?:${t.output})${a}`;if(t&&t.negated===true){l=`^(?!${l}).*$`}const c=picomatch.toRegex(l,r);if(s===true){c.state=t}return c};picomatch.makeRe=(t,r={},n=false,s=false)=>{if(!t||typeof t!=="string"){throw new TypeError("Expected a non-empty string")}let i={negated:false,fastpaths:true};if(r.fastpaths!==false&&(t[0]==="."||t[0]==="*")){i.output=o.fastpaths(t,r)}if(!i.output){i=o(t,r)}return picomatch.compileRe(i,r,n,s)};picomatch.toRegex=(t,r)=>{try{const n=r||{};return new RegExp(t,n.flags||(n.nocase?"i":""))}catch(t){if(r&&r.debug===true)throw t;return/$^/}};picomatch.constants=l;t.exports=picomatch},2429:(t,r,n)=>{const s=n(479);const{CHAR_ASTERISK:i,CHAR_AT:o,CHAR_BACKWARD_SLASH:a,CHAR_COMMA:l,CHAR_DOT:c,CHAR_EXCLAMATION_MARK:u,CHAR_FORWARD_SLASH:d,CHAR_LEFT_CURLY_BRACE:p,CHAR_LEFT_PARENTHESES:h,CHAR_LEFT_SQUARE_BRACKET:m,CHAR_PLUS:g,CHAR_QUESTION_MARK:y,CHAR_RIGHT_CURLY_BRACE:b,CHAR_RIGHT_PARENTHESES:_,CHAR_RIGHT_SQUARE_BRACKET:S}=n(6099);const isPathSeparator=t=>t===d||t===a;const depth=t=>{if(t.isPrefix!==true){t.depth=t.isGlobstar?Infinity:1}};const scan=(t,r)=>{const n=r||{};const E=t.length-1;const v=n.parts===true||n.scanToEnd===true;const R=[];const w=[];const C=[];let A=t;let T=-1;let I=0;let P=0;let N=false;let D=false;let O=false;let k=false;let $=false;let L=false;let F=false;let M=false;let B=false;let j=false;let W=0;let U;let q;let H={value:"",depth:0,isGlob:false};const eos=()=>T>=E;const peek=()=>A.charCodeAt(T+1);const advance=()=>{U=q;return A.charCodeAt(++T)};while(T<E){q=advance();let t;if(q===a){F=H.backslashes=true;q=advance();if(q===p){L=true}continue}if(L===true||q===p){W++;while(eos()!==true&&(q=advance())){if(q===a){F=H.backslashes=true;advance();continue}if(q===p){W++;continue}if(L!==true&&q===c&&(q=advance())===c){N=H.isBrace=true;O=H.isGlob=true;j=true;if(v===true){continue}break}if(L!==true&&q===l){N=H.isBrace=true;O=H.isGlob=true;j=true;if(v===true){continue}break}if(q===b){W--;if(W===0){L=false;N=H.isBrace=true;j=true;break}}}if(v===true){continue}break}if(q===d){R.push(T);w.push(H);H={value:"",depth:0,isGlob:false};if(j===true)continue;if(U===c&&T===I+1){I+=2;continue}P=T+1;continue}if(n.noext!==true){const t=q===g||q===o||q===i||q===y||q===u;if(t===true&&peek()===h){O=H.isGlob=true;k=H.isExtglob=true;j=true;if(q===u&&T===I){B=true}if(v===true){while(eos()!==true&&(q=advance())){if(q===a){F=H.backslashes=true;q=advance();continue}if(q===_){O=H.isGlob=true;j=true;break}}continue}break}}if(q===i){if(U===i)$=H.isGlobstar=true;O=H.isGlob=true;j=true;if(v===true){continue}break}if(q===y){O=H.isGlob=true;j=true;if(v===true){continue}break}if(q===m){while(eos()!==true&&(t=advance())){if(t===a){F=H.backslashes=true;advance();continue}if(t===S){D=H.isBracket=true;O=H.isGlob=true;j=true;break}}if(v===true){continue}break}if(n.nonegate!==true&&q===u&&T===I){M=H.negated=true;I++;continue}if(n.noparen!==true&&q===h){O=H.isGlob=true;if(v===true){while(eos()!==true&&(q=advance())){if(q===h){F=H.backslashes=true;q=advance();continue}if(q===_){j=true;break}}continue}break}if(O===true){j=true;if(v===true){continue}break}}if(n.noext===true){k=false;O=false}let V=A;let G="";let z="";if(I>0){G=A.slice(0,I);A=A.slice(I);P-=I}if(V&&O===true&&P>0){V=A.slice(0,P);z=A.slice(P)}else if(O===true){V="";z=A}else{V=A}if(V&&V!==""&&V!=="/"&&V!==A){if(isPathSeparator(V.charCodeAt(V.length-1))){V=V.slice(0,-1)}}if(n.unescape===true){if(z)z=s.removeBackslashes(z);if(V&&F===true){V=s.removeBackslashes(V)}}const Y={prefix:G,input:t,start:I,base:V,glob:z,isBrace:N,isBracket:D,isGlob:O,isExtglob:k,isGlobstar:$,negated:M,negatedExtglob:B};if(n.tokens===true){Y.maxDepth=0;if(!isPathSeparator(q)){w.push(H)}Y.tokens=w}if(n.parts===true||n.tokens===true){let r;for(let s=0;s<R.length;s++){const i=r?r+1:I;const o=R[s];const a=t.slice(i,o);if(n.tokens){if(s===0&&I!==0){w[s].isPrefix=true;w[s].value=G}else{w[s].value=a}depth(w[s]);Y.maxDepth+=w[s].depth}if(s!==0||a!==""){C.push(a)}r=o}if(r&&r+1<t.length){const s=t.slice(r+1);C.push(s);if(n.tokens){w[w.length-1].value=s;depth(w[w.length-1]);Y.maxDepth+=w[w.length-1].depth}}Y.slashes=R;Y.parts=C}return Y};t.exports=scan},479:(t,r,n)=>{const s=n(1017);const i=process.platform==="win32";const{REGEX_BACKSLASH:o,REGEX_REMOVE_BACKSLASH:a,REGEX_SPECIAL_CHARS:l,REGEX_SPECIAL_CHARS_GLOBAL:c}=n(6099);r.isObject=t=>t!==null&&typeof t==="object"&&!Array.isArray(t);r.hasRegexChars=t=>l.test(t);r.isRegexChar=t=>t.length===1&&r.hasRegexChars(t);r.escapeRegex=t=>t.replace(c,"\\$1");r.toPosixSlashes=t=>t.replace(o,"/");r.removeBackslashes=t=>t.replace(a,(t=>t==="\\"?"":t));r.supportsLookbehinds=()=>{const t=process.version.slice(1).split(".").map(Number);if(t.length===3&&t[0]>=9||t[0]===8&&t[1]>=10){return true}return false};r.isWindows=t=>{if(t&&typeof t.windows==="boolean"){return t.windows}return i===true||s.sep==="\\"};r.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);if(i===-1)return t;if(t[i-1]==="\\")return r.escapeLast(t,n,i-1);return`${t.slice(0,i)}\\${t.slice(i)}`};r.removePrefix=(t,r={})=>{let n=t;if(n.startsWith("./")){n=n.slice(2);r.prefix="./"}return n};r.wrapOutput=(t,r={},n={})=>{const s=n.contains?"":"^";const i=n.contains?"":"$";let o=`${s}(?:${t})${i}`;if(r.negated===true){o=`(?:^(?!${o}).*$)`}return o}},9795:t=>{
|
||
/*! queue-microtask. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
let r;t.exports=typeof queueMicrotask==="function"?queueMicrotask.bind(typeof window!=="undefined"?window:global):t=>(r||(r=Promise.resolve())).then(t).catch((t=>setTimeout((()=>{throw t}),0)))},2113:t=>{function reusify(t){var r=new t;var n=r;function get(){var s=r;if(s.next){r=s.next}else{r=new t;n=r}s.next=null;return s}function release(t){n.next=t;n=t}return{get:get,release:release}}t.exports=reusify},5288:(t,r,n)=>{
|
||
/*! run-parallel. MIT License. Feross Aboukhadijeh <https://feross.org/opensource> */
|
||
t.exports=runParallel;const s=n(9795);function runParallel(t,r){let n,i,o;let a=true;if(Array.isArray(t)){n=[];i=t.length}else{o=Object.keys(t);n={};i=o.length}function done(t){function end(){if(r)r(t,n);r=null}if(a)s(end);else end()}function each(t,r,s){n[t]=s;if(--i===0||r){done(r)}}if(!i){done(null)}else if(o){o.forEach((function(r){t[r]((function(t,n){each(r,t,n)}))}))}else{t.forEach((function(t,r){t((function(t,n){each(r,t,n)}))}))}a=false}},1532:(t,r,n)=>{const s=Symbol("SemVer ANY");class Comparator{static get ANY(){return s}constructor(t,r){r=i(r);if(t instanceof Comparator){if(t.loose===!!r.loose){return t}else{t=t.value}}t=t.trim().split(/\s+/).join(" ");c("comparator",t,r);this.options=r;this.loose=!!r.loose;this.parse(t);if(this.semver===s){this.value=""}else{this.value=this.operator+this.semver.version}c("comp",this)}parse(t){const r=this.options.loose?o[a.COMPARATORLOOSE]:o[a.COMPARATOR];const n=t.match(r);if(!n){throw new TypeError(`Invalid comparator: ${t}`)}this.operator=n[1]!==undefined?n[1]:"";if(this.operator==="="){this.operator=""}if(!n[2]){this.semver=s}else{this.semver=new u(n[2],this.options.loose)}}toString(){return this.value}test(t){c("Comparator.test",t,this.options.loose);if(this.semver===s||t===s){return true}if(typeof t==="string"){try{t=new u(t,this.options)}catch(t){return false}}return l(t,this.operator,this.semver,this.options)}intersects(t,r){if(!(t instanceof Comparator)){throw new TypeError("a Comparator is required")}if(this.operator===""){if(this.value===""){return true}return new d(t.value,r).test(this.value)}else if(t.operator===""){if(t.value===""){return true}return new d(this.value,r).test(t.semver)}r=i(r);if(r.includePrerelease&&(this.value==="<0.0.0-0"||t.value==="<0.0.0-0")){return false}if(!r.includePrerelease&&(this.value.startsWith("<0.0.0")||t.value.startsWith("<0.0.0"))){return false}if(this.operator.startsWith(">")&&t.operator.startsWith(">")){return true}if(this.operator.startsWith("<")&&t.operator.startsWith("<")){return true}if(this.semver.version===t.semver.version&&this.operator.includes("=")&&t.operator.includes("=")){return true}if(l(this.semver,"<",t.semver,r)&&this.operator.startsWith(">")&&t.operator.startsWith("<")){return true}if(l(this.semver,">",t.semver,r)&&this.operator.startsWith("<")&&t.operator.startsWith(">")){return true}return false}}t.exports=Comparator;const i=n(785);const{safeRe:o,t:a}=n(9523);const l=n(5098);const c=n(427);const u=n(8088);const d=n(9828)},9828:(t,r,n)=>{class Range{constructor(t,r){r=o(r);if(t instanceof Range){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{return new Range(t.raw,r)}}if(t instanceof a){this.raw=t.value;this.set=[[t]];this.format();return this}this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;this.raw=t.trim().split(/\s+/).join(" ");this.set=this.raw.split("||").map((t=>this.parseRange(t.trim()))).filter((t=>t.length));if(!this.set.length){throw new TypeError(`Invalid SemVer Range: ${this.raw}`)}if(this.set.length>1){const t=this.set[0];this.set=this.set.filter((t=>!isNullSet(t[0])));if(this.set.length===0){this.set=[t]}else if(this.set.length>1){for(const t of this.set){if(t.length===1&&isAny(t[0])){this.set=[t];break}}}}this.format()}format(){this.range=this.set.map((t=>t.join(" ").trim())).join("||").trim();return this.range}toString(){return this.range}parseRange(t){const r=(this.options.includePrerelease&&g)|(this.options.loose&&y);const n=r+":"+t;const s=i.get(n);if(s){return s}const o=this.options.loose;const c=o?u[d.HYPHENRANGELOOSE]:u[d.HYPHENRANGE];t=t.replace(c,hyphenReplace(this.options.includePrerelease));l("hyphen replace",t);t=t.replace(u[d.COMPARATORTRIM],p);l("comparator trim",t);t=t.replace(u[d.TILDETRIM],h);l("tilde trim",t);t=t.replace(u[d.CARETTRIM],m);l("caret trim",t);let b=t.split(" ").map((t=>parseComparator(t,this.options))).join(" ").split(/\s+/).map((t=>replaceGTE0(t,this.options)));if(o){b=b.filter((t=>{l("loose invalid filter",t,this.options);return!!t.match(u[d.COMPARATORLOOSE])}))}l("range list",b);const _=new Map;const S=b.map((t=>new a(t,this.options)));for(const t of S){if(isNullSet(t)){return[t]}_.set(t.value,t)}if(_.size>1&&_.has("")){_.delete("")}const E=[..._.values()];i.set(n,E);return E}intersects(t,r){if(!(t instanceof Range)){throw new TypeError("a Range is required")}return this.set.some((n=>isSatisfiable(n,r)&&t.set.some((t=>isSatisfiable(t,r)&&n.every((n=>t.every((t=>n.intersects(t,r)))))))))}test(t){if(!t){return false}if(typeof t==="string"){try{t=new c(t,this.options)}catch(t){return false}}for(let r=0;r<this.set.length;r++){if(testSet(this.set[r],t,this.options)){return true}}return false}}t.exports=Range;const s=n(1196);const i=new s({max:1e3});const o=n(785);const a=n(1532);const l=n(427);const c=n(8088);const{safeRe:u,t:d,comparatorTrimReplace:p,tildeTrimReplace:h,caretTrimReplace:m}=n(9523);const{FLAG_INCLUDE_PRERELEASE:g,FLAG_LOOSE:y}=n(2293);const isNullSet=t=>t.value==="<0.0.0-0";const isAny=t=>t.value==="";const isSatisfiable=(t,r)=>{let n=true;const s=t.slice();let i=s.pop();while(n&&s.length){n=s.every((t=>i.intersects(t,r)));i=s.pop()}return n};const parseComparator=(t,r)=>{l("comp",t,r);t=replaceCarets(t,r);l("caret",t);t=replaceTildes(t,r);l("tildes",t);t=replaceXRanges(t,r);l("xrange",t);t=replaceStars(t,r);l("stars",t);return t};const isX=t=>!t||t.toLowerCase()==="x"||t==="*";const replaceTildes=(t,r)=>t.trim().split(/\s+/).map((t=>replaceTilde(t,r))).join(" ");const replaceTilde=(t,r)=>{const n=r.loose?u[d.TILDELOOSE]:u[d.TILDE];return t.replace(n,((r,n,s,i,o)=>{l("tilde",t,r,n,s,i,o);let a;if(isX(n)){a=""}else if(isX(s)){a=`>=${n}.0.0 <${+n+1}.0.0-0`}else if(isX(i)){a=`>=${n}.${s}.0 <${n}.${+s+1}.0-0`}else if(o){l("replaceTilde pr",o);a=`>=${n}.${s}.${i}-${o} <${n}.${+s+1}.0-0`}else{a=`>=${n}.${s}.${i} <${n}.${+s+1}.0-0`}l("tilde return",a);return a}))};const replaceCarets=(t,r)=>t.trim().split(/\s+/).map((t=>replaceCaret(t,r))).join(" ");const replaceCaret=(t,r)=>{l("caret",t,r);const n=r.loose?u[d.CARETLOOSE]:u[d.CARET];const s=r.includePrerelease?"-0":"";return t.replace(n,((r,n,i,o,a)=>{l("caret",t,r,n,i,o,a);let c;if(isX(n)){c=""}else if(isX(i)){c=`>=${n}.0.0${s} <${+n+1}.0.0-0`}else if(isX(o)){if(n==="0"){c=`>=${n}.${i}.0${s} <${n}.${+i+1}.0-0`}else{c=`>=${n}.${i}.0${s} <${+n+1}.0.0-0`}}else if(a){l("replaceCaret pr",a);if(n==="0"){if(i==="0"){c=`>=${n}.${i}.${o}-${a} <${n}.${i}.${+o+1}-0`}else{c=`>=${n}.${i}.${o}-${a} <${n}.${+i+1}.0-0`}}else{c=`>=${n}.${i}.${o}-${a} <${+n+1}.0.0-0`}}else{l("no pr");if(n==="0"){if(i==="0"){c=`>=${n}.${i}.${o}${s} <${n}.${i}.${+o+1}-0`}else{c=`>=${n}.${i}.${o}${s} <${n}.${+i+1}.0-0`}}else{c=`>=${n}.${i}.${o} <${+n+1}.0.0-0`}}l("caret return",c);return c}))};const replaceXRanges=(t,r)=>{l("replaceXRanges",t,r);return t.split(/\s+/).map((t=>replaceXRange(t,r))).join(" ")};const replaceXRange=(t,r)=>{t=t.trim();const n=r.loose?u[d.XRANGELOOSE]:u[d.XRANGE];return t.replace(n,((n,s,i,o,a,c)=>{l("xRange",t,n,s,i,o,a,c);const u=isX(i);const d=u||isX(o);const p=d||isX(a);const h=p;if(s==="="&&h){s=""}c=r.includePrerelease?"-0":"";if(u){if(s===">"||s==="<"){n="<0.0.0-0"}else{n="*"}}else if(s&&h){if(d){o=0}a=0;if(s===">"){s=">=";if(d){i=+i+1;o=0;a=0}else{o=+o+1;a=0}}else if(s==="<="){s="<";if(d){i=+i+1}else{o=+o+1}}if(s==="<"){c="-0"}n=`${s+i}.${o}.${a}${c}`}else if(d){n=`>=${i}.0.0${c} <${+i+1}.0.0-0`}else if(p){n=`>=${i}.${o}.0${c} <${i}.${+o+1}.0-0`}l("xRange return",n);return n}))};const replaceStars=(t,r)=>{l("replaceStars",t,r);return t.trim().replace(u[d.STAR],"")};const replaceGTE0=(t,r)=>{l("replaceGTE0",t,r);return t.trim().replace(u[r.includePrerelease?d.GTE0PRE:d.GTE0],"")};const hyphenReplace=t=>(r,n,s,i,o,a,l,c,u,d,p,h,m)=>{if(isX(s)){n=""}else if(isX(i)){n=`>=${s}.0.0${t?"-0":""}`}else if(isX(o)){n=`>=${s}.${i}.0${t?"-0":""}`}else if(a){n=`>=${n}`}else{n=`>=${n}${t?"-0":""}`}if(isX(u)){c=""}else if(isX(d)){c=`<${+u+1}.0.0-0`}else if(isX(p)){c=`<${u}.${+d+1}.0-0`}else if(h){c=`<=${u}.${d}.${p}-${h}`}else if(t){c=`<${u}.${d}.${+p+1}-0`}else{c=`<=${c}`}return`${n} ${c}`.trim()};const testSet=(t,r,n)=>{for(let n=0;n<t.length;n++){if(!t[n].test(r)){return false}}if(r.prerelease.length&&!n.includePrerelease){for(let n=0;n<t.length;n++){l(t[n].semver);if(t[n].semver===a.ANY){continue}if(t[n].semver.prerelease.length>0){const s=t[n].semver;if(s.major===r.major&&s.minor===r.minor&&s.patch===r.patch){return true}}}return false}return true}},8088:(t,r,n)=>{const s=n(427);const{MAX_LENGTH:i,MAX_SAFE_INTEGER:o}=n(2293);const{safeRe:a,t:l}=n(9523);const c=n(785);const{compareIdentifiers:u}=n(2463);class SemVer{constructor(t,r){r=c(r);if(t instanceof SemVer){if(t.loose===!!r.loose&&t.includePrerelease===!!r.includePrerelease){return t}else{t=t.version}}else if(typeof t!=="string"){throw new TypeError(`Invalid version. Must be a string. Got type "${typeof t}".`)}if(t.length>i){throw new TypeError(`version is longer than ${i} characters`)}s("SemVer",t,r);this.options=r;this.loose=!!r.loose;this.includePrerelease=!!r.includePrerelease;const n=t.trim().match(r.loose?a[l.LOOSE]:a[l.FULL]);if(!n){throw new TypeError(`Invalid Version: ${t}`)}this.raw=t;this.major=+n[1];this.minor=+n[2];this.patch=+n[3];if(this.major>o||this.major<0){throw new TypeError("Invalid major version")}if(this.minor>o||this.minor<0){throw new TypeError("Invalid minor version")}if(this.patch>o||this.patch<0){throw new TypeError("Invalid patch version")}if(!n[4]){this.prerelease=[]}else{this.prerelease=n[4].split(".").map((t=>{if(/^[0-9]+$/.test(t)){const r=+t;if(r>=0&&r<o){return r}}return t}))}this.build=n[5]?n[5].split("."):[];this.format()}format(){this.version=`${this.major}.${this.minor}.${this.patch}`;if(this.prerelease.length){this.version+=`-${this.prerelease.join(".")}`}return this.version}toString(){return this.version}compare(t){s("SemVer.compare",this.version,this.options,t);if(!(t instanceof SemVer)){if(typeof t==="string"&&t===this.version){return 0}t=new SemVer(t,this.options)}if(t.version===this.version){return 0}return this.compareMain(t)||this.comparePre(t)}compareMain(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}return u(this.major,t.major)||u(this.minor,t.minor)||u(this.patch,t.patch)}comparePre(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}if(this.prerelease.length&&!t.prerelease.length){return-1}else if(!this.prerelease.length&&t.prerelease.length){return 1}else if(!this.prerelease.length&&!t.prerelease.length){return 0}let r=0;do{const n=this.prerelease[r];const i=t.prerelease[r];s("prerelease compare",r,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return u(n,i)}}while(++r)}compareBuild(t){if(!(t instanceof SemVer)){t=new SemVer(t,this.options)}let r=0;do{const n=this.build[r];const i=t.build[r];s("prerelease compare",r,n,i);if(n===undefined&&i===undefined){return 0}else if(i===undefined){return 1}else if(n===undefined){return-1}else if(n===i){continue}else{return u(n,i)}}while(++r)}inc(t,r,n){switch(t){case"premajor":this.prerelease.length=0;this.patch=0;this.minor=0;this.major++;this.inc("pre",r,n);break;case"preminor":this.prerelease.length=0;this.patch=0;this.minor++;this.inc("pre",r,n);break;case"prepatch":this.prerelease.length=0;this.inc("patch",r,n);this.inc("pre",r,n);break;case"prerelease":if(this.prerelease.length===0){this.inc("patch",r,n)}this.inc("pre",r,n);break;case"major":if(this.minor!==0||this.patch!==0||this.prerelease.length===0){this.major++}this.minor=0;this.patch=0;this.prerelease=[];break;case"minor":if(this.patch!==0||this.prerelease.length===0){this.minor++}this.patch=0;this.prerelease=[];break;case"patch":if(this.prerelease.length===0){this.patch++}this.prerelease=[];break;case"pre":{const t=Number(n)?1:0;if(!r&&n===false){throw new Error("invalid increment argument: identifier is empty")}if(this.prerelease.length===0){this.prerelease=[t]}else{let s=this.prerelease.length;while(--s>=0){if(typeof this.prerelease[s]==="number"){this.prerelease[s]++;s=-2}}if(s===-1){if(r===this.prerelease.join(".")&&n===false){throw new Error("invalid increment argument: identifier already exists")}this.prerelease.push(t)}}if(r){let s=[r,t];if(n===false){s=[r]}if(u(this.prerelease[0],r)===0){if(isNaN(this.prerelease[1])){this.prerelease=s}}else{this.prerelease=s}}break}default:throw new Error(`invalid increment argument: ${t}`)}this.raw=this.format();if(this.build.length){this.raw+=`+${this.build.join(".")}`}return this}}t.exports=SemVer},8848:(t,r,n)=>{const s=n(5925);const clean=(t,r)=>{const n=s(t.trim().replace(/^[=v]+/,""),r);return n?n.version:null};t.exports=clean},5098:(t,r,n)=>{const s=n(1898);const i=n(6017);const o=n(4123);const a=n(5522);const l=n(194);const c=n(7520);const cmp=(t,r,n,u)=>{switch(r){case"===":if(typeof t==="object"){t=t.version}if(typeof n==="object"){n=n.version}return t===n;case"!==":if(typeof t==="object"){t=t.version}if(typeof n==="object"){n=n.version}return t!==n;case"":case"=":case"==":return s(t,n,u);case"!=":return i(t,n,u);case">":return o(t,n,u);case">=":return a(t,n,u);case"<":return l(t,n,u);case"<=":return c(t,n,u);default:throw new TypeError(`Invalid operator: ${r}`)}};t.exports=cmp},3466:(t,r,n)=>{const s=n(8088);const i=n(5925);const{safeRe:o,t:a}=n(9523);const coerce=(t,r)=>{if(t instanceof s){return t}if(typeof t==="number"){t=String(t)}if(typeof t!=="string"){return null}r=r||{};let n=null;if(!r.rtl){n=t.match(o[a.COERCE])}else{let r;while((r=o[a.COERCERTL].exec(t))&&(!n||n.index+n[0].length!==t.length)){if(!n||r.index+r[0].length!==n.index+n[0].length){n=r}o[a.COERCERTL].lastIndex=r.index+r[1].length+r[2].length}o[a.COERCERTL].lastIndex=-1}if(n===null){return null}return i(`${n[2]}.${n[3]||"0"}.${n[4]||"0"}`,r)};t.exports=coerce},2156:(t,r,n)=>{const s=n(8088);const compareBuild=(t,r,n)=>{const i=new s(t,n);const o=new s(r,n);return i.compare(o)||i.compareBuild(o)};t.exports=compareBuild},2804:(t,r,n)=>{const s=n(4309);const compareLoose=(t,r)=>s(t,r,true);t.exports=compareLoose},4309:(t,r,n)=>{const s=n(8088);const compare=(t,r,n)=>new s(t,n).compare(new s(r,n));t.exports=compare},4297:(t,r,n)=>{const s=n(5925);const diff=(t,r)=>{const n=s(t,null,true);const i=s(r,null,true);const o=n.compare(i);if(o===0){return null}const a=o>0;const l=a?n:i;const c=a?i:n;const u=!!l.prerelease.length;const d=!!c.prerelease.length;if(d&&!u){if(!c.patch&&!c.minor){return"major"}if(l.patch){return"patch"}if(l.minor){return"minor"}return"major"}const p=u?"pre":"";if(n.major!==i.major){return p+"major"}if(n.minor!==i.minor){return p+"minor"}if(n.patch!==i.patch){return p+"patch"}return"prerelease"};t.exports=diff},1898:(t,r,n)=>{const s=n(4309);const eq=(t,r,n)=>s(t,r,n)===0;t.exports=eq},4123:(t,r,n)=>{const s=n(4309);const gt=(t,r,n)=>s(t,r,n)>0;t.exports=gt},5522:(t,r,n)=>{const s=n(4309);const gte=(t,r,n)=>s(t,r,n)>=0;t.exports=gte},900:(t,r,n)=>{const s=n(8088);const inc=(t,r,n,i,o)=>{if(typeof n==="string"){o=i;i=n;n=undefined}try{return new s(t instanceof s?t.version:t,n).inc(r,i,o).version}catch(t){return null}};t.exports=inc},194:(t,r,n)=>{const s=n(4309);const lt=(t,r,n)=>s(t,r,n)<0;t.exports=lt},7520:(t,r,n)=>{const s=n(4309);const lte=(t,r,n)=>s(t,r,n)<=0;t.exports=lte},6688:(t,r,n)=>{const s=n(8088);const major=(t,r)=>new s(t,r).major;t.exports=major},8447:(t,r,n)=>{const s=n(8088);const minor=(t,r)=>new s(t,r).minor;t.exports=minor},6017:(t,r,n)=>{const s=n(4309);const neq=(t,r,n)=>s(t,r,n)!==0;t.exports=neq},5925:(t,r,n)=>{const s=n(8088);const parse=(t,r,n=false)=>{if(t instanceof s){return t}try{return new s(t,r)}catch(t){if(!n){return null}throw t}};t.exports=parse},2866:(t,r,n)=>{const s=n(8088);const patch=(t,r)=>new s(t,r).patch;t.exports=patch},4016:(t,r,n)=>{const s=n(5925);const prerelease=(t,r)=>{const n=s(t,r);return n&&n.prerelease.length?n.prerelease:null};t.exports=prerelease},6417:(t,r,n)=>{const s=n(4309);const rcompare=(t,r,n)=>s(r,t,n);t.exports=rcompare},8701:(t,r,n)=>{const s=n(2156);const rsort=(t,r)=>t.sort(((t,n)=>s(n,t,r)));t.exports=rsort},6055:(t,r,n)=>{const s=n(9828);const satisfies=(t,r,n)=>{try{r=new s(r,n)}catch(t){return false}return r.test(t)};t.exports=satisfies},1426:(t,r,n)=>{const s=n(2156);const sort=(t,r)=>t.sort(((t,n)=>s(t,n,r)));t.exports=sort},9601:(t,r,n)=>{const s=n(5925);const valid=(t,r)=>{const n=s(t,r);return n?n.version:null};t.exports=valid},1383:(t,r,n)=>{const s=n(9523);const i=n(2293);const o=n(8088);const a=n(2463);const l=n(5925);const c=n(9601);const u=n(8848);const d=n(900);const p=n(4297);const h=n(6688);const m=n(8447);const g=n(2866);const y=n(4016);const b=n(4309);const _=n(6417);const S=n(2804);const E=n(2156);const v=n(1426);const R=n(8701);const w=n(4123);const C=n(194);const A=n(1898);const T=n(6017);const I=n(5522);const P=n(7520);const N=n(5098);const D=n(3466);const O=n(1532);const k=n(9828);const $=n(6055);const L=n(2706);const F=n(579);const M=n(832);const B=n(4179);const j=n(2098);const W=n(420);const U=n(9380);const q=n(3323);const H=n(7008);const V=n(5297);const G=n(7863);t.exports={parse:l,valid:c,clean:u,inc:d,diff:p,major:h,minor:m,patch:g,prerelease:y,compare:b,rcompare:_,compareLoose:S,compareBuild:E,sort:v,rsort:R,gt:w,lt:C,eq:A,neq:T,gte:I,lte:P,cmp:N,coerce:D,Comparator:O,Range:k,satisfies:$,toComparators:L,maxSatisfying:F,minSatisfying:M,minVersion:B,validRange:j,outside:W,gtr:U,ltr:q,intersects:H,simplifyRange:V,subset:G,SemVer:o,re:s.re,src:s.src,tokens:s.t,SEMVER_SPEC_VERSION:i.SEMVER_SPEC_VERSION,RELEASE_TYPES:i.RELEASE_TYPES,compareIdentifiers:a.compareIdentifiers,rcompareIdentifiers:a.rcompareIdentifiers}},2293:t=>{const r="2.0.0";const n=256;const s=Number.MAX_SAFE_INTEGER||9007199254740991;const i=16;const o=n-6;const a=["major","premajor","minor","preminor","patch","prepatch","prerelease"];t.exports={MAX_LENGTH:n,MAX_SAFE_COMPONENT_LENGTH:i,MAX_SAFE_BUILD_LENGTH:o,MAX_SAFE_INTEGER:s,RELEASE_TYPES:a,SEMVER_SPEC_VERSION:r,FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},427:t=>{const r=typeof process==="object"&&process.env&&process.env.NODE_DEBUG&&/\bsemver\b/i.test(process.env.NODE_DEBUG)?(...t)=>console.error("SEMVER",...t):()=>{};t.exports=r},2463:t=>{const r=/^[0-9]+$/;const compareIdentifiers=(t,n)=>{const s=r.test(t);const i=r.test(n);if(s&&i){t=+t;n=+n}return t===n?0:s&&!i?-1:i&&!s?1:t<n?-1:1};const rcompareIdentifiers=(t,r)=>compareIdentifiers(r,t);t.exports={compareIdentifiers:compareIdentifiers,rcompareIdentifiers:rcompareIdentifiers}},785:t=>{const r=Object.freeze({loose:true});const n=Object.freeze({});const parseOptions=t=>{if(!t){return n}if(typeof t!=="object"){return r}return t};t.exports=parseOptions},9523:(t,r,n)=>{const{MAX_SAFE_COMPONENT_LENGTH:s,MAX_SAFE_BUILD_LENGTH:i,MAX_LENGTH:o}=n(2293);const a=n(427);r=t.exports={};const l=r.re=[];const c=r.safeRe=[];const u=r.src=[];const d=r.t={};let p=0;const h="[a-zA-Z0-9-]";const m=[["\\s",1],["\\d",o],[h,i]];const makeSafeRegex=t=>{for(const[r,n]of m){t=t.split(`${r}*`).join(`${r}{0,${n}}`).split(`${r}+`).join(`${r}{1,${n}}`)}return t};const createToken=(t,r,n)=>{const s=makeSafeRegex(r);const i=p++;a(t,i,r);d[t]=i;u[i]=r;l[i]=new RegExp(r,n?"g":undefined);c[i]=new RegExp(s,n?"g":undefined)};createToken("NUMERICIDENTIFIER","0|[1-9]\\d*");createToken("NUMERICIDENTIFIERLOOSE","\\d+");createToken("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${h}*`);createToken("MAINVERSION",`(${u[d.NUMERICIDENTIFIER]})\\.`+`(${u[d.NUMERICIDENTIFIER]})\\.`+`(${u[d.NUMERICIDENTIFIER]})`);createToken("MAINVERSIONLOOSE",`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.`+`(${u[d.NUMERICIDENTIFIERLOOSE]})\\.`+`(${u[d.NUMERICIDENTIFIERLOOSE]})`);createToken("PRERELEASEIDENTIFIER",`(?:${u[d.NUMERICIDENTIFIER]}|${u[d.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASEIDENTIFIERLOOSE",`(?:${u[d.NUMERICIDENTIFIERLOOSE]}|${u[d.NONNUMERICIDENTIFIER]})`);createToken("PRERELEASE",`(?:-(${u[d.PRERELEASEIDENTIFIER]}(?:\\.${u[d.PRERELEASEIDENTIFIER]})*))`);createToken("PRERELEASELOOSE",`(?:-?(${u[d.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[d.PRERELEASEIDENTIFIERLOOSE]})*))`);createToken("BUILDIDENTIFIER",`${h}+`);createToken("BUILD",`(?:\\+(${u[d.BUILDIDENTIFIER]}(?:\\.${u[d.BUILDIDENTIFIER]})*))`);createToken("FULLPLAIN",`v?${u[d.MAINVERSION]}${u[d.PRERELEASE]}?${u[d.BUILD]}?`);createToken("FULL",`^${u[d.FULLPLAIN]}$`);createToken("LOOSEPLAIN",`[v=\\s]*${u[d.MAINVERSIONLOOSE]}${u[d.PRERELEASELOOSE]}?${u[d.BUILD]}?`);createToken("LOOSE",`^${u[d.LOOSEPLAIN]}$`);createToken("GTLT","((?:<|>)?=?)");createToken("XRANGEIDENTIFIERLOOSE",`${u[d.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`);createToken("XRANGEIDENTIFIER",`${u[d.NUMERICIDENTIFIER]}|x|X|\\*`);createToken("XRANGEPLAIN",`[v=\\s]*(${u[d.XRANGEIDENTIFIER]})`+`(?:\\.(${u[d.XRANGEIDENTIFIER]})`+`(?:\\.(${u[d.XRANGEIDENTIFIER]})`+`(?:${u[d.PRERELEASE]})?${u[d.BUILD]}?`+`)?)?`);createToken("XRANGEPLAINLOOSE",`[v=\\s]*(${u[d.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})`+`(?:\\.(${u[d.XRANGEIDENTIFIERLOOSE]})`+`(?:${u[d.PRERELEASELOOSE]})?${u[d.BUILD]}?`+`)?)?`);createToken("XRANGE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAIN]}$`);createToken("XRANGELOOSE",`^${u[d.GTLT]}\\s*${u[d.XRANGEPLAINLOOSE]}$`);createToken("COERCE",`${"(^|[^\\d])"+"(\\d{1,"}${s}})`+`(?:\\.(\\d{1,${s}}))?`+`(?:\\.(\\d{1,${s}}))?`+`(?:$|[^\\d])`);createToken("COERCERTL",u[d.COERCE],true);createToken("LONETILDE","(?:~>?)");createToken("TILDETRIM",`(\\s*)${u[d.LONETILDE]}\\s+`,true);r.tildeTrimReplace="$1~";createToken("TILDE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAIN]}$`);createToken("TILDELOOSE",`^${u[d.LONETILDE]}${u[d.XRANGEPLAINLOOSE]}$`);createToken("LONECARET","(?:\\^)");createToken("CARETTRIM",`(\\s*)${u[d.LONECARET]}\\s+`,true);r.caretTrimReplace="$1^";createToken("CARET",`^${u[d.LONECARET]}${u[d.XRANGEPLAIN]}$`);createToken("CARETLOOSE",`^${u[d.LONECARET]}${u[d.XRANGEPLAINLOOSE]}$`);createToken("COMPARATORLOOSE",`^${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]})$|^$`);createToken("COMPARATOR",`^${u[d.GTLT]}\\s*(${u[d.FULLPLAIN]})$|^$`);createToken("COMPARATORTRIM",`(\\s*)${u[d.GTLT]}\\s*(${u[d.LOOSEPLAIN]}|${u[d.XRANGEPLAIN]})`,true);r.comparatorTrimReplace="$1$2$3";createToken("HYPHENRANGE",`^\\s*(${u[d.XRANGEPLAIN]})`+`\\s+-\\s+`+`(${u[d.XRANGEPLAIN]})`+`\\s*$`);createToken("HYPHENRANGELOOSE",`^\\s*(${u[d.XRANGEPLAINLOOSE]})`+`\\s+-\\s+`+`(${u[d.XRANGEPLAINLOOSE]})`+`\\s*$`);createToken("STAR","(<|>)?=?\\s*\\*");createToken("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$");createToken("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},1196:(t,r,n)=>{const s=n(220);const i=Symbol("max");const o=Symbol("length");const a=Symbol("lengthCalculator");const l=Symbol("allowStale");const c=Symbol("maxAge");const u=Symbol("dispose");const d=Symbol("noDisposeOnSet");const p=Symbol("lruList");const h=Symbol("cache");const m=Symbol("updateAgeOnGet");const naiveLength=()=>1;class LRUCache{constructor(t){if(typeof t==="number")t={max:t};if(!t)t={};if(t.max&&(typeof t.max!=="number"||t.max<0))throw new TypeError("max must be a non-negative number");const r=this[i]=t.max||Infinity;const n=t.length||naiveLength;this[a]=typeof n!=="function"?naiveLength:n;this[l]=t.stale||false;if(t.maxAge&&typeof t.maxAge!=="number")throw new TypeError("maxAge must be a number");this[c]=t.maxAge||0;this[u]=t.dispose;this[d]=t.noDisposeOnSet||false;this[m]=t.updateAgeOnGet||false;this.reset()}set max(t){if(typeof t!=="number"||t<0)throw new TypeError("max must be a non-negative number");this[i]=t||Infinity;trim(this)}get max(){return this[i]}set allowStale(t){this[l]=!!t}get allowStale(){return this[l]}set maxAge(t){if(typeof t!=="number")throw new TypeError("maxAge must be a non-negative number");this[c]=t;trim(this)}get maxAge(){return this[c]}set lengthCalculator(t){if(typeof t!=="function")t=naiveLength;if(t!==this[a]){this[a]=t;this[o]=0;this[p].forEach((t=>{t.length=this[a](t.value,t.key);this[o]+=t.length}))}trim(this)}get lengthCalculator(){return this[a]}get length(){return this[o]}get itemCount(){return this[p].length}rforEach(t,r){r=r||this;for(let n=this[p].tail;n!==null;){const s=n.prev;forEachStep(this,t,n,r);n=s}}forEach(t,r){r=r||this;for(let n=this[p].head;n!==null;){const s=n.next;forEachStep(this,t,n,r);n=s}}keys(){return this[p].toArray().map((t=>t.key))}values(){return this[p].toArray().map((t=>t.value))}reset(){if(this[u]&&this[p]&&this[p].length){this[p].forEach((t=>this[u](t.key,t.value)))}this[h]=new Map;this[p]=new s;this[o]=0}dump(){return this[p].map((t=>isStale(this,t)?false:{k:t.key,v:t.value,e:t.now+(t.maxAge||0)})).toArray().filter((t=>t))}dumpLru(){return this[p]}set(t,r,n){n=n||this[c];if(n&&typeof n!=="number")throw new TypeError("maxAge must be a number");const s=n?Date.now():0;const l=this[a](r,t);if(this[h].has(t)){if(l>this[i]){del(this,this[h].get(t));return false}const a=this[h].get(t);const c=a.value;if(this[u]){if(!this[d])this[u](t,c.value)}c.now=s;c.maxAge=n;c.value=r;this[o]+=l-c.length;c.length=l;this.get(t);trim(this);return true}const m=new Entry(t,r,l,s,n);if(m.length>this[i]){if(this[u])this[u](t,r);return false}this[o]+=m.length;this[p].unshift(m);this[h].set(t,this[p].head);trim(this);return true}has(t){if(!this[h].has(t))return false;const r=this[h].get(t).value;return!isStale(this,r)}get(t){return get(this,t,true)}peek(t){return get(this,t,false)}pop(){const t=this[p].tail;if(!t)return null;del(this,t);return t.value}del(t){del(this,this[h].get(t))}load(t){this.reset();const r=Date.now();for(let n=t.length-1;n>=0;n--){const s=t[n];const i=s.e||0;if(i===0)this.set(s.k,s.v);else{const t=i-r;if(t>0){this.set(s.k,s.v,t)}}}}prune(){this[h].forEach(((t,r)=>get(this,r,false)))}}const get=(t,r,n)=>{const s=t[h].get(r);if(s){const r=s.value;if(isStale(t,r)){del(t,s);if(!t[l])return undefined}else{if(n){if(t[m])s.value.now=Date.now();t[p].unshiftNode(s)}}return r.value}};const isStale=(t,r)=>{if(!r||!r.maxAge&&!t[c])return false;const n=Date.now()-r.now;return r.maxAge?n>r.maxAge:t[c]&&n>t[c]};const trim=t=>{if(t[o]>t[i]){for(let r=t[p].tail;t[o]>t[i]&&r!==null;){const n=r.prev;del(t,r);r=n}}};const del=(t,r)=>{if(r){const n=r.value;if(t[u])t[u](n.key,n.value);t[o]-=n.length;t[h].delete(n.key);t[p].removeNode(r)}};class Entry{constructor(t,r,n,s,i){this.key=t;this.value=r;this.length=n;this.now=s;this.maxAge=i||0}}const forEachStep=(t,r,n,s)=>{let i=n.value;if(isStale(t,i)){del(t,n);if(!t[l])i=undefined}if(i)r.call(s,i.value,i.key,t)};t.exports=LRUCache},5327:t=>{t.exports=function(t){t.prototype[Symbol.iterator]=function*(){for(let t=this.head;t;t=t.next){yield t.value}}}},220:(t,r,n)=>{t.exports=Yallist;Yallist.Node=Node;Yallist.create=Yallist;function Yallist(t){var r=this;if(!(r instanceof Yallist)){r=new Yallist}r.tail=null;r.head=null;r.length=0;if(t&&typeof t.forEach==="function"){t.forEach((function(t){r.push(t)}))}else if(arguments.length>0){for(var n=0,s=arguments.length;n<s;n++){r.push(arguments[n])}}return r}Yallist.prototype.removeNode=function(t){if(t.list!==this){throw new Error("removing node which does not belong to this list")}var r=t.next;var n=t.prev;if(r){r.prev=n}if(n){n.next=r}if(t===this.head){this.head=r}if(t===this.tail){this.tail=n}t.list.length--;t.next=null;t.prev=null;t.list=null;return r};Yallist.prototype.unshiftNode=function(t){if(t===this.head){return}if(t.list){t.list.removeNode(t)}var r=this.head;t.list=this;t.next=r;if(r){r.prev=t}this.head=t;if(!this.tail){this.tail=t}this.length++};Yallist.prototype.pushNode=function(t){if(t===this.tail){return}if(t.list){t.list.removeNode(t)}var r=this.tail;t.list=this;t.prev=r;if(r){r.next=t}this.tail=t;if(!this.head){this.head=t}this.length++};Yallist.prototype.push=function(){for(var t=0,r=arguments.length;t<r;t++){push(this,arguments[t])}return this.length};Yallist.prototype.unshift=function(){for(var t=0,r=arguments.length;t<r;t++){unshift(this,arguments[t])}return this.length};Yallist.prototype.pop=function(){if(!this.tail){return undefined}var t=this.tail.value;this.tail=this.tail.prev;if(this.tail){this.tail.next=null}else{this.head=null}this.length--;return t};Yallist.prototype.shift=function(){if(!this.head){return undefined}var t=this.head.value;this.head=this.head.next;if(this.head){this.head.prev=null}else{this.tail=null}this.length--;return t};Yallist.prototype.forEach=function(t,r){r=r||this;for(var n=this.head,s=0;n!==null;s++){t.call(r,n.value,s,this);n=n.next}};Yallist.prototype.forEachReverse=function(t,r){r=r||this;for(var n=this.tail,s=this.length-1;n!==null;s--){t.call(r,n.value,s,this);n=n.prev}};Yallist.prototype.get=function(t){for(var r=0,n=this.head;n!==null&&r<t;r++){n=n.next}if(r===t&&n!==null){return n.value}};Yallist.prototype.getReverse=function(t){for(var r=0,n=this.tail;n!==null&&r<t;r++){n=n.prev}if(r===t&&n!==null){return n.value}};Yallist.prototype.map=function(t,r){r=r||this;var n=new Yallist;for(var s=this.head;s!==null;){n.push(t.call(r,s.value,this));s=s.next}return n};Yallist.prototype.mapReverse=function(t,r){r=r||this;var n=new Yallist;for(var s=this.tail;s!==null;){n.push(t.call(r,s.value,this));s=s.prev}return n};Yallist.prototype.reduce=function(t,r){var n;var s=this.head;if(arguments.length>1){n=r}else if(this.head){s=this.head.next;n=this.head.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=0;s!==null;i++){n=t(n,s.value,i);s=s.next}return n};Yallist.prototype.reduceReverse=function(t,r){var n;var s=this.tail;if(arguments.length>1){n=r}else if(this.tail){s=this.tail.prev;n=this.tail.value}else{throw new TypeError("Reduce of empty list with no initial value")}for(var i=this.length-1;s!==null;i--){n=t(n,s.value,i);s=s.prev}return n};Yallist.prototype.toArray=function(){var t=new Array(this.length);for(var r=0,n=this.head;n!==null;r++){t[r]=n.value;n=n.next}return t};Yallist.prototype.toArrayReverse=function(){var t=new Array(this.length);for(var r=0,n=this.tail;n!==null;r++){t[r]=n.value;n=n.prev}return t};Yallist.prototype.slice=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var n=new Yallist;if(r<t||r<0){return n}if(t<0){t=0}if(r>this.length){r=this.length}for(var s=0,i=this.head;i!==null&&s<t;s++){i=i.next}for(;i!==null&&s<r;s++,i=i.next){n.push(i.value)}return n};Yallist.prototype.sliceReverse=function(t,r){r=r||this.length;if(r<0){r+=this.length}t=t||0;if(t<0){t+=this.length}var n=new Yallist;if(r<t||r<0){return n}if(t<0){t=0}if(r>this.length){r=this.length}for(var s=this.length,i=this.tail;i!==null&&s>r;s--){i=i.prev}for(;i!==null&&s>t;s--,i=i.prev){n.push(i.value)}return n};Yallist.prototype.splice=function(t,r,...n){if(t>this.length){t=this.length-1}if(t<0){t=this.length+t}for(var s=0,i=this.head;i!==null&&s<t;s++){i=i.next}var o=[];for(var s=0;i&&s<r;s++){o.push(i.value);i=this.removeNode(i)}if(i===null){i=this.tail}if(i!==this.head&&i!==this.tail){i=i.prev}for(var s=0;s<n.length;s++){i=insert(this,i,n[s])}return o};Yallist.prototype.reverse=function(){var t=this.head;var r=this.tail;for(var n=t;n!==null;n=n.prev){var s=n.prev;n.prev=n.next;n.next=s}this.head=r;this.tail=t;return this};function insert(t,r,n){var s=r===t.head?new Node(n,null,r,t):new Node(n,r,r.next,t);if(s.next===null){t.tail=s}if(s.prev===null){t.head=s}t.length++;return s}function push(t,r){t.tail=new Node(r,t.tail,null,t);if(!t.head){t.head=t.tail}t.length++}function unshift(t,r){t.head=new Node(r,null,t.head,t);if(!t.tail){t.tail=t.head}t.length++}function Node(t,r,n,s){if(!(this instanceof Node)){return new Node(t,r,n,s)}this.list=s;this.value=t;if(r){r.next=this;this.prev=r}else{this.prev=null}if(n){n.prev=this;this.next=n}else{this.next=null}}try{n(5327)(Yallist)}catch(t){}},9380:(t,r,n)=>{const s=n(420);const gtr=(t,r,n)=>s(t,r,">",n);t.exports=gtr},7008:(t,r,n)=>{const s=n(9828);const intersects=(t,r,n)=>{t=new s(t,n);r=new s(r,n);return t.intersects(r,n)};t.exports=intersects},3323:(t,r,n)=>{const s=n(420);const ltr=(t,r,n)=>s(t,r,"<",n);t.exports=ltr},579:(t,r,n)=>{const s=n(8088);const i=n(9828);const maxSatisfying=(t,r,n)=>{let o=null;let a=null;let l=null;try{l=new i(r,n)}catch(t){return null}t.forEach((t=>{if(l.test(t)){if(!o||a.compare(t)===-1){o=t;a=new s(o,n)}}}));return o};t.exports=maxSatisfying},832:(t,r,n)=>{const s=n(8088);const i=n(9828);const minSatisfying=(t,r,n)=>{let o=null;let a=null;let l=null;try{l=new i(r,n)}catch(t){return null}t.forEach((t=>{if(l.test(t)){if(!o||a.compare(t)===1){o=t;a=new s(o,n)}}}));return o};t.exports=minSatisfying},4179:(t,r,n)=>{const s=n(8088);const i=n(9828);const o=n(4123);const minVersion=(t,r)=>{t=new i(t,r);let n=new s("0.0.0");if(t.test(n)){return n}n=new s("0.0.0-0");if(t.test(n)){return n}n=null;for(let r=0;r<t.set.length;++r){const i=t.set[r];let a=null;i.forEach((t=>{const r=new s(t.semver.version);switch(t.operator){case">":if(r.prerelease.length===0){r.patch++}else{r.prerelease.push(0)}r.raw=r.format();case"":case">=":if(!a||o(r,a)){a=r}break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${t.operator}`)}}));if(a&&(!n||o(n,a))){n=a}}if(n&&t.test(n)){return n}return null};t.exports=minVersion},420:(t,r,n)=>{const s=n(8088);const i=n(1532);const{ANY:o}=i;const a=n(9828);const l=n(6055);const c=n(4123);const u=n(194);const d=n(7520);const p=n(5522);const outside=(t,r,n,h)=>{t=new s(t,h);r=new a(r,h);let m,g,y,b,_;switch(n){case">":m=c;g=d;y=u;b=">";_=">=";break;case"<":m=u;g=p;y=c;b="<";_="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(l(t,r,h)){return false}for(let n=0;n<r.set.length;++n){const s=r.set[n];let a=null;let l=null;s.forEach((t=>{if(t.semver===o){t=new i(">=0.0.0")}a=a||t;l=l||t;if(m(t.semver,a.semver,h)){a=t}else if(y(t.semver,l.semver,h)){l=t}}));if(a.operator===b||a.operator===_){return false}if((!l.operator||l.operator===b)&&g(t,l.semver)){return false}else if(l.operator===_&&y(t,l.semver)){return false}}return true};t.exports=outside},5297:(t,r,n)=>{const s=n(6055);const i=n(4309);t.exports=(t,r,n)=>{const o=[];let a=null;let l=null;const c=t.sort(((t,r)=>i(t,r,n)));for(const t of c){const i=s(t,r,n);if(i){l=t;if(!a){a=t}}else{if(l){o.push([a,l])}l=null;a=null}}if(a){o.push([a,null])}const u=[];for(const[t,r]of o){if(t===r){u.push(t)}else if(!r&&t===c[0]){u.push("*")}else if(!r){u.push(`>=${t}`)}else if(t===c[0]){u.push(`<=${r}`)}else{u.push(`${t} - ${r}`)}}const d=u.join(" || ");const p=typeof r.raw==="string"?r.raw:String(r);return d.length<p.length?d:r}},7863:(t,r,n)=>{const s=n(9828);const i=n(1532);const{ANY:o}=i;const a=n(6055);const l=n(4309);const subset=(t,r,n={})=>{if(t===r){return true}t=new s(t,n);r=new s(r,n);let i=false;e:for(const s of t.set){for(const t of r.set){const r=simpleSubset(s,t,n);i=i||r!==null;if(r){continue e}}if(i){return false}}return true};const c=[new i(">=0.0.0-0")];const u=[new i(">=0.0.0")];const simpleSubset=(t,r,n)=>{if(t===r){return true}if(t.length===1&&t[0].semver===o){if(r.length===1&&r[0].semver===o){return true}else if(n.includePrerelease){t=c}else{t=u}}if(r.length===1&&r[0].semver===o){if(n.includePrerelease){return true}else{r=u}}const s=new Set;let i,d;for(const r of t){if(r.operator===">"||r.operator===">="){i=higherGT(i,r,n)}else if(r.operator==="<"||r.operator==="<="){d=lowerLT(d,r,n)}else{s.add(r.semver)}}if(s.size>1){return null}let p;if(i&&d){p=l(i.semver,d.semver,n);if(p>0){return null}else if(p===0&&(i.operator!==">="||d.operator!=="<=")){return null}}for(const t of s){if(i&&!a(t,String(i),n)){return null}if(d&&!a(t,String(d),n)){return null}for(const s of r){if(!a(t,String(s),n)){return false}}return true}let h,m;let g,y;let b=d&&!n.includePrerelease&&d.semver.prerelease.length?d.semver:false;let _=i&&!n.includePrerelease&&i.semver.prerelease.length?i.semver:false;if(b&&b.prerelease.length===1&&d.operator==="<"&&b.prerelease[0]===0){b=false}for(const t of r){y=y||t.operator===">"||t.operator===">=";g=g||t.operator==="<"||t.operator==="<=";if(i){if(_){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===_.major&&t.semver.minor===_.minor&&t.semver.patch===_.patch){_=false}}if(t.operator===">"||t.operator===">="){h=higherGT(i,t,n);if(h===t&&h!==i){return false}}else if(i.operator===">="&&!a(i.semver,String(t),n)){return false}}if(d){if(b){if(t.semver.prerelease&&t.semver.prerelease.length&&t.semver.major===b.major&&t.semver.minor===b.minor&&t.semver.patch===b.patch){b=false}}if(t.operator==="<"||t.operator==="<="){m=lowerLT(d,t,n);if(m===t&&m!==d){return false}}else if(d.operator==="<="&&!a(d.semver,String(t),n)){return false}}if(!t.operator&&(d||i)&&p!==0){return false}}if(i&&g&&!d&&p!==0){return false}if(d&&y&&!i&&p!==0){return false}if(_||b){return false}return true};const higherGT=(t,r,n)=>{if(!t){return r}const s=l(t.semver,r.semver,n);return s>0?t:s<0?r:r.operator===">"&&t.operator===">="?r:t};const lowerLT=(t,r,n)=>{if(!t){return r}const s=l(t.semver,r.semver,n);return s<0?t:s>0?r:r.operator==="<"&&t.operator==="<="?r:t};t.exports=subset},2706:(t,r,n)=>{const s=n(9828);const toComparators=(t,r)=>new s(t,r).set.map((t=>t.map((t=>t.value)).join(" ").trim().split(" ")));t.exports=toComparators},2098:(t,r,n)=>{const s=n(9828);const validRange=(t,r)=>{try{return new s(t,r).range||"*"}catch(t){return null}};t.exports=validRange},1861:(t,r,n)=>{
|
||
/*!
|
||
* to-regex-range <https://github.com/micromatch/to-regex-range>
|
||
*
|
||
* Copyright (c) 2015-present, Jon Schlinkert.
|
||
* Released under the MIT License.
|
||
*/
|
||
const s=n(5680);const toRegexRange=(t,r,n)=>{if(s(t)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(r===void 0||t===r){return String(t)}if(s(r)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let i={relaxZeros:true,...n};if(typeof i.strictZeros==="boolean"){i.relaxZeros=i.strictZeros===false}let o=String(i.relaxZeros);let a=String(i.shorthand);let l=String(i.capture);let c=String(i.wrap);let u=t+":"+r+"="+o+a+l+c;if(toRegexRange.cache.hasOwnProperty(u)){return toRegexRange.cache[u].result}let d=Math.min(t,r);let p=Math.max(t,r);if(Math.abs(d-p)===1){let n=t+"|"+r;if(i.capture){return`(${n})`}if(i.wrap===false){return n}return`(?:${n})`}let h=hasPadding(t)||hasPadding(r);let m={min:t,max:r,a:d,b:p};let g=[];let y=[];if(h){m.isPadded=h;m.maxLen=String(m.max).length}if(d<0){let t=p<0?Math.abs(p):1;y=splitToPatterns(t,Math.abs(d),m,i);d=m.a=0}if(p>=0){g=splitToPatterns(d,p,m,i)}m.negatives=y;m.positives=g;m.result=collatePatterns(y,g,i);if(i.capture===true){m.result=`(${m.result})`}else if(i.wrap!==false&&g.length+y.length>1){m.result=`(?:${m.result})`}toRegexRange.cache[u]=m;return m.result};function collatePatterns(t,r,n){let s=filterPatterns(t,r,"-",false,n)||[];let i=filterPatterns(r,t,"",false,n)||[];let o=filterPatterns(t,r,"-?",true,n)||[];let a=s.concat(o).concat(i);return a.join("|")}function splitToRanges(t,r){let n=1;let s=1;let i=countNines(t,n);let o=new Set([r]);while(t<=i&&i<=r){o.add(i);n+=1;i=countNines(t,n)}i=countZeros(r+1,s)-1;while(t<i&&i<=r){o.add(i);s+=1;i=countZeros(r+1,s)-1}o=[...o];o.sort(compare);return o}function rangeToPattern(t,r,n){if(t===r){return{pattern:t,count:[],digits:0}}let s=zip(t,r);let i=s.length;let o="";let a=0;for(let t=0;t<i;t++){let[r,i]=s[t];if(r===i){o+=r}else if(r!=="0"||i!=="9"){o+=toCharacterClass(r,i,n)}else{a++}}if(a){o+=n.shorthand===true?"\\d":"[0-9]"}return{pattern:o,count:[a],digits:i}}function splitToPatterns(t,r,n,s){let i=splitToRanges(t,r);let o=[];let a=t;let l;for(let t=0;t<i.length;t++){let r=i[t];let c=rangeToPattern(String(a),String(r),s);let u="";if(!n.isPadded&&l&&l.pattern===c.pattern){if(l.count.length>1){l.count.pop()}l.count.push(c.count[0]);l.string=l.pattern+toQuantifier(l.count);a=r+1;continue}if(n.isPadded){u=padZeros(r,n,s)}c.string=u+c.pattern+toQuantifier(c.count);o.push(c);a=r+1;l=c}return o}function filterPatterns(t,r,n,s,i){let o=[];for(let i of t){let{string:t}=i;if(!s&&!contains(r,"string",t)){o.push(n+t)}if(s&&contains(r,"string",t)){o.push(n+t)}}return o}function zip(t,r){let n=[];for(let s=0;s<t.length;s++)n.push([t[s],r[s]]);return n}function compare(t,r){return t>r?1:r>t?-1:0}function contains(t,r,n){return t.some((t=>t[r]===n))}function countNines(t,r){return Number(String(t).slice(0,-r)+"9".repeat(r))}function countZeros(t,r){return t-t%Math.pow(10,r)}function toQuantifier(t){let[r=0,n=""]=t;if(n||r>1){return`{${r+(n?","+n:"")}}`}return""}function toCharacterClass(t,r,n){return`[${t}${r-t===1?"":"-"}${r}]`}function hasPadding(t){return/^-?(0+)\d/.test(t)}function padZeros(t,r,n){if(!r.isPadded){return t}let s=Math.abs(r.maxLen-String(t).length);let i=n.relaxZeros!==false;switch(s){case 0:return"";case 1:return i?"0?":"0";case 2:return i?"0{0,2}":"00";default:{return i?`0{0,${s}}`:`0{${s}}`}}}toRegexRange.cache={};toRegexRange.clearCache=()=>toRegexRange.cache={};t.exports=toRegexRange},4920:(t,r,n)=>{var s=n(5642);var i=n(8215);t.exports={parse:function(t){var r=s.parse(t.toString());return i.compile(r)}}},8215:t=>{function compile(t){var r=[];var n=[];var s="";var i=Object.create(null);var o=i;var a=false;return reduce(t);function reduce(t){var r;for(var n=0;n<t.length;n++){r=t[n];switch(r.type){case"Assign":assign(r);break;case"ObjectPath":setPath(r);break;case"ArrayPath":addTableArray(r);break}}return i}function genError(t,r,n){var s=new Error(t);s.line=r;s.column=n;throw s}function assign(t){var i=t.key;var a=t.value;var l=t.line;var c=t.column;var u;if(s){u=s+"."+i}else{u=i}if(typeof o[i]!=="undefined"){genError("Cannot redefine existing key '"+u+"'.",l,c)}o[i]=reduceValueNode(a);if(!pathAssigned(u)){r.push(u);n.push(u)}}function pathAssigned(t){return r.indexOf(t)!==-1}function reduceValueNode(t){if(t.type==="Array"){return reduceArrayWithTypeChecking(t.value)}else if(t.type==="InlineTable"){return reduceInlineTableNode(t.value)}else{return t.value}}function reduceInlineTableNode(t){var r=Object.create(null);for(var n=0;n<t.length;n++){var s=t[n];if(s.value.type==="InlineTable"){r[s.key]=reduceInlineTableNode(s.value.value)}else if(s.type==="InlineTableValue"){r[s.key]=reduceValueNode(s.value)}}return r}function setPath(t){var n=t.value;var a=n.map(quoteDottedString).join(".");var l=t.line;var c=t.column;if(pathAssigned(a)){genError("Cannot redefine existing key '"+n+"'.",l,c)}r.push(a);o=deepRef(i,n,Object.create(null),l,c);s=n}function addTableArray(t){var n=t.value;var a=n.map(quoteDottedString).join(".");var l=t.line;var c=t.column;if(!pathAssigned(a)){r.push(a)}r=r.filter((function(t){return t.indexOf(a)!==0}));r.push(a);o=deepRef(i,n,[],l,c);s=a;if(o instanceof Array){var u=Object.create(null);o.push(u);o=u}else{genError("Cannot redefine existing key '"+n+"'.",l,c)}}function deepRef(t,r,s,i,o){var a=[];var l="";var c=r.join(".");var u=t;for(var d=0;d<r.length;d++){var p=r[d];a.push(p);l=a.join(".");if(typeof u[p]==="undefined"){if(d===r.length-1){u[p]=s}else{u[p]=Object.create(null)}}else if(d!==r.length-1&&n.indexOf(l)>-1){genError("Cannot redefine existing key '"+l+"'.",i,o)}u=u[p];if(u instanceof Array&&u.length&&d<r.length-1){u=u[u.length-1]}}return u}function reduceArrayWithTypeChecking(t){var r=null;for(var n=0;n<t.length;n++){var s=t[n];if(r===null){r=s.type}else{if(s.type!==r){genError("Cannot add value of type "+s.type+" to array of type "+r+".",s.line,s.column)}}}return t.map(reduceValueNode)}function quoteDottedString(t){if(t.indexOf(".")>-1){return'"'+t+'"'}else{return t}}}t.exports={compile:compile}},5642:t=>{t.exports=function(){function peg$subclass(t,r){function ctor(){this.constructor=t}ctor.prototype=r.prototype;t.prototype=new ctor}function SyntaxError(t,r,n,s,i,o){this.message=t;this.expected=r;this.found=n;this.offset=s;this.line=i;this.column=o;this.name="SyntaxError"}peg$subclass(SyntaxError,Error);function parse(t){var r=arguments.length>1?arguments[1]:{},n={},s={start:peg$parsestart},i=peg$parsestart,o=[],peg$c1=function(){return He},a=n,l="#",c={type:"literal",value:"#",description:'"#"'},u=void 0,d={type:"any",description:"any character"},p="[",h={type:"literal",value:"[",description:'"["'},m="]",g={type:"literal",value:"]",description:'"]"'},peg$c11=function(t){addNode(node("ObjectPath",t,line,column))},peg$c12=function(t){addNode(node("ArrayPath",t,line,column))},peg$c13=function(t,r){return t.concat(r)},peg$c14=function(t){return[t]},peg$c15=function(t){return t},y=".",b={type:"literal",value:".",description:'"."'},_="=",S={type:"literal",value:"=",description:'"="'},peg$c20=function(t,r){addNode(node("Assign",r,line,column,t))},peg$c21=function(t){return t.join("")},peg$c22=function(t){return t.value},E='"""',v={type:"literal",value:'"""',description:'"\\"\\"\\""'},R=null,peg$c26=function(t){return node("String",t.join(""),line,column)},w='"',C={type:"literal",value:'"',description:'"\\""'},A="'''",T={type:"literal",value:"'''",description:"\"'''\""},I="'",P={type:"literal",value:"'",description:'"\'"'},peg$c33=function(t){return t},peg$c34=function(t){return t},N="\\",D={type:"literal",value:"\\",description:'"\\\\"'},peg$c37=function(){return""},O="e",k={type:"literal",value:"e",description:'"e"'},$="E",L={type:"literal",value:"E",description:'"E"'},peg$c42=function(t,r){return node("Float",parseFloat(t+"e"+r),line,column)},peg$c43=function(t){return node("Float",parseFloat(t),line,column)},F="+",M={type:"literal",value:"+",description:'"+"'},peg$c46=function(t){return t.join("")},B="-",j={type:"literal",value:"-",description:'"-"'},peg$c49=function(t){return"-"+t.join("")},peg$c50=function(t){return node("Integer",parseInt(t,10),line,column)},W="true",U={type:"literal",value:"true",description:'"true"'},peg$c53=function(){return node("Boolean",true,line,column)},q="false",H={type:"literal",value:"false",description:'"false"'},peg$c56=function(){return node("Boolean",false,line,column)},peg$c57=function(){return node("Array",[],line,column)},peg$c58=function(t){return node("Array",t?[t]:[],line,column)},peg$c59=function(t){return node("Array",t,line,column)},peg$c60=function(t,r){return node("Array",t.concat(r),line,column)},peg$c61=function(t){return t},V=",",G={type:"literal",value:",",description:'","'},z="{",Y={type:"literal",value:"{",description:'"{"'},Q="}",K={type:"literal",value:"}",description:'"}"'},peg$c68=function(t){return node("InlineTable",t,line,column)},peg$c69=function(t,r){return node("InlineTableValue",r,line,column,t)},peg$c70=function(t){return"."+t},peg$c71=function(t){return t.join("")},X=":",J={type:"literal",value:":",description:'":"'},peg$c74=function(t){return t.join("")},Z="T",ee={type:"literal",value:"T",description:'"T"'},te="Z",re={type:"literal",value:"Z",description:'"Z"'},peg$c79=function(t,r){return node("Date",new Date(t+"T"+r+"Z"),line,column)},peg$c80=function(t,r){return node("Date",new Date(t+"T"+r),line,column)},ne=/^[ \t]/,se={type:"class",value:"[ \\t]",description:"[ \\t]"},ie="\n",oe={type:"literal",value:"\n",description:'"\\n"'},ae="\r",le={type:"literal",value:"\r",description:'"\\r"'},ce=/^[0-9a-f]/i,ue={type:"class",value:"[0-9a-f]i",description:"[0-9a-f]i"},fe=/^[0-9]/,de={type:"class",value:"[0-9]",description:"[0-9]"},pe="_",he={type:"literal",value:"_",description:'"_"'},peg$c93=function(){return""},me=/^[A-Za-z0-9_\-]/,ge={type:"class",value:"[A-Za-z0-9_\\-]",description:"[A-Za-z0-9_\\-]"},peg$c96=function(t){return t.join("")},ye='\\"',be={type:"literal",value:'\\"',description:'"\\\\\\""'},peg$c99=function(){return'"'},_e="\\\\",Se={type:"literal",value:"\\\\",description:'"\\\\\\\\"'},peg$c102=function(){return"\\"},Ee="\\b",ve={type:"literal",value:"\\b",description:'"\\\\b"'},peg$c105=function(){return"\b"},Re="\\t",we={type:"literal",value:"\\t",description:'"\\\\t"'},peg$c108=function(){return"\t"},Ce="\\n",Ae={type:"literal",value:"\\n",description:'"\\\\n"'},peg$c111=function(){return"\n"},Te="\\f",Ie={type:"literal",value:"\\f",description:'"\\\\f"'},peg$c114=function(){return"\f"},Pe="\\r",Ne={type:"literal",value:"\\r",description:'"\\\\r"'},peg$c117=function(){return"\r"},De="\\U",Oe={type:"literal",value:"\\U",description:'"\\\\U"'},peg$c120=function(t){return convertCodePoint(t.join(""))},ke="\\u",$e={type:"literal",value:"\\u",description:'"\\\\u"'},Le=0,xe=0,Fe=0,Me={line:1,column:1,seenCR:false},Be=0,je=[],We=0,Ue={},qe;if("startRule"in r){if(!(r.startRule in s)){throw new Error("Can't start parsing from rule \""+r.startRule+'".')}i=s[r.startRule]}function text(){return t.substring(xe,Le)}function offset(){return xe}function line(){return peg$computePosDetails(xe).line}function column(){return peg$computePosDetails(xe).column}function expected(t){throw peg$buildException(null,[{type:"other",description:t}],xe)}function error(t){throw peg$buildException(t,null,xe)}function peg$computePosDetails(r){function advance(r,n,s){var i,o;for(i=n;i<s;i++){o=t.charAt(i);if(o==="\n"){if(!r.seenCR){r.line++}r.column=1;r.seenCR=false}else if(o==="\r"||o==="\u2028"||o==="\u2029"){r.line++;r.column=1;r.seenCR=true}else{r.column++;r.seenCR=false}}}if(Fe!==r){if(Fe>r){Fe=0;Me={line:1,column:1,seenCR:false}}advance(Me,Fe,r);Fe=r}return Me}function peg$fail(t){if(Le<Be){return}if(Le>Be){Be=Le;je=[]}je.push(t)}function peg$buildException(r,n,s){function cleanupExpected(t){var r=1;t.sort((function(t,r){if(t.description<r.description){return-1}else if(t.description>r.description){return 1}else{return 0}}));while(r<t.length){if(t[r-1]===t[r]){t.splice(r,1)}else{r++}}}function buildMessage(t,r){function stringEscape(t){function hex(t){return t.charCodeAt(0).toString(16).toUpperCase()}return t.replace(/\\/g,"\\\\").replace(/"/g,'\\"').replace(/\x08/g,"\\b").replace(/\t/g,"\\t").replace(/\n/g,"\\n").replace(/\f/g,"\\f").replace(/\r/g,"\\r").replace(/[\x00-\x07\x0B\x0E\x0F]/g,(function(t){return"\\x0"+hex(t)})).replace(/[\x10-\x1F\x80-\xFF]/g,(function(t){return"\\x"+hex(t)})).replace(/[\u0180-\u0FFF]/g,(function(t){return"\\u0"+hex(t)})).replace(/[\u1080-\uFFFF]/g,(function(t){return"\\u"+hex(t)}))}var n=new Array(t.length),s,i,o;for(o=0;o<t.length;o++){n[o]=t[o].description}s=t.length>1?n.slice(0,-1).join(", ")+" or "+n[t.length-1]:n[0];i=r?'"'+stringEscape(r)+'"':"end of input";return"Expected "+s+" but "+i+" found."}var i=peg$computePosDetails(s),o=s<t.length?t.charAt(s):null;if(n!==null){cleanupExpected(n)}return new SyntaxError(r!==null?r:buildMessage(n,o),n,o,s,i.line,i.column)}function peg$parsestart(){var t,r,s;var i=Le*49+0,o=Ue[i];if(o){Le=o.nextPos;return o.result}t=Le;r=[];s=peg$parseline();while(s!==n){r.push(s);s=peg$parseline()}if(r!==n){xe=t;r=peg$c1()}t=r;Ue[i]={nextPos:Le,result:t};return t}function peg$parseline(){var t,r,s,i,o,l,c;var u=Le*49+1,d=Ue[u];if(d){Le=d.nextPos;return d.result}t=Le;r=[];s=peg$parseS();while(s!==n){r.push(s);s=peg$parseS()}if(r!==n){s=peg$parseexpression();if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){o=[];l=peg$parsecomment();while(l!==n){o.push(l);l=peg$parsecomment()}if(o!==n){l=[];c=peg$parseNL();if(c!==n){while(c!==n){l.push(c);c=peg$parseNL()}}else{l=a}if(l===n){l=peg$parseEOF()}if(l!==n){r=[r,s,i,o,l];t=r}else{Le=t;t=a}}else{Le=t;t=a}}else{Le=t;t=a}}else{Le=t;t=a}}else{Le=t;t=a}if(t===n){t=Le;r=[];s=peg$parseS();if(s!==n){while(s!==n){r.push(s);s=peg$parseS()}}else{r=a}if(r!==n){s=[];i=peg$parseNL();if(i!==n){while(i!==n){s.push(i);i=peg$parseNL()}}else{s=a}if(s===n){s=peg$parseEOF()}if(s!==n){r=[r,s];t=r}else{Le=t;t=a}}else{Le=t;t=a}if(t===n){t=peg$parseNL()}}Ue[u]={nextPos:Le,result:t};return t}function peg$parseexpression(){var t;var r=Le*49+2,s=Ue[r];if(s){Le=s.nextPos;return s.result}t=peg$parsecomment();if(t===n){t=peg$parsepath();if(t===n){t=peg$parsetablearray();if(t===n){t=peg$parseassignment()}}}Ue[r]={nextPos:Le,result:t};return t}function peg$parsecomment(){var r,s,i,o,p,h;var m=Le*49+3,g=Ue[m];if(g){Le=g.nextPos;return g.result}r=Le;if(t.charCodeAt(Le)===35){s=l;Le++}else{s=n;if(We===0){peg$fail(c)}}if(s!==n){i=[];o=Le;p=Le;We++;h=peg$parseNL();if(h===n){h=peg$parseEOF()}We--;if(h===n){p=u}else{Le=p;p=a}if(p!==n){if(t.length>Le){h=t.charAt(Le);Le++}else{h=n;if(We===0){peg$fail(d)}}if(h!==n){p=[p,h];o=p}else{Le=o;o=a}}else{Le=o;o=a}while(o!==n){i.push(o);o=Le;p=Le;We++;h=peg$parseNL();if(h===n){h=peg$parseEOF()}We--;if(h===n){p=u}else{Le=p;p=a}if(p!==n){if(t.length>Le){h=t.charAt(Le);Le++}else{h=n;if(We===0){peg$fail(d)}}if(h!==n){p=[p,h];o=p}else{Le=o;o=a}}else{Le=o;o=a}}if(i!==n){s=[s,i];r=s}else{Le=r;r=a}}else{Le=r;r=a}Ue[m]={nextPos:Le,result:r};return r}function peg$parsepath(){var r,s,i,o,l,c;var u=Le*49+4,d=Ue[u];if(d){Le=d.nextPos;return d.result}r=Le;if(t.charCodeAt(Le)===91){s=p;Le++}else{s=n;if(We===0){peg$fail(h)}}if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){o=peg$parsetable_key();if(o!==n){l=[];c=peg$parseS();while(c!==n){l.push(c);c=peg$parseS()}if(l!==n){if(t.charCodeAt(Le)===93){c=m;Le++}else{c=n;if(We===0){peg$fail(g)}}if(c!==n){xe=r;s=peg$c11(o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[u]={nextPos:Le,result:r};return r}function peg$parsetablearray(){var r,s,i,o,l,c,u,d;var y=Le*49+5,b=Ue[y];if(b){Le=b.nextPos;return b.result}r=Le;if(t.charCodeAt(Le)===91){s=p;Le++}else{s=n;if(We===0){peg$fail(h)}}if(s!==n){if(t.charCodeAt(Le)===91){i=p;Le++}else{i=n;if(We===0){peg$fail(h)}}if(i!==n){o=[];l=peg$parseS();while(l!==n){o.push(l);l=peg$parseS()}if(o!==n){l=peg$parsetable_key();if(l!==n){c=[];u=peg$parseS();while(u!==n){c.push(u);u=peg$parseS()}if(c!==n){if(t.charCodeAt(Le)===93){u=m;Le++}else{u=n;if(We===0){peg$fail(g)}}if(u!==n){if(t.charCodeAt(Le)===93){d=m;Le++}else{d=n;if(We===0){peg$fail(g)}}if(d!==n){xe=r;s=peg$c12(l);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[y]={nextPos:Le,result:r};return r}function peg$parsetable_key(){var t,r,s;var i=Le*49+6,o=Ue[i];if(o){Le=o.nextPos;return o.result}t=Le;r=[];s=peg$parsedot_ended_table_key_part();if(s!==n){while(s!==n){r.push(s);s=peg$parsedot_ended_table_key_part()}}else{r=a}if(r!==n){s=peg$parsetable_key_part();if(s!==n){xe=t;r=peg$c13(r,s);t=r}else{Le=t;t=a}}else{Le=t;t=a}if(t===n){t=Le;r=peg$parsetable_key_part();if(r!==n){xe=t;r=peg$c14(r)}t=r}Ue[i]={nextPos:Le,result:t};return t}function peg$parsetable_key_part(){var t,r,s,i,o;var l=Le*49+7,c=Ue[l];if(c){Le=c.nextPos;return c.result}t=Le;r=[];s=peg$parseS();while(s!==n){r.push(s);s=peg$parseS()}if(r!==n){s=peg$parsekey();if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){xe=t;r=peg$c15(s);t=r}else{Le=t;t=a}}else{Le=t;t=a}}else{Le=t;t=a}if(t===n){t=Le;r=[];s=peg$parseS();while(s!==n){r.push(s);s=peg$parseS()}if(r!==n){s=peg$parsequoted_key();if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){xe=t;r=peg$c15(s);t=r}else{Le=t;t=a}}else{Le=t;t=a}}else{Le=t;t=a}}Ue[l]={nextPos:Le,result:t};return t}function peg$parsedot_ended_table_key_part(){var r,s,i,o,l,c,u;var d=Le*49+8,p=Ue[d];if(p){Le=p.nextPos;return p.result}r=Le;s=[];i=peg$parseS();while(i!==n){s.push(i);i=peg$parseS()}if(s!==n){i=peg$parsekey();if(i!==n){o=[];l=peg$parseS();while(l!==n){o.push(l);l=peg$parseS()}if(o!==n){if(t.charCodeAt(Le)===46){l=y;Le++}else{l=n;if(We===0){peg$fail(b)}}if(l!==n){c=[];u=peg$parseS();while(u!==n){c.push(u);u=peg$parseS()}if(c!==n){xe=r;s=peg$c15(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;s=[];i=peg$parseS();while(i!==n){s.push(i);i=peg$parseS()}if(s!==n){i=peg$parsequoted_key();if(i!==n){o=[];l=peg$parseS();while(l!==n){o.push(l);l=peg$parseS()}if(o!==n){if(t.charCodeAt(Le)===46){l=y;Le++}else{l=n;if(We===0){peg$fail(b)}}if(l!==n){c=[];u=peg$parseS();while(u!==n){c.push(u);u=peg$parseS()}if(c!==n){xe=r;s=peg$c15(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}Ue[d]={nextPos:Le,result:r};return r}function peg$parseassignment(){var r,s,i,o,l,c;var u=Le*49+9,d=Ue[u];if(d){Le=d.nextPos;return d.result}r=Le;s=peg$parsekey();if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){if(t.charCodeAt(Le)===61){o=_;Le++}else{o=n;if(We===0){peg$fail(S)}}if(o!==n){l=[];c=peg$parseS();while(c!==n){l.push(c);c=peg$parseS()}if(l!==n){c=peg$parsevalue();if(c!==n){xe=r;s=peg$c20(s,c);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;s=peg$parsequoted_key();if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){if(t.charCodeAt(Le)===61){o=_;Le++}else{o=n;if(We===0){peg$fail(S)}}if(o!==n){l=[];c=peg$parseS();while(c!==n){l.push(c);c=peg$parseS()}if(l!==n){c=peg$parsevalue();if(c!==n){xe=r;s=peg$c20(s,c);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}Ue[u]={nextPos:Le,result:r};return r}function peg$parsekey(){var t,r,s;var i=Le*49+10,o=Ue[i];if(o){Le=o.nextPos;return o.result}t=Le;r=[];s=peg$parseASCII_BASIC();if(s!==n){while(s!==n){r.push(s);s=peg$parseASCII_BASIC()}}else{r=a}if(r!==n){xe=t;r=peg$c21(r)}t=r;Ue[i]={nextPos:Le,result:t};return t}function peg$parsequoted_key(){var t,r;var s=Le*49+11,i=Ue[s];if(i){Le=i.nextPos;return i.result}t=Le;r=peg$parsedouble_quoted_single_line_string();if(r!==n){xe=t;r=peg$c22(r)}t=r;if(t===n){t=Le;r=peg$parsesingle_quoted_single_line_string();if(r!==n){xe=t;r=peg$c22(r)}t=r}Ue[s]={nextPos:Le,result:t};return t}function peg$parsevalue(){var t;var r=Le*49+12,s=Ue[r];if(s){Le=s.nextPos;return s.result}t=peg$parsestring();if(t===n){t=peg$parsedatetime();if(t===n){t=peg$parsefloat();if(t===n){t=peg$parseinteger();if(t===n){t=peg$parseboolean();if(t===n){t=peg$parsearray();if(t===n){t=peg$parseinline_table()}}}}}}Ue[r]={nextPos:Le,result:t};return t}function peg$parsestring(){var t;var r=Le*49+13,s=Ue[r];if(s){Le=s.nextPos;return s.result}t=peg$parsedouble_quoted_multiline_string();if(t===n){t=peg$parsedouble_quoted_single_line_string();if(t===n){t=peg$parsesingle_quoted_multiline_string();if(t===n){t=peg$parsesingle_quoted_single_line_string()}}}Ue[r]={nextPos:Le,result:t};return t}function peg$parsedouble_quoted_multiline_string(){var r,s,i,o,l;var c=Le*49+14,u=Ue[c];if(u){Le=u.nextPos;return u.result}r=Le;if(t.substr(Le,3)===E){s=E;Le+=3}else{s=n;if(We===0){peg$fail(v)}}if(s!==n){i=peg$parseNL();if(i===n){i=R}if(i!==n){o=[];l=peg$parsemultiline_string_char();while(l!==n){o.push(l);l=peg$parsemultiline_string_char()}if(o!==n){if(t.substr(Le,3)===E){l=E;Le+=3}else{l=n;if(We===0){peg$fail(v)}}if(l!==n){xe=r;s=peg$c26(o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[c]={nextPos:Le,result:r};return r}function peg$parsedouble_quoted_single_line_string(){var r,s,i,o;var l=Le*49+15,c=Ue[l];if(c){Le=c.nextPos;return c.result}r=Le;if(t.charCodeAt(Le)===34){s=w;Le++}else{s=n;if(We===0){peg$fail(C)}}if(s!==n){i=[];o=peg$parsestring_char();while(o!==n){i.push(o);o=peg$parsestring_char()}if(i!==n){if(t.charCodeAt(Le)===34){o=w;Le++}else{o=n;if(We===0){peg$fail(C)}}if(o!==n){xe=r;s=peg$c26(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[l]={nextPos:Le,result:r};return r}function peg$parsesingle_quoted_multiline_string(){var r,s,i,o,l;var c=Le*49+16,u=Ue[c];if(u){Le=u.nextPos;return u.result}r=Le;if(t.substr(Le,3)===A){s=A;Le+=3}else{s=n;if(We===0){peg$fail(T)}}if(s!==n){i=peg$parseNL();if(i===n){i=R}if(i!==n){o=[];l=peg$parsemultiline_literal_char();while(l!==n){o.push(l);l=peg$parsemultiline_literal_char()}if(o!==n){if(t.substr(Le,3)===A){l=A;Le+=3}else{l=n;if(We===0){peg$fail(T)}}if(l!==n){xe=r;s=peg$c26(o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[c]={nextPos:Le,result:r};return r}function peg$parsesingle_quoted_single_line_string(){var r,s,i,o;var l=Le*49+17,c=Ue[l];if(c){Le=c.nextPos;return c.result}r=Le;if(t.charCodeAt(Le)===39){s=I;Le++}else{s=n;if(We===0){peg$fail(P)}}if(s!==n){i=[];o=peg$parseliteral_char();while(o!==n){i.push(o);o=peg$parseliteral_char()}if(i!==n){if(t.charCodeAt(Le)===39){o=I;Le++}else{o=n;if(We===0){peg$fail(P)}}if(o!==n){xe=r;s=peg$c26(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[l]={nextPos:Le,result:r};return r}function peg$parsestring_char(){var r,s,i;var o=Le*49+18,l=Ue[o];if(l){Le=l.nextPos;return l.result}r=peg$parseESCAPED();if(r===n){r=Le;s=Le;We++;if(t.charCodeAt(Le)===34){i=w;Le++}else{i=n;if(We===0){peg$fail(C)}}We--;if(i===n){s=u}else{Le=s;s=a}if(s!==n){if(t.length>Le){i=t.charAt(Le);Le++}else{i=n;if(We===0){peg$fail(d)}}if(i!==n){xe=r;s=peg$c33(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}Ue[o]={nextPos:Le,result:r};return r}function peg$parseliteral_char(){var r,s,i;var o=Le*49+19,l=Ue[o];if(l){Le=l.nextPos;return l.result}r=Le;s=Le;We++;if(t.charCodeAt(Le)===39){i=I;Le++}else{i=n;if(We===0){peg$fail(P)}}We--;if(i===n){s=u}else{Le=s;s=a}if(s!==n){if(t.length>Le){i=t.charAt(Le);Le++}else{i=n;if(We===0){peg$fail(d)}}if(i!==n){xe=r;s=peg$c33(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}Ue[o]={nextPos:Le,result:r};return r}function peg$parsemultiline_string_char(){var r,s,i;var o=Le*49+20,l=Ue[o];if(l){Le=l.nextPos;return l.result}r=peg$parseESCAPED();if(r===n){r=peg$parsemultiline_string_delim();if(r===n){r=Le;s=Le;We++;if(t.substr(Le,3)===E){i=E;Le+=3}else{i=n;if(We===0){peg$fail(v)}}We--;if(i===n){s=u}else{Le=s;s=a}if(s!==n){if(t.length>Le){i=t.charAt(Le);Le++}else{i=n;if(We===0){peg$fail(d)}}if(i!==n){xe=r;s=peg$c34(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}}Ue[o]={nextPos:Le,result:r};return r}function peg$parsemultiline_string_delim(){var r,s,i,o,l;var c=Le*49+21,u=Ue[c];if(u){Le=u.nextPos;return u.result}r=Le;if(t.charCodeAt(Le)===92){s=N;Le++}else{s=n;if(We===0){peg$fail(D)}}if(s!==n){i=peg$parseNL();if(i!==n){o=[];l=peg$parseNLS();while(l!==n){o.push(l);l=peg$parseNLS()}if(o!==n){xe=r;s=peg$c37();r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[c]={nextPos:Le,result:r};return r}function peg$parsemultiline_literal_char(){var r,s,i;var o=Le*49+22,l=Ue[o];if(l){Le=l.nextPos;return l.result}r=Le;s=Le;We++;if(t.substr(Le,3)===A){i=A;Le+=3}else{i=n;if(We===0){peg$fail(T)}}We--;if(i===n){s=u}else{Le=s;s=a}if(s!==n){if(t.length>Le){i=t.charAt(Le);Le++}else{i=n;if(We===0){peg$fail(d)}}if(i!==n){xe=r;s=peg$c33(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}Ue[o]={nextPos:Le,result:r};return r}function peg$parsefloat(){var r,s,i,o;var l=Le*49+23,c=Ue[l];if(c){Le=c.nextPos;return c.result}r=Le;s=peg$parsefloat_text();if(s===n){s=peg$parseinteger_text()}if(s!==n){if(t.charCodeAt(Le)===101){i=O;Le++}else{i=n;if(We===0){peg$fail(k)}}if(i===n){if(t.charCodeAt(Le)===69){i=$;Le++}else{i=n;if(We===0){peg$fail(L)}}}if(i!==n){o=peg$parseinteger_text();if(o!==n){xe=r;s=peg$c42(s,o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;s=peg$parsefloat_text();if(s!==n){xe=r;s=peg$c43(s)}r=s}Ue[l]={nextPos:Le,result:r};return r}function peg$parsefloat_text(){var r,s,i,o,l,c;var u=Le*49+24,d=Ue[u];if(d){Le=d.nextPos;return d.result}r=Le;if(t.charCodeAt(Le)===43){s=F;Le++}else{s=n;if(We===0){peg$fail(M)}}if(s===n){s=R}if(s!==n){i=Le;o=peg$parseDIGITS();if(o!==n){if(t.charCodeAt(Le)===46){l=y;Le++}else{l=n;if(We===0){peg$fail(b)}}if(l!==n){c=peg$parseDIGITS();if(c!==n){o=[o,l,c];i=o}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}if(i!==n){xe=r;s=peg$c46(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;if(t.charCodeAt(Le)===45){s=B;Le++}else{s=n;if(We===0){peg$fail(j)}}if(s!==n){i=Le;o=peg$parseDIGITS();if(o!==n){if(t.charCodeAt(Le)===46){l=y;Le++}else{l=n;if(We===0){peg$fail(b)}}if(l!==n){c=peg$parseDIGITS();if(c!==n){o=[o,l,c];i=o}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}if(i!==n){xe=r;s=peg$c49(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}Ue[u]={nextPos:Le,result:r};return r}function peg$parseinteger(){var t,r;var s=Le*49+25,i=Ue[s];if(i){Le=i.nextPos;return i.result}t=Le;r=peg$parseinteger_text();if(r!==n){xe=t;r=peg$c50(r)}t=r;Ue[s]={nextPos:Le,result:t};return t}function peg$parseinteger_text(){var r,s,i,o,l;var c=Le*49+26,d=Ue[c];if(d){Le=d.nextPos;return d.result}r=Le;if(t.charCodeAt(Le)===43){s=F;Le++}else{s=n;if(We===0){peg$fail(M)}}if(s===n){s=R}if(s!==n){i=[];o=peg$parseDIGIT_OR_UNDER();if(o!==n){while(o!==n){i.push(o);o=peg$parseDIGIT_OR_UNDER()}}else{i=a}if(i!==n){o=Le;We++;if(t.charCodeAt(Le)===46){l=y;Le++}else{l=n;if(We===0){peg$fail(b)}}We--;if(l===n){o=u}else{Le=o;o=a}if(o!==n){xe=r;s=peg$c46(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;if(t.charCodeAt(Le)===45){s=B;Le++}else{s=n;if(We===0){peg$fail(j)}}if(s!==n){i=[];o=peg$parseDIGIT_OR_UNDER();if(o!==n){while(o!==n){i.push(o);o=peg$parseDIGIT_OR_UNDER()}}else{i=a}if(i!==n){o=Le;We++;if(t.charCodeAt(Le)===46){l=y;Le++}else{l=n;if(We===0){peg$fail(b)}}We--;if(l===n){o=u}else{Le=o;o=a}if(o!==n){xe=r;s=peg$c49(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}Ue[c]={nextPos:Le,result:r};return r}function peg$parseboolean(){var r,s;var i=Le*49+27,o=Ue[i];if(o){Le=o.nextPos;return o.result}r=Le;if(t.substr(Le,4)===W){s=W;Le+=4}else{s=n;if(We===0){peg$fail(U)}}if(s!==n){xe=r;s=peg$c53()}r=s;if(r===n){r=Le;if(t.substr(Le,5)===q){s=q;Le+=5}else{s=n;if(We===0){peg$fail(H)}}if(s!==n){xe=r;s=peg$c56()}r=s}Ue[i]={nextPos:Le,result:r};return r}function peg$parsearray(){var r,s,i,o,l;var c=Le*49+28,u=Ue[c];if(u){Le=u.nextPos;return u.result}r=Le;if(t.charCodeAt(Le)===91){s=p;Le++}else{s=n;if(We===0){peg$fail(h)}}if(s!==n){i=[];o=peg$parsearray_sep();while(o!==n){i.push(o);o=peg$parsearray_sep()}if(i!==n){if(t.charCodeAt(Le)===93){o=m;Le++}else{o=n;if(We===0){peg$fail(g)}}if(o!==n){xe=r;s=peg$c57();r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;if(t.charCodeAt(Le)===91){s=p;Le++}else{s=n;if(We===0){peg$fail(h)}}if(s!==n){i=peg$parsearray_value();if(i===n){i=R}if(i!==n){if(t.charCodeAt(Le)===93){o=m;Le++}else{o=n;if(We===0){peg$fail(g)}}if(o!==n){xe=r;s=peg$c58(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;if(t.charCodeAt(Le)===91){s=p;Le++}else{s=n;if(We===0){peg$fail(h)}}if(s!==n){i=[];o=peg$parsearray_value_list();if(o!==n){while(o!==n){i.push(o);o=peg$parsearray_value_list()}}else{i=a}if(i!==n){if(t.charCodeAt(Le)===93){o=m;Le++}else{o=n;if(We===0){peg$fail(g)}}if(o!==n){xe=r;s=peg$c59(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;if(t.charCodeAt(Le)===91){s=p;Le++}else{s=n;if(We===0){peg$fail(h)}}if(s!==n){i=[];o=peg$parsearray_value_list();if(o!==n){while(o!==n){i.push(o);o=peg$parsearray_value_list()}}else{i=a}if(i!==n){o=peg$parsearray_value();if(o!==n){if(t.charCodeAt(Le)===93){l=m;Le++}else{l=n;if(We===0){peg$fail(g)}}if(l!==n){xe=r;s=peg$c60(i,o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}}}Ue[c]={nextPos:Le,result:r};return r}function peg$parsearray_value(){var t,r,s,i,o;var l=Le*49+29,c=Ue[l];if(c){Le=c.nextPos;return c.result}t=Le;r=[];s=peg$parsearray_sep();while(s!==n){r.push(s);s=peg$parsearray_sep()}if(r!==n){s=peg$parsevalue();if(s!==n){i=[];o=peg$parsearray_sep();while(o!==n){i.push(o);o=peg$parsearray_sep()}if(i!==n){xe=t;r=peg$c61(s);t=r}else{Le=t;t=a}}else{Le=t;t=a}}else{Le=t;t=a}Ue[l]={nextPos:Le,result:t};return t}function peg$parsearray_value_list(){var r,s,i,o,l,c,u;var d=Le*49+30,p=Ue[d];if(p){Le=p.nextPos;return p.result}r=Le;s=[];i=peg$parsearray_sep();while(i!==n){s.push(i);i=peg$parsearray_sep()}if(s!==n){i=peg$parsevalue();if(i!==n){o=[];l=peg$parsearray_sep();while(l!==n){o.push(l);l=peg$parsearray_sep()}if(o!==n){if(t.charCodeAt(Le)===44){l=V;Le++}else{l=n;if(We===0){peg$fail(G)}}if(l!==n){c=[];u=peg$parsearray_sep();while(u!==n){c.push(u);u=peg$parsearray_sep()}if(c!==n){xe=r;s=peg$c61(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[d]={nextPos:Le,result:r};return r}function peg$parsearray_sep(){var t;var r=Le*49+31,s=Ue[r];if(s){Le=s.nextPos;return s.result}t=peg$parseS();if(t===n){t=peg$parseNL();if(t===n){t=peg$parsecomment()}}Ue[r]={nextPos:Le,result:t};return t}function peg$parseinline_table(){var r,s,i,o,l,c;var u=Le*49+32,d=Ue[u];if(d){Le=d.nextPos;return d.result}r=Le;if(t.charCodeAt(Le)===123){s=z;Le++}else{s=n;if(We===0){peg$fail(Y)}}if(s!==n){i=[];o=peg$parseS();while(o!==n){i.push(o);o=peg$parseS()}if(i!==n){o=[];l=peg$parseinline_table_assignment();while(l!==n){o.push(l);l=peg$parseinline_table_assignment()}if(o!==n){l=[];c=peg$parseS();while(c!==n){l.push(c);c=peg$parseS()}if(l!==n){if(t.charCodeAt(Le)===125){c=Q;Le++}else{c=n;if(We===0){peg$fail(K)}}if(c!==n){xe=r;s=peg$c68(o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}Ue[u]={nextPos:Le,result:r};return r}function peg$parseinline_table_assignment(){var r,s,i,o,l,c,u,d,p,h,m;var g=Le*49+33,y=Ue[g];if(y){Le=y.nextPos;return y.result}r=Le;s=[];i=peg$parseS();while(i!==n){s.push(i);i=peg$parseS()}if(s!==n){i=peg$parsekey();if(i!==n){o=[];l=peg$parseS();while(l!==n){o.push(l);l=peg$parseS()}if(o!==n){if(t.charCodeAt(Le)===61){l=_;Le++}else{l=n;if(We===0){peg$fail(S)}}if(l!==n){c=[];u=peg$parseS();while(u!==n){c.push(u);u=peg$parseS()}if(c!==n){u=peg$parsevalue();if(u!==n){d=[];p=peg$parseS();while(p!==n){d.push(p);p=peg$parseS()}if(d!==n){if(t.charCodeAt(Le)===44){p=V;Le++}else{p=n;if(We===0){peg$fail(G)}}if(p!==n){h=[];m=peg$parseS();while(m!==n){h.push(m);m=peg$parseS()}if(h!==n){xe=r;s=peg$c69(i,u);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;s=[];i=peg$parseS();while(i!==n){s.push(i);i=peg$parseS()}if(s!==n){i=peg$parsekey();if(i!==n){o=[];l=peg$parseS();while(l!==n){o.push(l);l=peg$parseS()}if(o!==n){if(t.charCodeAt(Le)===61){l=_;Le++}else{l=n;if(We===0){peg$fail(S)}}if(l!==n){c=[];u=peg$parseS();while(u!==n){c.push(u);u=peg$parseS()}if(c!==n){u=peg$parsevalue();if(u!==n){xe=r;s=peg$c69(i,u);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}Ue[g]={nextPos:Le,result:r};return r}function peg$parsesecfragment(){var r,s,i;var o=Le*49+34,l=Ue[o];if(l){Le=l.nextPos;return l.result}r=Le;if(t.charCodeAt(Le)===46){s=y;Le++}else{s=n;if(We===0){peg$fail(b)}}if(s!==n){i=peg$parseDIGITS();if(i!==n){xe=r;s=peg$c70(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}Ue[o]={nextPos:Le,result:r};return r}function peg$parsedate(){var r,s,i,o,l,c,u,d,p,h,m,g;var y=Le*49+35,b=Ue[y];if(b){Le=b.nextPos;return b.result}r=Le;s=Le;i=peg$parseDIGIT_OR_UNDER();if(i!==n){o=peg$parseDIGIT_OR_UNDER();if(o!==n){l=peg$parseDIGIT_OR_UNDER();if(l!==n){c=peg$parseDIGIT_OR_UNDER();if(c!==n){if(t.charCodeAt(Le)===45){u=B;Le++}else{u=n;if(We===0){peg$fail(j)}}if(u!==n){d=peg$parseDIGIT_OR_UNDER();if(d!==n){p=peg$parseDIGIT_OR_UNDER();if(p!==n){if(t.charCodeAt(Le)===45){h=B;Le++}else{h=n;if(We===0){peg$fail(j)}}if(h!==n){m=peg$parseDIGIT_OR_UNDER();if(m!==n){g=peg$parseDIGIT_OR_UNDER();if(g!==n){i=[i,o,l,c,u,d,p,h,m,g];s=i}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}if(s!==n){xe=r;s=peg$c71(s)}r=s;Ue[y]={nextPos:Le,result:r};return r}function peg$parsetime(){var r,s,i,o,l,c,u,d,p,h,m;var g=Le*49+36,y=Ue[g];if(y){Le=y.nextPos;return y.result}r=Le;s=Le;i=peg$parseDIGIT_OR_UNDER();if(i!==n){o=peg$parseDIGIT_OR_UNDER();if(o!==n){if(t.charCodeAt(Le)===58){l=X;Le++}else{l=n;if(We===0){peg$fail(J)}}if(l!==n){c=peg$parseDIGIT_OR_UNDER();if(c!==n){u=peg$parseDIGIT_OR_UNDER();if(u!==n){if(t.charCodeAt(Le)===58){d=X;Le++}else{d=n;if(We===0){peg$fail(J)}}if(d!==n){p=peg$parseDIGIT_OR_UNDER();if(p!==n){h=peg$parseDIGIT_OR_UNDER();if(h!==n){m=peg$parsesecfragment();if(m===n){m=R}if(m!==n){i=[i,o,l,c,u,d,p,h,m];s=i}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}if(s!==n){xe=r;s=peg$c74(s)}r=s;Ue[g]={nextPos:Le,result:r};return r}function peg$parsetime_with_offset(){var r,s,i,o,l,c,u,d,p,h,m,g,y,b,_,S,E;var v=Le*49+37,w=Ue[v];if(w){Le=w.nextPos;return w.result}r=Le;s=Le;i=peg$parseDIGIT_OR_UNDER();if(i!==n){o=peg$parseDIGIT_OR_UNDER();if(o!==n){if(t.charCodeAt(Le)===58){l=X;Le++}else{l=n;if(We===0){peg$fail(J)}}if(l!==n){c=peg$parseDIGIT_OR_UNDER();if(c!==n){u=peg$parseDIGIT_OR_UNDER();if(u!==n){if(t.charCodeAt(Le)===58){d=X;Le++}else{d=n;if(We===0){peg$fail(J)}}if(d!==n){p=peg$parseDIGIT_OR_UNDER();if(p!==n){h=peg$parseDIGIT_OR_UNDER();if(h!==n){m=peg$parsesecfragment();if(m===n){m=R}if(m!==n){if(t.charCodeAt(Le)===45){g=B;Le++}else{g=n;if(We===0){peg$fail(j)}}if(g===n){if(t.charCodeAt(Le)===43){g=F;Le++}else{g=n;if(We===0){peg$fail(M)}}}if(g!==n){y=peg$parseDIGIT_OR_UNDER();if(y!==n){b=peg$parseDIGIT_OR_UNDER();if(b!==n){if(t.charCodeAt(Le)===58){_=X;Le++}else{_=n;if(We===0){peg$fail(J)}}if(_!==n){S=peg$parseDIGIT_OR_UNDER();if(S!==n){E=peg$parseDIGIT_OR_UNDER();if(E!==n){i=[i,o,l,c,u,d,p,h,m,g,y,b,_,S,E];s=i}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}}else{Le=s;s=a}if(s!==n){xe=r;s=peg$c74(s)}r=s;Ue[v]={nextPos:Le,result:r};return r}function peg$parsedatetime(){var r,s,i,o,l;var c=Le*49+38,u=Ue[c];if(u){Le=u.nextPos;return u.result}r=Le;s=peg$parsedate();if(s!==n){if(t.charCodeAt(Le)===84){i=Z;Le++}else{i=n;if(We===0){peg$fail(ee)}}if(i!==n){o=peg$parsetime();if(o!==n){if(t.charCodeAt(Le)===90){l=te;Le++}else{l=n;if(We===0){peg$fail(re)}}if(l!==n){xe=r;s=peg$c79(s,o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;s=peg$parsedate();if(s!==n){if(t.charCodeAt(Le)===84){i=Z;Le++}else{i=n;if(We===0){peg$fail(ee)}}if(i!==n){o=peg$parsetime_with_offset();if(o!==n){xe=r;s=peg$c80(s,o);r=s}else{Le=r;r=a}}else{Le=r;r=a}}else{Le=r;r=a}}Ue[c]={nextPos:Le,result:r};return r}function peg$parseS(){var r;var s=Le*49+39,i=Ue[s];if(i){Le=i.nextPos;return i.result}if(ne.test(t.charAt(Le))){r=t.charAt(Le);Le++}else{r=n;if(We===0){peg$fail(se)}}Ue[s]={nextPos:Le,result:r};return r}function peg$parseNL(){var r,s,i;var o=Le*49+40,l=Ue[o];if(l){Le=l.nextPos;return l.result}if(t.charCodeAt(Le)===10){r=ie;Le++}else{r=n;if(We===0){peg$fail(oe)}}if(r===n){r=Le;if(t.charCodeAt(Le)===13){s=ae;Le++}else{s=n;if(We===0){peg$fail(le)}}if(s!==n){if(t.charCodeAt(Le)===10){i=ie;Le++}else{i=n;if(We===0){peg$fail(oe)}}if(i!==n){s=[s,i];r=s}else{Le=r;r=a}}else{Le=r;r=a}}Ue[o]={nextPos:Le,result:r};return r}function peg$parseNLS(){var t;var r=Le*49+41,s=Ue[r];if(s){Le=s.nextPos;return s.result}t=peg$parseNL();if(t===n){t=peg$parseS()}Ue[r]={nextPos:Le,result:t};return t}function peg$parseEOF(){var r,s;var i=Le*49+42,o=Ue[i];if(o){Le=o.nextPos;return o.result}r=Le;We++;if(t.length>Le){s=t.charAt(Le);Le++}else{s=n;if(We===0){peg$fail(d)}}We--;if(s===n){r=u}else{Le=r;r=a}Ue[i]={nextPos:Le,result:r};return r}function peg$parseHEX(){var r;var s=Le*49+43,i=Ue[s];if(i){Le=i.nextPos;return i.result}if(ce.test(t.charAt(Le))){r=t.charAt(Le);Le++}else{r=n;if(We===0){peg$fail(ue)}}Ue[s]={nextPos:Le,result:r};return r}function peg$parseDIGIT_OR_UNDER(){var r,s;var i=Le*49+44,o=Ue[i];if(o){Le=o.nextPos;return o.result}if(fe.test(t.charAt(Le))){r=t.charAt(Le);Le++}else{r=n;if(We===0){peg$fail(de)}}if(r===n){r=Le;if(t.charCodeAt(Le)===95){s=pe;Le++}else{s=n;if(We===0){peg$fail(he)}}if(s!==n){xe=r;s=peg$c93()}r=s}Ue[i]={nextPos:Le,result:r};return r}function peg$parseASCII_BASIC(){var r;var s=Le*49+45,i=Ue[s];if(i){Le=i.nextPos;return i.result}if(me.test(t.charAt(Le))){r=t.charAt(Le);Le++}else{r=n;if(We===0){peg$fail(ge)}}Ue[s]={nextPos:Le,result:r};return r}function peg$parseDIGITS(){var t,r,s;var i=Le*49+46,o=Ue[i];if(o){Le=o.nextPos;return o.result}t=Le;r=[];s=peg$parseDIGIT_OR_UNDER();if(s!==n){while(s!==n){r.push(s);s=peg$parseDIGIT_OR_UNDER()}}else{r=a}if(r!==n){xe=t;r=peg$c96(r)}t=r;Ue[i]={nextPos:Le,result:t};return t}function peg$parseESCAPED(){var r,s;var i=Le*49+47,o=Ue[i];if(o){Le=o.nextPos;return o.result}r=Le;if(t.substr(Le,2)===ye){s=ye;Le+=2}else{s=n;if(We===0){peg$fail(be)}}if(s!==n){xe=r;s=peg$c99()}r=s;if(r===n){r=Le;if(t.substr(Le,2)===_e){s=_e;Le+=2}else{s=n;if(We===0){peg$fail(Se)}}if(s!==n){xe=r;s=peg$c102()}r=s;if(r===n){r=Le;if(t.substr(Le,2)===Ee){s=Ee;Le+=2}else{s=n;if(We===0){peg$fail(ve)}}if(s!==n){xe=r;s=peg$c105()}r=s;if(r===n){r=Le;if(t.substr(Le,2)===Re){s=Re;Le+=2}else{s=n;if(We===0){peg$fail(we)}}if(s!==n){xe=r;s=peg$c108()}r=s;if(r===n){r=Le;if(t.substr(Le,2)===Ce){s=Ce;Le+=2}else{s=n;if(We===0){peg$fail(Ae)}}if(s!==n){xe=r;s=peg$c111()}r=s;if(r===n){r=Le;if(t.substr(Le,2)===Te){s=Te;Le+=2}else{s=n;if(We===0){peg$fail(Ie)}}if(s!==n){xe=r;s=peg$c114()}r=s;if(r===n){r=Le;if(t.substr(Le,2)===Pe){s=Pe;Le+=2}else{s=n;if(We===0){peg$fail(Ne)}}if(s!==n){xe=r;s=peg$c117()}r=s;if(r===n){r=peg$parseESCAPED_UNICODE()}}}}}}}Ue[i]={nextPos:Le,result:r};return r}function peg$parseESCAPED_UNICODE(){var r,s,i,o,l,c,u,d,p,h,m;var g=Le*49+48,y=Ue[g];if(y){Le=y.nextPos;return y.result}r=Le;if(t.substr(Le,2)===De){s=De;Le+=2}else{s=n;if(We===0){peg$fail(Oe)}}if(s!==n){i=Le;o=peg$parseHEX();if(o!==n){l=peg$parseHEX();if(l!==n){c=peg$parseHEX();if(c!==n){u=peg$parseHEX();if(u!==n){d=peg$parseHEX();if(d!==n){p=peg$parseHEX();if(p!==n){h=peg$parseHEX();if(h!==n){m=peg$parseHEX();if(m!==n){o=[o,l,c,u,d,p,h,m];i=o}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}if(i!==n){xe=r;s=peg$c120(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}if(r===n){r=Le;if(t.substr(Le,2)===ke){s=ke;Le+=2}else{s=n;if(We===0){peg$fail($e)}}if(s!==n){i=Le;o=peg$parseHEX();if(o!==n){l=peg$parseHEX();if(l!==n){c=peg$parseHEX();if(c!==n){u=peg$parseHEX();if(u!==n){o=[o,l,c,u];i=o}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}}else{Le=i;i=a}if(i!==n){xe=r;s=peg$c120(i);r=s}else{Le=r;r=a}}else{Le=r;r=a}}Ue[g]={nextPos:Le,result:r};return r}var He=[];function genError(t,r,n){var s=new Error(t);s.line=r;s.column=n;throw s}function addNode(t){He.push(t)}function node(t,r,n,s,i){var o={type:t,value:r,line:n(),column:s()};if(i)o.key=i;return o}function convertCodePoint(t,r,n){var s=parseInt("0x"+t);if(!isFinite(s)||Math.floor(s)!=s||s<0||s>1114111||s>55295&&s<57344){genError("Invalid Unicode escape code: "+t,r,n)}else{return fromCodePoint(s)}}function fromCodePoint(){var t=16384;var r=[];var n;var s;var i=-1;var o=arguments.length;if(!o){return""}var a="";while(++i<o){var l=Number(arguments[i]);if(l<=65535){r.push(l)}else{l-=65536;n=(l>>10)+55296;s=l%1024+56320;r.push(n,s)}if(i+1==o||r.length>t){a+=String.fromCharCode.apply(null,r);r.length=0}}return a}qe=i();if(qe!==n&&Le===t.length){return qe}else{if(qe!==n&&Le<t.length){peg$fail({type:"end",description:"end of input"})}throw peg$buildException(null,je,Be)}}return{SyntaxError:SyntaxError,parse:parse}}()},1452:function(t,r){
|
||
/**
|
||
* @license
|
||
* web-streams-polyfill v3.3.2
|
||
* Copyright 2024 Mattias Buelens, Diwank Singh Tomer and other contributors.
|
||
* This code is released under the MIT license.
|
||
* SPDX-License-Identifier: MIT
|
||
*/
|
||
(function(t,n){true?n(r):0})(this,(function(t){"use strict";const r=typeof Symbol==="function"&&typeof Symbol.iterator==="symbol"?Symbol:t=>`Symbol(${t})`;function noop(){return undefined}function typeIsObject(t){return typeof t==="object"&&t!==null||typeof t==="function"}const n=noop;function setFunctionName(t,r){try{Object.defineProperty(t,"name",{value:r,configurable:true})}catch(t){}}const s=Promise;const i=Promise.prototype.then;const o=Promise.reject.bind(s);function newPromise(t){return new s(t)}function promiseResolvedWith(t){return newPromise((r=>r(t)))}function promiseRejectedWith(t){return o(t)}function PerformPromiseThen(t,r,n){return i.call(t,r,n)}function uponPromise(t,r,s){PerformPromiseThen(PerformPromiseThen(t,r,s),undefined,n)}function uponFulfillment(t,r){uponPromise(t,r)}function uponRejection(t,r){uponPromise(t,undefined,r)}function transformPromiseWith(t,r,n){return PerformPromiseThen(t,r,n)}function setPromiseIsHandledToTrue(t){PerformPromiseThen(t,undefined,n)}let _queueMicrotask=t=>{if(typeof queueMicrotask==="function"){_queueMicrotask=queueMicrotask}else{const t=promiseResolvedWith(undefined);_queueMicrotask=r=>PerformPromiseThen(t,r)}return _queueMicrotask(t)};function reflectCall(t,r,n){if(typeof t!=="function"){throw new TypeError("Argument is not a function")}return Function.prototype.apply.call(t,r,n)}function promiseCall(t,r,n){try{return promiseResolvedWith(reflectCall(t,r,n))}catch(t){return promiseRejectedWith(t)}}const a=16384;class SimpleQueue{constructor(){this._cursor=0;this._size=0;this._front={_elements:[],_next:undefined};this._back=this._front;this._cursor=0;this._size=0}get length(){return this._size}push(t){const r=this._back;let n=r;if(r._elements.length===a-1){n={_elements:[],_next:undefined}}r._elements.push(t);if(n!==r){this._back=n;r._next=n}++this._size}shift(){const t=this._front;let r=t;const n=this._cursor;let s=n+1;const i=t._elements;const o=i[n];if(s===a){r=t._next;s=0}--this._size;this._cursor=s;if(t!==r){this._front=r}i[n]=undefined;return o}forEach(t){let r=this._cursor;let n=this._front;let s=n._elements;while(r!==s.length||n._next!==undefined){if(r===s.length){n=n._next;s=n._elements;r=0;if(s.length===0){break}}t(s[r]);++r}}peek(){const t=this._front;const r=this._cursor;return t._elements[r]}}const l=r("[[AbortSteps]]");const c=r("[[ErrorSteps]]");const u=r("[[CancelSteps]]");const d=r("[[PullSteps]]");const p=r("[[ReleaseSteps]]");function ReadableStreamReaderGenericInitialize(t,r){t._ownerReadableStream=r;r._reader=t;if(r._state==="readable"){defaultReaderClosedPromiseInitialize(t)}else if(r._state==="closed"){defaultReaderClosedPromiseInitializeAsResolved(t)}else{defaultReaderClosedPromiseInitializeAsRejected(t,r._storedError)}}function ReadableStreamReaderGenericCancel(t,r){const n=t._ownerReadableStream;return ReadableStreamCancel(n,r)}function ReadableStreamReaderGenericRelease(t){const r=t._ownerReadableStream;if(r._state==="readable"){defaultReaderClosedPromiseReject(t,new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`))}else{defaultReaderClosedPromiseResetToRejected(t,new TypeError(`Reader was released and can no longer be used to monitor the stream's closedness`))}r._readableStreamController[p]();r._reader=undefined;t._ownerReadableStream=undefined}function readerLockException(t){return new TypeError("Cannot "+t+" a stream using a released reader")}function defaultReaderClosedPromiseInitialize(t){t._closedPromise=newPromise(((r,n)=>{t._closedPromise_resolve=r;t._closedPromise_reject=n}))}function defaultReaderClosedPromiseInitializeAsRejected(t,r){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseReject(t,r)}function defaultReaderClosedPromiseInitializeAsResolved(t){defaultReaderClosedPromiseInitialize(t);defaultReaderClosedPromiseResolve(t)}function defaultReaderClosedPromiseReject(t,r){if(t._closedPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined}function defaultReaderClosedPromiseResetToRejected(t,r){defaultReaderClosedPromiseInitializeAsRejected(t,r)}function defaultReaderClosedPromiseResolve(t){if(t._closedPromise_resolve===undefined){return}t._closedPromise_resolve(undefined);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined}const h=Number.isFinite||function(t){return typeof t==="number"&&isFinite(t)};const m=Math.trunc||function(t){return t<0?Math.ceil(t):Math.floor(t)};function isDictionary(t){return typeof t==="object"||typeof t==="function"}function assertDictionary(t,r){if(t!==undefined&&!isDictionary(t)){throw new TypeError(`${r} is not an object.`)}}function assertFunction(t,r){if(typeof t!=="function"){throw new TypeError(`${r} is not a function.`)}}function isObject(t){return typeof t==="object"&&t!==null||typeof t==="function"}function assertObject(t,r){if(!isObject(t)){throw new TypeError(`${r} is not an object.`)}}function assertRequiredArgument(t,r,n){if(t===undefined){throw new TypeError(`Parameter ${r} is required in '${n}'.`)}}function assertRequiredField(t,r,n){if(t===undefined){throw new TypeError(`${r} is required in '${n}'.`)}}function convertUnrestrictedDouble(t){return Number(t)}function censorNegativeZero(t){return t===0?0:t}function integerPart(t){return censorNegativeZero(m(t))}function convertUnsignedLongLongWithEnforceRange(t,r){const n=0;const s=Number.MAX_SAFE_INTEGER;let i=Number(t);i=censorNegativeZero(i);if(!h(i)){throw new TypeError(`${r} is not a finite number`)}i=integerPart(i);if(i<n||i>s){throw new TypeError(`${r} is outside the accepted range of ${n} to ${s}, inclusive`)}if(!h(i)||i===0){return 0}return i}function assertReadableStream(t,r){if(!IsReadableStream(t)){throw new TypeError(`${r} is not a ReadableStream.`)}}function AcquireReadableStreamDefaultReader(t){return new ReadableStreamDefaultReader(t)}function ReadableStreamAddReadRequest(t,r){t._reader._readRequests.push(r)}function ReadableStreamFulfillReadRequest(t,r,n){const s=t._reader;const i=s._readRequests.shift();if(n){i._closeSteps()}else{i._chunkSteps(r)}}function ReadableStreamGetNumReadRequests(t){return t._reader._readRequests.length}function ReadableStreamHasDefaultReader(t){const r=t._reader;if(r===undefined){return false}if(!IsReadableStreamDefaultReader(r)){return false}return true}class ReadableStreamDefaultReader{constructor(t){assertRequiredArgument(t,1,"ReadableStreamDefaultReader");assertReadableStream(t,"First parameter");if(IsReadableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}ReadableStreamReaderGenericInitialize(this,t);this._readRequests=new SimpleQueue}get closed(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("closed"))}return this._closedPromise}cancel(t=undefined){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,t)}read(){if(!IsReadableStreamDefaultReader(this)){return promiseRejectedWith(defaultReaderBrandCheckException("read"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}let t;let r;const n=newPromise(((n,s)=>{t=n;r=s}));const s={_chunkSteps:r=>t({value:r,done:false}),_closeSteps:()=>t({value:undefined,done:true}),_errorSteps:t=>r(t)};ReadableStreamDefaultReaderRead(this,s);return n}releaseLock(){if(!IsReadableStreamDefaultReader(this)){throw defaultReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}ReadableStreamDefaultReaderRelease(this)}}Object.defineProperties(ReadableStreamDefaultReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});setFunctionName(ReadableStreamDefaultReader.prototype.cancel,"cancel");setFunctionName(ReadableStreamDefaultReader.prototype.read,"read");setFunctionName(ReadableStreamDefaultReader.prototype.releaseLock,"releaseLock");if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultReader.prototype,r.toStringTag,{value:"ReadableStreamDefaultReader",configurable:true})}function IsReadableStreamDefaultReader(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readRequests")){return false}return t instanceof ReadableStreamDefaultReader}function ReadableStreamDefaultReaderRead(t,r){const n=t._ownerReadableStream;n._disturbed=true;if(n._state==="closed"){r._closeSteps()}else if(n._state==="errored"){r._errorSteps(n._storedError)}else{n._readableStreamController[d](r)}}function ReadableStreamDefaultReaderRelease(t){ReadableStreamReaderGenericRelease(t);const r=new TypeError("Reader was released");ReadableStreamDefaultReaderErrorReadRequests(t,r)}function ReadableStreamDefaultReaderErrorReadRequests(t,r){const n=t._readRequests;t._readRequests=new SimpleQueue;n.forEach((t=>{t._errorSteps(r)}))}function defaultReaderBrandCheckException(t){return new TypeError(`ReadableStreamDefaultReader.prototype.${t} can only be used on a ReadableStreamDefaultReader`)}const g=Object.getPrototypeOf(Object.getPrototypeOf((async function*(){})).prototype);class ReadableStreamAsyncIteratorImpl{constructor(t,r){this._ongoingPromise=undefined;this._isFinished=false;this._reader=t;this._preventCancel=r}next(){const nextSteps=()=>this._nextSteps();this._ongoingPromise=this._ongoingPromise?transformPromiseWith(this._ongoingPromise,nextSteps,nextSteps):nextSteps();return this._ongoingPromise}return(t){const returnSteps=()=>this._returnSteps(t);return this._ongoingPromise?transformPromiseWith(this._ongoingPromise,returnSteps,returnSteps):returnSteps()}_nextSteps(){if(this._isFinished){return Promise.resolve({value:undefined,done:true})}const t=this._reader;let r;let n;const s=newPromise(((t,s)=>{r=t;n=s}));const i={_chunkSteps:t=>{this._ongoingPromise=undefined;_queueMicrotask((()=>r({value:t,done:false})))},_closeSteps:()=>{this._ongoingPromise=undefined;this._isFinished=true;ReadableStreamReaderGenericRelease(t);r({value:undefined,done:true})},_errorSteps:r=>{this._ongoingPromise=undefined;this._isFinished=true;ReadableStreamReaderGenericRelease(t);n(r)}};ReadableStreamDefaultReaderRead(t,i);return s}_returnSteps(t){if(this._isFinished){return Promise.resolve({value:t,done:true})}this._isFinished=true;const r=this._reader;if(!this._preventCancel){const n=ReadableStreamReaderGenericCancel(r,t);ReadableStreamReaderGenericRelease(r);return transformPromiseWith(n,(()=>({value:t,done:true})))}ReadableStreamReaderGenericRelease(r);return promiseResolvedWith({value:t,done:true})}}const y={next(){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("next"))}return this._asyncIteratorImpl.next()},return(t){if(!IsReadableStreamAsyncIterator(this)){return promiseRejectedWith(streamAsyncIteratorBrandCheckException("return"))}return this._asyncIteratorImpl.return(t)}};if(g!==undefined){Object.setPrototypeOf(y,g)}function AcquireReadableStreamAsyncIterator(t,r){const n=AcquireReadableStreamDefaultReader(t);const s=new ReadableStreamAsyncIteratorImpl(n,r);const i=Object.create(y);i._asyncIteratorImpl=s;return i}function IsReadableStreamAsyncIterator(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_asyncIteratorImpl")){return false}try{return t._asyncIteratorImpl instanceof ReadableStreamAsyncIteratorImpl}catch(t){return false}}function streamAsyncIteratorBrandCheckException(t){return new TypeError(`ReadableStreamAsyncIterator.${t} can only be used on a ReadableSteamAsyncIterator`)}const b=Number.isNaN||function(t){return t!==t};function CreateArrayFromList(t){return t.slice()}function CopyDataBlockBytes(t,r,n,s,i){new Uint8Array(t).set(new Uint8Array(n,s,i),r)}let TransferArrayBuffer=t=>{if(typeof t.transfer==="function"){TransferArrayBuffer=t=>t.transfer()}else if(typeof structuredClone==="function"){TransferArrayBuffer=t=>structuredClone(t,{transfer:[t]})}else{TransferArrayBuffer=t=>t}return TransferArrayBuffer(t)};let IsDetachedBuffer=t=>{if(typeof t.detached==="boolean"){IsDetachedBuffer=t=>t.detached}else{IsDetachedBuffer=t=>t.byteLength===0}return IsDetachedBuffer(t)};function ArrayBufferSlice(t,r,n){if(t.slice){return t.slice(r,n)}const s=n-r;const i=new ArrayBuffer(s);CopyDataBlockBytes(i,0,t,r,s);return i}function GetMethod(t,r){const n=t[r];if(n===undefined||n===null){return undefined}if(typeof n!=="function"){throw new TypeError(`${String(r)} is not a function`)}return n}function CreateAsyncFromSyncIterator(t){const n={[r.iterator]:()=>t.iterator};const s=async function*(){return yield*n}();const i=s.next;return{iterator:s,nextMethod:i,done:false}}function GetIterator(t,n="sync",s){if(s===undefined){if(n==="async"){s=GetMethod(t,r.asyncIterator);if(s===undefined){const n=GetMethod(t,r.iterator);const s=GetIterator(t,"sync",n);return CreateAsyncFromSyncIterator(s)}}else{s=GetMethod(t,r.iterator)}}if(s===undefined){throw new TypeError("The object is not iterable")}const i=reflectCall(s,t,[]);if(!typeIsObject(i)){throw new TypeError("The iterator method must return an object")}const o=i.next;return{iterator:i,nextMethod:o,done:false}}function IteratorNext(t){const r=reflectCall(t.nextMethod,t.iterator,[]);if(!typeIsObject(r)){throw new TypeError("The iterator.next() method must return an object")}return r}function IteratorComplete(t){return Boolean(t.done)}function IteratorValue(t){return t.value}function IsNonNegativeNumber(t){if(typeof t!=="number"){return false}if(b(t)){return false}if(t<0){return false}return true}function CloneAsUint8Array(t){const r=ArrayBufferSlice(t.buffer,t.byteOffset,t.byteOffset+t.byteLength);return new Uint8Array(r)}function DequeueValue(t){const r=t._queue.shift();t._queueTotalSize-=r.size;if(t._queueTotalSize<0){t._queueTotalSize=0}return r.value}function EnqueueValueWithSize(t,r,n){if(!IsNonNegativeNumber(n)||n===Infinity){throw new RangeError("Size must be a finite, non-NaN, non-negative number.")}t._queue.push({value:r,size:n});t._queueTotalSize+=n}function PeekQueueValue(t){const r=t._queue.peek();return r.value}function ResetQueue(t){t._queue=new SimpleQueue;t._queueTotalSize=0}function isDataViewConstructor(t){return t===DataView}function isDataView(t){return isDataViewConstructor(t.constructor)}function arrayBufferViewElementSize(t){if(isDataViewConstructor(t)){return 1}return t.BYTES_PER_ELEMENT}class ReadableStreamBYOBRequest{constructor(){throw new TypeError("Illegal constructor")}get view(){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("view")}return this._view}respond(t){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respond")}assertRequiredArgument(t,1,"respond");t=convertUnsignedLongLongWithEnforceRange(t,"First parameter");if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(this._view.buffer)){throw new TypeError(`The BYOB request's buffer has been detached and so cannot be used as a response`)}ReadableByteStreamControllerRespond(this._associatedReadableByteStreamController,t)}respondWithNewView(t){if(!IsReadableStreamBYOBRequest(this)){throw byobRequestBrandCheckException("respondWithNewView")}assertRequiredArgument(t,1,"respondWithNewView");if(!ArrayBuffer.isView(t)){throw new TypeError("You can only respond with array buffer views")}if(this._associatedReadableByteStreamController===undefined){throw new TypeError("This BYOB request has been invalidated")}if(IsDetachedBuffer(t.buffer)){throw new TypeError("The given view's buffer has been detached and so cannot be used as a response")}ReadableByteStreamControllerRespondWithNewView(this._associatedReadableByteStreamController,t)}}Object.defineProperties(ReadableStreamBYOBRequest.prototype,{respond:{enumerable:true},respondWithNewView:{enumerable:true},view:{enumerable:true}});setFunctionName(ReadableStreamBYOBRequest.prototype.respond,"respond");setFunctionName(ReadableStreamBYOBRequest.prototype.respondWithNewView,"respondWithNewView");if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBRequest.prototype,r.toStringTag,{value:"ReadableStreamBYOBRequest",configurable:true})}class ReadableByteStreamController{constructor(){throw new TypeError("Illegal constructor")}get byobRequest(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("byobRequest")}return ReadableByteStreamControllerGetBYOBRequest(this)}get desiredSize(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("desiredSize")}return ReadableByteStreamControllerGetDesiredSize(this)}close(){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("close")}if(this._closeRequested){throw new TypeError("The stream has already been closed; do not close it again!")}const t=this._controlledReadableByteStream._state;if(t!=="readable"){throw new TypeError(`The stream (in ${t} state) is not in the readable state and cannot be closed`)}ReadableByteStreamControllerClose(this)}enqueue(t){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("enqueue")}assertRequiredArgument(t,1,"enqueue");if(!ArrayBuffer.isView(t)){throw new TypeError("chunk must be an array buffer view")}if(t.byteLength===0){throw new TypeError("chunk must have non-zero byteLength")}if(t.buffer.byteLength===0){throw new TypeError(`chunk's buffer must have non-zero byteLength`)}if(this._closeRequested){throw new TypeError("stream is closed or draining")}const r=this._controlledReadableByteStream._state;if(r!=="readable"){throw new TypeError(`The stream (in ${r} state) is not in the readable state and cannot be enqueued to`)}ReadableByteStreamControllerEnqueue(this,t)}error(t=undefined){if(!IsReadableByteStreamController(this)){throw byteStreamControllerBrandCheckException("error")}ReadableByteStreamControllerError(this,t)}[u](t){ReadableByteStreamControllerClearPendingPullIntos(this);ResetQueue(this);const r=this._cancelAlgorithm(t);ReadableByteStreamControllerClearAlgorithms(this);return r}[d](t){const r=this._controlledReadableByteStream;if(this._queueTotalSize>0){ReadableByteStreamControllerFillReadRequestFromQueue(this,t);return}const n=this._autoAllocateChunkSize;if(n!==undefined){let r;try{r=new ArrayBuffer(n)}catch(r){t._errorSteps(r);return}const s={buffer:r,bufferByteLength:n,byteOffset:0,byteLength:n,bytesFilled:0,minimumFill:1,elementSize:1,viewConstructor:Uint8Array,readerType:"default"};this._pendingPullIntos.push(s)}ReadableStreamAddReadRequest(r,t);ReadableByteStreamControllerCallPullIfNeeded(this)}[p](){if(this._pendingPullIntos.length>0){const t=this._pendingPullIntos.peek();t.readerType="none";this._pendingPullIntos=new SimpleQueue;this._pendingPullIntos.push(t)}}}Object.defineProperties(ReadableByteStreamController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},byobRequest:{enumerable:true},desiredSize:{enumerable:true}});setFunctionName(ReadableByteStreamController.prototype.close,"close");setFunctionName(ReadableByteStreamController.prototype.enqueue,"enqueue");setFunctionName(ReadableByteStreamController.prototype.error,"error");if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableByteStreamController.prototype,r.toStringTag,{value:"ReadableByteStreamController",configurable:true})}function IsReadableByteStreamController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledReadableByteStream")){return false}return t instanceof ReadableByteStreamController}function IsReadableStreamBYOBRequest(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_associatedReadableByteStreamController")){return false}return t instanceof ReadableStreamBYOBRequest}function ReadableByteStreamControllerCallPullIfNeeded(t){const r=ReadableByteStreamControllerShouldCallPull(t);if(!r){return}if(t._pulling){t._pullAgain=true;return}t._pulling=true;const n=t._pullAlgorithm();uponPromise(n,(()=>{t._pulling=false;if(t._pullAgain){t._pullAgain=false;ReadableByteStreamControllerCallPullIfNeeded(t)}return null}),(r=>{ReadableByteStreamControllerError(t,r);return null}))}function ReadableByteStreamControllerClearPendingPullIntos(t){ReadableByteStreamControllerInvalidateBYOBRequest(t);t._pendingPullIntos=new SimpleQueue}function ReadableByteStreamControllerCommitPullIntoDescriptor(t,r){let n=false;if(t._state==="closed"){n=true}const s=ReadableByteStreamControllerConvertPullIntoDescriptor(r);if(r.readerType==="default"){ReadableStreamFulfillReadRequest(t,s,n)}else{ReadableStreamFulfillReadIntoRequest(t,s,n)}}function ReadableByteStreamControllerConvertPullIntoDescriptor(t){const r=t.bytesFilled;const n=t.elementSize;return new t.viewConstructor(t.buffer,t.byteOffset,r/n)}function ReadableByteStreamControllerEnqueueChunkToQueue(t,r,n,s){t._queue.push({buffer:r,byteOffset:n,byteLength:s});t._queueTotalSize+=s}function ReadableByteStreamControllerEnqueueClonedChunkToQueue(t,r,n,s){let i;try{i=ArrayBufferSlice(r,n,n+s)}catch(r){ReadableByteStreamControllerError(t,r);throw r}ReadableByteStreamControllerEnqueueChunkToQueue(t,i,0,s)}function ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue(t,r){if(r.bytesFilled>0){ReadableByteStreamControllerEnqueueClonedChunkToQueue(t,r.buffer,r.byteOffset,r.bytesFilled)}ReadableByteStreamControllerShiftPendingPullInto(t)}function ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r){const n=Math.min(t._queueTotalSize,r.byteLength-r.bytesFilled);const s=r.bytesFilled+n;let i=n;let o=false;const a=s%r.elementSize;const l=s-a;if(l>=r.minimumFill){i=l-r.bytesFilled;o=true}const c=t._queue;while(i>0){const n=c.peek();const s=Math.min(i,n.byteLength);const o=r.byteOffset+r.bytesFilled;CopyDataBlockBytes(r.buffer,o,n.buffer,n.byteOffset,s);if(n.byteLength===s){c.shift()}else{n.byteOffset+=s;n.byteLength-=s}t._queueTotalSize-=s;ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,s,r);i-=s}return o}function ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,n){n.bytesFilled+=r}function ReadableByteStreamControllerHandleQueueDrain(t){if(t._queueTotalSize===0&&t._closeRequested){ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(t._controlledReadableByteStream)}else{ReadableByteStreamControllerCallPullIfNeeded(t)}}function ReadableByteStreamControllerInvalidateBYOBRequest(t){if(t._byobRequest===null){return}t._byobRequest._associatedReadableByteStreamController=undefined;t._byobRequest._view=null;t._byobRequest=null}function ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t){while(t._pendingPullIntos.length>0){if(t._queueTotalSize===0){return}const r=t._pendingPullIntos.peek();if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,r)){ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,r)}}}function ReadableByteStreamControllerProcessReadRequestsUsingQueue(t){const r=t._controlledReadableByteStream._reader;while(r._readRequests.length>0){if(t._queueTotalSize===0){return}const n=r._readRequests.shift();ReadableByteStreamControllerFillReadRequestFromQueue(t,n)}}function ReadableByteStreamControllerPullInto(t,r,n,s){const i=t._controlledReadableByteStream;const o=r.constructor;const a=arrayBufferViewElementSize(o);const{byteOffset:l,byteLength:c}=r;const u=n*a;let d;try{d=TransferArrayBuffer(r.buffer)}catch(t){s._errorSteps(t);return}const p={buffer:d,bufferByteLength:d.byteLength,byteOffset:l,byteLength:c,bytesFilled:0,minimumFill:u,elementSize:a,viewConstructor:o,readerType:"byob"};if(t._pendingPullIntos.length>0){t._pendingPullIntos.push(p);ReadableStreamAddReadIntoRequest(i,s);return}if(i._state==="closed"){const t=new o(p.buffer,p.byteOffset,0);s._closeSteps(t);return}if(t._queueTotalSize>0){if(ReadableByteStreamControllerFillPullIntoDescriptorFromQueue(t,p)){const r=ReadableByteStreamControllerConvertPullIntoDescriptor(p);ReadableByteStreamControllerHandleQueueDrain(t);s._chunkSteps(r);return}if(t._closeRequested){const r=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,r);s._errorSteps(r);return}}t._pendingPullIntos.push(p);ReadableStreamAddReadIntoRequest(i,s);ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerRespondInClosedState(t,r){if(r.readerType==="none"){ReadableByteStreamControllerShiftPendingPullInto(t)}const n=t._controlledReadableByteStream;if(ReadableStreamHasBYOBReader(n)){while(ReadableStreamGetNumReadIntoRequests(n)>0){const r=ReadableByteStreamControllerShiftPendingPullInto(t);ReadableByteStreamControllerCommitPullIntoDescriptor(n,r)}}}function ReadableByteStreamControllerRespondInReadableState(t,r,n){ReadableByteStreamControllerFillHeadPullIntoDescriptor(t,r,n);if(n.readerType==="none"){ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue(t,n);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t);return}if(n.bytesFilled<n.minimumFill){return}ReadableByteStreamControllerShiftPendingPullInto(t);const s=n.bytesFilled%n.elementSize;if(s>0){const r=n.byteOffset+n.bytesFilled;ReadableByteStreamControllerEnqueueClonedChunkToQueue(t,n.buffer,r-s,s)}n.bytesFilled-=s;ReadableByteStreamControllerCommitPullIntoDescriptor(t._controlledReadableByteStream,n);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}function ReadableByteStreamControllerRespondInternal(t,r){const n=t._pendingPullIntos.peek();ReadableByteStreamControllerInvalidateBYOBRequest(t);const s=t._controlledReadableByteStream._state;if(s==="closed"){ReadableByteStreamControllerRespondInClosedState(t,n)}else{ReadableByteStreamControllerRespondInReadableState(t,r,n)}ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerShiftPendingPullInto(t){const r=t._pendingPullIntos.shift();return r}function ReadableByteStreamControllerShouldCallPull(t){const r=t._controlledReadableByteStream;if(r._state!=="readable"){return false}if(t._closeRequested){return false}if(!t._started){return false}if(ReadableStreamHasDefaultReader(r)&&ReadableStreamGetNumReadRequests(r)>0){return true}if(ReadableStreamHasBYOBReader(r)&&ReadableStreamGetNumReadIntoRequests(r)>0){return true}const n=ReadableByteStreamControllerGetDesiredSize(t);if(n>0){return true}return false}function ReadableByteStreamControllerClearAlgorithms(t){t._pullAlgorithm=undefined;t._cancelAlgorithm=undefined}function ReadableByteStreamControllerClose(t){const r=t._controlledReadableByteStream;if(t._closeRequested||r._state!=="readable"){return}if(t._queueTotalSize>0){t._closeRequested=true;return}if(t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();if(r.bytesFilled%r.elementSize!==0){const r=new TypeError("Insufficient bytes to fill elements in the given buffer");ReadableByteStreamControllerError(t,r);throw r}}ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamClose(r)}function ReadableByteStreamControllerEnqueue(t,r){const n=t._controlledReadableByteStream;if(t._closeRequested||n._state!=="readable"){return}const{buffer:s,byteOffset:i,byteLength:o}=r;if(IsDetachedBuffer(s)){throw new TypeError("chunk's buffer is detached and so cannot be enqueued")}const a=TransferArrayBuffer(s);if(t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();if(IsDetachedBuffer(r.buffer)){throw new TypeError("The BYOB request's buffer has been detached and so cannot be filled with an enqueued chunk")}ReadableByteStreamControllerInvalidateBYOBRequest(t);r.buffer=TransferArrayBuffer(r.buffer);if(r.readerType==="none"){ReadableByteStreamControllerEnqueueDetachedPullIntoToQueue(t,r)}}if(ReadableStreamHasDefaultReader(n)){ReadableByteStreamControllerProcessReadRequestsUsingQueue(t);if(ReadableStreamGetNumReadRequests(n)===0){ReadableByteStreamControllerEnqueueChunkToQueue(t,a,i,o)}else{if(t._pendingPullIntos.length>0){ReadableByteStreamControllerShiftPendingPullInto(t)}const r=new Uint8Array(a,i,o);ReadableStreamFulfillReadRequest(n,r,false)}}else if(ReadableStreamHasBYOBReader(n)){ReadableByteStreamControllerEnqueueChunkToQueue(t,a,i,o);ReadableByteStreamControllerProcessPullIntoDescriptorsUsingQueue(t)}else{ReadableByteStreamControllerEnqueueChunkToQueue(t,a,i,o)}ReadableByteStreamControllerCallPullIfNeeded(t)}function ReadableByteStreamControllerError(t,r){const n=t._controlledReadableByteStream;if(n._state!=="readable"){return}ReadableByteStreamControllerClearPendingPullIntos(t);ResetQueue(t);ReadableByteStreamControllerClearAlgorithms(t);ReadableStreamError(n,r)}function ReadableByteStreamControllerFillReadRequestFromQueue(t,r){const n=t._queue.shift();t._queueTotalSize-=n.byteLength;ReadableByteStreamControllerHandleQueueDrain(t);const s=new Uint8Array(n.buffer,n.byteOffset,n.byteLength);r._chunkSteps(s)}function ReadableByteStreamControllerGetBYOBRequest(t){if(t._byobRequest===null&&t._pendingPullIntos.length>0){const r=t._pendingPullIntos.peek();const n=new Uint8Array(r.buffer,r.byteOffset+r.bytesFilled,r.byteLength-r.bytesFilled);const s=Object.create(ReadableStreamBYOBRequest.prototype);SetUpReadableStreamBYOBRequest(s,t,n);t._byobRequest=s}return t._byobRequest}function ReadableByteStreamControllerGetDesiredSize(t){const r=t._controlledReadableByteStream._state;if(r==="errored"){return null}if(r==="closed"){return 0}return t._strategyHWM-t._queueTotalSize}function ReadableByteStreamControllerRespond(t,r){const n=t._pendingPullIntos.peek();const s=t._controlledReadableByteStream._state;if(s==="closed"){if(r!==0){throw new TypeError("bytesWritten must be 0 when calling respond() on a closed stream")}}else{if(r===0){throw new TypeError("bytesWritten must be greater than 0 when calling respond() on a readable stream")}if(n.bytesFilled+r>n.byteLength){throw new RangeError("bytesWritten out of range")}}n.buffer=TransferArrayBuffer(n.buffer);ReadableByteStreamControllerRespondInternal(t,r)}function ReadableByteStreamControllerRespondWithNewView(t,r){const n=t._pendingPullIntos.peek();const s=t._controlledReadableByteStream._state;if(s==="closed"){if(r.byteLength!==0){throw new TypeError("The view's length must be 0 when calling respondWithNewView() on a closed stream")}}else{if(r.byteLength===0){throw new TypeError("The view's length must be greater than 0 when calling respondWithNewView() on a readable stream")}}if(n.byteOffset+n.bytesFilled!==r.byteOffset){throw new RangeError("The region specified by view does not match byobRequest")}if(n.bufferByteLength!==r.buffer.byteLength){throw new RangeError("The buffer of view has different capacity than byobRequest")}if(n.bytesFilled+r.byteLength>n.byteLength){throw new RangeError("The region specified by view is larger than byobRequest")}const i=r.byteLength;n.buffer=TransferArrayBuffer(r.buffer);ReadableByteStreamControllerRespondInternal(t,i)}function SetUpReadableByteStreamController(t,r,n,s,i,o,a){r._controlledReadableByteStream=t;r._pullAgain=false;r._pulling=false;r._byobRequest=null;r._queue=r._queueTotalSize=undefined;ResetQueue(r);r._closeRequested=false;r._started=false;r._strategyHWM=o;r._pullAlgorithm=s;r._cancelAlgorithm=i;r._autoAllocateChunkSize=a;r._pendingPullIntos=new SimpleQueue;t._readableStreamController=r;const l=n();uponPromise(promiseResolvedWith(l),(()=>{r._started=true;ReadableByteStreamControllerCallPullIfNeeded(r);return null}),(t=>{ReadableByteStreamControllerError(r,t);return null}))}function SetUpReadableByteStreamControllerFromUnderlyingSource(t,r,n){const s=Object.create(ReadableByteStreamController.prototype);let i;let o;let a;if(r.start!==undefined){i=()=>r.start(s)}else{i=()=>undefined}if(r.pull!==undefined){o=()=>r.pull(s)}else{o=()=>promiseResolvedWith(undefined)}if(r.cancel!==undefined){a=t=>r.cancel(t)}else{a=()=>promiseResolvedWith(undefined)}const l=r.autoAllocateChunkSize;if(l===0){throw new TypeError("autoAllocateChunkSize must be greater than 0")}SetUpReadableByteStreamController(t,s,i,o,a,n,l)}function SetUpReadableStreamBYOBRequest(t,r,n){t._associatedReadableByteStreamController=r;t._view=n}function byobRequestBrandCheckException(t){return new TypeError(`ReadableStreamBYOBRequest.prototype.${t} can only be used on a ReadableStreamBYOBRequest`)}function byteStreamControllerBrandCheckException(t){return new TypeError(`ReadableByteStreamController.prototype.${t} can only be used on a ReadableByteStreamController`)}function convertReaderOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.mode;return{mode:n===undefined?undefined:convertReadableStreamReaderMode(n,`${r} has member 'mode' that`)}}function convertReadableStreamReaderMode(t,r){t=`${t}`;if(t!=="byob"){throw new TypeError(`${r} '${t}' is not a valid enumeration value for ReadableStreamReaderMode`)}return t}function convertByobReadOptions(t,r){var n;assertDictionary(t,r);const s=(n=t===null||t===void 0?void 0:t.min)!==null&&n!==void 0?n:1;return{min:convertUnsignedLongLongWithEnforceRange(s,`${r} has member 'min' that`)}}function AcquireReadableStreamBYOBReader(t){return new ReadableStreamBYOBReader(t)}function ReadableStreamAddReadIntoRequest(t,r){t._reader._readIntoRequests.push(r)}function ReadableStreamFulfillReadIntoRequest(t,r,n){const s=t._reader;const i=s._readIntoRequests.shift();if(n){i._closeSteps(r)}else{i._chunkSteps(r)}}function ReadableStreamGetNumReadIntoRequests(t){return t._reader._readIntoRequests.length}function ReadableStreamHasBYOBReader(t){const r=t._reader;if(r===undefined){return false}if(!IsReadableStreamBYOBReader(r)){return false}return true}class ReadableStreamBYOBReader{constructor(t){assertRequiredArgument(t,1,"ReadableStreamBYOBReader");assertReadableStream(t,"First parameter");if(IsReadableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive reading by another reader")}if(!IsReadableByteStreamController(t._readableStreamController)){throw new TypeError("Cannot construct a ReadableStreamBYOBReader for a stream not constructed with a byte "+"source")}ReadableStreamReaderGenericInitialize(this,t);this._readIntoRequests=new SimpleQueue}get closed(){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("closed"))}return this._closedPromise}cancel(t=undefined){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("cancel"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("cancel"))}return ReadableStreamReaderGenericCancel(this,t)}read(t,r={}){if(!IsReadableStreamBYOBReader(this)){return promiseRejectedWith(byobReaderBrandCheckException("read"))}if(!ArrayBuffer.isView(t)){return promiseRejectedWith(new TypeError("view must be an array buffer view"))}if(t.byteLength===0){return promiseRejectedWith(new TypeError("view must have non-zero byteLength"))}if(t.buffer.byteLength===0){return promiseRejectedWith(new TypeError(`view's buffer must have non-zero byteLength`))}if(IsDetachedBuffer(t.buffer)){return promiseRejectedWith(new TypeError("view's buffer has been detached"))}let n;try{n=convertByobReadOptions(r,"options")}catch(t){return promiseRejectedWith(t)}const s=n.min;if(s===0){return promiseRejectedWith(new TypeError("options.min must be greater than 0"))}if(!isDataView(t)){if(s>t.length){return promiseRejectedWith(new RangeError("options.min must be less than or equal to view's length"))}}else if(s>t.byteLength){return promiseRejectedWith(new RangeError("options.min must be less than or equal to view's byteLength"))}if(this._ownerReadableStream===undefined){return promiseRejectedWith(readerLockException("read from"))}let i;let o;const a=newPromise(((t,r)=>{i=t;o=r}));const l={_chunkSteps:t=>i({value:t,done:false}),_closeSteps:t=>i({value:t,done:true}),_errorSteps:t=>o(t)};ReadableStreamBYOBReaderRead(this,t,s,l);return a}releaseLock(){if(!IsReadableStreamBYOBReader(this)){throw byobReaderBrandCheckException("releaseLock")}if(this._ownerReadableStream===undefined){return}ReadableStreamBYOBReaderRelease(this)}}Object.defineProperties(ReadableStreamBYOBReader.prototype,{cancel:{enumerable:true},read:{enumerable:true},releaseLock:{enumerable:true},closed:{enumerable:true}});setFunctionName(ReadableStreamBYOBReader.prototype.cancel,"cancel");setFunctionName(ReadableStreamBYOBReader.prototype.read,"read");setFunctionName(ReadableStreamBYOBReader.prototype.releaseLock,"releaseLock");if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamBYOBReader.prototype,r.toStringTag,{value:"ReadableStreamBYOBReader",configurable:true})}function IsReadableStreamBYOBReader(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readIntoRequests")){return false}return t instanceof ReadableStreamBYOBReader}function ReadableStreamBYOBReaderRead(t,r,n,s){const i=t._ownerReadableStream;i._disturbed=true;if(i._state==="errored"){s._errorSteps(i._storedError)}else{ReadableByteStreamControllerPullInto(i._readableStreamController,r,n,s)}}function ReadableStreamBYOBReaderRelease(t){ReadableStreamReaderGenericRelease(t);const r=new TypeError("Reader was released");ReadableStreamBYOBReaderErrorReadIntoRequests(t,r)}function ReadableStreamBYOBReaderErrorReadIntoRequests(t,r){const n=t._readIntoRequests;t._readIntoRequests=new SimpleQueue;n.forEach((t=>{t._errorSteps(r)}))}function byobReaderBrandCheckException(t){return new TypeError(`ReadableStreamBYOBReader.prototype.${t} can only be used on a ReadableStreamBYOBReader`)}function ExtractHighWaterMark(t,r){const{highWaterMark:n}=t;if(n===undefined){return r}if(b(n)||n<0){throw new RangeError("Invalid highWaterMark")}return n}function ExtractSizeAlgorithm(t){const{size:r}=t;if(!r){return()=>1}return r}function convertQueuingStrategy(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.highWaterMark;const s=t===null||t===void 0?void 0:t.size;return{highWaterMark:n===undefined?undefined:convertUnrestrictedDouble(n),size:s===undefined?undefined:convertQueuingStrategySize(s,`${r} has member 'size' that`)}}function convertQueuingStrategySize(t,r){assertFunction(t,r);return r=>convertUnrestrictedDouble(t(r))}function convertUnderlyingSink(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.abort;const s=t===null||t===void 0?void 0:t.close;const i=t===null||t===void 0?void 0:t.start;const o=t===null||t===void 0?void 0:t.type;const a=t===null||t===void 0?void 0:t.write;return{abort:n===undefined?undefined:convertUnderlyingSinkAbortCallback(n,t,`${r} has member 'abort' that`),close:s===undefined?undefined:convertUnderlyingSinkCloseCallback(s,t,`${r} has member 'close' that`),start:i===undefined?undefined:convertUnderlyingSinkStartCallback(i,t,`${r} has member 'start' that`),write:a===undefined?undefined:convertUnderlyingSinkWriteCallback(a,t,`${r} has member 'write' that`),type:o}}function convertUnderlyingSinkAbortCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSinkCloseCallback(t,r,n){assertFunction(t,n);return()=>promiseCall(t,r,[])}function convertUnderlyingSinkStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertUnderlyingSinkWriteCallback(t,r,n){assertFunction(t,n);return(n,s)=>promiseCall(t,r,[n,s])}function assertWritableStream(t,r){if(!IsWritableStream(t)){throw new TypeError(`${r} is not a WritableStream.`)}}function isAbortSignal(t){if(typeof t!=="object"||t===null){return false}try{return typeof t.aborted==="boolean"}catch(t){return false}}const _=typeof AbortController==="function";function createAbortController(){if(_){return new AbortController}return undefined}class WritableStream{constructor(t={},r={}){if(t===undefined){t=null}else{assertObject(t,"First parameter")}const n=convertQueuingStrategy(r,"Second parameter");const s=convertUnderlyingSink(t,"First parameter");InitializeWritableStream(this);const i=s.type;if(i!==undefined){throw new RangeError("Invalid type is specified")}const o=ExtractSizeAlgorithm(n);const a=ExtractHighWaterMark(n,1);SetUpWritableStreamDefaultControllerFromUnderlyingSink(this,s,a,o)}get locked(){if(!IsWritableStream(this)){throw streamBrandCheckException$2("locked")}return IsWritableStreamLocked(this)}abort(t=undefined){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException$2("abort"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot abort a stream that already has a writer"))}return WritableStreamAbort(this,t)}close(){if(!IsWritableStream(this)){return promiseRejectedWith(streamBrandCheckException$2("close"))}if(IsWritableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot close a stream that already has a writer"))}if(WritableStreamCloseQueuedOrInFlight(this)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamClose(this)}getWriter(){if(!IsWritableStream(this)){throw streamBrandCheckException$2("getWriter")}return AcquireWritableStreamDefaultWriter(this)}}Object.defineProperties(WritableStream.prototype,{abort:{enumerable:true},close:{enumerable:true},getWriter:{enumerable:true},locked:{enumerable:true}});setFunctionName(WritableStream.prototype.abort,"abort");setFunctionName(WritableStream.prototype.close,"close");setFunctionName(WritableStream.prototype.getWriter,"getWriter");if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStream.prototype,r.toStringTag,{value:"WritableStream",configurable:true})}function AcquireWritableStreamDefaultWriter(t){return new WritableStreamDefaultWriter(t)}function CreateWritableStream(t,r,n,s,i=1,o=(()=>1)){const a=Object.create(WritableStream.prototype);InitializeWritableStream(a);const l=Object.create(WritableStreamDefaultController.prototype);SetUpWritableStreamDefaultController(a,l,t,r,n,s,i,o);return a}function InitializeWritableStream(t){t._state="writable";t._storedError=undefined;t._writer=undefined;t._writableStreamController=undefined;t._writeRequests=new SimpleQueue;t._inFlightWriteRequest=undefined;t._closeRequest=undefined;t._inFlightCloseRequest=undefined;t._pendingAbortRequest=undefined;t._backpressure=false}function IsWritableStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_writableStreamController")){return false}return t instanceof WritableStream}function IsWritableStreamLocked(t){if(t._writer===undefined){return false}return true}function WritableStreamAbort(t,r){var n;if(t._state==="closed"||t._state==="errored"){return promiseResolvedWith(undefined)}t._writableStreamController._abortReason=r;(n=t._writableStreamController._abortController)===null||n===void 0?void 0:n.abort(r);const s=t._state;if(s==="closed"||s==="errored"){return promiseResolvedWith(undefined)}if(t._pendingAbortRequest!==undefined){return t._pendingAbortRequest._promise}let i=false;if(s==="erroring"){i=true;r=undefined}const o=newPromise(((n,s)=>{t._pendingAbortRequest={_promise:undefined,_resolve:n,_reject:s,_reason:r,_wasAlreadyErroring:i}}));t._pendingAbortRequest._promise=o;if(!i){WritableStreamStartErroring(t,r)}return o}function WritableStreamClose(t){const r=t._state;if(r==="closed"||r==="errored"){return promiseRejectedWith(new TypeError(`The stream (in ${r} state) is not in the writable state and cannot be closed`))}const n=newPromise(((r,n)=>{const s={_resolve:r,_reject:n};t._closeRequest=s}));const s=t._writer;if(s!==undefined&&t._backpressure&&r==="writable"){defaultWriterReadyPromiseResolve(s)}WritableStreamDefaultControllerClose(t._writableStreamController);return n}function WritableStreamAddWriteRequest(t){const r=newPromise(((r,n)=>{const s={_resolve:r,_reject:n};t._writeRequests.push(s)}));return r}function WritableStreamDealWithRejection(t,r){const n=t._state;if(n==="writable"){WritableStreamStartErroring(t,r);return}WritableStreamFinishErroring(t)}function WritableStreamStartErroring(t,r){const n=t._writableStreamController;t._state="erroring";t._storedError=r;const s=t._writer;if(s!==undefined){WritableStreamDefaultWriterEnsureReadyPromiseRejected(s,r)}if(!WritableStreamHasOperationMarkedInFlight(t)&&n._started){WritableStreamFinishErroring(t)}}function WritableStreamFinishErroring(t){t._state="errored";t._writableStreamController[c]();const r=t._storedError;t._writeRequests.forEach((t=>{t._reject(r)}));t._writeRequests=new SimpleQueue;if(t._pendingAbortRequest===undefined){WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return}const n=t._pendingAbortRequest;t._pendingAbortRequest=undefined;if(n._wasAlreadyErroring){n._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return}const s=t._writableStreamController[l](n._reason);uponPromise(s,(()=>{n._resolve();WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return null}),(r=>{n._reject(r);WritableStreamRejectCloseAndClosedPromiseIfNeeded(t);return null}))}function WritableStreamFinishInFlightWrite(t){t._inFlightWriteRequest._resolve(undefined);t._inFlightWriteRequest=undefined}function WritableStreamFinishInFlightWriteWithError(t,r){t._inFlightWriteRequest._reject(r);t._inFlightWriteRequest=undefined;WritableStreamDealWithRejection(t,r)}function WritableStreamFinishInFlightClose(t){t._inFlightCloseRequest._resolve(undefined);t._inFlightCloseRequest=undefined;const r=t._state;if(r==="erroring"){t._storedError=undefined;if(t._pendingAbortRequest!==undefined){t._pendingAbortRequest._resolve();t._pendingAbortRequest=undefined}}t._state="closed";const n=t._writer;if(n!==undefined){defaultWriterClosedPromiseResolve(n)}}function WritableStreamFinishInFlightCloseWithError(t,r){t._inFlightCloseRequest._reject(r);t._inFlightCloseRequest=undefined;if(t._pendingAbortRequest!==undefined){t._pendingAbortRequest._reject(r);t._pendingAbortRequest=undefined}WritableStreamDealWithRejection(t,r)}function WritableStreamCloseQueuedOrInFlight(t){if(t._closeRequest===undefined&&t._inFlightCloseRequest===undefined){return false}return true}function WritableStreamHasOperationMarkedInFlight(t){if(t._inFlightWriteRequest===undefined&&t._inFlightCloseRequest===undefined){return false}return true}function WritableStreamMarkCloseRequestInFlight(t){t._inFlightCloseRequest=t._closeRequest;t._closeRequest=undefined}function WritableStreamMarkFirstWriteRequestInFlight(t){t._inFlightWriteRequest=t._writeRequests.shift()}function WritableStreamRejectCloseAndClosedPromiseIfNeeded(t){if(t._closeRequest!==undefined){t._closeRequest._reject(t._storedError);t._closeRequest=undefined}const r=t._writer;if(r!==undefined){defaultWriterClosedPromiseReject(r,t._storedError)}}function WritableStreamUpdateBackpressure(t,r){const n=t._writer;if(n!==undefined&&r!==t._backpressure){if(r){defaultWriterReadyPromiseReset(n)}else{defaultWriterReadyPromiseResolve(n)}}t._backpressure=r}class WritableStreamDefaultWriter{constructor(t){assertRequiredArgument(t,1,"WritableStreamDefaultWriter");assertWritableStream(t,"First parameter");if(IsWritableStreamLocked(t)){throw new TypeError("This stream has already been locked for exclusive writing by another writer")}this._ownerWritableStream=t;t._writer=this;const r=t._state;if(r==="writable"){if(!WritableStreamCloseQueuedOrInFlight(t)&&t._backpressure){defaultWriterReadyPromiseInitialize(this)}else{defaultWriterReadyPromiseInitializeAsResolved(this)}defaultWriterClosedPromiseInitialize(this)}else if(r==="erroring"){defaultWriterReadyPromiseInitializeAsRejected(this,t._storedError);defaultWriterClosedPromiseInitialize(this)}else if(r==="closed"){defaultWriterReadyPromiseInitializeAsResolved(this);defaultWriterClosedPromiseInitializeAsResolved(this)}else{const r=t._storedError;defaultWriterReadyPromiseInitializeAsRejected(this,r);defaultWriterClosedPromiseInitializeAsRejected(this,r)}}get closed(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("closed"))}return this._closedPromise}get desiredSize(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("desiredSize")}if(this._ownerWritableStream===undefined){throw defaultWriterLockException("desiredSize")}return WritableStreamDefaultWriterGetDesiredSize(this)}get ready(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("ready"))}return this._readyPromise}abort(t=undefined){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("abort"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("abort"))}return WritableStreamDefaultWriterAbort(this,t)}close(){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("close"))}const t=this._ownerWritableStream;if(t===undefined){return promiseRejectedWith(defaultWriterLockException("close"))}if(WritableStreamCloseQueuedOrInFlight(t)){return promiseRejectedWith(new TypeError("Cannot close an already-closing stream"))}return WritableStreamDefaultWriterClose(this)}releaseLock(){if(!IsWritableStreamDefaultWriter(this)){throw defaultWriterBrandCheckException("releaseLock")}const t=this._ownerWritableStream;if(t===undefined){return}WritableStreamDefaultWriterRelease(this)}write(t=undefined){if(!IsWritableStreamDefaultWriter(this)){return promiseRejectedWith(defaultWriterBrandCheckException("write"))}if(this._ownerWritableStream===undefined){return promiseRejectedWith(defaultWriterLockException("write to"))}return WritableStreamDefaultWriterWrite(this,t)}}Object.defineProperties(WritableStreamDefaultWriter.prototype,{abort:{enumerable:true},close:{enumerable:true},releaseLock:{enumerable:true},write:{enumerable:true},closed:{enumerable:true},desiredSize:{enumerable:true},ready:{enumerable:true}});setFunctionName(WritableStreamDefaultWriter.prototype.abort,"abort");setFunctionName(WritableStreamDefaultWriter.prototype.close,"close");setFunctionName(WritableStreamDefaultWriter.prototype.releaseLock,"releaseLock");setFunctionName(WritableStreamDefaultWriter.prototype.write,"write");if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultWriter.prototype,r.toStringTag,{value:"WritableStreamDefaultWriter",configurable:true})}function IsWritableStreamDefaultWriter(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_ownerWritableStream")){return false}return t instanceof WritableStreamDefaultWriter}function WritableStreamDefaultWriterAbort(t,r){const n=t._ownerWritableStream;return WritableStreamAbort(n,r)}function WritableStreamDefaultWriterClose(t){const r=t._ownerWritableStream;return WritableStreamClose(r)}function WritableStreamDefaultWriterCloseWithErrorPropagation(t){const r=t._ownerWritableStream;const n=r._state;if(WritableStreamCloseQueuedOrInFlight(r)||n==="closed"){return promiseResolvedWith(undefined)}if(n==="errored"){return promiseRejectedWith(r._storedError)}return WritableStreamDefaultWriterClose(t)}function WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,r){if(t._closedPromiseState==="pending"){defaultWriterClosedPromiseReject(t,r)}else{defaultWriterClosedPromiseResetToRejected(t,r)}}function WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,r){if(t._readyPromiseState==="pending"){defaultWriterReadyPromiseReject(t,r)}else{defaultWriterReadyPromiseResetToRejected(t,r)}}function WritableStreamDefaultWriterGetDesiredSize(t){const r=t._ownerWritableStream;const n=r._state;if(n==="errored"||n==="erroring"){return null}if(n==="closed"){return 0}return WritableStreamDefaultControllerGetDesiredSize(r._writableStreamController)}function WritableStreamDefaultWriterRelease(t){const r=t._ownerWritableStream;const n=new TypeError(`Writer was released and can no longer be used to monitor the stream's closedness`);WritableStreamDefaultWriterEnsureReadyPromiseRejected(t,n);WritableStreamDefaultWriterEnsureClosedPromiseRejected(t,n);r._writer=undefined;t._ownerWritableStream=undefined}function WritableStreamDefaultWriterWrite(t,r){const n=t._ownerWritableStream;const s=n._writableStreamController;const i=WritableStreamDefaultControllerGetChunkSize(s,r);if(n!==t._ownerWritableStream){return promiseRejectedWith(defaultWriterLockException("write to"))}const o=n._state;if(o==="errored"){return promiseRejectedWith(n._storedError)}if(WritableStreamCloseQueuedOrInFlight(n)||o==="closed"){return promiseRejectedWith(new TypeError("The stream is closing or closed and cannot be written to"))}if(o==="erroring"){return promiseRejectedWith(n._storedError)}const a=WritableStreamAddWriteRequest(n);WritableStreamDefaultControllerWrite(s,r,i);return a}const S={};class WritableStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get abortReason(){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("abortReason")}return this._abortReason}get signal(){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("signal")}if(this._abortController===undefined){throw new TypeError("WritableStreamDefaultController.prototype.signal is not supported")}return this._abortController.signal}error(t=undefined){if(!IsWritableStreamDefaultController(this)){throw defaultControllerBrandCheckException$2("error")}const r=this._controlledWritableStream._state;if(r!=="writable"){return}WritableStreamDefaultControllerError(this,t)}[l](t){const r=this._abortAlgorithm(t);WritableStreamDefaultControllerClearAlgorithms(this);return r}[c](){ResetQueue(this)}}Object.defineProperties(WritableStreamDefaultController.prototype,{abortReason:{enumerable:true},signal:{enumerable:true},error:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(WritableStreamDefaultController.prototype,r.toStringTag,{value:"WritableStreamDefaultController",configurable:true})}function IsWritableStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledWritableStream")){return false}return t instanceof WritableStreamDefaultController}function SetUpWritableStreamDefaultController(t,r,n,s,i,o,a,l){r._controlledWritableStream=t;t._writableStreamController=r;r._queue=undefined;r._queueTotalSize=undefined;ResetQueue(r);r._abortReason=undefined;r._abortController=createAbortController();r._started=false;r._strategySizeAlgorithm=l;r._strategyHWM=a;r._writeAlgorithm=s;r._closeAlgorithm=i;r._abortAlgorithm=o;const c=WritableStreamDefaultControllerGetBackpressure(r);WritableStreamUpdateBackpressure(t,c);const u=n();const d=promiseResolvedWith(u);uponPromise(d,(()=>{r._started=true;WritableStreamDefaultControllerAdvanceQueueIfNeeded(r);return null}),(n=>{r._started=true;WritableStreamDealWithRejection(t,n);return null}))}function SetUpWritableStreamDefaultControllerFromUnderlyingSink(t,r,n,s){const i=Object.create(WritableStreamDefaultController.prototype);let o;let a;let l;let c;if(r.start!==undefined){o=()=>r.start(i)}else{o=()=>undefined}if(r.write!==undefined){a=t=>r.write(t,i)}else{a=()=>promiseResolvedWith(undefined)}if(r.close!==undefined){l=()=>r.close()}else{l=()=>promiseResolvedWith(undefined)}if(r.abort!==undefined){c=t=>r.abort(t)}else{c=()=>promiseResolvedWith(undefined)}SetUpWritableStreamDefaultController(t,i,o,a,l,c,n,s)}function WritableStreamDefaultControllerClearAlgorithms(t){t._writeAlgorithm=undefined;t._closeAlgorithm=undefined;t._abortAlgorithm=undefined;t._strategySizeAlgorithm=undefined}function WritableStreamDefaultControllerClose(t){EnqueueValueWithSize(t,S,0);WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}function WritableStreamDefaultControllerGetChunkSize(t,r){try{return t._strategySizeAlgorithm(r)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return 1}}function WritableStreamDefaultControllerGetDesiredSize(t){return t._strategyHWM-t._queueTotalSize}function WritableStreamDefaultControllerWrite(t,r,n){try{EnqueueValueWithSize(t,r,n)}catch(r){WritableStreamDefaultControllerErrorIfNeeded(t,r);return}const s=t._controlledWritableStream;if(!WritableStreamCloseQueuedOrInFlight(s)&&s._state==="writable"){const r=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(s,r)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t)}function WritableStreamDefaultControllerAdvanceQueueIfNeeded(t){const r=t._controlledWritableStream;if(!t._started){return}if(r._inFlightWriteRequest!==undefined){return}const n=r._state;if(n==="erroring"){WritableStreamFinishErroring(r);return}if(t._queue.length===0){return}const s=PeekQueueValue(t);if(s===S){WritableStreamDefaultControllerProcessClose(t)}else{WritableStreamDefaultControllerProcessWrite(t,s)}}function WritableStreamDefaultControllerErrorIfNeeded(t,r){if(t._controlledWritableStream._state==="writable"){WritableStreamDefaultControllerError(t,r)}}function WritableStreamDefaultControllerProcessClose(t){const r=t._controlledWritableStream;WritableStreamMarkCloseRequestInFlight(r);DequeueValue(t);const n=t._closeAlgorithm();WritableStreamDefaultControllerClearAlgorithms(t);uponPromise(n,(()=>{WritableStreamFinishInFlightClose(r);return null}),(t=>{WritableStreamFinishInFlightCloseWithError(r,t);return null}))}function WritableStreamDefaultControllerProcessWrite(t,r){const n=t._controlledWritableStream;WritableStreamMarkFirstWriteRequestInFlight(n);const s=t._writeAlgorithm(r);uponPromise(s,(()=>{WritableStreamFinishInFlightWrite(n);const r=n._state;DequeueValue(t);if(!WritableStreamCloseQueuedOrInFlight(n)&&r==="writable"){const r=WritableStreamDefaultControllerGetBackpressure(t);WritableStreamUpdateBackpressure(n,r)}WritableStreamDefaultControllerAdvanceQueueIfNeeded(t);return null}),(r=>{if(n._state==="writable"){WritableStreamDefaultControllerClearAlgorithms(t)}WritableStreamFinishInFlightWriteWithError(n,r);return null}))}function WritableStreamDefaultControllerGetBackpressure(t){const r=WritableStreamDefaultControllerGetDesiredSize(t);return r<=0}function WritableStreamDefaultControllerError(t,r){const n=t._controlledWritableStream;WritableStreamDefaultControllerClearAlgorithms(t);WritableStreamStartErroring(n,r)}function streamBrandCheckException$2(t){return new TypeError(`WritableStream.prototype.${t} can only be used on a WritableStream`)}function defaultControllerBrandCheckException$2(t){return new TypeError(`WritableStreamDefaultController.prototype.${t} can only be used on a WritableStreamDefaultController`)}function defaultWriterBrandCheckException(t){return new TypeError(`WritableStreamDefaultWriter.prototype.${t} can only be used on a WritableStreamDefaultWriter`)}function defaultWriterLockException(t){return new TypeError("Cannot "+t+" a stream using a released writer")}function defaultWriterClosedPromiseInitialize(t){t._closedPromise=newPromise(((r,n)=>{t._closedPromise_resolve=r;t._closedPromise_reject=n;t._closedPromiseState="pending"}))}function defaultWriterClosedPromiseInitializeAsRejected(t,r){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseReject(t,r)}function defaultWriterClosedPromiseInitializeAsResolved(t){defaultWriterClosedPromiseInitialize(t);defaultWriterClosedPromiseResolve(t)}function defaultWriterClosedPromiseReject(t,r){if(t._closedPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._closedPromise);t._closedPromise_reject(r);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined;t._closedPromiseState="rejected"}function defaultWriterClosedPromiseResetToRejected(t,r){defaultWriterClosedPromiseInitializeAsRejected(t,r)}function defaultWriterClosedPromiseResolve(t){if(t._closedPromise_resolve===undefined){return}t._closedPromise_resolve(undefined);t._closedPromise_resolve=undefined;t._closedPromise_reject=undefined;t._closedPromiseState="resolved"}function defaultWriterReadyPromiseInitialize(t){t._readyPromise=newPromise(((r,n)=>{t._readyPromise_resolve=r;t._readyPromise_reject=n}));t._readyPromiseState="pending"}function defaultWriterReadyPromiseInitializeAsRejected(t,r){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseReject(t,r)}function defaultWriterReadyPromiseInitializeAsResolved(t){defaultWriterReadyPromiseInitialize(t);defaultWriterReadyPromiseResolve(t)}function defaultWriterReadyPromiseReject(t,r){if(t._readyPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._readyPromise);t._readyPromise_reject(r);t._readyPromise_resolve=undefined;t._readyPromise_reject=undefined;t._readyPromiseState="rejected"}function defaultWriterReadyPromiseReset(t){defaultWriterReadyPromiseInitialize(t)}function defaultWriterReadyPromiseResetToRejected(t,r){defaultWriterReadyPromiseInitializeAsRejected(t,r)}function defaultWriterReadyPromiseResolve(t){if(t._readyPromise_resolve===undefined){return}t._readyPromise_resolve(undefined);t._readyPromise_resolve=undefined;t._readyPromise_reject=undefined;t._readyPromiseState="fulfilled"}function getGlobals(){if(typeof globalThis!=="undefined"){return globalThis}else if(typeof self!=="undefined"){return self}else if(typeof global!=="undefined"){return global}return undefined}const E=getGlobals();function isDOMExceptionConstructor(t){if(!(typeof t==="function"||typeof t==="object")){return false}if(t.name!=="DOMException"){return false}try{new t;return true}catch(t){return false}}function getFromGlobal(){const t=E===null||E===void 0?void 0:E.DOMException;return isDOMExceptionConstructor(t)?t:undefined}function createPolyfill(){const t=function DOMException(t,r){this.message=t||"";this.name=r||"Error";if(Error.captureStackTrace){Error.captureStackTrace(this,this.constructor)}};setFunctionName(t,"DOMException");t.prototype=Object.create(Error.prototype);Object.defineProperty(t.prototype,"constructor",{value:t,writable:true,configurable:true});return t}const v=getFromGlobal()||createPolyfill();function ReadableStreamPipeTo(t,r,n,s,i,o){const a=AcquireReadableStreamDefaultReader(t);const l=AcquireWritableStreamDefaultWriter(r);t._disturbed=true;let c=false;let u=promiseResolvedWith(undefined);return newPromise(((d,p)=>{let h;if(o!==undefined){h=()=>{const n=o.reason!==undefined?o.reason:new v("Aborted","AbortError");const a=[];if(!s){a.push((()=>{if(r._state==="writable"){return WritableStreamAbort(r,n)}return promiseResolvedWith(undefined)}))}if(!i){a.push((()=>{if(t._state==="readable"){return ReadableStreamCancel(t,n)}return promiseResolvedWith(undefined)}))}shutdownWithAction((()=>Promise.all(a.map((t=>t())))),true,n)};if(o.aborted){h();return}o.addEventListener("abort",h)}function pipeLoop(){return newPromise(((t,r)=>{function next(n){if(n){t()}else{PerformPromiseThen(pipeStep(),next,r)}}next(false)}))}function pipeStep(){if(c){return promiseResolvedWith(true)}return PerformPromiseThen(l._readyPromise,(()=>newPromise(((t,r)=>{ReadableStreamDefaultReaderRead(a,{_chunkSteps:r=>{u=PerformPromiseThen(WritableStreamDefaultWriterWrite(l,r),undefined,noop);t(false)},_closeSteps:()=>t(true),_errorSteps:r})}))))}isOrBecomesErrored(t,a._closedPromise,(t=>{if(!s){shutdownWithAction((()=>WritableStreamAbort(r,t)),true,t)}else{shutdown(true,t)}return null}));isOrBecomesErrored(r,l._closedPromise,(r=>{if(!i){shutdownWithAction((()=>ReadableStreamCancel(t,r)),true,r)}else{shutdown(true,r)}return null}));isOrBecomesClosed(t,a._closedPromise,(()=>{if(!n){shutdownWithAction((()=>WritableStreamDefaultWriterCloseWithErrorPropagation(l)))}else{shutdown()}return null}));if(WritableStreamCloseQueuedOrInFlight(r)||r._state==="closed"){const r=new TypeError("the destination writable stream closed before all data could be piped to it");if(!i){shutdownWithAction((()=>ReadableStreamCancel(t,r)),true,r)}else{shutdown(true,r)}}setPromiseIsHandledToTrue(pipeLoop());function waitForWritesToFinish(){const t=u;return PerformPromiseThen(u,(()=>t!==u?waitForWritesToFinish():undefined))}function isOrBecomesErrored(t,r,n){if(t._state==="errored"){n(t._storedError)}else{uponRejection(r,n)}}function isOrBecomesClosed(t,r,n){if(t._state==="closed"){n()}else{uponFulfillment(r,n)}}function shutdownWithAction(t,n,s){if(c){return}c=true;if(r._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(r)){uponFulfillment(waitForWritesToFinish(),doTheRest)}else{doTheRest()}function doTheRest(){uponPromise(t(),(()=>finalize(n,s)),(t=>finalize(true,t)));return null}}function shutdown(t,n){if(c){return}c=true;if(r._state==="writable"&&!WritableStreamCloseQueuedOrInFlight(r)){uponFulfillment(waitForWritesToFinish(),(()=>finalize(t,n)))}else{finalize(t,n)}}function finalize(t,r){WritableStreamDefaultWriterRelease(l);ReadableStreamReaderGenericRelease(a);if(o!==undefined){o.removeEventListener("abort",h)}if(t){p(r)}else{d(undefined)}return null}}))}class ReadableStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("desiredSize")}return ReadableStreamDefaultControllerGetDesiredSize(this)}close(){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("close")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits close")}ReadableStreamDefaultControllerClose(this)}enqueue(t=undefined){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("enqueue")}if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(this)){throw new TypeError("The stream is not in a state that permits enqueue")}return ReadableStreamDefaultControllerEnqueue(this,t)}error(t=undefined){if(!IsReadableStreamDefaultController(this)){throw defaultControllerBrandCheckException$1("error")}ReadableStreamDefaultControllerError(this,t)}[u](t){ResetQueue(this);const r=this._cancelAlgorithm(t);ReadableStreamDefaultControllerClearAlgorithms(this);return r}[d](t){const r=this._controlledReadableStream;if(this._queue.length>0){const n=DequeueValue(this);if(this._closeRequested&&this._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(this);ReadableStreamClose(r)}else{ReadableStreamDefaultControllerCallPullIfNeeded(this)}t._chunkSteps(n)}else{ReadableStreamAddReadRequest(r,t);ReadableStreamDefaultControllerCallPullIfNeeded(this)}}[p](){}}Object.defineProperties(ReadableStreamDefaultController.prototype,{close:{enumerable:true},enqueue:{enumerable:true},error:{enumerable:true},desiredSize:{enumerable:true}});setFunctionName(ReadableStreamDefaultController.prototype.close,"close");setFunctionName(ReadableStreamDefaultController.prototype.enqueue,"enqueue");setFunctionName(ReadableStreamDefaultController.prototype.error,"error");if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStreamDefaultController.prototype,r.toStringTag,{value:"ReadableStreamDefaultController",configurable:true})}function IsReadableStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledReadableStream")){return false}return t instanceof ReadableStreamDefaultController}function ReadableStreamDefaultControllerCallPullIfNeeded(t){const r=ReadableStreamDefaultControllerShouldCallPull(t);if(!r){return}if(t._pulling){t._pullAgain=true;return}t._pulling=true;const n=t._pullAlgorithm();uponPromise(n,(()=>{t._pulling=false;if(t._pullAgain){t._pullAgain=false;ReadableStreamDefaultControllerCallPullIfNeeded(t)}return null}),(r=>{ReadableStreamDefaultControllerError(t,r);return null}))}function ReadableStreamDefaultControllerShouldCallPull(t){const r=t._controlledReadableStream;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return false}if(!t._started){return false}if(IsReadableStreamLocked(r)&&ReadableStreamGetNumReadRequests(r)>0){return true}const n=ReadableStreamDefaultControllerGetDesiredSize(t);if(n>0){return true}return false}function ReadableStreamDefaultControllerClearAlgorithms(t){t._pullAlgorithm=undefined;t._cancelAlgorithm=undefined;t._strategySizeAlgorithm=undefined}function ReadableStreamDefaultControllerClose(t){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return}const r=t._controlledReadableStream;t._closeRequested=true;if(t._queue.length===0){ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamClose(r)}}function ReadableStreamDefaultControllerEnqueue(t,r){if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(t)){return}const n=t._controlledReadableStream;if(IsReadableStreamLocked(n)&&ReadableStreamGetNumReadRequests(n)>0){ReadableStreamFulfillReadRequest(n,r,false)}else{let n;try{n=t._strategySizeAlgorithm(r)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}try{EnqueueValueWithSize(t,r,n)}catch(r){ReadableStreamDefaultControllerError(t,r);throw r}}ReadableStreamDefaultControllerCallPullIfNeeded(t)}function ReadableStreamDefaultControllerError(t,r){const n=t._controlledReadableStream;if(n._state!=="readable"){return}ResetQueue(t);ReadableStreamDefaultControllerClearAlgorithms(t);ReadableStreamError(n,r)}function ReadableStreamDefaultControllerGetDesiredSize(t){const r=t._controlledReadableStream._state;if(r==="errored"){return null}if(r==="closed"){return 0}return t._strategyHWM-t._queueTotalSize}function ReadableStreamDefaultControllerHasBackpressure(t){if(ReadableStreamDefaultControllerShouldCallPull(t)){return false}return true}function ReadableStreamDefaultControllerCanCloseOrEnqueue(t){const r=t._controlledReadableStream._state;if(!t._closeRequested&&r==="readable"){return true}return false}function SetUpReadableStreamDefaultController(t,r,n,s,i,o,a){r._controlledReadableStream=t;r._queue=undefined;r._queueTotalSize=undefined;ResetQueue(r);r._started=false;r._closeRequested=false;r._pullAgain=false;r._pulling=false;r._strategySizeAlgorithm=a;r._strategyHWM=o;r._pullAlgorithm=s;r._cancelAlgorithm=i;t._readableStreamController=r;const l=n();uponPromise(promiseResolvedWith(l),(()=>{r._started=true;ReadableStreamDefaultControllerCallPullIfNeeded(r);return null}),(t=>{ReadableStreamDefaultControllerError(r,t);return null}))}function SetUpReadableStreamDefaultControllerFromUnderlyingSource(t,r,n,s){const i=Object.create(ReadableStreamDefaultController.prototype);let o;let a;let l;if(r.start!==undefined){o=()=>r.start(i)}else{o=()=>undefined}if(r.pull!==undefined){a=()=>r.pull(i)}else{a=()=>promiseResolvedWith(undefined)}if(r.cancel!==undefined){l=t=>r.cancel(t)}else{l=()=>promiseResolvedWith(undefined)}SetUpReadableStreamDefaultController(t,i,o,a,l,n,s)}function defaultControllerBrandCheckException$1(t){return new TypeError(`ReadableStreamDefaultController.prototype.${t} can only be used on a ReadableStreamDefaultController`)}function ReadableStreamTee(t,r){if(IsReadableByteStreamController(t._readableStreamController)){return ReadableByteStreamTee(t)}return ReadableStreamDefaultTee(t)}function ReadableStreamDefaultTee(t,r){const n=AcquireReadableStreamDefaultReader(t);let s=false;let i=false;let o=false;let a=false;let l;let c;let u;let d;let p;const h=newPromise((t=>{p=t}));function pullAlgorithm(){if(s){i=true;return promiseResolvedWith(undefined)}s=true;const t={_chunkSteps:t=>{_queueMicrotask((()=>{i=false;const r=t;const n=t;if(!o){ReadableStreamDefaultControllerEnqueue(u._readableStreamController,r)}if(!a){ReadableStreamDefaultControllerEnqueue(d._readableStreamController,n)}s=false;if(i){pullAlgorithm()}}))},_closeSteps:()=>{s=false;if(!o){ReadableStreamDefaultControllerClose(u._readableStreamController)}if(!a){ReadableStreamDefaultControllerClose(d._readableStreamController)}if(!o||!a){p(undefined)}},_errorSteps:()=>{s=false}};ReadableStreamDefaultReaderRead(n,t);return promiseResolvedWith(undefined)}function cancel1Algorithm(r){o=true;l=r;if(a){const r=CreateArrayFromList([l,c]);const n=ReadableStreamCancel(t,r);p(n)}return h}function cancel2Algorithm(r){a=true;c=r;if(o){const r=CreateArrayFromList([l,c]);const n=ReadableStreamCancel(t,r);p(n)}return h}function startAlgorithm(){}u=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel1Algorithm);d=CreateReadableStream(startAlgorithm,pullAlgorithm,cancel2Algorithm);uponRejection(n._closedPromise,(t=>{ReadableStreamDefaultControllerError(u._readableStreamController,t);ReadableStreamDefaultControllerError(d._readableStreamController,t);if(!o||!a){p(undefined)}return null}));return[u,d]}function ReadableByteStreamTee(t){let r=AcquireReadableStreamDefaultReader(t);let n=false;let s=false;let i=false;let o=false;let a=false;let l;let c;let u;let d;let p;const h=newPromise((t=>{p=t}));function forwardReaderError(t){uponRejection(t._closedPromise,(n=>{if(t!==r){return null}ReadableByteStreamControllerError(u._readableStreamController,n);ReadableByteStreamControllerError(d._readableStreamController,n);if(!o||!a){p(undefined)}return null}))}function pullWithDefaultReader(){if(IsReadableStreamBYOBReader(r)){ReadableStreamReaderGenericRelease(r);r=AcquireReadableStreamDefaultReader(t);forwardReaderError(r)}const l={_chunkSteps:r=>{_queueMicrotask((()=>{s=false;i=false;const l=r;let c=r;if(!o&&!a){try{c=CloneAsUint8Array(r)}catch(r){ReadableByteStreamControllerError(u._readableStreamController,r);ReadableByteStreamControllerError(d._readableStreamController,r);p(ReadableStreamCancel(t,r));return}}if(!o){ReadableByteStreamControllerEnqueue(u._readableStreamController,l)}if(!a){ReadableByteStreamControllerEnqueue(d._readableStreamController,c)}n=false;if(s){pull1Algorithm()}else if(i){pull2Algorithm()}}))},_closeSteps:()=>{n=false;if(!o){ReadableByteStreamControllerClose(u._readableStreamController)}if(!a){ReadableByteStreamControllerClose(d._readableStreamController)}if(u._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(u._readableStreamController,0)}if(d._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(d._readableStreamController,0)}if(!o||!a){p(undefined)}},_errorSteps:()=>{n=false}};ReadableStreamDefaultReaderRead(r,l)}function pullWithBYOBReader(l,c){if(IsReadableStreamDefaultReader(r)){ReadableStreamReaderGenericRelease(r);r=AcquireReadableStreamBYOBReader(t);forwardReaderError(r)}const h=c?d:u;const m=c?u:d;const g={_chunkSteps:r=>{_queueMicrotask((()=>{s=false;i=false;const l=c?a:o;const u=c?o:a;if(!u){let n;try{n=CloneAsUint8Array(r)}catch(r){ReadableByteStreamControllerError(h._readableStreamController,r);ReadableByteStreamControllerError(m._readableStreamController,r);p(ReadableStreamCancel(t,r));return}if(!l){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,r)}ReadableByteStreamControllerEnqueue(m._readableStreamController,n)}else if(!l){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,r)}n=false;if(s){pull1Algorithm()}else if(i){pull2Algorithm()}}))},_closeSteps:t=>{n=false;const r=c?a:o;const s=c?o:a;if(!r){ReadableByteStreamControllerClose(h._readableStreamController)}if(!s){ReadableByteStreamControllerClose(m._readableStreamController)}if(t!==undefined){if(!r){ReadableByteStreamControllerRespondWithNewView(h._readableStreamController,t)}if(!s&&m._readableStreamController._pendingPullIntos.length>0){ReadableByteStreamControllerRespond(m._readableStreamController,0)}}if(!r||!s){p(undefined)}},_errorSteps:()=>{n=false}};ReadableStreamBYOBReaderRead(r,l,1,g)}function pull1Algorithm(){if(n){s=true;return promiseResolvedWith(undefined)}n=true;const t=ReadableByteStreamControllerGetBYOBRequest(u._readableStreamController);if(t===null){pullWithDefaultReader()}else{pullWithBYOBReader(t._view,false)}return promiseResolvedWith(undefined)}function pull2Algorithm(){if(n){i=true;return promiseResolvedWith(undefined)}n=true;const t=ReadableByteStreamControllerGetBYOBRequest(d._readableStreamController);if(t===null){pullWithDefaultReader()}else{pullWithBYOBReader(t._view,true)}return promiseResolvedWith(undefined)}function cancel1Algorithm(r){o=true;l=r;if(a){const r=CreateArrayFromList([l,c]);const n=ReadableStreamCancel(t,r);p(n)}return h}function cancel2Algorithm(r){a=true;c=r;if(o){const r=CreateArrayFromList([l,c]);const n=ReadableStreamCancel(t,r);p(n)}return h}function startAlgorithm(){return}u=CreateReadableByteStream(startAlgorithm,pull1Algorithm,cancel1Algorithm);d=CreateReadableByteStream(startAlgorithm,pull2Algorithm,cancel2Algorithm);forwardReaderError(r);return[u,d]}function isReadableStreamLike(t){return typeIsObject(t)&&typeof t.getReader!=="undefined"}function ReadableStreamFrom(t){if(isReadableStreamLike(t)){return ReadableStreamFromDefaultReader(t.getReader())}return ReadableStreamFromIterable(t)}function ReadableStreamFromIterable(t){let r;const n=GetIterator(t,"async");const s=noop;function pullAlgorithm(){let t;try{t=IteratorNext(n)}catch(t){return promiseRejectedWith(t)}const s=promiseResolvedWith(t);return transformPromiseWith(s,(t=>{if(!typeIsObject(t)){throw new TypeError("The promise returned by the iterator.next() method must fulfill with an object")}const n=IteratorComplete(t);if(n){ReadableStreamDefaultControllerClose(r._readableStreamController)}else{const n=IteratorValue(t);ReadableStreamDefaultControllerEnqueue(r._readableStreamController,n)}}))}function cancelAlgorithm(t){const r=n.iterator;let s;try{s=GetMethod(r,"return")}catch(t){return promiseRejectedWith(t)}if(s===undefined){return promiseResolvedWith(undefined)}let i;try{i=reflectCall(s,r,[t])}catch(t){return promiseRejectedWith(t)}const o=promiseResolvedWith(i);return transformPromiseWith(o,(t=>{if(!typeIsObject(t)){throw new TypeError("The promise returned by the iterator.return() method must fulfill with an object")}return undefined}))}r=CreateReadableStream(s,pullAlgorithm,cancelAlgorithm,0);return r}function ReadableStreamFromDefaultReader(t){let r;const n=noop;function pullAlgorithm(){let n;try{n=t.read()}catch(t){return promiseRejectedWith(t)}return transformPromiseWith(n,(t=>{if(!typeIsObject(t)){throw new TypeError("The promise returned by the reader.read() method must fulfill with an object")}if(t.done){ReadableStreamDefaultControllerClose(r._readableStreamController)}else{const n=t.value;ReadableStreamDefaultControllerEnqueue(r._readableStreamController,n)}}))}function cancelAlgorithm(r){try{return promiseResolvedWith(t.cancel(r))}catch(t){return promiseRejectedWith(t)}}r=CreateReadableStream(n,pullAlgorithm,cancelAlgorithm,0);return r}function convertUnderlyingDefaultOrByteSource(t,r){assertDictionary(t,r);const n=t;const s=n===null||n===void 0?void 0:n.autoAllocateChunkSize;const i=n===null||n===void 0?void 0:n.cancel;const o=n===null||n===void 0?void 0:n.pull;const a=n===null||n===void 0?void 0:n.start;const l=n===null||n===void 0?void 0:n.type;return{autoAllocateChunkSize:s===undefined?undefined:convertUnsignedLongLongWithEnforceRange(s,`${r} has member 'autoAllocateChunkSize' that`),cancel:i===undefined?undefined:convertUnderlyingSourceCancelCallback(i,n,`${r} has member 'cancel' that`),pull:o===undefined?undefined:convertUnderlyingSourcePullCallback(o,n,`${r} has member 'pull' that`),start:a===undefined?undefined:convertUnderlyingSourceStartCallback(a,n,`${r} has member 'start' that`),type:l===undefined?undefined:convertReadableStreamType(l,`${r} has member 'type' that`)}}function convertUnderlyingSourceCancelCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSourcePullCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertUnderlyingSourceStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertReadableStreamType(t,r){t=`${t}`;if(t!=="bytes"){throw new TypeError(`${r} '${t}' is not a valid enumeration value for ReadableStreamType`)}return t}function convertIteratorOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.preventCancel;return{preventCancel:Boolean(n)}}function convertPipeOptions(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.preventAbort;const s=t===null||t===void 0?void 0:t.preventCancel;const i=t===null||t===void 0?void 0:t.preventClose;const o=t===null||t===void 0?void 0:t.signal;if(o!==undefined){assertAbortSignal(o,`${r} has member 'signal' that`)}return{preventAbort:Boolean(n),preventCancel:Boolean(s),preventClose:Boolean(i),signal:o}}function assertAbortSignal(t,r){if(!isAbortSignal(t)){throw new TypeError(`${r} is not an AbortSignal.`)}}function convertReadableWritablePair(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.readable;assertRequiredField(n,"readable","ReadableWritablePair");assertReadableStream(n,`${r} has member 'readable' that`);const s=t===null||t===void 0?void 0:t.writable;assertRequiredField(s,"writable","ReadableWritablePair");assertWritableStream(s,`${r} has member 'writable' that`);return{readable:n,writable:s}}class ReadableStream{constructor(t={},r={}){if(t===undefined){t=null}else{assertObject(t,"First parameter")}const n=convertQueuingStrategy(r,"Second parameter");const s=convertUnderlyingDefaultOrByteSource(t,"First parameter");InitializeReadableStream(this);if(s.type==="bytes"){if(n.size!==undefined){throw new RangeError("The strategy for a byte stream cannot have a size function")}const t=ExtractHighWaterMark(n,0);SetUpReadableByteStreamControllerFromUnderlyingSource(this,s,t)}else{const t=ExtractSizeAlgorithm(n);const r=ExtractHighWaterMark(n,1);SetUpReadableStreamDefaultControllerFromUnderlyingSource(this,s,r,t)}}get locked(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("locked")}return IsReadableStreamLocked(this)}cancel(t=undefined){if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("cancel"))}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("Cannot cancel a stream that already has a reader"))}return ReadableStreamCancel(this,t)}getReader(t=undefined){if(!IsReadableStream(this)){throw streamBrandCheckException$1("getReader")}const r=convertReaderOptions(t,"First parameter");if(r.mode===undefined){return AcquireReadableStreamDefaultReader(this)}return AcquireReadableStreamBYOBReader(this)}pipeThrough(t,r={}){if(!IsReadableStream(this)){throw streamBrandCheckException$1("pipeThrough")}assertRequiredArgument(t,1,"pipeThrough");const n=convertReadableWritablePair(t,"First parameter");const s=convertPipeOptions(r,"Second parameter");if(IsReadableStreamLocked(this)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked ReadableStream")}if(IsWritableStreamLocked(n.writable)){throw new TypeError("ReadableStream.prototype.pipeThrough cannot be used on a locked WritableStream")}const i=ReadableStreamPipeTo(this,n.writable,s.preventClose,s.preventAbort,s.preventCancel,s.signal);setPromiseIsHandledToTrue(i);return n.readable}pipeTo(t,r={}){if(!IsReadableStream(this)){return promiseRejectedWith(streamBrandCheckException$1("pipeTo"))}if(t===undefined){return promiseRejectedWith(`Parameter 1 is required in 'pipeTo'.`)}if(!IsWritableStream(t)){return promiseRejectedWith(new TypeError(`ReadableStream.prototype.pipeTo's first argument must be a WritableStream`))}let n;try{n=convertPipeOptions(r,"Second parameter")}catch(t){return promiseRejectedWith(t)}if(IsReadableStreamLocked(this)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked ReadableStream"))}if(IsWritableStreamLocked(t)){return promiseRejectedWith(new TypeError("ReadableStream.prototype.pipeTo cannot be used on a locked WritableStream"))}return ReadableStreamPipeTo(this,t,n.preventClose,n.preventAbort,n.preventCancel,n.signal)}tee(){if(!IsReadableStream(this)){throw streamBrandCheckException$1("tee")}const t=ReadableStreamTee(this);return CreateArrayFromList(t)}values(t=undefined){if(!IsReadableStream(this)){throw streamBrandCheckException$1("values")}const r=convertIteratorOptions(t,"First parameter");return AcquireReadableStreamAsyncIterator(this,r.preventCancel)}static from(t){return ReadableStreamFrom(t)}}Object.defineProperties(ReadableStream,{from:{enumerable:true}});Object.defineProperties(ReadableStream.prototype,{cancel:{enumerable:true},getReader:{enumerable:true},pipeThrough:{enumerable:true},pipeTo:{enumerable:true},tee:{enumerable:true},values:{enumerable:true},locked:{enumerable:true}});setFunctionName(ReadableStream.from,"from");setFunctionName(ReadableStream.prototype.cancel,"cancel");setFunctionName(ReadableStream.prototype.getReader,"getReader");setFunctionName(ReadableStream.prototype.pipeThrough,"pipeThrough");setFunctionName(ReadableStream.prototype.pipeTo,"pipeTo");setFunctionName(ReadableStream.prototype.tee,"tee");setFunctionName(ReadableStream.prototype.values,"values");if(typeof r.toStringTag==="symbol"){Object.defineProperty(ReadableStream.prototype,r.toStringTag,{value:"ReadableStream",configurable:true})}if(typeof r.asyncIterator==="symbol"){Object.defineProperty(ReadableStream.prototype,r.asyncIterator,{value:ReadableStream.prototype.values,writable:true,configurable:true})}function CreateReadableStream(t,r,n,s=1,i=(()=>1)){const o=Object.create(ReadableStream.prototype);InitializeReadableStream(o);const a=Object.create(ReadableStreamDefaultController.prototype);SetUpReadableStreamDefaultController(o,a,t,r,n,s,i);return o}function CreateReadableByteStream(t,r,n){const s=Object.create(ReadableStream.prototype);InitializeReadableStream(s);const i=Object.create(ReadableByteStreamController.prototype);SetUpReadableByteStreamController(s,i,t,r,n,0,undefined);return s}function InitializeReadableStream(t){t._state="readable";t._reader=undefined;t._storedError=undefined;t._disturbed=false}function IsReadableStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_readableStreamController")){return false}return t instanceof ReadableStream}function IsReadableStreamLocked(t){if(t._reader===undefined){return false}return true}function ReadableStreamCancel(t,r){t._disturbed=true;if(t._state==="closed"){return promiseResolvedWith(undefined)}if(t._state==="errored"){return promiseRejectedWith(t._storedError)}ReadableStreamClose(t);const n=t._reader;if(n!==undefined&&IsReadableStreamBYOBReader(n)){const t=n._readIntoRequests;n._readIntoRequests=new SimpleQueue;t.forEach((t=>{t._closeSteps(undefined)}))}const s=t._readableStreamController[u](r);return transformPromiseWith(s,noop)}function ReadableStreamClose(t){t._state="closed";const r=t._reader;if(r===undefined){return}defaultReaderClosedPromiseResolve(r);if(IsReadableStreamDefaultReader(r)){const t=r._readRequests;r._readRequests=new SimpleQueue;t.forEach((t=>{t._closeSteps()}))}}function ReadableStreamError(t,r){t._state="errored";t._storedError=r;const n=t._reader;if(n===undefined){return}defaultReaderClosedPromiseReject(n,r);if(IsReadableStreamDefaultReader(n)){ReadableStreamDefaultReaderErrorReadRequests(n,r)}else{ReadableStreamBYOBReaderErrorReadIntoRequests(n,r)}}function streamBrandCheckException$1(t){return new TypeError(`ReadableStream.prototype.${t} can only be used on a ReadableStream`)}function convertQueuingStrategyInit(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.highWaterMark;assertRequiredField(n,"highWaterMark","QueuingStrategyInit");return{highWaterMark:convertUnrestrictedDouble(n)}}const byteLengthSizeFunction=t=>t.byteLength;setFunctionName(byteLengthSizeFunction,"size");class ByteLengthQueuingStrategy{constructor(t){assertRequiredArgument(t,1,"ByteLengthQueuingStrategy");t=convertQueuingStrategyInit(t,"First parameter");this._byteLengthQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("highWaterMark")}return this._byteLengthQueuingStrategyHighWaterMark}get size(){if(!IsByteLengthQueuingStrategy(this)){throw byteLengthBrandCheckException("size")}return byteLengthSizeFunction}}Object.defineProperties(ByteLengthQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(ByteLengthQueuingStrategy.prototype,r.toStringTag,{value:"ByteLengthQueuingStrategy",configurable:true})}function byteLengthBrandCheckException(t){return new TypeError(`ByteLengthQueuingStrategy.prototype.${t} can only be used on a ByteLengthQueuingStrategy`)}function IsByteLengthQueuingStrategy(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_byteLengthQueuingStrategyHighWaterMark")){return false}return t instanceof ByteLengthQueuingStrategy}const countSizeFunction=()=>1;setFunctionName(countSizeFunction,"size");class CountQueuingStrategy{constructor(t){assertRequiredArgument(t,1,"CountQueuingStrategy");t=convertQueuingStrategyInit(t,"First parameter");this._countQueuingStrategyHighWaterMark=t.highWaterMark}get highWaterMark(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("highWaterMark")}return this._countQueuingStrategyHighWaterMark}get size(){if(!IsCountQueuingStrategy(this)){throw countBrandCheckException("size")}return countSizeFunction}}Object.defineProperties(CountQueuingStrategy.prototype,{highWaterMark:{enumerable:true},size:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(CountQueuingStrategy.prototype,r.toStringTag,{value:"CountQueuingStrategy",configurable:true})}function countBrandCheckException(t){return new TypeError(`CountQueuingStrategy.prototype.${t} can only be used on a CountQueuingStrategy`)}function IsCountQueuingStrategy(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_countQueuingStrategyHighWaterMark")){return false}return t instanceof CountQueuingStrategy}function convertTransformer(t,r){assertDictionary(t,r);const n=t===null||t===void 0?void 0:t.cancel;const s=t===null||t===void 0?void 0:t.flush;const i=t===null||t===void 0?void 0:t.readableType;const o=t===null||t===void 0?void 0:t.start;const a=t===null||t===void 0?void 0:t.transform;const l=t===null||t===void 0?void 0:t.writableType;return{cancel:n===undefined?undefined:convertTransformerCancelCallback(n,t,`${r} has member 'cancel' that`),flush:s===undefined?undefined:convertTransformerFlushCallback(s,t,`${r} has member 'flush' that`),readableType:i,start:o===undefined?undefined:convertTransformerStartCallback(o,t,`${r} has member 'start' that`),transform:a===undefined?undefined:convertTransformerTransformCallback(a,t,`${r} has member 'transform' that`),writableType:l}}function convertTransformerFlushCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}function convertTransformerStartCallback(t,r,n){assertFunction(t,n);return n=>reflectCall(t,r,[n])}function convertTransformerTransformCallback(t,r,n){assertFunction(t,n);return(n,s)=>promiseCall(t,r,[n,s])}function convertTransformerCancelCallback(t,r,n){assertFunction(t,n);return n=>promiseCall(t,r,[n])}class TransformStream{constructor(t={},r={},n={}){if(t===undefined){t=null}const s=convertQueuingStrategy(r,"Second parameter");const i=convertQueuingStrategy(n,"Third parameter");const o=convertTransformer(t,"First parameter");if(o.readableType!==undefined){throw new RangeError("Invalid readableType specified")}if(o.writableType!==undefined){throw new RangeError("Invalid writableType specified")}const a=ExtractHighWaterMark(i,0);const l=ExtractSizeAlgorithm(i);const c=ExtractHighWaterMark(s,1);const u=ExtractSizeAlgorithm(s);let d;const p=newPromise((t=>{d=t}));InitializeTransformStream(this,p,c,u,a,l);SetUpTransformStreamDefaultControllerFromTransformer(this,o);if(o.start!==undefined){d(o.start(this._transformStreamController))}else{d(undefined)}}get readable(){if(!IsTransformStream(this)){throw streamBrandCheckException("readable")}return this._readable}get writable(){if(!IsTransformStream(this)){throw streamBrandCheckException("writable")}return this._writable}}Object.defineProperties(TransformStream.prototype,{readable:{enumerable:true},writable:{enumerable:true}});if(typeof r.toStringTag==="symbol"){Object.defineProperty(TransformStream.prototype,r.toStringTag,{value:"TransformStream",configurable:true})}function InitializeTransformStream(t,r,n,s,i,o){function startAlgorithm(){return r}function writeAlgorithm(r){return TransformStreamDefaultSinkWriteAlgorithm(t,r)}function abortAlgorithm(r){return TransformStreamDefaultSinkAbortAlgorithm(t,r)}function closeAlgorithm(){return TransformStreamDefaultSinkCloseAlgorithm(t)}t._writable=CreateWritableStream(startAlgorithm,writeAlgorithm,closeAlgorithm,abortAlgorithm,n,s);function pullAlgorithm(){return TransformStreamDefaultSourcePullAlgorithm(t)}function cancelAlgorithm(r){return TransformStreamDefaultSourceCancelAlgorithm(t,r)}t._readable=CreateReadableStream(startAlgorithm,pullAlgorithm,cancelAlgorithm,i,o);t._backpressure=undefined;t._backpressureChangePromise=undefined;t._backpressureChangePromise_resolve=undefined;TransformStreamSetBackpressure(t,true);t._transformStreamController=undefined}function IsTransformStream(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_transformStreamController")){return false}return t instanceof TransformStream}function TransformStreamError(t,r){ReadableStreamDefaultControllerError(t._readable._readableStreamController,r);TransformStreamErrorWritableAndUnblockWrite(t,r)}function TransformStreamErrorWritableAndUnblockWrite(t,r){TransformStreamDefaultControllerClearAlgorithms(t._transformStreamController);WritableStreamDefaultControllerErrorIfNeeded(t._writable._writableStreamController,r);TransformStreamUnblockWrite(t)}function TransformStreamUnblockWrite(t){if(t._backpressure){TransformStreamSetBackpressure(t,false)}}function TransformStreamSetBackpressure(t,r){if(t._backpressureChangePromise!==undefined){t._backpressureChangePromise_resolve()}t._backpressureChangePromise=newPromise((r=>{t._backpressureChangePromise_resolve=r}));t._backpressure=r}class TransformStreamDefaultController{constructor(){throw new TypeError("Illegal constructor")}get desiredSize(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("desiredSize")}const t=this._controlledTransformStream._readable._readableStreamController;return ReadableStreamDefaultControllerGetDesiredSize(t)}enqueue(t=undefined){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("enqueue")}TransformStreamDefaultControllerEnqueue(this,t)}error(t=undefined){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("error")}TransformStreamDefaultControllerError(this,t)}terminate(){if(!IsTransformStreamDefaultController(this)){throw defaultControllerBrandCheckException("terminate")}TransformStreamDefaultControllerTerminate(this)}}Object.defineProperties(TransformStreamDefaultController.prototype,{enqueue:{enumerable:true},error:{enumerable:true},terminate:{enumerable:true},desiredSize:{enumerable:true}});setFunctionName(TransformStreamDefaultController.prototype.enqueue,"enqueue");setFunctionName(TransformStreamDefaultController.prototype.error,"error");setFunctionName(TransformStreamDefaultController.prototype.terminate,"terminate");if(typeof r.toStringTag==="symbol"){Object.defineProperty(TransformStreamDefaultController.prototype,r.toStringTag,{value:"TransformStreamDefaultController",configurable:true})}function IsTransformStreamDefaultController(t){if(!typeIsObject(t)){return false}if(!Object.prototype.hasOwnProperty.call(t,"_controlledTransformStream")){return false}return t instanceof TransformStreamDefaultController}function SetUpTransformStreamDefaultController(t,r,n,s,i){r._controlledTransformStream=t;t._transformStreamController=r;r._transformAlgorithm=n;r._flushAlgorithm=s;r._cancelAlgorithm=i;r._finishPromise=undefined;r._finishPromise_resolve=undefined;r._finishPromise_reject=undefined}function SetUpTransformStreamDefaultControllerFromTransformer(t,r){const n=Object.create(TransformStreamDefaultController.prototype);let s;let i;let o;if(r.transform!==undefined){s=t=>r.transform(t,n)}else{s=t=>{try{TransformStreamDefaultControllerEnqueue(n,t);return promiseResolvedWith(undefined)}catch(t){return promiseRejectedWith(t)}}}if(r.flush!==undefined){i=()=>r.flush(n)}else{i=()=>promiseResolvedWith(undefined)}if(r.cancel!==undefined){o=t=>r.cancel(t)}else{o=()=>promiseResolvedWith(undefined)}SetUpTransformStreamDefaultController(t,n,s,i,o)}function TransformStreamDefaultControllerClearAlgorithms(t){t._transformAlgorithm=undefined;t._flushAlgorithm=undefined;t._cancelAlgorithm=undefined}function TransformStreamDefaultControllerEnqueue(t,r){const n=t._controlledTransformStream;const s=n._readable._readableStreamController;if(!ReadableStreamDefaultControllerCanCloseOrEnqueue(s)){throw new TypeError("Readable side is not in a state that permits enqueue")}try{ReadableStreamDefaultControllerEnqueue(s,r)}catch(t){TransformStreamErrorWritableAndUnblockWrite(n,t);throw n._readable._storedError}const i=ReadableStreamDefaultControllerHasBackpressure(s);if(i!==n._backpressure){TransformStreamSetBackpressure(n,true)}}function TransformStreamDefaultControllerError(t,r){TransformStreamError(t._controlledTransformStream,r)}function TransformStreamDefaultControllerPerformTransform(t,r){const n=t._transformAlgorithm(r);return transformPromiseWith(n,undefined,(r=>{TransformStreamError(t._controlledTransformStream,r);throw r}))}function TransformStreamDefaultControllerTerminate(t){const r=t._controlledTransformStream;const n=r._readable._readableStreamController;ReadableStreamDefaultControllerClose(n);const s=new TypeError("TransformStream terminated");TransformStreamErrorWritableAndUnblockWrite(r,s)}function TransformStreamDefaultSinkWriteAlgorithm(t,r){const n=t._transformStreamController;if(t._backpressure){const s=t._backpressureChangePromise;return transformPromiseWith(s,(()=>{const s=t._writable;const i=s._state;if(i==="erroring"){throw s._storedError}return TransformStreamDefaultControllerPerformTransform(n,r)}))}return TransformStreamDefaultControllerPerformTransform(n,r)}function TransformStreamDefaultSinkAbortAlgorithm(t,r){const n=t._transformStreamController;if(n._finishPromise!==undefined){return n._finishPromise}const s=t._readable;n._finishPromise=newPromise(((t,r)=>{n._finishPromise_resolve=t;n._finishPromise_reject=r}));const i=n._cancelAlgorithm(r);TransformStreamDefaultControllerClearAlgorithms(n);uponPromise(i,(()=>{if(s._state==="errored"){defaultControllerFinishPromiseReject(n,s._storedError)}else{ReadableStreamDefaultControllerError(s._readableStreamController,r);defaultControllerFinishPromiseResolve(n)}return null}),(t=>{ReadableStreamDefaultControllerError(s._readableStreamController,t);defaultControllerFinishPromiseReject(n,t);return null}));return n._finishPromise}function TransformStreamDefaultSinkCloseAlgorithm(t){const r=t._transformStreamController;if(r._finishPromise!==undefined){return r._finishPromise}const n=t._readable;r._finishPromise=newPromise(((t,n)=>{r._finishPromise_resolve=t;r._finishPromise_reject=n}));const s=r._flushAlgorithm();TransformStreamDefaultControllerClearAlgorithms(r);uponPromise(s,(()=>{if(n._state==="errored"){defaultControllerFinishPromiseReject(r,n._storedError)}else{ReadableStreamDefaultControllerClose(n._readableStreamController);defaultControllerFinishPromiseResolve(r)}return null}),(t=>{ReadableStreamDefaultControllerError(n._readableStreamController,t);defaultControllerFinishPromiseReject(r,t);return null}));return r._finishPromise}function TransformStreamDefaultSourcePullAlgorithm(t){TransformStreamSetBackpressure(t,false);return t._backpressureChangePromise}function TransformStreamDefaultSourceCancelAlgorithm(t,r){const n=t._transformStreamController;if(n._finishPromise!==undefined){return n._finishPromise}const s=t._writable;n._finishPromise=newPromise(((t,r)=>{n._finishPromise_resolve=t;n._finishPromise_reject=r}));const i=n._cancelAlgorithm(r);TransformStreamDefaultControllerClearAlgorithms(n);uponPromise(i,(()=>{if(s._state==="errored"){defaultControllerFinishPromiseReject(n,s._storedError)}else{WritableStreamDefaultControllerErrorIfNeeded(s._writableStreamController,r);TransformStreamUnblockWrite(t);defaultControllerFinishPromiseResolve(n)}return null}),(r=>{WritableStreamDefaultControllerErrorIfNeeded(s._writableStreamController,r);TransformStreamUnblockWrite(t);defaultControllerFinishPromiseReject(n,r);return null}));return n._finishPromise}function defaultControllerBrandCheckException(t){return new TypeError(`TransformStreamDefaultController.prototype.${t} can only be used on a TransformStreamDefaultController`)}function defaultControllerFinishPromiseResolve(t){if(t._finishPromise_resolve===undefined){return}t._finishPromise_resolve();t._finishPromise_resolve=undefined;t._finishPromise_reject=undefined}function defaultControllerFinishPromiseReject(t,r){if(t._finishPromise_reject===undefined){return}setPromiseIsHandledToTrue(t._finishPromise);t._finishPromise_reject(r);t._finishPromise_resolve=undefined;t._finishPromise_reject=undefined}function streamBrandCheckException(t){return new TypeError(`TransformStream.prototype.${t} can only be used on a TransformStream`)}t.ByteLengthQueuingStrategy=ByteLengthQueuingStrategy;t.CountQueuingStrategy=CountQueuingStrategy;t.ReadableByteStreamController=ReadableByteStreamController;t.ReadableStream=ReadableStream;t.ReadableStreamBYOBReader=ReadableStreamBYOBReader;t.ReadableStreamBYOBRequest=ReadableStreamBYOBRequest;t.ReadableStreamDefaultController=ReadableStreamDefaultController;t.ReadableStreamDefaultReader=ReadableStreamDefaultReader;t.TransformStream=TransformStream;t.TransformStreamDefaultController=TransformStreamDefaultController;t.WritableStream=WritableStream;t.WritableStreamDefaultController=WritableStreamDefaultController;t.WritableStreamDefaultWriter=WritableStreamDefaultWriter}))},6144:(t,r,n)=>{n.a(t,(async(t,r)=>{try{var s=n(4040);const t=1;const i=await(0,s.D)().catch((()=>t));if(typeof i==="number"){process.exitCode=i}r()}catch(t){r(t)}}),1)},4040:(r,n,s)=>{s.d(n,{D:()=>main});var i={};s.r(i);s.d(i,{GameVersionFilter:()=>G});var o={};s.r(o);s.d(o,{VersionType:()=>te});var a={};s.r(a);s.d(a,{ModrinthUnfeatureMode:()=>pe});var l={};s.r(l);s.d(l,{SecureString:()=>SecureString});var c={};s.r(c);s.d(c,{FailMode:()=>Oe});var u={};s.r(u);s.d(u,{FileInfo:()=>FileInfo,fileEquals:()=>fileEquals,findFiles:()=>findFiles,findFilesSync:()=>findFilesSync,readAllText:()=>readAllText,readAllTextSync:()=>readAllTextSync,readAllZippedText:()=>readAllZippedText,readFile:()=>file_info_readFile,readFileSync:()=>readFileSync,readZippedFile:()=>readZippedFile});var d={};s.r(d);s.d(d,{createDependency:()=>createDependency,formatDependency:()=>formatDependency,isDependency:()=>isDependency,parseDependency:()=>parseDependency});var p={};s.r(p);s.d(p,{JavaVersion:()=>JavaVersion});var h={};s.r(h);const m=Symbol.for("call");function makeCallable(t){function call(...t){return call[m](...t)}Object.assign(call,t);Object.setPrototypeOf(call,Object.getPrototypeOf(t));return call}function convertComparerToEqualityComparer(t){return(r,n)=>t(r,n)===0}function invertComparer(t){return(r,n)=>t(n,r)}function combineComparers(t,r){return(n,s)=>{const i=t(n,s);return i===0?r(n,s):i}}function negateEqualityComparer(t){return(r,n)=>!t(r,n)}function orEqualityComparers(t,r){return(n,s)=>t(n,s)||r(n,s)}function andEqualityComparers(t,r){return(n,s)=>t(n,s)&&r(n,s)}class CompositeEqualityComparer{_comparer;_negated;constructor(t,r){this._comparer=t;this._negated=r}static createInternal(t,r){return makeCallable(new CompositeEqualityComparer(t,r))}static create(t){return CompositeEqualityComparer.createInternal(t)}equals(t,r){return this._comparer(t,r)}[m](t,r){return this._comparer(t,r)}or(t){const r=t instanceof CompositeEqualityComparer?t._comparer:t;const n=orEqualityComparers(this._comparer,r);return CompositeEqualityComparer.createInternal(n)}and(t){const r=t instanceof CompositeEqualityComparer?t._comparer:t;const n=andEqualityComparers(this._comparer,r);return CompositeEqualityComparer.createInternal(n)}negate(){this._negated??=CompositeEqualityComparer.createInternal(negateEqualityComparer(this._comparer),this);return this._negated}}class CompositeComparer{_comparer;_inverted;constructor(t,r){this._comparer=t;this._inverted=r}static createInternal(t,r){return makeCallable(new CompositeComparer(t,r))}static create(t){return CompositeComparer.createInternal(t)}compare(t,r){return this._comparer(t,r)}[m](t,r){return this._comparer(t,r)}thenBy(t){const r=t instanceof CompositeComparer?t._comparer:t;const n=combineComparers(this._comparer,r);return CompositeComparer.createInternal(n)}invert(){this._inverted??=CompositeComparer.createInternal(invertComparer(this._comparer),this);return this._inverted}asEqualityComparer(){return CompositeEqualityComparer.create(convertComparerToEqualityComparer(this._comparer))}}function createComparer(t){return CompositeComparer.create(t)}const g=createComparer(((t,r)=>{if(t===undefined){return r===undefined?0:-1}if(t===null){return r===undefined?1:r===null?0:-1}if(r===undefined||r===null){return 1}return 0}));const y=g.thenBy(((t,r)=>t<r?-1:t>r?1:0));function createBaseComparer(){return g}function createDefaultComparer(){return y}const b=createDefaultComparer();const _=createBaseComparer().thenBy(((t,r)=>t?.localeCompare(r,undefined,{sensitivity:"accent"})??0));function createEqualityComparer(t){return CompositeEqualityComparer.create(t)}const S=createEqualityComparer(((t,r)=>t===r));function createDefaultEqualityComparer(){return S}const E=t(import.meta.url)("node:crypto");function string_utils_asString(t){return typeof t==="string"?t:String(t)}const v=/^\p{L}$/u;function isLetter(t){return t?.length===1&&v.test(t)}const R=/^\d$/;function isDigit(t){return t?.length===1&&t>="0"&&t<="9"}const w=/^(?:\p{L}|\d)$/u;function isLetterOrDigit(t){return t?.length===1&&w.test(t)}const C=/^[^\p{Ll}]*$/u;function isUpperCase(t){return C.test(t)}const A=/^[^\p{Lu}]*$/u;function isLowerCase(t){return A.test(t)}function isNumberString(t){return String(+t)===t}function isIntegerString(t){return String(parseInt(t))===t}function stringCompare(t,r,n){const s=n?.ignoreCase?_:b;return s.compare(t,r)}function stringEquals(t,r,n){return stringCompare(t,r,n)===0}function capitalize(t){return t.charAt(0).toUpperCase()+t.slice(1)}function uncapitalize(t){return t.charAt(0).toLowerCase()+t.slice(1)}function toPascalCase(t){if(isUpperCase(t)){t=t.toLowerCase()}return t.replace(/(?:^|[\s_-])(\w)/g,((t,r)=>r.toUpperCase())).replace(/[\s_-]/g,"")}function split(t,r,n){if(!t){return[]}if(Array.isArray(r)){return splitByArrayOfStrings(t,r,n)}return splitByStringOrRegex(t,r,n)}function splitByStringOrRegex(t,r,n){const s=n?.trimEntries??false;const i=n?.removeEmptyEntries??false;const o=t.split(r);if(s){for(let t=0;t<o.length;++t){o[t]=o[t].trim()}}return i?o.filter((t=>t)):o}function splitByArrayOfStrings(t,r,n){const s=n?.trimEntries??false;const i=n?.removeEmptyEntries??false;const o=[];let a=-1;for(let n=0;n<t.length;++n){if(!r.includes(t.charAt(n))){continue}let l=t.substring(a+1,n);a=n;if(s){l=l.trim()}if(l||!i){o.push(l)}}let l=t.substring(a+1);if(s){l=l.trim()}if(l||!i){o.push(l)}return o}function string_utils_splitLines(t,r){const n=r?.maxLength||0;const s=t.split(/\r?\n/);if(n<=0){return s}const i=s.flatMap((t=>{if(t.length<=n){return t}const r=t.split(" ");const s=[];let i="";for(const t of r){if(i.length+t.length<=n){i+=(i?" ":"")+t}else{s.push(i);i=t}}s.push(i);return s}));return i}function string_utils_pad(t,r,n){t||="";switch(n?.align){case"left":return t.padEnd(r,n?.fillString);case"right":return t.padStart(r,n?.fillString);default:const s=r-t.length;if(s<=0){return t}const i=(s>>1)+t.length;return t.padStart(i,n?.fillString).padEnd(r,n?.fillString)}}function generateSecureRandomString(t){const r=(0,E.randomBytes)(Math.ceil(t/2));return r.toString("hex").slice(0,t)}function string_utils_hashString(t,r="sha256"){return createHash(r).update(t).digest("hex")}const T=createDefaultEqualityComparer();const I=_.asEqualityComparer();const P=createEqualityComparer(((t,r)=>compareStringsIgnoreNonWordCharacters(t,r,false)));const N=createEqualityComparer(((t,r)=>compareStringsIgnoreNonWordCharacters(t,r,true)));function compareStringsIgnoreNonWordCharacters(t,r,n){if(t===null||t===undefined||r===null||r===undefined){return t===r}const s=n?"accent":"variant";let i=0;let o=0;while(i<t.length&&o<r.length){let n=t.charAt(i);let a=r.charAt(o);if(n===a){++i;++o;continue}while(i<t.length&&!w.test(n)){n=t.charAt(++i)}while(o<r.length&&!w.test(a)){a=r.charAt(++o)}if(n.localeCompare(a,undefined,{sensitivity:s})!==0){return false}++i;++o}while(i<t.length&&!w.test(t.charAt(i))){++i}while(o<r.length&&!w.test(r.charAt(o))){++o}return i>=t.length&&o>=r.length}class BigIntDescriptor{get name(){return"bigint"}get defaultValue(){return 0n}hasFlag(t,r){return(t&r)===r}addFlag(t,r){return t|r}removeFlag(t,r){return t&~r}}class BooleanDescriptor{get name(){return"boolean"}get defaultValue(){return false}hasFlag(t,r){return!r||t}addFlag(t,r){return t||r}removeFlag(t,r){return t&&!r}}class NumberDescriptor{get name(){return"number"}get defaultValue(){return 0}hasFlag(t,r){return(t&r)===r}addFlag(t,r){return t|r}removeFlag(t,r){return t&~r}}const D=[",","|"];const O=D[0];class StringDescriptor{get name(){return"string"}get defaultValue(){return""}hasFlag(t,r){if(r===this.defaultValue||r===t){return true}if(!t){return false}const n=split(t,D,{trimEntries:true,removeEmptyEntries:true});return n.includes(r)}addFlag(t,r){t=this.removeFlag(t,r);return t?`${t}${O} ${r}`:t}removeFlag(t,r){if(t===this.defaultValue||r===this.defaultValue){return t}if(t===r){return this.defaultValue}const n=split(t,D,{trimEntries:true,removeEmptyEntries:true});return n.filter((t=>t!==r)).join(`${O} `)}}const k=new Map([["bigint",new BigIntDescriptor],["boolean",new BooleanDescriptor],["number",new NumberDescriptor],["string",new StringDescriptor]]);function getEnumDescriptorByUnderlyingType(t){return k.get(t)}function inferEnumDescriptorOrThrow(t){if(!t.every(((t,r,n)=>r===0||typeof t===typeof n[r-1]))){throw new Error("The enum must contain objects of the same type.")}const r=t.length?typeof t[0]:"number";const n=getEnumDescriptorByUnderlyingType(r);if(!n){throw new Error(`'${r}' is not an acceptable enum type.`)}return n}function isSet(t){if(t instanceof Set){return true}const r=t;return!!r&&typeof r.values==="function"&&typeof r.add==="function"&&typeof r.delete==="function"&&typeof r.has==="function"&&typeof r[Symbol.iterator]==="function"}function isReadOnlySet(t){if(t instanceof Set){return true}const r=t;return!!r&&typeof r.values==="function"&&typeof r.has==="function"&&typeof r[Symbol.iterator]==="function"}class ArraySet{_values;_comparer;constructor(t,r){r??=typeof t==="function"?t:createDefaultEqualityComparer();const n=t&&t!==r?t:[];this._values=[];this._comparer=r;for(const t of n){this.add(t)}}get size(){return this._values.length}add(t){const r=iterable_$i(this._values).indexOf(t,this._comparer);if(r===-1){this._values.push(t)}else{this._values[r]=t}return this}has(t){return iterable_$i(this._values).includes(t,this._comparer)}delete(t){const r=iterable_$i(this._values).indexOf(t,this._comparer);if(r===-1){return false}this._values.splice(r,1);return true}clear(){this._values.splice(0)}keys(){return this._values[Symbol.iterator]()}values(){return this._values[Symbol.iterator]()}*entries(){const t=this._values;for(let r=0;r<t.length;++r){yield[t[r],t[r]]}}forEach(t,r){t=r===undefined?t:t.bind(r);const n=this._values;for(let r=0;r<n.length;++r){t(n[r],n[r],this)}}[Symbol.iterator](){return this._values[Symbol.iterator]()}get[Symbol.toStringTag](){return"Set"}}function iterable_isIterable(t){return typeof t?.[Symbol.iterator]==="function"}function*filter(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){if(r(n,s++,t)){yield n}}}function distinct(t,r){return r?new ArraySet(t,r):new Set(t)}function distinctBy(t,r,n){if(n){const valueComparer=(t,s)=>n(r(t),r(s));return new ArraySet(t,valueComparer)}return new Map(map(t,(t=>[r(t),t]))).values()}function*map(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){yield r(n,s++,t)}}function*flatMap(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){yield*r(n,s++,t)}}function reduce(t,r,n,s){r=s===undefined?r:r.bind(s);let i=n;let o=0;for(const n of t){if(i===undefined&&o===0){i=n}else{i=r(i,n,o,t)}++o}return i}function*skip(t,r){const n=t[Symbol.iterator]();for(let t=0;t<r;++t){const{done:t}=n.next();if(t){return}}yield*{[Symbol.iterator]:()=>n}}function*take(t,r){let n=0;for(const s of t){if(++n>r){return}yield s}}function takeLast(t,r){const n=[];for(const s of t){n.push(s);if(n.length>r){n.shift()}}return n}function slice(t,r,n){if(n===0){return[]}const s=r<0||n<0;if(s){return asArray(t).slice(r,n)}r||=0;const i=r===0?t:skip(t,r);const o=n===undefined?i:take(i,n-r);return o}function reverse(t){return[...t].reverse()}function sort(t,r){return[...t].sort(r||createDefaultComparer())}function every(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){if(!r(n,s++,t)){return false}}return true}function some(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){if(r(n,s++,t)){return true}}return false}function min(t,r,n){return extremum(t,-1,r,n)}function max(t,r,n){return extremum(t,1,r,n)}function extremum(t,r,n,s){n||=createDefaultComparer();n=s===undefined?n:n.bind(s);let i=undefined;let o=-1;let a=-1;for(const s of t){++a;if(o===-1){i=s;o=a;continue}if(Math.sign(n(s,i,a,o,t))===r){i=s;o=a}}return i}function count(t,r,n){if(!r&&Array.isArray(t)){return t.length}let s=0;if(r){r=n===undefined?r:r.bind(n);let i=0;for(const n of t){if(r(n,i++,t)){++s}}}else{for(const r of t){++s}}return s}function indexOf(t,r,n,s){if(typeof n!=="number"){s=n;n=0}n??=0;s??=createDefaultEqualityComparer();let i=0;for(const o of t){if(i>=n&&s(r,o)){return i}++i}return-1}function lastIndexOf(t,r,n,s){if(typeof n!=="number"){s=n;n=Infinity}n??=Infinity;s??=createDefaultEqualityComparer();let i=0;let o=-1;for(const a of t){if(i>=n){break}if(s(r,a)){o=i}++i}return o}function includes(t,r,n,s){return indexOf(t,r,n,s)!==-1}function sequenceEqual(t,r,n){n??=createDefaultEqualityComparer();const s=t[Symbol.iterator]();const i=r[Symbol.iterator]();let o=s.next();let a=i.next();while(!o.done&&!a.done){if(!n(o.value,a.value)){return false}o=s.next();a=i.next()}return o.done&&a.done}function startsWith(t,r,n,s){if(typeof n!=="number"){s=n;n=0}n||=0;s||=createDefaultEqualityComparer();const i=skip(t,n||0)[Symbol.iterator]();const o=r[Symbol.iterator]();let a=i.next();let l=o.next();while(!l.done){if(a.done||!s(a.value,l.value)){return false}a=i.next();l=o.next()}return true}function endsWith(t,r,n,s){if(typeof n!=="number"){s=n;n=undefined}const i=asArray(r);const o=typeof n==="number"?take(t,n):t;const a=takeLast(o,i.length);return sequenceEqual(a,i,s)}function findIndex(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){if(r(n,s,t)){return s}++s}return-1}function first(t,r,n){if(!r){for(const r of t){return r}return undefined}r=n===undefined?r:r.bind(n);let s=0;for(const n of t){if(r(n,s++,t)){return n}}return undefined}function last(t,r,n){if(!r){let r=undefined;for(const n of t){r=n}return r}r=n===undefined?r:r.bind(n);let s=0;let i=undefined;for(const n of t){if(r(n,s++,t)){i=n}}return i}function at(t,r){if(Array.isArray(t)){return t.at(r)}const n=r<0;if(n){return first(takeLast(t,-r))}return first(skip(t,r))}function join(t,r){return asArray(t).join(r)}function*concat(...t){for(const r of t){yield*r}}function*prepend(t,r){yield r;yield*t}function*append(t,r){yield*t;yield r}function pop(t){const r=[...t];const n=r.pop();return[n,r]}function shift(t){const r=t[Symbol.iterator]();const n=r.next();const s=n.done?undefined:n.value;return[s,{[Symbol.iterator]:()=>r}]}function forEach(t,r,n){r=n===undefined?r:r.bind(n);let s=0;for(const n of t){r(n,s++,t)}}function asArray(t){return Array.isArray(t)?t:[...t]}function asArrayLike(t){return Array.isArray(t)?t:iterable_$i(t)}function iterable_$i(t){return t instanceof ArrayLikeIterable?t:ArrayLikeIterable.from(t)}class ArrayLikeIterable{_iterable;constructor(t){this._iterable=t}static from(t){return new ArrayLikeIterable(t)}static of(t){return new ArrayLikeIterable({[Symbol.iterator]:()=>t})}get length(){return this.count()}filter(t,r){return ArrayLikeIterable.from(filter(this._iterable,t,r))}map(t,r){return ArrayLikeIterable.from(map(this._iterable,t,r))}flatMap(t,r){return ArrayLikeIterable.from(flatMap(this._iterable,t,r))}reduce(t,r,n){return reduce(this._iterable,t,r,n)}skip(t){return ArrayLikeIterable.from(skip(this._iterable,t))}take(t){return ArrayLikeIterable.from(take(this._iterable,t))}takeLast(t){return ArrayLikeIterable.from(takeLast(this._iterable,t))}slice(t,r){return ArrayLikeIterable.from(slice(this._iterable,t,r))}reverse(){return ArrayLikeIterable.from(reverse(this._iterable))}sort(t){return ArrayLikeIterable.from(sort(this._iterable,t))}every(t,r){return every(this._iterable,t,r)}some(t,r){return some(this._iterable,t,r)}min(t,r){return min(this._iterable,t,r)}max(t,r){return max(this._iterable,t,r)}count(t,r){return count(this._iterable,t,r)}indexOf(t,r,n){return indexOf(this._iterable,t,r,n)}lastIndexOf(t,r,n){return lastIndexOf(this._iterable,t,r,n)}includes(t,r,n){return includes(this._iterable,t,r,n)}sequenceEqual(t,r){return sequenceEqual(this._iterable,t,r)}startsWith(t,r,n){return startsWith(this._iterable,t,r,n)}endsWith(t,r,n){return endsWith(this._iterable,t,r,n)}findIndex(t,r){return findIndex(this._iterable,t,r)}find(t,r){return this.first(t,r)}first(t,r){return first(this._iterable,t,r)}last(t,r){return last(this._iterable,t,r)}at(t){return at(this._iterable,t)}join(t){return join(this._iterable,t)}concat(...t){return ArrayLikeIterable.from(concat(this._iterable,...t))}prepend(t){return ArrayLikeIterable.from(prepend(this._iterable,t))}append(t){return ArrayLikeIterable.from(append(this._iterable,t))}shift(){const[t,r]=shift(this._iterable);return[t,ArrayLikeIterable.from(r)]}unshift(t){return this.prepend(t)}push(t){return this.append(t)}pop(){const[t,r]=pop(this._iterable);return[t,ArrayLikeIterable.from(r)]}keys(){return map(this._iterable,((t,r)=>r))}values(){return this._iterable}entries(){return map(this._iterable,((t,r)=>[r,t]))}forEach(t,r){return forEach(this._iterable,t,r)}asArray(){return asArray(this._iterable)}toArray(){return[...this._iterable]}toMap(t){return t?new ArrayMap(this._iterable,t):new Map(this._iterable)}toSet(t){return t?new ArraySet(this._iterable,t):new Set(this._iterable)}toRecord(){return reduce(this._iterable,((t,[r,n])=>{t[r]=n;return t}),{})}distinct(t){return ArrayLikeIterable.from(distinct(this._iterable,t))}distinctBy(t,r){return ArrayLikeIterable.from(distinctBy(this._iterable,t,r))}[Symbol.iterator](){return this._iterable[Symbol.iterator]()}get[Symbol.toStringTag](){return"Iterable"}}function isMap(t){if(t instanceof Map){return true}const r=t;return!!r&&typeof r.keys==="function"&&typeof r.values==="function"&&typeof r.entries==="function"&&typeof r.get==="function"&&typeof r.set==="function"&&typeof r.has==="function"&&typeof r.delete==="function"&&typeof r[Symbol.iterator]==="function"}function isReadOnlyMap(t){if(t instanceof Map){return true}const r=t;return!!r&&typeof r.keys==="function"&&typeof r.values==="function"&&typeof r.entries==="function"&&typeof r.get==="function"&&typeof r.has==="function"&&typeof r[Symbol.iterator]==="function"}function map_isMultiMap(t){if(t instanceof MultiMap){return true}const r=t;return isMap(r)&&typeof r.append==="function"}class ArrayMap{_keys;_values;_comparer;constructor(t,r){r??=typeof t==="function"?t:createDefaultEqualityComparer();this._keys=[];this._values=[];this._comparer=r;const n=t&&t!==r?t:[];for(const[t,r]of n){this.set(t,r)}}get size(){return this._keys.length}get(t){const r=iterable_$i(this._keys).indexOf(t,this._comparer);return this._values[r]}set(t,r){const n=iterable_$i(this._keys).indexOf(t,this._comparer);if(n===-1){this._keys.push(t);this._values.push(r)}else{this._keys[n]=t;this._values[n]=r}return this}has(t){return iterable_$i(this._keys).includes(t,this._comparer)}delete(t){const r=iterable_$i(this._keys).indexOf(t,this._comparer);if(r===-1){return false}this._keys.splice(r,1);this._values.splice(r,1);return true}clear(){this._keys.splice(0);this._values.splice(0)}keys(){return this._keys[Symbol.iterator]()}values(){return this._values[Symbol.iterator]()}*entries(){const t=this._keys;const r=this._values;for(let n=0;n<t.length;++n){yield[t[n],r[n]]}}forEach(t,r){t=r===undefined?t:t.bind(r);const n=this._keys;const s=this._values;for(let r=0;r<n.length;++r){t(s[r],n[r],this)}}[Symbol.iterator](){return this.entries()}get[Symbol.toStringTag](){return"Map"}}class MultiMap extends ArrayMap{getFirst(t){return this.get(t)?.[0]}set(t,r){const n=typeof r!=="string"&&iterable_isIterable(r)?asArray(r):[r];return super.set(t,n)}append(t,r){const n=this.get(t);if(!n){return this.set(t,r)}if(typeof r!=="string"&&iterable_isIterable(r)){n.push(...r)}else{n.push(r)}return this}delete(t,r,n){if(r===undefined){return super.delete(t)}const s=this.get(t);if(!s){return false}const i=iterable_$i(s).indexOf(r,n);if(i===-1){return false}s.splice(i,1);return true}flatValues(){return iterable_$i(this.values()).flatMap((t=>t))}flatEntries(){return iterable_$i(this.entries()).flatMap((([t,r])=>iterable_$i(r).map((r=>[t,r]))))}forEachFlat(t,r){t=r===undefined?t:t.bind(r);for(const[r,n]of this.flatEntries()){t(n,r,this)}}}function isKeyValueIterable(t){return typeof t?.entries==="function"}function defineNestedProperties(t,r,n){const s=isIterable(r)?r:Object.entries(r);for(const[r,i]of s){defineNestedProperty(t,r,i,n)}return t}function defineNestedProperty(t,r,n,s){r=typeof r==="string"?r.split("."):r;s||=()=>({value:{},writable:true,configurable:true,enumerable:true});let i=t;const o=r.length-1;for(let t=0;t<o;++t){const n=r[t];const o=i[n];if(o===undefined||o===null){const t=s(i,n);Object.defineProperty(i,n,t)}i=i[n]}const a=r[o];Object.defineProperty(i,a,n);return t}function*getAllPropertyDescriptors(t){const r=new Set;while(t!==undefined&&t!==null){const n=Array.prototype.concat(Object.getOwnPropertyNames(t),Object.getOwnPropertySymbols(t));const s=Object.getOwnPropertyDescriptors(t);for(const t of n){if(!r.has(t)){r.add(t);yield[t,s[t]]}}t=Object.getPrototypeOf(t)}}function getPropertyDescriptor(t,r){r=typeof r==="number"?String(r):r;const n=Object.getOwnPropertyDescriptor(t,r);if(n){return n}return $i(getAllPropertyDescriptors(t)).find((([t])=>t===r))?.[1]}function getAllKeys(t){return iterable_$i(getAllPropertyDescriptors(t)).map((([t])=>t))}function getAllNames(t){return iterable_$i(getAllKeys(t)).filter((t=>typeof t==="string"))}function getAllSymbols(t){return $i(getAllKeys(t)).filter((t=>typeof t==="symbol"))}function getAllValues(t){return $i(getAllPropertyDescriptors(t)).map((([r])=>t[r]))}function getAllEntries(t){return $i(getAllPropertyDescriptors(t)).map((([r])=>[r,t[r]]))}function getOwnEntries(t){if(!t){return[]}if(!Array.isArray(t)&&isKeyValueIterable(t)){return t.entries()}if(iterable_isIterable(t)){const r=asArray(t);if(r.every((t=>Array.isArray(t)))){return r}}if(Array.isArray(t)){return t.entries()}return Object.entries(t)}function merge(...t){const r={};const n=$i(t).flatMap((t=>getAllPropertyDescriptors(t)));for(const[t,s]of n){Object.defineProperty(r,t,s)}return r}function getSafe(t,r){if(t===null||t===undefined){return undefined}try{return t[r]}catch{return undefined}}function isInvalid(t){return t===null||t===undefined||typeof t==="number"&&isNaN(t)}function toUndefined(t){return undefined}function convert_toString(t){return isInvalid(t)?undefined:String(t)}function toBoolean(t){if(isInvalid(t)){return undefined}switch(typeof t){case"boolean":return!!t;case"number":return t!==0;case"string":if(stringEquals("true",t,{ignoreCase:true})){return true}if(stringEquals("false",t,{ignoreCase:true})){return false}break;default:return undefined}return undefined}function toNumber(t,r){if(isInvalid(t)){return undefined}switch(typeof t){case"number":return r(t);case"boolean":return t?1:0;case"string":const n=r(t);return isNaN(n)?undefined:n;case"object":if(t instanceof Date&&!isNaN(t.getTime())){return t.getTime()}break;default:return undefined}return undefined}function toInteger(t){return toNumber(t,parseInt)}function toFloat(t){return toNumber(t,parseFloat)}function toDate(t){if(isInvalid(t)){return undefined}switch(typeof t){case"object":if(t instanceof Date&&!isNaN(t.getTime())){return t}break;case"string":case"number":const r=new Date(t);return isNaN(r.getTime())?undefined:r;default:return undefined}return undefined}const $=/\/(?<pattern>.*)\/(?<flags>[a-z]*)/;function toRegExp(t){if(t instanceof RegExp){return t}if(typeof t!=="string"){return undefined}const r=t.match($);if(!r){return undefined}try{return new RegExp(r.groups.pattern,r.groups.flags)}catch{return undefined}}const L=["convert","from"];const F=["parse"];function getConverter(t,r){const n=[[L],[F,t=>r=>typeof r==="string"?t(r):undefined]];const s=r?[...n].reverse():n;for(const[r,n]of s){const s=getParseLikeFunction(t,r);if(!s){continue}const i=n?n(s):s;return i}return undefined}function getParseLikeFunction(t,r){if(isInvalid(t)){return undefined}const n=iterable_$i(r).first((r=>typeof getSafe(t,r)==="function"));if(n){return r=>t[n](r)}const s=getAllNames(t);const i=iterable_$i(s).filter((n=>r.some((r=>n.startsWith(r)&&typeof getSafe(t,n)==="function"))));const o=iterable_$i(i).min(((t,n)=>r.findIndex((r=>t.startsWith(r)))-r.findIndex((t=>n.startsWith(t)))));if(!o){return undefined}return r=>t[o](r)}const M=new Map([[String,convert_toString],[Number,toFloat],[Boolean,toBoolean],[Date,toDate],[RegExp,toRegExp]]);const B=new Map([["string",convert_toString],["number",toFloat],["boolean",toBoolean],["undefined",toUndefined]]);function toType(t,r){if(isInvalid(t)){return undefined}if(typeof r==="string"){const n=B.get(r);if(n){return n(t)}const s=globalThis[r];if(s){return toType(t,s)}return undefined}if(typeof r==="function"&&M.has(r)){const n=M.get(r);return n(t)}try{const n=getConverter(r,typeof t==="string");if(n!==undefined){const r=n(t);return isInvalid(r)?undefined:r}return new r(t)}catch{return undefined}}function enumKeys(t){if(isReadOnlyMap(t)){return[...t.keys()]}return Object.getOwnPropertyNames(t).filter((r=>isEnumKey(t,r)))}function isEnumKey(t,r){return typeof t[r]!=="function"&&r!==String(+r)}function enumEntries(t){if(isReadOnlyMap(t)){return[...t.entries()]}return enumKeys(t).map((r=>[r,t[r]]))}class DynamicEnum{_keys;_values;_names;_descriptor;_hasFlags;_comparer;constructor(t,r){this._keys=t.map((([t])=>t));this._values=t.map((([,t])=>t));this._names=new Map(r?.names||[]);this._descriptor=inferEnumDescriptorOrThrow(this._values);this._hasFlags=r?.hasFlags??false;this._comparer=r?.comparer||T;const n=iterable_$i(t).map((([t,r])=>[t,{value:r,enumerable:true}])).toRecord();Object.defineProperties(this,n)}static create(t,r){const n=enumEntries(t);return new DynamicEnum(n,r)}get[Symbol.toStringTag](){return"Enum"}get size(){return this._keys.length}get underlyingType(){return this._descriptor.name}hasFlag(t,r){return this._descriptor.hasFlag(t,r)}get(t){const r=this[t];if(typeof r===this.underlyingType||this._comparer===T){return r}const n=this._comparer;const s=this._keys;const i=this._values;for(let r=0;r<s.length;++r){if(n(t,s[r])){return i[r]}}return undefined}keyOf(t){const r=this._values.indexOf(t);return r>=0?this._keys[r]:undefined}friendlyNameOf(t){const r=this.keyOf(t);if(r===undefined){return undefined}const n=this._names.get(r)??toPascalCase(r);return n}find(t,r){const n=this.findKey(t,r);return n===undefined?undefined:this.get(n)}findKey(t,r){t=r===undefined?t:t.bind(r);const n=this._keys;const s=this._values;for(let r=0;r<s.length;++r){if(t(s[r],n[r],this)){return n[r]}}return undefined}has(t){return this.get(t)!==undefined}includes(t){return this._values.includes(t)}keys(){return this._keys[Symbol.iterator]()}values(){return this._values[Symbol.iterator]()}*entries(){const t=this._keys;const r=this._values;for(let n=0;n<t.length;++n){yield[t[n],r[n]]}}[Symbol.iterator](){return this.entries()}forEach(t,r){t=r===undefined?t:t.bind(r);const n=this._keys;const s=this._values;for(let r=0;r<n.length;++r){t(s[r],n[r],this)}}format(t){if(typeof t!==this.underlyingType){return undefined}const r=this.keyOf(t);if(r!==undefined){return r}if(!this._hasFlags){return String(t)}const n=this._keys;const s=this._values;const i=this._descriptor;let o="";let a=t;for(let t=s.length-1;t>=0;--t){const r=s[t];const l=r===i.defaultValue;const c=i.hasFlag(a,r);if(l||!c){continue}o=o?`${n[t]}${O} ${o}`:n[t];a=i.removeFlag(a,r)}return a===i.defaultValue&&o?o:String(t)}parse(t){const r=this.findOrParseValue(t);if(r!==undefined){return r}if(!this._hasFlags){return undefined}const n=split(t,D,{trimEntries:true,removeEmptyEntries:true});const s=this._descriptor;let i=s.defaultValue;for(const t of n){const r=this.findOrParseValue(t);if(r===undefined){return undefined}i=s.addFlag(i,r)}return i}findOrParseValue(t){const r=this.get(t);if(r!==undefined){return r}const n=toType(t,this.underlyingType);if(n!==undefined){return n}return undefined}}function enumValues(t){if(isReadOnlyMap(t)){return[...t.values()]}return enumKeys(t).map((r=>t[r]))}function hasFlag(t,r){const n=getEnumDescriptorByUnderlyingType(typeof r);return!!n?.hasFlag(t,r)}function createEnum(t,r,n){const s=typeof t==="function"?t():t;const i=toDynamicEnumOptions(r);const o=DynamicEnum.create(s,i);if(n){Object.assign(o,n)}return o}function toDynamicEnumOptions(t){if(!t||t.comparer){return t}const r=t;const n=r.ignoreCase?r.ignoreNonWordCharacters?N:I:r.ignoreNonWordCharacters?P:T;return{...r,comparer:n}}const j={hasFlag:hasFlag,create:createEnum,keys:enumKeys,values:enumValues,entries:enumEntries};const W=t(import.meta.url)("node:util");var U;(function(t){t[t["NONE"]=0]="NONE";t[t["RELEASES"]=1]="RELEASES";t[t["BETAS"]=2]="BETAS";t[t["ALPHAS"]=4]="ALPHAS";t[t["SNAPSHOTS"]=6]="SNAPSHOTS";t[t["ANY"]=7]="ANY";t[t["MIN_PATCH"]=8]="MIN_PATCH";t[t["MAX_PATCH"]=16]="MAX_PATCH";t[t["MIN_MINOR"]=32]="MIN_MINOR";t[t["MAX_MINOR"]=64]="MAX_MINOR";t[t["MIN_MAJOR"]=128]="MIN_MAJOR";t[t["MAX_MAJOR"]=256]="MAX_MAJOR";t[t["MIN"]=168]="MIN";t[t["MAX"]=336]="MAX"})(U||(U={}));const q={hasFlags:true,ignoreCase:true,ignoreNonWordCharacters:true};function game_version_filter_filter(t,r){let n=[...t];if(r===G.NONE||!r){return n}n=filterVersionType(n,r);n=applyVersionRange(n,(t=>t.version.major),r,G.MIN_MAJOR,G.MAX_MAJOR);n=applyVersionRange(n,(t=>t.version.minor),r,G.MIN_MINOR,G.MAX_MINOR);n=applyVersionRange(n,(t=>t.version.patch),r,G.MIN_PATCH,G.MAX_PATCH);return n}function filterVersionType(t,r){const n=G.hasFlag(r,G.RELEASES);const s=G.hasFlag(r,G.BETAS);const i=G.hasFlag(r,G.ALPHAS);const o=n&&s&&i||!(n||s||i);if(!o){return t.filter((t=>(!t.isRelease||n)&&(!t.isBeta||s)&&(!t.isAlpha||i)))}return t}function applyVersionRange(t,r,n,s,i){const o=G.hasFlag(n,s)?-1:G.hasFlag(n,i)?1:0;if(!o){return t}const a=t.reduce(((t,n)=>Math.sign(r(n)-t)===o?r(n):t),o===1?Number.MIN_SAFE_INTEGER:Number.MAX_SAFE_INTEGER);return t.filter((t=>r(t)===a))}function _fromVersionResolver(t){if(stringEquals(t,"exact",{ignoreCase:true})){return U.MIN|U.RELEASES}if(stringEquals(t,"latest",{ignoreCase:true})){return U.MIN_MAJOR|U.MIN_MINOR|U.MAX_PATCH|U.RELEASES}if(stringEquals(t,"all",{ignoreCase:true})){return U.MIN_MAJOR|U.MIN_MINOR}return U.MIN_MAJOR|U.MIN_MINOR|U.RELEASES}const H=(0,W.deprecate)(_fromVersionResolver,"Use the new `game-version-filter` input instead of the deprecated `version-resolver` one.");const V={filter:game_version_filter_filter,fromVersionResolver:H};const G=j.create(U,q,V);var z=s(1383);function parseVersion(t){return SemVerVersion.parse(t)}const Y=/[a-z]{0,2}((\d+\.\d+)(\.\d+)?(.*))/i;class SemVerVersion{_semver;_version;constructor(t,r){this._semver=t;this._version=r??t.format()}static parse(t){const r=(0,z.parse)(t);if(r){return new SemVerVersion(r,t)}const n=t.match(Y);if(n){const t=n[3]?n[1]:`${n[2]}.0${n[4]}`;const r=(0,z.parse)(t)||(0,z.coerce)(t);return new SemVerVersion(r,n[0])}return undefined}get major(){return this._semver.major}get minor(){return this._semver.minor}get patch(){return this._semver.patch}compare(t){if(t===null||t===undefined){return 1}if(typeof t==="string"){t=SemVerVersion.parse(t)}return t instanceof SemVerVersion?this._semver.compare(t._semver):-t.compare(this)}format(){return this._semver.format()}toString(){return this._version}}function parseVersionRange(t){return SemVerVersionRange.parse(t)}function anyVersionRange(t){return SemVerVersionRange.any(t)}function noneVersionRange(t){return SemVerVersionRange.none(t)}const Q=/(?:\[|\()[^\])]+(?:\]|\))/g;function mixedToSemver(t){return t.replace(Q,intervalToSemver)}const K=/(?<from_bracket>\[|\()\s*(?<from>[^,\s]+)?\s*(?<separator>,)?\s*(?<to>[^,\s\])]+)?\s*(?<to_bracket>\]|\))/;function intervalToSemver(t){const r=t.match(K);if(!r){return""}const n=r.groups.from_bracket==="["?">=":">";const s=r.groups.from;const i=r.groups.separator;const o=r.groups.to_bracket==="]"?"<=":"<";const a=r.groups.to;if(!s&&!a){return"*"}if(!s){return`${o}${a}`}if(!i){return s}if(!a){return`${n}${s}`}return`${n}${s} ${o}${a}`}const X=/((?:\d+|[Xx*])(?:\.\d+|\.[Xx*]))(\.\d+|\.[Xx*])?([\w\-.+]*)/g;function fixMissingPatchVersion(t){return t.replace(X,((t,r,n,s)=>n?t:`${r}.0${s}`))}class SemVerVersionRange{static ANY=new SemVerVersionRange(new z.Range("*"),"*");static NONE=new SemVerVersionRange(new z.Range("<0.0.0"));_semver;_range;constructor(t,r){this._semver=t;this._range=r??t.format()}static any(t){if(!t||t===SemVerVersionRange.ANY._range){return SemVerVersionRange.ANY}return new SemVerVersionRange(SemVerVersionRange.ANY._semver,t)}static none(t){if(!t||t===SemVerVersionRange.NONE._range){return SemVerVersionRange.NONE}return new SemVerVersionRange(SemVerVersionRange.NONE._semver,t)}static parse(t){const r=(typeof t==="string"?[t]:asArray(t)).map((t=>t.trim()));const n=r.join(" || ");const s=r.map(mixedToSemver).map(fixMissingPatchVersion).join(" || ");try{const t=new z.Range(s,{includePrerelease:true});return new SemVerVersionRange(t,n)}catch{return undefined}}includes(t){if(typeof t==="string"){t=parseVersion(t)}const r=t?._semver;return this._semver.test(r||t.format())}format(){return this._semver.format()}toString(){return this._range}}var J;(function(t){t["ALPHA"]="alpha";t["BETA"]="beta";t["RELEASE"]="release"})(J||(J={}));const Z={ignoreCase:true};function parseFromFileName(t){if(t.match(/[+-_]alpha/i)){return te.ALPHA}if(t.match(/[+-_]beta/i)){return te.BETA}return te.RELEASE}const ee={parseFromFileName:parseFromFileName};const te=j.create(J,Z,ee);var re;(function(t){t["RELEASE"]="release";t["SNAPSHOT"]="snapshot";t["OLD_BETA"]="old_beta";t["OLD_ALPHA"]="old_alpha"})(re||(re={}));const ne={ignoreCase:true,ignoreNonWordCharacters:true};function toVersionType(t,r){switch(t){case ie.SNAPSHOT:return r?.match(/-pre|-rc|-beta|Pre-[Rr]elease|[Rr]elease Candidate/)?te.BETA:te.ALPHA;case ie.OLD_BETA:return te.BETA;case ie.OLD_ALPHA:return te.ALPHA;default:return te.RELEASE}}const se={toVersionType:toVersionType};const ie=j.create(re,ne,se);class MinecraftVersion{_id;_version;_mcType;_type;_url;_releaseDate;constructor(t,r,n,s,i){this._id=t;this._version=r;this._mcType=n;this._type=ie.toVersionType(n,String(r));this._url=s;this._releaseDate=i}get id(){return this._id}get version(){return this._version}get type(){return this._type}get url(){return this._url}get releaseDate(){return this._releaseDate}get isAlpha(){return this._type===te.ALPHA}get isBeta(){return this._type===te.BETA}get isSnapshot(){return!this.isRelease}get isRelease(){return this._type===te.RELEASE}get isOldAlpha(){return this._mcType===ie.OLD_ALPHA}get isOldBeta(){return this._mcType===ie.OLD_BETA}toString(){return this._id}}function getMinecraftVersionManifestEntries(t){return t.versions.map((t=>({...t,releaseDate:new Date(t.releaseTime)}))).sort(((t,r)=>r.releaseDate.valueOf()-t.releaseDate.valueOf()))}const oe="mc-publish";class MiddlewareHandler{_target;_delegates;constructor(t){this._target=t;this._delegates=[]}use(t){this._delegates.push(t);return this}execute(...t){return this.asFunction()(...t)}asFunction(){if(!this._delegates.length){return this._target}const t=this._target;const r=[...this._delegates];const apply=n=>(...s)=>n<r.length?r[n](...s,apply(n+1)):t(...s);return apply(0)}}var ae=s(7561);var le=s(2185);const ce=null&&BlobPolyfill;function isBlob(t){const r=t?.[Symbol.toStringTag];return r==="Blob"||r==="File"}function readBlob(t){return blobFrom(t)}function readBlobSync(t){return(0,le.SX)(t)}var ue;(function(t){t[t["NONE"]=0]="NONE";t[t["GAME_VERSION_SUBSET"]=1]="GAME_VERSION_SUBSET";t[t["GAME_VERSION_INTERSECTION"]=2]="GAME_VERSION_INTERSECTION";t[t["GAME_VERSION_ANY"]=4]="GAME_VERSION_ANY";t[t["VERSION_TYPE_SUBSET"]=8]="VERSION_TYPE_SUBSET";t[t["VERSION_TYPE_INTERSECTION"]=16]="VERSION_TYPE_INTERSECTION";t[t["VERSION_TYPE_ANY"]=32]="VERSION_TYPE_ANY";t[t["LOADER_SUBSET"]=64]="LOADER_SUBSET";t[t["LOADER_INTERSECTION"]=128]="LOADER_INTERSECTION";t[t["LOADER_ANY"]=256]="LOADER_ANY";t[t["SUBSET"]=73]="SUBSET";t[t["INTERSECTION"]=146]="INTERSECTION";t[t["ANY"]=292]="ANY"})(ue||(ue={}));const fe={hasFlags:true,ignoreCase:true,ignoreNonWordCharacters:true};function isNone(t){return t===pe.NONE}function isSubset(t){return pe.hasFlag(t,pe.GAME_VERSION_SUBSET)||pe.hasFlag(t,pe.VERSION_TYPE_SUBSET)||pe.hasFlag(t,pe.LOADER_SUBSET)}function isIntersection(t){return pe.hasFlag(t,pe.GAME_VERSION_INTERSECTION)||pe.hasFlag(t,pe.VERSION_TYPE_INTERSECTION)||pe.hasFlag(t,pe.LOADER_INTERSECTION)}function isAny(t){return!isSubset(t)&&!isIntersection(t)}function getGameVersionMode(t){if(pe.hasFlag(t,pe.GAME_VERSION_SUBSET)){return pe.GAME_VERSION_SUBSET}if(pe.hasFlag(t,pe.GAME_VERSION_INTERSECTION)){return pe.GAME_VERSION_INTERSECTION}return pe.GAME_VERSION_ANY}function getVersionTypeMode(t){if(pe.hasFlag(t,pe.VERSION_TYPE_SUBSET)){return pe.VERSION_TYPE_SUBSET}if(pe.hasFlag(t,pe.VERSION_TYPE_INTERSECTION)){return pe.VERSION_TYPE_INTERSECTION}return pe.VERSION_TYPE_ANY}function getLoaderMode(t){if(pe.hasFlag(t,pe.LOADER_SUBSET)){return pe.LOADER_SUBSET}if(pe.hasFlag(t,pe.LOADER_INTERSECTION)){return pe.LOADER_INTERSECTION}return pe.LOADER_ANY}function satisfies(t,r,n){if(isAny(n)){return true}if(!iterable_isIterable(r)||!iterable_isIterable(t)){return r===t}const s=asArray(r);if(isSubset(n)){return asArrayLike(t).every((t=>s.includes(t)))}return asArrayLike(t).some((t=>s.includes(t)))}function shouldUnfeature(t,r,n){if(t.id===r.id){return false}const s=getGameVersionMode(n);const i=getVersionTypeMode(n);const o=getLoaderMode(n);return satisfies(t.game_versions||[],r.game_versions||[],s)&&satisfies(t.version_type||te.RELEASE,r.version_type||te.RELEASE,i)&&satisfies(t.loaders||[],r.loaders||[],o)}const de={isNone:isNone,isSubset:isSubset,isIntersection:isIntersection,isAny:isAny,getGameVersionMode:getGameVersionMode,getVersionTypeMode:getVersionTypeMode,getLoaderMode:getLoaderMode,shouldUnfeature:shouldUnfeature};const pe=j.create(ue,fe,de);const he="aes-256-cbc";const me=32;const ge=16;const ye=new WeakMap;const be=new WeakMap;const _e=new WeakMap;class SecureString{constructor(t,r,n){ye.set(this,t);be.set(this,r);_e.set(this,n)}static from(t){if(t instanceof SecureString){return t}const r=Buffer.from(t||"");const n=(0,E.randomBytes)(me);const s=(0,E.randomBytes)(ge);const i=(0,E.createCipheriv)(he,n,s);const o=Buffer.concat([i.update(r),i.final()]);return new SecureString(o,n,s)}unwrap(){const t=ye.get(this);const r=be.get(this);const n=_e.get(this);if(!t||!r||!n){throw new Error("The SecureString instance was not properly initialized.")}const s=(0,E.createDecipheriv)(he,r,n);const i=Buffer.concat([s.update(t),s.final()]);return i.toString()}get[Symbol.toStringTag](){return"SecureString"}toString(){return"*****"}toJSON(){return this.toString()}}function isError(t){return t instanceof Error}class argument_error_ArgumentError extends Error{static DEFAULT_ARGUMENT_ERROR_MESSAGE="Value does not fall within the expected range.";static EMPTY_ARGUMENT_ERROR_MESSAGE="The value cannot be null, undefined, or empty.";static PARAM_NAME_MESSAGE_PATTERN=t=>t?` (Parameter '${t}')`:"";_paramName;constructor(t,r,n){super(argument_error_ArgumentError.formatErrorMessage(r,t),n);this.name="ArgumentError";this._paramName=t}get paramName(){return this._paramName}static throwIfNullOrEmpty(t,r,n){if(t===undefined||t===null||t.length===0){throw new argument_error_ArgumentError(r,n||argument_error_ArgumentError.EMPTY_ARGUMENT_ERROR_MESSAGE)}}static formatErrorMessage(t,r){t??=argument_error_ArgumentError.DEFAULT_ARGUMENT_ERROR_MESSAGE;t+=argument_error_ArgumentError.PARAM_NAME_MESSAGE_PATTERN(r);return t}}class ArgumentNullError extends argument_error_ArgumentError{static DEFAULT_ARGUMENT_NULL_ERROR_MESSAGE="Value cannot be null or undefined.";constructor(t,r,n){super(t,r??ArgumentNullError.DEFAULT_ARGUMENT_NULL_ERROR_MESSAGE,n);this.name="ArgumentNullError"}static throwIfNull(t,r,n){if(t===undefined||t===null){throw new ArgumentNullError(r,n)}}}const Se=t(import.meta.url)("node:os");const Ee=process.env;const ve="\r\n";const Re="\n";const we=Se.EOL;function environment_getEnvironmentVariable(t,r){r||=Ee;const n=r[t];return n===undefined?undefined:string_utils_asString(n)}function*getAllEnvironmentVariables(t){t||=Ee;for(const[r,n]of Object.entries(t)){if(n===undefined){continue}yield[r,string_utils_asString(n)]}}function environment_setEnvironmentVariable(t,r,n){n||=Ee;if(r===undefined){delete n[t]}else{n[t]=asString(r)}}function isDebug(t){return environment_getEnvironmentVariable("RUNNER_DEBUG",t)==="1"}function isGitHubAction(t){return environment_getEnvironmentVariable("GITHUB_ACTIONS",t)==="true"}function isWindows(t){t??=process.platform;return t==="win32"}function isMacOs(t){t??=process.platform;return t==="darwin"}function isLinux(t){t??=process.platform;return t==="linux"}const Ce=t(import.meta.url)("node:console");const Ae={error:Ce.error,warn:Ce.warn,info:Ce.info,debug:Ce.debug};class ConsoleLogger{_console;constructor(t){this._console=t||Ae}fatal(t){this._console.error(t)}error(t){this._console.error(t)}warn(t){this._console.warn(t)}info(t){this._console.info(t)}debug(t){this._console.debug(t)}}class NullLogger{fatal(t){}error(t){}warn(t){}info(t){}debug(t){}}class ProcessLogger{_logConsumer;_newline;constructor(t,r){if(typeof t==="function"){this._logConsumer=t}else{const r=t??globalThis.process;this._logConsumer=typeof r.stdout?.write==="function"?t=>r.stdout.write(t):()=>{}}this._newline=r??we}fatal(t){this.error(t)}error(t){this.log(t,"error")}warn(t){this.log(t,"warning")}info(t){this.log(t)}debug(t){this.log(t,"debug")}log(t,r){const n=r?`::${r}::`:"";this._logConsumer(`${n}${t}${this._newline}`)}}const Te=new NullLogger;const Ie=new ConsoleLogger;const Pe=new ProcessLogger;function getDefaultLogger(t){return isGitHubAction(t)?Pe:Ie}class Stopwatch{_isRunning;_startTime;_elapsedTime;_onStart;_onStop;constructor(t,r){this._isRunning=false;this._startTime=0;this._elapsedTime=0;this._onStart=t;this._onStop=r}get elapsedMilliseconds(){return this._elapsedTime+(this._isRunning?Date.now()-this._startTime:0)}get isRunning(){return this._isRunning}start(){if(this._isRunning){return false}this._startTime=Date.now();this._isRunning=true;this._onStart?.(new Date,this);return true}stop(){if(!this._isRunning){return false}this._elapsedTime+=Date.now()-this._startTime;this._isRunning=false;this._onStop?.(this._elapsedTime,new Date,this);return true}reset(){this.stop();this._elapsedTime=0}restart(){this.reset();this.start()}static startNew(t,r){const n=new Stopwatch(t,r);n.start();return n}}function createMessageCallback(t,r){if(typeof r==="string"){return()=>t.info(r)}if(!r){return undefined}return(...n)=>{const s=r(...n);if(typeof s==="string"){t.info(s)}}}class LoggingStopwatch extends Stopwatch{constructor(t,r,n){const s=createMessageCallback(t,r);const i=createMessageCallback(t,n);super(s,i)}static startNew(t,r,n){const s=new LoggingStopwatch(t,r,n);s.start();return s}}var Ne;(function(t){t[t["FAIL"]=0]="FAIL";t[t["WARN"]=1]="WARN";t[t["SKIP"]=2]="SKIP"})(Ne||(Ne={}));const De={ignoreCase:true};const Oe=j.create(Ne,De);class ErrorBuilder{_logger;_errors;constructor(t){this._logger=t||Te;this._errors=[]}get hasErrors(){return this._errors.length>0}append(t,r){switch(r??Oe.SKIP){case Oe.WARN:this._logger.error(t);break;case Oe.SKIP:this._logger.error(t);this._errors.push(t);break;default:throw t}}build(){return this.hasErrors?new AggregateError(this._errors):undefined}throwIfHasErrors(){const t=this.build();if(t){throw t}}}class SoftError extends Error{_isSoft;constructor(t,r){super(r);this.name="SoftError";this._isSoft=t}get isSoft(){return this._isSoft}}function isSoftError(t){return!!t?.isSoft}class FileNotFoundError extends Error{static DEFAULT_FILE_NOT_FOUND_ERROR_MESSAGE_PATTERN=t=>t?`Could not find file '${t}'.`:"Could not find the specified file.";_fileName;constructor(t,r,n){super(r??FileNotFoundError.DEFAULT_FILE_NOT_FOUND_ERROR_MESSAGE_PATTERN(t),n);this.name="FileNotFoundError";this._fileName=t}get fileName(){return this._fileName}static throwIfNotFound(t,r){if(!(0,ae.existsSync)(t)){throw new FileNotFoundError(String(t),r)}}}class HttpError extends SoftError{_response;constructor(t,r,n){super(n??isServerError(t),r);this.name="HttpError";this._response=t}get response(){return this._response}static async fromResponse(t,r){const n=HttpResponse.cache(t);const s=`${t.status} (${await n.text().then((r=>r&&!isHtmlDocument(r)?`${t.statusText}, ${r}`:t.statusText)).catch((()=>t.statusText))})`;return new HttpError(n,s,r)}}function isHttpError(t){return t instanceof HttpError}function isServerError(t){return t&&(t.status===429||t.status>=500)}function isHtmlDocument(t){return t.startsWith("<!DOCTYPE html")}var ke=s(3664);var $e=s.n(ke);var Le=s(8119);var xe=s.n(Le);const Fe=t(import.meta.url)("node:fs/promises");var Me=s(9411);class FileInfo{_path;constructor(t){this._path=t}static of(t){if(t instanceof FileInfo){return t}return new FileInfo(String(t))}get name(){return(0,Me.basename)(this._path)}get directoryName(){return(0,Me.dirname)(this._path)}get path(){return this._path}get exists(){return(0,ae.existsSync)(this._path)}get size(){return(0,ae.statSync)(this._path).size}get[Symbol.for("path")](){return this._path}stream(t){return(0,ae.createReadStream)(this._path,t)}buffer(){return(0,Fe.readFile)(this._path)}async text(t){return(await this.buffer()).toString(t)}async json(t){return JSON.parse(await this.text(t))}toString(){return this._path}toJSON(){return this._path}}function fileEquals(t,r){const n=typeof t==="string"?t:t?.path;const s=typeof r==="string"?r:r?.path;return n===s}async function findFiles(t){const r=Array.isArray(t)?t:[t];const n=await Promise.all(r.map((t=>$e()(t))));return iterable_$i(n).flatMap((t=>t)).distinct().map((t=>new FileInfo(t))).toArray()}function findFilesSync(t){const r=Array.isArray(t)?t:[t];const n=r.map((t=>$e().sync(t)));return iterable_$i(n).flatMap((t=>t)).distinct().map((t=>new FileInfo(t))).toArray()}async function file_info_readFile(t){const r=await getFileName(t);return await(0,Fe.readFile)(r)}async function readAllText(t,r){return(await file_info_readFile(t)).toString(r)}async function readZippedFile(t,r){const n=await getFileName(t);let s=undefined;try{s=new(xe().async)({file:n});return await s.entryData(r)}finally{await(s?.close().catch((()=>undefined)))}}async function readAllZippedText(t,r,n){return(await readZippedFile(t,r)).toString(n)}function readFileSync(t){const r=getFileNameSync(t);return(0,ae.readFileSync)(r)}function readAllTextSync(t,r){return readFileSync(t).toString(r)}async function getFileName(t){if((0,ae.existsSync)(t)){return t.toString()}const r=await $e()(t.toString());if(r?.[0]){return r[0]}throw new FileNotFoundError(t.toString())}function getFileNameSync(t){if((0,ae.existsSync)(t)){return t.toString()}const r=$e().sync(t.toString());if(r?.[0]){return r[0]}throw new FileNotFoundError(t.toString())}var Be;(function(t){t["CURSEFORGE"]="curseforge";t["MODRINTH"]="modrinth";t["GITHUB"]="github"})(Be||(Be={}));const je={ignoreCase:true,ignoreNonWordCharacters:true,names:[["CURSEFORGE","CurseForge"],["GITHUB","GitHub"]]};const We=j.create(Be,je);var Ue;(function(t){t["REQUIRED"]="required";t["RECOMMENDED"]="recommended";t["EMBEDDED"]="embedded";t["OPTIONAL"]="optional";t["CONFLICTING"]="conflicting";t["INCOMPATIBLE"]="incompatible"})(Ue||(Ue={}));const qe={ignoreCase:true};const He=j.create(Ue,qe);var Ve;(function(t){t["DEPENDS"]="depends";t["RECOMMENDS"]="recommends";t["INCLUDES"]="includes";t["SUGGESTS"]="suggests";t["BREAKS"]="breaks";t["CONFLICTS"]="conflicts"})(Ve||(Ve={}));const Ge={ignoreCase:true};function toDependencyType(t){switch(t){case Ye.DEPENDS:return He.REQUIRED;case Ye.RECOMMENDS:return He.RECOMMENDED;case Ye.INCLUDES:return He.EMBEDDED;case Ye.SUGGESTS:return He.OPTIONAL;case Ye.BREAKS:return He.INCOMPATIBLE;case Ye.CONFLICTS:return He.CONFLICTING;default:return undefined}}function fromDependencyType(t){switch(t){case He.REQUIRED:return Ye.DEPENDS;case He.RECOMMENDED:return Ye.RECOMMENDS;case He.EMBEDDED:return Ye.INCLUDES;case He.OPTIONAL:return Ye.SUGGESTS;case He.CONFLICTING:return Ye.CONFLICTS;case He.INCOMPATIBLE:return Ye.BREAKS;default:return undefined}}const ze={toDependencyType:toDependencyType,fromDependencyType:fromDependencyType};const Ye=j.create(Ve,Ge,ze);function isLegacyDependencyFormat(t){return!!t?.includes("|")&&!t.includes("@")}function _parseLegacyDependencyFormat(t){const[r,n,s]=t.split("|").map((t=>t.trim()));const i=n&&Ye.toDependencyType(Ye.parse(n));return{id:r,type:i,versions:s}}const Qe=(0,W.deprecate)(_parseLegacyDependencyFormat,"The old dependency string format is deprecated. "+"Please use the new format. "+"Example: foo@1.0.0-2.0.0(required){modrinth:foo-fabric}#(ignore:curseforge)");function parseDependency(t){const r=isLegacyDependencyFormat(t)?Qe(t):parseDependencyFormat(t);return r&&createDependency(r)}const Ke=/^\s*(?<id>[^@{(#]+)(@(?<versionRange>[^@{(#]*))?(?:\((?<type>[^@{(#]*)\))?(?<aliases>(?:\{[^:=]+(?:=|:)[^}]*\})+)?(?<ignore>#\(ignore(?::(?<ignoredPlatforms>[^)]*))?\))?\s*$/;const Xe=/\{(?<platform>[^:=]+)(?:=|:)(?<id>[^}]*)\}/g;function parseDependencyFormat(t){const r=t?.match(Ke);if(!r){return undefined}const n=r.groups.id.trim();const s=r.groups.versionRange?.trim();const i=r.groups.type?.trim();const o=iterable_$i(r.groups.aliases?.matchAll(Xe)||[]).map((t=>[t.groups.platform.trim(),t.groups.id.trim()]));const a=r.groups.ignoredPlatforms?.split(",").map((t=>t.trim()));const l=a?.length?undefined:!!r.groups.ignore;return{id:n,versions:s,type:i,aliases:o,ignore:l,ignoredPlatforms:a}}function createDependency(t){if(typeof t==="string"){return parseDependency(t)}if(isDependency(t)){return t}if(!t?.id){return undefined}const r=t.id||"";const n=t.type&&He.parse(t.type)||He.REQUIRED;const s=typeof t.versions==="string"?[t.versions]:iterable_isIterable(t.versions)?[...t.versions]:[(t.versions||anyVersionRange()).toString()];const i=s.filter((t=>t&&t!==anyVersionRange().toString()));if(!i.length){i.push(anyVersionRange().toString())}const o=iterable_$i(t.ignoredPlatforms||[]).map((t=>We.parse(t))).filter((t=>t)).toSet();const a=t.ignore?()=>true:t=>t?o.has(t):o.size===We.size;const l=iterable_$i(t.aliases||[]).map((([t,r])=>[We.parse(t),r])).filter((([t])=>t)).toMap();const getProjectId=t=>l.get(t)??r;return{id:r,versions:i,type:n,isIgnored:a,getProjectId:getProjectId}}function formatDependency(t){if(!t){return""}const r=t.versions.join(" || ");const n=r&&r!==anyVersionRange().toString()?`@${r}`:"";const s=iterable_$i(We.values()).filter((r=>t.isIgnored(r))).join(",");const i=s&&`#(ignore:${s})`;const o=iterable_$i(We.values()).filter((r=>t.getProjectId(r)!==t.id)).map((r=>`{${r}:${t.getProjectId(r)}}`)).join("");return`${t.id}${n}(${t.type})${o}${i}`}function isDependency(t){const r=t;return typeof r?.id==="string"&&typeof r.type===He.underlyingType&&Array.isArray(r.versions)&&typeof r.getProjectId==="function"&&typeof r.isIgnored==="function"}class JavaVersion{_name;_versionNumber;constructor(t){this._name=`Java ${t}`;this._versionNumber=t}static parse(t){if(!t){return undefined}const r=t.match(/(\d+)\s*$/);if(!r){return undefined}return new JavaVersion(+r[1])}static of(t){if(t instanceof JavaVersion){return t}if(typeof t==="number"){return new JavaVersion(t)}return JavaVersion.parse(String(t))}get name(){return this._name}get versionNumber(){return this._versionNumber}toString(){return this._name}toJSON(){return this._name}}const ACTION_MODULE_LOADER=t=>{if(t==="platforms/modrinth/modrinth-unfeature-mode")return Promise.resolve(a);if(t==="utils/security/secure-string")return Promise.resolve(l);if(t==="utils/io/file-info")return Promise.resolve(u);if(t==="utils/versioning/version-type")return Promise.resolve(o);if(t==="dependencies/dependency")return Promise.resolve(d);if(t==="games/game-version-filter")return Promise.resolve(i);if(t==="utils/java/java-version")return Promise.resolve(p);if(t==="utils/errors/fail-mode")return Promise.resolve(c);if(t==="platforms/uploaded-file")return Promise.resolve(h);return Promise.resolve(undefined)};const Je=new Function("x","return import(x).catch(() => undefined)");const Ze=ACTION_MODULE_LOADER;const DEFAULT_MODULE_PROVIDER=()=>Promise.resolve(globalThis);const et="default";function formatImportDirective(t){if(!t){return undefined}const r=t.module?`${t.module}->`:"";const n=t.isDefault?t.name:`{${t.name}}`;return`${r}${n}`}function parseImportDirective(t){if(!t){return undefined}const r=t.split("->");const n=r.length>1?r[0]:undefined;const s=r[r.length-1];const i=!s.startsWith("{")&&!s.endsWith("}");const o=s.replaceAll(/^{|}$/g,"").trim();return{name:o,module:n,isDefault:i}}async function executeImportDirective(t,r){t=typeof t==="string"?parseImportDirective(t):t;const n=r?.moduleLoader||Je;const s=r?.defaultModuleProvider||DEFAULT_MODULE_PROVIDER;const i=await(t.module?n(t.module):s(t));if(r?.required&&!i){throw new Error(`Cannot find module "${t.module}".`)}if(!i){return undefined}const o=normalizeImportName(t.name);const a=i[t.isDefault?et:o]??i[o]??i[t.name];if(r?.required&&a===undefined){throw new Error(`Cannot find value "${t.name}" in the imported module${t.module?` "${t.module}"`:""}.`)}return{value:a,module:i}}function normalizeImportName(t){t=t?.trim();if(!t){return et}if(t.startsWith("[")||t.endsWith("]")){return Array.name}if(t.includes("<")&&t.includes(">")){const r=t.replaceAll(/<.*>/g,"");return normalizeImportName(r)}return t}var tt=s(8010);var rt=s(4037);const nt=tt.Ct;const st=Symbol.for("path");function isFormData(t){return t?.[Symbol.toStringTag]==="FormData"}function toFormData(t){if(typeof t!=="object"&&typeof t!=="function"){return undefined}if(isFormData(t)){return t}return iterable_$i(getOwnEntries(t)).flatMap((([t,r])=>Array.isArray(r)?iterable_$i(r).map((r=>[t,r])):[[t,r]])).filter((([,t])=>t!==undefined&&t!==null)).map((([t,r])=>[t,...toFormDataEntry(r)])).reduce(((t,[r,n,s])=>{t.append(String(r),n,s);return t}),new nt)}function toFormDataEntry(t){if(!t||typeof t!=="object"&&typeof t!=="function"){return[t===undefined?"":String(t)]}const r=t[st];if(typeof r==="string"){const t=readBlobSync(r);return[t,(0,Me.basename)(r)]}return[JSON.stringify(t)]}if(!rt.MultipartParser){isFormData(rt.MultipartParser)}class QueryString extends URLSearchParams{constructor(t){super(normalizeUrlParams(t))}static parse(t){return new QueryString(t)}get size(){return iterable_$i(this.entries()).count()}get(t){return super.get(t)??undefined}append(t,r){super.append(t,r);return this}set(t,r){super.set(t,r);return this}delete(t){const r=this.has(t);if(r){super.delete(t)}return r}clear(){for(const t of[...super.keys()]){this.delete(t)}}getString(t){return this.get(t)}getBoolean(t){const r=this.get(t);return r===""||toBoolean(r)}getNumber(t){const r=this.get(t);return toFloat(r)}getDate(t){const r=this.get(t);return toDate(r)}getRegExp(t){const r=this.get(t);return toRegExp(r)}forEach(t,r){super.forEach(t,r)}get[Symbol.toStringTag](){return super[Symbol.toStringTag]}}function isURLSearchParams(t){return t?.[Symbol.toStringTag]==="URLSearchParams"}function isQueryString(t){return t instanceof QueryString}function normalizeUrlParams(t){if(t===undefined||t===null){return undefined}if(typeof t==="string"){const r=t.indexOf("?");return r>=0?t.substring(r+1):t}return iterable_$i(Array.isArray(t)?t:getOwnEntries(t)).flatMap((([t,r])=>Array.isArray(r)?iterable_$i(r).map((r=>[t,r])):[[t,r]])).filter((([,t])=>t!==undefined&&t!==null))}function isHttpRequestBody(t){return typeof t==="string"||isBlob(t)||Buffer.isBuffer(t)||isURLSearchParams(t)||isFormData(t)||isReadableStream(t)}function isStreamableHttpRequestBody(t){return isBlob(t)||Buffer.isBuffer(t)||isReadableStream(t)}function isReadableStream(t){const r=t;return!!r&&typeof r.read==="function"&&typeof r.pause==="function"&&typeof r.resume==="function"&&typeof r.setEncoding==="function"}const it=", ";function hasHeader(t,r){return getHeader(t,r)!==undefined}function getHeader(t,r){if(!t){return undefined}if(map_isMultiMap(t)){const n=t.get(r);return typeof n==="string"?n:n?asArrayLike(n).join(it):undefined}if(isMap(t)){return t.get(r)}if(iterable_isIterable(t)){const n=asArrayLike(t);return n.find((t=>asArrayLike(t).at(0)===r))?.[1]}return t[r]}function appendHeader(t,r,n){if(isMultiMap(t)){t.append(r,n);return t}const s=getHeader(t,r);const i=s?`${s}${it}${n}`:n;return setHeader(t,r,i)}function appendHeaders(t,r){return mergeHeaders(t,r,appendHeader)}function setHeader(t,r,n){if(n===undefined||n===null){return deleteHeader(t,r)}if(isMap(t)){t.set(r,n);return t}if(iterable_isIterable(t)){const s=asArray(t);const i=s.findIndex((t=>asArrayLike(t).at(0)===r));if(i>=0){s[i][1]=n}else{s.push([r,n])}return s}t||={};t[r]=n;return t}function setHeaders(t,r){return mergeHeaders(t,r,setHeader)}function setDefaultHeader(t,r,n){return hasHeader(t,r)?t:setHeader(t,r,n)}function setDefaultHeaders(t,r){return mergeHeaders(t,r,setDefaultHeader)}function deleteHeader(t,r){if(isMap(t)){t.delete(r);return t}if(iterable_isIterable(t)){return asArrayLike(t).filter((t=>asArrayLike(t).at(0)!==r))}delete t?.[r];return t}function deleteHeaders(t,r){for(const n of r){t=deleteHeader(t,n)}return t}function cloneHeaders(t){if(t?.constructor&&(isMap(t)||!iterable_isIterable(t))){return setHeaders(new t.constructor,t)}if(iterable_isIterable(t)){return[...t]}return undefined}function mergeHeaders(t,r,n){const s=iterable_isIterable(r)?r:Object.entries(r||{});for(const r of s){const[s,i]=asArray(r);t=n(t,s,i)}return t}function inferHttpRequestBodyHeaders(t){const r={};if(!isStreamableHttpRequestBody(t)){return r}const n="application/octet-stream";const s=typeof t.size==="number"?t.size:typeof t.byteLength==="number"?t.byteLength:Buffer.isBuffer(t["path"])?t["path"].byteLength:typeof t["path"]==="string"||t["path"]?.[Symbol.toStringTag]==="URL"?(0,ae.statSync)(t["path"]).size:undefined;r["Content-Type"]=n;r["Content-Length"]=String(s);return r}function http_method_httpMethodEquals(t,r){return t===r||isGetHttpMethod(t)&&isGetHttpMethod(r)}function canHttpMethodAcceptBody(t){return!isGetHttpMethod(t)&&!isHeadHttpMethod(t)&&!isConnectHttpMethod(t)&&!isTraceHttpMethod(t)}function isGetHttpMethod(t){return!t||t==="GET"}function isPostHttpMethod(t){return t==="POST"}function isPutHttpMethod(t){return t==="PUT"}function isPatchHttpMethod(t){return t==="PATCH"}function isDeleteHttpMethod(t){return t==="DELETE"}function isOptionsHttpMethod(t){return t==="OPTIONS"}function isHeadHttpMethod(t){return t==="HEAD"}function isConnectHttpMethod(t){return t==="CONNECT"}function isTraceHttpMethod(t){return t==="TRACE"}const ot=t(import.meta.url)("node:http");const ct=t(import.meta.url)("node:https");const ut=t(import.meta.url)("node:zlib");const ft=t(import.meta.url)("node:stream");const dt=t(import.meta.url)("node:buffer");function dataUriToBuffer(t){if(!/^data:/i.test(t)){throw new TypeError('`uri` does not appear to be a Data URI (must begin with "data:")')}t=t.replace(/\r?\n/g,"");const r=t.indexOf(",");if(r===-1||r<=4){throw new TypeError("malformed data: URI")}const n=t.substring(5,r).split(";");let s="";let i=false;const o=n[0]||"text/plain";let a=o;for(let t=1;t<n.length;t++){if(n[t]==="base64"){i=true}else if(n[t]){a+=`;${n[t]}`;if(n[t].indexOf("charset=")===0){s=n[t].substring(8)}}}if(!n[0]&&!s.length){a+=";charset=US-ASCII";s="US-ASCII"}const l=i?"base64":"ascii";const c=unescape(t.substring(r+1));const u=Buffer.from(c,l);u.type=o;u.typeFull=a;u.charset=s;return u}const pt=dataUriToBuffer;var ht=s(1410);class FetchBaseError extends Error{constructor(t,r){super(t);Error.captureStackTrace(this,this.constructor);this.type=r}get name(){return this.constructor.name}get[Symbol.toStringTag](){return this.constructor.name}}class FetchError extends FetchBaseError{constructor(t,r,n){super(t,r);if(n){this.code=this.errno=n.code;this.erroredSysCall=n.syscall}}}const mt=Symbol.toStringTag;const isURLSearchParameters=t=>typeof t==="object"&&typeof t.append==="function"&&typeof t.delete==="function"&&typeof t.get==="function"&&typeof t.getAll==="function"&&typeof t.has==="function"&&typeof t.set==="function"&&typeof t.sort==="function"&&t[mt]==="URLSearchParams";const is_isBlob=t=>t&&typeof t==="object"&&typeof t.arrayBuffer==="function"&&typeof t.type==="string"&&typeof t.stream==="function"&&typeof t.constructor==="function"&&/^(Blob|File)$/.test(t[mt]);const isAbortSignal=t=>typeof t==="object"&&(t[mt]==="AbortSignal"||t[mt]==="EventTarget");const isDomainOrSubdomain=(t,r)=>{const n=new URL(r).hostname;const s=new URL(t).hostname;return n===s||n.endsWith(`.${s}`)};const isSameProtocol=(t,r)=>{const n=new URL(r).protocol;const s=new URL(t).protocol;return n===s};const yt=(0,W.promisify)(ft.pipeline);const bt=Symbol("Body internals");class Body{constructor(t,{size:r=0}={}){let n=null;if(t===null){t=null}else if(isURLSearchParameters(t)){t=dt.Buffer.from(t.toString())}else if(is_isBlob(t)){}else if(dt.Buffer.isBuffer(t)){}else if(W.types.isAnyArrayBuffer(t)){t=dt.Buffer.from(t)}else if(ArrayBuffer.isView(t)){t=dt.Buffer.from(t.buffer,t.byteOffset,t.byteLength)}else if(t instanceof ft){}else if(t instanceof tt.Ct){t=(0,tt.au)(t);n=t.type.split("=")[1]}else{t=dt.Buffer.from(String(t))}let s=t;if(dt.Buffer.isBuffer(t)){s=ft.Readable.from(t)}else if(is_isBlob(t)){s=ft.Readable.from(t.stream())}this[bt]={body:t,stream:s,boundary:n,disturbed:false,error:null};this.size=r;if(t instanceof ft){t.on("error",(t=>{const r=t instanceof FetchBaseError?t:new FetchError(`Invalid response body while trying to fetch ${this.url}: ${t.message}`,"system",t);this[bt].error=r}))}}get body(){return this[bt].stream}get bodyUsed(){return this[bt].disturbed}async arrayBuffer(){const{buffer:t,byteOffset:r,byteLength:n}=await consumeBody(this);return t.slice(r,r+n)}async formData(){const t=this.headers.get("content-type");if(t.startsWith("application/x-www-form-urlencoded")){const t=new tt.Ct;const r=new URLSearchParams(await this.text());for(const[n,s]of r){t.append(n,s)}return t}const{toFormData:r}=await Promise.resolve().then(s.bind(s,4037));return r(this.body,t)}async blob(){const t=this.headers&&this.headers.get("content-type")||this[bt].body&&this[bt].body.type||"";const r=await this.arrayBuffer();return new ht.Z([r],{type:t})}async json(){const t=await this.text();return JSON.parse(t)}async text(){const t=await consumeBody(this);return(new TextDecoder).decode(t)}buffer(){return consumeBody(this)}}Body.prototype.buffer=(0,W.deprecate)(Body.prototype.buffer,"Please use 'response.arrayBuffer()' instead of 'response.buffer()'","node-fetch#buffer");Object.defineProperties(Body.prototype,{body:{enumerable:true},bodyUsed:{enumerable:true},arrayBuffer:{enumerable:true},blob:{enumerable:true},json:{enumerable:true},text:{enumerable:true},data:{get:(0,W.deprecate)((()=>{}),"data doesn't exist, use json(), text(), arrayBuffer(), or body instead","https://github.com/node-fetch/node-fetch/issues/1000 (response)")}});async function consumeBody(t){if(t[bt].disturbed){throw new TypeError(`body used already for: ${t.url}`)}t[bt].disturbed=true;if(t[bt].error){throw t[bt].error}const{body:r}=t;if(r===null){return dt.Buffer.alloc(0)}if(!(r instanceof ft)){return dt.Buffer.alloc(0)}const n=[];let s=0;try{for await(const i of r){if(t.size>0&&s+i.length>t.size){const n=new FetchError(`content size at ${t.url} over limit: ${t.size}`,"max-size");r.destroy(n);throw n}s+=i.length;n.push(i)}}catch(r){const n=r instanceof FetchBaseError?r:new FetchError(`Invalid response body while trying to fetch ${t.url}: ${r.message}`,"system",r);throw n}if(r.readableEnded===true||r._readableState.ended===true){try{if(n.every((t=>typeof t==="string"))){return dt.Buffer.from(n.join(""))}return dt.Buffer.concat(n,s)}catch(r){throw new FetchError(`Could not create Buffer from response body for ${t.url}: ${r.message}`,"system",r)}}else{throw new FetchError(`Premature close of server response while trying to fetch ${t.url}`)}}const clone=(t,r)=>{let n;let s;let{body:i}=t[bt];if(t.bodyUsed){throw new Error("cannot clone body after it is used")}if(i instanceof ft&&typeof i.getBoundary!=="function"){n=new ft.PassThrough({highWaterMark:r});s=new ft.PassThrough({highWaterMark:r});i.pipe(n);i.pipe(s);t[bt].stream=n;i=s}return i};const _t=(0,W.deprecate)((t=>t.getBoundary()),"form-data doesn't follow the spec and requires special treatment. Use alternative package","https://github.com/node-fetch/node-fetch/issues/1167");const extractContentType=(t,r)=>{if(t===null){return null}if(typeof t==="string"){return"text/plain;charset=UTF-8"}if(isURLSearchParameters(t)){return"application/x-www-form-urlencoded;charset=UTF-8"}if(is_isBlob(t)){return t.type||null}if(dt.Buffer.isBuffer(t)||W.types.isAnyArrayBuffer(t)||ArrayBuffer.isView(t)){return null}if(t instanceof tt.Ct){return`multipart/form-data; boundary=${r[bt].boundary}`}if(t&&typeof t.getBoundary==="function"){return`multipart/form-data;boundary=${_t(t)}`}if(t instanceof ft){return null}return"text/plain;charset=UTF-8"};const getTotalBytes=t=>{const{body:r}=t[bt];if(r===null){return 0}if(is_isBlob(r)){return r.size}if(dt.Buffer.isBuffer(r)){return r.length}if(r&&typeof r.getLengthSync==="function"){return r.hasKnownLength&&r.hasKnownLength()?r.getLengthSync():null}return null};const writeToStream=async(t,{body:r})=>{if(r===null){t.end()}else{await yt(r,t)}};const St=typeof ot.validateHeaderName==="function"?ot.validateHeaderName:t=>{if(!/^[\^`\-\w!#$%&'*+.|~]+$/.test(t)){const r=new TypeError(`Header name must be a valid HTTP token [${t}]`);Object.defineProperty(r,"code",{value:"ERR_INVALID_HTTP_TOKEN"});throw r}};const Et=typeof ot.validateHeaderValue==="function"?ot.validateHeaderValue:(t,r)=>{if(/[^\t\u0020-\u007E\u0080-\u00FF]/.test(r)){const r=new TypeError(`Invalid character in header content ["${t}"]`);Object.defineProperty(r,"code",{value:"ERR_INVALID_CHAR"});throw r}};class Headers extends URLSearchParams{constructor(t){let r=[];if(t instanceof Headers){const n=t.raw();for(const[t,s]of Object.entries(n)){r.push(...s.map((r=>[t,r])))}}else if(t==null){}else if(typeof t==="object"&&!W.types.isBoxedPrimitive(t)){const n=t[Symbol.iterator];if(n==null){r.push(...Object.entries(t))}else{if(typeof n!=="function"){throw new TypeError("Header pairs must be iterable")}r=[...t].map((t=>{if(typeof t!=="object"||W.types.isBoxedPrimitive(t)){throw new TypeError("Each header pair must be an iterable object")}return[...t]})).map((t=>{if(t.length!==2){throw new TypeError("Each header pair must be a name/value tuple")}return[...t]}))}}else{throw new TypeError("Failed to construct 'Headers': The provided value is not of type '(sequence<sequence<ByteString>> or record<ByteString, ByteString>)")}r=r.length>0?r.map((([t,r])=>{St(t);Et(t,String(r));return[String(t).toLowerCase(),String(r)]})):undefined;super(r);return new Proxy(this,{get(t,r,n){switch(r){case"append":case"set":return(n,s)=>{St(n);Et(n,String(s));return URLSearchParams.prototype[r].call(t,String(n).toLowerCase(),String(s))};case"delete":case"has":case"getAll":return n=>{St(n);return URLSearchParams.prototype[r].call(t,String(n).toLowerCase())};case"keys":return()=>{t.sort();return new Set(URLSearchParams.prototype.keys.call(t)).keys()};default:return Reflect.get(t,r,n)}}})}get[Symbol.toStringTag](){return this.constructor.name}toString(){return Object.prototype.toString.call(this)}get(t){const r=this.getAll(t);if(r.length===0){return null}let n=r.join(", ");if(/^content-encoding$/i.test(t)){n=n.toLowerCase()}return n}forEach(t,r=undefined){for(const n of this.keys()){Reflect.apply(t,r,[this.get(n),n,this])}}*values(){for(const t of this.keys()){yield this.get(t)}}*entries(){for(const t of this.keys()){yield[t,this.get(t)]}}[Symbol.iterator](){return this.entries()}raw(){return[...this.keys()].reduce(((t,r)=>{t[r]=this.getAll(r);return t}),{})}[Symbol.for("nodejs.util.inspect.custom")](){return[...this.keys()].reduce(((t,r)=>{const n=this.getAll(r);if(r==="host"){t[r]=n[0]}else{t[r]=n.length>1?n:n[0]}return t}),{})}}Object.defineProperties(Headers.prototype,["get","entries","forEach","values"].reduce(((t,r)=>{t[r]={enumerable:true};return t}),{}));function fromRawHeaders(t=[]){return new Headers(t.reduce(((t,r,n,s)=>{if(n%2===0){t.push(s.slice(n,n+2))}return t}),[]).filter((([t,r])=>{try{St(t);Et(t,String(r));return true}catch{return false}})))}const vt=new Set([301,302,303,307,308]);const isRedirect=t=>vt.has(t);const Rt=Symbol("Response internals");class Response extends Body{constructor(t=null,r={}){super(t,r);const n=r.status!=null?r.status:200;const s=new Headers(r.headers);if(t!==null&&!s.has("Content-Type")){const r=extractContentType(t,this);if(r){s.append("Content-Type",r)}}this[Rt]={type:"default",url:r.url,status:n,statusText:r.statusText||"",headers:s,counter:r.counter,highWaterMark:r.highWaterMark}}get type(){return this[Rt].type}get url(){return this[Rt].url||""}get status(){return this[Rt].status}get ok(){return this[Rt].status>=200&&this[Rt].status<300}get redirected(){return this[Rt].counter>0}get statusText(){return this[Rt].statusText}get headers(){return this[Rt].headers}get highWaterMark(){return this[Rt].highWaterMark}clone(){return new Response(clone(this,this.highWaterMark),{type:this.type,url:this.url,status:this.status,statusText:this.statusText,headers:this.headers,ok:this.ok,redirected:this.redirected,size:this.size,highWaterMark:this.highWaterMark})}static redirect(t,r=302){if(!isRedirect(r)){throw new RangeError('Failed to execute "redirect" on "response": Invalid status code')}return new Response(null,{headers:{location:new URL(t).toString()},status:r})}static error(){const t=new Response(null,{status:0,statusText:""});t[Rt].type="error";return t}static json(t=undefined,r={}){const n=JSON.stringify(t);if(n===undefined){throw new TypeError("data is not JSON serializable")}const s=new Headers(r&&r.headers);if(!s.has("content-type")){s.set("content-type","application/json")}return new Response(n,{...r,headers:s})}get[Symbol.toStringTag](){return"Response"}}Object.defineProperties(Response.prototype,{type:{enumerable:true},url:{enumerable:true},status:{enumerable:true},ok:{enumerable:true},redirected:{enumerable:true},statusText:{enumerable:true},headers:{enumerable:true},clone:{enumerable:true}});const wt=t(import.meta.url)("node:url");const getSearch=t=>{if(t.search){return t.search}const r=t.href.length-1;const n=t.hash||(t.href[r]==="#"?"#":"");return t.href[r-n.length]==="?"?"?":""};const Ct=t(import.meta.url)("node:net");function stripURLForUseAsAReferrer(t,r=false){if(t==null){return"no-referrer"}t=new URL(t);if(/^(about|blob|data):$/.test(t.protocol)){return"no-referrer"}t.username="";t.password="";t.hash="";if(r){t.pathname="";t.search=""}return t}const At=new Set(["","no-referrer","no-referrer-when-downgrade","same-origin","origin","strict-origin","origin-when-cross-origin","strict-origin-when-cross-origin","unsafe-url"]);const Tt="strict-origin-when-cross-origin";function validateReferrerPolicy(t){if(!At.has(t)){throw new TypeError(`Invalid referrerPolicy: ${t}`)}return t}function isOriginPotentiallyTrustworthy(t){if(/^(http|ws)s:$/.test(t.protocol)){return true}const r=t.host.replace(/(^\[)|(]$)/g,"");const n=(0,Ct.isIP)(r);if(n===4&&/^127\./.test(r)){return true}if(n===6&&/^(((0+:){7})|(::(0+:){0,6}))0*1$/.test(r)){return true}if(t.host==="localhost"||t.host.endsWith(".localhost")){return false}if(t.protocol==="file:"){return true}return false}function isUrlPotentiallyTrustworthy(t){if(/^about:(blank|srcdoc)$/.test(t)){return true}if(t.protocol==="data:"){return true}if(/^(blob|filesystem):$/.test(t.protocol)){return true}return isOriginPotentiallyTrustworthy(t)}function determineRequestsReferrer(t,{referrerURLCallback:r,referrerOriginCallback:n}={}){if(t.referrer==="no-referrer"||t.referrerPolicy===""){return null}const s=t.referrerPolicy;if(t.referrer==="about:client"){return"no-referrer"}const i=t.referrer;let o=stripURLForUseAsAReferrer(i);let a=stripURLForUseAsAReferrer(i,true);if(o.toString().length>4096){o=a}if(r){o=r(o)}if(n){a=n(a)}const l=new URL(t.url);switch(s){case"no-referrer":return"no-referrer";case"origin":return a;case"unsafe-url":return o;case"strict-origin":if(isUrlPotentiallyTrustworthy(o)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return a.toString();case"strict-origin-when-cross-origin":if(o.origin===l.origin){return o}if(isUrlPotentiallyTrustworthy(o)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return a;case"same-origin":if(o.origin===l.origin){return o}return"no-referrer";case"origin-when-cross-origin":if(o.origin===l.origin){return o}return a;case"no-referrer-when-downgrade":if(isUrlPotentiallyTrustworthy(o)&&!isUrlPotentiallyTrustworthy(l)){return"no-referrer"}return o;default:throw new TypeError(`Invalid referrerPolicy: ${s}`)}}function parseReferrerPolicyFromHeader(t){const r=(t.get("referrer-policy")||"").split(/[,\s]+/);let n="";for(const t of r){if(t&&At.has(t)){n=t}}return n}const It=Symbol("Request internals");const isRequest=t=>typeof t==="object"&&typeof t[It]==="object";const Pt=(0,W.deprecate)((()=>{}),".data is not a valid RequestInit property, use .body instead","https://github.com/node-fetch/node-fetch/issues/1000 (request)");class Request extends Body{constructor(t,r={}){let n;if(isRequest(t)){n=new URL(t.url)}else{n=new URL(t);t={}}if(n.username!==""||n.password!==""){throw new TypeError(`${n} is an url with embedded credentials.`)}let s=r.method||t.method||"GET";if(/^(delete|get|head|options|post|put)$/i.test(s)){s=s.toUpperCase()}if(!isRequest(r)&&"data"in r){Pt()}if((r.body!=null||isRequest(t)&&t.body!==null)&&(s==="GET"||s==="HEAD")){throw new TypeError("Request with GET/HEAD method cannot have body")}const i=r.body?r.body:isRequest(t)&&t.body!==null?clone(t):null;super(i,{size:r.size||t.size||0});const o=new Headers(r.headers||t.headers||{});if(i!==null&&!o.has("Content-Type")){const t=extractContentType(i,this);if(t){o.set("Content-Type",t)}}let a=isRequest(t)?t.signal:null;if("signal"in r){a=r.signal}if(a!=null&&!isAbortSignal(a)){throw new TypeError("Expected signal to be an instanceof AbortSignal or EventTarget")}let l=r.referrer==null?t.referrer:r.referrer;if(l===""){l="no-referrer"}else if(l){const t=new URL(l);l=/^about:(\/\/)?client$/.test(t)?"client":t}else{l=undefined}this[It]={method:s,redirect:r.redirect||t.redirect||"follow",headers:o,parsedURL:n,signal:a,referrer:l};this.follow=r.follow===undefined?t.follow===undefined?20:t.follow:r.follow;this.compress=r.compress===undefined?t.compress===undefined?true:t.compress:r.compress;this.counter=r.counter||t.counter||0;this.agent=r.agent||t.agent;this.highWaterMark=r.highWaterMark||t.highWaterMark||16384;this.insecureHTTPParser=r.insecureHTTPParser||t.insecureHTTPParser||false;this.referrerPolicy=r.referrerPolicy||t.referrerPolicy||""}get method(){return this[It].method}get url(){return(0,wt.format)(this[It].parsedURL)}get headers(){return this[It].headers}get redirect(){return this[It].redirect}get signal(){return this[It].signal}get referrer(){if(this[It].referrer==="no-referrer"){return""}if(this[It].referrer==="client"){return"about:client"}if(this[It].referrer){return this[It].referrer.toString()}return undefined}get referrerPolicy(){return this[It].referrerPolicy}set referrerPolicy(t){this[It].referrerPolicy=validateReferrerPolicy(t)}clone(){return new Request(this)}get[Symbol.toStringTag](){return"Request"}}Object.defineProperties(Request.prototype,{method:{enumerable:true},url:{enumerable:true},headers:{enumerable:true},redirect:{enumerable:true},clone:{enumerable:true},signal:{enumerable:true},referrer:{enumerable:true},referrerPolicy:{enumerable:true}});const getNodeRequestOptions=t=>{const{parsedURL:r}=t[It];const n=new Headers(t[It].headers);if(!n.has("Accept")){n.set("Accept","*/*")}let s=null;if(t.body===null&&/^(post|put)$/i.test(t.method)){s="0"}if(t.body!==null){const r=getTotalBytes(t);if(typeof r==="number"&&!Number.isNaN(r)){s=String(r)}}if(s){n.set("Content-Length",s)}if(t.referrerPolicy===""){t.referrerPolicy=Tt}if(t.referrer&&t.referrer!=="no-referrer"){t[It].referrer=determineRequestsReferrer(t)}else{t[It].referrer="no-referrer"}if(t[It].referrer instanceof URL){n.set("Referer",t.referrer)}if(!n.has("User-Agent")){n.set("User-Agent","node-fetch")}if(t.compress&&!n.has("Accept-Encoding")){n.set("Accept-Encoding","gzip, deflate, br")}let{agent:i}=t;if(typeof i==="function"){i=i(r)}const o=getSearch(r);const a={path:r.pathname+o,method:t.method,headers:n[Symbol.for("nodejs.util.inspect.custom")](),insecureHTTPParser:t.insecureHTTPParser,agent:i};return{parsedURL:r,options:a}};class AbortError extends FetchBaseError{constructor(t,r="aborted"){super(t,r)}}const Nt=new Set(["data:","http:","https:"]);async function fetch(t,r){return new Promise(((n,s)=>{const i=new Request(t,r);const{parsedURL:o,options:a}=getNodeRequestOptions(i);if(!Nt.has(o.protocol)){throw new TypeError(`node-fetch cannot load ${t}. URL scheme "${o.protocol.replace(/:$/,"")}" is not supported.`)}if(o.protocol==="data:"){const t=pt(i.url);const r=new Response(t,{headers:{"Content-Type":t.typeFull}});n(r);return}const l=(o.protocol==="https:"?ct:ot).request;const{signal:c}=i;let u=null;const abort=()=>{const t=new AbortError("The operation was aborted.");s(t);if(i.body&&i.body instanceof ft.Readable){i.body.destroy(t)}if(!u||!u.body){return}u.body.emit("error",t)};if(c&&c.aborted){abort();return}const abortAndFinalize=()=>{abort();finalize()};const d=l(o.toString(),a);if(c){c.addEventListener("abort",abortAndFinalize)}const finalize=()=>{d.abort();if(c){c.removeEventListener("abort",abortAndFinalize)}};d.on("error",(t=>{s(new FetchError(`request to ${i.url} failed, reason: ${t.message}`,"system",t));finalize()}));fixResponseChunkedTransferBadEnding(d,(t=>{if(u&&u.body){u.body.destroy(t)}}));if(process.version<"v14"){d.on("socket",(t=>{let r;t.prependListener("end",(()=>{r=t._eventsCount}));t.prependListener("close",(n=>{if(u&&r<t._eventsCount&&!n){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE";u.body.emit("error",t)}}))}))}d.on("response",(t=>{d.setTimeout(0);const o=fromRawHeaders(t.rawHeaders);if(isRedirect(t.statusCode)){const a=o.get("Location");let l=null;try{l=a===null?null:new URL(a,i.url)}catch{if(i.redirect!=="manual"){s(new FetchError(`uri requested responds with an invalid redirect URL: ${a}`,"invalid-redirect"));finalize();return}}switch(i.redirect){case"error":s(new FetchError(`uri requested responds with a redirect, redirect mode is set to error: ${i.url}`,"no-redirect"));finalize();return;case"manual":break;case"follow":{if(l===null){break}if(i.counter>=i.follow){s(new FetchError(`maximum redirect reached at: ${i.url}`,"max-redirect"));finalize();return}const a={headers:new Headers(i.headers),follow:i.follow,counter:i.counter+1,agent:i.agent,compress:i.compress,method:i.method,body:clone(i),signal:i.signal,size:i.size,referrer:i.referrer,referrerPolicy:i.referrerPolicy};if(!isDomainOrSubdomain(i.url,l)||!isSameProtocol(i.url,l)){for(const t of["authorization","www-authenticate","cookie","cookie2"]){a.headers.delete(t)}}if(t.statusCode!==303&&i.body&&r.body instanceof ft.Readable){s(new FetchError("Cannot follow redirect with body being a readable stream","unsupported-redirect"));finalize();return}if(t.statusCode===303||(t.statusCode===301||t.statusCode===302)&&i.method==="POST"){a.method="GET";a.body=undefined;a.headers.delete("content-length")}const c=parseReferrerPolicyFromHeader(o);if(c){a.referrerPolicy=c}n(fetch(new Request(l,a)));finalize();return}default:return s(new TypeError(`Redirect option '${i.redirect}' is not a valid value of RequestRedirect`))}}if(c){t.once("end",(()=>{c.removeEventListener("abort",abortAndFinalize)}))}let a=(0,ft.pipeline)(t,new ft.PassThrough,(t=>{if(t){s(t)}}));if(process.version<"v12.10"){t.on("aborted",abortAndFinalize)}const l={url:i.url,status:t.statusCode,statusText:t.statusMessage,headers:o,size:i.size,counter:i.counter,highWaterMark:i.highWaterMark};const p=o.get("Content-Encoding");if(!i.compress||i.method==="HEAD"||p===null||t.statusCode===204||t.statusCode===304){u=new Response(a,l);n(u);return}const h={flush:ut.Z_SYNC_FLUSH,finishFlush:ut.Z_SYNC_FLUSH};if(p==="gzip"||p==="x-gzip"){a=(0,ft.pipeline)(a,ut.createGunzip(h),(t=>{if(t){s(t)}}));u=new Response(a,l);n(u);return}if(p==="deflate"||p==="x-deflate"){const r=(0,ft.pipeline)(t,new ft.PassThrough,(t=>{if(t){s(t)}}));r.once("data",(t=>{if((t[0]&15)===8){a=(0,ft.pipeline)(a,ut.createInflate(),(t=>{if(t){s(t)}}))}else{a=(0,ft.pipeline)(a,ut.createInflateRaw(),(t=>{if(t){s(t)}}))}u=new Response(a,l);n(u)}));r.once("end",(()=>{if(!u){u=new Response(a,l);n(u)}}));return}if(p==="br"){a=(0,ft.pipeline)(a,ut.createBrotliDecompress(),(t=>{if(t){s(t)}}));u=new Response(a,l);n(u);return}u=new Response(a,l);n(u)}));writeToStream(d,i).catch(s)}))}function fixResponseChunkedTransferBadEnding(t,r){const n=dt.Buffer.from("0\r\n\r\n");let s=false;let i=false;let o;t.on("response",(t=>{const{headers:r}=t;s=r["transfer-encoding"]==="chunked"&&!r["content-length"]}));t.on("socket",(a=>{const onSocketClose=()=>{if(s&&!i){const t=new Error("Premature close");t.code="ERR_STREAM_PREMATURE_CLOSE";r(t)}};const onData=t=>{i=dt.Buffer.compare(t.slice(-5),n)===0;if(!i&&o){i=dt.Buffer.compare(o.slice(-3),n.slice(0,3))===0&&dt.Buffer.compare(t.slice(-2),n.slice(3))===0}o=t};a.prependListener("close",onSocketClose);a.on("data",onData);t.on("close",(()=>{a.removeListener("close",onSocketClose);a.removeListener("data",onData)}))}))}const Dt={"User-Agent":`Kir-Antipov/${oe} (https://github.com/Kir-Antipov/${oe}/issues/new)`};const Ot=createFetch({handler:fetch,defaultHeaders:Dt});function createFetch(t){const{handler:r=Ot,baseUrl:n,defaultHeaders:s}=t||{};const i=new MiddlewareHandler(r);const configurableFetch=(t,r)=>{t=prepareUrl(configurableFetch,t,r);r=prepareRequest(configurableFetch,r);return i.execute(t,r)};configurableFetch.baseUrl=n||r.baseUrl;configurableFetch.defaultHeaders=setDefaultHeaders(cloneHeaders(s),r.defaultHeaders);Object.defineProperty(configurableFetch,"use",{value:t=>{i.use(t);return configurableFetch}});return configurableFetch}function prepareUrl(t,r,n){if(t.baseUrl&&typeof r==="string"&&r.startsWith("/")){const n=r.slice(1);const s=string_utils_asString(t.baseUrl);const i=s.endsWith("/")?s:`${s}/`;r=new URL(n,i)}if(isURLSearchParams(n?.body)&&!canHttpMethodAcceptBody(n?.method)){if(typeof r==="string"){r=`${r}${r.includes("?")?"&":"?"}${n.body}`}else{n.body.forEach(((t,n)=>r.searchParams.append(n,t)))}}return r}function prepareRequest(t,r){if(t.defaultHeaders){r||={};r.headers=setDefaultHeaders(r.headers,t.defaultHeaders)}if(r?.body&&!canHttpMethodAcceptBody(r.method)){delete r.body}return r}function fetchDestinationEquals(t,r){const[n,s]=Array.isArray(t)?[normalizeUrl(t[0]),normalizeHttpMethod(t[1])]:[normalizeUrl(t)];const[i,o]=Array.isArray(r)?[normalizeUrl(r[0]),normalizeHttpMethod(r[1])]:[normalizeUrl(r)];return httpMethodEquals(s,o)&&n===i}function normalizeUrl(t){const r=asString(t);const n=r.indexOf("?");return n>=0?r.substring(0,n):r}function normalizeHttpMethod(t){return typeof t==="string"?t:t?.method}class HttpResponse{constructor(){}static cache(t){return t instanceof CachedHttpResponse?t:new CachedHttpResponse(t)}static blob(t,r){return HttpResponse.content(t,"application/octet-stream",r)}static formData(t,r){return HttpResponse.content(t,undefined,r)}static json(t,r){const n=typeof t==="string"?t:JSON.stringify(t);return HttpResponse.content(n,"application/json",r)}static text(t,r){return HttpResponse.content(string_utils_asString(t),"text/plain",r)}static redirect(t,r){const n=new Headers(r?.headers);if(!n.has("Location")){n.set("Location",string_utils_asString(t))}const s={headers:n,status:r.status??302,statusText:r.statusText??"Found"};return new Response("",s)}static error(){return Response.error()}static content(t,r,n){ArgumentNullError.throwIfNull(t);const s=new Headers(n?.headers);if(r&&!s.has("Content-Type")){s.set("Content-Type",r)}return new Response(t,{status:n?.status,statusText:n?.statusText,headers:s})}}class CachedHttpResponse{_response;_blob;_formData;constructor(t){this._response=t}get body(){if(this._blob){return this._blob.stream()}if(!this._response.bodyUsed){return this._response.body}throw new Error("Cannot re-read the response body.")}get bodyUsed(){return!this._blob&&!this._formData&&this._response.bodyUsed}get headers(){return this._response.headers}get ok(){return this._response.ok}get redirected(){return this._response.redirected}get status(){return this._response.status}get statusText(){return this._response.statusText}get type(){return this._response.type}get url(){return this._response.url}clone(){return this}async arrayBuffer(){const t=await this.blob();return await t.arrayBuffer()}async blob(){if(this._blob){return this._blob}if(!this._response.bodyUsed){this._blob=await this._response.blob();return this._blob}throw new TypeError("Cannot re-read the response as a Blob.")}async formData(){if(this._formData){return this._formData}if(!this._response.bodyUsed){this._formData=await this._response.formData();return this._formData}throw new TypeError("Cannot re-read the response as a FormData.")}async json(){const t=await this.text();return JSON.parse(t)}async text(){const t=await this.blob();return await t.text()}}function defaultResponse(t){const{filter:r=(t=>t.status===404),response:n=(t=>HttpResponse.text("",t))}=t||{};return async(t,s,i)=>{const o=await i(t,s);if(r(o)){return n(o)}return o}}function throwOnError(t){const{filter:r=(t=>!t.ok),error:n=HttpError.fromResponse}=t||{};return async(t,s,i)=>{const o=await i(t,s);if(r(o)){const t=typeof n==="function"?await n(o):n;throw t}return o}}const DEFAULT_CACHE_FILTER=t=>typeof t==="string"?t.includes("cache=true"):t.searchParams.get("cache")==="true";const DEFAULT_CACHE_COMPARER=(t,r)=>http_method_httpMethodEquals(t[1]?.method,r[1]?.method)&&string_utils_asString(t[0])===string_utils_asString(r[0]);function simpleCache(t){const{filter:r=DEFAULT_CACHE_FILTER,comparer:n=DEFAULT_CACHE_COMPARER}=t||{};const s=new ArrayMap(n);return async(t,n,i)=>{if(!r(t,n)){return await i(t,n)}const o=[t,n];const a=s.get(o);if(a){return a}const l=HttpResponse.cache(await i(t,n));s.set(o,l);return l}}class HttpRequest{constructor(){}static get(t){return new HttpRequestBuilder("GET",t)}static post(t){return new HttpRequestBuilder("POST",t)}static patch(t){return new HttpRequestBuilder("PATCH",t)}static put(t){return new HttpRequestBuilder("PUT",t)}static delete(t){return new HttpRequestBuilder("DELETE",t)}}class HttpRequestBuilder{method;body;headers;redirect;signal;referrer;referrerPolicy;constructor(t,r){Object.assign(this,r);this.method=t}with(t){if(typeof t==="string"){return isGetHttpMethod(this.method)?this.urlParams(t):this.text(t)}if(t===undefined||t===null||isHttpRequestBody(t)){this.body=t??undefined;const r=inferHttpRequestBodyHeaders(this.body);this.headers=setDefaultHeaders(this.headers,r);return this}return isGetHttpMethod(this.method)?this.urlParams(t):this.formData(t)}urlParams(t){if(!isURLSearchParams(t)){t=new QueryString(t)}this.body=t;return this}formData(t){if(!isFormData(t)){t=toFormData(t)}this.body=t;return this}json(t){const r=typeof t==="string"?t:JSON.stringify(t);this.body=r;this.headers=setHeader(this.headers,"Content-Type","application/json");return this}text(t){this.body=t;this.headers=setHeader(this.headers,"Content-Type","text/plain");return this}abort(t){this.signal=t;return this}timeout(t){return this.abort(AbortSignal.timeout(t))}header(t,r){this.headers=setHeader(this.headers,t,r);return this}}const kt="0\\.\\d+(?:\\.\\d+)?a?(?:_\\d+)?|"+"\\d+\\.\\d+(?:\\.\\d+)?(?:-pre\\d+| Pre-[Rr]elease \\d+|-rc\\d+| [Rr]elease Candidate \\d+)?|"+"\\d+w\\d+(?:[a-z]+|~)|"+"[a-c]\\d\\.\\d+(?:\\.\\d+)?[a-z]?(?:_\\d+)?[a-z]?|"+"(Alpha|Beta) v?\\d+\\.\\d+(?:\\.\\d+)?[a-z]?(?:_\\d+)?[a-z]?|"+"Inf?dev (?:0\\.31 )?\\d+(?:-\\d+)?|"+"(?:rd|inf)-\\d+|"+"(?:.*[Ee]xperimental [Ss]napshot )(?:\\d+)";const $t=new RegExp(kt);const Lt=/\d+\.\d+(\.\d+)?/;const xt=/.+(?:-pre| Pre-[Rr]elease )(\d+)/;const Ft=/.+(?:-rc| [Rr]elease Candidate )(\d+)/;const Mt=/(?:Snapshot )?(\d+)w0?(0|[1-9]\d*)([a-z])/;const Bt=/(?:.*[Ee]xperimental [Ss]napshot )(\d+)/;const jt=/(?:b|Beta v?)1\.(\d+(\.\d+)?[a-z]?(_\d+)?[a-z]?)/;const Wt=/(?:a|Alpha v?)[01]\.(\d+(\.\d+)?[a-z]?(_\d+)?[a-z]?)/;const Ut=/(?:inf-|Inf?dev )(?:0\.31 )?(\d+(-\d+)?)/;const qt=parseVersionRange("<=1.16");const Ht=new Map([["13w12~","1.5.1-alpha.13.12.a"],["2point0_red","1.5.2-red"],["2point0_purple","1.5.2-purple"],["2point0_blue","1.5.2-blue"],["15w14a","1.8.4-alpha.15.14.a+loveandhugs"],["1.RV-Pre1","1.9.2-rv+trendy"],["3D Shareware v1.34","1.14-alpha.19.13.shareware"],["1.14.3 - Combat Test","1.14.3-rc.4.combat.1"],["Combat Test 2","1.14.5-combat.2"],["Combat Test 3","1.14.5-combat.3"],["Combat Test 4","1.15-rc.3.combat.4"],["Combat Test 5","1.15.2-rc.2.combat.5"],["20w14~","1.16-alpha.20.13.inf"],["20w14infinite","1.16-alpha.20.13.inf"],["Combat Test 6","1.16.2-beta.3.combat.6"],["Combat Test 7","1.16.3-combat.7"],["1.16_combat-2","1.16.3-combat.7.b"],["1.16_combat-3","1.16.3-combat.7.c"],["1.16_combat-4","1.16.3-combat.8"],["1.16_combat-5","1.16.3-combat.8.b"],["1.16_combat-6","1.16.3-combat.8.c"],["22w13oneblockatatime","1.19-alpha.22.13.oneblockatatime"],["23w13a_or_b","1.20-alpha.23.13.ab"]]);function normalizeMinecraftVersion(t,r,n){const s=r?findNearestReleaseMinecraftVersion(r,n):t.match(Lt)?.[0];return normalizeUnknownMinecraftVersion(t,s)}function normalizeMinecraftVersionRange(t,r,n){if(!iterable_isIterable(t)){return t}const s=typeof t==="string"?[t]:asArrayLike(t);const i=s.map((t=>t.replaceAll(n,(t=>{const n=r.get(t);if(n){return String(n.version)}return normalizeMinecraftVersion(t)}))));return parseVersionRange(i)||noneVersionRange(i.join(" || "))}function getMinecraftVersionRegExp(t){if(!t){return $t}let r=kt;for(const n of t){if(n.match($t)?.[0]!==n){r=`${n.replace(/[|\\{}()[\]^$+*?.]/g,"\\$&").replace(/-/g,"\\x2d")}|${r}`}}return new RegExp(r,"gs")}function normalizeUnknownMinecraftVersion(t,r){if(Ht.has(t)){return Ht.get(t)}if(!r||t===r||t.substring(1).startsWith(r)){return normalizeOldMinecraftVersion(t)}let n;if(n=t.match(Bt)){return`${r}-Experimental.${n[1]}`}if(t.startsWith(r)){if(n=t.match(Ft)){const s=r==="1.16"?String(8+ +n[1]):n[1];t=`rc.${s}`}else if(n=t.match(xt)){const s=isLegacyMinecraftVersion(r);t=`${s?"rc":"beta"}.${n[1]}`}}else if(n=t.match(Mt)){t=`alpha.${n[1]}.${n[2]}.${n[3]}`}else{t=normalizeOldMinecraftVersion(t)}if(t.startsWith(`${r}-`)){return t}return`${r}-${t}`}function normalizeOldMinecraftVersion(t){let r;if(r=t.match(jt)){t=`1.0.0-beta.${r[1]}`}else if(r=t.match(Wt)){t=`1.0.0-alpha.${r[1]}`}else if(r=t.match(Ut)){t=`0.31.${r[1]}`}else if(t.startsWith("c0.")){t=t.substring(1)}else if(t.startsWith("rd-")){t=t.substring(3);if(t==="20090515"){t="150000"}t=`0.0.0-rd.${t}`}let n="";let s=false;let i=false;let o=false;let a=false;for(let r=0;r<t.length;++r){let l=t.charAt(r);if(l>="0"&&l<="9"){if(r>0&&!s&&!o){n+="."}else if(s&&i){n=n.substring(0,n.length-1)}i=l==="0"&&(!s||i);o=false;s=true}else if(l==="."||l==="-"){if(o){continue}o=true;s=false}else if((l<"A"||l>"Z")&&(l<"a"||l>"z")){if(o){continue}l=".";o=true;s=false}else{if(s){n+=a?".":"-";a=true}o=false;s=false}if(l==="-"){a=true}n+=l}let l=0;while(l<n.length&&n.charAt(l)==="."){++l}let c=n.length;while(c>l&&n.charAt(c-1)==="."){--c}return n.substring(l,c)}function findNearestReleaseMinecraftVersion(t,r){if(t[r].type===ie.RELEASE){return t[r].id}if(t[r].type!==ie.SNAPSHOT){return undefined}const n=t[r].id.match(Lt);if(n){return n[0]}const s=t[r].id.match(Mt);if(s){const t=+s[1];const r=+s[2];const n=findNearestReleaseMinecraftVersionBySnapshotDate(t,r);if(n){return n}}for(let n=r-1;n>=0;--n){if(t[n].type===ie.RELEASE){return t[n].id}}for(let n=r+1;n<t.length;++n){if(t[n].type!==ie.RELEASE){continue}const r=t[n].id.match(/(\d+)\.(\d+)(?:\.(\d+))?/);if(r){return`${r[1]}.${r[2]}.${(+r[3]||0)+1}`}}return undefined}function findNearestReleaseMinecraftVersionBySnapshotDate(t,r){if(t===23&&r>=12){return"1.20"}if(t===20&&r>=45||t===21&&r<=20){return"1.17"}if(t===15&&r>=31||t===16&&r<=7){return"1.9"}if(t===14&&r>=2&&r<=34){return"1.8"}if(t===13&&r>=47&&r<=49){return"1.7.4"}if(t===13&&r>=36&&r<=43){return"1.7.2"}if(t===13&&r>=16&&r<=26){return"1.6"}return undefined}function isLegacyMinecraftVersion(t){return qt.includes(t)}const Vt="https://piston-meta.mojang.com/mc";class MojangApiClient{_fetch;_versions;_versionRegExp;constructor(t){this._fetch=createFetch({handler:t?.fetch,baseUrl:t?.baseUrl||t?.fetch?.["baseUrl"]||Vt}).use(throwOnError())}async getMinecraftVersion(t){const r=await this.getAllMinecraftVersions();const n=r.get(t);if(n){return n}const s=await this.getMinecraftVersions(t);return s[0]}async getMinecraftVersions(t){const r=await this.getAllMinecraftVersions();const n=await this.getMinecraftVersionRegExp();const s=normalizeMinecraftVersionRange(t,r,n);return iterable_$i(r.values()).filter((t=>s.includes(t.version))).toArray()}async getAllMinecraftVersions(){if(this._versions){return this._versions}const t=await this._fetch("/game/version_manifest_v2.json");const r=await t.json();const n=getMinecraftVersionManifestEntries(r);const s=n.map(((t,r,n)=>{const s=normalizeMinecraftVersion(t.id,n,r);const i=parseVersion(s);return new MinecraftVersion(t.id,i,t.type,t.url,t.releaseDate)}));this._versions=new Map(s.map((t=>[t.id,t])));return this._versions}async getMinecraftVersionRegExp(){if(this._versionRegExp){return this._versionRegExp}const t=await this.getAllMinecraftVersions();this._versionRegExp=getMinecraftVersionRegExp(t.keys());return this._versionRegExp}}const Gt=MojangApiClient.prototype.getMinecraftVersions.bind(new MojangApiClient);const zt="minecraft";const Yt=new Map([[zt,Gt]]);function getGameVersionProviderByName(t){return Yt.get(t)}function isPromise(t){return typeof t?.then==="function"}function sleep(t){const r=4;if(t<r){return Promise.resolve()}return new Promise((r=>{setTimeout(r,t)}))}async function run(t){return await t()}async function runSafely(t){return await run(t).then((t=>[t,undefined])).catch((t=>[undefined,t]))}async function retry(t,r){const n=r?.delay??0;const s=r?.maxAttempts??-1;const i=r?.onError;let o=0;while(true){++o;try{return await t()}catch(t){const r=s>=0&&o>=s;const n=!r&&await isErrorHandled(t,i);if(!n){throw t}}await sleep(n)}}async function isErrorHandled(t,r){if(!isError(t)){return false}const n=await(r?.(t));return n||n===undefined}const Qt=2;const Kt=1e3;class GenericPlatformUploader{_logger;_fetch;constructor(t){this._logger=t?.logger||Te;this._fetch=t?.fetch||Ot}async upload(t){ArgumentNullError.throwIfNull(t,"request");ArgumentNullError.throwIfNull(t.token,"request.token",`A token is required to upload files to ${We.friendlyNameOf(this.platform)}.`);ArgumentNullError.throwIfNullOrEmpty(t.files,"request.files","No files to upload were specified. Please include at least one file in the request.");const r=We.friendlyNameOf(this.platform);const n=t.retryAttempts??Qt;const s=t.retryDelay??Kt;const i=LoggingStopwatch.startNew(this._logger,(()=>`📤 Uploading assets to ${r}`),(t=>`✅ Successfully published assets to ${r} in ${t} ms`));const onError=t=>{if(isSoftError(t)){this._logger.error(t);this._logger.info(`🔂 Facing difficulties, republishing assets to ${r} in ${s} ms`);return true}return false};const o=await retry((()=>this.uploadCore(t)),{maxAttempts:n,delay:s,onError:onError});i.stop();return o}convertToSimpleDependencies(t,r){return(t||[]).filter((t=>t&&!t.isIgnored(this.platform))).map((t=>[t.getProjectId(this.platform),r(t.type)])).filter((([t,r])=>t&&r))}}var Xt;(function(t){t["EMBEDDED_LIBRARY"]="embeddedLibrary";t["INCOMPATIBLE"]="incompatible";t["OPTIONAL_DEPENDENCY"]="optionalDependency";t["REQUIRED_DEPENDENCY"]="requiredDependency";t["TOOL"]="tool"})(Xt||(Xt={}));const Jt={ignoreCase:true,ignoreNonWordCharacters:true};function curseforge_dependency_type_toDependencyType(t){switch(t){case er.EMBEDDED_LIBRARY:return He.EMBEDDED;case er.INCOMPATIBLE:return He.INCOMPATIBLE;case er.OPTIONAL_DEPENDENCY:return He.OPTIONAL;case er.REQUIRED_DEPENDENCY:return He.REQUIRED;case er.TOOL:return He.RECOMMENDED;default:return undefined}}function curseforge_dependency_type_fromDependencyType(t){switch(t){case He.REQUIRED:return er.REQUIRED_DEPENDENCY;case He.RECOMMENDED:return er.OPTIONAL_DEPENDENCY;case He.EMBEDDED:return er.EMBEDDED_LIBRARY;case He.OPTIONAL:return er.OPTIONAL_DEPENDENCY;case He.CONFLICTING:return er.INCOMPATIBLE;case He.INCOMPATIBLE:return er.INCOMPATIBLE;default:return undefined}}const Zt={fromDependencyType:curseforge_dependency_type_fromDependencyType,toDependencyType:curseforge_dependency_type_toDependencyType};const er=j.create(Xt,Jt,Zt);function isCurseForgeProjectId(t){return typeof t==="number"||isIntegerString(t)}const tr=1;const rr=`https://api.curseforge.com/v${tr}`;const nr=SecureString.from(Buffer.from([36,50,97,36,49,48,36,81,73,47,121,101,83,110,106,105,69,90,72,90,109,70,108,109,105,74,86,73,46,50,120,109,87,89,108,80,98,107,65,88,87,56,114,81,46,120,77,54,53,118,107,116,65,115,115,97,74,112,109,105])).unwrap();class CurseForgeEternalApiClient{_fetch;constructor(t){this._fetch=createFetch({handler:t?.fetch,baseUrl:t?.baseUrl||t?.fetch?.["baseUrl"]||rr,defaultHeaders:{"X-Api-Key":t?.token||nr}}).use(defaultResponse({response:t=>HttpResponse.json(null,t)})).use(throwOnError({filter:t=>!t.ok&&t.status!==404}))}async getProject(t){if(!isCurseForgeProjectId(t)){const r=await this._fetch("/mods/search",HttpRequest.get().with({gameId:432,slug:t}));return await r.json().then((r=>r?.data?.find((r=>r.slug===t))))??undefined}const r=await this._fetch(`/mods/${t}`);return await r.json().then((t=>t?.data))??undefined}}function isCurseForgeError(t){const r=t;return!!r&&typeof r.errorCode==="number"&&typeof r.errorMessage==="string"}const sr=1018;const ir=/Invalid slug in project relations: '([^']*)'/;function isInvalidProjectSlugCurseForgeError(t){return isCurseForgeError(t)&&t.errorCode===sr}function getInvalidProjectSlug(t){return isInvalidProjectSlugCurseForgeError(t)?t.errorMessage.match(ir)?.[1]:undefined}const or=1009;function isInvalidGameVersionIdCurseForgeError(t){return isCurseForgeError(t)&&t.errorCode===or}const CURSEFORGE_GAME_VERSION_SNAPSHOT_NAME_COMPARER=(t,r)=>{const n=t?.replace("-Snapshot","");const s=r?.replace("-Snapshot","");return n===s};const CURSEFORGE_GAME_VERSION_PLUGIN_NAME_COMPARER=(t,r)=>{const n=t?.match(/\d+\.\d+/)?.[0];const s=r?.match(/\d+\.\d+/)?.[0];return n===s};function findCurseForgeGameVersionIdsByNames(t,r,n,s){n||=I;return iterable_$i(r).map((r=>{const i=t.find((t=>n(t.name,r)));if(i||!s){return i}return t.find((t=>s(t.name,r)))})).filter((t=>t)).map((t=>t.id)).distinct().toArray()}function formatCurseForgeGameVersion(t){return`${t.version.major}.${t.version.minor}${t.version.patch?`.${t.version.patch}`:""}`}function formatCurseForgeGameVersionSnapshot(t){return`${t.version.major}.${t.version.minor}${t.version.patch?`.${t.version.patch}`:""}${t.isSnapshot?"-Snapshot":""}`}function createCurseForgeGameVersionMap(t,r){return{game_versions:filterGameVersionsByTypeName(t,r,"minecraft"),game_versions_for_plugins:filterGameVersionsByTypeName(t,r,"bukkit"),game_versions_for_addons:filterGameVersionsByTypeName(t,r,"addon"),loaders:filterGameVersionsByTypeName(t,r,"modloader"),java_versions:filterGameVersionsByTypeName(t,r,"java"),environments:filterGameVersionsByTypeName(t,r,"environment")}}function filterGameVersionsByTypeName(t,r,n){const s=r.filter((t=>t.slug.startsWith(n)));return t.filter((t=>s.some((r=>r.id===t.gameVersionTypeID))))}const ar={id:1,name:"Bukkit",slug:"bukkit"};function packCurseForgeVersionInit(t,r,n,s){n=FileInfo.of(n);const i=typeof s==="number";const o={changelog:t.changelog||"",changelogType:t.changelog_type||"markdown",displayName:i||!t.name?n.name:t.name,parentFileID:s,gameVersions:i?undefined:r||[],releaseType:t.version_type||te.RELEASE,relations:i||!t.dependencies?.length?undefined:{projects:t.dependencies}};return{file:n,metadata:o}}const lr="https://minecraft.curseforge.com/api";class CurseForgeUploadApiClient{_fetch;_gameVersionProvider;constructor(t){this._fetch=createFetch({handler:t?.fetch,baseUrl:t?.baseUrl||t?.fetch?.["baseUrl"]||lr,defaultHeaders:{"X-Api-Token":t?.token}}).use(simpleCache()).use(throwOnError());this._gameVersionProvider=t?.gameVersionProvider||Gt}async getGameVersionTypes(){const t=await this._fetch("/game/version-types?cache=true");const r=await t.json();if(!r.some((t=>t.id===ar.id))){r.unshift(ar)}return r}async getGameVersions(){const t=await this._fetch("/game/versions?cache=true");return await t.json()}async getGameVersionMap(){const t=await this.getGameVersions();const r=await this.getGameVersionTypes();return createCurseForgeGameVersionMap(t,r)}async createVersion(t){const r=await this.getGameVersionIdVariants(t);let n=undefined;for(const s of t.files||[]){const i={version:t,file:s,game_versions:r,version_id:n?.id};const o=await retry((()=>this.uploadFile(i)),{onError:t=>tryHandleUploadError(t,i)});if(!n){n={id:o.id,project_id:o.project_id,name:o.name,files:[]}}n.files.push(o)}return n}async uploadFile(t){const r=t.version.project_id;const n=packCurseForgeVersionInit(t.version,t.game_versions[0],t.file,t.version_id);const s=await this._fetch(`/projects/${r}/upload-file`,HttpRequest.post().with(n));const i=(await s.json()).id;return{id:i,name:n.metadata.displayName||n.file.name,url:`https://www.curseforge.com/api/v1/mods/${r}/files/${i}/download`,project_id:r,version_id:t.version_id||i}}async getGameVersionIdVariants(t){const r=t.loaders||[];const n=t.java_versions||[];const s=t.game_versions?.length?await this._gameVersionProvider(t.game_versions):[];const i=await this.getGameVersionMap();const o=n.map((t=>JavaVersion.of(t).name));const a=s.map((t=>formatCurseForgeGameVersionSnapshot(t)));const l=s.map((t=>formatCurseForgeGameVersion(t)));const c=findCurseForgeGameVersionIdsByNames(i.game_versions,a,undefined,CURSEFORGE_GAME_VERSION_SNAPSHOT_NAME_COMPARER);const u=findCurseForgeGameVersionIdsByNames(i.loaders,r);const d=findCurseForgeGameVersionIdsByNames(i.java_versions,o);const p=findCurseForgeGameVersionIdsByNames(i.game_versions_for_plugins,l,undefined,CURSEFORGE_GAME_VERSION_PLUGIN_NAME_COMPARER);const h=findCurseForgeGameVersionIdsByNames(i.game_versions_for_addons,l,undefined,CURSEFORGE_GAME_VERSION_PLUGIN_NAME_COMPARER);const m=[u.length?c.concat(u,d):c,p,u.length?c:[],h];if(!u.length){[m[0],m[1]]=[m[1],m[0]]}const g=m.filter((t=>t.length));return g.length?g:[[]]}}async function tryHandleUploadError(t,r){if(!isHttpError(t)){return false}const n=await t.response.json().catch((()=>undefined));if(!isCurseForgeError(n)){return false}if(isInvalidProjectSlugCurseForgeError(n)){return handleInvalidProjectSlugCurseForgeError(r,n)}if(isInvalidGameVersionIdCurseForgeError(n)){return handleInvalidGameVersionIdCurseForgeError(r)}return false}function handleInvalidProjectSlugCurseForgeError(t,r){const n=getInvalidProjectSlug(r)||"";const s=t.version.dependencies;t.version={...t.version};t.version.dependencies=t.version.dependencies?.filter((t=>t.slug!==n));return s?.length!==t.version.dependencies?.length}function handleInvalidGameVersionIdCurseForgeError(t){t.version={...t.version};t.game_versions=[...t.game_versions||[]];t.game_versions.shift();return true}class CurseForgeUploader extends GenericPlatformUploader{constructor(t){super(t)}get platform(){return We.CURSEFORGE}async uploadCore(t){argument_error_ArgumentError.throwIfNullOrEmpty(t.id,"request.id","A project ID is required to upload files to CurseForge.");argument_error_ArgumentError.throwIfNullOrEmpty(t.loaders,"request.loaders","At least one loader should be specified to upload files to CurseForge.");argument_error_ArgumentError.throwIfNullOrEmpty(t.gameVersions,"request.gameVersions","At least one game version should be specified to upload files to CurseForge.");const r=new CurseForgeUploadApiClient({token:t.token.unwrap(),fetch:this._fetch});const n=new CurseForgeEternalApiClient({fetch:this._fetch});const s=await this.getProject(t.id,n);const i=await this.createVersion(t,s.id,r,n);return{id:s.id,version:i.id,url:`${s.links.websiteUrl}/files/${i.id}`,files:i.files.map((t=>({id:t.id,name:t.name,url:t.url})))}}async getProject(t,r){const n=await r.getProject(t).catch((()=>undefined));if(n){return n}if(!isCurseForgeProjectId(t)){throw new Error(`Cannot access CurseForge project "${t}" by its slug. Please specify the ID instead.`)}this._logger.debug(`CurseForge project "${t}" is inaccessible.`);return{id:+t,slug:String(t),links:{websiteUrl:`https://www.curseforge.com/minecraft/mc-mods/${t}`}}}async createVersion(t,r,n,s){const i=await this.convertToCurseForgeDependencies(t.dependencies,s);return await n.createVersion({name:t.name,project_id:r,version_type:t.versionType,changelog:t.changelog,game_versions:t.gameVersions,java_versions:t.java,loaders:t.loaders,files:t.files,dependencies:i})}async convertToCurseForgeDependencies(t,r){const n=this.convertToSimpleDependencies(t,er.fromDependencyType);const s=await Promise.all(n.map((async([t,n])=>({slug:isCurseForgeProjectId(t)?await r.getProject(t).catch((()=>undefined)).then((t=>t?.slug)):t,type:n}))));const i=s.filter((t=>t.slug&&t.type)).filter(((t,r,n)=>r===n.findIndex((r=>stringEquals(t.slug,r.slug,{ignoreCase:true})))));return i}}function packGitHubReleaseInit(t){return{...{...t,owner:undefined,repo:undefined,assets:undefined}}}function packGitHubReleasePatch(t){return{...{...t,owner:undefined,repo:undefined,id:undefined,assets:undefined}}}const cr="https://api.github.com";const ur="2022-11-28";class GitHubApiClient{_fetch;constructor(t){this._fetch=createFetch({handler:t?.fetch,baseUrl:t?.baseUrl||t?.fetch?.["baseUrl"]||cr,defaultHeaders:{Accept:"application/vnd.github+json","X-GitHub-Api-Version":ur,Authorization:t?.token&&`Bearer ${t.token}`}}).use(defaultResponse({response:t=>HttpResponse.json(null,t)})).use(throwOnError({filter:t=>!t.ok&&t.status!==404}))}async getRelease(t){const{owner:r,repo:n,id:s,tag_name:i}=t;const o=typeof s==="number"?`/repos/${r}/${n}/releases/${s}`:`/repos/${r}/${n}/releases/tags/${i}`;const a=await this._fetch(o);return await a.json()??undefined}async createRelease(t){const{owner:r,repo:n,assets:s}=t;const i=packGitHubReleaseInit(t);const o=await this._fetch(`/repos/${r}/${n}/releases`,HttpRequest.post().json(i));const a=await o.json();if(s?.length){return await this.updateRelease({owner:r,repo:n,id:a.id,assets:s})}return a}async updateRelease(t){const{owner:r,repo:n,id:s,assets:i}=t;if(i?.length){await this.updateReleaseAssets({owner:r,repo:n,id:s,assets:i})}const o=packGitHubReleasePatch(t);const a=Object.values(o).filter((t=>t!==undefined)).length!==0;if(!a){return await this.getRelease(t)}const l=await this._fetch(`/repos/${r}/${n}/releases/${s}`,HttpRequest.patch().json(o));return await l.json()}async updateReleaseAssets(t){const r=[];const n=await this.getRelease(t);for(const s of t.assets){const i=FileInfo.of(s);const o=n.assets.find((t=>t.name===i.name||t.name===i.path));if(o){await this.deleteReleaseAsset({owner:t.owner,repo:t.repo,id:o.id})}const a=await this.uploadReleaseAsset({upload_url:n.upload_url,asset:i});r.push(a)}return r}async uploadReleaseAsset(t){const{upload_url:r,asset:n}=t;const s=r.includes("{")?r.substring(0,r.indexOf("{")):r;const i=FileInfo.of(n);const o=encodeURIComponent(i.name);const a=i.stream();const l=await this._fetch(`${s}?name=${o}`,HttpRequest.post().with(a));return await l.json()}async deleteReleaseAsset(t){const{owner:r,repo:n,id:s}=t;const i=await this._fetch(`/repos/${r}/${n}/releases/assets/${s}`,HttpRequest["delete"]());return i.ok}}class GitHubUploader extends GenericPlatformUploader{_context;constructor(t){super(t);this._context=t?.githubContext}get platform(){return We.GITHUB}async uploadCore(t){ArgumentNullError.throwIfNull(this._context?.repo,"context.repo","The information about the repository is required to upload files to GitHub.");const r=new GitHubApiClient({token:t.token.unwrap(),fetch:this._fetch,baseUrl:this._context.apiUrl});const n=this._context.repo;const s=await this.updateOrCreateRelease(t,r);return{repo:`${n.owner}/${n.repo}`,tag:s.tag_name,url:s.html_url,files:s.assets.map((t=>({id:t.id,name:t.name,url:t.browser_download_url})))}}async getOrCreateReleaseId(t,r){const n=this._context.repo;const s=t.tag||this._context.tag||t.version;let i=undefined;let o=false;if(t.tag){i=await r.getRelease({...n,tag_name:t.tag}).then((t=>t?.id))}else if(this._context.payload.release?.id){i=this._context.payload.release.id}else if(s){i=await r.getRelease({...n,tag_name:s}).then((t=>t?.id))}if(!i&&s){i=(await r.createRelease({...n,tag_name:s,target_commitish:t.commitish,name:t.name,body:t.changelog,draft:t.draft,prerelease:t.prerelease??t.versionType!==te.RELEASE,discussion_category_name:t.discussion,generate_release_notes:t.generateChangelog??!t.changelog}))?.id;o=true}if(!i){throw new Error(`Cannot find or create GitHub Release${s?` (${s})`:""}.`)}return[i,o]}async updateOrCreateRelease(t,r){const[n,s]=await this.getOrCreateReleaseId(t,r);const i=!t.changelog||s?undefined:t.changelog;const o=t.files;return await r.updateRelease({...this._context.repo,id:n,body:i,assets:o})}}function packModrinthVersionInit(t){const{files:r=[]}=t;const n={...{...t,files:undefined},name:t.name||t.version_number||r[0]&&FileInfo.of(r[0]).name,version_type:t.version_type??te.RELEASE,featured:t.featured??true,dependencies:t.dependencies??[],game_versions:t.game_versions??[],loaders:t.loaders??[],primary_file:r.length?"_0":undefined,file_parts:r.map(((t,r)=>`_${r}`))};const s=r.reduce(((t,r,n)=>{t[`_${n}`]=FileInfo.of(r);return t}),{data:n});return s}function packModrinthVersionSearchTemplate(t){const r=t?.loaders?JSON.stringify(t.loaders):undefined;const n=t?.game_versions?JSON.stringify(t.game_versions):undefined;const s=t?.featured??undefined;return{loaders:r,game_versions:n,featured:s}}const fr=2;const dr=`https://api.modrinth.com/v${fr}`;const pr=`https://staging-api.modrinth.com/v${fr}`;class ModrinthApiClient{_fetch;constructor(t){this._fetch=createFetch({handler:t?.fetch,baseUrl:t?.baseUrl||t?.fetch?.["baseUrl"]||dr,defaultHeaders:{Authorization:t?.token}}).use(simpleCache()).use(defaultResponse({response:t=>HttpResponse.json(null,t)})).use(throwOnError({filter:t=>!t.ok&&t.status!==404}))}async getLoaders(){const t=await this._fetch("/tag/loader?cache=true");return await t.json()??[]}async getGameVersions(){const t=await this._fetch("/tag/game_version?cache=true");return await t.json()??[]}async getProject(t){const r=await this._fetch(`/project/${t}`);return await r.json()??undefined}async getProjectId(t){const r=await this._fetch(`/project/${t}/check`);return(await r.json())?.id??undefined}async getProjects(t){const r=await this._fetch("/projects",HttpRequest.get().with({ids:JSON.stringify(asArray(t))}));return await r.json()??[]}async updateProject(t){const r=await this._fetch(`/project/${t.id}`,HttpRequest.patch().json(t));return r.ok}async deleteProject(t){const r=await this._fetch(`/project/${t}`,HttpRequest["delete"]());return r.ok}async getVersion(t){const r=await this._fetch(`/version/${t}`);return await r.json()??undefined}async getVersions(t){const r=await this._fetch("/versions",HttpRequest.get().with({ids:JSON.stringify(asArray(t))}));return await r.json()??[]}async createVersion(t){const r=packModrinthVersionInit(t);const n=await this._fetch("/version",HttpRequest.post().with(r));return await n.json()??undefined}async updateVersion(t){const r=await this._fetch(`/version/${t.id}`,HttpRequest.patch().json(t));return r.ok}async deleteVersion(t){const r=await this._fetch(`/version/${t}`,HttpRequest["delete"]());return r.ok}async getProjectVersions(t,r){const n=packModrinthVersionSearchTemplate(r);const s=await this._fetch(`/project/${t}/version`,HttpRequest.get().with(n));return await s.json()??[]}async unfeaturePreviousProjectVersions(t,r){r??=pe.SUBSET;const n=await this.getProjectVersions(t.project_id,{featured:true});const s={};for(const i of n){if(!pe.shouldUnfeature(i,t,r)){continue}s[i.id]=await this.updateVersion({id:i.id,featured:false})}return s}}var hr;(function(t){t["REQUIRED"]="required";t["OPTIONAL"]="optional";t["INCOMPATIBLE"]="incompatible";t["EMBEDDED"]="embedded"})(hr||(hr={}));const mr={ignoreCase:true,ignoreNonWordCharacters:true};function modrinth_dependency_type_toDependencyType(t){switch(t){case yr.REQUIRED:return He.REQUIRED;case yr.OPTIONAL:return He.OPTIONAL;case yr.INCOMPATIBLE:return He.INCOMPATIBLE;case yr.EMBEDDED:return He.EMBEDDED;default:return undefined}}function modrinth_dependency_type_fromDependencyType(t){switch(t){case He.REQUIRED:return yr.REQUIRED;case He.OPTIONAL:case He.RECOMMENDED:return yr.OPTIONAL;case He.EMBEDDED:return yr.EMBEDDED;case He.CONFLICTING:case He.INCOMPATIBLE:return yr.INCOMPATIBLE;default:return undefined}}const gr={fromDependencyType:modrinth_dependency_type_fromDependencyType,toDependencyType:modrinth_dependency_type_toDependencyType};const yr=j.create(hr,mr,gr);class ModrinthUploader extends GenericPlatformUploader{constructor(t){super(t)}get platform(){return We.MODRINTH}async uploadCore(t){argument_error_ArgumentError.throwIfNullOrEmpty(t.id,"request.id","A project ID is required to upload files to Modrinth.");argument_error_ArgumentError.throwIfNullOrEmpty(t.version,"request.version","A version number is required to upload files to Modrinth.");argument_error_ArgumentError.throwIfNullOrEmpty(t.loaders,"request.loaders","At least one loader should be specified to upload files to Modrinth.");argument_error_ArgumentError.throwIfNullOrEmpty(t.gameVersions,"request.gameVersions","At least one game version should be specified to upload files to Modrinth.");const r=new ModrinthApiClient({token:t.token.unwrap(),fetch:this._fetch});const n=t.unfeatureMode??(t.featured?pe.SUBSET:pe.NONE);const s=await this.getProject(t.id,r);const i=await this.createVersion(t,s,r);await this.unfeaturePreviousVersions(i,n,r);return{id:s.id,version:i.id,url:`https://modrinth.com/${s.project_type}/${s.slug}/version/${i.version_number}`,files:i.files.map((t=>({id:t.hashes.sha1,name:t.filename,url:t.url})))}}async getProject(t,r){const n=await r.getProject(t);if(n){return n}return{id:t,slug:t,project_type:"mod"}}async createVersion(t,r,n){const s=await this.convertToModrinthGameVersionNames(t.gameVersions,n);const i=await this.convertToModrinthLoaderNames(t.loaders,r,n);const o=await this.convertToModrinthDependencies(t.dependencies,n);return await n.createVersion({name:t.name,version_number:t.version,project_id:r.id,changelog:t.changelog,dependencies:o,game_versions:s,version_type:t.versionType,loaders:i,featured:t.featured,files:t.files})}async convertToModrinthDependencies(t,r){const n=this.convertToSimpleDependencies(t,yr.fromDependencyType);const s=await Promise.all(n.map((async([t,n])=>({project_id:await r.getProjectId(t).catch((()=>undefined)),dependency_type:n}))));const i=s.filter((t=>t.project_id&&t.dependency_type)).filter(((t,r,n)=>r===n.findIndex((r=>t.project_id===r.project_id))));return i}async convertToModrinthLoaderNames(t,r,n){if(!t?.length){return[]}const s=await n.getLoaders();return iterable_$i(t).map((t=>s.find((r=>N(t,r.name))))).filter((t=>t)).filter((t=>t.supported_project_types.includes(r.project_type)||r.id===r.slug)).map((t=>t.name)).toArray()}async convertToModrinthGameVersionNames(t,r){if(!t?.length){return[]}const n=await r.getGameVersions();return iterable_$i(t).map((t=>n.find((r=>N(t,r.version)))?.version)).filter((t=>t)).toArray()}async unfeaturePreviousVersions(t,r,n){if(r===pe.NONE){return}this._logger.info("🔽 Initiating unfeaturing of older Modrinth project versions");const s=await n.unfeaturePreviousProjectVersions(t,r);const i=Object.entries(s).filter((([,t])=>t)).map((([t])=>t));const o=Object.entries(s).filter((([,t])=>!t)).map((([t])=>t));if(i.length){this._logger.info(`🟢 Successfully unfeatured ${i.join(", ")}`)}if(o.length){this._logger.info(`⚠️ Failed to unfeature ${o.join(", ")}. Please, double-check your token`)}}}function createPlatformUploader(t,r){switch(t){case We.MODRINTH:return new ModrinthUploader(r);case We.CURSEFORGE:return new CurseForgeUploader(r);case We.GITHUB:return new GitHubUploader(r);default:throw new Error(`Unknown platform '${We.format(t)}'`)}}const br=["minecraft","java","fabricloader"];const _r=new Map([["fabric","fabric-api"]].map((([t,r])=>[t,typeof r==="string"?iterable_$i(We.values()).map((t=>[t,r])).toMap():r])));function getFabricDependencies(t){return iterable_$i(Ye.values()).flatMap((r=>toFabricDependencyArray(t?.[r],r))).toArray()}function toFabricDependencyArray(t,r){return Object.entries(t||{}).map((([t,n])=>({id:t,version:n,type:r})))}function normalizeFabricDependency(t){return createDependency({id:t?.id,versions:t?.version,type:Ye.toDependencyType(t?.type||Ye.DEPENDS),ignore:br.includes(t?.id),aliases:_r.get(t?.id)})}var Sr;(function(t){t["FABRIC"]="fabric";t["FORGE"]="forge";t["QUILT"]="quilt";t["NEOFORGE"]="neoforge"})(Sr||(Sr={}));const Er={ignoreCase:true};const vr=j.create(Sr,Er);function getFabricMetadataCustomPayload(t){return containsLegacyCustomPayloadDefinition(t)?Rr(t):t?.custom?.[oe]||{}}function containsLegacyCustomPayloadDefinition(t){return!!t?.custom?.modmanager}function _getLegacyFabricMetadataCustomPayload(t){const r=t?.custom?.modmanager;const n=t?.custom?.[oe];return{...r,...n}}const Rr=(0,W.deprecate)(_getLegacyFabricMetadataCustomPayload,"Use `mc-publish` field instead of `modmanager` field.");const wr=[vr.FABRIC];function getLoadersFromFabricMetadataCustomPayload(t){if(containsLegacyLoadersDefinition(t)){return Cr(t)}return t?.loaders||[...wr]}function containsLegacyLoadersDefinition(t){return typeof t?.quilt==="boolean"}function _getLegacyLoadersFromFabricMetadataCustomPayload(t){return t?.quilt?[vr.FABRIC,vr.QUILT]:[...wr]}const Cr=(0,W.deprecate)(_getLegacyLoadersFromFabricMetadataCustomPayload,'Use the universal `"loaders": ["fabric", "quilt"]` field instead of `"quilt": true`');function getDependenciesFromFabricMetadataCustomPayload(t){if(!Array.isArray(t?.dependencies)){return[]}return t?.dependencies?.map((t=>createDependency(t))).filter((t=>t))||[]}function getProjectIdFromFabricMetadataCustomPayload(t,r){const n=t?.[r];return n?string_utils_asString(n):undefined}class FabricMetadata{_raw;constructor(t){this._raw=t||{}}static from(t){return new FabricMetadata(t)}get id(){return string_utils_asString(this._raw.id||"")}get name(){return string_utils_asString(this._raw.name||this._raw.id||"")}get version(){return string_utils_asString(this._raw.version||"*")}get loaders(){return getLoadersFromFabricMetadataCustomPayload(this.customPayload)}get gameName(){return zt}get gameVersions(){return[...this.dependencies.find((t=>t.id===this.gameName))?.versions||[]]}get dependencies(){const t=getFabricDependencies(this._raw).map(normalizeFabricDependency).filter((t=>t));const r=getDependenciesFromFabricMetadataCustomPayload(this.customPayload);const n=iterable_$i(t).concat(r).filter((t=>t)).map((t=>[t.id,t])).toMap();return[...n.values()]}get raw(){return this._raw}get customPayload(){return getFabricMetadataCustomPayload(this._raw)}getProjectId(t){return getProjectIdFromFabricMetadataCustomPayload(this.customPayload,t)||this.id}}const Ar="fabric.mod.json";class FabricMetadataReader{async readMetadataFile(t){const r=await readAllZippedText(t,Ar);return FabricMetadata.from(JSON.parse(r))}}var Tr=s(4920);const Ir=["minecraft","java","forge"];function getForgeDependencies(t){const r=iterable_$i(Object.values(t?.dependencies||{})).filter((t=>Array.isArray(t))).flatMap((t=>t)).filter((t=>t?.modId)).map((t=>[t.modId,t])).reverse().toMap();return[...r.values()]}function normalizeForgeDependency(t){const r=getForgeDependencyCustomPayload(t);const n=t?.modId;const s=t?.versionRange;const i=Ir.includes(t?.modId)||typeof r.ignore==="boolean"&&r.ignore;const o=typeof r.ignore==="boolean"?undefined:r.ignore;const a=iterable_$i(We.values()).map((t=>[t,r[t]?string_utils_asString(r[t]):undefined])).filter((([,t])=>t)).toMap();const l=t?.incompatible&&He.INCOMPATIBLE||t?.embedded&&He.EMBEDDED||t?.mandatory&&He.REQUIRED||He.OPTIONAL;return createDependency({id:n,versions:s,type:l,ignore:i,ignoredPlatforms:o,aliases:a})}function getForgeDependencyCustomPayload(t){return containsLegacyForgeDependencyCustomPayload(t)?Pr(t):t?.[oe]||{}}function containsLegacyForgeDependencyCustomPayload(t){return!!t?.custom?.[oe]}function _getLegacyForgeDependencyCustomPayload(t){const r=t?.custom?.[oe];const n=t?.[oe];return{...r,...n}}const Pr=(0,W.deprecate)(_getLegacyForgeDependencyCustomPayload,"Define `mc-publish` property directly on your Forge dependency object instead of using nested `custom.mc-publish`.");function getForgeMetadataCustomPayload(t){return forge_metadata_custom_payload_containsLegacyCustomPayloadDefinition(t)?Nr(t):t?.[oe]||{}}function forge_metadata_custom_payload_containsLegacyCustomPayloadDefinition(t){return!!t?.custom?.[oe]||!!t?.custom?.projects||!!t?.projects}function _getLegacyForgeMetadataCustomPayload(t){const r={...t?.projects,...t?.custom?.projects,...t?.custom?.[oe]};const n=t?.[oe];return{...r,...n}}const Nr=(0,W.deprecate)(_getLegacyForgeMetadataCustomPayload,"Use top-level `mc-publish` field in your mods.toml.");function getLoadersFromForgeMetadataCustomPayload(t){const r=getForgeMetadataCustomPayload(t);return r.loaders||[vr.FORGE]}function getDependenciesFromForgeMetadataCustomPayload(t){if(!Array.isArray(t?.dependencies)){return[]}return t?.dependencies?.map((t=>createDependency(t))).filter((t=>t))||[]}function getProjectIdFromForgeMetadataCustomPayload(t,r){const n=t?.[r];return n?string_utils_asString(n):undefined}class ForgeMetadata{_raw;constructor(t){this._raw=t||{}}static from(t){return new ForgeMetadata(t)}get id(){return string_utils_asString(this.mod.modId||"")}get name(){return string_utils_asString(this.mod.displayName||this.mod.modId||"")}get version(){return string_utils_asString(this.mod.version||"*")}get loaders(){return getLoadersFromForgeMetadataCustomPayload(this._raw)}get gameName(){return zt}get gameVersions(){return[...this.dependencies.find((t=>t.id===this.gameName))?.versions||[]]}get dependencies(){const t=getForgeDependencies(this._raw).map(normalizeForgeDependency).filter((t=>t));const r=getDependenciesFromForgeMetadataCustomPayload(this.customPayload);const n=iterable_$i(t).concat(r).filter((t=>t)).map((t=>[t.id,t])).toMap();return[...n.values()]}get mod(){return this._raw.mods?.[0]||{}}get raw(){return this._raw}get customPayload(){return getForgeMetadataCustomPayload(this._raw)}getProjectId(t){return getProjectIdFromForgeMetadataCustomPayload(this.customPayload,t)||this.id}}const Dr="META-INF/mods.toml";class ForgeMetadataReader{async readMetadataFile(t){const r=await readAllZippedText(t,Dr);const n=ForgeMetadata.from((0,Tr.parse)(r));if(!n.dependencies.some((t=>t.id===vr.FORGE))){throw new Error("A Forge metadata file must contain a 'forge' dependency")}return n}}const Or=["minecraft","java","quilt_loader"];const kr=iterable_$i([["fabric","fabric-api"],["quilt_base","qsl"],["quilted_fabric_api","qsl"]].map((([t,r])=>[t,typeof r==="string"?iterable_$i(We.values()).map((t=>[t,r])).toMap():r]))).toMap();function getQuiltDependencies(t){const r=iterable_$i(mapQuiltDependencies(t?.quilt_loader?.depends)).concat(mapQuiltDependencies(t?.quilt_loader?.breaks,{breaking:true})).concat(mapQuiltDependencies(t?.quilt_loader?.provides,{provided:true})).filter((t=>t.id)).map((t=>[t.id,t])).toMap();return[...r.values()]}function mapQuiltDependencies(t,r){if(!t){return[]}return iterable_$i(t).map((t=>typeof t==="string"?{id:t,...r}:{...t,...r}))}function normalizeQuiltDependency(t){const r=getQuiltDependencyCustomPayload(t);const n=t?.id?.includes(":")?t.id.substring(t.id.indexOf(":")+1):t?.id;const s=t?.version||t?.versions;const i=Or.includes(n)||typeof r.ignore==="boolean"&&r.ignore;const o=typeof r.ignore==="boolean"?undefined:r.ignore;const a=t?.breaking&&t?.unless&&He.CONFLICTING||t?.breaking&&He.INCOMPATIBLE||t?.provided&&He.EMBEDDED||(t?.optional||t?.unless)&&He.OPTIONAL||He.REQUIRED;const l=iterable_$i(kr.get(n)||[]).concat(iterable_$i(We.values()).map((t=>[t,r[t]?string_utils_asString(r[t]):undefined]))).filter((([,t])=>t)).toMap();return createDependency({id:n,versions:s,type:a,ignore:i,ignoredPlatforms:o,aliases:l})}function getQuiltDependencyCustomPayload(t){return t?.[oe]||{}}function getQuiltMetadataCustomPayload(t){return quilt_metadata_custom_payload_containsLegacyCustomPayloadDefinition(t)?$r(t):t?.[oe]||{}}function quilt_metadata_custom_payload_containsLegacyCustomPayloadDefinition(t){return!!t?.projects}function _getLegacyQuiltMetadataCustomPayload(t){const r=t?.projects;const n=t?.[oe];return{...r,...n}}const $r=(0,W.deprecate)(_getLegacyQuiltMetadataCustomPayload,"Use top-level `mc-publish` field in your quilt.mod.json.");const Lr=[vr.QUILT];function getLoadersFromQuiltMetadataCustomPayload(t){return t?.loaders||[...Lr]}function getDependenciesFromQuiltMetadataCustomPayload(t){if(!Array.isArray(t?.dependencies)){return[]}return t?.dependencies?.map((t=>createDependency(t))).filter((t=>t))||[]}function getProjectIdFromQuiltMetadataCustomPayload(t,r){const n=t?.[r];return n?string_utils_asString(n):undefined}class QuiltMetadata{_raw;constructor(t){this._raw=t||{}}static from(t){return new QuiltMetadata(t)}get id(){const t=string_utils_asString(this._raw.quilt_loader?.id||"");return t.includes(":")?t.substring(t.indexOf(":")+1):t}get name(){return string_utils_asString(this._raw.quilt_loader?.metadata?.name||this.id)}get version(){return string_utils_asString(this._raw.quilt_loader?.version||"*")}get loaders(){return getLoadersFromQuiltMetadataCustomPayload(this.customPayload)}get gameName(){return zt}get gameVersions(){return[...this.dependencies.find((t=>t.id===this.gameName))?.versions||[]]}get dependencies(){const t=getQuiltDependencies(this._raw).map(normalizeQuiltDependency).filter((t=>t));const r=getDependenciesFromQuiltMetadataCustomPayload(this.customPayload);const n=iterable_$i(t).concat(r).filter((t=>t)).map((t=>[t.id,t])).toMap();return[...n.values()]}get raw(){return this._raw}get customPayload(){return getQuiltMetadataCustomPayload(this._raw)}getProjectId(t){return getProjectIdFromQuiltMetadataCustomPayload(this.customPayload,t)||this.id}}const xr="quilt.mod.json";class QuiltMetadataReader{async readMetadataFile(t){const r=await readAllZippedText(t,xr);return QuiltMetadata.from(JSON.parse(r))}}var Fr;(function(t){t["REQUIRED"]="required";t["OPTIONAL"]="optional";t["EMBEDDED"]="embedded";t["INCOMPATIBLE"]="incompatible";t["DISCOURAGED"]="discouraged"})(Fr||(Fr={}));const Mr={ignoreCase:true};function neoforge_dependency_type_toDependencyType(t){switch(t){case jr.REQUIRED:return He.REQUIRED;case jr.OPTIONAL:return He.OPTIONAL;case jr.EMBEDDED:return He.EMBEDDED;case jr.INCOMPATIBLE:return He.INCOMPATIBLE;case jr.DISCOURAGED:return He.CONFLICTING;default:return undefined}}function neoforge_dependency_type_fromDependencyType(t){switch(t){case He.REQUIRED:return jr.REQUIRED;case He.OPTIONAL:case He.RECOMMENDED:return jr.OPTIONAL;case He.EMBEDDED:return jr.EMBEDDED;case He.CONFLICTING:return jr.DISCOURAGED;case He.INCOMPATIBLE:return jr.INCOMPATIBLE;default:return undefined}}const Br={toDependencyType:neoforge_dependency_type_toDependencyType,fromDependencyType:neoforge_dependency_type_fromDependencyType};const jr=j.create(Fr,Mr,Br);const Wr=["minecraft","java","neoforge"];function getNeoForgeDependencies(t){const r=iterable_$i(Object.values(t?.dependencies||{})).filter((t=>Array.isArray(t))).flatMap((t=>t)).filter((t=>t?.modId)).map((t=>[t.modId,t])).reverse().toMap();return[...r.values()]}function normalizeNeoForgeDependency(t){const r=t?.[oe]||{};const n=t?.modId;const s=t?.versionRange;const i=Wr.includes(t?.modId)||typeof r.ignore==="boolean"&&r.ignore;const o=typeof r.ignore==="boolean"?undefined:r.ignore;const a=iterable_$i(We.values()).map((t=>[t,r[t]?string_utils_asString(r[t]):undefined])).filter((([,t])=>t)).toMap();const l=jr.toDependencyType(t?.type||(t?.mandatory??true?jr.REQUIRED:jr.OPTIONAL));return createDependency({id:n,versions:s,type:l,ignore:i,ignoredPlatforms:o,aliases:a})}function getNeoForgeMetadataCustomPayload(t){return t?.[oe]||{}}function getLoadersFromNeoForgeMetadataCustomPayload(t){const r=getNeoForgeMetadataCustomPayload(t);return r.loaders||[vr.NEOFORGE]}function getDependenciesFromNeoForgeMetadataCustomPayload(t){if(!Array.isArray(t?.dependencies)){return[]}return t?.dependencies?.map((t=>createDependency(t))).filter((t=>t))||[]}function getProjectIdFromNeoForgeMetadataCustomPayload(t,r){const n=t?.[r];return n?string_utils_asString(n):undefined}class NeoForgeMetadata{_raw;constructor(t){this._raw=t||{}}static from(t){return new NeoForgeMetadata(t)}get id(){return string_utils_asString(this.mod.modId||"")}get name(){return string_utils_asString(this.mod.displayName||this.mod.modId||"")}get version(){return string_utils_asString(this.mod.version||"*")}get loaders(){return getLoadersFromNeoForgeMetadataCustomPayload(this._raw)}get gameName(){return zt}get gameVersions(){return[...this.dependencies.find((t=>t.id===this.gameName))?.versions||[]]}get dependencies(){const t=getNeoForgeDependencies(this._raw).map(normalizeNeoForgeDependency).filter((t=>t));const r=getDependenciesFromNeoForgeMetadataCustomPayload(this.customPayload);const n=iterable_$i(t).concat(r).filter((t=>t)).map((t=>[t.id,t])).toMap();return[...n.values()]}get mod(){return this._raw.mods?.[0]||{}}get raw(){return this._raw}get customPayload(){return getNeoForgeMetadataCustomPayload(this._raw)}getProjectId(t){return getProjectIdFromNeoForgeMetadataCustomPayload(this.customPayload,t)||this.id}}const Ur="META-INF/mods.toml";class NeoForgeMetadataReader{async readMetadataFile(t){const r=await readAllZippedText(t,Ur);const n=NeoForgeMetadata.from((0,Tr.parse)(r));if(!n.dependencies.some((t=>t.id===vr.NEOFORGE))){throw new Error("A NeoForge metadata file must contain a 'neoforge' dependency")}return n}}function combineLoaderMetadataReaders(t){const r=[...t];const readMetadataFile=async t=>{for(const n of r){const r=await n.readMetadataFile(t).catch((()=>undefined));if(r){return r}}throw new Error(`Unable to read metadata from the file located at: '${t}'`)};return{readMetadataFile:readMetadataFile}}function createLoaderMetadataReader(t){switch(t){case vr.FABRIC:return new FabricMetadataReader;case vr.FORGE:return new ForgeMetadataReader;case vr.QUILT:return new QuiltMetadataReader;case vr.NEOFORGE:return new NeoForgeMetadataReader;default:throw new Error(`Unknown mod loader '${vr.format(t)}'.`)}}function createDefaultLoaderMetadataReader(){return combineLoaderMetadataReaders(iterable_$i(vr.values()).map(createLoaderMetadataReader))}const qr="GITHUB_EVENT_PATH";const Hr="GITHUB_REPOSITORY";const Vr="GITHUB_API_URL";const Gr="GITHUB_REF";const zr="refs/tags/";class GitHubContext{_env;_payload;constructor(t){this._env=t}get ref(){return environment_getEnvironmentVariable(Gr,this._env)}get tag(){const t=this.payload;if(t.release?.tag_name){return t.release.tag_name}const r=this.ref;if(r?.startsWith(zr)){return r.substring(zr.length)}return undefined}get version(){const t=this.tag;return/v\d/.test(t)?t.substring(1):t}get repo(){const t=environment_getEnvironmentVariable(Hr,this._env);if(t?.includes("/")){const[r,n]=t.split("/");return{owner:r,repo:n}}return undefined}get apiUrl(){return environment_getEnvironmentVariable(Vr,this._env)||cr}get payload(){if(this._payload){return this._payload}const t=environment_getEnvironmentVariable(qr,this._env);try{this._payload=JSON.parse((0,ae.readFileSync)(t,"utf8"))}catch{this._payload={}}return this._payload}}function parseActionParameterTypeDescriptor(t){if(!t){return undefined}t=t.replaceAll(/\s/g,"").replaceAll(/<.*>/g,"");const r=t.includes("[]");t=t.replaceAll("[]","");const n=t.indexOf("?");const s=n>=0?QueryString.parse(t.substring(n)):undefined;t=n>=0?t.substring(0,n):t;const i=normalizePattern(t);const[o,a]=i.split(";").map(parseImportDirective);return{...o,factory:a,options:s,isArray:r}}function normalizePattern(t){if(!t.includes("/")&&t.includes(".")){return normalizePatternInDotNotation(t)}if(!t.includes(":")){return t}const r=t.split(";");const n=r[0];if(!n.includes(":")){return n}const s=n.replaceAll(/:(?:\w+|{\w+})/g,"");const i=n.match(/^.*->/)?.[0];const o=n.match(/\{?(?<type>\w+)(?<isTypeImported>\}?):(?<isFactoryImported>\{?)(?<factory>\w+)\}?/)?.groups;const a=!o.isTypeImported&&!o.isFactoryImported?"":i;const l=a+(o.isFactoryImported?`{${o.factory}}`:o.factory);return`${s};${l}`}function normalizePatternInDotNotation(t){const r=t.split(";");const n=r[0];const s=n.match(/^(?<path>.*?\.)?(?<name>[\w]+?)(?::(?<factory>{?\w+}?))?$/);if(!s){return t}const i=s.groups.path;const o=s.groups.name;const a=i&&`${i}${o}`.replaceAll(".","/").replaceAll(/([a-z])([A-Z])/g,"$1-$2").toLowerCase();const l=s.groups.factory;const c=l?.charAt(0)==="{";const u=a?`${a}->{${o}}`:o;const d=l?c&&a?`${a}->${l}`:l:r[1];const p=[u,d].filter((t=>t)).join(";");return p}const action_parameter_path_parser_IDENTITY_ACTION_PARAMETER_PATH_PARSER=t=>[t||""];const SPLIT_BY_WORDS_ACTION_PARAMETER_PATH_PARSER=t=>(t||"").split(/[^\p{L}\p{N}]/u).map((t=>t.toLowerCase()));const SPLIT_BY_WORDS_AND_GROUP_ACTION_PARAMETER_PATH_PARSER=(t,r,n)=>{const s=SPLIT_BY_WORDS_ACTION_PARAMETER_PATH_PARSER(t,r,n);if(!r||!n){return s}const i=n.inputs?.[t]===r?n.groups?.input:n.outputs?.[t]===r?n.groups?.output:undefined;const o=i?Object.keys(i):[];const a=iterable_$i(o).map((t=>SPLIT_BY_WORDS_ACTION_PARAMETER_PATH_PARSER(t,r,n))).filter((t=>iterable_$i(s).startsWith(t))).max(((t,r)=>t.length-r.length));const l=(a?.length||0)+1;const c=flattenPath(s,l);return c};function flattenPath(t,r){if(!(r>=1)){r=1}while(t.length>r){t[t.length-2]+=capitalize(t[t.length-1]);t.splice(t.length-1)}return t}function action_parameter_descriptor_getActionParameterDescriptor(t,r,n,s,i){const o=i?.pathParser??IDENTITY_ACTION_PARAMETER_PATH_PARSER;const a=s?.[r];const l=a&&n(a,r,o(r,a,t));return l}function getActionParameterDescriptors(t,r,n,s){const i=s?.pathParser??action_parameter_path_parser_IDENTITY_ACTION_PARAMETER_PATH_PARSER;const o=n?Object.entries(n):[];const a=o.map((([n,s])=>r(s,n,i(n,s,t))));return a}function getActionInputDescriptor(t,r,n){return getActionParameterDescriptor(t,r,asActionInputDescriptor,t.inputs,n)}function action_input_descriptor_getActionInputDescriptors(t,r){return getActionParameterDescriptors(t,asActionInputDescriptor,t.inputs,r)}function asActionInputDescriptor(t,r,n){const s=t.default===undefined||t.default===Xr;const i=t.type||(s?"string":typeof t.default);return{name:r,path:n,redirect:t.redirect,type:parseActionParameterTypeDescriptor(i),description:t.description??"",required:t.required??false,default:s?undefined:t.default,deprecationMessage:t.deprecationMessage}}var Yr;(function(t){t["SPLIT"]="split";t["SEPARATOR"]="separator";t["PROCESS_SEPARATELY"]="processSeparately";t["TRIM_ENTRIES"]="trimEntries";t["REMOVE_EMPTY_ENTRIES"]="removeEmptyEntries";t["FLAT_DEPTH"]="flatDepth"})(Yr||(Yr={}));const Qr={ignoreCase:true,ignoreNonWordCharacters:true};const Kr=j.create(Yr,Qr);const Xr="${undefined}";const Jr="INPUT_";function setActionInput(t,r,n){const s=normalizeActionParameterName(t);const i=Jr+s;const o=r===undefined||r===Xr?undefined:typeof r==="string"?r:JSON.stringify(r);setEnvironmentVariable(i,o,n)}function setActionInputs(t,r){for(const[n,s]of t){setActionInput(n,s,r)}}function getActionInput(t,r,n){const s=normalizeActionParameterName(t);const i=Jr+s;const o=getEnvironmentVariable(i,n);const a=isActionInputDefined(o)?o:undefined;const l=r?.trimWhitespace??true?a?.trim():a;if(r?.required&&a===undefined){throw new Error(`Input required and not supplied: ${t}.`)}return l}function getActionInputs(t,r,n){return $i(t).map((t=>getActionInput(t,r,n))).toArray()}function getAllActionInputs(t,r){const n=new Map;const s=t?.required;const i=t?.trimWhitespace??true;for(const[t,o]of getAllEnvironmentVariables(r)){if(!t.startsWith(Jr)){continue}const r=t.substring(Jr.length);const a=isActionInputDefined(o);if(s&&!a){throw new Error(`Input required and not supplied: ${r}.`)}if(!a){continue}const l=i?o.trim():o;n.set(r,l)}return n}function isActionInputDefined(t){return typeof t==="string"&&t!==Xr}async function getAllActionInputsAsObject(t,r,n){const s=r?.moduleLoader||Je;const i=r?.converter||toType;const o=asArray(t);const a=getAllActionInputs(r,n);const l={};for(const[t,r]of a){const n=o.find((r=>stringEquals(r.name,t,{ignoreCase:true})));const a=n?.redirect?o.find((t=>t.name===n.redirect)):n;if(!a){continue}const c=await parseInput(r,n.type,s,i);if(c===undefined){throw new Error(`Cannot convert "${n.name}" to "${n.type.name}".`)}defineNestedProperty(l,a.path,{value:c,writable:true,configurable:true,enumerable:true})}return l}async function getAllActionInputsAsObjectUsingMetadata(t,r,n){const s=action_input_descriptor_getActionInputDescriptors(t,r);return await getAllActionInputsAsObject(s,r,n)}async function parseInput(t,r,n,s){const i=r.options?.getBoolean(Kr.SPLIT)??r.isArray;const o=i?parseMultipleInputs:parseSingleInput;return await o(t,r,n,s)}async function parseMultipleInputs(t,r,n,s){const i=r.options?.getRegExp(Kr.SEPARATOR)??/\r?\n/g;const o=r.options?.getBoolean(Kr.PROCESS_SEPARATELY)??true;const a=r.options?.getBoolean(Kr.TRIM_ENTRIES)??true;const l=r.options?.getBoolean(Kr.REMOVE_EMPTY_ENTRIES)??true;const c=r.options?.getNumber(Kr.FLAT_DEPTH)??1;const u=split(t,i,{trimEntries:a,removeEmptyEntries:l});if(!o){return await parseSingleInput(u,r,n,s)}const d=await Promise.all(u.map((t=>parseSingleInput(t,r,n,s))));const p=d.flat(c);return p}async function parseSingleInput(t,r,n,s){if(!r.factory&&!r.module){return await s(t,r.name)}const i=await executeImportDirective(r,{moduleLoader:n,required:false});if(r.factory){const s=await executeImportDirective(r.factory,{moduleLoader:n,defaultModuleProvider:t=>Promise.resolve(t.isDefault?i?.value??globalThis:globalThis),required:true});return await s.value(t,r.options)}const o=[i?.value,i?.module].filter((t=>t));for(const r of o){const[n]=await runSafely((()=>s(t,r)));if(n!==undefined){return n}}return undefined}const Zr={filler:"#"};const en={lineStart:"/* ",filler:"*",lineEnd:" */"};const tn={filler:"//"};const rn=null&&Zr;const nn=null&&["center"];function generateAutoGeneratedWarningText(t){const r="WARNING: AUTO-GENERATED FILE - DO NOT EDIT!\n\nPlease be advised that this is an auto-generated file and should NOT be modified. Any changes made to this file WILL BE OVERWRITTEN.";if(!t){return r}return`${r}\n\nTo make changes to the contents of this file, please modify the ${t} file instead. This will ensure that your changes are properly reflected in the auto-generated file.`}function auto_generated_generateAutoGeneratedWarningFrame(t){const r=t?.message??generateAutoGeneratedWarningText(t?.sourceFileName);const n=Array.isArray(t?.align)?t.align:typeof t?.align==="string"?[t.align]:nn;const s=t?.style?.filler??rn.filler;const i=t?.style?.lineStart??`${s} `;const o=t?.style?.lineEnd??` ${s}`;const a=t?.newline??DEFAULT_NEWLINE;const l=i.length+o.length;const c=Math.max((t?.lineWidth||0)-l,0);const u=splitLines(r,{maxLength:c});const d=$i(u).map((t=>t.length)).max()||0;const p=Math.ceil(d/s.length);const h=`${i}${s.repeat(p)}${o}`;const m=$i(u).map(((t,r)=>pad(t,d,{align:n[Math.min(r,n.length-1)]}))).map((t=>`${i}${t}${o}`)).append(h).prepend(h).join(a);return m}const sn=" ";const on=4;const an='"';function getTab(t){if(typeof t?.tab==="string"){return t.tab}if(typeof t?.tabSize==="number"&&t.tabSize!==on){return createTab(t.tabSize)}return sn}function typescript_formatting_options_getIndentation(t){const r=getTab(t);return createIndentation(r,t?.indent||0)}function typescript_formatting_options_getNewline(t){return typeof t?.newline==="string"?t.newline:we}function typescript_formatting_options_getQuotes(t){return typeof t?.preferredQuotes==="string"?t.preferredQuotes:an}function typescript_formatting_options_incrementIndent(t,r){const n=(t?.indent||0)+(r??1);return{...t,indent:n}}const ln=new Map([[on,sn]]);function createTab(t){const r=ln.get(t);if(r!==undefined){return r}const n=" ".repeat(t);ln.set(t,n);return n}const cn=new Map;function createIndentation(t,r){if(!r){return""}if(r===1){return t}const n=cn.get(t)||new Map;if(!n.size){cn.set(t,n)}const s=n.get(r);if(s!==undefined){return s}const i=t.repeat(r);n.set(r,i);return i}class typescript_comment_TypeScriptComment{_text;constructor(t){this._text=t}get text(){return this._text}get isSingleline(){return isSinglelineComment(this._text)}get isDirective(){return isDirectiveComment(this._text)}get isMultiline(){return isMultilineComment(this._text)}get isTSDoc(){return isTSDocComment(this._text)}static create(t,r){const n=typeof t==="string"?string_utils_splitLines(t):[...t];r||=n.length>1?dn:un;const s=n.map((t=>r.prefix+t.trim()));if(typeof r.startDelimiter==="string"){s.unshift(r.startDelimiter)}if(typeof r.endDelimiter==="string"){s.push(r.endDelimiter)}const i=s.join(Re);return new typescript_comment_TypeScriptComment(i)}static createSingleline(t){return typescript_comment_TypeScriptComment.create(t,un)}static createDirective(t){return typescript_comment_TypeScriptComment.create(t,fn)}static createMultiline(t){return typescript_comment_TypeScriptComment.create(t,dn)}static createTSDoc(t){return typescript_comment_TypeScriptComment.create(t,pn)}static parse(t){return isComment(t)?new typescript_comment_TypeScriptComment(t):typescript_comment_TypeScriptComment.create(t)}format(t){const r=typescript_formatting_options_getIndentation(t);const n=typescript_formatting_options_getNewline(t);const s=string_utils_splitLines(this._text);const i=s.map((t=>r+t)).join(n);return i}}function isSinglelineComment(t){return/^\s*\/\//.test(t)}function isDirectiveComment(t){return/^\s*\/\/\//.test(t)}function isMultilineComment(t){return/^\s*\/\*/.test(t)}function isTSDocComment(t){return/^\s*\/\*\*/.test(t)}function isComment(t){return/^\s*\/[/*]/.test(t)}const un={prefix:"// "};const fn={prefix:"/// "};const dn={startDelimiter:"/*",prefix:" * ",endDelimiter:" */"};const pn={startDelimiter:"/**",prefix:" * ",endDelimiter:" */"};class abstract_typescript_node_AbstractTypeScriptNode{_comments;comments(){return this._comments||[]}addComment(t){const r=typeof t==="string"?TypeScriptComment.parse(t):t;this._comments??=[];this._comments.push(r);return r}addTSDoc(t){return this.addComment(TypeScriptComment.createTSDoc(t))}deleteComment(t){const r=this._comments?.indexOf(t)??-1;if(r===-1){return false}this._comments.splice(r,1);return true}formatComments(t){const r=getNewline(t);const n=this._comments?.map((r=>r.format(t))).join(r)||"";return n}format(t){const r=getNewline(t);const n=this.formatComments(t);const s=this.formatContent(t);const i=`${n}${n?r:""}${s}`;return i}}class typescript_export_TypeScriptExport extends(null&&AbstractTypeScriptNode){_exportedNode;_isDefault;constructor(t,r){super();this._exportedNode=t;this._isDefault=r||false}static create(t,r){return new typescript_export_TypeScriptExport(t,r)}get exportedNode(){return this._exportedNode}get isDefault(){return this._isDefault}formatComments(t){const r=getNewline(t);const n=this._exportedNode;const s=super.formatComments(t);const i=isCommentableTypeScriptNode(n)?n.formatComments(t):"";if(!s){return i}if(!i){return s}return`${s}${r}${i}`}formatContent(t){const r=getIndentation(t);const n=this._exportedNode;const s=(isCommentableTypeScriptNode(n)?n.formatContent(t):n.format(t)).trimStart();const i=`${r}export ${this._isDefault?"default ":""}${s}${s.endsWith(";")?"":";"}`;return i}}class typescript_import_TypeScriptImport extends(null&&AbstractTypeScriptNode){_path;_namedImports;_defaultImportName;_wildcardImportName;constructor(t,r,n,s){super();this._path=t;this._namedImports=r;this._defaultImportName=n;this._wildcardImportName=s;this.assertIsValidImport()}static create(t,r){return new typescript_import_TypeScriptImport(t,r?.namedImports?new Set(r.namedImports):undefined,r?.defaultImportName,r?.wildcardImportName)}static createWildcardImport(t,r){return new typescript_import_TypeScriptImport(t,undefined,undefined,r)}static createDefaultImport(t,r){return new typescript_import_TypeScriptImport(t,undefined,r)}static createNamedImport(t,r){return new typescript_import_TypeScriptImport(t,new Set(r))}static createEmptyImport(t){return new typescript_import_TypeScriptImport(t)}get path(){return this._path}namedImports(){return this._namedImports||[]}addNamedImport(t){ArgumentError.throwIfNullOrEmpty(t,"name");this._namedImports??=new Set;this._namedImports.add(t);this.assertIsValidImport()}addNamedImports(t){for(const r of t){this.addNamedImport(r)}}deleteNamedImport(t){return!!this._namedImports?.delete(t)}get defaultImportName(){return this._defaultImportName}set defaultImportName(t){this._defaultImportName=t;this.assertIsValidImport()}get wildcardImportName(){return this._wildcardImportName}set wildcardImportName(t){this._wildcardImportName=t;this.assertIsValidImport()}get isNamedImport(){return!!this._namedImports?.size}get isDefaultImport(){return!!this._defaultImportName}get isWildcardImport(){return!!this._wildcardImportName}get isEmptyImport(){return!this.isWildcardImport&&!this.isDefaultImport&&!this.isNamedImport}assertIsValidImport(){if(this.isWildcardImport&&(this.isDefaultImport||this.isNamedImport)){throw new Error("Mixing wildcard import with default and/or named imports is not allowed.")}}formatContent(t){const r=getIndentation(t);const n=getQuotes(t);if(this.isEmptyImport){return`${r}// import { } from ${n}${this._path}${n};`}let s=`${r}import `;if(this.isWildcardImport){s+=`* as ${this._wildcardImportName}`}if(this.isDefaultImport){s+=this.defaultImportName}if(this.isNamedImport){const t=`{ ${[...this._namedImports].join(", ")} }`;s+=this.isDefaultImport?", ":"";s+=t}s+=` from ${n}${this._path}${n};`;return s}}class typescript_imports_TypeScriptImports extends(null&&AbstractTypeScriptNode){_imports;constructor(t){super();this._imports=new Map(Array.from(t||[]).map((t=>[t.path,t])))}static create(t){return new typescript_imports_TypeScriptImports(t)}imports(){return this._imports.values()}getImport(t){return this._imports.get(t)}getOrCreateImport(t){if(!this._imports.has(t)){this._imports.set(t,TypeScriptImport.createEmptyImport(t))}return this._imports.get(t)}addImport(t){const r=this._imports.get(t.path);this._imports.set(t.path,t);if(r){t.addNamedImports(r.namedImports());t.defaultImportName||=r.defaultImportName;t.wildcardImportName||=r.wildcardImportName}return t}deleteImport(t){const r=typeof t==="string"?t:t.path;return this._imports.delete(r)}addWildcardImport(t,r){const n=this.getOrCreateImport(t);n.wildcardImportName=r;return n}addDefaultImport(t,r){const n=this.getOrCreateImport(t);n.defaultImportName=r;return n}addNamedImport(t,r){const n=this.getOrCreateImport(t);n.addNamedImport(r);return n}addNamedImports(t,r){const n=this.getOrCreateImport(t);n.addNamedImports(r);return n}formatContent(t){const r=getNewline(t);const n=$i(this).map((r=>r.format(t))).join(r);return n}[Symbol.iterator](){return this.imports()[Symbol.iterator]()}}class typescript_document_TypeScriptDocument extends(null&&AbstractTypeScriptNode){_imports;_nodes;constructor(){super();this._imports=TypeScriptImports.create();this._nodes=[]}static create(){return new typescript_document_TypeScriptDocument}imports(){return this._imports}nodes(){return $i(this._nodes).unshift(this._imports)}getImport(t){return this._imports.getImport(t)}getOrCreateImport(t){return this._imports.getOrCreateImport(t)}addImport(t){return this._imports.addImport(t)}addWildcardImport(t,r){return this._imports.addWildcardImport(t,r)}addDefaultImport(t,r){return this._imports.addDefaultImport(t,r)}addNamedImport(t,r){return this._imports.addNamedImport(t,r)}addNamedImports(t,r){return this._imports.addNamedImports(t,r)}addExport(t){return this.addNode(TypeScriptExport.create(t))}addDefaultExport(t){return this.addNode(TypeScriptExport.create(t,true))}addNode(t){if(t instanceof TypeScriptImport){return this.addImport(t)}if(t instanceof TypeScriptImports){for(const r of t){this.addImport(r)}return this._imports}this._nodes.push(t);return t}saveSync(t,r){writeFileSync(t,this.format(r),r)}save(t,r){return writeFile(t,this.format(r),r)}formatContent(t){const r=getNewline(t);const n=$i(this).map((r=>r.format(t))).filter((t=>t)).join(r+r);const s=n+r;return s}[Symbol.iterator](){return this.nodes()[Symbol.iterator]()}}function isValidMemberName(t){return/^[\p{L}_][\p{L}0-9_]*$/u.test(t)}function typescript_member_escapeMemberName(t,r){if(isValidMemberName(t)){return t}r||=DEFAULT_QUOTES;const n=JSON.stringify(t).slice(1,-1).replaceAll(/[`']/g,"\\$&");return`[${r}${n}${r}]`}class typescript_property_TypeScriptProperty extends(null&&AbstractTypeScriptNode){_name;_type;_options;constructor(t,r,n){super();this._name=t;this._type=r;this._options=n}static create(t,r,n){return new typescript_property_TypeScriptProperty(t,r,n)}get name(){return this._name}get type(){return this._type}get isOptional(){return!!this._options?.isOptional}get accessModifier(){return this._options?.accessModifier}get isReadOnly(){return!!this._options?.isReadOnly}get isAbstract(){return!!this._options?.isAbstract}get isStatic(){return!!this._options?.isStatic}with(t){const r=t?.name??this._name;const n=t?.type??this._type;const s={...this._options,...t};const i=typescript_property_TypeScriptProperty.create(r,n,s);for(const t of this.comments()){i.addComment(t)}return i}formatContent(t){const r=getIndentation(t);const n=getQuotes(t);const s=escapeMemberName(this._name,n);const i=this._type.format(t).trimStart();const o=this.accessModifier?`${this.accessModifier} `:"";const a=this.isAbstract?"static ":"";const l=this.isAbstract?"abstract ":"";const c=this.isReadOnly?"readonly ":"";const u=this.isOptional?"?":"";const d=`${r}${o}${a}${l}${c}${s}${u}: ${i};`;return d}}class typescript_type_literal_TypeScriptTypeLiteral{static STRING=new typescript_type_literal_TypeScriptTypeLiteral("string");static NUMBER=new typescript_type_literal_TypeScriptTypeLiteral("number");static BIGINT=new typescript_type_literal_TypeScriptTypeLiteral("bigint");static BOOLEAN=new typescript_type_literal_TypeScriptTypeLiteral("boolean");static SYMBOL=new typescript_type_literal_TypeScriptTypeLiteral("symbol");static UNDEFINED=new typescript_type_literal_TypeScriptTypeLiteral("undefined");static OBJECT=new typescript_type_literal_TypeScriptTypeLiteral("object");static FUNCTION=new typescript_type_literal_TypeScriptTypeLiteral("function");static NEVER=new typescript_type_literal_TypeScriptTypeLiteral("never");static TYPE_CACHE=new Map([typescript_type_literal_TypeScriptTypeLiteral.STRING,typescript_type_literal_TypeScriptTypeLiteral.NUMBER,typescript_type_literal_TypeScriptTypeLiteral.BIGINT,typescript_type_literal_TypeScriptTypeLiteral.BOOLEAN,typescript_type_literal_TypeScriptTypeLiteral.SYMBOL,typescript_type_literal_TypeScriptTypeLiteral.UNDEFINED,typescript_type_literal_TypeScriptTypeLiteral.OBJECT,typescript_type_literal_TypeScriptTypeLiteral.FUNCTION,typescript_type_literal_TypeScriptTypeLiteral.NEVER].map((t=>[t.value,t])));_value;constructor(t){this._value=t}static create(t){const r=typescript_type_literal_TypeScriptTypeLiteral.TYPE_CACHE.get(t);if(r){return r}return new typescript_type_literal_TypeScriptTypeLiteral(t)}get isComposite(){return false}get isUnion(){return false}get isIntersection(){return false}get isAlias(){return false}composingTypes(){return[this]}get value(){return this._value}format(){return this._value}}class typescript_union_type_TypeScriptUnionType{_composingTypes;constructor(t){this._composingTypes=t}static create(t){const r=[...t];if(!r.length){r.push(TypeScriptTypeLiteral.NEVER)}return new typescript_union_type_TypeScriptUnionType(r)}get isComposite(){return true}get isUnion(){return true}get isIntersection(){return false}get isAlias(){return false}composingTypes(){return this._composingTypes}format(t){const r=this._composingTypes.map((r=>`(${r.format(t).trim()})`)).join(" | ");return r}}class typescript_object_TypeScriptObject{_members;constructor(){this._members=new Map}static create(){return new typescript_object_TypeScriptObject}get isComposite(){return false}get isUnion(){return false}get isIntersection(){return false}get isAlias(){return false}composingTypes(){return[this]}members(){return this._members.values()}properties(){return $i(this).filter((t=>t instanceof TypeScriptProperty))}getMember(t){return this._members.get(t)}getNestedMember(t){const r=typeof t==="string"?t.split("."):t;if(!r||!r.length){return undefined}const n=this.getMember(r[0]);if(r.length===1){return n}if(!(n instanceof TypeScriptProperty)||!(n.type instanceof typescript_object_TypeScriptObject)){return undefined}return n.type.getNestedMember(r.slice(1))}hasMember(t){return this.getMember(t)!==undefined}hasNestedMember(t){return this.getNestedMember(t)!==undefined}addMember(t){this._members.set(t.name,t);return t}deleteMember(t){return this._members.delete(t.name)}getProperty(t){const r=this.getMember(t);return r instanceof TypeScriptProperty?r:undefined}getNestedProperty(t){const r=this.getNestedMember(t);return r instanceof TypeScriptProperty?r:undefined}hasProperty(t){return this.getProperty(t)!==undefined}hasNestedProperty(t){return this.getNestedProperty(t)!==undefined}addProperty(t,r,n){return this.addMember(TypeScriptProperty.create(t,r,n))}addNestedProperty(t,r,n){const s=typeof t==="string"?t.split("."):t;const i=s[0];if(s.length===1){return this.addProperty(i,r,n)}if(!this.hasProperty(i)){const t=typescript_object_TypeScriptObject.create();const o=t.addNestedProperty(s.slice(1),r,n);this.addProperty(i,t,n);return o}let o=this.getProperty(i);let a=$i(decomposeType(o.type)).first((t=>t instanceof typescript_object_TypeScriptObject));if(!a){a=typescript_object_TypeScriptObject.create();o=o.with({type:TypeScriptUnionType.create([o.type,a])});this.addMember(o)}return a.addNestedProperty(s.slice(1),r,n)}format(t){const r=getIndentation(t);const n=getNewline(t);const s=n+n;const i=incrementIndent(t);const o=$i(this).map((t=>t.format(i))).join(s);const a=`${r}{`+`${n}${o}${n}`+`${r}}`;return a}[Symbol.iterator](){return this.members()[Symbol.iterator]()}}class typescript_interface_TypeScriptInterface extends(null&&AbstractTypeScriptNode){_name;_definition;constructor(t,r){super();this._name=t;this._definition=r}static create(t,r){return new typescript_interface_TypeScriptInterface(t,r||TypeScriptObject.create())}get name(){return this._name}get definition(){return this._definition}formatContent(t){const r=getIndentation(t);const n=this._name;const s=this._definition.format(t).trimStart();const i=`${r}interface ${n} ${s}`;return i}}class typescript_type_alias_TypeScriptTypeAlias extends(null&&AbstractTypeScriptNode){_name;_type;constructor(t,r){super();this._name=t;this._type=r}static create(t,r){return new typescript_type_alias_TypeScriptTypeAlias(t,r)}get name(){return this._name}get type(){return this._type}get isComposite(){return true}get isUnion(){return false}get isIntersection(){return false}get isAlias(){return true}composingTypes(){return[this._type]}formatContent(t){const r=getIndentation(t);const n=this._name;const s=this._type.format(t).trimStart();const i=`${r}type ${n} = ${s};`;return i}}class TypeScriptIntersectionType{_composingTypes;constructor(t){this._composingTypes=t}static create(t){const r=[...t];if(!r.length){r.push(TypeScriptTypeLiteral.NEVER)}return new TypeScriptIntersectionType(r)}get isComposite(){return true}get isUnion(){return false}get isIntersection(){return true}get isAlias(){return false}composingTypes(){return this._composingTypes}format(t){const r=this._composingTypes.map((r=>`(${r.format(t).trim()})`)).join(" & ");return r}}const hn="const";const mn="let";const gn="var";class typescript_variable_TypeScriptVariable extends(null&&AbstractTypeScriptNode){_name;_value;_declaration;constructor(t,r,n){super();this._name=t;this._value=r;this._declaration=n||hn}static create(t,r,n){return new typescript_variable_TypeScriptVariable(t,r,n)}get declaration(){return this._declaration}get name(){return this._name}get value(){return this._value}formatComments(t){const r=getNewline(t);const n=this._value;const s=super.formatComments(t);const i=isCommentableTypeScriptNode(n)?n.formatComments(t):"";if(!s){return i}if(!i){return s}return`${s}${r}${i}`}formatContent(t){const r=getIndentation(t);const n=this._value;const s=(isCommentableTypeScriptNode(n)?n.formatContent(t):n.format(t)).trimStart();const i=`${r}${this._declaration} ${this._name} = ${s}${s.endsWith(";")?"":";"}`;return i}}var yn=s(4083);function getActionOutputDescriptor(t,r,n){return getActionParameterDescriptor(t,r,asActionOutputDescriptor,t.outputs,n)}function action_output_descriptor_getActionOutputDescriptors(t,r){return getActionParameterDescriptors(t,asActionOutputDescriptor,t.outputs,r)}function asActionOutputDescriptor(t,r,n){const s=t.value===undefined;const i=t.type||(s?"string":typeof t.value);return{name:r,path:n,redirect:t.redirect,type:parseActionParameterTypeDescriptor(i),description:t.description??"",value:t.value}}const bn="./";const _n="ACTION_NAME";const Sn="ActionInputs";const En="ActionOutputs";const vn="ACTION_MODULE_LOADER";const Rn=typescript_comment_TypeScriptComment.parse("/* eslint-disable */");function parseActionMetadataFromString(t){return(0,yn.Qc)(t)}async function parseActionMetadataFromFile(t,r){const n=(await(0,Fe.readFile)(t,r)).toString();return parseActionMetadataFromString(n)}function processActionMetadataTemplate(t,r){const n=r?.groupDelimiter??DEFAULT_ACTION_GROUP_DELIMITER;const s=r?.removeTemplateOnlyFields??true;const i={...t};i.inputs=sanitizeActionInputs(i.inputs);if(i.groups){i.inputs=groupActionParameters(i.inputs,i.groups.input,n,{default:SYNTHETIC_UNDEFINED});i.outputs=groupActionParameters(i.outputs,i.groups.output,n)}if(!s){return i}if(i.groups){i.groups.input=removeTemplateOnlyActionFields(i.groups.input);i.groups.output=removeTemplateOnlyActionFields(i.groups.output)}i.inputs=removeTemplateOnlyActionFields(i.inputs);i.outputs=removeTemplateOnlyActionFields(i.outputs);return i}function processActionMetadataTemplateString(t,r){const n=r?.newline??DEFAULT_NEWLINE;const s=r?.generateAutoGeneratedWarningMessage??true;const i=parseActionMetadataFromString(t);const o=processActionMetadataTemplate(i,r);const a=stringifyYaml(o,r);const l=n===UNIX_NEWLINE?a:a.replaceAll(UNIX_NEWLINE,n);const c=s?generateAutoGeneratedWarningFrame(r):undefined;const u=[c,l].filter((t=>t)).join(n);return u}async function processActionMetadataTemplateFile(t,r,n){n={sourceFileName:basename(t.toString()),...n};const s=(await readFile(t,n)).toString();const i=processActionMetadataTemplateString(s,n);await writeFile(r,i,n)}function groupActionParameters(t,r,n,s){if(!r||!t){return t}const i={...t};const o=Object.entries(r);const a=$i(Object.entries(t)).flatMap((([t,r])=>$i(o).map((([n,s])=>[n,s,t,r]))));for(const[t,r,l,c]of a){const a=r.include?.includes(l);const u=r.exclude?.includes(l);const d=o.some((([t])=>l.startsWith(t)));const p=(a||!c.unique&&!d)&&!u;if(!p){continue}const h=`${t}${n}${l}`;const m=c.redirect&&`${t}${n}${c.redirect}`;i[h]={...c,redirect:m,...s}}return i}function sanitizeActionInputs(t){if(!t){return t}const r={};for(const[n,s]of Object.entries(t)){const t={...s};if(typeof t.required!=="boolean"){t.required=false}if(t.default===undefined){t.default=SYNTHETIC_UNDEFINED}r[n]=t}return r}function removeTemplateOnlyActionFields(t){if(!t){return t}const r={};for(const[n,s]of Object.entries(t)){const t={...s};delete t.include;delete t.exclude;delete t.unique;r[n]=t}return r}function createTypeScriptDefinitionForActionMetadata(t,r){const n=TypeScriptDocument.create();const s=getActionInputDescriptors(t,r);const i=s.length?Object.entries(t.groups?.input||{}):[];const o=getActionOutputDescriptors(t,r);const a=o.length?Object.entries(t.groups?.output||{}):[];const l=r?.rootPath??bn;const c=[...s,...o].map((t=>createTypeScriptImportForActionParameter(t,l))).filter((t=>t));c.forEach((t=>n.addImport(t)));const u=createTypeScriptCommentsForActionMetadata(r);u.forEach((t=>n.addComment(t)));const d=createTypeScriptConstantForActionName(t,r);n.addExport(d);const p=s.length?createTypeScriptInterfaceForActionInputs(t,s,r):undefined;const h=i.map((([t,n])=>createTypeScriptAliasForActionGroup(n,t,p.name,r)));[p,...h].filter((t=>t)).forEach((t=>n.addExport(t)));const m=o.length?createTypeScriptInterfaceForActionOutputs(t,o,r):undefined;const g=a.map((([t,n])=>createTypeScriptAliasForActionGroup(n,t,m.name,r)));[m,...g].filter((t=>t)).forEach((t=>n.addExport(t)));return n}function createTypeScriptConstantForActionName(t,r){const n=getQuotes(r);const s=r.actionNameConstant||_n;const i=TypeScriptVariable.create(s,TypeScriptTypeLiteral.create(`${n}${t.name}${n}`));if(t.description){i.addTSDoc(t.description)}return i}function createTypeScriptCommentsForActionMetadata(t){const r=t?.disableESLint??true;const n=t?.generateAutoGeneratedWarningMessage??true;const s=[];if(n){const r=generateAutoGeneratedWarningFrame({style:JS_MULTILINE_FRAME_STYLE,...t});const n=TypeScriptComment.parse(r);s.push(n)}if(r){s.push(Rn)}return s}function createTypeScriptInterfaceForActionInputs(t,r,n){const s=t.types?.input;const i=(typeof s==="string"?s:s?.name)||Sn;const o=typeof s==="string"?undefined:s?.description;return createTypeScriptInterfaceForActionParameters(i,o,r,t.groups?.input,n,(t=>!t.required))}function createTypeScriptInterfaceForActionOutputs(t,r,n){const s=t.types?.output;const i=(typeof s==="string"?s:s?.name)||En;const o=typeof s==="string"?undefined:s?.description;return createTypeScriptInterfaceForActionParameters(i,o,r,t.groups?.output,n)}function createTypeScriptInterfaceForActionParameters(t,r,n,s,i,o){o||=()=>false;const a=TypeScriptInterface.create(t);const l=a.definition;if(r){a.addTSDoc(r)}for(const t of n){if(t.redirect){continue}const r=t.path;const n=TypeScriptTypeLiteral.create(`${t.type.name}${t.type.isArray?"[]":""}`);const s=o(t);const i=l.addNestedProperty(r,n,{isOptional:s});if(t.description){i.addTSDoc(t.description)}}for(const[t,r]of Object.entries(s||{})){if(!r.description){continue}const n=i?.pathParser?.(t)||[t];const s=a.definition.getNestedProperty(n);s?.addTSDoc(r.description)}return a}function createTypeScriptImportForActionParameter(t,r){if(!t.type.module||t.redirect){return undefined}const n=`${r||""}${t.type.module}`;const s=TypeScriptImport.createEmptyImport(n);if(t.type.isDefault){s.defaultImportName=t.type.name}else{s.addNamedImport(t.type.name)}return s}function createTypeScriptAliasForActionGroup(t,r,n,s){const i=s?.pathParser?.(r)||[r];const o=i.map((t=>`["${t}"]`)).join("");const a=TypeScriptTypeAlias.create(t.type,TypeScriptTypeLiteral.create(`${n}${o}`));if(t.description){a.addTSDoc(t.description)}return a}function createModuleLoaderTypeScriptDefinitionForActionMetadata(t,r){const n=TypeScriptDocument.create();const s=getActionInputDescriptors(t,r);const i=getActionOutputDescriptors(t,r);const o=$i(s).concat(i).flatMap((t=>[t.type.module,t.type.factory?.module])).filter((t=>t)).distinct().map((t=>[t,`_${hashString(t,"sha1")}`])).toMap();const a=getQuotes(r);const l="return Promise.resolve(undefined);";const c=$i(o).map((([t,r])=>`if (path === ${a}${t}${a}) return Promise.resolve(${r});`)).push(l);const u=getNewline(r);const d=getIndentation(incrementIndent(r));const p=c.map((t=>`${d}${t}`)).join(u);const h=TypeScriptTypeLiteral.create(`(path: string): Promise<Record<string, unknown>> => {${u}${p}${u}};`);const m=r?.moduleLoaderName||vn;const g=TypeScriptVariable.create(m,h);n.addExport(g);const y=r?.rootPath??bn;const b=$i(o).map((([t,r])=>TypeScriptImport.createWildcardImport(`${y}${t}`,r)));b.forEach((t=>n.addImport(t)));const _=createTypeScriptCommentsForActionMetadata(r);_.forEach((t=>n.addComment(t)));return n}function stripActionMetadataFromCustomFields(t){const r={...t};delete r.groups;delete r.types;r.inputs=r.inputs?{...r.inputs}:undefined;for(const[t,n]of Object.entries(r.inputs||{})){const s={...n};delete s.type;delete s.unique;delete s.redirect;r.inputs[t]=s}r.outputs=r.outputs?{...r.outputs}:undefined;for(const[t,n]of Object.entries(r.outputs||{})){const s={...n};delete s.type;delete s.unique;delete s.redirect;r.outputs[t]=s}return r}function stripActionMetadataStringFromCustomFields(t,r){const n=r?.newline??DEFAULT_NEWLINE;const s=r?.generateAutoGeneratedWarningMessage??true;const i=parseActionMetadataFromString(t);const o=stripActionMetadataFromCustomFields(i);const a=stringifyYaml(o,r);const l=n===UNIX_NEWLINE?a:a.replaceAll(UNIX_NEWLINE,n);const c=s?generateAutoGeneratedWarningFrame(r):undefined;const u=[c,l].filter((t=>t)).join(n);return u}async function stripActionMetadataFileFromCustomFields(t,r,n){n={sourceFileName:basename(t.toString()),...n};const s=(await readFile(t,n)).toString();const i=stripActionMetadataStringFromCustomFields(s,n);await writeFile(r,i,n)}const wn="GITHUB_OUTPUT";const Cn=new WeakMap;function setActionOutput(t,r,n){n||=Ee;const s=environment_getEnvironmentVariable(wn,n);FileNotFoundError.throwIfNotFound(s);const i=formatNameAndValue(t,r);(0,ae.appendFileSync)(s,`${i}${we}`,"utf8");if(!Cn.has(n)){Cn.set(n,new Map)}Cn.get(n).set(t,r)}function formatNameAndValue(t,r){const n=formatValue(r);const s=generateDelimiter();return`${t}<<${s}${we}${n}${we}${s}`}function formatValue(t){if(typeof t==="string"){return t}if(t===null||t===undefined){return""}return JSON.stringify(t)}function generateDelimiter(){const t=32;return`mcp${t}_${generateSecureRandomString(t)}`}function setActionOutputs(t,r){for(const[n,s]of t){setActionOutput(n,s,r)}}function getActionOutput(t,r){r||=Ee;const n=Cn.get(r);return n?.get(t)}function getActionOutputs(t,r){return $i(t).map((t=>getActionOutput(t,r))).toArray()}function getAllActionOutputs(t){t||=ENVIRONMENT;return new Map(Cn.get(t)||[])}function createActionOutputController(t,r){return new ActionOutputController(t,r).navigate([])}function createActionOutputControllerUsingMetadata(t,r){const n=action_output_descriptor_getActionOutputDescriptors(t,r);return createActionOutputController(n,r)}class ActionOutputController{_descriptors;_getOutput;_setOutput;constructor(t,r){this._descriptors=[...t];this._getOutput=r?.getOutput||getActionOutput;this._setOutput=r?.setOutput||setActionOutput}navigate(t){return new Proxy({path:t},this)}get(t,r){const n=[...t.path,String(r)];const s=this.findNearestDescriptor(n);if(!s){return undefined}if(s.path.length===n.length){return this._getOutput(s.name)}return this.navigate(n)}set(t,r,n){const s=[...t.path,String(r)];const i=this.findNearestDescriptor(s);if(!i){return false}if(i.path.length===s.length){this._setOutput(i.name,n);return true}if(!n||typeof n!=="object"){return false}const o=this.navigate(s);for(const[t,r]of Object.entries(n)){o[t]=r}return true}has(t,r){const n=[...t.path,String(r)];const s=this.findNearestDescriptor(n);return!!s}ownKeys(t){const r=t.path;const n=iterable_$i(this._descriptors).filter((t=>t.path.length>r.length&&iterable_$i(t.path).startsWith(r)));const s=n.map((t=>t.path[r.length])).distinct().toArray();return s}getOwnPropertyDescriptor(t,r){if(!this.has(t,r)){return undefined}const n=this.get(t,r);return{value:n,configurable:true,enumerable:true,writable:true}}defineProperty(){return false}deleteProperty(){return false}getPrototypeOf(){return Object.prototype}setPrototypeOf(){return false}isExtensible(){return false}preventExtensions(){return true}findNearestDescriptor(t){const r=this._descriptors.find((r=>r.path.length===t.length&&iterable_$i(r.path).startsWith(t)))||this._descriptors.find((r=>r.path.length>t.length&&iterable_$i(r.path).startsWith(t)));const n=r?.redirect?this._descriptors.find((t=>t.name===r.redirect)):r;return n}}async function main(){const t=Ee;const r=getDefaultLogger(t);try{const n=await initializeAction(new URL(s(3351),s.b),t);const i=new GitHubContext(t);await publish(n,i,r)}catch(t){r.fatal(t);throw t}}async function publish(t,r,n){const s=createDefaultLoaderMetadataReader();const i=new ErrorBuilder(n);const o=[];for(const a of We.values()){const l={...t.input,...t.input[a]};if(!l?.token){continue}const c=await fillInDefaultValues(l,a,r,s);const u=createPlatformUploader(a,{logger:n,githubContext:r});try{t.output[a]=await u.upload(c);o.push(a)}catch(t){i.append(t,c.failMode??Oe.FAIL)}}if(o.length){n.info(`🎉 Successfully published the assets to ${o.map((t=>We.friendlyNameOf(t))).join(", ")}`)}else if(!i.hasErrors){n.warn("⚠️ No valid platform tokens found in your config. To publish your project, please add the required access tokens for the desired platforms. Assets will not be published without them. Refer to the documentation for assistance in setting up your tokens.")}i.throwIfHasErrors()}async function fillInDefaultValues(t,r,n,s){argument_error_ArgumentError.throwIfNullOrEmpty(t.files,"options.files","No files found for the specified glob. Please ensure the glob is correct and files matching the pattern exist in the specified directory.");t={...t};const i=t.files[0];const o=await(s?.readMetadataFile(i.path).catch((()=>undefined)));const a=getGameVersionProviderByName(o?.gameName||zt);const l=t.gameVersions?.length?t.gameVersions:o?.gameVersions||[];const c=await(a?.(l));const u=c?G.filter(c,t.gameVersionFilter).map((t=>t.id)):l;t.id||=o?.getProjectId(r)||"";t.version||=n.version||o?.version;t.versionType||=te.parseFromFileName(o?.version||i.name);t.name??=n.payload.release?.name||t.version;t.changelog??=n.payload.release?.body||"";t.loaders??=o?.loaders||[];t.dependencies??=o?.dependencies||[];t.gameVersions=u;return t}async function initializeAction(t,r){ArgumentNullError.throwIfNull(t,"path");FileNotFoundError.throwIfNotFound(t);const n={pathParser:SPLIT_BY_WORDS_AND_GROUP_ACTION_PARAMETER_PATH_PARSER,moduleLoader:Ze,getOutput:t=>getActionOutput(t,r),setOutput:(t,n)=>setActionOutput(t,n,r)};const s=await parseActionMetadataFromFile(t);const i=await getAllActionInputsAsObjectUsingMetadata(s,n,r);const o=createActionOutputControllerUsingMetadata(s,n);return{input:i,output:o}}},3351:(t,r,n)=>{t.exports=n.p+"578e00c8827f197b9c7d.yml"},4300:r=>{r.exports=t(import.meta.url)("buffer")},2361:r=>{r.exports=t(import.meta.url)("events")},7147:r=>{r.exports=t(import.meta.url)("fs")},7561:r=>{r.exports=t(import.meta.url)("node:fs")},9411:r=>{r.exports=t(import.meta.url)("node:path")},7742:r=>{r.exports=t(import.meta.url)("node:process")},2477:r=>{r.exports=t(import.meta.url)("node:stream/web")},2037:r=>{r.exports=t(import.meta.url)("os")},1017:r=>{r.exports=t(import.meta.url)("path")},2781:r=>{r.exports=t(import.meta.url)("stream")},3837:r=>{r.exports=t(import.meta.url)("util")},1267:r=>{r.exports=t(import.meta.url)("worker_threads")},9796:r=>{r.exports=t(import.meta.url)("zlib")},8109:(t,r,n)=>{var s=n(5589);var i=n(9338);var o=n(6011);var a=n(5161);var l=n(2986);var c=n(2289);var u=n(45);function resolveCollection(t,r,n,s,i,o){const a=n.type==="block-map"?l.resolveBlockMap(t,r,n,s,o):n.type==="block-seq"?c.resolveBlockSeq(t,r,n,s,o):u.resolveFlowCollection(t,r,n,s,o);const d=a.constructor;if(i==="!"||i===d.tagName){a.tag=d.tagName;return a}if(i)a.tag=i;return a}function composeCollection(t,r,n,l,c){const u=!l?null:r.directives.tagName(l.source,(t=>c(l,"TAG_RESOLVE_FAILED",t)));const d=n.type==="block-map"?"map":n.type==="block-seq"?"seq":n.start.source==="{"?"map":"seq";if(!l||!u||u==="!"||u===o.YAMLMap.tagName&&d==="map"||u===a.YAMLSeq.tagName&&d==="seq"||!d){return resolveCollection(t,r,n,c,u)}let p=r.schema.tags.find((t=>t.tag===u&&t.collection===d));if(!p){const s=r.schema.knownTags[u];if(s&&s.collection===d){r.schema.tags.push(Object.assign({},s,{default:false}));p=s}else{if(s?.collection){c(l,"BAD_COLLECTION_TYPE",`${s.tag} used for ${d} collection, but expects ${s.collection}`,true)}else{c(l,"TAG_RESOLVE_FAILED",`Unresolved tag: ${u}`,true)}return resolveCollection(t,r,n,c,u)}}const h=resolveCollection(t,r,n,c,u,p);const m=p.resolve?.(h,(t=>c(l,"TAG_RESOLVE_FAILED",t)),r.options)??h;const g=s.isNode(m)?m:new i.Scalar(m);g.range=h.range;g.tag=u;if(p?.format)g.format=p.format;return g}r.composeCollection=composeCollection},5050:(t,r,n)=>{var s=n(42);var i=n(8676);var o=n(1250);var a=n(6985);function composeDoc(t,r,{offset:n,start:l,value:c,end:u},d){const p=Object.assign({_directives:r},t);const h=new s.Document(undefined,p);const m={atRoot:true,directives:h.directives,options:h.options,schema:h.schema};const g=a.resolveProps(l,{indicator:"doc-start",next:c??u?.[0],offset:n,onError:d,startOnNewline:true});if(g.found){h.directives.docStart=true;if(c&&(c.type==="block-map"||c.type==="block-seq")&&!g.hasNewline)d(g.end,"MISSING_CHAR","Block collection cannot start on same line with directives-end marker")}h.contents=c?i.composeNode(m,c,g,d):i.composeEmptyNode(m,g.end,l,null,g,d);const y=h.contents.range[2];const b=o.resolveEnd(u,y,false,d);if(b.comment)h.comment=b.comment;h.range=[n,y,b.offset];return h}r.composeDoc=composeDoc},8676:(t,r,n)=>{var s=n(5639);var i=n(8109);var o=n(4766);var a=n(1250);var l=n(8781);const c={composeNode:composeNode,composeEmptyNode:composeEmptyNode};function composeNode(t,r,n,s){const{spaceBefore:a,comment:l,anchor:u,tag:d}=n;let p;let h=true;switch(r.type){case"alias":p=composeAlias(t,r,s);if(u||d)s(r,"ALIAS_PROPS","An alias node must not specify any properties");break;case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"block-scalar":p=o.composeScalar(t,r,d,s);if(u)p.anchor=u.source.substring(1);break;case"block-map":case"block-seq":case"flow-collection":p=i.composeCollection(c,t,r,d,s);if(u)p.anchor=u.source.substring(1);break;default:{const i=r.type==="error"?r.message:`Unsupported token (type: ${r.type})`;s(r,"UNEXPECTED_TOKEN",i);p=composeEmptyNode(t,r.offset,undefined,null,n,s);h=false}}if(u&&p.anchor==="")s(u,"BAD_ALIAS","Anchor cannot be an empty string");if(a)p.spaceBefore=true;if(l){if(r.type==="scalar"&&r.source==="")p.comment=l;else p.commentBefore=l}if(t.options.keepSourceTokens&&h)p.srcToken=r;return p}function composeEmptyNode(t,r,n,s,{spaceBefore:i,comment:a,anchor:c,tag:u,end:d},p){const h={type:"scalar",offset:l.emptyScalarPosition(r,n,s),indent:-1,source:""};const m=o.composeScalar(t,h,u,p);if(c){m.anchor=c.source.substring(1);if(m.anchor==="")p(c,"BAD_ALIAS","Anchor cannot be an empty string")}if(i)m.spaceBefore=true;if(a){m.comment=a;m.range[2]=d}return m}function composeAlias({options:t},{offset:r,source:n,end:i},o){const l=new s.Alias(n.substring(1));if(l.source==="")o(r,"BAD_ALIAS","Alias cannot be an empty string");if(l.source.endsWith(":"))o(r+n.length-1,"BAD_ALIAS","Alias ending in : is ambiguous",true);const c=r+n.length;const u=a.resolveEnd(i,c,t.strict,o);l.range=[r,c,u.offset];if(u.comment)l.comment=u.comment;return l}r.composeEmptyNode=composeEmptyNode;r.composeNode=composeNode},4766:(t,r,n)=>{var s=n(5589);var i=n(9338);var o=n(9485);var a=n(7578);function composeScalar(t,r,n,l){const{value:c,type:u,comment:d,range:p}=r.type==="block-scalar"?o.resolveBlockScalar(r,t.options.strict,l):a.resolveFlowScalar(r,t.options.strict,l);const h=n?t.directives.tagName(n.source,(t=>l(n,"TAG_RESOLVE_FAILED",t))):null;const m=n&&h?findScalarTagByName(t.schema,c,h,n,l):r.type==="scalar"?findScalarTagByTest(t,c,r,l):t.schema[s.SCALAR];let g;try{const o=m.resolve(c,(t=>l(n??r,"TAG_RESOLVE_FAILED",t)),t.options);g=s.isScalar(o)?o:new i.Scalar(o)}catch(t){const s=t instanceof Error?t.message:String(t);l(n??r,"TAG_RESOLVE_FAILED",s);g=new i.Scalar(c)}g.range=p;g.source=c;if(u)g.type=u;if(h)g.tag=h;if(m.format)g.format=m.format;if(d)g.comment=d;return g}function findScalarTagByName(t,r,n,i,o){if(n==="!")return t[s.SCALAR];const a=[];for(const r of t.tags){if(!r.collection&&r.tag===n){if(r.default&&r.test)a.push(r);else return r}}for(const t of a)if(t.test?.test(r))return t;const l=t.knownTags[n];if(l&&!l.collection){t.tags.push(Object.assign({},l,{default:false,test:undefined}));return l}o(i,"TAG_RESOLVE_FAILED",`Unresolved tag: ${n}`,n!=="tag:yaml.org,2002:str");return t[s.SCALAR]}function findScalarTagByTest({directives:t,schema:r},n,i,o){const a=r.tags.find((t=>t.default&&t.test?.test(n)))||r[s.SCALAR];if(r.compat){const l=r.compat.find((t=>t.default&&t.test?.test(n)))??r[s.SCALAR];if(a.tag!==l.tag){const r=t.tagString(a.tag);const n=t.tagString(l.tag);const s=`Value may be parsed as either ${r} or ${n}`;o(i,"TAG_RESOLVE_FAILED",s,true)}}return a}r.composeScalar=composeScalar},9493:(t,r,n)=>{var s=n(5400);var i=n(42);var o=n(4236);var a=n(5589);var l=n(5050);var c=n(1250);function getErrorPos(t){if(typeof t==="number")return[t,t+1];if(Array.isArray(t))return t.length===2?t:[t[0],t[1]];const{offset:r,source:n}=t;return[r,r+(typeof n==="string"?n.length:1)]}function parsePrelude(t){let r="";let n=false;let s=false;for(let i=0;i<t.length;++i){const o=t[i];switch(o[0]){case"#":r+=(r===""?"":s?"\n\n":"\n")+(o.substring(1)||" ");n=true;s=false;break;case"%":if(t[i+1]?.[0]!=="#")i+=1;n=false;break;default:if(!n)s=true;n=false}}return{comment:r,afterEmptyLine:s}}class Composer{constructor(t={}){this.doc=null;this.atDirectives=false;this.prelude=[];this.errors=[];this.warnings=[];this.onError=(t,r,n,s)=>{const i=getErrorPos(t);if(s)this.warnings.push(new o.YAMLWarning(i,r,n));else this.errors.push(new o.YAMLParseError(i,r,n))};this.directives=new s.Directives({version:t.version||"1.2"});this.options=t}decorate(t,r){const{comment:n,afterEmptyLine:s}=parsePrelude(this.prelude);if(n){const i=t.contents;if(r){t.comment=t.comment?`${t.comment}\n${n}`:n}else if(s||t.directives.docStart||!i){t.commentBefore=n}else if(a.isCollection(i)&&!i.flow&&i.items.length>0){let t=i.items[0];if(a.isPair(t))t=t.key;const r=t.commentBefore;t.commentBefore=r?`${n}\n${r}`:n}else{const t=i.commentBefore;i.commentBefore=t?`${n}\n${t}`:n}}if(r){Array.prototype.push.apply(t.errors,this.errors);Array.prototype.push.apply(t.warnings,this.warnings)}else{t.errors=this.errors;t.warnings=this.warnings}this.prelude=[];this.errors=[];this.warnings=[]}streamInfo(){return{comment:parsePrelude(this.prelude).comment,directives:this.directives,errors:this.errors,warnings:this.warnings}}*compose(t,r=false,n=-1){for(const r of t)yield*this.next(r);yield*this.end(r,n)}*next(t){if(process.env.LOG_STREAM)console.dir(t,{depth:null});switch(t.type){case"directive":this.directives.add(t.source,((r,n,s)=>{const i=getErrorPos(t);i[0]+=r;this.onError(i,"BAD_DIRECTIVE",n,s)}));this.prelude.push(t.source);this.atDirectives=true;break;case"document":{const r=l.composeDoc(this.options,this.directives,t,this.onError);if(this.atDirectives&&!r.directives.docStart)this.onError(t,"MISSING_CHAR","Missing directives-end/doc-start indicator line");this.decorate(r,false);if(this.doc)yield this.doc;this.doc=r;this.atDirectives=false;break}case"byte-order-mark":case"space":break;case"comment":case"newline":this.prelude.push(t.source);break;case"error":{const r=t.source?`${t.message}: ${JSON.stringify(t.source)}`:t.message;const n=new o.YAMLParseError(getErrorPos(t),"UNEXPECTED_TOKEN",r);if(this.atDirectives||!this.doc)this.errors.push(n);else this.doc.errors.push(n);break}case"doc-end":{if(!this.doc){const r="Unexpected doc-end without preceding document";this.errors.push(new o.YAMLParseError(getErrorPos(t),"UNEXPECTED_TOKEN",r));break}this.doc.directives.docEnd=true;const r=c.resolveEnd(t.end,t.offset+t.source.length,this.doc.options.strict,this.onError);this.decorate(this.doc,true);if(r.comment){const t=this.doc.comment;this.doc.comment=t?`${t}\n${r.comment}`:r.comment}this.doc.range[2]=r.offset;break}default:this.errors.push(new o.YAMLParseError(getErrorPos(t),"UNEXPECTED_TOKEN",`Unsupported token ${t.type}`))}}*end(t=false,r=-1){if(this.doc){this.decorate(this.doc,true);yield this.doc;this.doc=null}else if(t){const t=Object.assign({_directives:this.directives},this.options);const n=new i.Document(undefined,t);if(this.atDirectives)this.onError(r,"MISSING_CHAR","Missing directives-end indicator line");n.range=[0,r,r];this.decorate(n,false);yield n}}}r.Composer=Composer},2986:(t,r,n)=>{var s=n(246);var i=n(6011);var o=n(6985);var a=n(976);var l=n(3669);var c=n(6899);const u="All mapping items must start at the same column";function resolveBlockMap({composeNode:t,composeEmptyNode:r},n,d,p,h){const m=h?.nodeClass??i.YAMLMap;const g=new m(n.schema);if(n.atRoot)n.atRoot=false;let y=d.offset;let b=null;for(const i of d.items){const{start:h,key:m,sep:_,value:S}=i;const E=o.resolveProps(h,{indicator:"explicit-key-ind",next:m??_?.[0],offset:y,onError:p,startOnNewline:true});const v=!E.found;if(v){if(m){if(m.type==="block-seq")p(y,"BLOCK_AS_IMPLICIT_KEY","A block sequence may not be used as an implicit map key");else if("indent"in m&&m.indent!==d.indent)p(y,"BAD_INDENT",u)}if(!E.anchor&&!E.tag&&!_){b=E.end;if(E.comment){if(g.comment)g.comment+="\n"+E.comment;else g.comment=E.comment}continue}if(E.hasNewlineAfterProp||a.containsNewline(m)){p(m??h[h.length-1],"MULTILINE_IMPLICIT_KEY","Implicit keys need to be on a single line")}}else if(E.found?.indent!==d.indent){p(y,"BAD_INDENT",u)}const R=E.end;const w=m?t(n,m,E,p):r(n,R,h,null,E,p);if(n.schema.compat)l.flowIndentCheck(d.indent,m,p);if(c.mapIncludes(n,g.items,w))p(R,"DUPLICATE_KEY","Map keys must be unique");const C=o.resolveProps(_??[],{indicator:"map-value-ind",next:S,offset:w.range[2],onError:p,startOnNewline:!m||m.type==="block-scalar"});y=C.end;if(C.found){if(v){if(S?.type==="block-map"&&!C.hasNewline)p(y,"BLOCK_AS_IMPLICIT_KEY","Nested mappings are not allowed in compact mappings");if(n.options.strict&&E.start<C.found.offset-1024)p(w.range,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit block mapping key")}const o=S?t(n,S,C,p):r(n,y,_,null,C,p);if(n.schema.compat)l.flowIndentCheck(d.indent,S,p);y=o.range[2];const a=new s.Pair(w,o);if(n.options.keepSourceTokens)a.srcToken=i;g.items.push(a)}else{if(v)p(w.range,"MISSING_CHAR","Implicit map keys need to be followed by map values");if(C.comment){if(w.comment)w.comment+="\n"+C.comment;else w.comment=C.comment}const t=new s.Pair(w);if(n.options.keepSourceTokens)t.srcToken=i;g.items.push(t)}}if(b&&b<y)p(b,"IMPOSSIBLE","Map comment with trailing content");g.range=[d.offset,y,b??y];return g}r.resolveBlockMap=resolveBlockMap},9485:(t,r,n)=>{var s=n(9338);function resolveBlockScalar(t,r,n){const i=t.offset;const o=parseBlockScalarHeader(t,r,n);if(!o)return{value:"",type:null,comment:"",range:[i,i,i]};const a=o.mode===">"?s.Scalar.BLOCK_FOLDED:s.Scalar.BLOCK_LITERAL;const l=t.source?splitLines(t.source):[];let c=l.length;for(let t=l.length-1;t>=0;--t){const r=l[t][1];if(r===""||r==="\r")c=t;else break}if(c===0){const r=o.chomp==="+"&&l.length>0?"\n".repeat(Math.max(1,l.length-1)):"";let n=i+o.length;if(t.source)n+=t.source.length;return{value:r,type:a,comment:o.comment,range:[i,n,n]}}let u=t.indent+o.indent;let d=t.offset+o.length;let p=0;for(let t=0;t<c;++t){const[r,s]=l[t];if(s===""||s==="\r"){if(o.indent===0&&r.length>u)u=r.length}else{if(r.length<u){const t="Block scalars with more-indented leading empty lines must use an explicit indentation indicator";n(d+r.length,"MISSING_CHAR",t)}if(o.indent===0)u=r.length;p=t;break}d+=r.length+s.length+1}for(let t=l.length-1;t>=c;--t){if(l[t][0].length>u)c=t+1}let h="";let m="";let g=false;for(let t=0;t<p;++t)h+=l[t][0].slice(u)+"\n";for(let t=p;t<c;++t){let[r,i]=l[t];d+=r.length+i.length+1;const c=i[i.length-1]==="\r";if(c)i=i.slice(0,-1);if(i&&r.length<u){const t=o.indent?"explicit indentation indicator":"first line";const s=`Block scalar lines must not be less indented than their ${t}`;n(d-i.length-(c?2:1),"BAD_INDENT",s);r=""}if(a===s.Scalar.BLOCK_LITERAL){h+=m+r.slice(u)+i;m="\n"}else if(r.length>u||i[0]==="\t"){if(m===" ")m="\n";else if(!g&&m==="\n")m="\n\n";h+=m+r.slice(u)+i;m="\n";g=true}else if(i===""){if(m==="\n")h+="\n";else m="\n"}else{h+=m+i;m=" ";g=false}}switch(o.chomp){case"-":break;case"+":for(let t=c;t<l.length;++t)h+="\n"+l[t][0].slice(u);if(h[h.length-1]!=="\n")h+="\n";break;default:h+="\n"}const y=i+o.length+t.source.length;return{value:h,type:a,comment:o.comment,range:[i,y,y]}}function parseBlockScalarHeader({offset:t,props:r},n,s){if(r[0].type!=="block-scalar-header"){s(r[0],"IMPOSSIBLE","Block scalar header not found");return null}const{source:i}=r[0];const o=i[0];let a=0;let l="";let c=-1;for(let r=1;r<i.length;++r){const n=i[r];if(!l&&(n==="-"||n==="+"))l=n;else{const s=Number(n);if(!a&&s)a=s;else if(c===-1)c=t+r}}if(c!==-1)s(c,"UNEXPECTED_TOKEN",`Block scalar header includes extra characters: ${i}`);let u=false;let d="";let p=i.length;for(let t=1;t<r.length;++t){const i=r[t];switch(i.type){case"space":u=true;case"newline":p+=i.source.length;break;case"comment":if(n&&!u){const t="Comments must be separated from other tokens by white space characters";s(i,"MISSING_CHAR",t)}p+=i.source.length;d=i.source.substring(1);break;case"error":s(i,"UNEXPECTED_TOKEN",i.message);p+=i.source.length;break;default:{const t=`Unexpected token in block scalar header: ${i.type}`;s(i,"UNEXPECTED_TOKEN",t);const r=i.source;if(r&&typeof r==="string")p+=r.length}}}return{mode:o,indent:a,chomp:l,comment:d,length:p}}function splitLines(t){const r=t.split(/\n( *)/);const n=r[0];const s=n.match(/^( *)/);const i=s?.[1]?[s[1],n.slice(s[1].length)]:["",n];const o=[i];for(let t=1;t<r.length;t+=2)o.push([r[t],r[t+1]]);return o}r.resolveBlockScalar=resolveBlockScalar},2289:(t,r,n)=>{var s=n(5161);var i=n(6985);var o=n(3669);function resolveBlockSeq({composeNode:t,composeEmptyNode:r},n,a,l,c){const u=c?.nodeClass??s.YAMLSeq;const d=new u(n.schema);if(n.atRoot)n.atRoot=false;let p=a.offset;let h=null;for(const{start:s,value:c}of a.items){const u=i.resolveProps(s,{indicator:"seq-item-ind",next:c,offset:p,onError:l,startOnNewline:true});if(!u.found){if(u.anchor||u.tag||c){if(c&&c.type==="block-seq")l(u.end,"BAD_INDENT","All sequence items must start at the same column");else l(p,"MISSING_CHAR","Sequence item without - indicator")}else{h=u.end;if(u.comment)d.comment=u.comment;continue}}const m=c?t(n,c,u,l):r(n,u.end,s,null,u,l);if(n.schema.compat)o.flowIndentCheck(a.indent,c,l);p=m.range[2];d.items.push(m)}d.range=[a.offset,p,h??p];return d}r.resolveBlockSeq=resolveBlockSeq},1250:(t,r)=>{function resolveEnd(t,r,n,s){let i="";if(t){let o=false;let a="";for(const l of t){const{source:t,type:c}=l;switch(c){case"space":o=true;break;case"comment":{if(n&&!o)s(l,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const r=t.substring(1)||" ";if(!i)i=r;else i+=a+r;a="";break}case"newline":if(i)a+=t;o=true;break;default:s(l,"UNEXPECTED_TOKEN",`Unexpected ${c} at node end`)}r+=t.length}}return{comment:i,offset:r}}r.resolveEnd=resolveEnd},45:(t,r,n)=>{var s=n(5589);var i=n(246);var o=n(6011);var a=n(5161);var l=n(1250);var c=n(6985);var u=n(976);var d=n(6899);const p="Block collections are not allowed within flow collections";const isBlock=t=>t&&(t.type==="block-map"||t.type==="block-seq");function resolveFlowCollection({composeNode:t,composeEmptyNode:r},n,h,m,g){const y=h.start.source==="{";const b=y?"flow map":"flow sequence";const _=g?.nodeClass??(y?o.YAMLMap:a.YAMLSeq);const S=new _(n.schema);S.flow=true;const E=n.atRoot;if(E)n.atRoot=false;let v=h.offset+h.start.source.length;for(let a=0;a<h.items.length;++a){const l=h.items[a];const{start:g,key:_,sep:E,value:R}=l;const w=c.resolveProps(g,{flow:b,indicator:"explicit-key-ind",next:_??E?.[0],offset:v,onError:m,startOnNewline:false});if(!w.found){if(!w.anchor&&!w.tag&&!E&&!R){if(a===0&&w.comma)m(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${b}`);else if(a<h.items.length-1)m(w.start,"UNEXPECTED_TOKEN",`Unexpected empty item in ${b}`);if(w.comment){if(S.comment)S.comment+="\n"+w.comment;else S.comment=w.comment}v=w.end;continue}if(!y&&n.options.strict&&u.containsNewline(_))m(_,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line")}if(a===0){if(w.comma)m(w.comma,"UNEXPECTED_TOKEN",`Unexpected , in ${b}`)}else{if(!w.comma)m(w.start,"MISSING_CHAR",`Missing , between ${b} items`);if(w.comment){let t="";e:for(const r of g){switch(r.type){case"comma":case"space":break;case"comment":t=r.source.substring(1);break e;default:break e}}if(t){let r=S.items[S.items.length-1];if(s.isPair(r))r=r.value??r.key;if(r.comment)r.comment+="\n"+t;else r.comment=t;w.comment=w.comment.substring(t.length+1)}}}if(!y&&!E&&!w.found){const s=R?t(n,R,w,m):r(n,w.end,E,null,w,m);S.items.push(s);v=s.range[2];if(isBlock(R))m(s.range,"BLOCK_IN_FLOW",p)}else{const s=w.end;const a=_?t(n,_,w,m):r(n,s,g,null,w,m);if(isBlock(_))m(a.range,"BLOCK_IN_FLOW",p);const u=c.resolveProps(E??[],{flow:b,indicator:"map-value-ind",next:R,offset:a.range[2],onError:m,startOnNewline:false});if(u.found){if(!y&&!w.found&&n.options.strict){if(E)for(const t of E){if(t===u.found)break;if(t.type==="newline"){m(t,"MULTILINE_IMPLICIT_KEY","Implicit keys of flow sequence pairs need to be on a single line");break}}if(w.start<u.found.offset-1024)m(u.found,"KEY_OVER_1024_CHARS","The : indicator must be at most 1024 chars after the start of an implicit flow sequence key")}}else if(R){if("source"in R&&R.source&&R.source[0]===":")m(R,"MISSING_CHAR",`Missing space after : in ${b}`);else m(u.start,"MISSING_CHAR",`Missing , or : between ${b} items`)}const h=R?t(n,R,u,m):u.found?r(n,u.end,E,null,u,m):null;if(h){if(isBlock(R))m(h.range,"BLOCK_IN_FLOW",p)}else if(u.comment){if(a.comment)a.comment+="\n"+u.comment;else a.comment=u.comment}const C=new i.Pair(a,h);if(n.options.keepSourceTokens)C.srcToken=l;if(y){const t=S;if(d.mapIncludes(n,t.items,a))m(s,"DUPLICATE_KEY","Map keys must be unique");t.items.push(C)}else{const t=new o.YAMLMap(n.schema);t.flow=true;t.items.push(C);S.items.push(t)}v=h?h.range[2]:u.end}}const R=y?"}":"]";const[w,...C]=h.end;let A=v;if(w&&w.source===R)A=w.offset+w.source.length;else{const t=b[0].toUpperCase()+b.substring(1);const r=E?`${t} must end with a ${R}`:`${t} in block collection must be sufficiently indented and end with a ${R}`;m(v,E?"MISSING_CHAR":"BAD_INDENT",r);if(w&&w.source.length!==1)C.unshift(w)}if(C.length>0){const t=l.resolveEnd(C,A,n.options.strict,m);if(t.comment){if(S.comment)S.comment+="\n"+t.comment;else S.comment=t.comment}S.range=[h.offset,A,t.offset]}else{S.range=[h.offset,A,A]}return S}r.resolveFlowCollection=resolveFlowCollection},7578:(t,r,n)=>{var s=n(9338);var i=n(1250);function resolveFlowScalar(t,r,n){const{offset:o,type:a,source:l,end:c}=t;let u;let d;const _onError=(t,r,s)=>n(o+t,r,s);switch(a){case"scalar":u=s.Scalar.PLAIN;d=plainValue(l,_onError);break;case"single-quoted-scalar":u=s.Scalar.QUOTE_SINGLE;d=singleQuotedValue(l,_onError);break;case"double-quoted-scalar":u=s.Scalar.QUOTE_DOUBLE;d=doubleQuotedValue(l,_onError);break;default:n(t,"UNEXPECTED_TOKEN",`Expected a flow scalar value, but found: ${a}`);return{value:"",type:null,comment:"",range:[o,o+l.length,o+l.length]}}const p=o+l.length;const h=i.resolveEnd(c,p,r,n);return{value:d,type:u,comment:h.comment,range:[o,p,h.offset]}}function plainValue(t,r){let n="";switch(t[0]){case"\t":n="a tab character";break;case",":n="flow indicator character ,";break;case"%":n="directive indicator character %";break;case"|":case">":{n=`block scalar indicator ${t[0]}`;break}case"@":case"`":{n=`reserved character ${t[0]}`;break}}if(n)r(0,"BAD_SCALAR_START",`Plain value cannot start with ${n}`);return foldLines(t)}function singleQuotedValue(t,r){if(t[t.length-1]!=="'"||t.length===1)r(t.length,"MISSING_CHAR","Missing closing 'quote");return foldLines(t.slice(1,-1)).replace(/''/g,"'")}function foldLines(t){let r,n;try{r=new RegExp("(.*?)(?<![ \t])[ \t]*\r?\n","sy");n=new RegExp("[ \t]*(.*?)(?:(?<![ \t])[ \t]*)?\r?\n","sy")}catch(t){r=/(.*?)[ \t]*\r?\n/sy;n=/[ \t]*(.*?)[ \t]*\r?\n/sy}let s=r.exec(t);if(!s)return t;let i=s[1];let o=" ";let a=r.lastIndex;n.lastIndex=a;while(s=n.exec(t)){if(s[1]===""){if(o==="\n")i+=o;else o="\n"}else{i+=o+s[1];o=" "}a=n.lastIndex}const l=/[ \t]*(.*)/sy;l.lastIndex=a;s=l.exec(t);return i+o+(s?.[1]??"")}function doubleQuotedValue(t,r){let n="";for(let s=1;s<t.length-1;++s){const i=t[s];if(i==="\r"&&t[s+1]==="\n")continue;if(i==="\n"){const{fold:r,offset:i}=foldNewline(t,s);n+=r;s=i}else if(i==="\\"){let i=t[++s];const a=o[i];if(a)n+=a;else if(i==="\n"){i=t[s+1];while(i===" "||i==="\t")i=t[++s+1]}else if(i==="\r"&&t[s+1]==="\n"){i=t[++s+1];while(i===" "||i==="\t")i=t[++s+1]}else if(i==="x"||i==="u"||i==="U"){const o={x:2,u:4,U:8}[i];n+=parseCharCode(t,s+1,o,r);s+=o}else{const i=t.substr(s-1,2);r(s-1,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`);n+=i}}else if(i===" "||i==="\t"){const r=s;let o=t[s+1];while(o===" "||o==="\t")o=t[++s+1];if(o!=="\n"&&!(o==="\r"&&t[s+2]==="\n"))n+=s>r?t.slice(r,s+1):i}else{n+=i}}if(t[t.length-1]!=='"'||t.length===1)r(t.length,"MISSING_CHAR",'Missing closing "quote');return n}function foldNewline(t,r){let n="";let s=t[r+1];while(s===" "||s==="\t"||s==="\n"||s==="\r"){if(s==="\r"&&t[r+2]!=="\n")break;if(s==="\n")n+="\n";r+=1;s=t[r+1]}if(!n)n=" ";return{fold:n,offset:r}}const o={0:"\0",a:"",b:"\b",e:"",f:"\f",n:"\n",r:"\r",t:"\t",v:"\v",N:"
",_:" ",L:"\u2028",P:"\u2029"," ":" ",'"':'"',"/":"/","\\":"\\","\t":"\t"};function parseCharCode(t,r,n,s){const i=t.substr(r,n);const o=i.length===n&&/^[0-9a-fA-F]+$/.test(i);const a=o?parseInt(i,16):NaN;if(isNaN(a)){const i=t.substr(r-2,n+2);s(r-2,"BAD_DQ_ESCAPE",`Invalid escape sequence ${i}`);return i}return String.fromCodePoint(a)}r.resolveFlowScalar=resolveFlowScalar},6985:(t,r)=>{function resolveProps(t,{flow:r,indicator:n,next:s,offset:i,onError:o,startOnNewline:a}){let l=false;let c=a;let u=a;let d="";let p="";let h=false;let m=false;let g=false;let y=null;let b=null;let _=null;let S=null;let E=null;for(const s of t){if(g){if(s.type!=="space"&&s.type!=="newline"&&s.type!=="comma")o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");g=false}switch(s.type){case"space":if(!r&&c&&n!=="doc-start"&&s.source[0]==="\t")o(s,"TAB_AS_INDENT","Tabs are not allowed as indentation");u=true;break;case"comment":{if(!u)o(s,"MISSING_CHAR","Comments must be separated from other tokens by white space characters");const t=s.source.substring(1)||" ";if(!d)d=t;else d+=p+t;p="";c=false;break}case"newline":if(c){if(d)d+=s.source;else l=true}else p+=s.source;c=true;h=true;if(y||b)m=true;u=true;break;case"anchor":if(y)o(s,"MULTIPLE_ANCHORS","A node can have at most one anchor");if(s.source.endsWith(":"))o(s.offset+s.source.length-1,"BAD_ALIAS","Anchor ending in : is ambiguous",true);y=s;if(E===null)E=s.offset;c=false;u=false;g=true;break;case"tag":{if(b)o(s,"MULTIPLE_TAGS","A node can have at most one tag");b=s;if(E===null)E=s.offset;c=false;u=false;g=true;break}case n:if(y||b)o(s,"BAD_PROP_ORDER",`Anchors and tags must be after the ${s.source} indicator`);if(S)o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.source} in ${r??"collection"}`);S=s;c=false;u=false;break;case"comma":if(r){if(_)o(s,"UNEXPECTED_TOKEN",`Unexpected , in ${r}`);_=s;c=false;u=false;break}default:o(s,"UNEXPECTED_TOKEN",`Unexpected ${s.type} token`);c=false;u=false}}const v=t[t.length-1];const R=v?v.offset+v.source.length:i;if(g&&s&&s.type!=="space"&&s.type!=="newline"&&s.type!=="comma"&&(s.type!=="scalar"||s.source!==""))o(s.offset,"MISSING_CHAR","Tags and anchors must be separated from the next token by white space");return{comma:_,found:S,spaceBefore:l,comment:d,hasNewline:h,hasNewlineAfterProp:m,anchor:y,tag:b,end:R,start:E??R}}r.resolveProps=resolveProps},976:(t,r)=>{function containsNewline(t){if(!t)return null;switch(t.type){case"alias":case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":if(t.source.includes("\n"))return true;if(t.end)for(const r of t.end)if(r.type==="newline")return true;return false;case"flow-collection":for(const r of t.items){for(const t of r.start)if(t.type==="newline")return true;if(r.sep)for(const t of r.sep)if(t.type==="newline")return true;if(containsNewline(r.key)||containsNewline(r.value))return true}return false;default:return true}}r.containsNewline=containsNewline},8781:(t,r)=>{function emptyScalarPosition(t,r,n){if(r){if(n===null)n=r.length;for(let s=n-1;s>=0;--s){let n=r[s];switch(n.type){case"space":case"comment":case"newline":t-=n.source.length;continue}n=r[++s];while(n?.type==="space"){t+=n.source.length;n=r[++s]}break}}return t}r.emptyScalarPosition=emptyScalarPosition},3669:(t,r,n)=>{var s=n(976);function flowIndentCheck(t,r,n){if(r?.type==="flow-collection"){const i=r.end[0];if(i.indent===t&&(i.source==="]"||i.source==="}")&&s.containsNewline(r)){const t="Flow end indicator should be more indented than parent";n(i,"BAD_INDENT",t,true)}}}r.flowIndentCheck=flowIndentCheck},6899:(t,r,n)=>{var s=n(5589);function mapIncludes(t,r,n){const{uniqueKeys:i}=t.options;if(i===false)return false;const o=typeof i==="function"?i:(r,n)=>r===n||s.isScalar(r)&&s.isScalar(n)&&r.value===n.value&&!(r.value==="<<"&&t.schema.merge);return r.some((t=>o(t.key,n)))}r.mapIncludes=mapIncludes},42:(t,r,n)=>{var s=n(5639);var i=n(2240);var o=n(5589);var a=n(246);var l=n(2358);var c=n(6831);var u=n(5225);var d=n(8459);var p=n(3412);var h=n(9652);var m=n(5400);class Document{constructor(t,r,n){this.commentBefore=null;this.comment=null;this.errors=[];this.warnings=[];Object.defineProperty(this,o.NODE_TYPE,{value:o.DOC});let s=null;if(typeof r==="function"||Array.isArray(r)){s=r}else if(n===undefined&&r){n=r;r=undefined}const i=Object.assign({intAsBigInt:false,keepSourceTokens:false,logLevel:"warn",prettyErrors:true,strict:true,uniqueKeys:true,version:"1.2"},n);this.options=i;let{version:a}=i;if(n?._directives){this.directives=n._directives.atDocument();if(this.directives.yaml.explicit)a=this.directives.yaml.version}else this.directives=new m.Directives({version:a});this.setSchema(a,n);this.contents=t===undefined?null:this.createNode(t,s,n)}clone(){const t=Object.create(Document.prototype,{[o.NODE_TYPE]:{value:o.DOC}});t.commentBefore=this.commentBefore;t.comment=this.comment;t.errors=this.errors.slice();t.warnings=this.warnings.slice();t.options=Object.assign({},this.options);if(this.directives)t.directives=this.directives.clone();t.schema=this.schema.clone();t.contents=o.isNode(this.contents)?this.contents.clone(t.schema):this.contents;if(this.range)t.range=this.range.slice();return t}add(t){if(assertCollection(this.contents))this.contents.add(t)}addIn(t,r){if(assertCollection(this.contents))this.contents.addIn(t,r)}createAlias(t,r){if(!t.anchor){const n=d.anchorNames(this);t.anchor=!r||n.has(r)?d.findNewAnchor(r||"a",n):r}return new s.Alias(t.anchor)}createNode(t,r,n){let s=undefined;if(typeof r==="function"){t=r.call({"":t},"",t);s=r}else if(Array.isArray(r)){const keyToStr=t=>typeof t==="number"||t instanceof String||t instanceof Number;const t=r.filter(keyToStr).map(String);if(t.length>0)r=r.concat(t);s=r}else if(n===undefined&&r){n=r;r=undefined}const{aliasDuplicateObjects:i,anchorPrefix:a,flow:l,keepUndefined:c,onTagObj:u,tag:p}=n??{};const{onAnchor:m,setAnchors:g,sourceObjects:y}=d.createNodeAnchors(this,a||"a");const b={aliasDuplicateObjects:i??true,keepUndefined:c??false,onAnchor:m,onTagObj:u,replacer:s,schema:this.schema,sourceObjects:y};const _=h.createNode(t,p,b);if(l&&o.isCollection(_))_.flow=true;g();return _}createPair(t,r,n={}){const s=this.createNode(t,null,n);const i=this.createNode(r,null,n);return new a.Pair(s,i)}delete(t){return assertCollection(this.contents)?this.contents.delete(t):false}deleteIn(t){if(i.isEmptyPath(t)){if(this.contents==null)return false;this.contents=null;return true}return assertCollection(this.contents)?this.contents.deleteIn(t):false}get(t,r){return o.isCollection(this.contents)?this.contents.get(t,r):undefined}getIn(t,r){if(i.isEmptyPath(t))return!r&&o.isScalar(this.contents)?this.contents.value:this.contents;return o.isCollection(this.contents)?this.contents.getIn(t,r):undefined}has(t){return o.isCollection(this.contents)?this.contents.has(t):false}hasIn(t){if(i.isEmptyPath(t))return this.contents!==undefined;return o.isCollection(this.contents)?this.contents.hasIn(t):false}set(t,r){if(this.contents==null){this.contents=i.collectionFromPath(this.schema,[t],r)}else if(assertCollection(this.contents)){this.contents.set(t,r)}}setIn(t,r){if(i.isEmptyPath(t)){this.contents=r}else if(this.contents==null){this.contents=i.collectionFromPath(this.schema,Array.from(t),r)}else if(assertCollection(this.contents)){this.contents.setIn(t,r)}}setSchema(t,r={}){if(typeof t==="number")t=String(t);let n;switch(t){case"1.1":if(this.directives)this.directives.yaml.version="1.1";else this.directives=new m.Directives({version:"1.1"});n={merge:true,resolveKnownTags:false,schema:"yaml-1.1"};break;case"1.2":case"next":if(this.directives)this.directives.yaml.version=t;else this.directives=new m.Directives({version:t});n={merge:false,resolveKnownTags:true,schema:"core"};break;case null:if(this.directives)delete this.directives;n=null;break;default:{const r=JSON.stringify(t);throw new Error(`Expected '1.1', '1.2' or null as first argument, but found: ${r}`)}}if(r.schema instanceof Object)this.schema=r.schema;else if(n)this.schema=new c.Schema(Object.assign(n,r));else throw new Error(`With a null YAML version, the { schema: Schema } option is required`)}toJS({json:t,jsonArg:r,mapAsMap:n,maxAliasCount:s,onAnchor:i,reviver:o}={}){const a={anchors:new Map,doc:this,keep:!t,mapAsMap:n===true,mapKeyWarned:false,maxAliasCount:typeof s==="number"?s:100};const c=l.toJS(this.contents,r??"",a);if(typeof i==="function")for(const{count:t,res:r}of a.anchors.values())i(r,t);return typeof o==="function"?p.applyReviver(o,{"":c},"",c):c}toJSON(t,r){return this.toJS({json:true,jsonArg:t,mapAsMap:false,onAnchor:r})}toString(t={}){if(this.errors.length>0)throw new Error("Document with errors cannot be stringified");if("indent"in t&&(!Number.isInteger(t.indent)||Number(t.indent)<=0)){const r=JSON.stringify(t.indent);throw new Error(`"indent" option must be a positive integer, not ${r}`)}return u.stringifyDocument(this,t)}}function assertCollection(t){if(o.isCollection(t))return true;throw new Error("Expected a YAML collection as document contents")}r.Document=Document},8459:(t,r,n)=>{var s=n(5589);var i=n(6796);function anchorIsValid(t){if(/[\x00-\x19\s,[\]{}]/.test(t)){const r=JSON.stringify(t);const n=`Anchor must not contain whitespace or control characters: ${r}`;throw new Error(n)}return true}function anchorNames(t){const r=new Set;i.visit(t,{Value(t,n){if(n.anchor)r.add(n.anchor)}});return r}function findNewAnchor(t,r){for(let n=1;true;++n){const s=`${t}${n}`;if(!r.has(s))return s}}function createNodeAnchors(t,r){const n=[];const i=new Map;let o=null;return{onAnchor:s=>{n.push(s);if(!o)o=anchorNames(t);const i=findNewAnchor(r,o);o.add(i);return i},setAnchors:()=>{for(const t of n){const r=i.get(t);if(typeof r==="object"&&r.anchor&&(s.isScalar(r.node)||s.isCollection(r.node))){r.node.anchor=r.anchor}else{const r=new Error("Failed to resolve repeated object (this should not happen)");r.source=t;throw r}}},sourceObjects:i}}r.anchorIsValid=anchorIsValid;r.anchorNames=anchorNames;r.createNodeAnchors=createNodeAnchors;r.findNewAnchor=findNewAnchor},3412:(t,r)=>{function applyReviver(t,r,n,s){if(s&&typeof s==="object"){if(Array.isArray(s)){for(let r=0,n=s.length;r<n;++r){const n=s[r];const i=applyReviver(t,s,String(r),n);if(i===undefined)delete s[r];else if(i!==n)s[r]=i}}else if(s instanceof Map){for(const r of Array.from(s.keys())){const n=s.get(r);const i=applyReviver(t,s,r,n);if(i===undefined)s.delete(r);else if(i!==n)s.set(r,i)}}else if(s instanceof Set){for(const r of Array.from(s)){const n=applyReviver(t,s,r,r);if(n===undefined)s.delete(r);else if(n!==r){s.delete(r);s.add(n)}}}else{for(const[r,n]of Object.entries(s)){const i=applyReviver(t,s,r,n);if(i===undefined)delete s[r];else if(i!==n)s[r]=i}}}return t.call(r,n,s)}r.applyReviver=applyReviver},9652:(t,r,n)=>{var s=n(5639);var i=n(5589);var o=n(9338);const a="tag:yaml.org,2002:";function findTagObject(t,r,n){if(r){const t=n.filter((t=>t.tag===r));const s=t.find((t=>!t.format))??t[0];if(!s)throw new Error(`Tag ${r} not found`);return s}return n.find((r=>r.identify?.(t)&&!r.format))}function createNode(t,r,n){if(i.isDocument(t))t=t.contents;if(i.isNode(t))return t;if(i.isPair(t)){const r=n.schema[i.MAP].createNode?.(n.schema,null,n);r.items.push(t);return r}if(t instanceof String||t instanceof Number||t instanceof Boolean||typeof BigInt!=="undefined"&&t instanceof BigInt){t=t.valueOf()}const{aliasDuplicateObjects:l,onAnchor:c,onTagObj:u,schema:d,sourceObjects:p}=n;let h=undefined;if(l&&t&&typeof t==="object"){h=p.get(t);if(h){if(!h.anchor)h.anchor=c(t);return new s.Alias(h.anchor)}else{h={anchor:null,node:null};p.set(t,h)}}if(r?.startsWith("!!"))r=a+r.slice(2);let m=findTagObject(t,r,d.tags);if(!m){if(t&&typeof t.toJSON==="function"){t=t.toJSON()}if(!t||typeof t!=="object"){const r=new o.Scalar(t);if(h)h.node=r;return r}m=t instanceof Map?d[i.MAP]:Symbol.iterator in Object(t)?d[i.SEQ]:d[i.MAP]}if(u){u(m);delete n.onTagObj}const g=m?.createNode?m.createNode(n.schema,t,n):typeof m?.nodeClass?.from==="function"?m.nodeClass.from(n.schema,t,n):new o.Scalar(t);if(r)g.tag=r;else if(!m.default)g.tag=m.tag;if(h)h.node=g;return g}r.createNode=createNode},5400:(t,r,n)=>{var s=n(5589);var i=n(6796);const o={"!":"%21",",":"%2C","[":"%5B","]":"%5D","{":"%7B","}":"%7D"};const escapeTagName=t=>t.replace(/[!,[\]{}]/g,(t=>o[t]));class Directives{constructor(t,r){this.docStart=null;this.docEnd=false;this.yaml=Object.assign({},Directives.defaultYaml,t);this.tags=Object.assign({},Directives.defaultTags,r)}clone(){const t=new Directives(this.yaml,this.tags);t.docStart=this.docStart;return t}atDocument(){const t=new Directives(this.yaml,this.tags);switch(this.yaml.version){case"1.1":this.atNextDocument=true;break;case"1.2":this.atNextDocument=false;this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.2"};this.tags=Object.assign({},Directives.defaultTags);break}return t}add(t,r){if(this.atNextDocument){this.yaml={explicit:Directives.defaultYaml.explicit,version:"1.1"};this.tags=Object.assign({},Directives.defaultTags);this.atNextDocument=false}const n=t.trim().split(/[ \t]+/);const s=n.shift();switch(s){case"%TAG":{if(n.length!==2){r(0,"%TAG directive should contain exactly two parts");if(n.length<2)return false}const[t,s]=n;this.tags[t]=s;return true}case"%YAML":{this.yaml.explicit=true;if(n.length!==1){r(0,"%YAML directive should contain exactly one part");return false}const[t]=n;if(t==="1.1"||t==="1.2"){this.yaml.version=t;return true}else{const n=/^\d+\.\d+$/.test(t);r(6,`Unsupported YAML version ${t}`,n);return false}}default:r(0,`Unknown directive ${s}`,true);return false}}tagName(t,r){if(t==="!")return"!";if(t[0]!=="!"){r(`Not a valid tag: ${t}`);return null}if(t[1]==="<"){const n=t.slice(2,-1);if(n==="!"||n==="!!"){r(`Verbatim tags aren't resolved, so ${t} is invalid.`);return null}if(t[t.length-1]!==">")r("Verbatim tags must end with a >");return n}const[,n,s]=t.match(/^(.*!)([^!]*)$/s);if(!s)r(`The ${t} tag has no suffix`);const i=this.tags[n];if(i){try{return i+decodeURIComponent(s)}catch(t){r(String(t));return null}}if(n==="!")return t;r(`Could not resolve tag: ${t}`);return null}tagString(t){for(const[r,n]of Object.entries(this.tags)){if(t.startsWith(n))return r+escapeTagName(t.substring(n.length))}return t[0]==="!"?t:`!<${t}>`}toString(t){const r=this.yaml.explicit?[`%YAML ${this.yaml.version||"1.2"}`]:[];const n=Object.entries(this.tags);let o;if(t&&n.length>0&&s.isNode(t.contents)){const r={};i.visit(t.contents,((t,n)=>{if(s.isNode(n)&&n.tag)r[n.tag]=true}));o=Object.keys(r)}else o=[];for(const[s,i]of n){if(s==="!!"&&i==="tag:yaml.org,2002:")continue;if(!t||o.some((t=>t.startsWith(i))))r.push(`%TAG ${s} ${i}`)}return r.join("\n")}}Directives.defaultYaml={explicit:false,version:"1.2"};Directives.defaultTags={"!!":"tag:yaml.org,2002:"};r.Directives=Directives},4236:(t,r)=>{class YAMLError extends Error{constructor(t,r,n,s){super();this.name=t;this.code=n;this.message=s;this.pos=r}}class YAMLParseError extends YAMLError{constructor(t,r,n){super("YAMLParseError",t,r,n)}}class YAMLWarning extends YAMLError{constructor(t,r,n){super("YAMLWarning",t,r,n)}}const prettifyError=(t,r)=>n=>{if(n.pos[0]===-1)return;n.linePos=n.pos.map((t=>r.linePos(t)));const{line:s,col:i}=n.linePos[0];n.message+=` at line ${s}, column ${i}`;let o=i-1;let a=t.substring(r.lineStarts[s-1],r.lineStarts[s]).replace(/[\n\r]+$/,"");if(o>=60&&a.length>80){const t=Math.min(o-39,a.length-79);a="…"+a.substring(t);o-=t-1}if(a.length>80)a=a.substring(0,79)+"…";if(s>1&&/^ *$/.test(a.substring(0,o))){let n=t.substring(r.lineStarts[s-2],r.lineStarts[s-1]);if(n.length>80)n=n.substring(0,79)+"…\n";a=n+a}if(/[^ ]/.test(a)){let t=1;const r=n.linePos[1];if(r&&r.line===s&&r.col>i){t=Math.max(1,Math.min(r.col-i,80-o))}const l=" ".repeat(o)+"^".repeat(t);n.message+=`:\n\n${a}\n${l}\n`}};r.YAMLError=YAMLError;r.YAMLParseError=YAMLParseError;r.YAMLWarning=YAMLWarning;r.prettifyError=prettifyError},4083:(t,r,n)=>{var s;var i=n(9493);var o=n(42);var a=n(6831);var l=n(4236);var c=n(5639);var u=n(5589);var d=n(246);var p=n(9338);var h=n(6011);var m=n(5161);var g=n(9169);var y=n(5976);var b=n(1929);var _=n(3328);var S=n(8649);var E=n(6796);s=i.Composer;s=o.Document;s=a.Schema;s=l.YAMLError;s=l.YAMLParseError;s=l.YAMLWarning;s=c.Alias;s=u.isAlias;s=u.isCollection;s=u.isDocument;s=u.isMap;s=u.isNode;s=u.isPair;s=u.isScalar;s=u.isSeq;s=d.Pair;s=p.Scalar;s=h.YAMLMap;s=m.YAMLSeq;s=g;s=y.Lexer;s=b.LineCounter;s=_.Parser;r.Qc=S.parse;s=S.parseAllDocuments;s=S.parseDocument;s=S.stringify;s=E.visit;s=E.visitAsync},6909:(t,r)=>{function debug(t,...r){if(t==="debug")console.log(...r)}function warn(t,r){if(t==="debug"||t==="warn"){if(typeof process!=="undefined"&&process.emitWarning)process.emitWarning(r);else console.warn(r)}}r.debug=debug;r.warn=warn},5639:(t,r,n)=>{var s=n(8459);var i=n(6796);var o=n(5589);var a=n(1399);var l=n(2358);class Alias extends a.NodeBase{constructor(t){super(o.ALIAS);this.source=t;Object.defineProperty(this,"tag",{set(){throw new Error("Alias nodes cannot have tags")}})}resolve(t){let r=undefined;i.visit(t,{Node:(t,n)=>{if(n===this)return i.visit.BREAK;if(n.anchor===this.source)r=n}});return r}toJSON(t,r){if(!r)return{source:this.source};const{anchors:n,doc:s,maxAliasCount:i}=r;const o=this.resolve(s);if(!o){const t=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new ReferenceError(t)}let a=n.get(o);if(!a){l.toJS(o,null,r);a=n.get(o)}if(!a||a.res===undefined){const t="This should not happen: Alias anchor was not resolved?";throw new ReferenceError(t)}if(i>=0){a.count+=1;if(a.aliasCount===0)a.aliasCount=getAliasCount(s,o,n);if(a.count*a.aliasCount>i){const t="Excessive alias count indicates a resource exhaustion attack";throw new ReferenceError(t)}}return a.res}toString(t,r,n){const i=`*${this.source}`;if(t){s.anchorIsValid(this.source);if(t.options.verifyAliasOrder&&!t.anchors.has(this.source)){const t=`Unresolved alias (the anchor must be set before the alias): ${this.source}`;throw new Error(t)}if(t.implicitKey)return`${i} `}return i}}function getAliasCount(t,r,n){if(o.isAlias(r)){const s=r.resolve(t);const i=n&&s&&n.get(s);return i?i.count*i.aliasCount:0}else if(o.isCollection(r)){let s=0;for(const i of r.items){const r=getAliasCount(t,i,n);if(r>s)s=r}return s}else if(o.isPair(r)){const s=getAliasCount(t,r.key,n);const i=getAliasCount(t,r.value,n);return Math.max(s,i)}return 1}r.Alias=Alias},2240:(t,r,n)=>{var s=n(9652);var i=n(5589);var o=n(1399);function collectionFromPath(t,r,n){let i=n;for(let t=r.length-1;t>=0;--t){const n=r[t];if(typeof n==="number"&&Number.isInteger(n)&&n>=0){const t=[];t[n]=i;i=t}else{i=new Map([[n,i]])}}return s.createNode(i,undefined,{aliasDuplicateObjects:false,keepUndefined:false,onAnchor:()=>{throw new Error("This should not happen, please report a bug.")},schema:t,sourceObjects:new Map})}const isEmptyPath=t=>t==null||typeof t==="object"&&!!t[Symbol.iterator]().next().done;class Collection extends o.NodeBase{constructor(t,r){super(t);Object.defineProperty(this,"schema",{value:r,configurable:true,enumerable:false,writable:true})}clone(t){const r=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(t)r.schema=t;r.items=r.items.map((r=>i.isNode(r)||i.isPair(r)?r.clone(t):r));if(this.range)r.range=this.range.slice();return r}addIn(t,r){if(isEmptyPath(t))this.add(r);else{const[n,...s]=t;const o=this.get(n,true);if(i.isCollection(o))o.addIn(s,r);else if(o===undefined&&this.schema)this.set(n,collectionFromPath(this.schema,s,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}deleteIn(t){const[r,...n]=t;if(n.length===0)return this.delete(r);const s=this.get(r,true);if(i.isCollection(s))return s.deleteIn(n);else throw new Error(`Expected YAML collection at ${r}. Remaining path: ${n}`)}getIn(t,r){const[n,...s]=t;const o=this.get(n,true);if(s.length===0)return!r&&i.isScalar(o)?o.value:o;else return i.isCollection(o)?o.getIn(s,r):undefined}hasAllNullValues(t){return this.items.every((r=>{if(!i.isPair(r))return false;const n=r.value;return n==null||t&&i.isScalar(n)&&n.value==null&&!n.commentBefore&&!n.comment&&!n.tag}))}hasIn(t){const[r,...n]=t;if(n.length===0)return this.has(r);const s=this.get(r,true);return i.isCollection(s)?s.hasIn(n):false}setIn(t,r){const[n,...s]=t;if(s.length===0){this.set(n,r)}else{const t=this.get(n,true);if(i.isCollection(t))t.setIn(s,r);else if(t===undefined&&this.schema)this.set(n,collectionFromPath(this.schema,s,r));else throw new Error(`Expected YAML collection at ${n}. Remaining path: ${s}`)}}}Collection.maxFlowStringSingleLineLength=60;r.Collection=Collection;r.collectionFromPath=collectionFromPath;r.isEmptyPath=isEmptyPath},1399:(t,r,n)=>{var s=n(3412);var i=n(5589);var o=n(2358);class NodeBase{constructor(t){Object.defineProperty(this,i.NODE_TYPE,{value:t})}clone(){const t=Object.create(Object.getPrototypeOf(this),Object.getOwnPropertyDescriptors(this));if(this.range)t.range=this.range.slice();return t}toJS(t,{mapAsMap:r,maxAliasCount:n,onAnchor:a,reviver:l}={}){if(!i.isDocument(t))throw new TypeError("A document argument is required");const c={anchors:new Map,doc:t,keep:true,mapAsMap:r===true,mapKeyWarned:false,maxAliasCount:typeof n==="number"?n:100};const u=o.toJS(this,"",c);if(typeof a==="function")for(const{count:t,res:r}of c.anchors.values())a(r,t);return typeof l==="function"?s.applyReviver(l,{"":u},"",u):u}}r.NodeBase=NodeBase},246:(t,r,n)=>{var s=n(9652);var i=n(4875);var o=n(4676);var a=n(5589);function createPair(t,r,n){const i=s.createNode(t,undefined,n);const o=s.createNode(r,undefined,n);return new Pair(i,o)}class Pair{constructor(t,r=null){Object.defineProperty(this,a.NODE_TYPE,{value:a.PAIR});this.key=t;this.value=r}clone(t){let{key:r,value:n}=this;if(a.isNode(r))r=r.clone(t);if(a.isNode(n))n=n.clone(t);return new Pair(r,n)}toJSON(t,r){const n=r?.mapAsMap?new Map:{};return o.addPairToJSMap(r,n,this)}toString(t,r,n){return t?.doc?i.stringifyPair(this,t,r,n):JSON.stringify(this)}}r.Pair=Pair;r.createPair=createPair},9338:(t,r,n)=>{var s=n(5589);var i=n(1399);var o=n(2358);const isScalarValue=t=>!t||typeof t!=="function"&&typeof t!=="object";class Scalar extends i.NodeBase{constructor(t){super(s.SCALAR);this.value=t}toJSON(t,r){return r?.keep?this.value:o.toJS(this.value,t,r)}toString(){return String(this.value)}}Scalar.BLOCK_FOLDED="BLOCK_FOLDED";Scalar.BLOCK_LITERAL="BLOCK_LITERAL";Scalar.PLAIN="PLAIN";Scalar.QUOTE_DOUBLE="QUOTE_DOUBLE";Scalar.QUOTE_SINGLE="QUOTE_SINGLE";r.Scalar=Scalar;r.isScalarValue=isScalarValue},6011:(t,r,n)=>{var s=n(2466);var i=n(4676);var o=n(2240);var a=n(5589);var l=n(246);var c=n(9338);function findPair(t,r){const n=a.isScalar(r)?r.value:r;for(const s of t){if(a.isPair(s)){if(s.key===r||s.key===n)return s;if(a.isScalar(s.key)&&s.key.value===n)return s}}return undefined}class YAMLMap extends o.Collection{static get tagName(){return"tag:yaml.org,2002:map"}constructor(t){super(a.MAP,t);this.items=[]}static from(t,r,n){const{keepUndefined:s,replacer:i}=n;const o=new this(t);const add=(t,a)=>{if(typeof i==="function")a=i.call(r,t,a);else if(Array.isArray(i)&&!i.includes(t))return;if(a!==undefined||s)o.items.push(l.createPair(t,a,n))};if(r instanceof Map){for(const[t,n]of r)add(t,n)}else if(r&&typeof r==="object"){for(const t of Object.keys(r))add(t,r[t])}if(typeof t.sortMapEntries==="function"){o.items.sort(t.sortMapEntries)}return o}add(t,r){let n;if(a.isPair(t))n=t;else if(!t||typeof t!=="object"||!("key"in t)){n=new l.Pair(t,t?.value)}else n=new l.Pair(t.key,t.value);const s=findPair(this.items,n.key);const i=this.schema?.sortMapEntries;if(s){if(!r)throw new Error(`Key ${n.key} already set`);if(a.isScalar(s.value)&&c.isScalarValue(n.value))s.value.value=n.value;else s.value=n.value}else if(i){const t=this.items.findIndex((t=>i(n,t)<0));if(t===-1)this.items.push(n);else this.items.splice(t,0,n)}else{this.items.push(n)}}delete(t){const r=findPair(this.items,t);if(!r)return false;const n=this.items.splice(this.items.indexOf(r),1);return n.length>0}get(t,r){const n=findPair(this.items,t);const s=n?.value;return(!r&&a.isScalar(s)?s.value:s)??undefined}has(t){return!!findPair(this.items,t)}set(t,r){this.add(new l.Pair(t,r),true)}toJSON(t,r,n){const s=n?new n:r?.mapAsMap?new Map:{};if(r?.onCreate)r.onCreate(s);for(const t of this.items)i.addPairToJSMap(r,s,t);return s}toString(t,r,n){if(!t)return JSON.stringify(this);for(const t of this.items){if(!a.isPair(t))throw new Error(`Map items must all be pairs; found ${JSON.stringify(t)} instead`)}if(!t.allNullValues&&this.hasAllNullValues(false))t=Object.assign({},t,{allNullValues:true});return s.stringifyCollection(this,t,{blockItemPrefix:"",flowChars:{start:"{",end:"}"},itemIndent:t.indent||"",onChompKeep:n,onComment:r})}}r.YAMLMap=YAMLMap;r.findPair=findPair},5161:(t,r,n)=>{var s=n(9652);var i=n(2466);var o=n(2240);var a=n(5589);var l=n(9338);var c=n(2358);class YAMLSeq extends o.Collection{static get tagName(){return"tag:yaml.org,2002:seq"}constructor(t){super(a.SEQ,t);this.items=[]}add(t){this.items.push(t)}delete(t){const r=asItemIndex(t);if(typeof r!=="number")return false;const n=this.items.splice(r,1);return n.length>0}get(t,r){const n=asItemIndex(t);if(typeof n!=="number")return undefined;const s=this.items[n];return!r&&a.isScalar(s)?s.value:s}has(t){const r=asItemIndex(t);return typeof r==="number"&&r<this.items.length}set(t,r){const n=asItemIndex(t);if(typeof n!=="number")throw new Error(`Expected a valid index, not ${t}.`);const s=this.items[n];if(a.isScalar(s)&&l.isScalarValue(r))s.value=r;else this.items[n]=r}toJSON(t,r){const n=[];if(r?.onCreate)r.onCreate(n);let s=0;for(const t of this.items)n.push(c.toJS(t,String(s++),r));return n}toString(t,r,n){if(!t)return JSON.stringify(this);return i.stringifyCollection(this,t,{blockItemPrefix:"- ",flowChars:{start:"[",end:"]"},itemIndent:(t.indent||"")+" ",onChompKeep:n,onComment:r})}static from(t,r,n){const{replacer:i}=n;const o=new this(t);if(r&&Symbol.iterator in Object(r)){let t=0;for(let a of r){if(typeof i==="function"){const n=r instanceof Set?a:String(t++);a=i.call(r,n,a)}o.items.push(s.createNode(a,undefined,n))}}return o}}function asItemIndex(t){let r=a.isScalar(t)?t.value:t;if(r&&typeof r==="string")r=Number(r);return typeof r==="number"&&Number.isInteger(r)&&r>=0?r:null}r.YAMLSeq=YAMLSeq},4676:(t,r,n)=>{var s=n(6909);var i=n(8409);var o=n(5589);var a=n(9338);var l=n(2358);const c="<<";function addPairToJSMap(t,r,{key:n,value:s}){if(t?.doc.schema.merge&&isMergeKey(n)){s=o.isAlias(s)?s.resolve(t.doc):s;if(o.isSeq(s))for(const n of s.items)mergeToJSMap(t,r,n);else if(Array.isArray(s))for(const n of s)mergeToJSMap(t,r,n);else mergeToJSMap(t,r,s)}else{const i=l.toJS(n,"",t);if(r instanceof Map){r.set(i,l.toJS(s,i,t))}else if(r instanceof Set){r.add(i)}else{const o=stringifyKey(n,i,t);const a=l.toJS(s,o,t);if(o in r)Object.defineProperty(r,o,{value:a,writable:true,enumerable:true,configurable:true});else r[o]=a}}return r}const isMergeKey=t=>t===c||o.isScalar(t)&&t.value===c&&(!t.type||t.type===a.Scalar.PLAIN);function mergeToJSMap(t,r,n){const s=t&&o.isAlias(n)?n.resolve(t.doc):n;if(!o.isMap(s))throw new Error("Merge sources must be maps or map aliases");const i=s.toJSON(null,t,Map);for(const[t,n]of i){if(r instanceof Map){if(!r.has(t))r.set(t,n)}else if(r instanceof Set){r.add(t)}else if(!Object.prototype.hasOwnProperty.call(r,t)){Object.defineProperty(r,t,{value:n,writable:true,enumerable:true,configurable:true})}}return r}function stringifyKey(t,r,n){if(r===null)return"";if(typeof r!=="object")return String(r);if(o.isNode(t)&&n?.doc){const r=i.createStringifyContext(n.doc,{});r.anchors=new Set;for(const t of n.anchors.keys())r.anchors.add(t.anchor);r.inFlow=true;r.inStringifyKey=true;const o=t.toString(r);if(!n.mapKeyWarned){let t=JSON.stringify(o);if(t.length>40)t=t.substring(0,36)+'..."';s.warn(n.doc.options.logLevel,`Keys with collection values will be stringified due to JS Object restrictions: ${t}. Set mapAsMap: true to use object keys.`);n.mapKeyWarned=true}return o}return JSON.stringify(r)}r.addPairToJSMap=addPairToJSMap},5589:(t,r)=>{const n=Symbol.for("yaml.alias");const s=Symbol.for("yaml.document");const i=Symbol.for("yaml.map");const o=Symbol.for("yaml.pair");const a=Symbol.for("yaml.scalar");const l=Symbol.for("yaml.seq");const c=Symbol.for("yaml.node.type");const isAlias=t=>!!t&&typeof t==="object"&&t[c]===n;const isDocument=t=>!!t&&typeof t==="object"&&t[c]===s;const isMap=t=>!!t&&typeof t==="object"&&t[c]===i;const isPair=t=>!!t&&typeof t==="object"&&t[c]===o;const isScalar=t=>!!t&&typeof t==="object"&&t[c]===a;const isSeq=t=>!!t&&typeof t==="object"&&t[c]===l;function isCollection(t){if(t&&typeof t==="object")switch(t[c]){case i:case l:return true}return false}function isNode(t){if(t&&typeof t==="object")switch(t[c]){case n:case i:case a:case l:return true}return false}const hasAnchor=t=>(isScalar(t)||isCollection(t))&&!!t.anchor;r.ALIAS=n;r.DOC=s;r.MAP=i;r.NODE_TYPE=c;r.PAIR=o;r.SCALAR=a;r.SEQ=l;r.hasAnchor=hasAnchor;r.isAlias=isAlias;r.isCollection=isCollection;r.isDocument=isDocument;r.isMap=isMap;r.isNode=isNode;r.isPair=isPair;r.isScalar=isScalar;r.isSeq=isSeq},2358:(t,r,n)=>{var s=n(5589);function toJS(t,r,n){if(Array.isArray(t))return t.map(((t,r)=>toJS(t,String(r),n)));if(t&&typeof t.toJSON==="function"){if(!n||!s.hasAnchor(t))return t.toJSON(r,n);const i={aliasCount:0,count:1,res:undefined};n.anchors.set(t,i);n.onCreate=t=>{i.res=t;delete n.onCreate};const o=t.toJSON(r,n);if(n.onCreate)n.onCreate(o);return o}if(typeof t==="bigint"&&!n?.keep)return Number(t);return t}r.toJS=toJS},9027:(t,r,n)=>{var s=n(9485);var i=n(7578);var o=n(4236);var a=n(6226);function resolveAsScalar(t,r=true,n){if(t){const _onError=(t,r,s)=>{const i=typeof t==="number"?t:Array.isArray(t)?t[0]:t.offset;if(n)n(i,r,s);else throw new o.YAMLParseError([i,i+1],r,s)};switch(t.type){case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return i.resolveFlowScalar(t,r,_onError);case"block-scalar":return s.resolveBlockScalar(t,r,_onError)}}return null}function createScalarToken(t,r){const{implicitKey:n=false,indent:s,inFlow:i=false,offset:o=-1,type:l="PLAIN"}=r;const c=a.stringifyString({type:l,value:t},{implicitKey:n,indent:s>0?" ".repeat(s):"",inFlow:i,options:{blockQuote:true,lineWidth:-1}});const u=r.end??[{type:"newline",offset:-1,indent:s,source:"\n"}];switch(c[0]){case"|":case">":{const t=c.indexOf("\n");const r=c.substring(0,t);const n=c.substring(t+1)+"\n";const i=[{type:"block-scalar-header",offset:o,indent:s,source:r}];if(!addEndtoBlockProps(i,u))i.push({type:"newline",offset:-1,indent:s,source:"\n"});return{type:"block-scalar",offset:o,indent:s,props:i,source:n}}case'"':return{type:"double-quoted-scalar",offset:o,indent:s,source:c,end:u};case"'":return{type:"single-quoted-scalar",offset:o,indent:s,source:c,end:u};default:return{type:"scalar",offset:o,indent:s,source:c,end:u}}}function setScalarValue(t,r,n={}){let{afterKey:s=false,implicitKey:i=false,inFlow:o=false,type:l}=n;let c="indent"in t?t.indent:null;if(s&&typeof c==="number")c+=2;if(!l)switch(t.type){case"single-quoted-scalar":l="QUOTE_SINGLE";break;case"double-quoted-scalar":l="QUOTE_DOUBLE";break;case"block-scalar":{const r=t.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");l=r.source[0]===">"?"BLOCK_FOLDED":"BLOCK_LITERAL";break}default:l="PLAIN"}const u=a.stringifyString({type:l,value:r},{implicitKey:i||c===null,indent:c!==null&&c>0?" ".repeat(c):"",inFlow:o,options:{blockQuote:true,lineWidth:-1}});switch(u[0]){case"|":case">":setBlockScalarValue(t,u);break;case'"':setFlowScalarValue(t,u,"double-quoted-scalar");break;case"'":setFlowScalarValue(t,u,"single-quoted-scalar");break;default:setFlowScalarValue(t,u,"scalar")}}function setBlockScalarValue(t,r){const n=r.indexOf("\n");const s=r.substring(0,n);const i=r.substring(n+1)+"\n";if(t.type==="block-scalar"){const r=t.props[0];if(r.type!=="block-scalar-header")throw new Error("Invalid block scalar header");r.source=s;t.source=i}else{const{offset:r}=t;const n="indent"in t?t.indent:-1;const o=[{type:"block-scalar-header",offset:r,indent:n,source:s}];if(!addEndtoBlockProps(o,"end"in t?t.end:undefined))o.push({type:"newline",offset:-1,indent:n,source:"\n"});for(const r of Object.keys(t))if(r!=="type"&&r!=="offset")delete t[r];Object.assign(t,{type:"block-scalar",indent:n,props:o,source:i})}}function addEndtoBlockProps(t,r){if(r)for(const n of r)switch(n.type){case"space":case"comment":t.push(n);break;case"newline":t.push(n);return true}return false}function setFlowScalarValue(t,r,n){switch(t.type){case"scalar":case"double-quoted-scalar":case"single-quoted-scalar":t.type=n;t.source=r;break;case"block-scalar":{const s=t.props.slice(1);let i=r.length;if(t.props[0].type==="block-scalar-header")i-=t.props[0].source.length;for(const t of s)t.offset+=i;delete t.props;Object.assign(t,{type:n,source:r,end:s});break}case"block-map":case"block-seq":{const s=t.offset+r.length;const i={type:"newline",offset:s,indent:t.indent,source:"\n"};delete t.items;Object.assign(t,{type:n,source:r,end:[i]});break}default:{const s="indent"in t?t.indent:-1;const i="end"in t&&Array.isArray(t.end)?t.end.filter((t=>t.type==="space"||t.type==="comment"||t.type==="newline")):[];for(const r of Object.keys(t))if(r!=="type"&&r!=="offset")delete t[r];Object.assign(t,{type:n,indent:s,source:r,end:i})}}}r.createScalarToken=createScalarToken;r.resolveAsScalar=resolveAsScalar;r.setScalarValue=setScalarValue},6307:(t,r)=>{const stringify=t=>"type"in t?stringifyToken(t):stringifyItem(t);function stringifyToken(t){switch(t.type){case"block-scalar":{let r="";for(const n of t.props)r+=stringifyToken(n);return r+t.source}case"block-map":case"block-seq":{let r="";for(const n of t.items)r+=stringifyItem(n);return r}case"flow-collection":{let r=t.start.source;for(const n of t.items)r+=stringifyItem(n);for(const n of t.end)r+=n.source;return r}case"document":{let r=stringifyItem(t);if(t.end)for(const n of t.end)r+=n.source;return r}default:{let r=t.source;if("end"in t&&t.end)for(const n of t.end)r+=n.source;return r}}}function stringifyItem({start:t,key:r,sep:n,value:s}){let i="";for(const r of t)i+=r.source;if(r)i+=stringifyToken(r);if(n)for(const t of n)i+=t.source;if(s)i+=stringifyToken(s);return i}r.stringify=stringify},8497:(t,r)=>{const n=Symbol("break visit");const s=Symbol("skip children");const i=Symbol("remove item");function visit(t,r){if("type"in t&&t.type==="document")t={start:t.start,value:t.value};_visit(Object.freeze([]),t,r)}visit.BREAK=n;visit.SKIP=s;visit.REMOVE=i;visit.itemAtPath=(t,r)=>{let n=t;for(const[t,s]of r){const r=n?.[t];if(r&&"items"in r){n=r.items[s]}else return undefined}return n};visit.parentCollection=(t,r)=>{const n=visit.itemAtPath(t,r.slice(0,-1));const s=r[r.length-1][0];const i=n?.[s];if(i&&"items"in i)return i;throw new Error("Parent collection not found")};function _visit(t,r,s){let o=s(r,t);if(typeof o==="symbol")return o;for(const a of["key","value"]){const l=r[a];if(l&&"items"in l){for(let r=0;r<l.items.length;++r){const o=_visit(Object.freeze(t.concat([[a,r]])),l.items[r],s);if(typeof o==="number")r=o-1;else if(o===n)return n;else if(o===i){l.items.splice(r,1);r-=1}}if(typeof o==="function"&&a==="key")o=o(r,t)}}return typeof o==="function"?o(r,t):o}r.visit=visit},9169:(t,r,n)=>{var s=n(9027);var i=n(6307);var o=n(8497);const a="\ufeff";const l="";const c="";const u="";const isCollection=t=>!!t&&"items"in t;const isScalar=t=>!!t&&(t.type==="scalar"||t.type==="single-quoted-scalar"||t.type==="double-quoted-scalar"||t.type==="block-scalar");function prettyToken(t){switch(t){case a:return"<BOM>";case l:return"<DOC>";case c:return"<FLOW_END>";case u:return"<SCALAR>";default:return JSON.stringify(t)}}function tokenType(t){switch(t){case a:return"byte-order-mark";case l:return"doc-mode";case c:return"flow-error-end";case u:return"scalar";case"---":return"doc-start";case"...":return"doc-end";case"":case"\n":case"\r\n":return"newline";case"-":return"seq-item-ind";case"?":return"explicit-key-ind";case":":return"map-value-ind";case"{":return"flow-map-start";case"}":return"flow-map-end";case"[":return"flow-seq-start";case"]":return"flow-seq-end";case",":return"comma"}switch(t[0]){case" ":case"\t":return"space";case"#":return"comment";case"%":return"directive-line";case"*":return"alias";case"&":return"anchor";case"!":return"tag";case"'":return"single-quoted-scalar";case'"':return"double-quoted-scalar";case"|":case">":return"block-scalar-header"}return null}r.createScalarToken=s.createScalarToken;r.resolveAsScalar=s.resolveAsScalar;r.setScalarValue=s.setScalarValue;r.stringify=i.stringify;r.visit=o.visit;r.BOM=a;r.DOCUMENT=l;r.FLOW_END=c;r.SCALAR=u;r.isCollection=isCollection;r.isScalar=isScalar;r.prettyToken=prettyToken;r.tokenType=tokenType},5976:(t,r,n)=>{var s=n(9169);function isEmpty(t){switch(t){case undefined:case" ":case"\n":case"\r":case"\t":return true;default:return false}}const i="0123456789ABCDEFabcdef".split("");const o="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-#;/?:@&=+$_.!~*'()".split("");const a=",[]{}".split("");const l=" ,[]{}\n\r\t".split("");const isNotAnchorChar=t=>!t||l.includes(t);class Lexer{constructor(){this.atEnd=false;this.blockScalarIndent=-1;this.blockScalarKeep=false;this.buffer="";this.flowKey=false;this.flowLevel=0;this.indentNext=0;this.indentValue=0;this.lineEndPos=null;this.next=null;this.pos=0}*lex(t,r=false){if(t){this.buffer=this.buffer?this.buffer+t:t;this.lineEndPos=null}this.atEnd=!r;let n=this.next??"stream";while(n&&(r||this.hasChars(1)))n=yield*this.parseNext(n)}atLineEnd(){let t=this.pos;let r=this.buffer[t];while(r===" "||r==="\t")r=this.buffer[++t];if(!r||r==="#"||r==="\n")return true;if(r==="\r")return this.buffer[t+1]==="\n";return false}charAt(t){return this.buffer[this.pos+t]}continueScalar(t){let r=this.buffer[t];if(this.indentNext>0){let n=0;while(r===" ")r=this.buffer[++n+t];if(r==="\r"){const r=this.buffer[n+t+1];if(r==="\n"||!r&&!this.atEnd)return t+n+1}return r==="\n"||n>=this.indentNext||!r&&!this.atEnd?t+n:-1}if(r==="-"||r==="."){const r=this.buffer.substr(t,3);if((r==="---"||r==="...")&&isEmpty(this.buffer[t+3]))return-1}return t}getLine(){let t=this.lineEndPos;if(typeof t!=="number"||t!==-1&&t<this.pos){t=this.buffer.indexOf("\n",this.pos);this.lineEndPos=t}if(t===-1)return this.atEnd?this.buffer.substring(this.pos):null;if(this.buffer[t-1]==="\r")t-=1;return this.buffer.substring(this.pos,t)}hasChars(t){return this.pos+t<=this.buffer.length}setNext(t){this.buffer=this.buffer.substring(this.pos);this.pos=0;this.lineEndPos=null;this.next=t;return null}peek(t){return this.buffer.substr(this.pos,t)}*parseNext(t){switch(t){case"stream":return yield*this.parseStream();case"line-start":return yield*this.parseLineStart();case"block-start":return yield*this.parseBlockStart();case"doc":return yield*this.parseDocument();case"flow":return yield*this.parseFlowCollection();case"quoted-scalar":return yield*this.parseQuotedScalar();case"block-scalar":return yield*this.parseBlockScalar();case"plain-scalar":return yield*this.parsePlainScalar()}}*parseStream(){let t=this.getLine();if(t===null)return this.setNext("stream");if(t[0]===s.BOM){yield*this.pushCount(1);t=t.substring(1)}if(t[0]==="%"){let r=t.length;const n=t.indexOf("#");if(n!==-1){const s=t[n-1];if(s===" "||s==="\t")r=n-1}while(true){const n=t[r-1];if(n===" "||n==="\t")r-=1;else break}const s=(yield*this.pushCount(r))+(yield*this.pushSpaces(true));yield*this.pushCount(t.length-s);this.pushNewline();return"stream"}if(this.atLineEnd()){const r=yield*this.pushSpaces(true);yield*this.pushCount(t.length-r);yield*this.pushNewline();return"stream"}yield s.DOCUMENT;return yield*this.parseLineStart()}*parseLineStart(){const t=this.charAt(0);if(!t&&!this.atEnd)return this.setNext("line-start");if(t==="-"||t==="."){if(!this.atEnd&&!this.hasChars(4))return this.setNext("line-start");const t=this.peek(3);if(t==="---"&&isEmpty(this.charAt(3))){yield*this.pushCount(3);this.indentValue=0;this.indentNext=0;return"doc"}else if(t==="..."&&isEmpty(this.charAt(3))){yield*this.pushCount(3);return"stream"}}this.indentValue=yield*this.pushSpaces(false);if(this.indentNext>this.indentValue&&!isEmpty(this.charAt(1)))this.indentNext=this.indentValue;return yield*this.parseBlockStart()}*parseBlockStart(){const[t,r]=this.peek(2);if(!r&&!this.atEnd)return this.setNext("block-start");if((t==="-"||t==="?"||t===":")&&isEmpty(r)){const t=(yield*this.pushCount(1))+(yield*this.pushSpaces(true));this.indentNext=this.indentValue+1;this.indentValue+=t;return yield*this.parseBlockStart()}return"doc"}*parseDocument(){yield*this.pushSpaces(true);const t=this.getLine();if(t===null)return this.setNext("doc");let r=yield*this.pushIndicators();switch(t[r]){case"#":yield*this.pushCount(t.length-r);case undefined:yield*this.pushNewline();return yield*this.parseLineStart();case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel=1;return"flow";case"}":case"]":yield*this.pushCount(1);return"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"doc";case'"':case"'":return yield*this.parseQuotedScalar();case"|":case">":r+=(yield*this.parseBlockScalarHeader());r+=(yield*this.pushSpaces(true));yield*this.pushCount(t.length-r);yield*this.pushNewline();return yield*this.parseBlockScalar();default:return yield*this.parsePlainScalar()}}*parseFlowCollection(){let t,r;let n=-1;do{t=yield*this.pushNewline();if(t>0){r=yield*this.pushSpaces(false);this.indentValue=n=r}else{r=0}r+=(yield*this.pushSpaces(true))}while(t+r>0);const i=this.getLine();if(i===null)return this.setNext("flow");if(n!==-1&&n<this.indentNext&&i[0]!=="#"||n===0&&(i.startsWith("---")||i.startsWith("..."))&&isEmpty(i[3])){const t=n===this.indentNext-1&&this.flowLevel===1&&(i[0]==="]"||i[0]==="}");if(!t){this.flowLevel=0;yield s.FLOW_END;return yield*this.parseLineStart()}}let o=0;while(i[o]===","){o+=(yield*this.pushCount(1));o+=(yield*this.pushSpaces(true));this.flowKey=false}o+=(yield*this.pushIndicators());switch(i[o]){case undefined:return"flow";case"#":yield*this.pushCount(i.length-o);return"flow";case"{":case"[":yield*this.pushCount(1);this.flowKey=false;this.flowLevel+=1;return"flow";case"}":case"]":yield*this.pushCount(1);this.flowKey=true;this.flowLevel-=1;return this.flowLevel?"flow":"doc";case"*":yield*this.pushUntil(isNotAnchorChar);return"flow";case'"':case"'":this.flowKey=true;return yield*this.parseQuotedScalar();case":":{const t=this.charAt(1);if(this.flowKey||isEmpty(t)||t===","){this.flowKey=false;yield*this.pushCount(1);yield*this.pushSpaces(true);return"flow"}}default:this.flowKey=false;return yield*this.parsePlainScalar()}}*parseQuotedScalar(){const t=this.charAt(0);let r=this.buffer.indexOf(t,this.pos+1);if(t==="'"){while(r!==-1&&this.buffer[r+1]==="'")r=this.buffer.indexOf("'",r+2)}else{while(r!==-1){let t=0;while(this.buffer[r-1-t]==="\\")t+=1;if(t%2===0)break;r=this.buffer.indexOf('"',r+1)}}const n=this.buffer.substring(0,r);let s=n.indexOf("\n",this.pos);if(s!==-1){while(s!==-1){const t=this.continueScalar(s+1);if(t===-1)break;s=n.indexOf("\n",t)}if(s!==-1){r=s-(n[s-1]==="\r"?2:1)}}if(r===-1){if(!this.atEnd)return this.setNext("quoted-scalar");r=this.buffer.length}yield*this.pushToIndex(r+1,false);return this.flowLevel?"flow":"doc"}*parseBlockScalarHeader(){this.blockScalarIndent=-1;this.blockScalarKeep=false;let t=this.pos;while(true){const r=this.buffer[++t];if(r==="+")this.blockScalarKeep=true;else if(r>"0"&&r<="9")this.blockScalarIndent=Number(r)-1;else if(r!=="-")break}return yield*this.pushUntil((t=>isEmpty(t)||t==="#"))}*parseBlockScalar(){let t=this.pos-1;let r=0;let n;e:for(let s=this.pos;n=this.buffer[s];++s){switch(n){case" ":r+=1;break;case"\n":t=s;r=0;break;case"\r":{const t=this.buffer[s+1];if(!t&&!this.atEnd)return this.setNext("block-scalar");if(t==="\n")break}default:break e}}if(!n&&!this.atEnd)return this.setNext("block-scalar");if(r>=this.indentNext){if(this.blockScalarIndent===-1)this.indentNext=r;else this.indentNext+=this.blockScalarIndent;do{const r=this.continueScalar(t+1);if(r===-1)break;t=this.buffer.indexOf("\n",r)}while(t!==-1);if(t===-1){if(!this.atEnd)return this.setNext("block-scalar");t=this.buffer.length}}if(!this.blockScalarKeep){do{let n=t-1;let s=this.buffer[n];if(s==="\r")s=this.buffer[--n];const i=n;while(s===" "||s==="\t")s=this.buffer[--n];if(s==="\n"&&n>=this.pos&&n+1+r>i)t=n;else break}while(true)}yield s.SCALAR;yield*this.pushToIndex(t+1,true);return yield*this.parseLineStart()}*parsePlainScalar(){const t=this.flowLevel>0;let r=this.pos-1;let n=this.pos-1;let i;while(i=this.buffer[++n]){if(i===":"){const s=this.buffer[n+1];if(isEmpty(s)||t&&s===",")break;r=n}else if(isEmpty(i)){let s=this.buffer[n+1];if(i==="\r"){if(s==="\n"){n+=1;i="\n";s=this.buffer[n+1]}else r=n}if(s==="#"||t&&a.includes(s))break;if(i==="\n"){const t=this.continueScalar(n+1);if(t===-1)break;n=Math.max(n,t-2)}}else{if(t&&a.includes(i))break;r=n}}if(!i&&!this.atEnd)return this.setNext("plain-scalar");yield s.SCALAR;yield*this.pushToIndex(r+1,true);return t?"flow":"doc"}*pushCount(t){if(t>0){yield this.buffer.substr(this.pos,t);this.pos+=t;return t}return 0}*pushToIndex(t,r){const n=this.buffer.slice(this.pos,t);if(n){yield n;this.pos+=n.length;return n.length}else if(r)yield"";return 0}*pushIndicators(){switch(this.charAt(0)){case"!":return(yield*this.pushTag())+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"&":return(yield*this.pushUntil(isNotAnchorChar))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators());case"-":case"?":case":":{const t=this.flowLevel>0;const r=this.charAt(1);if(isEmpty(r)||t&&a.includes(r)){if(!t)this.indentNext=this.indentValue+1;else if(this.flowKey)this.flowKey=false;return(yield*this.pushCount(1))+(yield*this.pushSpaces(true))+(yield*this.pushIndicators())}}}return 0}*pushTag(){if(this.charAt(1)==="<"){let t=this.pos+2;let r=this.buffer[t];while(!isEmpty(r)&&r!==">")r=this.buffer[++t];return yield*this.pushToIndex(r===">"?t+1:t,false)}else{let t=this.pos+1;let r=this.buffer[t];while(r){if(o.includes(r))r=this.buffer[++t];else if(r==="%"&&i.includes(this.buffer[t+1])&&i.includes(this.buffer[t+2])){r=this.buffer[t+=3]}else break}return yield*this.pushToIndex(t,false)}}*pushNewline(){const t=this.buffer[this.pos];if(t==="\n")return yield*this.pushCount(1);else if(t==="\r"&&this.charAt(1)==="\n")return yield*this.pushCount(2);else return 0}*pushSpaces(t){let r=this.pos-1;let n;do{n=this.buffer[++r]}while(n===" "||t&&n==="\t");const s=r-this.pos;if(s>0){yield this.buffer.substr(this.pos,s);this.pos=r}return s}*pushUntil(t){let r=this.pos;let n=this.buffer[r];while(!t(n))n=this.buffer[++r];return yield*this.pushToIndex(r,false)}}r.Lexer=Lexer},1929:(t,r)=>{class LineCounter{constructor(){this.lineStarts=[];this.addNewLine=t=>this.lineStarts.push(t);this.linePos=t=>{let r=0;let n=this.lineStarts.length;while(r<n){const s=r+n>>1;if(this.lineStarts[s]<t)r=s+1;else n=s}if(this.lineStarts[r]===t)return{line:r+1,col:1};if(r===0)return{line:0,col:t};const s=this.lineStarts[r-1];return{line:r,col:t-s+1}}}}r.LineCounter=LineCounter},3328:(t,r,n)=>{var s=n(9169);var i=n(5976);function includesToken(t,r){for(let n=0;n<t.length;++n)if(t[n].type===r)return true;return false}function findNonEmptyIndex(t){for(let r=0;r<t.length;++r){switch(t[r].type){case"space":case"comment":case"newline":break;default:return r}}return-1}function isFlowToken(t){switch(t?.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":case"flow-collection":return true;default:return false}}function getPrevProps(t){switch(t.type){case"document":return t.start;case"block-map":{const r=t.items[t.items.length-1];return r.sep??r.start}case"block-seq":return t.items[t.items.length-1].start;default:return[]}}function getFirstKeyStartProps(t){if(t.length===0)return[];let r=t.length;e:while(--r>=0){switch(t[r].type){case"doc-start":case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":case"newline":break e}}while(t[++r]?.type==="space"){}return t.splice(r,t.length)}function fixFlowSeqItems(t){if(t.start.type==="flow-seq-start"){for(const r of t.items){if(r.sep&&!r.value&&!includesToken(r.start,"explicit-key-ind")&&!includesToken(r.sep,"map-value-ind")){if(r.key)r.value=r.key;delete r.key;if(isFlowToken(r.value)){if(r.value.end)Array.prototype.push.apply(r.value.end,r.sep);else r.value.end=r.sep}else Array.prototype.push.apply(r.start,r.sep);delete r.sep}}}}class Parser{constructor(t){this.atNewLine=true;this.atScalar=false;this.indent=0;this.offset=0;this.onKeyLine=false;this.stack=[];this.source="";this.type="";this.lexer=new i.Lexer;this.onNewLine=t}*parse(t,r=false){if(this.onNewLine&&this.offset===0)this.onNewLine(0);for(const n of this.lexer.lex(t,r))yield*this.next(n);if(!r)yield*this.end()}*next(t){this.source=t;if(process.env.LOG_TOKENS)console.log("|",s.prettyToken(t));if(this.atScalar){this.atScalar=false;yield*this.step();this.offset+=t.length;return}const r=s.tokenType(t);if(!r){const r=`Not a YAML token: ${t}`;yield*this.pop({type:"error",offset:this.offset,message:r,source:t});this.offset+=t.length}else if(r==="scalar"){this.atNewLine=false;this.atScalar=true;this.type="scalar"}else{this.type=r;yield*this.step();switch(r){case"newline":this.atNewLine=true;this.indent=0;if(this.onNewLine)this.onNewLine(this.offset+t.length);break;case"space":if(this.atNewLine&&t[0]===" ")this.indent+=t.length;break;case"explicit-key-ind":case"map-value-ind":case"seq-item-ind":if(this.atNewLine)this.indent+=t.length;break;case"doc-mode":case"flow-error-end":return;default:this.atNewLine=false}this.offset+=t.length}}*end(){while(this.stack.length>0)yield*this.pop()}get sourceToken(){const t={type:this.type,offset:this.offset,indent:this.indent,source:this.source};return t}*step(){const t=this.peek(1);if(this.type==="doc-end"&&(!t||t.type!=="doc-end")){while(this.stack.length>0)yield*this.pop();this.stack.push({type:"doc-end",offset:this.offset,source:this.source});return}if(!t)return yield*this.stream();switch(t.type){case"document":return yield*this.document(t);case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return yield*this.scalar(t);case"block-scalar":return yield*this.blockScalar(t);case"block-map":return yield*this.blockMap(t);case"block-seq":return yield*this.blockSequence(t);case"flow-collection":return yield*this.flowCollection(t);case"doc-end":return yield*this.documentEnd(t)}yield*this.pop()}peek(t){return this.stack[this.stack.length-t]}*pop(t){const r=t??this.stack.pop();if(!r){const t="Tried to pop an empty stack";yield{type:"error",offset:this.offset,source:"",message:t}}else if(this.stack.length===0){yield r}else{const t=this.peek(1);if(r.type==="block-scalar"){r.indent="indent"in t?t.indent:0}else if(r.type==="flow-collection"&&t.type==="document"){r.indent=0}if(r.type==="flow-collection")fixFlowSeqItems(r);switch(t.type){case"document":t.value=r;break;case"block-scalar":t.props.push(r);break;case"block-map":{const n=t.items[t.items.length-1];if(n.value){t.items.push({start:[],key:r,sep:[]});this.onKeyLine=true;return}else if(n.sep){n.value=r}else{Object.assign(n,{key:r,sep:[]});this.onKeyLine=!includesToken(n.start,"explicit-key-ind");return}break}case"block-seq":{const n=t.items[t.items.length-1];if(n.value)t.items.push({start:[],value:r});else n.value=r;break}case"flow-collection":{const n=t.items[t.items.length-1];if(!n||n.value)t.items.push({start:[],key:r,sep:[]});else if(n.sep)n.value=r;else Object.assign(n,{key:r,sep:[]});return}default:yield*this.pop();yield*this.pop(r)}if((t.type==="document"||t.type==="block-map"||t.type==="block-seq")&&(r.type==="block-map"||r.type==="block-seq")){const n=r.items[r.items.length-1];if(n&&!n.sep&&!n.value&&n.start.length>0&&findNonEmptyIndex(n.start)===-1&&(r.indent===0||n.start.every((t=>t.type!=="comment"||t.indent<r.indent)))){if(t.type==="document")t.end=n.start;else t.items.push({start:n.start});r.items.splice(-1,1)}}}}*stream(){switch(this.type){case"directive-line":yield{type:"directive",offset:this.offset,source:this.source};return;case"byte-order-mark":case"space":case"comment":case"newline":yield this.sourceToken;return;case"doc-mode":case"doc-start":{const t={type:"document",offset:this.offset,start:[]};if(this.type==="doc-start")t.start.push(this.sourceToken);this.stack.push(t);return}}yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML stream`,source:this.source}}*document(t){if(t.value)return yield*this.lineEnd(t);switch(this.type){case"doc-start":{if(findNonEmptyIndex(t.start)!==-1){yield*this.pop();yield*this.step()}else t.start.push(this.sourceToken);return}case"anchor":case"tag":case"space":case"comment":case"newline":t.start.push(this.sourceToken);return}const r=this.startBlockValue(t);if(r)this.stack.push(r);else{yield{type:"error",offset:this.offset,message:`Unexpected ${this.type} token in YAML document`,source:this.source}}}*scalar(t){if(this.type==="map-value-ind"){const r=getPrevProps(this.peek(2));const n=getFirstKeyStartProps(r);let s;if(t.end){s=t.end;s.push(this.sourceToken);delete t.end}else s=[this.sourceToken];const i={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:n,key:t,sep:s}]};this.onKeyLine=true;this.stack[this.stack.length-1]=i}else yield*this.lineEnd(t)}*blockScalar(t){switch(this.type){case"space":case"comment":case"newline":t.props.push(this.sourceToken);return;case"scalar":t.source=this.source;this.atNewLine=true;this.indent=0;if(this.onNewLine){let t=this.source.indexOf("\n")+1;while(t!==0){this.onNewLine(this.offset+t);t=this.source.indexOf("\n",t)+1}}yield*this.pop();break;default:yield*this.pop();yield*this.step()}}*blockMap(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":this.onKeyLine=false;if(r.value){const n="end"in r.value?r.value.end:undefined;const s=Array.isArray(n)?n[n.length-1]:undefined;if(s?.type==="comment")n?.push(this.sourceToken);else t.items.push({start:[this.sourceToken]})}else if(r.sep){r.sep.push(this.sourceToken)}else{r.start.push(this.sourceToken)}return;case"space":case"comment":if(r.value){t.items.push({start:[this.sourceToken]})}else if(r.sep){r.sep.push(this.sourceToken)}else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2];const s=n?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,r.start);s.push(this.sourceToken);t.items.pop();return}}r.start.push(this.sourceToken)}return}if(this.indent>=t.indent){const n=!this.onKeyLine&&this.indent===t.indent&&r.sep;let s=[];if(n&&r.sep&&!r.value){const n=[];for(let s=0;s<r.sep.length;++s){const i=r.sep[s];switch(i.type){case"newline":n.push(s);break;case"space":break;case"comment":if(i.indent>t.indent)n.length=0;break;default:n.length=0}}if(n.length>=2)s=r.sep.splice(n[1])}switch(this.type){case"anchor":case"tag":if(n||r.value){s.push(this.sourceToken);t.items.push({start:s});this.onKeyLine=true}else if(r.sep){r.sep.push(this.sourceToken)}else{r.start.push(this.sourceToken)}return;case"explicit-key-ind":if(!r.sep&&!includesToken(r.start,"explicit-key-ind")){r.start.push(this.sourceToken)}else if(n||r.value){s.push(this.sourceToken);t.items.push({start:s})}else{this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]})}this.onKeyLine=true;return;case"map-value-ind":if(includesToken(r.start,"explicit-key-ind")){if(!r.sep){if(includesToken(r.start,"newline")){Object.assign(r,{key:null,sep:[this.sourceToken]})}else{const t=getFirstKeyStartProps(r.start);this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:null,sep:[this.sourceToken]}]})}}else if(r.value){t.items.push({start:[],key:null,sep:[this.sourceToken]})}else if(includesToken(r.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:s,key:null,sep:[this.sourceToken]}]})}else if(isFlowToken(r.key)&&!includesToken(r.sep,"newline")){const t=getFirstKeyStartProps(r.start);const n=r.key;const s=r.sep;s.push(this.sourceToken);delete r.key,delete r.sep;this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:t,key:n,sep:s}]})}else if(s.length>0){r.sep=r.sep.concat(s,this.sourceToken)}else{r.sep.push(this.sourceToken)}}else{if(!r.sep){Object.assign(r,{key:null,sep:[this.sourceToken]})}else if(r.value||n){t.items.push({start:s,key:null,sep:[this.sourceToken]})}else if(includesToken(r.sep,"map-value-ind")){this.stack.push({type:"block-map",offset:this.offset,indent:this.indent,items:[{start:[],key:null,sep:[this.sourceToken]}]})}else{r.sep.push(this.sourceToken)}}this.onKeyLine=true;return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const i=this.flowScalar(this.type);if(n||r.value){t.items.push({start:s,key:i,sep:[]});this.onKeyLine=true}else if(r.sep){this.stack.push(i)}else{Object.assign(r,{key:i,sep:[]});this.onKeyLine=true}return}default:{const i=this.startBlockValue(t);if(i){if(n&&i.type!=="block-seq"&&includesToken(r.start,"explicit-key-ind")){t.items.push({start:s})}this.stack.push(i);return}}}}yield*this.pop();yield*this.step()}*blockSequence(t){const r=t.items[t.items.length-1];switch(this.type){case"newline":if(r.value){const n="end"in r.value?r.value.end:undefined;const s=Array.isArray(n)?n[n.length-1]:undefined;if(s?.type==="comment")n?.push(this.sourceToken);else t.items.push({start:[this.sourceToken]})}else r.start.push(this.sourceToken);return;case"space":case"comment":if(r.value)t.items.push({start:[this.sourceToken]});else{if(this.atIndentedComment(r.start,t.indent)){const n=t.items[t.items.length-2];const s=n?.value?.end;if(Array.isArray(s)){Array.prototype.push.apply(s,r.start);s.push(this.sourceToken);t.items.pop();return}}r.start.push(this.sourceToken)}return;case"anchor":case"tag":if(r.value||this.indent<=t.indent)break;r.start.push(this.sourceToken);return;case"seq-item-ind":if(this.indent!==t.indent)break;if(r.value||includesToken(r.start,"seq-item-ind"))t.items.push({start:[this.sourceToken]});else r.start.push(this.sourceToken);return}if(this.indent>t.indent){const r=this.startBlockValue(t);if(r){this.stack.push(r);return}}yield*this.pop();yield*this.step()}*flowCollection(t){const r=t.items[t.items.length-1];if(this.type==="flow-error-end"){let t;do{yield*this.pop();t=this.peek(1)}while(t&&t.type==="flow-collection")}else if(t.end.length===0){switch(this.type){case"comma":case"explicit-key-ind":if(!r||r.sep)t.items.push({start:[this.sourceToken]});else r.start.push(this.sourceToken);return;case"map-value-ind":if(!r||r.value)t.items.push({start:[],key:null,sep:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else Object.assign(r,{key:null,sep:[this.sourceToken]});return;case"space":case"comment":case"newline":case"anchor":case"tag":if(!r||r.value)t.items.push({start:[this.sourceToken]});else if(r.sep)r.sep.push(this.sourceToken);else r.start.push(this.sourceToken);return;case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":{const n=this.flowScalar(this.type);if(!r||r.value)t.items.push({start:[],key:n,sep:[]});else if(r.sep)this.stack.push(n);else Object.assign(r,{key:n,sep:[]});return}case"flow-map-end":case"flow-seq-end":t.end.push(this.sourceToken);return}const n=this.startBlockValue(t);if(n)this.stack.push(n);else{yield*this.pop();yield*this.step()}}else{const r=this.peek(2);if(r.type==="block-map"&&(this.type==="map-value-ind"&&r.indent===t.indent||this.type==="newline"&&!r.items[r.items.length-1].sep)){yield*this.pop();yield*this.step()}else if(this.type==="map-value-ind"&&r.type!=="flow-collection"){const n=getPrevProps(r);const s=getFirstKeyStartProps(n);fixFlowSeqItems(t);const i=t.end.splice(1,t.end.length);i.push(this.sourceToken);const o={type:"block-map",offset:t.offset,indent:t.indent,items:[{start:s,key:t,sep:i}]};this.onKeyLine=true;this.stack[this.stack.length-1]=o}else{yield*this.lineEnd(t)}}}flowScalar(t){if(this.onNewLine){let t=this.source.indexOf("\n")+1;while(t!==0){this.onNewLine(this.offset+t);t=this.source.indexOf("\n",t)+1}}return{type:t,offset:this.offset,indent:this.indent,source:this.source}}startBlockValue(t){switch(this.type){case"alias":case"scalar":case"single-quoted-scalar":case"double-quoted-scalar":return this.flowScalar(this.type);case"block-scalar-header":return{type:"block-scalar",offset:this.offset,indent:this.indent,props:[this.sourceToken],source:""};case"flow-map-start":case"flow-seq-start":return{type:"flow-collection",offset:this.offset,indent:this.indent,start:this.sourceToken,items:[],end:[]};case"seq-item-ind":return{type:"block-seq",offset:this.offset,indent:this.indent,items:[{start:[this.sourceToken]}]};case"explicit-key-ind":{this.onKeyLine=true;const r=getPrevProps(t);const n=getFirstKeyStartProps(r);n.push(this.sourceToken);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n}]}}case"map-value-ind":{this.onKeyLine=true;const r=getPrevProps(t);const n=getFirstKeyStartProps(r);return{type:"block-map",offset:this.offset,indent:this.indent,items:[{start:n,key:null,sep:[this.sourceToken]}]}}}return null}atIndentedComment(t,r){if(this.type!=="comment")return false;if(this.indent<=r)return false;return t.every((t=>t.type==="newline"||t.type==="space"))}*documentEnd(t){if(this.type!=="doc-mode"){if(t.end)t.end.push(this.sourceToken);else t.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}*lineEnd(t){switch(this.type){case"comma":case"doc-start":case"doc-end":case"flow-seq-end":case"flow-map-end":case"map-value-ind":yield*this.pop();yield*this.step();break;case"newline":this.onKeyLine=false;case"space":case"comment":default:if(t.end)t.end.push(this.sourceToken);else t.end=[this.sourceToken];if(this.type==="newline")yield*this.pop()}}}r.Parser=Parser},8649:(t,r,n)=>{var s=n(9493);var i=n(42);var o=n(4236);var a=n(6909);var l=n(1929);var c=n(3328);function parseOptions(t){const r=t.prettyErrors!==false;const n=t.lineCounter||r&&new l.LineCounter||null;return{lineCounter:n,prettyErrors:r}}function parseAllDocuments(t,r={}){const{lineCounter:n,prettyErrors:i}=parseOptions(r);const a=new c.Parser(n?.addNewLine);const l=new s.Composer(r);const u=Array.from(l.compose(a.parse(t)));if(i&&n)for(const r of u){r.errors.forEach(o.prettifyError(t,n));r.warnings.forEach(o.prettifyError(t,n))}if(u.length>0)return u;return Object.assign([],{empty:true},l.streamInfo())}function parseDocument(t,r={}){const{lineCounter:n,prettyErrors:i}=parseOptions(r);const a=new c.Parser(n?.addNewLine);const l=new s.Composer(r);let u=null;for(const r of l.compose(a.parse(t),true,t.length)){if(!u)u=r;else if(u.options.logLevel!=="silent"){u.errors.push(new o.YAMLParseError(r.range.slice(0,2),"MULTIPLE_DOCS","Source contains multiple documents; please use YAML.parseAllDocuments()"));break}}if(i&&n){u.errors.forEach(o.prettifyError(t,n));u.warnings.forEach(o.prettifyError(t,n))}return u}function parse(t,r,n){let s=undefined;if(typeof r==="function"){s=r}else if(n===undefined&&r&&typeof r==="object"){n=r}const i=parseDocument(t,n);if(!i)return null;i.warnings.forEach((t=>a.warn(i.options.logLevel,t)));if(i.errors.length>0){if(i.options.logLevel!=="silent")throw i.errors[0];else i.errors=[]}return i.toJS(Object.assign({reviver:s},n))}function stringify(t,r,n){let s=null;if(typeof r==="function"||Array.isArray(r)){s=r}else if(n===undefined&&r){n=r}if(typeof n==="string")n=n.length;if(typeof n==="number"){const t=Math.round(n);n=t<1?undefined:t>8?{indent:8}:{indent:t}}if(t===undefined){const{keepUndefined:t}=n??r??{};if(!t)return undefined}return new i.Document(t,s,n).toString(n)}r.parse=parse;r.parseAllDocuments=parseAllDocuments;r.parseDocument=parseDocument;r.stringify=stringify},6831:(t,r,n)=>{var s=n(5589);var i=n(83);var o=n(1693);var a=n(2201);var l=n(4138);const sortMapEntriesByKey=(t,r)=>t.key<r.key?-1:t.key>r.key?1:0;class Schema{constructor({compat:t,customTags:r,merge:n,resolveKnownTags:c,schema:u,sortMapEntries:d,toStringDefaults:p}){this.compat=Array.isArray(t)?l.getTags(t,"compat"):t?l.getTags(null,t):null;this.merge=!!n;this.name=typeof u==="string"&&u||"core";this.knownTags=c?l.coreKnownTags:{};this.tags=l.getTags(r,this.name);this.toStringOptions=p??null;Object.defineProperty(this,s.MAP,{value:i.map});Object.defineProperty(this,s.SCALAR,{value:a.string});Object.defineProperty(this,s.SEQ,{value:o.seq});this.sortMapEntries=typeof d==="function"?d:d===true?sortMapEntriesByKey:null}clone(){const t=Object.create(Schema.prototype,Object.getOwnPropertyDescriptors(this));t.tags=this.tags.slice();return t}}r.Schema=Schema},83:(t,r,n)=>{var s=n(5589);var i=n(6011);const o={collection:"map",default:true,nodeClass:i.YAMLMap,tag:"tag:yaml.org,2002:map",resolve(t,r){if(!s.isMap(t))r("Expected a mapping for this tag");return t},createNode:(t,r,n)=>i.YAMLMap.from(t,r,n)};r.map=o},6703:(t,r,n)=>{var s=n(9338);const i={identify:t=>t==null,createNode:()=>new s.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^(?:~|[Nn]ull|NULL)?$/,resolve:()=>new s.Scalar(null),stringify:({source:t},r)=>typeof t==="string"&&i.test.test(t)?t:r.options.nullStr};r.nullTag=i},1693:(t,r,n)=>{var s=n(5589);var i=n(5161);const o={collection:"seq",default:true,nodeClass:i.YAMLSeq,tag:"tag:yaml.org,2002:seq",resolve(t,r){if(!s.isSeq(t))r("Expected a sequence for this tag");return t},createNode:(t,r,n)=>i.YAMLSeq.from(t,r,n)};r.seq=o},2201:(t,r,n)=>{var s=n(6226);const i={identify:t=>typeof t==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify(t,r,n,i){r=Object.assign({actualString:true},r);return s.stringifyString(t,r,n,i)}};r.string=i},2045:(t,r,n)=>{var s=n(9338);const i={identify:t=>typeof t==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:[Tt]rue|TRUE|[Ff]alse|FALSE)$/,resolve:t=>new s.Scalar(t[0]==="t"||t[0]==="T"),stringify({source:t,value:r},n){if(t&&i.test.test(t)){const n=t[0]==="t"||t[0]==="T";if(r===n)return t}return r?n.options.trueStr:n.options.falseStr}};r.boolTag=i},6810:(t,r,n)=>{var s=n(9338);var i=n(4174);const o={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^(?:[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN))$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber};const a={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:\.[0-9]+|[0-9]+(?:\.[0-9]*)?)[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t),stringify(t){const r=Number(t.value);return isFinite(r)?r.toExponential():i.stringifyNumber(t)}};const l={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:\.[0-9]+|[0-9]+\.[0-9]*)$/,resolve(t){const r=new s.Scalar(parseFloat(t));const n=t.indexOf(".");if(n!==-1&&t[t.length-1]==="0")r.minFractionDigits=t.length-n-1;return r},stringify:i.stringifyNumber};r.float=l;r.floatExp=a;r.floatNaN=o},3019:(t,r,n)=>{var s=n(4174);const intIdentify=t=>typeof t==="bigint"||Number.isInteger(t);const intResolve=(t,r,n,{intAsBigInt:s})=>s?BigInt(t):parseInt(t.substring(r),n);function intStringify(t,r,n){const{value:i}=t;if(intIdentify(i)&&i>=0)return n+i.toString(r);return s.stringifyNumber(t)}const i={identify:t=>intIdentify(t)&&t>=0,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^0o[0-7]+$/,resolve:(t,r,n)=>intResolve(t,2,8,n),stringify:t=>intStringify(t,8,"0o")};const o={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9]+$/,resolve:(t,r,n)=>intResolve(t,0,10,n),stringify:s.stringifyNumber};const a={identify:t=>intIdentify(t)&&t>=0,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^0x[0-9a-fA-F]+$/,resolve:(t,r,n)=>intResolve(t,2,16,n),stringify:t=>intStringify(t,16,"0x")};r.int=o;r.intHex=a;r.intOct=i},27:(t,r,n)=>{var s=n(83);var i=n(6703);var o=n(1693);var a=n(2201);var l=n(2045);var c=n(6810);var u=n(3019);const d=[s.map,o.seq,a.string,i.nullTag,l.boolTag,u.intOct,u.int,u.intHex,c.floatNaN,c.floatExp,c.float];r.schema=d},4545:(t,r,n)=>{var s=n(9338);var i=n(83);var o=n(1693);function intIdentify(t){return typeof t==="bigint"||Number.isInteger(t)}const stringifyJSON=({value:t})=>JSON.stringify(t);const a=[{identify:t=>typeof t==="string",default:true,tag:"tag:yaml.org,2002:str",resolve:t=>t,stringify:stringifyJSON},{identify:t=>t==null,createNode:()=>new s.Scalar(null),default:true,tag:"tag:yaml.org,2002:null",test:/^null$/,resolve:()=>null,stringify:stringifyJSON},{identify:t=>typeof t==="boolean",default:true,tag:"tag:yaml.org,2002:bool",test:/^true|false$/,resolve:t=>t==="true",stringify:stringifyJSON},{identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^-?(?:0|[1-9][0-9]*)$/,resolve:(t,r,{intAsBigInt:n})=>n?BigInt(t):parseInt(t,10),stringify:({value:t})=>intIdentify(t)?t.toString():JSON.stringify(t)},{identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^-?(?:0|[1-9][0-9]*)(?:\.[0-9]*)?(?:[eE][-+]?[0-9]+)?$/,resolve:t=>parseFloat(t),stringify:stringifyJSON}];const l={default:true,tag:"",test:/^/,resolve(t,r){r(`Unresolved plain scalar ${JSON.stringify(t)}`);return t}};const c=[i.map,o.seq].concat(a,l);r.schema=c},4138:(t,r,n)=>{var s=n(83);var i=n(6703);var o=n(1693);var a=n(2201);var l=n(2045);var c=n(6810);var u=n(3019);var d=n(27);var p=n(4545);var h=n(5724);var m=n(8974);var g=n(9841);var y=n(5389);var b=n(7847);var _=n(1156);const S=new Map([["core",d.schema],["failsafe",[s.map,o.seq,a.string]],["json",p.schema],["yaml11",y.schema],["yaml-1.1",y.schema]]);const E={binary:h.binary,bool:l.boolTag,float:c.float,floatExp:c.floatExp,floatNaN:c.floatNaN,floatTime:_.floatTime,int:u.int,intHex:u.intHex,intOct:u.intOct,intTime:_.intTime,map:s.map,null:i.nullTag,omap:m.omap,pairs:g.pairs,seq:o.seq,set:b.set,timestamp:_.timestamp};const v={"tag:yaml.org,2002:binary":h.binary,"tag:yaml.org,2002:omap":m.omap,"tag:yaml.org,2002:pairs":g.pairs,"tag:yaml.org,2002:set":b.set,"tag:yaml.org,2002:timestamp":_.timestamp};function getTags(t,r){let n=S.get(r);if(!n){if(Array.isArray(t))n=[];else{const t=Array.from(S.keys()).filter((t=>t!=="yaml11")).map((t=>JSON.stringify(t))).join(", ");throw new Error(`Unknown schema "${r}"; use one of ${t} or define customTags array`)}}if(Array.isArray(t)){for(const r of t)n=n.concat(r)}else if(typeof t==="function"){n=t(n.slice())}return n.map((t=>{if(typeof t!=="string")return t;const r=E[t];if(r)return r;const n=Object.keys(E).map((t=>JSON.stringify(t))).join(", ");throw new Error(`Unknown custom tag "${t}"; use one of ${n}`)}))}r.coreKnownTags=v;r.getTags=getTags},5724:(t,r,n)=>{var s=n(9338);var i=n(6226);const o={identify:t=>t instanceof Uint8Array,default:false,tag:"tag:yaml.org,2002:binary",resolve(t,r){if(typeof Buffer==="function"){return Buffer.from(t,"base64")}else if(typeof atob==="function"){const r=atob(t.replace(/[\n\r]/g,""));const n=new Uint8Array(r.length);for(let t=0;t<r.length;++t)n[t]=r.charCodeAt(t);return n}else{r("This environment does not support reading binary tags; either Buffer or atob is required");return t}},stringify({comment:t,type:r,value:n},o,a,l){const c=n;let u;if(typeof Buffer==="function"){u=c instanceof Buffer?c.toString("base64"):Buffer.from(c.buffer).toString("base64")}else if(typeof btoa==="function"){let t="";for(let r=0;r<c.length;++r)t+=String.fromCharCode(c[r]);u=btoa(t)}else{throw new Error("This environment does not support writing binary tags; either Buffer or btoa is required")}if(!r)r=s.Scalar.BLOCK_LITERAL;if(r!==s.Scalar.QUOTE_DOUBLE){const t=Math.max(o.options.lineWidth-o.indent.length,o.options.minContentWidth);const n=Math.ceil(u.length/t);const i=new Array(n);for(let r=0,s=0;r<n;++r,s+=t){i[r]=u.substr(s,t)}u=i.join(r===s.Scalar.BLOCK_LITERAL?"\n":" ")}return i.stringifyString({comment:t,type:r,value:u},o,a,l)}};r.binary=o},2631:(t,r,n)=>{var s=n(9338);function boolStringify({value:t,source:r},n){const s=t?i:o;if(r&&s.test.test(r))return r;return t?n.options.trueStr:n.options.falseStr}const i={identify:t=>t===true,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:Y|y|[Yy]es|YES|[Tt]rue|TRUE|[Oo]n|ON)$/,resolve:()=>new s.Scalar(true),stringify:boolStringify};const o={identify:t=>t===false,default:true,tag:"tag:yaml.org,2002:bool",test:/^(?:N|n|[Nn]o|NO|[Ff]alse|FALSE|[Oo]ff|OFF)$/i,resolve:()=>new s.Scalar(false),stringify:boolStringify};r.falseTag=o;r.trueTag=i},8035:(t,r,n)=>{var s=n(9338);var i=n(4174);const o={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?\.(?:inf|Inf|INF|nan|NaN|NAN)$/,resolve:t=>t.slice(-3).toLowerCase()==="nan"?NaN:t[0]==="-"?Number.NEGATIVE_INFINITY:Number.POSITIVE_INFINITY,stringify:i.stringifyNumber};const a={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",format:"EXP",test:/^[-+]?(?:[0-9][0-9_]*)?(?:\.[0-9_]*)?[eE][-+]?[0-9]+$/,resolve:t=>parseFloat(t.replace(/_/g,"")),stringify(t){const r=Number(t.value);return isFinite(r)?r.toExponential():i.stringifyNumber(t)}};const l={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",test:/^[-+]?(?:[0-9][0-9_]*)?\.[0-9_]*$/,resolve(t){const r=new s.Scalar(parseFloat(t.replace(/_/g,"")));const n=t.indexOf(".");if(n!==-1){const s=t.substring(n+1).replace(/_/g,"");if(s[s.length-1]==="0")r.minFractionDigits=s.length}return r},stringify:i.stringifyNumber};r.float=l;r.floatExp=a;r.floatNaN=o},9503:(t,r,n)=>{var s=n(4174);const intIdentify=t=>typeof t==="bigint"||Number.isInteger(t);function intResolve(t,r,n,{intAsBigInt:s}){const i=t[0];if(i==="-"||i==="+")r+=1;t=t.substring(r).replace(/_/g,"");if(s){switch(n){case 2:t=`0b${t}`;break;case 8:t=`0o${t}`;break;case 16:t=`0x${t}`;break}const r=BigInt(t);return i==="-"?BigInt(-1)*r:r}const o=parseInt(t,n);return i==="-"?-1*o:o}function intStringify(t,r,n){const{value:i}=t;if(intIdentify(i)){const t=i.toString(r);return i<0?"-"+n+t.substr(1):n+t}return s.stringifyNumber(t)}const i={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"BIN",test:/^[-+]?0b[0-1_]+$/,resolve:(t,r,n)=>intResolve(t,2,2,n),stringify:t=>intStringify(t,2,"0b")};const o={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"OCT",test:/^[-+]?0[0-7_]+$/,resolve:(t,r,n)=>intResolve(t,1,8,n),stringify:t=>intStringify(t,8,"0")};const a={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",test:/^[-+]?[0-9][0-9_]*$/,resolve:(t,r,n)=>intResolve(t,0,10,n),stringify:s.stringifyNumber};const l={identify:intIdentify,default:true,tag:"tag:yaml.org,2002:int",format:"HEX",test:/^[-+]?0x[0-9a-fA-F_]+$/,resolve:(t,r,n)=>intResolve(t,2,16,n),stringify:t=>intStringify(t,16,"0x")};r.int=a;r.intBin=i;r.intHex=l;r.intOct=o},8974:(t,r,n)=>{var s=n(5589);var i=n(2358);var o=n(6011);var a=n(5161);var l=n(9841);class YAMLOMap extends a.YAMLSeq{constructor(){super();this.add=o.YAMLMap.prototype.add.bind(this);this.delete=o.YAMLMap.prototype.delete.bind(this);this.get=o.YAMLMap.prototype.get.bind(this);this.has=o.YAMLMap.prototype.has.bind(this);this.set=o.YAMLMap.prototype.set.bind(this);this.tag=YAMLOMap.tag}toJSON(t,r){if(!r)return super.toJSON(t);const n=new Map;if(r?.onCreate)r.onCreate(n);for(const t of this.items){let o,a;if(s.isPair(t)){o=i.toJS(t.key,"",r);a=i.toJS(t.value,o,r)}else{o=i.toJS(t,"",r)}if(n.has(o))throw new Error("Ordered maps must not include duplicate keys");n.set(o,a)}return n}static from(t,r,n){const s=l.createPairs(t,r,n);const i=new this;i.items=s.items;return i}}YAMLOMap.tag="tag:yaml.org,2002:omap";const c={collection:"seq",identify:t=>t instanceof Map,nodeClass:YAMLOMap,default:false,tag:"tag:yaml.org,2002:omap",resolve(t,r){const n=l.resolvePairs(t,r);const i=[];for(const{key:t}of n.items){if(s.isScalar(t)){if(i.includes(t.value)){r(`Ordered maps must not include duplicate keys: ${t.value}`)}else{i.push(t.value)}}}return Object.assign(new YAMLOMap,n)},createNode:(t,r,n)=>YAMLOMap.from(t,r,n)};r.YAMLOMap=YAMLOMap;r.omap=c},9841:(t,r,n)=>{var s=n(5589);var i=n(246);var o=n(9338);var a=n(5161);function resolvePairs(t,r){if(s.isSeq(t)){for(let n=0;n<t.items.length;++n){let a=t.items[n];if(s.isPair(a))continue;else if(s.isMap(a)){if(a.items.length>1)r("Each pair must have its own sequence indicator");const t=a.items[0]||new i.Pair(new o.Scalar(null));if(a.commentBefore)t.key.commentBefore=t.key.commentBefore?`${a.commentBefore}\n${t.key.commentBefore}`:a.commentBefore;if(a.comment){const r=t.value??t.key;r.comment=r.comment?`${a.comment}\n${r.comment}`:a.comment}a=t}t.items[n]=s.isPair(a)?a:new i.Pair(a)}}else r("Expected a sequence for this tag");return t}function createPairs(t,r,n){const{replacer:s}=n;const o=new a.YAMLSeq(t);o.tag="tag:yaml.org,2002:pairs";let l=0;if(r&&Symbol.iterator in Object(r))for(let t of r){if(typeof s==="function")t=s.call(r,String(l++),t);let a,c;if(Array.isArray(t)){if(t.length===2){a=t[0];c=t[1]}else throw new TypeError(`Expected [key, value] tuple: ${t}`)}else if(t&&t instanceof Object){const r=Object.keys(t);if(r.length===1){a=r[0];c=t[a]}else{throw new TypeError(`Expected tuple with one key, not ${r.length} keys`)}}else{a=t}o.items.push(i.createPair(a,c,n))}return o}const l={collection:"seq",default:false,tag:"tag:yaml.org,2002:pairs",resolve:resolvePairs,createNode:createPairs};r.createPairs=createPairs;r.pairs=l;r.resolvePairs=resolvePairs},5389:(t,r,n)=>{var s=n(83);var i=n(6703);var o=n(1693);var a=n(2201);var l=n(5724);var c=n(2631);var u=n(8035);var d=n(9503);var p=n(8974);var h=n(9841);var m=n(7847);var g=n(1156);const y=[s.map,o.seq,a.string,i.nullTag,c.trueTag,c.falseTag,d.intBin,d.intOct,d.int,d.intHex,u.floatNaN,u.floatExp,u.float,l.binary,p.omap,h.pairs,m.set,g.intTime,g.floatTime,g.timestamp];r.schema=y},7847:(t,r,n)=>{var s=n(5589);var i=n(246);var o=n(6011);class YAMLSet extends o.YAMLMap{constructor(t){super(t);this.tag=YAMLSet.tag}add(t){let r;if(s.isPair(t))r=t;else if(t&&typeof t==="object"&&"key"in t&&"value"in t&&t.value===null)r=new i.Pair(t.key,null);else r=new i.Pair(t,null);const n=o.findPair(this.items,r.key);if(!n)this.items.push(r)}get(t,r){const n=o.findPair(this.items,t);return!r&&s.isPair(n)?s.isScalar(n.key)?n.key.value:n.key:n}set(t,r){if(typeof r!=="boolean")throw new Error(`Expected boolean value for set(key, value) in a YAML set, not ${typeof r}`);const n=o.findPair(this.items,t);if(n&&!r){this.items.splice(this.items.indexOf(n),1)}else if(!n&&r){this.items.push(new i.Pair(t))}}toJSON(t,r){return super.toJSON(t,r,Set)}toString(t,r,n){if(!t)return JSON.stringify(this);if(this.hasAllNullValues(true))return super.toString(Object.assign({},t,{allNullValues:true}),r,n);else throw new Error("Set items must all have null values")}static from(t,r,n){const{replacer:s}=n;const o=new this(t);if(r&&Symbol.iterator in Object(r))for(let t of r){if(typeof s==="function")t=s.call(r,t,t);o.items.push(i.createPair(t,null,n))}return o}}YAMLSet.tag="tag:yaml.org,2002:set";const a={collection:"map",identify:t=>t instanceof Set,nodeClass:YAMLSet,default:false,tag:"tag:yaml.org,2002:set",createNode:(t,r,n)=>YAMLSet.from(t,r,n),resolve(t,r){if(s.isMap(t)){if(t.hasAllNullValues(true))return Object.assign(new YAMLSet,t);else r("Set items must all have null values")}else r("Expected a mapping for this tag");return t}};r.YAMLSet=YAMLSet;r.set=a},1156:(t,r,n)=>{var s=n(4174);function parseSexagesimal(t,r){const n=t[0];const s=n==="-"||n==="+"?t.substring(1):t;const num=t=>r?BigInt(t):Number(t);const i=s.replace(/_/g,"").split(":").reduce(((t,r)=>t*num(60)+num(r)),num(0));return n==="-"?num(-1)*i:i}function stringifySexagesimal(t){let{value:r}=t;let num=t=>t;if(typeof r==="bigint")num=t=>BigInt(t);else if(isNaN(r)||!isFinite(r))return s.stringifyNumber(t);let n="";if(r<0){n="-";r*=num(-1)}const i=num(60);const o=[r%i];if(r<60){o.unshift(0)}else{r=(r-o[0])/i;o.unshift(r%i);if(r>=60){r=(r-o[0])/i;o.unshift(r)}}return n+o.map((t=>String(t).padStart(2,"0"))).join(":").replace(/000000\d*$/,"")}const i={identify:t=>typeof t==="bigint"||Number.isInteger(t),default:true,tag:"tag:yaml.org,2002:int",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+$/,resolve:(t,r,{intAsBigInt:n})=>parseSexagesimal(t,n),stringify:stringifySexagesimal};const o={identify:t=>typeof t==="number",default:true,tag:"tag:yaml.org,2002:float",format:"TIME",test:/^[-+]?[0-9][0-9_]*(?::[0-5]?[0-9])+\.[0-9_]*$/,resolve:t=>parseSexagesimal(t,false),stringify:stringifySexagesimal};const a={identify:t=>t instanceof Date,default:true,tag:"tag:yaml.org,2002:timestamp",test:RegExp("^([0-9]{4})-([0-9]{1,2})-([0-9]{1,2})"+"(?:"+"(?:t|T|[ \\t]+)"+"([0-9]{1,2}):([0-9]{1,2}):([0-9]{1,2}(\\.[0-9]+)?)"+"(?:[ \\t]*(Z|[-+][012]?[0-9](?::[0-9]{2})?))?"+")?$"),resolve(t){const r=t.match(a.test);if(!r)throw new Error("!!timestamp expects a date, starting with yyyy-mm-dd");const[,n,s,i,o,l,c]=r.map(Number);const u=r[7]?Number((r[7]+"00").substr(1,3)):0;let d=Date.UTC(n,s-1,i,o||0,l||0,c||0,u);const p=r[8];if(p&&p!=="Z"){let t=parseSexagesimal(p,false);if(Math.abs(t)<30)t*=60;d-=6e4*t}return new Date(d)},stringify:({value:t})=>t.toISOString().replace(/((T00:00)?:00)?\.000Z$/,"")};r.floatTime=o;r.intTime=i;r.timestamp=a},2889:(t,r)=>{const n="flow";const s="block";const i="quoted";function foldFlowLines(t,r,n="flow",{indentAtStart:o,lineWidth:a=80,minContentWidth:l=20,onFold:c,onOverflow:u}={}){if(!a||a<0)return t;const d=Math.max(1+l,1+a-r.length);if(t.length<=d)return t;const p=[];const h={};let m=a-r.length;if(typeof o==="number"){if(o>a-Math.max(2,l))p.push(0);else m=a-o}let g=undefined;let y=undefined;let b=false;let _=-1;let S=-1;let E=-1;if(n===s){_=consumeMoreIndentedLines(t,_);if(_!==-1)m=_+d}for(let r;r=t[_+=1];){if(n===i&&r==="\\"){S=_;switch(t[_+1]){case"x":_+=3;break;case"u":_+=5;break;case"U":_+=9;break;default:_+=1}E=_}if(r==="\n"){if(n===s)_=consumeMoreIndentedLines(t,_);m=_+d;g=undefined}else{if(r===" "&&y&&y!==" "&&y!=="\n"&&y!=="\t"){const r=t[_+1];if(r&&r!==" "&&r!=="\n"&&r!=="\t")g=_}if(_>=m){if(g){p.push(g);m=g+d;g=undefined}else if(n===i){while(y===" "||y==="\t"){y=r;r=t[_+=1];b=true}const n=_>E+1?_-2:S-1;if(h[n])return t;p.push(n);h[n]=true;m=n+d;g=undefined}else{b=true}}}y=r}if(b&&u)u();if(p.length===0)return t;if(c)c();let v=t.slice(0,p[0]);for(let s=0;s<p.length;++s){const o=p[s];const a=p[s+1]||t.length;if(o===0)v=`\n${r}${t.slice(0,a)}`;else{if(n===i&&h[o])v+=`${t[o]}\\`;v+=`\n${r}${t.slice(o+1,a)}`}}return v}function consumeMoreIndentedLines(t,r){let n=t[r+1];while(n===" "||n==="\t"){do{n=t[r+=1]}while(n&&n!=="\n");n=t[r+1]}return r}r.FOLD_BLOCK=s;r.FOLD_FLOW=n;r.FOLD_QUOTED=i;r.foldFlowLines=foldFlowLines},8409:(t,r,n)=>{var s=n(8459);var i=n(5589);var o=n(5182);var a=n(6226);function createStringifyContext(t,r){const n=Object.assign({blockQuote:true,commentString:o.stringifyComment,defaultKeyType:null,defaultStringType:"PLAIN",directives:null,doubleQuotedAsJSON:false,doubleQuotedMinMultiLineLength:40,falseStr:"false",flowCollectionPadding:true,indentSeq:true,lineWidth:80,minContentWidth:20,nullStr:"null",simpleKeys:false,singleQuote:null,trueStr:"true",verifyAliasOrder:true},t.schema.toStringOptions,r);let s;switch(n.collectionStyle){case"block":s=false;break;case"flow":s=true;break;default:s=null}return{anchors:new Set,doc:t,flowCollectionPadding:n.flowCollectionPadding?" ":"",indent:"",indentStep:typeof n.indent==="number"?" ".repeat(n.indent):" ",inFlow:s,options:n}}function getTagObject(t,r){if(r.tag){const n=t.filter((t=>t.tag===r.tag));if(n.length>0)return n.find((t=>t.format===r.format))??n[0]}let n=undefined;let s;if(i.isScalar(r)){s=r.value;const i=t.filter((t=>t.identify?.(s)));n=i.find((t=>t.format===r.format))??i.find((t=>!t.format))}else{s=r;n=t.find((t=>t.nodeClass&&s instanceof t.nodeClass))}if(!n){const t=s?.constructor?.name??typeof s;throw new Error(`Tag not resolved for ${t} value`)}return n}function stringifyProps(t,r,{anchors:n,doc:o}){if(!o.directives)return"";const a=[];const l=(i.isScalar(t)||i.isCollection(t))&&t.anchor;if(l&&s.anchorIsValid(l)){n.add(l);a.push(`&${l}`)}const c=t.tag?t.tag:r.default?null:r.tag;if(c)a.push(o.directives.tagString(c));return a.join(" ")}function stringify(t,r,n,s){if(i.isPair(t))return t.toString(r,n,s);if(i.isAlias(t)){if(r.doc.directives)return t.toString(r);if(r.resolvedAliases?.has(t)){throw new TypeError(`Cannot stringify circular structure without alias nodes`)}else{if(r.resolvedAliases)r.resolvedAliases.add(t);else r.resolvedAliases=new Set([t]);t=t.resolve(r.doc)}}let o=undefined;const l=i.isNode(t)?t:r.doc.createNode(t,{onTagObj:t=>o=t});if(!o)o=getTagObject(r.doc.schema.tags,l);const c=stringifyProps(l,o,r);if(c.length>0)r.indentAtStart=(r.indentAtStart??0)+c.length+1;const u=typeof o.stringify==="function"?o.stringify(l,r,n,s):i.isScalar(l)?a.stringifyString(l,r,n,s):l.toString(r,n,s);if(!c)return u;return i.isScalar(l)||u[0]==="{"||u[0]==="["?`${c} ${u}`:`${c}\n${r.indent}${u}`}r.createStringifyContext=createStringifyContext;r.stringify=stringify},2466:(t,r,n)=>{var s=n(2240);var i=n(5589);var o=n(8409);var a=n(5182);function stringifyCollection(t,r,n){const s=r.inFlow??t.flow;const i=s?stringifyFlowCollection:stringifyBlockCollection;return i(t,r,n)}function stringifyBlockCollection({comment:t,items:r},n,{blockItemPrefix:s,flowChars:l,itemIndent:c,onChompKeep:u,onComment:d}){const{indent:p,options:{commentString:h}}=n;const m=Object.assign({},n,{indent:c,type:null});let g=false;const y=[];for(let t=0;t<r.length;++t){const l=r[t];let u=null;if(i.isNode(l)){if(!g&&l.spaceBefore)y.push("");addCommentBefore(n,y,l.commentBefore,g);if(l.comment)u=l.comment}else if(i.isPair(l)){const t=i.isNode(l.key)?l.key:null;if(t){if(!g&&t.spaceBefore)y.push("");addCommentBefore(n,y,t.commentBefore,g)}}g=false;let d=o.stringify(l,m,(()=>u=null),(()=>g=true));if(u)d+=a.lineComment(d,c,h(u));if(g&&u)g=false;y.push(s+d)}let b;if(y.length===0){b=l.start+l.end}else{b=y[0];for(let t=1;t<y.length;++t){const r=y[t];b+=r?`\n${p}${r}`:"\n"}}if(t){b+="\n"+a.indentComment(h(t),p);if(d)d()}else if(g&&u)u();return b}function stringifyFlowCollection({comment:t,items:r},n,{flowChars:l,itemIndent:c,onComment:u}){const{indent:d,indentStep:p,flowCollectionPadding:h,options:{commentString:m}}=n;c+=p;const g=Object.assign({},n,{indent:c,inFlow:true,type:null});let y=false;let b=0;const _=[];for(let t=0;t<r.length;++t){const s=r[t];let l=null;if(i.isNode(s)){if(s.spaceBefore)_.push("");addCommentBefore(n,_,s.commentBefore,false);if(s.comment)l=s.comment}else if(i.isPair(s)){const t=i.isNode(s.key)?s.key:null;if(t){if(t.spaceBefore)_.push("");addCommentBefore(n,_,t.commentBefore,false);if(t.comment)y=true}const r=i.isNode(s.value)?s.value:null;if(r){if(r.comment)l=r.comment;if(r.commentBefore)y=true}else if(s.value==null&&t?.comment){l=t.comment}}if(l)y=true;let u=o.stringify(s,g,(()=>l=null));if(t<r.length-1)u+=",";if(l)u+=a.lineComment(u,c,m(l));if(!y&&(_.length>b||u.includes("\n")))y=true;_.push(u);b=_.length}let S;const{start:E,end:v}=l;if(_.length===0){S=E+v}else{if(!y){const t=_.reduce(((t,r)=>t+r.length+2),2);y=t>s.Collection.maxFlowStringSingleLineLength}if(y){S=E;for(const t of _)S+=t?`\n${p}${d}${t}`:"\n";S+=`\n${d}${v}`}else{S=`${E}${h}${_.join(" ")}${h}${v}`}}if(t){S+=a.lineComment(S,d,m(t));if(u)u()}return S}function addCommentBefore({indent:t,options:{commentString:r}},n,s,i){if(s&&i)s=s.replace(/^\n+/,"");if(s){const i=a.indentComment(r(s),t);n.push(i.trimStart())}}r.stringifyCollection=stringifyCollection},5182:(t,r)=>{const stringifyComment=t=>t.replace(/^(?!$)(?: $)?/gm,"#");function indentComment(t,r){if(/^\n+$/.test(t))return t.substring(1);return r?t.replace(/^(?! *$)/gm,r):t}const lineComment=(t,r,n)=>t.endsWith("\n")?indentComment(n,r):n.includes("\n")?"\n"+indentComment(n,r):(t.endsWith(" ")?"":" ")+n;r.indentComment=indentComment;r.lineComment=lineComment;r.stringifyComment=stringifyComment},5225:(t,r,n)=>{var s=n(5589);var i=n(8409);var o=n(5182);function stringifyDocument(t,r){const n=[];let a=r.directives===true;if(r.directives!==false&&t.directives){const r=t.directives.toString(t);if(r){n.push(r);a=true}else if(t.directives.docStart)a=true}if(a)n.push("---");const l=i.createStringifyContext(t,r);const{commentString:c}=l.options;if(t.commentBefore){if(n.length!==1)n.unshift("");const r=c(t.commentBefore);n.unshift(o.indentComment(r,""))}let u=false;let d=null;if(t.contents){if(s.isNode(t.contents)){if(t.contents.spaceBefore&&a)n.push("");if(t.contents.commentBefore){const r=c(t.contents.commentBefore);n.push(o.indentComment(r,""))}l.forceBlockIndent=!!t.comment;d=t.contents.comment}const r=d?undefined:()=>u=true;let p=i.stringify(t.contents,l,(()=>d=null),r);if(d)p+=o.lineComment(p,"",c(d));if((p[0]==="|"||p[0]===">")&&n[n.length-1]==="---"){n[n.length-1]=`--- ${p}`}else n.push(p)}else{n.push(i.stringify(t.contents,l))}if(t.directives?.docEnd){if(t.comment){const r=c(t.comment);if(r.includes("\n")){n.push("...");n.push(o.indentComment(r,""))}else{n.push(`... ${r}`)}}else{n.push("...")}}else{let r=t.comment;if(r&&u)r=r.replace(/^\n+/,"");if(r){if((!u||d)&&n[n.length-1]!=="")n.push("");n.push(o.indentComment(c(r),""))}}return n.join("\n")+"\n"}r.stringifyDocument=stringifyDocument},4174:(t,r)=>{function stringifyNumber({format:t,minFractionDigits:r,tag:n,value:s}){if(typeof s==="bigint")return String(s);const i=typeof s==="number"?s:Number(s);if(!isFinite(i))return isNaN(i)?".nan":i<0?"-.inf":".inf";let o=JSON.stringify(s);if(!t&&r&&(!n||n==="tag:yaml.org,2002:float")&&/^\d/.test(o)){let t=o.indexOf(".");if(t<0){t=o.length;o+="."}let n=r-(o.length-t-1);while(n-- >0)o+="0"}return o}r.stringifyNumber=stringifyNumber},4875:(t,r,n)=>{var s=n(5589);var i=n(9338);var o=n(8409);var a=n(5182);function stringifyPair({key:t,value:r},n,l,c){const{allNullValues:u,doc:d,indent:p,indentStep:h,options:{commentString:m,indentSeq:g,simpleKeys:y}}=n;let b=s.isNode(t)&&t.comment||null;if(y){if(b){throw new Error("With simple keys, key nodes cannot have comments")}if(s.isCollection(t)){const t="With simple keys, collection cannot be used as a key value";throw new Error(t)}}let _=!y&&(!t||b&&r==null&&!n.inFlow||s.isCollection(t)||(s.isScalar(t)?t.type===i.Scalar.BLOCK_FOLDED||t.type===i.Scalar.BLOCK_LITERAL:typeof t==="object"));n=Object.assign({},n,{allNullValues:false,implicitKey:!_&&(y||!u),indent:p+h});let S=false;let E=false;let v=o.stringify(t,n,(()=>S=true),(()=>E=true));if(!_&&!n.inFlow&&v.length>1024){if(y)throw new Error("With simple keys, single line scalar must not span more than 1024 characters");_=true}if(n.inFlow){if(u||r==null){if(S&&l)l();return v===""?"?":_?`? ${v}`:v}}else if(u&&!y||r==null&&_){v=`? ${v}`;if(b&&!S){v+=a.lineComment(v,n.indent,m(b))}else if(E&&c)c();return v}if(S)b=null;if(_){if(b)v+=a.lineComment(v,n.indent,m(b));v=`? ${v}\n${p}:`}else{v=`${v}:`;if(b)v+=a.lineComment(v,n.indent,m(b))}let R,w,C;if(s.isNode(r)){R=!!r.spaceBefore;w=r.commentBefore;C=r.comment}else{R=false;w=null;C=null;if(r&&typeof r==="object")r=d.createNode(r)}n.implicitKey=false;if(!_&&!b&&s.isScalar(r))n.indentAtStart=v.length+1;E=false;if(!g&&h.length>=2&&!n.inFlow&&!_&&s.isSeq(r)&&!r.flow&&!r.tag&&!r.anchor){n.indent=n.indent.substring(2)}let A=false;const T=o.stringify(r,n,(()=>A=true),(()=>E=true));let I=" ";if(b||R||w){I=R?"\n":"";if(w){const t=m(w);I+=`\n${a.indentComment(t,n.indent)}`}if(T===""&&!n.inFlow){if(I==="\n")I="\n\n"}else{I+=`\n${n.indent}`}}else if(!_&&s.isCollection(r)){const t=T[0];const s=T.indexOf("\n");const i=s!==-1;const o=n.inFlow??r.flow??r.items.length===0;if(i||!o){let r=false;if(i&&(t==="&"||t==="!")){let n=T.indexOf(" ");if(t==="&"&&n!==-1&&n<s&&T[n+1]==="!"){n=T.indexOf(" ",n+1)}if(n===-1||s<n)r=true}if(!r)I=`\n${n.indent}`}}else if(T===""||T[0]==="\n"){I=""}v+=I+T;if(n.inFlow){if(A&&l)l()}else if(C&&!A){v+=a.lineComment(v,n.indent,m(C))}else if(E&&c){c()}return v}r.stringifyPair=stringifyPair},6226:(t,r,n)=>{var s=n(9338);var i=n(2889);const getFoldOptions=(t,r)=>({indentAtStart:r?t.indent.length:t.indentAtStart,lineWidth:t.options.lineWidth,minContentWidth:t.options.minContentWidth});const containsDocumentMarker=t=>/^(%|---|\.\.\.)/m.test(t);function lineLengthOverLimit(t,r,n){if(!r||r<0)return false;const s=r-n;const i=t.length;if(i<=s)return false;for(let r=0,n=0;r<i;++r){if(t[r]==="\n"){if(r-n>s)return true;n=r+1;if(i-n<=s)return false}}return true}function doubleQuotedString(t,r){const n=JSON.stringify(t);if(r.options.doubleQuotedAsJSON)return n;const{implicitKey:s}=r;const o=r.options.doubleQuotedMinMultiLineLength;const a=r.indent||(containsDocumentMarker(t)?" ":"");let l="";let c=0;for(let t=0,r=n[t];r;r=n[++t]){if(r===" "&&n[t+1]==="\\"&&n[t+2]==="n"){l+=n.slice(c,t)+"\\ ";t+=1;c=t;r="\\"}if(r==="\\")switch(n[t+1]){case"u":{l+=n.slice(c,t);const r=n.substr(t+2,4);switch(r){case"0000":l+="\\0";break;case"0007":l+="\\a";break;case"000b":l+="\\v";break;case"001b":l+="\\e";break;case"0085":l+="\\N";break;case"00a0":l+="\\_";break;case"2028":l+="\\L";break;case"2029":l+="\\P";break;default:if(r.substr(0,2)==="00")l+="\\x"+r.substr(2);else l+=n.substr(t,6)}t+=5;c=t+1}break;case"n":if(s||n[t+2]==='"'||n.length<o){t+=1}else{l+=n.slice(c,t)+"\n\n";while(n[t+2]==="\\"&&n[t+3]==="n"&&n[t+4]!=='"'){l+="\n";t+=2}l+=a;if(n[t+2]===" ")l+="\\";t+=1;c=t+1}break;default:t+=1}}l=c?l+n.slice(c):n;return s?l:i.foldFlowLines(l,a,i.FOLD_QUOTED,getFoldOptions(r,false))}function singleQuotedString(t,r){if(r.options.singleQuote===false||r.implicitKey&&t.includes("\n")||/[ \t]\n|\n[ \t]/.test(t))return doubleQuotedString(t,r);const n=r.indent||(containsDocumentMarker(t)?" ":"");const s="'"+t.replace(/'/g,"''").replace(/\n+/g,`$&\n${n}`)+"'";return r.implicitKey?s:i.foldFlowLines(s,n,i.FOLD_FLOW,getFoldOptions(r,false))}function quotedString(t,r){const{singleQuote:n}=r.options;let s;if(n===false)s=doubleQuotedString;else{const r=t.includes('"');const i=t.includes("'");if(r&&!i)s=singleQuotedString;else if(i&&!r)s=doubleQuotedString;else s=n?singleQuotedString:doubleQuotedString}return s(t,r)}let o;try{o=new RegExp("(^|(?<!\n))\n+(?!\n|$)","g")}catch{o=/\n+(?!\n|$)/g}function blockString({comment:t,type:r,value:n},a,l,c){const{blockQuote:u,commentString:d,lineWidth:p}=a.options;if(!u||/\n[\t ]+$/.test(n)||/^\s*$/.test(n)){return quotedString(n,a)}const h=a.indent||(a.forceBlockIndent||containsDocumentMarker(n)?" ":"");const m=u==="literal"?true:u==="folded"||r===s.Scalar.BLOCK_FOLDED?false:r===s.Scalar.BLOCK_LITERAL?true:!lineLengthOverLimit(n,p,h.length);if(!n)return m?"|\n":">\n";let g;let y;for(y=n.length;y>0;--y){const t=n[y-1];if(t!=="\n"&&t!=="\t"&&t!==" ")break}let b=n.substring(y);const _=b.indexOf("\n");if(_===-1){g="-"}else if(n===b||_!==b.length-1){g="+";if(c)c()}else{g=""}if(b){n=n.slice(0,-b.length);if(b[b.length-1]==="\n")b=b.slice(0,-1);b=b.replace(o,`$&${h}`)}let S=false;let E;let v=-1;for(E=0;E<n.length;++E){const t=n[E];if(t===" ")S=true;else if(t==="\n")v=E;else break}let R=n.substring(0,v<E?v+1:E);if(R){n=n.substring(R.length);R=R.replace(/\n+/g,`$&${h}`)}const w=h?"2":"1";let C=(m?"|":">")+(S?w:"")+g;if(t){C+=" "+d(t.replace(/ ?[\r\n]+/g," "));if(l)l()}if(m){n=n.replace(/\n+/g,`$&${h}`);return`${C}\n${h}${R}${n}${b}`}n=n.replace(/\n+/g,"\n$&").replace(/(?:^|\n)([\t ].*)(?:([\n\t ]*)\n(?![\n\t ]))?/g,"$1$2").replace(/\n+/g,`$&${h}`);const A=i.foldFlowLines(`${R}${n}${b}`,h,i.FOLD_BLOCK,getFoldOptions(a,true));return`${C}\n${h}${A}`}function plainString(t,r,n,o){const{type:a,value:l}=t;const{actualString:c,implicitKey:u,indent:d,indentStep:p,inFlow:h}=r;if(u&&l.includes("\n")||h&&/[[\]{},]/.test(l)){return quotedString(l,r)}if(!l||/^[\n\t ,[\]{}#&*!|>'"%@`]|^[?-]$|^[?-][ \t]|[\n:][ \t]|[ \t]\n|[\n\t ]#|[\n\t :]$/.test(l)){return u||h||!l.includes("\n")?quotedString(l,r):blockString(t,r,n,o)}if(!u&&!h&&a!==s.Scalar.PLAIN&&l.includes("\n")){return blockString(t,r,n,o)}if(containsDocumentMarker(l)){if(d===""){r.forceBlockIndent=true;return blockString(t,r,n,o)}else if(u&&d===p){return quotedString(l,r)}}const m=l.replace(/\n+/g,`$&\n${d}`);if(c){const test=t=>t.default&&t.tag!=="tag:yaml.org,2002:str"&&t.test?.test(m);const{compat:t,tags:n}=r.doc.schema;if(n.some(test)||t?.some(test))return quotedString(l,r)}return u?m:i.foldFlowLines(m,d,i.FOLD_FLOW,getFoldOptions(r,false))}function stringifyString(t,r,n,i){const{implicitKey:o,inFlow:a}=r;const l=typeof t.value==="string"?t:Object.assign({},t,{value:String(t.value)});let{type:c}=t;if(c!==s.Scalar.QUOTE_DOUBLE){if(/[\x00-\x08\x0b-\x1f\x7f-\x9f\u{D800}-\u{DFFF}]/u.test(l.value))c=s.Scalar.QUOTE_DOUBLE}const _stringify=t=>{switch(t){case s.Scalar.BLOCK_FOLDED:case s.Scalar.BLOCK_LITERAL:return o||a?quotedString(l.value,r):blockString(l,r,n,i);case s.Scalar.QUOTE_DOUBLE:return doubleQuotedString(l.value,r);case s.Scalar.QUOTE_SINGLE:return singleQuotedString(l.value,r);case s.Scalar.PLAIN:return plainString(l,r,n,i);default:return null}};let u=_stringify(c);if(u===null){const{defaultKeyType:t,defaultStringType:n}=r.options;const s=o&&t||n;u=_stringify(s);if(u===null)throw new Error(`Unsupported default string type ${s}`)}return u}r.stringifyString=stringifyString},6796:(t,r,n)=>{var s=n(5589);const i=Symbol("break visit");const o=Symbol("skip children");const a=Symbol("remove node");function visit(t,r){const n=initVisitor(r);if(s.isDocument(t)){const r=visit_(null,t.contents,n,Object.freeze([t]));if(r===a)t.contents=null}else visit_(null,t,n,Object.freeze([]))}visit.BREAK=i;visit.SKIP=o;visit.REMOVE=a;function visit_(t,r,n,o){const l=callVisitor(t,r,n,o);if(s.isNode(l)||s.isPair(l)){replaceNode(t,o,l);return visit_(t,l,n,o)}if(typeof l!=="symbol"){if(s.isCollection(r)){o=Object.freeze(o.concat(r));for(let t=0;t<r.items.length;++t){const s=visit_(t,r.items[t],n,o);if(typeof s==="number")t=s-1;else if(s===i)return i;else if(s===a){r.items.splice(t,1);t-=1}}}else if(s.isPair(r)){o=Object.freeze(o.concat(r));const t=visit_("key",r.key,n,o);if(t===i)return i;else if(t===a)r.key=null;const s=visit_("value",r.value,n,o);if(s===i)return i;else if(s===a)r.value=null}}return l}async function visitAsync(t,r){const n=initVisitor(r);if(s.isDocument(t)){const r=await visitAsync_(null,t.contents,n,Object.freeze([t]));if(r===a)t.contents=null}else await visitAsync_(null,t,n,Object.freeze([]))}visitAsync.BREAK=i;visitAsync.SKIP=o;visitAsync.REMOVE=a;async function visitAsync_(t,r,n,o){const l=await callVisitor(t,r,n,o);if(s.isNode(l)||s.isPair(l)){replaceNode(t,o,l);return visitAsync_(t,l,n,o)}if(typeof l!=="symbol"){if(s.isCollection(r)){o=Object.freeze(o.concat(r));for(let t=0;t<r.items.length;++t){const s=await visitAsync_(t,r.items[t],n,o);if(typeof s==="number")t=s-1;else if(s===i)return i;else if(s===a){r.items.splice(t,1);t-=1}}}else if(s.isPair(r)){o=Object.freeze(o.concat(r));const t=await visitAsync_("key",r.key,n,o);if(t===i)return i;else if(t===a)r.key=null;const s=await visitAsync_("value",r.value,n,o);if(s===i)return i;else if(s===a)r.value=null}}return l}function initVisitor(t){if(typeof t==="object"&&(t.Collection||t.Node||t.Value)){return Object.assign({Alias:t.Node,Map:t.Node,Scalar:t.Node,Seq:t.Node},t.Value&&{Map:t.Value,Scalar:t.Value,Seq:t.Value},t.Collection&&{Map:t.Collection,Seq:t.Collection},t)}return t}function callVisitor(t,r,n,i){if(typeof n==="function")return n(t,r,i);if(s.isMap(r))return n.Map?.(t,r,i);if(s.isSeq(r))return n.Seq?.(t,r,i);if(s.isPair(r))return n.Pair?.(t,r,i);if(s.isScalar(r))return n.Scalar?.(t,r,i);if(s.isAlias(r))return n.Alias?.(t,r,i);return undefined}function replaceNode(t,r,n){const i=r[r.length-1];if(s.isCollection(i)){i.items[t]=n}else if(s.isPair(i)){if(t==="key")i.key=n;else i.value=n}else if(s.isDocument(i)){i.contents=n}else{const t=s.isAlias(i)?"alias":"scalar";throw new Error(`Cannot replace node with ${t} parent`)}}r.visit=visit;r.visitAsync=visitAsync},8572:(t,r,n)=>{const s=65536;if(!globalThis.ReadableStream){try{const t=n(7742);const{emitWarning:r}=t;try{t.emitWarning=()=>{};Object.assign(globalThis,n(2477));t.emitWarning=r}catch(n){t.emitWarning=r;throw n}}catch(t){Object.assign(globalThis,n(1452))}}try{const{Blob:t}=n(4300);if(t&&!t.prototype.stream){t.prototype.stream=function name(t){let r=0;const n=this;return new ReadableStream({type:"bytes",async pull(t){const i=n.slice(r,Math.min(n.size,r+s));const o=await i.arrayBuffer();r+=o.byteLength;t.enqueue(new Uint8Array(o));if(r===n.size){t.close()}}})}}}catch(t){}},3213:(t,r,n)=>{n.d(r,{Z:()=>a});var s=n(1410);const i=class File extends s.Z{#e=0;#t="";constructor(t,r,n={}){if(arguments.length<2){throw new TypeError(`Failed to construct 'File': 2 arguments required, but only ${arguments.length} present.`)}super(t,n);if(n===null)n={};const s=n.lastModified===undefined?Date.now():Number(n.lastModified);if(!Number.isNaN(s)){this.#e=s}this.#t=String(r)}get name(){return this.#t}get lastModified(){return this.#e}get[Symbol.toStringTag](){return"File"}static[Symbol.hasInstance](t){return!!t&&t instanceof s.Z&&/^(File)$/.test(t[Symbol.toStringTag])}};const o=i;const a=o},2185:(t,r,n)=>{n.d(r,{$B:()=>a.Z,SX:()=>blobFromSync});var s=n(7561);var i=n(9411);var o=n(7760);var a=n(3213);var l=n(1410);const{stat:c}=s.promises;const blobFromSync=(t,r)=>fromBlob((0,s.statSync)(t),t,r);const blobFrom=(t,r)=>c(t).then((n=>fromBlob(n,t,r)));const fileFrom=(t,r)=>c(t).then((n=>fromFile(n,t,r)));const fileFromSync=(t,r)=>fromFile(statSync(t),t,r);const fromBlob=(t,r,n="")=>new l.Z([new BlobDataItem({path:r,size:t.size,lastModified:t.mtimeMs,start:0})],{type:n});const fromFile=(t,r,n="")=>new File([new BlobDataItem({path:r,size:t.size,lastModified:t.mtimeMs,start:0})],basename(r),{type:n,lastModified:t.mtimeMs});class BlobDataItem{#r;#n;constructor(t){this.#r=t.path;this.#n=t.start;this.size=t.size;this.lastModified=t.lastModified}slice(t,r){return new BlobDataItem({path:this.#r,lastModified:this.lastModified,size:r-t,start:this.#n+t})}async*stream(){const{mtimeMs:t}=await c(this.#r);if(t>this.lastModified){throw new o("The requested file could not be read, typically due to permission problems that have occurred after a reference to a file was acquired.","NotReadableError")}yield*(0,s.createReadStream)(this.#r,{start:this.#n,end:this.#n+this.size-1})}get[Symbol.toStringTag](){return"Blob"}}var u=null&&blobFromSync},1410:(t,r,n)=>{n.d(r,{Z:()=>l});var s=n(8572);
|
||
/*! fetch-blob. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */const i=65536;async function*toIterator(t,r=true){for(const n of t){if("stream"in n){yield*n.stream()}else if(ArrayBuffer.isView(n)){if(r){let t=n.byteOffset;const r=n.byteOffset+n.byteLength;while(t!==r){const s=Math.min(r-t,i);const o=n.buffer.slice(t,t+s);t+=o.byteLength;yield new Uint8Array(o)}}else{yield n}}else{let t=0,r=n;while(t!==r.size){const n=r.slice(t,Math.min(r.size,t+i));const s=await n.arrayBuffer();t+=s.byteLength;yield new Uint8Array(s)}}}}const o=class Blob{#s=[];#i="";#o=0;#a="transparent";constructor(t=[],r={}){if(typeof t!=="object"||t===null){throw new TypeError("Failed to construct 'Blob': The provided value cannot be converted to a sequence.")}if(typeof t[Symbol.iterator]!=="function"){throw new TypeError("Failed to construct 'Blob': The object must have a callable @@iterator property.")}if(typeof r!=="object"&&typeof r!=="function"){throw new TypeError("Failed to construct 'Blob': parameter 2 cannot convert to dictionary.")}if(r===null)r={};const n=new TextEncoder;for(const r of t){let t;if(ArrayBuffer.isView(r)){t=new Uint8Array(r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength))}else if(r instanceof ArrayBuffer){t=new Uint8Array(r.slice(0))}else if(r instanceof Blob){t=r}else{t=n.encode(`${r}`)}this.#o+=ArrayBuffer.isView(t)?t.byteLength:t.size;this.#s.push(t)}this.#a=`${r.endings===undefined?"transparent":r.endings}`;const s=r.type===undefined?"":String(r.type);this.#i=/^[\x20-\x7E]*$/.test(s)?s:""}get size(){return this.#o}get type(){return this.#i}async text(){const t=new TextDecoder;let r="";for await(const n of toIterator(this.#s,false)){r+=t.decode(n,{stream:true})}r+=t.decode();return r}async arrayBuffer(){const t=new Uint8Array(this.size);let r=0;for await(const n of toIterator(this.#s,false)){t.set(n,r);r+=n.length}return t.buffer}stream(){const t=toIterator(this.#s,true);return new globalThis.ReadableStream({type:"bytes",async pull(r){const n=await t.next();n.done?r.close():r.enqueue(n.value)},async cancel(){await t.return()}})}slice(t=0,r=this.size,n=""){const{size:s}=this;let i=t<0?Math.max(s+t,0):Math.min(t,s);let o=r<0?Math.max(s+r,0):Math.min(r,s);const a=Math.max(o-i,0);const l=this.#s;const c=[];let u=0;for(const t of l){if(u>=a){break}const r=ArrayBuffer.isView(t)?t.byteLength:t.size;if(i&&r<=i){i-=r;o-=r}else{let n;if(ArrayBuffer.isView(t)){n=t.subarray(i,Math.min(r,o));u+=n.byteLength}else{n=t.slice(i,Math.min(r,o));u+=n.size}o-=r;c.push(n);i=0}}const d=new Blob([],{type:String(n).toLowerCase()});d.#o=a;d.#s=c;return d}get[Symbol.toStringTag](){return"Blob"}static[Symbol.hasInstance](t){return t&&typeof t==="object"&&typeof t.constructor==="function"&&(typeof t.stream==="function"||typeof t.arrayBuffer==="function")&&/^(Blob|File)$/.test(t[Symbol.toStringTag])}};Object.defineProperties(o.prototype,{size:{enumerable:true},type:{enumerable:true},slice:{enumerable:true}});const a=o;const l=a},8010:(t,r,n)=>{n.d(r,{Ct:()=>p,au:()=>formDataToBlob});var s=n(1410);var i=n(3213);
|
||
/*! formdata-polyfill. MIT License. Jimmy Wärting <https://jimmy.warting.se/opensource> */var{toStringTag:o,iterator:a,hasInstance:l}=Symbol,c=Math.random,u="append,set,get,getAll,delete,keys,values,entries,forEach,constructor".split(","),f=(t,r,n)=>(t+="",/^(Blob|File)$/.test(r&&r[o])?[(n=n!==void 0?n+"":r[o]=="File"?r.name:"blob",t),r.name!==n||r[o]=="blob"?new i.Z([r],n,r):r]:[t,r+""]),e=(t,r)=>(r?t:t.replace(/\r?\n|\r/g,"\r\n")).replace(/\n/g,"%0A").replace(/\r/g,"%0D").replace(/"/g,"%22"),x=(t,r,n)=>{if(r.length<n){throw new TypeError(`Failed to execute '${t}' on 'FormData': ${n} arguments required, but only ${r.length} present.`)}};const d=null&&F;const p=class FormData{#l=[];constructor(...t){if(t.length)throw new TypeError(`Failed to construct 'FormData': parameter 1 is not of type 'HTMLFormElement'.`)}get[o](){return"FormData"}[a](){return this.entries()}static[l](t){return t&&typeof t==="object"&&t[o]==="FormData"&&!u.some((r=>typeof t[r]!="function"))}append(...t){x("append",arguments,2);this.#l.push(f(...t))}delete(t){x("delete",arguments,1);t+="";this.#l=this.#l.filter((([r])=>r!==t))}get(t){x("get",arguments,1);t+="";for(var r=this.#l,n=r.length,s=0;s<n;s++)if(r[s][0]===t)return r[s][1];return null}getAll(t,r){x("getAll",arguments,1);r=[];t+="";this.#l.forEach((n=>n[0]===t&&r.push(n[1])));return r}has(t){x("has",arguments,1);t+="";return this.#l.some((r=>r[0]===t))}forEach(t,r){x("forEach",arguments,1);for(var[n,s]of this)t.call(r,s,n,this)}set(...t){x("set",arguments,2);var r=[],n=!0;t=f(...t);this.#l.forEach((s=>{s[0]===t[0]?n&&(n=!r.push(t)):r.push(s)}));n&&r.push(t);this.#l=r}*entries(){yield*this.#l}*keys(){for(var[t]of this)yield t}*values(){for(var[,t]of this)yield t}};function formDataToBlob(t,r=s.Z){var n=`${c()}${c()}`.replace(/\./g,"").slice(-28).padStart(32,"-"),i=[],o=`--${n}\r\nContent-Disposition: form-data; name="`;t.forEach(((t,r)=>typeof t=="string"?i.push(o+e(r)+`"\r\n\r\n${t.replace(/\r(?!\n)|(?<!\r)\n/g,"\r\n")}\r\n`):i.push(o+e(r)+`"; filename="${e(t.name,1)}"\r\nContent-Type: ${t.type||"application/octet-stream"}\r\n\r\n`,t,"\r\n")));i.push(`--${n}--`);return new r(i,{type:"multipart/form-data; boundary="+n})}},4037:(t,r,n)=>{n.r(r);n.d(r,{toFormData:()=>toFormData});var s=n(2185);var i=n(8010);let o=0;const a={START_BOUNDARY:o++,HEADER_FIELD_START:o++,HEADER_FIELD:o++,HEADER_VALUE_START:o++,HEADER_VALUE:o++,HEADER_VALUE_ALMOST_DONE:o++,HEADERS_ALMOST_DONE:o++,PART_DATA_START:o++,PART_DATA:o++,END:o++};let l=1;const c={PART_BOUNDARY:l,LAST_BOUNDARY:l*=2};const u=10;const d=13;const p=32;const h=45;const m=58;const g=97;const y=122;const lower=t=>t|32;const noop=()=>{};class MultipartParser{constructor(t){this.index=0;this.flags=0;this.onHeaderEnd=noop;this.onHeaderField=noop;this.onHeadersEnd=noop;this.onHeaderValue=noop;this.onPartBegin=noop;this.onPartData=noop;this.onPartEnd=noop;this.boundaryChars={};t="\r\n--"+t;const r=new Uint8Array(t.length);for(let n=0;n<t.length;n++){r[n]=t.charCodeAt(n);this.boundaryChars[r[n]]=true}this.boundary=r;this.lookbehind=new Uint8Array(this.boundary.length+8);this.state=a.START_BOUNDARY}write(t){let r=0;const n=t.length;let s=this.index;let{lookbehind:i,boundary:o,boundaryChars:l,index:b,state:_,flags:S}=this;const E=this.boundary.length;const v=E-1;const R=t.length;let w;let C;const mark=t=>{this[t+"Mark"]=r};const clear=t=>{delete this[t+"Mark"]};const callback=(t,r,n,s)=>{if(r===undefined||r!==n){this[t](s&&s.subarray(r,n))}};const dataCallback=(n,s)=>{const i=n+"Mark";if(!(i in this)){return}if(s){callback(n,this[i],r,t);delete this[i]}else{callback(n,this[i],t.length,t);this[i]=0}};for(r=0;r<n;r++){w=t[r];switch(_){case a.START_BOUNDARY:if(b===o.length-2){if(w===h){S|=c.LAST_BOUNDARY}else if(w!==d){return}b++;break}else if(b-1===o.length-2){if(S&c.LAST_BOUNDARY&&w===h){_=a.END;S=0}else if(!(S&c.LAST_BOUNDARY)&&w===u){b=0;callback("onPartBegin");_=a.HEADER_FIELD_START}else{return}break}if(w!==o[b+2]){b=-2}if(w===o[b+2]){b++}break;case a.HEADER_FIELD_START:_=a.HEADER_FIELD;mark("onHeaderField");b=0;case a.HEADER_FIELD:if(w===d){clear("onHeaderField");_=a.HEADERS_ALMOST_DONE;break}b++;if(w===h){break}if(w===m){if(b===1){return}dataCallback("onHeaderField",true);_=a.HEADER_VALUE_START;break}C=lower(w);if(C<g||C>y){return}break;case a.HEADER_VALUE_START:if(w===p){break}mark("onHeaderValue");_=a.HEADER_VALUE;case a.HEADER_VALUE:if(w===d){dataCallback("onHeaderValue",true);callback("onHeaderEnd");_=a.HEADER_VALUE_ALMOST_DONE}break;case a.HEADER_VALUE_ALMOST_DONE:if(w!==u){return}_=a.HEADER_FIELD_START;break;case a.HEADERS_ALMOST_DONE:if(w!==u){return}callback("onHeadersEnd");_=a.PART_DATA_START;break;case a.PART_DATA_START:_=a.PART_DATA;mark("onPartData");case a.PART_DATA:s=b;if(b===0){r+=v;while(r<R&&!(t[r]in l)){r+=E}r-=v;w=t[r]}if(b<o.length){if(o[b]===w){if(b===0){dataCallback("onPartData",true)}b++}else{b=0}}else if(b===o.length){b++;if(w===d){S|=c.PART_BOUNDARY}else if(w===h){S|=c.LAST_BOUNDARY}else{b=0}}else if(b-1===o.length){if(S&c.PART_BOUNDARY){b=0;if(w===u){S&=~c.PART_BOUNDARY;callback("onPartEnd");callback("onPartBegin");_=a.HEADER_FIELD_START;break}}else if(S&c.LAST_BOUNDARY){if(w===h){callback("onPartEnd");_=a.END;S=0}else{b=0}}else{b=0}}if(b>0){i[b-1]=w}else if(s>0){const t=new Uint8Array(i.buffer,i.byteOffset,i.byteLength);callback("onPartData",0,s,t);s=0;mark("onPartData");r--}break;case a.END:break;default:throw new Error(`Unexpected state entered: ${_}`)}}dataCallback("onHeaderField");dataCallback("onHeaderValue");dataCallback("onPartData");this.index=b;this.state=_;this.flags=S}end(){if(this.state===a.HEADER_FIELD_START&&this.index===0||this.state===a.PART_DATA&&this.index===this.boundary.length){this.onPartEnd()}else if(this.state!==a.END){throw new Error("MultipartParser.end(): stream ended unexpectedly")}}}function _fileName(t){const r=t.match(/\bfilename=("(.*?)"|([^()<>@,;:\\"/[\]?={}\s\t]+))($|;\s)/i);if(!r){return}const n=r[2]||r[3]||"";let s=n.slice(n.lastIndexOf("\\")+1);s=s.replace(/%22/g,'"');s=s.replace(/&#(\d{4});/g,((t,r)=>String.fromCharCode(r)));return s}async function toFormData(t,r){if(!/multipart/i.test(r)){throw new TypeError("Failed to fetch")}const n=r.match(/boundary=(?:"([^"]+)"|([^;]+))/i);if(!n){throw new TypeError("no or bad content-type header, no multipart boundary")}const o=new MultipartParser(n[1]||n[2]);let a;let l;let c;let u;let d;let p;const h=[];const m=new i.Ct;const onPartData=t=>{c+=g.decode(t,{stream:true})};const appendToFile=t=>{h.push(t)};const appendFileToFormData=()=>{const t=new s.$B(h,p,{type:d});m.append(u,t)};const appendEntryToFormData=()=>{m.append(u,c)};const g=new TextDecoder("utf-8");g.decode();o.onPartBegin=function(){o.onPartData=onPartData;o.onPartEnd=appendEntryToFormData;a="";l="";c="";u="";d="";p=null;h.length=0};o.onHeaderField=function(t){a+=g.decode(t,{stream:true})};o.onHeaderValue=function(t){l+=g.decode(t,{stream:true})};o.onHeaderEnd=function(){l+=g.decode();a=a.toLowerCase();if(a==="content-disposition"){const t=l.match(/\bname=("([^"]*)"|([^()<>@,;:\\"/[\]?={}\s\t]+))/i);if(t){u=t[2]||t[3]||""}p=_fileName(l);if(p){o.onPartData=appendToFile;o.onPartEnd=appendFileToFormData}}else if(a==="content-type"){d=l}l="";a=""};for await(const r of t){o.write(r)}o.end();return m}}};var n={};function __nccwpck_require__(t){var s=n[t];if(s!==undefined){return s.exports}var i=n[t]={exports:{}};var o=true;try{r[t].call(i.exports,i,i.exports,__nccwpck_require__);o=false}finally{if(o)delete n[t]}return i.exports}__nccwpck_require__.m=r;(()=>{var t=typeof Symbol==="function"?Symbol("webpack queues"):"__webpack_queues__";var r=typeof Symbol==="function"?Symbol("webpack exports"):"__webpack_exports__";var n=typeof Symbol==="function"?Symbol("webpack error"):"__webpack_error__";var resolveQueue=t=>{if(t&&!t.d){t.d=1;t.forEach((t=>t.r--));t.forEach((t=>t.r--?t.r++:t()))}};var wrapDeps=s=>s.map((s=>{if(s!==null&&typeof s==="object"){if(s[t])return s;if(s.then){var i=[];i.d=0;s.then((t=>{o[r]=t;resolveQueue(i)}),(t=>{o[n]=t;resolveQueue(i)}));var o={};o[t]=t=>t(i);return o}}var a={};a[t]=t=>{};a[r]=s;return a}));__nccwpck_require__.a=(s,i,o)=>{var a;o&&((a=[]).d=1);var l=new Set;var c=s.exports;var u;var d;var p;var h=new Promise(((t,r)=>{p=r;d=t}));h[r]=c;h[t]=t=>(a&&t(a),l.forEach(t),h["catch"]((t=>{})));s.exports=h;i((s=>{u=wrapDeps(s);var i;var getResult=()=>u.map((t=>{if(t[n])throw t[n];return t[r]}));var o=new Promise((r=>{i=()=>r(getResult);i.r=0;var fnQueue=t=>t!==a&&!l.has(t)&&(l.add(t),t&&!t.d&&(i.r++,t.push(i)));u.map((r=>r[t](fnQueue)))}));return i.r?o:getResult()}),(t=>(t?p(h[n]=t):d(c),resolveQueue(a))));a&&(a.d=0)}})();(()=>{__nccwpck_require__.n=t=>{var r=t&&t.__esModule?()=>t["default"]:()=>t;__nccwpck_require__.d(r,{a:r});return r}})();(()=>{__nccwpck_require__.d=(t,r)=>{for(var n in r){if(__nccwpck_require__.o(r,n)&&!__nccwpck_require__.o(t,n)){Object.defineProperty(t,n,{enumerable:true,get:r[n]})}}}})();(()=>{__nccwpck_require__.o=(t,r)=>Object.prototype.hasOwnProperty.call(t,r)})();(()=>{__nccwpck_require__.r=t=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(t,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(t,"__esModule",{value:true})}})();(()=>{var t;if(typeof import.meta.url==="string")t=import.meta.url;if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/");__nccwpck_require__.p=t})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=new URL(".",import.meta.url).pathname.slice(import.meta.url.match(/^file:\/\/\/\w:/)?1:0,-1)+"/";(()=>{__nccwpck_require__.b=new URL("./",import.meta.url);var t={179:0}})();var s=__nccwpck_require__(6144);s=await s;
|
||
//# sourceMappingURL=index.js.map
|