@rollup/browser 5.0.0-0 → 5.0.0-1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rollup.browser.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v5.0.0-
|
|
4
|
-
|
|
3
|
+
Rollup.js v5.0.0-1
|
|
4
|
+
Sun, 18 Oct 2026 06:06:25 GMT - commit ed75a6895d5bc62fdbff91b9d48e22e6e281e3bc
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
var e,t;e=this,t=function(e){var t="undefined"!=typeof document?document.currentScript:null,n="5.0.0-0",s=",".charCodeAt(0),i=";".charCodeAt(0),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(64),a=new Uint8Array(128);for(let e=0;e<64;e++){const t=r.charCodeAt(e);o[e]=t,a[t]=e}function l(e){let t=0,n=0,s=0;do{const i=e.next();s=a[i],t|=(31&s)<<n,n+=5}while(32&s);return t}function c(e){return 1&e?-2147483648|-(e>>>1):e>>>1}function u(e,t){do{let n=31&t;(t>>>=5)>0&&(n|=32),e.write(o[n])}while(t>0)}function d(e){return e<0?-e<<1|1:e<<1}function h(e,t){return!(e.pos>=t)&&e.peek()!==s}var p="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},f=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=p.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+p.decode(e.subarray(0,n)):t}},m=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,s=t.indexOf(e,n);return-1===s?t.length:s}};function g(e){e.sort(y)}function y(e,t){return e[0]-t[0]}function b(e){const t=new f;let n=0,r=0,o=0,a=0;for(let l=0;l<e.length;l++){const c=e[l];if(l>0&&t.write(i),0===c.length)continue;let h=0;for(let e=0;e<c.length;e++){const i=c[e];e>0&&t.write(s),u(t,d(i[0]-h)),h=i[0],1!==i.length&&(u(t,d(i[1]-n)),u(t,d(i[2]-r)),u(t,d(i[3]-o)),n=i[1],r=i[2],o=i[3],4!==i.length&&(u(t,d(i[4]-a)),a=i[4]))}}return t.flush()}var E=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}},x=class e{constructor(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.start<e&&e<this.end}eachNext(e){e(this);let t=this.next;for(;t;)e(t),t=t.next}eachPrevious(e){e(this);let t=this.previous;for(;t;)e(t),t=t.previous}edit(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const n=t-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new e(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1,!0),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.edited?this.edit(t,this.storeName,!0):this.split(this.start+t.length).edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.edited?this.edit(t,this.storeName,!0):(this.split(this.end-t.length),this.edit("",void 0,!0))),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)}},v=class extends Error{name="MagicStringError";constructor(e,t){super(`[MagicString] ${e}`,t)}};function A(){if("undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa)return e=>globalThis.btoa(unescape(encodeURIComponent(e)));const e=globalThis.Buffer;return e?t=>e.from(t,"utf-8").toString("base64"):()=>{throw new v("unsupported environment: `btoa` or `Buffer` is required")}}const S=A();var P=class{constructor(e){if(this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings="string"==typeof e.mappings?e.mappings:b(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId),void 0!==e.rangeMappings){let t=!1;for(const n of e.rangeMappings)if(0!==n.length){t=!0;break}t&&(this.rangeMappings=function(e){if(0===e.length)return"";const t=new f;for(let n=0;n<e.length;n++){const s=e[n];n>0&&t.write(i);let r=0;for(let e=0;e<s.length;e++){const n=s[e];u(t,n-r),r=n}}return t.flush()}(e.rangeMappings))}}toString(){return JSON.stringify(this)}toUrl(){return`data:application/json;charset=utf-8;base64,${S(this.toString())}`}};function $(e){const t=[0];for(let n=e.indexOf("\n");-1!==n;n=e.indexOf("\n",n+1))t.push(n+1);return function(e){let n=0,s=t.length;for(;n<s;){const i=n+s>>1;e<t[i]?s=i:n=i+1}const i=n-1;return{line:i,column:e-t[i]}}}function w(e,t){const n=e.split(/[/\\]/),s=t.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let e=n.length;for(;e--;)n[e]=".."}return n.concat(s).join("/")}const I=Object.prototype.toString;function C(e){return"[object Object]"===I.call(e)}const k=(()=>{const e=new Uint8Array(64);for(let t=0;t<64;t++)e[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t);return e})(),N=new Uint8Array(16384);function O(e,t){t=t<0?-t<<1|1:t<<1;do{let n=31&t;(t>>>=5)>0&&(n|=32),N[e++]=k[n]}while(t>0);return e}const R=new TextDecoder;var D=class{constructor(){this.out="",this.pos=0,this.lines=[],this.buffered=0,this.needsComma=!1,this.prevGenColumn=0,this.prevSourceIndex=0,this.prevSourceLine=0,this.prevSourceColumn=0,this.prevNameIndex=0}endLine(e){this.lines.push(e),this.buffered+=e.length+1,this.buffered>=4096&&this.drain(null)}segments(e){this.drain(e)}finish(e){return this.drain(e),this.flush(),this.out}drain(e){const t=this.lines,n=t.length;for(let s=0;s<=n;s++){const i=s<n?t[s]:e;if(null===i)break;for(let e=0;e<i.length;e++){this.pos>16348&&this.flush();const t=i[e];this.needsComma&&(N[this.pos++]=44),this.needsComma=!0,this.pos=O(this.pos,t[0]-this.prevGenColumn),this.prevGenColumn=t[0],this.pos=O(this.pos,t[1]-this.prevSourceIndex),this.prevSourceIndex=t[1],this.pos=O(this.pos,t[2]-this.prevSourceLine),this.prevSourceLine=t[2],this.pos=O(this.pos,t[3]-this.prevSourceColumn),this.prevSourceColumn=t[3],5===t.length&&(this.pos=O(this.pos,t[4]-this.prevNameIndex),this.prevNameIndex=t[4])}s<n&&(this.pos>16348&&this.flush(),N[this.pos++]=59,this.needsComma=!1,this.prevGenColumn=0)}t.length=0,this.buffered=0,this.flush()}flush(){this.out+=R.decode(N.subarray(0,this.pos)),this.pos=0}};function M(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||95===e}var _=class{constructor(e,t=null){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.rawRangeMappings=[],this.rawRangeMappingsIndices=this.rawRangeMappings[this.generatedCodeLine]=[],this.encoder=t}nextLine(){null===this.encoder?(this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[]):(this.encoder.endLine(this.rawSegments),this.rawSegments=[],this.generatedCodeLine+=1),this.generatedCodeColumn=0,this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[]}addEdit(e,t,n,s){if(t.length){const i=t.length-1;let r=t.indexOf("\n",0),o=-1;for(;r>=0&&i>r;){const i=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&i.push(s),this.rawSegments.push(i),this.nextLine(),o=r,r=t.indexOf("\n",r+1)}const a=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&a.push(s),this.rawSegments.push(a),this.advance(t.slice(o+1))}}addUneditedChunk(e,t,n,s,i){const r=t.end;let o=t.start;if(this.hires){const i="boundary"===this.hires,a="experimental-range"===this.hires,l=a?null:this.encoder;let c=!1;for(;o<r;){null!==l&&this.rawSegments.length>=4096&&(l.segments(this.rawSegments),this.rawSegments.length=0),a&&o+1>=r&&this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);const u=n.charCodeAt(o);10===u?(s.line+=1,s.column=0,this.nextLine(),c=!1):(i?M(u)?c||(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!0):(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!1):a?o===t.start&&(this.rawRangeMappingsIndices.push(this.rawSegments.length),this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column])):this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),s.column+=1,this.generatedCodeColumn+=1),o+=1}}else{const t=i.bits;for(;o<r;){let i=n.indexOf("\n",o);if((-1===i||i>r)&&(i=r),i>o){this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);for(let n=o+1>>5,r=i-1>>5;n<=r;n++){let r=t[n];if(!r)continue;const a=n<<5;for(;r;){const t=r&-r,n=a+31-Math.clz32(t);if(n>o&&n<i){const t=n-o;this.rawSegments.push([this.generatedCodeColumn+t,e,s.line,s.column+t])}r^=t}}s.column+=i-o,this.generatedCodeColumn+=i-o}if(i===r)break;s.line+=1,s.column=0,this.nextLine(),o=i+1}}}advance(e){if(!e)return;const t=e.lastIndexOf("\n");for(let t=e.indexOf("\n");-1!==t;t=e.indexOf("\n",t+1))this.nextLine();this.generatedCodeColumn+=e.length-t-1}};const L="\n",T="\n".charCodeAt(0),B="\r".charCodeAt(0),z={insertLeft:!1,insertRight:!1,storeName:!1};function F(e,t,n,s,i,r){if(!e.includes("$"))return e;let o="",a=0;for(;a<e.length;){const l=e.indexOf("$",a);if(-1===l){o+=e.slice(a);break}o+=e.slice(a,l);const c=e[l+1];let u="$",d=1;if("$"===c)d=2;else if("&"===c)u=t,d=2;else if("`"===c)u=s.slice(0,n),d=2;else if("'"===c)u=s.slice(n+t.length),d=2;else if("<"===c&&void 0!==r){const t=e.indexOf(">",l+2);-1!==t&&(u=r[e.slice(l+2,t)]??"",d=t+1-l)}else if(c>="0"&&c<="9"){const t=e[l+2],n=t>="0"&&t<="9"?Number(c+t):NaN,s=Number(c);n>=1&&n<=i.length?(u=i[n-1]??"",d=3):s>=1&&s<=i.length&&(u=i[s-1]??"",d=2)}o+=u,a=l+d}return o}var V=class e{constructor(e,t={}){const n=new x(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:new Map([[0,n]])},byEnd:{writable:!0,value:new Map([[e.length,n]])},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new E},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0},hasMovedChunks:{writable:!0,value:!1}})}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new v("content must be a string, got "+typeof e);return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.appendRight(t):this.outro+=t,this}clone(){const t=new e(this.original,{filename:this.filename,ignoreList:this.ignoreList,offset:this.offset});let n=this.firstChunk,s=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart.set(s.start,s),t.byEnd.set(s.end,s);const e=n.next,i=e&&e.clone();i&&(s.next=i,i.previous=s,s=i),n=e}return t.lastChunk=s,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new E(this.sourcemapLocations),t.storedNames={...this.storedNames},t.intro=this.intro,t.outro=this.outro,t.hasMovedChunks=this.hasMovedChunks,t}generateDecodedMap(e){const t=new _((e=e||{}).hires),n=this._generateMappings(t);return{...this._mapProperties(e,n),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e){e=e||{};const t=new D,n=new _(e.hires,t),s=this._generateMappings(n);return new P({...this._mapProperties(e,s),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){const t=Object.keys(this.storedNames),n=$(this.original);return this.intro&&e.advance(this.intro),this.firstChunk.eachNext(s=>{const i=n(s.start);s.intro.length&&e.advance(s.intro),s.edited?e.addEdit(0,s.content,i,s.storeName?t.indexOf(s.original):-1):e.addUneditedChunk(0,s,this.original,i,this.sourcemapLocations),s.outro.length&&e.advance(s.outro)}),this.outro&&e.advance(this.outro),t}_mapProperties(e,t){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?w(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,x_google_ignoreList:this.ignoreList?[0]:void 0}}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return" ".repeat(i)}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const n=/^[^\r\n]/gm;if(C(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s=e,i={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)i[t]=!0});let r=!1!==t.indentStart;const o=e=>{if(""===e)return e;const t=e.replace(n,(e,t)=>t>0||r?`${s}${e}`:e);return r="\n"===e[e.length-1],t};this.intro=o(this.intro);let a=0,l=this.firstChunk;const c=e=>{r=!1,e===l.start?l.appendRight(s):(this._splitChunk(l,e),l=l.next,l.prependRight(s))};for(;l;){const e=l.end;if(i[l.start]||(l.intro=o(l.intro)),l.edited)i[a]||(l.content=o(l.content));else if(t.exclude)for(a=l.start;a<e;){if(!i[a]){const e=this.original.charCodeAt(a);e===T?r=!0:e!==B&&r&&c(a)}a+=1}else for(a=l.start;a<e;){if(!r){const t=this.original.indexOf(L,a);if(-1===t||t>=e)break;r=!0,a=t+1;continue}const t=this.original.charCodeAt(a);t!==T&&t!==B?(c(a),a+=1):a+=1}i[l.end-1]||(l.outro=o(l.outro)),a=l.end,l=l.next}return this.outro=o(this.outro),this}insert(){throw new v("insert() is deprecated, use appendLeft() or prependRight()")}insertLeft(e,t){return z.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),z.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return z.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),z.insertRight=!0),this.prependRight(e,t)}move(e,t,n,s="right"){if(e+=this.offset,t+=this.offset,n+=this.offset,e===t)return this;if(n>=e&&n<=t)throw new v("cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const i=this.byStart.get(e),r=this.byEnd.get(t);if(this.hasMovedChunks){let n=i;for(;n!==r;)if(n=n.next,!n||n.start<e||n.end>t)throw new v(`cannot move ${e} to ${t} because an earlier move split that range`)}const o=i.previous,a=r.next;let l,c;if("left"===s)if(l=this.byEnd.get(n)??null,l){if(l.next===i)return this;c=l.next}else{if(i===this.firstChunk)return this;c=this.firstChunk}else if(c=this.byStart.get(n)??null,c){if(c.previous===r)return this;l=c.previous}else{if(r===this.lastChunk)return this;l=this.lastChunk}return o&&(o.next=a),a&&(a.previous=o),l&&(l.next=i),c&&(c.previous=r),i.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,r.next=c||null,l||(this.firstChunk=i),c||(this.lastChunk=r),this.hasMovedChunks=!0,this}overwrite(e,t,n,s){const i="object"==typeof s&&s?s:{};return this.update(e,t,n,{...i,overwrite:!i.contentOnly})}update(e,t,n,s){if(e+=this.offset,t+=this.offset,"string"!=typeof n)throw new v("content must be a string, got "+typeof n);if(0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e<0)throw new v(`start ${e} is out of bounds`);if(t>this.original.length)throw new v(`end ${t} is out of bounds`);if(e===t)throw new v(`cannot overwrite a zero-length range at ${e}, use appendLeft() or prependRight()`);if(e>t)throw new v(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t),!0===s&&(z.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),z.storeName=!0),s={storeName:!0});const i="object"==typeof s&&s?s:{},r=i.storeName||!1,o=i.overwrite||!1;if(r){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart.get(e),l=this.byEnd.get(t);if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart.get(e.end))throw new v("cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(n,r,!o)}else{const s=new x(e,t,"").edit(n,r);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new v("content must be a string, got "+typeof e);return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new v(`range ${e}–${t} is out of bounds`);if(e>t)throw new v(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.start>e&&(n.intro=""),n.end<t&&(n.outro=""),n.edit("",!1,!0),n=t>n.end?this.byStart.get(n.end):null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new v(`range ${e}–${t} is out of bounds`);if(e>t)throw new v(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.reset(),n=t>n.end?this.byStart.get(n.end):null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;for(;e;){if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1];e=e.previous}return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(L);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;for(;n;){if(n.outro.length>0){if(e=n.outro.lastIndexOf(L),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(L),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(L),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}n=n.previous}return e=this.intro.lastIndexOf(L),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length)));let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start<t&&s.end>=t||0===t&&0===s.start)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new v(`cannot use edited character ${e} as slice start anchor`);const i=s;for(;s&&(0!==t||0!==s.start);){!s.intro||i===s&&s.start!==e||(n+=s.intro);const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new v(`cannot use edited character ${t} as slice end anchor`);const o=i===s?e-s.start:0,a=r?s.content.length+t-s.end:s.content.length;if(n+=s.content.slice(o,a),!s.outro||r&&s.end!==t||(n+=s.outro),r)break;s=s.next}return n}snip(e,t){const n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n}_split(e){if(this.byStart.get(e)||this.byEnd.get(e))return;let t=this.lastSearchedChunk,n=t;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=s?this.byStart.get(t.end):this.byEnd.get(t.start),t===n)return;n=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=$(this.original)(t);throw new v(`cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd.set(t,e),this.byStart.set(t,n),this.byEnd.set(n.end,n),e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){if(this.intro.length&&this.intro.trim())return!1;let e=this.firstChunk;for(;e;){if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;e=e.next}return!this.outro.length||!this.outro.trim()}length(){let e=this.firstChunk,t=0;for(;e;)t+=e.intro.length+e.content.length+e.outro.length,e=e.next;return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp(`${e||"\\s"}+$`);if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.lastChunk;do{const e=n.end,s=n.trimEnd(t);if(n.end!==e&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(n.next.end,n.next)),s)return!0;n=n.previous}while(n);return this.intro=this.intro.replace(t,""),this.intro.length>0}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp(`^${e||"\\s"}+`);if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.firstChunk;do{const e=n.end,s=n.trimStart(t);if(n.end!==e&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(n.next.end,n.next)),s)return!0;n=n.next}while(n);return this.outro=this.outro.replace(t,""),this.outro.length>0}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){if(this.intro||this.outro)return!0;let e=0,t=this.firstChunk;for(;t;){if(t.intro||t.outro)return!0;if(t.edited||t.start!==e){if(!this.original.startsWith(t.content,e))return!0;e+=t.content.length}else e=t.end;t=t.next}return e!==this.original.length}_hasRemovedContent(e,t){let n=this.byStart.get(e);if(!n){n=this.lastSearchedChunk;const t=e>=n.end;for(;n&&!n.contains(e);)n=t?this.byStart.get(n.end):this.byEnd.get(n.start);n&&(this.lastSearchedChunk=n)}for(;n&&n.start<t;){if(""===n.content)return!0;n=this.byStart.get(n.end)}return!1}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?F(t,e[0],e.index,n,e.slice(1),e.groups):void 0===e.groups?t(e[0],...e.slice(1),e.index,n):t(e[0],...e.slice(1),e.index,n,e.groups)}const s=e=>{if(null==e.index)return!1;if(this._hasRemovedContent(e.index,e.index+e[0].length))return!1;const t=n(e,this.original);return t===e[0]||(0===e[0].length?this.appendRight(e.index,t):this.overwrite(e.index,e.index+e[0].length,t)),!0};if(e.global){e.lastIndex=0;for(const t of this.original.matchAll(e))s(t)}else{const t=this.original.match(e);if(t&&!s(t)){const t=new RegExp(e.source,`${e.flags}g`);for(const e of this.original.matchAll(t))if(s(e))break}}return this}_replaceString(e,t){const{original:n}=this;let s=n.indexOf(e);for(;-1!==s;){if(!this._hasRemovedContent(s,s+e.length)){e!==(t="function"==typeof t?t(e,s,n):F(t,e,s,n,[],void 0))&&(0===e.length?this.appendRight(s,t):this.overwrite(s,s+e.length,t));break}s=n.indexOf(e,s+e.length)}return this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:n}=this,s=e.length;if(0===s){for(let e=0;e<=n.length;e+=1){if(this._hasRemovedContent(e,e))continue;const s="function"==typeof t?t("",e,n):F(t,"",e,n,[],void 0);""!==s&&this.appendRight(e,s)}return this}for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){if(this._hasRemovedContent(i,i+s))continue;const e=n.slice(i,i+s),r="function"==typeof t?t(e,i,n):F(t,e,i,n,[],void 0);e!==r&&this.overwrite(i,i+s,r)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new v("replaceAll() requires a global RegExp");return this._replaceRegexp(e,t)}};const j=Object.prototype.hasOwnProperty;var U=class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof V)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!C(e)||!e.content)throw new v("addSource() requires a `content` property that is a MagicString");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(t=>{j.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(j.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new v(`duplicate filename "${e.filename}" with different content, use unique filenames`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,t){return this.addSource({content:new V(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(e=>{t.addSource({filename:e.filename,content:e.content.clone(),ignoreList:e.ignoreList,indentExclusionRanges:e.indentExclusionRanges,separator:e.separator})}),t}toMagicString(){const e=new V(this.sources.map(e=>e.content.original).join(""));let t=0,n=this.intro,s=null,i=null;const r=new Map,o=new Map;let a=!1;return this.sources.forEach((l,c)=>{const u=l.content,d=c>0?void 0!==l.separator?l.separator:this.separator:"";if(0===u.original.length)return void(n+=d+u.toString());n+=d+u.intro;let h=null,p=null,f=u.firstChunk;for(;f;){const e=f.clone();e.start+=t,e.end+=t,e.previous=p,e.next=null,p&&(p.next=e),r.set(e.start,e),o.set(e.end,e),h??=e,p=e,f=f.next}const m=p;h.intro=n+h.intro,n="",m.outro+=u.outro,i?(i.next=h,h.previous=i):s=h,i=m;for(let n=0;n<u.original.length;n+=1)u.sourcemapLocations.has(n)&&e.sourcemapLocations.add(n+t);Object.keys(u.storedNames).forEach(t=>{Object.defineProperty(e.storedNames,t,{writable:!0,value:!0,enumerable:!0})}),u.hasMovedChunks&&(a=!0),t+=u.original.length}),s?(n&&(i.outro+=n),e.firstChunk=s,e.lastChunk=i,e.lastSearchedChunk=s,e.byStart=r,e.byEnd=o,e.hasMovedChunks=a,e):(e.intro=n,e)}generateDecodedMap(e={}){const t=new _(e.hires),{names:n,x_google_ignoreList:s}=this._generateMappings(t);return{...this._mapProperties(e,n,s),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e={}){const t=new D,n=new _(e.hires,t),{names:s,x_google_ignoreList:i}=this._generateMappings(n);return new P({...this._mapProperties(e,s,i),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){const t=[];let n;return this.sources.forEach(e=>{Object.keys(e.content.storedNames).forEach(e=>{t.includes(e)||t.push(e)})}),this.intro&&e.advance(this.intro),this.sources.forEach((s,i)=>{i>0&&e.advance(void 0!==s.separator?s.separator:this.separator);const r=s.filename?this.uniqueSourceIndexByFilename[s.filename]:-1,o=s.content,a=$(o.original);o.intro&&e.advance(o.intro),o.firstChunk.eachNext(n=>{const i=a(n.start);n.intro.length&&e.advance(n.intro),s.filename?n.edited?e.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):e.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):e.advance(n.content),n.outro.length&&e.advance(n.outro)}),o.outro&&e.advance(o.outro),s.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))}),{names:t,x_google_ignoreList:n}}_mapProperties(e,t,n){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(t=>e.file?w(e.file,t.filename):t.filename),sourcesContent:this.uniqueSources.map(t=>("function"==typeof e.includeContent?e.includeContent(t):e.includeContent)?t.content:null),names:t,x_google_ignoreList:n}}getIndentString(){const e={};return this.sources.forEach(t=>{const n=t.content._getRawIndentString();null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort((t,n)=>e[n]-e[t])[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach((n,s)=>{const i=void 0!==n.separator?n.separator:this.separator,r=t||s>0&&/\r?\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:r}),t="\n"===n.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(t,n)=>n>0?e+t:t)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return(t>0?n:"")+e.content.toString()}).join("");return this.intro+e}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return t>0&&""!==n.trim()||!e.content.isEmpty()}))}length(){return this.sources.reduce((e,t,n)=>{const s=void 0!==t.separator?t.separator:this.separator;return e+(n>0?s.length:0)+t.content.toString().length},this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp(`^${e||"\\s"}+`);if(this.intro=this.intro.replace(t,""),!this.intro)for(let n=0;n<this.sources.length;n+=1){const s=this.sources[n];if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))break;if(s.content.trimStartAborted(e))break}return this}trimEnd(e){const t=new RegExp(`${e||"\\s"}+$`);for(let n=this.sources.length-1;n>=0;n-=1){const s=this.sources[n];if(s.content.trimEndAborted(e))return this;if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))return this}return this.intro=this.intro.replace(t,""),this}};const G=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,H=/^\.?\.\//,W=/\\/g,q=/[/\\]/,K=/[/\\]+$/;function X(e){return G.test(e)}function J(e){return H.test(e)}function Y(e){return e.replace(W,"/")}function Z(e){return e.replace(K,"").split(q).pop()||""}function Q(e){const t=e.replace(K,""),n=/[/\\][^/\\]*$/.exec(t);return n?t.slice(0,-n[0].length)||"/":""===t?e?"/":".":e!==t&&/^[A-Za-z]:$/.test(t)?t:"."}function ee(e){const t=Z(e);if("."===t||".."===t)return"";const n=t.lastIndexOf(".");return n>0?t.slice(n):""}function te(e,t=!1){const n=[];for(const s of e)".."===s?n.length>0&&".."!==n[n.length-1]?n.pop():t||n.push(".."):"."!==s&&""!==s&&n.push(s);return n.join("/")}function ne(e,t){const n=e.split(q).filter(Boolean),s=t.split(q).filter(Boolean);for("."===n[0]&&n.shift(),"."===s[0]&&s.shift();n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;".."===s[0]&&n.length>0;)s.shift(),n.pop();for(;n.pop();)s.unshift("..");return s.join("/")}function se(...e){let t=[],n=!1;for(const s of e)X(s)?(t=s.split(q),n=!0):t.push(...s.split(q));const s=te(t,n);return n?/^[A-Za-z]:/.test(s)?s:"/"+s:s||"/"}function ie(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const re={isNoStatement:!0};function oe(e,t,n=0){let s,i;for(s=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>=s)return s;i=e.charCodeAt(++n),++n,(n=47===i?e.indexOf("\n",n)+1:e.indexOf("*/",n)+2)>s&&(s=e.indexOf(t,n))}}const ae=/\S/g;function le(e,t){return ae.lastIndex=t,ae.exec(e).index}const ce=/\s/;function ue(e,t){return t>0&&13===e.charCodeAt(t-1)?t-1:t}function de(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[ue(e,t),t+1];if(n=e.charCodeAt(s+1),47===n)return[s,t+1];s=e.indexOf("*/",s+2)+2,s>t&&(t=e.indexOf("\n",s))}}function he(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+de(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=u,c=e[n],u=void 0!==c&&(!c.included||c.needsBoundaries),a||u?(l=r.end+de(t.original.slice(r.end,void 0===c?s:c.start))[1],r.included?a?r.render(t,i,{end:l,start:o}):r.render(t,i):ie(r,t,o,l)):r.render(t,i)}function pe(e,t,n,s){const i=[];let r,o,a,l,c=n-1;for(const s of e){for(void 0!==r&&(c=r.end+oe(t.original.slice(r.end,s.start),",")),o=a=c+1+de(t.original.slice(c+1,s.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&i.push({contentEnd:a,end:o,node:r,separator:c,start:n}),r=s,n=o}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function fe(e,t,n){for(;;){const[s,i]=de(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function me(e,{exportNamesByVariable:t,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(1===e.length&&1===t.get(e[0]).length){const s=e[0];return`exports(${JSON.stringify(t.get(s)[0])},${n}${s.getName(i)}${r})`}{const n=[];for(const s of e)for(const e of t.get(s))n.push([e,s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function ge(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function ye(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${me([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const be=Object.freeze(Object.create(null)),Ee=Object.freeze({}),xe=Object.freeze([]),ve=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function Ae(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function Se(){return new Set}function Pe(){return[]}const $e=Symbol("Unknown Key"),we=Symbol("Unknown Non-Accessor Key"),Ie=Symbol("Unknown Integer"),Ce=Symbol("Unknown Well-Known"),ke=Symbol("Symbol.toStringTag"),Ne=Symbol("Symbol.asyncDispose"),Oe=Symbol("Symbol.dispose"),Re=Symbol("Symbol.hasInstance"),De=new Set([ke,Ne,Oe,Re]),Me=e=>De.has(e)||e===Ce,_e=new Set([Re,Ne,Oe]),Le=e=>"string"==typeof e||De.has(e),Te=[],Be=[$e],ze=[we],Fe=[Ie],Ve=[Re],je=Symbol("Entities");class Ue{constructor(){this.entityPaths=Object.create(null,{[je]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const n=this.getEntities(e);return!!n.has(t)||(n.add(t),!1)}withTrackedEntityAtPath(e,t,n,s){const i=this.getEntities(e);if(i.has(t))return s;i.add(t);const r=n();return i.delete(t),r}getEntities(e){let t=this.entityPaths;for(const n of e)t=t[n]||=Object.create(null,{[je]:{value:new Set}});return t[je]}}const Ge=new Ue;class He{constructor(){this.entityPaths=Object.create(null,{[je]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[je]:{value:new Map}});const i=Ae(s[je],t,Se);return!!i.has(n)||(i.add(n),!1)}}const We=Object.freeze({[$e]:Ee});class qe{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0,n=this,s="includedPaths",i=this.includedPaths||=(t=!1,Object.create(null));for(const r of e){if(i[$e])return!0;if(!Le(r))return n[s]=We,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}}const Ke=Object.freeze({[$e]:!0});class Xe{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[$e])return!0;const[s,i]=e;return s?Le(s)?i?n[s]===$e||(n[s]=$e,!1):!!n[s]||(n[s]=!0,!1):(this.includedPaths=Ke,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[$e])e.includePath([...n,$e],t);else{const i=Object.entries(s);if(0===i.length)e.includePath(n,t);else for(const[s,r]of i)e.includePath(r===$e?[...n,s,$e]:[...n,s],t)}}}function Je(e,t){return 0!==(e&t)}function Ye(e,t,n){return e&~t|-n&t}const Ze=Symbol("Unknown Value"),Qe=Symbol("Unknown Truthy Value"),et=Symbol("Unknown Falsy Value");class tt{constructor(){this.flags=0}get included(){return Je(this.flags,1)}set included(e){this.flags=Ye(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){it(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Ze}getReturnExpressionWhenCalledAtPath(e,t,n,s){return st}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,t){this.included||this.includeNode(t)}includeCallArgumentsWhenCalledAtPath(e,t,n){rt(t,n)}shouldBeIncluded(e){return!0}}const nt=new class extends tt{},st=[nt,!1],it=e=>{for(const t of e.args)t?.deoptimizePath(Be)},rt=(e,t)=>{e.args[0]?.includePath(Be,t),ot(e,t)},ot=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(Be,t),s.include(t,!1))}},at={args:[null],type:0},lt={args:[null,nt],type:1},ct={args:[null],type:2,withNew:!1},ut=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function dt(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function ht(e,t,n){let s=e,i=1;for(;t.has(s)||ut.has(s)||n?.has(s);)s=`${e}$${dt(i++)}`;return t.add(s),s}function pt(e,t){return e.start<=t&&t<e.end}function ft(e,t,n){return function(e,t={}){const{offsetLine:n=0,offsetColumn:s=0}=t;let i=0;const r=e.split("\n").map((e,t)=>{const n=i+e.length+1,s={start:i,end:n,line:t};return i=n,s});let o=0;return function(t,i){if("string"==typeof t&&(t=e.indexOf(t,i??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(pt(a,t))return{line:n+a.line,column:s+t-a.start,character:t};o+=l,a=r[o]}}}(e,n)(t,n&&n.startIndex)}function mt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const gt="...";function yt(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(mt(s[t-1].slice(0,n)).length+10+3,120),r=Math.max(0,t-3);let o=Math.min(t+2,s.length);for(s=s.slice(r,o);!/\S/.test(s[s.length-1]);)s.pop(),o-=1;const a=String(o).length;return s.map((e,s)=>{const o=r+s+1===t;let l=String(s+r+1);for(;l.length<a;)l=` ${l}`;let c=mt(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${gt}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+mt(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const bt="silent",Et="warn",xt="info",vt="debug",At={[vt]:0,[xt]:1,[bt]:3,[Et]:2};function St(e,t){const n=e.length<=1,s=e.map(e=>`"${e}"`);let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return t&&(i+=` ${n?t[0]:t[1]}`),i}function Pt(e){const t=Z(e);return t.slice(0,Math.max(0,t.length-ee(e).length))}function $t(e){return X(e)?ne(se(),e):e}function wt(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||X(e)}const It=/^(\.\.\/)*\.\.$/;function Ct(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=Y(ne(Q(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+Z(t);if(It.test(i))return[...i.split("/"),"..",Z(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function kt(e){return`https://rollupjs.org/${e}`}const Nt="troubleshooting/#error-name-is-not-exported-by-module",Ot="configuration-options/#jsx",Rt="configuration-options/#output-amd-id",Dt="configuration-options/#output-dir",Mt="configuration-options/#output-exports",_t="configuration-options/#output-format",Lt="configuration-options/#output-globals",Tt="configuration-options/#output-inlinedynamicimports",Bt="configuration-options/#output-interop",zt="configuration-options/#output-manualchunks",Ft="configuration-options/#output-name",Vt="configuration-options/#output-sourcemapfile",jt="es-module-syntax/#source-phase-import",Ut="plugin-development/#generatebundle";function Gt(e){throw e instanceof Error?e:Ht(e)}function Ht(e){Kt(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function Wt(e,t,n,s){if("object"==typeof t){const{line:n,column:i}=t;e.loc={column:i,file:s,line:n}}else{e.pos=t;const i=ft(n,t,{offsetLine:1});if(!i)return;const{line:r,column:o}=i;e.loc={column:o,file:s,line:r}}if(void 0===e.frame){const{line:t,column:s}=e.loc;e.frame=yt(n,t,s)}}const qt=Symbol("augmented");function Kt(e){if(!e.plugin&&!e.loc||e[qt])return;e[qt]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const n=e.id||e.loc?.file;if(n){const s=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${$t(n)}${s}: `}const s=e.message;e.message=t+e.message,xn(e,s)}const Xt="CANNOT_SERIALIZE_AST",Jt="INVALID_EXPORT_OPTION",Yt="INVALID_IMPORT_ATTRIBUTE",Zt="INVALID_PLUGIN_HOOK",Qt="MISSING_EXPORT",en="MISSING_IMPLICIT_DEPENDANT",tn="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",nn="PARSE_ERROR",sn="SOURCEMAP_BROKEN",rn="UNEXPECTED_NAMED_IMPORT",on="UNRESOLVED_ENTRY",an="UNRESOLVED_IMPORT";function ln(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function cn(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function un(e,t,n){return{code:Xt,message:`Could not serialize AST: Found unknown node type "${e}" ${t?`in ${t}.${n}`:"at the root"}.`}}function dn({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return Wt(i,n,t,e),i}function hn(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map($t).join(" -> ")}`}}function pn(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${$t(t)}" was reexported through module "${$t(n)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${$t(s)}" to point directly to the exporting module or ${i?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function fn(e){return{code:"EMPTY_MANUAL_CHUNK",message:`Manual chunk "${e}" was not generated as none of its modules are included in the bundle.`,names:[e],url:kt(zt)}}function mn(e){return{code:"FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY",message:`The output file name "${e}" is not contained in the output directory. Make sure all file names are relative paths without ".." segments.`}}function gn(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${$t(t)} is at (${n}:${s})\n${yt(e,n,s)}`}}function yn(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${$t(t)}".`}}function bn(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${$t(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:kt("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function En(e,t){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${t}" hook used by the output plugin ${e} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function xn(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function vn(e,t,n){return{code:Jt,message:`"${e}" was specified for "output.exports", but entry module "${$t(n)}" has the following exports: ${St(t)}`,url:kt(Mt)}}function An(e){return{code:Yt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${$t(e)}". Import attributes need to have string keys and values.`}}function Sn(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:kt(t)}}function Pn(e,t){return{binding:e,code:Qt,exporter:t,message:`Exported variable "${e}" is not defined in "${$t(t)}".`,url:kt(Nt)}}function $n(e,t,n,s){const i={binding:e,code:Qt,exporter:n,id:t,url:kt(Nt)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${$t(n)}", but it is imported by "${$t(t)}".`};const r=".json"===ee(n);return{...i,message:`"${e}" is not exported by "${$t(n)}", imported by "${$t(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function wn(e){const t=[...e.implicitlyLoadedBefore].map(e=>$t(e.id)).sort();return{code:en,message:`Module "${$t(e.id)}" that should be implicitly loaded before ${St(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function In(e,t){return{code:"NON_EXTERNAL_SOURCE_PHASE_IMPORT",message:`Source phase import "${e}" in "${$t(t)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,url:kt(jt)}}function Cn(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function kn(e,t){return{code:nn,message:e,pos:t}}function Nn(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function On(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}function Rn(e,t){let n=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),xn({cause:e,code:nn,id:t,message:n,stack:e.stack},e.message)}function Dn(e,t,{hook:n,id:s}={}){const i=e.code;return e.pluginCode||null==i||"string"==typeof i&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code="PLUGIN_ERROR",e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function Mn(e){return{code:sn,message:`Multiple conflicting contents for sourcemap source ${e}`}}function _n(e,t,n){const s=n?"reexport":"import";return{code:rn,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${$t(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:kt(Bt)}}function Ln(e){return{code:rn,exporter:e,message:`There was a namespace "*" reexport from the external module "${$t(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:kt(Bt)}}function Tn(e){return{code:"VALIDATION_ERROR",message:e}}function Bn(e,t,n,s,i){!function(e,t,n,s,i,r){if(n||i){const n=function(e,t,n){return{code:"DEPRECATED_FEATURE",message:e,url:kt(t),...n?{plugin:n}:{}}}(e,t,r);if(i)return Gt(n);s(Et,n)}}(e,t,n,s.onLog,s.strictDeprecations,i)}const zn="ArrowFunctionExpression",Fn="BlockStatement",Vn="CallExpression",jn="ExportDefaultDeclaration",Un="ExpressionStatement",Gn="FunctionExpression",Hn="Identifier",Wn="MemberExpression",qn="PanicError",Kn="ParseError",Xn="Program",Jn="Property",Yn="StaticBlock",Zn=(e,t)=>{const{length:n}=e,{length:s}=t;return 0===n?t:0===s?e:n+s>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};function Qn(e,t=null){return Object.create(t,e)}const es=new class extends tt{getLiteralValueAtPath(e){return e.length>0?Ze:void 0}},ts={value:{hasEffectsWhenCalled:null,returns:nt}},ns=new class extends tt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?ms(us,e[0]):st}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||fs(us,e[0],t,n)}},ss={value:{hasEffectsWhenCalled:null,returns:ns}},is=new class extends tt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?ms(ds,e[0]):st}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||fs(ds,e[0],t,n)}},rs={value:{hasEffectsWhenCalled:null,returns:is}},os=new class extends tt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?ms(ps,e[0]):st}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||fs(ps,e[0],t,n)}},as={value:{hasEffectsWhenCalled:null,returns:os}},ls={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Te,Ge,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Te,ct,t)},returns:os}},cs=Qn({hasOwnProperty:ss,isPrototypeOf:ss,propertyIsEnumerable:ss,toLocaleString:as,toString:as,valueOf:ts}),us=Qn({valueOf:ss},cs),ds=Qn({toExponential:as,toFixed:as,toLocaleString:as,toPrecision:as,valueOf:rs},cs),hs=Qn({exec:ts,test:ss},cs),ps=Qn({anchor:as,at:ts,big:as,blink:as,bold:as,charAt:as,charCodeAt:rs,codePointAt:ts,concat:as,endsWith:ss,fixed:as,fontcolor:as,fontsize:as,includes:ss,indexOf:rs,italics:as,lastIndexOf:rs,link:as,localeCompare:rs,match:ts,matchAll:ts,normalize:as,padEnd:as,padStart:as,repeat:as,replace:ls,replaceAll:ls,search:rs,slice:as,small:as,split:ts,startsWith:ss,strike:as,sub:as,substr:as,substring:as,sup:as,toLocaleLowerCase:as,toLocaleUpperCase:as,toLowerCase:as,toString:as,toUpperCase:as,trim:as,trimEnd:as,trimLeft:as,trimRight:as,trimStart:as,valueOf:as},cs);function fs(e,t,n,s){return"string"!=typeof t||!e[t]||e[t].hasEffectsWhenCalled?.(n,s)||!1}function ms(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:st}class gs extends tt{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===Vn&&e.parent.callee===e||e.parent.type===jn||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;if(t?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,t);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(n)}`:n}hasEffectsOnInteractionAtPath(e,{type:t},n){return 0!==t||e.length>0}includePath(e,t){this.included=!0,this.renderedLikeHoisted?.includePath(e,t)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}addReassignedValue(e){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class ys extends gs{constructor(e,t,n,s,i,r){super(e),this.init=n,this.initPath=s,this.kind=r,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.reassignedValues=null,this.includedPathTracker=new qe,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.module}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(Be)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?it(e):n.withTrackedEntityAtPath(t,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],n)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.markReassigned();const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=xe;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,$e])}else this.init.deoptimizePath(Zn(this.initPath,e))}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?Ze:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),Ze)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?st:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),st)}hasEffectsOnInteractionAtPath(e,t,n){if(e.length+this.initPath.length>6)return!0;switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}}includePath(e,t){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,t);for(const e of this.declarations){e.included||e.include(t,!1);let n=e.parent;for(;!n.included&&(n.includeNode(t),n.type!==Xn);)n=n.parent}e.length>0&&(this.init.includePath(Zn(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(Be,t)))}}includeCallArgumentsWhenCalledAtPath(e,t,n){if(this.isReassigned){rt(t,n);const s=n.includedCallArgumentsOfPossibleValues;return n.includedCallArgumentsOfPossibleValues??=new He,this.includeCallArgumentsOfPossibleValues(e,t,n,n.includedCallArgumentsOfPossibleValues),void(n.includedCallArgumentsOfPossibleValues=s)}n.includedCallArguments.has(this.init)||e.length+this.initPath.length>6?rt(t,n):(n.includedCallArguments.add(this.init),this.init.includeCallArgumentsWhenCalledAtPath([...this.initPath,...e],t,n),n.includedCallArguments.delete(this.init))}includeCallArgumentsOfPossibleValues(e,t,n,s){if(!(null===this.reassignedValues||e.length+this.initPath.length>6)){this.includeCallArgumentsOfPossibleValue(this.init,[...this.initPath,...e],t,n,s);for(const i of this.reassignedValues)this.includeCallArgumentsOfPossibleValue(i,e,t,n,s)}}includeCallArgumentsOfPossibleValue(e,t,n,s,i){e===nt||e===es||i.trackEntityAtPathAndGetIfTracked(t,n,e)||e.includeCallArgumentsWhenCalledAtPath(t,n,s)}addReassignedValue(e){(this.reassignedValues??=[]).push(e)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=nt,this.markReassigned()),this.additionalInitializers}}class bs{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){if("var"===i&&"var"===o.kind)return o.addDeclaration(e,n),o;t.error(Nn(r),e.start)}const a=new ys(e.name,e,n,s,t,i);return this.variables.set(r,a),a}addHoistedVariable(e,t){(this.hoistedVariables||=new Map).set(e,t)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class Es extends bs{constructor(e,t){super(),this.parent=e,this.context=t,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof Es&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const n=t.get(this)||new Set;for(const t of e)n.add(t);t.set(this,n),this.parent instanceof Es&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Es&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())s.included&&(e.add(s.getBaseVariableName()),"system"===t&&n.has(s)&&e.add("exports"));const i=s.get(this);if(i)for(const t of i)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,n){const s=new Set;if(this.addUsedOutsideNames(s,e,t,n),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&s.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,ht(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const t=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,t),t}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}}function xs(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}function vs(e,t){if("MemberExpression"===e.type)return!e.computed&&vs(e.object,e);if("Identifier"!==e.type)return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}function As(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedCallArgumentsOfPossibleValues:null,includedLabels:new Set}}function Ss(){return{accessed:new Ue,assigned:new Ue,brokenFlow:!1,called:new He,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new He,replacedVariableInits:new Map}}const Ps=Symbol("PureFunction"),$s="*source";class ws extends gs{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t,this.isSourcePhase=t===$s}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}includePath(e,t){super.includePath(e,t),this.module.used=!0}}function Is(e,t){for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n).get;Object.defineProperty(e,n,{get(){const s=t.call(e);return Object.defineProperty(e,n,{value:s}),s}})}}const Cs=/[^\w$]/g,ks=/[^\w$]/,Ns=e=>(e=>/\d/.test(e[0]))(e)||ut.has(e)||"arguments"===e;function Os(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(Cs,"_"),Ns(e)&&(e=`_${e}`),e||"_"}const Rs=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Ds=/^(?:0|[1-9]\d*)$/;function Ms(e){return Rs.test(e)?"__proto__"===e?'["__proto__"]':e:Ds.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function _s(e){return Rs.test(e)?e:JSON.stringify(e)}class Ls{constructor(e,t,n,s,i,r,o){this.options=e,this.id=t,this.rawId=n,this.renormalizeRenderPath=r,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.importersByExportedName=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map;const a=new URLSearchParams(o);a.sort();const l=a.toString(),c=l?`?${l}`:"";this.suggestedVariableName=Os(`${n.split(/[/\\]/).pop()}${c}`);const{importers:u,dynamicImporters:d}=this;this.info={ast:null,attributes:o,code:null,dynamicallyImportedIdResolutions:xe,dynamicallyImportedIds:xe,get dynamicImporters(){return d.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:xe,implicitlyLoadedBefore:xe,importedIdResolutions:xe,importedIds:xe,get importers(){return u.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,rawId:n,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){Is(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:t}){const n=this.declarations.get(e);for(const n of t)Ae(this.importersByExportedName,e,Se).add(n);if(n)return[n];const s=new ws(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter(([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced).map(([e])=>e);if(0===e.length)return;const t=new Set;for(const n of e){const e=this.importersByExportedName.get(n);for(const n of this.importers)e?.has(n)&&t.add(n)}const n=[...t];var s,i,r;this.options.onLog(Et,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${St(i=e,["is","are"])} imported from external module "${s}" but never used in ${St(r.map(e=>$t(e)))}.`,names:i})}}function Ts(e){e.isExecuted=!0;const t=[e],n=new Set;for(const e of t)for(const s of[...e.dependencies,...e.implicitlyLoadedBefore])s instanceof Ls||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Bs=()=>{},zs={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},Fs="variables",Vs=Symbol("IS_SKIPPED_CHAIN");class js extends tt{get deoptimized(){return Je(this.flags,2)}set deoptimized(e){this.flags=Ye(this.flags,2,e)}constructor(e,t){super(),this.parent=e,this.scope=t,this.createScope(t)}addExportedVariables(e,t){}bind(){for(const e of zs[this.type]){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of zs[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n)){for(const t of n)if(t?.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(Te,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of zs[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.include(e,t);else s.include(e,t)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of zs[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(Be,e);else n.includePath(Be,e)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of zs[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.render(e,t);else s.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(Ss())}applyDeoptimizations(){this.deoptimized=!0;for(const e of zs[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Be);else t.deoptimizePath(Be)}this.scope.context.requestTreeshakingPass()}}function Us(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function Gs(){this.included=!0}function Hs(){this.deoptimized=!0}function Ws(e){return e instanceof js&&e.type===zn}function qs(e){return e instanceof js&&e.type===Gn}function Ks(e){return e instanceof js&&e.type===Hn}class Xs extends tt{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Fe),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Be)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?st:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||nt:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:t,type:n},s){if(e.length>(0===n?1:0))return!0;if(2===n){if(!0===this.description.mutatesSelfAsArray&&t[0]?.hasEffectsOnInteractionAtPath(Fe,lt,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(Te,ct,s))return!0}return!1}}const Js=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ns})],Ys=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:os})],Zs=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:is})],Qs=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:nt})],ei=/^\d+$/;class ti extends tt{get hasLostTrack(){return Je(this.flags,2048)}set hasLostTrack(e){this.flags=Ye(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return Je(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=Ye(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return Je(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=Ye(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.alwaysIncludedProperties=new Set,this.deoptimizedPaths=new Map,this.expressionsToBeDeoptimizedByKey=new Map,this.gettersByKey=new Map,this.propertiesAndGettersByKey=new Map,this.propertiesAndSettersByKey=new Map,this.settersByKey=new Map,this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of e.values())this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...this.propertiesAndGettersByKey.values(),...this.settersByKey.values()])for(const t of e)t.deoptimizePath(Be);this.prototypeExpression?.deoptimizePath([$e,$e]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const[s,...i]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||Le(s)&&this.deoptimizedPaths.get(s)))return void it(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(Le(s)){if(a.get(s)){const t=l.get(s);if(t)for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if("string"==typeof s&&ei.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...l.values(),c])for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of this.propertiesAndGettersByKey.entries())if("string"==typeof e&&ei.test(e))for(const e of t)e.deoptimizePath(Be);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===Ie)return this.deoptimizeIntegerProperties();if(!Le(t))return this.deoptimizeAllProperties(t===we);if(!this.deoptimizedPaths.get(t)){this.deoptimizedPaths.set(t,!0);const e=this.expressionsToBeDeoptimizedByKey.get(t);if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?Be:e.slice(1);for(const e of Le(t)?[...this.propertiesAndGettersByKey.get(t)||this.unmatchablePropertiesAndGetters,...this.settersByKey.get(t)||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[e[0],$e]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Ze;const s=e[0],i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getLiteralValueAtPath(e.slice(1),t,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,n):1!==e.length?Ze:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return st;const[i,...r]=e,o=this.getMemberExpressionAndTrackDeopt(i,s);return o?o.getReturnExpressionWhenCalledAtPath(r,t,n,s):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,n,s):st}hasEffectsOnInteractionAtPath(e,t,n){const[s,...i]=e;if(i.length>0||2===t.type){const r=this.getMemberExpression(s);return r?r.hasEffectsOnInteractionAtPath(i,t,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}if(s===we)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(Le(s)){if(r.get(s)){const e=o.get(s);if(e)for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(i,t,n))return!0}else for(const e of[...o.values(),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;for(const n of this.allProperties)(t||n.shouldBeIncluded(e)||this.alwaysIncludedProperties.has(n))&&n.include(e,t);this.prototypeExpression?.include(e,t)}includePath(e,t){this.included=!0;for(const e of this.alwaysIncludedProperties)e.includePath(Be,t);if(0===e.length)return;const[n,...s]=e,[i,r]=Le(n)?[new Set([...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(n)||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,Be];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,...i]=e;if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Le(s)||this.deoptimizedPaths.get(s)||"string"==typeof s&&ei.test(s)&&this.hasUnknownDeoptimizedInteger)return void rt(t,n);const r=this.propertiesAndGettersByKey.get(s);if(void 0===r)this.unmatchablePropertiesAndGetters.length>0||"string"==typeof s&&ei.test(s)&&this.unknownIntegerProps.length>0||!this.prototypeExpression?rt(t,n):this.prototypeExpression.includeCallArgumentsWhenCalledAtPath(e,t,n);else{t.args[0]?.includePath(Be,n);for(const e of r)e.includeCallArgumentsWhenCalledAtPath(i,t,n)}}buildPropertyMaps(e){const{allProperties:t,alwaysIncludedProperties:n,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:r,gettersByKey:o,unknownIntegerProps:a,unmatchablePropertiesAndGetters:l,unmatchablePropertiesAndSetters:c,unmatchableGetters:u,unmatchableSetters:d}=this;for(let h=e.length-1;h>=0;h--){const{key:p,kind:f,property:m}=e[h];if(t.push(m),!Me(p)||_e.has(p)||(n.add(m),p!==Ce))if(Le(p))"set"===f?i.has(p)||(i.set(p,[m,...c]),r.set(p,[m,...d])):"get"===f?s.has(p)||(s.set(p,[m,...l]),o.set(p,[m,...u])):(i.has(p)||i.set(p,[m,...c]),s.has(p)||s.set(p,[m,...l]));else{if(p===Ie){a.push(m);continue}"set"===f&&d.push(m),"get"===f&&u.push(m),"get"!==f&&c.push(m),"set"!==f&&l.push(m)}}}deoptimizeCachedEntities(){for(const e of this.expressionsToBeDeoptimizedByKey.values())for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Be)}deoptimizeCachedIntegerEntities(){for(const[e,t]of this.expressionsToBeDeoptimizedByKey.entries())if("string"==typeof e&&ei.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Fe)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Le(e)||this.hasUnknownDeoptimizedInteger&&"string"==typeof e&&ei.test(e)||this.deoptimizedPaths.get(e))return nt;const t=this.propertiesAndGettersByKey.get(e);return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&"string"==typeof e&&ei.test(e)?nt:null}getMemberExpressionAndTrackDeopt(e,t){if(!Le(e))return nt;const n=this.getMemberExpression(e);if(n!==nt&&!this.immutable){let n=this.expressionsToBeDeoptimizedByKey.get(e);n||this.expressionsToBeDeoptimizedByKey.set(e,n=[]),n.push(t)}return n}}const ni=e=>"string"==typeof e&&/^\d+$/.test(e),si=new class extends tt{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||ni(t[0])||it(e)}getLiteralValueAtPath(e){return 1===e.length&&ni(e[0])?void 0:Ze}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ii=new ti(new Map([["hasOwnProperty",Js],["isPrototypeOf",Js],["propertyIsEnumerable",Js],["toLocaleString",Ys],["toString",Ys],["valueOf",Qs]]),si,!0),ri=[{key:Ie,kind:"init",property:nt},{key:"length",kind:"init",property:is}],oi=[new Xs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ns})],ai=[new Xs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:is})],li=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new ti(ri,yi),returnsPrimitive:null})],ci=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ti(ri,yi),returnsPrimitive:null})],ui=[new Xs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ti(ri,yi),returnsPrimitive:null})],di=[new Xs({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:is})],hi=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:nt})],pi=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:nt})],fi=[new Xs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:nt})],mi=[new Xs({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],gi=[new Xs({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],yi=new ti(new Map([["at",pi],["concat",ci],["copyWithin",mi],["entries",ci],["every",oi],["fill",mi],["filter",ui],["find",fi],["findIndex",ai],["findLast",fi],["findLastIndex",ai],["flat",ci],["flatMap",ui],["forEach",fi],["includes",Js],["indexOf",Zs],["join",Ys],["keys",Qs],["lastIndexOf",Zs],["map",ui],["pop",hi],["push",di],["reduce",fi],["reduceRight",fi],["reverse",mi],["shift",hi],["slice",ci],["some",oi],["sort",gi],["splice",li],["toLocaleString",Ys],["toString",Ys],["unshift",di],["values",pi]]),ii,!0);class bi extends js{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,Be,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(Be,at,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Be,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([$e,$e]),this.scope.context.requestTreeshakingPass()}}class Ei extends js{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.elements)t&&t?.includePath(Be,e)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;t<this.elements.length;t++){const n=this.elements[t];n&&(e||n instanceof bi)&&(e=!0,n.deoptimizePath(Be))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:is}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof bi?s&&(t=!0,e.unshift({key:Ie,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:es})}return this.objectEntity=new ti(e,yi)}}const xi=Symbol("Value Properties"),vi=()=>Ze,Ai=()=>!1,Si=()=>!0,Pi=e=>({__proto__:null,[xi]:{deoptimizeArgumentsOnCall:Bs,getLiteralValue:()=>e,hasEffectsWhenCalled:Si}}),$i={deoptimizeArgumentsOnCall:Bs,getLiteralValue:vi,hasEffectsWhenCalled:Ai},wi={deoptimizeArgumentsOnCall:Bs,getLiteralValue:vi,hasEffectsWhenCalled:Si},Ii={deoptimizeArgumentsOnCall:Bs,getLiteralValue:vi,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof Ei)},Ci={deoptimizeArgumentsOnCall:Bs,getLiteralValue:vi,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof tt)||s.hasEffectsOnInteractionAtPath(Be,at,t)}},ki={__proto__:null,[xi]:wi},Ni={__proto__:null,[xi]:$i},Oi={__proto__:null,[xi]:Ci},Ri={__proto__:null,[xi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Be)},getLiteralValue:vi,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(ze,lt,t)}},Di={__proto__:null,[xi]:wi,prototype:ki},Mi={__proto__:null,[xi]:$i,prototype:ki},_i={__proto__:null,[xi]:Ii,prototype:ki},Li={__proto__:null,[xi]:$i,from:ki,of:Ni,prototype:ki},Ti={__proto__:null,[xi]:$i,supportedLocalesOf:Mi},Bi={deoptimizeArgumentsOnCall:Bs,getLiteralValue:()=>Ce,hasEffectsWhenCalled:Si},zi={global:ki,globalThis:ki,self:ki,window:ki,__proto__:null,[xi]:wi,Array:{__proto__:null,[xi]:wi,from:ki,isArray:Ni,of:Ni,prototype:ki},ArrayBuffer:{__proto__:null,[xi]:$i,isView:Ni,prototype:ki},AggregateError:_i,Atomics:ki,BigInt:Di,BigInt64Array:Di,BigUint64Array:Di,Boolean:Mi,constructor:Di,DataView:Mi,Date:{__proto__:null,[xi]:$i,now:Ni,parse:Ni,prototype:ki,UTC:Ni},decodeURI:Ni,decodeURIComponent:Ni,encodeURI:Ni,encodeURIComponent:Ni,Error:Mi,escape:Ni,eval:ki,EvalError:Mi,FinalizationRegistry:Di,Float32Array:Li,Float64Array:Li,Function:Di,hasOwnProperty:ki,Infinity:ki,Int16Array:Li,Int32Array:Li,Int8Array:Li,isFinite:Ni,isNaN:Ni,isPrototypeOf:ki,JSON:ki,Map:_i,Math:{__proto__:null,[xi]:wi,abs:Ni,acos:Ni,acosh:Ni,asin:Ni,asinh:Ni,atan:Ni,atan2:Ni,atanh:Ni,cbrt:Ni,ceil:Ni,clz32:Ni,cos:Ni,cosh:Ni,exp:Ni,expm1:Ni,floor:Ni,fround:Ni,hypot:Ni,imul:Ni,log:Ni,log10:Ni,log1p:Ni,log2:Ni,max:Ni,min:Ni,pow:Ni,random:Ni,round:Ni,sign:Ni,sin:Ni,sinh:Ni,sqrt:Ni,tan:Ni,tanh:Ni,trunc:Ni},NaN:ki,Number:{__proto__:null,[xi]:$i,isFinite:Ni,isInteger:Ni,isNaN:Ni,isSafeInteger:Ni,parseFloat:Ni,parseInt:Ni,prototype:ki},Object:{__proto__:null,[xi]:$i,create:Ni,defineProperty:Ri,defineProperties:Ri,freeze:Ri,getOwnPropertyDescriptor:Ni,getOwnPropertyDescriptors:Ni,getOwnPropertyNames:Ni,getOwnPropertySymbols:Ni,getPrototypeOf:Ni,hasOwn:Ni,is:Ni,isExtensible:Ni,isFrozen:Ni,isSealed:Ni,keys:Ni,fromEntries:ki,entries:Oi,values:Oi,prototype:ki},parseFloat:Ni,parseInt:Ni,Promise:{__proto__:null,[xi]:wi,all:ki,allSettled:ki,any:ki,prototype:ki,race:ki,reject:ki,resolve:ki},propertyIsEnumerable:ki,Proxy:{__proto__:null,[xi]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{var n;if((n=t)instanceof js&&"ObjectExpression"===n.type&&!t.properties.some(e=>e.type!==Jn))for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},Te,Ge);else e.deoptimizePath(Be)},getLiteralValue:vi,hasEffectsWhenCalled:Si}},RangeError:Mi,ReferenceError:Mi,Reflect:ki,RegExp:Mi,Set:_i,SharedArrayBuffer:Di,String:{__proto__:null,[xi]:$i,fromCharCode:Ni,fromCodePoint:Ni,prototype:ki,raw:Ni},Symbol:{__proto__:null,[xi]:$i,for:Ni,keyFor:Ni,prototype:ki,asyncDispose:Pi(Oe),dispose:Pi(Ne),hasInstance:Pi(Re),toStringTag:Pi(ke)},SyntaxError:Mi,toLocaleString:ki,toString:ki,TypeError:Mi,Uint16Array:Li,Uint32Array:Li,Uint8Array:Li,Uint8ClampedArray:Li,unescape:Ni,URIError:Mi,valueOf:ki,WeakMap:_i,WeakRef:Di,WeakSet:_i,clearInterval:Di,clearTimeout:Di,console:{__proto__:null,[xi]:wi,assert:Di,clear:Di,count:Di,countReset:Di,debug:Di,dir:Di,dirxml:Di,error:Di,exception:Di,group:Di,groupCollapsed:Di,groupEnd:Di,info:Di,log:Di,table:Di,time:Di,timeEnd:Di,timeLog:Di,trace:Di,warn:Di},Intl:{__proto__:null,[xi]:wi,Collator:Ti,DateTimeFormat:Ti,DisplayNames:Ti,ListFormat:Ti,Locale:Ti,NumberFormat:Ti,PluralRules:Ti,RelativeTimeFormat:Ti,Segmenter:Ti},setInterval:Di,setTimeout:Di,TextDecoder:Di,TextEncoder:Di,URL:{__proto__:null,[xi]:wi,prototype:ki,canParse:Ni},URLSearchParams:Di,AbortController:Di,AbortSignal:Di,addEventListener:ki,alert:ki,AnalyserNode:Di,Animation:Di,AnimationEvent:Di,applicationCache:ki,ApplicationCache:Di,ApplicationCacheErrorEvent:Di,atob:ki,Attr:Di,Audio:Di,AudioBuffer:Di,AudioBufferSourceNode:Di,AudioContext:Di,AudioDestinationNode:Di,AudioListener:Di,AudioNode:Di,AudioParam:Di,AudioProcessingEvent:Di,AudioScheduledSourceNode:Di,AudioWorkletNode:Di,BarProp:Di,BaseAudioContext:Di,BatteryManager:Di,BeforeUnloadEvent:Di,BiquadFilterNode:Di,Blob:Di,BlobEvent:Di,blur:ki,BroadcastChannel:Di,btoa:ki,ByteLengthQueuingStrategy:Di,Cache:Di,caches:ki,CacheStorage:Di,cancelAnimationFrame:ki,cancelIdleCallback:ki,CanvasCaptureMediaStreamTrack:Di,CanvasGradient:Di,CanvasPattern:Di,CanvasRenderingContext2D:Di,ChannelMergerNode:Di,ChannelSplitterNode:Di,CharacterData:Di,clientInformation:ki,ClipboardEvent:Di,close:ki,closed:ki,CloseEvent:Di,Comment:Di,CompositionEvent:Di,confirm:ki,ConstantSourceNode:Di,ConvolverNode:Di,CountQueuingStrategy:Di,createImageBitmap:ki,Credential:Di,CredentialsContainer:Di,crypto:ki,Crypto:Di,CryptoKey:Di,CSS:Di,CSSConditionRule:Di,CSSFontFaceRule:Di,CSSGroupingRule:Di,CSSImportRule:Di,CSSKeyframeRule:Di,CSSKeyframesRule:Di,CSSMediaRule:Di,CSSNamespaceRule:Di,CSSPageRule:Di,CSSRule:Di,CSSRuleList:Di,CSSStyleDeclaration:Di,CSSStyleRule:Di,CSSStyleSheet:Di,CSSSupportsRule:Di,CustomElementRegistry:Di,customElements:ki,CustomEvent:{__proto__:null,[xi]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:vi,hasEffectsWhenCalled:Ai},prototype:ki},DataTransfer:Di,DataTransferItem:Di,DataTransferItemList:Di,defaultstatus:ki,defaultStatus:ki,DelayNode:Di,DeviceMotionEvent:Di,DeviceOrientationEvent:Di,devicePixelRatio:ki,dispatchEvent:ki,document:ki,Document:Di,DocumentFragment:Di,DocumentType:Di,DOMError:Di,DOMException:Di,DOMImplementation:Di,DOMMatrix:Di,DOMMatrixReadOnly:Di,DOMParser:Di,DOMPoint:Di,DOMPointReadOnly:Di,DOMQuad:Di,DOMRect:Di,DOMRectReadOnly:Di,DOMStringList:Di,DOMStringMap:Di,DOMTokenList:Di,DragEvent:Di,DynamicsCompressorNode:Di,Element:Di,ErrorEvent:Di,Event:Di,EventSource:Di,EventTarget:Di,external:ki,fetch:ki,File:Di,FileList:Di,FileReader:Di,find:ki,focus:ki,FocusEvent:Di,FontFace:Di,FontFaceSetLoadEvent:Di,FormData:Di,frames:ki,GainNode:Di,Gamepad:Di,GamepadButton:Di,GamepadEvent:Di,getComputedStyle:ki,getSelection:ki,HashChangeEvent:Di,Headers:Di,history:ki,History:Di,HTMLAllCollection:Di,HTMLAnchorElement:Di,HTMLAreaElement:Di,HTMLAudioElement:Di,HTMLBaseElement:Di,HTMLBodyElement:Di,HTMLBRElement:Di,HTMLButtonElement:Di,HTMLCanvasElement:Di,HTMLCollection:Di,HTMLContentElement:Di,HTMLDataElement:Di,HTMLDataListElement:Di,HTMLDetailsElement:Di,HTMLDialogElement:Di,HTMLDirectoryElement:Di,HTMLDivElement:Di,HTMLDListElement:Di,HTMLDocument:Di,HTMLElement:Di,HTMLEmbedElement:Di,HTMLFieldSetElement:Di,HTMLFontElement:Di,HTMLFormControlsCollection:Di,HTMLFormElement:Di,HTMLFrameElement:Di,HTMLFrameSetElement:Di,HTMLHeadElement:Di,HTMLHeadingElement:Di,HTMLHRElement:Di,HTMLHtmlElement:Di,HTMLIFrameElement:Di,HTMLImageElement:Di,HTMLInputElement:Di,HTMLLabelElement:Di,HTMLLegendElement:Di,HTMLLIElement:Di,HTMLLinkElement:Di,HTMLMapElement:Di,HTMLMarqueeElement:Di,HTMLMediaElement:Di,HTMLMenuElement:Di,HTMLMetaElement:Di,HTMLMeterElement:Di,HTMLModElement:Di,HTMLObjectElement:Di,HTMLOListElement:Di,HTMLOptGroupElement:Di,HTMLOptionElement:Di,HTMLOptionsCollection:Di,HTMLOutputElement:Di,HTMLParagraphElement:Di,HTMLParamElement:Di,HTMLPictureElement:Di,HTMLPreElement:Di,HTMLProgressElement:Di,HTMLQuoteElement:Di,HTMLScriptElement:Di,HTMLSelectElement:Di,HTMLShadowElement:Di,HTMLSlotElement:Di,HTMLSourceElement:Di,HTMLSpanElement:Di,HTMLStyleElement:Di,HTMLTableCaptionElement:Di,HTMLTableCellElement:Di,HTMLTableColElement:Di,HTMLTableElement:Di,HTMLTableRowElement:Di,HTMLTableSectionElement:Di,HTMLTemplateElement:Di,HTMLTextAreaElement:Di,HTMLTimeElement:Di,HTMLTitleElement:Di,HTMLTrackElement:Di,HTMLUListElement:Di,HTMLUnknownElement:Di,HTMLVideoElement:Di,IDBCursor:Di,IDBCursorWithValue:Di,IDBDatabase:Di,IDBFactory:Di,IDBIndex:Di,IDBKeyRange:Di,IDBObjectStore:Di,IDBOpenDBRequest:Di,IDBRequest:Di,IDBTransaction:Di,IDBVersionChangeEvent:Di,IdleDeadline:Di,IIRFilterNode:Di,Image:Di,ImageBitmap:Di,ImageBitmapRenderingContext:Di,ImageCapture:Di,ImageData:Di,indexedDB:ki,innerHeight:ki,innerWidth:ki,InputEvent:Di,IntersectionObserver:Di,IntersectionObserverEntry:Di,isSecureContext:ki,KeyboardEvent:Di,KeyframeEffect:Di,length:ki,localStorage:ki,location:ki,Location:Di,locationbar:ki,matchMedia:ki,MediaDeviceInfo:Di,MediaDevices:Di,MediaElementAudioSourceNode:Di,MediaEncryptedEvent:Di,MediaError:Di,MediaKeyMessageEvent:Di,MediaKeySession:Di,MediaKeyStatusMap:Di,MediaKeySystemAccess:Di,MediaList:Di,MediaQueryList:Di,MediaQueryListEvent:Di,MediaRecorder:Di,MediaSettingsRange:Di,MediaSource:Di,MediaStream:Di,MediaStreamAudioDestinationNode:Di,MediaStreamAudioSourceNode:Di,MediaStreamEvent:Di,MediaStreamTrack:Di,MediaStreamTrackEvent:Di,menubar:ki,MessageChannel:Di,MessageEvent:Di,MessagePort:Di,MIDIAccess:Di,MIDIConnectionEvent:Di,MIDIInput:Di,MIDIInputMap:Di,MIDIMessageEvent:Di,MIDIOutput:Di,MIDIOutputMap:Di,MIDIPort:Di,MimeType:Di,MimeTypeArray:Di,MouseEvent:Di,moveBy:ki,moveTo:ki,MutationEvent:Di,MutationObserver:Di,MutationRecord:Di,name:ki,NamedNodeMap:Di,NavigationPreloadManager:Di,navigator:ki,Navigator:Di,NetworkInformation:Di,Node:Di,NodeFilter:ki,NodeIterator:Di,NodeList:Di,Notification:Di,OfflineAudioCompletionEvent:Di,OfflineAudioContext:Di,offscreenBuffering:ki,OffscreenCanvas:Di,open:ki,openDatabase:ki,Option:Di,origin:ki,OscillatorNode:Di,outerHeight:ki,outerWidth:ki,PageTransitionEvent:Di,pageXOffset:ki,pageYOffset:ki,PannerNode:Di,parent:ki,Path2D:Di,PaymentAddress:Di,PaymentRequest:Di,PaymentRequestUpdateEvent:Di,PaymentResponse:Di,performance:ki,Performance:Di,PerformanceEntry:Di,PerformanceLongTaskTiming:Di,PerformanceMark:Di,PerformanceMeasure:Di,PerformanceNavigation:Di,PerformanceNavigationTiming:Di,PerformanceObserver:Di,PerformanceObserverEntryList:Di,PerformancePaintTiming:Di,PerformanceResourceTiming:Di,PerformanceTiming:Di,PeriodicWave:Di,Permissions:Di,PermissionStatus:Di,personalbar:ki,PhotoCapabilities:Di,Plugin:Di,PluginArray:Di,PointerEvent:Di,PopStateEvent:Di,postMessage:ki,Presentation:Di,PresentationAvailability:Di,PresentationConnection:Di,PresentationConnectionAvailableEvent:Di,PresentationConnectionCloseEvent:Di,PresentationConnectionList:Di,PresentationReceiver:Di,PresentationRequest:Di,print:ki,ProcessingInstruction:Di,ProgressEvent:Di,PromiseRejectionEvent:Di,prompt:ki,PushManager:Di,PushSubscription:Di,PushSubscriptionOptions:Di,queueMicrotask:ki,RadioNodeList:Di,Range:Di,ReadableStream:Di,RemotePlayback:Di,removeEventListener:ki,Request:Di,requestAnimationFrame:ki,requestIdleCallback:ki,resizeBy:ki,ResizeObserver:Di,ResizeObserverEntry:Di,resizeTo:ki,Response:Di,RTCCertificate:Di,RTCDataChannel:Di,RTCDataChannelEvent:Di,RTCDtlsTransport:Di,RTCIceCandidate:Di,RTCIceTransport:Di,RTCPeerConnection:Di,RTCPeerConnectionIceEvent:Di,RTCRtpReceiver:Di,RTCRtpSender:Di,RTCSctpTransport:Di,RTCSessionDescription:Di,RTCStatsReport:Di,RTCTrackEvent:Di,screen:ki,Screen:Di,screenLeft:ki,ScreenOrientation:Di,screenTop:ki,screenX:ki,screenY:ki,ScriptProcessorNode:Di,scroll:ki,scrollbars:ki,scrollBy:ki,scrollTo:ki,scrollX:ki,scrollY:ki,SecurityPolicyViolationEvent:Di,Selection:Di,ServiceWorker:Di,ServiceWorkerContainer:Di,ServiceWorkerRegistration:Di,sessionStorage:ki,ShadowRoot:Di,SharedWorker:Di,SourceBuffer:Di,SourceBufferList:Di,speechSynthesis:ki,SpeechSynthesisEvent:Di,SpeechSynthesisUtterance:Di,StaticRange:Di,status:ki,statusbar:ki,StereoPannerNode:Di,stop:ki,Storage:Di,StorageEvent:Di,StorageManager:Di,styleMedia:ki,StyleSheet:Di,StyleSheetList:Di,SubtleCrypto:Di,SVGAElement:Di,SVGAngle:Di,SVGAnimatedAngle:Di,SVGAnimatedBoolean:Di,SVGAnimatedEnumeration:Di,SVGAnimatedInteger:Di,SVGAnimatedLength:Di,SVGAnimatedLengthList:Di,SVGAnimatedNumber:Di,SVGAnimatedNumberList:Di,SVGAnimatedPreserveAspectRatio:Di,SVGAnimatedRect:Di,SVGAnimatedString:Di,SVGAnimatedTransformList:Di,SVGAnimateElement:Di,SVGAnimateMotionElement:Di,SVGAnimateTransformElement:Di,SVGAnimationElement:Di,SVGCircleElement:Di,SVGClipPathElement:Di,SVGComponentTransferFunctionElement:Di,SVGDefsElement:Di,SVGDescElement:Di,SVGDiscardElement:Di,SVGElement:Di,SVGEllipseElement:Di,SVGFEBlendElement:Di,SVGFEColorMatrixElement:Di,SVGFEComponentTransferElement:Di,SVGFECompositeElement:Di,SVGFEConvolveMatrixElement:Di,SVGFEDiffuseLightingElement:Di,SVGFEDisplacementMapElement:Di,SVGFEDistantLightElement:Di,SVGFEDropShadowElement:Di,SVGFEFloodElement:Di,SVGFEFuncAElement:Di,SVGFEFuncBElement:Di,SVGFEFuncGElement:Di,SVGFEFuncRElement:Di,SVGFEGaussianBlurElement:Di,SVGFEImageElement:Di,SVGFEMergeElement:Di,SVGFEMergeNodeElement:Di,SVGFEMorphologyElement:Di,SVGFEOffsetElement:Di,SVGFEPointLightElement:Di,SVGFESpecularLightingElement:Di,SVGFESpotLightElement:Di,SVGFETileElement:Di,SVGFETurbulenceElement:Di,SVGFilterElement:Di,SVGForeignObjectElement:Di,SVGGElement:Di,SVGGeometryElement:Di,SVGGradientElement:Di,SVGGraphicsElement:Di,SVGImageElement:Di,SVGLength:Di,SVGLengthList:Di,SVGLinearGradientElement:Di,SVGLineElement:Di,SVGMarkerElement:Di,SVGMaskElement:Di,SVGMatrix:Di,SVGMetadataElement:Di,SVGMPathElement:Di,SVGNumber:Di,SVGNumberList:Di,SVGPathElement:Di,SVGPatternElement:Di,SVGPoint:Di,SVGPointList:Di,SVGPolygonElement:Di,SVGPolylineElement:Di,SVGPreserveAspectRatio:Di,SVGRadialGradientElement:Di,SVGRect:Di,SVGRectElement:Di,SVGScriptElement:Di,SVGSetElement:Di,SVGStopElement:Di,SVGStringList:Di,SVGStyleElement:Di,SVGSVGElement:Di,SVGSwitchElement:Di,SVGSymbolElement:Di,SVGTextContentElement:Di,SVGTextElement:Di,SVGTextPathElement:Di,SVGTextPositioningElement:Di,SVGTitleElement:Di,SVGTransform:Di,SVGTransformList:Di,SVGTSpanElement:Di,SVGUnitTypes:Di,SVGUseElement:Di,SVGViewElement:Di,TaskAttributionTiming:Di,Text:Di,TextEvent:Di,TextMetrics:Di,TextTrack:Di,TextTrackCue:Di,TextTrackCueList:Di,TextTrackList:Di,TimeRanges:Di,toolbar:ki,top:ki,Touch:Di,TouchEvent:Di,TouchList:Di,TrackEvent:Di,TransitionEvent:Di,TreeWalker:Di,UIEvent:Di,ValidityState:Di,visualViewport:ki,VisualViewport:Di,VTTCue:Di,WaveShaperNode:Di,WebAssembly:ki,WebGL2RenderingContext:Di,WebGLActiveInfo:Di,WebGLBuffer:Di,WebGLContextEvent:Di,WebGLFramebuffer:Di,WebGLProgram:Di,WebGLQuery:Di,WebGLRenderbuffer:Di,WebGLRenderingContext:Di,WebGLSampler:Di,WebGLShader:Di,WebGLShaderPrecisionFormat:Di,WebGLSync:Di,WebGLTexture:Di,WebGLTransformFeedback:Di,WebGLUniformLocation:Di,WebGLVertexArrayObject:Di,WebSocket:Di,WheelEvent:Di,Window:Di,Worker:Di,WritableStream:Di,XMLDocument:Di,XMLHttpRequest:Di,XMLHttpRequestEventTarget:Di,XMLHttpRequestUpload:Di,XMLSerializer:Di,XPathEvaluator:Di,XPathExpression:Di,XPathResult:Di,XSLTProcessor:Di};for(const e of["window","global","self","globalThis"])zi[e]=zi;function Fi(e){let t=zi;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return"Symbol"===e[0]&&2===e.length?Bi:null}return t[xi]}class Vi extends gs{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Fi([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Fi([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Fi([this.name,...e]);return s?s.getLiteralValue():Ze}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Fi([this.name]):!Fi([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Fi([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const ji=new Set(["class","const","let","var","using","await using"]);class Ui extends js{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Je(this.flags,4)?Je(this.flags,8):null}set isTDZAccess(e){this.flags=Ye(this.flags,4,!0),this.flags=Ye(this.flags,8,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const[i,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,n,s);return[i,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof Vi&&!this.isPureFunction(Te)&&this.variable.hasEffectsOnInteractionAtPath(Te,at,e)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,n);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n)}}include(e,t){this.included||this.includeNode(e),t&&this.variable?.includePath(Be,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Te,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}includeCallArgumentsWhenCalledAtPath(e,t,n){this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof ys&&this.variable.kind&&ji.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&Gi(this)===Gi(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof ys&&(this.variable.module.isExecuted||Ts(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isVariableReference&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}disallowImportReassignment(){return this.scope.context.error(yn(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?nt:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[Ps])return!0;t=t[n]}return t?.[Ps]}}function Gi(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class Hi extends tt{constructor(e,t){super(),this.object=e,this.path=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...t],n)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([...this.path,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],t,n)}}class Wi extends Ui{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return Je(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=Ye(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&vs(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0)}declare(e,t,n){let s;const{treeshake:i}=this.scope.context.options;return"parameter"===e?s=this.scope.addParameterDeclaration(this,t):(s=this.scope.addDeclaration(this,this.scope.context,n,t,e),"var"===e&&i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization()),[this.variable=s]}deoptimizeAssignment(e,t){this.deoptimizePath(Te),0===e.length&&this.variable?.addReassignedValue(t),t.deoptimizePath([...e,$e])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,at,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new Hi(n,t.slice(0,-1))],type:0},t,Ge));const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;let i=this.included;return(i||=t.length>0&&!e.brokenFlow&&s&&("always"===s||n.hasEffectsOnInteractionAtPath(t,at,Ss())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,Te,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=be){if(this.variable){const o=this.variable.getName(t,n);o!==this.name&&(e.overwrite(this.start,this.end,o,{contentOnly:!0,storeName:!0}),r&&e.prependRight(this.start,`${this.name}: `)),"eval"===o&&s===Vn&&i&&e.appendRight(this.start,"0, ")}}}class qi extends js{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Je(this.flags,1024)}set computed(e){this.flags=Ye(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},Te,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getAccessedValue()[0].includeCallArgumentsWhenCalledAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(Te,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=st,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Te,ct,Ge,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}qi.prototype.includeNode=Gs,qi.prototype.applyDeoptimizations=Hs;class Ki extends qi{hasEffects(e){return super.hasEffects(e)||xs(this.decorators,e)}}class Xi extends js{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Es(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)||xs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,n):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,n))||!1:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.superClass?.include(e,t),this.body.include(e,t);for(const n of this.decorators)n.include(e,t);this.id&&(this.id.markDeclarationReached(),this.id.include(e,t))}initialise(){super.initialise(),this.id?.declare("class",Te,this);for(const e of this.body.body)if(e instanceof Ki&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.type===Yn||e.static||e instanceof Ki&&"constructor"===e.kind||e.deoptimizePath(Be);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(n.type===Yn)continue;const s=n.static?e:t,i=n.kind;if(s===t&&!i)continue;const r="set"===i||"get"===i?i:"init";let o;if(n.computed){const e=n.key.getLiteralValueAtPath(Te,Ge,this);if("symbol"==typeof e){s.push({key:Me(e)?e:$e,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Wi?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new ti(t,this.superClass?new Hi(this.superClass,["prototype"]):ii)}),this.objectEntity=new ti(e,this.superClass||ii)}}Xi.prototype.includeNode=Us;class Ji extends Xi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===s&&n.has(o)&&e.appendLeft(this.end,`${i}${me([o],t)};`);const l=o.getName(r);if(l!==a)return this.decorators.map(n=>n.render(e,t)),this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:n,variable:s}=e;for(const e of t.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class Yi extends ys{constructor(e){super("arguments",null,nt,Te,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=Zi}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}includePath(e,t){super.includePath(e,t);for(const e of this.deoptimizedArguments)e.deoptimizePath(Be);this.deoptimizedArguments.length=0}}function Zi(e){this.included?e.deoptimizePath(Be):this.deoptimizedArguments?.push(e)}const Qi=xe,er=new Set([$e]),tr=new Ue,nr=new Set([nt]);class sr extends ys{constructor(e,t,n,s){super(e,t,nt,n,s,"parameter"),this.includedPathTracker=new Xe,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Ue,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Ze}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===nt){if(!this.argumentsToBeDeoptimized.has(nt)){this.argumentsToBeDeoptimized.add(nt);for(const{interaction:e}of this.deoptimizationInteractions)it(e);this.deoptimizationInteractions=Qi}}else if(this.deoptimizedFields.has($e))e.deoptimizePath([...this.initPath,$e]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([...this.initPath,t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...n],Ge)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=xe}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,Ge,this));if(this.knownValue===e||this.knownValue instanceof Wi&&e instanceof Wi&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,Ge,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||nt}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return Ze;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),Ze)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,t,n):!(2===s?(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.argumentsToBeDeoptimized.has(nt)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has($e)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)it(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],Ge);this.argumentsToBeDeoptimized.has(nt)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has($e))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.argumentsToBeDeoptimized)e.deoptimizePath([...this.initPath,t]);t===$e&&(this.deoptimizationInteractions=Qi,this.deoptimizations=tr,this.deoptimizedFields=er,this.argumentsToBeDeoptimized=nr)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Be):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),st}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class ir extends sr{constructor(e){super("this",null,Te,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||nt).hasEffectsOnInteractionAtPath(e,t,n)}}class rr extends Es{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const a=o.kind;if("parameter"===a&&"CatchClause"===o.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,es,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(Nn(r),e.start)}const a=this.parent.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class or extends Es{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const s=o.kind;if(!("var"!==i&&"function"!==i||"var"!==s&&"function"!==s&&"parameter"!==s))return o.addDeclaration(e,n),o;t.error(Nn(r),e.start)}const a=new ys(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class ar extends Es{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new rr(this):new or(this)}addParameterDeclaration(e,t){const{name:n,start:s}=e;if(this.variables.get(n))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(n),s);const i=new sr(n,e,t,this.context);return this.variables.set(n,i),this.bodyScope.addHoistedVariable(n,i),i}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments({args:e},t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];let r=e.length-1;for(let n=1;n<e.length;n++){const i=e[n];i instanceof bi&&!s&&(s=!0,r=n-1),s&&(i.includePath(Be,t),i.include(t,!1))}for(let o=r;o>=1;o--){const r=this.parameters[o-1]||i,a=e[o];if(r)if(n=!1,0===r.length)s=!0;else for(const e of r)e.calledFromTryStatement&&(n=!0),e.included&&(s=!0,n?a.include(t,!0):(e.includeArgumentPaths(a,t),a.include(t,!1)));(s||a.shouldBeIncluded(t))&&(s=!0,a.include(t,n))}}}class lr extends ar{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:t}=this;let n=0;for(;n<e.length-1;n++){const s=e[n+1];if(s instanceof bi){for(;n<t.length;n++){e[n+1]?.deoptimizePath(Be);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(Be);else{const e=t[n];if(e)for(const t of e)t.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const s=this.hasRest?t.length-1:t.length;for(;n<s;n++)for(const e of t[n])e.addArgumentForDeoptimization(es)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(Be),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){const{returnExpressions:e}=this;if(1===e.length)this.returnExpression=e[0];else{const[t]=e;if(t&&this.returnExpressionsResolveToSameVariable(t))this.returnExpression=t;else{this.returnExpression=nt;for(const t of e)t.deoptimizePath(Be)}}}returnExpressionsResolveToSameVariable(e){return!(!Ks(e)||null===e.variable)&&this.returnExpressions.every(t=>Ks(t)&&t.variable===e.variable)}}class cr extends lr{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new Yi(n)),this.variables.set("this",this.thisVariable=new ir(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=e;for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(Be,t),s.include(t,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class ur extends Es{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o)return"var"===o.kind||"var"===i&&"parameter"===o.kind?(o.addDeclaration(e,n),o):t.error(Nn(r),e.start);const a=this.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class dr extends js{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===Xn&&this.scope.context.log(Et,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${$t(t)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,t){super.render(e,t),";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Xn:super.shouldBeIncluded(e)}}dr.prototype.includeNode=Gs,dr.prototype.applyDeoptimizations=Hs;class hr extends js{get deoptimizeBody(){return Je(this.flags,32768)}set deoptimizeBody(e){this.flags=Ye(this.flags,32768,e)}get directlyIncluded(){return Je(this.flags,16384)}set directlyIncluded(e){this.flags=Ye(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(nt)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new ur(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}}initialise(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof dr&&"use asm"===e.directive}render(e,t){this.body.length>0?he(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}hr.prototype.includeNode=Gs,hr.prototype.applyDeoptimizations=Hs;class pr extends js{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1}get async(){return Je(this.flags,256)}set async(e){this.flags=Ye(this.flags,256,e)}get deoptimizedReturn(){return Je(this.flags,512)}set deoptimizedReturn(e){this.flags=Ye(this.flags,512,e)}get generator(){return Je(this.flags,4194304)}set generator(e){this.flags=Ye(this.flags,4194304,e)}get hasCachedEffects(){return Je(this.flags,67108864)}set hasCachedEffects(e){this.flags=Ye(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){2===e.type&&0===t.length?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===$e&&(this.scope.getReturnExpression().deoptimizePath(Be),this.scope.deoptimizeAllParameters())}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(Be),this.scope.context.requestTreeshakingPass()),st):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],ct,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],at,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;for(let e=0;e<this.params.length;e++){const i=this.params[e];if(i.hasEffects(n)||s&&i.hasEffectsWhenDestructuring(n,Te,t.args[e+1]||es))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;const{parent:t}=this;return"VariableDeclarator"===t.type?e=t.id.variable??null:t.type===jn&&(e=t.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArgumentsWhenCalledAtPath(e,t,n){0===e.length?this.scope.includeCallArguments(t,n):this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}initialise(){super.initialise(),this.body instanceof hr?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>"noSideEffects"===e.type))}}pr.prototype.preventChildBlockScope=!0,pr.prototype.includeNode=Gs,pr.prototype.applyDeoptimizations=Hs;class fr extends pr{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new cr(e,this),this.constructedEntity=new ti(new Map,ii),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(0===e.length&&2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:nt);const{brokenFlow:s,ignore:i,replacedVariableInits:r}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(n))return this.hasCachedEffects=!0,!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}include(e,t){super.include(e,t),this.id?.include(e,t);const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Wi&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof Wi&&!t||n.includePath(Be,e)}initialise(){super.initialise(),this.id?.declare("function",Te,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ti([{key:"prototype",kind:"init",property:new ti([],ii)}],ii)}}class mr extends fr{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}}class gr extends js{bind(){super.bind();const e=this.declarationName||this.scope.context.getModuleName();this.variable.name=this.scope.variables.get(e)?`${e}_default`:e}include(e,t){this.included=!0,this.declaration.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable,Be,e)}includePath(e,t){this.included=!0,this.declaration.includePath(e,t)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n,r=function(e,t){return le(e,oe(e,"default",t)+7)}(e.original,this.start);let o=!1;if(this.declaration instanceof mr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=oe(e,"function",t)+8;e=e.slice(n,oe(e,"(",n));const s=oe(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Ji)this.renderNamedDeclaration(e,r,null===this.declaration.id?oe(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void ie(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Un}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));o=this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t),o&&e.appendLeft(this.end,";")}renderNamedDeclaration(e,t,n,s){const{exportNamesByVariable:i,format:r,snippets:{getPropertyAccess:o}}=s,a=this.variable.getName(o);e.remove(this.start,t),null!==n&&e.appendLeft(n,` ${a}`),"system"===r&&this.declaration instanceof Ji&&i.has(this.variable)&&e.appendLeft(this.end,` ${me([this.variable],s)};`)}renderVariableDeclaration(e,t,{format:n,exportNamesByVariable:s,snippets:{cnst:i,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===n&&s.get(this.variable);return a?(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = exports(${JSON.stringify(a[0])}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";")),!1):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),!o)}}gr.prototype.needsBoundaries=!0,gr.prototype.includeNode=Gs,gr.prototype.applyDeoptimizations=Hs;const yr=/[\n\r'\\\u2028\u2029]/,br=/([\n\r'\u2028\u2029])/g,Er=/\\/g;function xr(e){return yr.test(e)?e.replace(Er,"\\\\").replace(br,"\\$1"):e}const vr="_interopDefault",Ar="_interopDefaultCompat",Sr="_interopNamespace",Pr="_interopNamespaceCompat",$r="_interopNamespaceDefault",wr="_interopNamespaceDefaultOnly",Ir="_mergeNamespaces",Cr="_documentCurrentScript",kr={auto:vr,compat:Ar,default:null,defaultOnly:null,esModule:null},Nr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Or={auto:Sr,compat:Pr,default:$r,defaultOnly:wr,esModule:null},Rr=(e,t)=>"esModule"!==e&&Nr(e,t),Dr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of qr)t.has(e)&&a.add(e);return qr.map(e=>a.has(e)?Mr[e](n,s,i,r,o,a):"").join("")},Mr={[Cr]:(e,{_:t,n:n})=>`var ${Cr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[Ar](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ar});return`${o}${Tr(t)}${s}?${s}${n?_r(t):Lr(t)}${a}${r}${r}`},[vr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:vr});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?_r(t):Lr(t)}${a}${r}${r}`},[Pr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has($r)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Pr});return`${e}${Tr(t)}${o}?${o}e${o}:${o}${$r}(e)${n}${l}${l}`}return`function ${Pr}(e)${o}{${l}${e}if${o}(${Tr(t)})${o}return e;${l}`+Br(e,e,t,n,s,i)+`}${l}${l}`},[wr](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:wr});return`${c}${Hr(s,Wr(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[$r](e,t,n,s,i){const{_:r,n:o}=t;return`function ${$r}(e)${r}{${o}`+Br(e,e,t,n,s,i)+`}${o}${o}`},[Sr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has($r)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Sr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${$r}(e)${t}${l}${l}`}return`function ${Sr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Br(e,e,t,n,s,i)+`}${l}${l}`},[Ir](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Ir}(n, m)${r}{${a}${e}${Fr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?jr:Ur:Gr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Hr(s,Wr(i,"n",t))};${a}}${a}${a}`}},_r=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Lr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Tr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Br=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?Vr:Gr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Kr(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${zr(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${Hr(i,"n")}${d}${u}`},zr=(e,t,{_:n,cnst:s,getFunctionIntro:i,s:r})=>"var"!==s||t?`for${n}(${s} k in e)${n}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${r}`,Fr=(e,t,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,i]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${t}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${i});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${a}${n}${n}${i} e${s}=${s}m[i];${a}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${e}${s}}${a}${n}}`},Vr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+jr(e,t+e,n)+`${t}}${i}`},jr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}enumerable:${n}true,${r}${t}${e}get:${n}${o}e[k]${a}${r}${t}});${r}`},Ur=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}if${n}(d)${n}{${r}${t}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}${e}enumerable:${n}true,${r}${t}${e}${e}get:${n}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Gr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Hr=(e,t)=>e?`Object.freeze(${t})`:t,Wr=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Kr(s)})`:t,qr=Object.keys(Mr);function Kr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Xr extends js{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.scope.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.scope.context.code.charCodeAt(this.start)?Ze:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?st:ms(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||1!==e.length||fs(this.members,e[0],t,n)}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return hs;switch(typeof e){case"boolean":return us;case"number":return ds;case"string":return ps}return Object.create(null)}(this.value)}render(){"string"==typeof this.value&&this.scope.context.addIndentExclusionRange([this.start+1,this.end-1])}}function Jr(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Te,Ge,i);if(n===Vs||e.optional&&null==n)return Vs}else if(e.optional&&null==t.getLiteralValueAtPath(Te,Ge,i))return Vs;return e.getLiteralValueAtPath(n,s,i)}function Yr(e){return e.computed?(t=e.property)instanceof Xr?String(t.value):null:e.property.name;var t}function Zr(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Wi)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Qr){const s=Zr(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}Xr.prototype.includeNode=Us;class Qr extends js{constructor(){super(...arguments),this.promiseHandler=null,this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Je(this.flags,1024)}set computed(e){this.flags=Ye(this.flags,1024,e)}get optional(){return Je(this.flags,128)}set optional(e){this.flags=Ye(this.flags,128,e)}get assignmentDeoptimized(){return Je(this.flags,16)}set assignmentDeoptimized(e){this.flags=Ye(this.flags,16,e)}get bound(){return Je(this.flags,32)}set bound(e){this.flags=Ye(this.flags,32,e)}get isUndefined(){return Je(this.flags,64)}set isUndefined(e){this.flags=Ye(this.flags,64,e)}bind(){this.bound=!0;const e=Zr(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=eo(t,e.slice(1),this.scope.context);n?"undefined"===n?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.promiseHandler?this.promiseHandler.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===$e?Be:[this.propertyKey,...t],n):it(e))}deoptimizeAssignment(e,t){this.deoptimizePath(Te),t.deoptimizePath([...e,$e])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=xe,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(Be),this.included&&t.includePath(Be,As());for(const t of e)t.deoptimizeCache()}deoptimizePath(e){if(0===e.length&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined){const{propertyKey:t}=this;this.object.deoptimizePath([t===$e?we:t,...e.length<6?e:[...e.slice(0,6),$e]])}}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==$e&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):Ze}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Jr(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s);if(this.isUndefined)return[es,!1];const i=this.getDynamicPropertyKey();return i!==$e&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):st}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsChainElement(e){if(this.variable||this.isUndefined)return this.hasEffects(e);const t="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return t===Vs?Vs:this.optional&&null==this.object.getLiteralValueAtPath(Te,Ge,this)?t||Vs:(this.deoptimized||this.applyDeoptimizations(),t||this.property.hasEffects(e)||this.hasAccessEffect(e))}hasEffectsAsAssignmentTarget(e,t){return t&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(Te,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],t,n)}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,at,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t),t&&this.variable?.includePath(Be,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,Te,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includeNodeAsAssignmentTarget(e){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,Te,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,t){this.included||this.includeNode(t),this.variable?this.variable?.includePath(e,t):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),$e]],t)}includeAsAssignmentTarget(e,t,n){this.included||this.includeNodeAsAssignmentTarget(e),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,t),this.property.include(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.promiseHandler?0===e.length?this.promiseHandler.includeCallArguments(t,n):rt(t,n):this.variable?this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n):!this.isUndefined&&e.length<6?this.object.includeCallArgumentsWhenCalledAtPath(this.propertyKey===$e?Be:[this.propertyKey,...e],t,n):rt(t,n)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=Yr(this),this.propertyKey=null===this.dynamicPropertyKey?$e:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=be){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:i}}=t;let r=this.variable?this.variable.getName(i):"undefined";n&&s&&(r="0, "+r),e.overwrite(this.start,this.end,r,{contentOnly:!0,storeName:!0})}else n&&s&&e.appendRight(this.start,"0, "),this.object.render(e,t,{renderedSurroundingElement:i}),this.property.render(e,t)}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!(this.variable||this.isUndefined||this.promiseHandler)&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],Ge),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.propertyKey],Ge),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){this.object instanceof Wi&&this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,Be,As()),this.scope.context.log(Et,yn(this.object.name,this.scope.context.module.id),this.start))}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(Te,Ge,this);return this.dynamicPropertyKey="symbol"==typeof e?De.has(e)?e:$e:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function eo(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof ws)return null;const s=t[0].key,[i,r]=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(Et,$n(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return eo(i,t.slice(1),n)}const to="ROLLUP_FILE_URL_",no="ROLLUP_FILE_URL_OBJ_",so="import",io=["cjs","iife","umd"],ro={amd:["document","module","URL"],cjs:["document","require","URL",Cr],es:[],iife:["document","URL",Cr],system:["module"],umd:["document","require","URL",Cr]},oo={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},ao=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,lo=(e,t,n=!1)=>ao(`'${xr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),co=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},uo=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,ho=(e,t)=>uo(`__dirname + '/${xr(e)}'`,t),po=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${Cr} && ${Cr}.tagName.toUpperCase() === 'SCRIPT' && ${Cr}.src || new URL('${xr(e)}', document.baseURI).href)`,fo={amd:(e,t)=>("."!==e[0]&&(e="./"+e),ao(`require.toUrl('${xr(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${ho(e,t)} : ${lo(e,t)})`,es:(e,t)=>ao(`'${xr(e)}', import.meta.url`,t),iife:(e,t)=>lo(e,t),system:(e,t)=>ao(`'${xr(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${ho(e,t)} : ${lo(e,t,!0)})`},mo={amd:co(()=>ao("module.uri, document.baseURI",!1)),cjs:co(e=>`(typeof document === 'undefined' ? ${uo("__filename",!1)} : ${po(e)})`),iife:co(e=>po(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:co(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${uo("__filename",!1)} : ${po(e,!0)})`)};class go extends gs{constructor(){super("undefined")}getLiteralValueAtPath(){}}class yo extends ys{constructor(e,t){super("default",e,e.declaration,Te,t,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const n=e.declaration;(n instanceof mr||n instanceof Ji)&&n.id?(this.hasId=!0,this.originalId=n.id):n instanceof Wi&&(this.originalId=n)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const t=this.getOriginalVariable();t===this?super.addUsedPlace(e):t.addUsedPlace(e)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof go||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const n=new Set;do{n.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof yo&&!n.has(t));return this.originalVariable=t||e}}class bo extends gs{constructor(e){super(e.getModuleName()),this.areAllMembersDeoptimized=!1,this.mergedNamespaces=[],this.nonExplicitNamespacesIncluded=!1,this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(t.length>1||1===t.length&&2===e.type){const s=t[0];"string"==typeof s?this.module.getExportedVariablesByName().get(s)?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):it(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];if("string"==typeof t)this.module.getExportedVariablesByName().get(t)?.deoptimizePath(e.slice(1));else if(!this.areAllMembersDeoptimized){this.areAllMembersDeoptimized=!0;for(const e of this.module.getExportedVariablesByName().values())e.deoptimizePath(Be)}}}getLiteralValueAtPath(e){return e[0]===ke?"Module":Ze}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(0===e.length)return!0;if(1===e.length&&2!==s)return 1===s;const i=e[0];if("string"!=typeof i)return!0;const r=this.module.getExportedVariablesByName().get(i);return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}includePath(e,t){super.includePath(e,t),this.includeMemberPath(e,t)}includeMemberPath(e,t){if(e.length>0){const[n,...s]=e;if("string"==typeof n){const e=this.module.getExportedVariablesByName().get(n);e?this.context.includeVariableInModule(e,s,t):this.includeNonExplicitNamespaces()}else n&&(this.module.includeAllExports(),this.includeNonExplicitNamespaces())}}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Ir],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}}=e,h=[...this.module.getExportedVariablesByName().entries()].filter(([e,t])=>!e.startsWith("*")&&t.included).map(([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${Ms(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]);h.unshift([null,`__proto__:${o}null`]);let p=l(h,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map(e=>e.getName(c));p=`/*#__PURE__*/${Ir}(${p},${o}[${e.join(`,${o}`)}])`}else r&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${Kr(l)})`),s&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${a} ${this.getName(c)}${o}=${o}${p};`,"system"===n&&t.has(this)&&(p+=`${u}${me([this],e)};`),p}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){const{context:n}=e.scope;if(n.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}includeNonExplicitNamespaces(){this.nonExplicitNamespacesIncluded||(this.nonExplicitNamespacesIncluded=!0,this.setMergedNamespaces(this.module.includeAndGetAdditionalMergedNamespaces()))}}bo.prototype.isNamespace=!0;const Eo=e=>Object.create(e,{includePath:{value(t,n){e.includeMemberPath(t,n)}}});class xo extends gs{constructor(e,t,n){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof yo||e instanceof xo;){if(e instanceof yo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof xo&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,t){super.includePath(e,t),this.context.includeVariableInModule(this.syntheticNamespace,[this.name,...e],t)}setRenderNames(e,t){super.setRenderNames(e,t)}}class vo{constructor(e,t,n){this.options=t,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}get moduleSideEffects(){return this.moduleInfo.moduleSideEffects}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options,t=this.moduleInfo.rawId;return this.fileName=("function"==typeof e?e(t,{attributes:this.moduleInfo.attributes}):e[t])||(this.renormalizeRenderPath?Y(ne(this.inputBase,t)):t)}getImportAttributes(e){return this.importAttributes||=Ao(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return xr(this.renormalizeRenderPath?Ct(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function Ao(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]);return n.length>0?t(n,{lineBreakIndent:null}):null}function So(e){return e.endsWith(".js")?e.slice(0,-3):e}function Po(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${So(t)}`:e.id??""}function $o(e,t,n,s,i,r,o,a,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:d,getPropertyAccess:h,n:p,s:f}=i;if(!n)return`${p}${p}${l}${function(e,t,n,s,i){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:u}of t)if(u)return wo(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,h)};`;let m="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:i,name:a,namedExportsMode:l,namespaceVariableName:d,reexports:f}of t)if(f)for(const t of f)if("*"!==t.reexported){const f=wo(a,t.imported,l,i,e,d,s,n,o,h);if(m&&(m+=p),"*"!==t.imported&&t.needsLiveBinding){const[e,n]=u([],{functionReturn:!0,lineBreakIndent:null,name:null});m+=`Object.defineProperty(exports,${c}${JSON.stringify(t.reexported)},${c}{${p}${r}enumerable:${c}true,${p}${r}get:${c}${e}${f}${n}${p}});`}else"__proto__"===t.reexported?m+=`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${f}${p}});`:m+=`exports${h(t.reexported)}${c}=${c}${f};`}for(const{exported:t,local:n}of e){const e=`exports${h(t)}`;e!==n&&(m&&(m+=p),m+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${p}${r}enumerable:${c}true,${p}${r}value:${c}${n}${p}});`:`${e}${c}=${c}${n};`)}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(m&&(m+=p),!t.needsLiveBinding&&a){const t="'__proto__'";m+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${p}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${p}${r}Object.defineProperty(exports,${c}${t},${c}{${p}${r}${r}enumerable:${c}true,${p}${r}${r}value:${c}${e}[${t}]${p}${r}});${p}${p}`}const n=`{${p}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${ko(e,t.needsLiveBinding,r,i)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${d(["k"],{isAsync:!1,name:null})}${n});`}return m?`${p}${p}${m}`:""}function wo(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=kr[t]?i:e;return Nr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Or[o(a)])?r:e:`${e}${c(t)}`}function Io(e){return e([["value","true"]],{lineBreakIndent:null})}function Co(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Io(i)],[null,`[Symbol.toStringTag]:${s}${Kr(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Io(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Kr(i)});`}return""}const ko=(e,t,n,{_:s,getDirectReturnFunction:i,n:r})=>{if(t){const[t,o]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}${n}${n}enumerable:${s}true,${r}${n}${n}get:${s}${t}${e}[k]${o}${r}${n}})`}return`exports[k]${s}=${s}${e}[k]`};function No(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:u}=a,d=new Set,h=[],p=(e,t,n)=>{d.add(t),h.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${n});`)};for(const{defaultVariableName:n,imports:s,importPath:i,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...s||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,wr,o);break}}else{const e=t(i);let r=!1,a=!1;for(const{imported:t,reexported:i}of[...s||[],...c||[]]){let s,c;"default"===t?r||(r=!0,n!==l&&(c=n,s=kr[e])):"*"!==t||"*"===i||a||(a=!0,s=Or[e],c=l),s&&p(c,s,o)}}return`${Dr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function Oo(e,t,n){const s=n.find(e=>e.sourcePhaseImport);s&&Gt(function(e,t,n){return{code:"SOURCE_PHASE_FORMAT_UNSUPPORTED",message:`Source phase imports are not supported for the "${e}" output format, importing "${n}" in "${t}". Use the "es" output format to support source phase imports.`,url:kt(jt)}}(e,t,s.importPath))}function Ro(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":So(e);var n}const Do=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:bench","node:bench/reporters","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:ffi","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/iter","stream/iter","node:stream/promises","stream/promises","node:stream/web","stream/web","node:string_decoder","string_decoder","node:test","node:test/reporters","node:timers","timers","node:timers/promises","timers/promises","node:tls","tls","node:trace_events","trace_events","node:tty","tty","node:url","url","node:util","util","node:util/types","util/types","node:v8","v8","node:vfs","node:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib","node:zlib/iter","zlib/iter"]);function Mo(e,t){const n=t.map(({importPath:e})=>e).filter(e=>Do.has(e)||e.startsWith("node:"));0!==n.length&&e(Et,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${St(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const _o=(e,t)=>e.split(".").map(t).join("");function Lo(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(Et,On(a[0])),a[0]=("function"==typeof n?n(a[0],{attributes:{}}):l?a[0]:n[a[0]])||a[0];const c=a.pop();let u=t,d=[...a.map(e=>(u+=r(e),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(d=`(${d})`),d}function To(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const Bo="_missingExportShim",zo=({dependencies:e,exports:t})=>{const n=new Set(t.map(e=>e.exported));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(e.reexported);return n},Fo=(e,t,{_:n,cnst:s,getObject:i,n:r})=>{if(e){const o=[...e].map(e=>[e,"1"]);return o.unshift([null,`__proto__:${n}null`]),`${r}${t}${s} _starExcludes${n}=${n}${i(o,{lineBreakIndent:{base:t,t:t}})};`}return""},Vo=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",jo=(e,t,n)=>Uo(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function Uo(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(e[0].name)},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map(({name:e,value:s})=>`${t}${Ms(e)}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const Go=(e,t,n)=>Uo(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),Ho=(e,t,n)=>Uo(e.filter(e=>e.local===Bo).map(e=>({name:e.exported,value:Bo})),t,n);function Wo(e,t,n){return e?`${t}${_o(e,n)}`:"null"}var qo={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:v,strict:A}){Mo(h,n),Oo("amd",o,n);const S=n.map(e=>`'${Ro(e.importPath,m.forceJsExtensionForImports)}'`),P=n.map(e=>e.name),{n:$,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&(P.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(P.unshift("require"),S.unshift("'require'")),t.has("module")&&(P.unshift("module"),S.unshift("'module'"));const C=Po(m,o),k=(C?`'${C}',${I}`:"")+(S.length>0?`[${S.join(`,${I}`)}],${I}`:""),N=A?`${I}'use strict';`:"";e.prepend(`${l}${No(n,x,y,b,E,t,a,f)}`);const O=$o(s,n,d,x,f,a,y,v);let R=Co(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);R&&(R=$+$+R),e.append(`${O}${R}${p}`).indent(a).prepend(`${m.define}(${k}(${w(P,{isAsync:!1,name:null})}{${N}${$}${$}`).append(`${$}${$}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,outro:h,snippets:p},{compact:f,esModule:m,externalLiveBindings:g,freeze:y,interop:b,generatedCode:{symbols:E},reexportProtoFromExternal:x,strict:v}){Oo("cjs",o,n);const{_:A,n:S}=p,P=v?`'use strict';${S}${S}`:"";let $=Co(d&&r,c&&(!0===m||"if-default-prop"===m&&i),u&&E,p);$&&($+=S+S);const w=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:u}of e)c||u?(r+=i&&o?",":`${r?`;${s}`:""}${n} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=i&&!o?",":`;${s}`),o=!1,r+=`require('${a}')`);return r?`${r};${s}${s}`:""}(n,p,f),I=No(n,b,g,y,E,t,a,p);e.prepend(`${P}${l}${$}${w}${I}`);const C=$o(s,n,d,b,p,a,g,x,`module.exports${A}=${A}`);e.append(`${C}${h}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:d}){const{n:h}=a,p=function(e,t,{_:n}){const s=[];for(const{importPath:i,reexports:r,imports:o,name:a,attributes:l,sourcePhaseImport:c}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(c&&s.push(`import source ${c} from${n}${e}`),r||o){if(o){let t=null,i=null;const r=[];for(const e of o)"default"===e.imported?t=e:"*"===e.imported?i=e:r.push(e);i&&s.push(`import${n}*${n}as ${i.local} from${n}${e}`),t&&0===r.length?s.push(`import ${t.local} from${n}${e}`):r.length>0&&s.push(`import ${t?`${t.local},${n}`:""}{${n}${r.map(e=>e.imported===e.local?e.imported:`${_s(e.imported)} as ${e.local}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}if(r){let t=null;const i=[],l=[];for(const e of r)"*"===e.reexported?t=e:"*"===e.imported?i.push(e):l.push(e);if(t&&s.push(`export${n}*${n}from${n}${e}`),i.length>0){o&&o.some(e=>"*"===e.imported&&e.local===a)||s.push(`import${n}*${n}as ${a} from${n}${e}`);for(const e of i)s.push(`export${n}{${n}${a===e.reexported?a:`${a} as ${_s(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?_s(e.imported):`${_s(e.imported)} as ${_s(e.reexported)}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else c||s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=Dr(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=new Array(e.length);let r=0;for(const o of e)o.expression&&s.push(`${n} ${o.local}${t}=${t}${o.expression};`),i[r++]=o.exported===o.local?o.local:`${o.local} as ${_s(o.exported)}`;return i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`),s}(o,a);f.length>0&&e.append(h+h+f.join(h).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{compact:p,esModule:f,extend:m,freeze:g,externalLiveBindings:y,reexportProtoFromExternal:b,globals:E,interop:x,name:v,generatedCode:{symbols:A},strict:S}){Oo("iife",o,n);const{_:P,getNonArrowFunctionIntro:$,getPropertyAccess:w,n:I}=h,C=v&&v.includes("."),k=!m&&!C;if(v&&k&&(Ns(N=v)||ks.test(N)))return Gt(function(e){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:kt("configuration-options/#output-extend")}}(v));var N;Mo(u,n);const O=To(n),R=O.map(e=>e.globalName||"null"),D=O.map(e=>e.name);r&&!v&&u(Et,{code:tn,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:kt(Ft)}),r&&(c||"exports.default"===s[0]?.local)&&(m?(R.unshift(`this${_o(v,w)}${P}=${P}this${_o(v,w)}${P}||${P}{}`),D.unshift("exports")):(R.unshift("{}"),D.unshift("exports")));const M=S?`${a}'use strict';${I}`:"",_=No(n,x,y,g,A,t,a,h);e.prepend(`${l}${_}`);let L=`(${$(D,{isAsync:!1,name:null})}{${I}${M}${I}`;r&&(!v||m&&c||(L=(k?`var ${v}`:`this${_o(v,w)}`)+`${P}=${P}${L}`),C&&(L=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(Et,On(l[0])),l[0]=("function"==typeof n?n(l[0],{attributes:{}}):c?l[0]:n[l[0]])||l[0],l.pop();let u=t;return l.map(e=>(u+=i(e),`${u}${s}=${s}${u}${s}||${s}{}${r}`)).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(v,"this",E,h,p,u)+L));let T=`${I}${I}})(${R.join(`,${P}`)});`;r&&!m&&c&&(T=`${I}${I}${a}return exports;${T}`);const B=$o(s,n,c,x,h,a,y,b);let z=Co(c&&r,!0===f||"if-default-prop"===f&&i,A,h);z&&(z=I+I+z),e.append(`${B}${z}${d}`).indent(a).prepend(L).append(T)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,id:r,indent:o,intro:a,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:d,freeze:h,name:p,generatedCode:{symbols:f},strict:m,systemNullSetters:g}){Oo("system",r,n);const{_:y,getFunctionIntro:b,getNonArrowFunctionIntro:E,n:x,s:v}=l,{importBindings:A,setters:S,starExcludes:P}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let u=null;for(const{imports:d,reexports:h}of e){const p=[];if(d)for(const e of d)l.push(e.local),"*"===e.imported?p.push(`${e.local}${s}=${s}module;`):p.push(`${e.local}${s}=${s}module${o(e.imported)};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l)if(l){u||(u=zo({dependencies:e,exports:t})),a.unshift([null,`__proto__:${s}null`]);const o=r(a,{lineBreakIndent:null});p.push(`${i} setter${s}=${s}${o};`,`for${s}(${i} name in module)${s}{`,`${n}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{const e=r(a,{lineBreakIndent:null});p.push(`exports(${e});`)}else{const[e,t]=a[0];p.push(`exports(${JSON.stringify(e)},${s}${t});`)}}c.push(p.join(`${a}${n}${n}${n}`))}return{importBindings:l,setters:c,starExcludes:u}}(n,s,o,l),$=p?`'${p}',${y}`:"",w=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${$}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${y}`)+`],${y}(${E(w,{isAsync:!1,name:null})}{${x}${o}${m?"'use strict';":""}`+Fo(P,o,l)+Vo(A,o,l)+`${x}${o}return${y}{${S.length>0?`${x}${o}${o}setters:${y}[${S.map(e=>e?`${b(["module"],{isAsync:!1,name:null})}{${x}${o}${o}${o}${e}${x}${o}${o}}`:g?"null":`${b([],{isAsync:!1,name:null})}{}`).join(`,${y}`)}],`:""}${x}`;I+=`${o}${o}execute:${y}(${E([],{isAsync:u,name:null})}{${x}${x}`;const C=`${o}${o}})${x}${o}}${v}${x}}));`;e.prepend(a+Dr(null,t,o,l,d,h,f)+jo(s,o,l)).append(`${c}${x}${x}`+Go(s,o,l)+Ho(s,o,l)).indent(`${o}${o}${o}`).append(C).prepend(I)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:v},globals:A,noConflict:S,reexportProtoFromExternal:P,strict:$}){const{_:w,cnst:I,getFunctionIntro:C,getNonArrowFunctionIntro:k,getPropertyAccess:N,n:O,s:R}=h,D=f?"f":"factory",M=f?"g":"global";if(r&&!x)return Gt({code:tn,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:kt(Ft)});Oo("umd",o,n),Mo(u,n);const _=n.map(e=>`'${Ro(e.importPath,p.forceJsExtensionForImports)}'`),L=n.map(e=>`require('${e.importPath}')`),T=To(n),B=T.map(e=>Wo(e.globalName,M,N)),z=T.map(e=>e.name);(r||S)&&(c||r&&"exports.default"===s[0]?.local)&&(_.unshift("'exports'"),L.unshift("exports"),B.unshift(Lo(x,M,A,(g?`${Wo(x,M,N)}${w}||${w}`:"")+"{}",h,u)),z.unshift("exports"));const F=Po(p,o),V=(F?`'${F}',${w}`:"")+(_.length>0?`[${_.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=$?`${w}'use strict';${O}`:"";let H;if(S){const e=f?"e":"exports";let t;t=!c&&r?`${I} ${e}${w}=${w}${Lo(x,M,A,`${D}(${B.join(`,${w}`)})`,h,u)};`:`${I} ${e}${w}=${w}${B.shift()};${O}${a}${a}${D}(${[e,...B].join(`,${w}`)});`,H=`(${C([],{isAsync:!1,name:null})}{${O}${a}${a}${I} current${w}=${w}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map(e=>i+=s(e)).join(`${n}&&${n}`)}(x,M,h)};${O}${a}${a}${t}${O}${a}${a}${e}.noConflict${w}=${w}${C([],{isAsync:!1,name:null})}{${w}${Wo(x,M,N)}${w}=${w}current;${w}return ${e}${R}${w}};${O}${a}})()`}else H=`${D}(${B.join(`,${w}`)})`,!c&&r&&(H=Lo(x,M,A,H,h,u));const W=r||S&&c||B.length>0,q=[D];W&&q.unshift(M);const K=W?`this,${w}`:"",X=W?`(${M}${w}=${w}typeof globalThis${w}!==${w}'undefined'${w}?${w}globalThis${w}:${w}${M}${w}||${w}self,${w}`:"",J=W?")":"",Y=W?`${a}typeof exports${w}===${w}'object'${w}&&${w}typeof module${w}!==${w}'undefined'${w}?${w}${U}${D}(${L.join(`,${w}`)})${w}:${O}`:"",Z=`(${k(q,{isAsync:!1,name:null})}{${O}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${V}${D})${w}:${O}`+`${a}${X}${H}${J};${O}`+`})(${K}(${k(z,{isAsync:!1,name:null})}{${G}${O}`,Q=O+O+"}));";e.prepend(`${l}${No(n,E,y,b,v,t,a,h)}`);const ee=$o(s,n,c,E,h,a,y,P);let te=Co(c&&r,!0===m||"if-default-prop"===m&&i,v,h);te&&(te=O+O+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};function Ko(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var Xo,Jo,Yo,Zo,Qo,ea,ta,na,sa,ia,ra,oa={};function aa(){if(Jo)return Xo;Jo=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${r}`,l={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:o,SEP:"/"},c={...l,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return Xo={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,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"},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:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},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,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:l},Xo}function la(){return Yo||(Yo=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=aa();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(oa)),oa}function ca(){if(Qo)return Zo;Qo=1;const e=la(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:m}=aa(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return Zo=(b,E)=>{const x=E||{},v=b.length-1,A=!0===x.parts||!0===x.tokens||!0===x.scanToEnd,S=[],P=[],$=[];let w,I,C=b,k=-1,N=0,O=0,R=!1,D=!1,M=!1,_=!1,L=!1,T=!1,B=!1,z=!1,F=!1,V=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>k>=v,H=()=>C.charCodeAt(k+1),W=()=>(w=I,C.charCodeAt(++k));for(;k<v;){let e;if(I=W(),I!==s){if(!0===T||I===l){for(j++;!0!==G()&&(I=W());)if(I!==s)if(I!==l){if(!0!==T&&I===r&&(I=W())===r){if(R=U.isBrace=!0,M=U.isGlob=!0,V=!0,!0===A)continue;break}if(!0!==T&&I===i){if(R=U.isBrace=!0,M=U.isGlob=!0,V=!0,!0===A)continue;break}if(I===p&&(j--,0===j)){T=!1,R=U.isBrace=!0,V=!0;break}}else j++;else B=U.backslashes=!0,W();if(!0===A)continue;break}if(I!==a){if(!0!==x.noext&&!0==(I===d||I===n||I===t||I===h||I===o)&&H()===c){if(M=U.isGlob=!0,_=U.isExtglob=!0,V=!0,I===o&&k===N&&(F=!0),!0===A){let e=0;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){V=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}if(I===t){if(w===t&&(L=U.isGlobstar=!0),M=U.isGlob=!0,V=!0,!0===A)continue;break}if(I===h){if(M=U.isGlob=!0,V=!0,!0===A)continue;break}if(I===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){D=U.isBracket=!0,M=U.isGlob=!0,V=!0;break}}else B=U.backslashes=!0,W();if(!0===A)continue;break}if(!0===x.nonegate||I!==o||k!==N){if(!0!==x.noparen&&I===c){if(M=U.isGlob=!0,!0===A){let e=1;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){V=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}if(!0===M){if(V=!0,!0===A)continue;break}}else z=U.negated=!0,N++}else{if(S.push(k),P.push(U),U={value:"",depth:0,isGlob:!1},!0===V)continue;if(w===r&&k===N+1){N+=2;continue}O=k+1}}else B=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(_=!1,M=!1);let q=C,K="",X="";N>0&&(K=C.slice(0,N),C=C.slice(N),O-=N),q&&!0===M&&O>0?(q=C.slice(0,O),X=C.slice(O)):!0===M?(q="",X=C):q=C,q&&""!==q&&"/"!==q&&q!==C&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===B&&(q=e.removeBackslashes(q)));const J={prefix:K,input:b,start:N,base:q,glob:X,isBrace:R,isBracket:D,isGlob:M,isExtglob:_,isGlobstar:L,negated:z,negatedExtglob:F};if(!0===x.tokens&&(J.maxDepth=0,g(I)||P.push(U),J.tokens=P),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<S.length;t++){const n=void 0!==e?e+1:N,s=S[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==N?(P[t].isPrefix=!0,P[t].value=K):P[t].value=i,y(P[t]),J.maxDepth+=P[t].depth),s>=N&&($.push(i),e=s)}const t=void 0!==e?e+1:N,n=b.slice(t);$.push(n),x.tokens&&e&&e+1<b.length&&(P[P.length-1].value=n,y(P[P.length-1]),J.maxDepth+=P[P.length-1].depth),J.slashes=S,J.parts=$}return J},Zo}function ua(){if(ta)return ea;ta=1;const e=aa(),t=la(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=e,a=(e,t)=>"function"==typeof t.expandRange?t.expandRange(...e,t):(e.sort(),`[${e.join("-")}]`),l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=e=>{const t=[];let n=0,s=0,i=0,r="",o=!1;for(const a of e)if(!0!==o)if("\\"!==a)if('"'!==a){if(0===i)if("["===a)n++;else if("]"===a&&n>0)n--;else if(0===n)if("("===a)s++;else if(")"===a&&s>0)s--;else if("|"===a&&0===s){t.push(r),r="";continue}r+=a}else i=1===i?0:1,r+=a;else r+=a,o=!0;else r+=a,o=!1;return t.push(r),t},u=e=>{let t=e.trim(),n=!0;for(;!0===n;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if((e=>{let t=!1;for(const n of e)if(!0!==t)if("\\"!==n){if(/[?*+@!()[\]{}]/.test(n))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let n=0,s=0,i=0,r=!1;for(let o=1;o<e.length;o++){const a=e[o];if(!0!==r)if("\\"!==a)if('"'!==a){if(1!==i)if("["!==a){if("]"===a&&n>0)n--;else if(!(n>0))if("("!==a){if(")"===a&&(s--,0===s)){if(!0===t&&o!==e.length-1)return;return{type:e[0],body:e.slice(2,o),end:o}}}else s++}else n++}else i=1===i?0:1;else r=!0;else r=!1}},h=e=>`${1===e.length?t.escapeRegex(e[0]):`[${e.map(e=>t.escapeRegex(e)).join("")}]`}*`,p=e=>{let t=0;const n=[];for(;t<e.length;){const s=d(e.slice(t),!1);if(!s||"*"!==s.type)return;const i=c(s.body).map(e=>e.trim());if(1!==i.length)return;const r=u(i[0]);if(!r||1!==r.length)return;n.push(r),t+=s.end+1}if(!(n.length<1))return n},f=e=>{let t=0,n=e.trim(),s=d(n);for(;s;)t++,n=s.body.trim(),s=d(n);return t},m=(t,n)=>{if(!1===n.maxExtglobRecursion)return{risky:!1};const s="number"==typeof n.maxExtglobRecursion?n.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,i=c(t).map(e=>e.trim());if(i.length>1&&(i.some(e=>""===e)||i.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){const s=t[e],i=t[n],r=s[0];if(r&&s===r.repeat(s.length)&&i===r.repeat(i.length)&&(s===i||s.startsWith(i)||i.startsWith(s)))return!0}return!1})(i)))return{risky:!0};const r=[];let o=!1,a=!0;for(const e of i){const t=p(e);if(t){o=!0,r.push(...t);continue}const n=u(e);if(n&&1===n.length)r.push(n);else if(a=!1,f(e)>s)return{risky:!0}}return o?a?{risky:!0,safeOutput:h([...new Set(r)])}:{risky:!0}:{risky:!1}},g=(c,u)=>{if("string"!=typeof c)throw new TypeError("Expected a string");c=o[c]||c;const d={...u},h="number"==typeof d.maxLength?Math.min(n,d.maxLength):n;let p=c.length;if(p>h)throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${h}`);const f={type:"bos",value:"",output:d.prepend||""},y=[f],b=d.capture?"":"?:",E=e.globChars(d.windows),x=e.extglobChars(E),{DOT_LITERAL:v,PLUS_LITERAL:A,SLASH_LITERAL:S,ONE_CHAR:P,DOTS_SLASH:$,NO_DOT:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:C,QMARK:k,QMARK_NO_DOT:N,STAR:O,START_ANCHOR:R}=E,D=e=>`(${b}(?:(?!${R}${e.dot?$:v}).)*?)`,M=d.dot?"":w,_=d.dot?k:N;let L=!0===d.bash?D(d):O;d.capture&&(L=`(${L})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const T={input:c,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};c=t.removePrefix(c,T),p=c.length;const B=[],z=[],F=[];let V,j=f;const U=()=>T.index===p-1,G=T.peek=(e=1)=>c[T.index+e],H=T.advance=()=>c[++T.index]||"",W=()=>c.slice(T.index+1),q=(e="",t=0)=>{T.consumed+=e,T.index+=t},K=e=>{T.output+=null!=e.output?e.output:e.value,q(e.value)},X=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)H(),T.start++,e++;return e%2!=0&&(T.negated=!0,T.start++,!0)},J=e=>{T[e]++,F.push(e)},Y=e=>{T[e]--,F.pop()},Z=e=>{if("globstar"===j.type){const t=T.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(T.output=T.output.slice(0,-j.output.length),j.type="star",j.value="*",j.output=L,T.output+=j.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&K(e),j&&"text"===j.type&&"text"===e.type)return j.output=(j.output||j.value)+e.value,void(j.value+=e.value);e.prev=j,y.push(e),j=e},Q=(e,t)=>{const n={...x[t],conditions:1,inner:""};n.prev=j,n.parens=T.parens,n.output=T.output,n.startIndex=T.index,n.tokensIndex=y.length;const s=(d.capture?"(":"")+n.open;J("parens"),Z({type:e,value:t,output:T.output?"":P}),Z({type:"paren",extglob:!0,value:H(),output:s}),B.push(n)},ee=e=>{const n=c.slice(e.startIndex,T.index+1),s=c.slice(e.startIndex+2,T.index),i=m(s,d);if(("plus"===e.type||"star"===e.type)&&i.risky){const s=i.safeOutput?(e.output?"":P)+(d.capture?`(${i.safeOutput})`:i.safeOutput):void 0,r=y[e.tokensIndex];r.type="text",r.value=n,r.output=s||t.escapeRegex(n);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return T.output=e.output+r.output,T.backtrack=!0,Z({type:"paren",extglob:!0,value:V,output:""}),void Y("parens")}let r,o=e.close+(d.capture?")":"");if("negate"===e.type){let t=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=D(d)),(t!==L||U()||/^\)+$/.test(W()))&&(o=e.close=`)$))${t}`),e.inner.includes("*")&&(r=W())&&/^\.[^\\/.]+$/.test(r)){const n=g(r,{...u,fastpaths:!1}).output;o=e.close=`)${n})${t})`}"bos"===e.prev.type&&(T.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:V,output:o}),Y("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(c)){let e=!1,n=c.replace(r,(t,n,s,i,r,o)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(r?k.repeat(r.length):""):0===o?_+(r?k.repeat(r.length):""):k.repeat(s.length):"."===i?v.repeat(s.length):"*"===i?n?n+i+(r?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===d.contains?(T.output=c,T):(T.output=t.wrapOutput(n,T,u),T)}for(;!U();){if(V=H(),"\0"===V)continue;if("\\"===V){const e=G();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){V+="\\",Z({type:"text",value:V});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,T.index+=n,n%2!=0&&(V+="\\")),!0===d.unescape?V=H():V+=H(),0===T.brackets){Z({type:"text",value:V});continue}}if(T.brackets>0&&("]"!==V||"["===j.value||"[^"===j.value)){if(!1!==d.posix&&":"===V){const e=j.value.slice(1);if(e.includes("[")&&(j.posix=!0,e.includes(":"))){const e=j.value.lastIndexOf("["),t=j.value.slice(0,e),n=j.value.slice(e+2),i=s[n];if(i){j.value=t+i,T.backtrack=!0,H(),f.output||1!==y.indexOf(j)||(f.output=P);continue}}}("["===V&&":"!==G()||"-"===V&&"]"===G())&&(V=`\\${V}`),"]"!==V||"["!==j.value&&"[^"!==j.value||(V=`\\${V}`),!0===d.posix&&"!"===V&&"["===j.value&&(V="^"),j.value+=V,K({value:V});continue}if(1===T.quotes&&'"'!==V){V=t.escapeRegex(V),j.value+=V,K({value:V});continue}if('"'===V){T.quotes=1===T.quotes?0:1,!0===d.keepQuotes&&Z({type:"text",value:V});continue}if("("===V){J("parens"),Z({type:"paren",value:V});continue}if(")"===V){if(0===T.parens&&!0===d.strictBrackets)throw new SyntaxError(l("opening","("));const e=B[B.length-1];if(e&&T.parens===e.parens+1){ee(B.pop());continue}Z({type:"paren",value:V,output:T.parens?")":"\\)"}),Y("parens");continue}if("["===V){if(!0!==d.nobracket&&W().includes("]"))J("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));V=`\\${V}`}Z({type:"bracket",value:V});continue}if("]"===V){if(!0===d.nobracket||j&&"bracket"===j.type&&1===j.value.length){Z({type:"text",value:V,output:`\\${V}`});continue}if(0===T.brackets){if(!0===d.strictBrackets)throw new SyntaxError(l("opening","["));Z({type:"text",value:V,output:`\\${V}`});continue}Y("brackets");const e=j.value.slice(1);if(!0===j.posix||"^"!==e[0]||e.includes("/")||(V=`/${V}`),j.value+=V,K({value:V}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(j.value);if(T.output=T.output.slice(0,-j.value.length),!0===d.literalBrackets){T.output+=n,j.value=n;continue}j.value=`(${b}${n}|${j.value})`,T.output+=j.value;continue}if("{"===V&&!0!==d.nobrace){J("braces");const e={type:"brace",value:V,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};z.push(e),Z(e);continue}if("}"===V){const e=z[z.length-1];if(!0===d.nobrace||!e){Z({type:"text",value:V,output:V});continue}let t=")";if(!0===e.dots){const e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,d),T.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=T.output.slice(0,e.outputIndex),s=T.tokens.slice(e.tokensIndex);e.value=e.output="\\{",V=t="\\}",T.output=n;for(const e of s)T.output+=e.output||e.value}Z({type:"brace",value:V,output:t}),Y("braces"),z.pop();continue}if("|"===V){B.length>0&&B[B.length-1].conditions++,Z({type:"text",value:V});continue}if(","===V){let e=V;const t=z[z.length-1];t&&"braces"===F[F.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:V,output:e});continue}if("/"===V){if("dot"===j.type&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",y.pop(),j=f;continue}Z({type:"slash",value:V,output:S});continue}if("."===V){if(T.braces>0&&"dot"===j.type){"."===j.value&&(j.output=v);const e=z[z.length-1];j.type="dots",j.output+=V,j.value+=V,e.dots=!0;continue}if(T.braces+T.parens===0&&"bos"!==j.type&&"slash"!==j.type){Z({type:"text",value:V,output:v});continue}Z({type:"dot",value:V,output:v});continue}if("?"===V){if((!j||"("!==j.value)&&!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("qmark",V);continue}if(j&&"paren"===j.type){const e=G();let t=V;("("===j.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${V}`),Z({type:"text",value:V,output:t});continue}if(!0!==d.dot&&("slash"===j.type||"bos"===j.type)){Z({type:"qmark",value:V,output:N});continue}Z({type:"qmark",value:V,output:k});continue}if("!"===V){if(!0!==d.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Q("negate",V);continue}if(!0!==d.nonegate&&0===T.index){X();continue}}if("+"===V){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("plus",V);continue}if(j&&"("===j.value||!1===d.regex){Z({type:"plus",value:V,output:A});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||T.parens>0){Z({type:"plus",value:V});continue}Z({type:"plus",value:A});continue}if("@"===V){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Z({type:"at",extglob:!0,value:V,output:""});continue}Z({type:"text",value:V});continue}if("*"!==V){"$"!==V&&"^"!==V||(V=`\\${V}`);const e=i.exec(W());e&&(V+=e[0],T.index+=e[0].length),Z({type:"text",value:V});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=V,j.output=L,T.backtrack=!0,T.globstar=!0,q(V);continue}let e=W();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",V);continue}if("star"===j.type){if(!0===d.noglobstar){q(V);continue}const t=j.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!s||e[0]&&"/"!==e[0])){Z({type:"star",value:V,output:""});continue}const r=T.braces>0&&("comma"===t.type||"brace"===t.type),o=B.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Z({type:"star",value:V,output:""});continue}for(;"/**"===e.slice(0,3);){const t=c[T.index+4];if(t&&"/"!==t)break;e=e.slice(3),q("/**",3)}const a=U()||T.parens>0&&e===")".repeat(T.parens)&&!B.some(e=>"negate"===e.type);if("bos"===t.type&&U()){j.type="globstar",j.value+=V,j.output=D(d),T.output=j.output,T.globstar=!0,q(V);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&a){T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=D(d)+(d.strictSlashes?")":"|$)"),j.value+=V,T.globstar=!0,T.output+=t.output+j.output,q(V);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=`${D(d)}${S}|${S}${n})`,j.value+=V,T.output+=t.output+j.output,T.globstar=!0,q(V+H()),Z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){j.type="globstar",j.value+=V,j.output=`(?:^|${S}|${D(d)}${S})`,T.output=j.output,T.globstar=!0,q(V+H()),Z({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-j.output.length),j.type="globstar",j.output=D(d),j.value+=V,T.output+=j.output,T.globstar=!0,q(V);continue}const n={type:"star",value:V,output:L};!0!==d.bash?!j||"bracket"!==j.type&&"paren"!==j.type||!0!==d.regex?(T.index!==T.start&&"slash"!==j.type&&"dot"!==j.type||("dot"===j.type?(T.output+=I,j.output+=I):!0===d.dot?(T.output+=C,j.output+=C):(T.output+=M,j.output+=M),"*"!==G()&&(T.output+=P,j.output+=P)),Z(n)):(n.output=V,Z(n)):(n.output=".*?","bos"!==j.type&&"slash"!==j.type||(n.output=M+n.output),Z(n))}for(;T.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));T.output=t.escapeLast(T.output,"["),Y("brackets")}for(;T.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing",")"));T.output=t.escapeLast(T.output,"("),Y("parens")}for(;T.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","}"));T.output=t.escapeLast(T.output,"{"),Y("braces")}if(!0===d.strictSlashes||"star"!==j.type&&"bracket"!==j.type||Z({type:"maybe_slash",value:"",output:`${S}?`}),!0===T.backtrack){T.output="";for(const e of T.tokens)T.output+=null!=e.output?e.output:e.value,e.suffix&&(T.output+=e.suffix)}return T};return g.fastpaths=(s,i)=>{const r={...i},a="number"==typeof r.maxLength?Math.min(n,r.maxLength):n,l=s.length;if(l>a)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(r.windows),b=r.dot?f:p,E=r.dot?m:p,x=r.capture?"":"?:";let v=!0===r.bash?".*?":g;r.capture&&(v=`(${v})`);const A=e=>!0===e.noglobstar?v:`(${x}(?:(?!${y}${e.dot?h:c}).)*?)`,S=e=>{switch(e){case"*":return`${b}${d}${v}`;case".*":return`${c}${d}${v}`;case"*.*":return`${b}${v}${c}${d}${v}`;case"*/*":return`${b}${v}${u}${d}${E}${v}`;case"**":return b+A(r);case"**/*":return`(?:${b}${A(r)}${u})?${E}${d}${v}`;case"**/*.*":return`(?:${b}${A(r)}${u})?${E}${v}${c}${d}${v}`;case"**/.*":return`(?:${b}${A(r)}${u})?${c}${d}${v}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=S(t[1]);if(!n)return;return n+c+t[2]}}},P=t.removePrefix(s,{negated:!1,prefix:""});let $=S(P);return $&&!0!==r.strictSlashes&&($+=`${u}?`),$},ea=g}function da(){if(sa)return na;sa=1;const e=ca(),t=ua(),n=la(),s=aa(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const s=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,l=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),c=l.state;delete l.state;let u=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=i(o.ignore,e,n)}const d=(n,s=!1)=>{const{isMatch:r,match:d,output:h}=i.test(n,l,t,{glob:e,posix:a}),p={glob:e,state:c,regex:l,posix:a,input:n,output:h,match:d,isMatch:r};return"function"==typeof o.onResult&&o.onResult(p),!1===r?(p.isMatch=!1,!!s&&p):u(n)?("function"==typeof o.onIgnore&&o.onIgnore(p),p.isMatch=!1,!!s&&p):("function"==typeof o.onMatch&&o.onMatch(p),!s||p)};return n&&(d.state=c),d};return i.test=(e,t,s,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},l=a.format||(o?n.toPosixSlashes:null);let c=e===r,u=c&&l?l(e):e;return!1===c&&(u=l?l(e):e,c=u===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,s,o):t.exec(u)),{isMatch:Boolean(c),match:c,output:u}},i.matchBase=(e,t,s,r=s&&s.windows)=>(t instanceof RegExp?t:i.makeRe(t,s)).test(n.basename(e,{windows:r})),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);const c=i.toRegex(l,t);return!0===s&&(c.state=e),c},i.makeRe=(e,n={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),i.compileRe(o,n,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,na=i}function ha(){if(ra)return ia;ra=1;const e=da(),t=la();function n(n,s,i=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,i)}return Object.assign(n,e),ia=n}var pa=Ko(ha());const fa={ArrayPattern(e,t){for(const n of t.elements)n&&fa[n.type](e,n)},AssignmentPattern(e,t){fa[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?fa.RestElement(e,n):fa[n.value.type](e,n.value)},RestElement(e,t){fa[t.argument.type](e,t.argument)}},ma=function(e){const t=[];return fa[e.type](t,e),t};new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");var ga=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using","source","defer"];const ya=(e,t)=>{if(0===e)return xe;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=ba(t[e++],t);return s},ba=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:ga[t[e]]}},Ea=(e,t)=>{const n=va(t,e);switch(n.type){case qn:return Gt(Ht(kn(n.message)));case Kn:return Gt(Ht(kn(n.message,n.start)));default:return n}},xa=[function(e,t){const n={type:"PanicError",start:t[e],end:t[e+1],get message(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"message",{value:s}),s}};return n},function(e,t){const n={type:"ParseError",start:t[e],end:t[e+1],get message(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"message",{value:s}),s}};return n},function(e,t){const n={type:"ArrayExpression",start:t[e],end:t[e+1],get elements(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"elements",{value:s}),s}};return n},function(e,t){const n={type:"ArrayPattern",start:t[e],end:t[e+1],get elements(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"elements",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=ya(t[e+3],t),i={type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{annotations:s}:{},get params(){const n=Aa(t[e+4],t);return Object.defineProperty(i,"params",{value:n}),n},get body(){const n=va(t[e+5],t);return Object.defineProperty(i,"body",{value:n}),n},id:null};return i},function(e,t){const n={type:"AssignmentExpression",start:t[e],end:t[e+1],get operator(){const s=ga[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get left(){const s=va(t[e+3],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=va(t[e+4],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n={type:"AssignmentPattern",start:t[e],end:t[e+1],get left(){const s=va(t[e+2],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=va(t[e+3],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n={type:"AwaitExpression",start:t[e],end:t[e+1],get argument(){const s=va(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n={type:"BinaryExpression",start:t[e],end:t[e+1],get operator(){const s=ga[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get left(){const s=va(t[e+3],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=va(t[e+4],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n={type:"BlockStatement",start:t[e],end:t[e+1],get body(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"BreakStatement",start:t[e],end:t[e+1],get label(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"label",{value:e}),e}};return s},function(e,t){const n=t[e+2],s=ya(t[e+3],t),i={type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{annotations:s}:{},get callee(){const n=va(t[e+4],t);return Object.defineProperty(i,"callee",{value:n}),n},get arguments(){const n=Aa(t[e+5],t);return Object.defineProperty(i,"arguments",{value:n}),n}};return i},function(e,t){const n=t[e+2],s={type:"CatchClause",start:t[e],end:t[e+1],get param(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"param",{value:e}),e},get body(){const n=va(t[e+3],t);return Object.defineProperty(s,"body",{value:n}),n}};return s},function(e,t){const n={type:"ChainExpression",start:t[e],end:t[e+1],get expression(){const s=va(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"ClassBody",start:t[e],end:t[e+1],get body(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+4],i={type:"ClassDeclaration",start:t[e],end:t[e+1],get decorators(){const n=Aa(t[e+2],t);return Object.defineProperty(i,"decorators",{value:n}),n},get id(){const e=0===n?null:va(n,t);return Object.defineProperty(i,"id",{value:e}),e},get superClass(){const e=0===s?null:va(s,t);return Object.defineProperty(i,"superClass",{value:e}),e},get body(){const n=va(t[e+5],t);return Object.defineProperty(i,"body",{value:n}),n}};return i},function(e,t){const n=t[e+3],s=t[e+4],i={type:"ClassExpression",start:t[e],end:t[e+1],get decorators(){const n=Aa(t[e+2],t);return Object.defineProperty(i,"decorators",{value:n}),n},get id(){const e=0===n?null:va(n,t);return Object.defineProperty(i,"id",{value:e}),e},get superClass(){const e=0===s?null:va(s,t);return Object.defineProperty(i,"superClass",{value:e}),e},get body(){const n=va(t[e+5],t);return Object.defineProperty(i,"body",{value:n}),n}};return i},function(e,t){const n={type:"ConditionalExpression",start:t[e],end:t[e+1],get test(){const s=va(t[e+2],t);return Object.defineProperty(n,"test",{value:s}),s},get consequent(){const s=va(t[e+3],t);return Object.defineProperty(n,"consequent",{value:s}),s},get alternate(){const s=va(t[e+4],t);return Object.defineProperty(n,"alternate",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"ContinueStatement",start:t[e],end:t[e+1],get label(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"label",{value:e}),e}};return s},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){const n={type:"Decorator",start:t[e],end:t[e+1],get expression(){const s=va(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"ExpressionStatement",start:t[e],end:t[e+1],get directive(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"directive",{value:s}),s},get expression(){const s=va(t[e+3],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"DoWhileStatement",start:t[e],end:t[e+1],get body(){const s=va(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s},get test(){const s=va(t[e+3],t);return Object.defineProperty(n,"test",{value:s}),s}};return n},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2],s={type:"ExportAllDeclaration",start:t[e],end:t[e+1],get exported(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"exported",{value:e}),e},get source(){const n=va(t[e+3],t);return Object.defineProperty(s,"source",{value:n}),n},get attributes(){const n=Aa(t[e+4],t);return Object.defineProperty(s,"attributes",{value:n}),n}};return s},function(e,t){const n={type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],get declaration(){const s=va(t[e+2],t);return Object.defineProperty(n,"declaration",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+5],i={type:"ExportNamedDeclaration",start:t[e],end:t[e+1],get specifiers(){const n=Aa(t[e+2],t);return Object.defineProperty(i,"specifiers",{value:n}),n},get source(){const e=0===n?null:va(n,t);return Object.defineProperty(i,"source",{value:e}),e},get attributes(){const n=Aa(t[e+4],t);return Object.defineProperty(i,"attributes",{value:n}),n},get declaration(){const e=0===s?null:va(s,t);return Object.defineProperty(i,"declaration",{value:e}),e}};return i},function(e,t){const n=va(t[e+2],t),s=t[e+3],i={type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,get exported(){const e=0===s?{...n}:va(s,t);return Object.defineProperty(i,"exported",{value:e}),e}};return i},function(e,t){const n={type:"ExpressionStatement",start:t[e],end:t[e+1],get expression(){const s=va(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"ForInStatement",start:t[e],end:t[e+1],get left(){const s=va(t[e+2],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=va(t[e+3],t);return Object.defineProperty(n,"right",{value:s}),s},get body(){const s=va(t[e+4],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),get left(){const n=va(t[e+3],t);return Object.defineProperty(s,"left",{value:n}),n},get right(){const n=va(t[e+4],t);return Object.defineProperty(s,"right",{value:n}),n},get body(){const n=va(t[e+5],t);return Object.defineProperty(s,"body",{value:n}),n}};return s},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4],r={type:"ForStatement",start:t[e],end:t[e+1],get init(){const e=0===n?null:va(n,t);return Object.defineProperty(r,"init",{value:e}),e},get test(){const e=0===s?null:va(s,t);return Object.defineProperty(r,"test",{value:e}),e},get update(){const e=0===i?null:va(i,t);return Object.defineProperty(r,"update",{value:e}),e},get body(){const n=va(t[e+5],t);return Object.defineProperty(r,"body",{value:n}),n}};return r},function(e,t){const n=t[e+2],s=ya(t[e+3],t),i=t[e+4],r={type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},get id(){const e=0===i?null:va(i,t);return Object.defineProperty(r,"id",{value:e}),e},get params(){const n=Aa(t[e+5],t);return Object.defineProperty(r,"params",{value:n}),n},get body(){const n=va(t[e+6],t);return Object.defineProperty(r,"body",{value:n}),n},expression:!1};return r},function(e,t){const n=t[e+2],s=ya(t[e+3],t),i=t[e+4],r={type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},get id(){const e=0===i?null:va(i,t);return Object.defineProperty(r,"id",{value:e}),e},get params(){const n=Aa(t[e+5],t);return Object.defineProperty(r,"params",{value:n}),n},get body(){const n=va(t[e+6],t);return Object.defineProperty(r,"body",{value:n}),n},expression:!1};return r},function(e,t){const n={type:"Identifier",start:t[e],end:t[e+1],get name(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n=t[e+4],s={type:"IfStatement",start:t[e],end:t[e+1],get test(){const n=va(t[e+2],t);return Object.defineProperty(s,"test",{value:n}),n},get consequent(){const n=va(t[e+3],t);return Object.defineProperty(s,"consequent",{value:n}),n},get alternate(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"alternate",{value:e}),e}};return s},function(e,t){const n={type:"ImportAttribute",start:t[e],end:t[e+1],get key(){const s=va(t[e+2],t);return Object.defineProperty(n,"key",{value:s}),s},get value(){const s=va(t[e+3],t);return Object.defineProperty(n,"value",{value:s}),s}};return n},function(e,t){const n=t[e+5],s={type:"ImportDeclaration",start:t[e],end:t[e+1],get specifiers(){const n=Aa(t[e+2],t);return Object.defineProperty(s,"specifiers",{value:n}),n},get source(){const n=va(t[e+3],t);return Object.defineProperty(s,"source",{value:n}),n},get attributes(){const n=Aa(t[e+4],t);return Object.defineProperty(s,"attributes",{value:n}),n},get phase(){const i=0===n?void 0:ga[t[e+5]];return Object.defineProperty(s,"phase",{value:i}),i}};return s},function(e,t){const n={type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],get local(){const s=va(t[e+2],t);return Object.defineProperty(n,"local",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+4],i={type:"ImportExpression",start:t[e],end:t[e+1],get source(){const n=va(t[e+2],t);return Object.defineProperty(i,"source",{value:n}),n},get options(){const e=0===n?null:va(n,t);return Object.defineProperty(i,"options",{value:e}),e},get phase(){const n=0===s?void 0:ga[t[e+4]];return Object.defineProperty(i,"phase",{value:n}),n}};return i},function(e,t){const n={type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],get local(){const s=va(t[e+2],t);return Object.defineProperty(n,"local",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=va(t[e+3],t),i={type:"ImportSpecifier",start:t[e],end:t[e+1],get imported(){const e=0===n?{...s}:va(n,t);return Object.defineProperty(i,"imported",{value:e}),e},local:s};return i},function(e,t){const n=t[e+3],s={type:"JSXAttribute",start:t[e],end:t[e+1],get name(){const n=va(t[e+2],t);return Object.defineProperty(s,"name",{value:n}),n},get value(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"value",{value:e}),e}};return s},function(e,t){const n={type:"JSXClosingElement",start:t[e],end:t[e+1],get name(){const s=va(t[e+2],t);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4],s={type:"JSXElement",start:t[e],end:t[e+1],get openingElement(){const n=va(t[e+2],t);return Object.defineProperty(s,"openingElement",{value:n}),n},get children(){const n=Aa(t[e+3],t);return Object.defineProperty(s,"children",{value:n}),n},get closingElement(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"closingElement",{value:e}),e}};return s},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){const n={type:"JSXExpressionContainer",start:t[e],end:t[e+1],get expression(){const s=va(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"JSXFragment",start:t[e],end:t[e+1],get openingFragment(){const s=va(t[e+2],t);return Object.defineProperty(n,"openingFragment",{value:s}),s},get children(){const s=Aa(t[e+3],t);return Object.defineProperty(n,"children",{value:s}),s},get closingFragment(){const s=va(t[e+4],t);return Object.defineProperty(n,"closingFragment",{value:s}),s}};return n},function(e,t){const n={type:"JSXIdentifier",start:t[e],end:t[e+1],get name(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n={type:"JSXMemberExpression",start:t[e],end:t[e+1],get object(){const s=va(t[e+2],t);return Object.defineProperty(n,"object",{value:s}),s},get property(){const s=va(t[e+3],t);return Object.defineProperty(n,"property",{value:s}),s}};return n},function(e,t){const n={type:"JSXNamespacedName",start:t[e],end:t[e+1],get namespace(){const s=va(t[e+2],t);return Object.defineProperty(n,"namespace",{value:s}),s},get name(){const s=va(t[e+3],t);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),get name(){const n=va(t[e+3],t);return Object.defineProperty(s,"name",{value:n}),n},get attributes(){const n=Aa(t[e+4],t);return Object.defineProperty(s,"attributes",{value:n}),n}};return s},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){const n={type:"JSXSpreadAttribute",start:t[e],end:t[e+1],get argument(){const s=va(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n={type:"JSXSpreadChild",start:t[e],end:t[e+1],get expression(){const s=va(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"JSXText",start:t[e],end:t[e+1],get value(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"value",{value:s}),s},get raw(){const s=t.convertString(t[e+3]);return Object.defineProperty(n,"raw",{value:s}),s}};return n},function(e,t){const n={type:"LabeledStatement",start:t[e],end:t[e+1],get label(){const s=va(t[e+2],t);return Object.defineProperty(n,"label",{value:s}),s},get body(){const s=va(t[e+3],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t.convertString(t[e+2]),s={type:"Literal",start:t[e],end:t[e+1],bigint:n,get raw(){const n=t.convertString(t[e+3]);return Object.defineProperty(s,"raw",{value:n}),n},value:BigInt(n)};return s},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2],s={type:"Literal",start:t[e],end:t[e+1],get raw(){const e=0===n?void 0:t.convertString(n);return Object.defineProperty(s,"raw",{value:e}),e},get value(){const n=new DataView(t.buffer).getFloat64(e+3<<2,!0);return Object.defineProperty(s,"value",{value:n}),n}};return s},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3],s={type:"Literal",start:t[e],end:t[e+1],get value(){const n=t.convertString(t[e+2]);return Object.defineProperty(s,"value",{value:n}),n},get raw(){const e=0===n?void 0:t.convertString(n);return Object.defineProperty(s,"raw",{value:e}),e}};return s},function(e,t){const n={type:"LogicalExpression",start:t[e],end:t[e+1],get operator(){const s=ga[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get left(){const s=va(t[e+3],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=va(t[e+4],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),get object(){const n=va(t[e+3],t);return Object.defineProperty(s,"object",{value:n}),n},get property(){const n=va(t[e+4],t);return Object.defineProperty(s,"property",{value:n}),n}};return s},function(e,t){const n={type:"MetaProperty",start:t[e],end:t[e+1],get meta(){const s=va(t[e+2],t);return Object.defineProperty(n,"meta",{value:s}),s},get property(){const s=va(t[e+3],t);return Object.defineProperty(n,"property",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),get decorators(){const n=Aa(t[e+3],t);return Object.defineProperty(s,"decorators",{value:n}),n},get key(){const n=va(t[e+4],t);return Object.defineProperty(s,"key",{value:n}),n},get value(){const n=va(t[e+5],t);return Object.defineProperty(s,"value",{value:n}),n},get kind(){const n=ga[t[e+6]];return Object.defineProperty(s,"kind",{value:n}),n}};return s},function(e,t){const n=ya(t[e+2],t),s={type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{annotations:n}:{},get callee(){const n=va(t[e+3],t);return Object.defineProperty(s,"callee",{value:n}),n},get arguments(){const n=Aa(t[e+4],t);return Object.defineProperty(s,"arguments",{value:n}),n}};return s},function(e,t){const n={type:"ObjectExpression",start:t[e],end:t[e+1],get properties(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"properties",{value:s}),s}};return n},function(e,t){const n={type:"ObjectPattern",start:t[e],end:t[e+1],get properties(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"properties",{value:s}),s}};return n},function(e,t){const n={type:"PrivateIdentifier",start:t[e],end:t[e+1],get name(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n=ya(t[e+3],t),s={type:"Program",start:t[e],end:t[e+1],get body(){const n=Aa(t[e+2],t);return Object.defineProperty(s,"body",{value:n}),n},...n.length>0?{invalidAnnotations:n}:{},sourceType:"module"};return s},function(e,t){const n=t[e+2],s=t[e+3],i=va(t[e+4],t),r={type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),get key(){const e=0===s?{...i}:va(s,t);return Object.defineProperty(r,"key",{value:e}),e},value:i,get kind(){const n=ga[t[e+5]];return Object.defineProperty(r,"kind",{value:n}),n}};return r},function(e,t){const n=t[e+2],s=t[e+5],i={type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),get decorators(){const n=Aa(t[e+3],t);return Object.defineProperty(i,"decorators",{value:n}),n},get key(){const n=va(t[e+4],t);return Object.defineProperty(i,"key",{value:n}),n},get value(){const e=0===s?null:va(s,t);return Object.defineProperty(i,"value",{value:e}),e}};return i},function(e,t){const n={type:"RestElement",start:t[e],end:t[e+1],get argument(){const s=va(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"ReturnStatement",start:t[e],end:t[e+1],get argument(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"argument",{value:e}),e}};return s},function(e,t){const n={type:"SequenceExpression",start:t[e],end:t[e+1],get expressions(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"expressions",{value:s}),s}};return n},function(e,t){const n={type:"SpreadElement",start:t[e],end:t[e+1],get argument(){const s=va(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n={type:"StaticBlock",start:t[e],end:t[e+1],get body(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2],s={type:"SwitchCase",start:t[e],end:t[e+1],get test(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"test",{value:e}),e},get consequent(){const n=Aa(t[e+3],t);return Object.defineProperty(s,"consequent",{value:n}),n}};return s},function(e,t){const n={type:"SwitchStatement",start:t[e],end:t[e+1],get discriminant(){const s=va(t[e+2],t);return Object.defineProperty(n,"discriminant",{value:s}),s},get cases(){const s=Aa(t[e+3],t);return Object.defineProperty(n,"cases",{value:s}),s}};return n},function(e,t){const n={type:"TaggedTemplateExpression",start:t[e],end:t[e+1],get tag(){const s=va(t[e+2],t);return Object.defineProperty(n,"tag",{value:s}),s},get quasi(){const s=va(t[e+3],t);return Object.defineProperty(n,"quasi",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?void 0:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){const n={type:"TemplateLiteral",start:t[e],end:t[e+1],get quasis(){const s=Aa(t[e+2],t);return Object.defineProperty(n,"quasis",{value:s}),s},get expressions(){const s=Aa(t[e+3],t);return Object.defineProperty(n,"expressions",{value:s}),s}};return n},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){const n={type:"ThrowStatement",start:t[e],end:t[e+1],get argument(){const s=va(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+4],i={type:"TryStatement",start:t[e],end:t[e+1],get block(){const n=va(t[e+2],t);return Object.defineProperty(i,"block",{value:n}),n},get handler(){const e=0===n?null:va(n,t);return Object.defineProperty(i,"handler",{value:e}),e},get finalizer(){const e=0===s?null:va(s,t);return Object.defineProperty(i,"finalizer",{value:e}),e}};return i},function(e,t){const n={type:"UnaryExpression",start:t[e],end:t[e+1],get operator(){const s=ga[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get argument(){const s=va(t[e+3],t);return Object.defineProperty(n,"argument",{value:s}),s},prefix:!0};return n},function(e,t){const n=t[e+2],s={type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),get operator(){const n=ga[t[e+3]];return Object.defineProperty(s,"operator",{value:n}),n},get argument(){const n=va(t[e+4],t);return Object.defineProperty(s,"argument",{value:n}),n}};return s},function(e,t){const n={type:"VariableDeclaration",start:t[e],end:t[e+1],get kind(){const s=ga[t[e+2]];return Object.defineProperty(n,"kind",{value:s}),s},get declarations(){const s=Aa(t[e+3],t);return Object.defineProperty(n,"declarations",{value:s}),s}};return n},function(e,t){const n=t[e+3],s={type:"VariableDeclarator",start:t[e],end:t[e+1],get id(){const n=va(t[e+2],t);return Object.defineProperty(s,"id",{value:n}),n},get init(){const e=0===n?null:va(n,t);return Object.defineProperty(s,"init",{value:e}),e}};return s},function(e,t){const n={type:"WhileStatement",start:t[e],end:t[e+1],get test(){const s=va(t[e+2],t);return Object.defineProperty(n,"test",{value:s}),s},get body(){const s=va(t[e+3],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=t[e+3],i={type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),get argument(){const e=0===s?null:va(s,t);return Object.defineProperty(i,"argument",{value:e}),e}};return i}];function va(e,t){const n=t[e],s=xa[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function Aa(e,t){if(0===e)return xe;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?va(n,t):null}return s}function Sa(e){const t=3&e.byteOffset?new Uint8Array(e):e,n=new Uint32Array(t.buffer,t.byteOffset,t.byteLength>>2);let s;if("undefined"!=typeof Buffer&&e instanceof Buffer)s=t=>{const s=n[t],i=t+1<<2;return e.toString("utf8",i,i+s)};else{const t=new TextDecoder;s=s=>{const i=n[s],r=s+1<<2;return t.decode(e.subarray(r,r+i))}}return Object.assign(n,{convertString:s})}function Pa(e){const t=new Uint32Array(e),n=new TextEncoder;return Object.assign(t,{addStringToBuffer(e,s){const i=t.position;t[s]=i;const r=n.encode(e),o=r.length,a=1+(o+3>>2),l=t.reserve(a);return l[i]=o,l.byteBuffer.set(r,i+1<<2),l},byteBuffer:new Uint8Array(t.buffer),position:0,reserve(e){const n=t.position+e;if(n<=t.length)return t.position=n,t;const s=Pa(2*n);return s.set(t),s.position=n,s},toOutput(){const e=t.position<<2;return t.byteBuffer.slice(0,e)}})}function $a(e){const t=new Uint32Array(e);return Object.assign(t,{addStringToBuffer(e,n){let s=t;const i=t.position+1+(3*e.length+3>>2);i>t.length&&(s=$a(2*i),t.byteBuffer.copy(s.byteBuffer,0,0,t.position<<2),s.position=t.position);const r=s.position;s[n]=r;const o=r+1<<2,a=s.byteBuffer.write(e,o);return s[r]=a,s.position=o+a+3>>2,s},byteBuffer:Buffer.from(t.buffer),position:0,reserve(e){const n=t.position+e;if(n<=t.length)return t.position=n,t;const s=$a(2*n);return t.byteBuffer.copy(s.byteBuffer,0,0,t.position<<2),s.position=n,s},toOutput(){const e=t.position<<2,n=Buffer.allocUnsafeSlow(e);return t.byteBuffer.copy(n,0,0,e),n}})}const wa=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"];class Ia extends js{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=Ca(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=Ca(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Te)}hasEffectsWhenDestructuring(e,t,n){const s=Ca(t);for(const t of this.elements)if(t?.hasEffectsWhenDestructuring(e,s,n))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Te,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=Ca(t);for(const t of[...this.elements].reverse())t&&(s&&!t.included&&t.includeNode(e),s=t.includeDestructuredIfNecessary(e,i,n)||s);return!this.included&&s&&this.includeNode(e),this.included}render(e,t){let n=this.start+1;for(const s of this.elements)if(s){if(!s.included){e.remove(n,this.end-1);break}s.render(e,t),n=s.end}}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}Ia.prototype.includeNode=Us;const Ca=e=>e.at(-1)===$e?e:[...e,Ie];class ka extends js{addExportedVariables(e,t){for(const n of this.properties)n.type===Jn?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t,n){const s=[];for(const i of this.properties)s.push(...i.declare(e,t,n));return s}deoptimizeAssignment(e,t){for(const n of this.properties)n.deoptimizeAssignment(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(Te,t,n))return!0;return!1}hasEffectsWhenDestructuring(e,t,n){for(const s of this.properties)if(s.hasEffectsWhenDestructuring(e,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){if(!this.properties.length)return this.included;const s=this.properties.at(-1);let i=s.includeDestructuredIfNecessary(e,t,n);const r="RestElement"===s.type;for(const s of this.properties.slice(0,-1))r&&i&&!s.included&&s.includeNode(e),i=s.includeDestructuredIfNecessary(e,t,n)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,t){if(this.properties.length>0){const n=pe(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):ie(i,e,o,a);s&&e.remove(s,this.end-1)}}}ka.prototype.includeNode=Gs,ka.prototype.applyDeoptimizations=Hs;const Na=["then"];function Oa(e){return void 0===e?"void 0":"boolean"==typeof e?String(e):"string"==typeof e?JSON.stringify(e):"number"==typeof e?function(e){if(Object.is(-0,e))return"-0";const t=e.toExponential(),[n,s]=t.split("e"),i=n.split(".")[1]?.length||0,r=`${n.replace(".","")}e${parseInt(s)-i}`,o=String(e).replace("+","");return r.length<o.length?r:o}(e):Ze}const Ra={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,in:()=>Ze,instanceof:()=>Ze,"|":(e,t)=>e|t},Da=Symbol("Unassigned");class Ma extends js{constructor(){super(...arguments),this.renderedLiteralValue=Da}deoptimizeCache(){this.renderedLiteralValue=Ze}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ze;const s=this.left.getLiteralValueAtPath(Te,t,n);if("symbol"==typeof s)return Ze;if("in"===this.operator&&"variable"in this.right&&this.right.variable instanceof bo){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof ws||e instanceof xo?Ze:!!e}const i=this.right.getLiteralValueAtPath(Te,t,n);return"symbol"==typeof i?Ze:Ra[this.operator](s,i)}getRenderedLiteralValue(){return"in"===this.operator&&"variable"in this.right&&this.right.variable instanceof bo?this.renderedLiteralValue!==Da?this.renderedLiteralValue:this.renderedLiteralValue=Oa(this.getLiteralValueAtPath(Te,Ge,this)):Ze}hasEffects(e){return"+"===this.operator&&this.parent instanceof dr&&""===this.left.getLiteralValueAtPath(Te,Ge,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(e,t,n){this.included||this.includeNode(e),"symbol"==typeof this.getRenderedLiteralValue()&&(this.left.include(e,t,n),this.right.include(e,t,n),"instanceof"===this.operator&&this.right.includePath(Ve,e))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(Be,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=be){const s=this.getRenderedLiteralValue();"symbol"!=typeof s?e.overwrite(this.start,this.end,s):(this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t))}}Ma.prototype.applyDeoptimizations=Hs;class _a extends js{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function La(e,t,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(e,t);else{let s=n.arguments.length-2;for(;s>=0&&!n.arguments[s].included;)s--;if(s>=0){for(let i=0;i<=s;i++)n.arguments[i].render(e,t);e.remove(oe(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(oe(e.original,"(",n.callee.end)+1,n.end-1)}}_a.prototype.includeNode=Gs,_a.prototype.applyDeoptimizations=Hs;class Ta extends js{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const{args:s}=e,[i,r]=this.getReturnExpression(n);if(r)return;const o=s.filter(e=>!!e&&e!==nt);if(0!==o.length)if(i===nt)for(const e of o)e.deoptimizePath(Be);else n.withTrackedEntityAtPath(t,i,()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);i.deoptimizeArgumentsOnInteractionAtPath(e,t,n)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==nt){this.returnExpression=st;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ve,this.deoptimizableDependentExpressions=xe;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Be)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==nt&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===nt?Ze:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),Ze)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===nt?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},st)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(2===s){const{args:s,withNew:i}=t;if((i?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,s,this))return!1}else if((1===s?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,r]=this.getReturnExpression();return(1===s||!r)&&i.hasEffectsOnInteractionAtPath(e,t,n)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,i]=this.getReturnExpression();i||s===nt||n.includedCallArguments.has(s)?rt(t,n):(n.includedCallArguments.add(s),s.includeCallArgumentsWhenCalledAtPath(e,t,n),n.includedCallArguments.delete(s))}}class Ba extends js{createScope(e){this.scope=new ar(e,!0)}}Ba.prototype.preventChildBlockScope=!0,Ba.prototype.includeNode=Us;class za extends js{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===Vs?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}includePath(e,t){this.included=!0,this.expression.includePath(e,t)}removeAnnotations(e){this.expression.removeAnnotations(e)}}za.prototype.includeNode=Gs,za.prototype.applyDeoptimizations=Hs;class Fa extends Es{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new ys("this",null,t,Te,n,"other")),this.instanceScope=new Es(this,n),this.instanceScope.variables.set("this",new ir(n))}findLexicalBoundary(){return this}}class Va extends js{createScope(e){this.scope=new Fa(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,Be,e);for(const n of this.body)n.include(e,t)}}Va.prototype.includeNode=Gs,Va.prototype.applyDeoptimizations=Hs;class ja extends Xi{render(e,t,{renderedSurroundingElement:n}=be){super.render(e,t),n===Un&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function Ua(e){return"symbol"==typeof e?e!==et&&(e===Qe||Ze):!!e}class Ga extends tt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new Ga(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0])),!1]}hasEffectsOnInteractionAtPath(e,t,n){for(const s of this.expressions)if(s.hasEffectsOnInteractionAtPath(e,t,n))return!0;return!1}}class Ha extends js{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Je(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ye(this.flags,65536,e)}get hasDeoptimizedCache(){return Je(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ye(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,null!==this.usedBranch)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Be),this.included&&e.includePath(Be,As());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=xe;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();if(!s){if(this.hasDeoptimizedCache)return Ze;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=Ua(s);if(i===Ze)return Ze;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==Ua(r)?Ze:(this.expressionsToBeDeoptimized.push(n),s!==r?i?Qe:et:s)}return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Ga([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.consequent.hasEffectsOnInteractionAtPath(e,t,n)||this.alternate.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();null===n||t||this.test.shouldBeIncluded(e)?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();null===n||this.test.shouldBeIncluded(t)?(this.consequent.includePath(e,t),this.alternate.includePath(e,t)):n.includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){if(0===e.length){const e=this.getUsedBranch();e?e.includeCallArgumentsWhenCalledAtPath(Te,t,n):(this.consequent.includeCallArgumentsWhenCalledAtPath(Te,t,n),this.alternate.includeCallArgumentsWhenCalledAtPath(Te,t,n))}else rt(t,n)}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=be){if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const o=this.getUsedBranch(),a=oe(e.original,":",this.consequent.end),l=le(e.original,(this.consequent.included?oe(e.original,"?",this.test.end):a)+1);s&&fe(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),this.test.removeAnnotations(e),o.render(e,t,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=Ua(this.test.getLiteralValueAtPath(Te,Ge,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}Ha.prototype.includeNode=Gs,Ha.prototype.applyDeoptimizations=Hs;class Wa extends js{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}Wa.prototype.includeNode=Gs,Wa.prototype.applyDeoptimizations=Hs;class qa extends js{hasEffects(){return!0}}qa.prototype.includeNode=Us;class Ka extends js{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Te,ct,e)}}function Xa(e,t){const{brokenFlow:n,hasBreak:s,hasContinue:i,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=s,e.hasContinue=i,e.brokenFlow=n,!1)}function Ja(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}Ka.prototype.includeNode=Us;class Ya extends js{hasEffects(e){return!!this.test.hasEffects(e)||Xa(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ja(e,this.body,t)}}Ya.prototype.includeNode=Gs,Ya.prototype.applyDeoptimizations=Hs;class Za extends js{hasEffects(){return!1}}Za.prototype.includeNode=Us;class Qa extends js{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}Qa.prototype.needsBoundaries=!0,Qa.prototype.includeNode=Gs,Qa.prototype.applyDeoptimizations=Hs;class el extends js{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;if(null===this.declaration)e.remove(s,i);else{let n=this.declaration.start;if(this.declaration instanceof Ji){const e=this.declaration.decorators;for(const t of e)n=Math.min(n,t.start);n<=this.start&&(n=this.declaration.start)}e.remove(this.start,n),this.declaration.render(e,t,{end:i,start:s})}}}el.prototype.needsBoundaries=!0,el.prototype.includeNode=Gs,el.prototype.applyDeoptimizations=Hs;class tl extends js{}tl.prototype.includeNode=Gs,tl.prototype.applyDeoptimizations=Hs;class nl extends js{createScope(e){this.scope=new ur(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||Xa(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),Ja(e,this.body,t)}render(e,t){this.init?.render(e,t,re),this.test?.render(e,t,re),this.update?.render(e,t,re),this.body.render(e,t)}}nl.prototype.includeNode=Gs,nl.prototype.applyDeoptimizations=Hs;const sl=Symbol("unset");class il extends js{constructor(){super(...arguments),this.testValue=sl}deoptimizeCache(){this.testValue=Ze}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const n=e.brokenFlow;return e.brokenFlow=t,null!==this.alternate&&(!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&n,!1))}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}render(e,t){const{snippets:{getPropertyAccess:n}}=t,s=this.getTestValue(),i=[],r=this.test.included,o=!this.scope.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof s||s)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof s&&s?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(i,e,n)}getTestValue(){return this.testValue===sl?this.testValue=Ua(this.test.getLiteralValueAtPath(Te,Ge,this)):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&n)}renderHoistedDeclarations(e,t,n){const s=[...new Set(e.map(e=>{const t=e.variable;return t.included?t.getName(n):""}))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==Xn&&e!==Fn;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if("IfStatement"===e.type&&e.alternate)return!0;if(e.type===Fn)return!1;e=e.parent}while(e);return!1}}il.prototype.includeNode=Gs,il.prototype.applyDeoptimizations=Hs;class rl extends js{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}rl.prototype.needsBoundaries=!0,rl.prototype.includeNode=Gs,rl.prototype.applyDeoptimizations=Hs;class ol extends js{}ol.prototype.includeNode=Gs,ol.prototype.applyDeoptimizations=Hs;class al{constructor(e){this.interaction={args:[null,e],type:2,withNew:!1}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){it(e),2===e.type&&0===t.length&&(qs(e.args[1])||Ws(e.args[1]))&&e.args[1].deoptimizeArgumentsOnInteractionAtPath(this.interaction,[],n)}includeCallArguments(e,t){ot(e,t),2===e.type&&(qs(e.args[1])||Ws(e.args[1]))&&e.args[1].includeCallArgumentsWhenCalledAtPath(Te,this.interaction,t)}}class ll{deoptimizeArgumentsOnInteractionAtPath(e){it(e)}includeCallArguments(e,t){ot(e,t)}}function cl(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}class ul extends js{constructor(){super(...arguments),this.inlineNamespace=null,this.resolution=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.localResolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return Je(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=Ye(this.flags,268435456,e)}bind(){const{options:e,parent:t,resolution:n,source:s}=this;if(s.bind(),e?.bind(),"object"!=typeof n||!n||!("namespace"in n))return;if(t.type===Un||"AwaitExpression"===t.type)return void(this.localResolution={resolution:n,tracked:!0});if(t.type!==Wn)return void(this.localResolution={resolution:n,tracked:!1});let i=t,r=this;for(;!i.computed&&i.object===r&&i.property.type===Hn&&i.parent.type===Vn;){const e=i.property.name;if(r=i.parent,"then"===e){const e=r.arguments[0];if(void 0===e||e.type===Gn||e.type===zn)return i.promiseHandler=new al(Eo(n.namespace)),void(this.localResolution={resolution:n,tracked:!0})}else if("catch"===e||"finally"===e){if(r.parent.type===Wn){i.promiseHandler=new ll,i=r.parent;continue}if(r.parent.type===Un)return i.promiseHandler=new ll,void(this.localResolution={resolution:n,tracked:!0})}break}this.localResolution={resolution:n,tracked:!1}}deoptimizePath(e){this.localResolution?.resolution?.namespace.deoptimizePath(e)}hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.source.include(e,t),this.shouldIncludeDynamicAttributes&&this.options?.include(e,t),t&&this.localResolution?.resolution.includeAllExports()}includeNode(e){this.included=!0;const{localResolution:t,scope:n,shouldIncludeDynamicAttributes:s}=this;s&&this.options?.includePath(Be,e),n.context.includeDynamicImport(this),n.addAccessedDynamicImport(this),t&&(t.tracked?t.resolution.includeModuleInExecution():t.resolution.includeAllExports())}includePath(e,t){this.included||this.includeNode(t),this.localResolution?.resolution?.namespace.includeMemberPath(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r},importAttributesKey:o}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}if(this.mechanism&&(e.overwrite(this.start,oe(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,n]=s(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${n})`)}}else this.source.render(e,t);!0!==this.attributes&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${n}${i([[o,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,t,n,s,i,r,o,a,l,c){const{format:u}=t;this.inlineNamespace=null,this.resolutionString=r,this.namespaceExportName=o,this.attributes=a;const d=[...hl[u]||[]];let h;({helper:h,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(e,t,n,s,l,c)),h&&d.push(h),d.length>0&&this.scope.addAccessedGlobals(d,i)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,{compact:t,dynamicImportInCjs:n,format:s,generatedCode:{arrowFunctions:i},interop:r},{_:o,getDirectReturnFunction:a,getDirectReturnIifeLeft:l},c,u,d){const{resolution:h,scope:p}=this,f=c.hookFirstSync("renderDynamicImport",[{chunk:cl(u),customResolution:"string"==typeof h?h:null,format:s,getTargetChunkImports(){if(null===d)return null;const e=[],t=u.getFileName();for(const n of d.dependencies){const s=`'${n.getImportPath(t)}'`;n instanceof vo?e.push({fileName:n.getFileName(),resolvedImportPath:s,type:"external"}):e.push({chunk:n.getPreRenderedChunkInfo(),fileName:n.getFileName(),resolvedImportPath:s,type:"internal"})}return e},moduleAttributes:p.context.module.info.attributes,moduleId:p.context.module.id,moduleRawId:p.context.module.rawId,targetChunk:d?cl(d):null,targetModuleAttributes:h&&"string"!=typeof h?h.info.attributes:{},targetModuleId:h&&"string"!=typeof h?h.id:null,targetModuleRawId:h&&"string"!=typeof h?h.info.rawId:null}]);if(f)return{helper:null,mechanism:f};const m=!h||"string"==typeof h;switch(s){case"cjs":{if(n&&(!h||"string"==typeof h||h instanceof Ls))return{helper:null,mechanism:null};const t=dl(h,e,r);let s="require(",o=")";t&&(s=`/*#__PURE__*/${t}(${s}`,o+=")");const[c,u]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return s=`Promise.resolve().then(${c}${s}`,o+=`${u})`,!i&&m&&(s=l(["t"],`${s}t${o}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),o=")"),{helper:t,mechanism:{left:s,right:o}}}case"amd":{const n=t?"c":"resolve",s=t?"e":"reject",c=dl(h,e,r),[u,d]=a(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),p=c?`${u}${n}(/*#__PURE__*/${c}(m))${d}`:n,[f,g]=a([n,s],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${f}require([`,b=`],${o}${p},${o}${s})${g})`;return!i&&m&&(y=l(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:c,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function dl(e,t,n){return"external"===t?Or[n(e instanceof Ls?e.id:null)]:"default"===t?wr:null}ul.prototype.applyDeoptimizations=Hs;const hl={amd:["require"],cjs:["require"],system:["module"]};class pl extends js{}pl.prototype.includeNode=Gs,pl.prototype.applyDeoptimizations=Hs;class fl extends js{}fl.prototype.includeNode=Gs,fl.prototype.applyDeoptimizations=Hs;class ml extends Ui{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();0===e?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):1===e&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Te,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n}){if(this.variable){const s=this.variable.getName(t,n);s!==this.name&&e.overwrite(this.start,this.end,s,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&"preserve"!==this.scope.context.options.jsx.mode&&e.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class gl extends js{render(e,t,{jsxMode:n}=be){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof ml?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=Ms(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?(e.overwrite(t.end,s.start,": ",{contentOnly:!0}),s instanceof Xr&&"string"==typeof s.value&&s.value.includes("\n")&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})):e.appendLeft(t.end,": true")}}}}gl.prototype.includeNode=Us;class yl extends js{render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,t)}}yl.prototype.includeNode=Us;class bl extends js{render(e,t){this.argument.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class El extends js{}El.prototype.includeNode=Us;class xl extends js{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(Be,e)}render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,t)}}const vl=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,Al=/[ \t]*\r?\n[ \t\r\n]*/g;class Sl extends js{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return void 0===this.renderedText&&(this.renderedText=this.value.replace(vl,"").replace(Al," ")),this.renderedText}}function Pl(e){let t=0;for(const n of e)n instanceof xl&&n.expression instanceof El||n instanceof Sl&&!n.shouldRender()||t++;return t}function $l(e,t,n,s,i){const[r,o]=e.split(".");let a;return n?(a=s.scope.context.getImportedJsxFactoryVariable(o?"default":r,s.start,n),t&&(s.scope.findGlobal(r).includePath(Be,i),a.globalName=r)):a=s.scope.findGlobal(r),s.scope.context.includeVariableInModule(a,Be,i),a instanceof ys&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}Sl.prototype.includeNode=Us;class wl extends js{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:e}=this.jsxMode=this.getRenderingMode();e&&this.scope.context.addImportSource(e)}include(e,t){this.included||this.includeNode(e);for(const n of this.children)n.include(e,t)}includeNode(e){this.included=!0;const{factory:t,importSource:n,mode:s}=this.jsxMode;t&&(this.factory=t,this.factoryVariable=$l(t,"preserve"===s,n,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:Pl(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:t}:{factory:n,importSource:s,mode:t}}renderChildren(e,t,n){const{children:s}=this;let i=!1,r=n,o=null;for(const n of s)n instanceof xl&&n.expression instanceof El||n instanceof Sl&&!n.shouldRender()?e.remove(r,n.end):(e.appendLeft(r,", "),n.render(e,t),o?i=!0:o=n),r=n.end;return{childrenEnd:r,firstChild:o,hasMultipleChildren:i}}}wl.prototype.applyDeoptimizations=Hs;class Il extends js{}Il.prototype.includeNode=Us;class Cl extends js{render(e,t,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(e,t);for(const s of this.attributes)s.render(e,t,{jsxMode:n})}}Cl.prototype.includeNode=Us;class kl extends js{hasEffects(e){const{brokenFlow:t,includedLabels:n}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let s=!1;return this.body.hasEffects(e)?s=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t)),e.includedLabels=new Set([...n,...e.includedLabels]),s}include(e,t){this.included||this.includeNode(e);const{brokenFlow:n,includedLabels:s}=e;e.includedLabels=new Set,this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(e,t),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(Be,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,le(e.original,oe(e.original,":",this.label.end)+1)),this.body.render(e,t)}}kl.prototype.applyDeoptimizations=Hs;class Nl extends js{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Je(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ye(this.flags,65536,e)}get hasDeoptimizedCache(){return Je(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ye(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Be),this.included&&e.includePath(Be,As())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=xe;for(const e of t)e.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){if(n===this)return Ze;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=Ua(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),et;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),Qe}}return Ze}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new Ga([this.left.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.left.hasEffectsOnInteractionAtPath(e,t,n)||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||!n||n===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.includePath(e,t),this.right.includePath(e,t)):n.includePath(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=be){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=oe(e.original,this.operator,this.left.end);if(this.right.included){const t=le(e.original,o+2);e.remove(this.start,t),s&&fe(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!ce.test(e[n-1]))return n;n--}}(e.original,this.left.end,o),this.end);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(Te,Ge,this),t=Ua(e);if("symbol"==typeof t||"??"===this.operator&&"symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&t||"&&"===this.operator&&!t||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}Nl.prototype.includeNode=Gs,Nl.prototype.applyDeoptimizations=Hs;class Ol extends js{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.getObjectEntity().include(e,t),this.protoProp?.include(e,t)}includeNode(e){this.included=!0,this.protoProp?.includePath(Be,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}render(e,t,{renderedSurroundingElement:n}=be){if(n!==Un&&n!==zn||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=pe(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):ie(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ii;const t=[];for(const n of this.properties){if(n instanceof bi){t.push({key:$e,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Te,Ge,this);if("symbol"==typeof e){t.push({key:Me(e)?e:$e,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Wi?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof Xr&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new ti(t,e)}}Ol.prototype.applyDeoptimizations=Hs;class Rl extends js{}Rl.prototype.includeNode=Us;class Dl extends js{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Ss()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:n,module:s}=this.scope.context;n(xt,gn(e,s.id,ft(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:t,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(Et,bn(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}render(e,t){let n=this.start;if(e.original.startsWith("#!")&&(n=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,n)),this.body.length>0){for(;"/"===e.original[n]&&/[*/]/.test(e.original[n+1]);){const t=de(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}he(this.body,e,n,this.end,t)}else super.render(e,t)}}Dl.prototype.includeNode=Gs,Dl.prototype.applyDeoptimizations=Hs;class Ml extends qi{get method(){return Je(this.flags,262144)}set method(e){this.flags=Ye(this.flags,262144,e)}get shorthand(){return Je(this.flags,524288)}set shorthand(e){this.flags=Ye(this.flags,524288,e)}declare(e,t,n){return this.value.declare(e,this.getPathInProperty(t),n)}deoptimizeAssignment(e,t){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),t)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,t,n){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.getPathInProperty(t);let i=this.value.includeDestructuredIfNecessary(e,s,n)||this.included;return(i||=this.key.hasEffects(Ss()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,s,n))),!this.included&&i&&this.includeNode(e),this.included}include(e,t){this.included=!0,this.key.include(e,t),this.value.include(e,t)}includePath(e,t){this.included=!0,this.value.includePath(e,t)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}getPathInProperty(e){return e.at(-1)===$e?e:this.computed?[...e,$e]:this.key instanceof Wi?[...e,this.key.name]:[...e,String(this.key.value)]}}Ml.prototype.includeNode=Gs,Ml.prototype.applyDeoptimizations=Hs;class _l extends js{get computed(){return Je(this.flags,1024)}set computed(e){this.flags=Ye(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.value?this.value.getLiteralValueAtPath(e,t,n):Ze}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):st}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||xs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(Be,e);for(const t of this.decorators)t.includePath(Be,e)}}_l.prototype.applyDeoptimizations=Hs;class Ll extends js{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t,n){return this.declarationInit=n,this.argument.declare(e,Tl(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(Tl(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Te)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Te,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,Tl(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,Tl(t),n);return!this.included&&s&&this.includeNode(e),this.included}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([$e,$e]),this.scope.context.requestTreeshakingPass())}}Ll.prototype.includeNode=Us;const Tl=e=>e.at(-1)===$e?e:[...e,$e];class Bl extends js{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e)&&(e.brokenFlow=!0,1))}include(e,t){this.included||this.includeNode(e),this.argument?.include(e,t),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(Be,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||nt)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}Bl.prototype.applyDeoptimizations=Hs;class zl extends js{deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const s of this.expressions)(t||s===n&&!(this.parent instanceof dr)||s.shouldBeIncluded(e))&&s.include(e,t)}includePath(e,t){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=be){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of pe(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&fe(e,u,l.start),1===r){const i=n||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:s&&l===a,renderedParentType:i,renderedSurroundingElement:i})}else l.render(e,t);else ie(l,e,u,d);o&&e.remove(o,this.end)}}zl.prototype.includeNode=Gs,zl.prototype.applyDeoptimizations=Hs;class Fl extends js{createScope(e){this.scope=new ur(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){if(this.body.length>0){const n=oe(e.original.slice(this.start,this.end),"{")+1;he(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}Fl.prototype.includeNode=Gs,Fl.prototype.applyDeoptimizations=Hs;class Vl extends js{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const n of this.consequent)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t,n){if(this.test&&(this.test.render(e,t),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const s=this.test?this.test.end:oe(e.original,"default",this.start)+7,i=oe(e.original,":",s)+1;he(this.consequent,e,i,n.end,t)}}}Vl.prototype.needsBoundaries=!0,Vl.prototype.includeNode=Gs,Vl.prototype.applyDeoptimizations=Hs;class jl extends js{createScope(e){this.parentScope=e,this.scope=new ur(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:n,ignore:s}=e,{breaks:i}=s;s.breaks=!0,e.hasBreak=!1;let r=!0;for(const n of this.cases){if(n.hasEffects(e))return!0;r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),s.breaks=i,e.hasBreak=n,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:n,hasBreak:s}=e;e.hasBreak=!1;let i=!0,r=t||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let s=this.cases.length-1;s>=0;s--){const o=this.cases[s];if(o.included&&(r=!0),!r){const e=Ss();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n):i=n}r&&null!==this.defaultCase&&(e.brokenFlow=i),e.hasBreak=s}initialise(){super.initialise();for(let e=0;e<this.cases.length;e++)if(null===this.cases[e].test)return void(this.defaultCase=e);this.defaultCase=null}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&he(this.cases,e,this.cases[0].start,this.end-1,t)}}jl.prototype.includeNode=Gs,jl.prototype.applyDeoptimizations=Hs;class Ul extends Ta{get hasCheckedForWarnings(){return Je(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=Ye(this.flags,134217728,e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Te,this.interaction,e)}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArgumentsWhenCalledAtPath(Te,this.interaction,e))}initialise(){super.initialise(),this.args=[nt,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Qr&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){if(this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t),!this.hasCheckedForWarnings&&this.tag.type===Hn){this.hasCheckedForWarnings=!0;const{name:e}=this.tag;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Et,cn(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Te,Ge),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Ge){return null===this.returnExpression?(this.returnExpression=st,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Te,this.interaction,e,this)):this.returnExpression}}Ul.prototype.includeNode=Us;class Gl extends js{get tail(){return Je(this.flags,1048576)}set tail(e){this.flags=Ye(this.flags,1048576,e)}bind(){}hasEffects(){return!1}render(){}}Gl.prototype.includeNode=Us;class Hl extends Es{constructor(e,t,n){super(e,t),this.importDescriptions=n,this.variables.set("this",new ys("this",null,es,Te,t,"other"))}addDeclaration(e,t,n,s,i){return this.importDescriptions.has(e.name)&&t.error(Nn(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t){const n=new yo(e,t);return this.variables.set("default",n),n}addNamespaceMemberAccess(){}deconflict(e,t,n){for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof Vi&&this.accessedOutsideVariables.set(e,n),n}}class Wl extends js{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:s,includedLabels:i}=e;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)i.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,n?Fs:t),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=s;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=s),this.finalizer?.include(e,t)}}Wl.prototype.includeNode=Gs,Wl.prototype.applyDeoptimizations=Hs;const ql={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Ze,typeof:e=>typeof e,void:()=>{},"~":e=>~e},Kl=Symbol("Unassigned");class Xl extends js{constructor(){super(...arguments),this.renderedLiteralValue=Kl}get prefix(){return Je(this.flags,2097152)}set prefix(e){this.flags=Ye(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Ze}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ze;const s=this.argument.getLiteralValueAtPath(Te,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===et)return!0;if(s===Qe)return!1}return Ze}return ql[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Wi)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Te,lt,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(Te),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==Kl?this.renderedLiteralValue:this.renderedLiteralValue=e?Ze:Oa(this.getLiteralValueAtPath(Te,Ge,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof Wi&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=Ze)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;Jl.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const Jl=/[\s([=%&*+-/<>^|,?:;]/;Xl.prototype.includeNode=Us;class Yl extends js{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(nt)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i}}=t;if(this.argument.render(e,t),"system"===s){const s=this.argument.variable,r=n.get(s);if(r)if(this.prefix)1===r.length?ge(s,this.start,this.end,e,t):ye(s,this.start,this.end,this.parent.type!==Un,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${me([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==Un,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(Te),this.argument instanceof Wi&&this.scope.findVariable(this.argument.name).markReassigned(),this.scope.context.requestTreeshakingPass()}}function Zl(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}Yl.prototype.includeNode=Us;class Ql extends js{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Te)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=be){this.included=!0;for(const s of this.declarations){(t||s.shouldBeIncluded(e))&&s.include(e,t);const{id:i,init:r}=s;n&&i.include(e,t),r&&i.included&&!r.included&&(i instanceof ka||i instanceof Ia)&&r.include(e,t)}}initialise(){super.initialise();for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=be){if(this.areAllDeclarationsIncludedAndNotExported(t.exportNamesByVariable)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}renderDeclarationEnd(e,t,n,s,i,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===n?e.appendLeft(i,t):(10!==e.original.charCodeAt(s-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(s--,13===e.original.charCodeAt(s)&&s--),s===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(s,i))),r.length>0&&e.appendLeft(i,` ${me(r,o)};`)}renderReplacedDeclarations(e,t){const n=pe(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=le(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,u="";const d=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof Wi&&i.init&&0===n.length&&1===t.exportNamesByVariable.get(i.id.variable)?.length?(s=i.id.variable,n.push(s)):i.id.addExportedVariables(n,t.exportNamesByVariable);n.length>1?s=null:s&&(n.length=0)}return s}(n,t,d);for(const{node:d,start:p,separator:f,contentEnd:m,end:g}of n)if(d.included){if(d.render(e,t),o="",a="",!d.id.included||d.id instanceof Wi&&Zl(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=oe(e.original,"=",d.id.end);ge(h,le(e.original,n+1),null===f?m:f,e,t)}l?u+=",":(c&&(u+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,u+o):(e.overwrite(r,r+1,u),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,u=""}else ie(d,e,p,g);this.renderDeclarationEnd(e,u,r,s,i,d,t)}areAllDeclarationsIncludedAndNotExported(e){if("await using"===this.kind||"using"===this.kind)return!0;for(const t of this.declarations){if(!t.id.included)return!1;if(t.id.type===Hn){if(e.has(t.id.variable))return!1}else{const n=[];if(t.id.addExportedVariables(n,e),n.length>0)return!1}}return!0}}Ql.prototype.includeNode=Gs,Ql.prototype.applyDeoptimizations=Hs;class ec extends js{declareDeclarator(e){this.isUsingDeclaration="using"===e,this.isAsyncUsingDeclaration="await using"===e,this.id.declare(e,Te,this.init||es)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.isUsingDeclaration||this.isAsyncUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,Te,this.init||es)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(e),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,Te,s||es)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,t){const{exportNamesByVariable:n,snippets:{_:s,getPropertyAccess:i}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included||this.isUsingDeclaration||this.isAsyncUsingDeclaration;if(c)o.render(e,t);else{const t=oe(e.original,"=",o.end);e.remove(l,le(e.original,t+1))}a?(o instanceof Wi&&a instanceof ja&&!a.id&&o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`),a.render(e,t,c?be:{renderedSurroundingElement:Un})):o instanceof Wi&&Zl(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(e){this.included=!0;const{id:t,init:n}=this;if(n&&(this.isUsingDeclaration?n.includePath(tc,e):this.isAsyncUsingDeclaration&&n.includePath(nc,e),t instanceof Wi&&n instanceof ja&&!n.id)){const{name:e,variable:s}=t;for(const t of n.scope.accessedOutsideVariables.values())t!==s&&t.forbidName(e)}}}ec.prototype.applyDeoptimizations=Hs;const tc=[Ne],nc=[Oe];class sc extends js{hasEffects(e){return!!this.test.hasEffects(e)||Xa(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),Ja(e,this.body,t)}}sc.prototype.includeNode=Gs,sc.prototype.applyDeoptimizations=Hs;class ic extends ur{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const rc=[class extends js{initialise(){const{id:e}=this.scope.context.module;return Gt(Rn(Ht(kn(this.message)),e))}},class extends js{initialise(){const e=this.start,{id:t}=this.scope.context.module,n=Rn(Ht(kn(this.message,e)),t);this.scope.context.error(n,e)}},Ei,Ia,class extends pr{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Je(this.flags,8388608)}set expression(e){this.flags=Ye(this.flags,8388608,e)}createScope(e){this.scope=new lr(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(2===t.type){const{ignore:e,brokenFlow:t}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=e,n.brokenFlow=t}return!1}onlyFunctionCallUsed(){return this.parent.type===Vn&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Wi||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(Be,e);for(const t of this.params)t instanceof Wi||t.includePath(Be,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ti([],ii)}},class extends js{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:t,isConstReassignment:n,left:s,operator:i,right:r}=this;return t||this.applyDeoptimizations(),n||r.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)||this.left.hasEffectsWhenDestructuring?.(e,Te,r)}hasEffectsOnInteractionAtPath(e,t,n){return 1===t.type&&this.left.included||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,isConstReassignment:s,left:i,right:r,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(e);const a=Ss();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,Te,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Be,e)}initialise(){if(super.initialise(),this.left instanceof Wi){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(Et,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start))}this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=be){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=le(e.original,oe(e.original,"=",r.end)+1);e.remove(a,l),n&&fe(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Wi){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?ge(n,a,l,e,t):ye(n,a,l,c.type!==Un,e,t))}else{const n=[];if(r.addExportedVariables(n,t.exportNamesByVariable),n.length>0)return void function(e,t,n,s,i,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;i.prependRight(t,a(["v"],`${me(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===Un,e,t)}r.included&&r instanceof ka&&(i===Un||i===zn)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(Te,this.right),this.scope.context.requestTreeshakingPass()}},class extends js{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizeAssignment(e,t){this.left.deoptimizeAssignment(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Te,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.left.hasEffectsWhenDestructuring(e,t,n)}includeDestructuredIfNecessary(e,t,n){let s=this.left.includeDestructuredIfNecessary(e,t,n)||this.included;return(s||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,t,n))),!this.included&&s&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Be,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=be){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Te),this.right.deoptimizePath(Be),this.scope.context.requestTreeshakingPass()}},class extends js{deoptimizePath(e){this.argument.deoptimizePath(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise();let e=this.parent;do{const{type:t}=e;if(t===zn||t===Gn||"FunctionDeclaration"===t)return}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(Na,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}},Ma,hr,_a,class extends Ta{get hasCheckedForWarnings(){return Je(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=Ye(this.flags,134217728,e)}get optional(){return Je(this.flags,128)}set optional(e){this.flags=Ye(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof Qr&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Jr(this,this.callee,e,t,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Te,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===Vs)return Vs;if(this.optional&&null==this.callee.getLiteralValueAtPath(Te,Ge,this))return!this.annotationPure&&t||Vs;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(Te,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===Fs&&this.callee instanceof Wi&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArgumentsWhenCalledAtPath(Te,this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations()}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t,{renderedSurroundingElement:n}=be){var s;this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),La(e,t,this),this.callee instanceof Wi&&!this.hasCheckedForWarnings&&(this.hasCheckedForWarnings=!0,this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Et,cn(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Et,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${$t(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:kt("troubleshooting/#avoiding-eval")},this.start))}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Te,Ge),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Ge){return null===this.returnExpression?(this.returnExpression=st,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Te,this.interaction,e,this)):this.returnExpression}},Ba,za,Va,Ji,ja,Ha,Wa,qa,Ka,dr,Ya,Za,Qa,gr,el,tl,dr,class extends js{createScope(e){this.scope=new ur(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||Xa(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Ja(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Be,e)}initialise(){super.initialise(),this.left.setAssignedValue(nt)}render(e,t){this.left.render(e,t,re),this.right.render(e,t,re),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Te),this.scope.context.requestTreeshakingPass()}},class extends js{get await(){return Je(this.flags,131072)}set await(e){this.flags=Ye(this.flags,131072,e)}createScope(e){this.scope=new ur(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),Ja(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(Be,e)}initialise(){super.initialise(),this.left.setAssignedValue(nt)}render(e,t){this.left.render(e,t,re),this.right.render(e,t,re),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Te),this.right.deoptimizePath(Be),this.scope.context.requestTreeshakingPass()}},nl,mr,class extends fr{createScope(e){super.createScope(this.idScope=new Es(e,e.context))}onlyFunctionCallUsed(){return this.parent.type===Vn&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=be){super.render(e,t),n===Un&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}},Wi,il,class extends js{},rl,ol,ul,pl,fl,gl,class extends yl{},class extends yl{},class extends wl{include(e,t){super.include(e,t),this.openingElement.include(e,t),this.closingElement?.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;if("automatic"===t){let e=!1;for(const t of this.openingElement.attributes)if(t instanceof bl)e=!0;else if(e&&"key"===t.name.name)return{factory:n,importSource:s,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factory:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this,[,...u]=o.split("."),{firstAttribute:d,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...u].join("."),!1);this.wrapAttributes(e,f,h,p,d,"null",m),this.renderChildren(e,t,l),c?e.appendLeft(r,")"):i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factoryVariable:o,openingElement:{end:a,selfClosing:l}}=this;let{firstAttribute:c,hasAttributes:u,hasSpread:d,inObject:h,keyAttribute:p,previousEnd:f}=this.renderAttributes(e,t,o.getName(n,s),!0);const{firstChild:m,hasMultipleChildren:g,childrenEnd:y}=this.renderChildren(e,t,a);m&&(e.prependRight(m.start,"children: "+(g?"[":"")),h||(e.prependRight(m.start,"{ "),h=!0),f=i.start,g&&e.appendLeft(f,"]"));const b=m?y:f;if(this.wrapAttributes(e,h,u||!!m,d,c||m,"{}",b),p){const{value:t}=p;e.appendLeft(b,", "),t?e.move(t.start,t.end,b):e.appendLeft(b,"true")}l?e.appendLeft(p?.value?.end||r,")"):i.render(e,t)}renderAttributes(e,t,n,s){const{jsxMode:{mode:i},openingElement:r}=this,{attributes:o,end:a,start:l,name:{start:c,end:u}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let d=null,h=!1,p=!1,f=u,m=!1,g=null;for(const t of o){if(t instanceof gl){if(s&&"key"===t.name.name){d=t,e.remove(f,t.value?.start||t.end);continue}e.appendLeft(f,","),p||(e.prependRight(t.start,"{ "),p=!0),m=!0}else p?(m&&e.appendLeft(f," "),e.appendLeft(f,"},"),p=!1):e.appendLeft(f,","),h=!0;f=t.end,g??=t}return e.remove(o.at(-1)?.end||f,a),{firstAttribute:g,hasAttributes:m,hasSpread:h,inObject:p,keyAttribute:d,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof bl&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}},El,xl,class extends wl{include(e,t){super.include(e,t),this.openingFragment.include(e,t),this.closingFragment.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factory:r,factoryVariable:o,openingFragment:a,start:l}=this,[,...c]=r.split(".");a.render(e,t),e.prependRight(l,`/*#__PURE__*/${[o.getName(n,s),...c].join(".")}(`),e.appendLeft(a.end,", null"),this.renderChildren(e,t,a.end),i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factoryVariable:r,openingFragment:o,start:a}=this;o.render(e,t),e.prependRight(a,`/*#__PURE__*/${r.getName(n,s)}(`);const{firstChild:l,hasMultipleChildren:c,childrenEnd:u}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(u," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}},ml,class extends js{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,t){this.included||this.includeNode(t),this.object.includePath([this.property.name,...e],t)}},Il,Cl,class extends js{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.jsx;if("automatic"===t.mode)this.fragment="Fragment",this.fragmentVariable=$l("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=$l(n,"preserve"===i,s,this,e))}}render(e,t){const{mode:n}=this.scope.context.options.jsx;if("preserve"!==n){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,[,...i]=this.fragment.split("."),r=[this.fragmentVariable.getName(n,s),...i].join(".");e.update(this.start,this.end,r)}}},bl,class extends js{render(e,t){super.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}},Sl,kl,Xr,Xr,Xr,Xr,Xr,Xr,Nl,Qr,class extends js{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===so){if(n?.startsWith(no))return e.getFileName(n.slice(20));if(n?.startsWith(to))return e.getFileName(n.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===so){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Qr&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(no)?this.referenceId=t.slice(20):t?.startsWith(to)&&(this.referenceId=t.slice(16))}}render(e,t){const{format:n,pluginDriver:s,snippets:i}=t,{scope:{context:{module:r}},meta:{name:o},metaProperty:a,parent:l,preliminaryChunkId:c,referenceId:u,start:d,end:h}=this,{id:p,rawId:f,info:{attributes:m}}=r;if(o!==so)return;const g=c;if(u){const t=s.getFileName(u),i=Y(ne(Q(g),t)),r=!!a?.startsWith(no),o=s.hookFirstSync("resolveFileUrl",[{chunkId:g,fileName:t,format:n,moduleAttributes:m,moduleId:p,moduleRawId:f,referenceId:u,relativePath:i}])||fo[n](i,r);return void e.overwrite(l.start,l.end,o,{contentOnly:!0})}let y=s.hookFirstSync("resolveImportMeta",[a,{chunkId:g,format:n,moduleAttributes:m,moduleId:p,moduleRawId:f}]);y||(y=mo[n]?.(a,{chunkId:g,snippets:i}),t.accessedDocumentCurrentScript||=io.includes(n)&&"undefined"!==y),"string"==typeof y&&(l instanceof Qr?e.overwrite(l.start,l.end,y,{contentOnly:!0}):e.overwrite(d,h,y,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(to)||this.metaProperty?.startsWith(no)?oo:ro)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}},Ki,class extends js{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Te,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArgumentsWhenCalledAtPath(Te,this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(Be,e)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t){this.callee.render(e,t),La(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Te,Ge),this.scope.context.requestTreeshakingPass()}},Ol,ka,Rl,Dl,Ml,_l,Ll,Bl,zl,bi,Fl,class extends js{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Te,e)}},Vl,jl,Ul,Gl,class extends js{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Ze:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?st:ms(ps,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||fs(ps,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(Be,e)}render(e,t){this.scope.context.addIndentExclusionRange([this.start,this.end]),super.render(e,t)}},class extends js{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,n)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Te,e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,t));const n=function(e,t){for(;!(e instanceof cr&&e.thisVariable===t);){if(!(e instanceof Es))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof Ml&&n.functionNode.parent.parent instanceof Ol&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Hl?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Et,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:kt("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},class extends js{hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(Be,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},Wl,Xl,Yl,Ql,ec,sc,class extends js{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(Be)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(Be,e)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}],oc=[function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.elements=lc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=lc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const r=e.annotations=ya(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=lc(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",Te,nt)),o[o.length-1]instanceof Ll),e.body=ac(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=ga[n[t]],e.left=ac(e,s,n[t+1],n),e.right=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=ac(e,s,n[t],n),e.right=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=ga[n[t]],e.left=ac(e,s,n[t+1],n),e.right=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=lc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:ac(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=ya(n[t+1],n),e.callee=ac(e,s,n[t+2],n),e.arguments=lc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:ac(e,s,i,n);r?.declare("parameter",Te,nt),e.body=ac(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];if(i){const t=n[i],r=e.body=new Array(t);for(let o=0;o<t;o++){const t=n[i+1+o];r[o]=ac(e,79===n[t]||1&n[t+3]?s:s.instanceScope,t,n)}}else e.body=[]},function(e,t,n){const{scope:s}=e;e.decorators=lc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:ac(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:ac(e,s,r,n),e.body=ac(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=lc(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:ac(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:ac(e,s,r,n),e.body=ac(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=ac(e,s,n[t],n),e.consequent=ac(e,s,n[t+1],n),e.alternate=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:ac(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=ac(e,s,n[t],n),e.test=ac(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:ac(e,s,i,n),e.source=ac(e,s,n[t+1],n),e.attributes=lc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=lc(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:ac(e,s,i,n),e.attributes=lc(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:ac(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=ac(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:ac(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=ac(e,s,n[t],n),e.right=ac(e,s,n[t+1],n),e.body=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=ac(e,s,n[t+1],n),e.right=ac(e,s,n[t+2],n),e.body=ac(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:ac(e,s,i,n);const r=n[t+1];e.test=0===r?null:ac(e,s,r,n);const o=n[t+2];e.update=0===o?null:ac(e,s,o,n),e.body=ac(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=ya(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:ac(e,s.parent,o,n);const a=e.params=lc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Te,nt)),a[a.length-1]instanceof Ll),e.body=ac(e,s.bodyScope,n[t+4],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=ya(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:ac(e,e.idScope,o,n);const a=e.params=lc(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Te,nt)),a[a.length-1]instanceof Ll),e.body=ac(e,s.bodyScope,n[t+4],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.test=ac(e,s,n[t],n),e.consequent=ac(e,e.consequentScope=new ic(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:ac(e,e.alternateScope=new ic(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=ac(e,s,n[t],n),e.value=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=lc(e,s,n[t],n),e.source=ac(e,s,n[t+1],n),e.attributes=lc(e,s,n[t+2],n);const i=n[t+3];e.phase=0===i?void 0:ga[n[t+3]]},function(e,t,n){const{scope:s}=e;e.local=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=ac(e,s,n[t],n),e.sourceAstNode=va(n[t],n);const i=n[t+1];e.options=0===i?null:ac(e,s,i,n);const r=n[t+2];e.phase=0===r?void 0:ga[n[t+2]]},function(e,t,n){const{scope:s}=e;e.local=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=ac(e,s,n[t+1],n),e.imported=0===i?e.local:ac(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=ac(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:ac(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=ac(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=ac(e,s,n[t],n),e.children=lc(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:ac(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=ac(e,s,n[t],n),e.children=lc(e,s,n[t+1],n),e.closingFragment=ac(e,s,n[t+2],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.object=ac(e,s,n[t],n),e.property=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=ac(e,s,n[t],n),e.name=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=ac(e,s,n[t+1],n),e.attributes=lc(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=ac(e,s,n[t],n)},function(e,t,n){e.value=n.convertString(n[t]),e.raw=n.convertString(n[t+1])},function(e,t,n){const{scope:s}=e;e.label=ac(e,s,n[t],n),e.body=ac(e,s,n[t+1],n)},function(e,t,n){const s=e.bigint=n.convertString(n[t]);e.raw=n.convertString(n[t+1]),e.value=BigInt(s)},function(e,t,n){const s=n[t],i=e.value=!(1&~s);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,n){const s=n[t];e.raw=0===s?void 0:n.convertString(s),e.value=new DataView(n.buffer).getFloat64(t+1<<2,!0)},function(e,t,n){const s=n.convertString(n[t]),i=n.convertString(n[t+1]);e.raw=`/${i}/${s}`,e.regex={flags:s,pattern:i},e.value=new RegExp(i,s)},function(e,t,n){e.value=n.convertString(n[t]);const s=n[t+1];e.raw=0===s?void 0:n.convertString(s)},function(e,t,n){const{scope:s}=e;e.operator=ga[n[t]],e.left=ac(e,s,n[t+1],n),e.right=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=ac(e,s,n[t+1],n),e.property=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=ac(e,s,n[t],n),e.property=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=lc(e,s,n[t+1],n),e.key=ac(e,s,n[t+2],n),e.value=ac(e,s,n[t+3],n),e.kind=ga[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=ya(n[t],n),e.callee=ac(e,s,n[t+1],n),e.arguments=lc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=lc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=lc(e,s,n[t],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.body=lc(e,s,n[t],n),e.invalidAnnotations=ya(n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const r=n[t+1];e.value=ac(e,s,n[t+2],n),e.kind=ga[n[t+3]],e.key=0===r?e.value:ac(e,s,r,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=lc(e,s,n[t+1],n),e.key=ac(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:ac(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:ac(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=lc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=lc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:ac(e,s,i,n),e.consequent=lc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=ac(e,e.parentScope,n[t],n),e.cases=lc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=ac(e,s,n[t],n),e.quasi=ac(e,s,n[t+1],n)},function(e,t,n){const s=n[t];e.tail=!(1&~s);const i=n[t+1],r=0===i?void 0:n.convertString(i),o=n.convertString(n[t+2]);e.value={cooked:r,raw:o}},function(e,t,n){const{scope:s}=e;e.quasis=lc(e,s,n[t],n),e.expressions=lc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=ac(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=ac(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:ac(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:ac(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=ga[n[t]],e.argument=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=ga[n[t+1]],e.argument=ac(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=ga[n[t]],e.declarations=lc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=ac(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:ac(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=ac(e,s,n[t],n),e.body=ac(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.delegate=!(1&~i);const r=n[t+1];e.argument=0===r?null:ac(e,s,r,n)}];function ac(e,t,n,s){const i=s[n],r=rc[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=wa[i],o.start=s[n+1],o.end=s[n+2],oc[i](o,n+3,s),o.initialise(),o}function lc(e,t,n,s){if(0===n)return xe;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?ac(e,t,i,s):null}return r}class cc extends gs{constructor(e){super(Bo),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var uc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(uc||(uc={}));const dc=new WeakMap;function hc(e,t){if(e){const t=dc.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=b(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||hc(e)}function pc(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),!e.mappings)return{mappings:[],names:[],sources:[],version:3};const t=e.mappings,n=Array.isArray(t),s={decodedMappings:n?t:void 0,encodedMappings:n?void 0:t},i={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?function(e){const{length:t}=e,n=new m(e),s=[];let i=0,r=0,o=0,a=0,u=0;do{const e=n.indexOf(";"),t=[];let d=!0,p=0;for(i=0;n.pos<e;){let s;i+=c(l(n)),i<p&&(d=!1),p=i,h(n,e)?(r+=c(l(n)),o+=c(l(n)),a+=c(l(n)),h(n,e)?(u+=c(l(n)),s=[i,r,o,a,u]):s=[i,r,o,a]):s=[i],t.push(s),n.pos++}d||g(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return dc.set(i,s),i}function fc(e){return e.id}function mc(e,t){if(!t||0===Object.keys(t).length)return e;const n=Object.fromEntries(Object.entries(t).sort(([e],[t])=>e<t?-1:e>t?1:0));return`${e}${e.includes("?")?"&":"?"}attributes=${encodeURIComponent(JSON.stringify(n))}`}function gc(e){return"object"==typeof e?mc(e.rawId,e.attributes):e}function yc(e){if("object"==typeof e)return{...e,id:mc(e.rawId,e.attributes)};const{rawId:t,attributes:n}=function(e){const t=Math.max(e.lastIndexOf("?attributes="),e.lastIndexOf("&attributes="));if(-1===t)return{rawId:e};try{const n=e.slice(0,t),s=JSON.parse(decodeURIComponent(e.slice(t+12)));if(mc(n,s)===e)return{attributes:s,rawId:n}}catch{}return{rawId:e}}(e);return{attributes:n,id:e,rawId:t}}function bc(e,t,n){try{const o=Lc.__wbindgen_add_to_stack_pointer(-16),a=Oc(e,Lc.__wbindgen_export2,Lc.__wbindgen_export3),l=Tc;Lc.parse(o,a,l,t,n);var s=Pc().getInt32(o+0,!0),i=Pc().getInt32(o+4,!0),r=vc(s,i).slice();return Lc.__wbindgen_export(s,1*i,1),r}finally{Lc.__wbindgen_add_to_stack_pointer(16)}}function Ec(){return{__proto__:null,"./bindings_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_41e9ee4f547fc59a:function(e,t){throw new Error($c(e,t))},__wbg_error_757e9472f8410341:function(e,t){let n,s;try{n=e,s=t,console.error($c(e,t))}finally{Lc.__wbindgen_export(n,s,1)}},__wbg_length_1e9d4dcab09bd28f:function(e){return Cc(e).length},__wbg_length_7f3c00c40364105e:function(e){return Cc(e).length},__wbg_new_227d7c05414eb861:function(){return xc(new Error)},__wbg_prototypesetcall_158adb600d119d3c:function(e,t,n){var s,i;BigUint64Array.prototype.set.call((s=e,i=t,s>>>=0,(null!==Ac&&0!==Ac.byteLength||(Ac=new BigUint64Array(Lc.memory.buffer)),Ac).subarray(s/8,s/8+i)),Cc(n))},__wbg_prototypesetcall_bc27214492979395:function(e,t,n){Uint8Array.prototype.set.call(vc(e,t),Cc(n))},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=Oc(Cc(t).stack,Lc.__wbindgen_export2,Lc.__wbindgen_export3),s=Tc;Pc().setInt32(e+4,s,!0),Pc().setInt32(e+0,n,!0)},__wbindgen_object_drop_ref:function(e){!function(e){Cc(e);!function(e){e<1028||(kc[e]=Nc,Nc=e)}(e)}(e)}}}}function xc(e){Nc===kc.length&&kc.push(kc.length+1);const t=Nc;return Nc=kc[t],kc[t]=e,t}function vc(e,t){return e>>>=0,Ic().subarray(e/1,e/1+t)}let Ac=null,Sc=null;function Pc(){return(null===Sc||!0===Sc.buffer.detached||void 0===Sc.buffer.detached&&Sc.buffer!==Lc.memory.buffer)&&(Sc=new DataView(Lc.memory.buffer)),Sc}function $c(e,t){return function(e,t){return Mc+=t,Mc>=Dc&&(Rc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),Rc.decode(),Mc=t),Rc.decode(Ic().subarray(e,e+t))}(e>>>0,t)}let wc=null;function Ic(){return null!==wc&&0!==wc.byteLength||(wc=new Uint8Array(Lc.memory.buffer)),wc}function Cc(e){return kc[e]}let kc=new Array(1024).fill(void 0);kc.push(void 0,null,!0,!1);let Nc=kc.length;function Oc(e,t,n){if(void 0===n){const n=_c.encode(e),s=t(n.length,1)>>>0;return Ic().subarray(s,s+n.length).set(n),Tc=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Ic();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;r[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=n(i,s,s=o+3*e.length,1)>>>0;const t=Ic().subarray(i+o,i+s);o+=_c.encodeInto(e,t).written,i=n(i,s,o,1)>>>0}return Tc=o,i}let Rc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});Rc.decode();const Dc=2146435072;let Mc=0;const _c=new TextEncoder;"encodeInto"in _c||(_c.encodeInto=function(e,t){const n=_c.encode(e);return t.set(n),{read:e.length,written:n.length}});let Lc,Tc=0;async function Bc(e){if(void 0!==Lc)return Lc;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("bindings_wasm_bg.wasm","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("rollup.browser.js",document.baseURI).href));const n=Ec();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if(!e.ok)throw new Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,n);return function(e){return Lc=e.exports,Ac=null,Sc=null,wc=null,Lc}(s)}async function zc(e,t,n,s,i){return function(e,t,n,s,i){try{const l=Lc.__wbindgen_add_to_stack_pointer(-16),c=Oc(e,Lc.__wbindgen_export2,Lc.__wbindgen_export3),u=Tc;Lc.parseAndWalkSync(l,c,u,t,n,xc(s),i);var r=Pc().getInt32(l+0,!0),o=Pc().getInt32(l+4,!0),a=vc(r,o).slice();return Lc.__wbindgen_export(r,1*o,1),a}finally{Lc.__wbindgen_add_to_stack_pointer(16)}}(e,t,n,s,i)}const Fc=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:jc(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:jc(t[e+2],t)}},function(e,t){const n=t[e+2],s=ya(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{annotations:s}:{},params:jc(t[e+4],t),body:Vc(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:ga[t[e+2]],left:Vc(t[e+3],t),right:Vc(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:Vc(t[e+2],t),right:Vc(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:Vc(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:ga[t[e+2]],left:Vc(t[e+3],t),right:Vc(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:jc(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:0===n?null:Vc(n,t)}},function(e,t){const n=t[e+2],s=ya(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{annotations:s}:{},callee:Vc(t[e+4],t),arguments:jc(t[e+5],t)}},function(e,t){const n=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:0===n?null:Vc(n,t),body:Vc(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:Vc(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:jc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:jc(t[e+2],t),id:0===n?null:Vc(n,t),superClass:0===s?null:Vc(s,t),body:Vc(t[e+5],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:jc(t[e+2],t),id:0===n?null:Vc(n,t),superClass:0===s?null:Vc(s,t),body:Vc(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:Vc(t[e+2],t),consequent:Vc(t[e+3],t),alternate:Vc(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:0===n?null:Vc(n,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:Vc(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:Vc(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:Vc(t[e+2],t),test:Vc(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:0===n?null:Vc(n,t),source:Vc(t[e+3],t),attributes:jc(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:Vc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:jc(t[e+2],t),source:0===n?null:Vc(n,t),attributes:jc(t[e+4],t),declaration:0===s?null:Vc(s,t)}},function(e,t){const n=Vc(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:Vc(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:Vc(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:Vc(t[e+2],t),right:Vc(t[e+3],t),body:Vc(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),left:Vc(t[e+3],t),right:Vc(t[e+4],t),body:Vc(t[e+5],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:0===n?null:Vc(n,t),test:0===s?null:Vc(s,t),update:0===i?null:Vc(i,t),body:Vc(t[e+5],t)}},function(e,t){const n=t[e+2],s=ya(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},id:0===i?null:Vc(i,t),params:jc(t[e+5],t),body:Vc(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=ya(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},id:0===i?null:Vc(i,t),params:jc(t[e+5],t),body:Vc(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:Vc(t[e+2],t),consequent:Vc(t[e+3],t),alternate:0===n?null:Vc(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:Vc(t[e+2],t),value:Vc(t[e+3],t)}},function(e,t){const n=t[e+5];return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:jc(t[e+2],t),source:Vc(t[e+3],t),attributes:jc(t[e+4],t),phase:0===n?void 0:ga[t[e+5]]}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:Vc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ImportExpression",start:t[e],end:t[e+1],source:Vc(t[e+2],t),options:0===n?null:Vc(n,t),phase:0===s?void 0:ga[t[e+4]]}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:Vc(t[e+2],t)}},function(e,t){const n=t[e+2],s=Vc(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:Vc(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:Vc(t[e+2],t),value:0===n?null:Vc(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:Vc(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:Vc(t[e+2],t),children:jc(t[e+3],t),closingElement:0===n?null:Vc(n,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:Vc(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:Vc(t[e+2],t),children:jc(t[e+3],t),closingFragment:Vc(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:Vc(t[e+2],t),property:Vc(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:Vc(t[e+2],t),name:Vc(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),name:Vc(t[e+3],t),attributes:jc(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:Vc(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:Vc(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:Vc(t[e+2],t),body:Vc(t[e+3],t)}},function(e,t){const n=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:n,raw:t.convertString(t[e+3]),value:BigInt(n)}},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:0===n?void 0:t.convertString(n),value:new DataView(t.buffer).getFloat64(e+3<<2,!0)}},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:0===n?void 0:t.convertString(n)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:ga[t[e+2]],left:Vc(t[e+3],t),right:Vc(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),object:Vc(t[e+3],t),property:Vc(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:Vc(t[e+2],t),property:Vc(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:jc(t[e+3],t),key:Vc(t[e+4],t),value:Vc(t[e+5],t),kind:ga[t[e+6]]}},function(e,t){const n=ya(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{annotations:n}:{},callee:Vc(t[e+3],t),arguments:jc(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:jc(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:jc(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=ya(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:jc(t[e+2],t),...n.length>0?{invalidAnnotations:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=Vc(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:0===s?{...i}:Vc(s,t),value:i,kind:ga[t[e+5]]}},function(e,t){const n=t[e+2],s=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:jc(t[e+3],t),key:Vc(t[e+4],t),value:0===s?null:Vc(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:Vc(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:0===n?null:Vc(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:jc(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:Vc(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:jc(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:0===n?null:Vc(n,t),consequent:jc(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:Vc(t[e+2],t),cases:jc(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:Vc(t[e+2],t),quasi:Vc(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?void 0:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:jc(t[e+2],t),expressions:jc(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:Vc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:Vc(t[e+2],t),handler:0===n?null:Vc(n,t),finalizer:0===s?null:Vc(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:ga[t[e+2]],argument:Vc(t[e+3],t),prefix:!0}},function(e,t){const n=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),operator:ga[t[e+3]],argument:Vc(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:ga[t[e+2]],declarations:jc(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:Vc(t[e+2],t),init:0===n?null:Vc(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:Vc(t[e+2],t),body:Vc(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),argument:0===s?null:Vc(s,t)}}];function Vc(e,t){const n=t[e],s=Fc[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function jc(e,t){if(0===e)return xe;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?Vc(n,t):null}return s}var Uc={"!":10,"!=":18,"!==":20,"%":30,"%=":45,"&":33,"&&":35,"&&=":53,"&=":51,"*":28,"**":38,"**=":52,"*=":43,"+":9,"++":15,"+=":41,"-":8,"--":16,"-=":42,"/":29,"/=":44,"<":21,"<<":25,"<<=":46,"<=":22,"=":40,"==":17,"===":19,">":23,">=":24,">>":26,">>=":47,">>>":27,">>>=":48,"??":39,"??=":55,"^":32,"^=":50,"await using":60,const:2,constructor:6,defer:62,delete:14,get:4,in:36,init:3,instanceof:37,let:1,method:7,noSideEffects:57,pure:56,set:5,source:61,sourcemap:58,typeof:12,using:59,var:0,void:13,"|":31,"|=":49,"||":34,"||=":54,"~":11};const Gc=e=>{const t=("undefined"==typeof Buffer?Pa:$a)(65536);return(Hc[e.type]||Gt(un(e.type,null,"")))(e,t).toOutput()},Hc={ArrayExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=2,t[n+1]=e.start,t[n+2]=e.end,t=tu("elements",e,t,n+3)},ArrayPattern:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=3,t[n+1]=e.start,t[n+2]=e.end,t=tu("elements",e,t,n+3)},ArrowFunctionExpression:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=4,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.async|e.expression<<1|e.generator<<2,t=eu("body",e,t=tu("params",e,t=nu(e.annotations,t,n+4),n+5),n+6)},AssignmentExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=5,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=Uc[e.operator],t=eu("left",e,t,n+4),t=eu("right",e,t,n+5)},AssignmentPattern:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=6,t[n+1]=e.start,t[n+2]=e.end,t=eu("left",e,t,n+3),t=eu("right",e,t,n+4)},AwaitExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=7,t[n+1]=e.start,t[n+2]=e.end,t=eu("argument",e,t,n+3)},BinaryExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=8,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=Uc[e.operator],t=eu("left",e,t,n+4),t=eu("right",e,t,n+5)},BlockStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=9,t[n+1]=e.start,t[n+2]=e.end,t=tu("body",e,t,n+3)},BreakStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=10,t[n+1]=e.start,t[n+2]=e.end,null!=e.label&&(t=eu("label",e,t,n+3)),t},CallExpression:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=11,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.optional,t=tu("arguments",e,t=eu("callee",e,t=nu(e.annotations,t,n+4),n+5),n+6)},CatchClause:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=12,t[n+1]=e.start,t[n+2]=e.end,null!=e.param&&(t=eu("param",e,t,n+3)),t=eu("body",e,t,n+4)},ChainExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=13,t[n+1]=e.start,t[n+2]=e.end,t=eu("expression",e,t,n+3)},ClassBody:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=14,t[n+1]=e.start,t[n+2]=e.end,t=tu("body",e,t,n+3)},ClassDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=15,t[n+1]=e.start,t[n+2]=e.end,t=tu("decorators",e,t,n+3),null!=e.id&&(t=eu("id",e,t,n+4)),null!=e.superClass&&(t=eu("superClass",e,t,n+5)),t=eu("body",e,t,n+6)},ClassExpression:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=16,t[n+1]=e.start,t[n+2]=e.end,t=tu("decorators",e,t,n+3),null!=e.id&&(t=eu("id",e,t,n+4)),null!=e.superClass&&(t=eu("superClass",e,t,n+5)),t=eu("body",e,t,n+6)},ConditionalExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=17,t[n+1]=e.start,t[n+2]=e.end,t=eu("test",e,t,n+3),t=eu("consequent",e,t,n+4),t=eu("alternate",e,t,n+5)},ContinueStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=18,t[n+1]=e.start,t[n+2]=e.end,null!=e.label&&(t=eu("label",e,t,n+3)),t},DebuggerStatement:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=19,t[n+1]=e.start,t[n+2]=e.end,t},Decorator:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=20,t[n+1]=e.start,t[n+2]=e.end,t=eu("expression",e,t,n+3)},DoWhileStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=22,t[n+1]=e.start,t[n+2]=e.end,t=eu("body",e,t,n+3),t=eu("test",e,t,n+4)},EmptyStatement:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=23,t[n+1]=e.start,t[n+2]=e.end,t},ExportAllDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=24,t[n+1]=e.start,t[n+2]=e.end,null!=e.exported&&(t=eu("exported",e,t,n+3)),t=tu("attributes",e,t=eu("source",e,t,n+4),n+5)},ExportDefaultDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=25,t[n+1]=e.start,t[n+2]=e.end,t=eu("declaration",e,t,n+3)},ExportNamedDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=26,t[n+1]=e.start,t[n+2]=e.end,t=tu("specifiers",e,t,n+3),null!=e.source&&(t=eu("source",e,t,n+4)),t=tu("attributes",e,t,n+5),null!=e.declaration&&(t=eu("declaration",e,t,n+6)),t},ExportSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=27,t[n+1]=e.start,t[n+2]=e.end,t=eu("local",e,t,n+3),e.exported.end!=e.local.end&&(t=eu("exported",e,t,n+4)),t},ExpressionStatement:(e,t)=>"directive"in e?Wc(e,t):qc(e,t),ForInStatement:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=29,t[n+1]=e.start,t[n+2]=e.end,t=eu("left",e,t,n+3),t=eu("right",e,t,n+4),t=eu("body",e,t,n+5)},ForOfStatement:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=30,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.await,t=eu("left",e,t,n+4),t=eu("right",e,t,n+5),t=eu("body",e,t,n+6)},ForStatement:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=31,t[n+1]=e.start,t[n+2]=e.end,null!=e.init&&(t=eu("init",e,t,n+3)),null!=e.test&&(t=eu("test",e,t,n+4)),null!=e.update&&(t=eu("update",e,t,n+5)),t=eu("body",e,t,n+6)},FunctionDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(9))[n]=32,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.async|e.generator<<1,t=nu(e.annotations,t,n+4),null!=e.id&&(t=eu("id",e,t,n+5)),t=eu("body",e,t=tu("params",e,t,n+6),n+7)},FunctionExpression:(e,t)=>{const n=t.position;return(t=t.reserve(9))[n]=33,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.async|e.generator<<1,t=nu(e.annotations,t,n+4),null!=e.id&&(t=eu("id",e,t,n+5)),t=eu("body",e,t=tu("params",e,t,n+6),n+7)},Identifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=34,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.name,n+3)},IfStatement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=35,t[n+1]=e.start,t[n+2]=e.end,t=eu("test",e,t,n+3),t=eu("consequent",e,t,n+4),null!=e.alternate&&(t=eu("alternate",e,t,n+5)),t},ImportAttribute:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=36,t[n+1]=e.start,t[n+2]=e.end,t=eu("key",e,t,n+3),t=eu("value",e,t,n+4)},ImportDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=37,t[n+1]=e.start,t[n+2]=e.end,t=tu("specifiers",e,t,n+3),t=tu("attributes",e,t=eu("source",e,t,n+4),n+5),null!=e.phase&&(t[n+6]=Uc[e.phase]),t},ImportDefaultSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=38,t[n+1]=e.start,t[n+2]=e.end,t=eu("local",e,t,n+3)},ImportExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=39,t[n+1]=e.start,t[n+2]=e.end,t=eu("source",e,t,n+3),null!=e.options&&(t=eu("options",e,t,n+4)),null!=e.phase&&(t[n+5]=Uc[e.phase]),t},ImportNamespaceSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=40,t[n+1]=e.start,t[n+2]=e.end,t=eu("local",e,t,n+3)},ImportSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=41,t[n+1]=e.start,t[n+2]=e.end,e.imported.end!=e.local.end&&(t=eu("imported",e,t,n+3)),t=eu("local",e,t,n+4)},JSXAttribute:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=42,t[n+1]=e.start,t[n+2]=e.end,t=eu("name",e,t,n+3),null!=e.value&&(t=eu("value",e,t,n+4)),t},JSXClosingElement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=43,t[n+1]=e.start,t[n+2]=e.end,t=eu("name",e,t,n+3)},JSXClosingFragment:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=44,t[n+1]=e.start,t[n+2]=e.end,t},JSXElement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=45,t[n+1]=e.start,t[n+2]=e.end,t=tu("children",e,t=eu("openingElement",e,t,n+3),n+4),null!=e.closingElement&&(t=eu("closingElement",e,t,n+5)),t},JSXEmptyExpression:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=46,t[n+1]=e.start,t[n+2]=e.end,t},JSXExpressionContainer:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=47,t[n+1]=e.start,t[n+2]=e.end,t=eu("expression",e,t,n+3)},JSXFragment:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=48,t[n+1]=e.start,t[n+2]=e.end,t=eu("openingFragment",e,t,n+3),t=eu("closingFragment",e,t=tu("children",e,t,n+4),n+5)},JSXIdentifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=49,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.name,n+3)},JSXMemberExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=50,t[n+1]=e.start,t[n+2]=e.end,t=eu("object",e,t,n+3),t=eu("property",e,t,n+4)},JSXNamespacedName:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=51,t[n+1]=e.start,t[n+2]=e.end,t=eu("namespace",e,t,n+3),t=eu("name",e,t,n+4)},JSXOpeningElement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=52,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.selfClosing,t=tu("attributes",e,t=eu("name",e,t,n+4),n+5)},JSXOpeningFragment:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=53,t[n+1]=e.start,t[n+2]=e.end,t},JSXSpreadAttribute:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=54,t[n+1]=e.start,t[n+2]=e.end,t=eu("argument",e,t,n+3)},JSXSpreadChild:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=55,t[n+1]=e.start,t[n+2]=e.end,t=eu("expression",e,t,n+3)},JSXText:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=56,t[n+1]=e.start,t[n+2]=e.end,t=(t=t.addStringToBuffer(e.value,n+3)).addStringToBuffer(e.raw,n+4)},LabeledStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=57,t[n+1]=e.start,t[n+2]=e.end,t=eu("label",e,t,n+3),t=eu("body",e,t,n+4)},Literal:(e,t)=>{switch(typeof e.value){case"object":return null===e.value?Jc(e,t):Zc(e,t);case"boolean":return Xc(e,t);case"number":return Yc(e,t);case"string":return Qc(e,t);case"bigint":return Kc(e,t);default:throw new Error("Unexpected node value type for Literal: "+typeof e.value)}},LogicalExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=64,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=Uc[e.operator],t=eu("left",e,t,n+4),t=eu("right",e,t,n+5)},MemberExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=65,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.computed|e.optional<<1,t=eu("object",e,t,n+4),t=eu("property",e,t,n+5)},MetaProperty:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=66,t[n+1]=e.start,t[n+2]=e.end,t=eu("meta",e,t,n+3),t=eu("property",e,t,n+4)},MethodDefinition:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=67,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.static|e.computed<<1,t=eu("key",e,t=tu("decorators",e,t,n+4),n+5),(t=eu("value",e,t,n+6))[n+7]=Uc[e.kind],t},NewExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=68,t[n+1]=e.start,t[n+2]=e.end,t=tu("arguments",e,t=eu("callee",e,t=nu(e.annotations,t,n+3),n+4),n+5)},ObjectExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=69,t[n+1]=e.start,t[n+2]=e.end,t=tu("properties",e,t,n+3)},ObjectPattern:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=70,t[n+1]=e.start,t[n+2]=e.end,t=tu("properties",e,t,n+3)},PanicError:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=0,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.message,n+3)},ParseError:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=1,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.message,n+3)},PrivateIdentifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=71,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.name,n+3)},Program:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=72,t[n+1]=e.start,t[n+2]=e.end,t=tu("body",e,t,n+3),t=nu(e.invalidAnnotations,t,n+4)},Property:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=73,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.method|e.shorthand<<1|e.computed<<2,e.key.end!=e.value.end&&(t=eu("key",e,t,n+4)),(t=eu("value",e,t,n+5))[n+6]=Uc[e.kind],t},PropertyDefinition:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=74,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.static|e.computed<<1,t=eu("key",e,t=tu("decorators",e,t,n+4),n+5),null!=e.value&&(t=eu("value",e,t,n+6)),t},RestElement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=75,t[n+1]=e.start,t[n+2]=e.end,t=eu("argument",e,t,n+3)},ReturnStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=76,t[n+1]=e.start,t[n+2]=e.end,null!=e.argument&&(t=eu("argument",e,t,n+3)),t},SequenceExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=77,t[n+1]=e.start,t[n+2]=e.end,t=tu("expressions",e,t,n+3)},SpreadElement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=78,t[n+1]=e.start,t[n+2]=e.end,t=eu("argument",e,t,n+3)},StaticBlock:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=79,t[n+1]=e.start,t[n+2]=e.end,t=tu("body",e,t,n+3)},Super:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=80,t[n+1]=e.start,t[n+2]=e.end,t},SwitchCase:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=81,t[n+1]=e.start,t[n+2]=e.end,null!=e.test&&(t=eu("test",e,t,n+3)),t=tu("consequent",e,t,n+4)},SwitchStatement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=82,t[n+1]=e.start,t[n+2]=e.end,t=tu("cases",e,t=eu("discriminant",e,t,n+3),n+4)},TaggedTemplateExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=83,t[n+1]=e.start,t[n+2]=e.end,t=eu("tag",e,t,n+3),t=eu("quasi",e,t,n+4)},TemplateElement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=84,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.tail,null!=e.value.cooked&&(t=t.addStringToBuffer(e.value.cooked,n+4)),t=t.addStringToBuffer(e.value.raw,n+5)},TemplateLiteral:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=85,t[n+1]=e.start,t[n+2]=e.end,t=tu("quasis",e,t,n+3),t=tu("expressions",e,t,n+4)},ThisExpression:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=86,t[n+1]=e.start,t[n+2]=e.end,t},ThrowStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=87,t[n+1]=e.start,t[n+2]=e.end,t=eu("argument",e,t,n+3)},TryStatement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=88,t[n+1]=e.start,t[n+2]=e.end,t=eu("block",e,t,n+3),null!=e.handler&&(t=eu("handler",e,t,n+4)),null!=e.finalizer&&(t=eu("finalizer",e,t,n+5)),t},UnaryExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=89,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=Uc[e.operator],t=eu("argument",e,t,n+4)},UpdateExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=90,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.prefix,t[n+4]=Uc[e.operator],t=eu("argument",e,t,n+5)},VariableDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=91,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=Uc[e.kind],t=tu("declarations",e,t,n+4)},VariableDeclarator:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=92,t[n+1]=e.start,t[n+2]=e.end,t=eu("id",e,t,n+3),null!=e.init&&(t=eu("init",e,t,n+4)),t},WhileStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=93,t[n+1]=e.start,t[n+2]=e.end,t=eu("test",e,t,n+3),t=eu("body",e,t,n+4)},YieldExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=94,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.delegate,null!=e.argument&&(t=eu("argument",e,t,n+4)),t}},Wc=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=21,t[n+1]=e.start,t[n+2]=e.end,t=eu("expression",e,t=t.addStringToBuffer(e.directive,n+3),n+4)},qc=(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=28,t[n+1]=e.start,t[n+2]=e.end,t=eu("expression",e,t,n+3)},Kc=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=58,t[n+1]=e.start,t[n+2]=e.end,t=(t=t.addStringToBuffer(e.bigint,n+3)).addStringToBuffer(e.raw,n+4)},Xc=(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=59,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.value,t},Jc=(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=60,t[n+1]=e.start,t[n+2]=e.end,t},Yc=(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=61,t[n+1]=e.start,t[n+2]=e.end,null!=e.raw&&(t=t.addStringToBuffer(e.raw,n+3)),new DataView(t.buffer).setFloat64(n+4<<2,e.value,!0),t},Zc=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=62,t[n+1]=e.start,t[n+2]=e.end,t=(t=t.addStringToBuffer(e.regex.flags,n+3)).addStringToBuffer(e.regex.pattern,n+4)},Qc=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=63,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.value,n+3),null!=e.raw&&(t=t.addStringToBuffer(e.raw,n+4)),t};function eu(e,t,n,s){n[s]=n.position;const i=t[e];return(Hc[i.type]||Gt(un(i.type,t.type,e)))(i,n)}function tu(e,t,n,s){const i=t[e];if(null==i)return n;const{length:r}=i;if(0===r)return n;if(null==r)return Gt(function(e,t,n){return{code:Xt,message:`Could not serialize AST: Expected ${e}.${t} to be an array, but it was ${JSON.stringify(n)}.`}}(t.type,e,t[e]));let o=n.position;(n=n.reserve(r+1))[s]=o,n[o]=r,o++;for(let s=0;s<r;s++){const r=i[s];null!=r&&(n[o+s]=n.position,n=(Hc[r.type]||Gt(un(r.type,t.type,e)))(r,n))}return n}function nu(e,t,n){if(!e?.length)return t;const{length:s}=e;let i=t.position;(t=t.reserve(s+1))[n]=i,t[i]=s,i++;for(let n=0;n<s;n++){const s=e[n],r=t.position;(t=t.reserve(3))[i+n]=r,t[r]=s.start,t[r+1]=s.end,t[r+2]=Uc[s.type]}return t}const su={ArrayExpression:[2],ArrayPattern:[3],ArrowFunctionExpression:[4],AssignmentExpression:[5],AssignmentPattern:[6],AwaitExpression:[7],BinaryExpression:[8],BlockStatement:[9],BreakStatement:[10],CallExpression:[11],CatchClause:[12],ChainExpression:[13],ClassBody:[14],ClassDeclaration:[15],ClassExpression:[16],ConditionalExpression:[17],ContinueStatement:[18],DebuggerStatement:[19],Decorator:[20],DoWhileStatement:[22],EmptyStatement:[23],ExportAllDeclaration:[24],ExportDefaultDeclaration:[25],ExportNamedDeclaration:[26],ExportSpecifier:[27],ExpressionStatement:[21,28],ForInStatement:[29],ForOfStatement:[30],ForStatement:[31],FunctionDeclaration:[32],FunctionExpression:[33],Identifier:[34],IfStatement:[35],ImportAttribute:[36],ImportDeclaration:[37],ImportDefaultSpecifier:[38],ImportExpression:[39],ImportNamespaceSpecifier:[40],ImportSpecifier:[41],JSXAttribute:[42],JSXClosingElement:[43],JSXClosingFragment:[44],JSXElement:[45],JSXEmptyExpression:[46],JSXExpressionContainer:[47],JSXFragment:[48],JSXIdentifier:[49],JSXMemberExpression:[50],JSXNamespacedName:[51],JSXOpeningElement:[52],JSXOpeningFragment:[53],JSXSpreadAttribute:[54],JSXSpreadChild:[55],JSXText:[56],LabeledStatement:[57],Literal:[58,59,60,61,62,63],LogicalExpression:[64],MemberExpression:[65],MetaProperty:[66],MethodDefinition:[67],NewExpression:[68],ObjectExpression:[69],ObjectPattern:[70],PanicError:[0],ParseError:[1],PrivateIdentifier:[71],Program:[72],Property:[73],PropertyDefinition:[74],RestElement:[75],ReturnStatement:[76],SequenceExpression:[77],SpreadElement:[78],StaticBlock:[79],Super:[80],SwitchCase:[81],SwitchStatement:[82],TaggedTemplateExpression:[83],TemplateElement:[84],TemplateLiteral:[85],ThisExpression:[86],ThrowStatement:[87],TryStatement:[88],UnaryExpression:[89],UpdateExpression:[90],VariableDeclaration:[91],VariableDeclarator:[92],WhileStatement:[93],YieldExpression:[94]};async function iu(e,t,{allowReturnOutsideFunction:n=!1,collectScopes:s=!1,jsx:i=!1}={}){const r=function(e){let t=0n;for(const n of Object.keys(e)){const e=su[n];if(!e)throw new Error(`Unknown node type "${n}" when calling "parseAndWalk".`);for(const n of e)t|=1n<<BigInt(n)}const n=new BigUint64Array(2);return n[0]=t&(1n<<64n)-1n,n[1]=t>>64n,n}(t);!function(e,t,n){const s=e[0],i=3;if(0===s)return Ea(e,1);let r=s;const o=new Map,a={parseChildren(){const t=s+e[r+1]*i;r+=i,l(t),r-=i},skipChildren(){r=s+e[r+1]*i-i}};function l(s){for(;r<s;r+=i){const s=e[r];n&&(a.scope=c(e[r+2]));const i=wa[e[s]];t[i](Ea(e,s),a)}}function c(t){if(0===t)throw new Error("Internal Error: Missing scope information in parseAndWalk.");let n=o.get(t);return n||(n={contains(n){for(let s=t;s;){const t=e[s+1];for(let i=0;i<t;i++){const t=e[s+2+i];if(e.convertString(e[t+3])===n)return!0}s=e[s+0]}return!1}},o.set(t,n)),n}l(e.length)}(Sa(await zc(e,n,i,r,s)),t,s)}const ru=(e,t=0)=>((e,t)=>{const n=Vc(t,e);switch(n.type){case qn:return Gt(Ht(kn(n.message)));case Kn:return Gt(Ht(kn(n.message,n.start)));default:return n}})(Sa(e),t),ou=(e,t=0)=>Ea(Sa(e),t),au=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>ru(bc(e,t,n)),lu=new Set(["assert","with"]);function cu(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Ol))return n&&t.module.log(Et,An(t.module.id),s),Ee;const i=n.properties.find(e=>lu.has(uu(e)))?.value;if(!i)return Ee;if(!(i instanceof Ol))return t.module.log(Et,(r=t.module.id,{code:Yt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${$t(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),Ee;var r;const o=i.properties.map(e=>{const n=uu(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Et,An(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):Ee}const uu=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function du(e){return e?.length?Object.fromEntries(e.map(e=>[uu(e),e.value.value])):Ee}function hu(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var pu="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},fu={memoryUsage:()=>({heapUsed:0})};let mu=new Map;function gu(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function yu(e,t=3){e=gu(e,t);const n=fu.memoryUsage().heapUsed,s=pu.now(),i=mu.get(e);void 0===i?mu.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function bu(e,t=3){e=gu(e,t);const n=mu.get(e);if(void 0!==n){const e=fu.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=pu.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Eu(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of mu)e[t]=[s,n,i];return e}let xu=Bs,vu=Bs;const Au=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Su(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Au)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){xu(s,4);const t=r.apply(this,e);return vu(s,4),t};let r;"function"==typeof e[n].handler?(r=e[n].handler,e[n].handler=i):(r=e[n],e[n]=i)}return e}const Pu={identifier:null,localName:Bo};function $u(e,t,n,s,i=new Map,r,o,a){const l=i.get(t);if(l){if(l.has(e))return s?[null]:Gt((c=t,{code:"CIRCULAR_REEXPORT",exporter:u=e.id,message:`"${c}" cannot be exported from "${$t(u)}" as it is a reexport that references itself.`}));l.add(e)}else i.set(t,new Set([e]));var c,u;return e.getVariableForExportName(t,{exportOrReexportModules:a,importChain:r,importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i,sideEffectModules:o})}function wu(e,t){const n=Ae(t.sideEffectDependenciesByVariable,e,Se);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof yo?s.getDirectOriginalVariable():s instanceof xo?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t)for(const e of t)n.add(e)}return n}class Iu{constructor(e,t,n,s,i,r,o,a,l){this.graph=e,this.id=t,this.rawId=n,this.options=s,this.attributes=l,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedTopLevelAwaitingDynamicImporters=new Set,this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcePhaseSources=new Set,this.sourcesWithAttributesList=new Map,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSourcesWithAttributesList=new Map,this.exportDescriptions=new Map,this.exportedVariablesByName=null,this.exportNamesByVariable=null,this.exportShimVariable=new cc(this),this.indentExclusionRanges=[],this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.excludeFromSourcemap=/\0/.test(t),this.context=s.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const c=this,{dynamicImports:u,dynamicImporters:d,exportAllSourcesWithAttributesList:h,exportDescriptions:p,implicitlyLoadedAfter:f,implicitlyLoadedBefore:m,importers:g,reexportDescriptions:y,sourcesWithAttributesList:b}=this;this.info={ast:null,attributes:l,code:null,get dynamicallyImportedIdResolutions(){return u.map(({argument:e})=>"string"==typeof e&&c.resolvedIds[e]).filter(Boolean)},get dynamicallyImportedIds(){return u.map(({id:e})=>e).filter(e=>null!=e)},get dynamicImporters(){return d.sort()},get exportedBindings(){const e={".":[...p.keys()]};for(const[t,{source:n,attributes:s}]of y)(e[mc(n,s)]??=[]).push(t);for(const[t,n]of h)for(const s of n)(e[mc(t,s)]??=[]).push("*");return e},get exports(){return[...p.keys(),...y.keys(),...[...h].map(()=>"*")]},get hasDefaultExport(){return c.ast?c.exportDescriptions.has("default")||y.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(f,fc).sort()},get implicitlyLoadedBefore(){return Array.from(m,fc).sort()},get importedIdResolutions(){return Array.from(b.entries(),([e,t])=>t.map(t=>c.resolvedIds[mc(e,t)])).flat().filter(Boolean)},get importedIds(){return Array.from(b.entries(),([e,t])=>t.map(t=>c.resolvedIds[mc(e,t)]?.id)).flat().filter(Boolean)},get importers(){return g.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==uc.GENERATE?null:c.isIncluded()},meta:{...a},moduleSideEffects:r,rawId:n,safeVariableNames:null,syntheticNamedExports:o}}basename(){const e=Z(this.id),t=ee(this.id);return Os(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){Is(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),Gt(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,n=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of this.getExportedVariablesByName().values())e.included&&n.add(e);for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof xo?s=s.getBaseVariable():s instanceof yo&&(s=s.getOriginalVariable()),e.add(s.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportedVariablesByName(){if(this.exportedVariablesByName)return this.exportedVariablesByName;const e=this.exportedVariablesByName=new Map;for(const t of this.exportDescriptions.keys())if(t!==this.info.syntheticNamedExports){const[n]=this.getVariableForExportName(t);if(!n)return Gt(Pn(t,this.id));e.set(t,n)}for(const t of this.reexportDescriptions.keys()){const[n]=this.getVariableForExportName(t);n&&e.set(t,n)}for(const t of this.exportAllModules)if(t instanceof Ls)e.set(`*${t.id}`,t.getVariableForExportName("*",{importChain:[this.id]})[0]);else for(const n of t.getExportedVariablesByName().keys())if("default"!==n&&!e.has(n)){const[t]=this.getVariableForExportName(n);t&&e.set(n,t)}return this.exportedVariablesByName=new Map([...e].sort(Nu))}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const[t,n]of this.getExportedVariablesByName().entries()){const s=n instanceof yo?n.getOriginalVariable():n;if(!n||!(n.included||n instanceof ws))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getRenderedExports(){const e=[],t=[];for(const n of this.exportDescriptions.keys())(this.getExportedVariablesByName().get(n)?.included?e:t).push(n);return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Gt((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${$t(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,importChain:n=[],isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:r,sideEffectModules:o,exportOrReexportModules:a}=Ee){if("*"===e[0])return 1===e.length?[this.namespace]:this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*",{importChain:[...n,this.id]});const l=this.reexportDescriptions.get(e);if(l){const[e,s]=$u(l.module,l.localName,t,!1,r,[...n,this.id],o,a);return e?(t&&(Cu(e,t,this),this.info.moduleSideEffects&&Ae(t.sideEffectDependenciesByVariable,e,Se).add(this)),this.info.moduleSideEffects&&o?.add(this),a?.add(this),[e]):this.error($n(l.localName,this.id,l.module.id,!!s?.missingButExportExists),l.start)}const c=this.exportDescriptions.get(e);if(c){if(c===Pu)return[this.exportShimVariable];const e=c.localName,n=this.traceVariable(e,{exportOrReexportModules:a,importerForSideEffects:t,searchedNamesAndModules:r,sideEffectModules:o});return n?(t&&(Cu(n,t,this),Ae(t.sideEffectDependenciesByVariable,n,Se).add(this)),o?.add(this),a?.add(this),[n]):[null,{missingButExportExists:!0}]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,r,[...n,this.id]);if(this.namespaceReexportsByName.set(e,s),s[0]){const[e,n]=s;if(t){const{exportOrReexportModules:s,sideEffectModules:i}=n;for(const n of s)t.alternativeReexportModules.has(e)||Cu(e,t,n);for(const n of i)Ae(t.sideEffectDependenciesByVariable,e,Se).add(n)}return s}}return this.info.syntheticNamedExports?[Ae(this.syntheticExports,e,()=>new xo(this.astContext,e,this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=As();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.includeModuleInExecution();const e=As();for(const t of this.getExportedVariablesByName().values())this.includeVariable(t,Be,e),t.deoptimizePath(Be),t instanceof ws&&(t.module.reexported=!0)}includeAllInBundle(){this.ast.include(As(),!0),this.includeAllExports()}includeModuleInExecution(){this.isExecuted||(Ts(this),this.graph.needsTreeshakingPass=!0)}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}isEmitted(){return this.isIncluded()||this.info.isEntry||this.includedDynamicImporters.length>0||this.implicitlyLoadedAfter.size>0}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const[t,n]of this.exportAllSourcesWithAttributesList)for(const s of n){const n=this.graph.modulesById.get(this.resolvedIds[mc(t,s)].id);n instanceof Ls?e.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...e)}log(e,t,n){this.addLocationToLogProps(t,n),this.options.onLog(e,t)}render(e){this.indentExclusionRanges=[];const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&"es"!==e.format&&"system"!==e.format?Gt((s=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:s,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{indentExclusionRanges:this.indentExclusionRanges,source:t,usesTopLevelAwait:n};var s,i}setSource({astBuffer:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,safeVariableNames:c,...u}){if(xu("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.info.safeVariableNames=c,this.originalCode=s,this.originalSourcemap=pc(i),this.sourcemapChain=o.map(e=>e.missing?e:pc(e)),hc(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(u),this.resolvedIds=r??Object.create(null);const d=this.id;var h,p,f;this.magicString=new V(t,{filename:this.excludeFromSourcemap?null:d}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),addImportSource:this.addImportSource.bind(this),addIndentExclusionRange:e=>this.indentExclusionRanges.push(e),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:d,getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),importDescriptions:this.importDescriptions,includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Hl(this.graph.scope,this.astContext,this.importDescriptions),this.namespace=new bo(this.astContext),this.astBuffer=e,Object.defineProperty(this.info,"ast",{enumerable:!0,get:()=>this.tryParseLazy(this.astBuffer)}),this.ast=(h=this.astBuffer,p=null,f=this.scope,ac(p,f,0,Sa(h))),vu("generate ast",3)}toJSON(){return{astBuffer:this.astBuffer,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,fc),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,rawId:this.rawId,resolvedIds:this.resolvedIds,safeVariableNames:this.info.safeVariableNames,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s,sideEffectModules:i,exportOrReexportModules:r}=Ee){const o=this.scope.variables.get(e);if(o)return o;const a=this.importDescriptions.get(e);if(a){const e=a.module;if(e instanceof Iu&&"*"===a.name)return e.namespace;const[o,l]=$u(e,a.name,t||this,n,s,[this.id],i,r);return o||this.error($n(a.name,this.id,e.id,!!l?.missingButExportExists),a.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n},{replaceExistingMeta:s=!1}=Ee){if(null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e){if(s)for(const e of Object.keys(this.info.meta))delete this.info.meta[e];Object.assign(this.info.meta,e)}}addDynamicImport(e){let t=e.sourceAstNode;"TemplateLiteral"===t.type?1===t.quasis.length&&"string"==typeof t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):"Literal"===t.type&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e})}assertUniqueExportName(e,t){(this.exportDescriptions.has(e)||this.reexportDescriptions.has(e))&&this.error(function(e){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${e}"`}}(e),t)}addExport(e){if(e instanceof gr)this.assertUniqueExportName("default",e.start),this.exportDescriptions.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Qa){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Xr?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{attributes:du(e.attributes),localName:"*",module:null,source:t,start:e.start})}else{const n=this.exportAllSourcesWithAttributesList.get(t),s=du(e.attributes);n?n.find(e=>!hu(e,s))||n.push(s):this.exportAllSourcesWithAttributesList.set(t,[s])}}else if(e.source instanceof Xr){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const r=n instanceof Xr?n.value:n.name;this.assertUniqueExportName(r,i),this.reexportDescriptions.set(r,{attributes:du(e.attributes),localName:s instanceof Xr?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Ql)for(const e of t.declarations)for(const t of ma(e.id))this.assertUniqueExportName(t,e.id.start),this.exportDescriptions.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exportDescriptions.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof Wi?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exportDescriptions.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const s=n.local.name;(this.scope.variables.has(s)||this.importDescriptions.has(s))&&this.error(Nn(s),n.local.start);const i="source"===e.phase?$s:n instanceof ol?"default":n instanceof pl?"*":n.imported instanceof Wi?n.imported.name:n.imported.value;this.importDescriptions.set(s,{attributes:du(e.attributes),module:null,name:i,phase:"source"===e.phase?"source":"instance",source:t,start:n.start})}}addImportSource(e){e&&!this.sourcesWithAttributesList.has(e)&&this.sourcesWithAttributesList.set(e,[Ee])}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=ft(n,t,{offsetLine:1});if(s){let{column:i,line:r}=s;try{({column:i,line:r}=function(e,t){const n=e.filter(e=>!e.missing);e:for(;n.length>0;){const e=n.pop().mappings[t.line-1];if(e){const n=e.filter(e=>e.length>1),s=n[n.length-1];let i=n[0];for(let e of n){if(e[0]>=t.column||e===s){e=e[0]!==t.column?i:e,t={column:e[3],line:e[2]+1};continue e}i=e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(Et,function(e,t,n,s,i){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:n,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:i}}(e,this.id,i,r,t))}Wt(e,{column:i,line:r},n,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[mc(t.source,t.attributes)];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,n){const s=new Set,i=r=>{for(const o of r)s.has(o)||(s.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||n.has(o))&&(o instanceof Ls||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=du(t.attributes),s=this.sourcesWithAttributesList.get(e);s?s.some(e=>!hu(e,n))||s.push(n):this.sourcesWithAttributesList.set(e,[n]),"source"===t.phase&&this.sourcePhaseSources.add(e)}getImportedJsxFactoryVariable(e,t,n){const{id:s}=this.resolvedIds[n],i=this.graph.modulesById.get(s),[r]=i.getVariableForExportName(e,{importChain:[this.id]});return r||this.error((o=e,a=s,l=this.id,{code:"MISSING_JSX_EXPORT",exporter:a,id:l,message:`Export "${o}" is not defined in module "${$t(a)}" even though it is needed in "${$t(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:kt(Ot)}),t);var o,a,l}getVariableFromNamespaceReexports(e,t,n,s){let i=null;const r=new Map,o=new Set,a=new Set,l=new Set;for(const c of this.exportAllModules){if(c.info.syntheticNamedExports===e)continue;const[u,d]=$u(c,e,t,!0,ku(n),s,a,l);c instanceof Ls||d?.indirectExternal?o.add(u):u instanceof xo?i||(i=u):u&&r.set(u,c)}if(r.size>0){const t=[...r],n=t[0][0];return 1===t.length?[n,{exportOrReexportModules:l,sideEffectModules:a}]:(this.options.onLog(Et,(c=e,u=this.id,d=t.map(([,e])=>e.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${$t(u)}" re-exports "${c}" from one of the modules ${St(d.map(e=>$t(e)))} (will be ignored).`,reexporter:u})),[null])}var c,u,d;if(o.size>0){const t=[...o],n=t[0];return t.length>1&&this.options.onLog(Et,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${$t(t)}" re-exports "${e}" from one of the external modules ${St(s.map(e=>$t(e)))}, guessing "${$t(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map(e=>e.module.id))),[n,{exportOrReexportModules:l,indirectExternal:!0,sideEffectModules:a}]}return i?[i,{exportOrReexportModules:l,sideEffectModules:a}]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof Ls){const[t]=n.getVariableForExportName("*",{importChain:[this.id]});t.includePath(Be,As()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(Be,As()),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const{resolution:t}=e;t instanceof Iu&&(t.includedDynamicImporters.includes(this)||(t.includedDynamicImporters.push(this),this.astContext.usesTopLevelAwait&&t.includedTopLevelAwaitingDynamicImporters.add(this)))}includeVariable(e,t,n){const{included:s,module:i}=e;if(e.includePath(t,n),s)i instanceof Iu&&i!==this&&wu(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof Iu&&(i.includeModuleInExecution(),i!==this)){const t=wu(e,this);for(const e of t)e.includeModuleInExecution()}}includeVariableInModule(e,t,n){this.includeVariable(e,t,n);const s=e.module;s&&s!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(Et,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${$t(t)}".`})),this.exportDescriptions.set(e,Pu)}tryParseLazy(e){try{return ou(e)}catch(e){return this.error(Rn(e,this.id),e.pos)}}}function Cu(e,t,n){if(e.module instanceof Iu&&e.module!==n){const s=e.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){t.alternativeReexportModules.set(e,n);break}}}}const ku=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),Nu=([e],[t])=>e<t?-1:e>t?1:0,Ou=(e,t)=>[e,t].filter(Boolean).join("\n"),Ru=(e,t)=>[e,t].filter(Boolean).join("\n\n"),Du={amd:Lu,cjs:Lu,es:_u,iife:Lu,system:_u,umd:Lu};function Mu(e,t,n,s,i,r,o,a,l,c,u,d,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,d,h);!function(e,t,n){for(const s of t){s.info.safeVariableNames||={};for(const t of s.scope.variables.values())if(t.included&&!(t.renderBaseName||t instanceof yo&&t.getOriginalVariable()!==t)){const n=Object.getOwnPropertyDescriptor(s.info.safeVariableNames,t.name)?.value;if(n&&!e.has(n)){e.add(n),t.setRenderNames(null,n);continue}t.setRenderNames(null,ht(t.name,e,t.forbiddenNames)),s.info.safeVariableNames[t.name]=t.renderName}if(n.has(s)){const t=s.namespace;t.setRenderNames(null,ht(t.name,e,t.forbiddenNames))}}}(s,f,p),Du[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function _u(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof vo)&&(t.variableName=ht(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof Ls)?n.setRenderNames(null,(t instanceof Ls?a.get(t):o.get(t)).variableName):t instanceof Ls&&n.isSourcePhase?n.setRenderNames(null,ht(t.suggestedVariableName+"__source",e,n.forbiddenNames)):t instanceof Ls&&"default"===s?n.setRenderNames(null,ht([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,ht(Os(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,ht(t.name,e,t.forbiddenNames))}function Lu(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=ht(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=ht(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Rr(r(t.id),a)?t.namespaceVariableName:ht(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Ls){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=kr[s]?n.defaultVariableName:n.variableName;Nr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Or[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,null)}else{const n=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}function Tu(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Gt(vn("default",o,i))}else if("none"===t&&o.length>0)return Gt(vn("none",o,i));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==s&&"system"!==s&&o.includes("default")&&r(Et,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${$t(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:kt(Mt)}}(i,n)),t="named")),t}function Bu(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return" ".repeat(i)}function zu(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Ls){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),zu(e,t,n,s,i,r)):t.push(o)}}const Fu="!~{",Vu="}~",ju=new RegExp(`${Fu}[0-9a-zA-Z_$]{1,16}${Vu}`,"g"),Uu=(e,t)=>e.replace(ju,e=>t.get(e)||e),Gu=(e,t,n)=>e.replace(ju,e=>e===t?n:e),Hu=Symbol("bundleKeys"),Wu={type:"placeholder"};function qu(e,t,n){return wt(e)?Gt(Tn(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,(e,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return Gt(Tn(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return wt(r)?Gt(Tn(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function Ku(e,{[Hu]:t}){if(!t.has(e.toLowerCase()))return e;const n=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),s=e.slice(0,n+1),i=e.slice(n+1),r=i.indexOf(".",1),o=s+(-1===r?i:i.slice(0,r)),a=-1===r?"":i.slice(r);let l,c=1;for(;t.has((l=o+ ++c+a).toLowerCase()););return l}const Xu=["Object","Promise","module","exports","require","__filename","__dirname",...qr],Ju=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Yu(e,t,n,s,i){const{attributes:r,rawId:o}=e.moduleInfo,a="function"==typeof t?t(o,{attributes:r}):t[o];return a?(n&&"object"==typeof t&&function(e,t,n,s){const i=n.get(e)??0;1===i&&s(Et,function(e,t){return{code:"AMBIGUOUS_GLOBAL_NAME",id:e,message:`The object form of "output.globals" maps several import attribute variants of the external module "${e}" to the same global name "${t}". Use the function form of "output.globals" to give each variant its own global name.`,url:kt(Lt)}}(e,t)),n.set(e,i+1)}(o,a,s,i),a):n?(i(Et,(l=e.id,c=e.variableName,{code:"MISSING_GLOBAL_NAME",id:l,message:`No name was provided for external module "${l}" in "output.globals" – guessing "${c}".`,names:[c],url:kt(Lt)})),e.variableName):void 0;var l,c}class Zu{constructor(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=n,this.unsetOptions=s,this.pluginDriver=i,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=u,this.getPlaceholder=d,this.bundle=h,this.inputBase=p,this.snippets=f,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.isManualChunk=!1,this.accessedGlobalsByScope=new Map,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.allowExtensionModules=new Set,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!n.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||n.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)if(!m.has(e)){this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace));break}t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Os(this.generateVariableName()),this.isManualChunk=null!==u}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new Zu([],e,t,n,s,i,r,o,a,l,null,d,h,p,f);m.assignFacadeName(u,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof Iu?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const n=e.getExportNamesByVariable();for(const e of this.exports)if(!n.has(e))return!1;for(const s of t)if(!(s.module===e||n.has(s)||s instanceof xo&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>Uu(e,s),o=i.fileName,a=this.fileName=r(o);return{...i,code:e,dynamicImports:i.dynamicImports.map(r),fileName:a,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(r),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map(([e,t])=>[r(e),t])),imports:i.imports.map(r),map:t,preliminaryFileName:o,referencedFiles:i.referencedFiles.map(r),sourcemapFileName:n}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[n,s]of t){this.exportNamesByVariable.set(n,[...s]);for(const e of s)this.exportsByName.set(e,n);e.delete(n)}}for(const t of this.allowExtensionModules){const n=t.getExportNamesByVariable();for(const[t,s]of n){this.exportNamesByVariable.set(t,[...s]);for(const e of s)this.exportsByName.set(e,t);e.delete(t)}}this.outputOptions.minifyInternalExports?function(e,t,n){let s=0;for(const i of e){let[e]=i.name;if(t.has(e))do{e=dt(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=dt(s))}while(ut.has(e)||t.has(e));t.set(e,i),n.set(i,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,n){for(const s of e){let e=0,i=s.name;for(;t.has(i);)i=s.name+"$"+ ++e;t.set(i,s),n.set(s,[i])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Tu(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map(({namespace:e})=>e));for(const s of t){if("allow-extension"===s.preserveSignature&&this.canPreserveModuleExports(s)&&!s.chunkFileNames.size&&s.chunkNames.every(({isUserDefined:e})=>!e)){this.allowExtensionModules.add(s),this.facadeModule||(this.facadeModule=s,this.strictFacade=!1,this.assignFacadeName({},s,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(s,this);continue}const t=Array.from(new Set(s.chunkNames.filter(({isUserDefined:e})=>e).map(({name:e})=>e)),e=>({name:e}));if(0===t.length&&s.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(s.chunkFileNames,e=>({fileName:e}))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===s.preserveSignature||"exports-only"===s.preserveSignature&&s.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(s,n)||(this.facadeModule=s,this.facadeChunkByModule.set(s,this),s.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules))}for(const n of t)e.push(Zu.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,n,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,n)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=Qu(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,n)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}canPreserveModuleExports(e){const t=e.getExportNamesByVariable();for(const[e,n]of t)for(const t of n){const n=this.exportsByName.get(t);if(n&&n!==e)return!1}for(const[e,n]of t)for(const t of n)this.exportsByName.set(t,e);return!0}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return xr(Ct(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:n,entryFileNames:s,file:i,format:r,preserveModules:o}=this.outputOptions;if(i)e=Z(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=qu("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=Ku(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Wu),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;const{sourcemapFileNames:e,format:t}=this.outputOptions;if(!e)return null;let n=null;const[s,i]=[e,"output.sourcemapFileNames"];let r=qu("function"==typeof s?s(this.getPreRenderedChunkInfo()):s,i,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>t,hash:e=>n||(n=this.getPlaceholder(i,e||8)),name:()=>this.getChunkName()});return n||(r=Ku(r,this.bundle)),this.preliminarySourcemapFileName={fileName:r,hashPlaceholder:n}}getRenderedChunkInfo(){if(this.renderedChunkInfo)return this.renderedChunkInfo;const e=this.getRenderedDependencies();return this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(sd),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,sd),importedBindings:td(e,sd),imports:Array.from(e.keys(),sd),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof bo?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,n,s){const i=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];zu(a,t,r,e,n,s),i.unshift(t)}}const o=new Set;for(const e of i)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}inlineTransitiveImports(){const{facadeModule:e,dependencies:t,outputOptions:n}=this,{hoistTransitiveImports:s,preserveModules:i}=n;if(s&&!i&&null!==e)for(const e of t)e instanceof Zu&&this.inlineChunkDependencies(e)}async render(){const{exportMode:e,facadeModule:t,inputOptions:{onLog:n},outputOptions:s,pluginDriver:i,snippets:r}=this,{format:o,preserveModules:a}=s,l=this.getPreliminaryFileName(),c=this.getPreliminarySourcemapFileName(),{accessedGlobals:u,indent:d,magicString:h,renderedSource:p,usedModules:f,usesTopLevelAwait:m}=this.renderModules(l.fileName),g=[...this.getRenderedDependencies().values()],y="none"===e?[]:this.getChunkExportDeclarations(o);let b=y.length>0,E=!1;for(const e of g){const{reexports:t}=e;t?.length&&(b=!0,!E&&t.some(e=>"default"===e.reexported)&&(E=!0),"es"===o&&(e.reexports=t.filter(({reexported:e})=>!y.find(({exported:t})=>t===e))))}if(!E)for(const{exported:e}of y)if("default"===e){E=!0;break}const{intro:x,outro:v,banner:A,footer:S}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Ou),t.hookReduceValue("footer",e.footer(n),[n],Ou),t.hookReduceValue("intro",e.intro(n),[n],Ru),t.hookReduceValue("outro",e.outro(n),[n],Ru)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),s&&(s+="\n"),i&&(i="\n"+i),{banner:s,footer:i,intro:r,outro:o}}catch(e){return Gt((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(s,i,this.getRenderedChunkInfo());if(qo[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:E,hasExports:b,id:l.fileName,indent:d,intro:x,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:v,snippets:r,usesTopLevelAwait:m},s),A&&h.prepend(A),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return S&&h.append(S),{chunk:this,magicString:h,preliminaryFileName:l,preliminarySourcemapFileName:c,usedModules:f}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:n}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);e&&e!==this&&n.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},n,s){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(n):Qu(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof Iu){const s=this.chunkByModule.get(n);let i;do{i=t.alternativeReexportModules.get(e),i&&(this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(Et,pn(n.getExportNamesByVariable().get(e)?.[0]||"*",n.id,i.id,t.id,this.outputOptions.preserveModules)),t=i)}while(i)}}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof xo,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof bo&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof Iu){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}else e instanceof Ls&&i.included&&t.push(i)}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?Qu(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if("*"===n[0])continue;const s=this.exportsByName.get(n);if(!(s instanceof xo)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||"es"!==e)continue;const t=this.renderedDependencies.get(s);if(!t)continue;const{imports:i,reexports:r}=t,o=r?.find(({reexported:e})=>e===n),a=i?.find(({imported:e})=>e===o?.imported);if(!a)continue}}}let i=null,r=!1,o=s.getName(this.snippets.getPropertyAccess);if(s instanceof ys){for(const e of s.declarations)if(e.parent instanceof mr||e instanceof gr&&e.declaration instanceof mr){r=!0;break}}else s instanceof xo&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,n){const s=new Set,i=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof Ls){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?kr[n(o.id)]&&i.add(a):t.isNamespace&&Or[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(e=>"*"===e[0]))&&r.add(a))}else{const n=this.chunkByModule.get(o);n!==this&&(s.add(n),e&&"default"===n.exportMode&&t.isNamespace&&r.add(n))}}if(t)for(const e of this.dependencies)s.add(e);return{deconflictedDefault:i,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution).filter(e=>e!==this&&(e instanceof Zu||e instanceof vo))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof Ls){const n=this.externalChunkByModule.get(e),s=n.getImportAttributes(this.snippets);return[`'${n.getImportPath(t)}'`,s||!!i||null]}let r=null;if(i){const e=cu(n);r=e===Ee||Ao(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?Pt(this.fileName):Pt(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const n of this.imports){const s=n.module;let i,r;const o=s instanceof Ls&&n.isSourcePhase;if(s instanceof Ls){if(i=this.externalChunkByModule.get(s),r=n.name,!o&&"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return Gt(_n(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);Ae(t,i,Pe).push({imported:r,local:n.getName(this.snippets.getPropertyAccess),phase:o?"source":"instance"})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n}of t.dynamicImports){if(!n.included)continue;const{resolution:t}=n;e.push(t instanceof Iu?{chunk:this.chunkByModule.get(t),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(t),node:n,resolution:t}:t instanceof Ls?{chunk:null,externalChunk:this.externalChunkByModule.get(t),facadeChunk:null,node:n,resolution:t}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:t})}return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:n,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleAttributes:t?t.info.attributes:{},facadeModuleId:t&&t.id,facadeModuleRawId:t?t.info.rawId:null,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:s.map(({id:e})=>e),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=ed(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(Y(e.id.split(nd,1)[0])),r=s(this.inputBase),o=ee(i),a=Ju.has(o)?i.slice(0,-o.length):i;return X(a)?n&&se(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):"/"===r&&"/"!==a[0]?ne(r,a.replace(/^[a-zA-Z]:[/\\]/,"/")):ne(r,a):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+Z(a)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(Et,Ln(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof xo)continue;const a=n.module;if(a instanceof Iu){if(i=this.chunkByModule.get(a),i===this)continue;r=i.getVariableExportName(n),o=n.isReassigned}else{if(i=this.externalChunkByModule.get(a),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Gt(_n(a.id,r,!0));o=e&&("default"!==r||Nr(t(a.id),!0))}}Ae(n,i,Pe).push({imported:r,needsLiveBinding:o,reexported:s})}return n}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const n of t.importMetas){const t=n.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),n=new Map,s=this.getFileName(),i="iife"===this.outputOptions.format||"umd"===this.outputOptions.format?new Map:void 0;for(const r of this.dependencies){const o=e.get(r)||null,a=t.get(r)||null;null===o&&null===a&&r instanceof vo&&!r.moduleSideEffects&&!this.outputOptions.hoistTransitiveImports||n.set(r,this.getRenderedDependency(r,o,a,s,i))}return this.renderedDependencies=n}getRenderedDependency(e,t,n,s,i){const r=e instanceof vo||"default"!==e.exportMode,o=e.getImportPath(s),a=t?.find(e=>"source"===e.phase),l=t?.filter(e=>"source"!==e.phase)??null;return{attributes:e instanceof vo?e.getImportAttributes(this.snippets):null,defaultVariableName:e.defaultVariableName,globalName:i&&e instanceof vo&&Yu(e,this.outputOptions.globals,null!==(t||n),i,this.inputOptions.onLog),importPath:o,imports:l&&l.length>0?l:null,isChunk:e instanceof Zu,name:e.variableName,namedExportsMode:r,namespaceVariableName:e.namespaceVariableName,reexports:n,sourcePhaseImport:a?.local}}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Zu&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:n,exportNamesByVariable:s,includedNamespaces:i,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:c,renderedModules:u,snippets:d}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m},importAttributesKey:g}=l,{_:y,cnst:b,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new U({separator:`${E}${E}`}),v=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Bu(t.originalCode);if(null!==e)return e}return"\t"}(a,l),A=[];let S="";const P=new Set,$={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,importAttributesKey:g,indent:v,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let w=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render($);!$.accessedDocumentCurrentScript&&io.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(Cr),$.accessedDocumentCurrentScript=!1,({source:n}=r),w||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),x.addSource({content:n,indentExclusionRanges:r.indentExclusionRanges}),A.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock($);o.renderFirst()?S+=E+e:x.addSource(new V(e))}const a=t.get(e.scope);if(a)for(const e of a)P.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={attributes:e.info.attributes,get code(){return n?.toString()??null},originalLength:e.originalCode.length,rawId:e.info.rawId,removedExports:o,renderedExports:r,renderedLength:s}}S&&x.prepend(S+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${Bo}${y}=${y}void 0;${E}${E}`);const I=h?x:x.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(Et,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:P,indent:v,magicString:x,renderedSource:I,usedModules:A,usesTopLevelAwait:w}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:n,pluginDriver:s,snippets:i}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null,this,a||o)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e,o);o.setExternalResolution("external",n,i,s,t,l,!1,c,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions;for(const e of this.orderedModules)for(const t of e.scope.variables.values())t.setRenderNames(null,null);const r=new Set;for(const t of this.getExportNames()){const n=this.exportsByName.get(t);"es"!==e&&"system"!==e&&n.isReassigned&&!n.isId?n.setRenderNames("exports",t):n instanceof xo?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(Xu);this.needsExportsShim&&o.add(Bo),t&&o.add("Symbol"),Mu(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,n),this.imports,o,e,n,s,i,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:n,orderedModules:s,outputOptions:{format:i}}=this;for(const r of s){for(const n of r.importMetas)n.setResolution(i,t,e);n.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e))for(const n of e.getExportedVariablesByName().values())n.included&&t.add(n);for(let n of t){n instanceof yo&&(n=n.getOriginalVariable()),n instanceof xo&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof Iu&&(this.checkCircularDependencyImport(n,e),n instanceof bo&&this.outputOptions.preserveModules||t.exports.add(n)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some(e=>this.chunkByModule.get(e)!==this))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:{included:t,resolution:n}}of e.dynamicImports)t&&n instanceof Iu&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function Qu(e){return ed(e)??Pt(e.id)}function ed(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function td(e,t){const n={};for(const[s,i]of e){const e=new Set;if(i.imports)for(const{imported:t}of i.imports)e.add(t);if(i.reexports)for(const{imported:t}of i.reexports)e.add(t);n[t(s)]=[...e]}return n}const nd=/[#?]/,sd=e=>e.getFileName();function*id(e){for(const t of e)yield*t}function rd(e,t,n,s,i){const{manualChunkByModule:r,manualChunks:o}=function(e,t){const n=Object.create(null),s=[...e].sort(([e],[t])=>e.execIndex-t.execIndex);for(const[e,t]of s)(n[t]||=[]).push(e);const i=[],r=new Map;for(const[e,s]of Object.entries(n)){const n=s.filter(e=>e.isEmitted());if(0===n.length){t(Et,fn(e));continue}const o={alias:e,modules:n};i.push(o);for(const e of n)r.set(e,o)}return{manualChunkByModule:r,manualChunks:i}}(t,s),a=new Map;o.forEach((t,n)=>{a.set(t,e.length+n)});const{entriesAndManualChunksCount:l,dependentEntriesByModule:c,dynamicallyDependentEntriesByDynamicEntry:u,dynamicImportsByEntry:d,dynamicallyDependentEntriesByAwaitedDynamicEntry:h,awaitedDynamicImportsByEntry:p}=function(e,t,n,s){const i=new Set,r=new Set,o=new Map,a=t.map(e=>e.modules),l=new Set(e);for(const e of a)for(const t of e)l.add(t);const c=e.map(e=>[e]).concat(a),u=new Array(c.length),d=new Array(c.length),h=new Array(c.length),p=new Array(c.length);let f=0;for(const e of c){const t=new Set,s=new Set,a=new Set,m=new Set;u[f]=t,d[f]=s,h[f]=a,p[f]=m;const g=new Set(e),y=new Set;for(const e of g){Ae(o,e,Se).add(f);const u=n.get(e);if(u&&!y.has(u)){y.add(u);for(const e of u.modules)g.add(e)}for(const t of e.getDependenciesToBeIncluded())t instanceof Ls||g.add(t);for(const{node:{resolution:o}}of e.dynamicImports){let e=null;if(o instanceof Iu&&o.includedDynamicImporters.length>0){if(l.has(o)){if(!i.has(o)){if(e=n.get(o)??null,!e)continue;a.add(e)}}else i.add(o),l.add(o),c.push([o]);t.add(o);for(const t of o.includedTopLevelAwaitingDynamicImporters)if(g.has(t)){s.add(o),e?m.add(e):r.add(o);break}}}for(const s of e.implicitlyLoadedBefore)if(l.has(s)){const e=n.get(s);e&&(a.add(e),t.add(s))}else i.add(s),l.add(s),c.push([s])}f++}const{awaitedDynamicEntries:m,awaitedDynamicImportsByEntry:g,dynamicEntries:y,dynamicImportsByEntry:b}=function(e,t,n,s,i,r,o,a){const l=new Map,c=new Set,u=new Set;for(const[n,i]of e.entries())for(const e of i)l.set(e,n),t.has(e)&&c.add(n),s.has(e)&&u.add(n);for(const e of r)for(const t of e)c.add(a.get(t));for(const e of o)for(const t of e)u.add(a.get(t));const d=ad(n,l),h=ad(i,l);return{awaitedDynamicEntries:u,awaitedDynamicImportsByEntry:h,dynamicEntries:c,dynamicImportsByEntry:d}}(c,i,u,r,d,h,p,s);return{awaitedDynamicImportsByEntry:g,dependentEntriesByModule:o,dynamicallyDependentEntriesByAwaitedDynamicEntry:ld(o,m,c,e=>e.includedTopLevelAwaitingDynamicImporters),dynamicallyDependentEntriesByDynamicEntry:ld(o,y,c,e=>e.includedDynamicImporters),dynamicImportsByEntry:b,entriesAndManualChunksCount:c.length}}(e,o,r,a),{modulesWithDependentEntries:f,topLevelAwaitingCycleSingletons:m}=function(e,t){const n=[],s=[];for(const[i,r]of e){const e=t.get(i)?.alias??null;null===e&&i.cycles.size>0&&i.includedTopLevelAwaitingDynamicImporters.size>0?s.push({alias:null,modules:[i]}):n.push({alias:e,dependentEntries:r,module:i})}return{modulesWithDependentEntries:n,topLevelAwaitingCycleSingletons:s}}(c,r),g=function(e,t){const n=od(e,t),s=Object.create(null);for(const[t,{dependentEntries:i,module:r}]of e.entries()){const{alias:e,key:o}=n[t];(s[o]||={alias:e,dependentEntries:new Set(i),modules:[]}).modules.push(r)}return Object.values(s)}(f,i),y=function(e,t){const n=new Array(e).fill(0n);let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(l,g),b=cd(y,u,d,l),E=cd(y,h,p,l);!function(e,t,n){const s=new Map;for(const[e,{alias:n}]of t.entries())null!==n&&s.set(n,1n<<BigInt(e));for(const[t,i]of e){const e=s.get(t.alias),r=n[i];void 0!==e&&(r&e)===e&&(n[i]=0n)}}(a,g,b),function(e,t,n){let s=1n;for(const{dependentEntries:i}of e){for(const e of i)(t[e]&s)===s&&0n===(n[e]&s)&&i.delete(e);s<<=1n}}(g,b,E);const{chunks:x,sideEffectAtoms:v,sizeByAtom:A}=function(e,t,n,s,i){const r=od(e,i),o=Object.create(null),a=new Map,l=new Array(e.length);let c=0n,u=1n;for(const[i,{dependentEntries:d,modules:h}]of e.entries()){let e=-1n;for(const s of d)e&=t[s]|n[s];const{alias:p,key:f}=r[i],m=o[f]||={alias:p,containedAtoms:0n,correlatedAtoms:e,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(d),modules:[],pure:!0,size:0};let g=0,y=!0;for(const e of h)a.set(e,m),e.isIncluded()&&(y&&=!e.hasEffects(),g+=s>1?e.estimateSize():1);y||(c|=u),l[i]=g,m.containedAtoms|=u,m.modules.push(...h),m.pure&&=y,m.size+=g,u<<=1n}const d=Object.values(o);return c|=function(e,t,n){const s=new Map;let i=0n;for(const r of e){const{dependencies:e,modules:o}=r;for(const a of o)for(const o of a.getDependenciesToBeIncluded())if(o instanceof Ls){if(o.info.moduleSideEffects){const e=Ae(s,o,()=>{const e=n;return n<<=1n,i|=e,e});r.containedAtoms|=e,r.correlatedAtoms|=e}}else{const n=t.get(o);n&&n!==r&&(e.add(n),n.dependentChunks.add(r))}}return i}(d,a,u),{chunks:d,sideEffectAtoms:c,sizeByAtom:l}}(g,y,b,n,i);return[...m,...ud(x,n,v,A,s).map(({alias:e,modules:t})=>({alias:e,modules:t}))]}function od(e,t){const n=new Array(e.length),s=t?null:new Map;for(const[t,{dependentEntries:i,alias:r}]of e.entries()){let e=0n;for(const t of i)e|=1n<<BigInt(t);const o=String(e);if(n[t]=o,s&&null!==r){const e=s.get(o);s.set(o,void 0===e||e===r?r:null)}}return e.map(({alias:e},t)=>{const i=e??s?.get(n[t])??null;return{alias:i,key:null===i?n[t]:`manual:${i}`}})}function ad(e,t){const n=new Array(e.length);let s=0;for(const i of e){const e=new Set;for(const n of i)e.add(t.get(n));n[s++]=e}return n}function ld(e,t,n,s){const i=new Map;for(const r of t){const t=Ae(i,r,Se),o=n[r];for(const n of o)for(const i of id([s(n),n.implicitlyLoadedAfter])){const n=e.get(i);if(n)for(const e of n)t.add(e)}}return i}function cd(e,t,n,s){const i=Array.from({length:s},(e,n)=>t.has(n)?-1n:0n);for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a&=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])Ae(t,e,Se).add(s)}}return i}function ud(e,t,n,s,i){xu("optimize chunks",3);const r=function(e,t){const n=[],s=[],i=[];for(const r of e)null!==r.alias?i.push(r):(r.size<t?n:s).push(r);return 0===n.length?null:(n.sort(dd),s.sort(dd),{big:new Set(s),fixed:new Set(i),small:new Set(n)})}(e,t);return r?(t>1&&i("info",Cn(e.length,r.small.size,"Initially")),function(e,t,n,s){const{small:i}=e;for(const r of i){const o=hd(r,e,n,s,t<=1?1:1/0);if(o){const{containedAtoms:n,correlatedAtoms:s,modules:a,pure:l,size:c}=r;i.delete(r),md(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:u,dependentChunks:d,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)u.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)d.add(e),e.dependencies.delete(r),e.dependencies.add(o);u.delete(o),d.delete(o),md(o,t,e).add(o)}}}(r,t,n,s),t>1&&i("info",Cn(r.small.size+r.big.size+r.fixed.size,r.small.size,"After merging chunks")),vu("optimize chunks",3),[...r.small,...r.big,...r.fixed]):(vu("optimize chunks",3),e)}function dd({size:e},{size:t}){return e-t}function hd(e,{big:t,small:n},s,i,r){let o=null;for(const a of id([n,t])){if(e===a)continue;const t=pd(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function pd(e,t,n,s,i){const r=fd(e,t,n,s,i);return r<n?r+fd(t,e,n-r,s,i):1/0}function fd(e,t,n,s,i){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const a=o&s;if((r&a)!==a)return 1/0;const l=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:n}of l){o|=n;const i=n&s;if((r&i)!==i)return 1/0;for(const n of e){if(n===t)return 1/0;l.add(n)}}return function(e,t,n){let s=0,i=0,r=1n;const{length:o}=n;for(;i<o;i++)if((e&r)===r&&(s+=n[i]),r<<=1n,s>=t)return 1/0;return s}(o&~r,n,i)}function md(e,t,n){return e.size<t?n.small:n.big}const gd=(e,t)=>e.execIndex>t.execIndex?1:-1;function yd(e){e.sort(gd)}function bd(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=(e,t)=>{r.has(e)?s.has(e)||n.push(function(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;for(e.cycles.add(s);r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}(e,t,r)):(r.set(e,t),l(e))},l=e=>{if(e instanceof Iu){for(const t of e.dependencies)a(t,e);for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{node:{resolution:t,scope:n}}of e.dynamicImports)t instanceof Iu&&(n.context.usesTopLevelAwait?a(t,e):i.add(t));o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),l(t));for(const e of i)r.has(e)||(r.set(e,null),l(e));return{cyclePaths:n,orderedModules:o}}const Ed=(e,t)=>t?`(${e})`:e;class xd{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{column:t,line:e,name:n,source:this}}}class vd{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,n=[],s=[],i=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:u,source:{content:d,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=d;else if(null==n[p])n[p]=d;else if(null!=d&&n[p]!==d)return Gt(Mn(h));const f=[r[0],p,c,o];if(u){let e=i.get(u);void 0===e&&(e=s.length,s.push(u),i.set(u,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:s,sources:e,sourcesContent:n}}traceSegment(e,t,n){const s=this.mappings[e];if(!s)return null;let i=0,r=s.length-1;for(;i<=r;){const e=i+r>>1;let o=s[e];if(o[0]!==t&&i===r&&(o=s[s[i][0]>t?Math.max(0,i-1):i]),o[0]===t||i===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:n):null}o[0]>t?r=e-1:i=e+1}return null}}function Ad(e){return function(t,n){return n.missing?(e(Et,(s=n.plugin,{code:sn,message:`Sourcemap is likely to be incorrect: a plugin (${s}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:s,url:kt("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new vd({mappings:[],names:[]},[t])):new vd(n,[t]);var s}}function Sd(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=Q(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>new xd(se(i,o,e),s[t]));r=new vd(n,a)}else r=new xd(e,t);return s.reduce(i,r)}let Pd;const $d=e=>function(e){let t,n;try{const r=Lc.__wbindgen_add_to_stack_pointer(-16);Lc.xxhashBase64Url(r,xc(e));var s=Pc().getInt32(r+0,!0),i=Pc().getInt32(r+4,!0);return t=s,n=i,$c(s,i)}finally{Lc.__wbindgen_add_to_stack_pointer(16),Lc.__wbindgen_export(t,n,1)}}(Id(e)),wd={base36:e=>function(e){let t,n;try{const r=Lc.__wbindgen_add_to_stack_pointer(-16);Lc.xxhashBase36(r,xc(e));var s=Pc().getInt32(r+0,!0),i=Pc().getInt32(r+4,!0);return t=s,n=i,$c(s,i)}finally{Lc.__wbindgen_add_to_stack_pointer(16),Lc.__wbindgen_export(t,n,1)}}(Id(e)),base64:$d,hex:e=>function(e){let t,n;try{const r=Lc.__wbindgen_add_to_stack_pointer(-16);Lc.xxhashBase16(r,xc(e));var s=Pc().getInt32(r+0,!0),i=Pc().getInt32(r+4,!0);return t=s,n=i,$c(s,i)}finally{Lc.__wbindgen_add_to_stack_pointer(16),Lc.__wbindgen_export(t,n,1)}}(Id(e))};function Id(e){return"string"==typeof e?"undefined"==typeof Buffer?(Pd??=new TextEncoder,Pd.encode(e)):Buffer.from(e):e}let Cd="sourceMa";async function kd(e,t,n,s,i){xu("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map(e=>e.render()));vu("render chunks",2),xu("transform chunks",2);const o=wd[s.hashCharacters],a=function(e){return Object.fromEntries(e.map(e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:d,renderedChunksByPlaceholder:h}=await async function(e,t,n,s,i,r){const o=[],a=new Map,l=new Map,c=new Map,u=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&u.add(t);return await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:d,hashPlaceholder:h},preliminarySourcemapFileName:p,magicString:f,usedModules:m})=>{const g={chunk:e,fileName:d,sourcemapFileName:p?.fileName??null,...await Nd(f,d,m,t,n,s,r)},{code:y,map:b}=g;if(h){const{containedPlaceholders:t,transformedCode:n}=((e,t)=>{const n=new Set,s=e.replace(ju,e=>t.has(e)?(n.add(e),`${Fu}${"0".repeat(e.length-5)}${Vu}`):e);return{containedPlaceholders:n,transformedCode:s}})(y,u);let r=n;const o=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>(t&&(e+=t),e));o&&(r+=o),a.set(h,g),l.set(h,{containedPlaceholders:t,contentHash:i(r)})}else o.push(g);const E=p?.hashPlaceholder;b&&E&&c.set(p.hashPlaceholder,i(b.toString()).slice(0,p.hashPlaceholder.length))})),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:o,placeholders:u,renderedChunksByPlaceholder:a}}(r,a,s,n,o,i),p=function(e,t,n,s,i,r){const o=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let a="";const l=new Set([n]);for(const e of l){const{containedPlaceholders:n,contentHash:s}=t.get(e);a+=s;for(const e of n)l.add(e)}let c,u;do{u&&(a=u),u=r(a).slice(0,n.length),c=Gu(s,n,u)}while(i[Hu].has(c.toLowerCase()));i[c]=Wu,o.set(n,u)}return o}(h,l,c,d,t,o);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=Uu(o,t);const u=Uu(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=Rd(e,c)),d=l?Uu(l,t):`${u}.map`,c.file=Uu(c.file??"",t),e+=Od(d,c,i,r)),n[u]=s.finalizeChunk(e,c,d,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?Uu(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=Rd(s,c)),u=l?Uu(l,t):`${a}.map`,s+=Od(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),vu("transform chunks",2)}async function Nd(e,t,n,s,i,r,o){let a=null;const l=[];let c=await r.hookReduceArg0("renderChunk",[e.toString(),s[t],i,{chunks:s}],(e,t,n)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=pc(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code});const{compact:u,dir:d,file:h,sourcemap:p,sourcemapExcludeSources:f,sourcemapFile:m,sourcemapPathTransform:g,sourcemapIgnoreList:y}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),p){let s;xu("sourcemaps",3),s=h?se(m||h):d?se(d,t):se(t),a=function(e,t,n,s,i,r){const o=Ad(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>Sd(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new vd(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=Q(e);u=u.map(e=>ne(t,e)),e=Z(e)}for(const e of n)hc(e.originalSourcemap,e.sourcemapChain);return new P({file:e,mappings:p,names:h,sources:u,sourcesContent:i?void 0:d})}(s,e.generateDecodedMap({}),n,l,f,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=y(t,n);"boolean"!=typeof i&&Gt(Tn("sourcemapIgnoreList function must return a boolean.")),i&&(void 0===a.x_google_ignoreList&&(a.x_google_ignoreList=[]),a.x_google_ignoreList.includes(e)||a.x_google_ignoreList.push(e)),g&&(t=g(t,n),"string"!=typeof t&&Gt(Tn("sourcemapPathTransform function must return a string."))),a.sources[e]=Y(t)}vu("sourcemaps",3)}return{code:c,map:a}}function Od(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=Z(e);r=i?new URL(s,i).toString():s,n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"})}return"hidden"===s?"":`//# sourceMappingURL=${r}\n`}function Rd(e,t){const n=wd.hex(e),s=[n.slice(0,8),n.slice(8,12),"4"+n.slice(12,15),(3&parseInt(n.slice(15,16),16)|8).toString(16)+n.slice(17,20),n.slice(20,32)].join("-");return t.debugId=s,"//# debugId="+s+"\n"}Cd+="ppingURL";class Dd{constructor(e,t,n,s,i){this.outputOptions=e,this.unsetOptions=t,this.inputOptions=n,this.pluginDriver=s,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){xu("GENERATE",1);const t=Object.create(null),n=(e=>{const t=new Set;return new Proxy(e,{deleteProperty:(e,n)=>("string"==typeof n&&t.delete(n.toLowerCase()),Reflect.deleteProperty(e,n)),get:(e,n)=>n===Hu?t:Reflect.get(e,n),set:(e,n,s)=>("string"==typeof n&&t.add(n.toLowerCase()),Reflect.set(e,n,s))})})(t);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{xu("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),vu("initialize render",2),xu("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return Gt(Tn(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Fu}${dt(++e).padStart(n-5,"0")}${Vu}`;return s.length>n?Gt(Tn(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${n}. Check the "${t}" option.`)):s}})(),t=await this.generateChunks(n,e);t.length>1&&(s=this.outputOptions,i=this.inputOptions.onLog,"umd"===s.format||"iife"===s.format?Gt(Sn("output.format",_t,"UMD and IIFE output formats are not supported for code-splitting builds",s.format)):"string"==typeof s.file?Gt(Sn("output.file",Dt,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option')):s.sourcemapFile?Gt(Sn("output.sourcemapFile",Vt,'"output.sourcemapFile" is only supported for single-file builds')):!s.amd.autoId&&s.amd.id&&i(Et,Sn("output.amd.id",Rt,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports(),e.inlineTransitiveImports();vu("generate chunks",2),await kd(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}var s,i;return(e=>{const t=new Set,n=Object.values(e);for(const e of n)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of n)if("chunk"===e.type)for(const n of e.referencedFiles)t.has(n)&&t.delete(n);for(const n of t)delete e[n]})(n),xu("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),function(e){for(const[t,n]of Object.entries(e)){if(_d(t))return Gt(mn(t));if("placeholder"!==n.type){const{fileName:e}=n;if(e!==t&&_d(e))return Gt(mn(e))}}}(n),vu("generate bundle",2),vu("GENERATE",1),t}async addManualChunks(e){const t=new Map,n=await Promise.all(Object.entries(e).map(async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)})));for(const{alias:e,entries:s}of n)for(const n of s)Md(e,n,t);return t}assignManualChunks(e){const t=new Map,n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof Iu){const i=e(s.id,n);"string"==typeof i&&Md(i,s,t)}return t}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{au(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(Et,dn(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r,onlyExplicitManualChunks:o}=this.outputOptions,a="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),l=function({compact:e,generatedCode:{arrowFunctions:t,constBindings:n,objectShorthand:s,reservedNamesAsProps:i}}){const{_:r,n:o,s:a}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"},l=n?"const":"var",c=(e,{isAsync:t,name:n})=>`${t?"async ":""}function${n?` ${n}`:""}${r}(${e.join(`,${r}`)})${r}`,u=t?(e,{isAsync:t,name:n})=>{const s=1===e.length;return`${n?`${l} ${n}${r}=${r}`:""}${t?`async${s?" ":r}`:""}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,d=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${u(e,{isAsync:!1,name:i})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${n?"return ":""}`}`,t?`${i?";":""}${s?`${o}${s.base}`:""}`:`${a}${s?`${o}${s.base}`:r}}`],h=i?e=>Rs.test(e):e=>!ut.has(e)&&Rs.test(e);return{_:r,cnst:l,getDirectReturnFunction:d,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=d(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Ed(`${r}${Ed(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const n=t?`${o}${t.base}${t.t}`:r;return`{${e.map(([e,t])=>{if(null===e)return`${n}${t}`;const i=Ms(e);return e===t&&s&&e===i?n+e:`${n}${i}:${r}${t}`}).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),c=function(e){const t=[];for(const n of e.values())n instanceof Iu&&n.isEmitted()&&t.push(n);return t}(this.graph.modulesById),u=function(e){if(0===e.length)return"/";if(1===e.length)return Q(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let s;for(s=0;e[s]===n[s]&&s<Math.min(e.length,n.length);s++);return e.slice(0,s)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e,t){const n=[];for(const s of e)(s.info.isEntry||t)&&X(s.id)&&n.push(s.id);return n}(c,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof Ls&&s.set(i,new vo(i,t,n));return s}(this.graph.modulesById,this.outputOptions,u),h=s?[{alias:null,modules:c}]:r?c.map(e=>({alias:null,modules:[e]})):rd(this.graph.entryModules,a,n,this.inputOptions.onLog,o),p=new Array(h.length),f=new Map;let m=0;for(const{alias:n,modules:s}of h){yd(s);const i=new Zu(s,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,f,d,this.facadeChunkByModule,this.includedNamespaces,n,t,e,u,l);p[m++]=i}for(const e of p)e.link();s||r||this.checkCircularChunks(p,o);const g=[];for(const e of p)g.push(...e.generateFacades());return[...p,...g]}checkCircularChunks(e,t){const n=new Set,s=new Map,i=(e,i)=>{if(s.has(e)){if(!n.has(e)){const n=[e.getChunkName()],r=[e];let o=i;for(;o!==e&&o;)n.push(o.getChunkName()),r.push(o),o=s.get(o);const a=r.filter(e=>e.isManualChunk).map(e=>e.getChunkName()),l=r.find(e=>!e.isManualChunk)?.getChunkName();n.push(n[0]),n.reverse(),this.inputOptions.onLog(Et,function(e,t,n,s){return{code:"CIRCULAR_CHUNK",ids:e,message:0===t.length?`Circular chunk: ${e.join(" -> ")}.`:`Circular chunk: ${e.join(" -> ")}. ${void 0===n?"Please adjust the manual chunk logic for these chunks.":s?`Please consider disabling the "output.onlyExplicitManualChunks" option, as enabling it causes modules located between the modules included in the manual chunk "${t[0]}" to be extracted into the separate chunk "${n}".`:"Please adjust the manual chunks or the module structure."}`}}(n,a,l,t))}}else s.set(e,i),r(e)},r=e=>{for(const t of e.dependencies)t instanceof Zu&&i(t,e);n.add(e)};for(const t of e)s.has(t)||r(t)}}function Md(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return Gt((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${$t(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}function _d(e){const t=function(...e){const t=e.join("/"),n=q.test(t[0]);return(n?"/":"")+(te(t.split(q),n)||(n?"":"."))}(e).replaceAll("\\","/");return".."===t||t.startsWith("../")||"."===t||X(t)}class Ld extends bs{constructor(){super(),this.parent=null,this.variables.set("undefined",new go)}findVariable(e){let t=this.variables.get(e);return t||(t=new Vi(e),this.variables.set(e,t)),t}}const Td=(e,t,n=Vd)=>{const{onwarn:s,onLog:i}=e,r=Bd(n,s);if(i){const e=At[t];return(t,n)=>i(t,zd(n),(t,n)=>{if("error"===t)return Gt(Fd(n));At[t]>=e&&r(t,Fd(n))})}return r},Bd=(e,t)=>t?(n,s)=>{n===Et?t(zd(s),t=>e(Et,Fd(t))):e(n,s)}:e,zd=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),Fd=e=>"string"==typeof e?{message:e}:"function"==typeof e?Fd(e()):e,Vd=(e,{message:t})=>{switch(e){case Et:return console.warn(t);case vt:return console.debug(t);default:return console.info(t)}};function jd(e,t,n,s,i=/$./){const r=new Set(t),o=Object.keys(e).filter(e=>!(r.has(e)||i.test(e)));o.length>0&&s(Et,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const Ud={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:xe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:xe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:xe,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Gd={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},Hd={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Wd=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};Gt(Sn(`${n}.preset`,s,`valid values are ${St(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;Gt(Sn(t,n,`valid values are ${s}${St(Object.keys(e))}. You can also supply an object for more fine-grained control`,i))}return(e=>e&&"object"==typeof e?e:{})(i)})(t,n,s,i)(e)},qd=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some(e=>e?.then));return e}([e])).filter(Boolean);function Kd(e,t,n,s,i){return At[e]<At[i]?Bs:(i,r)=>{null!=r&&n(Et,{code:"INVALID_LOG_POSITION",message:`Plugin "${s}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=Fd(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}const Xd="at position ",Jd="at output position ",Yd={delete:()=>!1,get(){},has:()=>!1,set(){}};function Zd(e){return e.startsWith(Xd)||e.startsWith(Jd)?Gt({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Gt({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const Qd=n;function eh(e,t,n,s){const i=yc(e),r=!!t&&Object.keys(t).length>0;return"string"==typeof e&&!i.attributes&&r?(Bn('The "importerAttributes" option is deprecated. Provide a UniqueModuleId for "importer" instead.',"plugin-development/#this-resolve",!0,s,n),yc({attributes:t,rawId:e})):i}function th(e,t,n,s,i,r){const{logLevel:o,onLog:a}=s;let l,c=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(Xd)||e.name.startsWith(Jd)||r.has(e.name)?c=!1:r.add(e.name)),t)if(c){const n=e.cacheKey||e.name;d=t[n]||(t[n]=Object.create(null)),l={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=e.name,l={delete:()=>Zd(u),get:()=>Zd(u),has:()=>Zd(u),set:()=>Zd(u)};else l=Yd;var u,d;return{addWatchFile(e){n.watchFiles[e]=!0},cache:l,debug:Kd(vt,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:t=>Gt(Dn(Fd(t),e.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:Kd(xt,"PLUGIN_LOG",a,e.name,o),load:e=>n.moduleLoader.preloadModule({...e,...yc(e.id)}),meta:{rollupVersion:Qd,watchMode:n.watchMode},parse:au,parseAndWalk:iu,resolve(t,i,{attributes:r,custom:o,importerAttributes:a,isEntry:l,skipSelf:c}=be){c??=!0;const{id:u,attributes:d,rawId:h}=i?eh(i,a,e.name,s):be;return n.moduleLoader.resolveId(t,u,o,l,r||Ee,d||Ee,h,c?[{importer:u,plugin:e,source:t}]:null)},setAssetSource:i.setAssetSource,warn:Kd(Et,"PLUGIN_WARNING",a,e.name,o)}}async function nh(e,t,n,s,i,r,o,a,l,c,u){const d=await function(e,t,n,s,i,r,o,a,l,c,u){let d=null,h=null;if(i){d=new Set;for(const n of i)e===n.source&&t===n.importer&&d.add(n.plugin);h=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,importerAttributes:a,isEntry:l,skipSelf:c}=be)=>{c??=!0;const{id:d,attributes:h,rawId:p}=n?eh(n,a,t.name,u):be;return c&&-1!==i.findIndex(n=>n.plugin===t&&n.source===e&&n.importer===d)?Promise.resolve(null):s(e,d,o,l,r||Ee,h||Ee,p,c?[...i,{importer:d,plugin:t,source:e}]:i)}})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,importerAttributes:l||Ee,importerRawId:c,isEntry:o}],h,d)}(e,t,n,s,i,r,o,a,l,c,u);if(null!=d){const[e,t]=d;return"string"==typeof e?{id:e,resolvedBy:t.name}:"object"==typeof e?{...e,resolvedBy:e.resolvedBy||t.name}:e}return void 0===t||X(e)||"."===e[0]?async function(e,t,n){return await sh(e,t,n)??await sh(e+".mjs",t,n)??await sh(e+".js",t,n)}(t?se(Q(t),e):se(e),u.preserveSymlinks,u.fs):null}async function sh(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await sh(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=Z(e);if((await n.readdir(Q(e))).includes(t))return e}}catch{}}function ih(e){return 65279===e.charCodeAt(0)?ih(e.slice(1)):e}async function rh(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:pc(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let d=!1;const h=()=>d=!0;let p="",f=e.code;const m=e=>(t,n)=>{t=Fd(t),n&&Wt(t,n,f,i),t.id=i,t.hook="transform",e(t)};let g;try{g=await n.hookReduceArg0("transform",[f,i,{attributes:t.info.attributes,rawId:t.info.rawId}],function(e,n,i){let o,a;if("string"==typeof n)o=n;else{if(!n||"object"!=typeof n)return e;if(t.updateOptions(n),null==n.code)return(n.map||n.ast)&&s.onLog(Et,function(e){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;n.attributes&&Bn('Returning attributes from the "transform" hook is deprecated.',"plugin-development/#transform",!0,s),({code:o,map:a,ast:l}=n)}return null!==a&&r.push(pc("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),f=o,o},(e,t)=>{return p=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,g=h,{delete:e=>(g(),l.delete(e)),get:e=>(g(),l.get(e)),has:e=>(g(),l.has(e)),set:(e,t)=>(g(),l.set(e,t))}),debug:m(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&Wt(t,n,f,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:pc({version:3,...Sd(e,t,n,s,Ad(i)).traceMappings()})}(i,a,o,r,s.onLog);return e?(o!==e&&(o=e,r.length=0),new P({...e,sourcesContent:e.sourcesContent})):new V(a).generateMap({hires:!0,includeContent:!0,source:i})},info:m(e.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:m(e.warn)};var l,g})}catch(e){return Gt(Dn(e,p,{hook:"transform",id:i}))}!d&&u.length>0&&(t.transformFiles=u);const y=l?Gc(l):await async function(e,t,n){return bc(e,t,n)}(g,!1,!1!==s.jsx);return{astBuffer:y,code:g,customTransformCache:d,originalCode:a,originalSourcemap:o,safeVariableNames:null,sourcemapChain:r,transformDependencies:c}}const oh="resolveDependencies";class ah{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.sortedEntryModules=[],this.entryModules=new Set,this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.resolveId=async(e,t,n,s,i,r,o,a=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1,{attributes:i,importerAttributes:r,importerRawId:o})&&await nh(e,t,this.pluginDriver,this.resolveId,a,n,"boolean"==typeof s?s:!t,i,r,o,this.options),t,e,i,r,o),i),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const n=this.extendLoadModulesPromise(Promise.all(e.map(e=>this.loadEntryModule(e,!1,void 0,null,t))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=await this.extendLoadModulesPromise(Promise.all(e.map(({id:e,importer:t,attributes:n})=>this.loadEntryModule(e,!0,t,null,void 0,n))).then(n=>{let s=!1;for(const[i,r]of n.entries())r.isUserDefinedEntryPoint=r.isUserDefinedEntryPoint||t,ch(r,e[i],t),this.entryModules.has(r)||(this.sortedEntryModules.push(r),this.entryModules.add(r),s=!0);return s&&this.sortedEntryModules.sort((e,t)=>e.id>t.id?1:-1),n}));return await this.awaitLoadModulesPromise(),{entryModules:this.sortedEntryModules,implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r,attributes:o}){const a={attributes:o,fileName:e||null,id:t,importer:n&&gc(n),name:s||null},l=i?await this.addEntryWithImplicitDependants(a,i):(await this.addEntryModules([a],!1)).newEntryModules[0];return null!=r&&(l.preserveSignature=r),l}async preloadModule(e){return(await this.fetchModule({...this.getResolvedIdWithDefaults(e,Ee),rawId:e.rawId},void 0,!1,!e.resolveDependencies||oh)).info}addEntryWithImplicitDependants(e,t){return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then(async n=>{if(ch(n,e,!1),!n.info.isEntry){const s=await Promise.all(t.map(t=>{const s=yc(t);return this.loadEntryModule(s.id,!1,e.importer,n.id,void 0,s.attributes)}));if(!n.info.isEntry){this.implicitEntryModules.add(n);for(const e of s)n.implicitlyLoadedAfter.add(e);for(const e of n.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(n)}}return n}))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run(async()=>{const t=await this.pluginDriver.hookFirst("load",[e,{attributes:n.info.attributes,rawId:n.info.rawId}]);return null!==t?("object"==typeof t&&t.attributes&&Bn('Returning attributes from the "load" hook is deprecated.',"plugin-development/#load",!0,this.options),t):(this.graph.watchFiles[n.info.rawId]=!0,await this.options.fs.readFile(n.info.rawId,{encoding:"utf8"}))})}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${$t(t)})`),s+=`: ${n.message}`,n.message=s,n}const i="string"==typeof s?{code:s}:null!=s&&"object"==typeof s&&"string"==typeof s.code?s:Gt(function(e){return{code:"BAD_LOADER",message:`Error loading "${$t(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=ih(i.code);const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===i.code){const e={meta:{...n.info.meta},moduleSideEffects:n.info.moduleSideEffects,syntheticNamedExports:n.info.syntheticNamedExports};if(n.updateOptions(r),!await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:ou(r.astBuffer),attributes:r.attributes,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,rawId:r.rawId,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}])){if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);return void await n.setSource(r)}n.updateOptions(e,{replaceExistingMeta:!0})}n.updateOptions(i),await n.setSource(await rh(i,n,this.pluginDriver,this.options))}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch(()=>{}),e}async fetchDynamicDependencies(e,t){const n=await Promise.all(t.map(t=>t.then(async([{argument:t,node:n},s])=>null===s?null:"string"==typeof s?(n.resolution=s,null):"source"!==n.phase||s.external?n.resolution=await this.fetchResolvedDependency($t(s.id),e.id,s):Gt(In("string"==typeof t?t:$t(s.id),e.id)))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,rawId:n,meta:s,moduleSideEffects:i,syntheticNamedExports:r},o,a,l){const c=this.modulesById.get(t);if(c instanceof Iu)return await this.handleExistingModule(c,a,l),c;if(c instanceof Ls)return Gt({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${c.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const u=new Iu(this.graph,t,n,this.options,a,i,r,s,e);this.modulesById.set(t,u);const d=this.addModuleSource(t,o,u).then(()=>[this.getResolveStaticDependencyPromises(u),this.getResolveDynamicImportPromises(u),h]),h=dh(d).then(()=>this.pluginDriver.hookParallel("moduleParsed",[u.info]));h.catch(()=>{}),this.moduleLoadPromises.set(u,d);const p=await d;return l?l===oh&&await h:await this.fetchModuleDependencies(u,...p),u}async fetchModuleDependencies(e,t,n,s){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,n)]),e.linkImports(),await s)}fetchResolvedDependency(e,t,n){if(n.external){const{attributes:s,external:i,id:r,rawId:o,moduleSideEffects:a,meta:l}=n;let c=this.modulesById.get(r);if(c){if(!(c instanceof Ls))return Gt(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${$t(t)}", but is already an existing non-external module id.`}}(e,t))}else c=new Ls(this.options,r,o,a,l,"absolute"!==i&&X(r),s),this.modulesById.set(r,c);return Promise.resolve(c)}return this.fetchModule(n,t,!1,!1)}async fetchStaticDependencies(e,t){for(const n of await Promise.all(t.map(t=>t.then(([t,n])=>e.sourcePhaseSources.has(t)&&!n.external?Gt(In(t,e.id)):this.fetchResolvedDependency(t,e.id,n)))))e.dependencies.add(n),n.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof Iu&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n,s,i,r){const{makeAbsoluteExternalsRelative:o}=this.options;if(e){if("object"==typeof e){const a=e.external||this.options.external(e.id,t,!0,{attributes:e.attributes||s,importerAttributes:i,importerRawId:r});return{...e,external:a&&("relative"===a||!X(e.id)||!0===a&&uh(e.id,n,o)||"absolute")}}const a=this.options.external(e,t,!0,{attributes:s,importerAttributes:i,importerRawId:r});return{external:a&&(uh(e,n,o)||"absolute"),id:a&&o?lh(e,t):e}}const a=o?lh(n,t):n;return!1===e||this.options.external(a,t,!0,{attributes:s,importerAttributes:i,importerRawId:r})?{external:uh(a,n,o)||"absolute",id:a}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,cu(t.node));return n&&"string"!=typeof n?(t.node.shouldIncludeDynamicAttributes=!!n.external,t.id=n.id,[t,n]):(t.node.shouldIncludeDynamicAttributes=!0,[t,n])})}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributesList).map(([e,t])=>t.map(t=>[e,t])).flat().map(async([t,n])=>{const s=mc(t,n),i=e.resolvedIds[s];if(i)return[t,i];const r=this.toModuleResolvedId(this.handleInvalidResolvedId(await this.resolveId(t,e.id,Ee,!1,n,e.info.attributes,e.info.rawId),t,e.id,n));return e.resolvedIds[s]=r,[t,r]})}getResolvedIdWithDefaults(e,t){if(!e)return null;const n=e.external||!1;return{attributes:e.attributes||t,external:n,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!n),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,n){const s=this.moduleLoadPromises.get(e);if(n)return n===oh?dh(s):s;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await s)}handleInvalidResolvedId(e,t,n,s){return null===e?J(t)?Gt(function(e,t){return{code:an,exporter:e,id:t,message:`Could not resolve "${e}" from "${$t(t)}"`}}(t,n)):(this.options.onLog(Et,function(e,t){return{code:an,exporter:e,id:t,message:`"${e}" is imported by "${$t(t)}", but could not be resolved – treating it as an external dependency.`,url:kt("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,n)),{attributes:s,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(Et,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${$t(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1,r=Ee){const o=s?gc(s):null,{attributes:a,rawId:l,id:c}=n?yc(n):be,u=await nh(e,c,this.pluginDriver,this.resolveId,null,Ee,!0,r,a,l,this.options);if(null==u)return Gt(null===o?function(e){return{code:on,message:`Could not resolve entry module "${$t(e)}".`}}(e):function(e,t){return{code:en,message:`Module "${$t(e)}" that should be implicitly loaded before "${$t(t)}" could not be resolved.`}}(e,o));const d="object"==typeof u&&u.external;return!1===u||d?Gt(null===o?d&&i?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(e){return{code:on,message:`Entry module "${$t(e)}" cannot be external.`}}(e):function(e,t){return{code:en,message:`Module "${$t(e)}" that should be implicitly loaded before "${$t(t)}" cannot be external.`}}(e,o)):this.fetchModule(this.toModuleResolvedId(this.getResolvedIdWithDefaults("object"==typeof u?u:{id:u},r)),void 0,t,!1)}toModuleResolvedId(e){const{id:t,attributes:n}=e;return{...e,id:mc(t,n),rawId:t}}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s,importerAttributes:e.info.attributes,importerRawId:e.info.rawId}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.toModuleResolvedId(this.getResolvedIdWithDefaults(i,s)):null;if(null==i){const n=mc(t,s),i=e.resolvedIds[n];if(i)return i;const r=this.handleInvalidResolvedId(await this.resolveId(t,e.id,Ee,!1,s,e.info.attributes,e.info.rawId),t,e.id,s);return e.resolvedIds[n]=this.toModuleResolvedId(r),e.resolvedIds[n]}return this.toModuleResolvedId(this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t,s,e.info.attributes,e.info.rawId),s),t,n,s))}}function lh(e,t){return J(e)?t?se(t,"..",e):se(e):e}function ch(e,{fileName:t,name:n},s){null!==t?e.chunkFileNames.add(t):null!==n&&(e.chunkNames.push({isUserDefined:s,name:n}),e.chunkNames.sort((e,t)=>e.name>t.name?1:-1))}function uh(e,t,n){return!0===n||"ifRelativeSource"===n&&J(t)||!X(e)}async function dh(e){const[t,n]=await e;return Promise.all([...t,...n])}function hh(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return Ku(qu("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return Bn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',Ut,!1,l),e},names:t,get originalFileName(){return Bn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',Ut,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>ee(c).slice(1),extname:()=>ee(c),hash:e=>r.slice(0,Math.min(Math.max(0,e||8),21)),name:()=>c.slice(0,Math.max(0,c.length-ee(c).length))}),a)}function ph(e,{bundle:t},n){t[Hu].has(e.toLowerCase())?n(Et,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Wu}const fh=new Set(["chunk","asset","prebuilt-chunk"]);function mh(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return Gt(Tn(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class gh{constructor(e,t,n){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&fh.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!wt(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Gt(Tn(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):Gt(Tn(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return Gt(ln(t.name||e))},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():Gt({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${n.fileName||n.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):"prebuilt-chunk"===t.type?t.fileName:function(e,t){return"string"!=typeof e.fileName?Gt({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${e.name||t}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`}):e.fileName}(t,e):Gt({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`});var n,s},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return Gt({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return Gt(Tn(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return Gt({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=mh(t,n,e);if(this.output)this.finalizeAdditionalAsset(n,s,this.output);else{n.source=s;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(n,s,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const n=wd[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&ph(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())"asset"===e.type&&void 0!==e.source?e.fileName?this.finalizeAdditionalAsset(e,e.source,s):Ae(i,n(e.source),Pe).push(e):"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},this.filesByReferenceId=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let n=t;do{n=$d(n).slice(0,8).replaceAll("-","$")}while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some(({filesByReferenceId:e})=>e.has(n)));e.referenceId=n,this.filesByReferenceId.set(n,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(n,e);return n}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleAttributes:{},facadeModuleId:null,facadeModuleRawId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,preliminaryFileName:e.fileName,referencedFiles:[],sourcemapFileName:e.sourcemapFileName||null,type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:mh(e.source,e,null),n=e.originalFileName||null;"string"==typeof n&&(this.graph.watchFiles[n]=!0);const s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:n,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:n,source:s}=e;n&&ph(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>uc.LOAD_AND_PARSE)return Gt({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Gt(Tn(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then(e=>t.module=e).catch(()=>{}),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return Gt(Tn(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||wt(e.fileName))return Gt(Tn(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},n=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),n}finalizeAdditionalAsset(e,t,{bundle:n,fileNamesBySourceHash:s,getHash:i,outputOptions:r}){let{fileName:o,name:a,needsCodeReference:l,originalFileName:c,referenceId:u}=e;if(!o){const e=i(t);o=s.get(e),o||(o=hh(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const d={...e,fileName:o,source:t};this.filesByReferenceId.set(u,d);const h=n[o];if("asset"===h?.type)h.needsCodeReference&&=l,a&&h.names.push(a),c&&h.originalFileNames.push(c);else{const{options:e}=this;n[o]={fileName:o,get name(){return Bn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Ut,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return Bn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Ut,!1,e),c},originalFileNames:c?[c]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySourceHash:s,outputOptions:i}){const{names:r,originalFileNames:o}=function(e){const t=[],n=[];for(const{name:s,originalFileName:i}of e)"string"==typeof s&&t.push(s),i&&n.push(i);return n.sort(),t.sort((e,t)=>e.length-t.length||(e>t?1:e===t?0:-1)),{names:t,originalFileNames:n}}(e);let a,l="",c=!0;for(const s of e){c&&=s.needsCodeReference;const e=hh(s.name,r,s.source,s.originalFileName,o,t,i,n,this.options);(!l||e.length<l.length||e.length===l.length&&e<l)&&(l=e,a=s)}s.set(t,l);for(const t of e){const e={...t,fileName:l};this.filesByReferenceId.set(t.referenceId,e)}const{options:u}=this;n[l]={fileName:l,get name(){return Bn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Ut,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return Bn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Ut,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function yh(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function bh(e){if(e instanceof RegExp)return t=>{const n=Y(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||X(e)?Y(e):Y(se(t,e))}(e,t),s=pa(n,{dot:!0});return e=>{const t=Y(e);return s(t)}}function Eh(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function xh(e,t){if(e||t)return n=>!(e?.some(e=>e(n))||!t?.some(e=>e(n))&&t&&t.length>0)}function vh(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?yh(e.exclude):void 0,include:e.include?yh(e.include):void 0}}function Ah(e){if(!e)return;const{exclude:t,include:n}=vh(e),s=t?.map(bh),i=n?.map(bh);return xh(s,i)}function Sh(e,t){if(!e&&!t)return;const n=Ah(e),s=function(e){if(!e)return;const{exclude:t,include:n}=vh(e),s=t?.map(Eh),i=n?.map(Eh);return xh(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const Ph=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class $h{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new gh(e,t,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...n];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map(n=>[n,th(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of Ph)n in e&&t.onLog(Et,En(e.name,n))}createOutputPluginDriver(e){return new $h(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,n,s){return this.hookFirstAndGetPlugin(e,t,n,s).then(e=>e&&e[0])}async hookFirstAndGetPlugin(e,t,n,s){for(const i of this.getSortedPlugins(e)){if(s?.has(i))continue;const r=await this.runHook(e,t,i,n);if(null!=r)return[r,i]}return null}hookFirstSync(e,t,n){for(const s of this.getSortedPlugins(e)){const i=this.runHookSync(e,t,s,n);if(null!=i)return i}return null}async hookParallel(e,t,n){const s=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(s),s.length=0,await this.runHook(e,t,i,n)):s.push(this.runHook(e,t,i,n));await Promise.all(s)}hookReduceArg0(e,[t,...n],s,i){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then(r=>this.runHook(e,[r,...n],t,i).then(e=>s.call(this.pluginContexts.get(t),r,e,t)));return r}hookReduceArg0Sync(e,[t,...n],s,i){for(const r of this.getSortedPlugins(e)){const o=[t,...n],a=this.runHookSync(e,o,r,i);t=s.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,n,s){const i=[],r=[];for(const t of this.getSortedPlugins(e,Ch))t[e].sequential?(i.push(...await Promise.all(r)),r.length=0,i.push(await this.runHook(e,n,t))):r.push(this.runHook(e,n,t));return i.push(...await Promise.all(r)),i.reduce(s,await t)}hookReduceValueSync(e,t,n,s,i){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,n,t,i);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,n){let s=Promise.resolve();for(const i of this.getSortedPlugins(e))s=s.then(()=>this.runHook(e,t,i,n));return s.then(kh)}getSortedPlugins(e,t){return Ae(this.sortedPlugins,e,()=>wh(e,this.plugins,t))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;if("object"==typeof i&&"filter"in i&&i.filter)if("transform"===e){const e=i.filter,n=t,s=Ae(this.compiledPluginFilters.transformFilter,e,()=>Sh(e.id,e.code));if(s&&!s(n[1],n[0]))return Promise.resolve()}else if("resolveId"===e||"load"===e){const e=i.filter,n=t,s=Ae(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=Ah(e);return t?e=>!!t(e):void 0}(e.id));if(s&&!s(n[0]))return Promise.resolve()}let o=this.pluginContexts.get(n);s&&(o=s(o,n));let a=null;return Promise.resolve().then(()=>{if("function"!=typeof r)return r;const s=r.apply(o,t);return s?.then?(a=[n.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(s).then(e=>(this.unfulfilledActions.delete(a),e))):s}).catch(t=>(null!==a&&this.unfulfilledActions.delete(a),Gt(Dn(t,n.name,{hook:e}))))}runHookSync(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));try{return r.apply(o,t)}catch(t){return Gt(Dn(t,n.name,{hook:e}))}}}function wh(e,t,n=Ih){const s=[],i=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(n(t.handler,e,o),"pre"===t.order){s.push(o);continue}if("post"===t.order){r.push(o);continue}}else n(t,e,o);i.push(o)}}return[...s,...i,...r]}function Ih(e,t,n){"function"!=typeof e&&Gt(function(e,t){return{code:Zt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,n.name))}function Ch(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return Gt(function(e,t){return{code:Zt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,n.name))}function kh(){}class Nh{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise((t,n)=>{this.queue.push({reject:n,resolve:t,task:e}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:n,task:s}=e;try{n(await s())}catch(e){t(e)}}this.workerCount--}}class Oh{constructor(e,t){if(this.options=e,this.cachedModules=new Map,this.deoptimizationTracker=new Ue,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=uc.LOAD_AND_PARSE,this.scope=new Ld,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=gc(e),n=this.modulesById.get(t);return n?n.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}t&&(this.watchMode=!0,t({closeWatcher:()=>this.pluginDriver.hookParallel("closeWatcher",[]),watchChange:(...e)=>this.pluginDriver.hookParallel("watchChange",e)})),this.pluginDriver=new $h(this,e,e.plugins,this.pluginCache),this.moduleLoader=new ah(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Nh(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const n of e?e.manualPureFunctions:[]){let e=t;for(const t of n.split("."))e=e[t]||=Object.create(null);e[Ps]=!0}return t})(e)}async build(){xu("generate module graph",2),await this.generateModuleGraph(),vu("generate module graph",2),xu("sort and bind modules",2),this.phase=uc.ANALYSE,this.sortAndBindModules(),vu("sort and bind modules",2),xu("mark included statements",2),this.includeStatements(),vu("mark included statements",2),this.phase=uc.GENERATE}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const[e,s]of Object.entries(t))s[0]>=this.options.experimentalCacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map(e=>e.toJSON()),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map(e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(e).map(([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e}))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e.cacheInfoGetters(),e instanceof Iu?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Ts(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{xu(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)if(e.isExecuted){e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include();for(const e of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(e),e.include(As(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(),this.needsTreeshakingPass=!0);vu("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||Gt(wn(t))}sortAndBindModules(){const{orderedModules:e,cyclePaths:t}=bd(this.entryModules);for(const e of t)this.options.onLog(Et,hn(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())if("*"!==t.name&&"source"!==t.phase){const[n,s]=t.module.getVariableForExportName(t.name,{importChain:[e.id]});n||e.log(Et,$n(t.name,e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function Rh(e,t){return t()}const Dh=n;function Mh(e,t,n,s){e=wh("onLog",e);const i=At[s],r=(s,o,a=ve)=>{if(Kt(o),!(At[s]<i)){for(const t of e){if(a.has(t))continue;const{onLog:e}=t,l=e=>At[e]<i?Bs:n=>r(e,Fd(n),new Set(a).add(t));if(!1===("handler"in e?e.handler:e).call({debug:l(vt),error:e=>Gt(Fd(e)),info:l(xt),meta:{rollupVersion:Dh,watchMode:n},warn:l(Et)},s,o))return}t(s,o)}};return r}const _h=e=>()=>Gt(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:kt("plugin-development/#a-simple-example")}}(e)),Lh=_h("fs.appendFile"),Th=_h("fs.copyFile"),Bh=_h("fs.mkdir"),zh=_h("fs.mkdtemp"),Fh=_h("fs.readdir"),Vh=_h("fs.readFile"),jh=_h("fs.realpath"),Uh=_h("fs.rename"),Gh=_h("fs.rmdir"),Hh=_h("fs.stat"),Wh=_h("fs.lstat"),qh=_h("fs.unlink"),Kh=_h("fs.writeFile");var Xh=Object.freeze({__proto__:null,appendFile:Lh,copyFile:Th,lstat:Wh,mkdir:Bh,mkdtemp:zh,readFile:Vh,readdir:Fh,realpath:jh,rename:Uh,rmdir:Gh,stat:Hh,unlink:qh,writeFile:Kh});const Jh=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Yh=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>"\0"!==t[0]&&e(t,...n)||!1;if(e){const t=new Set,n=[];for(const s of yh(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.test(e))}return()=>!1},Zh=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Qh=e=>{const t=e.jsx;if(!t)return!1;const n=Wd(t,Gd,"jsx",Ot,"false, "),{factory:s,importSource:i,mode:r}=n;switch(r){case"automatic":return{factory:s||"React.createElement",importSource:i||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||s||n.fragment||Gt(Sn("jsx",Ot,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:i||null,mode:"preserve"};default:return r&&"classic"!==r&&Gt(Sn("jsx.mode",Ot,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},ep=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},tp=(e,t)=>{const n=e.moduleContext;if("function"==typeof n)return e=>n(e)??t;if(n){const e=Object.create(null);for(const[t,s]of Object.entries(n))e[se(t)]=s;return n=>e[n]??t}return()=>t},np=e=>{if(!1===e.treeshake)return!1;const t=Wd(e.treeshake,Ud,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??xe,moduleSideEffects:sp(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},sp=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>"\0"===t[0]||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Gt(Sn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},ip=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,rp=/^[a-z]:/i;function op(e){const t=rp.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(ip,"_")}const ap=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return Gt(Sn("output.file",Dt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return Gt(Sn("output.file",Dt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},lp=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Gt(Sn("output.format",_t,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},cp=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?Gt(Sn("output.inlineDynamicImports",Tt,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},up=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return Gt(Sn("output.inlineDynamicImports",Tt,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return Gt(Sn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},dp=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return se(t)},hp=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Gt(Sn("output.amd.id",Rt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Gt(Sn("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},pp=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},fp=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?Gt(Sn("output.dir",Dt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},mp=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function gp(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return Gt({code:Jt,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:kt(Mt)});return n||"auto"}const yp=(e,t)=>(null!=e.externalImportAssertions&&Bn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),bp=e=>{const t=Wd(e.generatedCode,Hd,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===t.arrowFunctions,constBindings:!0===t.constBindings,objectShorthand:!0===t.objectShorthand,reservedNamesAsProps:!1!==t.reservedNamesAsProps,symbols:!0===t.symbols}},Ep=(e,t)=>(null!=e.importAttributesKey&&Bn('The "output.importAttributesKey" option is deprecated and will be removed in a future version of Rollup. Only use it if you need to support environments that do not understand the "with" keyword.',"configuration-options/#output-importattributeskey",!1,t),e.importAttributesKey??"with"),xp=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},vp=new Set(["compat","auto","esModule","default","defaultOnly"]),Ap=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||Sp(n=t(s)):s in e?e[s]:Sp(e[s]=t(s))}return void 0===t?()=>"default":()=>Sp(t)},Sp=e=>vp.has(e)?e:Gt(Sn("output.interop",Bt,`use one of ${Array.from(vp,e=>JSON.stringify(e)).join(", ")}`,e)),Pp=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return Gt(Sn("output.manualChunks",zt,'this option is not supported for "output.inlineDynamicImports"'));if(n)return Gt(Sn("output.manualChunks",zt,'this option is not supported for "output.preserveModules"'))}return s||{}},$p=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),wp=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Ip=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(n=t).endsWith("/")?n:n+"/":Gt(Sn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n},Cp=n;function kp(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Np(e,t,n,s,i){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,n,s){if(!e)throw new Error("You must supply an options object");const i=await qd(e.plugins);kp(i,Jd);const r=t.createOutputPluginDriver(i);return{...await Op(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Rh(0,async()=>{const n=new Dd(r,a,t,o,i),s=await n.generate(e);if(e){if(xu("WRITE",1),!r.dir&&!r.file)return Gt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:kt(Dt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=se(t.dir||Q(t.file),e.fileName);return await n(Q(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),vu("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>Dp(e)-Dp(t))};var l})}function Op(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=lp(e),o=cp(e,t),a=up(e,o,t),l=ap(e,a,t),c=bp(e),u=yp(e,t),d={amd:hp(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:pp(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:fp(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:mp(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:gp(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:pp(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:Ep(e,t),indent:xp(e,i),inlineDynamicImports:o,interop:Ap(e),intro:pp(e,"intro"),manualChunks:Pp(e,o,a),minifyInternalExports:$p(e,r,i),name:e.name,noConflict:e.noConflict||!1,onlyExplicitManualChunks:e.onlyExplicitManualChunks??"function"==typeof e.manualChunks,outro:pp(e,"outro"),paths:e.paths||{},plugins:await qd(e.plugins),preserveModules:a,preserveModulesRoot:dp(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:op,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Ip(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:wp(e,s),sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1,virtualDirname:e.virtualDirname||"_virtual"};return jd(e,Object.keys(d),"output options",t.onLog),{options:d,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],(e,t)=>t||e,e=>{const t=()=>e.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}}),e,t)}var Rp;function Dp(e){return"asset"===e.type?Rp.ASSET:e.isEntry?Rp.ENTRY_CHUNK:Rp.SECONDARY_CHUNK}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(Rp||(Rp={}));const Mp=n;e.VERSION=Mp,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:n,unsetOptions:s}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const n=await async function(e,t){const n=wh("options",await qd(e.plugins)),s=e.logLevel||xt,i=Mh(n,Td(e,s),t,s);for(const r of n){const{name:n,options:o}=r,a="handler"in o?o.handler:o,l=await a.call({debug:Kd(vt,"PLUGIN_LOG",i,n,s),error:e=>Gt(Dn(Fd(e),n,{hook:"onLog"})),info:Kd(xt,"PLUGIN_LOG",i,n,s),meta:{rollupVersion:Cp,watchMode:t},warn:Kd(Et,"PLUGIN_WARNING",i,n,s)},e);l&&(e=l)}return e}(e,t),{options:s,unsetOptions:i}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await qd(e.plugins),r=e.logLevel||xt,o=Mh(i,Td(e,r),t,r),a=e.strictDeprecations||!1,l=ep(e),c={cache:Jh(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Yh(e.external),fs:e.fs??Xh,input:Zh(e),jsx:Qh(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:tp(e,s),onLog:o,perf:e.perf||!1,plugins:i,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:np(e)};return jd(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return kp(s.plugins,Xd),{options:s,unsetOptions:i}}(e,null!==t);(function(e){e.perf?(mu=new Map,xu=yu,vu=bu,e.plugins=e.plugins.map(Su)):(xu=Bs,vu=Bs)})(n),await async function(){await Bc()}();const i=new Oh(n,t),r=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0),xu("BUILD",1),await Rh(i.pluginDriver,async()=>{try{xu("initialize",2),await i.pluginDriver.hookParallel("buildStart",[n]),vu("initialize",2),await i.build()}catch(e){const t=Object.keys(i.watchFiles);t.length>0&&(e.watchFiles=t);try{await i.pluginDriver.hookParallel("buildEnd",[e])}catch(t){const n=Ht({...e,message:`There was an error during the build:\n ${e.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${t.message}`});throw await i.pluginDriver.hookParallel("closeBundle",[n]),n}throw await i.pluginDriver.hookParallel("closeBundle",[e]),e}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await i.pluginDriver.hookParallel("closeBundle",[e]),e}}),vu("BUILD",1);const o={get cache(){return r?i.getCache():void 0},async close(){o.closed||(o.closed=!0,await i.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async e=>o.closed?Gt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Np(!1,n,s,e,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async e=>o.closed?Gt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Np(!0,n,s,e,i)};return n.perf&&(o.getTimings=Eu),o}(e,null)}},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={});
|
|
10
|
+
var e,t;e=this,t=function(e){var t="undefined"!=typeof document?document.currentScript:null,n="5.0.0-1",s=",".charCodeAt(0),i=";".charCodeAt(0),r="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",o=new Uint8Array(64),a=new Uint8Array(128);for(let e=0;e<64;e++){const t=r.charCodeAt(e);o[e]=t,a[t]=e}function l(e){let t=0,n=0,s=0;do{const i=e.next();s=a[i],t|=(31&s)<<n,n+=5}while(32&s);return t}function c(e){return 1&e?-2147483648|-(e>>>1):e>>>1}function u(e,t){do{let n=31&t;(t>>>=5)>0&&(n|=32),e.write(o[n])}while(t>0)}function d(e){return e<0?-e<<1|1:e<<1}function h(e,t){return!(e.pos>=t)&&e.peek()!==s}var p="undefined"!=typeof TextDecoder?new TextDecoder:"undefined"!=typeof Buffer?{decode:e=>Buffer.from(e.buffer,e.byteOffset,e.byteLength).toString()}:{decode(e){let t="";for(let n=0;n<e.length;n++)t+=String.fromCharCode(e[n]);return t}},f=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:t}=this;t[this.pos++]=e,16384===this.pos&&(this.out+=p.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+p.decode(e.subarray(0,n)):t}},m=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:t,pos:n}=this,s=t.indexOf(e,n);return-1===s?t.length:s}};function g(e){e.sort(y)}function y(e,t){return e[0]-t[0]}function b(e){const t=new f;let n=0,r=0,o=0,a=0;for(let l=0;l<e.length;l++){const c=e[l];if(l>0&&t.write(i),0===c.length)continue;let h=0;for(let e=0;e<c.length;e++){const i=c[e];e>0&&t.write(s),u(t,d(i[0]-h)),h=i[0],1!==i.length&&(u(t,d(i[1]-n)),u(t,d(i[2]-r)),u(t,d(i[3]-o)),n=i[1],r=i[2],o=i[3],4!==i.length&&(u(t,d(i[4]-a)),a=i[4]))}}return t.flush()}var E=class e{constructor(t){this.bits=t instanceof e?t.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}},x=class e{constructor(e,t,n){this.start=e,this.end=t,this.original=n,this.intro="",this.outro="",this.content=n,this.storeName=!1,this.edited=!1,this.previous=null,this.next=null}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const t=new e(this.start,this.end,this.original);return t.intro=this.intro,t.outro=this.outro,t.content=this.content,t.storeName=this.storeName,t.edited=this.edited,t}contains(e){return this.start<e&&e<this.end}eachNext(e){e(this);let t=this.next;for(;t;)e(t),t=t.next}eachPrevious(e){e(this);let t=this.previous;for(;t;)e(t),t=t.previous}edit(e,t,n){return this.content=e,n||(this.intro="",this.outro=""),this.storeName=t,this.edited=!0,this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}reset(){this.intro="",this.outro="",this.edited&&(this.content=this.original,this.storeName=!1,this.edited=!1)}split(t){const n=t-this.start,s=this.original.slice(0,n),i=this.original.slice(n);this.original=s;const r=new e(t,this.end,i);return r.outro=this.outro,this.outro="",this.end=t,this.edited?(r.edit("",!1,!0),this.content=""):this.content=s,r.next=this.next,r.next&&(r.next.previous=r),r.previous=this,this.next=r,r}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.edited?this.edit(t,this.storeName,!0):this.split(this.start+t.length).edit("",void 0,!0)),!0):(this.edit("",void 0,!0),this.intro=this.intro.replace(e,""),!!this.intro.length||void 0)}trimStart(e){if(this.intro=this.intro.replace(e,""),this.intro.length)return!0;const t=this.content.replace(e,"");return t.length?(t!==this.content&&(this.edited?this.edit(t,this.storeName,!0):(this.split(this.end-t.length),this.edit("",void 0,!0))),!0):(this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0)}},v=class extends Error{name="MagicStringError";constructor(e,t){super(`[MagicString] ${e}`,t)}};function A(){if("undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa)return e=>globalThis.btoa(unescape(encodeURIComponent(e)));const e=globalThis.Buffer;return e?t=>e.from(t,"utf-8").toString("base64"):()=>{throw new v("unsupported environment: `btoa` or `Buffer` is required")}}const S=A();var P=class{constructor(e){if(this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings="string"==typeof e.mappings?e.mappings:b(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList),void 0!==e.debugId&&(this.debugId=e.debugId),void 0!==e.rangeMappings){let t=!1;for(const n of e.rangeMappings)if(0!==n.length){t=!0;break}t&&(this.rangeMappings=function(e){if(0===e.length)return"";const t=new f;for(let n=0;n<e.length;n++){const s=e[n];n>0&&t.write(i);let r=0;for(let e=0;e<s.length;e++){const n=s[e];u(t,n-r),r=n}}return t.flush()}(e.rangeMappings))}}toString(){return JSON.stringify(this)}toUrl(){return`data:application/json;charset=utf-8;base64,${S(this.toString())}`}};function $(e){const t=[0];for(let n=e.indexOf("\n");-1!==n;n=e.indexOf("\n",n+1))t.push(n+1);return function(e){let n=0,s=t.length;for(;n<s;){const i=n+s>>1;e<t[i]?s=i:n=i+1}const i=n-1;return{line:i,column:e-t[i]}}}function w(e,t){const n=e.split(/[/\\]/),s=t.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let e=n.length;for(;e--;)n[e]=".."}return n.concat(s).join("/")}const I=Object.prototype.toString;function C(e){return"[object Object]"===I.call(e)}const k=(()=>{const e=new Uint8Array(64);for(let t=0;t<64;t++)e[t]="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(t);return e})(),N=new Uint8Array(16384);function O(e,t){t=t<0?-t<<1|1:t<<1;do{let n=31&t;(t>>>=5)>0&&(n|=32),N[e++]=k[n]}while(t>0);return e}const R=new TextDecoder;var D=class{constructor(){this.out="",this.pos=0,this.lines=[],this.buffered=0,this.needsComma=!1,this.prevGenColumn=0,this.prevSourceIndex=0,this.prevSourceLine=0,this.prevSourceColumn=0,this.prevNameIndex=0}endLine(e){this.lines.push(e),this.buffered+=e.length+1,this.buffered>=4096&&this.drain(null)}segments(e){this.drain(e)}finish(e){return this.drain(e),this.flush(),this.out}drain(e){const t=this.lines,n=t.length;for(let s=0;s<=n;s++){const i=s<n?t[s]:e;if(null===i)break;for(let e=0;e<i.length;e++){this.pos>16348&&this.flush();const t=i[e];this.needsComma&&(N[this.pos++]=44),this.needsComma=!0,this.pos=O(this.pos,t[0]-this.prevGenColumn),this.prevGenColumn=t[0],this.pos=O(this.pos,t[1]-this.prevSourceIndex),this.prevSourceIndex=t[1],this.pos=O(this.pos,t[2]-this.prevSourceLine),this.prevSourceLine=t[2],this.pos=O(this.pos,t[3]-this.prevSourceColumn),this.prevSourceColumn=t[3],5===t.length&&(this.pos=O(this.pos,t[4]-this.prevNameIndex),this.prevNameIndex=t[4])}s<n&&(this.pos>16348&&this.flush(),N[this.pos++]=59,this.needsComma=!1,this.prevGenColumn=0)}t.length=0,this.buffered=0,this.flush()}flush(){this.out+=R.decode(N.subarray(0,this.pos)),this.pos=0}};function M(e){return e>=97&&e<=122||e>=65&&e<=90||e>=48&&e<=57||95===e}var _=class{constructor(e,t=null){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.rawRangeMappings=[],this.rawRangeMappingsIndices=this.rawRangeMappings[this.generatedCodeLine]=[],this.encoder=t}nextLine(){null===this.encoder?(this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[]):(this.encoder.endLine(this.rawSegments),this.rawSegments=[],this.generatedCodeLine+=1),this.generatedCodeColumn=0,this.rawRangeMappings[this.generatedCodeLine]=this.rawRangeMappingsIndices=[]}addEdit(e,t,n,s){if(t.length){const i=t.length-1;let r=t.indexOf("\n",0),o=-1;for(;r>=0&&i>r;){const i=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&i.push(s),this.rawSegments.push(i),this.nextLine(),o=r,r=t.indexOf("\n",r+1)}const a=[this.generatedCodeColumn,e,n.line,n.column];s>=0&&a.push(s),this.rawSegments.push(a),this.advance(t.slice(o+1))}}addUneditedChunk(e,t,n,s,i){const r=t.end;let o=t.start;if(this.hires){const i="boundary"===this.hires,a="experimental-range"===this.hires,l=a?null:this.encoder;let c=!1;for(;o<r;){null!==l&&this.rawSegments.length>=4096&&(l.segments(this.rawSegments),this.rawSegments.length=0),a&&o+1>=r&&this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);const u=n.charCodeAt(o);10===u?(s.line+=1,s.column=0,this.nextLine(),c=!1):(i?M(u)?c||(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!0):(this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),c=!1):a?o===t.start&&(this.rawRangeMappingsIndices.push(this.rawSegments.length),this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column])):this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]),s.column+=1,this.generatedCodeColumn+=1),o+=1}}else{const t=i.bits;for(;o<r;){let i=n.indexOf("\n",o);if((-1===i||i>r)&&(i=r),i>o){this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column]);for(let n=o+1>>5,r=i-1>>5;n<=r;n++){let r=t[n];if(!r)continue;const a=n<<5;for(;r;){const t=r&-r,n=a+31-Math.clz32(t);if(n>o&&n<i){const t=n-o;this.rawSegments.push([this.generatedCodeColumn+t,e,s.line,s.column+t])}r^=t}}s.column+=i-o,this.generatedCodeColumn+=i-o}if(i===r)break;s.line+=1,s.column=0,this.nextLine(),o=i+1}}}advance(e){if(!e)return;const t=e.lastIndexOf("\n");for(let t=e.indexOf("\n");-1!==t;t=e.indexOf("\n",t+1))this.nextLine();this.generatedCodeColumn+=e.length-t-1}};const L="\n",T="\n".charCodeAt(0),B="\r".charCodeAt(0),z={insertLeft:!1,insertRight:!1,storeName:!1};function F(e,t,n,s,i,r){if(!e.includes("$"))return e;let o="",a=0;for(;a<e.length;){const l=e.indexOf("$",a);if(-1===l){o+=e.slice(a);break}o+=e.slice(a,l);const c=e[l+1];let u="$",d=1;if("$"===c)d=2;else if("&"===c)u=t,d=2;else if("`"===c)u=s.slice(0,n),d=2;else if("'"===c)u=s.slice(n+t.length),d=2;else if("<"===c&&void 0!==r){const t=e.indexOf(">",l+2);-1!==t&&(u=r[e.slice(l+2,t)]??"",d=t+1-l)}else if(c>="0"&&c<="9"){const t=e[l+2],n=t>="0"&&t<="9"?Number(c+t):NaN,s=Number(c);n>=1&&n<=i.length?(u=i[n-1]??"",d=3):s>=1&&s<=i.length&&(u=i[s-1]??"",d=2)}o+=u,a=l+d}return o}var V=class e{constructor(e,t={}){const n=new x(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:n},lastChunk:{writable:!0,value:n},lastSearchedChunk:{writable:!0,value:n},byStart:{writable:!0,value:new Map([[0,n]])},byEnd:{writable:!0,value:new Map([[e.length,n]])},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new E},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList},offset:{writable:!0,value:t.offset||0},hasMovedChunks:{writable:!0,value:!1}})}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new v("content must be a string, got "+typeof e);return this.outro+=e,this}appendLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.appendRight(t):this.outro+=t,this}clone(){const t=new e(this.original,{filename:this.filename,ignoreList:this.ignoreList,offset:this.offset});let n=this.firstChunk,s=t.firstChunk=t.lastSearchedChunk=n.clone();for(;n;){t.byStart.set(s.start,s),t.byEnd.set(s.end,s);const e=n.next,i=e&&e.clone();i&&(s.next=i,i.previous=s,s=i),n=e}return t.lastChunk=s,this.indentExclusionRanges&&(t.indentExclusionRanges=this.indentExclusionRanges.slice()),t.sourcemapLocations=new E(this.sourcemapLocations),t.storedNames={...this.storedNames},t.intro=this.intro,t.outro=this.outro,t.hasMovedChunks=this.hasMovedChunks,t}generateDecodedMap(e){const t=new _((e=e||{}).hires),n=this._generateMappings(t);return{...this._mapProperties(e,n),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e){e=e||{};const t=new D,n=new _(e.hires,t),s=this._generateMappings(n);return new P({...this._mapProperties(e,s),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){const t=Object.keys(this.storedNames),n=$(this.original);return this.intro&&e.advance(this.intro),this.firstChunk.eachNext(s=>{const i=n(s.start);s.intro.length&&e.advance(s.intro),s.edited?e.addEdit(0,s.content,i,s.storeName?t.indexOf(s.original):-1):e.addUneditedChunk(0,s,this.original,i,this.sourcemapLocations),s.outro.length&&e.advance(s.outro)}),this.outro&&e.advance(this.outro),t}_mapProperties(e,t){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?w(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,x_google_ignoreList:this.ignoreList?[0]:void 0}}_ensureindentStr(){void 0===this.indentStr&&(this.indentStr=function(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return" ".repeat(i)}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),null===this.indentStr?"\t":this.indentStr}indent(e,t){const n=/^[^\r\n]/gm;if(C(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s=e,i={};(t=t||{}).exclude&&("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach(e=>{for(let t=e[0];t<e[1];t+=1)i[t]=!0});let r=!1!==t.indentStart;const o=e=>{if(""===e)return e;const t=e.replace(n,(e,t)=>t>0||r?`${s}${e}`:e);return r="\n"===e[e.length-1],t};this.intro=o(this.intro);let a=0,l=this.firstChunk;const c=e=>{r=!1,e===l.start?l.appendRight(s):(this._splitChunk(l,e),l=l.next,l.prependRight(s))};for(;l;){const e=l.end;if(i[l.start]||(l.intro=o(l.intro)),l.edited)i[a]||(l.content=o(l.content));else if(t.exclude)for(a=l.start;a<e;){if(!i[a]){const e=this.original.charCodeAt(a);e===T?r=!0:e!==B&&r&&c(a)}a+=1}else for(a=l.start;a<e;){if(!r){const t=this.original.indexOf(L,a);if(-1===t||t>=e)break;r=!0,a=t+1;continue}const t=this.original.charCodeAt(a);t!==T&&t!==B?(c(a),a+=1):a+=1}i[l.end-1]||(l.outro=o(l.outro)),a=l.end,l=l.next}return this.outro=o(this.outro),this}insert(){throw new v("insert() is deprecated, use appendLeft() or prependRight()")}insertLeft(e,t){return z.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),z.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return z.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),z.insertRight=!0),this.prependRight(e,t)}move(e,t,n,s="right"){if(e+=this.offset,t+=this.offset,n+=this.offset,e===t)return this;if(n>=e&&n<=t)throw new v("cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const i=this.byStart.get(e),r=this.byEnd.get(t);if(this.hasMovedChunks){let n=i;for(;n!==r;)if(n=n.next,!n||n.start<e||n.end>t)throw new v(`cannot move ${e} to ${t} because an earlier move split that range`)}const o=i.previous,a=r.next;let l,c;if("left"===s)if(l=this.byEnd.get(n)??null,l){if(l.next===i)return this;c=l.next}else{if(i===this.firstChunk)return this;c=this.firstChunk}else if(c=this.byStart.get(n)??null,c){if(c.previous===r)return this;l=c.previous}else{if(r===this.lastChunk)return this;l=this.lastChunk}return o&&(o.next=a),a&&(a.previous=o),l&&(l.next=i),c&&(c.previous=r),i.previous||(this.firstChunk=r.next),r.next||(this.lastChunk=i.previous,this.lastChunk.next=null),i.previous=l,r.next=c||null,l||(this.firstChunk=i),c||(this.lastChunk=r),this.hasMovedChunks=!0,this}overwrite(e,t,n,s){const i="object"==typeof s&&s?s:{};return this.update(e,t,n,{...i,overwrite:!i.contentOnly})}update(e,t,n,s){if(e+=this.offset,t+=this.offset,"string"!=typeof n)throw new v("content must be a string, got "+typeof n);if(0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e<0)throw new v(`start ${e} is out of bounds`);if(t>this.original.length)throw new v(`end ${t} is out of bounds`);if(e===t)throw new v(`cannot overwrite a zero-length range at ${e}, use appendLeft() or prependRight()`);if(e>t)throw new v(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t),!0===s&&(z.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),z.storeName=!0),s={storeName:!0});const i="object"==typeof s&&s?s:{},r=i.storeName||!1,o=i.overwrite||!1;if(r){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart.get(e),l=this.byEnd.get(t);if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart.get(e.end))throw new v("cannot overwrite across a split point");e=e.next,e.edit("",!1,!o)}a.edit(n,r,!o)}else{const s=new x(e,t,"").edit(n,r);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new v("content must be a string, got "+typeof e);return this.intro=e+this.intro,this}prependLeft(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byEnd.get(e);return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if(e+=this.offset,"string"!=typeof t)throw new v("content must be a string, got "+typeof t);this._split(e);const n=this.byStart.get(e);return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new v(`range ${e}–${t} is out of bounds`);if(e>t)throw new v(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.start>e&&(n.intro=""),n.end<t&&(n.outro=""),n.edit("",!1,!0),n=t>n.end?this.byStart.get(n.end):null;return this}reset(e,t){if(e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length))),e===t)return this;if(e<0||t>this.original.length)throw new v(`range ${e}–${t} is out of bounds`);if(e>t)throw new v(`end must be greater than start (start: ${e}, end: ${t})`);this._split(e),this._split(t);let n=this.byStart.get(e);for(;n;)n.reset(),n=t>n.end?this.byStart.get(n.end):null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;for(;e;){if(e.outro.length)return e.outro[e.outro.length-1];if(e.content.length)return e.content[e.content.length-1];if(e.intro.length)return e.intro[e.intro.length-1];e=e.previous}return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(L);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;for(;n;){if(n.outro.length>0){if(e=n.outro.lastIndexOf(L),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(L),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(L),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}n=n.previous}return e=this.intro.lastIndexOf(L),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length-this.offset){e+=this.offset,t+=this.offset,0!==this.original.length&&(e<0&&(e=Math.max(0,e+this.original.length)),t<0&&(t=Math.max(0,t+this.original.length)));let n="",s=this.firstChunk;for(;s&&(s.start>e||s.end<=e);){if(s.start<t&&s.end>=t||0===t&&0===s.start)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new v(`cannot use edited character ${e} as slice start anchor`);const i=s;for(;s&&(0!==t||0!==s.start);){!s.intro||i===s&&s.start!==e||(n+=s.intro);const r=s.start<t&&s.end>=t;if(r&&s.edited&&s.end!==t)throw new v(`cannot use edited character ${t} as slice end anchor`);const o=i===s?e-s.start:0,a=r?s.content.length+t-s.end:s.content.length;if(n+=s.content.slice(o,a),!s.outro||r&&s.end!==t||(n+=s.outro),r)break;s=s.next}return n}snip(e,t){const n=this.clone();return n.remove(0,e),n.remove(t,n.original.length),n}_split(e){if(this.byStart.get(e)||this.byEnd.get(e))return;let t=this.lastSearchedChunk,n=t;const s=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);if(t=s?this.byStart.get(t.end):this.byEnd.get(t.start),t===n)return;n=t}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=$(this.original)(t);throw new v(`cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd.set(t,e),this.byStart.set(t,n),this.byEnd.set(n.end,n),e===this.lastChunk&&(this.lastChunk=n),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,t=this.firstChunk;for(;t;)e+=t.toString(),t=t.next;return e+this.outro}isEmpty(){if(this.intro.length&&this.intro.trim())return!1;let e=this.firstChunk;for(;e;){if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1;e=e.next}return!this.outro.length||!this.outro.trim()}length(){let e=this.firstChunk,t=0;for(;e;)t+=e.intro.length+e.content.length+e.outro.length,e=e.next;return t}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const t=new RegExp(`${e||"\\s"}+$`);if(this.outro=this.outro.replace(t,""),this.outro.length)return!0;let n=this.lastChunk;do{const e=n.end,s=n.trimEnd(t);if(n.end!==e&&(this.lastChunk===n&&(this.lastChunk=n.next),this.byEnd.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(n.next.end,n.next)),s)return!0;n=n.previous}while(n);return this.intro=this.intro.replace(t,""),this.intro.length>0}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const t=new RegExp(`^${e||"\\s"}+`);if(this.intro=this.intro.replace(t,""),this.intro.length)return!0;let n=this.firstChunk;do{const e=n.end,s=n.trimStart(t);if(n.end!==e&&(n===this.lastChunk&&(this.lastChunk=n.next),this.byEnd.set(n.end,n),this.byStart.set(n.next.start,n.next),this.byEnd.set(n.next.end,n.next)),s)return!0;n=n.next}while(n);return this.outro=this.outro.replace(t,""),this.outro.length>0}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){if(this.intro||this.outro)return!0;let e=0,t=this.firstChunk;for(;t;){if(t.intro||t.outro)return!0;if(t.edited||t.start!==e){if(!this.original.startsWith(t.content,e))return!0;e+=t.content.length}else e=t.end;t=t.next}return e!==this.original.length}_hasRemovedContent(e,t){let n=this.byStart.get(e);if(!n){n=this.lastSearchedChunk;const t=e>=n.end;for(;n&&!n.contains(e);)n=t?this.byStart.get(n.end):this.byEnd.get(n.start);n&&(this.lastSearchedChunk=n)}for(;n&&n.start<t;){if(""===n.content)return!0;n=this.byStart.get(n.end)}return!1}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?F(t,e[0],e.index,n,e.slice(1),e.groups):void 0===e.groups?t(e[0],...e.slice(1),e.index,n):t(e[0],...e.slice(1),e.index,n,e.groups)}const s=e=>{if(null==e.index)return!1;if(this._hasRemovedContent(e.index,e.index+e[0].length))return!1;const t=n(e,this.original);return t===e[0]||(0===e[0].length?this.appendRight(e.index-this.offset,t):this.overwrite(e.index-this.offset,e.index+e[0].length-this.offset,t)),!0};if(e.global){e.lastIndex=0;for(const t of this.original.matchAll(e))s(t)}else{const t=this.original.match(e);if(t&&!s(t)){const t=new RegExp(e.source,`${e.flags}g`);for(const e of this.original.matchAll(t))if(s(e))break}}return this}_replaceString(e,t){const{original:n}=this;let s=n.indexOf(e);for(;-1!==s;){if(!this._hasRemovedContent(s,s+e.length)){e!==(t="function"==typeof t?t(e,s,n):F(t,e,s,n,[],void 0))&&(0===e.length?this.appendRight(s-this.offset,t):this.overwrite(s-this.offset,s+e.length-this.offset,t));break}s=n.indexOf(e,s+e.length)}return this}replace(e,t){return"string"==typeof e?this._replaceString(e,t):this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:n}=this,s=e.length;if(0===s){for(let e=0;e<=n.length;e+=1){if(this._hasRemovedContent(e,e))continue;const s="function"==typeof t?t("",e,n):F(t,"",e,n,[],void 0);""!==s&&this.appendRight(e-this.offset,s)}return this}for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){if(this._hasRemovedContent(i,i+s))continue;const e=n.slice(i,i+s),r="function"==typeof t?t(e,i,n):F(t,e,i,n,[],void 0);e!==r&&this.overwrite(i-this.offset,i+s-this.offset,r)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new v("replaceAll() requires a global RegExp");return this._replaceRegexp(e,t)}};const j=Object.prototype.hasOwnProperty;var U=class e{constructor(e={}){this.intro=e.intro||"",this.separator=void 0!==e.separator?e.separator:"\n",this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof V)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!C(e)||!e.content)throw new v("addSource() requires a `content` property that is a MagicString");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach(t=>{j.call(e,t)||(e[t]=e.content[t])}),void 0===e.separator&&(e.separator=this.separator),e.filename)if(j.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new v(`duplicate filename "${e.filename}" with different content, use unique filenames`)}else this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length,this.uniqueSources.push({filename:e.filename,content:e.content.original});return this.sources.push(e),this}append(e,t){return this.addSource({content:new V(e),separator:t&&t.separator||""}),this}clone(){const t=new e({intro:this.intro,separator:this.separator});return this.sources.forEach(e=>{t.addSource({filename:e.filename,content:e.content.clone(),ignoreList:e.ignoreList,indentExclusionRanges:e.indentExclusionRanges,separator:e.separator})}),t}toMagicString(){const e=new V(this.sources.map(e=>e.content.original).join(""));let t=0,n=this.intro,s=null,i=null;const r=new Map,o=new Map;let a=!1;return this.sources.forEach((l,c)=>{const u=l.content,d=c>0?void 0!==l.separator?l.separator:this.separator:"";if(0===u.original.length)return void(n+=d+u.toString());n+=d+u.intro;let h=null,p=null,f=u.firstChunk;for(;f;){const e=f.clone();e.start+=t,e.end+=t,e.previous=p,e.next=null,p&&(p.next=e),r.set(e.start,e),o.set(e.end,e),h??=e,p=e,f=f.next}const m=p;h.intro=n+h.intro,n="",m.outro+=u.outro,i?(i.next=h,h.previous=i):s=h,i=m;for(let n=0;n<u.original.length;n+=1)u.sourcemapLocations.has(n)&&e.sourcemapLocations.add(n+t);Object.keys(u.storedNames).forEach(t=>{Object.defineProperty(e.storedNames,t,{writable:!0,value:!0,enumerable:!0})}),u.hasMovedChunks&&(a=!0),t+=u.original.length}),s?(n&&(i.outro+=n),e.firstChunk=s,e.lastChunk=i,e.lastSearchedChunk=s,e.byStart=r,e.byEnd=o,e.hasMovedChunks=a,e):(e.intro=n,e)}generateDecodedMap(e={}){const t=new _(e.hires),{names:n,x_google_ignoreList:s}=this._generateMappings(t);return{...this._mapProperties(e,n,s),mappings:t.raw,rangeMappings:t.rawRangeMappings}}generateMap(e={}){const t=new D,n=new _(e.hires,t),{names:s,x_google_ignoreList:i}=this._generateMappings(n);return new P({...this._mapProperties(e,s,i),mappings:t.finish(n.rawSegments),rangeMappings:n.rawRangeMappings})}_generateMappings(e){const t=[];let n;return this.sources.forEach(e=>{Object.keys(e.content.storedNames).forEach(e=>{t.includes(e)||t.push(e)})}),this.intro&&e.advance(this.intro),this.sources.forEach((s,i)=>{i>0&&e.advance(void 0!==s.separator?s.separator:this.separator);const r=s.filename?this.uniqueSourceIndexByFilename[s.filename]:-1,o=s.content,a=$(o.original);o.intro&&e.advance(o.intro),o.firstChunk.eachNext(n=>{const i=a(n.start);n.intro.length&&e.advance(n.intro),s.filename?n.edited?e.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):e.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):e.advance(n.content),n.outro.length&&e.advance(n.outro)}),o.outro&&e.advance(o.outro),s.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))}),{names:t,x_google_ignoreList:n}}_mapProperties(e,t,n){return{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(t=>e.file?w(e.file,t.filename):t.filename),sourcesContent:this.uniqueSources.map(t=>("function"==typeof e.includeContent?e.includeContent(t):e.includeContent)?t.content:null),names:t,x_google_ignoreList:n}}getIndentString(){const e={};return this.sources.forEach(t=>{const n=t.content._getRawIndentString();null!==n&&(e[n]||(e[n]=0),e[n]+=1)}),Object.keys(e).sort((t,n)=>e[n]-e[t])[0]||"\t"}indent(e){if(arguments.length||(e=this.getIndentString()),""===e)return this;let t=!this.intro||"\n"===this.intro.slice(-1);return this.sources.forEach((n,s)=>{const i=void 0!==n.separator?n.separator:this.separator,r=t||s>0&&/\r?\n$/.test(i);n.content.indent(e,{exclude:n.indentExclusionRanges,indentStart:r}),t="\n"===n.content.lastChar()}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(t,n)=>n>0?e+t:t)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return(t>0?n:"")+e.content.toString()}).join("");return this.intro+e}isEmpty(){return!(this.intro.length&&this.intro.trim()||this.sources.some((e,t)=>{const n=void 0!==e.separator?e.separator:this.separator;return t>0&&""!==n.trim()||!e.content.isEmpty()}))}length(){return this.sources.reduce((e,t,n)=>{const s=void 0!==t.separator?t.separator:this.separator;return e+(n>0?s.length:0)+t.content.toString().length},this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const t=new RegExp(`^${e||"\\s"}+`);if(this.intro=this.intro.replace(t,""),!this.intro)for(let n=0;n<this.sources.length;n+=1){const s=this.sources[n];if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))break;if(s.content.trimStartAborted(e))break}return this}trimEnd(e){const t=new RegExp(`${e||"\\s"}+$`);for(let n=this.sources.length-1;n>=0;n-=1){const s=this.sources[n];if(s.content.trimEndAborted(e))return this;if(n>0&&(s.separator=(void 0!==s.separator?s.separator:this.separator).replace(t,""),s.separator))return this}return this.intro=this.intro.replace(t,""),this}};const G=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,H=/^\.?\.\//,W=/\\/g,q=/[/\\]/,K=/^[A-Za-z]:$/,X=/[/\\]+$/;function J(e){return G.test(e)}function Y(e){return H.test(e)}function Z(e){return e.replace(W,"/")}function Q(e){return e.replace(X,"").split(q).pop()||""}function ee(e){const t=e.replace(X,""),n=/[/\\][^/\\]*$/.exec(t);return n?t.slice(0,-n[0].length)||"/":""===t?e?"/":".":e!==t&&K.test(t)?t:"."}function te(e){const t=Q(e);if("."===t||".."===t)return"";const n=t.lastIndexOf(".");return n>0?t.slice(n):""}function ne(e,t){const n=[],s=K.test(e[0])?1:0;for(const i of e)".."===i?n.length>s&&".."!==n[n.length-1]?n.pop():t||0!==s||n.push(".."):"."!==i&&""!==i&&n.push(i);return n}function se(e,t){const n=ne(e.split(q),J(e)),s=ne(t.split(q),J(t));for(;n[0]&&s[0]&&n[0]===s[0];)n.shift(),s.shift();for(;n.pop();)s.unshift("..");return s.join("/")}function ie(...e){let t=[],n=!1;for(const s of e)J(s)?(t=s.split(q),n=!0):t.push(...s.split(q));const s=ne(t,n).join("/");return n?/^[A-Za-z]:/.test(s)?s:"/"+s:s||"/"}function re(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const oe={isNoStatement:!0};function ae(e,t,n=0){let s,i;for(s=e.indexOf(t,n);;){if(-1===(n=e.indexOf("/",n))||n>=s)return s;i=e.charCodeAt(++n),++n,(n=47===i?e.indexOf("\n",n)+1:e.indexOf("*/",n)+2)>s&&(s=e.indexOf(t,n))}}const le=/\S/g;function ce(e,t){return le.lastIndex=t,le.exec(e).index}const ue=/\s/;function de(e,t){return t>0&&13===e.charCodeAt(t-1)?t-1:t}function he(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[de(e,t),t+1];if(n=e.charCodeAt(s+1),47===n)return[s,t+1];s=e.indexOf("*/",s+2)+2,s>t&&(t=e.indexOf("\n",s))}}function pe(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+he(t.original.slice(n,c.start))[1]);for(let n=1;n<=e.length;n++)r=c,o=l,a=u,c=e[n],u=void 0!==c&&(!c.included||c.needsBoundaries),a||u?(l=r.end+he(t.original.slice(r.end,void 0===c?s:c.start))[1],r.included?a?r.render(t,i,{end:l,start:o}):r.render(t,i):re(r,t,o,l)):r.render(t,i)}function fe(e,t,n,s){const i=[];let r,o,a,l,c=n-1;for(const s of e){for(void 0!==r&&(c=r.end+ae(t.original.slice(r.end,s.start),",")),o=a=c+1+he(t.original.slice(c+1,s.start))[1];l=t.original.charCodeAt(o),32===l||9===l||10===l||13===l;)o++;void 0!==r&&i.push({contentEnd:a,end:o,node:r,separator:c,start:n}),r=s,n=o}return i.push({contentEnd:s,end:s,node:r,separator:null,start:n}),i}function me(e,t,n){for(;;){const[s,i]=he(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function ge(e,{exportNamesByVariable:t,snippets:{_:n,getObject:s,getPropertyAccess:i}},r=""){if(1===e.length&&1===t.get(e[0]).length){const s=e[0];return`exports(${JSON.stringify(t.get(s)[0])},${n}${s.getName(i)}${r})`}{const n=[];for(const s of e)for(const e of t.get(s))n.push([e,s.getName(i)+r]);return`exports(${s(n,{lineBreakIndent:null})})`}}function ye(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function be(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${ge([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}const Ee=Object.freeze(Object.create(null)),xe=Object.freeze({}),ve=Object.freeze([]),Ae=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function Se(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function Pe(){return new Set}function $e(){return[]}const we=Symbol("Unknown Key"),Ie=Symbol("Unknown Non-Accessor Key"),Ce=Symbol("Unknown Integer"),ke=Symbol("Unknown Well-Known"),Ne=Symbol("Symbol.toStringTag"),Oe=Symbol("Symbol.asyncDispose"),Re=Symbol("Symbol.dispose"),De=Symbol("Symbol.hasInstance"),Me=new Set([Ne,Oe,Re,De]),_e=e=>Me.has(e)||e===ke,Le=new Set([De,Oe,Re]),Te=e=>"string"==typeof e||Me.has(e),Be=[],ze=[we],Fe=[Ie],Ve=[Ce],je=[De],Ue=Symbol("Entities");class Ge{constructor(){this.entityPaths=Object.create(null,{[Ue]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const n=this.getEntities(e);return!!n.has(t)||(n.add(t),!1)}withTrackedEntityAtPath(e,t,n,s){const i=this.getEntities(e);if(i.has(t))return s;i.add(t);const r=n();return i.delete(t),r}getEntities(e){let t=this.entityPaths;for(const n of e)t=t[n]||=Object.create(null,{[Ue]:{value:new Set}});return t[Ue]}}const He=new Ge;class We{constructor(){this.entityPaths=Object.create(null,{[Ue]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]||=Object.create(null,{[Ue]:{value:new Map}});const i=Se(s[Ue],t,Pe);return!!i.has(n)||(i.add(n),!1)}}const qe=Object.freeze({[we]:xe});class Ke{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0,n=this,s="includedPaths",i=this.includedPaths||=(t=!1,Object.create(null));for(const r of e){if(i[we])return!0;if(!Te(r))return n[s]=qe,!1;n=i,s=r,i=i[r]||=(t=!1,Object.create(null))}return t}}const Xe=Object.freeze({[we]:!0});class Je{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let t=!0;const n=this.includedPaths||=(t=!1,Object.create(null));if(n[we])return!0;const[s,i]=e;return s?Te(s)?i?n[s]===we||(n[s]=we,!1):!!n[s]||(n[s]=!0,!1):(this.includedPaths=Xe,!1):t}includeAllPaths(e,t,n){const{includedPaths:s}=this;if(s)if(s[we])e.includePath([...n,we],t);else{const i=Object.entries(s);if(0===i.length)e.includePath(n,t);else for(const[s,r]of i)e.includePath(r===we?[...n,s,we]:[...n,s],t)}}}function Ye(e,t){return 0!==(e&t)}function Ze(e,t,n){return e&~t|-n&t}const Qe=Symbol("Unknown Value"),et=Symbol("Unknown Truthy Value"),tt=Symbol("Unknown Falsy Value");class nt{constructor(){this.flags=0}get included(){return Ye(this.flags,1)}set included(e){this.flags=Ze(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){rt(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Qe}getReturnExpressionWhenCalledAtPath(e,t,n,s){return it}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,t){this.included||this.includeNode(t)}includeCallArgumentsWhenCalledAtPath(e,t,n){ot(t,n)}shouldBeIncluded(e){return!0}}const st=new class extends nt{},it=[st,!1],rt=e=>{for(const t of e.args)t?.deoptimizePath(ze)},ot=(e,t)=>{e.args[0]?.includePath(ze,t),at(e,t)},at=({args:e},t)=>{for(let n=1;n<e.length;n++){const s=e[n];s&&(s.includePath(ze,t),s.include(t,!1))}},lt={args:[null],type:0},ct={args:[null,st],type:1},ut={args:[null],type:2,withNew:!1},dt=new Set(["await","break","case","catch","class","const","continue","debugger","default","delete","do","else","enum","eval","export","extends","false","finally","for","function","if","implements","import","in","instanceof","interface","let","NaN","new","null","package","private","protected","public","return","static","super","switch","this","throw","true","try","typeof","undefined","var","void","while","with","yield"]);function ht(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function pt(e,t,n){let s=e,i=1;for(;t.has(s)||dt.has(s)||n?.has(s);)s=`${e}$${ht(i++)}`;return t.add(s),s}function ft(e,t){return e.start<=t&&t<e.end}function mt(e,t,n){return function(e,t={}){const{offsetLine:n=0,offsetColumn:s=0}=t;let i=0;const r=e.split("\n").map((e,t)=>{const n=i+e.length+1,s={start:i,end:n,line:t};return i=n,s});let o=0;return function(t,i){if("string"==typeof t&&(t=e.indexOf(t,i??0)),-1===t)return;let a=r[o];const l=t>=a.end?1:-1;for(;a;){if(ft(a,t))return{line:n+a.line,column:s+t-a.start,character:t};o+=l,a=r[o]}}}(e,n)(t,n&&n.startIndex)}function gt(e){return e.replace(/^\t+/,e=>e.split("\t").join(" "))}const yt="...";function bt(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(gt(s[t-1].slice(0,n)).length+10+3,120),r=Math.max(0,t-3);let o=Math.min(t+2,s.length);for(s=s.slice(r,o);!/\S/.test(s[s.length-1]);)s.pop(),o-=1;const a=String(o).length;return s.map((e,s)=>{const o=r+s+1===t;let l=String(s+r+1);for(;l.length<a;)l=` ${l}`;let c=gt(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${yt}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+gt(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`}).join("\n")}const Et="silent",xt="warn",vt="info",At="debug",St={[At]:0,[vt]:1,[Et]:3,[xt]:2};function Pt(e,t){const n=e.length<=1,s=e.map(e=>`"${e}"`);let i=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return t&&(i+=` ${n?t[0]:t[1]}`),i}function $t(e){const t=Q(e);return t.slice(0,Math.max(0,t.length-te(e).length))}function wt(e){return J(e)?se(ie(),e):e}function It(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||J(e)}const Ct=/^(\.\.\/)*\.\.$/;function kt(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=Z(se(ee(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+Q(t);if(Ct.test(i))return[...i.split("/"),"..",Q(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function Nt(e){return`https://rollupjs.org/${e}`}const Ot="troubleshooting/#error-name-is-not-exported-by-module",Rt="configuration-options/#jsx",Dt="configuration-options/#output-amd-id",Mt="configuration-options/#output-dir",_t="configuration-options/#output-exports",Lt="configuration-options/#output-format",Tt="configuration-options/#output-globals",Bt="configuration-options/#output-inlinedynamicimports",zt="configuration-options/#output-interop",Ft="configuration-options/#output-manualchunks",Vt="configuration-options/#output-name",jt="configuration-options/#output-sourcemapfile",Ut="es-module-syntax/#source-phase-import",Gt="plugin-development/#generatebundle";function Ht(e){throw e instanceof Error?e:Wt(e)}function Wt(e){Xt(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function qt(e,t,n,s){if("object"==typeof t){const{line:n,column:i}=t;e.loc={column:i,file:s,line:n}}else{e.pos=t;const i=mt(n,t,{offsetLine:1});if(!i)return;const{line:r,column:o}=i;e.loc={column:o,file:s,line:r}}if(void 0===e.frame){const{line:t,column:s}=e.loc;e.frame=bt(n,t,s)}}const Kt=Symbol("augmented");function Xt(e){if(!e.plugin&&!e.loc||e[Kt])return;e[Kt]=!0;let t="";e.plugin&&(t+=`[plugin ${e.plugin}] `);const n=e.id||e.loc?.file;if(n){const s=e.loc?` (${e.loc.line}:${e.loc.column})`:"";t+=`${wt(n)}${s}: `}const s=e.message;e.message=t+e.message,vn(e,s)}const Jt="CANNOT_SERIALIZE_AST",Yt="INVALID_EXPORT_OPTION",Zt="INVALID_IMPORT_ATTRIBUTE",Qt="INVALID_PLUGIN_HOOK",en="MISSING_EXPORT",tn="MISSING_IMPLICIT_DEPENDANT",nn="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",sn="PARSE_ERROR",rn="SOURCEMAP_BROKEN",on="UNEXPECTED_NAMED_IMPORT",an="UNRESOLVED_ENTRY",ln="UNRESOLVED_IMPORT";function cn(e){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${e}" - no asset source set.`}}function un(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function dn(e,t,n){return{code:Jt,message:`Could not serialize AST: Found unknown node type "${e}" ${t?`in ${t}.${n}`:"at the root"}.`}}function hn({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return qt(i,n,t,e),i}function pn(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(wt).join(" -> ")}`}}function fn(e,t,n,s,i){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:t,id:s,message:`Export "${e}" of module "${wt(t)}" was reexported through module "${wt(n)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order.\nEither change the import in "${wt(s)}" to point directly to the exporting module or ${i?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function mn(e){return{code:"EMPTY_MANUAL_CHUNK",message:`Manual chunk "${e}" was not generated as none of its modules are included in the bundle.`,names:[e],url:Nt(Ft)}}function gn(e){return{code:"FILE_NAME_OUTSIDE_OUTPUT_DIRECTORY",message:`The output file name "${e}" is not contained in the output directory. Make sure all file names are relative paths without ".." segments.`}}function yn(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${wt(t)} is at (${n}:${s})\n${bt(e,n,s)}`}}function bn(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${wt(t)}".`}}function En(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${wt(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Nt("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function xn(e,t){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${t}" hook used by the output plugin ${e} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function vn(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function An(e,t,n){return{code:Yt,message:`"${e}" was specified for "output.exports", but entry module "${wt(n)}" has the following exports: ${Pt(t)}`,url:Nt(_t)}}function Sn(e){return{code:Zt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${wt(e)}". Import attributes need to have string keys and values.`}}function Pn(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Nt(t)}}function $n(e,t){return{binding:e,code:en,exporter:t,message:`Exported variable "${e}" is not defined in "${wt(t)}".`,url:Nt(Ot)}}function wn(e,t,n,s){const i={binding:e,code:en,exporter:n,id:t,url:Nt(Ot)};if(s)return{...i,message:`Exported variable "${e}" is not defined in "${wt(n)}", but it is imported by "${wt(t)}".`};const r=".json"===te(n);return{...i,message:`"${e}" is not exported by "${wt(n)}", imported by "${wt(t)}".${r?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function In(e){const t=[...e.implicitlyLoadedBefore].map(e=>wt(e.id)).sort();return{code:tn,message:`Module "${wt(e.id)}" that should be implicitly loaded before ${Pt(t)} is not included in the module graph. Either it was not imported by an included module or only via a tree-shaken dynamic import, or no imported bindings were used and it had otherwise no side-effects.`}}function Cn(e,t){return{code:"NON_EXTERNAL_SOURCE_PHASE_IMPORT",message:`Source phase import "${e}" in "${wt(t)}" must be external. Source phase imports are only supported for external modules. Use the "external" option to mark this module as external.`,url:Nt(Ut)}}function kn(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Nn(e,t){return{code:sn,message:e,pos:t}}function On(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function Rn(e){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${e}"`}}function Dn(e,t){let n=e.message.replace(/ \(\d+:\d+\)$/,"");return t.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":t.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),vn({cause:e,code:sn,id:t,message:n,stack:e.stack},e.message)}function Mn(e,t,{hook:n,id:s}={}){const i=e.code;return e.pluginCode||null==i||"string"==typeof i&&i.startsWith("PLUGIN_")||(e.pluginCode=i),e.code="PLUGIN_ERROR",e.plugin=t,n&&(e.hook=n),s&&(e.id=s),e}function _n(e){return{code:rn,message:`Multiple conflicting contents for sourcemap source ${e}`}}function Ln(e,t,n){const s=n?"reexport":"import";return{code:on,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${wt(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Nt(zt)}}function Tn(e){return{code:on,exporter:e,message:`There was a namespace "*" reexport from the external module "${wt(e)}" even though its interop type is "defaultOnly". This will be ignored as namespace reexports only reexport named exports. If this is not intended, either remove or change this reexport or change the value of the "output.interop" option.`,url:Nt(zt)}}function Bn(e){return{code:"VALIDATION_ERROR",message:e}}function zn(e,t,n,s,i){!function(e,t,n,s,i,r){if(n||i){const n=function(e,t,n){return{code:"DEPRECATED_FEATURE",message:e,url:Nt(t),...n?{plugin:n}:{}}}(e,t,r);if(i)return Ht(n);s(xt,n)}}(e,t,n,s.onLog,s.strictDeprecations,i)}const Fn="ArrowFunctionExpression",Vn="BlockStatement",jn="CallExpression",Un="ExportDefaultDeclaration",Gn="ExpressionStatement",Hn="FunctionExpression",Wn="Identifier",qn="MemberExpression",Kn="PanicError",Xn="ParseError",Jn="Program",Yn="Property",Zn="StaticBlock",Qn={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]};function es(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function ts(){return{accessed:new Ge,assigned:new Ge,brokenFlow:!1,called:new We,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new We,replacedVariableInits:new Map}}const ns="variables",ss=Symbol("IS_SKIPPED_CHAIN");class is extends nt{get deoptimized(){return Ye(this.flags,2)}set deoptimized(e){this.flags=Ze(this.flags,2,e)}constructor(e,t){super(),this.parent=e,this.scope=t,this.createScope(t)}addExportedVariables(e,t){}bind(){for(const e of Qn[this.type]){const t=this[e];if(Array.isArray(t))for(const e of t)e?.bind();else t&&t.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of Qn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n)){for(const t of n)if(t?.hasEffects(e))return!0}else if(n.hasEffects(e))return!0}return!1}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(Be,this.assignmentInteraction,e)}include(e,t,n){this.included||this.includeNode(e);for(const n of Qn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.include(e,t);else s.include(e,t)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of Qn[this.type]){const n=this[t];if(null!==n)if(Array.isArray(n))for(const t of n)t?.includePath(ze,e);else n.includePath(ze,e)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of Qn[this.type]){const s=this[n];if(null!==s)if(Array.isArray(s))for(const n of s)n?.render(e,t);else s.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(ts())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Qn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(ze);else t.deoptimizePath(ze)}this.scope.context.requestTreeshakingPass()}}function rs(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function os(){this.included=!0}function as(){this.deoptimized=!0}function ls(e){return e instanceof is&&e.type===Fn}function cs(e){return e instanceof is&&e.type===Hn}function us(e){return e instanceof is&&e.type===Wn}const ds=(e,t)=>{const{length:n}=e,{length:s}=t;return 0===n?t:0===s?e:n+s>6?[...e,...t.slice(0,5-e.length),"UnknownKey"]:[...e,...t]};class hs extends nt{markReassigned(){this.isReassigned=!0}markTargetOfAssignment(){this.isTargetOfAssignment=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.isTargetOfAssignment=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===jn&&e.parent.callee===e||e.parent.type===Un||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,t){if(this.globalName)return this.globalName;if(t?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,t);const n=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(n)}`:n}hasEffectsOnInteractionAtPath(e,{type:t},n){return 0!==t||e.length>0}includePath(e,t){this.included=!0,this.renderedLikeHoisted?.includePath(e,t)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}addReassignedValue(e){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class ps extends hs{constructor(e,t,n,s,i,r){super(e),this.init=n,this.initPath=s,this.kind=r,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.assignedFunctions=null,this.includedPathTracker=new Ke,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=i.deoptimizationTracker,this.module=i.module}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers)for(const e of this.additionalInitializers)e.deoptimizePath(ze)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned||t.length+this.initPath.length>6?rt(e):n.withTrackedEntityAtPath(t,this.init,()=>{this.init.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],n)},void 0)}deoptimizePath(e){if(!this.isReassigned&&!this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))if(0===e.length){this.markReassigned();const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=ve;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath([...this.initPath,we])}else this.init.deoptimizePath(ds(this.initPath,e))}getLiteralValueAtPath(e,t,n){return this.isReassigned||e.length+this.initPath.length>6?Qe:t.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath([...this.initPath,...e],t,n)),Qe)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned||e.length+this.initPath.length>6?it:n.withTrackedEntityAtPath(e,this.init,()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath([...this.initPath,...e],t,n,s)),it)}hasEffectsOnInteractionAtPath(e,t,n){if(e.length+this.initPath.length>6)return!0;switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}}includePath(e,t){if(!this.includedPathTracker.includePathAndGetIfIncluded(e)){this.module.scope.context.requestTreeshakingPass(),this.included||this.module.scope.context.newlyIncludedVariableInits.add(this.init),super.includePath(e,t);for(const e of this.declarations){e.included||e.include(t,!1);let n=e.parent;for(;!n.included&&(n.includeNode(t),n.type!==Jn);)n=n.parent}e.length>0&&(this.init.includePath(ds(this.initPath,e),t),this.additionalInitializers?.forEach(e=>e.includePath(ze,t)))}}includeCallArgumentsWhenCalledAtPath(e,t,n){if(this.isReassigned)return ot(t,n),void(0===e.length&&this.includeCallArgumentsOfAssignedTryCatchHelpers(t,n));n.includedCallArguments.has(this.init)||e.length+this.initPath.length>6?ot(t,n):(n.includedCallArguments.add(this.init),this.init.includeCallArgumentsWhenCalledAtPath([...this.initPath,...e],t,n),n.includedCallArguments.delete(this.init))}includeCallArgumentsOfAssignedTryCatchHelpers(e,t){0===this.initPath.length&&this.includeCallArgumentsOfTryCatchHelper(this.init,e,t);for(const n of this.assignedFunctions??ve)this.includeCallArgumentsOfTryCatchHelper(n,e,t)}includeCallArgumentsOfTryCatchHelper(e,t,n){(ls(e)||cs(e))&&e.scope.hasParameterCalledFromTryStatement()&&e.scope.includeCallArguments(t,n)}addReassignedValue(e){(ls(e)||cs(e))&&(this.assignedFunctions??=[]).push(e)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=st,this.markReassigned()),this.additionalInitializers}}class fs{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){if("var"===i&&"var"===o.kind)return o.addDeclaration(e,n),o;t.error(On(r),e.start)}const a=new ps(e.name,e,n,s,t,i);return this.variables.set(r,a),a}addHoistedVariable(e,t){(this.hoistedVariables||=new Map).set(e,t)}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class ms extends fs{constructor(e,t){super(),this.parent=e,this.context=t,this.accessedOutsideVariables=new Map,e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e),this.parent instanceof ms&&this.parent.addAccessedDynamicImport(e)}addAccessedGlobals(e,t){const n=t.get(this)||new Set;for(const t of e)n.add(t);t.set(this,n),this.parent instanceof ms&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof ms&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,n,s){for(const s of this.accessedOutsideVariables.values())s.included&&(e.add(s.getBaseVariableName()),"system"===t&&n.has(s)&&e.add("exports"));const i=s.get(this);if(i)for(const t of i)e.add(t)}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,n){const s=new Set;if(this.addUsedOutsideNames(s,e,t,n),this.accessedDynamicImports)for(const e of this.accessedDynamicImports)e.inlineNamespace&&s.add(e.inlineNamespace.getBaseVariableName());for(const[e,t]of this.variables)(t.included||t.alwaysRendered)&&t.setRenderNames(null,pt(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findGlobal(e){const t=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,t),t}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.parent.findVariable(e);return this.accessedOutsideVariables.set(e,n),n}}function gs(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}function ys(e,t){if("MemberExpression"===e.type)return!e.computed&&ys(e.object,e);if("Identifier"!==e.type)return!1;switch(t?.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"MetaProperty":return t.meta===e;case"PropertyDefinition":case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}const bs=Symbol("PureFunction"),Es="*source";class xs extends hs{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t,this.isSourcePhase=t===Es}addReference(e){this.referenced=!0,"default"!==this.name&&"*"!==this.name||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>(this.isNamespace?1:0)}includePath(e,t){super.includePath(e,t),this.module.used=!0}}function vs(e,t){for(const n of t){const t=Object.getOwnPropertyDescriptor(e,n).get;Object.defineProperty(e,n,{get(){const s=t.call(e);return Object.defineProperty(e,n,{value:s}),s}})}}const As=/[^\w$]/g,Ss=/[^\w$]/,Ps=e=>(e=>/\d/.test(e[0]))(e)||dt.has(e)||"arguments"===e;function $s(e){return e=e.replace(/-(\w)/g,(e,t)=>t.toUpperCase()).replace(As,"_"),Ps(e)&&(e=`_${e}`),e||"_"}const ws=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Is=/^(?:0|[1-9]\d*)$/;function Cs(e){return ws.test(e)?"__proto__"===e?'["__proto__"]':e:Is.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function ks(e){return ws.test(e)?e:JSON.stringify(e)}class Ns{constructor(e,t,n,s,i,r,o){this.options=e,this.id=t,this.rawId=n,this.renormalizeRenderPath=r,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.importersByExportedName=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map;const a=new URLSearchParams(o);a.sort();const l=a.toString(),c=l?`?${l}`:"";this.suggestedVariableName=$s(`${n.split(/[/\\]/).pop()}${c}`);const{importers:u,dynamicImporters:d}=this;this.info={ast:null,attributes:o,code:null,dynamicallyImportedIdResolutions:ve,dynamicallyImportedIds:ve,get dynamicImporters(){return d.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:ve,implicitlyLoadedBefore:ve,importedIdResolutions:ve,importedIds:ve,get importers(){return u.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:i,moduleSideEffects:s,rawId:n,safeVariableNames:null,syntheticNamedExports:!1}}cacheInfoGetters(){vs(this.info,["dynamicImporters","importers"])}getVariableForExportName(e,{importChain:t}){const n=this.declarations.get(e);for(const n of t)Se(this.importersByExportedName,e,Pe).add(n);if(n)return[n];const s=new xs(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t),t>this.mostCommonSuggestion&&(this.mostCommonSuggestion=t,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter(([e,t])=>"*"!==e&&!t.included&&!this.reexported&&!t.referenced).map(([e])=>e);if(0===e.length)return;const t=new Set;for(const n of e){const e=this.importersByExportedName.get(n);for(const n of this.importers)e?.has(n)&&t.add(n)}const n=[...t];var s,i,r;this.options.onLog(xt,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${Pt(i=e,["is","are"])} imported from external module "${s}" but never used in ${Pt(r.map(e=>wt(e)))}.`,names:i})}}function Os(e){e.isExecuted=!0;const t=[e],n=new Set;for(const e of t)for(const s of[...e.dependencies,...e.implicitlyLoadedBefore])s instanceof Ns||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Rs=()=>{};function Ds(e,t=null){return Object.create(t,e)}const Ms=new class extends nt{getLiteralValueAtPath(e){return e.length>0?Qe:void 0}},_s={value:{hasEffectsWhenCalled:null,returns:st}},Ls=new class extends nt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xs(Gs,e[0]):it}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ks(Gs,e[0],t,n)}},Ts={value:{hasEffectsWhenCalled:null,returns:Ls}},Bs=new class extends nt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xs(Hs,e[0]):it}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ks(Hs,e[0],t,n)}},zs={value:{hasEffectsWhenCalled:null,returns:Bs}},Fs=new class extends nt{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Xs(qs,e[0]):it}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ks(qs,e[0],t,n)}},Vs={value:{hasEffectsWhenCalled:null,returns:Fs}},js={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(Be,He,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(Be,ut,t)},returns:Fs}},Us=Ds({hasOwnProperty:Ts,isPrototypeOf:Ts,propertyIsEnumerable:Ts,toLocaleString:Vs,toString:Vs,valueOf:_s}),Gs=Ds({valueOf:Ts},Us),Hs=Ds({toExponential:Vs,toFixed:Vs,toLocaleString:Vs,toPrecision:Vs,valueOf:zs},Us),Ws=Ds({exec:_s,test:Ts},Us),qs=Ds({anchor:Vs,at:_s,big:Vs,blink:Vs,bold:Vs,charAt:Vs,charCodeAt:zs,codePointAt:_s,concat:Vs,endsWith:Ts,fixed:Vs,fontcolor:Vs,fontsize:Vs,includes:Ts,indexOf:zs,italics:Vs,lastIndexOf:zs,link:Vs,localeCompare:zs,match:_s,matchAll:_s,normalize:Vs,padEnd:Vs,padStart:Vs,repeat:Vs,replace:js,replaceAll:js,search:zs,slice:Vs,small:Vs,split:_s,startsWith:Ts,strike:Vs,sub:Vs,substr:Vs,substring:Vs,sup:Vs,toLocaleLowerCase:Vs,toLocaleUpperCase:Vs,toLowerCase:Vs,toString:Vs,toUpperCase:Vs,trim:Vs,trimEnd:Vs,trimLeft:Vs,trimRight:Vs,trimStart:Vs,valueOf:Vs},Us);function Ks(e,t,n,s){return"string"!=typeof t||!e[t]||e[t].hasEffectsWhenCalled?.(n,s)||!1}function Xs(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:it}class Js extends nt{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(Ve),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(ze)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?it:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||st:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,{args:t,type:n},s){if(e.length>(0===n?1:0))return!0;if(2===n){if(!0===this.description.mutatesSelfAsArray&&t[0]?.hasEffectsOnInteractionAtPath(Ve,ct,s))return!0;if(this.description.callsArgs)for(const e of this.description.callsArgs)if(t[e+1]?.hasEffectsOnInteractionAtPath(Be,ut,s))return!0}return!1}}const Ys=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Ls})],Zs=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Fs})],Qs=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Bs})],ei=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:st})],ti=/^\d+$/;class ni extends nt{get hasLostTrack(){return Ye(this.flags,2048)}set hasLostTrack(e){this.flags=Ze(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return Ye(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=Ze(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return Ye(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=Ze(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.alwaysIncludedProperties=new Set,this.deoptimizedPaths=new Map,this.expressionsToBeDeoptimizedByKey=new Map,this.gettersByKey=new Map,this.propertiesAndGettersByKey=new Map,this.propertiesAndSettersByKey=new Map,this.settersByKey=new Map,this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchablePropertiesAndSetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of e.values())this.allProperties.push(...t)}}deoptimizeAllProperties(e){const t=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e?this.hasUnknownDeoptimizedProperty=!0:this.hasLostTrack=!0,!t){for(const e of[...this.propertiesAndGettersByKey.values(),...this.settersByKey.values()])for(const t of e)t.deoptimizePath(ze);this.prototypeExpression?.deoptimizePath([we,we]),this.deoptimizeCachedEntities()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const[s,...i]=t,{args:r,type:o}=e;if(this.hasLostTrack||(2===o||t.length>1)&&(this.hasUnknownDeoptimizedProperty||Te(s)&&this.deoptimizedPaths.get(s)))return void rt(e);const[a,l,c]=2===o||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:0===o?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(Te(s)){if(a.get(s)){const t=l.get(s);if(t)for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);return}for(const t of c)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n);if("string"==typeof s&&ti.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...l.values(),c])for(const s of t)s.deoptimizeArgumentsOnInteractionAtPath(e,i,n);for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}if(!this.immutable)for(const e of r)e&&this.additionalExpressionsToBeDeoptimized.add(e);this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeIntegerProperties(){if(!(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger)){this.hasUnknownDeoptimizedInteger=!0;for(const[e,t]of this.propertiesAndGettersByKey.entries())if("string"==typeof e&&ti.test(e))for(const e of t)e.deoptimizePath(ze);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===Ce)return this.deoptimizeIntegerProperties();if(!Te(t))return this.deoptimizeAllProperties(t===Ie);if(!this.deoptimizedPaths.get(t)){this.deoptimizedPaths.set(t,!0);const e=this.expressionsToBeDeoptimizedByKey.get(t);if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?ze:e.slice(1);for(const e of Te(t)?[...this.propertiesAndGettersByKey.get(t)||this.unmatchablePropertiesAndGetters,...this.settersByKey.get(t)||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[e[0],we]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Qe;const s=e[0],i=this.getMemberExpressionAndTrackDeopt(s,n);return i?i.getLiteralValueAtPath(e.slice(1),t,n):this.prototypeExpression?this.prototypeExpression.getLiteralValueAtPath(e,t,n):1!==e.length?Qe:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return it;const[i,...r]=e,o=this.getMemberExpressionAndTrackDeopt(i,s);return o?o.getReturnExpressionWhenCalledAtPath(r,t,n,s):this.prototypeExpression?this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,n,s):it}hasEffectsOnInteractionAtPath(e,t,n){const[s,...i]=e;if(i.length>0||2===t.type){const r=this.getMemberExpression(s);return r?r.hasEffectsOnInteractionAtPath(i,t,n):!this.prototypeExpression||this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}if(s===Ie)return!1;if(this.hasLostTrack)return!0;const[r,o,a]=0===t.type?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(Te(s)){if(r.get(s)){const e=o.get(s);if(e)for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!1}for(const e of a)if(e.hasEffectsOnInteractionAtPath(i,t,n))return!0}else for(const e of[...o.values(),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;for(const n of this.allProperties)(t||n.shouldBeIncluded(e)||this.alwaysIncludedProperties.has(n))&&n.include(e,t);this.prototypeExpression?.include(e,t)}includePath(e,t){this.included=!0;for(const e of this.alwaysIncludedProperties)e.includePath(ze,t);if(0===e.length)return;const[n,...s]=e,[i,r]=Te(n)?[new Set([...this.propertiesAndGettersByKey.get(n)||this.unmatchablePropertiesAndGetters,...this.propertiesAndSettersByKey.get(n)||this.unmatchablePropertiesAndSetters]),s]:[this.allProperties,ze];for(const e of i)e.includePath(r,t);this.prototypeExpression?.includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,...i]=e;if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Te(s)||this.deoptimizedPaths.get(s)||"string"==typeof s&&ti.test(s)&&this.hasUnknownDeoptimizedInteger)return void ot(t,n);const r=this.propertiesAndGettersByKey.get(s);if(void 0===r)this.unmatchablePropertiesAndGetters.length>0||"string"==typeof s&&ti.test(s)&&this.unknownIntegerProps.length>0||!this.prototypeExpression?ot(t,n):this.prototypeExpression.includeCallArgumentsWhenCalledAtPath(e,t,n);else{t.args[0]?.includePath(ze,n);for(const e of r)e.includeCallArgumentsWhenCalledAtPath(i,t,n)}}buildPropertyMaps(e){const{allProperties:t,alwaysIncludedProperties:n,propertiesAndGettersByKey:s,propertiesAndSettersByKey:i,settersByKey:r,gettersByKey:o,unknownIntegerProps:a,unmatchablePropertiesAndGetters:l,unmatchablePropertiesAndSetters:c,unmatchableGetters:u,unmatchableSetters:d}=this;for(let h=e.length-1;h>=0;h--){const{key:p,kind:f,property:m}=e[h];if(t.push(m),!_e(p)||Le.has(p)||(n.add(m),p!==ke))if(Te(p))"set"===f?i.has(p)||(i.set(p,[m,...c]),r.set(p,[m,...d])):"get"===f?s.has(p)||(s.set(p,[m,...l]),o.set(p,[m,...u])):(i.has(p)||i.set(p,[m,...c]),s.has(p)||s.set(p,[m,...l]));else{if(p===Ce){a.push(m);continue}"set"===f&&d.push(m),"get"===f&&u.push(m),"get"!==f&&c.push(m),"set"!==f&&l.push(m)}}}deoptimizeCachedEntities(){for(const e of this.expressionsToBeDeoptimizedByKey.values())for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ze)}deoptimizeCachedIntegerEntities(){for(const[e,t]of this.expressionsToBeDeoptimizedByKey.entries())if("string"==typeof e&&ti.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Ve)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||!Te(e)||this.hasUnknownDeoptimizedInteger&&"string"==typeof e&&ti.test(e)||this.deoptimizedPaths.get(e))return st;const t=this.propertiesAndGettersByKey.get(e);return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&"string"==typeof e&&ti.test(e)?st:null}getMemberExpressionAndTrackDeopt(e,t){if(!Te(e))return st;const n=this.getMemberExpression(e);if(n!==st&&!this.immutable){let n=this.expressionsToBeDeoptimizedByKey.get(e);n||this.expressionsToBeDeoptimizedByKey.set(e,n=[]),n.push(t)}return n}}const si=e=>"string"==typeof e&&/^\d+$/.test(e),ii=new class extends nt{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||si(t[0])||rt(e)}getLiteralValueAtPath(e){return 1===e.length&&si(e[0])?void 0:Qe}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ri=new ni(new Map([["hasOwnProperty",Ys],["isPrototypeOf",Ys],["propertyIsEnumerable",Ys],["toLocaleString",Zs],["toString",Zs],["valueOf",ei]]),ii,!0),oi=[{key:Ce,kind:"init",property:st},{key:"length",kind:"init",property:Bs}],ai=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ls})],li=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Bs})],ci=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new ni(oi,bi),returnsPrimitive:null})],ui=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ni(oi,bi),returnsPrimitive:null})],di=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new ni(oi,bi),returnsPrimitive:null})],hi=[new Js({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Bs})],pi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:st})],fi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:st})],mi=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:st})],gi=[new Js({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],yi=[new Js({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],bi=new ni(new Map([["at",fi],["concat",ui],["copyWithin",gi],["entries",ui],["every",ai],["fill",gi],["filter",di],["find",mi],["findIndex",li],["findLast",mi],["findLastIndex",li],["flat",ui],["flatMap",di],["forEach",mi],["includes",Ys],["indexOf",Qs],["join",Zs],["keys",ei],["lastIndexOf",Qs],["map",di],["pop",pi],["push",hi],["reduce",mi],["reduceRight",mi],["reverse",gi],["shift",pi],["slice",ui],["some",ai],["sort",yi],["splice",ci],["toLocaleString",Zs],["toString",Zs],["unshift",hi],["values",fi]]),ri,!0);class Ei extends is{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,ze,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return this.argument.hasEffects(e)||t&&("always"===t||this.argument.hasEffectsOnInteractionAtPath(ze,lt,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(ze,e)}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([we,we]),this.scope.context.requestTreeshakingPass()}}class xi extends is{constructor(){super(...arguments),this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.elements)t&&t?.includePath(ze,e)}applyDeoptimizations(){this.deoptimized=!0;let e=!1;for(let t=0;t<this.elements.length;t++){const n=this.elements[t];n&&(e||n instanceof Ei)&&(e=!0,n.deoptimizePath(ze))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:Bs}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Ei?s&&(t=!0,e.unshift({key:Ce,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:Ms})}return this.objectEntity=new ni(e,bi)}}const vi=Symbol("Value Properties"),Ai=()=>Qe,Si=()=>!1,Pi=()=>!0,$i=e=>({__proto__:null,[vi]:{deoptimizeArgumentsOnCall:Rs,getLiteralValue:()=>e,hasEffectsWhenCalled:Pi}}),wi={deoptimizeArgumentsOnCall:Rs,getLiteralValue:Ai,hasEffectsWhenCalled:Si},Ii={deoptimizeArgumentsOnCall:Rs,getLiteralValue:Ai,hasEffectsWhenCalled:Pi},Ci={deoptimizeArgumentsOnCall:Rs,getLiteralValue:Ai,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof xi)},ki={deoptimizeArgumentsOnCall:Rs,getLiteralValue:Ai,hasEffectsWhenCalled({args:e}){const[t,n]=e;return void 0!==n&&!(n instanceof xi)&&"number"!=typeof n.getLiteralValueAtPath(Be,He,{deoptimizeCache:Rs})}},Ni={deoptimizeArgumentsOnCall:Rs,getLiteralValue:Ai,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof nt)||s.hasEffectsOnInteractionAtPath(ze,lt,t)}},Oi={__proto__:null,[vi]:Ii},Ri={__proto__:null,[vi]:wi},Di={__proto__:null,[vi]:Ni},Mi={__proto__:null,[vi]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(ze)},getLiteralValue:Ai,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Fe,ct,t)}},_i={__proto__:null,[vi]:Ii,prototype:Oi},Li={__proto__:null,[vi]:wi,prototype:Oi},Ti={__proto__:null,[vi]:Ci,prototype:Oi},Bi={__proto__:null,[vi]:ki,from:Oi,of:Ri,prototype:Oi},zi={__proto__:null,[vi]:wi,supportedLocalesOf:Li},Fi={deoptimizeArgumentsOnCall:Rs,getLiteralValue:()=>ke,hasEffectsWhenCalled:Pi},Vi={global:Oi,globalThis:Oi,self:Oi,window:Oi,__proto__:null,[vi]:Ii,Array:{__proto__:null,[vi]:Ii,from:Oi,isArray:Ri,of:Ri,prototype:Oi},ArrayBuffer:{__proto__:null,[vi]:wi,isView:Ri,prototype:Oi},AggregateError:Ti,Atomics:Oi,BigInt:_i,BigInt64Array:_i,BigUint64Array:_i,Boolean:Li,constructor:_i,DataView:Li,Date:{__proto__:null,[vi]:wi,now:Ri,parse:Ri,prototype:Oi,UTC:Ri},decodeURI:Ri,decodeURIComponent:Ri,encodeURI:Ri,encodeURIComponent:Ri,Error:Li,escape:Ri,eval:Oi,EvalError:Li,FinalizationRegistry:_i,Float32Array:Bi,Float64Array:Bi,Function:_i,hasOwnProperty:Oi,Infinity:Oi,Int16Array:Bi,Int32Array:Bi,Int8Array:Bi,isFinite:Ri,isNaN:Ri,isPrototypeOf:Oi,JSON:Oi,Map:Ti,Math:{__proto__:null,[vi]:Ii,abs:Ri,acos:Ri,acosh:Ri,asin:Ri,asinh:Ri,atan:Ri,atan2:Ri,atanh:Ri,cbrt:Ri,ceil:Ri,clz32:Ri,cos:Ri,cosh:Ri,exp:Ri,expm1:Ri,floor:Ri,fround:Ri,hypot:Ri,imul:Ri,log:Ri,log10:Ri,log1p:Ri,log2:Ri,max:Ri,min:Ri,pow:Ri,random:Ri,round:Ri,sign:Ri,sin:Ri,sinh:Ri,sqrt:Ri,tan:Ri,tanh:Ri,trunc:Ri},NaN:Oi,Number:{__proto__:null,[vi]:wi,isFinite:Ri,isInteger:Ri,isNaN:Ri,isSafeInteger:Ri,parseFloat:Ri,parseInt:Ri,prototype:Oi},Object:{__proto__:null,[vi]:wi,create:Ri,defineProperty:Mi,defineProperties:Mi,freeze:Mi,getOwnPropertyDescriptor:Ri,getOwnPropertyDescriptors:Ri,getOwnPropertyNames:Ri,getOwnPropertySymbols:Ri,getPrototypeOf:Ri,hasOwn:Ri,is:Ri,isExtensible:Ri,isFrozen:Ri,isSealed:Ri,keys:Ri,fromEntries:Oi,entries:Di,values:Di,prototype:Oi},parseFloat:Ri,parseInt:Ri,Promise:{__proto__:null,[vi]:Ii,all:Oi,allSettled:Oi,any:Oi,prototype:Oi,race:Oi,reject:Oi,resolve:Oi},propertyIsEnumerable:Oi,Proxy:{__proto__:null,[vi]:{deoptimizeArgumentsOnCall:({args:[,e,t]})=>{var n;if((n=t)instanceof is&&"ObjectExpression"===n.type&&!t.properties.some(e=>e.type!==Yn))for(const n of t.properties)n.deoptimizeArgumentsOnInteractionAtPath({args:[null,e],type:2,withNew:!1},Be,He);else e.deoptimizePath(ze)},getLiteralValue:Ai,hasEffectsWhenCalled:Pi}},RangeError:Li,ReferenceError:Li,Reflect:Oi,RegExp:Li,Set:Ti,SharedArrayBuffer:_i,String:{__proto__:null,[vi]:wi,fromCharCode:Ri,fromCodePoint:Ri,prototype:Oi,raw:Ri},Symbol:{__proto__:null,[vi]:wi,for:Ri,keyFor:Ri,prototype:Oi,asyncDispose:$i(Re),dispose:$i(Oe),hasInstance:$i(De),toStringTag:$i(Ne)},SyntaxError:Li,toLocaleString:Oi,toString:Oi,TypeError:Li,Uint16Array:Bi,Uint32Array:Bi,Uint8Array:Bi,Uint8ClampedArray:Bi,unescape:Ri,URIError:Li,valueOf:Oi,WeakMap:Ti,WeakRef:_i,WeakSet:Ti,clearInterval:_i,clearTimeout:_i,console:{__proto__:null,[vi]:Ii,assert:_i,clear:_i,count:_i,countReset:_i,debug:_i,dir:_i,dirxml:_i,error:_i,exception:_i,group:_i,groupCollapsed:_i,groupEnd:_i,info:_i,log:_i,table:_i,time:_i,timeEnd:_i,timeLog:_i,trace:_i,warn:_i},Intl:{__proto__:null,[vi]:Ii,Collator:zi,DateTimeFormat:zi,DisplayNames:zi,ListFormat:zi,Locale:zi,NumberFormat:zi,PluralRules:zi,RelativeTimeFormat:zi,Segmenter:zi},setInterval:_i,setTimeout:_i,TextDecoder:_i,TextEncoder:_i,URL:{__proto__:null,[vi]:Ii,prototype:Oi,canParse:Ri},URLSearchParams:_i,AbortController:_i,AbortSignal:_i,addEventListener:Oi,alert:Oi,AnalyserNode:_i,Animation:_i,AnimationEvent:_i,applicationCache:Oi,ApplicationCache:_i,ApplicationCacheErrorEvent:_i,atob:Oi,Attr:_i,Audio:_i,AudioBuffer:_i,AudioBufferSourceNode:_i,AudioContext:_i,AudioDestinationNode:_i,AudioListener:_i,AudioNode:_i,AudioParam:_i,AudioProcessingEvent:_i,AudioScheduledSourceNode:_i,AudioWorkletNode:_i,BarProp:_i,BaseAudioContext:_i,BatteryManager:_i,BeforeUnloadEvent:_i,BiquadFilterNode:_i,Blob:_i,BlobEvent:_i,blur:Oi,BroadcastChannel:_i,btoa:Oi,ByteLengthQueuingStrategy:_i,Cache:_i,caches:Oi,CacheStorage:_i,cancelAnimationFrame:Oi,cancelIdleCallback:Oi,CanvasCaptureMediaStreamTrack:_i,CanvasGradient:_i,CanvasPattern:_i,CanvasRenderingContext2D:_i,ChannelMergerNode:_i,ChannelSplitterNode:_i,CharacterData:_i,clientInformation:Oi,ClipboardEvent:_i,close:Oi,closed:Oi,CloseEvent:_i,Comment:_i,CompositionEvent:_i,confirm:Oi,ConstantSourceNode:_i,ConvolverNode:_i,CountQueuingStrategy:_i,createImageBitmap:Oi,Credential:_i,CredentialsContainer:_i,crypto:Oi,Crypto:_i,CryptoKey:_i,CSS:_i,CSSConditionRule:_i,CSSFontFaceRule:_i,CSSGroupingRule:_i,CSSImportRule:_i,CSSKeyframeRule:_i,CSSKeyframesRule:_i,CSSMediaRule:_i,CSSNamespaceRule:_i,CSSPageRule:_i,CSSRule:_i,CSSRuleList:_i,CSSStyleDeclaration:_i,CSSStyleRule:_i,CSSStyleSheet:_i,CSSSupportsRule:_i,CustomElementRegistry:_i,customElements:Oi,CustomEvent:{__proto__:null,[vi]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:Ai,hasEffectsWhenCalled:Si},prototype:Oi},DataTransfer:_i,DataTransferItem:_i,DataTransferItemList:_i,defaultstatus:Oi,defaultStatus:Oi,DelayNode:_i,DeviceMotionEvent:_i,DeviceOrientationEvent:_i,devicePixelRatio:Oi,dispatchEvent:Oi,document:Oi,Document:_i,DocumentFragment:_i,DocumentType:_i,DOMError:_i,DOMException:_i,DOMImplementation:_i,DOMMatrix:_i,DOMMatrixReadOnly:_i,DOMParser:_i,DOMPoint:_i,DOMPointReadOnly:_i,DOMQuad:_i,DOMRect:_i,DOMRectReadOnly:_i,DOMStringList:_i,DOMStringMap:_i,DOMTokenList:_i,DragEvent:_i,DynamicsCompressorNode:_i,Element:_i,ErrorEvent:_i,Event:_i,EventSource:_i,EventTarget:_i,external:Oi,fetch:Oi,File:_i,FileList:_i,FileReader:_i,find:Oi,focus:Oi,FocusEvent:_i,FontFace:_i,FontFaceSetLoadEvent:_i,FormData:_i,frames:Oi,GainNode:_i,Gamepad:_i,GamepadButton:_i,GamepadEvent:_i,getComputedStyle:Oi,getSelection:Oi,HashChangeEvent:_i,Headers:_i,history:Oi,History:_i,HTMLAllCollection:_i,HTMLAnchorElement:_i,HTMLAreaElement:_i,HTMLAudioElement:_i,HTMLBaseElement:_i,HTMLBodyElement:_i,HTMLBRElement:_i,HTMLButtonElement:_i,HTMLCanvasElement:_i,HTMLCollection:_i,HTMLContentElement:_i,HTMLDataElement:_i,HTMLDataListElement:_i,HTMLDetailsElement:_i,HTMLDialogElement:_i,HTMLDirectoryElement:_i,HTMLDivElement:_i,HTMLDListElement:_i,HTMLDocument:_i,HTMLElement:_i,HTMLEmbedElement:_i,HTMLFieldSetElement:_i,HTMLFontElement:_i,HTMLFormControlsCollection:_i,HTMLFormElement:_i,HTMLFrameElement:_i,HTMLFrameSetElement:_i,HTMLHeadElement:_i,HTMLHeadingElement:_i,HTMLHRElement:_i,HTMLHtmlElement:_i,HTMLIFrameElement:_i,HTMLImageElement:_i,HTMLInputElement:_i,HTMLLabelElement:_i,HTMLLegendElement:_i,HTMLLIElement:_i,HTMLLinkElement:_i,HTMLMapElement:_i,HTMLMarqueeElement:_i,HTMLMediaElement:_i,HTMLMenuElement:_i,HTMLMetaElement:_i,HTMLMeterElement:_i,HTMLModElement:_i,HTMLObjectElement:_i,HTMLOListElement:_i,HTMLOptGroupElement:_i,HTMLOptionElement:_i,HTMLOptionsCollection:_i,HTMLOutputElement:_i,HTMLParagraphElement:_i,HTMLParamElement:_i,HTMLPictureElement:_i,HTMLPreElement:_i,HTMLProgressElement:_i,HTMLQuoteElement:_i,HTMLScriptElement:_i,HTMLSelectElement:_i,HTMLShadowElement:_i,HTMLSlotElement:_i,HTMLSourceElement:_i,HTMLSpanElement:_i,HTMLStyleElement:_i,HTMLTableCaptionElement:_i,HTMLTableCellElement:_i,HTMLTableColElement:_i,HTMLTableElement:_i,HTMLTableRowElement:_i,HTMLTableSectionElement:_i,HTMLTemplateElement:_i,HTMLTextAreaElement:_i,HTMLTimeElement:_i,HTMLTitleElement:_i,HTMLTrackElement:_i,HTMLUListElement:_i,HTMLUnknownElement:_i,HTMLVideoElement:_i,IDBCursor:_i,IDBCursorWithValue:_i,IDBDatabase:_i,IDBFactory:_i,IDBIndex:_i,IDBKeyRange:_i,IDBObjectStore:_i,IDBOpenDBRequest:_i,IDBRequest:_i,IDBTransaction:_i,IDBVersionChangeEvent:_i,IdleDeadline:_i,IIRFilterNode:_i,Image:_i,ImageBitmap:_i,ImageBitmapRenderingContext:_i,ImageCapture:_i,ImageData:_i,indexedDB:Oi,innerHeight:Oi,innerWidth:Oi,InputEvent:_i,IntersectionObserver:_i,IntersectionObserverEntry:_i,isSecureContext:Oi,KeyboardEvent:_i,KeyframeEffect:_i,length:Oi,localStorage:Oi,location:Oi,Location:_i,locationbar:Oi,matchMedia:Oi,MediaDeviceInfo:_i,MediaDevices:_i,MediaElementAudioSourceNode:_i,MediaEncryptedEvent:_i,MediaError:_i,MediaKeyMessageEvent:_i,MediaKeySession:_i,MediaKeyStatusMap:_i,MediaKeySystemAccess:_i,MediaList:_i,MediaQueryList:_i,MediaQueryListEvent:_i,MediaRecorder:_i,MediaSettingsRange:_i,MediaSource:_i,MediaStream:_i,MediaStreamAudioDestinationNode:_i,MediaStreamAudioSourceNode:_i,MediaStreamEvent:_i,MediaStreamTrack:_i,MediaStreamTrackEvent:_i,menubar:Oi,MessageChannel:_i,MessageEvent:_i,MessagePort:_i,MIDIAccess:_i,MIDIConnectionEvent:_i,MIDIInput:_i,MIDIInputMap:_i,MIDIMessageEvent:_i,MIDIOutput:_i,MIDIOutputMap:_i,MIDIPort:_i,MimeType:_i,MimeTypeArray:_i,MouseEvent:_i,moveBy:Oi,moveTo:Oi,MutationEvent:_i,MutationObserver:_i,MutationRecord:_i,name:Oi,NamedNodeMap:_i,NavigationPreloadManager:_i,navigator:Oi,Navigator:_i,NetworkInformation:_i,Node:_i,NodeFilter:Oi,NodeIterator:_i,NodeList:_i,Notification:_i,OfflineAudioCompletionEvent:_i,OfflineAudioContext:_i,offscreenBuffering:Oi,OffscreenCanvas:_i,open:Oi,openDatabase:Oi,Option:_i,origin:Oi,OscillatorNode:_i,outerHeight:Oi,outerWidth:Oi,PageTransitionEvent:_i,pageXOffset:Oi,pageYOffset:Oi,PannerNode:_i,parent:Oi,Path2D:_i,PaymentAddress:_i,PaymentRequest:_i,PaymentRequestUpdateEvent:_i,PaymentResponse:_i,performance:Oi,Performance:_i,PerformanceEntry:_i,PerformanceLongTaskTiming:_i,PerformanceMark:_i,PerformanceMeasure:_i,PerformanceNavigation:_i,PerformanceNavigationTiming:_i,PerformanceObserver:_i,PerformanceObserverEntryList:_i,PerformancePaintTiming:_i,PerformanceResourceTiming:_i,PerformanceTiming:_i,PeriodicWave:_i,Permissions:_i,PermissionStatus:_i,personalbar:Oi,PhotoCapabilities:_i,Plugin:_i,PluginArray:_i,PointerEvent:_i,PopStateEvent:_i,postMessage:Oi,Presentation:_i,PresentationAvailability:_i,PresentationConnection:_i,PresentationConnectionAvailableEvent:_i,PresentationConnectionCloseEvent:_i,PresentationConnectionList:_i,PresentationReceiver:_i,PresentationRequest:_i,print:Oi,ProcessingInstruction:_i,ProgressEvent:_i,PromiseRejectionEvent:_i,prompt:Oi,PushManager:_i,PushSubscription:_i,PushSubscriptionOptions:_i,queueMicrotask:Oi,RadioNodeList:_i,Range:_i,ReadableStream:_i,RemotePlayback:_i,removeEventListener:Oi,Request:_i,requestAnimationFrame:Oi,requestIdleCallback:Oi,resizeBy:Oi,ResizeObserver:_i,ResizeObserverEntry:_i,resizeTo:Oi,Response:_i,RTCCertificate:_i,RTCDataChannel:_i,RTCDataChannelEvent:_i,RTCDtlsTransport:_i,RTCIceCandidate:_i,RTCIceTransport:_i,RTCPeerConnection:_i,RTCPeerConnectionIceEvent:_i,RTCRtpReceiver:_i,RTCRtpSender:_i,RTCSctpTransport:_i,RTCSessionDescription:_i,RTCStatsReport:_i,RTCTrackEvent:_i,screen:Oi,Screen:_i,screenLeft:Oi,ScreenOrientation:_i,screenTop:Oi,screenX:Oi,screenY:Oi,ScriptProcessorNode:_i,scroll:Oi,scrollbars:Oi,scrollBy:Oi,scrollTo:Oi,scrollX:Oi,scrollY:Oi,SecurityPolicyViolationEvent:_i,Selection:_i,ServiceWorker:_i,ServiceWorkerContainer:_i,ServiceWorkerRegistration:_i,sessionStorage:Oi,ShadowRoot:_i,SharedWorker:_i,SourceBuffer:_i,SourceBufferList:_i,speechSynthesis:Oi,SpeechSynthesisEvent:_i,SpeechSynthesisUtterance:_i,StaticRange:_i,status:Oi,statusbar:Oi,StereoPannerNode:_i,stop:Oi,Storage:_i,StorageEvent:_i,StorageManager:_i,styleMedia:Oi,StyleSheet:_i,StyleSheetList:_i,SubtleCrypto:_i,SVGAElement:_i,SVGAngle:_i,SVGAnimatedAngle:_i,SVGAnimatedBoolean:_i,SVGAnimatedEnumeration:_i,SVGAnimatedInteger:_i,SVGAnimatedLength:_i,SVGAnimatedLengthList:_i,SVGAnimatedNumber:_i,SVGAnimatedNumberList:_i,SVGAnimatedPreserveAspectRatio:_i,SVGAnimatedRect:_i,SVGAnimatedString:_i,SVGAnimatedTransformList:_i,SVGAnimateElement:_i,SVGAnimateMotionElement:_i,SVGAnimateTransformElement:_i,SVGAnimationElement:_i,SVGCircleElement:_i,SVGClipPathElement:_i,SVGComponentTransferFunctionElement:_i,SVGDefsElement:_i,SVGDescElement:_i,SVGDiscardElement:_i,SVGElement:_i,SVGEllipseElement:_i,SVGFEBlendElement:_i,SVGFEColorMatrixElement:_i,SVGFEComponentTransferElement:_i,SVGFECompositeElement:_i,SVGFEConvolveMatrixElement:_i,SVGFEDiffuseLightingElement:_i,SVGFEDisplacementMapElement:_i,SVGFEDistantLightElement:_i,SVGFEDropShadowElement:_i,SVGFEFloodElement:_i,SVGFEFuncAElement:_i,SVGFEFuncBElement:_i,SVGFEFuncGElement:_i,SVGFEFuncRElement:_i,SVGFEGaussianBlurElement:_i,SVGFEImageElement:_i,SVGFEMergeElement:_i,SVGFEMergeNodeElement:_i,SVGFEMorphologyElement:_i,SVGFEOffsetElement:_i,SVGFEPointLightElement:_i,SVGFESpecularLightingElement:_i,SVGFESpotLightElement:_i,SVGFETileElement:_i,SVGFETurbulenceElement:_i,SVGFilterElement:_i,SVGForeignObjectElement:_i,SVGGElement:_i,SVGGeometryElement:_i,SVGGradientElement:_i,SVGGraphicsElement:_i,SVGImageElement:_i,SVGLength:_i,SVGLengthList:_i,SVGLinearGradientElement:_i,SVGLineElement:_i,SVGMarkerElement:_i,SVGMaskElement:_i,SVGMatrix:_i,SVGMetadataElement:_i,SVGMPathElement:_i,SVGNumber:_i,SVGNumberList:_i,SVGPathElement:_i,SVGPatternElement:_i,SVGPoint:_i,SVGPointList:_i,SVGPolygonElement:_i,SVGPolylineElement:_i,SVGPreserveAspectRatio:_i,SVGRadialGradientElement:_i,SVGRect:_i,SVGRectElement:_i,SVGScriptElement:_i,SVGSetElement:_i,SVGStopElement:_i,SVGStringList:_i,SVGStyleElement:_i,SVGSVGElement:_i,SVGSwitchElement:_i,SVGSymbolElement:_i,SVGTextContentElement:_i,SVGTextElement:_i,SVGTextPathElement:_i,SVGTextPositioningElement:_i,SVGTitleElement:_i,SVGTransform:_i,SVGTransformList:_i,SVGTSpanElement:_i,SVGUnitTypes:_i,SVGUseElement:_i,SVGViewElement:_i,TaskAttributionTiming:_i,Text:_i,TextEvent:_i,TextMetrics:_i,TextTrack:_i,TextTrackCue:_i,TextTrackCueList:_i,TextTrackList:_i,TimeRanges:_i,toolbar:Oi,top:Oi,Touch:_i,TouchEvent:_i,TouchList:_i,TrackEvent:_i,TransitionEvent:_i,TreeWalker:_i,UIEvent:_i,ValidityState:_i,visualViewport:Oi,VisualViewport:_i,VTTCue:_i,WaveShaperNode:_i,WebAssembly:Oi,WebGL2RenderingContext:_i,WebGLActiveInfo:_i,WebGLBuffer:_i,WebGLContextEvent:_i,WebGLFramebuffer:_i,WebGLProgram:_i,WebGLQuery:_i,WebGLRenderbuffer:_i,WebGLRenderingContext:_i,WebGLSampler:_i,WebGLShader:_i,WebGLShaderPrecisionFormat:_i,WebGLSync:_i,WebGLTexture:_i,WebGLTransformFeedback:_i,WebGLUniformLocation:_i,WebGLVertexArrayObject:_i,WebSocket:_i,WheelEvent:_i,Window:_i,Worker:_i,WritableStream:_i,XMLDocument:_i,XMLHttpRequest:_i,XMLHttpRequestEventTarget:_i,XMLHttpRequestUpload:_i,XMLSerializer:_i,XPathEvaluator:_i,XPathExpression:_i,XPathResult:_i,XSLTProcessor:_i};for(const e of["window","global","self","globalThis"])Vi[e]=Vi;function ji(e){let t=Vi;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return"Symbol"===e[0]&&2===e.length?Fi:null}return t[vi]}class Ui extends hs{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(ji([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=ji([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=ji([this.name,...e]);return s?s.getLiteralValue():Qe}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!ji([this.name]):!ji([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=ji([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}const Gi=new Set(["class","const","let","var","using","await using"]);class Hi extends is{constructor(){super(...arguments),this.variable=null,this.isVariableReference=!1}get isTDZAccess(){return Ye(this.flags,4)?Ye(this.flags,8):null}set isTDZAccess(e){this.flags=Ze(this.flags,4,!0),this.flags=Ze(this.flags,8,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){0!==e.length||this.scope.contains(this.name)||this.disallowImportReassignment(),this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const[i,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,n,s);return[i,r||this.isPureFunction(e)]}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(!this.isPossibleTDZ()||"var"===this.variable.kind)||this.scope.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof Ui&&!this.isPureFunction(Be)&&this.variable.hasEffectsOnInteractionAtPath(Be,lt,e)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return null!==this.variable&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n);case 1:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,n);case 2:return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,n)}}include(e,t){this.included||this.includeNode(e),t&&this.variable?.includePath(ze,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Be,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}includeCallArgumentsWhenCalledAtPath(e,t,n){this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof ps&&this.variable.kind&&Gi.has(this.variable.kind)&&this.variable.module.hasTreeShakingPassStarted))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&Wi(this)===Wi(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof ps&&(this.variable.module.isExecuted||Os(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isVariableReference&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}disallowImportReassignment(){return this.scope.context.error(bn(this.name,this.scope.context.module.id),this.start)}getVariableRespectingTDZ(){return this.isPossibleTDZ()?st:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[bs])return!0;t=t[n]}return t?.[bs]}}function Wi(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}class qi extends nt{constructor(e,t){super(),this.object=e,this.path=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[...this.path,...t],n)}deoptimizePath(e){this.object.deoptimizePath([...this.path,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([...this.path,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([...this.path,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([...this.path,...e],t,n)}}class Ki extends Hi{constructor(){super(...arguments),this.variable=null}get isDestructuringDeoptimized(){return Ye(this.flags,16777216)}set isDestructuringDeoptimized(e){this.flags=Ze(this.flags,16777216,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&ys(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isVariableReference=!0,this.assignmentInteraction&&this.variable.markTargetOfAssignment())}declare(e,t,n){let s;const{treeshake:i}=this.scope.context.options;return"parameter"===e?s=this.scope.addParameterDeclaration(this,t):(s=this.scope.addDeclaration(this,this.scope.context,n,t,e),"var"===e&&i&&i.correctVarValueBeforeDeclaration&&s.markInitializersForDeoptimization()),[this.variable=s]}deoptimizeAssignment(e,t){this.deoptimizePath(Be),0===e.length&&this.variable?.addReassignedValue(t),t.deoptimizePath([...e,we])}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,lt,e)}includeDestructuredIfNecessary(e,t,n){t.length>0&&!this.isDestructuringDeoptimized&&(this.isDestructuringDeoptimized=!0,n.deoptimizeArgumentsOnInteractionAtPath({args:[new qi(n,t.slice(0,-1))],type:0},t,He));const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;let i=this.included;return(i||=t.length>0&&!e.brokenFlow&&s&&("always"===s||n.hasEffectsOnInteractionAtPath(t,lt,ts())))&&(this.variable&&!this.variable.included&&this.scope.context.includeVariableInModule(this.variable,Be,e),n.includePath(t,e)),!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=Ee){if(this.variable){const o=this.variable.getName(t,n);o!==this.name&&(e.overwrite(this.start,this.end,o,{contentOnly:!0,storeName:!0}),r&&e.prependRight(this.start,`${this.name}: `)),"eval"===o&&s===jn&&i&&e.appendRight(this.start,"0, ")}}}class Xi extends is{constructor(){super(...arguments),this.accessedValue=null}get computed(){return Ye(this.flags,1024)}set computed(e){this.flags=Ze(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){return 0===e.type&&"get"===this.kind&&0===t.length||1===e.type&&"set"===this.kind&&0===t.length?this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:2,withNew:!1},Be,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getAccessedValue()[0].includeCallArgumentsWhenCalledAtPath(e,t,n)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){return"get"===this.kind&&0===t.type&&0===e.length||"set"===this.kind&&1===t.type?this.value.hasEffectsOnInteractionAtPath(Be,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=it,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(Be,ut,He,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}Xi.prototype.includeNode=os,Xi.prototype.applyDeoptimizations=as;class Ji extends Xi{hasEffects(e){return super.hasEffects(e)||gs(this.decorators,e)}}class Yi extends is{get computed(){return Ye(this.flags,1024)}set computed(e){this.flags=Ze(this.flags,1024,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.value?this.value.getLiteralValueAtPath(e,t,n):Qe}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):it}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||gs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}includeNode(e){this.included=!0,this.value?.includePath(ze,e);for(const t of this.decorators)t.includePath(ze,e)}}Yi.prototype.applyDeoptimizations=as;class Zi extends is{constructor(){super(...arguments),this.instanceFieldValues=null,this.objectEntity=null}createScope(e){this.scope=new ms(e,e.context)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);return this.id?.markDeclarationReached(),t||super.hasEffects(e)||gs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return 2===t.type&&0===e.length?!t.withNew||(null===this.classConstructor?this.superClass?.hasEffectsOnInteractionAtPath(e,t,n):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,n))||this.hasEffectsOnInstanceFieldInitialization(n):this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.superClass?.include(e,t),this.body.include(e,t);for(const n of this.decorators)n.include(e,t);this.id&&(this.id.markDeclarationReached(),this.id.include(e,t))}initialise(){super.initialise(),this.id?.declare("class",Be,this),this.instanceEntity=new ni(new Map,new qi(this,["prototype"])),this.body.scope.instanceThisVariable.addArgumentForDeoptimization(this.instanceEntity);for(const e of this.body.body)if(e instanceof Ji&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)e.type===Zn||e.static||e instanceof Ji&&"constructor"===e.kind||e.deoptimizePath(ze);this.scope.context.requestTreeshakingPass()}hasEffectsOnInstanceFieldInitialization(e){const t=this.getInstanceFieldValues();if(0===t.length)return!1;const{replacedVariableInits:n}=e,s=this.body.scope.instanceThisVariable,i=n.get(s);n.set(s,this.instanceEntity);const r=t.some(t=>t.hasEffects(e));return i?n.set(s,i):n.delete(s),r}getInstanceFieldValues(){if(null===this.instanceFieldValues){this.instanceFieldValues=[];for(const e of this.body.body)e instanceof Yi&&!e.static&&null!==e.value&&this.instanceFieldValues.push(e.value)}return this.instanceFieldValues}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(n.type===Zn)continue;const s=n.static?e:t,i=n.kind;if(s===t&&!i)continue;const r="set"===i||"get"===i?i:"init";let o;if(n.computed){const e=n.key.getLiteralValueAtPath(Be,He,this);if("symbol"==typeof e){s.push({key:_e(e)?e:we,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Ki?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new ni(t,this.superClass?new qi(this.superClass,["prototype"]):ri)}),this.objectEntity=new ni(e,this.superClass||ri)}}Zi.prototype.includeNode=rs;class Qi extends Zi{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:a}=this.id;"system"===s&&n.has(o)&&e.appendLeft(this.end,`${i}${ge([o],t)};`);const l=o.getName(r);if(l!==a)return this.decorators.map(n=>n.render(e,t)),this.superClass?.render(e,t),this.body.render(e,{...t,useOriginalName:e=>e===o}),e.prependRight(this.start,`let ${l}${i}=${i}`),void e.prependLeft(this.end,";")}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:n,variable:s}=e;for(const e of t.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class er extends ps{constructor(e){super("arguments",null,st,Be,e,"other")}addArgumentToBeDeoptimized(e){}addReference(){this.deoptimizedArguments=[],this.addArgumentToBeDeoptimized=tr}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}includePath(e,t){super.includePath(e,t);for(const e of this.deoptimizedArguments)e.deoptimizePath(ze);this.deoptimizedArguments.length=0}}function tr(e){this.included?e.deoptimizePath(ze):this.deoptimizedArguments?.push(e)}const nr=ve,sr=new Set([we]),ir=new Ge,rr=new Set([st]);class or extends ps{constructor(e,t,n,s){super(e,t,st,n,s,"parameter"),this.includedPathTracker=new Je,this.argumentsToBeDeoptimized=new Set,this.deoptimizationInteractions=[],this.deoptimizations=new Ge,this.deoptimizedFields=new Set,this.expressionsDependingOnKnownValue=[],this.knownValue=null,this.knownValueLiteral=Qe}addArgumentForDeoptimization(e){if(this.updateKnownValue(e),e===st){if(!this.argumentsToBeDeoptimized.has(st)){this.argumentsToBeDeoptimized.add(st);for(const{interaction:e}of this.deoptimizationInteractions)rt(e);this.deoptimizationInteractions=nr}}else if(this.deoptimizedFields.has(we))e.deoptimizePath([...this.initPath,we]);else if(!this.argumentsToBeDeoptimized.has(e)){this.argumentsToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([...this.initPath,t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,[...this.initPath,...n],He)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsDependingOnKnownValue)e.deoptimizeCache();this.expressionsDependingOnKnownValue=ve}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(this.initPath,He,this));if(this.knownValue===e||this.knownValue instanceof Ki&&e instanceof Ki&&this.knownValue.variable===e.variable)return;const{knownValueLiteral:t}=this;"symbol"!=typeof t&&e.getLiteralValueAtPath(this.initPath,He,this)===t||this.markReassigned()}getKnownValue(){return this.knownValue||st}getLiteralValueAtPath(e,t,n){if(this.isReassigned||e.length+this.initPath.length>6)return Qe;const s=this.getKnownValue();return this.expressionsDependingOnKnownValue.push(n),t.withTrackedEntityAtPath(e,s,()=>s.getLiteralValueAtPath([...this.initPath,...e],t,n),Qe)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;return this.isReassigned||1===s||e.length+this.initPath.length>6?super.hasEffectsOnInteractionAtPath(e,t,n):!(2===s?(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this):n.accessed.trackEntityAtPathAndGetIfTracked(e,this))&&this.getKnownValue().hasEffectsOnInteractionAtPath([...this.initPath,...e],t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.argumentsToBeDeoptimized.has(st)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(we)||2===e.type&&this.deoptimizedFields.has(t[0]))||this.initPath.length+t.length>6)rt(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.argumentsToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,[...this.initPath,...t],He);this.argumentsToBeDeoptimized.has(st)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(we))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.argumentsToBeDeoptimized)e.deoptimizePath([...this.initPath,t]);t===we&&(this.deoptimizationInteractions=nr,this.deoptimizations=ir,this.deoptimizedFields=sr,this.argumentsToBeDeoptimized=rr)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(ze):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),it}includeArgumentPaths(e,t){this.includedPathTracker.includeAllPaths(e,t,this.initPath)}}class ar extends or{constructor(e){super("this",null,Be,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||st).hasEffectsOnInteractionAtPath(e,t,n)}}class lr extends nt{constructor(e){super(),this.returnedIdentifier=e}deoptimizeArgumentsOnInteractionAtPath(e,t,n){rt(e),this.returnedIdentifier.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.returnedIdentifier.deoptimizePath(e)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.returnedIdentifier.includeCallArgumentsWhenCalledAtPath(e,t,n)}}class cr extends ms{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const a=o.kind;if("parameter"===a&&"CatchClause"===o.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,Ms,s,i);return o.renderLikeHoisted(n),this.addHoistedVariable(r,n),n}return"var"===a?(o.addDeclaration(e,n),o):t.error(On(r),e.start)}const a=this.parent.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class ur extends ms{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o){const s=o.kind;if(!("var"!==i&&"function"!==i||"var"!==s&&"function"!==s&&"parameter"!==s))return o.addDeclaration(e,n),o;t.error(On(r),e.start)}const a=new ps(e.name,e,n,s,t,i);return this.variables.set(r,a),a}}class dr extends ms{constructor(e,t){super(e,e.context),this.hasRest=!1,this.parameters=[],this.bodyScope=t?new cr(this):new ur(this)}addParameterDeclaration(e,t){const{name:n,start:s}=e;if(this.variables.get(n))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(n),s);const i=new or(n,e,t,this.context);return this.variables.set(n,i),this.bodyScope.addHoistedVariable(n,i),i}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}hasParameterCalledFromTryStatement(){return this.parameters.some(e=>e.some(e=>e.calledFromTryStatement))}includeCallArguments({args:e},t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];let r=e.length-1;for(let n=1;n<e.length;n++){const i=e[n];i instanceof Ei&&!s&&(s=!0,r=n-1),s&&(i.includePath(ze,t),i.include(t,!1))}for(let o=r;o>=1;o--){const r=this.parameters[o-1]||i,a=e[o];if(r)if(n=!1,0===r.length)s=!0;else for(const e of r)e.calledFromTryStatement&&(n=!0),e.included&&(s=!0,n?a.include(t,!0):(e.includeArgumentPaths(a,t),a.include(t,!1)));(s||a.shouldBeIncluded(t))&&(s=!0,a.include(t,n))}}}class hr extends dr{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}deoptimizeArgumentsOnCall({args:e}){const{parameters:t}=this;let n=0;for(;n<e.length-1;n++){const s=e[n+1];if(s instanceof Ei){for(;n<t.length;n++){e[n+1]?.deoptimizePath(ze);for(const e of t[n])e.markReassigned()}break}if(this.hasRest&&n>=t.length-1)s.deoptimizePath(ze);else{const e=t[n];if(e)for(const t of e)t.addArgumentForDeoptimization(s);this.addArgumentToBeDeoptimized(s)}}const s=this.hasRest?t.length-1:t.length;for(;n<s;n++)for(const e of t[n])e.addArgumentForDeoptimization(Ms)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}deoptimizeAllParameters(){for(const e of this.parameters)for(const t of e)t.deoptimizePath(ze),t.markReassigned()}reassignAllParameters(){for(const e of this.parameters)for(const t of e)t.markReassigned()}addArgumentToBeDeoptimized(e){}updateReturnExpression(){const{returnExpressions:e}=this,[t]=e;if(t&&this.returnExpressionsResolveToSameVariable(t))this.returnExpression=t.variable.isTargetOfAssignment?new lr(t):t;else if(1===e.length)this.returnExpression=t;else{this.returnExpression=st;for(const t of e)t.deoptimizePath(ze)}}returnExpressionsResolveToSameVariable(e){return!(!us(e)||null===e.variable)&&this.returnExpressions.every(t=>us(t)&&t.variable===e.variable)}}class pr extends hr{constructor(e,t){super(e,!1),this.functionNode=t;const{context:n}=e;this.variables.set("arguments",this.argumentsVariable=new er(n)),this.variables.set("this",this.thisVariable=new ar(n))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included){const{args:n}=e;for(let e=1;e<n.length;e++){const s=n[e];s&&(s.includePath(ze,t),s.include(t,!1))}}}addArgumentToBeDeoptimized(e){this.argumentsVariable.addArgumentToBeDeoptimized(e)}}class fr extends ms{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s,i){if("var"===i){const r=e.name,o=this.hoistedVariables?.get(r)||this.variables.get(r);if(o)return"var"===o.kind||"var"===i&&"parameter"===o.kind?(o.addDeclaration(e,n),o):t.error(On(r),e.start);const a=this.parent.addDeclaration(e,t,n,s,i);return a.markInitializersForDeoptimization(),this.addHoistedVariable(r,a),a}return super.addDeclaration(e,t,n,s,i)}}class mr extends is{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===Jn&&this.scope.context.log(xt,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${wt(t)}" was ignored.`}),this.start)}removeAnnotations(e){this.expression.removeAnnotations(e)}render(e,t){super.render(e,t),";"!==e.original[this.end-1]&&e.appendLeft(this.end,";")}shouldBeIncluded(e){return this.directive&&"use strict"!==this.directive?this.parent.type!==Jn:super.shouldBeIncluded(e)}}mr.prototype.includeNode=os,mr.prototype.applyDeoptimizations=as;class gr extends is{get deoptimizeBody(){return Ye(this.flags,32768)}set deoptimizeBody(e){this.flags=Ze(this.flags,32768,e)}get directlyIncluded(){return Ye(this.flags,16384)}set directlyIncluded(e){this.flags=Ze(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(st)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new fr(e)}hasEffects(e){if(this.deoptimizeBody)return!0;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){if(!this.deoptimizeBody||!this.directlyIncluded){this.included=!0,this.directlyIncluded=!0,this.deoptimizeBody&&(t=!0);for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}}initialise(){super.initialise(),this.scope.context.magicString.addSourcemapLocation(this.end-1);const e=this.body[0];this.deoptimizeBody=e instanceof mr&&"use asm"===e.directive}render(e,t){this.body.length>0?pe(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}gr.prototype.includeNode=os,gr.prototype.applyDeoptimizations=as;class yr extends is{constructor(){super(...arguments),this.parameterVariableValuesDeoptimized=!1}get async(){return Ye(this.flags,256)}set async(e){this.flags=Ze(this.flags,256,e)}get deoptimizedReturn(){return Ye(this.flags,512)}set deoptimizedReturn(e){this.flags=Ze(this.flags,512,e)}get generator(){return Ye(this.flags,4194304)}set generator(e){this.flags=Ze(this.flags,4194304,e)}get hasCachedEffects(){return Ye(this.flags,67108864)}set hasCachedEffects(e){this.flags=Ze(this.flags,67108864,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){2===e.type&&0===t.length?this.scope.deoptimizeArgumentsOnCall(e):this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===we&&(this.scope.getReturnExpression().deoptimizePath(ze),this.scope.deoptimizeAllParameters())}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return e.length>0?this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s):this.async?(this.deoptimizedReturn||(this.deoptimizedReturn=!0,this.scope.getReturnExpression().deoptimizePath(ze),this.scope.context.requestTreeshakingPass()),it):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.hasCachedEffects)return!0;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],ut,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],lt,n)))return this.hasCachedEffects=!0,!0}const{propertyReadSideEffects:s}=this.scope.context.options.treeshake;for(let e=0;e<this.params.length;e++){const i=this.params[e];if(i.hasEffects(n)||s&&i.hasEffectsWhenDestructuring(n,Be,t.args[e+1]||Ms))return this.hasCachedEffects=!0,!0}return!1}onlyFunctionCallUsed(){let e=null;const{parent:t}=this;return"VariableDeclarator"===t.type?e=t.id.variable??null:t.type===Un&&(e=t.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.included||this.includeNode(e),this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.scope.reassignAllParameters());const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArgumentsWhenCalledAtPath(e,t,n){0===e.length?this.scope.includeCallArguments(t,n):this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}initialise(){super.initialise(),this.body instanceof gr?this.body.addImplicitReturnExpressionToScope():this.scope.addReturnExpression(this.body),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationNoSideEffects=this.annotations.some(e=>"noSideEffects"===e.type))}}yr.prototype.preventChildBlockScope=!0,yr.prototype.includeNode=os,yr.prototype.applyDeoptimizations=as;class br extends yr{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new pr(e,this),this.constructedEntity=new ni(new Map,ri),this.scope.thisVariable.addArgumentForDeoptimization(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addArgumentForDeoptimization(e.args[0])}hasEffects(e){return!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(0===e.length&&2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:st);const{brokenFlow:s,ignore:i,replacedVariableInits:r}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:t.withNew},this.body.hasEffects(n))return this.hasCachedEffects=!0,!0;n.brokenFlow=s,e?r.set(this.scope.thisVariable,e):r.delete(this.scope.thisVariable),n.ignore=i}return!1}include(e,t){super.include(e,t),this.id?.include(e,t);const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Ki&&!n||s.include(e,t)}includeNode(e){this.included=!0;const t=this.scope.argumentsVariable.included;for(const n of this.params)n instanceof Ki&&!t||n.includePath(ze,e)}initialise(){super.initialise(),this.id?.declare("function",Be,this)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ni([{key:"prototype",kind:"init",property:new ni([],ri)}],ri)}}class Er extends br{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}}class xr extends is{bind(){super.bind();const e=this.declarationName||this.scope.context.getModuleName();this.variable.name=this.scope.variables.get(e)?`${e}_default`:e}include(e,t){this.included=!0,this.declaration.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable,ze,e)}includePath(e,t){this.included=!0,this.declaration.includePath(e,t)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this,this.scope.context),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n,r=function(e,t){return ce(e,ae(e,"default",t)+7)}(e.original,this.start);let o=!1;if(this.declaration instanceof Er)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=ae(e,"function",t)+8;e=e.slice(n,ae(e,"(",n));const s=ae(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Qi)this.renderNamedDeclaration(e,r,null===this.declaration.id?ae(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void re(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Gn}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));o=this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t),o&&e.appendLeft(this.end,";")}renderNamedDeclaration(e,t,n,s){const{exportNamesByVariable:i,format:r,snippets:{getPropertyAccess:o}}=s,a=this.variable.getName(o);e.remove(this.start,t),null!==n&&e.appendLeft(n,` ${a}`),"system"===r&&this.declaration instanceof Qi&&i.has(this.variable)&&e.appendLeft(this.end,` ${ge([this.variable],s)};`)}renderVariableDeclaration(e,t,{format:n,exportNamesByVariable:s,snippets:{cnst:i,getPropertyAccess:r}}){const o=59===e.original.charCodeAt(this.end-1),a="system"===n&&s.get(this.variable);return a?(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = exports(${JSON.stringify(a[0])}, `),e.appendRight(o?this.end-1:this.end,")"+(o?"":";")),!1):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),!o)}}xr.prototype.needsBoundaries=!0,xr.prototype.includeNode=os,xr.prototype.applyDeoptimizations=as;const vr=/[\n\r'\\\u2028\u2029]/,Ar=/([\n\r'\u2028\u2029])/g,Sr=/\\/g;function Pr(e){return vr.test(e)?e.replace(Sr,"\\\\").replace(Ar,"\\$1"):e}const $r="_interopDefault",wr="_interopDefaultCompat",Ir="_interopNamespace",Cr="_interopNamespaceCompat",kr="_interopNamespaceDefault",Nr="_interopNamespaceDefaultOnly",Or="_mergeNamespaces",Rr="_documentCurrentScript",Dr={auto:$r,compat:wr,default:null,defaultOnly:null,esModule:null},Mr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),_r={auto:Ir,compat:Cr,default:kr,defaultOnly:Nr,esModule:null},Lr=(e,t)=>"esModule"!==e&&Mr(e,t),Tr=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of Yr)t.has(e)&&a.add(e);return Yr.map(e=>a.has(e)?Br[e](n,s,i,r,o,a):"").join("")},Br={[Rr]:(e,{_:t,n:n})=>`var ${Rr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[wr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:wr});return`${o}${Vr(t)}${s}?${s}${n?zr(t):Fr(t)}${a}${r}${r}`},[$r](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:$r});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?zr(t):Fr(t)}${a}${r}${r}`},[Cr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(kr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Cr});return`${e}${Vr(t)}${o}?${o}e${o}:${o}${kr}(e)${n}${l}${l}`}return`function ${Cr}(e)${o}{${l}${e}if${o}(${Vr(t)})${o}return e;${l}`+jr(e,e,t,n,s,i)+`}${l}${l}`},[Nr](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Nr});return`${c}${Xr(s,Jr(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[kr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${kr}(e)${r}{${o}`+jr(e,e,t,n,s,i)+`}${o}${o}`},[Ir](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(kr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ir});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${kr}(e)${t}${l}${l}`}return`function ${Ir}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+jr(e,e,t,n,s,i)+`}${l}${l}`},[Or](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Or}(n, m)${r}{${a}${e}${Gr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Wr:qr:Kr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Xr(s,Jr(i,"n",t))};${a}}${a}${a}`}},zr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Fr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Vr=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,jr=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?Hr:Kr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Zr(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${Ur(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${Xr(i,"n")}${d}${u}`},Ur=(e,t,{_:n,cnst:s,getFunctionIntro:i,s:r})=>"var"!==s||t?`for${n}(${s} k in e)${n}${e}`:`Object.keys(e).forEach(${i(["k"],{isAsync:!1,name:null})}${e})${r}`,Gr=(e,t,n,{_:s,cnst:i,getDirectReturnFunction:r,getFunctionIntro:o,n:a})=>{if(t){const[t,i]=r(["e"],{functionReturn:!1,lineBreakIndent:{base:n,t:n},name:null});return`m.forEach(${t}e${s}&&${s}typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e)${s}&&${s}Object.keys(e).forEach(${o(["k"],{isAsync:!1,name:null})}${e})${i});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${a}${n}${n}${i} e${s}=${s}m[i];${a}${n}${n}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${i} k in e)${s}${e}${s}}${a}${n}}`},Hr=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+Wr(e,t+e,n)+`${t}}${i}`},Wr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}enumerable:${n}true,${r}${t}${e}get:${n}${o}e[k]${a}${r}${t}});${r}`},qr=(e,t,{_:n,cnst:s,getDirectReturnFunction:i,n:r})=>{const[o,a]=i([],{functionReturn:!0,lineBreakIndent:null,name:null});return`${t}${s} d${n}=${n}Object.getOwnPropertyDescriptor(e,${n}k);${r}${t}if${n}(d)${n}{${r}${t}${e}Object.defineProperty(n,${n}k,${n}d.get${n}?${n}d${n}:${n}{${r}${t}${e}${e}enumerable:${n}true,${r}${t}${e}${e}get:${n}${o}e[k]${a}${r}${t}${e}});${r}${t}}${r}`},Kr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Xr=(e,t)=>e?`Object.freeze(${t})`:t,Jr=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Zr(s)})`:t,Yr=Object.keys(Br);function Zr(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class Qr extends is{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||null===this.value&&110!==this.scope.context.code.charCodeAt(this.start)||"bigint"==typeof this.value||47===this.scope.context.code.charCodeAt(this.start)?Qe:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?it:Xs(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return e.length>(null===this.value?0:1);case 1:return!0;case 2:return!!(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky))||1!==e.length||Ks(this.members,e[0],t,n)}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return Ws;switch(typeof e){case"boolean":return Gs;case"number":return Hs;case"string":return qs}return Object.create(null)}(this.value)}render(){"string"==typeof this.value&&this.scope.context.addIndentExclusionRange([this.start+1,this.end-1])}}function eo(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(Be,He,i);if(n===ss||e.optional&&null==n)return ss}else if(e.optional&&null==t.getLiteralValueAtPath(Be,He,i))return ss;return e.getLiteralValueAtPath(n,s,i)}function to(e){return e.computed?(t=e.property)instanceof Qr?String(t.value):null:e.property.name;var t}function no(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Ki)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof so){const s=no(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}Qr.prototype.includeNode=rs;class so extends is{constructor(){super(...arguments),this.promiseHandler=null,this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return Ye(this.flags,1024)}set computed(e){this.flags=Ze(this.flags,1024,e)}get optional(){return Ye(this.flags,128)}set optional(e){this.flags=Ze(this.flags,128,e)}get assignmentDeoptimized(){return Ye(this.flags,16)}set assignmentDeoptimized(e){this.flags=Ze(this.flags,16,e)}get bound(){return Ye(this.flags,32)}set bound(e){this.flags=Ze(this.flags,32,e)}get isUndefined(){return Ye(this.flags,64)}set isUndefined(e){this.flags=Ze(this.flags,64,e)}bind(){this.bound=!0;const e=no(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=io(t,e.slice(1),this.scope.context);n?"undefined"===n?this.isUndefined=!0:(this.variable=n,this.scope.addNamespaceMemberAccess(function(e){let t=e[0].key;for(let n=1;n<e.length;n++)t+="."+e[n].key;return t}(e),n)):super.bind()}else super.bind()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.promiseHandler?this.promiseHandler.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<6?this.object.deoptimizeArgumentsOnInteractionAtPath(e,this.propertyKey===we?ze:[this.propertyKey,...t],n):rt(e))}deoptimizeAssignment(e,t){this.deoptimizePath(Be),t.deoptimizePath([...e,we])}deoptimizeCache(){if(this.propertyKey===this.dynamicPropertyKey)return;const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=ve,this.dynamicPropertyKey=this.propertyKey,t.deoptimizePath(ze),this.included&&t.includePath(ze,es());for(const t of e)t.deoptimizeCache()}deoptimizePath(e){if(0===e.length&&this.disallowNamespaceReassignment(),this.variable)this.variable.deoptimizePath(e);else if(!this.isUndefined){const{propertyKey:t}=this;this.object.deoptimizePath([t===we?Ie:t,...e.length<6?e:[...e.slice(0,6),we]])}}getLiteralValueAtPath(e,t,n){if(this.variable)return this.variable.getLiteralValueAtPath(e,t,n);if(this.isUndefined)return;const s=this.getDynamicPropertyKey();return s!==we&&e.length<6?(s!==this.propertyKey&&this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([s,...e],t,n)):Qe}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:eo(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(this.variable)return this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s);if(this.isUndefined)return[Ms,!1];const i=this.getDynamicPropertyKey();return i!==we&&e.length<6?(i!==this.propertyKey&&this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([i,...e],t,n,s)):it}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsChainElement(e){if(this.variable||this.isUndefined)return this.hasEffects(e);const t="hasEffectsAsChainElement"in this.object?this.object.hasEffectsAsChainElement(e):this.object.hasEffects(e);return t===ss?ss:this.optional&&null==this.object.getLiteralValueAtPath(Be,He,this)?t||ss:(this.deoptimized||this.applyDeoptimizations(),t||this.property.hasEffects(e)||this.hasAccessEffect(e))}hasEffectsAsAssignmentTarget(e,t){return t&&!this.deoptimized&&this.applyDeoptimizations(),this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(Be,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||!(e.length<6)||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey(),...e],t,n)}hasEffectsWhenDestructuring(e,t,n){return t.length>0&&n.hasEffectsOnInteractionAtPath(t,lt,e)}include(e,t){this.included||this.includeNode(e),this.object.include(e,t),this.property.include(e,t),t&&this.variable?.includePath(ze,e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.variable?this.scope.context.includeVariableInModule(this.variable,Be,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includeNodeAsAssignmentTarget(e){this.included=!0,this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),this.variable?this.scope.context.includeVariableInModule(this.variable,Be,e):this.isUndefined||this.object.includePath([this.propertyKey],e)}includePath(e,t){this.included||this.includeNode(t),this.variable?this.variable?.includePath(e,t):this.isUndefined||this.object.includePath([this.propertyKey,...e.length<6?e:[...e.slice(0,6),we]],t)}includeAsAssignmentTarget(e,t,n){this.included||this.includeNodeAsAssignmentTarget(e),n&&!this.deoptimized&&this.applyDeoptimizations(),this.object.include(e,t),this.property.include(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.promiseHandler?0===e.length?this.promiseHandler.includeCallArguments(t,n):ot(t,n):this.variable?this.variable.includeCallArgumentsWhenCalledAtPath(e,t,n):!this.isUndefined&&e.length<6?this.object.includeCallArgumentsWhenCalledAtPath(this.propertyKey===we?ze:[this.propertyKey,...e],t,n):ot(t,n)}includeDestructuredIfNecessary(){this.scope.context.error({message:"includeDestructuredIfNecessary is currently not supported for MemberExpressions"},this.start)}initialise(){super.initialise(),this.dynamicPropertyKey=to(this),this.propertyKey=null===this.dynamicPropertyKey?we:this.dynamicPropertyKey,this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=Ee){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:i}}=t;let r=this.variable?this.variable.getName(i):"undefined";n&&s&&(r="0, "+r),e.overwrite(this.start,this.end,r,{contentOnly:!0,storeName:!0})}else n&&s&&e.appendRight(this.start,"0, "),this.object.render(e,t,{renderedSurroundingElement:i}),this.property.render(e,t)}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:1}}applyDeoptimizations(){this.deoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!(this.variable||this.isUndefined||this.promiseHandler)&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[this.propertyKey],He),this.scope.context.requestTreeshakingPass()),this.variable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}applyAssignmentDeoptimization(){this.assignmentDeoptimized=!0;const{propertyReadSideEffects:e}=this.scope.context.options.treeshake;this.bound&&e&&!this.variable&&!this.isUndefined&&(this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.propertyKey],He),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){this.object instanceof Ki&&this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable,ze,es()),this.scope.context.log(xt,bn(this.object.name,this.scope.context.module.id),this.start))}getDynamicPropertyKey(){if(null===this.dynamicPropertyKey){this.dynamicPropertyKey=this.propertyKey;const e=this.property.getLiteralValueAtPath(Be,He,this);return this.dynamicPropertyKey="symbol"==typeof e?Me.has(e)?e:we:String(e)}return this.dynamicPropertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getDynamicPropertyKey()],this.accessInteraction,e))}}function io(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof xs)return null;const s=t[0].key,[i,r]=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(xt,wn(s,n.module.id,i,!!r?.missingButExportExists),t[0].pos),"undefined"}return null}return io(i,t.slice(1),n)}const ro="ROLLUP_FILE_URL_",oo="ROLLUP_FILE_URL_OBJ_",ao="import",lo=["cjs","iife","umd"],co={amd:["document","module","URL"],cjs:["document","require","URL",Rr],es:[],iife:["document","URL",Rr],system:["module"],umd:["document","require","URL",Rr]},uo={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},ho=(e,t,n="URL")=>`new ${n}(${e})${t?"":".href"}`,po=(e,t,n=!1)=>ho(`'${Pr(e)}', ${n?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.tagName.toUpperCase() === 'SCRIPT' && document.currentScript.src || document.baseURI`,t),fo=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},mo=(e,t)=>`require('u' + 'rl').pathToFileURL(${e})${t?"":".href"}`,go=(e,t)=>mo(`__dirname + '/${Pr(e)}'`,t),yo=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${Rr} && ${Rr}.tagName.toUpperCase() === 'SCRIPT' && ${Rr}.src || new URL('${Pr(e)}', document.baseURI).href)`,bo={amd:(e,t)=>("."!==e[0]&&(e="./"+e),ho(`require.toUrl('${Pr(e)}'), document.baseURI`,t)),cjs:(e,t)=>`(typeof document === 'undefined' ? ${go(e,t)} : ${po(e,t)})`,es:(e,t)=>ho(`'${Pr(e)}', import.meta.url`,t),iife:(e,t)=>po(e,t),system:(e,t)=>ho(`'${Pr(e)}', module.meta.url`,t),umd:(e,t)=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${go(e,t)} : ${po(e,t,!0)})`},Eo={amd:fo(()=>ho("module.uri, document.baseURI",!1)),cjs:fo(e=>`(typeof document === 'undefined' ? ${mo("__filename",!1)} : ${yo(e)})`),iife:fo(e=>yo(e)),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:fo(e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${mo("__filename",!1)} : ${yo(e,!0)})`)};class xo extends hs{constructor(){super("undefined")}getLiteralValueAtPath(){}}class vo extends ps{constructor(e,t){super("default",e,e.declaration,Be,t,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const n=e.declaration;(n instanceof Er||n instanceof Qi)&&n.id?(this.hasId=!0,this.originalId=n.id):n instanceof Ki&&(this.originalId=n)}addReference(e){this.hasId||(this.name=e.name)}addUsedPlace(e){const t=this.getOriginalVariable();t===this?super.addUsedPlace(e):t.addUsedPlace(e)}forbidName(e){const t=this.getOriginalVariable();t===this?super.forbidName(e):t.forbidName(e)}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();return e===this?super.getBaseVariableName():e.getBaseVariableName()}getDirectOriginalVariable(){return!this.originalId||!this.hasId&&(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof xo||"syntheticNamespace"in this.originalId.variable)?null:this.originalId.variable}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e,t=this;const n=new Set;do{n.add(t),e=t,t=e.getDirectOriginalVariable()}while(t instanceof vo&&!n.has(t));return this.originalVariable=t||e}}class Ao extends hs{constructor(e){super(e.getModuleName()),this.areAllMembersDeoptimized=!1,this.mergedNamespaces=[],this.nonExplicitNamespacesIncluded=!1,this.referencedEarly=!1,this.references=[],this.context=e,this.module=e.module}addReference(e){this.references.push(e),this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(t.length>1||1===t.length&&2===e.type){const s=t[0];"string"==typeof s?this.module.getExportedVariablesByName().get(s)?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):rt(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];if("string"==typeof t)this.module.getExportedVariablesByName().get(t)?.deoptimizePath(e.slice(1));else if(!this.areAllMembersDeoptimized){this.areAllMembersDeoptimized=!0;for(const e of this.module.getExportedVariablesByName().values())e.deoptimizePath(ze)}}}getLiteralValueAtPath(e){return e[0]===Ne?"Module":Qe}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(0===e.length)return!0;if(1===e.length&&2!==s)return 1===s;const i=e[0];if("string"!=typeof i)return!0;const r=this.module.getExportedVariablesByName().get(i);return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}includePath(e,t){super.includePath(e,t),this.includeMemberPath(e,t)}includeMemberPath(e,t){if(e.length>0){const[n,...s]=e;if("string"==typeof n){const e=this.module.getExportedVariablesByName().get(n);e?this.context.includeVariableInModule(e,s,t):this.includeNonExplicitNamespaces()}else n&&(this.module.includeAllExports(),this.includeNonExplicitNamespaces())}}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Or],e)}renderBlock(e){const{exportNamesByVariable:t,format:n,freeze:s,indent:i,symbols:r,snippets:{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}}=e,h=[...this.module.getExportedVariablesByName().entries()].filter(([e,t])=>!e.startsWith("*")&&t.included).map(([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${Cs(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]);h.unshift([null,`__proto__:${o}null`]);let p=l(h,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map(e=>e.getName(c));p=`/*#__PURE__*/${Or}(${p},${o}[${e.join(`,${o}`)}])`}else r&&(p=`/*#__PURE__*/Object.defineProperty(${p},${o}Symbol.toStringTag,${o}${Zr(l)})`),s&&(p=`/*#__PURE__*/Object.freeze(${p})`);return p=`${a} ${this.getName(c)}${o}=${o}${p};`,"system"===n&&t.has(this)&&(p+=`${u}${ge([this],e)};`),p}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){const{context:n}=e.scope;if(n.getModuleExecIndex()<=t){this.referencedEarly=!0;break}}}includeNonExplicitNamespaces(){this.nonExplicitNamespacesIncluded||(this.nonExplicitNamespacesIncluded=!0,this.setMergedNamespaces(this.module.includeAndGetAdditionalMergedNamespaces()))}}Ao.prototype.isNamespace=!0;const So=e=>Object.create(e,{includePath:{value(t,n){e.includeMemberPath(t,n)}}});class Po extends hs{constructor(e,t,n){super(t),this.baseVariable=null,this.context=e,this.module=e.module,this.syntheticNamespace=n}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;for(;e instanceof vo||e instanceof Po;){if(e instanceof vo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof Po&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}includePath(e,t){super.includePath(e,t),this.context.includeVariableInModule(this.syntheticNamespace,[this.name,...e],t)}setRenderNames(e,t){super.setRenderNames(e,t)}}class $o{constructor(e,t,n){this.options=t,this.inputBase=n,this.defaultVariableName="",this.namespaceVariableName="",this.variableName="",this.fileName=null,this.importAttributes=null,this.id=e.id,this.moduleInfo=e.info,this.renormalizeRenderPath=e.renormalizeRenderPath,this.suggestedVariableName=e.suggestedVariableName}get moduleSideEffects(){return this.moduleInfo.moduleSideEffects}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options,t=this.moduleInfo.rawId;return this.fileName=("function"==typeof e?e(t,{attributes:this.moduleInfo.attributes}):e[t])||(this.renormalizeRenderPath?Z(se(this.inputBase,t)):t)}getImportAttributes(e){return this.importAttributes||=wo(["es","cjs"].includes(this.options.format)&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return Pr(this.renormalizeRenderPath?kt(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function wo(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map(([e,t])=>[e,JSON.stringify(t)]);return n.length>0?t(n,{lineBreakIndent:null}):null}function Io(e){return e.endsWith(".js")?e.slice(0,-3):e}function Co(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Io(t)}`:e.id??""}function ko(e,t,n,s,i,r,o,a,l="return "){const{_:c,getFunctionIntro:u,getPropertyAccess:d,n:h,s:p}=i;if(!n)return`${h}${h}${l}${function(e,t,n,s,i){if(e.length>0)return e[0].local;for(const{defaultVariableName:e,importPath:r,isChunk:o,name:a,namedExportsMode:l,namespaceVariableName:c,reexports:u}of t)if(u)return No(a,u[0].imported,l,o,e,c,n,r,s,i)}(e,t,s,o,d)};`;let f="";if(n)for(const{defaultVariableName:e,importPath:n,isChunk:a,name:l,namedExportsMode:u,namespaceVariableName:p,reexports:m}of t)if(m)for(const t of m)if("*"!==t.reexported){const m=No(l,t.imported,u,a,e,p,s,n,o,d);f&&(f+=h),"*"!==t.imported&&t.needsLiveBinding?f+=`Object.defineProperty(exports,${c}${JSON.stringify(t.reexported)},${c}${Mo(m,!1,r,i)});`:"__proto__"===t.reexported?f+=`Object.defineProperty(exports,${c}"__proto__",${c}{${h}${r}enumerable:${c}true,${h}${r}value:${c}${m}${h}});`:f+=`exports${d(t.reexported)}${c}=${c}${m};`}for(const{exported:t,local:n,needsLiveBinding:s}of e){const e=`exports${d(t)}`,o=n;if(e!==o){if(f&&(f+=h),s){f+=`Object.defineProperty(exports,${c}${JSON.stringify(t)},${c}${Mo(o,!0,r,i)});`;continue}f+="__proto__"===t?`Object.defineProperty(exports,${c}"__proto__",${c}{${h}${r}enumerable:${c}true,${h}${r}value:${c}${o}${h}});`:`${e}${c}=${c}${o};`}}if(n)for(const{name:e,reexports:n}of t)if(n)for(const t of n)if("*"===t.reexported){if(f&&(f+=h),!t.needsLiveBinding&&a){const t="'__proto__'";f+=`Object.prototype.hasOwnProperty.call(${e},${c}${t})${c}&&${h}${r}!Object.prototype.hasOwnProperty.call(exports,${c}${t})${c}&&${h}${r}Object.defineProperty(exports,${c}${t},${c}{${h}${r}${r}enumerable:${c}true,${h}${r}${r}value:${c}${e}[${t}]${h}${r}});${h}${h}`}const n=`{${h}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!Object.prototype.hasOwnProperty.call(exports,${c}k))${c}${Do(e,t.needsLiveBinding,r,i)}${p}${h}}`;f+=`Object.keys(${e}).forEach(${u(["k"],{isAsync:!1,name:null})}${n});`}return f?`${h}${h}${f}`:""}function No(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=Dr[t]?i:e;return Mr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:_r[o(a)])?r:e:`${e}${c(t)}`}function Oo(e){return e([["value","true"]],{lineBreakIndent:null})}function Ro(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",Oo(i)],[null,`[Symbol.toStringTag]:${s}${Zr(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${Oo(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Zr(i)});`}return""}const Do=(e,t,n,s)=>{const{_:i}=s;return t?`Object.defineProperty(exports,${i}k,${i}${Mo(`${e}[k]`,!1,n,s,n)})`:`exports[k]${i}=${i}${e}[k]`},Mo=(e,t,n,{getDirectReturnFunction:s,getObject:i},r="")=>{const[o,a]=s([],{functionReturn:!0,lineBreakIndent:null,name:null}),l=[["enumerable","true"],["get",`${o}${e}${a}`]];return t&&l.unshift(["configurable","true"]),i(l,{lineBreakIndent:{base:r,t:n}})};function _o(e,t,n,s,i,r,o,a){const{_:l,cnst:c,n:u}=a,d=new Set,h=[],p=(e,t,n)=>{d.add(t),h.push(`${c} ${e}${l}=${l}/*#__PURE__*/${t}(${n});`)};for(const{defaultVariableName:n,imports:s,importPath:i,isChunk:r,name:o,namedExportsMode:a,namespaceVariableName:l,reexports:c}of e)if(r){for(const{imported:e,reexported:t}of[...s||[],...c||[]])if("*"===e&&"*"!==t){a||p(l,Nr,o);break}}else{const e=t(i);let r=!1,a=!1;for(const{imported:t,reexported:i}of[...s||[],...c||[]]){let s,c;"default"===t?r||(r=!0,n!==l&&(c=n,s=Dr[e])):"*"!==t||"*"===i||a||(a=!0,s=_r[e],c=l),s&&p(c,s,o)}}return`${Tr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function Lo(e,t,n){const s=n.find(e=>e.sourcePhaseImport);s&&Ht(function(e,t,n){return{code:"SOURCE_PHASE_FORMAT_UNSUPPORTED",message:`Source phase imports are not supported for the "${e}" output format, importing "${n}" in "${t}". Use the "es" output format to support source phase imports.`,url:Nt(Ut)}}(e,t,s.importPath))}function To(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Io(e);var n}const Bo=new Set(["node:assert","assert","node:assert/strict","assert/strict","node:async_hooks","async_hooks","node:bench","node:bench/reporters","node:buffer","buffer","node:child_process","child_process","node:cluster","cluster","node:console","console","node:constants","constants","node:crypto","crypto","node:dgram","dgram","node:diagnostics_channel","diagnostics_channel","node:dns","dns","node:dns/promises","dns/promises","node:domain","domain","node:events","events","node:ffi","node:fs","fs","node:fs/promises","fs/promises","node:http","http","node:http2","http2","node:https","https","node:inspector","inspector","node:inspector/promises","inspector/promises","node:module","module","node:net","net","node:os","os","node:path","path","node:path/posix","path/posix","node:path/win32","path/win32","node:perf_hooks","perf_hooks","node:process","process","node:querystring","querystring","node:quic","node:readline","readline","node:readline/promises","readline/promises","node:repl","repl","node:sea","node:sqlite","node:stream","stream","node:stream/consumers","stream/consumers","node:stream/iter","stream/iter","node:stream/promises","stream/promises","node:stream/web","stream/web","node:string_decoder","string_decoder","node:test","node:test/reporters","node:timers","timers","node:timers/promises","timers/promises","node:tls","tls","node:trace_events","trace_events","node:tty","tty","node:url","url","node:util","util","node:util/types","util/types","node:v8","v8","node:vfs","node:vm","vm","node:wasi","wasi","node:worker_threads","worker_threads","node:zlib","zlib","node:zlib/iter","zlib/iter"]);function zo(e,t){const n=t.map(({importPath:e})=>e).filter(e=>Bo.has(e)||e.startsWith("node:"));0!==n.length&&e(xt,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${Pt(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Fo=(e,t)=>e.split(".").map(t).join("");function Vo(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in Object.prototype;o&&l&&o(xt,Rn(a[0])),a[0]=("function"==typeof n?n(a[0],{attributes:{}}):l?a[0]:n[a[0]])||a[0];const c=a.pop();let u=t,d=[...a.map(e=>(u+=r(e),`${u}${i}=${i}${u}${i}||${i}{}`)),`${u}${r(c)}`].join(`,${i}`)+`${i}=${i}${s}`;return a.length>0&&(d=`(${d})`),d}function jo(e){let t=e.length;for(;t--;){const{imports:n,reexports:s}=e[t];if(n||s)return e.slice(0,t+1)}return[]}const Uo="_missingExportShim",Go=({dependencies:e,exports:t})=>{const n=new Set(t.map(e=>e.exported));n.add("default");for(const{reexports:t}of e)if(t)for(const e of t)"*"!==e.reexported&&n.add(e.reexported);return n},Ho=(e,t,{_:n,cnst:s,getObject:i,n:r})=>{if(e){const o=[...e].map(e=>[e,"1"]);return o.unshift([null,`__proto__:${n}null`]),`${r}${t}${s} _starExcludes${n}=${n}${i(o,{lineBreakIndent:{base:t,t:t}})};`}return""},Wo=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",qo=(e,t,n)=>Ko(e.filter(e=>e.hoisted).map(e=>({name:e.exported,value:e.local})),t,n);function Ko(e,t,{_:n,n:s}){return 0===e.length?"":1===e.length?`exports(${JSON.stringify(e[0].name)},${n}${e[0].value});${s}${s}`:`exports({${s}`+e.map(({name:e,value:s})=>`${t}${Cs(e)}:${n}${s}`).join(`,${s}`)+`${s}});${s}${s}`}const Xo=(e,t,n)=>Ko(e.filter(e=>e.expression).map(e=>({name:e.exported,value:e.local})),t,n),Jo=(e,t,n)=>Ko(e.filter(e=>e.local===Uo).map(e=>({name:e.exported,value:Uo})),t,n);function Yo(e,t,n){return e?`${t}${Fo(e,n)}`:"null"}var Zo={amd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,log:h,outro:p,snippets:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:b,generatedCode:{symbols:E},interop:x,reexportProtoFromExternal:v,strict:A}){zo(h,n),Lo("amd",o,n);const S=n.map(e=>`'${To(e.importPath,m.forceJsExtensionForImports)}'`),P=n.map(e=>e.name),{n:$,getNonArrowFunctionIntro:w,_:I}=f;r&&(d||"exports.default"===s[0]?.local)&&(P.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(P.unshift("require"),S.unshift("'require'")),t.has("module")&&(P.unshift("module"),S.unshift("'module'"));const C=Co(m,o),k=(C?`'${C}',${I}`:"")+(S.length>0?`[${S.join(`,${I}`)}],${I}`:""),N=A?`${I}'use strict';`:"";e.prepend(`${l}${_o(n,x,y,b,E,t,a,f)}`);const O=ko(s,n,d,x,f,a,y,v);let R=Ro(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);R&&(R=$+$+R),e.append(`${O}${R}${p}`).indent(a).prepend(`${m.define}(${k}(${w(P,{isAsync:!1,name:null})}{${N}${$}${$}`).append(`${$}${$}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:d,outro:h,snippets:p},{compact:f,esModule:m,externalLiveBindings:g,freeze:y,interop:b,generatedCode:{symbols:E},reexportProtoFromExternal:x,strict:v}){Lo("cjs",o,n);const{_:A,n:S}=p,P=v?`'use strict';${S}${S}`:"";let $=Ro(d&&r,c&&(!0===m||"if-default-prop"===m&&i),u&&E,p);$&&($+=S+S);const w=function(e,{_:t,cnst:n,n:s},i){let r="",o=!1;for(const{importPath:a,name:l,reexports:c,imports:u}of e)c||u?(r+=i&&o?",":`${r?`;${s}`:""}${n} `,o=!0,r+=`${l}${t}=${t}require('${a}')`):(r&&(r+=i&&!o?",":`;${s}`),o=!1,r+=`require('${a}')`);return r?`${r};${s}${s}`:""}(n,p,f),I=_o(n,b,g,y,E,t,a,p);e.prepend(`${P}${l}${$}${w}${I}`);const C=ko(s,n,d,b,p,a,g,x,`module.exports${A}=${A}`);e.append(`${C}${h}`)},es:function(e,{accessedGlobals:t,indent:n,intro:s,outro:i,dependencies:r,exports:o,snippets:a},{externalLiveBindings:l,freeze:c,generatedCode:{symbols:u},importAttributesKey:d}){const{n:h}=a,p=function(e,t,{_:n}){const s=[];for(const{importPath:i,reexports:r,imports:o,name:a,attributes:l,sourcePhaseImport:c}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(c&&s.push(`import source ${c} from${n}${e}`),r||o){if(o){let t=null,i=null;const r=[];for(const e of o)"default"===e.imported?t=e:"*"===e.imported?i=e:r.push(e);i&&s.push(`import${n}*${n}as ${i.local} from${n}${e}`),t&&0===r.length?s.push(`import ${t.local} from${n}${e}`):r.length>0&&s.push(`import ${t?`${t.local},${n}`:""}{${n}${r.map(e=>e.imported===e.local?e.imported:`${ks(e.imported)} as ${e.local}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}if(r){let t=null;const i=[],l=[];for(const e of r)"*"===e.reexported?t=e:"*"===e.imported?i.push(e):l.push(e);if(t&&s.push(`export${n}*${n}from${n}${e}`),i.length>0){o&&o.some(e=>"*"===e.imported&&e.local===a)||s.push(`import${n}*${n}as ${a} from${n}${e}`);for(const e of i)s.push(`export${n}{${n}${a===e.reexported?a:`${a} as ${ks(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map(e=>e.imported===e.reexported?ks(e.imported):`${ks(e.imported)} as ${ks(e.reexported)}`).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else c||s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=Tr(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=new Array(e.length);let r=0;for(const o of e)o.expression&&s.push(`${n} ${o.local}${t}=${t}${o.expression};`),i[r++]=o.exported===o.local?o.local:`${o.local} as ${ks(o.exported)}`;return i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`),s}(o,a);f.length>0&&e.append(h+h+f.join(h).trim()),i&&e.append(i),e.trim()},iife:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{compact:p,esModule:f,extend:m,freeze:g,externalLiveBindings:y,reexportProtoFromExternal:b,globals:E,interop:x,name:v,generatedCode:{symbols:A},strict:S}){Lo("iife",o,n);const{_:P,getNonArrowFunctionIntro:$,getPropertyAccess:w,n:I}=h,C=v&&v.includes("."),k=!m&&!C;if(v&&k&&(Ps(N=v)||Ss.test(N)))return Ht(function(e){return{code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:Nt("configuration-options/#output-extend")}}(v));var N;zo(u,n);const O=jo(n),R=O.map(e=>e.globalName||"null"),D=O.map(e=>e.name);r&&!v&&u(xt,{code:nn,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Nt(Vt)}),r&&(c||"exports.default"===s[0]?.local)&&(m?(R.unshift(`this${Fo(v,w)}${P}=${P}this${Fo(v,w)}${P}||${P}{}`),D.unshift("exports")):(R.unshift("{}"),D.unshift("exports")));const M=S?`${a}'use strict';${I}`:"",_=_o(n,x,y,g,A,t,a,h);e.prepend(`${l}${_}`);let L=`(${$(D,{isAsync:!1,name:null})}{${I}${M}${I}`;r&&(!v||m&&c||(L=(k?`var ${v}`:`this${Fo(v,w)}`)+`${P}=${P}${L}`),C&&(L=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in Object.prototype;a&&c&&a(xt,Rn(l[0])),l[0]=("function"==typeof n?n(l[0],{attributes:{}}):c?l[0]:n[l[0]])||l[0],l.pop();let u=t;return l.map(e=>(u+=i(e),`${u}${s}=${s}${u}${s}||${s}{}${r}`)).join(o?",":"\n")+(o&&l.length>0?";":"\n")}(v,"this",E,h,p,u)+L));let T=`${I}${I}})(${R.join(`,${P}`)});`;r&&!m&&c&&(T=`${I}${I}${a}return exports;${T}`);const B=ko(s,n,c,x,h,a,y,b);let z=Ro(c&&r,!0===f||"if-default-prop"===f&&i,A,h);z&&(z=I+I+z),e.append(`${B}${z}${d}`).indent(a).prepend(L).append(T)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,id:r,indent:o,intro:a,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:d,freeze:h,name:p,generatedCode:{symbols:f},strict:m,systemNullSetters:g}){Lo("system",r,n);const{_:y,getFunctionIntro:b,getNonArrowFunctionIntro:E,n:x,s:v}=l,{importBindings:A,setters:S,starExcludes:P}=function(e,t,n,{_:s,cnst:i,getObject:r,getPropertyAccess:o,n:a}){const l=[],c=[];let u=null;for(const{imports:d,reexports:h}of e){const p=[];if(d)for(const e of d)l.push(e.local),"*"===e.imported?p.push(`${e.local}${s}=${s}module;`):p.push(`${e.local}${s}=${s}module${o(e.imported)};`);if(h){const a=[];let l=!1;for(const{imported:e,reexported:t}of h)"*"===t?l=!0:a.push([t,"*"===e?"module":`module${o(e)}`]);if(a.length>1||l)if(l){u||(u=Go({dependencies:e,exports:t})),a.unshift([null,`__proto__:${s}null`]);const o=r(a,{lineBreakIndent:null});p.push(`${i} setter${s}=${s}${o};`,`for${s}(${i} name in module)${s}{`,`${n}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{const e=r(a,{lineBreakIndent:null});p.push(`exports(${e});`)}else{const[e,t]=a[0];p.push(`exports(${JSON.stringify(e)},${s}${t});`)}}c.push(p.join(`${a}${n}${n}${n}`))}return{importBindings:l,setters:c,starExcludes:u}}(n,s,o,l),$=p?`'${p}',${y}`:"",w=t.has("module")?["exports","module"]:i?["exports"]:[];let I=`System.register(${$}[`+n.map(({importPath:e})=>`'${e}'`).join(`,${y}`)+`],${y}(${E(w,{isAsync:!1,name:null})}{${x}${o}${m?"'use strict';":""}`+Ho(P,o,l)+Wo(A,o,l)+`${x}${o}return${y}{${S.length>0?`${x}${o}${o}setters:${y}[${S.map(e=>e?`${b(["module"],{isAsync:!1,name:null})}{${x}${o}${o}${o}${e}${x}${o}${o}}`:g?"null":`${b([],{isAsync:!1,name:null})}{}`).join(`,${y}`)}],`:""}${x}`;I+=`${o}${o}execute:${y}(${E([],{isAsync:u,name:null})}{${x}${x}`;const C=`${o}${o}})${x}${o}}${v}${x}}));`;e.prepend(a+Tr(null,t,o,l,d,h,f)+qo(s,o,l)).append(`${c}${x}${x}`+Xo(s,o,l)+Jo(s,o,l)).indent(`${o}${o}${o}`).append(C).prepend(I)},umd:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,id:o,indent:a,intro:l,namedExportsMode:c,log:u,outro:d,snippets:h},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:b,interop:E,name:x,generatedCode:{symbols:v},globals:A,noConflict:S,reexportProtoFromExternal:P,strict:$}){const{_:w,cnst:I,getFunctionIntro:C,getNonArrowFunctionIntro:k,getPropertyAccess:N,n:O,s:R}=h,D=f?"f":"factory",M=f?"g":"global";if(r&&!x)return Ht({code:nn,message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.',url:Nt(Vt)});Lo("umd",o,n),zo(u,n);const _=n.map(e=>`'${To(e.importPath,p.forceJsExtensionForImports)}'`),L=n.map(e=>`require('${e.importPath}')`),T=jo(n),B=T.map(e=>Yo(e.globalName,M,N)),z=T.map(e=>e.name);(r||S)&&(c||r&&"exports.default"===s[0]?.local)&&(_.unshift("'exports'"),L.unshift("exports"),B.unshift(Vo(x,M,A,(g?`${Yo(x,M,N)}${w}||${w}`:"")+"{}",h,u)),z.unshift("exports"));const F=Co(p,o),V=(F?`'${F}',${w}`:"")+(_.length>0?`[${_.join(`,${w}`)}],${w}`:""),j=p.define,U=!c&&r?`module.exports${w}=${w}`:"",G=$?`${w}'use strict';${O}`:"";let H;if(S){const e=f?"e":"exports";let t;t=!c&&r?`${I} ${e}${w}=${w}${Vo(x,M,A,`${D}(${B.join(`,${w}`)})`,h,u)};`:`${I} ${e}${w}=${w}${B.shift()};${O}${a}${a}${D}(${[e,...B].join(`,${w}`)});`,H=`(${C([],{isAsync:!1,name:null})}{${O}${a}${a}${I} current${w}=${w}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map(e=>i+=s(e)).join(`${n}&&${n}`)}(x,M,h)};${O}${a}${a}${t}${O}${a}${a}${e}.noConflict${w}=${w}${C([],{isAsync:!1,name:null})}{${w}${Yo(x,M,N)}${w}=${w}current;${w}return ${e}${R}${w}};${O}${a}})()`}else H=`${D}(${B.join(`,${w}`)})`,!c&&r&&(H=Vo(x,M,A,H,h,u));const W=r||S&&c||B.length>0,q=[D];W&&q.unshift(M);const K=W?`this,${w}`:"",X=W?`(${M}${w}=${w}typeof globalThis${w}!==${w}'undefined'${w}?${w}globalThis${w}:${w}${M}${w}||${w}self,${w}`:"",J=W?")":"",Y=W?`${a}typeof exports${w}===${w}'object'${w}&&${w}typeof module${w}!==${w}'undefined'${w}?${w}${U}${D}(${L.join(`,${w}`)})${w}:${O}`:"",Z=`(${k(q,{isAsync:!1,name:null})}{${O}`+Y+`${a}typeof ${j}${w}===${w}'function'${w}&&${w}${j}.amd${w}?${w}${j}(${V}${D})${w}:${O}`+`${a}${X}${H}${J};${O}`+`})(${K}(${k(z,{isAsync:!1,name:null})}{${G}${O}`,Q=O+O+"}));";e.prepend(`${l}${_o(n,E,y,b,v,t,a,h)}`);const ee=ko(s,n,c,E,h,a,y,P);let te=Ro(c&&r,!0===m||"if-default-prop"===m&&i,v,h);te&&(te=O+O+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};function Qo(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var ea,ta,na,sa,ia,ra,oa,aa,la,ca,ua,da={};function ha(){if(ta)return ea;ta=1;const e="\\\\/",t=`[^${e}]`,n="\\.",s="\\/",i="[^/]",r=`(?:${s}|$)`,o=`(?:^|${s})`,a=`${n}{1,2}${r}`,l={DOT_LITERAL:n,PLUS_LITERAL:"\\+",QMARK_LITERAL:"\\?",SLASH_LITERAL:s,ONE_CHAR:"(?=.)",QMARK:i,END_ANCHOR:r,DOTS_SLASH:a,NO_DOT:`(?!${n})`,NO_DOTS:`(?!${o}${a})`,NO_DOT_SLASH:`(?!${n}{0,1}${r})`,NO_DOTS_SLASH:`(?!${a})`,QMARK_NO_DOT:`[^.${s}]`,STAR:`${i}*?`,START_ANCHOR:o,SEP:"/"},c={...l,SLASH_LITERAL:`[${e}]`,QMARK:t,STAR:`${t}*?`,DOTS_SLASH:`${n}{1,2}(?:[${e}]|$)`,NO_DOT:`(?!${n})`,NO_DOTS:`(?!(?:^|[${e}])${n}{1,2}(?:[${e}]|$))`,NO_DOT_SLASH:`(?!${n}{0,1}(?:[${e}]|$))`,NO_DOTS_SLASH:`(?!${n}{1,2}(?:[${e}]|$))`,QMARK_NO_DOT:`[^.${e}]`,START_ANCHOR:`(?:^|[${e}])`,END_ANCHOR:`(?:[${e}]|$)`,SEP:"\\"};return ea={DEFAULT_MAX_EXTGLOB_RECURSION:0,MAX_LENGTH:65536,POSIX_REGEX_SOURCE:{__proto__:null,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"},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:{__proto__:null,"***":"*","**/**":"**","**/**/**":"**"},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,extglobChars:e=>({"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}),globChars:e=>!0===e?c:l},ea}function pa(){return na||(na=1,function(e){const{REGEX_BACKSLASH:t,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:s,REGEX_SPECIAL_CHARS_GLOBAL:i}=ha();e.isObject=e=>null!==e&&"object"==typeof e&&!Array.isArray(e),e.hasRegexChars=e=>s.test(e),e.isRegexChar=t=>1===t.length&&e.hasRegexChars(t),e.escapeRegex=e=>e.replace(i,"\\$1"),e.toPosixSlashes=e=>e.replace(t,"/"),e.isWindows=()=>{if("undefined"!=typeof navigator&&navigator.platform){const e=navigator.platform.toLowerCase();return"win32"===e||"windows"===e}return!("undefined"==typeof process||!process.platform)&&"win32"===process.platform},e.removeBackslashes=e=>e.replace(n,e=>"\\"===e?"":e),e.escapeLast=(t,n,s)=>{const i=t.lastIndexOf(n,s);return-1===i?t:"\\"===t[i-1]?e.escapeLast(t,n,i-1):`${t.slice(0,i)}\\${t.slice(i)}`},e.removePrefix=(e,t={})=>{let n=e;return n.startsWith("./")&&(n=n.slice(2),t.prefix="./"),n},e.wrapOutput=(e,t={},n={})=>{let s=`${n.contains?"":"^"}(?:${e})${n.contains?"":"$"}`;return!0===t.negated&&(s=`(?:^(?!${s}).*$)`),s},e.basename=(e,{windows:t}={})=>{const n=e.split(t?/[\\/]/:"/"),s=n[n.length-1];return""===s?n[n.length-2]:s}}(da)),da}function fa(){if(ia)return sa;ia=1;const e=pa(),{CHAR_ASTERISK:t,CHAR_AT:n,CHAR_BACKWARD_SLASH:s,CHAR_COMMA:i,CHAR_DOT:r,CHAR_EXCLAMATION_MARK:o,CHAR_FORWARD_SLASH:a,CHAR_LEFT_CURLY_BRACE:l,CHAR_LEFT_PARENTHESES:c,CHAR_LEFT_SQUARE_BRACKET:u,CHAR_PLUS:d,CHAR_QUESTION_MARK:h,CHAR_RIGHT_CURLY_BRACE:p,CHAR_RIGHT_PARENTHESES:f,CHAR_RIGHT_SQUARE_BRACKET:m}=ha(),g=e=>e===a||e===s,y=e=>{!0!==e.isPrefix&&(e.depth=e.isGlobstar?1/0:1)};return sa=(b,E)=>{const x=E||{},v=b.length-1,A=!0===x.parts||!0===x.tokens||!0===x.scanToEnd,S=[],P=[],$=[];let w,I,C=b,k=-1,N=0,O=0,R=!1,D=!1,M=!1,_=!1,L=!1,T=!1,B=!1,z=!1,F=!1,V=!1,j=0,U={value:"",depth:0,isGlob:!1};const G=()=>k>=v,H=()=>C.charCodeAt(k+1),W=()=>(w=I,C.charCodeAt(++k));for(;k<v;){let e;if(I=W(),I!==s){if(!0===T||I===l){for(j++;!0!==G()&&(I=W());)if(I!==s)if(I!==l){if(!0!==T&&I===r&&(I=W())===r){if(R=U.isBrace=!0,M=U.isGlob=!0,V=!0,!0===A)continue;break}if(!0!==T&&I===i){if(R=U.isBrace=!0,M=U.isGlob=!0,V=!0,!0===A)continue;break}if(I===p&&(j--,0===j)){T=!1,R=U.isBrace=!0,V=!0;break}}else j++;else B=U.backslashes=!0,W();if(!0===A)continue;break}if(I!==a){if(!0!==x.noext&&!0==(I===d||I===n||I===t||I===h||I===o)&&H()===c){if(M=U.isGlob=!0,_=U.isExtglob=!0,V=!0,I===o&&k===N&&(F=!0),!0===A){let e=0;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){V=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}if(I===t){if(w===t&&(L=U.isGlobstar=!0),M=U.isGlob=!0,V=!0,!0===A)continue;break}if(I===h){if(M=U.isGlob=!0,V=!0,!0===A)continue;break}if(I===u){for(;!0!==G()&&(e=W());)if(e!==s){if(e===m){D=U.isBracket=!0,M=U.isGlob=!0,V=!0;break}}else B=U.backslashes=!0,W();if(!0===A)continue;break}if(!0===x.nonegate||I!==o||k!==N){if(!0!==x.noparen&&I===c){if(M=U.isGlob=!0,!0===A){let e=1;for(;!0!==G()&&(I=W());)if(I!==s)if(I!==c){if(I===f&&0===--e){V=!0;break}}else e++;else B=U.backslashes=!0,W();continue}break}if(!0===M){if(V=!0,!0===A)continue;break}}else z=U.negated=!0,N++}else{if(S.push(k),P.push(U),U={value:"",depth:0,isGlob:!1},!0===V)continue;if(w===r&&k===N+1){N+=2;continue}O=k+1}}else B=U.backslashes=!0,I=W(),I===l&&(T=!0)}!0===x.noext&&(_=!1,M=!1);let q=C,K="",X="";N>0&&(K=C.slice(0,N),C=C.slice(N),O-=N),q&&!0===M&&O>0?(q=C.slice(0,O),X=C.slice(O)):!0===M?(q="",X=C):q=C,q&&""!==q&&"/"!==q&&q!==C&&g(q.charCodeAt(q.length-1))&&(q=q.slice(0,-1)),!0===x.unescape&&(X&&(X=e.removeBackslashes(X)),q&&!0===B&&(q=e.removeBackslashes(q)));const J={prefix:K,input:b,start:N,base:q,glob:X,isBrace:R,isBracket:D,isGlob:M,isExtglob:_,isGlobstar:L,negated:z,negatedExtglob:F};if(!0===x.tokens&&(J.maxDepth=0,g(I)||P.push(U),J.tokens=P),!0===x.parts||!0===x.tokens){let e;for(let t=0;t<S.length;t++){const n=void 0!==e?e+1:N,s=S[t],i=b.slice(n,s);x.tokens&&(0===t&&0!==N?(P[t].isPrefix=!0,P[t].value=K):P[t].value=i,y(P[t]),J.maxDepth+=P[t].depth),s>=N&&($.push(i),e=s)}const t=void 0!==e?e+1:N,n=b.slice(t);$.push(n),x.tokens&&e&&e+1<b.length&&(P[P.length-1].value=n,y(P[P.length-1]),J.maxDepth+=P[P.length-1].depth),J.slashes=S,J.parts=$}return J},sa}function ma(){if(oa)return ra;oa=1;const e=ha(),t=pa(),{MAX_LENGTH:n,POSIX_REGEX_SOURCE:s,REGEX_NON_SPECIAL_CHARS:i,REGEX_SPECIAL_CHARS_BACKREF:r,REPLACEMENTS:o}=e,a=(e,t)=>"function"==typeof t.expandRange?t.expandRange(...e,t):(e.sort(),`[${e.join("-")}]`),l=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`,c=e=>{const t=[];let n=0,s=0,i=0,r="",o=!1;for(const a of e)if(!0!==o)if("\\"!==a)if('"'!==a){if(0===i)if("["===a)n++;else if("]"===a&&n>0)n--;else if(0===n)if("("===a)s++;else if(")"===a&&s>0)s--;else if("|"===a&&0===s){t.push(r),r="";continue}r+=a}else i=1===i?0:1,r+=a;else r+=a,o=!0;else r+=a,o=!1;return t.push(r),t},u=e=>{let t=e.trim(),n=!0;for(;!0===n;)n=!1,/^@\([^\\()[\]{}|]+\)$/.test(t)&&(t=t.slice(2,-1),n=!0);if((e=>{let t=!1;for(const n of e)if(!0!==t)if("\\"!==n){if(/[?*+@!()[\]{}]/.test(n))return!1}else t=!0;else t=!1;return!0})(t))return t.replace(/\\(.)/g,"$1")},d=(e,t=!0)=>{if("+"!==e[0]&&"*"!==e[0]||"("!==e[1])return;let n=0,s=0,i=0,r=!1;for(let o=1;o<e.length;o++){const a=e[o];if(!0!==r)if("\\"!==a)if('"'!==a){if(1!==i)if("["!==a){if("]"===a&&n>0)n--;else if(!(n>0))if("("!==a){if(")"===a&&(s--,0===s)){if(!0===t&&o!==e.length-1)return;return{type:e[0],body:e.slice(2,o),end:o}}}else s++}else n++}else i=1===i?0:1;else r=!0;else r=!1}},h=e=>`${1===e.length?t.escapeRegex(e[0]):`[${e.map(e=>t.escapeRegex(e)).join("")}]`}*`,p=e=>{let t=0;const n=[];for(;t<e.length;){const s=d(e.slice(t),!1);if(!s||"*"!==s.type)return;const i=c(s.body).map(e=>e.trim());if(1!==i.length)return;const r=u(i[0]);if(!r||1!==r.length)return;n.push(r),t+=s.end+1}if(!(n.length<1))return n},f=e=>{let t=0,n=e.trim(),s=d(n);for(;s;)t++,n=s.body.trim(),s=d(n);return t},m=(t,n)=>{if(!1===n.maxExtglobRecursion)return{risky:!1};const s="number"==typeof n.maxExtglobRecursion?n.maxExtglobRecursion:e.DEFAULT_MAX_EXTGLOB_RECURSION,i=c(t).map(e=>e.trim());if(i.length>1&&(i.some(e=>""===e)||i.some(e=>/^[*?]+$/.test(e))||(e=>{const t=e.map(u).filter(Boolean);for(let e=0;e<t.length;e++)for(let n=e+1;n<t.length;n++){const s=t[e],i=t[n],r=s[0];if(r&&s===r.repeat(s.length)&&i===r.repeat(i.length)&&(s===i||s.startsWith(i)||i.startsWith(s)))return!0}return!1})(i)))return{risky:!0};const r=[];let o=!1,a=!0;for(const e of i){const t=p(e);if(t){o=!0,r.push(...t);continue}const n=u(e);if(n&&1===n.length)r.push(n);else if(a=!1,f(e)>s)return{risky:!0}}return o?a?{risky:!0,safeOutput:h([...new Set(r)])}:{risky:!0}:{risky:!1}},g=(c,u)=>{if("string"!=typeof c)throw new TypeError("Expected a string");c=o[c]||c;const d={...u},h="number"==typeof d.maxLength?Math.min(n,d.maxLength):n;let p=c.length;if(p>h)throw new SyntaxError(`Input length: ${p}, exceeds maximum allowed length: ${h}`);const f={type:"bos",value:"",output:d.prepend||""},y=[f],b=d.capture?"":"?:",E=e.globChars(d.windows),x=e.extglobChars(E),{DOT_LITERAL:v,PLUS_LITERAL:A,SLASH_LITERAL:S,ONE_CHAR:P,DOTS_SLASH:$,NO_DOT:w,NO_DOT_SLASH:I,NO_DOTS_SLASH:C,QMARK:k,QMARK_NO_DOT:N,STAR:O,START_ANCHOR:R}=E,D=e=>`(${b}(?:(?!${R}${e.dot?$:v}).)*?)`,M=d.dot?"":w,_=d.dot?k:N;let L=!0===d.bash?D(d):O;d.capture&&(L=`(${L})`),"boolean"==typeof d.noext&&(d.noextglob=d.noext);const T={input:c,index:-1,start:0,dot:!0===d.dot,consumed:"",output:"",prefix:"",backtrack:!1,negated:!1,brackets:0,braces:0,parens:0,quotes:0,globstar:!1,tokens:y};c=t.removePrefix(c,T),p=c.length;const B=[],z=[],F=[];let V,j=f;const U=()=>T.index===p-1,G=T.peek=(e=1)=>c[T.index+e],H=T.advance=()=>c[++T.index]||"",W=()=>c.slice(T.index+1),q=(e="",t=0)=>{T.consumed+=e,T.index+=t},K=e=>{T.output+=null!=e.output?e.output:e.value,q(e.value)},X=()=>{let e=1;for(;"!"===G()&&("("!==G(2)||"?"===G(3));)H(),T.start++,e++;return e%2!=0&&(T.negated=!0,T.start++,!0)},J=e=>{T[e]++,F.push(e)},Y=e=>{T[e]--,F.pop()},Z=e=>{if("globstar"===j.type){const t=T.braces>0&&("comma"===e.type||"brace"===e.type),n=!0===e.extglob||B.length&&("pipe"===e.type||"paren"===e.type);"slash"===e.type||"paren"===e.type||t||n||(T.output=T.output.slice(0,-j.output.length),j.type="star",j.value="*",j.output=L,T.output+=j.output)}if(B.length&&"paren"!==e.type&&(B[B.length-1].inner+=e.value),(e.value||e.output)&&K(e),j&&"text"===j.type&&"text"===e.type)return j.output=(j.output||j.value)+e.value,void(j.value+=e.value);e.prev=j,y.push(e),j=e},Q=(e,t)=>{const n={...x[t],conditions:1,inner:""};n.prev=j,n.parens=T.parens,n.output=T.output,n.startIndex=T.index,n.tokensIndex=y.length;const s=(d.capture?"(":"")+n.open;J("parens"),Z({type:e,value:t,output:T.output?"":P}),Z({type:"paren",extglob:!0,value:H(),output:s}),B.push(n)},ee=e=>{const n=c.slice(e.startIndex,T.index+1),s=c.slice(e.startIndex+2,T.index),i=m(s,d);if(("plus"===e.type||"star"===e.type)&&i.risky){const s=i.safeOutput?(e.output?"":P)+(d.capture?`(${i.safeOutput})`:i.safeOutput):void 0,r=y[e.tokensIndex];r.type="text",r.value=n,r.output=s||t.escapeRegex(n);for(let t=e.tokensIndex+1;t<y.length;t++)y[t].value="",y[t].output="",delete y[t].suffix;return T.output=e.output+r.output,T.backtrack=!0,Z({type:"paren",extglob:!0,value:V,output:""}),void Y("parens")}let r,o=e.close+(d.capture?")":"");if("negate"===e.type){let t=L;if(e.inner&&e.inner.length>1&&e.inner.includes("/")&&(t=D(d)),(t!==L||U()||/^\)+$/.test(W()))&&(o=e.close=`)$))${t}`),e.inner.includes("*")&&(r=W())&&/^\.[^\\/.]+$/.test(r)){const n=g(r,{...u,fastpaths:!1}).output;o=e.close=`)${n})${t})`}"bos"===e.prev.type&&(T.negatedExtglob=!0)}Z({type:"paren",extglob:!0,value:V,output:o}),Y("parens")};if(!1!==d.fastpaths&&!/(^[*!]|[/()[\]{}"])/.test(c)){let e=!1,n=c.replace(r,(t,n,s,i,r,o)=>"\\"===i?(e=!0,t):"?"===i?n?n+i+(r?k.repeat(r.length):""):0===o?_+(r?k.repeat(r.length):""):k.repeat(s.length):"."===i?v.repeat(s.length):"*"===i?n?n+i+(r?L:""):L:n?t:`\\${t}`);return!0===e&&(n=!0===d.unescape?n.replace(/\\/g,""):n.replace(/\\+/g,e=>e.length%2==0?"\\\\":e?"\\":"")),n===c&&!0===d.contains?(T.output=c,T):(T.output=t.wrapOutput(n,T,u),T)}for(;!U();){if(V=H(),"\0"===V)continue;if("\\"===V){const e=G();if("/"===e&&!0!==d.bash)continue;if("."===e||";"===e)continue;if(!e){V+="\\",Z({type:"text",value:V});continue}const t=/^\\+/.exec(W());let n=0;if(t&&t[0].length>2&&(n=t[0].length,T.index+=n,n%2!=0&&(V+="\\")),!0===d.unescape?V=H():V+=H(),0===T.brackets){Z({type:"text",value:V});continue}}if(T.brackets>0&&("]"!==V||"["===j.value||"[^"===j.value)){if(!1!==d.posix&&":"===V){const e=j.value.slice(1);if(e.includes("[")&&(j.posix=!0,e.includes(":"))){const e=j.value.lastIndexOf("["),t=j.value.slice(0,e),n=j.value.slice(e+2),i=s[n];if(i){j.value=t+i,T.backtrack=!0,H(),f.output||1!==y.indexOf(j)||(f.output=P);continue}}}("["===V&&":"!==G()||"-"===V&&"]"===G())&&(V=`\\${V}`),"]"!==V||"["!==j.value&&"[^"!==j.value||(V=`\\${V}`),!0===d.posix&&"!"===V&&"["===j.value&&(V="^"),j.value+=V,K({value:V});continue}if(1===T.quotes&&'"'!==V){V=t.escapeRegex(V),j.value+=V,K({value:V});continue}if('"'===V){T.quotes=1===T.quotes?0:1,!0===d.keepQuotes&&Z({type:"text",value:V});continue}if("("===V){J("parens"),Z({type:"paren",value:V});continue}if(")"===V){if(0===T.parens&&!0===d.strictBrackets)throw new SyntaxError(l("opening","("));const e=B[B.length-1];if(e&&T.parens===e.parens+1){ee(B.pop());continue}Z({type:"paren",value:V,output:T.parens?")":"\\)"}),Y("parens");continue}if("["===V){if(!0!==d.nobracket&&W().includes("]"))J("brackets");else{if(!0!==d.nobracket&&!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));V=`\\${V}`}Z({type:"bracket",value:V});continue}if("]"===V){if(!0===d.nobracket||j&&"bracket"===j.type&&1===j.value.length){Z({type:"text",value:V,output:`\\${V}`});continue}if(0===T.brackets){if(!0===d.strictBrackets)throw new SyntaxError(l("opening","["));Z({type:"text",value:V,output:`\\${V}`});continue}Y("brackets");const e=j.value.slice(1);if(!0===j.posix||"^"!==e[0]||e.includes("/")||(V=`/${V}`),j.value+=V,K({value:V}),!1===d.literalBrackets||t.hasRegexChars(e))continue;const n=t.escapeRegex(j.value);if(T.output=T.output.slice(0,-j.value.length),!0===d.literalBrackets){T.output+=n,j.value=n;continue}j.value=`(${b}${n}|${j.value})`,T.output+=j.value;continue}if("{"===V&&!0!==d.nobrace){J("braces");const e={type:"brace",value:V,output:"(",outputIndex:T.output.length,tokensIndex:T.tokens.length};z.push(e),Z(e);continue}if("}"===V){const e=z[z.length-1];if(!0===d.nobrace||!e){Z({type:"text",value:V,output:V});continue}let t=")";if(!0===e.dots){const e=y.slice(),n=[];for(let t=e.length-1;t>=0&&(y.pop(),"brace"!==e[t].type);t--)"dots"!==e[t].type&&n.unshift(e[t].value);t=a(n,d),T.backtrack=!0}if(!0!==e.comma&&!0!==e.dots){const n=T.output.slice(0,e.outputIndex),s=T.tokens.slice(e.tokensIndex);e.value=e.output="\\{",V=t="\\}",T.output=n;for(const e of s)T.output+=e.output||e.value}Z({type:"brace",value:V,output:t}),Y("braces"),z.pop();continue}if("|"===V){B.length>0&&B[B.length-1].conditions++,Z({type:"text",value:V});continue}if(","===V){let e=V;const t=z[z.length-1];t&&"braces"===F[F.length-1]&&(t.comma=!0,e="|"),Z({type:"comma",value:V,output:e});continue}if("/"===V){if("dot"===j.type&&T.index===T.start+1){T.start=T.index+1,T.consumed="",T.output="",y.pop(),j=f;continue}Z({type:"slash",value:V,output:S});continue}if("."===V){if(T.braces>0&&"dot"===j.type){"."===j.value&&(j.output=v);const e=z[z.length-1];j.type="dots",j.output+=V,j.value+=V,e.dots=!0;continue}if(T.braces+T.parens===0&&"bos"!==j.type&&"slash"!==j.type){Z({type:"text",value:V,output:v});continue}Z({type:"dot",value:V,output:v});continue}if("?"===V){if((!j||"("!==j.value)&&!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("qmark",V);continue}if(j&&"paren"===j.type){const e=G();let t=V;("("===j.value&&!/[!=<:]/.test(e)||"<"===e&&!/<([!=]|\w+>)/.test(W()))&&(t=`\\${V}`),Z({type:"text",value:V,output:t});continue}if(!0!==d.dot&&("slash"===j.type||"bos"===j.type)){Z({type:"qmark",value:V,output:N});continue}Z({type:"qmark",value:V,output:k});continue}if("!"===V){if(!0!==d.noextglob&&"("===G()&&("?"!==G(2)||!/[!=<:]/.test(G(3)))){Q("negate",V);continue}if(!0!==d.nonegate&&0===T.index){X();continue}}if("+"===V){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Q("plus",V);continue}if(j&&"("===j.value||!1===d.regex){Z({type:"plus",value:V,output:A});continue}if(j&&("bracket"===j.type||"paren"===j.type||"brace"===j.type)||T.parens>0){Z({type:"plus",value:V});continue}Z({type:"plus",value:A});continue}if("@"===V){if(!0!==d.noextglob&&"("===G()&&"?"!==G(2)){Z({type:"at",extglob:!0,value:V,output:""});continue}Z({type:"text",value:V});continue}if("*"!==V){"$"!==V&&"^"!==V||(V=`\\${V}`);const e=i.exec(W());e&&(V+=e[0],T.index+=e[0].length),Z({type:"text",value:V});continue}if(j&&("globstar"===j.type||!0===j.star)){j.type="star",j.star=!0,j.value+=V,j.output=L,T.backtrack=!0,T.globstar=!0,q(V);continue}let e=W();if(!0!==d.noextglob&&/^\([^?]/.test(e)){Q("star",V);continue}if("star"===j.type){if(!0===d.noglobstar){q(V);continue}const t=j.prev,n=t.prev,s="slash"===t.type||"bos"===t.type,i=n&&("star"===n.type||"globstar"===n.type);if(!0===d.bash&&(!s||e[0]&&"/"!==e[0])){Z({type:"star",value:V,output:""});continue}const r=T.braces>0&&("comma"===t.type||"brace"===t.type),o=B.length&&("pipe"===t.type||"paren"===t.type);if(!s&&"paren"!==t.type&&!r&&!o){Z({type:"star",value:V,output:""});continue}for(;"/**"===e.slice(0,3);){const t=c[T.index+4];if(t&&"/"!==t)break;e=e.slice(3),q("/**",3)}const a=U()||T.parens>0&&e===")".repeat(T.parens)&&!B.some(e=>"negate"===e.type);if("bos"===t.type&&U()){j.type="globstar",j.value+=V,j.output=D(d),T.output=j.output,T.globstar=!0,q(V);continue}if("slash"===t.type&&"bos"!==t.prev.type&&!i&&a){T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=D(d)+(d.strictSlashes?")":"|$)"),j.value+=V,T.globstar=!0,T.output+=t.output+j.output,q(V);continue}if("slash"===t.type&&"bos"!==t.prev.type&&"/"===e[0]){const n=void 0!==e[1]?"|$":"";T.output=T.output.slice(0,-(t.output+j.output).length),t.output=`(?:${t.output}`,j.type="globstar",j.output=`${D(d)}${S}|${S}${n})`,j.value+=V,T.output+=t.output+j.output,T.globstar=!0,q(V+H()),Z({type:"slash",value:"/",output:""});continue}if("bos"===t.type&&"/"===e[0]){j.type="globstar",j.value+=V,j.output=`(?:^|${S}|${D(d)}${S})`,T.output=j.output,T.globstar=!0,q(V+H()),Z({type:"slash",value:"/",output:""});continue}T.output=T.output.slice(0,-j.output.length),j.type="globstar",j.output=D(d),j.value+=V,T.output+=j.output,T.globstar=!0,q(V);continue}const n={type:"star",value:V,output:L};!0!==d.bash?!j||"bracket"!==j.type&&"paren"!==j.type||!0!==d.regex?(T.index!==T.start&&"slash"!==j.type&&"dot"!==j.type||("dot"===j.type?(T.output+=I,j.output+=I):!0===d.dot?(T.output+=C,j.output+=C):(T.output+=M,j.output+=M),"*"!==G()&&(T.output+=P,j.output+=P)),Z(n)):(n.output=V,Z(n)):(n.output=".*?","bos"!==j.type&&"slash"!==j.type||(n.output=M+n.output),Z(n))}for(;T.brackets>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","]"));T.output=t.escapeLast(T.output,"["),Y("brackets")}for(;T.parens>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing",")"));T.output=t.escapeLast(T.output,"("),Y("parens")}for(;T.braces>0;){if(!0===d.strictBrackets)throw new SyntaxError(l("closing","}"));T.output=t.escapeLast(T.output,"{"),Y("braces")}if(!0===d.strictSlashes||"star"!==j.type&&"bracket"!==j.type||Z({type:"maybe_slash",value:"",output:`${S}?`}),!0===T.backtrack){T.output="";for(const e of T.tokens)T.output+=null!=e.output?e.output:e.value,e.suffix&&(T.output+=e.suffix)}return T};return g.fastpaths=(s,i)=>{const r={...i},a="number"==typeof r.maxLength?Math.min(n,r.maxLength):n,l=s.length;if(l>a)throw new SyntaxError(`Input length: ${l}, exceeds maximum allowed length: ${a}`);s=o[s]||s;const{DOT_LITERAL:c,SLASH_LITERAL:u,ONE_CHAR:d,DOTS_SLASH:h,NO_DOT:p,NO_DOTS:f,NO_DOTS_SLASH:m,STAR:g,START_ANCHOR:y}=e.globChars(r.windows),b=r.dot?f:p,E=r.dot?m:p,x=r.capture?"":"?:";let v=!0===r.bash?".*?":g;r.capture&&(v=`(${v})`);const A=e=>!0===e.noglobstar?v:`(${x}(?:(?!${y}${e.dot?h:c}).)*?)`,S=e=>{switch(e){case"*":return`${b}${d}${v}`;case".*":return`${c}${d}${v}`;case"*.*":return`${b}${v}${c}${d}${v}`;case"*/*":return`${b}${v}${u}${d}${E}${v}`;case"**":return b+A(r);case"**/*":return`(?:${b}${A(r)}${u})?${E}${d}${v}`;case"**/*.*":return`(?:${b}${A(r)}${u})?${E}${v}${c}${d}${v}`;case"**/.*":return`(?:${b}${A(r)}${u})?${c}${d}${v}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const n=S(t[1]);if(!n)return;return n+c+t[2]}}},P=t.removePrefix(s,{negated:!1,prefix:""});let $=S(P);return $&&!0!==r.strictSlashes&&($+=`${u}?`),$},ra=g}function ga(){if(la)return aa;la=1;const e=fa(),t=ma(),n=pa(),s=ha(),i=(e,t,n=!1)=>{if(Array.isArray(e)){const s=e.map(e=>i(e,t,n)),r=e=>{for(const t of s){const n=t(e);if(n)return n}return!1};return r}const s=(r=e)&&"object"==typeof r&&!Array.isArray(r)&&e.tokens&&e.input;var r;if(""===e||"string"!=typeof e&&!s)throw new TypeError("Expected pattern to be a non-empty string");const o=t||{},a=o.windows,l=s?i.compileRe(e,t):i.makeRe(e,t,!1,!0),c=l.state;delete l.state;let u=()=>!1;if(o.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};u=i(o.ignore,e,n)}const d=(n,s=!1)=>{const{isMatch:r,match:d,output:h}=i.test(n,l,t,{glob:e,posix:a}),p={glob:e,state:c,regex:l,posix:a,input:n,output:h,match:d,isMatch:r};return"function"==typeof o.onResult&&o.onResult(p),!1===r?(p.isMatch=!1,!!s&&p):u(n)?("function"==typeof o.onIgnore&&o.onIgnore(p),p.isMatch=!1,!!s&&p):("function"==typeof o.onMatch&&o.onMatch(p),!s||p)};return n&&(d.state=c),d};return i.test=(e,t,s,{glob:r,posix:o}={})=>{if("string"!=typeof e)throw new TypeError("Expected input to be a string");if(""===e)return{isMatch:!1,output:""};const a=s||{},l=a.format||(o?n.toPosixSlashes:null);let c=e===r,u=c&&l?l(e):e;return!1===c&&(u=l?l(e):e,c=u===r),!1!==c&&!0!==a.capture||(c=!0===a.matchBase||!0===a.basename?i.matchBase(e,t,s,o):t.exec(u)),{isMatch:Boolean(c),match:c,output:u}},i.matchBase=(e,t,s,r=s&&s.windows)=>(t instanceof RegExp?t:i.makeRe(t,s)).test(n.basename(e,{windows:r})),i.isMatch=(e,t,n)=>i(t,n)(e),i.parse=(e,n)=>Array.isArray(e)?e.map(e=>i.parse(e,n)):t(e,{...n,fastpaths:!1}),i.scan=(t,n)=>e(t,n),i.compileRe=(e,t,n=!1,s=!1)=>{if(!0===n)return e.output;const r=t||{},o=r.contains?"":"^",a=r.contains?"":"$";let l=`${o}(?:${e.output})${a}`;e&&!0===e.negated&&(l=`^(?!${l}).*$`);const c=i.toRegex(l,t);return!0===s&&(c.state=e),c},i.makeRe=(e,n={},s=!1,r=!1)=>{if(!e||"string"!=typeof e)throw new TypeError("Expected a non-empty string");let o={negated:!1,fastpaths:!0};return!1===n.fastpaths||"."!==e[0]&&"*"!==e[0]||(o.output=t.fastpaths(e,n)),o.output||(o=t(e,n)),i.compileRe(o,n,s,r)},i.toRegex=(e,t)=>{try{const n=t||{};return new RegExp(e,n.flags||(n.nocase?"i":""))}catch(e){if(t&&!0===t.debug)throw e;return/$^/}},i.constants=s,aa=i}function ya(){if(ua)return ca;ua=1;const e=ga(),t=pa();function n(n,s,i=!1){return!s||null!==s.windows&&void 0!==s.windows||(s={...s,windows:t.isWindows()}),e(n,s,i)}return Object.assign(n,e),ca=n}var ba=Qo(ya());const Ea={ArrayPattern(e,t){for(const n of t.elements)n&&Ea[n.type](e,n)},AssignmentPattern(e,t){Ea[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const n of t.properties)"RestElement"===n.type?Ea.RestElement(e,n):Ea[n.value.type](e,n.value)},RestElement(e,t){Ea[t.argument.type](e,t.argument)}},xa=function(e){const t=[];return Ea[e.type](t,e),t};new Set("break case class catch const continue debugger default delete do else export extends finally for function if import in instanceof let new return super switch this throw try typeof var void while with yield enum await implements package protected static interface private public arguments Infinity NaN undefined null true false eval uneval isFinite isNaN parseFloat parseInt decodeURI decodeURIComponent encodeURI encodeURIComponent escape unescape Object Function Boolean Symbol Error EvalError InternalError RangeError ReferenceError SyntaxError TypeError URIError Number Math Date String RegExp Array Int8Array Uint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float32Array Float64Array Map Set WeakMap WeakSet SIMD ArrayBuffer DataView JSON Promise Generator GeneratorFunction Reflect Proxy Intl".split(" ")).add("");var va=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using","source","defer"];const Aa=(e,t)=>{if(0===e)return ve;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++)s[i]=Sa(t[e++],t);return s},Sa=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:va[t[e]]}},Pa=(e,t)=>{const n=wa(t,e);switch(n.type){case Kn:return Ht(Wt(Nn(n.message)));case Xn:return Ht(Wt(Nn(n.message,n.start)));default:return n}},$a=[function(e,t){const n={type:"PanicError",start:t[e],end:t[e+1],get message(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"message",{value:s}),s}};return n},function(e,t){const n={type:"ParseError",start:t[e],end:t[e+1],get message(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"message",{value:s}),s}};return n},function(e,t){const n={type:"ArrayExpression",start:t[e],end:t[e+1],get elements(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"elements",{value:s}),s}};return n},function(e,t){const n={type:"ArrayPattern",start:t[e],end:t[e+1],get elements(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"elements",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=Aa(t[e+3],t),i={type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{annotations:s}:{},get params(){const n=Ia(t[e+4],t);return Object.defineProperty(i,"params",{value:n}),n},get body(){const n=wa(t[e+5],t);return Object.defineProperty(i,"body",{value:n}),n},id:null};return i},function(e,t){const n={type:"AssignmentExpression",start:t[e],end:t[e+1],get operator(){const s=va[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get left(){const s=wa(t[e+3],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=wa(t[e+4],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n={type:"AssignmentPattern",start:t[e],end:t[e+1],get left(){const s=wa(t[e+2],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=wa(t[e+3],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n={type:"AwaitExpression",start:t[e],end:t[e+1],get argument(){const s=wa(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n={type:"BinaryExpression",start:t[e],end:t[e+1],get operator(){const s=va[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get left(){const s=wa(t[e+3],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=wa(t[e+4],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n={type:"BlockStatement",start:t[e],end:t[e+1],get body(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"BreakStatement",start:t[e],end:t[e+1],get label(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"label",{value:e}),e}};return s},function(e,t){const n=t[e+2],s=Aa(t[e+3],t),i={type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{annotations:s}:{},get callee(){const n=wa(t[e+4],t);return Object.defineProperty(i,"callee",{value:n}),n},get arguments(){const n=Ia(t[e+5],t);return Object.defineProperty(i,"arguments",{value:n}),n}};return i},function(e,t){const n=t[e+2],s={type:"CatchClause",start:t[e],end:t[e+1],get param(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"param",{value:e}),e},get body(){const n=wa(t[e+3],t);return Object.defineProperty(s,"body",{value:n}),n}};return s},function(e,t){const n={type:"ChainExpression",start:t[e],end:t[e+1],get expression(){const s=wa(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"ClassBody",start:t[e],end:t[e+1],get body(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+4],i={type:"ClassDeclaration",start:t[e],end:t[e+1],get decorators(){const n=Ia(t[e+2],t);return Object.defineProperty(i,"decorators",{value:n}),n},get id(){const e=0===n?null:wa(n,t);return Object.defineProperty(i,"id",{value:e}),e},get superClass(){const e=0===s?null:wa(s,t);return Object.defineProperty(i,"superClass",{value:e}),e},get body(){const n=wa(t[e+5],t);return Object.defineProperty(i,"body",{value:n}),n}};return i},function(e,t){const n=t[e+3],s=t[e+4],i={type:"ClassExpression",start:t[e],end:t[e+1],get decorators(){const n=Ia(t[e+2],t);return Object.defineProperty(i,"decorators",{value:n}),n},get id(){const e=0===n?null:wa(n,t);return Object.defineProperty(i,"id",{value:e}),e},get superClass(){const e=0===s?null:wa(s,t);return Object.defineProperty(i,"superClass",{value:e}),e},get body(){const n=wa(t[e+5],t);return Object.defineProperty(i,"body",{value:n}),n}};return i},function(e,t){const n={type:"ConditionalExpression",start:t[e],end:t[e+1],get test(){const s=wa(t[e+2],t);return Object.defineProperty(n,"test",{value:s}),s},get consequent(){const s=wa(t[e+3],t);return Object.defineProperty(n,"consequent",{value:s}),s},get alternate(){const s=wa(t[e+4],t);return Object.defineProperty(n,"alternate",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"ContinueStatement",start:t[e],end:t[e+1],get label(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"label",{value:e}),e}};return s},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){const n={type:"Decorator",start:t[e],end:t[e+1],get expression(){const s=wa(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"ExpressionStatement",start:t[e],end:t[e+1],get directive(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"directive",{value:s}),s},get expression(){const s=wa(t[e+3],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"DoWhileStatement",start:t[e],end:t[e+1],get body(){const s=wa(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s},get test(){const s=wa(t[e+3],t);return Object.defineProperty(n,"test",{value:s}),s}};return n},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2],s={type:"ExportAllDeclaration",start:t[e],end:t[e+1],get exported(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"exported",{value:e}),e},get source(){const n=wa(t[e+3],t);return Object.defineProperty(s,"source",{value:n}),n},get attributes(){const n=Ia(t[e+4],t);return Object.defineProperty(s,"attributes",{value:n}),n}};return s},function(e,t){const n={type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],get declaration(){const s=wa(t[e+2],t);return Object.defineProperty(n,"declaration",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+5],i={type:"ExportNamedDeclaration",start:t[e],end:t[e+1],get specifiers(){const n=Ia(t[e+2],t);return Object.defineProperty(i,"specifiers",{value:n}),n},get source(){const e=0===n?null:wa(n,t);return Object.defineProperty(i,"source",{value:e}),e},get attributes(){const n=Ia(t[e+4],t);return Object.defineProperty(i,"attributes",{value:n}),n},get declaration(){const e=0===s?null:wa(s,t);return Object.defineProperty(i,"declaration",{value:e}),e}};return i},function(e,t){const n=wa(t[e+2],t),s=t[e+3],i={type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,get exported(){const e=0===s?{...n}:wa(s,t);return Object.defineProperty(i,"exported",{value:e}),e}};return i},function(e,t){const n={type:"ExpressionStatement",start:t[e],end:t[e+1],get expression(){const s=wa(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"ForInStatement",start:t[e],end:t[e+1],get left(){const s=wa(t[e+2],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=wa(t[e+3],t);return Object.defineProperty(n,"right",{value:s}),s},get body(){const s=wa(t[e+4],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),get left(){const n=wa(t[e+3],t);return Object.defineProperty(s,"left",{value:n}),n},get right(){const n=wa(t[e+4],t);return Object.defineProperty(s,"right",{value:n}),n},get body(){const n=wa(t[e+5],t);return Object.defineProperty(s,"body",{value:n}),n}};return s},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4],r={type:"ForStatement",start:t[e],end:t[e+1],get init(){const e=0===n?null:wa(n,t);return Object.defineProperty(r,"init",{value:e}),e},get test(){const e=0===s?null:wa(s,t);return Object.defineProperty(r,"test",{value:e}),e},get update(){const e=0===i?null:wa(i,t);return Object.defineProperty(r,"update",{value:e}),e},get body(){const n=wa(t[e+5],t);return Object.defineProperty(r,"body",{value:n}),n}};return r},function(e,t){const n=t[e+2],s=Aa(t[e+3],t),i=t[e+4],r={type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},get id(){const e=0===i?null:wa(i,t);return Object.defineProperty(r,"id",{value:e}),e},get params(){const n=Ia(t[e+5],t);return Object.defineProperty(r,"params",{value:n}),n},get body(){const n=wa(t[e+6],t);return Object.defineProperty(r,"body",{value:n}),n},expression:!1};return r},function(e,t){const n=t[e+2],s=Aa(t[e+3],t),i=t[e+4],r={type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},get id(){const e=0===i?null:wa(i,t);return Object.defineProperty(r,"id",{value:e}),e},get params(){const n=Ia(t[e+5],t);return Object.defineProperty(r,"params",{value:n}),n},get body(){const n=wa(t[e+6],t);return Object.defineProperty(r,"body",{value:n}),n},expression:!1};return r},function(e,t){const n={type:"Identifier",start:t[e],end:t[e+1],get name(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n=t[e+4],s={type:"IfStatement",start:t[e],end:t[e+1],get test(){const n=wa(t[e+2],t);return Object.defineProperty(s,"test",{value:n}),n},get consequent(){const n=wa(t[e+3],t);return Object.defineProperty(s,"consequent",{value:n}),n},get alternate(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"alternate",{value:e}),e}};return s},function(e,t){const n={type:"ImportAttribute",start:t[e],end:t[e+1],get key(){const s=wa(t[e+2],t);return Object.defineProperty(n,"key",{value:s}),s},get value(){const s=wa(t[e+3],t);return Object.defineProperty(n,"value",{value:s}),s}};return n},function(e,t){const n=t[e+5],s={type:"ImportDeclaration",start:t[e],end:t[e+1],get specifiers(){const n=Ia(t[e+2],t);return Object.defineProperty(s,"specifiers",{value:n}),n},get source(){const n=wa(t[e+3],t);return Object.defineProperty(s,"source",{value:n}),n},get attributes(){const n=Ia(t[e+4],t);return Object.defineProperty(s,"attributes",{value:n}),n},get phase(){const i=0===n?void 0:va[t[e+5]];return Object.defineProperty(s,"phase",{value:i}),i}};return s},function(e,t){const n={type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],get local(){const s=wa(t[e+2],t);return Object.defineProperty(n,"local",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+4],i={type:"ImportExpression",start:t[e],end:t[e+1],get source(){const n=wa(t[e+2],t);return Object.defineProperty(i,"source",{value:n}),n},get options(){const e=0===n?null:wa(n,t);return Object.defineProperty(i,"options",{value:e}),e},get phase(){const n=0===s?void 0:va[t[e+4]];return Object.defineProperty(i,"phase",{value:n}),n}};return i},function(e,t){const n={type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],get local(){const s=wa(t[e+2],t);return Object.defineProperty(n,"local",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=wa(t[e+3],t),i={type:"ImportSpecifier",start:t[e],end:t[e+1],get imported(){const e=0===n?{...s}:wa(n,t);return Object.defineProperty(i,"imported",{value:e}),e},local:s};return i},function(e,t){const n=t[e+3],s={type:"JSXAttribute",start:t[e],end:t[e+1],get name(){const n=wa(t[e+2],t);return Object.defineProperty(s,"name",{value:n}),n},get value(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"value",{value:e}),e}};return s},function(e,t){const n={type:"JSXClosingElement",start:t[e],end:t[e+1],get name(){const s=wa(t[e+2],t);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4],s={type:"JSXElement",start:t[e],end:t[e+1],get openingElement(){const n=wa(t[e+2],t);return Object.defineProperty(s,"openingElement",{value:n}),n},get children(){const n=Ia(t[e+3],t);return Object.defineProperty(s,"children",{value:n}),n},get closingElement(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"closingElement",{value:e}),e}};return s},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){const n={type:"JSXExpressionContainer",start:t[e],end:t[e+1],get expression(){const s=wa(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"JSXFragment",start:t[e],end:t[e+1],get openingFragment(){const s=wa(t[e+2],t);return Object.defineProperty(n,"openingFragment",{value:s}),s},get children(){const s=Ia(t[e+3],t);return Object.defineProperty(n,"children",{value:s}),s},get closingFragment(){const s=wa(t[e+4],t);return Object.defineProperty(n,"closingFragment",{value:s}),s}};return n},function(e,t){const n={type:"JSXIdentifier",start:t[e],end:t[e+1],get name(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n={type:"JSXMemberExpression",start:t[e],end:t[e+1],get object(){const s=wa(t[e+2],t);return Object.defineProperty(n,"object",{value:s}),s},get property(){const s=wa(t[e+3],t);return Object.defineProperty(n,"property",{value:s}),s}};return n},function(e,t){const n={type:"JSXNamespacedName",start:t[e],end:t[e+1],get namespace(){const s=wa(t[e+2],t);return Object.defineProperty(n,"namespace",{value:s}),s},get name(){const s=wa(t[e+3],t);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),get name(){const n=wa(t[e+3],t);return Object.defineProperty(s,"name",{value:n}),n},get attributes(){const n=Ia(t[e+4],t);return Object.defineProperty(s,"attributes",{value:n}),n}};return s},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){const n={type:"JSXSpreadAttribute",start:t[e],end:t[e+1],get argument(){const s=wa(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n={type:"JSXSpreadChild",start:t[e],end:t[e+1],get expression(){const s=wa(t[e+2],t);return Object.defineProperty(n,"expression",{value:s}),s}};return n},function(e,t){const n={type:"JSXText",start:t[e],end:t[e+1],get value(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"value",{value:s}),s},get raw(){const s=t.convertString(t[e+3]);return Object.defineProperty(n,"raw",{value:s}),s}};return n},function(e,t){const n={type:"LabeledStatement",start:t[e],end:t[e+1],get label(){const s=wa(t[e+2],t);return Object.defineProperty(n,"label",{value:s}),s},get body(){const s=wa(t[e+3],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t.convertString(t[e+2]),s={type:"Literal",start:t[e],end:t[e+1],bigint:n,get raw(){const n=t.convertString(t[e+3]);return Object.defineProperty(s,"raw",{value:n}),n},value:BigInt(n)};return s},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2],s={type:"Literal",start:t[e],end:t[e+1],get raw(){const e=0===n?void 0:t.convertString(n);return Object.defineProperty(s,"raw",{value:e}),e},get value(){const n=t.convertFloat64(e+3);return Object.defineProperty(s,"value",{value:n}),n}};return s},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3],s={type:"Literal",start:t[e],end:t[e+1],get value(){const n=t.convertString(t[e+2]);return Object.defineProperty(s,"value",{value:n}),n},get raw(){const e=0===n?void 0:t.convertString(n);return Object.defineProperty(s,"raw",{value:e}),e}};return s},function(e,t){const n={type:"LogicalExpression",start:t[e],end:t[e+1],get operator(){const s=va[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get left(){const s=wa(t[e+3],t);return Object.defineProperty(n,"left",{value:s}),s},get right(){const s=wa(t[e+4],t);return Object.defineProperty(n,"right",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),get object(){const n=wa(t[e+3],t);return Object.defineProperty(s,"object",{value:n}),n},get property(){const n=wa(t[e+4],t);return Object.defineProperty(s,"property",{value:n}),n}};return s},function(e,t){const n={type:"MetaProperty",start:t[e],end:t[e+1],get meta(){const s=wa(t[e+2],t);return Object.defineProperty(n,"meta",{value:s}),s},get property(){const s=wa(t[e+3],t);return Object.defineProperty(n,"property",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),get decorators(){const n=Ia(t[e+3],t);return Object.defineProperty(s,"decorators",{value:n}),n},get key(){const n=wa(t[e+4],t);return Object.defineProperty(s,"key",{value:n}),n},get value(){const n=wa(t[e+5],t);return Object.defineProperty(s,"value",{value:n}),n},get kind(){const n=va[t[e+6]];return Object.defineProperty(s,"kind",{value:n}),n}};return s},function(e,t){const n=Aa(t[e+2],t),s={type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{annotations:n}:{},get callee(){const n=wa(t[e+3],t);return Object.defineProperty(s,"callee",{value:n}),n},get arguments(){const n=Ia(t[e+4],t);return Object.defineProperty(s,"arguments",{value:n}),n}};return s},function(e,t){const n={type:"ObjectExpression",start:t[e],end:t[e+1],get properties(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"properties",{value:s}),s}};return n},function(e,t){const n={type:"ObjectPattern",start:t[e],end:t[e+1],get properties(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"properties",{value:s}),s}};return n},function(e,t){const n={type:"PrivateIdentifier",start:t[e],end:t[e+1],get name(){const s=t.convertString(t[e+2]);return Object.defineProperty(n,"name",{value:s}),s}};return n},function(e,t){const n=Aa(t[e+3],t),s={type:"Program",start:t[e],end:t[e+1],get body(){const n=Ia(t[e+2],t);return Object.defineProperty(s,"body",{value:n}),n},...n.length>0?{invalidAnnotations:n}:{},sourceType:"module"};return s},function(e,t){const n=t[e+2],s=t[e+3],i=wa(t[e+4],t),r={type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),get key(){const e=0===s?{...i}:wa(s,t);return Object.defineProperty(r,"key",{value:e}),e},value:i,get kind(){const n=va[t[e+5]];return Object.defineProperty(r,"kind",{value:n}),n}};return r},function(e,t){const n=t[e+2],s=t[e+5],i={type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),get decorators(){const n=Ia(t[e+3],t);return Object.defineProperty(i,"decorators",{value:n}),n},get key(){const n=wa(t[e+4],t);return Object.defineProperty(i,"key",{value:n}),n},get value(){const e=0===s?null:wa(s,t);return Object.defineProperty(i,"value",{value:e}),e}};return i},function(e,t){const n={type:"RestElement",start:t[e],end:t[e+1],get argument(){const s=wa(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n=t[e+2],s={type:"ReturnStatement",start:t[e],end:t[e+1],get argument(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"argument",{value:e}),e}};return s},function(e,t){const n={type:"SequenceExpression",start:t[e],end:t[e+1],get expressions(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"expressions",{value:s}),s}};return n},function(e,t){const n={type:"SpreadElement",start:t[e],end:t[e+1],get argument(){const s=wa(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n={type:"StaticBlock",start:t[e],end:t[e+1],get body(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2],s={type:"SwitchCase",start:t[e],end:t[e+1],get test(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"test",{value:e}),e},get consequent(){const n=Ia(t[e+3],t);return Object.defineProperty(s,"consequent",{value:n}),n}};return s},function(e,t){const n={type:"SwitchStatement",start:t[e],end:t[e+1],get discriminant(){const s=wa(t[e+2],t);return Object.defineProperty(n,"discriminant",{value:s}),s},get cases(){const s=Ia(t[e+3],t);return Object.defineProperty(n,"cases",{value:s}),s}};return n},function(e,t){const n={type:"TaggedTemplateExpression",start:t[e],end:t[e+1],get tag(){const s=wa(t[e+2],t);return Object.defineProperty(n,"tag",{value:s}),s},get quasi(){const s=wa(t[e+3],t);return Object.defineProperty(n,"quasi",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?void 0:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){const n={type:"TemplateLiteral",start:t[e],end:t[e+1],get quasis(){const s=Ia(t[e+2],t);return Object.defineProperty(n,"quasis",{value:s}),s},get expressions(){const s=Ia(t[e+3],t);return Object.defineProperty(n,"expressions",{value:s}),s}};return n},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){const n={type:"ThrowStatement",start:t[e],end:t[e+1],get argument(){const s=wa(t[e+2],t);return Object.defineProperty(n,"argument",{value:s}),s}};return n},function(e,t){const n=t[e+3],s=t[e+4],i={type:"TryStatement",start:t[e],end:t[e+1],get block(){const n=wa(t[e+2],t);return Object.defineProperty(i,"block",{value:n}),n},get handler(){const e=0===n?null:wa(n,t);return Object.defineProperty(i,"handler",{value:e}),e},get finalizer(){const e=0===s?null:wa(s,t);return Object.defineProperty(i,"finalizer",{value:e}),e}};return i},function(e,t){const n={type:"UnaryExpression",start:t[e],end:t[e+1],get operator(){const s=va[t[e+2]];return Object.defineProperty(n,"operator",{value:s}),s},get argument(){const s=wa(t[e+3],t);return Object.defineProperty(n,"argument",{value:s}),s},prefix:!0};return n},function(e,t){const n=t[e+2],s={type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),get operator(){const n=va[t[e+3]];return Object.defineProperty(s,"operator",{value:n}),n},get argument(){const n=wa(t[e+4],t);return Object.defineProperty(s,"argument",{value:n}),n}};return s},function(e,t){const n={type:"VariableDeclaration",start:t[e],end:t[e+1],get kind(){const s=va[t[e+2]];return Object.defineProperty(n,"kind",{value:s}),s},get declarations(){const s=Ia(t[e+3],t);return Object.defineProperty(n,"declarations",{value:s}),s}};return n},function(e,t){const n=t[e+3],s={type:"VariableDeclarator",start:t[e],end:t[e+1],get id(){const n=wa(t[e+2],t);return Object.defineProperty(s,"id",{value:n}),n},get init(){const e=0===n?null:wa(n,t);return Object.defineProperty(s,"init",{value:e}),e}};return s},function(e,t){const n={type:"WhileStatement",start:t[e],end:t[e+1],get test(){const s=wa(t[e+2],t);return Object.defineProperty(n,"test",{value:s}),s},get body(){const s=wa(t[e+3],t);return Object.defineProperty(n,"body",{value:s}),s}};return n},function(e,t){const n=t[e+2],s=t[e+3],i={type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),get argument(){const e=0===s?null:wa(s,t);return Object.defineProperty(i,"argument",{value:e}),e}};return i}];function wa(e,t){const n=t[e],s=$a[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function Ia(e,t){if(0===e)return ve;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?wa(n,t):null}return s}const Ca=0===new Uint8Array(new Uint32Array([1]).buffer)[0],ka=new DataView(new ArrayBuffer(8));let Na=new Uint8Array(0);const Oa=function(e,t){ka.setFloat64(0,e,!0),this[t]=ka.getUint32(0,!0),this[t+1]=ka.getUint32(4,!0)};function Ra(e,t,n,s){const i=n>>2,r=s+3>>2;for(let s=0;s<r;s++){const r=n+(s<<2);e[i+s]=t[r]|t[r+1]<<8|t[r+2]<<16|t[r+3]<<24}}const Da=(e,t,n)=>{const s=((e,t,n)=>{const s=n+3>>2<<2;Na.length<s&&(Na=new Uint8Array(s));const i=t+1;for(let t=0;t<s>>2;t++){const n=e[i+t];Na[t<<2]=255&n,Na[1+(t<<2)]=n>>>8&255,Na[2+(t<<2)]=n>>>16&255,Na[3+(t<<2)]=n>>>24&255}return Na.subarray(0,n)})(e,t,n);return"undefined"!=typeof Buffer?Buffer.from(s.buffer,s.byteOffset,s.length).toString("utf8"):(new TextDecoder).decode(s)};function Ma(e){const t=3&e.byteOffset?new Uint8Array(e):e,n=new Uint32Array(t.buffer,t.byteOffset,t.byteLength>>2);let s;if(Ca)s=e=>Da(n,e,n[e]);else if("undefined"!=typeof Buffer&&e instanceof Buffer)s=t=>{const s=n[t],i=t+1<<2;return e.toString("utf8",i,i+s)};else{const t=new TextDecoder;s=s=>{const i=n[s],r=s+1<<2;return t.decode(e.subarray(r,r+i))}}return Object.assign(n,{convertFloat64(e){return ka.setUint32(0,this[e],!0),ka.setUint32(4,this[e+1],!0),ka.getFloat64(0,!0)},convertString:s})}function _a(e){const t=new Uint32Array(e),n=new TextEncoder,s=new Uint8Array(t.buffer);return Object.assign(t,{addStringToBuffer(e,s){const i=t.position;t[s]=i;const r=n.encode(e),o=r.length,a=1+(o+3>>2),l=t.reserve(a);l[i]=o;const c=i+1<<2;return l.byteBuffer.set(r,c),Ca&&Ra(l,l.byteBuffer,c,o),l},byteBuffer:s,position:0,reserve(e){const n=t.position+e;if(n<=t.length)return t.position=n,t;const s=_a(2*n);return s.set(t),s.position=n,s},toOutput(){const e=t.position<<2;return s.slice(0,e)},writeFloat64:Oa})}function La(e){const t=new Uint32Array(e),n=Buffer.from(t.buffer);return Object.assign(t,{addStringToBuffer(e,s){let i=t;const r=t.position+1+(3*e.length+3>>2);r>t.length&&(i=La(2*r),n.copy(i.byteBuffer,0,0,t.position<<2),i.position=t.position);const o=i.position;i[s]=o;const a=o+1<<2,l=i.byteBuffer.write(e,a);return i[o]=l,Ca&&Ra(i,i.byteBuffer,a,l),i.position=a+l+3>>2,i},byteBuffer:n,position:0,reserve(e){const s=t.position+e;if(s<=t.length)return t.position=s,t;const i=La(2*s);return n.copy(i.byteBuffer,0,0,t.position<<2),i.position=s,i},toOutput(){const e=t.position<<2,s=Buffer.allocUnsafeSlow(e);return n.copy(s,0,0,e),s},writeFloat64:Oa})}const Ta=["PanicError","ParseError","ArrayExpression","ArrayPattern","ArrowFunctionExpression","AssignmentExpression","AssignmentPattern","AwaitExpression","BinaryExpression","BlockStatement","BreakStatement","CallExpression","CatchClause","ChainExpression","ClassBody","ClassDeclaration","ClassExpression","ConditionalExpression","ContinueStatement","DebuggerStatement","Decorator","ExpressionStatement","DoWhileStatement","EmptyStatement","ExportAllDeclaration","ExportDefaultDeclaration","ExportNamedDeclaration","ExportSpecifier","ExpressionStatement","ForInStatement","ForOfStatement","ForStatement","FunctionDeclaration","FunctionExpression","Identifier","IfStatement","ImportAttribute","ImportDeclaration","ImportDefaultSpecifier","ImportExpression","ImportNamespaceSpecifier","ImportSpecifier","JSXAttribute","JSXClosingElement","JSXClosingFragment","JSXElement","JSXEmptyExpression","JSXExpressionContainer","JSXFragment","JSXIdentifier","JSXMemberExpression","JSXNamespacedName","JSXOpeningElement","JSXOpeningFragment","JSXSpreadAttribute","JSXSpreadChild","JSXText","LabeledStatement","Literal","Literal","Literal","Literal","Literal","Literal","LogicalExpression","MemberExpression","MetaProperty","MethodDefinition","NewExpression","ObjectExpression","ObjectPattern","PrivateIdentifier","Program","Property","PropertyDefinition","RestElement","ReturnStatement","SequenceExpression","SpreadElement","StaticBlock","Super","SwitchCase","SwitchStatement","TaggedTemplateExpression","TemplateElement","TemplateLiteral","ThisExpression","ThrowStatement","TryStatement","UnaryExpression","UpdateExpression","VariableDeclaration","VariableDeclarator","WhileStatement","YieldExpression"];class Ba extends is{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e,t,n){const s=[],i=za(t);for(const t of this.elements)null!==t&&s.push(...t.declare(e,i,n));return s}deoptimizeAssignment(e,t){const n=za(e);for(const e of this.elements)e?.deoptimizeAssignment(n,t)}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(Be)}hasEffectsWhenDestructuring(e,t,n){const s=za(t);for(const t of this.elements)if(t?.hasEffectsWhenDestructuring(e,s,n))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(Be,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){let s=!1;const i=za(t);for(const t of[...this.elements].reverse())t&&(s&&!t.included&&t.includeNode(e),s=t.includeDestructuredIfNecessary(e,i,n)||s);return!this.included&&s&&this.includeNode(e),this.included}render(e,t){let n=this.start+1;for(const s of this.elements)if(s){if(!s.included){e.remove(n,this.end-1);break}s.render(e,t),n=s.end}}setAssignedValue(e){super.setAssignedValue(e);for(const e of this.elements)e?.setAssignedValue(st)}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}Ba.prototype.includeNode=rs;const za=e=>e.at(-1)===we?e:[...e,Ce];class Fa extends is{addExportedVariables(e,t){for(const n of this.properties)n.type===Yn?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t,n){const s=[];for(const i of this.properties)s.push(...i.declare(e,t,n));return s}deoptimizeAssignment(e,t){for(const n of this.properties)n.deoptimizeAssignment(e,t)}deoptimizePath(e){if(0===e.length)for(const t of this.properties)t.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.properties)if(e.hasEffectsOnInteractionAtPath(Be,t,n))return!0;return!1}hasEffectsWhenDestructuring(e,t,n){for(const s of this.properties)if(s.hasEffectsWhenDestructuring(e,t,n))return!0;return!1}includeDestructuredIfNecessary(e,t,n){if(!this.properties.length)return this.included;const s=this.properties.at(-1);let i=s.includeDestructuredIfNecessary(e,t,n);const r="RestElement"===s.type;for(const s of this.properties.slice(0,-1))r&&i&&!s.included&&s.includeNode(e),i=s.includeDestructuredIfNecessary(e,t,n)||i;return!this.included&&i&&this.includeNode(e),this.included}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}render(e,t){if(this.properties.length>0){const n=fe(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):re(i,e,o,a);s&&e.remove(s,this.end-1)}}setAssignedValue(e){super.setAssignedValue(e);for(const e of this.properties)e.setAssignedValue(st)}}function Va(e){if(e.scope.context.usesTopLevelAwait)return;let t=e.parent;for(;t;){const{type:e}=t;if(e===Fn||e===Hn||"FunctionDeclaration"===e)return;t=t.parent}e.scope.context.usesTopLevelAwait=!0}Fa.prototype.includeNode=os,Fa.prototype.applyDeoptimizations=as;const ja=["then"];function Ua(e){return void 0===e?"void 0":"boolean"==typeof e?String(e):"string"==typeof e?JSON.stringify(e):"number"==typeof e?function(e){if(Object.is(-0,e))return"-0";const t=e.toExponential(),[n,s]=t.split("e"),i=n.split(".")[1]?.length||0,r=`${n.replace(".","")}e${parseInt(s)-i}`,o=String(e).replace("+","");return r.length<o.length?r:o}(e):Qe}const Ga={"!=":(e,t)=>e!=t,"!==":(e,t)=>e!==t,"%":(e,t)=>e%t,"&":(e,t)=>e&t,"*":(e,t)=>e*t,"**":(e,t)=>e**t,"+":(e,t)=>e+t,"-":(e,t)=>e-t,"/":(e,t)=>e/t,"<":(e,t)=>e<t,"<<":(e,t)=>e<<t,"<=":(e,t)=>e<=t,"==":(e,t)=>e==t,"===":(e,t)=>e===t,">":(e,t)=>e>t,">=":(e,t)=>e>=t,">>":(e,t)=>e>>t,">>>":(e,t)=>e>>>t,"^":(e,t)=>e^t,in:()=>Qe,instanceof:()=>Qe,"|":(e,t)=>e|t},Ha=Symbol("Unassigned");class Wa extends is{constructor(){super(...arguments),this.renderedLiteralValue=Ha}deoptimizeCache(){this.renderedLiteralValue=Qe}getLiteralValueAtPath(e,t,n){if(e.length>0)return Qe;const s=this.left.getLiteralValueAtPath(Be,t,n);if("symbol"==typeof s)return Qe;if("in"===this.operator&&"variable"in this.right&&this.right.variable instanceof Ao){const[e]=this.right.variable.context.traceExport(String(s));return e instanceof xs||e instanceof Po?Qe:!!e}const i=this.right.getLiteralValueAtPath(Be,t,n);return"symbol"==typeof i?Qe:Ga[this.operator](s,i)}getRenderedLiteralValue(){return"in"===this.operator&&"variable"in this.right&&this.right.variable instanceof Ao?this.renderedLiteralValue!==Ha?this.renderedLiteralValue:this.renderedLiteralValue=Ua(this.getLiteralValueAtPath(Be,He,this)):Qe}hasEffects(e){return"+"===this.operator&&this.parent instanceof mr&&""===this.left.getLiteralValueAtPath(Be,He,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(e,t,n){this.included||this.includeNode(e),"symbol"==typeof this.getRenderedLiteralValue()&&(this.left.include(e,t,n),this.right.include(e,t,n),"instanceof"===this.operator&&this.right.includePath(je,e))}includeNode(e){this.included=!0,"in"===this.operator&&"symbol"==typeof this.getRenderedLiteralValue()&&this.right.includePath(ze,e)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=Ee){const s=this.getRenderedLiteralValue();"symbol"!=typeof s?e.overwrite(this.start,this.end,s):(this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t))}}Wa.prototype.applyDeoptimizations=as;class qa extends is{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return!0;e.hasBreak=!0}return e.brokenFlow=!0,!1}include(e,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function Ka(e,t,n){if(n.arguments.length>0)if(n.arguments[n.arguments.length-1].included)for(const s of n.arguments)s.render(e,t);else{let s=n.arguments.length-2;for(;s>=0&&!n.arguments[s].included;)s--;if(s>=0){for(let i=0;i<=s;i++)n.arguments[i].render(e,t);e.remove(ae(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(ae(e.original,"(",n.callee.end)+1,n.end-1)}}qa.prototype.includeNode=os,qa.prototype.applyDeoptimizations=as;class Xa extends is{constructor(){super(...arguments),this.returnExpression=null,this.deoptimizableDependentExpressions=[],this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,n){const{args:s}=e,[i,r]=this.getReturnExpression(n);if(r)return;const o=s.filter(e=>!!e&&e!==st);if(0!==o.length)if(i===st)for(const e of o)e.deoptimizePath(ze);else n.withTrackedEntityAtPath(t,i,()=>{for(const e of o)this.expressionsToBeDeoptimized.add(e);i.deoptimizeArgumentsOnInteractionAtPath(e,t,n)},null)}deoptimizeCache(){if(this.returnExpression?.[0]!==st){this.returnExpression=it;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Ae,this.deoptimizableDependentExpressions=ve;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(ze)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==st&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===st?Qe:t.withTrackedEntityAtPath(e,s,()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n)),Qe)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===st?i:n.withTrackedEntityAtPath(e,i,()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]},it)}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(2===s){const{args:s,withNew:i}=t;if((i?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,s,this))return!1}else if((1===s?n.assigned:n.accessed).trackEntityAtPathAndGetIfTracked(e,this))return!1;const[i,r]=this.getReturnExpression();return(1===s||!r)&&i.hasEffectsOnInteractionAtPath(e,t,n)}includeCallArgumentsWhenCalledAtPath(e,t,n){const[s,i]=this.getReturnExpression();i||s===st||n.includedCallArguments.has(s)?ot(t,n):(n.includedCallArguments.add(s),s.includeCallArgumentsWhenCalledAtPath(e,t,n),n.includedCallArguments.delete(s))}}class Ja extends is{createScope(e){this.scope=new dr(e,!0)}}Ja.prototype.preventChildBlockScope=!0,Ja.prototype.includeNode=rs;class Ya extends is{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===ss?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}includePath(e,t){this.included=!0,this.expression.includePath(e,t)}removeAnnotations(e){this.expression.removeAnnotations(e)}}Ya.prototype.includeNode=os,Ya.prototype.applyDeoptimizations=as;class Za extends ms{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new ps("this",null,t,Be,n,"other")),this.instanceScope=new ms(this,n),this.instanceThisVariable=new ar(n),this.instanceScope.variables.set("this",this.instanceThisVariable)}findLexicalBoundary(){return this}}class Qa extends is{createScope(e){this.scope=new Za(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable,ze,e);for(const n of this.body)n.include(e,t)}}Qa.prototype.includeNode=os,Qa.prototype.applyDeoptimizations=as;class el extends Zi{render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n===Gn&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}function tl(e){return"symbol"==typeof e?e!==tt&&(e===et||Qe):!!e}class nl extends nt{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new nl(this.expressions.map(i=>i.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0])),!1]}hasEffectsOnInteractionAtPath(e,t,n){for(const s of this.expressions)if(s.hasEffectsOnInteractionAtPath(e,t,n))return!0;return!1}}class sl extends is{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ye(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ze(this.flags,65536,e)}get hasDeoptimizedCache(){return Ye(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ze(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(!this.hasDeoptimizedCache&&(this.hasDeoptimizedCache=!0,null!==this.usedBranch)){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(ze),this.included&&e.includePath(ze,es());const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ve;for(const e of t)e.deoptimizeCache()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.consequent.deoptimizePath(e),this.alternate.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();if(!s){if(this.hasDeoptimizedCache)return Qe;const s=this.consequent.getLiteralValueAtPath(e,t,n),i=tl(s);if(i===Qe)return Qe;const r=this.alternate.getLiteralValueAtPath(e,t,n);return i!==tl(r)?Qe:(this.expressionsToBeDeoptimized.push(n),s!==r?i?et:tt:s)}return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new nl([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getUsedBranch();return t?t.hasEffects(e):this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.consequent.hasEffectsOnInteractionAtPath(e,t,n)||this.alternate.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();null===n||t||this.test.shouldBeIncluded(e)?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();null===n||this.test.shouldBeIncluded(t)?(this.consequent.includePath(e,t),this.alternate.includePath(e,t)):n.includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){if(0===e.length){const e=this.getUsedBranch();e?e.includeCallArgumentsWhenCalledAtPath(Be,t,n):(this.consequent.includeCallArgumentsWhenCalledAtPath(Be,t,n),this.alternate.includeCallArgumentsWhenCalledAtPath(Be,t,n))}else ot(t,n)}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Ee){if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const o=this.getUsedBranch(),a=ae(e.original,":",this.consequent.end),l=ce(e.original,(this.consequent.included?ae(e.original,"?",this.test.end):a)+1);s&&me(e,l,o.start),e.remove(this.start,l),this.consequent.included&&e.remove(a,this.end),this.test.removeAnnotations(e),o.render(e,t,{isCalleeOfRenderedParent:n,preventASI:!0,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed)return this.usedBranch;this.isBranchResolutionAnalysed=!0;const e=tl(this.test.getLiteralValueAtPath(Be,He,this));return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}sl.prototype.includeNode=os,sl.prototype.applyDeoptimizations=as;class il extends is{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return!0;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return!0;e.hasContinue=!0}return e.brokenFlow=!0,!1}include(e,t){this.included=!0,this.label?(this.label.include(e,t),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}il.prototype.includeNode=os,il.prototype.applyDeoptimizations=as;class rl extends is{hasEffects(){return!0}}rl.prototype.includeNode=rs;class ol extends is{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(Be,ut,e)}}function al(e,t){const{brokenFlow:n,hasBreak:s,hasContinue:i,ignore:r}=e,{breaks:o,continues:a}=r;return r.breaks=!0,r.continues=!0,e.hasBreak=!1,e.hasContinue=!1,!!t.hasEffects(e)||(r.breaks=o,r.continues=a,e.hasBreak=s,e.hasContinue=i,e.brokenFlow=n,!1)}function ll(e,t,n){const{brokenFlow:s,hasBreak:i,hasContinue:r}=e;e.hasBreak=!1,e.hasContinue=!1,t.include(e,n,{asSingleStatement:!0}),e.hasBreak=i,e.hasContinue=r,e.brokenFlow=s}ol.prototype.includeNode=rs;class cl extends is{hasEffects(e){return!!this.test.hasEffects(e)||al(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),ll(e,this.body,t)}}cl.prototype.includeNode=os,cl.prototype.applyDeoptimizations=as;class ul extends is{hasEffects(){return!1}}ul.prototype.includeNode=rs;class dl extends is{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}}dl.prototype.needsBoundaries=!0,dl.prototype.includeNode=os,dl.prototype.applyDeoptimizations=as;class hl extends is{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){super.initialise(),this.scope.context.addExport(this)}removeAnnotations(e){this.declaration?.removeAnnotations(e)}render(e,t,n){const{start:s,end:i}=n;if(null===this.declaration)e.remove(s,i);else{let n=this.declaration.start;if(this.declaration instanceof Qi){const e=this.declaration.decorators;for(const t of e)n=Math.min(n,t.start);n<=this.start&&(n=this.declaration.start)}e.remove(this.start,n),this.declaration.render(e,t,{end:i,start:s})}}}hl.prototype.needsBoundaries=!0,hl.prototype.includeNode=os,hl.prototype.applyDeoptimizations=as;class pl extends is{}pl.prototype.includeNode=os,pl.prototype.applyDeoptimizations=as;class fl extends is{createScope(e){this.scope=new fr(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||al(e,this.body)}include(e,t){this.included=!0,this.init?.include(e,t,{asSingleStatement:!0}),this.test?.include(e,t),this.update?.include(e,t),ll(e,this.body,t)}render(e,t){this.init?.render(e,t,oe),this.test?.render(e,t,oe),this.update?.render(e,t,oe),this.body.render(e,t)}}fl.prototype.includeNode=os,fl.prototype.applyDeoptimizations=as;const ml=Symbol("unset");class gl extends is{constructor(){super(...arguments),this.testValue=ml}deoptimizeCache(){this.testValue=Qe}hasEffects(e){if(this.test.hasEffects(e))return!0;const t=this.getTestValue();if("symbol"==typeof t){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return!0;const n=e.brokenFlow;return e.brokenFlow=t,null!==this.alternate&&(!!this.alternate.hasEffects(e)||(e.brokenFlow=e.brokenFlow&&n,!1))}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){if(this.included=!0,t)this.includeRecursively(t,e);else{const t=this.getTestValue();"symbol"==typeof t?this.includeUnknownTest(e):this.includeKnownTest(e,t)}}render(e,t){const{snippets:{getPropertyAccess:n}}=t,s=this.getTestValue(),i=[],r=this.test.included,o=!this.scope.context.options.treeshake;r?this.test.render(e,t):e.remove(this.start,this.consequent.start),this.consequent.included&&(o||"symbol"==typeof s||s)?this.consequent.render(e,t):(e.overwrite(this.consequent.start,this.consequent.end,r?";":""),i.push(...this.consequentScope.hoistedDeclarations)),this.alternate&&(!this.alternate.included||!o&&"symbol"!=typeof s&&s?(r&&this.shouldKeepAlternateBranch()?e.overwrite(this.alternate.start,this.end,";"):e.remove(this.consequent.end,this.end),i.push(...this.alternateScope.hoistedDeclarations)):(r?101===e.original.charCodeAt(this.alternate.start-1)&&e.prependLeft(this.alternate.start," "):e.remove(this.consequent.end,this.alternate.start),this.alternate.render(e,t))),this.renderHoistedDeclarations(i,e,n)}getTestValue(){return this.testValue===ml?this.testValue=tl(this.test.getLiteralValueAtPath(Be,He,this)):this.testValue}includeKnownTest(e,t){this.test.shouldBeIncluded(e)&&this.test.include(e,!1),t&&this.consequent.shouldBeIncluded(e)&&this.consequent.include(e,!1,{asSingleStatement:!0}),!t&&this.alternate?.shouldBeIncluded(e)&&this.alternate.include(e,!1,{asSingleStatement:!0})}includeRecursively(e,t){this.test.include(t,e),this.consequent.include(t,e),this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,!1);const{brokenFlow:t}=e;let n=!1;this.consequent.shouldBeIncluded(e)&&(this.consequent.include(e,!1,{asSingleStatement:!0}),n=e.brokenFlow,e.brokenFlow=t),this.alternate?.shouldBeIncluded(e)&&(this.alternate.include(e,!1,{asSingleStatement:!0}),e.brokenFlow=e.brokenFlow&&n)}renderHoistedDeclarations(e,t,n){const s=[...new Set(e.map(e=>{const t=e.variable;return t.included?t.getName(n):""}))].filter(Boolean).join(", ");if(s){const e=this.parent.type,n=e!==Jn&&e!==Vn;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if("IfStatement"===e.type&&e.alternate)return!0;if(e.type===Vn)return!1;e=e.parent}while(e);return!1}}gl.prototype.includeNode=os,gl.prototype.applyDeoptimizations=as;class yl extends is{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}}yl.prototype.needsBoundaries=!0,yl.prototype.includeNode=os,yl.prototype.applyDeoptimizations=as;class bl extends is{}bl.prototype.includeNode=os,bl.prototype.applyDeoptimizations=as;class El{constructor(e){this.interaction={args:[null,e],type:2,withNew:!1}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){rt(e),2===e.type&&0===t.length&&(cs(e.args[1])||ls(e.args[1]))&&e.args[1].deoptimizeArgumentsOnInteractionAtPath(this.interaction,[],n)}includeCallArguments(e,t){at(e,t),2===e.type&&(cs(e.args[1])||ls(e.args[1]))&&e.args[1].includeCallArgumentsWhenCalledAtPath(Be,this.interaction,t)}}class xl{deoptimizeArgumentsOnInteractionAtPath(e){rt(e)}includeCallArguments(e,t){at(e,t)}}function vl(e){return{fileName:e.getFileName(),...e.getPreRenderedChunkInfo()}}class Al extends is{constructor(){super(...arguments),this.inlineNamespace=null,this.resolution=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.localResolution=null,this.resolutionString=null}get shouldIncludeDynamicAttributes(){return Ye(this.flags,268435456)}set shouldIncludeDynamicAttributes(e){this.flags=Ze(this.flags,268435456,e)}bind(){const{options:e,parent:t,resolution:n,source:s}=this;if(s.bind(),e?.bind(),"object"!=typeof n||!n||!("namespace"in n))return;if(t.type===Gn||"AwaitExpression"===t.type)return void(this.localResolution={resolution:n,tracked:!0});if(t.type!==qn)return void(this.localResolution={resolution:n,tracked:!1});let i=t,r=this;for(;!i.computed&&i.object===r&&i.property.type===Wn&&i.parent.type===jn;){const e=i.property.name;if(r=i.parent,"then"===e){const e=r.arguments[0];if(void 0===e||e.type===Hn||e.type===Fn)return i.promiseHandler=new El(So(n.namespace)),void(this.localResolution={resolution:n,tracked:!0})}else if("catch"===e||"finally"===e){if(r.parent.type===qn){i.promiseHandler=new xl,i=r.parent;continue}if(r.parent.type===Gn)return i.promiseHandler=new xl,void(this.localResolution={resolution:n,tracked:!0})}break}this.localResolution={resolution:n,tracked:!1}}deoptimizePath(e){this.localResolution?.resolution?.namespace.deoptimizePath(e)}hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.source.include(e,t),this.shouldIncludeDynamicAttributes&&this.options?.include(e,t),t&&this.localResolution?.resolution.includeAllExports()}includeNode(e){this.included=!0;const{localResolution:t,scope:n,shouldIncludeDynamicAttributes:s}=this;s&&this.options?.includePath(ze,e),n.context.includeDynamicImport(this),n.addAccessedDynamicImport(this),t&&(t.tracked?t.resolution.includeModuleInExecution():t.resolution.includeAllExports())}includePath(e,t){this.included||this.includeNode(t),this.localResolution?.resolution?.namespace.includeMemberPath(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r},importAttributesKey:o}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});return void e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}if(this.mechanism&&(e.overwrite(this.start,ae(e.original,"(",this.start+6)+1,this.mechanism.left),e.overwrite(this.end-1,this.end,this.mechanism.right)),this.resolutionString){if(e.overwrite(this.source.start,this.source.end,this.resolutionString),this.namespaceExportName){const[t,n]=s(["n"],{functionReturn:!0,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${n})`)}}else this.source.render(e,t);!0!==this.attributes&&(this.options&&e.overwrite(this.source.end,this.end-1,"",{contentOnly:!0}),this.attributes&&e.appendLeft(this.end-1,`,${n}${i([[o,this.attributes]],{lineBreakIndent:null})}`))}setExternalResolution(e,t,n,s,i,r,o,a,l,c){const{format:u}=t;this.inlineNamespace=null,this.resolutionString=r,this.namespaceExportName=o,this.attributes=a;const d=[...Pl[u]||[]];let h;({helper:h,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(e,t,n,s,l,c)),h&&d.push(h),d.length>0&&this.scope.addAccessedGlobals(d,i)}setInternalResolution(e){this.inlineNamespace=e}getDynamicImportMechanismAndHelper(e,{compact:t,dynamicImportInCjs:n,format:s,generatedCode:{arrowFunctions:i},interop:r},{_:o,getDirectReturnFunction:a,getDirectReturnIifeLeft:l},c,u,d){const{resolution:h,scope:p}=this,f=c.hookFirstSync("renderDynamicImport",[{chunk:vl(u),customResolution:"string"==typeof h?h:null,format:s,getTargetChunkImports(){if(null===d)return null;const e=[],t=u.getFileName();for(const n of d.dependencies){const s=`'${n.getImportPath(t)}'`;n instanceof $o?e.push({fileName:n.getFileName(),resolvedImportPath:s,type:"external"}):e.push({chunk:n.getPreRenderedChunkInfo(),fileName:n.getFileName(),resolvedImportPath:s,type:"internal"})}return e},moduleAttributes:p.context.module.info.attributes,moduleId:p.context.module.id,moduleRawId:p.context.module.rawId,targetChunk:d?vl(d):null,targetModuleAttributes:h&&"string"!=typeof h?h.info.attributes:{},targetModuleId:h&&"string"!=typeof h?h.id:null,targetModuleRawId:h&&"string"!=typeof h?h.info.rawId:null}]);if(f)return{helper:null,mechanism:f};const m=!h||"string"==typeof h;switch(s){case"cjs":{if(n&&(!h||"string"==typeof h||h instanceof Ns))return{helper:null,mechanism:null};const t=Sl(h,e,r);let s="require(",o=")";t&&(s=`/*#__PURE__*/${t}(${s}`,o+=")");const[c,u]=a([],{functionReturn:!0,lineBreakIndent:null,name:null});return s=`Promise.resolve().then(${c}${s}`,o+=`${u})`,!i&&m&&(s=l(["t"],`${s}t${o}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),o=")"),{helper:t,mechanism:{left:s,right:o}}}case"amd":{const n=t?"c":"resolve",s=t?"e":"reject",c=Sl(h,e,r),[u,d]=a(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),p=c?`${u}${n}(/*#__PURE__*/${c}(m))${d}`:n,[f,g]=a([n,s],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${f}require([`,b=`],${o}${p},${o}${s})${g})`;return!i&&m&&(y=l(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:c,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Sl(e,t,n){return"external"===t?_r[n(e instanceof Ns?e.id:null)]:"default"===t?Nr:null}Al.prototype.applyDeoptimizations=as;const Pl={amd:["require"],cjs:["require"],system:["module"]};class $l extends is{}$l.prototype.includeNode=os,$l.prototype.applyDeoptimizations=as;class wl extends is{}wl.prototype.includeNode=os,wl.prototype.applyDeoptimizations=as;class Il extends Hi{constructor(){super(...arguments),this.isNativeElement=!1}bind(){const e=this.getType();0===e?(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this)):1===e&&(this.isNativeElement=!0)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,Be,e)}includePath(e,t){this.included?e.length>0&&this.variable?.includePath(e,t):(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable,e,t))}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n}){if(this.variable){const s=this.variable.getName(t,n);s!==this.name&&e.overwrite(this.start,this.end,s,{contentOnly:!0,storeName:!0})}else this.isNativeElement&&"preserve"!==this.scope.context.options.jsx.mode&&e.update(this.start,this.end,JSON.stringify(this.name))}getType(){switch(this.parent.type){case"JSXOpeningElement":case"JSXClosingElement":return this.name.startsWith(this.name.charAt(0).toUpperCase())?0:1;case"JSXMemberExpression":return this.parent.object===this?0:2;case"JSXAttribute":case"JSXNamespacedName":return 2;default:throw new Error(`Unexpected parent node type for JSXIdentifier: ${this.parent.type}`)}}}class Cl extends is{render(e,t,{jsxMode:n}=Ee){if(super.render(e,t),["classic","automatic"].includes(n)){const{name:t,value:s}=this,i=t instanceof Il?t.name:`${t.namespace.name}:${t.name.name}`;if("automatic"!==n||"key"!==i){const n=Cs(i);i!==n&&e.overwrite(t.start,t.end,n,{contentOnly:!0}),s?(e.overwrite(t.end,s.start,": ",{contentOnly:!0}),s instanceof Qr&&"string"==typeof s.value&&s.value.includes("\n")&&e.overwrite(s.start,s.end,JSON.stringify(s.value),{contentOnly:!0})):e.appendLeft(t.end,": true")}}}}Cl.prototype.includeNode=rs;class kl extends is{render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n?e.overwrite(this.start,this.end,")",{contentOnly:!0}):super.render(e,t)}}kl.prototype.includeNode=rs;class Nl extends is{render(e,t){this.argument.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.argument.start,"",{contentOnly:!0}),e.overwrite(this.argument.end,this.end,"",{contentOnly:!0}))}}class Ol extends is{}Ol.prototype.includeNode=rs;class Rl extends is{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.expression.includePath(ze,e)}render(e,t){const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.remove(this.start,this.expression.start),e.remove(this.expression.end,this.end)),this.expression.render(e,t)}}const Dl=/^[ \t]*\r?\n[ \t\r\n]*|[ \t]*\r?\n[ \t\r\n]*$/g,Ml=/[ \t]*\r?\n[ \t\r\n]*/g;class _l extends is{shouldRender(){return!!this.getRenderedText()}render(e){const{mode:t}=this.scope.context.options.jsx;"preserve"!==t&&e.overwrite(this.start,this.end,JSON.stringify(this.getRenderedText()),{contentOnly:!0})}getRenderedText(){return void 0===this.renderedText&&(this.renderedText=this.value.replace(Dl,"").replace(Ml," ")),this.renderedText}}function Ll(e){let t=0;for(const n of e)n instanceof Rl&&n.expression instanceof Ol||n instanceof _l&&!n.shouldRender()||t++;return t}function Tl(e,t,n,s,i){const[r,o]=e.split(".");let a;return n?(a=s.scope.context.getImportedJsxFactoryVariable(o?"default":r,s.start,n),t&&(s.scope.findGlobal(r).includePath(ze,i),a.globalName=r)):a=s.scope.findGlobal(r),s.scope.context.includeVariableInModule(a,ze,i),a instanceof ps&&(a.consolidateInitializers(),a.addUsedPlace(s),s.scope.context.requestTreeshakingPass()),a}_l.prototype.includeNode=rs;class Bl extends is{constructor(){super(...arguments),this.factoryVariable=null,this.factory=null}initialise(){super.initialise();const{importSource:e}=this.jsxMode=this.getRenderingMode();e&&this.scope.context.addImportSource(e)}include(e,t){this.included||this.includeNode(e);for(const n of this.children)n.include(e,t)}includeNode(e){this.included=!0;const{factory:t,importSource:n,mode:s}=this.jsxMode;t&&(this.factory=t,this.factoryVariable=Tl(t,"preserve"===s,n,this,e))}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;return"automatic"===t?{factory:Ll(this.children)>1?"jsxs":"jsx",importSource:e.jsxImportSource,mode:t}:{factory:n,importSource:s,mode:t}}renderChildren(e,t,n){const{children:s}=this;let i=!1,r=n,o=null;for(const n of s)n instanceof Rl&&n.expression instanceof Ol||n instanceof _l&&!n.shouldRender()?e.remove(r,n.end):(e.appendLeft(r,", "),n.render(e,t),o?i=!0:o=n),r=n.end;return{childrenEnd:r,firstChild:o,hasMultipleChildren:i}}}Bl.prototype.applyDeoptimizations=as;class zl extends is{}zl.prototype.includeNode=rs;class Fl extends is{render(e,t,{jsxMode:n=this.scope.context.options.jsx.mode}={}){this.name.render(e,t);for(const s of this.attributes)s.render(e,t,{jsxMode:n})}}Fl.prototype.includeNode=rs;class Vl extends is{hasEffects(e){const{brokenFlow:t,includedLabels:n}=e;e.ignore.labels.add(this.label.name),e.includedLabels=new Set;let s=!1;return this.body.hasEffects(e)?s=!0:(e.ignore.labels.delete(this.label.name),e.includedLabels.has(this.label.name)&&(e.includedLabels.delete(this.label.name),e.brokenFlow=t)),e.includedLabels=new Set([...n,...e.includedLabels]),s}include(e,t){this.included||this.includeNode(e);const{brokenFlow:n,includedLabels:s}=e;e.includedLabels=new Set,this.body.include(e,t),(t||e.includedLabels.has(this.label.name))&&(this.label.include(e,t),e.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}includeNode(e){this.included=!0,this.body.includePath(ze,e)}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,ce(e.original,ae(e.original,":",this.label.end)+1)),this.body.render(e,t)}}Vl.prototype.applyDeoptimizations=as;class jl extends is{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return Ye(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Ze(this.flags,65536,e)}get hasDeoptimizedCache(){return Ye(this.flags,33554432)}set hasDeoptimizedCache(e){this.flags=Ze(this.flags,33554432,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.hasDeoptimizedCache)return;if(this.hasDeoptimizedCache=!0,this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(ze),this.included&&e.includePath(ze,es())}const{scope:{context:e},expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=ve;for(const e of t)e.deoptimizeCache();e.requestTreeshakingPass()}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){if(n===this)return Qe;const s=this.getUsedBranch();if(s)return this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n);if(!this.hasDeoptimizedCache&&!e.length){const s=tl(this.right.getLiteralValueAtPath(e,t,n));if("symbol"!=typeof s){if(!s&&"&&"===this.operator)return this.expressionsToBeDeoptimized.push(n),tt;if(s&&"||"===this.operator)return this.expressionsToBeDeoptimized.push(n),et}}return Qe}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new nl([this.left.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,n,s)[0]]),!1]}hasEffects(e){return!!this.left.hasEffects(e)||this.getUsedBranch()!==this.left&&this.right.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){const s=this.getUsedBranch();return s?s.hasEffectsOnInteractionAtPath(e,t,n):this.left.hasEffectsOnInteractionAtPath(e,t,n)||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.getUsedBranch();t||!n||n===this.right&&this.left.shouldBeIncluded(e)?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}includePath(e,t){this.included=!0;const n=this.getUsedBranch();!n||n===this.right&&this.left.shouldBeIncluded(t)?(this.left.includePath(e,t),this.right.includePath(e,t)):n.includePath(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=Ee){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=ae(e.original,this.operator,this.left.end);if(this.right.included){const t=ce(e.original,o+2);e.remove(this.start,t),s&&me(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!ue.test(e[n-1]))return n;n--}}(e.original,this.left.end,o),this.end);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=!0;const e=this.left.getLiteralValueAtPath(Be,He,this),t=tl(e);if("symbol"==typeof t||"??"===this.operator&&"symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&t||"&&"===this.operator&&!t||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}jl.prototype.includeNode=os,jl.prototype.applyDeoptimizations=as;class Ul extends is{constructor(){super(...arguments),this.objectEntity=null,this.protoProp=null}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.getObjectEntity().getLiteralValueAtPath(e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included||this.includeNode(e),this.getObjectEntity().include(e,t),this.protoProp?.include(e,t)}includeNode(e){this.included=!0,this.protoProp?.includePath(ze,e)}includePath(e,t){this.included||this.includeNode(t),this.getObjectEntity().includePath(e,t)}includeCallArgumentsWhenCalledAtPath(e,t,n){this.getObjectEntity().includeCallArgumentsWhenCalledAtPath(e,t,n)}render(e,t,{renderedSurroundingElement:n}=Ee){if(n!==Gn&&n!==Fn||(e.appendRight(this.start,"("),e.prependLeft(this.end,")")),this.properties.length>0){const n=fe(this.properties,e,this.start+1,this.end-1);let s=null;for(const{node:i,separator:r,start:o,end:a}of n)i.included?(s=r,i.render(e,t)):re(i,e,o,a);s&&e.remove(s,this.end-1)}}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ri;const t=[];for(const n of this.properties){if(n instanceof Ei){t.push({key:we,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(Be,He,this);if("symbol"==typeof e){t.push({key:_e(e)?e:we,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Ki?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){this.protoProp=n,e=n.value instanceof Qr&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new ni(t,e)}}Ul.prototype.applyDeoptimizations=as;class Gl extends is{}Gl.prototype.includeNode=rs;class Hl extends is{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(ts()):this.hasCachedEffect)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e)){if(this.scope.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=!0;const{code:e,log:n,module:s}=this.scope.context;n(vt,yn(e,s.id,mt(e,t.start,{offsetLine:1})),t.start)}return this.hasCachedEffect=!0}return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}initialise(){if(super.initialise(),this.invalidAnnotations)for(const{start:e,end:t,type:n}of this.invalidAnnotations)this.scope.context.magicString.remove(e,t),"pure"!==n&&"noSideEffects"!==n||this.scope.context.log(xt,En(this.scope.context.code.slice(e,t),this.scope.context.module.id,n),e)}render(e,t){let n=this.start;if(e.original.startsWith("#!")&&(n=Math.min(e.original.indexOf("\n")+1,this.end),e.remove(0,n)),this.body.length>0){for(;"/"===e.original[n]&&/[*/]/.test(e.original[n+1]);){const t=he(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}pe(this.body,e,n,this.end,t)}else super.render(e,t)}}Hl.prototype.includeNode=os,Hl.prototype.applyDeoptimizations=as;class Wl extends Xi{get method(){return Ye(this.flags,262144)}set method(e){this.flags=Ze(this.flags,262144,e)}get shorthand(){return Ye(this.flags,524288)}set shorthand(e){this.flags=Ze(this.flags,524288,e)}declare(e,t,n){return this.value.declare(e,this.getPathInProperty(t),n)}deoptimizeAssignment(e,t){this.value.deoptimizeAssignment?.(this.getPathInProperty(e),t)}hasEffects(e){return this.key.hasEffects(e)||this.value.hasEffects(e)}hasEffectsWhenDestructuring(e,t,n){return this.value.hasEffectsWhenDestructuring?.(e,this.getPathInProperty(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.getPathInProperty(t);let i=this.value.includeDestructuredIfNecessary(e,s,n)||this.included;return(i||=this.key.hasEffects(ts()))&&(this.key.include(e,!1),this.value.included||(this.value.includeNode(e),this.value.includeDestructuredIfNecessary(e,s,n))),!this.included&&i&&this.includeNode(e),this.included}include(e,t){this.included=!0,this.key.include(e,t),this.value.include(e,t)}includePath(e,t){this.included=!0,this.value.includePath(e,t)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}setAssignedValue(e){this.value.setAssignedValue(e)}getPathInProperty(e){return e.at(-1)===we?e:this.computed?[...e,we]:this.key instanceof Ki?[...e,this.key.name]:[...e,String(this.key.value)]}}Wl.prototype.includeNode=os,Wl.prototype.applyDeoptimizations=as;class ql extends is{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t,n){return this.declarationInit=n,this.argument.declare(e,Kl(t),n)}deoptimizeAssignment(e,t){this.argument.deoptimizeAssignment(Kl(e),t)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(Be)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(Be,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.argument.hasEffectsWhenDestructuring(e,Kl(t),n)}includeDestructuredIfNecessary(e,t,n){const s=this.argument.includeDestructuredIfNecessary(e,Kl(t),n);return!this.included&&s&&this.includeNode(e),this.included}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}markDeclarationReached(){this.argument.markDeclarationReached()}setAssignedValue(e){this.argument.setAssignedValue(e)}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([we,we]),this.scope.context.requestTreeshakingPass())}}ql.prototype.includeNode=rs;const Kl=e=>e.at(-1)===we?e:[...e,we];class Xl extends is{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e)&&(e.brokenFlow=!0,1))}include(e,t){this.included||this.includeNode(e),this.argument?.include(e,t),e.brokenFlow=!0}includeNode(e){this.included=!0,this.argument?.includePath(ze,e)}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||st)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}Xl.prototype.applyDeoptimizations=as;class Jl extends is{deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,n)}hasEffects(e){for(const t of this.expressions)if(t.hasEffects(e))return!0;return!1}hasEffectsOnInteractionAtPath(e,t,n){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){this.included=!0;const n=this.expressions[this.expressions.length-1];for(const s of this.expressions)(t||s===n&&!(this.parent instanceof mr)||s.shouldBeIncluded(e))&&s.include(e,t)}includePath(e,t){this.included=!0,this.expressions[this.expressions.length-1].includePath(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=Ee){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of fe(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&me(e,u,l.start),1===r){const i=n||this.parent.type;l.render(e,t,{isCalleeOfRenderedParent:s&&l===a,renderedParentType:i,renderedSurroundingElement:i})}else l.render(e,t);else re(l,e,u,d);o&&e.remove(o,this.end)}}Jl.prototype.includeNode=os,Jl.prototype.applyDeoptimizations=as;class Yl extends is{createScope(e){this.scope=new fr(e)}hasEffects(e){for(const t of this.body)if(t.hasEffects(e))return!0;return!1}include(e,t){this.included=!0;for(const n of this.body)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t){if(this.body.length>0){const n=ae(e.original.slice(this.start,this.end),"{")+1;pe(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}Yl.prototype.includeNode=os,Yl.prototype.applyDeoptimizations=as;class Zl extends is{hasEffects(e){if(this.test?.hasEffects(e))return!0;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return!0}return!1}include(e,t){this.included=!0,this.test?.include(e,t);for(const n of this.consequent)(t||n.shouldBeIncluded(e))&&n.include(e,t)}render(e,t,n){if(this.test&&(this.test.render(e,t),this.test.start===this.start+4&&e.prependLeft(this.test.start," ")),this.consequent.length>0){const s=this.test?this.test.end:ae(e.original,"default",this.start)+7,i=ae(e.original,":",s)+1;pe(this.consequent,e,i,n.end,t)}}}Zl.prototype.needsBoundaries=!0,Zl.prototype.includeNode=os,Zl.prototype.applyDeoptimizations=as;class Ql extends is{createScope(e){this.parentScope=e,this.scope=new fr(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return!0;const{brokenFlow:t,hasBreak:n,ignore:s}=e,{breaks:i}=s;s.breaks=!0,e.hasBreak=!1;let r=!0;for(const n of this.cases){if(n.hasEffects(e))return!0;r&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=t}return null!==this.defaultCase&&(e.brokenFlow=r),s.breaks=i,e.hasBreak=n,!1}include(e,t){this.included=!0,this.discriminant.include(e,t);const{brokenFlow:n,hasBreak:s}=e;e.hasBreak=!1;let i=!0,r=t||null!==this.defaultCase&&this.defaultCase<this.cases.length-1;for(let s=this.cases.length-1;s>=0;s--){const o=this.cases[s];if(o.included&&(r=!0),!r){const e=ts();e.ignore.breaks=!0,r=o.hasEffects(e)}r?(o.include(e,t),i&&=e.brokenFlow&&!e.hasBreak,e.hasBreak=!1,e.brokenFlow=n):i=n}r&&null!==this.defaultCase&&(e.brokenFlow=i),e.hasBreak=s}initialise(){super.initialise();for(let e=0;e<this.cases.length;e++)if(null===this.cases[e].test)return void(this.defaultCase=e);this.defaultCase=null}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&pe(this.cases,e,this.cases[0].start,this.end-1,t)}}Ql.prototype.includeNode=os,Ql.prototype.applyDeoptimizations=as;class ec extends Xa{get hasCheckedForWarnings(){return Ye(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=Ze(this.flags,134217728,e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.quasi.expressions)if(t.hasEffects(e))return!0;return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(Be,this.interaction,e)}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.quasi.include(e,!1),this.tag.include(e,!1),this.tag.includeCallArgumentsWhenCalledAtPath(Be,this.interaction,e))}initialise(){super.initialise(),this.args=[st,...this.quasi.expressions],this.interaction={args:[this.tag instanceof so&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){if(this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t),!this.hasCheckedForWarnings&&this.tag.type===Wn){this.hasCheckedForWarnings=!0;const{name:e}=this.tag;this.scope.findVariable(e).isNamespace&&this.scope.context.log(xt,un(e),this.start)}}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Be,He),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=He){return null===this.returnExpression?(this.returnExpression=it,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(Be,this.interaction,e,this)):this.returnExpression}}ec.prototype.includeNode=rs;class tc extends is{get tail(){return Ye(this.flags,1048576)}set tail(e){this.flags=Ze(this.flags,1048576,e)}bind(){}hasEffects(){return!1}render(){}}tc.prototype.includeNode=rs;class nc extends ms{constructor(e,t,n){super(e,t),this.importDescriptions=n,this.variables.set("this",new ps("this",null,Ms,Be,t,"other"))}addDeclaration(e,t,n,s,i){return this.importDescriptions.has(e.name)&&t.error(On(e.name),e.start),super.addDeclaration(e,t,n,s,i)}addExportDefaultDeclaration(e,t){const n=new vo(e,t);return this.variables.set("default",n),n}addNamespaceMemberAccess(){}deconflict(e,t,n){for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t)return t;const n=this.context.traceVariable(e)||this.parent.findVariable(e);return n instanceof Ui&&this.accessedOutsideVariables.set(e,n),n}}class sc extends is{constructor(){super(...arguments),this.directlyIncluded=!1,this.includedLabelsAfterBlock=null}hasEffects(e){return(this.scope.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const n=this.scope.context.options.treeshake?.tryCatchDeoptimization,{brokenFlow:s,includedLabels:i}=e;if(this.directlyIncluded&&n){if(this.includedLabelsAfterBlock)for(const e of this.includedLabelsAfterBlock)i.add(e)}else this.included=!0,this.directlyIncluded=!0,this.block.include(e,n?ns:t),i.size>0&&(this.includedLabelsAfterBlock=[...i]),e.brokenFlow=s;null!==this.handler&&(this.handler.include(e,t),e.brokenFlow=s),this.finalizer?.include(e,t)}}sc.prototype.includeNode=os,sc.prototype.applyDeoptimizations=as;const ic={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Qe,typeof:e=>typeof e,void:()=>{},"~":e=>~e},rc=Symbol("Unassigned");class oc extends is{constructor(){super(...arguments),this.renderedLiteralValue=rc}get prefix(){return Ye(this.flags,2097152)}set prefix(e){this.flags=Ze(this.flags,2097152,e)}deoptimizeCache(){this.renderedLiteralValue=Qe}getLiteralValueAtPath(e,t,n){if(e.length>0)return Qe;const s=this.argument.getLiteralValueAtPath(Be,t,n);if("symbol"==typeof s){if("void"===this.operator)return;if("!"===this.operator){if(s===tt)return!0;if(s===et)return!1}return Qe}return ic[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Ki)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(Be,ct,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>("void"===this.operator?0:1)}applyDeoptimizations(){this.deoptimized=!0,"delete"===this.operator&&(this.argument.deoptimizePath(Be),this.scope.context.requestTreeshakingPass())}getRenderedLiteralValue(e){return this.renderedLiteralValue!==rc?this.renderedLiteralValue:this.renderedLiteralValue=e?Qe:Ua(this.getLiteralValueAtPath(Be,He,this))}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;const s=this.argument instanceof Ki&&this.argument.variable?.included;("symbol"==typeof this.getRenderedLiteralValue(t)||this.argument.shouldBeIncluded(e)||s)&&(this.argument.include(e,t),this.renderedLiteralValue=Qe)}render(e,t){if("symbol"==typeof this.renderedLiteralValue)super.render(e,t);else{let t=this.renderedLiteralValue;ac.test(e.original[this.start-1])||(t=` ${t}`),e.overwrite(this.start,this.end,t)}}}const ac=/[\s([=%&*+-/<>^|,?:;]/;oc.prototype.includeNode=rs;class lc extends is{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),this.argument.hasEffectsAsAssignmentTarget(e,!0)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(e,t){this.included||this.includeNode(e),this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(st)}render(e,t){const{exportNamesByVariable:n,format:s,snippets:{_:i}}=t;if(this.argument.render(e,t),"system"===s){const s=this.argument.variable,r=n.get(s);if(r)if(this.prefix)1===r.length?ye(s,this.start,this.end,e,t):be(s,this.start,this.end,this.parent.type!==Gn,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${ge([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==Gn,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath(Be),this.argument instanceof Ki&&this.scope.findVariable(this.argument.name).markReassigned(),this.scope.context.requestTreeshakingPass()}}function cc(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}lc.prototype.includeNode=rs;class uc extends is{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(Be)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=Ee){this.included=!0;for(const s of this.declarations){(t||s.shouldBeIncluded(e))&&s.include(e,t);const{id:i,init:r}=s;n&&i.include(e,t),r&&i.included&&!r.included&&(i instanceof Fa||i instanceof Ba)&&r.include(e,t)}}initialise(){super.initialise(),"await using"===this.kind&&Va(this);for(const e of this.declarations)e.declareDeclarator(this.kind)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=Ee){if(this.areAllDeclarationsIncludedAndNotExported(t.exportNamesByVariable)){for(const n of this.declarations)n.render(e,t);n.isNoStatement||59===e.original.charCodeAt(this.end-1)||e.appendLeft(this.end,";")}else this.renderReplacedDeclarations(e,t)}renderDeclarationEnd(e,t,n,s,i,r,o){59===e.original.charCodeAt(this.end-1)&&e.remove(this.end-1,this.end),t+=";",null===n?e.appendLeft(i,t):(10!==e.original.charCodeAt(s-1)||10!==e.original.charCodeAt(this.end)&&13!==e.original.charCodeAt(this.end)||(s--,13===e.original.charCodeAt(s)&&s--),s===n+1?e.overwrite(n,i,t):(e.overwrite(n,n+1,t),e.remove(s,i))),r.length>0&&e.appendLeft(i,` ${ge(r,o)};`)}renderReplacedDeclarations(e,t){const n=fe(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=ce(e.original,this.start+this.kind.length);let r=i-1;e.remove(this.start,r);let o,a,l=!1,c=!1,u="";const d=[],h=function(e,t,n){let s=null;if("system"===t.format){for(const{node:i}of e)i.id instanceof Ki&&i.init&&0===n.length&&1===t.exportNamesByVariable.get(i.id.variable)?.length?(s=i.id.variable,n.push(s)):i.id.addExportedVariables(n,t.exportNamesByVariable);n.length>1?s=null:s&&(n.length=0)}return s}(n,t,d);for(const{node:d,start:p,separator:f,contentEnd:m,end:g}of n)if(d.included){if(d.render(e,t),o="",a="",!d.id.included||d.id instanceof Ki&&cc(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=ae(e.original,"=",d.id.end);ye(h,ce(e.original,n+1),null===f?m:f,e,t)}l?u+=",":(c&&(u+=";"),o+=`${this.kind} `,l=!0)}i===r+1?e.overwrite(r,i,u+o):(e.overwrite(r,r+1,u),e.appendLeft(i,o)),s=m,i=g,c=!0,r=f,u=""}else re(d,e,p,g);this.renderDeclarationEnd(e,u,r,s,i,d,t)}areAllDeclarationsIncludedAndNotExported(e){if("await using"===this.kind||"using"===this.kind)return!0;for(const t of this.declarations){if(!t.id.included)return!1;if(t.id.type===Wn){if(e.has(t.id.variable))return!1}else{const n=[];if(t.id.addExportedVariables(n,e),n.length>0)return!1}}return!0}}uc.prototype.includeNode=os,uc.prototype.applyDeoptimizations=as;class dc extends is{declareDeclarator(e){this.isUsingDeclaration="using"===e,this.isAsyncUsingDeclaration="await using"===e,this.id.declare(e,Be,this.init||Ms)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.isUsingDeclaration||this.isAsyncUsingDeclaration||this.id.hasEffects(e)||this.scope.context.options.treeshake.propertyReadSideEffects&&this.id.hasEffectsWhenDestructuring(e,Be,this.init||Ms)}include(e,t){const{id:n,init:s}=this;this.included||this.includeNode(e),s?.include(e,t),n.markDeclarationReached(),t?n.include(e,t):n.includeDestructuredIfNecessary(e,Be,s||Ms)}removeAnnotations(e){this.init?.removeAnnotations(e)}render(e,t){const{exportNamesByVariable:n,snippets:{_:s,getPropertyAccess:i}}=t,{end:r,id:o,init:a,start:l}=this,c=o.included||this.isUsingDeclaration||this.isAsyncUsingDeclaration;if(c)o.render(e,t);else{const t=ae(e.original,"=",o.end);e.remove(l,ce(e.original,t+1))}a?(o instanceof Ki&&a instanceof el&&!a.id&&o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`),a.render(e,t,c?Ee:{renderedSurroundingElement:Gn})):o instanceof Ki&&cc(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}includeNode(e){this.included=!0;const{id:t,init:n}=this;if(n&&(this.isUsingDeclaration?n.includePath(hc,e):this.isAsyncUsingDeclaration&&n.includePath(pc,e),t instanceof Ki&&n instanceof el&&!n.id)){const{name:e,variable:s}=t;for(const t of n.scope.accessedOutsideVariables.values())t!==s&&t.forbidName(e)}}}dc.prototype.applyDeoptimizations=as;const hc=[Oe],pc=[Re];class fc extends is{hasEffects(e){return!!this.test.hasEffects(e)||al(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),ll(e,this.body,t)}}fc.prototype.includeNode=os,fc.prototype.applyDeoptimizations=as;class mc extends fr{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s,i){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s,i)}}const gc=[class extends is{initialise(){const{id:e}=this.scope.context.module;return Ht(Dn(Wt(Nn(this.message)),e))}},class extends is{initialise(){const e=this.start,{id:t}=this.scope.context.module,n=Dn(Wt(Nn(this.message,e)),t);this.scope.context.error(n,e)}},xi,Ba,class extends yr{constructor(){super(...arguments),this.objectEntity=null}get expression(){return Ye(this.flags,8388608)}set expression(e){this.flags=Ze(this.flags,8388608,e)}createScope(e){this.scope=new hr(e,!1)}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,t,n){if(this.annotationNoSideEffects&&0===e.length&&2===t.type)return!1;if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(2===t.type){const{ignore:e,brokenFlow:t}=n;if(n.ignore={breaks:!1,continues:!1,labels:new Set,returnYield:!0,this:!1},this.body.hasEffects(n))return!0;n.ignore=e,n.brokenFlow=t}return!1}onlyFunctionCallUsed(){return this.parent.type===jn&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Ki||n.include(e,t)}includeNode(e){this.included=!0,this.body.includePath(ze,e);for(const t of this.params)t instanceof Ki||t.includePath(ze,e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new ni([],ri)}},class extends is{constructor(){super(...arguments),this.isConstReassignment=!1}hasEffects(e){const{deoptimized:t,isConstReassignment:n,left:s,operator:i,right:r}=this;return t||this.applyDeoptimizations(),n||r.hasEffects(e)||s.hasEffectsAsAssignmentTarget(e,"="!==i)||this.left.hasEffectsWhenDestructuring?.(e,Be,r)}hasEffectsOnInteractionAtPath(e,t,n){return 1===t.type&&this.left.included||this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,isConstReassignment:s,left:i,right:r,operator:o}=this;n||this.applyDeoptimizations(),this.included||this.includeNode(e);const a=ts();(t||s||"="!==o||i.included||i.hasEffectsAsAssignmentTarget(a,!1)||i.hasEffectsWhenDestructuring?.(a,Be,r))&&i.includeAsAssignmentTarget(e,t,"="!==o),r.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ze,e)}initialise(){if(super.initialise(),this.left instanceof Ki){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&(this.isConstReassignment=!0,this.scope.context.log(xt,{code:"CONST_REASSIGN",message:"Cannot reassign a variable declared with `const`"},this.left.start))}this.left.setAssignedValue(this.right)}render(e,t,{preventASI:n,renderedParentType:s,renderedSurroundingElement:i}=Ee){const{left:r,right:o,start:a,end:l,parent:c}=this;if(r.included)r.render(e,t),o.render(e,t);else{const l=ce(e.original,ae(e.original,"=",r.end)+1);e.remove(a,l),n&&me(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Ki){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?ye(n,a,l,e,t):be(n,a,l,c.type!==Gn,e,t))}else{const n=[];if(r.addExportedVariables(n,t.exportNamesByVariable),n.length>0)return void function(e,t,n,s,i,r){const{_:o,getDirectReturnIifeLeft:a}=r.snippets;i.prependRight(t,a(["v"],`${ge(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===Gn,e,t)}r.included&&r instanceof Fa&&(i===Gn||i===Fn)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizeAssignment(Be,this.right),this.scope.context.requestTreeshakingPass()}},class extends is{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t,n){return this.left.declare(e,t,n)}deoptimizeAssignment(e,t){this.left.deoptimizeAssignment(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(Be,t,n)}hasEffectsWhenDestructuring(e,t,n){return this.left.hasEffectsWhenDestructuring(e,t,n)}includeDestructuredIfNecessary(e,t,n){let s=this.left.includeDestructuredIfNecessary(e,t,n)||this.included;return(s||=this.right.shouldBeIncluded(e))&&(this.right.include(e,!1),this.left.included||(this.left.includeNode(e),this.left.includeDestructuredIfNecessary(e,t,n))),!this.included&&s&&this.includeNode(e),this.included}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ze,e)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=Ee){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}setAssignedValue(e){this.left.setAssignedValue(e)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Be),this.right.deoptimizePath(ze),this.scope.context.requestTreeshakingPass()}},class extends is{deoptimizePath(e){this.argument.deoptimizePath(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}initialise(){super.initialise(),Va(this)}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument.includePath(ja,e)}includePath(e,t){this.deoptimized||this.applyDeoptimizations(),this.included||this.includeNode(t),this.argument.includePath(e,t)}},Wa,gr,qa,class extends Xa{get hasCheckedForWarnings(){return Ye(this.flags,134217728)}set hasCheckedForWarnings(e){this.flags=Ze(this.flags,134217728,e)}get optional(){return Ye(this.flags,128)}set optional(e){this.flags=Ze(this.flags,128,e)}bind(){super.bind(),this.interaction={args:[this.callee instanceof so&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return eo(this,this.callee,e,t,n)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Be,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===ss)return ss;if(this.optional&&null==this.callee.getLiteralValueAtPath(Be,He,this))return!this.annotationPure&&t||ss;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(Be,this.interaction,e))}include(e,t){this.included||this.includeNode(e),t?(super.include(e,!0),t===ns&&this.callee instanceof Ki&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.callee.include(e,!1),this.callee.includeCallArgumentsWhenCalledAtPath(Be,this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations()}initialise(){super.initialise(),this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t,{renderedSurroundingElement:n}=Ee){var s;this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),Ka(e,t,this),this.callee instanceof Ki&&!this.hasCheckedForWarnings&&(this.hasCheckedForWarnings=!0,this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(xt,un(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(xt,{code:"EVAL",id:s=this.scope.context.module.id,message:`Use of eval in "${wt(s)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Nt("troubleshooting/#avoiding-eval")},this.start))}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Be,He),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=He){return null===this.returnExpression?(this.returnExpression=it,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(Be,this.interaction,e,this)):this.returnExpression}},Ja,Ya,Qa,Qi,el,sl,il,rl,ol,mr,cl,ul,dl,xr,hl,pl,mr,class extends is{createScope(e){this.scope=new fr(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||al(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),ll(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ze,e)}initialise(){super.initialise(),this.left.setAssignedValue(st)}render(e,t){this.left.render(e,t,oe),this.right.render(e,t,oe),110===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Be),this.scope.context.requestTreeshakingPass()}},class extends is{get await(){return Ye(this.flags,131072)}set await(e){this.flags=Ze(this.flags,131072,e)}createScope(e){this.scope=new fr(e)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included||this.includeNode(e),i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),ll(e,n,t)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.right.includePath(ze,e)}initialise(){super.initialise(),this.await&&Va(this),this.left.setAssignedValue(st)}render(e,t){this.left.render(e,t,oe),this.right.render(e,t,oe),102===e.original.charCodeAt(this.right.start-1)&&e.prependLeft(this.right.start," "),this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(Be),this.right.deoptimizePath(ze),this.scope.context.requestTreeshakingPass()}},fl,Er,class extends br{createScope(e){super.createScope(this.idScope=new ms(e,e.context))}onlyFunctionCallUsed(){return this.parent.type===jn&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=Ee){super.render(e,t),n===Gn&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}},Ki,gl,class extends is{},yl,bl,Al,$l,wl,Cl,class extends kl{},class extends kl{},class extends Bl{include(e,t){super.include(e,t),this.openingElement.include(e,t),this.closingElement?.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}getRenderingMode(){const e=this.scope.context.options.jsx,{mode:t,factory:n,importSource:s}=e;if("automatic"===t){let e=!1;for(const t of this.openingElement.attributes)if(t instanceof Nl)e=!0;else if(e&&"key"===t.name.name)return{factory:n,importSource:s,mode:"classic"}}return super.getRenderingMode()}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factory:o,factoryVariable:a,openingElement:{end:l,selfClosing:c}}=this,[,...u]=o.split("."),{firstAttribute:d,hasAttributes:h,hasSpread:p,inObject:f,previousEnd:m}=this.renderAttributes(e,t,[a.getName(n,s),...u].join("."),!1);this.wrapAttributes(e,f,h,p,d,"null",m),this.renderChildren(e,t,l),c?e.appendLeft(r,")"):i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingElement:i,end:r,factoryVariable:o,openingElement:{end:a,selfClosing:l}}=this;let{firstAttribute:c,hasAttributes:u,hasSpread:d,inObject:h,keyAttribute:p,previousEnd:f}=this.renderAttributes(e,t,o.getName(n,s),!0);const{firstChild:m,hasMultipleChildren:g,childrenEnd:y}=this.renderChildren(e,t,a);m&&(e.prependRight(m.start,"children: "+(g?"[":"")),h||(e.prependRight(m.start,"{ "),h=!0),f=i.start,g&&e.appendLeft(f,"]"));const b=m?y:f;if(this.wrapAttributes(e,h,u||!!m,d,c||m,"{}",b),p){const{value:t}=p;e.appendLeft(b,", "),t?e.move(t.start,t.end,b):e.appendLeft(b,"true")}l?e.appendLeft(p?.value?.end||r,")"):i.render(e,t)}renderAttributes(e,t,n,s){const{jsxMode:{mode:i},openingElement:r}=this,{attributes:o,end:a,start:l,name:{start:c,end:u}}=r;e.update(l,c,`/*#__PURE__*/${n}(`),r.render(e,t,{jsxMode:i});let d=null,h=!1,p=!1,f=u,m=!1,g=null;for(const t of o){if(t instanceof Cl){if(s&&"key"===t.name.name){d=t,e.remove(f,t.value?.start||t.end);continue}e.appendLeft(f,","),p||(e.prependRight(t.start,"{ "),p=!0),m=!0}else p?(m&&e.appendLeft(f," "),e.appendLeft(f,"},"),p=!1):e.appendLeft(f,","),h=!0;f=t.end,g??=t}return e.remove(o.at(-1)?.end||f,a),{firstAttribute:g,hasAttributes:m,hasSpread:h,inObject:p,keyAttribute:d,previousEnd:f}}wrapAttributes(e,t,n,s,i,r,o){if(t&&e.appendLeft(o," }"),s){if(n){const{start:t}=i;i instanceof Nl&&e.prependRight(t,"{}, "),e.prependRight(t,"Object.assign("),e.appendLeft(o,")")}}else n||e.appendLeft(o,`, ${r}`)}},Ol,Rl,class extends Bl{include(e,t){super.include(e,t),this.openingFragment.include(e,t),this.closingFragment.include(e,t)}render(e,t){switch(this.jsxMode.mode){case"classic":this.renderClassicMode(e,t);break;case"automatic":this.renderAutomaticMode(e,t);break;default:super.render(e,t)}}renderClassicMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factory:r,factoryVariable:o,openingFragment:a,start:l}=this,[,...c]=r.split(".");a.render(e,t),e.prependRight(l,`/*#__PURE__*/${[o.getName(n,s),...c].join(".")}(`),e.appendLeft(a.end,", null"),this.renderChildren(e,t,a.end),i.render(e,t)}renderAutomaticMode(e,t){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,{closingFragment:i,factoryVariable:r,openingFragment:o,start:a}=this;o.render(e,t),e.prependRight(a,`/*#__PURE__*/${r.getName(n,s)}(`);const{firstChild:l,hasMultipleChildren:c,childrenEnd:u}=this.renderChildren(e,t,o.end);l?(e.prependRight(l.start,"{ children: "+(c?"[":"")),c&&e.appendLeft(i.start,"]"),e.appendLeft(u," }")):e.appendLeft(o.end,", {}"),i.render(e,t)}},Il,class extends is{includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.object.includePath([this.property.name],e)}includePath(e,t){this.included||this.includeNode(t),this.object.includePath([this.property.name,...e],t)}},zl,Fl,class extends is{constructor(){super(...arguments),this.fragment=null,this.fragmentVariable=null}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.jsx;if("automatic"===t.mode)this.fragment="Fragment",this.fragmentVariable=Tl("Fragment",!1,t.jsxImportSource,this,e);else{const{fragment:n,importSource:s,mode:i}=t;null!=n&&(this.fragment=n,this.fragmentVariable=Tl(n,"preserve"===i,s,this,e))}}render(e,t){const{mode:n}=this.scope.context.options.jsx;if("preserve"!==n){const{snippets:{getPropertyAccess:n},useOriginalName:s}=t,[,...i]=this.fragment.split("."),r=[this.fragmentVariable.getName(n,s),...i].join(".");e.update(this.start,this.end,r)}}},Nl,class extends is{render(e,t){super.render(e,t);const{mode:n}=this.scope.context.options.jsx;"preserve"!==n&&(e.overwrite(this.start,this.expression.start,"...",{contentOnly:!0}),e.overwrite(this.expression.end,this.end,"",{contentOnly:!0}))}},_l,Vl,Qr,Qr,Qr,Qr,Qr,Qr,jl,so,class extends is{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;if(t===ao){if(n?.startsWith(oo))return e.getFileName(n.slice(20));if(n?.startsWith(ro))return e.getFileName(n.slice(16))}return null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){this.included||this.includeNode()}includeNode(){if(this.included=!0,this.meta.name===ao){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof so&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(oo)?this.referenceId=t.slice(20):t?.startsWith(ro)&&(this.referenceId=t.slice(16))}}render(e,t){const{format:n,pluginDriver:s,snippets:i}=t,{scope:{context:{module:r}},meta:{name:o},metaProperty:a,parent:l,preliminaryChunkId:c,referenceId:u,start:d,end:h}=this,{id:p,rawId:f,info:{attributes:m}}=r;if(o!==ao)return;const g=c;if(u){const t=s.getFileName(u),i=Z(se(ee(g),t)),r=!!a?.startsWith(oo),o=s.hookFirstSync("resolveFileUrl",[{chunkId:g,fileName:t,format:n,moduleAttributes:m,moduleId:p,moduleRawId:f,referenceId:u,relativePath:i}])||bo[n](i,r);return void e.overwrite(l.start,l.end,o,{contentOnly:!0})}let y=s.hookFirstSync("resolveImportMeta",[a,{chunkId:g,format:n,moduleAttributes:m,moduleId:p,moduleRawId:f}]);y||(y=Eo[n]?.(a,{chunkId:g,snippets:i}),t.accessedDocumentCurrentScript||=lo.includes(n)&&"undefined"!==y),"string"==typeof y&&(l instanceof so?e.overwrite(l.start,l.end,y,{contentOnly:!0}):e.overwrite(d,h,y,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(ro)||this.metaProperty?.startsWith(oo)?uo:co)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}},Ji,class extends is{hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(Be,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.included||this.includeNode(e),t?super.include(e,!0):(this.callee.include(e,!1),this.callee.includeCallArgumentsWhenCalledAtPath(Be,this.interaction,e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.callee.includePath(ze,e)}initialise(){super.initialise(),this.interaction={args:[null,...this.arguments],type:2,withNew:!0},this.annotations&&this.scope.context.options.treeshake.annotations&&(this.annotationPure=this.annotations.some(e=>"pure"===e.type))}render(e,t){this.callee.render(e,t),Ka(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,Be,He),this.scope.context.requestTreeshakingPass()}},Ul,Fa,Gl,Hl,Wl,Yi,ql,Xl,Jl,Ei,Yl,class extends is{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Be,e)}},Zl,Ql,ec,tc,class extends is{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Qe:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?it:Xs(qs,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||Ks(qs,e[0],t,n)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const t of this.expressions)t.includePath(ze,e)}render(e,t){this.scope.context.addIndentExclusionRange([this.start,this.end]),super.render(e,t)}},class extends is{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return 0===e.length?0!==t.type:this.variable.hasEffectsOnInteractionAtPath(e,t,n)}include(e){this.included||this.includeNode(e)}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.scope.context.includeVariableInModule(this.variable,Be,e)}includePath(e,t){this.included?e.length>0&&this.variable.includePath(e,t):(this.included=!0,this.scope.context.includeVariableInModule(this.variable,e,t));const n=function(e,t){for(;!(e instanceof pr&&e.thisVariable===t);){if(!(e instanceof ms))return null;e=e.parent}return e}(this.scope,this.variable);n&&n.functionNode.parent instanceof Wl&&n.functionNode.parent.parent instanceof Ul&&n.functionNode.parent.parent.includePath(e,t)}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof nc?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(xt,{code:"THIS_IS_UNDEFINED",message:"The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten",url:Nt("troubleshooting/#error-this-is-undefined")},this.start)}render(e){null!==this.alias&&e.overwrite(this.start,this.end,this.alias,{contentOnly:!1,storeName:!0})}},class extends is{hasEffects(){return!0}include(e,t){this.included||this.includeNode(e),this.argument.include(e,t),e.brokenFlow=!0}includeNode(e){this.included||(this.included=!0,this.argument.includePath(ze,e))}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}},sc,oc,lc,uc,dc,fc,class extends is{applyDeoptimizations(){this.deoptimized=!0,this.argument?.deoptimizePath(ze)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations(),this.argument?.includePath(ze,e)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}],yc=[function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){e.message=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.elements=Ec(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=Ec(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.expression=!(2&~i),e.generator=!(4&~i);const r=e.annotations=Aa(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=e.params=Ec(e,s,n[t+2],n);s.addParameterVariables(o.map(e=>e.declare("parameter",Be,st)),o[o.length-1]instanceof ql),e.body=bc(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=va[n[t]],e.left=bc(e,s,n[t+1],n),e.right=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=bc(e,s,n[t],n),e.right=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=va[n[t]],e.left=bc(e,s,n[t+1],n),e.right=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=Ec(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:bc(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=Aa(n[t+1],n),e.callee=bc(e,s,n[t+2],n),e.arguments=Ec(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:bc(e,s,i,n);r?.declare("parameter",Be,st),e.body=bc(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];if(i){const t=n[i],r=e.body=new Array(t);for(let o=0;o<t;o++){const t=n[i+1+o];r[o]=bc(e,79===n[t]||1&n[t+3]?s:s.instanceScope,t,n)}}else e.body=[]},function(e,t,n){const{scope:s}=e;e.decorators=Ec(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:bc(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:bc(e,s,r,n),e.body=bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=Ec(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:bc(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:bc(e,s,r,n),e.body=bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=bc(e,s,n[t],n),e.consequent=bc(e,s,n[t+1],n),e.alternate=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:bc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=bc(e,s,n[t],n),e.test=bc(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:bc(e,s,i,n),e.source=bc(e,s,n[t+1],n),e.attributes=Ec(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=Ec(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:bc(e,s,i,n),e.attributes=Ec(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:bc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=bc(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=bc(e,s,n[t],n),e.right=bc(e,s,n[t+1],n),e.body=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=bc(e,s,n[t+1],n),e.right=bc(e,s,n[t+2],n),e.body=bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:bc(e,s,i,n);const r=n[t+1];e.test=0===r?null:bc(e,s,r,n);const o=n[t+2];e.update=0===o?null:bc(e,s,o,n),e.body=bc(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=Aa(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:bc(e,s.parent,o,n);const a=e.params=Ec(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Be,st)),a[a.length-1]instanceof ql),e.body=bc(e,s.bodyScope,n[t+4],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.async=!(1&~i),e.generator=!(2&~i);const r=e.annotations=Aa(n[t+1],n);e.annotationNoSideEffects=r.some(e=>"noSideEffects"===e.type);const o=n[t+2];e.id=0===o?null:bc(e,e.idScope,o,n);const a=e.params=Ec(e,s,n[t+3],n);s.addParameterVariables(a.map(e=>e.declare("parameter",Be,st)),a[a.length-1]instanceof ql),e.body=bc(e,s.bodyScope,n[t+4],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.test=bc(e,s,n[t],n),e.consequent=bc(e,e.consequentScope=new mc(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:bc(e,e.alternateScope=new mc(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=bc(e,s,n[t],n),e.value=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=Ec(e,s,n[t],n),e.source=bc(e,s,n[t+1],n),e.attributes=Ec(e,s,n[t+2],n);const i=n[t+3];e.phase=0===i?void 0:va[n[t+3]]},function(e,t,n){const{scope:s}=e;e.local=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=bc(e,s,n[t],n),e.sourceAstNode=wa(n[t],n);const i=n[t+1];e.options=0===i?null:bc(e,s,i,n);const r=n[t+2];e.phase=0===r?void 0:va[n[t+2]]},function(e,t,n){const{scope:s}=e;e.local=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=bc(e,s,n[t+1],n),e.imported=0===i?e.local:bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=bc(e,s,n[t],n);const i=n[t+1];e.value=0===i?null:bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.name=bc(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e;e.openingElement=bc(e,s,n[t],n),e.children=Ec(e,s,n[t+1],n);const i=n[t+2];e.closingElement=0===i?null:bc(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.openingFragment=bc(e,s,n[t],n),e.children=Ec(e,s,n[t+1],n),e.closingFragment=bc(e,s,n[t+2],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.object=bc(e,s,n[t],n),e.property=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.namespace=bc(e,s,n[t],n),e.name=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.selfClosing=!(1&~i),e.name=bc(e,s,n[t+1],n),e.attributes=Ec(e,s,n[t+2],n)},function(e){e.attributes=[],e.selfClosing=!1},function(e,t,n){const{scope:s}=e;e.argument=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.expression=bc(e,s,n[t],n)},function(e,t,n){e.value=n.convertString(n[t]),e.raw=n.convertString(n[t+1])},function(e,t,n){const{scope:s}=e;e.label=bc(e,s,n[t],n),e.body=bc(e,s,n[t+1],n)},function(e,t,n){const s=e.bigint=n.convertString(n[t]);e.raw=n.convertString(n[t+1]),e.value=BigInt(s)},function(e,t,n){const s=n[t],i=e.value=!(1&~s);e.raw=i?"true":"false"},function(e){e.value=null},function(e,t,n){const s=n[t];e.raw=0===s?void 0:n.convertString(s),e.value=n.convertFloat64(t+1)},function(e,t,n){const s=n.convertString(n[t]),i=n.convertString(n[t+1]);e.raw=`/${i}/${s}`,e.regex={flags:s,pattern:i},e.value=new RegExp(i,s)},function(e,t,n){e.value=n.convertString(n[t]);const s=n[t+1];e.raw=0===s?void 0:n.convertString(s)},function(e,t,n){const{scope:s}=e;e.operator=va[n[t]],e.left=bc(e,s,n[t+1],n),e.right=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.computed=!(1&~i),e.optional=!(2&~i),e.object=bc(e,s,n[t+1],n),e.property=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=bc(e,s,n[t],n),e.property=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=Ec(e,s,n[t+1],n),e.key=bc(e,s,n[t+2],n),e.value=bc(e,s,n[t+3],n),e.kind=va[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=Aa(n[t],n),e.callee=bc(e,s,n[t+1],n),e.arguments=Ec(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=Ec(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=Ec(e,s,n[t],n)},function(e,t,n){e.name=n.convertString(n[t])},function(e,t,n){const{scope:s}=e;e.body=Ec(e,s,n[t],n),e.invalidAnnotations=Aa(n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.method=!(1&~i),e.shorthand=!(2&~i),e.computed=!(4&~i);const r=n[t+1];e.value=bc(e,s,n[t+2],n),e.kind=va[n[t+3]],e.key=0===r?e.value:bc(e,s,r,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.static=!(1&~i),e.computed=!(2&~i),e.decorators=Ec(e,s,n[t+1],n),e.key=bc(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:bc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=Ec(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=Ec(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:bc(e,s,i,n),e.consequent=Ec(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=bc(e,e.parentScope,n[t],n),e.cases=Ec(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=bc(e,s,n[t],n),e.quasi=bc(e,s,n[t+1],n)},function(e,t,n){const s=n[t];e.tail=!(1&~s);const i=n[t+1],r=0===i?void 0:n.convertString(i),o=n.convertString(n[t+2]);e.value={cooked:r,raw:o}},function(e,t,n){const{scope:s}=e;e.quasis=Ec(e,s,n[t],n),e.expressions=Ec(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=bc(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=bc(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:bc(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:bc(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=va[n[t]],e.argument=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=va[n[t+1]],e.argument=bc(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=va[n[t]],e.declarations=Ec(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=bc(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:bc(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=bc(e,s,n[t],n),e.body=bc(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.delegate=!(1&~i);const r=n[t+1];e.argument=0===r?null:bc(e,s,r,n)}];function bc(e,t,n,s){const i=s[n],r=gc[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=Ta[i],o.start=s[n+1],o.end=s[n+2],yc[i](o,n+3,s),o.initialise(),o}function Ec(e,t,n,s){if(0===n)return ve;const i=s[n++],r=new Array(i);for(let o=0;o<i;o++){const i=s[n++];r[o]=i?bc(e,t,i,s):null}return r}class xc extends hs{constructor(e){super(Uo),this.module=e}includePath(e,t){super.includePath(e,t),this.module.needsExportShim=!0}}var vc;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(vc||(vc={}));const Ac=new WeakMap;function Sc(e,t){if(e){const t=Ac.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=b(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||Sc(e)}function Pc(e){if(!e)return null;if("string"==typeof e&&(e=JSON.parse(e)),!e.mappings)return{mappings:[],names:[],sources:[],version:3};const t=e.mappings,n=Array.isArray(t),s={decodedMappings:n?t:void 0,encodedMappings:n?void 0:t},i={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?function(e){const{length:t}=e,n=new m(e),s=[];let i=0,r=0,o=0,a=0,u=0;do{const e=n.indexOf(";"),t=[];let d=!0,p=0;for(i=0;n.pos<e;){let s;i+=c(l(n)),i<p&&(d=!1),p=i,h(n,e)?(r+=c(l(n)),o+=c(l(n)),a+=c(l(n)),h(n,e)?(u+=c(l(n)),s=[i,r,o,a,u]):s=[i,r,o,a]):s=[i],t.push(s),n.pos++}d||g(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return Ac.set(i,s),i}function $c(e){return e.id}function wc(e,t){if(!t||0===Object.keys(t).length)return e;const n=Object.fromEntries(Object.entries(t).sort(([e],[t])=>e<t?-1:e>t?1:0));return`${e}${e.includes("?")?"&":"?"}attributes=${encodeURIComponent(JSON.stringify(n))}`}function Ic(e){return"object"==typeof e?wc(e.rawId,e.attributes):e}function Cc(e){if("object"==typeof e)return{...e,id:wc(e.rawId,e.attributes)};const{rawId:t,attributes:n}=function(e){const t=Math.max(e.lastIndexOf("?attributes="),e.lastIndexOf("&attributes="));if(-1===t)return{rawId:e};try{const n=e.slice(0,t),s=JSON.parse(decodeURIComponent(e.slice(t+12)));if(wc(n,s)===e)return{attributes:s,rawId:n}}catch{}return{rawId:e}}(e);return{attributes:n,id:e,rawId:t}}function kc(e,t,n){try{const o=Wc.__wbindgen_add_to_stack_pointer(-16),a=Vc(e,Wc.__wbindgen_export2,Wc.__wbindgen_export3),l=qc;Wc.parse(o,a,l,t,n);var s=Mc().getInt32(o+0,!0),i=Mc().getInt32(o+4,!0),r=Rc(s,i).slice();return Wc.__wbindgen_export(s,1*i,1),r}finally{Wc.__wbindgen_add_to_stack_pointer(16)}}function Nc(){return{__proto__:null,"./bindings_wasm_bg.js":{__proto__:null,__wbg___wbindgen_throw_41e9ee4f547fc59a:function(e,t){throw new Error(_c(e,t))},__wbg_error_757e9472f8410341:function(e,t){let n,s;try{n=e,s=t,console.error(_c(e,t))}finally{Wc.__wbindgen_export(n,s,1)}},__wbg_get_index_511c6dca3ba3bccb:function(e,t){return Bc(e)[t>>>0]},__wbg_length_7f3c00c40364105e:function(e){return Bc(e).length},__wbg_new_227d7c05414eb861:function(){return Oc(new Error)},__wbg_prototypesetcall_bc27214492979395:function(e,t,n){Uint8Array.prototype.set.call(Rc(e,t),Bc(n))},__wbg_stack_3b0d974bbf31e44f:function(e,t){const n=Vc(Bc(t).stack,Wc.__wbindgen_export2,Wc.__wbindgen_export3),s=qc;Mc().setInt32(e+4,s,!0),Mc().setInt32(e+0,n,!0)},__wbindgen_object_drop_ref:function(e){!function(e){Bc(e);!function(e){e<1028||(zc[e]=Fc,Fc=e)}(e)}(e)}}}}function Oc(e){Fc===zc.length&&zc.push(zc.length+1);const t=Fc;return Fc=zc[t],zc[t]=e,t}function Rc(e,t){return e>>>=0,Tc().subarray(e/1,e/1+t)}let Dc=null;function Mc(){return(null===Dc||!0===Dc.buffer.detached||void 0===Dc.buffer.detached&&Dc.buffer!==Wc.memory.buffer)&&(Dc=new DataView(Wc.memory.buffer)),Dc}function _c(e,t){return function(e,t){return Gc+=t,Gc>=Uc&&(jc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}),jc.decode(),Gc=t),jc.decode(Tc().subarray(e,e+t))}(e>>>0,t)}let Lc=null;function Tc(){return null!==Lc&&0!==Lc.byteLength||(Lc=new Uint8Array(Wc.memory.buffer)),Lc}function Bc(e){return zc[e]}let zc=new Array(1024).fill(void 0);zc.push(void 0,null,!0,!1);let Fc=zc.length;function Vc(e,t,n){if(void 0===n){const n=Hc.encode(e),s=t(n.length,1)>>>0;return Tc().subarray(s,s+n.length).set(n),qc=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Tc();let o=0;for(;o<s;o++){const t=e.charCodeAt(o);if(t>127)break;r[i+o]=t}if(o!==s){0!==o&&(e=e.slice(o)),i=n(i,s,s=o+3*e.length,1)>>>0;const t=Tc().subarray(i+o,i+s);o+=Hc.encodeInto(e,t).written,i=n(i,s,o,1)>>>0}return qc=o,i}let jc=new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0});jc.decode();const Uc=2146435072;let Gc=0;const Hc=new TextEncoder;"encodeInto"in Hc||(Hc.encodeInto=function(e,t){const n=Hc.encode(e);return t.set(n),{read:e.length,written:n.length}});let Wc,qc=0;async function Kc(e){if(void 0!==Wc)return Wc;void 0!==e&&(Object.getPrototypeOf(e)===Object.prototype?({module_or_path:e}=e):console.warn("using deprecated parameters for the initialization function; pass a single object instead")),void 0===e&&(e=new URL("bindings_wasm_bg.wasm","undefined"==typeof document&&"undefined"==typeof location?require("url").pathToFileURL(__filename).href:"undefined"==typeof document?location.href:t&&"SCRIPT"===t.tagName.toUpperCase()&&t.src||new URL("rollup.browser.js",document.baseURI).href));const n=Nc();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if(!e.ok)throw new Error(`failed to fetch Wasm: ${e.status} ${e.statusText} fetching '${e.url}'`);if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if(!function(e){switch(e){case"basic":case"cors":case"default":return!0}return!1}(e.type)||"application/wasm"===e.headers.get("Content-Type"))throw t;console.warn("`WebAssembly.instantiateStreaming` failed because your server does not serve Wasm with `application/wasm` MIME type. Falling back to `WebAssembly.instantiate` which is slower. Original error:\n",t)}const n=await e.arrayBuffer();return await WebAssembly.instantiate(n,t)}{const n=await WebAssembly.instantiate(e,t);return n instanceof WebAssembly.Instance?{instance:n,module:e}:n}}(await e,n);return function(e){return Wc=e.exports,Dc=null,Lc=null,Wc}(s)}const Xc=0===new Uint8Array(new Uint32Array([1]).buffer)[0],Jc=e=>{if(Xc){const t=new Uint32Array(e.buffer,e.byteOffset,e.byteLength>>2);for(let e=0;e<t.length;e++){const n=t[e];t[e]=(255&n)<<24|(65280&n)<<8|n>>>8&65280|n>>>24}}return e};async function Yc(e,t,n,s,i){return Jc(function(e,t,n,s,i){try{const l=Wc.__wbindgen_add_to_stack_pointer(-16),c=Vc(e,Wc.__wbindgen_export2,Wc.__wbindgen_export3),u=qc;Wc.parseAndWalkSync(l,c,u,t,n,Oc(s),i);var r=Mc().getInt32(l+0,!0),o=Mc().getInt32(l+4,!0),a=Rc(r,o).slice();return Wc.__wbindgen_export(r,1*o,1),a}finally{Wc.__wbindgen_add_to_stack_pointer(16)}}(e,t,n,s,i))}const Zc=[function(e,t){return{type:"PanicError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ParseError",start:t[e],end:t[e+1],message:t.convertString(t[e+2])}},function(e,t){return{type:"ArrayExpression",start:t[e],end:t[e+1],elements:eu(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:eu(t[e+2],t)}},function(e,t){const n=t[e+2],s=Aa(t[e+3],t);return{type:"ArrowFunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),expression:!(2&~n),generator:!(4&~n),...s.length>0?{annotations:s}:{},params:eu(t[e+4],t),body:Qc(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:va[t[e+2]],left:Qc(t[e+3],t),right:Qc(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:Qc(t[e+2],t),right:Qc(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:Qc(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:va[t[e+2]],left:Qc(t[e+3],t),right:Qc(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:eu(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"BreakStatement",start:t[e],end:t[e+1],label:0===n?null:Qc(n,t)}},function(e,t){const n=t[e+2],s=Aa(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{annotations:s}:{},callee:Qc(t[e+4],t),arguments:eu(t[e+5],t)}},function(e,t){const n=t[e+2];return{type:"CatchClause",start:t[e],end:t[e+1],param:0===n?null:Qc(n,t),body:Qc(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:Qc(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:eu(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassDeclaration",start:t[e],end:t[e+1],decorators:eu(t[e+2],t),id:0===n?null:Qc(n,t),superClass:0===s?null:Qc(s,t),body:Qc(t[e+5],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ClassExpression",start:t[e],end:t[e+1],decorators:eu(t[e+2],t),id:0===n?null:Qc(n,t),superClass:0===s?null:Qc(s,t),body:Qc(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:Qc(t[e+2],t),consequent:Qc(t[e+3],t),alternate:Qc(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ContinueStatement",start:t[e],end:t[e+1],label:0===n?null:Qc(n,t)}},function(e,t){return{type:"DebuggerStatement",start:t[e],end:t[e+1]}},function(e,t){return{type:"Decorator",start:t[e],end:t[e+1],expression:Qc(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:Qc(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:Qc(t[e+2],t),test:Qc(t[e+3],t)}},function(e,t){return{type:"EmptyStatement",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"ExportAllDeclaration",start:t[e],end:t[e+1],exported:0===n?null:Qc(n,t),source:Qc(t[e+3],t),attributes:eu(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:Qc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+5];return{type:"ExportNamedDeclaration",start:t[e],end:t[e+1],specifiers:eu(t[e+2],t),source:0===n?null:Qc(n,t),attributes:eu(t[e+4],t),declaration:0===s?null:Qc(s,t)}},function(e,t){const n=Qc(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:Qc(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:Qc(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:Qc(t[e+2],t),right:Qc(t[e+3],t),body:Qc(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"ForOfStatement",start:t[e],end:t[e+1],await:!(1&~n),left:Qc(t[e+3],t),right:Qc(t[e+4],t),body:Qc(t[e+5],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=t[e+4];return{type:"ForStatement",start:t[e],end:t[e+1],init:0===n?null:Qc(n,t),test:0===s?null:Qc(s,t),update:0===i?null:Qc(i,t),body:Qc(t[e+5],t)}},function(e,t){const n=t[e+2],s=Aa(t[e+3],t),i=t[e+4];return{type:"FunctionDeclaration",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},id:0===i?null:Qc(i,t),params:eu(t[e+5],t),body:Qc(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=Aa(t[e+3],t),i=t[e+4];return{type:"FunctionExpression",start:t[e],end:t[e+1],async:!(1&~n),generator:!(2&~n),...s.length>0?{annotations:s}:{},id:0===i?null:Qc(i,t),params:eu(t[e+5],t),body:Qc(t[e+6],t),expression:!1}},function(e,t){return{type:"Identifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=t[e+4];return{type:"IfStatement",start:t[e],end:t[e+1],test:Qc(t[e+2],t),consequent:Qc(t[e+3],t),alternate:0===n?null:Qc(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:Qc(t[e+2],t),value:Qc(t[e+3],t)}},function(e,t){const n=t[e+5];return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:eu(t[e+2],t),source:Qc(t[e+3],t),attributes:eu(t[e+4],t),phase:0===n?void 0:va[t[e+5]]}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:Qc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"ImportExpression",start:t[e],end:t[e+1],source:Qc(t[e+2],t),options:0===n?null:Qc(n,t),phase:0===s?void 0:va[t[e+4]]}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:Qc(t[e+2],t)}},function(e,t){const n=t[e+2],s=Qc(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:Qc(n,t),local:s}},function(e,t){const n=t[e+3];return{type:"JSXAttribute",start:t[e],end:t[e+1],name:Qc(t[e+2],t),value:0===n?null:Qc(n,t)}},function(e,t){return{type:"JSXClosingElement",start:t[e],end:t[e+1],name:Qc(t[e+2],t)}},function(e,t){return{type:"JSXClosingFragment",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+4];return{type:"JSXElement",start:t[e],end:t[e+1],openingElement:Qc(t[e+2],t),children:eu(t[e+3],t),closingElement:0===n?null:Qc(n,t)}},function(e,t){return{type:"JSXEmptyExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"JSXExpressionContainer",start:t[e],end:t[e+1],expression:Qc(t[e+2],t)}},function(e,t){return{type:"JSXFragment",start:t[e],end:t[e+1],openingFragment:Qc(t[e+2],t),children:eu(t[e+3],t),closingFragment:Qc(t[e+4],t)}},function(e,t){return{type:"JSXIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){return{type:"JSXMemberExpression",start:t[e],end:t[e+1],object:Qc(t[e+2],t),property:Qc(t[e+3],t)}},function(e,t){return{type:"JSXNamespacedName",start:t[e],end:t[e+1],namespace:Qc(t[e+2],t),name:Qc(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"JSXOpeningElement",start:t[e],end:t[e+1],selfClosing:!(1&~n),name:Qc(t[e+3],t),attributes:eu(t[e+4],t)}},function(e,t){return{type:"JSXOpeningFragment",start:t[e],end:t[e+1],attributes:[],selfClosing:!1}},function(e,t){return{type:"JSXSpreadAttribute",start:t[e],end:t[e+1],argument:Qc(t[e+2],t)}},function(e,t){return{type:"JSXSpreadChild",start:t[e],end:t[e+1],expression:Qc(t[e+2],t)}},function(e,t){return{type:"JSXText",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:t.convertString(t[e+3])}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:Qc(t[e+2],t),body:Qc(t[e+3],t)}},function(e,t){const n=t.convertString(t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],bigint:n,raw:t.convertString(t[e+3]),value:BigInt(n)}},function(e,t){const n=!(1&~t[e+2]);return{type:"Literal",start:t[e],end:t[e+1],value:n,raw:n?"true":"false"}},function(e,t){return{type:"Literal",start:t[e],end:t[e+1],raw:"null",value:null}},function(e,t){const n=t[e+2];return{type:"Literal",start:t[e],end:t[e+1],raw:0===n?void 0:t.convertString(n),value:t.convertFloat64(e+3)}},function(e,t){const n=t.convertString(t[e+2]),s=t.convertString(t[e+3]);return{type:"Literal",start:t[e],end:t[e+1],raw:`/${s}/${n}`,regex:{flags:n,pattern:s},value:new RegExp(s,n)}},function(e,t){const n=t[e+3];return{type:"Literal",start:t[e],end:t[e+1],value:t.convertString(t[e+2]),raw:0===n?void 0:t.convertString(n)}},function(e,t){return{type:"LogicalExpression",start:t[e],end:t[e+1],operator:va[t[e+2]],left:Qc(t[e+3],t),right:Qc(t[e+4],t)}},function(e,t){const n=t[e+2];return{type:"MemberExpression",start:t[e],end:t[e+1],computed:!(1&~n),optional:!(2&~n),object:Qc(t[e+3],t),property:Qc(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:Qc(t[e+2],t),property:Qc(t[e+3],t)}},function(e,t){const n=t[e+2];return{type:"MethodDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:eu(t[e+3],t),key:Qc(t[e+4],t),value:Qc(t[e+5],t),kind:va[t[e+6]]}},function(e,t){const n=Aa(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{annotations:n}:{},callee:Qc(t[e+3],t),arguments:eu(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:eu(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:eu(t[e+2],t)}},function(e,t){return{type:"PrivateIdentifier",start:t[e],end:t[e+1],name:t.convertString(t[e+2])}},function(e,t){const n=Aa(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:eu(t[e+2],t),...n.length>0?{invalidAnnotations:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=Qc(t[e+4],t);return{type:"Property",start:t[e],end:t[e+1],method:!(1&~n),shorthand:!(2&~n),computed:!(4&~n),key:0===s?{...i}:Qc(s,t),value:i,kind:va[t[e+5]]}},function(e,t){const n=t[e+2],s=t[e+5];return{type:"PropertyDefinition",start:t[e],end:t[e+1],static:!(1&~n),computed:!(2&~n),decorators:eu(t[e+3],t),key:Qc(t[e+4],t),value:0===s?null:Qc(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:Qc(t[e+2],t)}},function(e,t){const n=t[e+2];return{type:"ReturnStatement",start:t[e],end:t[e+1],argument:0===n?null:Qc(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:eu(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:Qc(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:eu(t[e+2],t)}},function(e,t){return{type:"Super",start:t[e],end:t[e+1]}},function(e,t){const n=t[e+2];return{type:"SwitchCase",start:t[e],end:t[e+1],test:0===n?null:Qc(n,t),consequent:eu(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:Qc(t[e+2],t),cases:eu(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:Qc(t[e+2],t),quasi:Qc(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3],i=0===s?void 0:t.convertString(s),r=t.convertString(t[e+4]);return{type:"TemplateElement",start:t[e],end:t[e+1],tail:!(1&~n),value:{cooked:i,raw:r}}},function(e,t){return{type:"TemplateLiteral",start:t[e],end:t[e+1],quasis:eu(t[e+2],t),expressions:eu(t[e+3],t)}},function(e,t){return{type:"ThisExpression",start:t[e],end:t[e+1]}},function(e,t){return{type:"ThrowStatement",start:t[e],end:t[e+1],argument:Qc(t[e+2],t)}},function(e,t){const n=t[e+3],s=t[e+4];return{type:"TryStatement",start:t[e],end:t[e+1],block:Qc(t[e+2],t),handler:0===n?null:Qc(n,t),finalizer:0===s?null:Qc(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:va[t[e+2]],argument:Qc(t[e+3],t),prefix:!0}},function(e,t){const n=t[e+2];return{type:"UpdateExpression",start:t[e],end:t[e+1],prefix:!(1&~n),operator:va[t[e+3]],argument:Qc(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:va[t[e+2]],declarations:eu(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:Qc(t[e+2],t),init:0===n?null:Qc(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:Qc(t[e+2],t),body:Qc(t[e+3],t)}},function(e,t){const n=t[e+2],s=t[e+3];return{type:"YieldExpression",start:t[e],end:t[e+1],delegate:!(1&~n),argument:0===s?null:Qc(s,t)}}];function Qc(e,t){const n=t[e],s=Zc[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function eu(e,t){if(0===e)return ve;const n=t[e++],s=new Array(n);for(let i=0;i<n;i++){const n=t[e++];s[i]=n?Qc(n,t):null}return s}var tu={"!":10,"!=":18,"!==":20,"%":30,"%=":45,"&":33,"&&":35,"&&=":53,"&=":51,"*":28,"**":38,"**=":52,"*=":43,"+":9,"++":15,"+=":41,"-":8,"--":16,"-=":42,"/":29,"/=":44,"<":21,"<<":25,"<<=":46,"<=":22,"=":40,"==":17,"===":19,">":23,">=":24,">>":26,">>=":47,">>>":27,">>>=":48,"??":39,"??=":55,"^":32,"^=":50,"await using":60,const:2,constructor:6,defer:62,delete:14,get:4,in:36,init:3,instanceof:37,let:1,method:7,noSideEffects:57,pure:56,set:5,source:61,sourcemap:58,typeof:12,using:59,var:0,void:13,"|":31,"|=":49,"||":34,"||=":54,"~":11};const nu=e=>{const t=("undefined"==typeof Buffer?_a:La)(65536);return(su[e.type]||Ht(dn(e.type,null,"")))(e,t).toOutput()},su={ArrayExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=2,t[n+1]=e.start,t[n+2]=e.end,t=pu("elements",e,t,n+3)},ArrayPattern:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=3,t[n+1]=e.start,t[n+2]=e.end,t=pu("elements",e,t,n+3)},ArrowFunctionExpression:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=4,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.async|e.expression<<1|e.generator<<2,t=hu("body",e,t=pu("params",e,t=fu(e.annotations,t,n+4),n+5),n+6)},AssignmentExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=5,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=tu[e.operator],t=hu("left",e,t,n+4),t=hu("right",e,t,n+5)},AssignmentPattern:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=6,t[n+1]=e.start,t[n+2]=e.end,t=hu("left",e,t,n+3),t=hu("right",e,t,n+4)},AwaitExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=7,t[n+1]=e.start,t[n+2]=e.end,t=hu("argument",e,t,n+3)},BinaryExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=8,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=tu[e.operator],t=hu("left",e,t,n+4),t=hu("right",e,t,n+5)},BlockStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=9,t[n+1]=e.start,t[n+2]=e.end,t=pu("body",e,t,n+3)},BreakStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=10,t[n+1]=e.start,t[n+2]=e.end,null!=e.label&&(t=hu("label",e,t,n+3)),t},CallExpression:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=11,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.optional,t=pu("arguments",e,t=hu("callee",e,t=fu(e.annotations,t,n+4),n+5),n+6)},CatchClause:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=12,t[n+1]=e.start,t[n+2]=e.end,null!=e.param&&(t=hu("param",e,t,n+3)),t=hu("body",e,t,n+4)},ChainExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=13,t[n+1]=e.start,t[n+2]=e.end,t=hu("expression",e,t,n+3)},ClassBody:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=14,t[n+1]=e.start,t[n+2]=e.end,t=pu("body",e,t,n+3)},ClassDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=15,t[n+1]=e.start,t[n+2]=e.end,t=pu("decorators",e,t,n+3),null!=e.id&&(t=hu("id",e,t,n+4)),null!=e.superClass&&(t=hu("superClass",e,t,n+5)),t=hu("body",e,t,n+6)},ClassExpression:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=16,t[n+1]=e.start,t[n+2]=e.end,t=pu("decorators",e,t,n+3),null!=e.id&&(t=hu("id",e,t,n+4)),null!=e.superClass&&(t=hu("superClass",e,t,n+5)),t=hu("body",e,t,n+6)},ConditionalExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=17,t[n+1]=e.start,t[n+2]=e.end,t=hu("test",e,t,n+3),t=hu("consequent",e,t,n+4),t=hu("alternate",e,t,n+5)},ContinueStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=18,t[n+1]=e.start,t[n+2]=e.end,null!=e.label&&(t=hu("label",e,t,n+3)),t},DebuggerStatement:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=19,t[n+1]=e.start,t[n+2]=e.end,t},Decorator:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=20,t[n+1]=e.start,t[n+2]=e.end,t=hu("expression",e,t,n+3)},DoWhileStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=22,t[n+1]=e.start,t[n+2]=e.end,t=hu("body",e,t,n+3),t=hu("test",e,t,n+4)},EmptyStatement:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=23,t[n+1]=e.start,t[n+2]=e.end,t},ExportAllDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=24,t[n+1]=e.start,t[n+2]=e.end,null!=e.exported&&(t=hu("exported",e,t,n+3)),t=pu("attributes",e,t=hu("source",e,t,n+4),n+5)},ExportDefaultDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=25,t[n+1]=e.start,t[n+2]=e.end,t=hu("declaration",e,t,n+3)},ExportNamedDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=26,t[n+1]=e.start,t[n+2]=e.end,t=pu("specifiers",e,t,n+3),null!=e.source&&(t=hu("source",e,t,n+4)),t=pu("attributes",e,t,n+5),null!=e.declaration&&(t=hu("declaration",e,t,n+6)),t},ExportSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=27,t[n+1]=e.start,t[n+2]=e.end,t=hu("local",e,t,n+3),e.exported.end!=e.local.end&&(t=hu("exported",e,t,n+4)),t},ExpressionStatement:(e,t)=>"directive"in e?iu(e,t):ru(e,t),ForInStatement:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=29,t[n+1]=e.start,t[n+2]=e.end,t=hu("left",e,t,n+3),t=hu("right",e,t,n+4),t=hu("body",e,t,n+5)},ForOfStatement:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=30,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.await,t=hu("left",e,t,n+4),t=hu("right",e,t,n+5),t=hu("body",e,t,n+6)},ForStatement:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=31,t[n+1]=e.start,t[n+2]=e.end,null!=e.init&&(t=hu("init",e,t,n+3)),null!=e.test&&(t=hu("test",e,t,n+4)),null!=e.update&&(t=hu("update",e,t,n+5)),t=hu("body",e,t,n+6)},FunctionDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(9))[n]=32,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.async|e.generator<<1,t=fu(e.annotations,t,n+4),null!=e.id&&(t=hu("id",e,t,n+5)),t=hu("body",e,t=pu("params",e,t,n+6),n+7)},FunctionExpression:(e,t)=>{const n=t.position;return(t=t.reserve(9))[n]=33,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.async|e.generator<<1,t=fu(e.annotations,t,n+4),null!=e.id&&(t=hu("id",e,t,n+5)),t=hu("body",e,t=pu("params",e,t,n+6),n+7)},Identifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=34,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.name,n+3)},IfStatement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=35,t[n+1]=e.start,t[n+2]=e.end,t=hu("test",e,t,n+3),t=hu("consequent",e,t,n+4),null!=e.alternate&&(t=hu("alternate",e,t,n+5)),t},ImportAttribute:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=36,t[n+1]=e.start,t[n+2]=e.end,t=hu("key",e,t,n+3),t=hu("value",e,t,n+4)},ImportDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=37,t[n+1]=e.start,t[n+2]=e.end,t=pu("specifiers",e,t,n+3),t=pu("attributes",e,t=hu("source",e,t,n+4),n+5),null!=e.phase&&(t[n+6]=tu[e.phase]),t},ImportDefaultSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=38,t[n+1]=e.start,t[n+2]=e.end,t=hu("local",e,t,n+3)},ImportExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=39,t[n+1]=e.start,t[n+2]=e.end,t=hu("source",e,t,n+3),null!=e.options&&(t=hu("options",e,t,n+4)),null!=e.phase&&(t[n+5]=tu[e.phase]),t},ImportNamespaceSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=40,t[n+1]=e.start,t[n+2]=e.end,t=hu("local",e,t,n+3)},ImportSpecifier:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=41,t[n+1]=e.start,t[n+2]=e.end,e.imported.end!=e.local.end&&(t=hu("imported",e,t,n+3)),t=hu("local",e,t,n+4)},JSXAttribute:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=42,t[n+1]=e.start,t[n+2]=e.end,t=hu("name",e,t,n+3),null!=e.value&&(t=hu("value",e,t,n+4)),t},JSXClosingElement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=43,t[n+1]=e.start,t[n+2]=e.end,t=hu("name",e,t,n+3)},JSXClosingFragment:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=44,t[n+1]=e.start,t[n+2]=e.end,t},JSXElement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=45,t[n+1]=e.start,t[n+2]=e.end,t=pu("children",e,t=hu("openingElement",e,t,n+3),n+4),null!=e.closingElement&&(t=hu("closingElement",e,t,n+5)),t},JSXEmptyExpression:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=46,t[n+1]=e.start,t[n+2]=e.end,t},JSXExpressionContainer:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=47,t[n+1]=e.start,t[n+2]=e.end,t=hu("expression",e,t,n+3)},JSXFragment:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=48,t[n+1]=e.start,t[n+2]=e.end,t=hu("openingFragment",e,t,n+3),t=hu("closingFragment",e,t=pu("children",e,t,n+4),n+5)},JSXIdentifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=49,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.name,n+3)},JSXMemberExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=50,t[n+1]=e.start,t[n+2]=e.end,t=hu("object",e,t,n+3),t=hu("property",e,t,n+4)},JSXNamespacedName:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=51,t[n+1]=e.start,t[n+2]=e.end,t=hu("namespace",e,t,n+3),t=hu("name",e,t,n+4)},JSXOpeningElement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=52,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.selfClosing,t=pu("attributes",e,t=hu("name",e,t,n+4),n+5)},JSXOpeningFragment:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=53,t[n+1]=e.start,t[n+2]=e.end,t},JSXSpreadAttribute:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=54,t[n+1]=e.start,t[n+2]=e.end,t=hu("argument",e,t,n+3)},JSXSpreadChild:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=55,t[n+1]=e.start,t[n+2]=e.end,t=hu("expression",e,t,n+3)},JSXText:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=56,t[n+1]=e.start,t[n+2]=e.end,t=(t=t.addStringToBuffer(e.value,n+3)).addStringToBuffer(e.raw,n+4)},LabeledStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=57,t[n+1]=e.start,t[n+2]=e.end,t=hu("label",e,t,n+3),t=hu("body",e,t,n+4)},Literal:(e,t)=>{switch(typeof e.value){case"object":return null===e.value?lu(e,t):uu(e,t);case"boolean":return au(e,t);case"number":return cu(e,t);case"string":return du(e,t);case"bigint":return ou(e,t);default:throw new Error("Unexpected node value type for Literal: "+typeof e.value)}},LogicalExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=64,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=tu[e.operator],t=hu("left",e,t,n+4),t=hu("right",e,t,n+5)},MemberExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=65,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.computed|e.optional<<1,t=hu("object",e,t,n+4),t=hu("property",e,t,n+5)},MetaProperty:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=66,t[n+1]=e.start,t[n+2]=e.end,t=hu("meta",e,t,n+3),t=hu("property",e,t,n+4)},MethodDefinition:(e,t)=>{const n=t.position;return(t=t.reserve(8))[n]=67,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.static|e.computed<<1,t=hu("key",e,t=pu("decorators",e,t,n+4),n+5),(t=hu("value",e,t,n+6))[n+7]=tu[e.kind],t},NewExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=68,t[n+1]=e.start,t[n+2]=e.end,t=pu("arguments",e,t=hu("callee",e,t=fu(e.annotations,t,n+3),n+4),n+5)},ObjectExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=69,t[n+1]=e.start,t[n+2]=e.end,t=pu("properties",e,t,n+3)},ObjectPattern:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=70,t[n+1]=e.start,t[n+2]=e.end,t=pu("properties",e,t,n+3)},PanicError:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=0,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.message,n+3)},ParseError:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=1,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.message,n+3)},PrivateIdentifier:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=71,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.name,n+3)},Program:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=72,t[n+1]=e.start,t[n+2]=e.end,t=pu("body",e,t,n+3),t=fu(e.invalidAnnotations,t,n+4)},Property:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=73,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.method|e.shorthand<<1|e.computed<<2,e.key.end!=e.value.end&&(t=hu("key",e,t,n+4)),(t=hu("value",e,t,n+5))[n+6]=tu[e.kind],t},PropertyDefinition:(e,t)=>{const n=t.position;return(t=t.reserve(7))[n]=74,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=e.static|e.computed<<1,t=hu("key",e,t=pu("decorators",e,t,n+4),n+5),null!=e.value&&(t=hu("value",e,t,n+6)),t},RestElement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=75,t[n+1]=e.start,t[n+2]=e.end,t=hu("argument",e,t,n+3)},ReturnStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=76,t[n+1]=e.start,t[n+2]=e.end,null!=e.argument&&(t=hu("argument",e,t,n+3)),t},SequenceExpression:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=77,t[n+1]=e.start,t[n+2]=e.end,t=pu("expressions",e,t,n+3)},SpreadElement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=78,t[n+1]=e.start,t[n+2]=e.end,t=hu("argument",e,t,n+3)},StaticBlock:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=79,t[n+1]=e.start,t[n+2]=e.end,t=pu("body",e,t,n+3)},Super:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=80,t[n+1]=e.start,t[n+2]=e.end,t},SwitchCase:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=81,t[n+1]=e.start,t[n+2]=e.end,null!=e.test&&(t=hu("test",e,t,n+3)),t=pu("consequent",e,t,n+4)},SwitchStatement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=82,t[n+1]=e.start,t[n+2]=e.end,t=pu("cases",e,t=hu("discriminant",e,t,n+3),n+4)},TaggedTemplateExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=83,t[n+1]=e.start,t[n+2]=e.end,t=hu("tag",e,t,n+3),t=hu("quasi",e,t,n+4)},TemplateElement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=84,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.tail,null!=e.value.cooked&&(t=t.addStringToBuffer(e.value.cooked,n+4)),t=t.addStringToBuffer(e.value.raw,n+5)},TemplateLiteral:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=85,t[n+1]=e.start,t[n+2]=e.end,t=pu("quasis",e,t,n+3),t=pu("expressions",e,t,n+4)},ThisExpression:(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=86,t[n+1]=e.start,t[n+2]=e.end,t},ThrowStatement:(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=87,t[n+1]=e.start,t[n+2]=e.end,t=hu("argument",e,t,n+3)},TryStatement:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=88,t[n+1]=e.start,t[n+2]=e.end,t=hu("block",e,t,n+3),null!=e.handler&&(t=hu("handler",e,t,n+4)),null!=e.finalizer&&(t=hu("finalizer",e,t,n+5)),t},UnaryExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=89,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=tu[e.operator],t=hu("argument",e,t,n+4)},UpdateExpression:(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=90,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.prefix,t[n+4]=tu[e.operator],t=hu("argument",e,t,n+5)},VariableDeclaration:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=91,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=tu[e.kind],t=pu("declarations",e,t,n+4)},VariableDeclarator:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=92,t[n+1]=e.start,t[n+2]=e.end,t=hu("id",e,t,n+3),null!=e.init&&(t=hu("init",e,t,n+4)),t},WhileStatement:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=93,t[n+1]=e.start,t[n+2]=e.end,t=hu("test",e,t,n+3),t=hu("body",e,t,n+4)},YieldExpression:(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=94,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.delegate,null!=e.argument&&(t=hu("argument",e,t,n+4)),t}},iu=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=21,t[n+1]=e.start,t[n+2]=e.end,t=hu("expression",e,t=t.addStringToBuffer(e.directive,n+3),n+4)},ru=(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=28,t[n+1]=e.start,t[n+2]=e.end,t=hu("expression",e,t,n+3)},ou=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=58,t[n+1]=e.start,t[n+2]=e.end,t=(t=t.addStringToBuffer(e.bigint,n+3)).addStringToBuffer(e.raw,n+4)},au=(e,t)=>{const n=t.position;return(t=t.reserve(4))[n]=59,t[n+1]=e.start,t[n+2]=e.end,t[n+3]=0|e.value,t},lu=(e,t)=>{const n=t.position;return(t=t.reserve(3))[n]=60,t[n+1]=e.start,t[n+2]=e.end,t},cu=(e,t)=>{const n=t.position;return(t=t.reserve(6))[n]=61,t[n+1]=e.start,t[n+2]=e.end,null!=e.raw&&(t=t.addStringToBuffer(e.raw,n+3)),t.writeFloat64(e.value,n+4),t},uu=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=62,t[n+1]=e.start,t[n+2]=e.end,t=(t=t.addStringToBuffer(e.regex.flags,n+3)).addStringToBuffer(e.regex.pattern,n+4)},du=(e,t)=>{const n=t.position;return(t=t.reserve(5))[n]=63,t[n+1]=e.start,t[n+2]=e.end,t=t.addStringToBuffer(e.value,n+3),null!=e.raw&&(t=t.addStringToBuffer(e.raw,n+4)),t};function hu(e,t,n,s){n[s]=n.position;const i=t[e];return(su[i.type]||Ht(dn(i.type,t.type,e)))(i,n)}function pu(e,t,n,s){const i=t[e];if(null==i)return n;const{length:r}=i;if(0===r)return n;if(null==r)return Ht(function(e,t,n){return{code:Jt,message:`Could not serialize AST: Expected ${e}.${t} to be an array, but it was ${JSON.stringify(n)}.`}}(t.type,e,t[e]));let o=n.position;(n=n.reserve(r+1))[s]=o,n[o]=r,o++;for(let s=0;s<r;s++){const r=i[s];null!=r&&(n[o+s]=n.position,n=(su[r.type]||Ht(dn(r.type,t.type,e)))(r,n))}return n}function fu(e,t,n){if(!e?.length)return t;const{length:s}=e;let i=t.position;(t=t.reserve(s+1))[n]=i,t[i]=s,i++;for(let n=0;n<s;n++){const s=e[n],r=t.position;(t=t.reserve(3))[i+n]=r,t[r]=s.start,t[r+1]=s.end,t[r+2]=tu[s.type]}return t}const mu={ArrayExpression:[2],ArrayPattern:[3],ArrowFunctionExpression:[4],AssignmentExpression:[5],AssignmentPattern:[6],AwaitExpression:[7],BinaryExpression:[8],BlockStatement:[9],BreakStatement:[10],CallExpression:[11],CatchClause:[12],ChainExpression:[13],ClassBody:[14],ClassDeclaration:[15],ClassExpression:[16],ConditionalExpression:[17],ContinueStatement:[18],DebuggerStatement:[19],Decorator:[20],DoWhileStatement:[22],EmptyStatement:[23],ExportAllDeclaration:[24],ExportDefaultDeclaration:[25],ExportNamedDeclaration:[26],ExportSpecifier:[27],ExpressionStatement:[21,28],ForInStatement:[29],ForOfStatement:[30],ForStatement:[31],FunctionDeclaration:[32],FunctionExpression:[33],Identifier:[34],IfStatement:[35],ImportAttribute:[36],ImportDeclaration:[37],ImportDefaultSpecifier:[38],ImportExpression:[39],ImportNamespaceSpecifier:[40],ImportSpecifier:[41],JSXAttribute:[42],JSXClosingElement:[43],JSXClosingFragment:[44],JSXElement:[45],JSXEmptyExpression:[46],JSXExpressionContainer:[47],JSXFragment:[48],JSXIdentifier:[49],JSXMemberExpression:[50],JSXNamespacedName:[51],JSXOpeningElement:[52],JSXOpeningFragment:[53],JSXSpreadAttribute:[54],JSXSpreadChild:[55],JSXText:[56],LabeledStatement:[57],Literal:[58,59,60,61,62,63],LogicalExpression:[64],MemberExpression:[65],MetaProperty:[66],MethodDefinition:[67],NewExpression:[68],ObjectExpression:[69],ObjectPattern:[70],PanicError:[0],ParseError:[1],PrivateIdentifier:[71],Program:[72],Property:[73],PropertyDefinition:[74],RestElement:[75],ReturnStatement:[76],SequenceExpression:[77],SpreadElement:[78],StaticBlock:[79],Super:[80],SwitchCase:[81],SwitchStatement:[82],TaggedTemplateExpression:[83],TemplateElement:[84],TemplateLiteral:[85],ThisExpression:[86],ThrowStatement:[87],TryStatement:[88],UnaryExpression:[89],UpdateExpression:[90],VariableDeclaration:[91],VariableDeclarator:[92],WhileStatement:[93],YieldExpression:[94]};async function gu(e,t,{allowReturnOutsideFunction:n=!1,collectScopes:s=!1,jsx:i=!1}={}){const r=function(e){let t=0n;for(const n of Object.keys(e)){const e=mu[n];if(!e)throw new Error(`Unknown node type "${n}" when calling "parseAndWalk".`);for(const n of e)t|=1n<<BigInt(n)}const n=new BigUint64Array(2);return n[0]=t&(1n<<64n)-1n,n[1]=t>>64n,n}(t);!function(e,t,n){const s=e[0],i=3;if(0===s)return Pa(e,1);let r=s;const o=new Map,a={parseChildren(){const t=s+e[r+1]*i;r+=i,l(t),r-=i},skipChildren(){r=s+e[r+1]*i-i}};function l(s){for(;r<s;r+=i){const s=e[r];n&&(a.scope=c(e[r+2]));const i=Ta[e[s]];t[i](Pa(e,s),a)}}function c(t){if(0===t)throw new Error("Internal Error: Missing scope information in parseAndWalk.");let n=o.get(t);return n||(n={contains(n){for(let s=t;s;){const t=e[s+1];for(let i=0;i<t;i++){const t=e[s+2+i];if(e.convertString(e[t+3])===n)return!0}s=e[s+0]}return!1}},o.set(t,n)),n}l(e.length)}(Ma(await Yc(e,n,i,r,s)),t,s)}const yu=(e,t=0)=>((e,t)=>{const n=Qc(t,e);switch(n.type){case Kn:return Ht(Wt(Nn(n.message)));case Xn:return Ht(Wt(Nn(n.message,n.start)));default:return n}})(Ma(e),t),bu=(e,t=0)=>Pa(Ma(e),t),Eu=(e,{allowReturnOutsideFunction:t=!1,jsx:n=!1}={})=>yu(function(e,t,n){return Jc(kc(e,t,n))}(e,t,n)),xu=new Set(["assert","with"]);function vu(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Ul))return n&&t.module.log(xt,Sn(t.module.id),s),xe;const i=n.properties.find(e=>xu.has(Au(e)))?.value;if(!i)return xe;if(!(i instanceof Ul))return t.module.log(xt,(r=t.module.id,{code:Zt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${wt(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),xe;var r;const o=i.properties.map(e=>{const n=Au(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(xt,Sn(t.module.id),e.start),null)}).filter(e=>!!e);return o.length>0?Object.fromEntries(o):xe}const Au=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Su(e){return e?.length?Object.fromEntries(e.map(e=>[Au(e),e.value.value])):xe}function Pu(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some(n=>e[n]!==t[n])}var $u="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},wu={memoryUsage:()=>({heapUsed:0})};let Iu=new Map;function Cu(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function ku(e,t=3){e=Cu(e,t);const n=wu.memoryUsage().heapUsed,s=$u.now(),i=Iu.get(e);void 0===i?Iu.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Nu(e,t=3){e=Cu(e,t);const n=Iu.get(e);if(void 0!==n){const e=wu.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=$u.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Ou(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Iu)e[t]=[s,n,i];return e}let Ru=Rs,Du=Rs;const Mu=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function _u(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Mu)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Ru(s,4);const t=r.apply(this,e);return Du(s,4),t};let r;"function"==typeof e[n].handler?(r=e[n].handler,e[n].handler=i):(r=e[n],e[n]=i)}return e}const Lu={identifier:null,localName:Uo};function Tu(e,t,n,s,i=new Map,r,o,a){const l=i.get(t);if(l){if(l.has(e))return s?[null]:Ht((c=t,{code:"CIRCULAR_REEXPORT",exporter:u=e.id,message:`"${c}" cannot be exported from "${wt(u)}" as it is a reexport that references itself.`}));l.add(e)}else i.set(t,new Set([e]));var c,u;return e.getVariableForExportName(t,{exportOrReexportModules:a,importChain:r,importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i,sideEffectModules:o})}function Bu(e,t){const n=Se(t.sideEffectDependenciesByVariable,e,Pe);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof vo?s.getDirectOriginalVariable():s instanceof Po?s.syntheticNamespace:null,!s||i.has(s))break;i.add(s),n.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t)for(const e of t)n.add(e)}return n}class zu{constructor(e,t,n,s,i,r,o,a,l){this.graph=e,this.id=t,this.rawId=n,this.options=s,this.attributes=l,this.alternativeReexportModules=new Map,this.chunkFileNames=new Set,this.chunkNames=[],this.cycles=new Set,this.dependencies=new Set,this.dynamicDependencies=new Set,this.dynamicImporters=[],this.dynamicImports=[],this.execIndex=1/0,this.hasTreeShakingPassStarted=!1,this.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedTopLevelAwaitingDynamicImporters=new Set,this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcePhaseSources=new Set,this.sourcesWithAttributesList=new Map,this.allExportsIncluded=!1,this.ast=null,this.exportAllModules=[],this.exportAllSourcesWithAttributesList=new Map,this.exportDescriptions=new Map,this.exportedVariablesByName=null,this.exportNamesByVariable=null,this.exportShimVariable=new xc(this),this.indentExclusionRanges=[],this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.excludeFromSourcemap=/\0/.test(t),this.context=s.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const c=this,{dynamicImports:u,dynamicImporters:d,exportAllSourcesWithAttributesList:h,exportDescriptions:p,implicitlyLoadedAfter:f,implicitlyLoadedBefore:m,importers:g,reexportDescriptions:y,sourcesWithAttributesList:b}=this;this.info={ast:null,attributes:l,code:null,get dynamicallyImportedIdResolutions(){return u.map(({argument:e})=>"string"==typeof e&&c.resolvedIds[e]).filter(Boolean)},get dynamicallyImportedIds(){return u.map(({id:e})=>e).filter(e=>null!=e)},get dynamicImporters(){return d.sort()},get exportedBindings(){const e={".":[...p.keys()]};for(const[t,{source:n,attributes:s}]of y)(e[wc(n,s)]??=[]).push(t);for(const[t,n]of h)for(const s of n)(e[wc(t,s)]??=[]).push("*");return e},get exports(){return[...p.keys(),...y.keys(),...[...h].map(()=>"*")]},get hasDefaultExport(){return c.ast?c.exportDescriptions.has("default")||y.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(f,$c).sort()},get implicitlyLoadedBefore(){return Array.from(m,$c).sort()},get importedIdResolutions(){return Array.from(b.entries(),([e,t])=>t.map(t=>c.resolvedIds[wc(e,t)])).flat().filter(Boolean)},get importedIds(){return Array.from(b.entries(),([e,t])=>t.map(t=>c.resolvedIds[wc(e,t)]?.id)).flat().filter(Boolean)},get importers(){return g.sort()},isEntry:i,isExternal:!1,get isIncluded(){return e.phase!==vc.GENERATE?null:c.isIncluded()},meta:{...a},moduleSideEffects:r,rawId:n,safeVariableNames:null,syntheticNamedExports:o}}basename(){const e=Q(this.id),t=te(this.id);return $s(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){vs(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),Ht(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set,t=new Set,n=new Set(this.includedImports);if(this.info.isEntry||this.includedDynamicImporters.length>0||this.namespace.included||this.implicitlyLoadedAfter.size>0)for(const e of this.getExportedVariablesByName().values())e.included&&n.add(e);for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof Po?s=s.getBaseVariable():s instanceof vo&&(s=s.getOriginalVariable()),e.add(s.module)}if(this.options.treeshake&&"no-treeshake"!==this.info.moduleSideEffects)this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t);else for(const e of this.dependencies)this.relevantDependencies.add(e);for(const t of e)this.relevantDependencies.add(t);return this.relevantDependencies}getExportedVariablesByName(){if(this.exportedVariablesByName)return this.exportedVariablesByName;const e=this.exportedVariablesByName=new Map;for(const t of this.exportDescriptions.keys())if(t!==this.info.syntheticNamedExports){const[n]=this.getVariableForExportName(t);if(!n)return Ht($n(t,this.id));e.set(t,n)}for(const t of this.reexportDescriptions.keys()){const[n]=this.getVariableForExportName(t);n&&e.set(t,n)}for(const t of this.exportAllModules)if(t instanceof Ns)e.set(`*${t.id}`,t.getVariableForExportName("*",{importChain:[this.id]})[0]);else for(const n of t.getExportedVariablesByName().keys())if("default"!==n&&!e.has(n)){const[t]=this.getVariableForExportName(n);t&&e.set(n,t)}return this.exportedVariablesByName=new Map([...e].sort(ju))}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const[t,n]of this.getExportedVariablesByName().entries()){const s=n instanceof vo?n.getOriginalVariable():n;if(!n||!(n.included||n instanceof xs))continue;const i=e.get(s);i?i.push(t):e.set(s,[t])}return this.exportNamesByVariable=e}getRenderedExports(){const e=[],t=[];for(const n of this.exportDescriptions.keys())(this.getExportedVariablesByName().get(n)?.included?e:t).push(n);return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){return null===this.syntheticNamespace&&(this.syntheticNamespace=void 0,[this.syntheticNamespace]=this.getVariableForExportName("string"==typeof this.info.syntheticNamedExports?this.info.syntheticNamedExports:"default",{onlyExplicit:!0})),this.syntheticNamespace?this.syntheticNamespace:Ht((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${wt(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${"string"==typeof t&&"default"!==t?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}));var e,t}getVariableForExportName(e,{importerForSideEffects:t,importChain:n=[],isExportAllSearch:s,onlyExplicit:i,searchedNamesAndModules:r,sideEffectModules:o,exportOrReexportModules:a}=xe){if("*"===e[0])return 1===e.length?[this.namespace]:this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*",{importChain:[...n,this.id]});const l=this.reexportDescriptions.get(e);if(l){const[e,s]=Tu(l.module,l.localName,t,!1,r,[...n,this.id],o,a);return e?(t&&(Fu(e,t,this),this.info.moduleSideEffects&&Se(t.sideEffectDependenciesByVariable,e,Pe).add(this)),this.info.moduleSideEffects&&o?.add(this),a?.add(this),[e]):this.error(wn(l.localName,this.id,l.module.id,!!s?.missingButExportExists),l.start)}const c=this.exportDescriptions.get(e);if(c){if(c===Lu)return[this.exportShimVariable];const e=c.localName,n=this.traceVariable(e,{exportOrReexportModules:a,importerForSideEffects:t,searchedNamesAndModules:r,sideEffectModules:o});return n?(t&&(Fu(n,t,this),Se(t.sideEffectDependenciesByVariable,n,Pe).add(this)),o?.add(this),a?.add(this),[n]):[null,{missingButExportExists:!0}]}if(i)return[null];if("default"!==e){const s=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,r,[...n,this.id]);if(this.namespaceReexportsByName.set(e,s),s[0]){const[e,n]=s;if(t){const{exportOrReexportModules:s,sideEffectModules:i}=n;for(const n of s)t.alternativeReexportModules.has(e)||Fu(e,t,n);for(const n of i)Se(t.sideEffectDependenciesByVariable,e,Pe).add(n)}return s}}return this.info.syntheticNamedExports?[Se(this.syntheticExports,e,()=>new Po(this.astContext,e,this.getSyntheticNamespace()))]:!s&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}hasTopLevelAwait(){return this.astContext.usesTopLevelAwait}include(){const e=es();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(){if(this.allExportsIncluded)return;this.allExportsIncluded=!0,this.includeModuleInExecution();const e=es();for(const t of this.getExportedVariablesByName().values())this.includeVariable(t,ze,e),t.deoptimizePath(ze),t instanceof xs&&(t.module.reexported=!0)}includeAllInBundle(){this.ast.include(es(),!0),this.includeAllExports()}includeModuleInExecution(){this.isExecuted||(Os(this),this.graph.needsTreeshakingPass=!0)}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}isEmitted(){return this.isIncluded()||this.info.isEntry||this.includedDynamicImporters.length>0||this.implicitlyLoadedAfter.size>0}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const[t,n]of this.exportAllSourcesWithAttributesList)for(const s of n){const n=this.graph.modulesById.get(this.resolvedIds[wc(t,s)].id);n instanceof Ns?e.push(n):this.exportAllModules.push(n)}this.exportAllModules.push(...e)}log(e,t,n){this.addLocationToLogProps(t,n),this.options.onLog(e,t)}render(e){this.indentExclusionRanges=[];const t=this.magicString.clone();this.ast.render(t,e),t.trim();const{usesTopLevelAwait:n}=this.astContext;return n&&"es"!==e.format&&"system"!==e.format?Ht((s=this.id,i=e.format,{code:"INVALID_TLA_FORMAT",id:s,message:`Module format "${i}" does not support top-level await. Use the "es" or "system" output formats rather.`})):{indentExclusionRanges:this.indentExclusionRanges,source:t,usesTopLevelAwait:n};var s,i}setSource({astBuffer:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,safeVariableNames:c,...u}){if(Ru("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.info.safeVariableNames=c,this.originalCode=s,this.originalSourcemap=Pc(i),this.sourcemapChain=o.map(e=>e.missing?e:Pc(e)),Sc(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(u),this.resolvedIds=r??Object.create(null);const d=this.id;var h,p,f;this.magicString=new V(t,{filename:this.excludeFromSourcemap?null:d}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),addImportSource:this.addImportSource.bind(this),addIndentExclusionRange:e=>this.indentExclusionRanges.push(e),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:d,getImportedJsxFactoryVariable:this.getImportedJsxFactoryVariable.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),importDescriptions:this.importDescriptions,includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),log:this.log.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,newlyIncludedVariableInits:this.graph.newlyIncludedVariableInits,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e),traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new nc(this.graph.scope,this.astContext,this.importDescriptions),this.namespace=new Ao(this.astContext),this.astBuffer=e,Object.defineProperty(this.info,"ast",{enumerable:!0,get:()=>this.tryParseLazy(this.astBuffer)}),this.ast=(h=this.astBuffer,p=null,f=this.scope,bc(p,f,0,Ma(h))),Du("generate ast",3)}toJSON(){return{astBuffer:this.astBuffer,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,$c),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,rawId:this.rawId,resolvedIds:this.resolvedIds,safeVariableNames:this.info.safeVariableNames,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s,sideEffectModules:i,exportOrReexportModules:r}=xe){const o=this.scope.variables.get(e);if(o)return o;const a=this.importDescriptions.get(e);if(a){const e=a.module;if(e instanceof zu&&"*"===a.name)return e.namespace;const[o,l]=Tu(e,a.name,t||this,n,s,[this.id],i,r);return o||this.error(wn(a.name,this.id,e.id,!!l?.missingButExportExists),a.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n},{replaceExistingMeta:s=!1}=xe){if(null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=e){if(s)for(const e of Object.keys(this.info.meta))delete this.info.meta[e];Object.assign(this.info.meta,e)}}addDynamicImport(e){let t=e.sourceAstNode;"TemplateLiteral"===t.type?1===t.quasis.length&&"string"==typeof t.quasis[0].value.cooked&&(t=t.quasis[0].value.cooked):"Literal"===t.type&&"string"==typeof t.value&&(t=t.value),this.dynamicImports.push({argument:t,id:null,node:e})}assertUniqueExportName(e,t){(this.exportDescriptions.has(e)||this.reexportDescriptions.has(e))&&this.error(function(e){return{code:"DUPLICATE_EXPORT",message:`Duplicate export "${e}"`}}(e),t)}addExport(e){if(e instanceof xr)this.assertUniqueExportName("default",e.start),this.exportDescriptions.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof dl){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Qr?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{attributes:Su(e.attributes),localName:"*",module:null,source:t,start:e.start})}else{const n=this.exportAllSourcesWithAttributesList.get(t),s=Su(e.attributes);n?n.find(e=>!Pu(e,s))||n.push(s):this.exportAllSourcesWithAttributesList.set(t,[s])}}else if(e.source instanceof Qr){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const r=n instanceof Qr?n.value:n.name;this.assertUniqueExportName(r,i),this.reexportDescriptions.set(r,{attributes:Su(e.attributes),localName:s instanceof Qr?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof uc)for(const e of t.declarations)for(const t of xa(e.id))this.assertUniqueExportName(t,e.id.start),this.exportDescriptions.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exportDescriptions.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof Ki?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exportDescriptions.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const s=n.local.name;(this.scope.variables.has(s)||this.importDescriptions.has(s))&&this.error(On(s),n.local.start);const i="source"===e.phase?Es:n instanceof bl?"default":n instanceof $l?"*":n.imported instanceof Ki?n.imported.name:n.imported.value;this.importDescriptions.set(s,{attributes:Su(e.attributes),module:null,name:i,phase:"source"===e.phase?"source":"instance",source:t,start:n.start})}}addImportSource(e){e&&!this.sourcesWithAttributesList.has(e)&&this.sourcesWithAttributesList.set(e,[xe])}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=mt(n,t,{offsetLine:1});if(s){let{column:i,line:r}=s;try{({column:i,line:r}=function(e,t){const n=e.filter(e=>!e.missing);e:for(;n.length>0;){const e=n.pop().mappings[t.line-1];if(e){const n=e.filter(e=>e.length>1),s=n[n.length-1];let i=n[0];for(let e of n){if(e[0]>=t.column||e===s){e=e[0]!==t.column?i:e,t={column:e[3],line:e[2]+1};continue e}i=e}}throw new Error("Can't resolve original location of error.")}return t}(this.sourcemapChain,{column:i,line:r})),n=this.originalCode}catch(e){this.options.onLog(xt,function(e,t,n,s,i){return{cause:e,code:"SOURCEMAP_ERROR",id:t,loc:{column:n,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:i}}(e,this.id,i,r,t))}qt(e,{column:i,line:r},n,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[wc(t.source,t.attributes)];t.module=this.graph.modulesById.get(e)}}addRelevantSideEffectDependencies(e,t,n){const s=new Set,i=r=>{for(const o of r)s.has(o)||(s.add(o),t.has(o)?e.add(o):(o.info.moduleSideEffects||n.has(o))&&(o instanceof Ns||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=Su(t.attributes),s=this.sourcesWithAttributesList.get(e);s?s.some(e=>!Pu(e,n))||s.push(n):this.sourcesWithAttributesList.set(e,[n]),"source"===t.phase&&this.sourcePhaseSources.add(e)}getImportedJsxFactoryVariable(e,t,n){const{id:s}=this.resolvedIds[n],i=this.graph.modulesById.get(s),[r]=i.getVariableForExportName(e,{importChain:[this.id]});return r||this.error((o=e,a=s,l=this.id,{code:"MISSING_JSX_EXPORT",exporter:a,id:l,message:`Export "${o}" is not defined in module "${wt(a)}" even though it is needed in "${wt(l)}" to provide JSX syntax. Please check your "jsx" option.`,names:[o],url:Nt(Rt)}),t);var o,a,l}getVariableFromNamespaceReexports(e,t,n,s){let i=null;const r=new Map,o=new Set,a=new Set,l=new Set;for(const c of this.exportAllModules){if(c.info.syntheticNamedExports===e)continue;const[u,d]=Tu(c,e,t,!0,Vu(n),s,a,l);c instanceof Ns||d?.indirectExternal?o.add(u):u instanceof Po?i||(i=u):u&&r.set(u,c)}if(r.size>0){const t=[...r],n=t[0][0];return 1===t.length?[n,{exportOrReexportModules:l,sideEffectModules:a}]:(this.options.onLog(xt,(c=e,u=this.id,d=t.map(([,e])=>e.id),{binding:c,code:"NAMESPACE_CONFLICT",ids:d,message:`Conflicting namespaces: "${wt(u)}" re-exports "${c}" from one of the modules ${Pt(d.map(e=>wt(e)))} (will be ignored).`,reexporter:u})),[null])}var c,u,d;if(o.size>0){const t=[...o],n=t[0];return t.length>1&&this.options.onLog(xt,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${wt(t)}" re-exports "${e}" from one of the external modules ${Pt(s.map(e=>wt(e)))}, guessing "${wt(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map(e=>e.module.id))),[n,{exportOrReexportModules:l,indirectExternal:!0,sideEffectModules:a}]}return i?[i,{exportOrReexportModules:l,sideEffectModules:a}]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof Ns){const[t]=n.getVariableForExportName("*",{importChain:[this.id]});t.includePath(ze,es()),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.includePath(ze,es()),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const{resolution:t}=e;t instanceof zu&&(t.includedDynamicImporters.includes(this)||(t.includedDynamicImporters.push(this),this.astContext.usesTopLevelAwait&&t.includedTopLevelAwaitingDynamicImporters.add(this)))}includeVariable(e,t,n){const{included:s,module:i}=e;if(e.includePath(t,n),s)i instanceof zu&&i!==this&&Bu(e,this);else if(this.graph.needsTreeshakingPass=!0,i instanceof zu&&(i.includeModuleInExecution(),i!==this)){const t=Bu(e,this);for(const e of t)e.includeModuleInExecution()}}includeVariableInModule(e,t,n){this.includeVariable(e,t,n);const s=e.module;s&&s!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(xt,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${wt(t)}".`})),this.exportDescriptions.set(e,Lu)}tryParseLazy(e){try{return bu(e)}catch(e){return this.error(Dn(e,this.id),e.pos)}}}function Fu(e,t,n){if(e.module instanceof zu&&e.module!==n){const s=e.module.cycles;if(s.size>0){const i=n.cycles;for(const r of i)if(s.has(r)){t.alternativeReexportModules.set(e,n);break}}}}const Vu=e=>e&&new Map(Array.from(e,([e,t])=>[e,new Set(t)])),ju=([e],[t])=>e<t?-1:e>t?1:0,Uu=(e,t)=>[e,t].filter(Boolean).join("\n"),Gu=(e,t)=>[e,t].filter(Boolean).join("\n\n"),Hu={amd:Ku,cjs:Ku,es:qu,iife:Ku,system:qu,umd:Ku};function Wu(e,t,n,s,i,r,o,a,l,c,u,d,h,p){const f=[...e].reverse();for(const e of f)e.scope.addUsedOutsideNames(s,i,d,h);!function(e,t,n){for(const s of t){s.info.safeVariableNames||={};for(const t of s.scope.variables.values())if(t.included&&!(t.renderBaseName||t instanceof vo&&t.getOriginalVariable()!==t)){const n=Object.getOwnPropertyDescriptor(s.info.safeVariableNames,t.name)?.value;if(n&&!e.has(n)){e.add(n),t.setRenderNames(null,n);continue}t.setRenderNames(null,pt(t.name,e,t.forbiddenNames)),s.info.safeVariableNames[t.name]=t.renderName}if(n.has(s)){const t=s.namespace;t.setRenderNames(null,pt(t.name,e,t.forbiddenNames))}}}(s,f,p),Hu[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function qu(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof $o)&&(t.variableName=pt(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof Ns)?n.setRenderNames(null,(t instanceof Ns?a.get(t):o.get(t)).variableName):t instanceof Ns&&n.isSourcePhase?n.setRenderNames(null,pt(t.suggestedVariableName+"__source",e,n.forbiddenNames)):t instanceof Ns&&"default"===s?n.setRenderNames(null,pt([...t.exportedVariables].some(([e,t])=>"*"===t&&e.included)?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,pt($s(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,pt(t.name,e,t.forbiddenNames))}function Ku(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=pt(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=pt(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Lr(r(t.id),a)?t.namespaceVariableName:pt(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof Ns){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=Dr[s]?n.defaultVariableName:n.variableName;Mr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,_r[r(t.id)]?n.namespaceVariableName:n.variableName):e.setRenderNames(n.variableName,null)}else{const n=l.get(t);o&&e.isNamespace?e.setRenderNames(null,"default"===n.exportMode?n.namespaceVariableName:n.variableName):"default"===n.exportMode?e.setRenderNames(null,n.variableName):e.setRenderNames(n.variableName,n.getVariableExportName(e))}}}function Xu(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return Ht(An("default",o,i))}else if("none"===t&&o.length>0)return Ht(An("none",o,i));return"auto"===t&&(0===o.length?t="none":1===o.length&&"default"===o[0]?t="default":("es"!==s&&"system"!==s&&o.includes("default")&&r(xt,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${wt(e)}" is using named and default exports together. Consumers of your bundle will have to use \`${t||"chunk"}.default\` to access the default export, which may not be what you want. Use \`output.exports: "named"\` to disable this warning.`,url:Nt(_t)}}(i,n)),t="named")),t}function Ju(e){const t=e.split("\n"),n=t.filter(e=>/^\t+/.test(e)),s=t.filter(e=>/^ {2,}/.test(e));if(0===n.length&&0===s.length)return null;if(n.length>=s.length)return"\t";const i=s.reduce((e,t)=>{const n=/^ +/.exec(t)[0].length;return Math.min(n,e)},1/0);return" ".repeat(i)}function Yu(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof Ns){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),Yu(e,t,n,s,i,r)):t.push(o)}}const Zu="!~{",Qu="}~",ed=new RegExp(`${Zu}[0-9a-zA-Z_$]{1,16}${Qu}`,"g"),td=(e,t)=>e.replace(ed,e=>t.get(e)||e),nd=(e,t,n)=>e.replace(ed,e=>e===t?n:e),sd=(e,t)=>{const n=new Set,s=e.replace(ed,e=>t.has(e)?(n.add(e),`${Zu}${"0".repeat(e.length-5)}${Qu}`):e);return{containedPlaceholders:n,transformedCode:s}},id=Symbol("bundleKeys"),rd={type:"placeholder"};function od(e,t,n){return It(e)?Ht(Bn(`Invalid pattern "${e}" for "${t}", patterns can be neither absolute nor relative paths. If you want your files to be stored in a subdirectory, write its name without a leading slash like this: subdirectory/pattern.`)):e.replace(/\[(\w+)(:\d+)?]/g,(e,s,i)=>{if(!n.hasOwnProperty(s)||i&&"hash"!==s)return Ht(Bn(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return It(r)?Ht(Bn(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r})}function ad(e,{[id]:t}){if(!t.has(e.toLowerCase()))return e;const n=Math.max(e.lastIndexOf("/"),e.lastIndexOf("\\")),s=e.slice(0,n+1),i=e.slice(n+1),r=i.indexOf(".",1),o=s+(-1===r?i:i.slice(0,r)),a=-1===r?"":i.slice(r);let l,c=1;for(;t.has((l=o+ ++c+a).toLowerCase()););return l}const ld=["Object","Promise","module","exports","require","__filename","__dirname",...Yr],cd=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function ud(e,t,n,s,i){const{attributes:r,rawId:o}=e.moduleInfo,a="function"==typeof t?t(o,{attributes:r}):t[o];return a?(n&&"object"==typeof t&&function(e,t,n,s){const i=n.get(e)??0;1===i&&s(xt,function(e,t){return{code:"AMBIGUOUS_GLOBAL_NAME",id:e,message:`The object form of "output.globals" maps several import attribute variants of the external module "${e}" to the same global name "${t}". Use the function form of "output.globals" to give each variant its own global name.`,url:Nt(Tt)}}(e,t)),n.set(e,i+1)}(o,a,s,i),a):n?(i(xt,(l=e.id,c=e.variableName,{code:"MISSING_GLOBAL_NAME",id:l,message:`No name was provided for external module "${l}" in "output.globals" – guessing "${c}".`,names:[c],url:Nt(Tt)})),e.variableName):void 0;var l,c}class dd{constructor(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){this.orderedModules=e,this.inputOptions=t,this.outputOptions=n,this.unsetOptions=s,this.pluginDriver=i,this.modulesById=r,this.chunkByModule=o,this.externalChunkByModule=a,this.facadeChunkByModule=l,this.includedNamespaces=c,this.manualChunkAlias=u,this.getPlaceholder=d,this.bundle=h,this.inputBase=p,this.snippets=f,this.dependencies=new Set,this.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.isManualChunk=!1,this.accessedGlobalsByScope=new Map,this.dynamicEntryModules=[],this.dynamicName=null,this.exportNamesByVariable=new Map,this.exports=new Set,this.exportsByName=new Map,this.fileName=null,this.implicitEntryModules=[],this.implicitlyLoadedBefore=new Set,this.imports=new Set,this.includedDynamicImports=null,this.includedReexportsByModule=new Map,this.isEmpty=!0,this.name=null,this.needsExportsShim=!1,this.preRenderedChunkInfo=null,this.preliminaryFileName=null,this.preliminarySourcemapFileName=null,this.renderedChunkInfo=null,this.renderedDependencies=null,this.renderedModules=Object.create(null),this.sortedExportNames=null,this.strictFacade=!1,this.allowExtensionModules=new Set,this.execIndex=e.length>0?e[0].execIndex:1/0;const m=new Set(e);for(const t of e){o.set(t,this),t.namespace.included&&!n.preserveModules&&c.add(t),this.isEmpty&&t.isIncluded()&&(this.isEmpty=!1),(t.info.isEntry||n.preserveModules)&&this.entryModules.push(t);for(const e of t.includedDynamicImporters)if(!m.has(e)){this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace));break}t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=$s(this.generateVariableName()),this.isManualChunk=null!==u}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new dd([],e,t,n,s,i,r,o,a,l,null,d,h,p,f);m.assignFacadeName(u,c),a.has(c)||a.set(c,m);for(const e of c.getDependenciesToBeIncluded())m.dependencies.add(e instanceof zu?r.get(e):o.get(e));return!m.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()&&m.dependencies.add(r.get(c)),m.ensureReexportsAreAvailableForModule(c),m.facadeModule=c,m.strictFacade=!0,m}canModuleBeFacade(e,t){const n=e.getExportNamesByVariable();for(const e of this.exports)if(!n.has(e))return!1;for(const s of t)if(!(s.module===e||n.has(s)||s instanceof Po&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>td(e,s),o=i.fileName,a=this.fileName=r(o);return{...i,code:e,dynamicImports:i.dynamicImports.map(r),fileName:a,implicitlyLoadedBefore:i.implicitlyLoadedBefore.map(r),importedBindings:Object.fromEntries(Object.entries(i.importedBindings).map(([e,t])=>[r(e),t])),imports:i.imports.map(r),map:t,preliminaryFileName:o,referencedFiles:i.referencedFiles.map(r),sourcemapFileName:n}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(null!==this.facadeModule&&(!1!==this.facadeModule.preserveSignature||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[n,s]of t){this.exportNamesByVariable.set(n,[...s]);for(const e of s)this.exportsByName.set(e,n);e.delete(n)}}for(const t of this.allowExtensionModules){const n=t.getExportNamesByVariable();for(const[t,s]of n){this.exportNamesByVariable.set(t,[...s]);for(const e of s)this.exportsByName.set(e,t);e.delete(t)}}this.outputOptions.minifyInternalExports?function(e,t,n){let s=0;for(const i of e){let[e]=i.name;if(t.has(e))do{e=ht(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=ht(s))}while(dt.has(e)||t.has(e));t.set(e,i),n.set(i,[e])}}(e,this.exportsByName,this.exportNamesByVariable):function(e,t,n){for(const s of e){let e=0,i=s.name;for(;t.has(i);)i=s.name+"$"+ ++e;t.set(i,s),n.set(s,[i])}}(e,this.exportsByName,this.exportNamesByVariable),(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)&&(this.exportMode=Xu(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onLog))}generateFacades(){const e=[],t=new Set([...this.entryModules,...this.implicitEntryModules]),n=new Set(this.dynamicEntryModules.map(({namespace:e})=>e));for(const s of t){if("allow-extension"===s.preserveSignature&&this.canPreserveModuleExports(s)&&!s.chunkFileNames.size&&s.chunkNames.every(({isUserDefined:e})=>!e)){this.allowExtensionModules.add(s),this.facadeModule||(this.facadeModule=s,this.strictFacade=!1,this.assignFacadeName({},s,this.outputOptions.preserveModules)),this.facadeChunkByModule.set(s,this);continue}const t=Array.from(new Set(s.chunkNames.filter(({isUserDefined:e})=>e).map(({name:e})=>e)),e=>({name:e}));if(0===t.length&&s.isUserDefinedEntryPoint&&t.push({}),t.push(...Array.from(s.chunkFileNames,e=>({fileName:e}))),0===t.length&&t.push({}),!this.facadeModule){const e=!this.outputOptions.preserveModules&&("strict"===s.preserveSignature||"exports-only"===s.preserveSignature&&s.getExportNamesByVariable().size>0);e&&!this.canModuleBeFacade(s,n)||(this.facadeModule=s,this.facadeChunkByModule.set(s,this),s.preserveSignature&&(this.strictFacade=e),this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules))}for(const n of t)e.push(dd.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,n,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}for(const e of this.dynamicEntryModules)e.info.syntheticNamedExports||(!this.facadeModule&&this.canModuleBeFacade(e,n)?(this.facadeModule=e,this.facadeChunkByModule.set(e,this),this.strictFacade=!0,this.dynamicName=hd(e)):this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,n)?this.strictFacade=!0:this.facadeChunkByModule.get(e)?.strictFacade||(this.includedNamespaces.add(e),this.exports.add(e.namespace)));return this.outputOptions.preserveModules||this.addNecessaryImportsForFacades(),e}canPreserveModuleExports(e){const t=e.getExportNamesByVariable();for(const[e,n]of t)for(const t of n){const n=this.exportsByName.get(t);if(n&&n!==e)return!1}for(const[e,n]of t)for(const t of n)this.exportsByName.set(t,e);return!0}getChunkName(){return this.name??=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){return this.sortedExportNames??=[...this.exportsByName.keys()].sort()}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return Pr(kt(e,this.getFileName(),"amd"===this.outputOptions.format&&!this.outputOptions.amd.forceJsExtensionForImports,!0))}getPreliminaryFileName(){if(this.preliminaryFileName)return this.preliminaryFileName;let e,t=null;const{chunkFileNames:n,entryFileNames:s,file:i,format:r,preserveModules:o}=this.outputOptions;if(i)e=Q(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=od("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=ad(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=rd),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;const{sourcemapFileNames:e,format:t}=this.outputOptions;if(!e)return null;let n=null;const[s,i]=[e,"output.sourcemapFileNames"];let r=od("function"==typeof s?s(this.getPreRenderedChunkInfo()):s,i,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>t,hash:e=>n||(n=this.getPlaceholder(i,e||8)),name:()=>this.getChunkName()});return n||(r=ad(r,this.bundle)),this.preliminarySourcemapFileName={fileName:r,hashPlaceholder:n}}getRenderedChunkInfo(){if(this.renderedChunkInfo)return this.renderedChunkInfo;const e=this.getRenderedDependencies();return this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(gd),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,gd),importedBindings:fd(e,gd),imports:Array.from(e.keys(),gd),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof Ao?"*":this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=function(e,t,n,s){const i=[],r=new Set;for(let o=t.length-1;o>=0;o--){const a=t[o];if(!r.has(a)){const t=[];Yu(a,t,r,e,n,s),i.unshift(t)}}const o=new Set;for(const e of i)for(const t of e)o.add(t);return o}(this,this.orderedModules,this.chunkByModule,this.externalChunkByModule);for(const e of this.orderedModules)this.addImplicitlyLoadedBeforeFromModule(e),this.setUpChunkImportsAndExportsForModule(e)}inlineTransitiveImports(){const{facadeModule:e,dependencies:t,outputOptions:n}=this,{hoistTransitiveImports:s,preserveModules:i}=n;if(s&&!i&&null!==e)for(const e of t)e instanceof dd&&this.inlineChunkDependencies(e)}async render(){const{exportMode:e,facadeModule:t,inputOptions:{onLog:n},outputOptions:s,pluginDriver:i,snippets:r}=this,{format:o,preserveModules:a}=s,l=this.getPreliminaryFileName(),c=this.getPreliminarySourcemapFileName(),{accessedGlobals:u,indent:d,magicString:h,renderedSource:p,usedModules:f,usesTopLevelAwait:m}=this.renderModules(l.fileName),g=[...this.getRenderedDependencies().values()],y="none"===e?[]:this.getChunkExportDeclarations(o),b="es"===o&&new Set(y.map(({exported:e})=>e));let E=y.length>0,x=!1;for(const e of g){const{reexports:t}=e;t?.length&&(E=!0,!x&&t.some(e=>"default"===e.reexported)&&(x=!0),b&&(e.reexports=t.filter(({reexported:e})=>!b.has(e))))}if(!x)for(const{exported:e}of y)if("default"===e){x=!0;break}const{intro:v,outro:A,banner:S,footer:P}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],Uu),t.hookReduceValue("footer",e.footer(n),[n],Uu),t.hookReduceValue("intro",e.intro(n),[n],Gu),t.hookReduceValue("outro",e.outro(n),[n],Gu)]);return r&&(r+="\n\n"),o&&(o=`\n\n${o}`),s&&(s+="\n"),i&&(i="\n"+i),{banner:s,footer:i,intro:r,outro:o}}catch(e){return Ht((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(s,i,this.getRenderedChunkInfo());if(Zo[o](p,{accessedGlobals:u,dependencies:g,exports:y,hasDefaultExport:x,hasExports:E,id:l.fileName,indent:d,intro:v,isEntryFacade:a||null!==t&&t.info.isEntry,isModuleFacade:null!==t,log:n,namedExportsMode:"default"!==e,outro:A,snippets:r,usesTopLevelAwait:m},s),S&&h.prepend(S),"es"===o||"cjs"===o){const e=null!==t&&t.info.isEntry&&t.shebang;e&&h.prepend(`#!${e}\n`)}return P&&h.append(P),{chunk:this,magicString:h,preliminaryFileName:l,preliminarySourcemapFileName:c,usedModules:f}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:n}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);e&&e!==this&&n.add(e)}}addNecessaryImportsForFacades(){for(const[e,t]of this.includedReexportsByModule)if(this.includedNamespaces.has(e))for(const e of t)this.imports.add(e)}assignFacadeName({fileName:e,name:t},n,s){e?this.fileName=e:this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(n):hd(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof zu){const s=this.chunkByModule.get(n);let i;do{i=t.alternativeReexportModules.get(e),i&&(this.chunkByModule.get(i)!==s&&this.inputOptions.onLog(xt,fn(n.getExportNamesByVariable().get(e)?.[0]||"*",n.id,i.id,t.id,this.outputOptions.preserveModules)),t=i)}while(i)}}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof Po,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof Ao&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof zu){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(i))}else e instanceof Ns&&i.included&&t.push(i)}}t.length>0&&this.includedReexportsByModule.set(e,t)}generateVariableName(){if(this.manualChunkAlias)return this.manualChunkAlias;const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];return e?hd(e):"chunk"}getChunkExportDeclarations(e){const t=[];for(const n of this.getExportNames()){if("*"===n[0])continue;const s=this.exportsByName.get(n);if(!(s instanceof Po)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||"es"!==e)continue;const t=this.renderedDependencies.get(s);if(!t)continue;const{imports:i,reexports:r}=t,o=r?.find(({reexported:e})=>e===n),a=i?.find(({imported:e})=>e===o?.imported);if(!a)continue}}}let i=null,r=!1,o=s.getName(this.snippets.getPropertyAccess);if(s instanceof ps){for(const e of s.declarations)if(e.parent instanceof Er||e instanceof xr&&e.declaration instanceof Er){r=!0;break}}else s instanceof Po&&(i=o,"es"===e&&(o=s.renderName));t.push({exported:n,expression:i,hoisted:r,local:o,needsLiveBinding:s.isReassigned&&this.exportNamesByVariable.get(s).length>1})}return t}getDependenciesToBeDeconflicted(e,t,n){const s=new Set,i=new Set,r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports])if(e||t.isNamespace){const o=t.module;if(o instanceof Ns){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?Dr[n(o.id)]&&i.add(a):t.isNamespace&&_r[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every(e=>"*"===e[0]))&&r.add(a))}else{const n=this.chunkByModule.get(o);n!==this&&(s.add(n),e&&"default"===n.exportMode&&t.isNamespace&&r.add(n))}}if(t)for(const e of this.dependencies)s.add(e);return{deconflictedDefault:i,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map(e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution).filter(e=>e!==this&&(e instanceof dd||e instanceof $o))}getDynamicImportStringAndAttributes(e,t,n){const{externalImportAttributes:s}=this.outputOptions,i=["es","cjs"].includes(this.outputOptions.format)&&s;if(e instanceof Ns){const n=this.externalChunkByModule.get(e),s=n.getImportAttributes(this.snippets);return[`'${n.getImportPath(t)}'`,s||!!i||null]}let r=null;if(i){const e=vu(n);r=e===xe||wo(e,this.snippets)}return[e||"",r]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?$t(this.fileName):$t(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions,t=new Map;for(const n of this.imports){const s=n.module;let i,r;const o=s instanceof Ns&&n.isSourcePhase;if(s instanceof Ns){if(i=this.externalChunkByModule.get(s),r=n.name,!o&&"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return Ht(Ln(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);Se(t,i,$e).push({imported:r,local:n.getName(this.snippets.getPropertyAccess),phase:o?"source":"instance"})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n}of t.dynamicImports){if(!n.included)continue;const{resolution:t}=n;e.push(t instanceof zu?{chunk:this.chunkByModule.get(t),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(t),node:n,resolution:t}:t instanceof Ns?{chunk:null,externalChunk:this.externalChunkByModule.get(t),facadeChunk:null,node:n,resolution:t}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:t})}return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo)return this.preRenderedChunkInfo;const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:n,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleAttributes:t?t.info.attributes:{},facadeModuleId:t&&t.id,facadeModuleRawId:t?t.info.rawId:null,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:n.length>0,moduleIds:s.map(({id:e})=>e),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=pd(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(Z(e.id.split(md,1)[0])),r=s(this.inputBase),o=te(i),a=cd.has(o)?i.slice(0,-o.length):i;return J(a)?n&&ie(a).startsWith(n)?a.slice(n.length).replace(/^[/\\]/,""):"/"===r&&"/"!==a[0]?se(r,a.replace(/^[a-zA-Z]:[/\\]/,"/")):se(r,a):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+Q(a)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(xt,Tn(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof Po)continue;const a=n.module;if(a instanceof zu){if(i=this.chunkByModule.get(a),i===this)continue;r=i.getVariableExportName(n),o=n.isReassigned}else{if(i=this.externalChunkByModule.get(a),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===t(a.id))return Ht(Ln(a.id,r,!0));o=e&&("default"!==r||Mr(t(a.id),!0))}}Se(n,i,$e).push({imported:r,needsLiveBinding:o,reexported:s})}return n}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules)for(const n of t.importMetas){const t=n.getReferencedFileName(this.pluginDriver);t&&e.add(t)}return[...e]}getRenderedDependencies(){if(this.renderedDependencies)return this.renderedDependencies;const e=this.getImportSpecifiers(),t=this.getReexportSpecifiers(),n=new Map,s=this.getFileName(),i="iife"===this.outputOptions.format||"umd"===this.outputOptions.format?new Map:void 0;for(const r of this.dependencies){const o=e.get(r)||null,a=t.get(r)||null;null===o&&null===a&&r instanceof $o&&!r.moduleSideEffects&&!this.outputOptions.hoistTransitiveImports||n.set(r,this.getRenderedDependency(r,o,a,s,i))}return this.renderedDependencies=n}getRenderedDependency(e,t,n,s,i){const r=e instanceof $o||"default"!==e.exportMode,o=e.getImportPath(s),a=t?.find(e=>"source"===e.phase),l=t?.filter(e=>"source"!==e.phase)??null;return{attributes:e instanceof $o?e.getImportAttributes(this.snippets):null,defaultVariableName:e.defaultVariableName,globalName:i&&e instanceof $o&&ud(e,this.outputOptions.globals,null!==(t||n),i,this.inputOptions.onLog),importPath:o,imports:l&&l.length>0?l:null,isChunk:e instanceof dd,name:e.variableName,namedExportsMode:r,namespaceVariableName:e.namespaceVariableName,reexports:n,sourcePhaseImport:a?.local}}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof dd&&this.inlineChunkDependencies(t))}renderModules(e){const{accessedGlobalsByScope:t,dependencies:n,exportNamesByVariable:s,includedNamespaces:i,inputOptions:{onLog:r},isEmpty:o,orderedModules:a,outputOptions:l,pluginDriver:c,renderedModules:u,snippets:d}=this,{compact:h,format:p,freeze:f,generatedCode:{symbols:m},importAttributesKey:g}=l,{_:y,cnst:b,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const x=new U({separator:`${E}${E}`}),v=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=Ju(t.originalCode);if(null!==e)return e}return"\t"}(a,l),A=[];let S="";const P=new Set,$={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,importAttributesKey:g,indent:v,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let w=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render($);!$.accessedDocumentCurrentScript&&lo.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(Rr),$.accessedDocumentCurrentScript=!1,({source:n}=r),w||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),x.addSource({content:n,indentExclusionRanges:r.indentExclusionRanges}),A.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock($);o.renderFirst()?S+=E+e:x.addSource(new V(e))}const a=t.get(e.scope);if(a)for(const e of a)P.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={attributes:e.info.attributes,get code(){return n?.toString()??null},originalLength:e.originalCode.length,rawId:e.info.rawId,removedExports:o,renderedExports:r,renderedLength:s}}S&&x.prepend(S+E+E),this.needsExportsShim&&x.prepend(`${E}${b} ${Uo}${y}=${y}void 0;${E}${E}`);const I=h?x:x.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(xt,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:P,indent:v,magicString:x,renderedSource:I,usedModules:A,usesTopLevelAwait:w}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:n,pluginDriver:s,snippets:i}=this;for(const r of this.getIncludedDynamicImports())if(r.chunk){const{chunk:o,facadeChunk:a,node:l,resolution:c}=r;o===this?l.setInternalResolution(c.namespace):l.setExternalResolution((a||o).exportMode,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null,this,a||o)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e,o);o.setExternalResolution("external",n,i,s,t,l,!1,c,this,null)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions;for(const e of this.orderedModules)for(const t of e.scope.variables.values())t.setRenderNames(null,null);const r=new Set;for(const t of this.getExportNames()){const n=this.exportsByName.get(t);"es"!==e&&"system"!==e&&n.isReassigned&&!n.isId?n.setRenderNames("exports",t):n instanceof Po?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(ld);this.needsExportsShim&&o.add(Uo),t&&o.add("Symbol"),Wu(this.orderedModules,this.getDependenciesToBeDeconflicted("es"!==e&&"system"!==e,"amd"===e||"umd"===e||"iife"===e,n),this.imports,o,e,n,s,i,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:n,orderedModules:s,outputOptions:{format:i}}=this;for(const r of s){for(const n of r.importMetas)n.setResolution(i,t,e);n.has(r)&&r.namespace.prepare(t)}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e))for(const n of e.getExportedVariablesByName().values())n.included&&t.add(n);for(let n of t){n instanceof vo&&(n=n.getOriginalVariable()),n instanceof Po&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof zu&&(this.checkCircularDependencyImport(n,e),n instanceof Ao&&this.outputOptions.preserveModules||t.exports.add(n)))}(this.includedNamespaces.has(e)||e.info.isEntry&&!1!==e.preserveSignature||e.includedDynamicImporters.some(e=>this.chunkByModule.get(e)!==this))&&this.ensureReexportsAreAvailableForModule(e);for(const{node:{included:t,resolution:n}}of e.dynamicImports)t&&n instanceof zu&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function hd(e){return pd(e)??$t(e.id)}function pd(e){return e.chunkNames.find(({isUserDefined:e})=>e)?.name??e.chunkNames[0]?.name}function fd(e,t){const n={};for(const[s,i]of e){const e=new Set;if(i.imports)for(const{imported:t}of i.imports)e.add(t);if(i.reexports)for(const{imported:t}of i.reexports)e.add(t);n[t(s)]=[...e]}return n}const md=/[#?]/,gd=e=>e.getFileName();function*yd(e){for(const t of e)yield*t}function bd(e,t,n,s,i){const{manualChunkByModule:r,manualChunks:o}=function(e,t){const n=Object.create(null),s=[...e].sort(([e],[t])=>e.execIndex-t.execIndex);for(const[e,t]of s)(n[t]||=[]).push(e);const i=[],r=new Map;for(const[e,s]of Object.entries(n)){const n=s.filter(e=>e.isEmitted());if(0===n.length){t(xt,mn(e));continue}const o={alias:e,modules:n};i.push(o);for(const e of n)r.set(e,o)}return{manualChunkByModule:r,manualChunks:i}}(t,s),a=new Map;o.forEach((t,n)=>{a.set(t,e.length+n)});const{entriesAndManualChunksCount:l,dependentEntriesByModule:c,dynamicallyDependentEntriesByDynamicEntry:u,dynamicImportsByEntry:d,dynamicallyDependentEntriesByAwaitedDynamicEntry:h,awaitedDynamicImportsByEntry:p}=function(e,t,n,s){const i=new Set,r=new Set,o=new Map,a=t.map(e=>e.modules),l=new Set(e);for(const e of a)for(const t of e)l.add(t);const c=e.map(e=>[e]).concat(a),u=new Array(c.length),d=new Array(c.length),h=new Array(c.length),p=new Array(c.length);let f=0;for(const e of c){const t=new Set,s=new Set,a=new Set,m=new Set;u[f]=t,d[f]=s,h[f]=a,p[f]=m;const g=new Set(e);let y=!1;const b=new Set;for(const e of g){y||=e.hasTopLevelAwait(),Se(o,e,Pe).add(f);const s=n.get(e);if(s&&!b.has(s)){b.add(s);for(const e of s.modules)g.add(e)}for(const t of e.getDependenciesToBeIncluded())t instanceof Ns||g.add(t);for(const{node:{resolution:s}}of e.dynamicImports)if(s instanceof zu&&s.includedDynamicImporters.length>0){if(l.has(s)){if(!i.has(s)){const e=n.get(s);if(!e)continue;a.add(e)}}else i.add(s),l.add(s),c.push([s]);t.add(s)}for(const s of e.implicitlyLoadedBefore)if(l.has(s)){const e=n.get(s);e&&(a.add(e),t.add(s))}else i.add(s),l.add(s),c.push([s])}if(y)for(const e of t){const t=n.get(e);t?m.add(t):r.add(e),s.add(e)}f++}const{awaitedDynamicEntries:m,awaitedDynamicImportsByEntry:g,dynamicEntries:y,dynamicImportsByEntry:b}=function(e,t,n,s,i,r,o,a){const l=new Map,c=new Set,u=new Set;for(const[n,i]of e.entries())for(const e of i)l.set(e,n),t.has(e)&&c.add(n),s.has(e)&&u.add(n);for(const e of r)for(const t of e)c.add(a.get(t));for(const e of o)for(const t of e)u.add(a.get(t));const d=xd(n,l),h=xd(i,l);return{awaitedDynamicEntries:u,awaitedDynamicImportsByEntry:h,dynamicEntries:c,dynamicImportsByEntry:d}}(c,i,u,r,d,h,p,s);return{awaitedDynamicImportsByEntry:g,dependentEntriesByModule:o,dynamicallyDependentEntriesByAwaitedDynamicEntry:vd(Ad(o,m,c,e=>e.includedTopLevelAwaitingDynamicImporters),g),dynamicallyDependentEntriesByDynamicEntry:Ad(o,y,c,e=>e.includedDynamicImporters),dynamicImportsByEntry:b,entriesAndManualChunksCount:c.length}}(e,o,r,a),{modulesWithDependentEntries:f,topLevelAwaitingCycleSingletons:m}=function(e,t){const n=[],s=[];for(const[i,r]of e){const e=t.get(i)?.alias??null;null===e&&i.cycles.size>0&&i.includedTopLevelAwaitingDynamicImporters.size>0?s.push({alias:null,modules:[i]}):n.push({alias:e,dependentEntries:r,module:i})}return{modulesWithDependentEntries:n,topLevelAwaitingCycleSingletons:s}}(c,r),g=function(e,t){const n=Ed(e,t),s=Object.create(null);for(const[t,{dependentEntries:i,module:r}]of e.entries()){const{alias:e,key:o}=n[t];(s[o]||={alias:e,dependentEntries:new Set(i),modules:[]}).modules.push(r)}return Object.values(s)}(f,i),y=function(e,t){const n=new Array(e).fill(0n);let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(l,g),b=function(e,t,n,s){const i=Array.from({length:s},(e,n)=>t.has(n)?-1n:0n);for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a&=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])Se(t,e,Pe).add(s)}}return i}(y,u,d,l),E=function(e,t,n,s){const i=new Array(s).fill(0n);for(const[s,r]of t){t.delete(s);const o=i[s];let a=o;for(const t of r)a|=e[t]|i[t];if(a!==o){i[s]=a;for(const e of n[s])Se(t,e,Pe).add(s)}}return i}(y,h,p,l);!function(e,t,n){const s=new Map;for(const[e,{alias:n}]of t.entries())null!==n&&s.set(n,1n<<BigInt(e));for(const[t,i]of e){const e=s.get(t.alias),r=n[i];void 0!==e&&(r&e)===e&&(n[i]=0n)}}(a,g,b),function(e,t,n){let s=1n;for(const{dependentEntries:i}of e){for(const e of i)(t[e]&s)===s&&0n===(n[e]&s)&&i.delete(e);s<<=1n}}(g,b,E);const{chunks:x,sideEffectAtoms:v,sizeByAtom:A}=function(e,t,n,s,i){const r=Ed(e,i),o=Object.create(null),a=new Map,l=new Array(e.length);let c=0n,u=1n;for(const[i,{dependentEntries:d,modules:h}]of e.entries()){let e=-1n;for(const s of d)e&=t[s]|n[s];const{alias:p,key:f}=r[i],m=o[f]||={alias:p,containedAtoms:0n,correlatedAtoms:e,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(d),modules:[],pure:!0,size:0};let g=0,y=!0;for(const e of h)a.set(e,m),e.isIncluded()&&(y&&=!e.hasEffects(),g+=s>1?e.estimateSize():1);y||(c|=u),l[i]=g,m.containedAtoms|=u,m.modules.push(...h),m.pure&&=y,m.size+=g,u<<=1n}const d=Object.values(o);return c|=function(e,t,n){const s=new Map;let i=0n;for(const r of e){const{dependencies:e,modules:o}=r;for(const a of o)for(const o of a.getDependenciesToBeIncluded())if(o instanceof Ns){if(o.info.moduleSideEffects){const e=Se(s,o,()=>{const e=n;return n<<=1n,i|=e,e});r.containedAtoms|=e,r.correlatedAtoms|=e}}else{const n=t.get(o);n&&n!==r&&(e.add(n),n.dependentChunks.add(r))}}return i}(d,a,u),{chunks:d,sideEffectAtoms:c,sizeByAtom:l}}(g,y,b,n,i);return[...m,...Sd(x,n,v,A,s).map(({alias:e,modules:t})=>({alias:e,modules:t}))]}function Ed(e,t){const n=new Array(e.length),s=t?null:new Map;for(const[t,{dependentEntries:i,alias:r}]of e.entries()){let e=0n;for(const t of i)e|=1n<<BigInt(t);const o=String(e);if(n[t]=o,s&&null!==r){const e=s.get(o);s.set(o,void 0===e||e===r?r:null)}}return e.map(({alias:e},t)=>{const i=e??s?.get(n[t])??null;return{alias:i,key:null===i?n[t]:`manual:${i}`}})}function xd(e,t){const n=new Array(e.length);let s=0;for(const i of e){const e=new Set;for(const n of i)e.add(t.get(n));n[s++]=e}return n}function vd(e,t){for(const[n,s]of t.entries())for(const t of s)Se(e,t,Pe).add(n);return e}function Ad(e,t,n,s){const i=new Map;for(const r of t){const t=Se(i,r,Pe),o=n[r];for(const n of o)for(const i of yd([s(n),n.implicitlyLoadedAfter])){const n=e.get(i);if(n)for(const e of n)t.add(e)}}return i}function Sd(e,t,n,s,i){Ru("optimize chunks",3);const r=function(e,t){const n=[],s=[],i=[];for(const r of e)null!==r.alias?i.push(r):(r.size<t?n:s).push(r);return 0===n.length?null:(n.sort(Pd),s.sort(Pd),{big:new Set(s),fixed:new Set(i),small:new Set(n)})}(e,t);return r?(t>1&&i("info",kn(e.length,r.small.size,"Initially")),function(e,t,n,s){const{small:i}=e;for(const r of i){const o=$d(r,e,n,s,t<=1?1:1/0);if(o){const{containedAtoms:n,correlatedAtoms:s,modules:a,pure:l,size:c}=r;i.delete(r),Cd(o,t,e).delete(o),o.modules.push(...a),o.size+=c,o.pure&&=l;const{dependencies:u,dependentChunks:d,dependentEntries:h}=o;o.correlatedAtoms&=s,o.containedAtoms|=n;for(const e of r.dependentEntries)h.add(e);for(const e of r.dependencies)u.add(e),e.dependentChunks.delete(r),e.dependentChunks.add(o);for(const e of r.dependentChunks)d.add(e),e.dependencies.delete(r),e.dependencies.add(o);u.delete(o),d.delete(o),Cd(o,t,e).add(o)}}}(r,t,n,s),t>1&&i("info",kn(r.small.size+r.big.size+r.fixed.size,r.small.size,"After merging chunks")),Du("optimize chunks",3),[...r.small,...r.big,...r.fixed]):(Du("optimize chunks",3),e)}function Pd({size:e},{size:t}){return e-t}function $d(e,{big:t,small:n},s,i,r){let o=null;for(const a of yd([n,t])){if(e===a)continue;const t=wd(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function wd(e,t,n,s,i){const r=Id(e,t,n,s,i);return r<n?r+Id(t,e,n-r,s,i):1/0}function Id(e,t,n,s,i){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const a=o&s;if((r&a)!==a)return 1/0;const l=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:n}of l){o|=n;const i=n&s;if((r&i)!==i)return 1/0;for(const n of e){if(n===t)return 1/0;l.add(n)}}return function(e,t,n){let s=0,i=0,r=1n;const{length:o}=n;for(;i<o;i++)if((e&r)===r&&(s+=n[i]),r<<=1n,s>=t)return 1/0;return s}(o&~r,n,i)}function Cd(e,t,n){return e.size<t?n.small:n.big}const kd=(e,t)=>e.execIndex>t.execIndex?1:-1;function Nd(e){e.sort(kd)}function Od(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=(e,t)=>{r.has(e)?s.has(e)||n.push(function(e,t,n){const s=Symbol(e.id),i=[e.id];let r=t;for(e.cycles.add(s);r!==e;)r.cycles.add(s),i.push(r.id),r=n.get(r);return i.push(i[0]),i.reverse(),i}(e,t,r)):(r.set(e,t),l(e))},l=e=>{if(e instanceof zu){for(const t of e.dependencies)a(t,e);for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{node:{resolution:t,scope:n}}of e.dynamicImports)t instanceof zu&&(n.context.usesTopLevelAwait?a(t,e):i.add(t));o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),l(t));for(const e of i)r.has(e)||(r.set(e,null),l(e));return{cyclePaths:n,orderedModules:o}}const Rd=(e,t)=>t?`(${e})`:e;class Dd{constructor(e,t){this.isOriginal=!0,this.filename=e,this.content=t}traceSegment(e,t,n){return{column:t,line:e,name:n,source:this}}}class Md{constructor(e,t){this.sources=t,this.names=e.names,this.mappings=e.mappings}traceMappings(){const e=[],t=new Map,n=[],s=[],i=new Map,r=[];for(const o of this.mappings){const a=[];for(const r of o){if(1===r.length)continue;const o=this.sources[r[1]];if(!o)continue;const l=o.traceSegment(r[2],r[3],5===r.length?this.names[r[4]]:"");if(l){const{column:o,line:c,name:u,source:{content:d,filename:h}}=l;let p=t.get(h);if(void 0===p)p=e.length,e.push(h),t.set(h,p),n[p]=d;else if(null==n[p])n[p]=d;else if(null!=d&&n[p]!==d)return Ht(_n(h));const f=[r[0],p,c,o];if(u){let e=i.get(u);void 0===e&&(e=s.length,s.push(u),i.set(u,e)),f[4]=e}a.push(f)}}r.push(a)}return{mappings:r,names:s,sources:e,sourcesContent:n}}traceSegment(e,t,n){const s=this.mappings[e];if(!s)return null;let i=0,r=s.length-1;for(;i<=r;){const e=i+r>>1;let o=s[e];if(o[0]!==t&&i===r&&(o=s[s[i][0]>t?Math.max(0,i-1):i]),o[0]===t||i===r){if(1==o.length)return null;const e=this.sources[o[1]];return e?e.traceSegment(o[2],o[3],5===o.length?this.names[o[4]]:n):null}o[0]>t?r=e-1:i=e+1}return null}}function _d(e){return function(t,n){return n.missing?(e(xt,(s=n.plugin,{code:rn,message:`Sourcemap is likely to be incorrect: a plugin (${s}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:s,url:Nt("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new Md({mappings:[],names:[]},[t])):new Md(n,[t]);var s}}function Ld(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=ee(e)||".",o=n.sourceRoot||".",a=t.map((e,t)=>new Dd(ie(i,o,e),s[t]));r=new Md(n,a)}else r=new Dd(e,t);return s.reduce(i,r)}let Td;const Bd=e=>function(e){let t,n;try{const r=Wc.__wbindgen_add_to_stack_pointer(-16);Wc.xxhashBase64Url(r,Oc(e));var s=Mc().getInt32(r+0,!0),i=Mc().getInt32(r+4,!0);return t=s,n=i,_c(s,i)}finally{Wc.__wbindgen_add_to_stack_pointer(16),Wc.__wbindgen_export(t,n,1)}}(Fd(e)),zd={base36:e=>function(e){let t,n;try{const r=Wc.__wbindgen_add_to_stack_pointer(-16);Wc.xxhashBase36(r,Oc(e));var s=Mc().getInt32(r+0,!0),i=Mc().getInt32(r+4,!0);return t=s,n=i,_c(s,i)}finally{Wc.__wbindgen_add_to_stack_pointer(16),Wc.__wbindgen_export(t,n,1)}}(Fd(e)),base64:Bd,hex:e=>function(e){let t,n;try{const r=Wc.__wbindgen_add_to_stack_pointer(-16);Wc.xxhashBase16(r,Oc(e));var s=Mc().getInt32(r+0,!0),i=Mc().getInt32(r+4,!0);return t=s,n=i,_c(s,i)}finally{Wc.__wbindgen_add_to_stack_pointer(16),Wc.__wbindgen_export(t,n,1)}}(Fd(e))};function Fd(e){return"string"==typeof e?"undefined"==typeof Buffer?(Td??=new TextEncoder,Td.encode(e)):Buffer.from(e):e}let Vd="sourceMa";async function jd(e,t,n,s,i){Ru("render chunks",2),function(e){for(const t of e)t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint&&t.getPreliminaryFileName()}(e);const r=await Promise.all(e.map(e=>e.render()));Du("render chunks",2),Ru("transform chunks",2);const o=zd[s.hashCharacters],a=function(e){return Object.fromEntries(e.map(e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]}))}(e),{hashDependenciesByPlaceholder:l,initialHashesByPlaceholder:c,nonHashedChunksWithPlaceholders:u,placeholders:d,renderedChunksByPlaceholder:h,usedFileNames:p}=await async function(e,t,n,s,i,r,o){const a=[],l=new Map,c=new Map,u=new Map,d=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e)t&&d.add(t);const h=await Promise.all(e.map(async({chunk:e,preliminaryFileName:{fileName:i,hashPlaceholder:o},preliminarySourcemapFileName:a,magicString:l,usedModules:c})=>{const u={chunk:e,fileName:i,sourcemapFileName:a?.fileName??null,...await Ud(l,i,c,t,n,s,r)};return{hashAugmentation:o?s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],(e,t)=>e+(t||"")):"",hashPlaceholder:o,preliminarySourcemapFileName:a,transformedChunk:u}})),p=new Set(o[id]);for(const{transformedChunk:e,hashPlaceholder:t,preliminarySourcemapFileName:s,hashAugmentation:r}of h){const{map:o}=e,h=s?.hashPlaceholder;if(o&&h){const{transformedCode:e}=sd(o.toString(),d);u.set(h,"inline"===n.sourcemap?i(e).slice(0,h.length):Hd(e,s.fileName,h,p,i))}t?(l.set(t,e),c.set(t,Gd(e,n,i,d,u,r))):a.push(e)}return{hashDependenciesByPlaceholder:c,initialHashesByPlaceholder:u,nonHashedChunksWithPlaceholders:a,placeholders:d,renderedChunksByPlaceholder:l,usedFileNames:p}}(r,a,s,n,o,i,t),f=function(e,t,n,s,i,r,o){const a=new Map(n);for(const n of s){const{fileName:s}=e.get(n);let l="";const c=new Set([n]);for(const e of c){const{containedPlaceholders:n,contentHash:s}=t.get(e);l+=s;for(const e of n)c.add(e)}const u=Hd(l,s,n,r,o);i[nd(s,n,u)]=rd,a.set(n,u)}return a}(h,l,c,d,t,p,o);!function(e,t,n,s,i,r){for(const{chunk:s,code:o,fileName:a,sourcemapFileName:l,map:c}of e.values()){let e=td(o,t);const u=td(a,t);let d=null;c&&(r.sourcemapDebugIds&&(e+=Kd(e,c)),d=l?td(l,t):`${u}.map`,c.file=td(c.file??"",t),e+=Wd(d,c,i,r)),n[u]=s.finalizeChunk(e,c,d,t)}for(const{chunk:e,code:o,fileName:a,sourcemapFileName:l,map:c}of s){let s=t.size>0?td(o,t):o,u=null;c&&(r.sourcemapDebugIds&&(s+=Kd(s,c)),u=l?td(l,t):`${a}.map`,s+=Wd(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,f,t,u,n,s),Du("transform chunks",2)}async function Ud(e,t,n,s,i,r,o){let a=null;const l=[];let c=await r.hookReduceArg0("renderChunk",[e.toString(),s[t],i,{chunks:s}],(e,t,n)=>{if(null==t)return e;if("string"==typeof t&&(t={code:t,map:void 0}),null!==t.map){const e=Pc(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code});const{compact:u,dir:d,file:h,sourcemap:p,sourcemapExcludeSources:f,sourcemapFile:m,sourcemapPathTransform:g,sourcemapIgnoreList:y}=i;if(u||"\n"===c[c.length-1]||(c+="\n"),p){let s;Ru("sourcemaps",3),s=h?ie(m||h):d?ie(d,t):ie(t),a=function(e,t,n,s,i,r){const o=_d(r),a=n.filter(e=>!e.excludeFromSourcemap).map(e=>Ld(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o)),l=new Md(t,a),c=s.reduce(o,l);let{sources:u,sourcesContent:d,names:h,mappings:p}=c.traceMappings();if(e){const t=ee(e);u=u.map(e=>se(t,e)),e=Q(e)}for(const e of n)Sc(e.originalSourcemap,e.sourcemapChain);return new P({file:e,mappings:p,names:h,sources:u,sourcesContent:i?void 0:d})}(s,e.generateDecodedMap({}),n,l,f,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=y(t,n);"boolean"!=typeof i&&Ht(Bn("sourcemapIgnoreList function must return a boolean.")),i&&(void 0===a.x_google_ignoreList&&(a.x_google_ignoreList=[]),a.x_google_ignoreList.includes(e)||a.x_google_ignoreList.push(e)),g&&(t=g(t,n),"string"!=typeof t&&Ht(Bn("sourcemapPathTransform function must return a string."))),a.sources[e]=Z(t)}Du("sourcemaps",3)}return{code:c,map:a}}function Gd({code:e,map:t,fileName:n,sourcemapFileName:s},i,r,o,a,l){const{containedPlaceholders:c,transformedCode:u}=sd(e,o);let d=u;if(t&&"hidden"!==i.sourcemap){let e;if("inline"===i.sourcemap){const{containedPlaceholders:n,transformedCode:s}=sd(t.toString(),o);e=n,d+=`//# ${Vd}=data:application/json,${s}\n`}else{const{containedPlaceholders:r,transformedCode:l}=sd(td(s??`${n}.map`,a),o);e=r,d+=qd(l,t,i.sourcemap,i.sourcemapBaseUrl)}for(const t of e)c.add(t)}return l&&(d+=l),{containedPlaceholders:c,contentHash:r(d)}}function Hd(e,t,n,s,i){let r,o;do{o&&(e=o),o=i(e).slice(0,n.length),r=nd(t,n,o).toLowerCase()}while(s.has(r));return s.add(r),o}function Wd(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){return"inline"!==s&&n.emitFile({fileName:e,originalFileName:null,source:t.toString(),type:"asset"}),qd(e,t,s,i)}function qd(e,t,n,s){const i="inline"===n?t.toUrl():s?new URL(Q(e),s).toString():Q(e);return"hidden"===n?"":`//# ${Vd}=${i}\n`}function Kd(e,t){const n=zd.hex(e),s=[n.slice(0,8),n.slice(8,12),"4"+n.slice(12,15),(3&parseInt(n.slice(15,16),16)|8).toString(16)+n.slice(17,20),n.slice(20,32)].join("-");return t.debugId=s,"//# debugId="+s+"\n"}Vd+="ppingURL";class Xd{constructor(e,t,n,s,i){this.outputOptions=e,this.unsetOptions=t,this.inputOptions=n,this.pluginDriver=s,this.graph=i,this.facadeChunkByModule=new Map,this.includedNamespaces=new Set}async generate(e){Ru("GENERATE",1);const t=Object.create(null),n=(e=>{const t=new Set;return new Proxy(e,{deleteProperty:(e,n)=>("string"==typeof n&&t.delete(n.toLowerCase()),Reflect.deleteProperty(e,n)),get:(e,n)=>n===id?t:Reflect.get(e,n),set:(e,n,s)=>("string"==typeof n&&t.add(n.toLowerCase()),Reflect.set(e,n,s))})})(t);this.pluginDriver.setOutputBundle(n,this.outputOptions);try{Ru("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Du("initialize render",2),Ru("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>21)return Ht(Bn(`Hashes cannot be longer than 21 characters, received ${n}. Check the "${t}" option.`));const s=`${Zu}${ht(++e).padStart(n-5,"0")}${Qu}`;return s.length>n?Ht(Bn(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${n}. Check the "${t}" option.`)):s}})(),t=await this.generateChunks(n,e);t.length>1&&(s=this.outputOptions,i=this.inputOptions.onLog,"umd"===s.format||"iife"===s.format?Ht(Pn("output.format",Lt,"UMD and IIFE output formats are not supported for code-splitting builds",s.format)):"string"==typeof s.file?Ht(Pn("output.file",Mt,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option')):s.sourcemapFile?Ht(Pn("output.sourcemapFile",jt,'"output.sourcemapFile" is only supported for single-file builds')):!s.amd.autoId&&s.amd.id&&i(xt,Pn("output.amd.id",Dt,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports(),e.inlineTransitiveImports();Du("generate chunks",2),await jd(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}var s,i;return(e=>{const t=new Set,n=Object.values(e);for(const e of n)"asset"===e.type&&e.needsCodeReference&&t.add(e.fileName);for(const e of n)if("chunk"===e.type)for(const n of e.referencedFiles)t.has(n)&&t.delete(n);for(const n of t)delete e[n]})(n),Ru("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),function(e){for(const[t,n]of Object.entries(e)){if(Yd(t))return Ht(gn(t));if("placeholder"!==n.type){const{fileName:e}=n;if(e!==t&&Yd(e))return Ht(gn(e))}}}(n),Du("generate bundle",2),Du("GENERATE",1),t}async addManualChunks(e){const t=new Map,n=await Promise.all(Object.entries(e).map(async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t,!0)})));for(const{alias:e,entries:s}of n)for(const n of s)Jd(e,n,t);return t}assignManualChunks(e){const t=new Map,n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof zu){const i=e(s.id,n);"string"==typeof i&&Jd(i,s,t)}return t}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{Eu(t.code,{jsx:!1!==this.inputOptions.jsx})}catch(e){this.inputOptions.onLog(xt,hn(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r,onlyExplicitManualChunks:o}=this.outputOptions,a="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),l=function({compact:e,generatedCode:{arrowFunctions:t,constBindings:n,objectShorthand:s,reservedNamesAsProps:i}}){const{_:r,n:o,s:a}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"},l=n?"const":"var",c=(e,{isAsync:t,name:n})=>`${t?"async ":""}function${n?` ${n}`:""}${r}(${e.join(`,${r}`)})${r}`,u=t?(e,{isAsync:t,name:n})=>{const s=1===e.length;return`${n?`${l} ${n}${r}=${r}`:""}${t?`async${s?" ":r}`:""}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:c,d=(e,{functionReturn:n,lineBreakIndent:s,name:i})=>[`${u(e,{isAsync:!1,name:i})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${n?"return ":""}`}`,t?`${i?";":""}${s?`${o}${s.base}`:""}`:`${a}${s?`${o}${s.base}`:r}}`],h=i?e=>ws.test(e):e=>!dt.has(e)&&ws.test(e);return{_:r,cnst:l,getDirectReturnFunction:d,getDirectReturnIifeLeft:(e,n,{needsArrowReturnParens:s,needsWrappedFunction:i})=>{const[r,o]=d(e,{functionReturn:!0,lineBreakIndent:null,name:null});return`${Rd(`${r}${Rd(n,t&&s)}${o}`,t||i)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:c,getObject(e,{lineBreakIndent:t}){const n=t?`${o}${t.base}${t.t}`:r;return`{${e.map(([e,t])=>{if(null===e)return`${n}${t}`;const i=Cs(e);return e===t&&s&&e===i?n+e:`${n}${i}:${r}${t}`}).join(",")}${0===e.length?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:a}}(this.outputOptions),c=function(e){const t=[];for(const n of e.values())n instanceof zu&&n.isEmitted()&&t.push(n);return t}(this.graph.modulesById),u=function(e){if(0===e.length)return"/";if(1===e.length)return ee(e[0]);const t=e.slice(1).reduce((e,t)=>{const n=t.split(/\/+|\\+/);let s;for(s=0;e[s]===n[s]&&s<Math.min(e.length,n.length);s++);return e.slice(0,s)},e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}(function(e,t){const n=[];for(const s of e)(s.info.isEntry||t)&&J(s.id)&&n.push(s.id);return n}(c,r)),d=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof Ns&&s.set(i,new $o(i,t,n));return s}(this.graph.modulesById,this.outputOptions,u),h=s?[{alias:null,modules:c}]:r?c.map(e=>({alias:null,modules:[e]})):bd(this.graph.entryModules,a,n,this.inputOptions.onLog,o),p=new Array(h.length),f=new Map;let m=0;for(const{alias:n,modules:s}of h){Nd(s);const i=new dd(s,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,f,d,this.facadeChunkByModule,this.includedNamespaces,n,t,e,u,l);p[m++]=i}for(const e of p)e.link();s||r||this.checkCircularChunks(p,o);const g=[];for(const e of p)g.push(...e.generateFacades());return[...p,...g]}checkCircularChunks(e,t){const n=new Set,s=new Map,i=(e,i)=>{if(s.has(e)){if(!n.has(e)){const n=[e.getChunkName()],r=[e];let o=i;for(;o!==e&&o;)n.push(o.getChunkName()),r.push(o),o=s.get(o);const a=r.filter(e=>e.isManualChunk).map(e=>e.getChunkName()),l=r.find(e=>!e.isManualChunk)?.getChunkName();n.push(n[0]),n.reverse(),this.inputOptions.onLog(xt,function(e,t,n,s){return{code:"CIRCULAR_CHUNK",ids:e,message:0===t.length?`Circular chunk: ${e.join(" -> ")}.`:`Circular chunk: ${e.join(" -> ")}. ${void 0===n?"Please adjust the manual chunk logic for these chunks.":s?`Please consider disabling the "output.onlyExplicitManualChunks" option, as enabling it causes modules located between the modules included in the manual chunk "${t[0]}" to be extracted into the separate chunk "${n}".`:"Please adjust the manual chunks or the module structure."}`}}(n,a,l,t))}}else s.set(e,i),r(e)},r=e=>{for(const t of e.dependencies)t instanceof dd&&i(t,e);n.add(e)};for(const t of e)s.has(t)||r(t)}}function Jd(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return Ht((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${wt(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}function Yd(e){const t=function(...e){const t=e.filter(Boolean).join("/");if(""===t)return".";const n=q.test(t[0]),s=(n?"/":"")+(ne(t.split(q),n).join("/")||(n?"":"."));return X.test(t)&&!s.endsWith("/")?s+"/":s}(e).replaceAll("\\","/");return".."===t||t.startsWith("../")||"."===t||J(t)}class Zd extends fs{constructor(){super(),this.parent=null,this.variables.set("undefined",new xo)}findVariable(e){let t=this.variables.get(e);return t||(t=new Ui(e),this.variables.set(e,t)),t}}const Qd=(e,t,n=sh)=>{const{onwarn:s,onLog:i}=e,r=eh(n,s);if(i){const e=St[t];return(t,n)=>i(t,th(n),(t,n)=>{if("error"===t)return Ht(nh(n));St[t]>=e&&r(t,nh(n))})}return r},eh=(e,t)=>t?(n,s)=>{n===xt?t(th(s),t=>e(xt,nh(t))):e(n,s)}:e,th=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),nh=e=>"string"==typeof e?{message:e}:"function"==typeof e?nh(e()):e,sh=(e,{message:t})=>{switch(e){case xt:return console.warn(t);case At:return console.debug(t);default:return console.info(t)}};function ih(e,t,n,s,i=/$./){const r=new Set(t),o=Object.keys(e).filter(e=>!(r.has(e)||i.test(e)));o.length>0&&s(xt,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const rh={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:ve,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:ve,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:ve,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},oh={preserve:{factory:null,fragment:null,importSource:null,mode:"preserve"},"preserve-react":{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"preserve"},react:{factory:"React.createElement",fragment:"React.Fragment",importSource:"react",mode:"classic"},"react-jsx":{factory:"React.createElement",importSource:"react",jsxImportSource:"react/jsx-runtime",mode:"automatic"}},ah={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},lh=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};Ht(Pn(`${n}.preset`,s,`valid values are ${Pt(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;Ht(Pn(t,n,`valid values are ${s}${Pt(Object.keys(e))}. You can also supply an object for more fine-grained control`,i))}return(e=>e&&"object"==typeof e?e:{})(i)})(t,n,s,i)(e)},ch=async e=>(await async function(e){do{e=(await Promise.all(e)).flat(1/0)}while(e.some(e=>e?.then));return e}([e])).filter(Boolean);function uh(e,t,n,s,i){return St[e]<St[i]?Rs:(i,r)=>{null!=r&&n(xt,{code:"INVALID_LOG_POSITION",message:`Plugin "${s}" tried to add a file position to a log or warning. This is only supported in the "transform" hook at the moment and will be ignored.`}),(i=nh(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}const dh="at position ",hh="at output position ",ph={delete:()=>!1,get(){},has:()=>!1,set(){}};function fh(e){return e.startsWith(dh)||e.startsWith(hh)?Ht({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):Ht({code:"DUPLICATE_PLUGIN_NAME",message:`The plugin name ${e} is being used twice in the same build. Plugin names must be distinct or provide a cacheKey (please post an issue to the plugin if you are a plugin user).`})}const mh=n;function gh(e,t,n,s){const i=Cc(e),r=!!t&&Object.keys(t).length>0;return"string"==typeof e&&!i.attributes&&r?(zn('The "importerAttributes" option is deprecated. Provide a UniqueModuleId for "importer" instead.',"plugin-development/#this-resolve",!0,s,n),Cc({attributes:t,rawId:e})):i}function yh(e,t,n,s,i,r){const{logLevel:o,onLog:a}=s;let l,c=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(dh)||e.name.startsWith(hh)||r.has(e.name)?c=!1:r.add(e.name)),t)if(c){const n=e.cacheKey||e.name;d=t[n]||(t[n]=Object.create(null)),l={delete:e=>delete d[e],get(e){const t=d[e];if(t)return t[0]=0,t[1]},has(e){const t=d[e];return!!t&&(t[0]=0,!0)},set(e,t){d[e]=[0,t]}}}else u=e.name,l={delete:()=>fh(u),get:()=>fh(u),has:()=>fh(u),set:()=>fh(u)};else l=ph;var u,d;return{addWatchFile(e){n.watchFiles[e]=!0},cache:l,debug:uh(At,"PLUGIN_LOG",a,e.name,o),emitFile:i.emitFile.bind(i),error:t=>Ht(Mn(nh(t),e.name)),fs:s.fs,getFileName:i.getFileName,getModuleIds:()=>n.modulesById.keys(),getModuleInfo:n.getModuleInfo,getWatchFiles:()=>Object.keys(n.watchFiles),info:uh(vt,"PLUGIN_LOG",a,e.name,o),load:e=>n.moduleLoader.preloadModule({...e,...Cc(e.id)}),meta:{rollupVersion:mh,watchMode:n.watchMode},parse:Eu,parseAndWalk:gu,resolve(t,i,{attributes:r,custom:o,importerAttributes:a,isEntry:l,skipSelf:c}=Ee){c??=!0;const{id:u,attributes:d,rawId:h}=i?gh(i,a,e.name,s):Ee;return n.moduleLoader.resolveId(t,u,o,l,r||xe,d||xe,h,c?[{importer:u,plugin:e,source:t}]:null)},setAssetSource:i.setAssetSource,warn:uh(xt,"PLUGIN_WARNING",a,e.name,o)}}async function bh(e,t,n,s,i,r,o,a,l,c,u){const d=await function(e,t,n,s,i,r,o,a,l,c,u){let d=null,h=null;if(i){d=new Set;for(const n of i)e===n.source&&t===n.importer&&d.add(n.plugin);h=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,importerAttributes:a,isEntry:l,skipSelf:c}=Ee)=>{c??=!0;const{id:d,attributes:h,rawId:p}=n?gh(n,a,t.name,u):Ee;return c&&-1!==i.findIndex(n=>n.plugin===t&&n.source===e&&n.importer===d)?Promise.resolve(null):s(e,d,o,l,r||xe,h||xe,p,c?[...i,{importer:d,plugin:t,source:e}]:i)}})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,importerAttributes:l||xe,importerRawId:c,isEntry:o}],h,d)}(e,t,n,s,i,r,o,a,l,c,u);if(null!=d){const[e,t]=d;return"string"==typeof e?{id:e,resolvedBy:t.name}:"object"==typeof e?{...e,resolvedBy:e.resolvedBy||t.name}:e}return void 0===t||J(e)||"."===e[0]?async function(e,t,n){return await Eh(e,t,n)??await Eh(e+".mjs",t,n)??await Eh(e+".js",t,n)}(t?ie(ee(t),e):ie(e),u.preserveSymlinks,u.fs):null}async function Eh(e,t,n){try{const s=await n.lstat(e);if(!t&&s.isSymbolicLink())return await Eh(await n.realpath(e),t,n);if(t&&s.isSymbolicLink()||s.isFile()){const t=Q(e);if((await n.readdir(ee(e))).includes(t))return e}}catch{}}function xh(e){return 65279===e.charCodeAt(0)?xh(e.slice(1)):e}async function vh(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:Pc(e.map);const a=e.code;let l=e.ast;const c=[],u=[];let d=!1;const h=()=>d=!0;let p="",f=e.code;const m=e=>(t,n)=>{t=nh(t),n&&qt(t,n,f,i),t.id=i,t.hook="transform",e(t)};let g;try{g=await n.hookReduceArg0("transform",[f,i,{attributes:t.info.attributes,rawId:t.info.rawId}],function(e,n,i){let o,a;if("string"==typeof n)o=n;else{if(!n||"object"!=typeof n)return e;if(t.updateOptions(n),null==n.code)return(n.map||n.ast)&&s.onLog(xt,function(e){return{code:"NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",message:`The plugin "${e}" returned a "map" or "ast" without returning a "code". This will be ignored.`}}(i.name)),e;n.attributes&&zn('Returning attributes from the "transform" hook is deprecated.',"plugin-development/#transform",!0,s),({code:o,map:a,ast:l}=n)}return null!==a&&r.push(Pc("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),f=o,o},(e,t)=>{return p=t.name,{...e,addWatchFile(t){c.push(t),e.addWatchFile(t)},cache:d?e.cache:(l=e.cache,g=h,{delete:e=>(g(),l.delete(e)),get:e=>(g(),l.get(e)),has:e=>(g(),l.has(e)),set:(e,t)=>(g(),l.set(e,t))}),debug:m(e.debug),emitFile:e=>(u.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&qt(t,n,f,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:Pc({version:3,...Ld(e,t,n,s,_d(i)).traceMappings()})}(i,a,o,r,s.onLog);return e?(o!==e&&(o=e,r.length=0),new P({...e,sourcesContent:e.sourcesContent})):new V(a).generateMap({hires:!0,includeContent:!0,source:i})},info:m(e.info),setAssetSource(){return this.error({code:"INVALID_SETASSETSOURCE",message:"setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook."})},warn:m(e.warn)};var l,g})}catch(e){return Ht(Mn(e,p,{hook:"transform",id:i}))}!d&&u.length>0&&(t.transformFiles=u);const y=l?nu(l):await async function(e,t,n){return Jc(kc(e,t,n))}(g,!1,!1!==s.jsx);return{astBuffer:y,code:g,customTransformCache:d,originalCode:a,originalSourcemap:o,safeVariableNames:null,sourcemapChain:r,transformDependencies:c}}const Ah="resolveDependencies";class Sh{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.sortedEntryModules=[],this.entryModules=new Set,this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.resolveId=async(e,t,n,s,i,r,o,a=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1,{attributes:i,importerAttributes:r,importerRawId:o})&&await bh(e,t,this.pluginDriver,this.resolveId,a,n,"boolean"==typeof s?s:!t,i,r,o,this.options),t,e,i,r,o),i),this.hasModuleSideEffects=n.treeshake?n.treeshake.moduleSideEffects:()=>!0}async addAdditionalModules(e,t){const n=this.extendLoadModulesPromise(Promise.all(e.map(e=>this.loadEntryModule(e,!1,void 0,null,t))));return await this.awaitLoadModulesPromise(),n}async addEntryModules(e,t){const n=await this.extendLoadModulesPromise(Promise.all(e.map(({id:e,importer:t,attributes:n})=>this.loadEntryModule(e,!0,t,null,void 0,n))).then(n=>{let s=!1;for(const[i,r]of n.entries())r.isUserDefinedEntryPoint=r.isUserDefinedEntryPoint||t,$h(r,e[i],t),this.entryModules.has(r)||(this.sortedEntryModules.push(r),this.entryModules.add(r),s=!0);return s&&this.sortedEntryModules.sort((e,t)=>e.id>t.id?1:-1),n}));return await this.awaitLoadModulesPromise(),{entryModules:this.sortedEntryModules,implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r,attributes:o}){const a={attributes:o,fileName:e||null,id:t,importer:n&&Ic(n),name:s||null},l=i?await this.addEntryWithImplicitDependants(a,i):(await this.addEntryModules([a],!1)).newEntryModules[0];return null!=r&&(l.preserveSignature=r),l}async preloadModule(e){return(await this.fetchModule({...this.getResolvedIdWithDefaults(e,xe),rawId:e.rawId},void 0,!1,!e.resolveDependencies||Ah)).info}addEntryWithImplicitDependants(e,t){return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then(async n=>{if($h(n,e,!1),!n.info.isEntry){const s=await Promise.all(t.map(t=>{const s=Cc(t);return this.loadEntryModule(s.id,!1,e.importer,n.id,void 0,s.attributes)}));if(!n.info.isEntry){this.implicitEntryModules.add(n);for(const e of s)n.implicitlyLoadedAfter.add(e);for(const e of n.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(n)}}return n}))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run(async()=>{const t=await this.pluginDriver.hookFirst("load",[e,{attributes:n.info.attributes,rawId:n.info.rawId}]);return null!==t?("object"==typeof t&&t.attributes&&zn('Returning attributes from the "load" hook is deprecated.',"plugin-development/#load",!0,this.options),t):(this.graph.watchFiles[n.info.rawId]=!0,await this.options.fs.readFile(n.info.rawId,{encoding:"utf8"}))})}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${wt(t)})`),s+=`: ${n.message}`,n.message=s,n}const i="string"==typeof s?{code:s}:null!=s&&"object"==typeof s&&"string"==typeof s.code?s:Ht(function(e){return{code:"BAD_LOADER",message:`Error loading "${wt(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e));i.code=xh(i.code);const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===i.code){const e={meta:{...n.info.meta},moduleSideEffects:n.info.moduleSideEffects,syntheticNamedExports:n.info.syntheticNamedExports};if(n.updateOptions(r),!await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:bu(r.astBuffer),attributes:r.attributes,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,rawId:r.rawId,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}])){if(r.transformFiles)for(const e of r.transformFiles)this.pluginDriver.emitFile(e);return void await n.setSource(r)}n.updateOptions(e,{replaceExistingMeta:!0})}n.updateOptions(i),await n.setSource(await vh(i,n,this.pluginDriver,this.options))}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise,await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){return this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]),this.latestLoadModulesPromise.catch(()=>{}),e}async fetchDynamicDependencies(e,t){const n=await Promise.all(t.map(t=>t.then(async([{argument:t,node:n},s])=>null===s?null:"string"==typeof s?(n.resolution=s,null):"source"!==n.phase||s.external?n.resolution=await this.fetchResolvedDependency(wt(s.id),e.id,s):Ht(Cn("string"==typeof t?t:wt(s.id),e.id)))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,rawId:n,meta:s,moduleSideEffects:i,syntheticNamedExports:r},o,a,l){const c=this.modulesById.get(t);if(c instanceof zu)return await this.handleExistingModule(c,a,l),c;if(c instanceof Ns)return Ht({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${c.id} is resolved as a module now, but it was an external module before. Please check whether there are conflicts in your Rollup options "external" and "manualChunks", manualChunks cannot include external modules.`});const u=new zu(this.graph,t,n,this.options,a,i,r,s,e);this.modulesById.set(t,u);const d=this.addModuleSource(t,o,u).then(()=>[this.getResolveStaticDependencyPromises(u),this.getResolveDynamicImportPromises(u),h]),h=Ih(d).then(()=>this.pluginDriver.hookParallel("moduleParsed",[u.info]));h.catch(()=>{}),this.moduleLoadPromises.set(u,d);const p=await d;return l?l===Ah&&await h:await this.fetchModuleDependencies(u,...p),u}async fetchModuleDependencies(e,t,n,s){this.modulesWithLoadedDependencies.has(e)||(this.modulesWithLoadedDependencies.add(e),await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,n)]),e.linkImports(),await s)}fetchResolvedDependency(e,t,n){if(n.external){const{attributes:s,external:i,id:r,rawId:o,moduleSideEffects:a,meta:l}=n;let c=this.modulesById.get(r);if(c){if(!(c instanceof Ns))return Ht(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${wt(t)}", but is already an existing non-external module id.`}}(e,t))}else c=new Ns(this.options,r,o,a,l,"absolute"!==i&&J(r),s),this.modulesById.set(r,c);return Promise.resolve(c)}return this.fetchModule(n,t,!1,!1)}async fetchStaticDependencies(e,t){for(const n of await Promise.all(t.map(t=>t.then(([t,n])=>e.sourcePhaseSources.has(t)&&!n.external?Ht(Cn(t,e.id)):this.fetchResolvedDependency(t,e.id,n)))))e.dependencies.add(n),n.importers.push(e.id);if(!this.options.treeshake||"no-treeshake"===e.info.moduleSideEffects)for(const t of e.dependencies)t instanceof zu&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n,s,i,r){const{makeAbsoluteExternalsRelative:o}=this.options;if(e){if("object"==typeof e){const a=e.external||this.options.external(e.id,t,!0,{attributes:e.attributes||s,importerAttributes:i,importerRawId:r});return{...e,external:a&&("relative"===a||!J(e.id)||!0===a&&wh(e.id,n,o)||"absolute")}}const a=this.options.external(e,t,!0,{attributes:s,importerAttributes:i,importerRawId:r});return{external:a&&(wh(e,n,o)||"absolute"),id:a&&o?Ph(e,t):e}}const a=o?Ph(n,t):n;return!1===e||this.options.external(a,t,!0,{attributes:s,importerAttributes:i,importerRawId:r})?{external:wh(a,n,o)||"absolute",id:a}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map(async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,vu(t.node));return n&&"string"!=typeof n?(t.node.shouldIncludeDynamicAttributes=!!n.external,t.id=n.id,[t,n]):(t.node.shouldIncludeDynamicAttributes=!0,[t,n])})}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributesList).map(([e,t])=>t.map(t=>[e,t])).flat().map(async([t,n])=>{const s=wc(t,n),i=e.resolvedIds[s];if(i)return[t,i];const r=this.toModuleResolvedId(this.handleInvalidResolvedId(await this.resolveId(t,e.id,xe,!1,n,e.info.attributes,e.info.rawId),t,e.id,n));return e.resolvedIds[s]=r,[t,r]})}getResolvedIdWithDefaults(e,t){if(!e)return null;const n=e.external||!1;return{attributes:e.attributes||t,external:n,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!n),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??!1}}async handleExistingModule(e,t,n){const s=this.moduleLoadPromises.get(e);if(n)return n===Ah?Ih(s):s;if(t){e.info.isEntry=!0,this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter)t.implicitlyLoadedBefore.delete(e);e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await s)}handleInvalidResolvedId(e,t,n,s){return null===e?Y(t)?Ht(function(e,t){return{code:ln,exporter:e,id:t,message:`Could not resolve "${e}" from "${wt(t)}"`}}(t,n)):(this.options.onLog(xt,function(e,t){return{code:ln,exporter:e,id:t,message:`"${e}" is imported by "${wt(t)}", but could not be resolved – treating it as an external dependency.`,url:Nt("troubleshooting/#warning-treating-module-as-external-dependency")}}(t,n)),{attributes:s,external:!0,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,!0),resolvedBy:"rollup",syntheticNamedExports:!1}):(e.external&&e.syntheticNamedExports&&this.options.onLog(xt,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${wt(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1,r=xe){const o=s?Ic(s):null,{attributes:a,rawId:l,id:c}=n?Cc(n):Ee,u=await bh(e,c,this.pluginDriver,this.resolveId,null,xe,!0,r,a,l,this.options);if(null==u)return Ht(null===o?function(e){return{code:an,message:`Could not resolve entry module "${wt(e)}".`}}(e):function(e,t){return{code:tn,message:`Module "${wt(e)}" that should be implicitly loaded before "${wt(t)}" could not be resolved.`}}(e,o));const d="object"==typeof u&&u.external;return!1===u||d?Ht(null===o?d&&i?{code:"EXTERNAL_MODULES_CANNOT_BE_INCLUDED_IN_MANUAL_CHUNKS",message:`"${e}" cannot be included in manualChunks because it is resolved as an external module by the "external" option or plugins.`}:function(e){return{code:an,message:`Entry module "${wt(e)}" cannot be external.`}}(e):function(e,t){return{code:tn,message:`Module "${wt(e)}" that should be implicitly loaded before "${wt(t)}" cannot be external.`}}(e,o)):this.fetchModule(this.toModuleResolvedId(this.getResolvedIdWithDefaults("object"==typeof u?u:{id:u},r)),void 0,t,!1)}toModuleResolvedId(e){const{id:t,attributes:n}=e;return{...e,id:wc(t,n),rawId:t}}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s,importerAttributes:e.info.attributes,importerRawId:e.info.rawId}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.toModuleResolvedId(this.getResolvedIdWithDefaults(i,s)):null;if(null==i){const n=wc(t,s),i=e.resolvedIds[n];if(i)return i;const r=this.handleInvalidResolvedId(await this.resolveId(t,e.id,xe,!1,s,e.info.attributes,e.info.rawId),t,e.id,s);return e.resolvedIds[n]=this.toModuleResolvedId(r),e.resolvedIds[n]}return this.toModuleResolvedId(this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t,s,e.info.attributes,e.info.rawId),s),t,n,s))}}function Ph(e,t){return Y(e)?t?ie(t,"..",e):ie(e):e}function $h(e,{fileName:t,name:n},s){null!==t?e.chunkFileNames.add(t):null!==n&&(e.chunkNames.push({isUserDefined:s,name:n}),e.chunkNames.sort((e,t)=>e.name>t.name?1:-1))}function wh(e,t,n){return!0===n||"ifRelativeSource"===n&&Y(t)||!J(e)}async function Ih(e){const[t,n]=await e;return Promise.all([...t,...n])}function Ch(e,t,n,s,i,r,o,a,l){const c=o.sanitizeFileName(e||"asset");return ad(od("function"==typeof o.assetFileNames?o.assetFileNames({get name(){return zn('Accessing the "name" property of emitted assets when generating the file name is deprecated. Use the "names" property instead.',Gt,!1,l),e},names:t,get originalFileName(){return zn('Accessing the "originalFileName" property of emitted assets when generating the file name is deprecated. Use the "originalFileNames" property instead.',Gt,!1,l),s},originalFileNames:i,source:n,type:"asset"}):o.assetFileNames,"output.assetFileNames",{ext:()=>te(c).slice(1),extname:()=>te(c),hash:e=>r.slice(0,Math.min(Math.max(0,e||8),21)),name:()=>c.slice(0,Math.max(0,c.length-te(c).length))}),a)}function kh(e,{bundle:t},n){t[id].has(e.toLowerCase())?n(xt,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=rd}const Nh=new Set(["chunk","asset","prebuilt-chunk"]);function Oh(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return Ht(Bn(`Could not set source for ${"string"==typeof e?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}class Rh{constructor(e,t,n){this.graph=e,this.options=t,this.facadeChunkByModule=null,this.nextIdBase=1,this.output=null,this.outputFileEmitters=[],this.emitFile=e=>function(e){return Boolean(e&&Nh.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!It(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):Ht(Bn(`The "fileName" or "name" properties of emitted chunks and assets must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`)):Ht(Bn(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`)),this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId)if("asset"===t.type&&"string"!=typeof t.fileName)return Ht(cn(t.name||e))},this.getFileName=e=>{const t=this.filesByReferenceId.get(e);return t?"chunk"===t.type?(n=t,s=this.facadeChunkByModule,n.fileName?n.fileName:s?s.get(n.module).getFileName():Ht({code:"CHUNK_NOT_GENERATED",message:`Plugin error - Unable to get file name for emitted chunk "${n.fileName||n.name}". You can only get file names once chunks have been generated after the "renderStart" hook.`})):"prebuilt-chunk"===t.type?t.fileName:function(e,t){return"string"!=typeof e.fileName?Ht({code:"ASSET_NOT_FINALISED",message:`Plugin error - Unable to get file name for asset "${e.name||t}". Ensure that the source is set and that generate is called first. If you reference assets via import.meta.ROLLUP_FILE_URL_<referenceId>, you need to either have set their source after "renderStart" or need to provide an explicit "fileName" when emitting them.`}):e.fileName}(t,e):Ht({code:"FILE_NOT_FOUND",message:`Plugin error - Unable to get file name for unknown file "${e}".`});var n,s},this.setAssetSource=(e,t)=>{const n=this.filesByReferenceId.get(e);if(!n)return Ht({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return Ht(Bn(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return Ht({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=Oh(t,n,e);if(this.output)this.finalizeAdditionalAsset(n,s,this.output);else{n.source=s;for(const e of this.outputFileEmitters)e.finalizeAdditionalAsset(n,s,e.output)}},this.setChunkInformation=e=>{this.facadeChunkByModule=e},this.setOutputBundle=(e,t)=>{const n=zd[t.hashCharacters],s=this.output={bundle:e,fileNamesBySourceHash:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&kh(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())"asset"===e.type&&void 0!==e.source?e.fileName?this.finalizeAdditionalAsset(e,e.source,s):Se(i,n(e.source),$e).push(e):"prebuilt-chunk"===e.type&&(this.output.bundle[e.fileName]=this.createPrebuiltChunk(e));for(const[e,t]of i)this.finalizeAssetsWithSameSource(t,e,s)},this.filesByReferenceId=n?new Map(n.filesByReferenceId):new Map,n?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let n=t;do{n=Bd(n).slice(0,8).replaceAll("-","$")}while(this.filesByReferenceId.has(n)||this.outputFileEmitters.some(({filesByReferenceId:e})=>e.has(n)));e.referenceId=n,this.filesByReferenceId.set(n,e);for(const{filesByReferenceId:t}of this.outputFileEmitters)t.set(n,e);return n}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleAttributes:{},facadeModuleId:null,facadeModuleRawId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:!1,isEntry:!1,isImplicitEntry:!1,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,preliminaryFileName:e.fileName,referencedFiles:[],sourcemapFileName:e.sourcemapFileName||null,type:"chunk"}}emitAsset(e){const t=void 0===e.source?void 0:Oh(e.source,e,null),n=e.originalFileName||null;"string"==typeof n&&(this.graph.watchFiles[n]=!0);const s={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,originalFileName:n,referenceId:"",source:t,type:"asset"},i=this.assignReferenceId(s,e.fileName||e.name||String(this.nextIdBase++));if(this.output)this.emitAssetWithReferenceId(s,this.output);else for(const e of this.outputFileEmitters)e.emitAssetWithReferenceId(s,e.output);return i}emitAssetWithReferenceId(e,t){const{fileName:n,source:s}=e;n&&kh(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>vc.LOAD_AND_PARSE)return Ht({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return Ht(Bn(`Emitted chunks need to have a valid string id, received "${e.id}"`));const t={fileName:e.fileName,module:null,name:e.name||e.id,referenceId:"",type:"chunk"};return this.graph.moduleLoader.emitChunk(e).then(e=>t.module=e).catch(()=>{}),this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if("string"!=typeof e.code)return Ht(Bn(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||It(e.fileName))return Ht(Bn(`The "fileName" property of emitted prebuilt chunks must be strings that are neither absolute nor relative paths, received "${e.fileName}".`));const t={code:e.code,exports:e.exports,fileName:e.fileName,map:e.map,referenceId:"",type:"prebuilt-chunk"},n=this.assignReferenceId(t,t.fileName);return this.output&&(this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)),n}finalizeAdditionalAsset(e,t,{bundle:n,fileNamesBySourceHash:s,getHash:i,outputOptions:r}){let{fileName:o,name:a,needsCodeReference:l,originalFileName:c,referenceId:u}=e;if(!o){const e=i(t);o=s.get(e),o||(o=Ch(a,a?[a]:[],t,c,c?[c]:[],e,r,n,this.options),s.set(e,o))}const d={...e,fileName:o,source:t};this.filesByReferenceId.set(u,d);const h=n[o];if("asset"===h?.type)h.needsCodeReference&&=l,a&&h.names.push(a),c&&h.originalFileNames.push(c);else{const{options:e}=this;n[o]={fileName:o,get name(){return zn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Gt,!1,e),a},names:a?[a]:[],needsCodeReference:l,get originalFileName(){return zn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Gt,!1,e),c},originalFileNames:c?[c]:[],source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySourceHash:s,outputOptions:i}){const{names:r,originalFileNames:o}=function(e){const t=[],n=[];for(const{name:s,originalFileName:i}of e)"string"==typeof s&&t.push(s),i&&n.push(i);return n.sort(),t.sort((e,t)=>e.length-t.length||(e>t?1:e===t?0:-1)),{names:t,originalFileNames:n}}(e);let a,l="",c=!0;for(const s of e){c&&=s.needsCodeReference;const e=Ch(s.name,r,s.source,s.originalFileName,o,t,i,n,this.options);(!l||e.length<l.length||e.length===l.length&&e<l)&&(l=e,a=s)}s.set(t,l);for(const t of e){const e={...t,fileName:l};this.filesByReferenceId.set(t.referenceId,e)}const{options:u}=this;n[l]={fileName:l,get name(){return zn('Accessing the "name" property of emitted assets in the bundle is deprecated. Use the "names" property instead.',Gt,!1,u),a.name},names:r,needsCodeReference:c,get originalFileName(){return zn('Accessing the "originalFileName" property of emitted assets in the bundle is deprecated. Use the "originalFileNames" property instead.',Gt,!1,u),a.originalFileName},originalFileNames:o,source:a.source,type:"asset"}}}function Dh(e){return Array.isArray(e)?e.filter(Boolean):e?[e]:[]}function Mh(e){if(e instanceof RegExp)return t=>{const n=Z(t),s=e.test(n);return e.lastIndex=0,s};const t=process.cwd(),n=function(e,t){return e.startsWith("**")||J(e)?Z(e):Z(ie(t,e))}(e,t),s=ba(n,{dot:!0});return e=>{const t=Z(e);return s(t)}}function _h(e){return e instanceof RegExp?t=>{const n=e.test(t);return e.lastIndex=0,n}:t=>t.includes(e)}function Lh(e,t){if(e||t)return n=>!(e?.some(e=>e(n))||!t?.some(e=>e(n))&&t&&t.length>0)}function Th(e){return"string"==typeof e||e instanceof RegExp?{include:[e]}:Array.isArray(e)?{include:e}:{exclude:e.exclude?Dh(e.exclude):void 0,include:e.include?Dh(e.include):void 0}}function Bh(e){if(!e)return;const{exclude:t,include:n}=Th(e),s=t?.map(Mh),i=n?.map(Mh);return Lh(s,i)}function zh(e,t){if(!e&&!t)return;const n=Bh(e),s=function(e){if(!e)return;const{exclude:t,include:n}=Th(e),s=t?.map(_h),i=n?.map(_h);return Lh(s,i)}(t);return(e,t)=>{let i=!0;return n&&(i&&=n(e)),!!i&&(s&&(i&&=s(t)),i)}}const Fh=Object.keys({buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,onLog:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1});class Vh{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.compiledPluginFilters={idOnlyFilter:new WeakMap,transformFilter:new WeakMap},this.fileEmitter=new Rh(e,t,i&&i.fileEmitter),this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter),this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter),this.finaliseAssets=this.fileEmitter.finaliseAssets.bind(this.fileEmitter),this.setChunkInformation=this.fileEmitter.setChunkInformation.bind(this.fileEmitter),this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter),this.plugins=[...i?i.plugins:[],...n];const r=new Set;if(this.pluginContexts=new Map(this.plugins.map(n=>[n,yh(n,s,e,t,this.fileEmitter,r)])),i)for(const e of n)for(const n of Fh)n in e&&t.onLog(xt,xn(e.name,n))}createOutputPluginDriver(e){return new Vh(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,n,s){return this.hookFirstAndGetPlugin(e,t,n,s).then(e=>e&&e[0])}async hookFirstAndGetPlugin(e,t,n,s){for(const i of this.getSortedPlugins(e)){if(s?.has(i))continue;const r=await this.runHook(e,t,i,n);if(null!=r)return[r,i]}return null}hookFirstSync(e,t,n){for(const s of this.getSortedPlugins(e)){const i=this.runHookSync(e,t,s,n);if(null!=i)return i}return null}async hookParallel(e,t,n){const s=[];for(const i of this.getSortedPlugins(e))i[e].sequential?(await Promise.all(s),s.length=0,await this.runHook(e,t,i,n)):s.push(this.runHook(e,t,i,n));await Promise.all(s)}hookReduceArg0(e,[t,...n],s,i){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e))r=r.then(r=>this.runHook(e,[r,...n],t,i).then(e=>s.call(this.pluginContexts.get(t),r,e,t)));return r}hookReduceArg0Sync(e,[t,...n],s,i){for(const r of this.getSortedPlugins(e)){const o=[t,...n],a=this.runHookSync(e,o,r,i);t=s.call(this.pluginContexts.get(r),t,a,r)}return t}async hookReduceValue(e,t,n,s){const i=[],r=[];for(const t of this.getSortedPlugins(e,Gh))t[e].sequential?(i.push(...await Promise.all(r)),r.length=0,i.push(await this.runHook(e,n,t))):r.push(this.runHook(e,n,t));return i.push(...await Promise.all(r)),i.reduce(s,await t)}hookReduceValueSync(e,t,n,s,i){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,n,t,i);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,n){let s=Promise.resolve();for(const i of this.getSortedPlugins(e))s=s.then(()=>this.runHook(e,t,i,n));return s.then(Hh)}getSortedPlugins(e,t){return Se(this.sortedPlugins,e,()=>jh(e,this.plugins,t))}runHook(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;if("object"==typeof i&&"filter"in i&&i.filter)if("transform"===e){const e=i.filter,n=t,s=Se(this.compiledPluginFilters.transformFilter,e,()=>zh(e.id,e.code));if(s&&!s(n[1],n[0]))return Promise.resolve()}else if("resolveId"===e||"load"===e){const e=i.filter,n=t,s=Se(this.compiledPluginFilters.idOnlyFilter,e,()=>function(e){const t=Bh(e);return t?e=>!!t(e):void 0}(e.id));if(s&&!s(n[0]))return Promise.resolve()}let o=this.pluginContexts.get(n);s&&(o=s(o,n));let a=null;return Promise.resolve().then(()=>{if("function"!=typeof r)return r;const s=r.apply(o,t);return s?.then?(a=[n.name,e,t],this.unfulfilledActions.add(a),Promise.resolve(s).then(e=>(this.unfulfilledActions.delete(a),e))):s}).catch(t=>(null!==a&&this.unfulfilledActions.delete(a),Ht(Mn(t,n.name,{hook:e}))))}runHookSync(e,t,n,s){const i=n[e],r="object"==typeof i?i.handler:i;let o=this.pluginContexts.get(n);s&&(o=s(o,n));try{return r.apply(o,t)}catch(t){return Ht(Mn(t,n.name,{hook:e}))}}}function jh(e,t,n=Uh){const s=[],i=[],r=[];for(const o of t){const t=o[e];if(t){if("object"==typeof t){if(n(t.handler,e,o),"pre"===t.order){s.push(o);continue}if("post"===t.order){r.push(o);continue}}else n(t,e,o);i.push(o)}}return[...s,...i,...r]}function Uh(e,t,n){"function"!=typeof e&&Ht(function(e,t){return{code:Qt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}(t,n.name))}function Gh(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return Ht(function(e,t){return{code:Qt,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a string, a function hook or an object with a "handler" string or function.`,plugin:t}}(t,n.name))}function Hh(){}class Wh{constructor(e){this.maxParallel=e,this.queue=[],this.workerCount=0}run(e){return new Promise((t,n)=>{this.queue.push({reject:n,resolve:t,task:e}),this.work()})}async work(){if(this.workerCount>=this.maxParallel)return;let e;for(this.workerCount++;e=this.queue.shift();){const{reject:t,resolve:n,task:s}=e;try{n(await s())}catch(e){t(e)}}this.workerCount--}}class qh{constructor(e,t){if(this.options=e,this.cachedModules=new Map,this.deoptimizationTracker=new Ge,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.newlyIncludedVariableInits=new Set,this.phase=vc.LOAD_AND_PARSE,this.scope=new Zd,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=Ic(e),n=this.modulesById.get(t);return n?n.info:null},!1!==e.cache){if(e.cache?.modules)for(const t of e.cache.modules)this.cachedModules.set(t.id,t);this.pluginCache=e.cache?.plugins||Object.create(null);for(const e in this.pluginCache){const t=this.pluginCache[e];for(const e of Object.values(t))e[0]++}}t&&(this.watchMode=!0,t({closeWatcher:()=>this.pluginDriver.hookParallel("closeWatcher",[]),watchChange:(...e)=>this.pluginDriver.hookParallel("watchChange",e)})),this.pluginDriver=new Vh(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Sh(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Wh(e.maxParallelFileOps),this.pureFunctions=(({treeshake:e})=>{const t=Object.create(null);for(const n of e?e.manualPureFunctions:[]){let e=t;for(const t of n.split("."))e=e[t]||=Object.create(null);e[bs]=!0}return t})(e)}async build(){Ru("generate module graph",2),await this.generateModuleGraph(),Du("generate module graph",2),Ru("sort and bind modules",2),this.phase=vc.ANALYSE,this.sortAndBindModules(),Du("sort and bind modules",2),Ru("mark included statements",2),this.includeStatements(),Du("mark included statements",2),this.phase=vc.GENERATE}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let n=!0;for(const[e,s]of Object.entries(t))s[0]>=this.options.experimentalCacheExpiry?delete t[e]:n=!1;n&&delete this.pluginCache[e]}return{modules:this.modules.map(e=>e.toJSON()),plugins:this.pluginCache}}async generateModuleGraph(){var e;if(({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules((e=this.options.input,Array.isArray(e)?e.map(e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:void 0,name:null})):Object.entries(e).map(([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:void 0,name:e}))),!0)),0===this.entryModules.length)throw new Error("You must supply options.input to rollup");for(const e of this.modulesById.values())e.cacheInfoGetters(),e instanceof zu?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Os(t);if(this.options.treeshake){let t=1;this.newlyIncludedVariableInits.clear();do{Ru(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)if(e.isExecuted){e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include();for(const e of this.newlyIncludedVariableInits)this.newlyIncludedVariableInits.delete(e),e.include(es(),!1)}if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(),this.needsTreeshakingPass=!0);Du("treeshaking pass "+t++,3)}while(this.needsTreeshakingPass)}else for(const e of this.modules)e.includeAllInBundle();for(const e of this.externalModules)e.warnUnusedImports();for(const e of this.implicitEntryModules)for(const t of e.implicitlyLoadedAfter)t.info.isEntry||t.isIncluded()||Ht(In(t))}sortAndBindModules(){const{orderedModules:e,cyclePaths:t}=Od(this.entryModules);for(const e of t)this.options.onLog(xt,pn(e));this.modules=e;for(const e of this.modules)e.bindReferences();this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules)for(const t of e.importDescriptions.values())if("*"!==t.name&&"source"!==t.phase){const[n,s]=t.module.getVariableForExportName(t.name,{importChain:[e.id]});n||e.log(xt,wn(t.name,e.id,t.module.id,!!s?.missingButExportExists),t.start)}}}function Kh(e,t){return t()}const Xh=n;function Jh(e,t,n,s){e=jh("onLog",e);const i=St[s],r=(s,o,a=Ae)=>{if(Xt(o),!(St[s]<i)){for(const t of e){if(a.has(t))continue;const{onLog:e}=t,l=e=>St[e]<i?Rs:n=>r(e,nh(n),new Set(a).add(t));if(!1===("handler"in e?e.handler:e).call({debug:l(At),error:e=>Ht(nh(e)),info:l(vt),meta:{rollupVersion:Xh,watchMode:n},warn:l(xt)},s,o))return}t(s,o)}};return r}const Yh=e=>()=>Ht(function(e){return{code:"NO_FS_IN_BROWSER",message:`Cannot access the file system (via "${e}") when using the browser build of Rollup. Make sure you supply a plugin with custom resolveId and load hooks to Rollup.`,url:Nt("plugin-development/#a-simple-example")}}(e)),Zh=Yh("fs.appendFile"),Qh=Yh("fs.copyFile"),ep=Yh("fs.mkdir"),tp=Yh("fs.mkdtemp"),np=Yh("fs.readdir"),sp=Yh("fs.readFile"),ip=Yh("fs.realpath"),rp=Yh("fs.rename"),op=Yh("fs.rmdir"),ap=Yh("fs.stat"),lp=Yh("fs.lstat"),cp=Yh("fs.unlink"),up=Yh("fs.writeFile");var dp=Object.freeze({__proto__:null,appendFile:Zh,copyFile:Qh,lstat:lp,mkdir:ep,mkdtemp:tp,readFile:sp,readdir:np,realpath:ip,rename:rp,rmdir:op,stat:ap,unlink:cp,writeFile:up});const hp=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,pp=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>"\0"!==t[0]&&e(t,...n)||!1;if(e){const t=new Set,n=[];for(const s of Dh(e))s instanceof RegExp?n.push(s):t.add(s);return(e,...s)=>t.has(e)||n.some(t=>t.test(e))}return()=>!1},fp=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},mp=e=>{const t=e.jsx;if(!t)return!1;const n=lh(t,oh,"jsx",Rt,"false, "),{factory:s,importSource:i,mode:r}=n;switch(r){case"automatic":return{factory:s||"React.createElement",importSource:i||"react",jsxImportSource:n.jsxImportSource||"react/jsx-runtime",mode:"automatic"};case"preserve":return!i||s||n.fragment||Ht(Pn("jsx",Rt,"when preserving JSX and specifying an importSource, you also need to specify a factory or fragment")),{factory:s||null,fragment:n.fragment||null,importSource:i||null,mode:"preserve"};default:return r&&"classic"!==r&&Ht(Pn("jsx.mode",Rt,'mode must be "automatic", "classic" or "preserve"',r)),{factory:s||"React.createElement",fragment:n.fragment||"React.Fragment",importSource:i||null,mode:"classic"}}},gp=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:1e3},yp=(e,t)=>{const n=e.moduleContext;if("function"==typeof n)return e=>n(e)??t;if(n){const e=Object.create(null);for(const[t,s]of Object.entries(n))e[ie(t)]=s;return n=>e[n]??t}return()=>t},bp=e=>{if(!1===e.treeshake)return!1;const t=lh(e.treeshake,rh,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??ve,moduleSideEffects:Ep(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},Ep=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>"\0"===t[0]||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&Ht(Pn("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},xp=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,vp=/^[a-z]:/i;function Ap(e){const t=vp.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(xp,"_")}const Sp=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return Ht(Pn("output.file",Mt,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return Ht(Pn("output.file",Mt,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},Pp=e=>{const t=e.format;switch(t){case void 0:case"es":case"esm":case"module":return"es";case"cjs":case"commonjs":return"cjs";case"system":case"systemjs":return"system";case"amd":case"iife":case"umd":return t;default:return Ht(Pn("output.format",Lt,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},$p=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?Ht(Pn("output.inlineDynamicImports",Bt,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},wp=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return Ht(Pn("output.inlineDynamicImports",Bt,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return Ht(Pn("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},Ip=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return ie(t)},Cp=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?Ht(Pn("output.amd.id",Dt,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?Ht(Pn("output.amd.basePath","configuration-options/#output-amd-basepath",'this option only works with "output.amd.autoId"')):t.autoId?{autoId:!0,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:!1,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}},kp=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},Np=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?Ht(Pn("output.dir",Mt,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},Op=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function Rp(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return Ht({code:Yt,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Nt(_t)});return n||"auto"}const Dp=(e,t)=>(null!=e.externalImportAssertions&&zn('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",!0,t),e.externalImportAttributes??e.externalImportAssertions??!0),Mp=e=>{const t=lh(e.generatedCode,ah,"output.generatedCode","configuration-options/#output-generatedcode","");return{arrowFunctions:!0===t.arrowFunctions,constBindings:!0===t.constBindings,objectShorthand:!0===t.objectShorthand,reservedNamesAsProps:!1!==t.reservedNamesAsProps,symbols:!0===t.symbols}},_p=(e,t)=>(null!=e.importAttributesKey&&zn('The "output.importAttributesKey" option is deprecated and will be removed in a future version of Rollup. Only use it if you need to support environments that do not understand the "with" keyword.',"configuration-options/#output-importattributeskey",!1,t),e.importAttributesKey??"with"),Lp=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},Tp=new Set(["compat","auto","esModule","default","defaultOnly"]),Bp=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||zp(n=t(s)):s in e?e[s]:zp(e[s]=t(s))}return void 0===t?()=>"default":()=>zp(t)},zp=e=>Tp.has(e)?e:Ht(Pn("output.interop",zt,`use one of ${Array.from(Tp,e=>JSON.stringify(e)).join(", ")}`,e)),Fp=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return Ht(Pn("output.manualChunks",Ft,'this option is not supported for "output.inlineDynamicImports"'));if(n)return Ht(Pn("output.manualChunks",Ft,'this option is not supported for "output.preserveModules"'))}return s||{}},Vp=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),jp=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},Up=e=>{const{sourcemapBaseUrl:t}=e;if(t)return function(e){try{new URL(e)}catch{return!1}return!0}(t)?(n=t).endsWith("/")?n:n+"/":Ht(Pn("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n},Gp=n;function Hp(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Wp(e,t,n,s,i){const{options:r,outputPluginDriver:o,unsetOptions:a}=await async function(e,t,n,s){if(!e)throw new Error("You must supply an options object");const i=await ch(e.plugins);Hp(i,hh);const r=t.createOutputPluginDriver(i);return{...await qp(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Kh(0,async()=>{const n=new Xd(r,a,t,o,i),s=await n.generate(e);if(e){if(Ru("WRITE",1),!r.dir&&!r.file)return Ht({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:Nt(Mt)});await Promise.all(Object.values(s).map(e=>i.fileOperationQueue.run(()=>async function(e,t,{fs:{mkdir:n,writeFile:s}}){const i=ie(t.dir||ee(t.file),e.fileName);return await n(ee(i),{recursive:!0}),s(i,"asset"===e.type?e.source:e.code)}(e,r,t)))),await o.hookParallel("writeBundle",[r,s]),Du("WRITE",1)}return l=s,{output:Object.values(l).filter(e=>Object.keys(e).length>0).sort((e,t)=>Xp(e)-Xp(t))};var l})}function qp(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=Pp(e),o=$p(e,t),a=wp(e,o,t),l=Sp(e,a,t),c=Mp(e),u=Dp(e,t),d={amd:Cp(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:kp(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:Np(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:Op(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:Rp(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:kp(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:_p(e,t),indent:Lp(e,i),inlineDynamicImports:o,interop:Bp(e),intro:kp(e,"intro"),manualChunks:Fp(e,o,a),minifyInternalExports:Vp(e,r,i),name:e.name,noConflict:e.noConflict||!1,onlyExplicitManualChunks:e.onlyExplicitManualChunks??"function"==typeof e.manualChunks,outro:kp(e,"outro"),paths:e.paths||{},plugins:await ch(e.plugins),preserveModules:a,preserveModulesRoot:Ip(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:Ap,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:Up(e),sourcemapDebugIds:e.sourcemapDebugIds||!1,sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:jp(e,s),sourcemapIgnoreList:"function"==typeof e.sourcemapIgnoreList?e.sourcemapIgnoreList:!1===e.sourcemapIgnoreList?()=>!1:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??!0,systemNullSetters:e.systemNullSetters??!0,validate:e.validate||!1,virtualDirname:e.virtualDirname||"_virtual"};return ih(e,Object.keys(d),"output options",t.onLog),{options:d,unsetOptions:s}}(s.hookReduceArg0Sync("outputOptions",[n],(e,t)=>t||e,e=>{const t=()=>e.error({code:"CANNOT_EMIT_FROM_OPTIONS_HOOK",message:'Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.'});return{...e,emitFile:t,setAssetSource:t}}),e,t)}var Kp;function Xp(e){return"asset"===e.type?Kp.ASSET:e.isEntry?Kp.ENTRY_CHUNK:Kp.SECONDARY_CHUNK}Symbol.asyncDispose??=Symbol("Symbol.asyncDispose"),function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(Kp||(Kp={}));const Jp=n;e.VERSION=Jp,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:n,unsetOptions:s}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const n=await async function(e,t){const n=jh("options",await ch(e.plugins)),s=e.logLevel||vt,i=Jh(n,Qd(e,s),t,s);for(const r of n){const{name:n,options:o}=r,a="handler"in o?o.handler:o,l=await a.call({debug:uh(At,"PLUGIN_LOG",i,n,s),error:e=>Ht(Mn(nh(e),n,{hook:"onLog"})),info:uh(vt,"PLUGIN_LOG",i,n,s),meta:{rollupVersion:Gp,watchMode:t},warn:uh(xt,"PLUGIN_WARNING",i,n,s)},e);l&&(e=l)}return e}(e,t),{options:s,unsetOptions:i}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await ch(e.plugins),r=e.logLevel||vt,o=Jh(i,Qd(e,r),t,r),a=e.strictDeprecations||!1,l=gp(e),c={cache:hp(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:pp(e.external),fs:e.fs??dp,input:fp(e),jsx:mp(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:yp(e,s),onLog:o,perf:e.perf||!1,plugins:i,preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveSymlinks:e.preserveSymlinks||!1,shimMissingExports:e.shimMissingExports||!1,strictDeprecations:a,treeshake:bp(e)};return ih(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(n,t);return Hp(s.plugins,dh),{options:s,unsetOptions:i}}(e,null!==t);(function(e){e.perf?(Iu=new Map,Ru=ku,Du=Nu,e.plugins=e.plugins.map(_u)):(Ru=Rs,Du=Rs)})(n),await async function(){await Kc()}();const i=new qh(n,t),r=!1!==e.cache;e.cache&&(n.cache=void 0,e.cache=void 0),Ru("BUILD",1),await Kh(i.pluginDriver,async()=>{try{Ru("initialize",2),await i.pluginDriver.hookParallel("buildStart",[n]),Du("initialize",2),await i.build()}catch(e){const t=Object.keys(i.watchFiles);t.length>0&&(e.watchFiles=t);try{await i.pluginDriver.hookParallel("buildEnd",[e])}catch(t){const n=Wt({...e,message:`There was an error during the build:\n ${e.message}\nAdditionally, handling the error in the 'buildEnd' hook caused the following error:\n ${t.message}`});throw await i.pluginDriver.hookParallel("closeBundle",[n]).catch(()=>{}),n}throw await i.pluginDriver.hookParallel("closeBundle",[e]).catch(()=>{}),e}try{await i.pluginDriver.hookParallel("buildEnd",[])}catch(e){throw await i.pluginDriver.hookParallel("closeBundle",[e]).catch(()=>{}),e}}),Du("BUILD",1);const o={get cache(){return r?i.getCache():void 0},async close(){o.closed||(o.closed=!0,await i.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,async[Symbol.asyncDispose](){await this.close()},generate:async e=>o.closed?Ht({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Wp(!1,n,s,e,i),get watchFiles(){return Object.keys(i.watchFiles)},write:async e=>o.closed?Ht({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Wp(!0,n,s,e,i)};return n.perf&&(o.getTimings=Ou),o}(e,null)}},"object"==typeof exports&&"undefined"!=typeof module?t(exports):"function"==typeof define&&define.amd?define(["exports"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).rollup={});
|
|
11
11
|
//# sourceMappingURL=rollup.browser.js.map
|