@rollup/browser 4.22.2 → 4.22.3-0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/rollup.browser.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
/*
|
|
2
2
|
@license
|
|
3
|
-
Rollup.js v4.22.
|
|
4
|
-
Fri, 20 Sep 2024
|
|
3
|
+
Rollup.js v4.22.3-0
|
|
4
|
+
Fri, 20 Sep 2024 14:47:28 GMT - commit 9e04b4849db9134473b84e4b94aa353ae4fd8754
|
|
5
5
|
|
|
6
6
|
https://github.com/rollup/rollup
|
|
7
7
|
|
|
8
8
|
Released under the MIT License.
|
|
9
9
|
*/
|
|
10
|
-
!function(e,t){"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={})}(this,(function(e){var t="undefined"!=typeof document?document.currentScript:null,n="4.22.2",s=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});!function(e,t){!function(e){const t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<s.length;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}function o(e,t){let n=0,s=0,i=0;do{const t=e.next();i=r[t],n|=(31&i)<<s,s+=5}while(32&i);const o=1&n;return n>>>=1,o&&(n=-2147483648|-n),t+n}function a(e,t,n){let s=t-n;s=s<0?-s<<1|1:s<<1;do{let t=31&s;s>>>=5,s>0&&(t|=32),e.write(i[t])}while(s>0);return t}function l(e,n){return!(e.pos>=n)&&e.peek()!==t}const c=16384,u="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}};class d{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(c)}write(e){const{buffer:t}=this;t[this.pos++]=e,this.pos===c&&(this.out+=u.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+u.decode(e.subarray(0,n)):t}}class h{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}}const p=[];function f(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0;for(;n.pos<t;n.pos++){r=o(n,r);const e=o(n,0);if(!l(n,t)){const t=i.pop();t[2]=r,t[3]=e;continue}const a=o(n,0),c=1&o(n,0)?[r,e,0,0,a,o(n,0)]:[r,e,0,0,a];let u=p;if(l(n,t)){u=[];do{const e=o(n,0);u.push(e)}while(l(n,t))}c.vars=u,s.push(c),i.push(c)}return s}function m(e){const t=new d;for(let n=0;n<e.length;)n=g(e,n,t,[0]);return t.flush()}function g(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:u,4:d,vars:h}=r;n>0&&s.write(t),i[0]=a(s,o,i[0]),a(s,l,0),a(s,d,0),a(s,6===r.length?1:0,0),6===r.length&&a(s,r[5],0);for(const e of h)a(s,e,0);for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=u)break;n=g(e,n,s,i)}return s.write(t),i[0]=a(s,c,i[0]),a(s,u,0),n}function y(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0,a=0,c=0,u=0,d=0,f=0,m=0,g=0;do{const e=n.indexOf(";");let t=0;for(;n.pos<e;n.pos++){if(t=o(n,t),!l(n,e)){const e=i.pop();e[2]=r,e[3]=t;continue}const h=o(n,0),y=2&h,b=4&h;let E,x=null,$=p;if(1&h){const e=o(n,a);c=o(n,a===e?c:0),a=e,E=[r,t,0,0,e,c]}else E=[r,t,0,0];if(E.isScope=!!b,y){const e=u,t=d;u=o(n,u);const s=e===u;d=o(n,s?d:0),f=o(n,s&&t===d?f:0),x=[u,d,f]}if(E.callsite=x,l(n,e)){$=[];do{m=r,g=t;const e=o(n,0);let s;if(e<-1){s=[[o(n,0)]];for(let t=-1;t>e;t--){const e=m;m=o(n,m),g=o(n,m===e?g:0);const t=o(n,0);s.push([t,m,g])}}else s=[[e]];$.push(s)}while(l(n,e))}E.bindings=$,s.push(E),i.push(E)}r++,n.pos=e+1}while(n.pos<t);return s}function b(e){if(0===e.length)return"";const t=new d;for(let n=0;n<e.length;)n=E(e,n,t,[0,0,0,0,0,0,0]);return t.flush()}function E(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:u,isScope:d,callsite:h,bindings:p}=r;if(i[0]<o?(x(s,i[0],o),i[0]=o,i[1]=0):n>0&&s.write(t),i[1]=a(s,r[1],i[1]),a(s,(6===r.length?1:0)|(h?2:0)|(d?4:0),0),6===r.length){const{4:e,5:t}=r;e!==i[2]&&(i[3]=0),i[2]=a(s,e,i[2]),i[3]=a(s,t,i[3])}if(h){const{0:e,1:t,2:n}=r.callsite;e!==i[4]?(i[5]=0,i[6]=0):t!==i[5]&&(i[6]=0),i[4]=a(s,e,i[4]),i[5]=a(s,t,i[5]),i[6]=a(s,n,i[6])}if(p)for(const e of p){e.length>1&&a(s,-e.length,0),a(s,e[0][0],0);let t=o,n=l;for(let i=1;i<e.length;i++){const r=e[i];t=a(s,r[1],t),n=a(s,r[2],n),a(s,r[0],0)}}for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=u)break;n=E(e,n,s,i)}return i[0]<c?(x(s,i[0],c),i[0]=c,i[1]=0):s.write(t),i[1]=a(s,u,i[1]),n}function x(e,t,s){do{e.write(n)}while(++t<s)}function $(e){const{length:t}=e,n=new h(e),s=[];let i=0,r=0,a=0,c=0,u=0;do{const e=n.indexOf(";"),t=[];let d=!0,h=0;for(i=0;n.pos<e;){let s;i=o(n,i),i<h&&(d=!1),h=i,l(n,e)?(r=o(n,r),a=o(n,a),c=o(n,c),l(n,e)?(u=o(n,u),s=[i,r,a,c,u]):s=[i,r,a,c]):s=[i],t.push(s),n.pos++}d||A(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}function A(e){e.sort(S)}function S(e,t){return e[0]-t[0]}function w(e){const s=new d;let i=0,r=0,o=0,l=0;for(let c=0;c<e.length;c++){const u=e[c];if(c>0&&s.write(n),0===u.length)continue;let d=0;for(let e=0;e<u.length;e++){const n=u[e];e>0&&s.write(t),d=a(s,n[0],d),1!==n.length&&(i=a(s,n[1],i),r=a(s,n[2],r),o=a(s,n[3],o),4!==n.length&&(l=a(s,n[4],l)))}}return s.flush()}e.decode=$,e.decodeGeneratedRanges=y,e.decodeOriginalScopes=f,e.encode=w,e.encodeGeneratedRanges=b,e.encodeOriginalScopes=m,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,s.exports);var i=s.exports;class r{constructor(e){this.bits=e instanceof r?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let o=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){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;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),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.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!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,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function a(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const l=a();class c{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=i.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+l(this.toString())}}function u(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 d=Object.prototype.toString;function h(e){return"[object Object]"===d.call(e)}function p(e){const t=e.split("\n"),n=[];for(let e=0,s=0;e<t.length;e++)n.push(s),s+=t[e].length+1;return function(e){let t=0,s=n.length;for(;t<s;){const i=t+s>>1;e<n[i]?s=i:t=i+1}const i=t-1;return{line:i,column:e-n[i]}}}const f=/\w/;class m{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}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.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,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))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){let r=t.start,o=!0,a=!1;for(;r<t.end;){if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?f.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}"\n"===n[r]?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0):(s.column+=1,this.generatedCodeColumn+=1,o=!1),r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const g="\n",y={insertLeft:!1,insertRight:!1,storeName:!1};class b{constructor(e,t={}){const n=new o(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:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new r},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this}clone(){const e=new b(this.original,{filename:this.filename});let t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;const s=t.next,i=s&&s.clone();i&&(n.next=i,i.previous=n,n=i),t=s}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new r(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new m(e.hires),s=p(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext((e=>{const i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?t.indexOf(e.original):-1):n.addUneditedChunk(0,e,this.original,i,this.sourcemapLocations),e.outro.length&&n.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?u(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new c(this.generateDecodedMap(e))}_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 new Array(i+1).join(" ")}(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(h(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];t<e[1];t+=1)s[t]=!0}))}let i=!1!==t.indentStart;const r=t=>i?`${e}${t}`:(i=!0,t);this.intro=this.intro.replace(n,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)s[o]||(a.content=a.content.replace(n,r),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<t;){if(!s[o]){const t=this.original[o];"\n"===t?i=!0:"\r"!==t&&i&&(i=!1,o===a.start||(this._splitChunk(a,o),a=a.next),a.prependRight(e))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,r),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return y.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),y.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return y.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),y.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(n>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const s=this.byStart[e],i=this.byEnd[t],r=s.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=s),a&&(a.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=l,i.next=a||null,l||(this.firstChunk=s),a||(this.lastChunk=i),this}overwrite(e,t,n,s){return s=s||{},this.update(e,t,n,{...s,overwrite:!s.contentOnly})}update(e,t,n,s){if("string"!=typeof n)throw new TypeError("replacement content must be a string");if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===s&&(y.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),y.storeName=!0),s={storeName:!0});const i=void 0!==s&&s.storeName,r=void 0!==s&&s.overwrite;if(i){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],l=this.byEnd[t];if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(n,i,!r)}else{const s=new o(e,t,"").edit(n,i);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this}reset(e,t){if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let n=this.byStart[e];for(;n;)n.reset(),n=t>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{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]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(g);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(g),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(g),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(g),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(g),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<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)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=s;for(;s;){!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 Error(`Cannot use replaced 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[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const n=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=p(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[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(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(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[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);return!1}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[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,n)=>{if("$"===n)return"$";if("&"===n)return e[0];return+n<e.length?e[+n]:`$${n}`})):t(...e,e.index,n,e.groups)}if(e.global){(function(e,t){let n;const s=[];for(;n=e.exec(t);)s.push(n);return s})(e,this.original).forEach((e=>{if(null!=e.index){const t=n(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}}))}else{const t=this.original.match(e);if(t&&null!=t.index){const e=n(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&this.overwrite(s,s+e.length,t),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;for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){n.slice(i,i+s)!==t&&this.overwrite(i,i+s,t)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const E=Object.prototype.hasOwnProperty;let x=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 b)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!h(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{E.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(E.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}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 b(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(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let n;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const s=new m(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach(((e,i)=>{i>0&&s.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=p(o.original);o.intro&&s.advance(o.intro),o.firstChunk.eachNext((n=>{const i=a(n.start);n.intro.length&&s.advance(n.intro),e.filename?n.edited?s.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):s.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):s.advance(n.content),n.outro.length&&s.advance(n.outro)})),o.outro&&s.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?u(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:s.raw,x_google_ignoreList:n}}generateMap(e){return new c(this.generateDecodedMap(e))}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[t]-e[n]))[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=>!e.content.isEmpty()))}length(){return this.sources.reduce(((e,t)=>e+t.content.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){let t,n=0;do{if(t=this.sources[n++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let n,s=this.sources.length-1;do{if(n=this.sources[s--],!n){this.intro=this.intro.replace(t,"");break}}while(!n.content.trimEndAborted(e));return this}};const $=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,A=/^\.?\.\//,S=/\\/g,w=/[/\\]/,v=/\.[^.]+$/;function P(e){return $.test(e)}function I(e){return A.test(e)}function k(e){return e.replace(S,"/")}function N(e){return e.split(w).pop()||""}function C(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function D(e){const t=v.exec(N(e));return t?t[0]:""}function O(e,t){const n=e.split(w).filter(Boolean),s=t.split(w).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 R(...e){const t=e.shift();if(!t)return"/";let n=t.split(w);for(const t of e)if(P(t))n=t.split(w);else{const e=t.split(w);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}const M=/[\n\r'\\\u2028\u2029]/,_=/([\n\r'\u2028\u2029])/g,L=/\\/g;function B(e){return M.test(e)?e.replace(L,"\\\\").replace(_,"\\$1"):e}function T(e){const t=N(e);return t.slice(0,Math.max(0,t.length-D(e).length))}function z(e){return P(e)?O(R(),e):e}function V(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||P(e)}const F=/^(\.\.\/)*\.\.$/;function j(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=k(O(C(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+N(t);if(F.test(i))return[...i.split("/"),"..",N(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}class U{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}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?k(O(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=function(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(n.length>0)return t(n,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return B(this.renormalizeRenderPath?j(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function G(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function W(){return new Set}function q(){return[]}const H=Symbol("Unknown Key"),K=Symbol("Unknown Non-Accessor Key"),Y=Symbol("Unknown Integer"),J=Symbol("Symbol.toStringTag"),X=[],Z=[H],Q=[K],ee=[Y],te=Symbol("Entities");class ne{constructor(){this.entityPaths=Object.create(null,{[te]:{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]=t[n]||Object.create(null,{[te]:{value:new Set}});return t[te]}}const se=new ne;class ie{constructor(){this.entityPaths=Object.create(null,{[te]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]=s[t]||Object.create(null,{[te]:{value:new Map}});const i=G(s[te],t,W);return!!i.has(n)||(i.add(n),!1)}}function re(e,t){return!!(e&t)}function oe(e,t,n){return e&~t|-n&t}const ae=Symbol("Unknown Value"),le=Symbol("Unknown Truthy Value");class ce{constructor(){this.flags=0}get included(){return re(this.flags,1)}set included(e){this.flags=oe(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){he(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return ae}getReturnExpressionWhenCalledAtPath(e,t,n,s){return de}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included=!0}includeCallArguments(e,t){for(const n of t)n.include(e,!1)}shouldBeIncluded(e){return!0}}const ue=new class extends ce{},de=[ue,!1],he=e=>{for(const t of e.args)t?.deoptimizePath(Z)},pe={args:[null],type:0},fe={args:[null,ue],type:1},me={args:[null],type:2,withNew:!1},ge="ArrowFunctionExpression",ye="CallExpression",be="ExportDefaultDeclaration",Ee="ExpressionStatement",xe="Identifier",$e="Program";class Ae extends ce{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=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===ye&&e.parent.callee===e||e.parent.type===be||(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(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}include(){this.included=!0,this.renderedLikeHoisted?.include()}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class Se extends Ae{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}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)}include(){super.include(),this.module.used=!0}}const we=Object.freeze(Object.create(null)),ve=Object.freeze({}),Pe=Object.freeze([]),Ie=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function ke(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 Ne=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"]),Ce=/[^\w$]/g,De=e=>(e=>/\d/.test(e[0]))(e)||Ne.has(e)||"arguments"===e;function Oe(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(Ce,"_"),De(e)&&(e=`_${e}`),e||"_"}const Re=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Me=/^(?:0|[1-9]\d*)$/;function _e(e){return Re.test(e)?"__proto__"===e?'["__proto__"]':e:Me.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function Le(e){return Re.test(e)?e:JSON.stringify(e)}const Be="silent",Te="warn",ze="info",Ve="debug",Fe={[Ve]:0,[ze]:1,[Be]:3,[Te]:2};function je(e,t){return e.start<=t&&t<e.end}function Ue(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(je(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 Ge(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const We="...";function qe(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(Ge(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=Ge(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${We}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+Ge(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}function He(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 Ke(e){return`https://rollupjs.org/${e}`}const Ye="troubleshooting/#error-name-is-not-exported-by-module",Je="configuration-options/#output-amd-id",Xe="configuration-options/#output-dir",Ze="configuration-options/#output-exports",Qe="configuration-options/#output-format",et="configuration-options/#output-inlinedynamicimports",tt="configuration-options/#output-interop",nt="configuration-options/#output-manualchunks",st="configuration-options/#output-name",it="configuration-options/#output-sourcemapfile";function rt(e){throw e instanceof Error?e:ot(e)}function ot(e){ct(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function at(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=Ue(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=qe(n,t,s)}}const lt=Symbol("augmented");function ct(e){if(!e.plugin&&!e.loc||e[lt])return;e[lt]=!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+=`${z(n)}${s}: `}const s=e.message;e.message=t+e.message,Nt(e,s)}const ut="INVALID_EXPORT_OPTION",dt="INVALID_IMPORT_ATTRIBUTE",ht="INVALID_PLUGIN_HOOK",pt="MISSING_EXPORT",ft="MISSING_IMPLICIT_DEPENDANT",mt="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",gt="PARSE_ERROR",yt="SOURCEMAP_BROKEN",bt="UNEXPECTED_NAMED_IMPORT",Et="UNRESOLVED_ENTRY",xt="UNRESOLVED_IMPORT";function $t(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function At({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return at(i,n,t,e),i}function St(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(z).join(" -> ")}`}}function wt(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${z(t)} is at (${n}:${s})\n${qe(e,n,s)}`}}function vt(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${z(t)}".`}}function Pt(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${z(s)}" tried to import "${z(n)}" with ${It(t)} attributes, but it was already imported elsewhere with ${It(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const It=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function kt(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${z(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:Ke("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Nt(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function Ct(e,t,n){return{code:ut,message:`"${e}" was specified for "output.exports", but entry module "${z(n)}" has the following exports: ${He(t)}`,url:Ke(Ze)}}function Dt(e){return{code:dt,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${z(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function Ot(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:Ke(t)}}function Rt(e,t,n){const s=".json"===D(n);return{binding:e,code:pt,exporter:n,id:t,message:`"${e}" is not exported by "${z(n)}", imported by "${z(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:Ke(Ye)}}function Mt(e){const t=[...e.implicitlyLoadedBefore].map((e=>z(e.id))).sort();return{code:ft,message:`Module "${z(e.id)}" that should be implicitly loaded before ${He(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 _t(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function Lt(e,t){return{code:gt,message:e,pos:t}}function Bt(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function Tt(e){return{code:"RESERVED_NAMESPACE",message:`You have overided reserved namespace "${e}"`}}function zt(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)"),Nt({cause:e,code:gt,id:t,message:n,stack:e.stack},e.message)}function Vt(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 Ft(e){return{code:yt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function jt(e,t,n){const s=n?"reexport":"import";return{code:bt,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${z(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:Ke(tt)}}function Ut(e){return{code:bt,exporter:e,message:`There was a namespace "*" reexport from the external module "${z(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:Ke(tt)}}function Gt(e){return{code:"VALIDATION_ERROR",message:e}}function Wt(e,t,n,s,i){!function(e,t,n,s,i){{const n=function(e,t){return{code:"DEPRECATED_FEATURE",message:e,url:Ke(t)}}(e,t);if(i)return rt(n);s(Te,n)}}(e,t,0,s.onLog,s.strictDeprecations)}class qt{constructor(e,t,n,s,i,r){this.options=e,this.id=t,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Oe(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:Pe,dynamicallyImportedIds:Pe,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:Pe,implicitlyLoadedBefore:Pe,importedIdResolutions:Pe,importedIds:Pe,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){ke(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new Se(this,e);return this.declarations.set(e,n),this.exportedVariables.set(n,e),[n]}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)for(const e of this.declarations.get(n).module.importers)t.add(e);const n=[...t];var s,i,r;this.options.onLog(Te,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${He(i=e,["is","are"])} imported from external module "${s}" but never used in ${He(r.map((e=>z(e))))}.`,names:i})}}const Ht={ArrayPattern(e,t){for(const n of t.elements)n&&Ht[n.type](e,n)},AssignmentPattern(e,t){Ht[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?Ht.RestElement(e,n):Ht[n.value.type](e,n.value)},RestElement(e,t){Ht[t.argument.type](e,t.argument)}},Kt=function(e){const t=[];return Ht[e.type](t,e),t};let Yt;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("");const Jt=new Array(128).fill(void 0);function Xt(e){return Jt[e]}Jt.push(void 0,null,!0,!1);let Zt=Jt.length;function Qt(e){const t=Xt(e);return function(e){e<132||(Jt[e]=Zt,Zt=e)}(e),t}const en="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&en.decode();let tn=null;function nn(){return null!==tn&&0!==tn.byteLength||(tn=new Uint8Array(Yt.memory.buffer)),tn}function sn(e,t){return e>>>=0,en.decode(nn().subarray(e,e+t))}function rn(e){Zt===Jt.length&&Jt.push(Jt.length+1);const t=Zt;return Zt=Jt[t],Jt[t]=e,t}let on=0;const an="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},ln="function"==typeof an.encodeInto?function(e,t){return an.encodeInto(e,t)}:function(e,t){const n=an.encode(e);return t.set(n),{read:e.length,written:n.length}};let cn=null;function un(){return(null===cn||!0===cn.buffer.detached||void 0===cn.buffer.detached&&cn.buffer!==Yt.memory.buffer)&&(cn=new DataView(Yt.memory.buffer)),cn}function dn(e,t){try{const a=Yt.__wbindgen_add_to_stack_pointer(-16),l=function(e,t,n){if(void 0===n){const n=an.encode(e),s=t(n.length,1)>>>0;return nn().subarray(s,s+n.length).set(n),on=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=nn();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=nn().subarray(i+o,i+s);o+=ln(e,t).written,i=n(i,s,o,1)>>>0}return on=o,i}(e,Yt.__wbindgen_export_0,Yt.__wbindgen_export_1),c=on;Yt.parse(a,l,c,t);var n=un().getInt32(a+0,!0),s=un().getInt32(a+4,!0),i=(r=n,o=s,r>>>=0,nn().subarray(r/1,r/1+o)).slice();return Yt.__wbindgen_export_2(n,1*s,1),i}finally{Yt.__wbindgen_add_to_stack_pointer(16)}var r,o}function hn(e,t){try{return e.apply(this,t)}catch(e){Yt.__wbindgen_export_3(rn(e))}}function pn(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){Qt(e)},e.wbg.__wbindgen_is_object=function(e){const t=Xt(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_crypto_1d1f22824a6a080c=function(e){return rn(Xt(e).crypto)},e.wbg.__wbg_process_4a72847cc503995b=function(e){return rn(Xt(e).process)},e.wbg.__wbg_versions_f686565e586dd935=function(e){return rn(Xt(e).versions)},e.wbg.__wbg_node_104a2ff8d6ea03a2=function(e){return rn(Xt(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof Xt(e)},e.wbg.__wbg_require_cca90b1a94a0255b=function(){return hn((function(){return rn(module.require)}),arguments)},e.wbg.__wbindgen_string_new=function(e,t){return rn(sn(e,t))},e.wbg.__wbg_msCrypto_eb05e62b530a1508=function(e){return rn(Xt(e).msCrypto)},e.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return hn((function(e,t){Xt(e).randomFillSync(Qt(t))}),arguments)},e.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return hn((function(e,t){Xt(e).getRandomValues(Xt(t))}),arguments)},e.wbg.__wbg_newnoargs_76313bd6ff35d0f2=function(e,t){return rn(new Function(sn(e,t)))},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof Xt(e)},e.wbg.__wbg_self_3093d5d1f7bcb682=function(){return hn((function(){return rn(self.self)}),arguments)},e.wbg.__wbg_window_3bcfc4d31bc012f8=function(){return hn((function(){return rn(window.window)}),arguments)},e.wbg.__wbg_globalThis_86b222e13bdf32ed=function(){return hn((function(){return rn(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_e5a3fe56f8be9485=function(){return hn((function(){return rn(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===Xt(e)},e.wbg.__wbg_call_1084a111329e68ce=function(){return hn((function(e,t){return rn(Xt(e).call(Xt(t)))}),arguments)},e.wbg.__wbg_call_89af060b4e1523f2=function(){return hn((function(e,t,n){return rn(Xt(e).call(Xt(t),Xt(n)))}),arguments)},e.wbg.__wbg_buffer_b7b08af79b0b0974=function(e){return rn(Xt(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9=function(e,t,n){return rn(new Uint8Array(Xt(e),t>>>0,n>>>0))},e.wbg.__wbg_new_ea1883e1e5e86686=function(e){return rn(new Uint8Array(Xt(e)))},e.wbg.__wbg_newwithlength_ec548f448387c968=function(e){return rn(new Uint8Array(e>>>0))},e.wbg.__wbg_subarray_7c2e3576afe181d1=function(e,t,n){return rn(Xt(e).subarray(t>>>0,n>>>0))},e.wbg.__wbg_length_8339fcf5d8ecd12e=function(e){return Xt(e).length},e.wbg.__wbg_set_d1e79e2388520f18=function(e,t,n){Xt(e).set(Xt(t),n>>>0)},e.wbg.__wbindgen_object_clone_ref=function(e){return rn(Xt(e))},e.wbg.__wbindgen_throw=function(e,t){throw new Error(sn(e,t))},e.wbg.__wbindgen_memory=function(){return rn(Yt.memory)},e}async function fn(e){if(void 0!==Yt)return Yt;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&&t.src||new URL("rollup.browser.js",document.baseURI).href));const n=pn();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s,module:i}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("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,t){return Yt=e.exports,fn.__wbindgen_wasm_module=t,cn=null,tn=null,Yt}(s,i)}var mn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const gn="_rollupAnnotations",yn="_rollupRemoved",bn=(e,t)=>{if(0===e)return Pe;const n=t[e++],s=[];for(let i=0;i<n;i++)s.push(En(t[e++],t));return s},En=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:mn[t[e]]}};const xn=[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:An(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:An(t[e+2],t)}},function(e,t){const n=t[e+2],s=bn(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?{[gn]:s}:{},params:An(t[e+4],t),body:$n(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:mn[t[e+2]],left:$n(t[e+3],t),right:$n(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:$n(t[e+2],t),right:$n(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:$n(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:mn[t[e+2]],left:$n(t[e+3],t),right:$n(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:An(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:$n(n,t)}},function(e,t){const n=t[e+2],s=bn(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[gn]:s}:{},callee:$n(t[e+4],t),arguments:An(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:$n(n,t),body:$n(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:$n(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:An(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:An(t[e+2],t),id:0===n?null:$n(n,t),superClass:0===s?null:$n(s,t),body:$n(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:An(t[e+2],t),id:0===n?null:$n(n,t),superClass:0===s?null:$n(s,t),body:$n(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:$n(t[e+2],t),consequent:$n(t[e+3],t),alternate:$n(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:$n(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:$n(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:$n(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:$n(t[e+2],t),test:$n(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:$n(n,t),source:$n(t[e+3],t),attributes:An(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:$n(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:An(t[e+2],t),source:0===n?null:$n(n,t),attributes:An(t[e+4],t),declaration:0===s?null:$n(s,t)}},function(e,t){const n=$n(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:$n(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:$n(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:$n(t[e+2],t),right:$n(t[e+3],t),body:$n(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:$n(t[e+3],t),right:$n(t[e+4],t),body:$n(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:$n(n,t),test:0===s?null:$n(s,t),update:0===i?null:$n(i,t),body:$n(t[e+5],t)}},function(e,t){const n=t[e+2],s=bn(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?{[gn]:s}:{},id:0===i?null:$n(i,t),params:An(t[e+5],t),body:$n(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=bn(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?{[gn]:s}:{},id:0===i?null:$n(i,t),params:An(t[e+5],t),body:$n(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:$n(t[e+2],t),consequent:$n(t[e+3],t),alternate:0===n?null:$n(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:$n(t[e+2],t),value:$n(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:An(t[e+2],t),source:$n(t[e+3],t),attributes:An(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:$n(t[e+2],t)}},function(e,t){const n=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:$n(t[e+2],t),options:0===n?null:$n(n,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:$n(t[e+2],t)}},function(e,t){const n=t[e+2],s=$n(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:$n(n,t),local:s}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:$n(t[e+2],t),body:$n(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:mn[t[e+2]],left:$n(t[e+3],t),right:$n(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:$n(t[e+3],t),property:$n(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:$n(t[e+2],t),property:$n(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:An(t[e+3],t),key:$n(t[e+4],t),value:$n(t[e+5],t),kind:mn[t[e+6]]}},function(e,t){const n=bn(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[gn]:n}:{},callee:$n(t[e+3],t),arguments:An(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:An(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:An(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=bn(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:An(t[e+2],t),...n.length>0?{[yn]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=$n(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}:$n(s,t),value:i,kind:mn[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:An(t[e+3],t),key:$n(t[e+4],t),value:0===s?null:$n(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:$n(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:$n(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:An(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:$n(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:An(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:$n(n,t),consequent:An(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:$n(t[e+2],t),cases:An(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:$n(t[e+2],t),quasi:$n(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:An(t[e+2],t),expressions:An(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:$n(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:$n(t[e+2],t),handler:0===n?null:$n(n,t),finalizer:0===s?null:$n(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:mn[t[e+2]],argument:$n(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:mn[t[e+3]],argument:$n(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:mn[t[e+2]],declarations:An(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:$n(t[e+2],t),init:0===n?null:$n(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:$n(t[e+2],t),body:$n(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:$n(s,t)}}];function $n(e,t){const n=t[e],s=xn[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function An(e,t){if(0===e)return Pe;const n=t[e++],s=[];for(let i=0;i<n;i++){const n=t[e++];s.push(n?$n(n,t):null)}return s}function Sn(e){const t=new Uint32Array(e.buffer);let n;if("undefined"!=typeof Buffer&&e instanceof Buffer)n=n=>{const s=t[n++],i=n<<2;return e.toString("utf8",i,i+s)};else{const s=new TextDecoder;n=n=>{const i=t[n++],r=n<<2;return s.decode(e.subarray(r,r+i))}}return Object.assign(t,{convertString:n})}function wn(e,t=null){return Object.create(t,e)}const vn=new class extends ce{getLiteralValueAtPath(){}},Pn={value:{hasEffectsWhenCalled:null,returns:ue}},In=new class extends ce{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Vn(_n,e[0]):de}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||zn(_n,e[0],t,n)}},kn={value:{hasEffectsWhenCalled:null,returns:In}},Nn=new class extends ce{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Vn(Ln,e[0]):de}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||zn(Ln,e[0],t,n)}},Cn={value:{hasEffectsWhenCalled:null,returns:Nn}},Dn=new class extends ce{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?Vn(Tn,e[0]):de}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||zn(Tn,e[0],t,n)}},On={value:{hasEffectsWhenCalled:null,returns:Dn}},Rn={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(X,se,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(X,me,t)},returns:Dn}},Mn=wn({hasOwnProperty:kn,isPrototypeOf:kn,propertyIsEnumerable:kn,toLocaleString:On,toString:On,valueOf:Pn}),_n=wn({valueOf:kn},Mn),Ln=wn({toExponential:On,toFixed:On,toLocaleString:On,toPrecision:On,valueOf:Cn},Mn),Bn=wn({exec:Pn,test:kn},Mn),Tn=wn({anchor:On,at:Pn,big:On,blink:On,bold:On,charAt:On,charCodeAt:Cn,codePointAt:Pn,concat:On,endsWith:kn,fixed:On,fontcolor:On,fontsize:On,includes:kn,indexOf:Cn,italics:On,lastIndexOf:Cn,link:On,localeCompare:Cn,match:Pn,matchAll:Pn,normalize:On,padEnd:On,padStart:On,repeat:On,replace:Rn,replaceAll:Rn,search:Cn,slice:On,small:On,split:Pn,startsWith:kn,strike:On,sub:On,substr:On,substring:On,sup:On,toLocaleLowerCase:On,toLocaleUpperCase:On,toLowerCase:On,toString:On,toUpperCase:On,trim:On,trimEnd:On,trimLeft:On,trimRight:On,trimStart:On,valueOf:On},Mn);function zn(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function Vn(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:de}const Fn={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"],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 jn(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Un(){return{accessed:new ne,assigned:new ne,brokenFlow:!1,called:new ie,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new ie,replacedVariableInits:new Map}}const Gn="variables",Wn=Symbol("IS_SKIPPED_CHAIN");class qn extends ce{get deoptimized(){return re(this.flags,2)}set deoptimized(e){this.flags=oe(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 Fn[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 Fn[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(X,this.assignmentInteraction,e)}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const n of Fn[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)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[t,n]of Object.entries(e))if(!this.hasOwnProperty(t))if(95===t.charCodeAt(0))t===gn?this.annotations=n:t===yn&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.scope.context.getNodeConstructor(e.type))(this,this.scope).parseNode(e))}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return Fn[e.type]||=function(e){return Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0)))}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of Fn[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(Un())}applyDeoptimizations(){this.deoptimized=!0;for(const e of Fn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath(Z);else t.deoptimizePath(Z)}this.scope.context.requestTreeshakingPass()}}class Hn extends qn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[H,...t],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(Z,pe,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([H,H]),this.scope.context.requestTreeshakingPass()}}class Kn extends ce{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(ee),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath(Z)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?de:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||ue:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(e.length>(0===s?1:0))return!0;if(2===s){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(ee,fe,n))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(X,me,n))return!0}return!1}}const Yn=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:In})],Jn=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Dn})],Xn=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Nn})],Zn=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:ue})],Qn=/^\d+$/;class es extends ce{get hasLostTrack(){return re(this.flags,2048)}set hasLostTrack(e){this.flags=oe(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return re(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=oe(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return re(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=oe(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))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[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath(Z);this.prototypeExpression?.deoptimizePath([H,H]),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||"string"==typeof s&&this.deoptimizedPaths[s]))return void he(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("string"==typeof s){if(a[s]){const t=l[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(Qn.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...Object.values(l),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 Object.entries(this.propertiesAndGettersByKey))if(Qn.test(e))for(const e of t)e.deoptimizePath(Z);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===Y)return this.deoptimizeIntegerProperties();if("string"!=typeof t)return this.deoptimizeAllProperties(t===K);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?Z:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,H]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return le;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?ae:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return de;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):de}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===K)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("string"==typeof s){if(r[s]){const e=o[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[...Object.values(o),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,u=[];for(let d=e.length-1;d>=0;d--){const{key:h,kind:p,property:f}=e[d];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...u],i[h]=[f,...c]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...l]):(s[h]||(s[h]=[f,...u]),n[h]||(n[h]=[f,...a]));else{if(h===Y){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&u.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(Z)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(Qn.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(ee)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&Qn.test(e)||this.deoptimizedPaths[e])return ue;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&Qn.test(e)?ue:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return ue;const n=this.getMemberExpression(e);if(n!==ue&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const ts=e=>"string"==typeof e&&/^\d+$/.test(e),ns=new class extends ce{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||ts(t[0])||he(e)}getLiteralValueAtPath(e){return 1===e.length&&ts(e[0])?void 0:ae}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},ss=new es({__proto__:null,hasOwnProperty:Yn,isPrototypeOf:Yn,propertyIsEnumerable:Yn,toLocaleString:Jn,toString:Jn,valueOf:Zn},ns,!0),is=[{key:Y,kind:"init",property:ue},{key:"length",kind:"init",property:Nn}],rs=[new Kn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:In})],os=[new Kn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Nn})],as=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new es(is,gs),returnsPrimitive:null})],ls=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new es(is,gs),returnsPrimitive:null})],cs=[new Kn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new es(is,gs),returnsPrimitive:null})],us=[new Kn({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Nn})],ds=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:ue})],hs=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ue})],ps=[new Kn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:ue})],fs=[new Kn({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ms=[new Kn({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],gs=new es({__proto__:null,at:hs,concat:ls,copyWithin:fs,entries:ls,every:rs,fill:fs,filter:cs,find:ps,findIndex:os,findLast:ps,findLastIndex:os,flat:ls,flatMap:cs,forEach:ps,includes:Yn,indexOf:Xn,join:Jn,keys:Zn,lastIndexOf:Xn,map:cs,pop:ds,push:us,reduce:ps,reduceRight:ps,reverse:fs,shift:ds,slice:ls,some:rs,sort:ms,splice:as,toLocaleString:Jn,toString:Jn,unshift:us,values:hs},ss,!0);class ys extends qn{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)}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 Hn)&&(e=!0,n.deoptimizePath(Z))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:Nn}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Hn?s&&(t=!0,e.unshift({key:Y,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:vn})}return this.objectEntity=new es(e,gs)}}class bs extends qn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e){const t=[];for(const n of this.elements)null!==n&&t.push(...n.declare(e,ue));return t}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(X)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(X,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}function Es(e,t){if("MemberExpression"===e.type)return!e.computed&&Es(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;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}}return!1}const xs=Symbol("PureFunction"),$s=()=>{},As=Symbol("Value Properties"),Ss=()=>le,ws=()=>!1,vs=()=>!0,Ps={deoptimizeArgumentsOnCall:$s,getLiteralValue:Ss,hasEffectsWhenCalled:ws},Is={deoptimizeArgumentsOnCall:$s,getLiteralValue:Ss,hasEffectsWhenCalled:vs},ks={deoptimizeArgumentsOnCall:$s,getLiteralValue:Ss,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof ys)},Ns={deoptimizeArgumentsOnCall:$s,getLiteralValue:Ss,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof ce)||s.hasEffectsOnInteractionAtPath(Z,pe,t)}},Cs={__proto__:null,[As]:Is},Ds={__proto__:null,[As]:Ps},Os={__proto__:null,[As]:Ns},Rs={__proto__:null,[As]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(Z)},getLiteralValue:Ss,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(Q,fe,t)}},Ms={__proto__:null,[As]:Is,prototype:Cs},_s={__proto__:null,[As]:Ps,prototype:Cs},Ls={__proto__:null,[As]:ks,prototype:Cs},Bs={__proto__:null,[As]:Ps,from:Cs,of:Ds,prototype:Cs},Ts={__proto__:null,[As]:Ps,supportedLocalesOf:_s},zs={global:Cs,globalThis:Cs,self:Cs,window:Cs,__proto__:null,[As]:Is,Array:{__proto__:null,[As]:Is,from:Cs,isArray:Ds,of:Ds,prototype:Cs},ArrayBuffer:{__proto__:null,[As]:Ps,isView:Ds,prototype:Cs},AggregateError:Ls,Atomics:Cs,BigInt:Ms,BigInt64Array:Ms,BigUint64Array:Ms,Boolean:_s,constructor:Ms,DataView:_s,Date:{__proto__:null,[As]:Ps,now:Ds,parse:Ds,prototype:Cs,UTC:Ds},decodeURI:Ds,decodeURIComponent:Ds,encodeURI:Ds,encodeURIComponent:Ds,Error:_s,escape:Ds,eval:Cs,EvalError:_s,FinalizationRegistry:Ms,Float32Array:Bs,Float64Array:Bs,Function:Ms,hasOwnProperty:Cs,Infinity:Cs,Int16Array:Bs,Int32Array:Bs,Int8Array:Bs,isFinite:Ds,isNaN:Ds,isPrototypeOf:Cs,JSON:Cs,Map:Ls,Math:{__proto__:null,[As]:Is,abs:Ds,acos:Ds,acosh:Ds,asin:Ds,asinh:Ds,atan:Ds,atan2:Ds,atanh:Ds,cbrt:Ds,ceil:Ds,clz32:Ds,cos:Ds,cosh:Ds,exp:Ds,expm1:Ds,floor:Ds,fround:Ds,hypot:Ds,imul:Ds,log:Ds,log10:Ds,log1p:Ds,log2:Ds,max:Ds,min:Ds,pow:Ds,random:Ds,round:Ds,sign:Ds,sin:Ds,sinh:Ds,sqrt:Ds,tan:Ds,tanh:Ds,trunc:Ds},NaN:Cs,Number:{__proto__:null,[As]:Ps,isFinite:Ds,isInteger:Ds,isNaN:Ds,isSafeInteger:Ds,parseFloat:Ds,parseInt:Ds,prototype:Cs},Object:{__proto__:null,[As]:Ps,create:Ds,defineProperty:Rs,defineProperties:Rs,freeze:Rs,getOwnPropertyDescriptor:Ds,getOwnPropertyDescriptors:Ds,getOwnPropertyNames:Ds,getOwnPropertySymbols:Ds,getPrototypeOf:Ds,hasOwn:Ds,is:Ds,isExtensible:Ds,isFrozen:Ds,isSealed:Ds,keys:Ds,fromEntries:Cs,entries:Os,values:Os,prototype:Cs},parseFloat:Ds,parseInt:Ds,Promise:{__proto__:null,[As]:Is,all:Cs,allSettled:Cs,any:Cs,prototype:Cs,race:Cs,reject:Cs,resolve:Cs},propertyIsEnumerable:Cs,Proxy:Cs,RangeError:_s,ReferenceError:_s,Reflect:Cs,RegExp:_s,Set:Ls,SharedArrayBuffer:Ms,String:{__proto__:null,[As]:Ps,fromCharCode:Ds,fromCodePoint:Ds,prototype:Cs,raw:Ds},Symbol:{__proto__:null,[As]:Ps,for:Ds,keyFor:Ds,prototype:Cs,toStringTag:{__proto__:null,[As]:{deoptimizeArgumentsOnCall:$s,getLiteralValue:()=>J,hasEffectsWhenCalled:vs}}},SyntaxError:_s,toLocaleString:Cs,toString:Cs,TypeError:_s,Uint16Array:Bs,Uint32Array:Bs,Uint8Array:Bs,Uint8ClampedArray:Bs,unescape:Ds,URIError:_s,valueOf:Cs,WeakMap:Ls,WeakRef:Ms,WeakSet:Ls,clearInterval:Ms,clearTimeout:Ms,console:{__proto__:null,[As]:Is,assert:Ms,clear:Ms,count:Ms,countReset:Ms,debug:Ms,dir:Ms,dirxml:Ms,error:Ms,exception:Ms,group:Ms,groupCollapsed:Ms,groupEnd:Ms,info:Ms,log:Ms,table:Ms,time:Ms,timeEnd:Ms,timeLog:Ms,trace:Ms,warn:Ms},Intl:{__proto__:null,[As]:Is,Collator:Ts,DateTimeFormat:Ts,DisplayNames:Ts,ListFormat:Ts,Locale:Ts,NumberFormat:Ts,PluralRules:Ts,RelativeTimeFormat:Ts,Segmenter:Ts},setInterval:Ms,setTimeout:Ms,TextDecoder:Ms,TextEncoder:Ms,URL:{__proto__:null,[As]:Is,prototype:Cs,canParse:Ds},URLSearchParams:Ms,AbortController:Ms,AbortSignal:Ms,addEventListener:Cs,alert:Cs,AnalyserNode:Ms,Animation:Ms,AnimationEvent:Ms,applicationCache:Cs,ApplicationCache:Ms,ApplicationCacheErrorEvent:Ms,atob:Cs,Attr:Ms,Audio:Ms,AudioBuffer:Ms,AudioBufferSourceNode:Ms,AudioContext:Ms,AudioDestinationNode:Ms,AudioListener:Ms,AudioNode:Ms,AudioParam:Ms,AudioProcessingEvent:Ms,AudioScheduledSourceNode:Ms,AudioWorkletNode:Ms,BarProp:Ms,BaseAudioContext:Ms,BatteryManager:Ms,BeforeUnloadEvent:Ms,BiquadFilterNode:Ms,Blob:Ms,BlobEvent:Ms,blur:Cs,BroadcastChannel:Ms,btoa:Cs,ByteLengthQueuingStrategy:Ms,Cache:Ms,caches:Cs,CacheStorage:Ms,cancelAnimationFrame:Cs,cancelIdleCallback:Cs,CanvasCaptureMediaStreamTrack:Ms,CanvasGradient:Ms,CanvasPattern:Ms,CanvasRenderingContext2D:Ms,ChannelMergerNode:Ms,ChannelSplitterNode:Ms,CharacterData:Ms,clientInformation:Cs,ClipboardEvent:Ms,close:Cs,closed:Cs,CloseEvent:Ms,Comment:Ms,CompositionEvent:Ms,confirm:Cs,ConstantSourceNode:Ms,ConvolverNode:Ms,CountQueuingStrategy:Ms,createImageBitmap:Cs,Credential:Ms,CredentialsContainer:Ms,crypto:Cs,Crypto:Ms,CryptoKey:Ms,CSS:Ms,CSSConditionRule:Ms,CSSFontFaceRule:Ms,CSSGroupingRule:Ms,CSSImportRule:Ms,CSSKeyframeRule:Ms,CSSKeyframesRule:Ms,CSSMediaRule:Ms,CSSNamespaceRule:Ms,CSSPageRule:Ms,CSSRule:Ms,CSSRuleList:Ms,CSSStyleDeclaration:Ms,CSSStyleRule:Ms,CSSStyleSheet:Ms,CSSSupportsRule:Ms,CustomElementRegistry:Ms,customElements:Cs,CustomEvent:{__proto__:null,[As]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:Ss,hasEffectsWhenCalled:ws},prototype:Cs},DataTransfer:Ms,DataTransferItem:Ms,DataTransferItemList:Ms,defaultstatus:Cs,defaultStatus:Cs,DelayNode:Ms,DeviceMotionEvent:Ms,DeviceOrientationEvent:Ms,devicePixelRatio:Cs,dispatchEvent:Cs,document:Cs,Document:Ms,DocumentFragment:Ms,DocumentType:Ms,DOMError:Ms,DOMException:Ms,DOMImplementation:Ms,DOMMatrix:Ms,DOMMatrixReadOnly:Ms,DOMParser:Ms,DOMPoint:Ms,DOMPointReadOnly:Ms,DOMQuad:Ms,DOMRect:Ms,DOMRectReadOnly:Ms,DOMStringList:Ms,DOMStringMap:Ms,DOMTokenList:Ms,DragEvent:Ms,DynamicsCompressorNode:Ms,Element:Ms,ErrorEvent:Ms,Event:Ms,EventSource:Ms,EventTarget:Ms,external:Cs,fetch:Cs,File:Ms,FileList:Ms,FileReader:Ms,find:Cs,focus:Cs,FocusEvent:Ms,FontFace:Ms,FontFaceSetLoadEvent:Ms,FormData:Ms,frames:Cs,GainNode:Ms,Gamepad:Ms,GamepadButton:Ms,GamepadEvent:Ms,getComputedStyle:Cs,getSelection:Cs,HashChangeEvent:Ms,Headers:Ms,history:Cs,History:Ms,HTMLAllCollection:Ms,HTMLAnchorElement:Ms,HTMLAreaElement:Ms,HTMLAudioElement:Ms,HTMLBaseElement:Ms,HTMLBodyElement:Ms,HTMLBRElement:Ms,HTMLButtonElement:Ms,HTMLCanvasElement:Ms,HTMLCollection:Ms,HTMLContentElement:Ms,HTMLDataElement:Ms,HTMLDataListElement:Ms,HTMLDetailsElement:Ms,HTMLDialogElement:Ms,HTMLDirectoryElement:Ms,HTMLDivElement:Ms,HTMLDListElement:Ms,HTMLDocument:Ms,HTMLElement:Ms,HTMLEmbedElement:Ms,HTMLFieldSetElement:Ms,HTMLFontElement:Ms,HTMLFormControlsCollection:Ms,HTMLFormElement:Ms,HTMLFrameElement:Ms,HTMLFrameSetElement:Ms,HTMLHeadElement:Ms,HTMLHeadingElement:Ms,HTMLHRElement:Ms,HTMLHtmlElement:Ms,HTMLIFrameElement:Ms,HTMLImageElement:Ms,HTMLInputElement:Ms,HTMLLabelElement:Ms,HTMLLegendElement:Ms,HTMLLIElement:Ms,HTMLLinkElement:Ms,HTMLMapElement:Ms,HTMLMarqueeElement:Ms,HTMLMediaElement:Ms,HTMLMenuElement:Ms,HTMLMetaElement:Ms,HTMLMeterElement:Ms,HTMLModElement:Ms,HTMLObjectElement:Ms,HTMLOListElement:Ms,HTMLOptGroupElement:Ms,HTMLOptionElement:Ms,HTMLOptionsCollection:Ms,HTMLOutputElement:Ms,HTMLParagraphElement:Ms,HTMLParamElement:Ms,HTMLPictureElement:Ms,HTMLPreElement:Ms,HTMLProgressElement:Ms,HTMLQuoteElement:Ms,HTMLScriptElement:Ms,HTMLSelectElement:Ms,HTMLShadowElement:Ms,HTMLSlotElement:Ms,HTMLSourceElement:Ms,HTMLSpanElement:Ms,HTMLStyleElement:Ms,HTMLTableCaptionElement:Ms,HTMLTableCellElement:Ms,HTMLTableColElement:Ms,HTMLTableElement:Ms,HTMLTableRowElement:Ms,HTMLTableSectionElement:Ms,HTMLTemplateElement:Ms,HTMLTextAreaElement:Ms,HTMLTimeElement:Ms,HTMLTitleElement:Ms,HTMLTrackElement:Ms,HTMLUListElement:Ms,HTMLUnknownElement:Ms,HTMLVideoElement:Ms,IDBCursor:Ms,IDBCursorWithValue:Ms,IDBDatabase:Ms,IDBFactory:Ms,IDBIndex:Ms,IDBKeyRange:Ms,IDBObjectStore:Ms,IDBOpenDBRequest:Ms,IDBRequest:Ms,IDBTransaction:Ms,IDBVersionChangeEvent:Ms,IdleDeadline:Ms,IIRFilterNode:Ms,Image:Ms,ImageBitmap:Ms,ImageBitmapRenderingContext:Ms,ImageCapture:Ms,ImageData:Ms,indexedDB:Cs,innerHeight:Cs,innerWidth:Cs,InputEvent:Ms,IntersectionObserver:Ms,IntersectionObserverEntry:Ms,isSecureContext:Cs,KeyboardEvent:Ms,KeyframeEffect:Ms,length:Cs,localStorage:Cs,location:Cs,Location:Ms,locationbar:Cs,matchMedia:Cs,MediaDeviceInfo:Ms,MediaDevices:Ms,MediaElementAudioSourceNode:Ms,MediaEncryptedEvent:Ms,MediaError:Ms,MediaKeyMessageEvent:Ms,MediaKeySession:Ms,MediaKeyStatusMap:Ms,MediaKeySystemAccess:Ms,MediaList:Ms,MediaQueryList:Ms,MediaQueryListEvent:Ms,MediaRecorder:Ms,MediaSettingsRange:Ms,MediaSource:Ms,MediaStream:Ms,MediaStreamAudioDestinationNode:Ms,MediaStreamAudioSourceNode:Ms,MediaStreamEvent:Ms,MediaStreamTrack:Ms,MediaStreamTrackEvent:Ms,menubar:Cs,MessageChannel:Ms,MessageEvent:Ms,MessagePort:Ms,MIDIAccess:Ms,MIDIConnectionEvent:Ms,MIDIInput:Ms,MIDIInputMap:Ms,MIDIMessageEvent:Ms,MIDIOutput:Ms,MIDIOutputMap:Ms,MIDIPort:Ms,MimeType:Ms,MimeTypeArray:Ms,MouseEvent:Ms,moveBy:Cs,moveTo:Cs,MutationEvent:Ms,MutationObserver:Ms,MutationRecord:Ms,name:Cs,NamedNodeMap:Ms,NavigationPreloadManager:Ms,navigator:Cs,Navigator:Ms,NetworkInformation:Ms,Node:Ms,NodeFilter:Cs,NodeIterator:Ms,NodeList:Ms,Notification:Ms,OfflineAudioCompletionEvent:Ms,OfflineAudioContext:Ms,offscreenBuffering:Cs,OffscreenCanvas:Ms,open:Cs,openDatabase:Cs,Option:Ms,origin:Cs,OscillatorNode:Ms,outerHeight:Cs,outerWidth:Cs,PageTransitionEvent:Ms,pageXOffset:Cs,pageYOffset:Cs,PannerNode:Ms,parent:Cs,Path2D:Ms,PaymentAddress:Ms,PaymentRequest:Ms,PaymentRequestUpdateEvent:Ms,PaymentResponse:Ms,performance:Cs,Performance:Ms,PerformanceEntry:Ms,PerformanceLongTaskTiming:Ms,PerformanceMark:Ms,PerformanceMeasure:Ms,PerformanceNavigation:Ms,PerformanceNavigationTiming:Ms,PerformanceObserver:Ms,PerformanceObserverEntryList:Ms,PerformancePaintTiming:Ms,PerformanceResourceTiming:Ms,PerformanceTiming:Ms,PeriodicWave:Ms,Permissions:Ms,PermissionStatus:Ms,personalbar:Cs,PhotoCapabilities:Ms,Plugin:Ms,PluginArray:Ms,PointerEvent:Ms,PopStateEvent:Ms,postMessage:Cs,Presentation:Ms,PresentationAvailability:Ms,PresentationConnection:Ms,PresentationConnectionAvailableEvent:Ms,PresentationConnectionCloseEvent:Ms,PresentationConnectionList:Ms,PresentationReceiver:Ms,PresentationRequest:Ms,print:Cs,ProcessingInstruction:Ms,ProgressEvent:Ms,PromiseRejectionEvent:Ms,prompt:Cs,PushManager:Ms,PushSubscription:Ms,PushSubscriptionOptions:Ms,queueMicrotask:Cs,RadioNodeList:Ms,Range:Ms,ReadableStream:Ms,RemotePlayback:Ms,removeEventListener:Cs,Request:Ms,requestAnimationFrame:Cs,requestIdleCallback:Cs,resizeBy:Cs,ResizeObserver:Ms,ResizeObserverEntry:Ms,resizeTo:Cs,Response:Ms,RTCCertificate:Ms,RTCDataChannel:Ms,RTCDataChannelEvent:Ms,RTCDtlsTransport:Ms,RTCIceCandidate:Ms,RTCIceTransport:Ms,RTCPeerConnection:Ms,RTCPeerConnectionIceEvent:Ms,RTCRtpReceiver:Ms,RTCRtpSender:Ms,RTCSctpTransport:Ms,RTCSessionDescription:Ms,RTCStatsReport:Ms,RTCTrackEvent:Ms,screen:Cs,Screen:Ms,screenLeft:Cs,ScreenOrientation:Ms,screenTop:Cs,screenX:Cs,screenY:Cs,ScriptProcessorNode:Ms,scroll:Cs,scrollbars:Cs,scrollBy:Cs,scrollTo:Cs,scrollX:Cs,scrollY:Cs,SecurityPolicyViolationEvent:Ms,Selection:Ms,ServiceWorker:Ms,ServiceWorkerContainer:Ms,ServiceWorkerRegistration:Ms,sessionStorage:Cs,ShadowRoot:Ms,SharedWorker:Ms,SourceBuffer:Ms,SourceBufferList:Ms,speechSynthesis:Cs,SpeechSynthesisEvent:Ms,SpeechSynthesisUtterance:Ms,StaticRange:Ms,status:Cs,statusbar:Cs,StereoPannerNode:Ms,stop:Cs,Storage:Ms,StorageEvent:Ms,StorageManager:Ms,styleMedia:Cs,StyleSheet:Ms,StyleSheetList:Ms,SubtleCrypto:Ms,SVGAElement:Ms,SVGAngle:Ms,SVGAnimatedAngle:Ms,SVGAnimatedBoolean:Ms,SVGAnimatedEnumeration:Ms,SVGAnimatedInteger:Ms,SVGAnimatedLength:Ms,SVGAnimatedLengthList:Ms,SVGAnimatedNumber:Ms,SVGAnimatedNumberList:Ms,SVGAnimatedPreserveAspectRatio:Ms,SVGAnimatedRect:Ms,SVGAnimatedString:Ms,SVGAnimatedTransformList:Ms,SVGAnimateElement:Ms,SVGAnimateMotionElement:Ms,SVGAnimateTransformElement:Ms,SVGAnimationElement:Ms,SVGCircleElement:Ms,SVGClipPathElement:Ms,SVGComponentTransferFunctionElement:Ms,SVGDefsElement:Ms,SVGDescElement:Ms,SVGDiscardElement:Ms,SVGElement:Ms,SVGEllipseElement:Ms,SVGFEBlendElement:Ms,SVGFEColorMatrixElement:Ms,SVGFEComponentTransferElement:Ms,SVGFECompositeElement:Ms,SVGFEConvolveMatrixElement:Ms,SVGFEDiffuseLightingElement:Ms,SVGFEDisplacementMapElement:Ms,SVGFEDistantLightElement:Ms,SVGFEDropShadowElement:Ms,SVGFEFloodElement:Ms,SVGFEFuncAElement:Ms,SVGFEFuncBElement:Ms,SVGFEFuncGElement:Ms,SVGFEFuncRElement:Ms,SVGFEGaussianBlurElement:Ms,SVGFEImageElement:Ms,SVGFEMergeElement:Ms,SVGFEMergeNodeElement:Ms,SVGFEMorphologyElement:Ms,SVGFEOffsetElement:Ms,SVGFEPointLightElement:Ms,SVGFESpecularLightingElement:Ms,SVGFESpotLightElement:Ms,SVGFETileElement:Ms,SVGFETurbulenceElement:Ms,SVGFilterElement:Ms,SVGForeignObjectElement:Ms,SVGGElement:Ms,SVGGeometryElement:Ms,SVGGradientElement:Ms,SVGGraphicsElement:Ms,SVGImageElement:Ms,SVGLength:Ms,SVGLengthList:Ms,SVGLinearGradientElement:Ms,SVGLineElement:Ms,SVGMarkerElement:Ms,SVGMaskElement:Ms,SVGMatrix:Ms,SVGMetadataElement:Ms,SVGMPathElement:Ms,SVGNumber:Ms,SVGNumberList:Ms,SVGPathElement:Ms,SVGPatternElement:Ms,SVGPoint:Ms,SVGPointList:Ms,SVGPolygonElement:Ms,SVGPolylineElement:Ms,SVGPreserveAspectRatio:Ms,SVGRadialGradientElement:Ms,SVGRect:Ms,SVGRectElement:Ms,SVGScriptElement:Ms,SVGSetElement:Ms,SVGStopElement:Ms,SVGStringList:Ms,SVGStyleElement:Ms,SVGSVGElement:Ms,SVGSwitchElement:Ms,SVGSymbolElement:Ms,SVGTextContentElement:Ms,SVGTextElement:Ms,SVGTextPathElement:Ms,SVGTextPositioningElement:Ms,SVGTitleElement:Ms,SVGTransform:Ms,SVGTransformList:Ms,SVGTSpanElement:Ms,SVGUnitTypes:Ms,SVGUseElement:Ms,SVGViewElement:Ms,TaskAttributionTiming:Ms,Text:Ms,TextEvent:Ms,TextMetrics:Ms,TextTrack:Ms,TextTrackCue:Ms,TextTrackCueList:Ms,TextTrackList:Ms,TimeRanges:Ms,toolbar:Cs,top:Cs,Touch:Ms,TouchEvent:Ms,TouchList:Ms,TrackEvent:Ms,TransitionEvent:Ms,TreeWalker:Ms,UIEvent:Ms,ValidityState:Ms,visualViewport:Cs,VisualViewport:Ms,VTTCue:Ms,WaveShaperNode:Ms,WebAssembly:Cs,WebGL2RenderingContext:Ms,WebGLActiveInfo:Ms,WebGLBuffer:Ms,WebGLContextEvent:Ms,WebGLFramebuffer:Ms,WebGLProgram:Ms,WebGLQuery:Ms,WebGLRenderbuffer:Ms,WebGLRenderingContext:Ms,WebGLSampler:Ms,WebGLShader:Ms,WebGLShaderPrecisionFormat:Ms,WebGLSync:Ms,WebGLTexture:Ms,WebGLTransformFeedback:Ms,WebGLUniformLocation:Ms,WebGLVertexArrayObject:Ms,WebSocket:Ms,WheelEvent:Ms,Window:Ms,Worker:Ms,WritableStream:Ms,XMLDocument:Ms,XMLHttpRequest:Ms,XMLHttpRequestEventTarget:Ms,XMLHttpRequestUpload:Ms,XMLSerializer:Ms,XPathEvaluator:Ms,XPathExpression:Ms,XPathResult:Ms,XSLTProcessor:Ms};for(const e of["window","global","self","globalThis"])zs[e]=zs;function Vs(e){let t=zs;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[As]}class Fs extends Ae{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Vs([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Vs([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Vs([this.name,...e]);return s?s.getLiteralValue():ae}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Vs([this.name]):!Vs([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Vs([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}class js extends Ae{constructor(e,t,n,s,i){super(e),this.init=n,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=s.deoptimizationTracker,this.module=s.module,this.kind=i}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath(Z);this.additionalInitializers=null}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned?he(e):n.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeArgumentsOnInteractionAtPath(e,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=Pe;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath(Z)}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned?ae:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t,n))),ae)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned?de:n.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath(e,t,n,s))),de)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n)}}include(){if(!this.included){super.include();for(const e of this.declarations){e.included||e.include(jn(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==$e);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const n of t)n.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=ue,this.markReassigned()),this.additionalInitializers}}const Us=new Set(["class","const","let","var","using","await using"]);class Gs extends qn{constructor(){super(...arguments),this.variable=null,this.isReferenceVariable=!1}get isTDZAccess(){return re(this.flags,4)?re(this.flags,8):null}set isTDZAccess(e){this.flags=oe(this.flags,4,!0),this.flags=oe(this.flags,8,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&Es(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isReferenceVariable=!0)}declare(e,t){let n;const{treeshake:s}=this.scope.context.options;switch(e){case"var":n=this.scope.addDeclaration(this,this.scope.context,t,e),s&&s.correctVarValueBeforeDeclaration&&n.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"using":case"await using":case"class":n=this.scope.addDeclaration(this,this.scope.context,t,e);break;case"parameter":n=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return[this.variable=n]}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 Fs&&!this.isPureFunction(X)&&this.variable.hasEffectsOnInteractionAtPath(X,pe,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(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof js&&this.variable.kind&&Us.has(this.variable.kind)&&this.variable.module===this.scope.context.module))return this.isTDZAccess=!1;let t;return this.variable.declarations&&1===this.variable.declarations.length&&(t=this.variable.declarations[0])&&this.start<t.start&&Ws(this)===Ws(t)||!this.variable.initReached&&this.scope.context.module.isExecuted?this.isTDZAccess=!0:this.isTDZAccess=!1}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=we){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===ye&&i&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){return this.scope.context.error(vt(this.name,this.scope.context.module.id),this.start)}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof js&&(this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isReferenceVariable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}getVariableRespectingTDZ(){return this.isPossibleTDZ()?ue:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[xs])return!0;t=t[n]}return t?.[xs]}}function Ws(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}const qs=Pe,Hs=new Set([H]),Ks=new ne,Ys=new Set([ue]);class Js extends js{constructor(e,t,n){super(e,t,ue,n,"parameter"),this.deoptimizationInteractions=[],this.deoptimizations=new ne,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set,this.expressionsUseTheKnownValue=[],this.knownValue=null,this.knownValueLiteral=ae,this.frozenValue=null}addEntityToBeDeoptimized(e){if(e===ue){if(!this.entitiesToBeDeoptimized.has(ue)){this.entitiesToBeDeoptimized.add(ue);for(const{interaction:e}of this.deoptimizationInteractions)he(e);this.deoptimizationInteractions=qs}}else if(this.deoptimizedFields.has(H))e.deoptimizePath(Z);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,n,se)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsUseTheKnownValue)e.deoptimizeCache();this.expressionsUseTheKnownValue=Pe}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(X,se,this));if(this.knownValue===e||this.knownValue instanceof Gs&&e instanceof Gs&&this.knownValue.variable===e.variable)return;const t=this.knownValueLiteral;if("symbol"==typeof t)return void this.markReassigned();e.getLiteralValueAtPath(X,se,this)!==t&&this.markReassigned()}getKnownValue(){return null===this.frozenValue&&(this.frozenValue=this.knownValue||ue),this.frozenValue}getLiteralValueAtPath(e,t,n){if(this.isReassigned)return ae;const s=this.getKnownValue();return this.expressionsUseTheKnownValue.push(n),t.withTrackedEntityAtPath(e,s,(()=>s.getLiteralValueAtPath(e,t,n)),ae)}hasEffectsOnInteractionAtPath(e,t,n){if(this.isReassigned||1===t.type)return super.hasEffectsOnInteractionAtPath(e,t,n);return this.getKnownValue().hasEffectsOnInteractionAtPath(e,t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(ue)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(H)||2===e.type&&this.deoptimizedFields.has(t[0])))he(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.entitiesToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,t,se);this.entitiesToBeDeoptimized.has(ue)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(H))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.entitiesToBeDeoptimized)e.deoptimizePath([t]);t===H&&(this.deoptimizationInteractions=qs,this.deoptimizations=Ks,this.deoptimizedFields=Hs,this.entitiesToBeDeoptimized=Ys)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath(Z):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),de}}function Xs(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function Zs(e,t,n){let s=e,i=1;for(;t.has(s)||Ne.has(s)||n?.has(s);)s=`${e}$${Xs(i++)}`;return t.add(s),s}class Qs{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("var"===s&&"var"===o)return r.addDeclaration(e,n),r;t.error(Bt(i),e.start)}const o=new js(e.name,e,n,t,s);return this.variables.set(i,o),o}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 ei extends Qs{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 ei&&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 ei&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof ei&&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,Zs(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}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}}class ti extends ei{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("parameter"===o&&"CatchClause"===r.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,vn,s);return r.renderLikeHoisted(n),this.addHoistedVariable(i,n),n}return"var"===o?(r.addDeclaration(e,n),r):t.error(Bt(i),e.start)}const o=this.parent.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class ni extends ei{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if(!("var"!==s&&"function"!==s||"var"!==o&&"function"!==o&&"parameter"!==o))return r.addDeclaration(e,n),r;t.error(Bt(i),e.start)}const o=new js(e.name,e,n,t,s);return this.variables.set(i,o),o}}class si extends ei{constructor(e,t){super(e,e.context),this.parameters=[],this.hasRest=!1,this.bodyScope=t?new ti(this):new ni(this)}addParameterDeclaration(e){const{name:t,start:n}=e;if(this.variables.get(t))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(t),n);const s=new Js(t,e,this.context);return this.variables.set(t,s),this.bodyScope.addHoistedVariable(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const n of t)if(n instanceof Hn){for(const n of t)n.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||i,a=t[r];if(o)if(n=!1,0===o.length)s=!0;else for(const e of o)e.included&&(s=!0),e.calledFromTryStatement&&(n=!0);!s&&a.shouldBeIncluded(e)&&(s=!0),s&&a.include(e,n)}}}class ii extends si{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=ue;for(const e of this.returnExpressions)e.deoptimizePath(Z)}}}function ri(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const oi={isNoStatement:!0};function ai(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 li=/\S/g;function ci(e,t){li.lastIndex=t;return li.exec(e).index}const ui=/\s/;function di(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[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 hi(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+di(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+di(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):ri(r,t,o,l)):r.render(t,i)}function pi(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+ai(t.original.slice(r.end,s.start),",")),o=a=c+1+di(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 fi(e,t,n){for(;;){const[s,i]=di(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}class mi extends ei{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r)return"var"===r.kind||"var"===s&&"parameter"===r.kind?(r.addDeclaration(e,n),r):t.error(Bt(i),e.start);const o=this.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class gi extends qn{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===$e&&this.scope.context.log(Te,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${z(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!==$e:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class yi extends qn{get deoptimizeBody(){return re(this.flags,32768)}set deoptimizeBody(e){this.flags=oe(this.flags,32768,e)}get directlyIncluded(){return re(this.flags,16384)}set directlyIncluded(e){this.flags=oe(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(ue)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new mi(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();const e=this.body[0];this.deoptimizeBody=e instanceof gi&&"use asm"===e.directive}render(e,t){this.body.length>0?hi(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class bi extends qn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,ue)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(X)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(X,t,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([H,H]),this.scope.context.requestTreeshakingPass())}}class Ei extends qn{constructor(){super(...arguments),this.objectEntity=null,this.parameterVariableValuesDeoptimized=!1}get async(){return re(this.flags,256)}set async(e){this.flags=oe(this.flags,256,e)}get deoptimizedReturn(){return re(this.flags,512)}set deoptimizedReturn(e){this.flags=oe(this.flags,512,e)}get generator(){return re(this.flags,4194304)}set generator(e){this.flags=oe(this.flags,4194304,e)}updateParameterVariableValues(e){for(let t=0;t<this.params.length;t++){const n=this.params[t];if(!(n instanceof Gs))continue;const s=n.variable,i=e[t+1]??vn;s.updateKnownValue(i)}}deoptimizeParameterVariableValues(){for(const e of this.params)if(e instanceof Gs){e.variable.markReassigned()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(2===e.type){const{parameters:t}=this.scope,{args:n}=e;let s=!1;for(let e=0;e<n.length-1;e++){const i=this.params[e],r=n[e+1];r instanceof Hn&&this.deoptimizeParameterVariableValues(),s||i instanceof bi?(s=!0,r.deoptimizePath(Z)):i instanceof Gs?(t[e][0].addEntityToBeDeoptimized(r),this.addArgumentToBeDeoptimized(r)):i?r.deoptimizePath(Z):this.addArgumentToBeDeoptimized(r)}this.updateParameterVariableValues(n)}else this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){if(this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===H){this.scope.getReturnExpression().deoptimizePath(Z);for(const e of this.scope.parameters)for(const t of e)t.deoptimizePath(Z),t.markReassigned()}}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(Z),this.scope.context.requestTreeshakingPass()),de):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],me,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],pe,n)))return!0}for(const e of this.params)if(e.hasEffects(n))return!0;return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===be&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.deoptimizeParameterVariableValues()),this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){super.initialise(),this.body instanceof yi?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)))}parseNode(e){const{body:t,params:n}=e,{scope:s}=this,{bodyScope:i,context:r}=s,o=this.params=n.map((e=>new(r.getNodeConstructor(e.type))(this,s).parseNode(e)));return s.addParameterVariables(o.map((e=>e.declare("parameter",ue))),o[o.length-1]instanceof bi),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}Ei.prototype.preventChildBlockScope=!0;class xi extends Ei{constructor(){super(...arguments),this.objectEntity=null}get expression(){return re(this.flags,8388608)}set expression(e){this.flags=oe(this.flags,8388608,e)}createScope(e){this.scope=new ii(e,!1)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;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===ye&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Gs||n.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new es([],ss)}}function $i(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 Ai(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function Si(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${$i([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}class wi extends qn{addExportedVariables(e,t){for(const n of this.properties)"Property"===n.type?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t){const n=[];for(const s of this.properties)n.push(...s.declare(e,t));return n}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(X,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class vi extends qn{hasEffects(e){const{deoptimized:t,left:n,operator:s,right:i}=this;return t||this.applyDeoptimizations(),i.hasEffects(e)||n.hasEffectsAsAssignmentTarget(e,"="!==s)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,left:s,right:i,operator:r}=this;n||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||s.included||s.hasEffectsAsAssignmentTarget(Un(),!1))&&s.includeAsAssignmentTarget(e,t,"="!==r),i.include(e,t)}initialise(){if(super.initialise(),this.left instanceof Gs){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&this.scope.context.error({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}=we){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=ci(e.original,ai(e.original,"=",r.end)+1);e.remove(a,l),n&&fi(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Gs){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?Ai(n,a,l,e,t):Si(n,a,l,c.type!==Ee,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"],`${$i(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===Ee,e,t)}r.included&&r instanceof wi&&(i===Ee||i===ge)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(X),this.right.deoptimizePath(Z),this.scope.context.requestTreeshakingPass()}}class Pi extends qn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(X,t,n)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=we){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(X),this.right.deoptimizePath(Z),this.scope.context.requestTreeshakingPass()}}class Ii extends js{constructor(e){super("arguments",null,ue,e,"other"),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath(Z):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath(Z);this.deoptimizedArguments.length=0}}class ki extends Js{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||ue).hasEffectsOnInteractionAtPath(e,t,n)}}class Ni extends ii{constructor(e){const{context:t}=e;super(e,!1),this.variables.set("arguments",this.argumentsVariable=new Ii(t)),this.variables.set("this",this.thisVariable=new ki(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const n of t)n.included||n.include(e,!1)}}class Ci extends Ei{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Ni(e),this.constructedEntity=new es(Object.create(null),ss),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:ue);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!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();const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Gs&&!n||s.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new es([{key:"prototype",kind:"init",property:new es([],ss)}],ss)}}class Di extends qn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.scope.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof Ci||e instanceof xi)break e}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const Oi={"!=":(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,"|":(e,t)=>e|t};class Ri extends qn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(e.length>0)return ae;const s=this.left.getLiteralValueAtPath(X,t,n);if("symbol"==typeof s)return ae;const i=this.right.getLiteralValueAtPath(X,t,n);if("symbol"==typeof i)return ae;const r=Oi[this.operator];return r?r(s,i):ae}hasEffects(e){return"+"===this.operator&&this.parent instanceof gi&&""===this.left.getLiteralValueAtPath(X,se,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=we){this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t)}}class Mi extends qn{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){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function _i(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(ai(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(ai(e.original,"(",n.callee.end)+1,n.end-1)}}class Li extends qn{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)?ae:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?de:Vn(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||zn(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return Bn;switch(typeof e){case"boolean":return _n;case"number":return Ln;case"string":return Tn}return Object.create(null)}(this.value)}parseNode(e){return this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Bi(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(X,se,i);if(n===Wn||e.optional&&null==n)return Wn}else if(e.optional&&null==t.getLiteralValueAtPath(X,se,i))return Wn;return e.getLiteralValueAtPath(n,s,i)}function Ti(e){return e.computed?function(e){if(e instanceof Li)return String(e.value);return null}(e.property):e.property.name}function zi(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Gs)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Vi){const s=zi(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}class Vi extends qn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return re(this.flags,1024)}set computed(e){this.flags=oe(this.flags,1024,e)}get optional(){return re(this.flags,128)}set optional(e){this.flags=oe(this.flags,128,e)}get assignmentDeoptimized(){return re(this.flags,16)}set assignmentDeoptimized(e){this.flags=oe(this.flags,16,e)}get bound(){return re(this.flags,32)}set bound(e){this.flags=oe(this.flags,32,e)}get isUndefined(){return re(this.flags,64)}set isUndefined(e){this.flags=oe(this.flags,64,e)}bind(){this.bound=!0;const e=zi(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Fi(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.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<7?this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],n):he(e))}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=Pe,this.propertyKey=H,t.deoptimizePath(Z);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&&e.length<7){const t=this.getPropertyKey();this.object.deoptimizePath([t===H?K:t,...e])}}getLiteralValueAtPath(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:this.propertyKey!==H&&e.length<7?(this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,n)):ae}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Bi(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s):this.isUndefined?[vn,!1]:this.propertyKey!==H&&e.length<7?(this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,n,s)):de}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===Wn?Wn:this.optional&&null==this.object.getLiteralValueAtPath(X,se,this)?t||Wn:(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(X,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<7)||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,n))}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,n){this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),n?this.include(e,t):this.includeProperties(e,t)}includeCallArguments(e,t){this.variable?this.variable.includeCallArguments(e,t):super.includeCallArguments(e,t)}initialise(){super.initialise(),this.propertyKey=Ti(this),this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=we){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;if(this.bound&&e&&!this.variable&&!this.isUndefined){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],se),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.getPropertyKey()],se),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof Gs){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable),this.scope.context.log(Te,vt(this.object.name,this.scope.context.module.id),this.start))}}getPropertyKey(){if(null===this.propertyKey){this.propertyKey=H;const e=this.property.getLiteralValueAtPath(X,se,this);return this.propertyKey=e===J?e:"symbol"==typeof e?H:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){this.included||(this.included=!0,this.variable&&this.scope.context.includeVariableInModule(this.variable)),this.object.include(e,t),this.property.include(e,t)}}function Fi(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof Se)return null;const s=t[0].key,i=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(Te,Rt(s,n.module.id,i),t[0].pos),"undefined"}return null}return Fi(i,t.slice(1),n)}class ji extends qn{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!==ue));if(0!==o.length)if(i===ue)for(const e of o)e.deoptimizePath(Z);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]!==ue){this.returnExpression=de;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Ie,this.deoptimizableDependentExpressions=Pe;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath(Z)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==ue&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===ue?ae:t.withTrackedEntityAtPath(e,s,(()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n))),ae)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===ue?i:n.withTrackedEntityAtPath(e,i,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]}),de)}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)}}class Ui extends ji{get optional(){return re(this.flags,128)}set optional(e){this.flags=oe(this.flags,128,e)}bind(){if(super.bind(),this.callee instanceof Gs){this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(Te,$t(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(Te,{code:"EVAL",id:e=this.scope.context.module.id,message:`Use of eval in "${z(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:Ke("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Vi&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Bi(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(X,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===Wn)return Wn;if(this.optional&&null==this.callee.getLiteralValueAtPath(X,se,this))return!this.annotationPure&&t||Wn;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(X,this.interaction,e))}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Gn&&this.callee instanceof Gs&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}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}=we){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),_i(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,X,se),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=se){return null===this.returnExpression?(this.returnExpression=de,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(X,this.interaction,e,this)):this.returnExpression}}class Gi extends qn{createScope(e){this.scope=new si(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;return this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",ue)),this.body=new yi(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}Gi.prototype.preventChildBlockScope=!0;class Wi extends qn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===Wn?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}removeAnnotations(e){this.expression.removeAnnotations(e)}applyDeoptimizations(){}}class qi extends ei{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new js("this",null,t,n,"other")),this.instanceScope=new ei(this,n),this.instanceScope.variables.set("this",new ki(n))}findLexicalBoundary(){return this}}class Hi extends qn{createScope(e){this.scope=new qi(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=[];for(const n of e.body)t.push(new(this.scope.context.getNodeConstructor(n.type))(this,n.static?this.scope:this.scope.instanceScope).parseNode(n));return super.parseNode(e)}applyDeoptimizations(){}}function Ki(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class Yi extends qn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return re(this.flags,1024)}set computed(e){this.flags=oe(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},X,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(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(X,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=de,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(X,me,se,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class Ji extends Yi{hasEffects(e){return super.hasEffects(e)||Ki(this.decorators,e)}applyDeoptimizations(){}}class Xi extends qn{createScope(e){this.scope=new mi(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=ai(e.original.slice(this.start,this.end),"{")+1;hi(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function Zi(e){return"StaticBlock"===e.type}class Qi extends ce{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],n)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([this.key,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,n)}}class er extends qn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new ei(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)||Ki(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.deoptimized||this.applyDeoptimizations(),this.included=!0,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())}initialise(){super.initialise(),this.id?.declare("class",this);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)Zi(e)||e.static||e instanceof Ji&&"constructor"===e.kind||e.deoptimizePath(Z);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(Zi(n))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(X,se,this);if("symbol"==typeof e){s.push({key:H,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Gs?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new es(t,this.superClass?new Qi(this.superClass,"prototype"):ss)}),this.objectEntity=new es(e,this.superClass||ss)}}class tr extends er{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Gs(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}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}${$i([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 nr extends er{render(e,t,{renderedSurroundingElement:n}=we){super.render(e,t),n===Ee&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class sr extends ce{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new sr(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 ir extends qn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return re(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=oe(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath(Z);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Pe;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();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):ae}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new sr([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();t||this.test.shouldBeIncluded(e)||null===n?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includeCallArguments(e,t){const n=this.getUsedBranch();n?n.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=we){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=ai(e.original,":",this.consequent.end),l=ci(e.original,(this.consequent.included?ai(e.original,"?",this.test.end):a)+1);s&&fi(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=this.test.getLiteralValueAtPath(X,se,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}class rr extends qn{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){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}class or extends qn{hasEffects(){return!0}}class ar extends qn{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(X,me,e)}}function lr(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 cr(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}class ur extends qn{hasEffects(e){return!!this.test.hasEffects(e)||lr(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),cr(e,this.body,t)}}class dr extends qn{hasEffects(){return!1}}class hr extends qn{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}hr.prototype.needsBoundaries=!0;class pr extends Ci{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return null!==e.id&&(this.id=new Gs(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class fr extends qn{include(e,t){super.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),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 ci(e,ai(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof pr)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=ai(e,"function",t)+8;e=e.slice(n,ai(e,"(",n));const s=ai(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof tr)this.renderNamedDeclaration(e,r,null===this.declaration.id?ai(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void ri(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:Ee}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}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 tr&&i.has(this.variable)&&e.appendLeft(this.end,` ${$i([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);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?"":";"))):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}fr.prototype.needsBoundaries=!0;class mr extends qn{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;null===this.declaration?e.remove(s,i):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:i,start:s}))}applyDeoptimizations(){}}mr.prototype.needsBoundaries=!0;class gr extends qn{applyDeoptimizations(){}}class yr extends qn{createScope(e){this.scope=new mi(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||lr(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),cr(e,n,t)}initialise(){super.initialise(),this.left.setAssignedValue(ue)}render(e,t){this.left.render(e,t,oi),this.right.render(e,t,oi),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(X),this.scope.context.requestTreeshakingPass()}}class br extends qn{get await(){return re(this.flags,131072)}set await(e){this.flags=oe(this.flags,131072,e)}createScope(e){this.scope=new mi(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=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),cr(e,n,t)}initialise(){super.initialise(),this.left.setAssignedValue(ue)}render(e,t){this.left.render(e,t,oi),this.right.render(e,t,oi),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(X),this.right.deoptimizePath(Z),this.scope.context.requestTreeshakingPass()}}class Er extends qn{createScope(e){this.scope=new mi(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||lr(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),cr(e,this.body,t)}render(e,t){this.init?.render(e,t,oi),this.test?.render(e,t,oi),this.update?.render(e,t,oi),this.body.render(e,t)}}class xr extends Ci{createScope(e){super.createScope(this.idScope=new ei(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Gs(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===ye&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=we){super.render(e,t),n===Ee&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class $r extends mi{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s)}}const Ar=Symbol("unset");class Sr extends qn{constructor(){super(...arguments),this.testValue=Ar}deoptimizeCache(){this.testValue=ae}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?!1:!!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)}}parseNode(e){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new $r(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new $r(this.scope)).parseNode(e.alternate)),super.parseNode(e)}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)}applyDeoptimizations(){}getTestValue(){return this.testValue===Ar?this.testValue=this.test.getLiteralValueAtPath(X,se,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!==$e&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Sr&&e.alternate)return!0;if(e instanceof yi)return!1;e=e.parent}while(e);return!1}}class wr extends qn{}class vr extends qn{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}vr.prototype.needsBoundaries=!0;class Pr extends qn{applyDeoptimizations(){}}const Ir="_interopDefault",kr="_interopDefaultCompat",Nr="_interopNamespace",Cr="_interopNamespaceCompat",Dr="_interopNamespaceDefault",Or="_interopNamespaceDefaultOnly",Rr="_mergeNamespaces",Mr="_documentCurrentScript",_r={auto:Ir,compat:kr,default:null,defaultOnly:null,esModule:null},Lr=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),Br={auto:Nr,compat:Cr,default:Dr,defaultOnly:Or,esModule:null},Tr=(e,t)=>"esModule"!==e&&Lr(e,t),zr=(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)?Vr[e](n,s,i,r,o,a):"")).join("")},Vr={[Mr]:(e,{_:t,n:n})=>`var ${Mr}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[kr](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:kr});return`${o}${Ur(t)}${s}?${s}${n?Fr(t):jr(t)}${a}${r}${r}`},[Ir](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:Ir});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?Fr(t):jr(t)}${a}${r}${r}`},[Cr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Dr)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Cr});return`${e}${Ur(t)}${o}?${o}e${o}:${o}${Dr}(e)${n}${l}${l}`}return`function ${Cr}(e)${o}{${l}${e}if${o}(${Ur(t)})${o}return e;${l}`+Gr(e,e,t,n,s,i)+`}${l}${l}`},[Or](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:Or});return`${c}${Xr(s,Zr(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[Dr](e,t,n,s,i){const{_:r,n:o}=t;return`function ${Dr}(e)${r}{${o}`+Gr(e,e,t,n,s,i)+`}${o}${o}`},[Nr](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(Dr)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:Nr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Dr}(e)${t}${l}${l}`}return`function ${Nr}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+Gr(e,e,t,n,s,i)+`}${l}${l}`},[Rr](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${Rr}(n, m)${r}{${a}${e}${qr(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Kr:Yr:Jr)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${Xr(s,Zr(i,"n",t))};${a}}${a}${a}`}},Fr=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,jr=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Ur=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,Gr=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?Hr:Jr)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${eo(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${Wr(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${Xr(i,"n")}${d}${u}`},Wr=(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}`,qr=(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}`+Kr(e,t+e,n)+`${t}}${i}`},Kr=(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}`},Yr=(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}`},Jr=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,Xr=(e,t)=>e?`Object.freeze(${t})`:t,Zr=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${eo(s)})`:t,Qr=Object.keys(Vr);function eo(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function to(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class no extends qn{declareDeclarator(e,t){this.isUsingDeclaration=t,this.id.declare(e,this.init||vn)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)||this.isUsingDeclaration}include(e,t){const{deoptimized:n,id:s,init:i}=this;n||this.applyDeoptimizations(),this.included=!0,i?.include(e,t),s.markDeclarationReached(),(t||s.shouldBeIncluded(e))&&s.include(e,t)}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;if(c)o.render(e,t);else{const t=ai(e.original,"=",o.end);e.remove(l,ci(e.original,t+1))}if(a){if(o instanceof Gs&&a instanceof nr&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?we:{renderedSurroundingElement:Ee})}else o instanceof Gs&&to(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof Gs&&t instanceof nr&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class so extends qn{constructor(){super(...arguments),this.inlineNamespace=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof gi)return Pe;if(e instanceof Di){const t=e.parent;if(t instanceof gi)return Pe;if(t instanceof no){const e=t.id;return e instanceof wi?oo(e):void 0}if(t instanceof Vi){const e=t.property;if(!t.computed&&e instanceof Gs)return[e.name]}}else if(e instanceof Vi){const t=e.parent,n=e.property;if(!(t instanceof Ui&&n instanceof Gs))return;const s=n.name;if(t.parent instanceof gi&&["catch","finally"].includes(s))return Pe;if("then"!==s)return;if(0===t.arguments.length)return Pe;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof xi||i instanceof xr))return;if(0===i.params.length)return Pe;const r=i.params[0];return 1===i.params.length&&r instanceof wi?oo(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}else{if(this.mechanism&&(e.overwrite(this.start,ai(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([["assert",this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,n,s,i,r,o,a,l){const{format:c}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const u=[...ro[c]||[]];let d;({helper:d,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i)),d&&u.push(d),u.length>0&&this.scope.addAccessedGlobals(u,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},u){const d=u.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const h=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof qt))return{helper:null,mechanism:null};const n=io(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[u,d]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${u}${i}`,a+=`${d})`,!r&&h&&(i=c(["t"],`${i}t${a}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),a=")"),{helper:n,mechanism:{left:i,right:a}}}case"amd":{const s=n?"c":"resolve",i=n?"e":"reject",u=io(e,t,o),[d,p]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=u?`${d}${s}(/*#__PURE__*/${u}(m))${p}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${f},${a}${i})${g})`;return!r&&h&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:u,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function io(e,t,n){return"external"===t?Br[n(e instanceof qt?e.id:null)]:"default"===t?Or:null}const ro={amd:["require"],cjs:["require"],system:["module"]};function oo(e){const t=[];for(const n of e.properties){if("RestElement"===n.type||n.computed||"Identifier"!==n.key.type)return;t.push(n.key.name)}return t}class ao extends qn{applyDeoptimizations(){}}class lo extends qn{applyDeoptimizations(){}}class co extends qn{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=!0;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.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,ci(e.original,ai(e.original,":",this.label.end)+1)),this.body.render(e,t)}}class uo extends qn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return re(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=oe(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath(Z);const{scope:{context:t},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=Pe;for(const e of n)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):ae}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new sr([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===this.right&&this.left.shouldBeIncluded(e)||!n?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=we){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=ai(e.original,this.operator,this.left.end);if(this.right.included){const t=ci(e.original,o+2);e.remove(this.start,t),s&&fi(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!ui.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(X,se,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}const ho="ROLLUP_FILE_URL_",po="import";class fo extends qn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;return t===po&&n?.startsWith(ho)?e.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===po)){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Vi&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(ho)&&(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}=r;if(o!==po)return;const f=c;if(u){const t=s.getFileName(u),i=k(O(C(f),t)),r=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||wo[n](i);return void e.overwrite(l.start,l.end,r,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=vo[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=mo.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof Vi?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(d,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(ho)?yo:go)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const mo=["cjs","iife","umd"],go={amd:["document","module","URL"],cjs:["document","require","URL",Mr],es:[],iife:["document","URL",Mr],system:["module"],umd:["document","require","URL",Mr]},yo={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},bo=(e,t="URL")=>`new ${t}(${e}).href`,Eo=(e,t=!1)=>bo(`'${B(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),xo=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},$o=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,Ao=e=>$o(`__dirname + '/${B(e)}'`),So=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${Mr} && ${Mr}.src || new URL('${B(e)}', document.baseURI).href)`,wo={amd:e=>("."!==e[0]&&(e="./"+e),bo(`require.toUrl('${B(e)}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${Ao(e)} : ${Eo(e)})`,es:e=>bo(`'${B(e)}', import.meta.url`),iife:e=>Eo(e),system:e=>bo(`'${B(e)}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${Ao(e)} : ${Eo(e,!0)})`},vo={amd:xo((()=>bo("module.uri, document.baseURI"))),cjs:xo((e=>`(typeof document === 'undefined' ? ${$o("__filename")} : ${So(e)})`)),iife:xo((e=>So(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:xo((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${$o("__filename")} : ${So(e,!0)})`))};class Po extends qn{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(X,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}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),_i(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,X,se),this.scope.context.requestTreeshakingPass()}}class Io extends qn{constructor(){super(...arguments),this.objectEntity=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)}render(e,t,{renderedSurroundingElement:n}=we){super.render(e,t),n!==Ee&&n!==ge||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=ss;const t=[];for(const n of this.properties){if(n instanceof Hn){t.push({key:H,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(X,se,this);if("symbol"==typeof e){t.push({key:H,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Gs?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){e=n.value instanceof Li&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new es(t,e)}}class ko extends qn{initialise(){const e=this.scope.context.module.id;return rt(zt(ot(Lt(this.message)),e))}}class No extends qn{initialise(){const e=this.start,t=this.scope.context.module.id,n=zt(ot(Lt(this.message,e)),t);this.scope.context.error(n,e)}}class Co extends qn{}class Do extends qn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Un()):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(ze,wt(e,s.id,Ue(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(Te,kt(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=di(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}hi(this.body,e,n,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class Oo extends Yi{constructor(){super(...arguments),this.declarationInit=null}get method(){return re(this.flags,262144)}set method(e){this.flags=oe(this.flags,262144,e)}get shorthand(){return re(this.flags,524288)}set shorthand(e){this.flags=oe(this.flags,524288,e)}declare(e,t){return this.declarationInit=t,this.value.declare(e,ue)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([H,H]),this.scope.context.requestTreeshakingPass())}}class Ro extends qn{get computed(){return re(this.flags,1024)}set computed(e){this.flags=oe(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):ae}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):de}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||Ki(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}}class Mo extends qn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||ue)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}class _o extends qn{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 gi)||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=we){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of pi(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&fi(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 ri(l,e,u,d);o&&e.remove(o,this.end)}}class Lo extends qn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}}class Bo extends qn{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.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:ai(e.original,"default",this.start)+7,i=ai(e.original,":",s)+1;hi(this.consequent,e,i,n.end,t)}else super.render(e,t)}}Bo.prototype.needsBoundaries=!0;class To extends qn{createScope(e){this.parentScope=e,this.scope=new mi(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=Un();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}parseNode(e){return this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(this,this.parentScope).parseNode(e.discriminant),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&hi(this.cases,e,this.cases[0].start,this.end-1,t)}}class zo extends ji{bind(){if(super.bind(),this.tag.type===xe){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(Te,$t(e),this.start)}}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(X,this.interaction,e)}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[n]=this.getReturnExpression();n.included||n.include(e,!1)}initialise(){super.initialise(),this.args=[ue,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Vi&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,X,se),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=se){return null===this.returnExpression?(this.returnExpression=de,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(X,this.interaction,e,this)):this.returnExpression}}class Vo extends qn{get tail(){return re(this.flags,1048576)}set tail(e){this.flags=oe(this.flags,1048576,e)}bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}class Fo extends qn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?ae:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?de:Vn(Tn,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||zn(Tn,e[0],t,n)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class jo extends Ae{constructor(){super("undefined")}getLiteralValueAtPath(){}}class Uo extends js{constructor(e,t,n){super(e,t,t.declaration,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof pr||s instanceof tr)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof Gs&&(this.originalId=s)}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 jo||"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 Uo&&!n.has(t));return this.originalVariable=t||e}}class Go extends ei{constructor(e,t){super(e,t),this.variables.set("this",new js("this",null,vn,t,"other"))}addDeclaration(e,t,n,s){return this.context.module.importDescriptions.has(e.name)&&t.error(Bt(e.name),e.start),super.addDeclaration(e,t,n,s)}addExportDefaultDeclaration(e,t,n){const s=new Uo(e,t,n);return this.variables.set("default",s),s}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 Fs&&this.accessedOutsideVariables.set(e,n),n}}class Wo extends qn{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(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof Go?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(Te,{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:Ke("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 qo extends qn{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class Ho extends qn{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?Gn: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)}}const Ko={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>ae,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class Yo extends qn{get prefix(){return re(this.flags,2097152)}set prefix(e){this.flags=oe(this.flags,2097152,e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return ae;const s=this.argument.getLiteralValueAtPath(X,t,n);return"symbol"==typeof s?ae:Ko[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Gs)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(X,fe,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(X),this.scope.context.requestTreeshakingPass())}}class Jo extends qn{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.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(ue)}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?Ai(s,this.start,this.end,e,t):Si(s,this.start,this.end,this.parent.type!==Ee,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${$i([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==Ee,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(X),this.argument instanceof Gs){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}class Xo extends qn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(X)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=we){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 wi||i instanceof bs)&&r.include(e,t)}}initialise(){super.initialise(),this.isUsingDeclaration="await using"===this.kind||"using"===this.kind;for(const e of this.declarations)e.declareDeclarator(this.kind,this.isUsingDeclaration)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=we){if(this.isUsingDeclaration||function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===xe){if(t.has(n.id.variable))return!1}else{const e=[];if(n.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,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)}applyDeoptimizations(){}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,` ${$i(r,o)};`)}renderReplacedDeclarations(e,t){const n=pi(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=ci(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 Gs&&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 Gs&&to(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=ai(e.original,"=",d.id.end);Ai(h,ci(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 e.remove(p,g),d.removeAnnotations(e);this.renderDeclarationEnd(e,u,r,s,i,d,t)}}class Zo extends qn{hasEffects(e){return!!this.test.hasEffects(e)||lr(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),cr(e,this.body,t)}}class Qo extends qn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const ea=["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","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"],ta=[ko,No,ys,bs,xi,vi,Pi,Di,Ri,yi,Mi,Ui,Gi,Wi,Hi,tr,nr,ir,rr,or,ar,gi,ur,dr,hr,fr,mr,gr,gi,yr,br,Er,pr,xr,Gs,Sr,wr,vr,Pr,so,ao,lo,co,Li,Li,Li,Li,Li,Li,uo,Vi,fo,Ji,Po,Io,wi,Co,Do,Oo,Ro,bi,Mo,_o,Hn,Xi,Lo,Bo,To,zo,Vo,Fo,Wo,qo,Ho,Yo,Jo,Xo,no,Zo,Qo],na=[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=ia(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=ia(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=bn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=e.params=ia(e,s,n[t+2],n);s.addParameterVariables(o.map((e=>e.declare("parameter",ue))),o[o.length-1]instanceof bi),e.body=sa(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=mn[n[t]],e.left=sa(e,s,n[t+1],n),e.right=sa(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=sa(e,s,n[t],n),e.right=sa(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=mn[n[t]],e.left=sa(e,s,n[t+1],n),e.right=sa(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=ia(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:sa(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=bn(n[t+1],n),e.callee=sa(e,s,n[t+2],n),e.arguments=ia(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:sa(e,s,i,n);r?.declare("parameter",ue),e.body=sa(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.body=[];if(i){const t=n[i];for(let o=0;o<t;o++){const t=n[i+1+o];r.push(sa(e,1&n[t+3]?s:s.instanceScope,t,n))}}},function(e,t,n){const{scope:s}=e;e.decorators=ia(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:sa(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:sa(e,s,r,n),e.body=sa(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=ia(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:sa(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:sa(e,s,r,n),e.body=sa(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=sa(e,s,n[t],n),e.consequent=sa(e,s,n[t+1],n),e.alternate=sa(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:sa(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=sa(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=sa(e,s,n[t],n),e.test=sa(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:sa(e,s,i,n),e.source=sa(e,s,n[t+1],n),e.attributes=ia(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=ia(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:sa(e,s,i,n),e.attributes=ia(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:sa(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=sa(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:sa(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=sa(e,s,n[t],n),e.right=sa(e,s,n[t+1],n),e.body=sa(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=sa(e,s,n[t+1],n),e.right=sa(e,s,n[t+2],n),e.body=sa(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:sa(e,s,i,n);const r=n[t+1];e.test=0===r?null:sa(e,s,r,n);const o=n[t+2];e.update=0===o?null:sa(e,s,o,n),e.body=sa(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=bn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:sa(e,s.parent,o,n);const a=e.params=ia(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",ue))),a[a.length-1]instanceof bi),e.body=sa(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=bn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:sa(e,e.idScope,o,n);const a=e.params=ia(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",ue))),a[a.length-1]instanceof bi),e.body=sa(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=sa(e,s,n[t],n),e.consequent=sa(e,e.consequentScope=new $r(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:sa(e,e.alternateScope=new $r(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=sa(e,s,n[t],n),e.value=sa(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=ia(e,s,n[t],n),e.source=sa(e,s,n[t+1],n),e.attributes=ia(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.local=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=sa(e,s,n[t],n),e.sourceAstNode=$n(n[t],n);const i=n[t+1];e.options=0===i?null:sa(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.local=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=sa(e,s,n[t+1],n),e.imported=0===i?e.local:sa(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.label=sa(e,s,n[t],n),e.body=sa(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=mn[n[t]],e.left=sa(e,s,n[t+1],n),e.right=sa(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=sa(e,s,n[t+1],n),e.property=sa(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=sa(e,s,n[t],n),e.property=sa(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=ia(e,s,n[t+1],n),e.key=sa(e,s,n[t+2],n),e.value=sa(e,s,n[t+3],n),e.kind=mn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=bn(n[t],n),e.callee=sa(e,s,n[t+1],n),e.arguments=ia(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=ia(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=ia(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=ia(e,s,n[t],n),e.invalidAnnotations=bn(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=sa(e,s,n[t+2],n),e.kind=mn[n[t+3]],e.key=0===r?e.value:sa(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=ia(e,s,n[t+1],n),e.key=sa(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:sa(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:sa(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=ia(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=ia(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:sa(e,s,i,n),e.consequent=ia(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=sa(e,e.parentScope,n[t],n),e.cases=ia(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=sa(e,s,n[t],n),e.quasi=sa(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=ia(e,s,n[t],n),e.expressions=ia(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=sa(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=sa(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:sa(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:sa(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=mn[n[t]],e.argument=sa(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=mn[n[t+1]],e.argument=sa(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=mn[n[t]],e.declarations=ia(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=sa(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:sa(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=sa(e,s,n[t],n),e.body=sa(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:sa(e,s,r,n)}];function sa(e,t,n,s){const i=s[n],r=ta[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=ea[i],o.start=s[n+1],o.end=s[n+2],na[i](o,n+3,s),o.initialise(),o}function ia(e,t,n,s){if(0===n)return Pe;const i=s[n++],r=[];for(let o=0;o<i;o++){const i=s[n++];r.push(i?sa(e,t,i,s):null)}return r}const ra={ArrayExpression:ys,ArrayPattern:bs,ArrowFunctionExpression:xi,AssignmentExpression:vi,AssignmentPattern:Pi,AwaitExpression:Di,BinaryExpression:Ri,BlockStatement:yi,BreakStatement:Mi,CallExpression:Ui,CatchClause:Gi,ChainExpression:Wi,ClassBody:Hi,ClassDeclaration:tr,ClassExpression:nr,ConditionalExpression:ir,ContinueStatement:rr,DebuggerStatement:or,Decorator:ar,DoWhileStatement:ur,EmptyStatement:dr,ExportAllDeclaration:hr,ExportDefaultDeclaration:fr,ExportNamedDeclaration:mr,ExportSpecifier:gr,ExpressionStatement:gi,ForInStatement:yr,ForOfStatement:br,ForStatement:Er,FunctionDeclaration:pr,FunctionExpression:xr,Identifier:Gs,IfStatement:Sr,ImportAttribute:wr,ImportDeclaration:vr,ImportDefaultSpecifier:Pr,ImportExpression:so,ImportNamespaceSpecifier:ao,ImportSpecifier:lo,LabeledStatement:co,Literal:Li,LogicalExpression:uo,MemberExpression:Vi,MetaProperty:fo,MethodDefinition:Ji,NewExpression:Po,ObjectExpression:Io,ObjectPattern:wi,PanicError:ko,ParseError:No,PrivateIdentifier:Co,Program:Do,Property:Oo,PropertyDefinition:Ro,RestElement:bi,ReturnStatement:Mo,SequenceExpression:_o,SpreadElement:Hn,StaticBlock:Xi,Super:Lo,SwitchCase:Bo,SwitchStatement:To,TaggedTemplateExpression:zo,TemplateElement:Vo,TemplateLiteral:Fo,ThisExpression:Wo,ThrowStatement:qo,TryStatement:Ho,UnaryExpression:Yo,UnknownNode:class extends qn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:Jo,VariableDeclaration:Xo,VariableDeclarator:no,WhileStatement:Zo,YieldExpression:Qo},oa="_missingExportShim";class aa extends Ae{constructor(e){super(oa),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}class la extends Ae{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],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.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):he(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===J?"Module":ae}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of t)if("*"!==n[0]&&n!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(n);t&&(e[n]=t)}return this.memberVariables=e}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.getMemberVariables()[i];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}include(){super.include(),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([Rr],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.getMemberVariables(),p=Object.entries(h).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${_e(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${Rr}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${eo(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${u}${$i([this],e)};`),f}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}}}}la.prototype.isNamespace=!0;class ca extends Ae{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 Uo||e instanceof ca;){if(e instanceof Uo){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof ca&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){super.include(),this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var ua;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(ua||(ua={}));const da=new WeakMap;function ha(e,t){if(e){const t=da.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=i.encode(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||ha(e)}function pa(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},r={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?i.decode(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return da.set(r,s),r}function fa(e){return e.id}const ma=(e,{allowReturnOutsideFunction:t=!1}={})=>function(e){const t=$n(0,e);switch(t.type){case"PanicError":return rt(ot(Lt(t.message)));case"ParseError":return rt(ot(Lt(t.message,t.start)));default:return t}}(Sn(dn(e,t))),ga=new Set(["assert","with"]);function ya(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof Io))return n&&t.module.log(Te,Dt(t.module.id),s),ve;const i=n.properties.find((e=>ga.has(ba(e))))?.value;if(!i)return ve;if(!(i instanceof Io))return t.module.log(Te,(r=t.module.id,{code:dt,message:`Rollup could not statically analyze the options argument of a dynamic import in "${z(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),ve;var r;const o=i.properties.map((e=>{const n=ba(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(Te,Dt(t.module.id),e.start),null)})).filter((e=>!!e));return o.length>0?Object.fromEntries(o):ve}const ba=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Ea(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some((n=>e[n]!==t[n]))}var xa="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},$a={memoryUsage:()=>({heapUsed:0})};let Aa=new Map;function Sa(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function wa(e,t=3){e=Sa(e,t);const n=$a.memoryUsage().heapUsed,s=xa.now(),i=Aa.get(e);void 0===i?Aa.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function va(e,t=3){e=Sa(e,t);const n=Aa.get(e);if(void 0!==n){const e=$a.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=xa.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Pa(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of Aa)e[t]=[s,n,i];return e}let Ia=$s,ka=$s;const Na=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function Ca(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Na)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Ia(s,4);const t=r.apply(this,e);return ka(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}function Da(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 qt||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const Oa={identifier:null,localName:oa};function Ra(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:rt((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${z(a)}" as it is a reexport that references itself.`}));r.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function Ma(e,t){const n=G(t.sideEffectDependenciesByVariable,e,W);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof Uo?s.getDirectOriginalVariable():s instanceof ca?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 _a{constructor(e,t,n,s,i,r,o,a){this.graph=e,this.id=t,this.options=n,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.implicitlyLoadedAfter=new Set,this.implicitlyLoadedBefore=new Set,this.importDescriptions=new Map,this.importMetas=[],this.importedFromNotTreeshaken=!1,this.importers=[],this.includedDynamicImporters=[],this.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new aa(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:u,exportAllSources:d,exports:h,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAttributes:y}=this;this.info={ast:null,attributes:a,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return u.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of d)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...d].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,fa).sort()},get implicitlyLoadedBefore(){return Array.from(f,fa).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:s,isExternal:!1,get isIncluded(){return e.phase!==ua.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=N(this.id),t=D(this.id);return Oe(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){ke(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),rt(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof qt)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}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.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&n.add(t)}for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof ca?s=s.getBaseVariable():s instanceof Uo&&(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}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[n]=this.getVariableForExportName(t);if(n instanceof Uo&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof Se))continue;const s=e.get(n);s?s.push(t):e.set(n,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof qt)e.add(`*${t.id}`);else for(const n of[...t.getReexports(),...t.getExports()])"default"!==n&&e.add(n);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const n of this.exports.keys()){const[s]=this.getVariableForExportName(n);(s?.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:rt((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${z(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,isExportAllSearch:n,onlyExplicit:s,searchedNamesAndModules:i}=ve){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=Ra(r.module,r.localName,t,!1,i);return e?(t&&(La(e,t,this),this.info.moduleSideEffects&&G(t.sideEffectDependenciesByVariable,e,W).add(this)),[e]):this.error(Rt(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===Oa)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(La(n,t,this),G(t.sideEffectDependenciesByVariable,n,W).add(this)),[n]}if(s)return[null];if("default"!==e){const n=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,i);if(this.namespaceReexportsByName.set(e,n),n[0])return n}return this.info.syntheticNamedExports?[G(this.syntheticExports,e,(()=>new ca(this.astContext,e,this.getSyntheticNamespace())))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=jn();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(Da(this),this.graph.needsTreeshakingPass=!0);for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(s)[0];if(!e)return rt((t=s,n=this.id,{binding:t,code:pt,exporter:n,message:`Exported variable "${t}" is not defined in "${z(n)}".`,url:Ke(Ye)}));e.deoptimizePath(Z),e.included||this.includeVariable(e)}var t,n;for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath(Z),t.included||this.includeVariable(t),t instanceof Se&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(jn(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(Da(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const n of e){const e=this.getVariableForExportName(n)[0];e&&(e.deoptimizePath(Z),e.included||this.includeVariable(e)),this.exports.has(n)||this.reexportDescriptions.has(n)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const n=this.graph.modulesById.get(this.resolvedIds[t].id);n instanceof qt?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){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?rt((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.`})):{source:t,usesTopLevelAwait:n};var s,i}async setSource({ast:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){if(Ia("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.originalCode=s,this.originalSourcemap=pa(i),this.sourcemapChain=o.map((e=>e.missing?e:pa(e))),ha(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new b(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>ra[e]||ra.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),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,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new Go(this.graph.scope,this.astContext),this.namespace=new la(this.astContext);const d={context:this.astContext,type:"Module"};if(e)this.ast=new ra[e.type](d,this.scope).parseNode(e),this.info.ast=e;else{ka("generate ast",3);const e=await async function(e,t){return dn(e,t)}(t,!1);Ia("generate ast",3),this.ast=(h=e,p=d,f=this.scope,sa(p,f,0,Sn(h))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(u,e),e)}}})}var h,p,f;ka("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,fa),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s}=ve){const i=this.scope.variables.get(e);if(i)return i;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof _a&&"*"===r.name)return e.namespace;const[i]=Ra(e,r.name,t||this,n,s);return i||this.error(Rt(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n}){null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=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,resolution:null})}assertUniqueExportName(e,t){(this.exports.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 fr)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof hr){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof Li?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof Li){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof Li?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof Li?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof Xo)for(const e of t.declarations)for(const t of Kt(e.id))this.assertUniqueExportName(t,e.id.start),this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof Gs?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const e=n.local.name;(this.scope.variables.has(e)||this.importDescriptions.has(e))&&this.error(Bt(e),n.local.start);const s=n instanceof Pr?"default":n instanceof ao?"*":n.imported instanceof Gs?n.imported.name:n.imported.value;this.importDescriptions.set(e,{module:null,name:s,source:t,start:n.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Ue(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];for(const e of n)if(e[0]>=t.column||e===s){t={column:e[3],line:e[2]+1};continue 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(Te,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))}at(e,{column:i,line:r},n,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];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 qt||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=(s=t.attributes,s?.length?Object.fromEntries(s.map((e=>[ba(e),e.value.value]))):ve);var s;const i=this.sourcesWithAttributes.get(e);i?Ea(i,n)&&this.log(Te,Pt(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n)}getVariableFromNamespaceReexports(e,t,n){let s=null;const i=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=Ra(o,e,t,!0,Ba(n));o instanceof qt||l?r.add(a):a instanceof ca?s||(s=a):a&&i.set(a,o)}if(i.size>0){const t=[...i],n=t[0][0];return 1===t.length?[n]:(this.options.onLog(Te,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${z(a)}" re-exports "${o}" from one of the modules ${He(l.map((e=>z(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],n=t[0];return t.length>1&&this.options.onLog(Te,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${z(t)}" re-exports "${e}" from one of the external modules ${He(s.map((e=>z(e))))}, guessing "${z(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map((e=>e.module.id)))),[n,!0]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof qt){const[t]=n.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof _a){t.includedDynamicImporters.push(this);const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof _a&&t!==this&&Ma(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof _a&&(t.isExecuted||Da(t),t!==this)){const t=Ma(e,this);for(const e of t)e.isExecuted||Da(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(Te,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${z(t)}".`})),this.exports.set(e,Oa)}tryParse(){try{return ma(this.info.code)}catch(e){return this.error(zt(e,this.id),e.pos)}}}function La(e,t,n){if(e.module instanceof _a&&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 Ba=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function Ta(e){return e.endsWith(".js")?e.slice(0,-3):e}function za(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${Ta(t)}`:e.id??""}function Va(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 Fa(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=Fa(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}${Ga(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 Fa(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=_r[t]?i:e;return Lr(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:Br[o(a)])?r:e:`${e}${c(t)}`}function ja(e){return e([["value","true"]],{lineBreakIndent:null})}function Ua(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",ja(i)],[null,`[Symbol.toStringTag]:${s}${eo(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${ja(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${eo(i)});`}return""}const Ga=(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 Wa(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,Or,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=_r[e])):"*"!==t||"*"===i||a||(a=!0,s=Br[e],c=l),s&&p(c,s,o)}}return`${zr(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function qa(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":Ta(e);var n}const Ha=new Set(["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);function Ka(e,t){const n=t.map((({importPath:e})=>e)).filter((e=>Ha.has(e)||e.startsWith("node:")));0!==n.length&&e(Te,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${He(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const Ya=(e,t)=>e.split(".").map(t).join("");function Ja(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in{};o&&l&&o(Te,Tt(a[0])),a[0]=("function"==typeof n?n(a[0]):l?null: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 Xa(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 Za=({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},Qa=(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""},el=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",tl=(e,t,n)=>nl(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,n);function nl(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}${_e(e)}:${n}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const sl=(e,t,n)=>nl(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,n),il=(e,t,n)=>nl(e.filter((e=>e.local===oa)).map((e=>({name:e.exported,value:oa}))),t,n);function rl(e,t,n){return e?`${t}${Ya(e,n)}`:"null"}var ol={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:$,strict:A}){Ka(h,n);const S=n.map((e=>`'${qa(e.importPath,m.forceJsExtensionForImports)}'`)),w=n.map((e=>e.name)),{n:v,getNonArrowFunctionIntro:P,_:I}=f;d&&r&&(w.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(w.unshift("require"),S.unshift("'require'")),t.has("module")&&(w.unshift("module"),S.unshift("'module'"));const k=za(m,o),N=(k?`'${k}',${I}`:"")+(S.length>0?`[${S.join(`,${I}`)}],${I}`:""),C=A?`${I}'use strict';`:"";e.prepend(`${l}${Wa(n,x,y,b,E,t,a,f)}`);const D=Va(s,n,d,x,f,a,y,$);let O=Ua(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);O&&(O=v+v+O),e.append(`${D}${O}${p}`).indent(a).prepend(`${m.define}(${N}(${P(w,{isAsync:!1,name:null})}{${C}${v}${v}`).append(`${v}${v}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:d,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},reexportProtoFromExternal:E,strict:x}){const{_:$,n:A}=h,S=x?`'use strict';${A}${A}`:"";let w=Ua(u&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);w&&(w+=A+A);const v=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}')`);if(r)return`${r};${s}${s}`;return""}(n,h,p),P=Wa(n,y,m,g,b,t,o,h);e.prepend(`${S}${a}${w}${v}${P}`);const I=Va(s,n,u,y,h,o,m,E,`module.exports${$}=${$}`);e.append(`${I}${d}`)},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}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(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:`${Le(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 ${Le(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map((e=>e.imported===e.reexported?Le(e.imported):`${Le(e.imported)} as ${Le(e.reexported)}`)).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=zr(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=[];for(const r of e)r.expression&&s.push(`${n} ${r.local}${t}=${t}${r.expression};`),i.push(r.exported===r.local?r.local:`${r.local} as ${Le(r.exported)}`);i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return 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,indent:o,intro:a,namedExportsMode:l,log:c,outro:u,snippets:d},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,reexportProtoFromExternal:y,globals:b,interop:E,name:x,generatedCode:{symbols:$},strict:A}){const{_:S,getNonArrowFunctionIntro:w,getPropertyAccess:v,n:P}=d,I=x&&x.includes("."),k=!f&&!I;if(x&&k&&(De(N=x)||Ce.test(N)))return rt(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:Ke("configuration-options/#output-extend")}}(x));var N;Ka(c,n);const C=Xa(n),D=C.map((e=>e.globalName||"null")),O=C.map((e=>e.name));r&&!x&&c(Te,{code:mt,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:Ke(st)}),l&&r&&(f?(D.unshift(`this${Ya(x,v)}${S}=${S}this${Ya(x,v)}${S}||${S}{}`),O.unshift("exports")):(D.unshift("{}"),O.unshift("exports")));const R=A?`${o}'use strict';${P}`:"",M=Wa(n,E,g,m,$,t,o,d);e.prepend(`${a}${M}`);let _=`(${w(O,{isAsync:!1,name:null})}{${P}${R}${P}`;r&&(!x||f&&l||(_=(k?`var ${x}`:`this${Ya(x,v)}`)+`${S}=${S}${_}`),I&&(_=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in{};a&&c&&a(Te,Tt(l[0])),l[0]=("function"==typeof n?n(l[0]):c?null: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")}(x,"this",b,d,h,c)+_));let L=`${P}${P}})(${D.join(`,${S}`)});`;r&&!f&&l&&(L=`${P}${P}${o}return exports;${L}`);const B=Va(s,n,l,E,d,o,g,y);let T=Ua(l&&r,!0===p||"if-default-prop"===p&&i,$,d);T&&(T=P+P+T),e.append(`${B}${T}${u}`).indent(o).prepend(_).append(L)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:u,freeze:d,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:$,setters:A,starExcludes:S}=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=Za({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,r,a),w=h?`'${h}',${g}`:"",v=t.has("module")?["exports","module"]:i?["exports"]:[];let P=`System.register(${w}[`+n.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${b(v,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Qa(S,r,a)+el($,r,a)+`${E}${r}return${g}{${A.length>0?`${E}${r}${r}setters:${g}[${A.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;P+=`${r}${r}execute:${g}(${b([],{isAsync:c,name:null})}{${E}${E}`;const I=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+zr(null,t,r,a,u,d,p)+tl(s,r,a)).append(`${l}${E}${E}`+sl(s,r,a)+il(s,r,a)).indent(`${r}${r}${r}`).append(I).prepend(P)},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:$},globals:A,noConflict:S,reexportProtoFromExternal:w,strict:v}){const{_:P,cnst:I,getFunctionIntro:k,getNonArrowFunctionIntro:N,getPropertyAccess:C,n:D,s:O}=h,R=f?"f":"factory",M=f?"g":"global";if(r&&!x)return rt({code:mt,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:Ke(st)});Ka(u,n);const _=n.map((e=>`'${qa(e.importPath,p.forceJsExtensionForImports)}'`)),L=n.map((e=>`require('${e.importPath}')`)),B=Xa(n),T=B.map((e=>rl(e.globalName,M,C))),z=B.map((e=>e.name));c&&(r||S)&&(_.unshift("'exports'"),L.unshift("exports"),T.unshift(Ja(x,M,A,(g?`${rl(x,M,C)}${P}||${P}`:"")+"{}",h,u)),z.unshift("exports"));const V=za(p,o),F=(V?`'${V}',${P}`:"")+(_.length>0?`[${_.join(`,${P}`)}],${P}`:""),j=p.define,U=!c&&r?`module.exports${P}=${P}`:"",G=v?`${P}'use strict';${D}`:"";let W;if(S){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${P}=${P}${Ja(x,M,A,`${R}(${T.join(`,${P}`)})`,h,u)};`;else{t=`${I} ${e}${P}=${P}${T.shift()};${D}${a}${a}${R}(${[e,...T].join(`,${P}`)});`}W=`(${k([],{isAsync:!1,name:null})}{${D}${a}${a}${I} current${P}=${P}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map((e=>i+=s(e))).join(`${n}&&${n}`)}(x,M,h)};${D}${a}${a}${t}${D}${a}${a}${e}.noConflict${P}=${P}${k([],{isAsync:!1,name:null})}{${P}${rl(x,M,C)}${P}=${P}current;${P}return ${e}${O}${P}};${D}${a}})()`}else W=`${R}(${T.join(`,${P}`)})`,!c&&r&&(W=Ja(x,M,A,W,h,u));const q=r||S&&c||T.length>0,H=[R];q&&H.unshift(M);const K=q?`this,${P}`:"",Y=q?`(${M}${P}=${P}typeof globalThis${P}!==${P}'undefined'${P}?${P}globalThis${P}:${P}${M}${P}||${P}self,${P}`:"",J=q?")":"",X=q?`${a}typeof exports${P}===${P}'object'${P}&&${P}typeof module${P}!==${P}'undefined'${P}?${P}${U}${R}(${L.join(`,${P}`)})${P}:${D}`:"",Z=`(${N(H,{isAsync:!1,name:null})}{${D}`+X+`${a}typeof ${j}${P}===${P}'function'${P}&&${P}${j}.amd${P}?${P}${j}(${F}${R})${P}:${D}`+`${a}${Y}${W}${J};${D}`+`})(${K}(${N(z,{isAsync:!1,name:null})}{${G}${D}`,Q=D+D+"}));";e.prepend(`${l}${Wa(n,E,y,b,$,t,a,h)}`);const ee=Va(s,n,c,E,h,a,y,w);let te=Ua(c&&r,!0===m||"if-default-prop"===m&&i,$,h);te&&(te=D+D+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};const al=(e,t)=>t?`${e}\n${t}`:e,ll=(e,t)=>t?`${e}\n\n${t}`:e;const cl={amd:hl,cjs:hl,es:dl,iife:hl,system:dl,umd:hl};function ul(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){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof Uo&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Zs(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Zs(t.name,e,t.forbiddenNames))}}}(s,f,p),cl[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function dl(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof U)&&(t.variableName=Zs(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof qt)?n.setRenderNames(null,(t instanceof qt?a.get(t):o.get(t)).variableName):t instanceof qt&&"default"===s?n.setRenderNames(null,Zs([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Zs(Oe(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Zs(t.name,e,t.forbiddenNames))}function hl(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Zs(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Zs(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Tr(r(t.id),a)?t.namespaceVariableName:Zs(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof qt){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=_r[s]?n.defaultVariableName:n.variableName;Lr(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,Br[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 pl(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return rt(Ct("default",o,i))}else if("none"===t&&o.length>0)return rt(Ct("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(Te,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${z(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:Ke(Ze)}}(i,n)),t="named")),t}function fl(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 ml(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof qt){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),ml(e,t,n,s,i,r)):t.push(o)}}const gl="!~{",yl="}~",bl=new RegExp(`${gl}[0-9a-zA-Z_$]{1,17}${yl}`,"g"),El=(e,t)=>e.replace(bl,(e=>t.get(e)||e)),xl=(e,t,n)=>e.replace(bl,(e=>e===t?n:e)),$l=Symbol("bundleKeys"),Al={type:"placeholder"};function Sl(e,t,n){return V(e)?rt(Gt(`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 rt(Gt(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return V(r)?rt(Gt(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function wl(e,{[$l]:t}){if(!t.has(e.toLowerCase()))return e;const n=D(e);e=e.slice(0,Math.max(0,e.length-n.length));let s,i=1;for(;t.has((s=e+ ++i+n).toLowerCase()););return s}const vl=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Pl(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(Te,(r=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:Ke("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class Il{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.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,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.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)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Oe(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new Il([],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 _a?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 ca&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>El(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)}}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=Xs(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Xs(s))}while(Ne.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=pl(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 e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&n.add(t);for(const s of t){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(Il.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=kl(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}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 B(j(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=N(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Sl("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=wl(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Al),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,t=null;const{sourcemapFileNames:n,format:s}=this.outputOptions;if(!n)return null;{const[i,r]=[n,"output.sourcemapFileNames"];e=Sl("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,r,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>s,hash:e=>t||(t=this.getPlaceholder(r,e||8)),name:()=>this.getChunkName()}),t||(e=wl(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Ol),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Ol),importedBindings:Cl(this.getRenderedDependencies(),Ol),imports:Array.from(this.dependencies,Ol),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof la?"*":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=[];ml(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)}async render(){const{dependencies:e,exportMode:t,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=i;if(l&&!c&&null!==n)for(const t of e)t instanceof Il&&this.inlineChunkDependencies(t);const u=this.getPreliminaryFileName(),d=this.getPreliminarySourcemapFileName(),{accessedGlobals:h,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(u.fileName),b=[...this.getRenderedDependencies().values()],E="none"===t?[]:this.getChunkExportDeclarations(a);let x=E.length>0,$=!1;for(const e of b){const{reexports:t}=e;t?.length&&(x=!0,!$&&t.some((e=>"default"===e.reexported))&&($=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!E.find((({exported:t})=>t===e))))))}if(!$)for(const{exported:e}of E)if("default"===e){$=!0;break}const{intro:A,outro:S,banner:w,footer:v}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],al),t.hookReduceValue("footer",e.footer(n),[n],al),t.hookReduceValue("intro",e.intro(n),[n],ll),t.hookReduceValue("outro",e.outro(n),[n],ll)]);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 rt((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(i,r,this.getRenderedChunkInfo());if(ol[a](m,{accessedGlobals:h,dependencies:b,exports:E,hasDefaultExport:$,hasExports:x,id:u.fileName,indent:p,intro:A,isEntryFacade:c||null!==n&&n.info.isEntry,isModuleFacade:null!==n,log:s,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:y},i),w&&f.prepend(w),"es"===a||"cjs"===a){const e=null!==n&&n.info.isEntry&&n.shebang;e&&f.prepend(`#!${e}\n`)}return v&&f.append(v),{chunk:this,magicString:f,preliminaryFileName:u,preliminarySourcemapFileName:d,usedModules:g}}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):kl(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof _a){const l=this.chunkByModule.get(n);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(Te,(s=n.getExportNamesByVariable().get(e)?.[0]||"*",i=n.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${s}" of module "${z(i)}" was reexported through module "${z(r)}" 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 "${z(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var s,i,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof ca,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof la&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof _a){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(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?kl(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 ca)){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 js){for(const e of s.declarations)if(e.parent instanceof pr||e instanceof fr&&e.declaration instanceof pr){r=!0;break}}else s instanceof ca&&(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 qt){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?_r[n(o.id)]&&i.add(a):t.isNamespace&&Br[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every((e=>e.startsWith("*"))))&&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 Il||e instanceof U)))}getDynamicImportStringAndAttributes(e,t){if(e instanceof qt){const n=this.externalChunkByModule.get(e);return[`'${n.getImportPath(t)}'`,n.getImportAttributes(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAttributes||null]}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;if(s instanceof qt){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return rt(jt(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);G(t,i,q).push({imported:r,local:n.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n,resolution:s}of t.dynamicImports)n.included&&e.push(s instanceof _a?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof qt?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:n,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:s});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(),facadeModuleId:t&&t.id,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=Nl(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(k(e.id.split(Dl,1)[0])),r=D(i),o=vl.has(r)?i.slice(0,-r.length):i;return P(o)?n&&R(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):"/"!==this.inputBase||o.startsWith("/")?O(this.inputBase,o):O(this.inputBase,o.replace(/^[a-zA-Z]:[/\\]/,"/")):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+N(o)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o=!1;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(Te,Ut(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof ca)continue;const a=n.module;if(a instanceof _a){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 rt(jt(a.id,r,!0));o=e&&("default"!==r||Lr(t(a.id),!0))}}G(n,i,q).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();for(const i of this.dependencies){const r=e.get(i)||null,o=t.get(i)||null,a=i instanceof U||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof U?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof U&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Pl(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof Il,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Il&&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}}=l,{_:g,cnst:y,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const $=new x({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=fl(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let w="";const v=new Set,P=new Map,I={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,indent:A,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let k=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(I);!I.accessedDocumentCurrentScript&&mo.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(Mr),I.accessedDocumentCurrentScript=!1,({source:n}=r),k||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),P.set(e,n),$.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(I);o.renderFirst()?w+=E+e:$.addSource(new b(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}w&&$.prepend(w+E+E),this.needsExportsShim&&$.prepend(`${E}${y} ${oa}${g}=${g}void 0;${E}${E}`);const N=h?$:$.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(Te,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:v,indent:A,magicString:$,renderedSource:N,usedModules:S,usesTopLevelAwait:k}}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,c,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e);o.setExternalResolution("external",a,n,i,s,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions,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 ca?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(oa),t&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Qr)o.add(e)}ul(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)){const n=e.namespace.getMemberVariables();for(const e of Object.values(n))e.included&&t.add(e)}for(let n of t){n instanceof Uo&&(n=n.getOriginalVariable()),n instanceof ca&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof _a&&(this.checkCircularDependencyImport(n,e),n instanceof la&&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:t,resolution:n}of e.dynamicImports)t.included&&n instanceof _a&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function kl(e){return Nl(e)??T(e.id)}function Nl(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function Cl(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 Dl=/[#?]/,Ol=e=>e.getFileName();function*Rl(e){for(const t of e)yield*t}function Ml(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=[],n=new Set(e.keys()),s=Object.create(null);for(const[t,i]of e)_l(t,s[i]||=[],n);for(const[e,n]of Object.entries(s))t.push({alias:e,modules:n});return{chunkDefinitions:t,modulesInManualChunks:n}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,n=new Map,s=[],i=new Set(e);let r=0;for(const e of i){const o=new Set;s.push(o);const a=new Set([e]);for(const e of a){G(n,e,W).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof qt||a.add(t);for(const{resolution:n}of e.dynamicImports)n instanceof _a&&n.includedDynamicImporters.length>0&&!i.has(n)&&(t.add(n),i.add(n),o.add(n));for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}r++}const o=[...i],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,n){const s=new Map,i=new Set;for(const[n,r]of e.entries())s.set(r,n),t.has(r)&&i.add(n);const r=[];for(const e of n){const t=new Set;for(const n of e)t.add(s.get(n));r.push(t)}return{dynamicEntries:i,dynamicImportsByEntry:r}}(o,t,s);return{allEntries:o,dependentEntriesByModule:n,dynamicallyDependentEntriesByDynamicEntry:Ll(n,a,o),dynamicImportsByEntry:l}}(e),u=function(e){const t=Object.create(null);for(const{dependentEntries:n,modules:s}of e){let e=0n;for(const t of n)e|=1n<<BigInt(t);(t[String(e)]||={dependentEntries:new Set(n),modules:[]}).modules.push(...s)}return Object.values(t)}(function*(e,t){for(const[n,s]of e)t.has(n)||(yield{dependentEntries:s,modules:[n]})}(a,r)),d=function(e,t){const n=e.map((()=>0n));let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(o,u),h=function(e,t,n,s){const i=s.map(((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])G(t,e,W).add(s)}}return i}(d,l,c,o);!function(e,t){let n=1n;for(const{dependentEntries:s}of e){for(const e of s)(t[e]&n)===n&&s.delete(e);n<<=1n}}(u,h);const{chunks:p,sideEffectAtoms:f,sizeByAtom:m}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:c,modules:u}of e){let e=0n,d=-1n;for(const s of c)e|=1n<<BigInt(s),d&=t[s]|n[s];const h=i[String(e)]||={containedAtoms:0n,correlatedAtoms:d,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(c),modules:[],pure:!0,size:0};let p=0,f=!0;for(const e of u)r.set(e,h),e.isIncluded()&&(f&&=!e.hasEffects(),p+=s>1?e.estimateSize():1);f||(a|=l),o.push(p),h.containedAtoms|=l,h.modules.push(...u),h.pure&&=f,h.size+=p,l<<=1n}const c=Object.values(i);return a|=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 qt){if(o.info.moduleSideEffects){const e=G(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}(c,r,l),{chunks:c,sideEffectAtoms:a,sizeByAtom:o}}(u,d,h,n);return i.push(...function(e,t,n,s,i){Ia("optimize chunks",3);const r=function(e,t){const n=[],s=[];for(const i of e)(i.size<t?n:s).push(i);if(0===n.length)return null;return n.sort(Bl),s.sort(Bl),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return ka("optimize chunks",3),e;t>1&&i("info",_t(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=Tl(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),Fl(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),Fl(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",_t(r.small.size+r.big.size,r.small.size,"After merging chunks"));return ka("optimize chunks",3),[...r.small,...r.big]}(p,n,f,m,s).map((({modules:e})=>({alias:null,modules:e})))),i}function _l(e,t,n){const s=new Set([e]);for(const e of s){n.add(e),t.push(e);for(const t of e.dependencies)t instanceof qt||n.has(t)||s.add(t)}}function Ll(e,t,n){const s=new Map;for(const i of t){const t=G(s,i,W),r=n[i];for(const n of Rl([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return s}function Bl({size:e},{size:t}){return e-t}function Tl(e,{big:t,small:n},s,i,r){let o=null;for(const a of Rl([n,t])){if(e===a)continue;const t=zl(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function zl(e,t,n,s,i){const r=Vl(e,t,n,s,i);return r<n?r+Vl(t,e,n-r,s,i):1/0}function Vl(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 Fl(e,t,n){return e.size<t?n.small:n.big}const jl=(e,t)=>e.execIndex>t.execIndex?1:-1;function Ul(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}const Gl=(e,t)=>t?`(${e})`:e;class Wl{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 ql{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 rt(Ft(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,o=s[e];if(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 Hl(e){return function(t,n){return n.missing?(e(Te,(s=n.plugin,{code:yt,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:Ke("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new ql({mappings:[],names:[]},[t])):new ql(n,[t]);var s}}function Kl(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=C(e)||".",o=n.sourceRoot||".",a=t.map(((e,t)=>new Wl(R(i,o,e),s[t])));r=new ql(n,a)}else r=new Wl(e,t);return s.reduce(i,r)}let Yl;const Jl=e=>function(e){let t,n;try{const r=Yt.__wbindgen_add_to_stack_pointer(-16);Yt.xxhashBase64Url(r,rn(e));var s=un().getInt32(r+0,!0),i=un().getInt32(r+4,!0);return t=s,n=i,sn(s,i)}finally{Yt.__wbindgen_add_to_stack_pointer(16),Yt.__wbindgen_export_2(t,n,1)}}(Zl(e)),Xl={base36:e=>function(e){let t,n;try{const r=Yt.__wbindgen_add_to_stack_pointer(-16);Yt.xxhashBase36(r,rn(e));var s=un().getInt32(r+0,!0),i=un().getInt32(r+4,!0);return t=s,n=i,sn(s,i)}finally{Yt.__wbindgen_add_to_stack_pointer(16),Yt.__wbindgen_export_2(t,n,1)}}(Zl(e)),base64:Jl,hex:e=>function(e){let t,n;try{const r=Yt.__wbindgen_add_to_stack_pointer(-16);Yt.xxhashBase16(r,rn(e));var s=un().getInt32(r+0,!0),i=un().getInt32(r+4,!0);return t=s,n=i,sn(s,i)}finally{Yt.__wbindgen_add_to_stack_pointer(16),Yt.__wbindgen_export_2(t,n,1)}}(Zl(e))};function Zl(e){return"string"==typeof e?"undefined"==typeof Buffer?(Yl??=new TextEncoder,Yl.encode(e)):Buffer.from(e):e}let Ql="sourceMa";async function ec(e,t,n,s,i){Ia("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())));ka("render chunks",2),Ia("transform chunks",2);const o=Xl[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 tc(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(bl,(e=>t.has(e)?(n.add(e),`${gl}${"0".repeat(e.length-5)}${yl}`):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=xl(s,n,u)}while(i[$l].has(c.toLowerCase()));i[c]=Al,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=El(o,t);const u=El(a,t);let d=null;c&&(d=l?El(l,t):`${u}.map`,c.file=El(c.file,t),e+=nc(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?El(o,t):o,u=null;c&&(u=l?El(l,t):`${a}.map`,s+=nc(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),ka("transform chunks",2)}async function tc(e,t,n,s,i,r,o){let a=null;const l=[];let u=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=pa(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code}));const{compact:d,dir:h,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:b}=i;if(d||"\n"===u[u.length-1]||(u+="\n"),f){let s;Ia("sourcemaps",3),s=p?R(g||p):h?R(h,t):R(t);a=function(e,t,n,s,i,r){const o=Hl(r),a=n.filter((e=>!e.excludeFromSourcemap)).map((e=>Kl(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new ql(t,a),u=s.reduce(o,l);let{sources:d,sourcesContent:h,names:p,mappings:f}=u.traceMappings();if(e){const t=C(e);d=d.map((e=>O(t,e))),e=N(e)}h=i?null:h;for(const e of n)ha(e.originalSourcemap,e.sourcemapChain);return new c({file:e,mappings:f,names:p,sources:d,sourcesContent:h})}(s,e.generateDecodedMap({}),n,l,m,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=b(t,n);"boolean"!=typeof i&&rt(Gt("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)),y&&(t=y(t,n),"string"!=typeof t&&rt(Gt("sourcemapPathTransform function must return a string."))),a.sources[e]=k(t)}ka("sourcemaps",3)}return{code:u,map:a}}function nc(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=N(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`}Ql+="ppingURL";class sc{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){Ia("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===$l?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{Ia("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),ka("initialize render",2),Ia("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>22)return rt(Gt(`Hashes cannot be longer than 22 characters, received ${n}. Check the "${t}" option.`));const s=`${gl}${Xs(++e).padStart(n-5,"0")}${yl}`;return s.length>n?rt(Gt(`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&&function(e,t){if("umd"===e.format||"iife"===e.format)return rt(Ot("output.format",Qe,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return rt(Ot("output.file",Xe,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return rt(Ot("output.sourcemapFile",it,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(Te,Ot("output.amd.id",Je,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();ka("generate chunks",2),await ec(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}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),Ia("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),ka("generate bundle",2),ka("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)ic(e,n,t);return t}assignManualChunks(e){const t=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof _a){const i=e(s.id,n);"string"==typeof i&&t.push([i,s])}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,n]of t)ic(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{ma(t.code)}catch(e){this.inputOptions.onLog(Te,At(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r}=this.outputOptions,o="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),a=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=>Re.test(e):e=>!Ne.has(e)&&Re.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`${Gl(`${r}${Gl(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=_e(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),l=function(e){const t=[];for(const n of e.values())n instanceof _a&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return C(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)&&P(s.id)&&n.push(s.id);return n}(l,r)),u=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof qt&&s.set(i,new U(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),d=[],h=new Map;for(const{alias:i,modules:p}of s?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):Ml(this.graph.entryModules,o,n,this.inputOptions.onLog)){p.sort(jl);const n=new Il(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,u,this.facadeChunkByModule,this.includedNamespaces,i,t,e,c,a);d.push(n)}for(const e of d)e.link();const p=[];for(const e of d)p.push(...e.generateFacades());return[...d,...p]}}function ic(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return rt((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${z(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}class rc extends Qs{constructor(){super(),this.parent=null,this.variables.set("undefined",new jo)}findVariable(e){let t=this.variables.get(e);return t||(t=new Fs(e),this.variables.set(e,t)),t}}const oc=e=>()=>rt(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:Ke("plugin-development/#a-simple-example")}}(e)),ac=oc("fs.mkdir"),lc=oc("fs.readFile"),cc=oc("fs.writeFile");async function uc(e,t,n,s,i,r,o,a,l){const c=await function(e,t,n,s,i,r,o,a){let l=null,c=null;if(i){l=new Set;for(const n of i)e===n.source&&t===n.importer&&l.add(n.plugin);c=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l}=we)=>(l??=!0,s(e,n,o,a,r||ve,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,isEntry:o}],c,l)}(e,t,s,i,r,o,a,l);return null==c?oc("path.resolve")():c[0]}const dc="at position ",hc="at output position ";const pc={delete:()=>!1,get(){},has:()=>!1,set(){}};function fc(e){return e.startsWith(dc)||e.startsWith(hc)?rt({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):rt({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 mc=(e,t,n=Ec)=>{const{onwarn:s,onLog:i}=e,r=gc(n,s);if(i){const e=Fe[t];return(t,n)=>i(t,yc(n),((t,n)=>{if("error"===t)return rt(bc(n));Fe[t]>=e&&r(t,bc(n))}))}return r},gc=(e,t)=>t?(n,s)=>{n===Te?t(yc(s),(t=>e(Te,bc(t)))):e(n,s)}:e,yc=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),bc=e=>"string"==typeof e?{message:e}:"function"==typeof e?bc(e()):e,Ec=(e,{message:t})=>{switch(e){case Te:return console.warn(t);case Ve:return console.debug(t);default:return console.info(t)}};function xc(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(Te,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const $c={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Pe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:Pe,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:Pe,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Ac={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Sc=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};rt(Ot(`${n}.preset`,s,`valid values are ${He(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;rt(Ot(t,n,`valid values are ${s}${He(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)},wc=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);async function vc(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:pa(e.map);const a=e.code;let l=e.ast;const u=[],d=[];let h=!1;const p=()=>h=!0;let f="",m=e.code;const g=e=>(t,n)=>{t=bc(t),n&&at(t,n,m,i),t.id=i,t.hook="transform",e(t)};let y;try{y=await n.hookReduceArg0("transform",[m,i],(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(Te,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;({code:o,map:a,ast:l}=n)}return null!==a&&r.push(pa("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){u.push(t),e.addWatchFile(t)},cache:h?e.cache:(l=e.cache,y=p,{delete:e=>(y(),l.delete(e)),get:e=>(y(),l.get(e)),has:e=>(y(),l.has(e)),set:(e,t)=>(y(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(d.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&at(t,n,m,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:pa({version:3,...Kl(e,t,n,s,Hl(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new b(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new c({...e,file:null,sourcesContent:e.sourcesContent})},info:g(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:g(e.warn)};var l,y}))}catch(e){return rt(Vt(e,f,{hook:"transform",id:i}))}return!h&&d.length>0&&(t.transformFiles=d),{ast:l,code:y,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:u}}const Pc="resolveDependencies";class Ic{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,n,s,i,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await uc(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i),t,e),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=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((i=>{for(const[r,o]of i.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,Nc(o,e[r],t,s+r);const i=this.indexedEntryModules.find((e=>e.module===o));i?i.index=Math.min(i.index,n+r):this.indexedEntryModules.push({index:n+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),i})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r}){const o={fileName:e||null,id:t,importer:n,name:s||null},a=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,ve),void 0,!1,!e.resolveDependencies||Pc)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async s=>{if(Nc(s,e,!1,n),!s.info.isEntry){const n=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,s.id))));if(!s.info.isEntry){this.implicitEntryModules.add(s);for(const e of n)s.implicitlyLoadedAfter.add(e);for(const e of s.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run((async()=>{const t=await this.pluginDriver.hookFirst("load",[e]);return null!==t?t:(this.graph.watchFiles[e]=!0,await lc(e,"utf8"))}))}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${z(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:rt(function(e){return{code:"BAD_LOADER",message:`Error loading "${z(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=i.code;65279===r.charCodeAt(0)&&(i.code=r.slice(1));const o=this.graph.cachedModules.get(e);if(!o||o.customTransformCache||o.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await vc(i,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const e of o.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(o)}}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([t,n])=>null===n?null:"string"==typeof n?(t.resolution=n,null):t.resolution=await this.fetchResolvedDependency(z(n.id),e.id,n))))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,meta:n,moduleSideEffects:s,syntheticNamedExports:i},r,o,a){const l=this.modulesById.get(t);if(l instanceof _a)return r&&Ea(e,l.info.attributes)&&this.options.onLog(Te,Pt(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof qt)return rt({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.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 c=new _a(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const u=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),d])),d=Dc(u).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));d.catch((()=>{})),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===Pc&&await d:await this.fetchModuleDependencies(c,...h),c}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,moduleSideEffects:o,meta:a}=n;let l=this.modulesById.get(r);if(l){if(!(l instanceof qt))return rt(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${z(t)}", but is already an existing non-external module id.`}}(e,t));Ea(l.info.attributes,s)&&this.options.onLog(Te,Pt(l.info.attributes,s,e,t))}else l=new qt(this.options,r,o,a,"absolute"!==i&&P(r),s),this.modulesById.set(r,l);return Promise.resolve(l)}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])=>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 _a&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if("object"==typeof e){const i=e.external||this.options.external(e.id,t,!0);return{...e,external:i&&("relative"===i||!P(e.id)||!0===i&&Cc(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(Cc(e,n,s)||"absolute"),id:i&&s?kc(e,t):e}}const i=s?kc(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:Cc(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,ya(t.node));return n&&"object"==typeof n&&(t.id=n.id),[t,n]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,(async([t,n])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,ve,!1,n),t,e.id,n)]))}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===Pc?Dc(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?I(t)?rt(function(e,t){return{code:xt,exporter:e,id:t,message:`Could not resolve "${e}" from "${z(t)}"`}}(t,n)):(this.options.onLog(Te,function(e,t){return{code:xt,exporter:e,id:t,message:`"${e}" is imported by "${z(t)}", but could not be resolved – treating it as an external dependency.`,url:Ke("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(Te,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${z(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await uc(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,ve,!0,ve);if(null==r)return rt(null===s?function(e){return{code:Et,message:`Could not resolve entry module "${z(e)}".`}}(e):function(e,t){return{code:ft,message:`Module "${z(e)}" that should be implicitly loaded before "${z(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?rt(null===s?o&&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:Et,message:`Entry module "${z(e)}" cannot be external.`}}(e):function(e,t){return{code:ft,message:`Module "${z(e)}" that should be implicitly loaded before "${z(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},ve),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.getResolvedIdWithDefaults(i,s):null;if(null==i){const i=e.resolvedIds[t];return i?(Ea(i.attributes,s)&&this.options.onLog(Te,Pt(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,ve,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function kc(e,t){return I(e)?t?R(t,"..",e):R(e):e}function Nc(e,{fileName:t,name:n},s,i){if(null!==t)e.chunkFileNames.add(t);else if(null!==n){let t=0;for(;e.chunkNames[t]?.priority<i;)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:n,priority:i})}}function Cc(e,t,n){return!0===n||"ifRelativeSource"===n&&I(t)||!P(e)}async function Dc(e){const[t,n]=await e;return Promise.all([...t,...n])}function Oc(e,t,n,s,i,r){const o=i.sanitizeFileName(e||"asset");return wl(Sl("function"==typeof i.assetFileNames?i.assetFileNames({name:e,originalFileName:n,source:t,type:"asset"}):i.assetFileNames,"output.assetFileNames",{ext:()=>D(o).slice(1),extname:()=>D(o),hash:e=>s.slice(0,Math.max(0,e||8)),name:()=>o.slice(0,Math.max(0,o.length-D(o).length))}),r)}function Rc(e,{bundle:t},n){t[$l].has(e.toLowerCase())?n(Te,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Al}const Mc=new Set(["chunk","asset","prebuilt-chunk"]);function _c(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return rt(Gt(`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 Lc{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&&Mc.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!V(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):rt(Gt(`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}".`)):rt(Gt(`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 rt({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},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():rt({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?rt({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):rt({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 rt({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return rt(Gt(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return rt({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=_c(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=Xl[t.hashCharacters],s=this.output={bundle:e,fileNamesBySource:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&Rc(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,s);else{G(i,n(e.source),(()=>[])).push(e)}else"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=Jl(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||[],facadeModuleId: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:_c(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&&Rc(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>ua.LOAD_AND_PARSE)return rt({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return rt(Gt(`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 rt(Gt(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||V(e.fileName))return rt(Gt(`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,fileNamesBySource:s,getHash:i,outputOptions:r}){let{fileName:o,needsCodeReference:a,originalFileName:l,referenceId:c}=e;if(!o){const a=i(t);o=s.get(a),o||(o=Oc(e.name,t,l,a,r,n),s.set(a,o))}const u={...e,fileName:o,source:t};this.filesByReferenceId.set(c,u);const d=n[o];"asset"===d?.type?d.needsCodeReference&&=a:n[o]={fileName:o,name:e.name,needsCodeReference:a,originalFileName:l,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySource:s,outputOptions:i}){let r,o="",a=!0;for(const s of e){a&&=s.needsCodeReference;const e=Oc(s.name,s.source,s.originalFileName,t,i,n);(!o||e.length<o.length||e.length===o.length&&e<o)&&(o=e,r=s)}s.set(t,o);for(const t of e){const e={...t,fileName:o};this.filesByReferenceId.set(t.referenceId,e)}n[o]={fileName:o,name:r.name,needsCodeReference:a,originalFileName:r.originalFileName,source:r.source,type:"asset"}}}function Bc(e,t,n,s,i){return Fe[e]<Fe[i]?$s:(i,r)=>{null!=r&&n(Te,{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=bc(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function Tc(e,t,s,i,r,o){const{logLevel:a,onLog:l}=i;let c,u=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(dc)||e.name.startsWith(hc)||o.has(e.name)?u=!1:o.add(e.name)),t)if(u){const n=e.cacheKey||e.name;h=t[n]||(t[n]=Object.create(null)),c={delete:e=>delete h[e],get(e){const t=h[e];if(t)return t[0]=0,t[1]},has(e){const t=h[e];return!!t&&(t[0]=0,!0)},set(e,t){h[e]=[0,t]}}}else d=e.name,c={delete:()=>fc(d),get:()=>fc(d),has:()=>fc(d),set:()=>fc(d)};else c=pc;var d,h;return{addWatchFile(e){s.watchFiles[e]=!0},cache:c,debug:Bc(Ve,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>rt(Vt(bc(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>s.modulesById.keys(),getModuleInfo:s.getModuleInfo,getWatchFiles:()=>Object.keys(s.watchFiles),info:Bc(ze,"PLUGIN_LOG",l,e.name,a),load:e=>s.moduleLoader.preloadModule(e),meta:{rollupVersion:n,watchMode:s.watchMode},parse:ma,resolve:(t,n,{attributes:i,custom:r,isEntry:o,skipSelf:a}=we)=>(a??=!0,s.moduleLoader.resolveId(t,n,r,o,i||ve,a?[{importer:n,plugin:e,source:t}]:null)),setAssetSource:r.setAssetSource,warn:Bc(Te,"PLUGIN_WARNING",l,e.name,a)}}const zc=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 Vc{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new Lc(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,Tc(n,s,e,t,this.fileEmitter,r)]))),i)for(const e of n)for(const n of zc)n in e&&t.onLog(Te,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${n}" hook used by the output plugin ${o} 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.`}));var o}createOutputPluginDriver(e){return new Vc(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,Uc))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(Gc)}getSortedPlugins(e,t){return G(this.sortedPlugins,e,(()=>Fc(e,this.plugins,t)))}runHook(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));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),rt(Vt(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 rt(Vt(t,n.name,{hook:e}))}}}function Fc(e,t,n=jc){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 jc(e,t,n){"function"!=typeof e&&rt(function(e,t){return{code:ht,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 Uc(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return rt(function(e,t){return{code:ht,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 Gc(){}class Wc{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 qc{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e;function r(e,r){++t>i&&(s=n,o(1),++t),n[e]=r}function o(e){t=0,n=Object.create(null),e||(s=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==s[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=s[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new ne,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=ua.LOAD_AND_PARSE,this.scope=new rc,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.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]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),n=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",n)}this.pluginDriver=new Vc(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Ic(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Wc(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[xs]=!0}return t})(e)}async build(){Ia("generate module graph",2),await this.generateModuleGraph(),ka("generate module graph",2),Ia("sort and bind modules",2),this.phase=ua.ANALYSE,this.sortModules(),ka("sort and bind modules",2),Ia("mark included statements",2),this.includeStatements(),ka("mark included statements",2),this.phase=ua.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 _a?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)Da(t);if(this.options.treeshake){let t=1;do{Ia(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&("no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);ka("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()||rt(Mt(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=e=>{if(e instanceof _a){for(const t of e.dependencies)r.has(t)?s.has(t)||n.push(Ul(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof _a&&i.add(t);o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of i)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:n,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(Te,St(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())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(Te,Rt(t.name,e.id,t.module.id),t.start)}}function Hc(e,t){return t()}function Kc(e,t,s,i){e=Fc("onLog",e);const r=Fe[i],o=(i,a,l=Ie)=>{ct(a);if(!(Fe[i]<r)){for(const t of e){if(l.has(t))continue;const{onLog:e}=t,c=e=>Fe[e]<r?$s:n=>o(e,bc(n),new Set(l).add(t));if(!1===("handler"in e?e.handler:e).call({debug:c(Ve),error:e=>rt(bc(e)),info:c(ze),meta:{rollupVersion:n,watchMode:s},warn:c(Te)},i,a))return}t(i,a)}};return o}const Yc=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Jc=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const n=new Set,s=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?s.push(i):n.add(i);return(e,...t)=>n.has(e)||s.some((t=>t.test(e)))}var t;return()=>!1},Xc=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Zc=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:20},Qc=(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[R(t)]=s;return n=>e[n]??t}return()=>t},eu=e=>{if(!1===e.treeshake)return!1;const t=Sc(e.treeshake,$c,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??Pe,moduleSideEffects:tu(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},tu=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&rt(Ot("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},nu=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,su=/^[a-z]:/i;function iu(e){const t=su.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(nu,"_")}const ru=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return rt(Ot("output.file",Xe,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return rt(Ot("output.file",Xe,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},ou=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 rt(Ot("output.format",Qe,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},au=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?rt(Ot("output.inlineDynamicImports",et,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},lu=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return rt(Ot("output.inlineDynamicImports",et,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return rt(Ot("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},cu=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return R(t)},uu=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?rt(Ot("output.amd.id",Je,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?rt(Ot("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}},du=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},hu=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?rt(Ot("output.dir",Xe,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},pu=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function fu(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return rt({code:ut,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:Ke(Ze)});return n||"auto"}const mu=(e,t)=>(null!=e.externalImportAssertions&&Wt('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",0,t),e.externalImportAttributes??e.externalImportAssertions??!0),gu=e=>{const t=Sc(e.generatedCode,Ac,"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}},yu=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},bu=new Set(["compat","auto","esModule","default","defaultOnly"]),Eu=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||xu(n=t(s)):s in e?e[s]:xu(e[s]=t(s))}return void 0===t?()=>"default":()=>xu(t)},xu=e=>bu.has(e)?e:rt(Ot("output.interop",tt,`use one of ${Array.from(bu,(e=>JSON.stringify(e))).join(", ")}`,e)),$u=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return rt(Ot("output.manualChunks",nt,'this option is not supported for "output.inlineDynamicImports"'));if(n)return rt(Ot("output.manualChunks",nt,'this option is not supported for "output.preserveModules"'))}return s||{}},Au=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Su=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},wu=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+"/":rt(Ot("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function vu(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Pu(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 wc(e.plugins);vu(i,hc);const r=t.createOutputPluginDriver(i);return{...await Iu(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Hc(0,(async()=>{const n=new sc(r,a,t,o,i),s=await n.generate(e);if(e){if(Ia("WRITE",1),!r.dir&&!r.file)return rt({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:Ke(Xe)});await Promise.all(Object.values(s).map((e=>i.fileOperationQueue.run((()=>async function(e,t){const n=R(t.dir||C(t.file),e.fileName);return await ac(C(n),{recursive:!0}),cc(n,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,s]),ka("WRITE",1)}return l=s,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>Nu(e)-Nu(t)))};var l}))}function Iu(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=ou(e),o=au(e,t),a=lu(e,o,t),l=ru(e,a,t),c=gu(e),u=mu(e,t),d={amd:uu(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:du(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:hu(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:pu(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:fu(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:du(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:e.importAttributesKey??"assert",indent:yu(e,i),inlineDynamicImports:o,interop:Eu(e),intro:du(e,"intro"),manualChunks:$u(e,o,a),minifyInternalExports:Au(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:du(e,"outro"),paths:e.paths||{},plugins:await wc(e.plugins),preserveModules:a,preserveModulesRoot:cu(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:iu,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:wu(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Su(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 xc(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 ku;function Nu(e){return"asset"===e.type?ku.ASSET:e.isEntry?ku.ENTRY_CHUNK:ku.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(ku||(ku={})),e.VERSION=n,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:s,unsetOptions:i}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const s=await async function(e,t){const s=Fc("options",await wc(e.plugins)),i=e.logLevel||ze,r=Kc(s,mc(e,i),t,i);for(const o of s){const{name:s,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:Bc(Ve,"PLUGIN_LOG",r,s,i),error:e=>rt(Vt(bc(e),s,{hook:"onLog"})),info:Bc(ze,"PLUGIN_LOG",r,s,i),meta:{rollupVersion:n,watchMode:t},warn:Bc(Te,"PLUGIN_WARNING",r,s,i)},e);c&&(e=c)}return e}(e,t),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await wc(e.plugins),r=e.logLevel||ze,o=Kc(i,mc(e,r),t,r),a=e.strictDeprecations||!1,l=Zc(e),c={cache:Yc(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Jc(e.external),input:Xc(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:Qc(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:eu(e)};return xc(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(s,t);return vu(i.plugins,dc),{options:i,unsetOptions:r}}(e,null!==t);(function(e){e.perf?(Aa=new Map,Ia=wa,ka=va,e.plugins=e.plugins.map(Ca)):(Ia=$s,ka=$s)})(s),await async function(){await fn()}();const r=new qc(s,t),o=!1!==e.cache;e.cache&&(s.cache=void 0,e.cache=void 0);Ia("BUILD",1),await Hc(r.pluginDriver,(async()=>{try{Ia("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),ka("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),ka("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?rt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Pu(!1,s,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?rt({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Pu(!0,s,i,e,r)};s.perf&&(a.getTimings=Pa);return a}(e,null)}}));
|
|
10
|
+
!function(e,t){"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={})}(this,(function(e){var t="undefined"!=typeof document?document.currentScript:null,n="4.22.3-0",s=("undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self&&self,{exports:{}});!function(e,t){!function(e){const t=",".charCodeAt(0),n=";".charCodeAt(0),s="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",i=new Uint8Array(64),r=new Uint8Array(128);for(let e=0;e<s.length;e++){const t=s.charCodeAt(e);i[e]=t,r[t]=e}function o(e,t){let n=0,s=0,i=0;do{const t=e.next();i=r[t],n|=(31&i)<<s,s+=5}while(32&i);const o=1&n;return n>>>=1,o&&(n=-2147483648|-n),t+n}function a(e,t,n){let s=t-n;s=s<0?-s<<1|1:s<<1;do{let t=31&s;s>>>=5,s>0&&(t|=32),e.write(i[t])}while(s>0);return t}function l(e,n){return!(e.pos>=n)&&e.peek()!==t}const c=16384,u="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}};class d{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(c)}write(e){const{buffer:t}=this;t[this.pos++]=e,this.pos===c&&(this.out+=u.decode(t),this.pos=0)}flush(){const{buffer:e,out:t,pos:n}=this;return n>0?t+u.decode(e.subarray(0,n)):t}}class h{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}}const p=[];function f(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0;for(;n.pos<t;n.pos++){r=o(n,r);const e=o(n,0);if(!l(n,t)){const t=i.pop();t[2]=r,t[3]=e;continue}const a=o(n,0),c=1&o(n,0)?[r,e,0,0,a,o(n,0)]:[r,e,0,0,a];let u=p;if(l(n,t)){u=[];do{const e=o(n,0);u.push(e)}while(l(n,t))}c.vars=u,s.push(c),i.push(c)}return s}function m(e){const t=new d;for(let n=0;n<e.length;)n=g(e,n,t,[0]);return t.flush()}function g(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:u,4:d,vars:h}=r;n>0&&s.write(t),i[0]=a(s,o,i[0]),a(s,l,0),a(s,d,0),a(s,6===r.length?1:0,0),6===r.length&&a(s,r[5],0);for(const e of h)a(s,e,0);for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=u)break;n=g(e,n,s,i)}return s.write(t),i[0]=a(s,c,i[0]),a(s,u,0),n}function y(e){const{length:t}=e,n=new h(e),s=[],i=[];let r=0,a=0,c=0,u=0,d=0,f=0,m=0,g=0;do{const e=n.indexOf(";");let t=0;for(;n.pos<e;n.pos++){if(t=o(n,t),!l(n,e)){const e=i.pop();e[2]=r,e[3]=t;continue}const h=o(n,0),y=2&h,b=4&h;let E,x=null,$=p;if(1&h){const e=o(n,a);c=o(n,a===e?c:0),a=e,E=[r,t,0,0,e,c]}else E=[r,t,0,0];if(E.isScope=!!b,y){const e=u,t=d;u=o(n,u);const s=e===u;d=o(n,s?d:0),f=o(n,s&&t===d?f:0),x=[u,d,f]}if(E.callsite=x,l(n,e)){$=[];do{m=r,g=t;const e=o(n,0);let s;if(e<-1){s=[[o(n,0)]];for(let t=-1;t>e;t--){const e=m;m=o(n,m),g=o(n,m===e?g:0);const t=o(n,0);s.push([t,m,g])}}else s=[[e]];$.push(s)}while(l(n,e))}E.bindings=$,s.push(E),i.push(E)}r++,n.pos=e+1}while(n.pos<t);return s}function b(e){if(0===e.length)return"";const t=new d;for(let n=0;n<e.length;)n=E(e,n,t,[0,0,0,0,0,0,0]);return t.flush()}function E(e,n,s,i){const r=e[n],{0:o,1:l,2:c,3:u,isScope:d,callsite:h,bindings:p}=r;if(i[0]<o?(x(s,i[0],o),i[0]=o,i[1]=0):n>0&&s.write(t),i[1]=a(s,r[1],i[1]),a(s,(6===r.length?1:0)|(h?2:0)|(d?4:0),0),6===r.length){const{4:e,5:t}=r;e!==i[2]&&(i[3]=0),i[2]=a(s,e,i[2]),i[3]=a(s,t,i[3])}if(h){const{0:e,1:t,2:n}=r.callsite;e!==i[4]?(i[5]=0,i[6]=0):t!==i[5]&&(i[6]=0),i[4]=a(s,e,i[4]),i[5]=a(s,t,i[5]),i[6]=a(s,n,i[6])}if(p)for(const e of p){e.length>1&&a(s,-e.length,0),a(s,e[0][0],0);let t=o,n=l;for(let i=1;i<e.length;i++){const r=e[i];t=a(s,r[1],t),n=a(s,r[2],n),a(s,r[0],0)}}for(n++;n<e.length;){const t=e[n],{0:r,1:o}=t;if(r>c||r===c&&o>=u)break;n=E(e,n,s,i)}return i[0]<c?(x(s,i[0],c),i[0]=c,i[1]=0):s.write(t),i[1]=a(s,u,i[1]),n}function x(e,t,s){do{e.write(n)}while(++t<s)}function $(e){const{length:t}=e,n=new h(e),s=[];let i=0,r=0,a=0,c=0,u=0;do{const e=n.indexOf(";"),t=[];let d=!0,h=0;for(i=0;n.pos<e;){let s;i=o(n,i),i<h&&(d=!1),h=i,l(n,e)?(r=o(n,r),a=o(n,a),c=o(n,c),l(n,e)?(u=o(n,u),s=[i,r,a,c,u]):s=[i,r,a,c]):s=[i],t.push(s),n.pos++}d||A(t),s.push(t),n.pos=e+1}while(n.pos<=t);return s}function A(e){e.sort(S)}function S(e,t){return e[0]-t[0]}function w(e){const s=new d;let i=0,r=0,o=0,l=0;for(let c=0;c<e.length;c++){const u=e[c];if(c>0&&s.write(n),0===u.length)continue;let d=0;for(let e=0;e<u.length;e++){const n=u[e];e>0&&s.write(t),d=a(s,n[0],d),1!==n.length&&(i=a(s,n[1],i),r=a(s,n[2],r),o=a(s,n[3],o),4!==n.length&&(l=a(s,n[4],l)))}}return s.flush()}e.decode=$,e.decodeGeneratedRanges=y,e.decodeOriginalScopes=f,e.encode=w,e.encodeGeneratedRanges=b,e.encodeOriginalScopes=m,Object.defineProperty(e,"__esModule",{value:!0})}(t)}(0,s.exports);var i=s.exports;class r{constructor(e){this.bits=e instanceof r?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let o=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){let t=this;for(;t;)e(t),t=t.next}eachPrevious(e){let t=this;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),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.split(this.start+t.length).edit("",void 0,!0),this.edited&&this.edit(t,this.storeName,!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,"");if(t.length){if(t!==this.content){const e=this.split(this.end-t.length);this.edited&&e.edit(t,this.storeName,!0),this.edit("",void 0,!0)}return!0}return this.edit("",void 0,!0),this.outro=this.outro.replace(e,""),!!this.outro.length||void 0}};function a(){return"undefined"!=typeof globalThis&&"function"==typeof globalThis.btoa?e=>globalThis.btoa(unescape(encodeURIComponent(e))):"function"==typeof Buffer?e=>Buffer.from(e,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const l=a();class c{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=i.encode(e.mappings),void 0!==e.x_google_ignoreList&&(this.x_google_ignoreList=e.x_google_ignoreList)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+l(this.toString())}}function u(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 d=Object.prototype.toString;function h(e){return"[object Object]"===d.call(e)}function p(e){const t=e.split("\n"),n=[];for(let e=0,s=0;e<t.length;e++)n.push(s),s+=t[e].length+1;return function(e){let t=0,s=n.length;for(;t<s;){const i=t+s>>1;e<n[i]?s=i:t=i+1}const i=t-1;return{line:i,column:e-n[i]}}}const f=/\w/;class m{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}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.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,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))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(t));this.pending=null}addUneditedChunk(e,t,n,s,i){let r=t.start,o=!0,a=!1;for(;r<t.end;){if(this.hires||o||i.has(r)){const t=[this.generatedCodeColumn,e,s.line,s.column];"boundary"===this.hires?f.test(n[r])?a||(this.rawSegments.push(t),a=!0):(this.rawSegments.push(t),a=!1):this.rawSegments.push(t)}"\n"===n[r]?(s.line+=1,s.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,o=!0):(s.column+=1,this.generatedCodeColumn+=1,o=!1),r+=1}this.pending=null}advance(e){if(!e)return;const t=e.split("\n");if(t.length>1){for(let e=0;e<t.length-1;e++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=t[t.length-1].length}}const g="\n",y={insertLeft:!1,insertRight:!1,storeName:!1};class b{constructor(e,t={}){const n=new o(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:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:t.filename},indentExclusionRanges:{writable:!0,value:t.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new r},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:t.ignoreList}}),this.byStart[0]=n,this.byEnd[e.length]=n}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.appendLeft(t):this.intro+=t,this}appendRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.appendRight(t):this.outro+=t,this}clone(){const e=new b(this.original,{filename:this.filename});let t=this.firstChunk,n=e.firstChunk=e.lastSearchedChunk=t.clone();for(;t;){e.byStart[n.start]=n,e.byEnd[n.end]=n;const s=t.next,i=s&&s.clone();i&&(n.next=i,i.previous=n,n=i),t=s}return e.lastChunk=n,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new r(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const t=Object.keys(this.storedNames),n=new m(e.hires),s=p(this.original);return this.intro&&n.advance(this.intro),this.firstChunk.eachNext((e=>{const i=s(e.start);e.intro.length&&n.advance(e.intro),e.edited?n.addEdit(0,e.content,i,e.storeName?t.indexOf(e.original):-1):n.addUneditedChunk(0,e,this.original,i,this.sourcemapLocations),e.outro.length&&n.advance(e.outro)})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?u(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:t,mappings:n.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new c(this.generateDecodedMap(e))}_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 new Array(i+1).join(" ")}(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(h(e)&&(t=e,e=void 0),void 0===e&&(this._ensureindentStr(),e=this.indentStr||"\t"),""===e)return this;const s={};if((t=t||{}).exclude){("number"==typeof t.exclude[0]?[t.exclude]:t.exclude).forEach((e=>{for(let t=e[0];t<e[1];t+=1)s[t]=!0}))}let i=!1!==t.indentStart;const r=t=>i?`${e}${t}`:(i=!0,t);this.intro=this.intro.replace(n,r);let o=0,a=this.firstChunk;for(;a;){const t=a.end;if(a.edited)s[o]||(a.content=a.content.replace(n,r),a.content.length&&(i="\n"===a.content[a.content.length-1]));else for(o=a.start;o<t;){if(!s[o]){const t=this.original[o];"\n"===t?i=!0:"\r"!==t&&i&&(i=!1,o===a.start||(this._splitChunk(a,o),a=a.next),a.prependRight(e))}o+=1}o=a.end,a=a.next}return this.outro=this.outro.replace(n,r),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){return y.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),y.insertLeft=!0),this.appendLeft(e,t)}insertRight(e,t){return y.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),y.insertRight=!0),this.prependRight(e,t)}move(e,t,n){if(n>=e&&n<=t)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(t),this._split(n);const s=this.byStart[e],i=this.byEnd[t],r=s.previous,o=i.next,a=this.byStart[n];if(!a&&i===this.lastChunk)return this;const l=a?a.previous:this.lastChunk;return r&&(r.next=o),o&&(o.previous=r),l&&(l.next=s),a&&(a.previous=i),s.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=s.previous,this.lastChunk.next=null),s.previous=l,i.next=a||null,l||(this.firstChunk=s),a||(this.lastChunk=i),this}overwrite(e,t,n,s){return s=s||{},this.update(e,t,n,{...s,overwrite:!s.contentOnly})}update(e,t,n,s){if("string"!=typeof n)throw new TypeError("replacement content must be a string");if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(t>this.original.length)throw new Error("end is out of bounds");if(e===t)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(t),!0===s&&(y.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),y.storeName=!0),s={storeName:!0});const i=void 0!==s&&s.storeName,r=void 0!==s&&s.overwrite;if(i){const n=this.original.slice(e,t);Object.defineProperty(this.storedNames,n,{writable:!0,value:!0,enumerable:!0})}const a=this.byStart[e],l=this.byEnd[t];if(a){let e=a;for(;e!==l;){if(e.next!==this.byStart[e.end])throw new Error("Cannot overwrite across a split point");e=e.next,e.edit("",!1)}a.edit(n,i,!r)}else{const s=new o(e,t,"").edit(n,i);l.next=s,s.previous=l}return this}prepend(e){if("string"!=typeof e)throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byEnd[e];return n?n.prependLeft(t):this.intro=t+this.intro,this}prependRight(e,t){if("string"!=typeof t)throw new TypeError("inserted content must be a string");this._split(e);const n=this.byStart[e];return n?n.prependRight(t):this.outro=t+this.outro,this}remove(e,t){if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let n=this.byStart[e];for(;n;)n.intro="",n.outro="",n.edit(""),n=t>n.end?this.byStart[n.end]:null;return this}reset(e,t){if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<0;)t+=this.original.length}if(e===t)return this;if(e<0||t>this.original.length)throw new Error("Character is out of bounds");if(e>t)throw new Error("end must be greater than start");this._split(e),this._split(t);let n=this.byStart[e];for(;n;)n.reset(),n=t>n.end?this.byStart[n.end]:null;return this}lastChar(){if(this.outro.length)return this.outro[this.outro.length-1];let e=this.lastChunk;do{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]}while(e=e.previous);return this.intro.length?this.intro[this.intro.length-1]:""}lastLine(){let e=this.outro.lastIndexOf(g);if(-1!==e)return this.outro.substr(e+1);let t=this.outro,n=this.lastChunk;do{if(n.outro.length>0){if(e=n.outro.lastIndexOf(g),-1!==e)return n.outro.substr(e+1)+t;t=n.outro+t}if(n.content.length>0){if(e=n.content.lastIndexOf(g),-1!==e)return n.content.substr(e+1)+t;t=n.content+t}if(n.intro.length>0){if(e=n.intro.lastIndexOf(g),-1!==e)return n.intro.substr(e+1)+t;t=n.intro+t}}while(n=n.previous);return e=this.intro.lastIndexOf(g),-1!==e?this.intro.substr(e+1)+t:this.intro+t}slice(e=0,t=this.original.length){if(0!==this.original.length){for(;e<0;)e+=this.original.length;for(;t<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)return n;s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=s;for(;s;){!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 Error(`Cannot use replaced 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[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const n=e>t.end;for(;t;){if(t.contains(e))return this._splitChunk(t,e);t=n?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const n=p(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${n.line}:${n.column} – "${e.original}")`)}const n=e.split(t);return this.byEnd[t]=e,this.byStart[t]=n,this.byEnd[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(){let e=this.firstChunk;do{if(e.intro.length&&e.intro.trim()||e.content.length&&e.content.trim()||e.outro.length&&e.outro.trim())return!1}while(e=e.next);return!0}length(){let e=this.firstChunk,t=0;do{t+=e.intro.length+e.content.length+e.outro.length}while(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[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.previous}while(n);return!1}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[n.end]=n,this.byStart[n.next.start]=n.next,this.byEnd[n.next.end]=n.next),s)return!0;n=n.next}while(n);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function n(e,n){return"string"==typeof t?t.replace(/\$(\$|&|\d+)/g,((t,n)=>{if("$"===n)return"$";if("&"===n)return e[0];return+n<e.length?e[+n]:`$${n}`})):t(...e,e.index,n,e.groups)}if(e.global){(function(e,t){let n;const s=[];for(;n=e.exec(t);)s.push(n);return s})(e,this.original).forEach((e=>{if(null!=e.index){const t=n(e,this.original);t!==e[0]&&this.overwrite(e.index,e.index+e[0].length,t)}}))}else{const t=this.original.match(e);if(t&&null!=t.index){const e=n(t,this.original);e!==t[0]&&this.overwrite(t.index,t.index+t[0].length,e)}}return this}_replaceString(e,t){const{original:n}=this,s=n.indexOf(e);return-1!==s&&this.overwrite(s,s+e.length,t),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;for(let i=n.indexOf(e);-1!==i;i=n.indexOf(e,i+s)){n.slice(i,i+s)!==t&&this.overwrite(i,i+s,t)}return this}replaceAll(e,t){if("string"==typeof e)return this._replaceAllString(e,t);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,t)}}const E=Object.prototype.hasOwnProperty;let x=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 b)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!h(e)||!e.content)throw new Error("bundle.addSource() takes an object with a `content` property, which should be an instance of MagicString, and an optional `filename`");if(["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{E.call(e,t)||(e[t]=e.content[t])})),void 0===e.separator&&(e.separator=this.separator),e.filename)if(E.call(this.uniqueSourceIndexByFilename,e.filename)){const t=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==t.content)throw new Error(`Illegal source: same filename (${e.filename}), different contents`)}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 b(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(),separator:e.separator})})),t}generateDecodedMap(e={}){const t=[];let n;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{~t.indexOf(e)||t.push(e)}))}));const s=new m(e.hires);return this.intro&&s.advance(this.intro),this.sources.forEach(((e,i)=>{i>0&&s.advance(this.separator);const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1,o=e.content,a=p(o.original);o.intro&&s.advance(o.intro),o.firstChunk.eachNext((n=>{const i=a(n.start);n.intro.length&&s.advance(n.intro),e.filename?n.edited?s.addEdit(r,n.content,i,n.storeName?t.indexOf(n.original):-1):s.addUneditedChunk(r,n,o.original,i,o.sourcemapLocations):s.advance(n.content),n.outro.length&&s.advance(n.outro)})),o.outro&&s.advance(o.outro),e.ignoreList&&-1!==r&&(void 0===n&&(n=[]),n.push(r))})),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map((t=>e.file?u(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:s.raw,x_google_ignoreList:n}}generateMap(e){return new c(this.generateDecodedMap(e))}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[t]-e[n]))[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=>!e.content.isEmpty()))}length(){return this.sources.reduce(((e,t)=>e+t.content.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){let t,n=0;do{if(t=this.sources[n++],!t)break}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let n,s=this.sources.length-1;do{if(n=this.sources[s--],!n){this.intro=this.intro.replace(t,"");break}}while(!n.content.trimEndAborted(e));return this}};const $=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,A=/^\.?\.\//,S=/\\/g,w=/[/\\]/,v=/\.[^.]+$/;function P(e){return $.test(e)}function I(e){return A.test(e)}function k(e){return e.replace(S,"/")}function N(e){return e.split(w).pop()||""}function C(e){const t=/[/\\][^/\\]*$/.exec(e);if(!t)return".";return e.slice(0,-t[0].length)||"/"}function D(e){const t=v.exec(N(e));return t?t[0]:""}function O(e,t){const n=e.split(w).filter(Boolean),s=t.split(w).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 R(...e){const t=e.shift();if(!t)return"/";let n=t.split(w);for(const t of e)if(P(t))n=t.split(w);else{const e=t.split(w);for(;"."===e[0]||".."===e[0];){".."===e.shift()&&n.pop()}n.push(...e)}return n.join("/")}function M(e,t,n,s){t.remove(n,s),e.removeAnnotations(t)}const _={isNoStatement:!0};function L(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 B=/\S/g;function T(e,t){B.lastIndex=t;return B.exec(e).index}const z=/\s/;function V(e){let t,n,s=0;for(t=e.indexOf("\n",s);;){if(s=e.indexOf("/",s),-1===s||s>t)return[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 F(e,t,n,s,i){let r,o,a,l,c=e[0],u=!c.included||c.needsBoundaries;u&&(l=n+V(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+V(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):M(r,t,o,l)):r.render(t,i)}function j(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+L(t.original.slice(r.end,s.start),",")),o=a=c+1+V(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 U(e,t,n){for(;;){const[s,i]=V(e.original.slice(t,n));if(-1===s)break;e.remove(t+s,t+=i)}}function G(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 W(e,t,n,s,{exportNamesByVariable:i,snippets:{_:r}}){s.prependRight(t,`exports(${JSON.stringify(i.get(e)[0])},${r}`),s.appendLeft(n,")")}function q(e,t,n,s,i,r){const{_:o,getPropertyAccess:a}=r.snippets;i.appendLeft(n,`,${o}${G([e],r)},${o}${e.getName(a)}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}function H(e,t){if("MemberExpression"===e.type)return!e.computed&&H(e.object,e);if("Identifier"===e.type){if(!t)return!0;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;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}}return!1}const K=Object.freeze(Object.create(null)),Y=Object.freeze({}),J=Object.freeze([]),X=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function Z(e,t){return e.start<=t&&t<e.end}function Q(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(Z(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 ee(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const te="...";function ne(e,t,n){let s=e.split("\n");if(t>s.length)return"";const i=Math.max(ee(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=ee(e);if(c.length>i&&(c=`${c.slice(0,i-3)}${te}`),o){const t=function(e){let t="";for(;e--;)t+=" ";return t}(a+2+ee(e.slice(0,n)).length)+"^";return`${l}: ${c}\n${t}`}return`${l}: ${c}`})).join("\n")}const se="silent",ie="warn",re="info",oe="debug",ae={[oe]:0,[re]:1,[se]:3,[ie]:2};function le(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 ce(e){const t=N(e);return t.slice(0,Math.max(0,t.length-D(e).length))}function ue(e){return P(e)?O(R(),e):e}function de(e){return"/"===e[0]||"."===e[0]&&("/"===e[1]||"."===e[1])||P(e)}const he=/^(\.\.\/)*\.\.$/;function pe(e,t,n,s){for(;t.startsWith("../");)t=t.slice(3),e="_/"+e;let i=k(O(C(e),t));if(n&&i.endsWith(".js")&&(i=i.slice(0,-3)),s){if(""===i)return"../"+N(t);if(he.test(i))return[...i.split("/"),"..",N(t)].join("/")}return i?i.startsWith("..")?i:"./"+i:"."}function fe(e){return`https://rollupjs.org/${e}`}const me="troubleshooting/#error-name-is-not-exported-by-module",ge="configuration-options/#output-amd-id",ye="configuration-options/#output-dir",be="configuration-options/#output-exports",Ee="configuration-options/#output-format",xe="configuration-options/#output-inlinedynamicimports",$e="configuration-options/#output-interop",Ae="configuration-options/#output-manualchunks",Se="configuration-options/#output-name",we="configuration-options/#output-sourcemapfile";function ve(e){throw e instanceof Error?e:Pe(e)}function Pe(e){Ne(e);const t=Object.assign(new Error(e.message),e);return Object.defineProperty(t,"name",{value:"RollupError",writable:!0}),t}function Ie(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=Q(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=ne(n,t,s)}}const ke=Symbol("augmented");function Ne(e){if(!e.plugin&&!e.loc||e[ke])return;e[ke]=!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+=`${ue(n)}${s}: `}const s=e.message;e.message=t+e.message,Ye(e,s)}const Ce="INVALID_EXPORT_OPTION",De="INVALID_IMPORT_ATTRIBUTE",Oe="INVALID_PLUGIN_HOOK",Re="MISSING_EXPORT",Me="MISSING_IMPLICIT_DEPENDANT",_e="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Le="PARSE_ERROR",Be="SOURCEMAP_BROKEN",Te="UNEXPECTED_NAMED_IMPORT",ze="UNRESOLVED_ENTRY",Ve="UNRESOLVED_IMPORT";function Fe(e){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${e}").`}}function je({fileName:e,code:t},{pos:n,message:s}){const i={code:"CHUNK_INVALID",message:`Chunk "${e}" is not valid JavaScript: ${s}.`};return Ie(i,n,t,e),i}function Ue(e){return{code:"CIRCULAR_DEPENDENCY",ids:e,message:`Circular dependency: ${e.map(ue).join(" -> ")}`}}function Ge(e,t,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${ue(t)} is at (${n}:${s})\n${ne(e,n,s)}`}}function We(e,t){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${e}" in "${ue(t)}".`}}function qe(e,t,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${ue(s)}" tried to import "${ue(n)}" with ${He(t)} attributes, but it was already imported elsewhere with ${He(e)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const He=e=>{const t=Object.entries(e);return 0===t.length?"no":t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function Ke(e,t,n){return{code:"INVALID_ANNOTATION",id:t,message:`A comment\n\n"${e}"\n\nin "${ue(t)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:fe("noSideEffects"===n?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Ye(e,t){return e.stack?(e.stack=e.stack.replace(t,e.message),e):e}function Je(e,t,n){return{code:Ce,message:`"${e}" was specified for "output.exports", but entry module "${ue(n)}" has the following exports: ${le(t)}`,url:fe(be)}}function Xe(e){return{code:De,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${ue(e)}". Import attributes need to have string keys and values. The attribute will be removed.`}}function Ze(e,t,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${void 0===s?"":`${JSON.stringify(s)} `}for option "${e}" - ${n}.`,url:fe(t)}}function Qe(e,t,n){const s=".json"===D(n);return{binding:e,code:Re,exporter:n,id:t,message:`"${e}" is not exported by "${ue(n)}", imported by "${ue(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:fe(me)}}function et(e){const t=[...e.implicitlyLoadedBefore].map((e=>ue(e.id))).sort();return{code:Me,message:`Module "${ue(e.id)}" that should be implicitly loaded before ${le(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 tt(e,t,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are\n${e} chunks, of which\n${t} are below minChunkSize.`}}function nt(e,t){return{code:Le,message:e,pos:t}}function st(e){return{code:"REDECLARATION_ERROR",message:`Identifier "${e}" has already been declared`}}function it(e){return{code:"RESERVED_NAMESPACE",message:`You have overided reserved namespace "${e}"`}}function rt(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)"),Ye({cause:e,code:Le,id:t,message:n,stack:e.stack},e.message)}function ot(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 at(e){return{code:Be,message:`Multiple conflicting contents for sourcemap source ${e}`}}function lt(e,t,n){const s=n?"reexport":"import";return{code:Te,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${ue(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:fe($e)}}function ct(e){return{code:Te,exporter:e,message:`There was a namespace "*" reexport from the external module "${ue(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:fe($e)}}function ut(e){return{code:"VALIDATION_ERROR",message:e}}function dt(e,t,n,s,i){!function(e,t,n,s,i){{const n=function(e,t){return{code:"DEPRECATED_FEATURE",message:e,url:fe(t)}}(e,t);if(i)return ve(n);s(ie,n)}}(e,t,0,s.onLog,s.strictDeprecations)}const ht=Symbol("PureFunction");function pt(e,t,n){const s=e.get(t);if(void 0!==s)return s;const i=n();return e.set(t,i),i}function ft(){return new Set}function mt(){return[]}const gt=Symbol("Unknown Key"),yt=Symbol("Unknown Non-Accessor Key"),bt=Symbol("Unknown Integer"),Et=Symbol("Symbol.toStringTag"),xt=[],$t=[gt],At=[yt],St=[bt],wt=Symbol("Entities");class vt{constructor(){this.entityPaths=Object.create(null,{[wt]:{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]=t[n]||Object.create(null,{[wt]:{value:new Set}});return t[wt]}}const Pt=new vt;class It{constructor(){this.entityPaths=Object.create(null,{[wt]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,n){let s=this.entityPaths;for(const t of e)s=s[t]=s[t]||Object.create(null,{[wt]:{value:new Map}});const i=pt(s[wt],t,ft);return!!i.has(n)||(i.add(n),!1)}}function kt(e,t){return!!(e&t)}function Nt(e,t,n){return e&~t|-n&t}const Ct=Symbol("Unknown Value"),Dt=Symbol("Unknown Truthy Value");class Ot{constructor(){this.flags=0}get included(){return kt(this.flags,1)}set included(e){this.flags=Nt(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){_t(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,n){return Ct}getReturnExpressionWhenCalledAtPath(e,t,n,s){return Mt}hasEffectsOnInteractionAtPath(e,t,n){return!0}include(e,t,n){this.included=!0}includeCallArguments(e,t){for(const n of t)n.include(e,!1)}shouldBeIncluded(e){return!0}}const Rt=new class extends Ot{},Mt=[Rt,!1],_t=e=>{for(const t of e.args)t?.deoptimizePath($t)},Lt={args:[null],type:0},Bt={args:[null,Rt],type:1},Tt={args:[null],type:2,withNew:!1},zt="ArrowFunctionExpression",Vt="CallExpression",Ft="ExportDefaultDeclaration",jt="ExpressionStatement",Ut="Identifier",Gt="Program";class Wt extends Ot{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=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===Vt&&e.parent.callee===e||e.parent.type===Ft||(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(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}include(){this.included=!0,this.renderedLikeHoisted?.include()}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e,this.renderName=t}}class qt extends Wt{constructor(e,t){super(t),this.referenced=!1,this.module=e,this.isNamespace="*"===t}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)}include(){super.include(),this.module.used=!0}}function Ht(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 Kt=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"]),Yt=/[^\w$]/g,Jt=e=>(e=>/\d/.test(e[0]))(e)||Kt.has(e)||"arguments"===e;function Xt(e){return e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(Yt,"_"),Jt(e)&&(e=`_${e}`),e||"_"}const Zt=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Qt=/^(?:0|[1-9]\d*)$/;function en(e){return Zt.test(e)?"__proto__"===e?'["__proto__"]':e:Qt.test(e)&&+e<=Number.MAX_SAFE_INTEGER?e:JSON.stringify(e)}function tn(e){return Zt.test(e)?e:JSON.stringify(e)}class nn{constructor(e,t,n,s,i,r){this.options=e,this.id=t,this.renormalizeRenderPath=i,this.dynamicImporters=[],this.execIndex=1/0,this.exportedVariables=new Map,this.importers=[],this.reexported=!1,this.used=!1,this.declarations=new Map,this.mostCommonSuggestion=0,this.nameSuggestions=new Map,this.suggestedVariableName=Xt(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:a}=this;this.info={ast:null,attributes:r,code:null,dynamicallyImportedIdResolutions:J,dynamicallyImportedIds:J,get dynamicImporters(){return a.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:t,implicitlyLoadedAfterOneOf:J,implicitlyLoadedBefore:J,importedIdResolutions:J,importedIds:J,get importers(){return o.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:s,moduleSideEffects:n,syntheticNamedExports:!1}}cacheInfoGetters(){Ht(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const n=new qt(this,e);return this.declarations.set(e,n),this.exportedVariables.set(n,e),[n]}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)for(const e of this.declarations.get(n).module.importers)t.add(e);const n=[...t];var s,i,r;this.options.onLog(ie,{code:"UNUSED_EXTERNAL_IMPORT",exporter:s=this.id,ids:r=n,message:`${le(i=e,["is","are"])} imported from external module "${s}" but never used in ${le(r.map((e=>ue(e))))}.`,names:i})}}function sn(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 nn||s.isExecuted||!s.info.moduleSideEffects&&!e.implicitlyLoadedBefore.has(s)||n.has(s.id)||(s.isExecuted=!0,n.add(s.id),t.push(s))}const rn=()=>{};function on(e,t=null){return Object.create(t,e)}const an=new class extends Ot{getLiteralValueAtPath(){}},ln={value:{hasEffectsWhenCalled:null,returns:Rt}},cn=new class extends Ot{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?An(yn,e[0]):Mt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||$n(yn,e[0],t,n)}},un={value:{hasEffectsWhenCalled:null,returns:cn}},dn=new class extends Ot{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?An(bn,e[0]):Mt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||$n(bn,e[0],t,n)}},hn={value:{hasEffectsWhenCalled:null,returns:dn}},pn=new class extends Ot{getReturnExpressionWhenCalledAtPath(e){return 1===e.length?An(xn,e[0]):Mt}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||$n(xn,e[0],t,n)}},fn={value:{hasEffectsWhenCalled:null,returns:pn}},mn={value:{hasEffectsWhenCalled({args:e},t){const n=e[2];return e.length<3||"symbol"==typeof n.getLiteralValueAtPath(xt,Pt,{deoptimizeCache(){}})&&n.hasEffectsOnInteractionAtPath(xt,Tt,t)},returns:pn}},gn=on({hasOwnProperty:un,isPrototypeOf:un,propertyIsEnumerable:un,toLocaleString:fn,toString:fn,valueOf:ln}),yn=on({valueOf:un},gn),bn=on({toExponential:fn,toFixed:fn,toLocaleString:fn,toPrecision:fn,valueOf:hn},gn),En=on({exec:ln,test:un},gn),xn=on({anchor:fn,at:ln,big:fn,blink:fn,bold:fn,charAt:fn,charCodeAt:hn,codePointAt:ln,concat:fn,endsWith:un,fixed:fn,fontcolor:fn,fontsize:fn,includes:un,indexOf:hn,italics:fn,lastIndexOf:hn,link:fn,localeCompare:hn,match:ln,matchAll:ln,normalize:fn,padEnd:fn,padStart:fn,repeat:fn,replace:mn,replaceAll:mn,search:hn,slice:fn,small:fn,split:ln,startsWith:un,strike:fn,sub:fn,substr:fn,substring:fn,sup:fn,toLocaleLowerCase:fn,toLocaleUpperCase:fn,toLowerCase:fn,toString:fn,toUpperCase:fn,trim:fn,trimEnd:fn,trimLeft:fn,trimRight:fn,trimStart:fn,valueOf:fn},gn);function $n(e,t,n,s){return"string"!=typeof t||!e[t]||(e[t].hasEffectsWhenCalled?.(n,s)||!1)}function An(e,t){return"string"==typeof t&&e[t]?[e[t].returns,!1]:Mt}var Sn=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const wn="_rollupAnnotations",vn="_rollupRemoved",Pn=(e,t)=>{if(0===e)return J;const n=t[e++],s=[];for(let i=0;i<n;i++)s.push(In(t[e++],t));return s},In=(e,t)=>{const n=t[e++];return{end:t[e++],start:n,type:Sn[t[e]]}},kn={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"],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 Nn(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function Cn(){return{accessed:new vt,assigned:new vt,brokenFlow:!1,called:new It,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new It,replacedVariableInits:new Map}}const Dn="variables",On=Symbol("IS_SKIPPED_CHAIN");class Rn extends Ot{get deoptimized(){return kt(this.flags,2)}set deoptimized(e){this.flags=Nt(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 kn[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 kn[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(xt,this.assignmentInteraction,e)}include(e,t,n){this.deoptimized||this.applyDeoptimizations(),this.included=!0;for(const n of kn[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)}}includeAsAssignmentTarget(e,t,n){this.include(e,t)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[t,n]of Object.entries(e))if(!this.hasOwnProperty(t))if(95===t.charCodeAt(0))t===wn?this.annotations=n:t===vn&&(this.invalidAnnotations=n);else if("object"!=typeof n||null===n)this[t]=n;else if(Array.isArray(n)){this[t]=[];for(const e of n)this[t].push(null===e?null:new(this.scope.context.getNodeConstructor(e.type))(this,this.scope).parseNode(e))}else this[t]=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n);return kn[e.type]||=function(e){return Object.keys(e).filter((t=>"object"==typeof e[t]&&95!==t.charCodeAt(0)))}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const t of this.annotations)e.remove(t.start,t.end)}render(e,t){for(const n of kn[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(Cn())}applyDeoptimizations(){this.deoptimized=!0;for(const e of kn[this.type]){const t=this[e];if(null!==t)if(Array.isArray(t))for(const e of t)e?.deoptimizePath($t);else t.deoptimizePath($t)}this.scope.context.requestTreeshakingPass()}}class Mn extends Rn{deoptimizeArgumentsOnInteractionAtPath(e,t,n){t.length>0&&this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[gt,...t],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($t,Lt,e))}applyDeoptimizations(){this.deoptimized=!0,this.argument.deoptimizePath([gt,gt]),this.scope.context.requestTreeshakingPass()}}class _n extends Ot{constructor(e){super(),this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},n){if(2===t&&0===n.length&&(this.description.mutatesSelfAsArray&&e[0]?.deoptimizePath(St),this.description.mutatesArgs))for(let t=1;t<e.length;t++)e[t].deoptimizePath($t)}getReturnExpressionWhenCalledAtPath(e,{args:t}){return e.length>0?Mt:[this.description.returnsPrimitive||("self"===this.description.returns?t[0]||Rt:this.description.returns()),!1]}hasEffectsOnInteractionAtPath(e,t,n){const{type:s}=t;if(e.length>(0===s?1:0))return!0;if(2===s){const{args:e}=t;if(!0===this.description.mutatesSelfAsArray&&e[0]?.hasEffectsOnInteractionAtPath(St,Bt,n))return!0;if(this.description.callsArgs)for(const t of this.description.callsArgs)if(e[t+1]?.hasEffectsOnInteractionAtPath(xt,Tt,n))return!0}return!1}}const Ln=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:cn})],Bn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:pn})],Tn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:dn})],zn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!1,returns:null,returnsPrimitive:Rt})],Vn=/^\d+$/;class Fn extends Ot{get hasLostTrack(){return kt(this.flags,2048)}set hasLostTrack(e){this.flags=Nt(this.flags,2048,e)}get hasUnknownDeoptimizedInteger(){return kt(this.flags,4096)}set hasUnknownDeoptimizedInteger(e){this.flags=Nt(this.flags,4096,e)}get hasUnknownDeoptimizedProperty(){return kt(this.flags,8192)}set hasUnknownDeoptimizedProperty(e){this.flags=Nt(this.flags,8192,e)}constructor(e,t,n=!1){if(super(),this.prototypeExpression=t,this.immutable=n,this.additionalExpressionsToBeDeoptimized=new Set,this.allProperties=[],this.deoptimizedPaths=Object.create(null),this.expressionsToBeDeoptimizedByKey=Object.create(null),this.gettersByKey=Object.create(null),this.propertiesAndGettersByKey=Object.create(null),this.propertiesAndSettersByKey=Object.create(null),this.settersByKey=Object.create(null),this.unknownIntegerProps=[],this.unmatchableGetters=[],this.unmatchablePropertiesAndGetters=[],this.unmatchableSetters=[],Array.isArray(e))this.buildPropertyMaps(e);else{this.propertiesAndGettersByKey=this.propertiesAndSettersByKey=e;for(const t of Object.values(e))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[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)])for(const t of e)t.deoptimizePath($t);this.prototypeExpression?.deoptimizePath([gt,gt]),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||"string"==typeof s&&this.deoptimizedPaths[s]))return void _t(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("string"==typeof s){if(a[s]){const t=l[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(Vn.test(s))for(const t of this.unknownIntegerProps)t.deoptimizeArgumentsOnInteractionAtPath(e,i,n)}else{for(const t of[...Object.values(l),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 Object.entries(this.propertiesAndGettersByKey))if(Vn.test(e))for(const e of t)e.deoptimizePath($t);this.deoptimizeCachedIntegerEntities()}}deoptimizePath(e){if(this.hasLostTrack||this.immutable)return;const t=e[0];if(1===e.length){if(t===bt)return this.deoptimizeIntegerProperties();if("string"!=typeof t)return this.deoptimizeAllProperties(t===yt);if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=!0;const e=this.expressionsToBeDeoptimizedByKey[t];if(e)for(const t of e)t.deoptimizeCache()}}const n=1===e.length?$t:e.slice(1);for(const e of"string"==typeof t?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties)e.deoptimizePath(n);this.prototypeExpression?.deoptimizePath(1===e.length?[...e,gt]:e)}getLiteralValueAtPath(e,t,n){if(0===e.length)return Dt;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?Ct:void 0}getReturnExpressionWhenCalledAtPath(e,t,n,s){if(0===e.length)return Mt;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):Mt}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===yt)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("string"==typeof s){if(r[s]){const e=o[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[...Object.values(o),a])for(const s of e)if(s.hasEffectsOnInteractionAtPath(i,t,n))return!0;return!!this.prototypeExpression&&this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,n)}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:n,propertiesAndSettersByKey:s,settersByKey:i,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:a,unmatchableGetters:l,unmatchableSetters:c}=this,u=[];for(let d=e.length-1;d>=0;d--){const{key:h,kind:p,property:f}=e[d];if(t.push(f),"string"==typeof h)"set"===p?s[h]||(s[h]=[f,...u],i[h]=[f,...c]):"get"===p?n[h]||(n[h]=[f,...a],r[h]=[f,...l]):(s[h]||(s[h]=[f,...u]),n[h]||(n[h]=[f,...a]));else{if(h===bt){o.push(f);continue}"set"===p&&c.push(f),"get"===p&&l.push(f),"get"!==p&&u.push(f),"set"!==p&&a.push(f)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey))for(const t of e)t.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath($t)}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey))if(Vn.test(e))for(const e of t)e.deoptimizeCache();for(const e of this.additionalExpressionsToBeDeoptimized)e.deoptimizePath(St)}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||"string"!=typeof e||this.hasUnknownDeoptimizedInteger&&Vn.test(e)||this.deoptimizedPaths[e])return Rt;const t=this.propertiesAndGettersByKey[e];return 1===t?.length?t[0]:t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&Vn.test(e)?Rt:null}getMemberExpressionAndTrackDeopt(e,t){if("string"!=typeof e)return Rt;const n=this.getMemberExpression(e);if(n!==Rt&&!this.immutable){(this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[]).push(t)}return n}}const jn=e=>"string"==typeof e&&/^\d+$/.test(e),Un=new class extends Ot{deoptimizeArgumentsOnInteractionAtPath(e,t){2!==e.type||1!==t.length||jn(t[0])||_t(e)}getLiteralValueAtPath(e){return 1===e.length&&jn(e[0])?void 0:Ct}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||2===t}},Gn=new Fn({__proto__:null,hasOwnProperty:Ln,isPrototypeOf:Ln,propertyIsEnumerable:Ln,toLocaleString:Bn,toString:Bn,valueOf:zn},Un,!0),Wn=[{key:bt,kind:"init",property:Rt},{key:"length",kind:"init",property:dn}],qn=[new _n({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:cn})],Hn=[new _n({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:dn})],Kn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:()=>new Fn(Wn,ss),returnsPrimitive:null})],Yn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Fn(Wn,ss),returnsPrimitive:null})],Jn=[new _n({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:()=>new Fn(Wn,ss),returnsPrimitive:null})],Xn=[new _n({callsArgs:null,mutatesArgs:!0,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:dn})],Zn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:null,returnsPrimitive:Rt})],Qn=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Rt})],es=[new _n({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Rt})],ts=[new _n({callsArgs:null,mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ns=[new _n({callsArgs:[0],mutatesArgs:!1,mutatesSelfAsArray:!0,returns:"self",returnsPrimitive:null})],ss=new Fn({__proto__:null,at:Qn,concat:Yn,copyWithin:ts,entries:Yn,every:qn,fill:ts,filter:Jn,find:es,findIndex:Hn,findLast:es,findLastIndex:Hn,flat:Yn,flatMap:Jn,forEach:es,includes:Ln,indexOf:Tn,join:Bn,keys:zn,lastIndexOf:Tn,map:Jn,pop:Zn,push:Xn,reduce:es,reduceRight:es,reverse:ts,shift:Zn,slice:Yn,some:qn,sort:ns,splice:Kn,toLocaleString:Bn,toString:Bn,unshift:Xn,values:Qn},Gn,!0);class is extends Rn{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)}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 Mn)&&(e=!0,n.deoptimizePath($t))}this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[{key:"length",kind:"init",property:dn}];let t=!1;for(let n=0;n<this.elements.length;n++){const s=this.elements[n];t||s instanceof Mn?s&&(t=!0,e.unshift({key:bt,kind:"init",property:s})):s?e.push({key:String(n),kind:"init",property:s}):e.push({key:String(n),kind:"init",property:an})}return this.objectEntity=new Fn(e,ss)}}const rs=Symbol("Value Properties"),os=()=>Dt,as=()=>!1,ls=()=>!0,cs={deoptimizeArgumentsOnCall:rn,getLiteralValue:os,hasEffectsWhenCalled:as},us={deoptimizeArgumentsOnCall:rn,getLiteralValue:os,hasEffectsWhenCalled:ls},ds={deoptimizeArgumentsOnCall:rn,getLiteralValue:os,hasEffectsWhenCalled:({args:e})=>e.length>1&&!(e[1]instanceof is)},hs={deoptimizeArgumentsOnCall:rn,getLiteralValue:os,hasEffectsWhenCalled({args:e},t){const[n,s]=e;return!(s instanceof Ot)||s.hasEffectsOnInteractionAtPath($t,Lt,t)}},ps={__proto__:null,[rs]:us},fs={__proto__:null,[rs]:cs},ms={__proto__:null,[rs]:hs},gs={__proto__:null,[rs]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath($t)},getLiteralValue:os,hasEffectsWhenCalled:({args:e},t)=>e.length<=1||e[1].hasEffectsOnInteractionAtPath(At,Bt,t)}},ys={__proto__:null,[rs]:us,prototype:ps},bs={__proto__:null,[rs]:cs,prototype:ps},Es={__proto__:null,[rs]:ds,prototype:ps},xs={__proto__:null,[rs]:cs,from:ps,of:fs,prototype:ps},$s={__proto__:null,[rs]:cs,supportedLocalesOf:bs},As={global:ps,globalThis:ps,self:ps,window:ps,__proto__:null,[rs]:us,Array:{__proto__:null,[rs]:us,from:ps,isArray:fs,of:fs,prototype:ps},ArrayBuffer:{__proto__:null,[rs]:cs,isView:fs,prototype:ps},AggregateError:Es,Atomics:ps,BigInt:ys,BigInt64Array:ys,BigUint64Array:ys,Boolean:bs,constructor:ys,DataView:bs,Date:{__proto__:null,[rs]:cs,now:fs,parse:fs,prototype:ps,UTC:fs},decodeURI:fs,decodeURIComponent:fs,encodeURI:fs,encodeURIComponent:fs,Error:bs,escape:fs,eval:ps,EvalError:bs,FinalizationRegistry:ys,Float32Array:xs,Float64Array:xs,Function:ys,hasOwnProperty:ps,Infinity:ps,Int16Array:xs,Int32Array:xs,Int8Array:xs,isFinite:fs,isNaN:fs,isPrototypeOf:ps,JSON:ps,Map:Es,Math:{__proto__:null,[rs]:us,abs:fs,acos:fs,acosh:fs,asin:fs,asinh:fs,atan:fs,atan2:fs,atanh:fs,cbrt:fs,ceil:fs,clz32:fs,cos:fs,cosh:fs,exp:fs,expm1:fs,floor:fs,fround:fs,hypot:fs,imul:fs,log:fs,log10:fs,log1p:fs,log2:fs,max:fs,min:fs,pow:fs,random:fs,round:fs,sign:fs,sin:fs,sinh:fs,sqrt:fs,tan:fs,tanh:fs,trunc:fs},NaN:ps,Number:{__proto__:null,[rs]:cs,isFinite:fs,isInteger:fs,isNaN:fs,isSafeInteger:fs,parseFloat:fs,parseInt:fs,prototype:ps},Object:{__proto__:null,[rs]:cs,create:fs,defineProperty:gs,defineProperties:gs,freeze:gs,getOwnPropertyDescriptor:fs,getOwnPropertyDescriptors:fs,getOwnPropertyNames:fs,getOwnPropertySymbols:fs,getPrototypeOf:fs,hasOwn:fs,is:fs,isExtensible:fs,isFrozen:fs,isSealed:fs,keys:fs,fromEntries:ps,entries:ms,values:ms,prototype:ps},parseFloat:fs,parseInt:fs,Promise:{__proto__:null,[rs]:us,all:ps,allSettled:ps,any:ps,prototype:ps,race:ps,reject:ps,resolve:ps},propertyIsEnumerable:ps,Proxy:ps,RangeError:bs,ReferenceError:bs,Reflect:ps,RegExp:bs,Set:Es,SharedArrayBuffer:ys,String:{__proto__:null,[rs]:cs,fromCharCode:fs,fromCodePoint:fs,prototype:ps,raw:fs},Symbol:{__proto__:null,[rs]:cs,for:fs,keyFor:fs,prototype:ps,toStringTag:{__proto__:null,[rs]:{deoptimizeArgumentsOnCall:rn,getLiteralValue:()=>Et,hasEffectsWhenCalled:ls}}},SyntaxError:bs,toLocaleString:ps,toString:ps,TypeError:bs,Uint16Array:xs,Uint32Array:xs,Uint8Array:xs,Uint8ClampedArray:xs,unescape:fs,URIError:bs,valueOf:ps,WeakMap:Es,WeakRef:ys,WeakSet:Es,clearInterval:ys,clearTimeout:ys,console:{__proto__:null,[rs]:us,assert:ys,clear:ys,count:ys,countReset:ys,debug:ys,dir:ys,dirxml:ys,error:ys,exception:ys,group:ys,groupCollapsed:ys,groupEnd:ys,info:ys,log:ys,table:ys,time:ys,timeEnd:ys,timeLog:ys,trace:ys,warn:ys},Intl:{__proto__:null,[rs]:us,Collator:$s,DateTimeFormat:$s,DisplayNames:$s,ListFormat:$s,Locale:$s,NumberFormat:$s,PluralRules:$s,RelativeTimeFormat:$s,Segmenter:$s},setInterval:ys,setTimeout:ys,TextDecoder:ys,TextEncoder:ys,URL:{__proto__:null,[rs]:us,prototype:ps,canParse:fs},URLSearchParams:ys,AbortController:ys,AbortSignal:ys,addEventListener:ps,alert:ps,AnalyserNode:ys,Animation:ys,AnimationEvent:ys,applicationCache:ps,ApplicationCache:ys,ApplicationCacheErrorEvent:ys,atob:ps,Attr:ys,Audio:ys,AudioBuffer:ys,AudioBufferSourceNode:ys,AudioContext:ys,AudioDestinationNode:ys,AudioListener:ys,AudioNode:ys,AudioParam:ys,AudioProcessingEvent:ys,AudioScheduledSourceNode:ys,AudioWorkletNode:ys,BarProp:ys,BaseAudioContext:ys,BatteryManager:ys,BeforeUnloadEvent:ys,BiquadFilterNode:ys,Blob:ys,BlobEvent:ys,blur:ps,BroadcastChannel:ys,btoa:ps,ByteLengthQueuingStrategy:ys,Cache:ys,caches:ps,CacheStorage:ys,cancelAnimationFrame:ps,cancelIdleCallback:ps,CanvasCaptureMediaStreamTrack:ys,CanvasGradient:ys,CanvasPattern:ys,CanvasRenderingContext2D:ys,ChannelMergerNode:ys,ChannelSplitterNode:ys,CharacterData:ys,clientInformation:ps,ClipboardEvent:ys,close:ps,closed:ps,CloseEvent:ys,Comment:ys,CompositionEvent:ys,confirm:ps,ConstantSourceNode:ys,ConvolverNode:ys,CountQueuingStrategy:ys,createImageBitmap:ps,Credential:ys,CredentialsContainer:ys,crypto:ps,Crypto:ys,CryptoKey:ys,CSS:ys,CSSConditionRule:ys,CSSFontFaceRule:ys,CSSGroupingRule:ys,CSSImportRule:ys,CSSKeyframeRule:ys,CSSKeyframesRule:ys,CSSMediaRule:ys,CSSNamespaceRule:ys,CSSPageRule:ys,CSSRule:ys,CSSRuleList:ys,CSSStyleDeclaration:ys,CSSStyleRule:ys,CSSStyleSheet:ys,CSSSupportsRule:ys,CustomElementRegistry:ys,customElements:ps,CustomEvent:{__proto__:null,[rs]:{deoptimizeArgumentsOnCall({args:e}){e[2]?.deoptimizePath(["detail"])},getLiteralValue:os,hasEffectsWhenCalled:as},prototype:ps},DataTransfer:ys,DataTransferItem:ys,DataTransferItemList:ys,defaultstatus:ps,defaultStatus:ps,DelayNode:ys,DeviceMotionEvent:ys,DeviceOrientationEvent:ys,devicePixelRatio:ps,dispatchEvent:ps,document:ps,Document:ys,DocumentFragment:ys,DocumentType:ys,DOMError:ys,DOMException:ys,DOMImplementation:ys,DOMMatrix:ys,DOMMatrixReadOnly:ys,DOMParser:ys,DOMPoint:ys,DOMPointReadOnly:ys,DOMQuad:ys,DOMRect:ys,DOMRectReadOnly:ys,DOMStringList:ys,DOMStringMap:ys,DOMTokenList:ys,DragEvent:ys,DynamicsCompressorNode:ys,Element:ys,ErrorEvent:ys,Event:ys,EventSource:ys,EventTarget:ys,external:ps,fetch:ps,File:ys,FileList:ys,FileReader:ys,find:ps,focus:ps,FocusEvent:ys,FontFace:ys,FontFaceSetLoadEvent:ys,FormData:ys,frames:ps,GainNode:ys,Gamepad:ys,GamepadButton:ys,GamepadEvent:ys,getComputedStyle:ps,getSelection:ps,HashChangeEvent:ys,Headers:ys,history:ps,History:ys,HTMLAllCollection:ys,HTMLAnchorElement:ys,HTMLAreaElement:ys,HTMLAudioElement:ys,HTMLBaseElement:ys,HTMLBodyElement:ys,HTMLBRElement:ys,HTMLButtonElement:ys,HTMLCanvasElement:ys,HTMLCollection:ys,HTMLContentElement:ys,HTMLDataElement:ys,HTMLDataListElement:ys,HTMLDetailsElement:ys,HTMLDialogElement:ys,HTMLDirectoryElement:ys,HTMLDivElement:ys,HTMLDListElement:ys,HTMLDocument:ys,HTMLElement:ys,HTMLEmbedElement:ys,HTMLFieldSetElement:ys,HTMLFontElement:ys,HTMLFormControlsCollection:ys,HTMLFormElement:ys,HTMLFrameElement:ys,HTMLFrameSetElement:ys,HTMLHeadElement:ys,HTMLHeadingElement:ys,HTMLHRElement:ys,HTMLHtmlElement:ys,HTMLIFrameElement:ys,HTMLImageElement:ys,HTMLInputElement:ys,HTMLLabelElement:ys,HTMLLegendElement:ys,HTMLLIElement:ys,HTMLLinkElement:ys,HTMLMapElement:ys,HTMLMarqueeElement:ys,HTMLMediaElement:ys,HTMLMenuElement:ys,HTMLMetaElement:ys,HTMLMeterElement:ys,HTMLModElement:ys,HTMLObjectElement:ys,HTMLOListElement:ys,HTMLOptGroupElement:ys,HTMLOptionElement:ys,HTMLOptionsCollection:ys,HTMLOutputElement:ys,HTMLParagraphElement:ys,HTMLParamElement:ys,HTMLPictureElement:ys,HTMLPreElement:ys,HTMLProgressElement:ys,HTMLQuoteElement:ys,HTMLScriptElement:ys,HTMLSelectElement:ys,HTMLShadowElement:ys,HTMLSlotElement:ys,HTMLSourceElement:ys,HTMLSpanElement:ys,HTMLStyleElement:ys,HTMLTableCaptionElement:ys,HTMLTableCellElement:ys,HTMLTableColElement:ys,HTMLTableElement:ys,HTMLTableRowElement:ys,HTMLTableSectionElement:ys,HTMLTemplateElement:ys,HTMLTextAreaElement:ys,HTMLTimeElement:ys,HTMLTitleElement:ys,HTMLTrackElement:ys,HTMLUListElement:ys,HTMLUnknownElement:ys,HTMLVideoElement:ys,IDBCursor:ys,IDBCursorWithValue:ys,IDBDatabase:ys,IDBFactory:ys,IDBIndex:ys,IDBKeyRange:ys,IDBObjectStore:ys,IDBOpenDBRequest:ys,IDBRequest:ys,IDBTransaction:ys,IDBVersionChangeEvent:ys,IdleDeadline:ys,IIRFilterNode:ys,Image:ys,ImageBitmap:ys,ImageBitmapRenderingContext:ys,ImageCapture:ys,ImageData:ys,indexedDB:ps,innerHeight:ps,innerWidth:ps,InputEvent:ys,IntersectionObserver:ys,IntersectionObserverEntry:ys,isSecureContext:ps,KeyboardEvent:ys,KeyframeEffect:ys,length:ps,localStorage:ps,location:ps,Location:ys,locationbar:ps,matchMedia:ps,MediaDeviceInfo:ys,MediaDevices:ys,MediaElementAudioSourceNode:ys,MediaEncryptedEvent:ys,MediaError:ys,MediaKeyMessageEvent:ys,MediaKeySession:ys,MediaKeyStatusMap:ys,MediaKeySystemAccess:ys,MediaList:ys,MediaQueryList:ys,MediaQueryListEvent:ys,MediaRecorder:ys,MediaSettingsRange:ys,MediaSource:ys,MediaStream:ys,MediaStreamAudioDestinationNode:ys,MediaStreamAudioSourceNode:ys,MediaStreamEvent:ys,MediaStreamTrack:ys,MediaStreamTrackEvent:ys,menubar:ps,MessageChannel:ys,MessageEvent:ys,MessagePort:ys,MIDIAccess:ys,MIDIConnectionEvent:ys,MIDIInput:ys,MIDIInputMap:ys,MIDIMessageEvent:ys,MIDIOutput:ys,MIDIOutputMap:ys,MIDIPort:ys,MimeType:ys,MimeTypeArray:ys,MouseEvent:ys,moveBy:ps,moveTo:ps,MutationEvent:ys,MutationObserver:ys,MutationRecord:ys,name:ps,NamedNodeMap:ys,NavigationPreloadManager:ys,navigator:ps,Navigator:ys,NetworkInformation:ys,Node:ys,NodeFilter:ps,NodeIterator:ys,NodeList:ys,Notification:ys,OfflineAudioCompletionEvent:ys,OfflineAudioContext:ys,offscreenBuffering:ps,OffscreenCanvas:ys,open:ps,openDatabase:ps,Option:ys,origin:ps,OscillatorNode:ys,outerHeight:ps,outerWidth:ps,PageTransitionEvent:ys,pageXOffset:ps,pageYOffset:ps,PannerNode:ys,parent:ps,Path2D:ys,PaymentAddress:ys,PaymentRequest:ys,PaymentRequestUpdateEvent:ys,PaymentResponse:ys,performance:ps,Performance:ys,PerformanceEntry:ys,PerformanceLongTaskTiming:ys,PerformanceMark:ys,PerformanceMeasure:ys,PerformanceNavigation:ys,PerformanceNavigationTiming:ys,PerformanceObserver:ys,PerformanceObserverEntryList:ys,PerformancePaintTiming:ys,PerformanceResourceTiming:ys,PerformanceTiming:ys,PeriodicWave:ys,Permissions:ys,PermissionStatus:ys,personalbar:ps,PhotoCapabilities:ys,Plugin:ys,PluginArray:ys,PointerEvent:ys,PopStateEvent:ys,postMessage:ps,Presentation:ys,PresentationAvailability:ys,PresentationConnection:ys,PresentationConnectionAvailableEvent:ys,PresentationConnectionCloseEvent:ys,PresentationConnectionList:ys,PresentationReceiver:ys,PresentationRequest:ys,print:ps,ProcessingInstruction:ys,ProgressEvent:ys,PromiseRejectionEvent:ys,prompt:ps,PushManager:ys,PushSubscription:ys,PushSubscriptionOptions:ys,queueMicrotask:ps,RadioNodeList:ys,Range:ys,ReadableStream:ys,RemotePlayback:ys,removeEventListener:ps,Request:ys,requestAnimationFrame:ps,requestIdleCallback:ps,resizeBy:ps,ResizeObserver:ys,ResizeObserverEntry:ys,resizeTo:ps,Response:ys,RTCCertificate:ys,RTCDataChannel:ys,RTCDataChannelEvent:ys,RTCDtlsTransport:ys,RTCIceCandidate:ys,RTCIceTransport:ys,RTCPeerConnection:ys,RTCPeerConnectionIceEvent:ys,RTCRtpReceiver:ys,RTCRtpSender:ys,RTCSctpTransport:ys,RTCSessionDescription:ys,RTCStatsReport:ys,RTCTrackEvent:ys,screen:ps,Screen:ys,screenLeft:ps,ScreenOrientation:ys,screenTop:ps,screenX:ps,screenY:ps,ScriptProcessorNode:ys,scroll:ps,scrollbars:ps,scrollBy:ps,scrollTo:ps,scrollX:ps,scrollY:ps,SecurityPolicyViolationEvent:ys,Selection:ys,ServiceWorker:ys,ServiceWorkerContainer:ys,ServiceWorkerRegistration:ys,sessionStorage:ps,ShadowRoot:ys,SharedWorker:ys,SourceBuffer:ys,SourceBufferList:ys,speechSynthesis:ps,SpeechSynthesisEvent:ys,SpeechSynthesisUtterance:ys,StaticRange:ys,status:ps,statusbar:ps,StereoPannerNode:ys,stop:ps,Storage:ys,StorageEvent:ys,StorageManager:ys,styleMedia:ps,StyleSheet:ys,StyleSheetList:ys,SubtleCrypto:ys,SVGAElement:ys,SVGAngle:ys,SVGAnimatedAngle:ys,SVGAnimatedBoolean:ys,SVGAnimatedEnumeration:ys,SVGAnimatedInteger:ys,SVGAnimatedLength:ys,SVGAnimatedLengthList:ys,SVGAnimatedNumber:ys,SVGAnimatedNumberList:ys,SVGAnimatedPreserveAspectRatio:ys,SVGAnimatedRect:ys,SVGAnimatedString:ys,SVGAnimatedTransformList:ys,SVGAnimateElement:ys,SVGAnimateMotionElement:ys,SVGAnimateTransformElement:ys,SVGAnimationElement:ys,SVGCircleElement:ys,SVGClipPathElement:ys,SVGComponentTransferFunctionElement:ys,SVGDefsElement:ys,SVGDescElement:ys,SVGDiscardElement:ys,SVGElement:ys,SVGEllipseElement:ys,SVGFEBlendElement:ys,SVGFEColorMatrixElement:ys,SVGFEComponentTransferElement:ys,SVGFECompositeElement:ys,SVGFEConvolveMatrixElement:ys,SVGFEDiffuseLightingElement:ys,SVGFEDisplacementMapElement:ys,SVGFEDistantLightElement:ys,SVGFEDropShadowElement:ys,SVGFEFloodElement:ys,SVGFEFuncAElement:ys,SVGFEFuncBElement:ys,SVGFEFuncGElement:ys,SVGFEFuncRElement:ys,SVGFEGaussianBlurElement:ys,SVGFEImageElement:ys,SVGFEMergeElement:ys,SVGFEMergeNodeElement:ys,SVGFEMorphologyElement:ys,SVGFEOffsetElement:ys,SVGFEPointLightElement:ys,SVGFESpecularLightingElement:ys,SVGFESpotLightElement:ys,SVGFETileElement:ys,SVGFETurbulenceElement:ys,SVGFilterElement:ys,SVGForeignObjectElement:ys,SVGGElement:ys,SVGGeometryElement:ys,SVGGradientElement:ys,SVGGraphicsElement:ys,SVGImageElement:ys,SVGLength:ys,SVGLengthList:ys,SVGLinearGradientElement:ys,SVGLineElement:ys,SVGMarkerElement:ys,SVGMaskElement:ys,SVGMatrix:ys,SVGMetadataElement:ys,SVGMPathElement:ys,SVGNumber:ys,SVGNumberList:ys,SVGPathElement:ys,SVGPatternElement:ys,SVGPoint:ys,SVGPointList:ys,SVGPolygonElement:ys,SVGPolylineElement:ys,SVGPreserveAspectRatio:ys,SVGRadialGradientElement:ys,SVGRect:ys,SVGRectElement:ys,SVGScriptElement:ys,SVGSetElement:ys,SVGStopElement:ys,SVGStringList:ys,SVGStyleElement:ys,SVGSVGElement:ys,SVGSwitchElement:ys,SVGSymbolElement:ys,SVGTextContentElement:ys,SVGTextElement:ys,SVGTextPathElement:ys,SVGTextPositioningElement:ys,SVGTitleElement:ys,SVGTransform:ys,SVGTransformList:ys,SVGTSpanElement:ys,SVGUnitTypes:ys,SVGUseElement:ys,SVGViewElement:ys,TaskAttributionTiming:ys,Text:ys,TextEvent:ys,TextMetrics:ys,TextTrack:ys,TextTrackCue:ys,TextTrackCueList:ys,TextTrackList:ys,TimeRanges:ys,toolbar:ps,top:ps,Touch:ys,TouchEvent:ys,TouchList:ys,TrackEvent:ys,TransitionEvent:ys,TreeWalker:ys,UIEvent:ys,ValidityState:ys,visualViewport:ps,VisualViewport:ys,VTTCue:ys,WaveShaperNode:ys,WebAssembly:ps,WebGL2RenderingContext:ys,WebGLActiveInfo:ys,WebGLBuffer:ys,WebGLContextEvent:ys,WebGLFramebuffer:ys,WebGLProgram:ys,WebGLQuery:ys,WebGLRenderbuffer:ys,WebGLRenderingContext:ys,WebGLSampler:ys,WebGLShader:ys,WebGLShaderPrecisionFormat:ys,WebGLSync:ys,WebGLTexture:ys,WebGLTransformFeedback:ys,WebGLUniformLocation:ys,WebGLVertexArrayObject:ys,WebSocket:ys,WheelEvent:ys,Window:ys,Worker:ys,WritableStream:ys,XMLDocument:ys,XMLHttpRequest:ys,XMLHttpRequestEventTarget:ys,XMLHttpRequestUpload:ys,XMLSerializer:ys,XPathEvaluator:ys,XPathExpression:ys,XPathResult:ys,XSLTProcessor:ys};for(const e of["window","global","self","globalThis"])As[e]=As;function Ss(e){let t=As;for(const n of e){if("string"!=typeof n)return null;if(t=t[n],!t)return null}return t[rs]}class ws extends Wt{constructor(e){super(e),this.markReassigned()}deoptimizeArgumentsOnInteractionAtPath(e,t,n){switch(e.type){case 0:case 1:return void(Ss([this.name,...t].slice(0,-1))||super.deoptimizeArgumentsOnInteractionAtPath(e,t,n));case 2:{const s=Ss([this.name,...t]);return void(s?s.deoptimizeArgumentsOnCall(e):super.deoptimizeArgumentsOnInteractionAtPath(e,t,n))}}}getLiteralValueAtPath(e,t,n){const s=Ss([this.name,...e]);return s?s.getLiteralValue():Ct}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return 0===e.length?"undefined"!==this.name&&!Ss([this.name]):!Ss([this.name,...e].slice(0,-1));case 1:return!0;case 2:{const s=Ss([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,n)}}}}class vs extends Wt{constructor(e,t,n,s,i){super(e),this.init=n,this.calledFromTryStatement=!1,this.additionalInitializers=null,this.expressionsToBeDeoptimized=[],this.declarations=t?[t]:[],this.deoptimizationTracker=s.deoptimizationTracker,this.module=s.module,this.kind=i}addDeclaration(e,t){this.declarations.push(e),this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers){for(const e of this.additionalInitializers)e.deoptimizePath($t);this.additionalInitializers=null}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.isReassigned?_t(e):n.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeArgumentsOnInteractionAtPath(e,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=J;for(const t of e)t.deoptimizeCache();this.init.deoptimizePath($t)}else this.init.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){return this.isReassigned?Ct:t.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(n),this.init.getLiteralValueAtPath(e,t,n))),Ct)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.isReassigned?Mt:n.withTrackedEntityAtPath(e,this.init,(()=>(this.expressionsToBeDeoptimized.push(s),this.init.getReturnExpressionWhenCalledAtPath(e,t,n,s))),Mt)}hasEffectsOnInteractionAtPath(e,t,n){switch(t.type){case 0:return!!this.isReassigned||!n.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n);case 1:return!!this.included||0!==e.length&&(!!this.isReassigned||!n.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n));case 2:return!!this.isReassigned||!(t.withNew?n.instantiated:n.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,n)}}include(){if(!this.included){super.include();for(const e of this.declarations){e.included||e.include(Nn(),!1);let t=e.parent;for(;!t.included&&(t.included=!0,t.type!==Gt);)t=t.parent}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init))for(const n of t)n.include(e,!1);else e.includedCallArguments.add(this.init),this.init.includeCallArguments(e,t),e.includedCallArguments.delete(this.init)}markCalledFromTryStatement(){this.calledFromTryStatement=!0}markInitializersForDeoptimization(){return null===this.additionalInitializers&&(this.additionalInitializers=[this.init],this.init=Rt,this.markReassigned()),this.additionalInitializers}}const Ps=new Set(["class","const","let","var","using","await using"]);class Is extends Rn{constructor(){super(...arguments),this.variable=null,this.isReferenceVariable=!1}get isTDZAccess(){return kt(this.flags,4)?kt(this.flags,8):null}set isTDZAccess(e){this.flags=Nt(this.flags,4,!0),this.flags=Nt(this.flags,8,e)}addExportedVariables(e,t){t.has(this.variable)&&e.push(this.variable)}bind(){!this.variable&&H(this,this.parent)&&(this.variable=this.scope.findVariable(this.name),this.variable.addReference(this),this.isReferenceVariable=!0)}declare(e,t){let n;const{treeshake:s}=this.scope.context.options;switch(e){case"var":n=this.scope.addDeclaration(this,this.scope.context,t,e),s&&s.correctVarValueBeforeDeclaration&&n.markInitializersForDeoptimization();break;case"function":case"let":case"const":case"using":case"await using":case"class":n=this.scope.addDeclaration(this,this.scope.context,t,e);break;case"parameter":n=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}return[this.variable=n]}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 ws&&!this.isPureFunction(xt)&&this.variable.hasEffectsOnInteractionAtPath(xt,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(){this.deoptimized||this.applyDeoptimizations(),this.included||(this.included=!0,null!==this.variable&&this.scope.context.includeVariableInModule(this.variable))}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){const e=this.isTDZAccess;if(null!==e)return e;if(!(this.variable instanceof vs&&this.variable.kind&&Ps.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&&ks(this)===ks(t)?this.isTDZAccess=!0:this.variable.initReached?this.isTDZAccess=!1:this.isTDZAccess=!0}markDeclarationReached(){this.variable.initReached=!0}render(e,{snippets:{getPropertyAccess:t},useOriginalName:n},{renderedParentType:s,isCalleeOfRenderedParent:i,isShorthandProperty:r}=K){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===Vt&&i&&e.appendRight(this.start,"0, ")}}disallowImportReassignment(){return this.scope.context.error(We(this.name,this.scope.context.module.id),this.start)}applyDeoptimizations(){this.deoptimized=!0,this.variable instanceof vs&&(this.variable.module.isExecuted||sn(this.variable.module),this.variable.consolidateInitializers(),this.scope.context.requestTreeshakingPass()),this.isReferenceVariable&&(this.variable.addUsedPlace(this),this.scope.context.requestTreeshakingPass())}getVariableRespectingTDZ(){return this.isPossibleTDZ()?Rt:this.variable}isPureFunction(e){let t=this.scope.context.manualPureFunctions[this.name];for(const n of e){if(!t)return!1;if(t[ht])return!0;t=t[n]}return t?.[ht]}}function ks(e){for(;e&&!/^Program|Function/.test(e.type);)e=e.parent;return e}function Ns(e){let t="";do{const n=e%64;e=e/64|0,t="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$"[n]+t}while(0!==e);return t}function Cs(e,t,n){let s=e,i=1;for(;t.has(s)||Kt.has(s)||n?.has(s);)s=`${e}$${Ns(i++)}`;return t.add(s),s}class Ds{constructor(){this.children=[],this.variables=new Map}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("var"===s&&"var"===o)return r.addDeclaration(e,n),r;t.error(st(i),e.start)}const o=new vs(e.name,e,n,t,s);return this.variables.set(i,o),o}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 Os extends Ds{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 Os&&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 Os&&this.parent.addAccessedGlobals(e,t)}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t),this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof Os&&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,Cs(e,s,t.forbiddenNames));for(const s of this.children)s.deconflict(e,t,n)}findLexicalBoundary(){return this.parent.findLexicalBoundary()}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 Rs(e,t){for(const n of e)if(n.hasEffects(t))return!0;return!1}class Ms extends Rn{constructor(){super(...arguments),this.accessedValue=null}get computed(){return kt(this.flags,1024)}set computed(e){this.flags=Nt(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},xt,n):void this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(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(xt,{args:t.args,type:2,withNew:!1},n):this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}getAccessedValue(){return null===this.accessedValue?"get"===this.kind?(this.accessedValue=Mt,this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(xt,Tt,Pt,this)):this.accessedValue=[this.value,!1]:this.accessedValue}}class _s extends Ms{hasEffects(e){return super.hasEffects(e)||Rs(this.decorators,e)}applyDeoptimizations(){}}class Ls extends Os{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r)return"var"===r.kind||"var"===s&&"parameter"===r.kind?(r.addDeclaration(e,n),r):t.error(st(i),e.start);const o=this.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class Bs extends Rn{createScope(e){this.scope=new Ls(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=L(e.original.slice(this.start,this.end),"{")+1;F(this.body,e,this.start+n,this.end-1,t)}else super.render(e,t)}}function Ts(e){return"StaticBlock"===e.type}class zs extends Ot{constructor(e,t){super(),this.object=e,this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],n)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,n){return this.object.getLiteralValueAtPath([this.key,...e],t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,n,s)}hasEffectsOnInteractionAtPath(e,t,n){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,n)}}class Vs extends Rn{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Os(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)||Rs(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.deoptimized||this.applyDeoptimizations(),this.included=!0,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())}initialise(){super.initialise(),this.id?.declare("class",this);for(const e of this.body.body)if(e instanceof _s&&"constructor"===e.kind)return void(this.classConstructor=e);this.classConstructor=null}applyDeoptimizations(){this.deoptimized=!0;for(const e of this.body.body)Ts(e)||e.static||e instanceof _s&&"constructor"===e.kind||e.deoptimizePath($t);this.scope.context.requestTreeshakingPass()}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;const e=[],t=[];for(const n of this.body.body){if(Ts(n))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(xt,Pt,this);if("symbol"==typeof e){s.push({key:gt,kind:r,property:n});continue}o=String(e)}else o=n.key instanceof Is?n.key.name:String(n.key.value);s.push({key:o,kind:r,property:n})}return e.unshift({key:"prototype",kind:"init",property:new Fn(t,this.superClass?new zs(this.superClass,"prototype"):Gn)}),this.objectEntity=new Fn(e,this.superClass||Gn)}}class Fs extends Vs{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}parseNode(e){return null!==e.id&&(this.id=new Is(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}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}${G([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 js extends vs{constructor(e){super("arguments",null,Rt,e,"other"),this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){this.included?e.deoptimizePath($t):this.deoptimizedArguments.push(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments)e.deoptimizePath($t);this.deoptimizedArguments.length=0}}const Us=J,Gs=new Set([gt]),Ws=new vt,qs=new Set([Rt]);class Hs extends vs{constructor(e,t,n){super(e,t,Rt,n,"parameter"),this.deoptimizationInteractions=[],this.deoptimizations=new vt,this.deoptimizedFields=new Set,this.entitiesToBeDeoptimized=new Set,this.expressionsUseTheKnownValue=[],this.knownValue=null,this.knownValueLiteral=Ct,this.frozenValue=null}addEntityToBeDeoptimized(e){if(e===Rt){if(!this.entitiesToBeDeoptimized.has(Rt)){this.entitiesToBeDeoptimized.add(Rt);for(const{interaction:e}of this.deoptimizationInteractions)_t(e);this.deoptimizationInteractions=Us}}else if(this.deoptimizedFields.has(gt))e.deoptimizePath($t);else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields)e.deoptimizePath([t]);for(const{interaction:t,path:n}of this.deoptimizationInteractions)e.deoptimizeArgumentsOnInteractionAtPath(t,n,Pt)}}markReassigned(){if(!this.isReassigned){super.markReassigned();for(const e of this.expressionsUseTheKnownValue)e.deoptimizeCache();this.expressionsUseTheKnownValue=J}}deoptimizeCache(){this.markReassigned()}updateKnownValue(e){if(this.isReassigned)return;if(null===this.knownValue)return this.knownValue=e,void(this.knownValueLiteral=e.getLiteralValueAtPath(xt,Pt,this));if(this.knownValue===e||this.knownValue instanceof Is&&e instanceof Is&&this.knownValue.variable===e.variable)return;const t=this.knownValueLiteral;if("symbol"==typeof t)return void this.markReassigned();e.getLiteralValueAtPath(xt,Pt,this)!==t&&this.markReassigned()}getKnownValue(){return null===this.frozenValue&&(this.frozenValue=this.knownValue||Rt),this.frozenValue}getLiteralValueAtPath(e,t,n){if(this.isReassigned)return Ct;const s=this.getKnownValue();return this.expressionsUseTheKnownValue.push(n),t.withTrackedEntityAtPath(e,s,(()=>s.getLiteralValueAtPath(e,t,n)),Ct)}hasEffectsOnInteractionAtPath(e,t,n){if(this.isReassigned||1===t.type)return super.hasEffectsOnInteractionAtPath(e,t,n);return this.getKnownValue().hasEffectsOnInteractionAtPath(e,t,n)}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(Rt)||this.deoptimizationInteractions.length>=20||1===t.length&&(this.deoptimizedFields.has(gt)||2===e.type&&this.deoptimizedFields.has(t[0])))_t(e);else if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const n of this.entitiesToBeDeoptimized)n.deoptimizeArgumentsOnInteractionAtPath(e,t,Pt);this.entitiesToBeDeoptimized.has(Rt)||this.deoptimizationInteractions.push({interaction:e,path:t})}}deoptimizePath(e){if(0===e.length)return void this.markReassigned();if(this.deoptimizedFields.has(gt))return;const t=e[0];if(!this.deoptimizedFields.has(t)){this.deoptimizedFields.add(t);for(const e of this.entitiesToBeDeoptimized)e.deoptimizePath([t]);t===gt&&(this.deoptimizationInteractions=Us,this.deoptimizations=Ws,this.deoptimizedFields=Gs,this.entitiesToBeDeoptimized=qs)}}getReturnExpressionWhenCalledAtPath(e){return 0===e.length?this.deoptimizePath($t):this.deoptimizedFields.has(e[0])||this.deoptimizePath([e[0]]),Mt}}class Ks extends Hs{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,n){return(n.replacedVariableInits.get(this)||Rt).hasEffectsOnInteractionAtPath(e,t,n)}}class Ys extends Os{constructor(e){super(e,e.context),this.parent=e}addDeclaration(e,t,n,s){if("var"===s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if("parameter"===o&&"CatchClause"===r.declarations[0].parent.type){const n=this.parent.parent.addDeclaration(e,t,an,s);return r.renderLikeHoisted(n),this.addHoistedVariable(i,n),n}return"var"===o?(r.addDeclaration(e,n),r):t.error(st(i),e.start)}const o=this.parent.parent.addDeclaration(e,t,n,s);return o.markInitializersForDeoptimization(),this.addHoistedVariable(i,o),o}return super.addDeclaration(e,t,n,s)}}class Js extends Os{constructor(e){super(e,e.context)}addDeclaration(e,t,n,s){const i=e.name,r=this.hoistedVariables?.get(i)||this.variables.get(i);if(r){const o=r.kind;if(!("var"!==s&&"function"!==s||"var"!==o&&"function"!==o&&"parameter"!==o))return r.addDeclaration(e,n),r;t.error(st(i),e.start)}const o=new vs(e.name,e,n,t,s);return this.variables.set(i,o),o}}class Xs extends Os{constructor(e,t){super(e,e.context),this.parameters=[],this.hasRest=!1,this.bodyScope=t?new Ys(this):new Js(this)}addParameterDeclaration(e){const{name:t,start:n}=e;if(this.variables.get(t))return this.context.error(function(e){return{code:"DUPLICATE_ARGUMENT_NAME",message:`Duplicate argument name "${e}"`}}(t),n);const s=new Hs(t,e,this.context);return this.variables.set(t,s),this.bodyScope.addHoistedVariable(t,s),s}addParameterVariables(e,t){this.parameters=e;for(const t of e)for(const e of t)e.alwaysRendered=!0;this.hasRest=t}includeCallArguments(e,t){let n=!1,s=!1;const i=this.hasRest&&this.parameters[this.parameters.length-1];for(const n of t)if(n instanceof Mn){for(const n of t)n.include(e,!1);break}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||i,a=t[r];if(o)if(n=!1,0===o.length)s=!0;else for(const e of o)e.included&&(s=!0),e.calledFromTryStatement&&(n=!0);!s&&a.shouldBeIncluded(e)&&(s=!0),s&&a.include(e,n)}}}class Zs extends Xs{constructor(){super(...arguments),this.returnExpression=null,this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){return null===this.returnExpression&&this.updateReturnExpression(),this.returnExpression}updateReturnExpression(){if(1===this.returnExpressions.length)this.returnExpression=this.returnExpressions[0];else{this.returnExpression=Rt;for(const e of this.returnExpressions)e.deoptimizePath($t)}}}class Qs extends Zs{constructor(e){const{context:t}=e;super(e,!1),this.variables.set("arguments",this.argumentsVariable=new js(t)),this.variables.set("this",this.thisVariable=new Ks(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){if(super.includeCallArguments(e,t),this.argumentsVariable.included)for(const n of t)n.included||n.include(e,!1)}}class ei extends Rn{initialise(){var e,t;super.initialise(),this.directive&&"use strict"!==this.directive&&this.parent.type===Gt&&this.scope.context.log(ie,(e=this.directive,{code:"MODULE_LEVEL_DIRECTIVE",id:t=this.scope.context.module.id,message:`Module level directives cause errors when bundled, "${e}" in "${ue(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!==Gt:super.shouldBeIncluded(e)}applyDeoptimizations(){}}class ti extends Rn{get deoptimizeBody(){return kt(this.flags,32768)}set deoptimizeBody(e){this.flags=Nt(this.flags,32768,e)}get directlyIncluded(){return kt(this.flags,16384)}set directlyIncluded(e){this.flags=Nt(this.flags,16384,e)}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];e&&"ReturnStatement"===e.type||this.scope.addReturnExpression(Rt)}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new Ls(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();const e=this.body[0];this.deoptimizeBody=e instanceof ei&&"use asm"===e.directive}render(e,t){this.body.length>0?F(this.body,e,this.start+1,this.end-1,t):super.render(e,t)}}class ni extends Rn{constructor(){super(...arguments),this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){return this.declarationInit=t,this.argument.declare(e,Rt)}deoptimizePath(e){0===e.length&&this.argument.deoptimizePath(xt)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(xt,t,n)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([gt,gt]),this.scope.context.requestTreeshakingPass())}}class si extends Rn{constructor(){super(...arguments),this.objectEntity=null,this.parameterVariableValuesDeoptimized=!1}get async(){return kt(this.flags,256)}set async(e){this.flags=Nt(this.flags,256,e)}get deoptimizedReturn(){return kt(this.flags,512)}set deoptimizedReturn(e){this.flags=Nt(this.flags,512,e)}get generator(){return kt(this.flags,4194304)}set generator(e){this.flags=Nt(this.flags,4194304,e)}updateParameterVariableValues(e){for(let t=0;t<this.params.length;t++){const n=this.params[t];if(!(n instanceof Is))continue;const s=n.variable,i=e[t+1]??an;s.updateKnownValue(i)}}deoptimizeParameterVariableValues(){for(const e of this.params)if(e instanceof Is){e.variable.markReassigned()}}deoptimizeArgumentsOnInteractionAtPath(e,t,n){if(2===e.type){const{parameters:t}=this.scope,{args:n}=e;let s=!1;for(let e=0;e<n.length-1;e++){const i=this.params[e],r=n[e+1];r instanceof Mn&&this.deoptimizeParameterVariableValues(),s||i instanceof ni?(s=!0,r.deoptimizePath($t)):i instanceof Is?(t[e][0].addEntityToBeDeoptimized(r),this.addArgumentToBeDeoptimized(r)):i?r.deoptimizePath($t):this.addArgumentToBeDeoptimized(r)}this.updateParameterVariableValues(n)}else this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){if(this.getObjectEntity().deoptimizePath(e),1===e.length&&e[0]===gt){this.scope.getReturnExpression().deoptimizePath($t);for(const e of this.scope.parameters)for(const t of e)t.deoptimizePath($t),t.markReassigned()}}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($t),this.scope.context.requestTreeshakingPass()),Mt):[this.scope.getReturnExpression(),!1]}hasEffectsOnInteractionAtPath(e,t,n){if(e.length>0||2!==t.type)return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,n);if(this.annotationNoSideEffects)return!1;if(this.async){const{propertyReadSideEffects:e}=this.scope.context.options.treeshake,t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],Tt,n)||e&&("always"===e||t.hasEffectsOnInteractionAtPath(["then"],Lt,n)))return!0}for(const e of this.params)if(e.hasEffects(n))return!0;return!1}onlyFunctionCallUsed(){let e=null;return"VariableDeclarator"===this.parent.type&&(e=this.parent.id.variable??null),this.parent.type===Ft&&(e=this.parent.variable),e?.getOnlyFunctionCallUsed()??!1}include(e,t){this.parameterVariableValuesDeoptimized||this.onlyFunctionCallUsed()||(this.parameterVariableValuesDeoptimized=!0,this.deoptimizeParameterVariableValues()),this.deoptimized||this.applyDeoptimizations(),this.included=!0;const{brokenFlow:n}=e;e.brokenFlow=!1,this.body.include(e,t),e.brokenFlow=n}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){super.initialise(),this.body instanceof ti?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)))}parseNode(e){const{body:t,params:n}=e,{scope:s}=this,{bodyScope:i,context:r}=s,o=this.params=n.map((e=>new(r.getNodeConstructor(e.type))(this,s).parseNode(e)));return s.addParameterVariables(o.map((e=>e.declare("parameter",Rt))),o[o.length-1]instanceof ni),this.body=new(r.getNodeConstructor(t.type))(this,i).parseNode(t),super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}si.prototype.preventChildBlockScope=!0;class ii extends si{constructor(){super(...arguments),this.objectEntity=null}createScope(e){this.scope=new Qs(e),this.constructedEntity=new Fn(Object.create(null),Gn),this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){super.deoptimizeArgumentsOnInteractionAtPath(e,t,n),2===e.type&&0===t.length&&e.args[0]&&this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!this.annotationNoSideEffects&&!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;if(2===t.type){const e=n.replacedVariableInits.get(this.scope.thisVariable);n.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:Rt);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!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();const n=this.scope.argumentsVariable.included;for(const s of this.params)s instanceof Is&&!n||s.include(e,t)}initialise(){super.initialise(),this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Fn([{key:"prototype",kind:"init",property:new Fn([],Gn)}],Gn)}}class ri extends ii{initialise(){super.initialise(),null!==this.id&&(this.id.variable.isId=!0)}onlyFunctionCallUsed(){return this.id?.variable.getOnlyFunctionCallUsed()??super.onlyFunctionCallUsed()}parseNode(e){return null!==e.id&&(this.id=new Is(this,this.scope.parent).parseNode(e.id)),super.parseNode(e)}}class oi extends Rn{include(e,t){super.include(e,t),t&&this.scope.context.includeVariableInModule(this.variable)}initialise(){super.initialise();const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name,this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.scope.context.getModuleName(),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 T(e,L(e,"default",t)+7)}(e.original,this.start);if(this.declaration instanceof ri)this.renderNamedDeclaration(e,r,null===this.declaration.id?function(e,t){const n=L(e,"function",t)+8;e=e.slice(n,L(e,"(",n));const s=L(e,"*");return-1===s?n:n+s+1}(e.original,r):null,t);else if(this.declaration instanceof Fs)this.renderNamedDeclaration(e,r,null===this.declaration.id?L(e.original,"class",s)+5:null,t);else{if(this.variable.getOriginalVariable()!==this.variable)return void M(this,e,s,i);if(!this.variable.included)return e.remove(this.start,r),this.declaration.render(e,t,{renderedSurroundingElement:jt}),void(";"!==e.original[this.end-1]&&e.appendLeft(this.end,";"));this.renderVariableDeclaration(e,r,t)}this.declaration.render(e,t)}applyDeoptimizations(){}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 Fs&&i.has(this.variable)&&e.appendLeft(this.end,` ${G([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);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?"":";"))):(e.overwrite(this.start,t,`${i} ${this.variable.getName(r)} = `),o||e.appendLeft(this.end,";"))}}oi.prototype.needsBoundaries=!0;const ai=/[\n\r'\\\u2028\u2029]/,li=/([\n\r'\u2028\u2029])/g,ci=/\\/g;function ui(e){return ai.test(e)?e.replace(ci,"\\\\").replace(li,"\\$1"):e}const di="_interopDefault",hi="_interopDefaultCompat",pi="_interopNamespace",fi="_interopNamespaceCompat",mi="_interopNamespaceDefault",gi="_interopNamespaceDefaultOnly",yi="_mergeNamespaces",bi="_documentCurrentScript",Ei={auto:di,compat:hi,default:null,defaultOnly:null,esModule:null},xi=(e,t)=>"esModule"===e||t&&("auto"===e||"compat"===e),$i={auto:pi,compat:fi,default:mi,defaultOnly:gi,esModule:null},Ai=(e,t)=>"esModule"!==e&&xi(e,t),Si=(e,t,n,s,i,r,o)=>{const a=new Set(e);for(const e of Bi)t.has(e)&&a.add(e);return Bi.map((e=>a.has(e)?wi[e](n,s,i,r,o,a):"")).join("")},wi={[bi]:(e,{_:t,n:n})=>`var ${bi}${t}=${t}typeof document${t}!==${t}'undefined'${t}?${t}document.currentScript${t}:${t}null;${n}`,[hi](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:hi});return`${o}${Ii(t)}${s}?${s}${n?vi(t):Pi(t)}${a}${r}${r}`},[di](e,t,n){const{_:s,getDirectReturnFunction:i,n:r}=t,[o,a]=i(["e"],{functionReturn:!0,lineBreakIndent:null,name:di});return`${o}e${s}&&${s}e.__esModule${s}?${s}${n?vi(t):Pi(t)}${a}${r}${r}`},[fi](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(mi)){const[e,n]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:fi});return`${e}${Ii(t)}${o}?${o}e${o}:${o}${mi}(e)${n}${l}${l}`}return`function ${fi}(e)${o}{${l}${e}if${o}(${Ii(t)})${o}return e;${l}`+ki(e,e,t,n,s,i)+`}${l}${l}`},[gi](e,t,n,s,i){const{getDirectReturnFunction:r,getObject:o,n:a,_:l}=t,[c,u]=r(["e"],{functionReturn:!0,lineBreakIndent:null,name:gi});return`${c}${_i(s,Li(i,o([[null,`__proto__:${l}null`],["default","e"]],{lineBreakIndent:null}),t))}${u}${a}${a}`},[mi](e,t,n,s,i){const{_:r,n:o}=t;return`function ${mi}(e)${r}{${o}`+ki(e,e,t,n,s,i)+`}${o}${o}`},[pi](e,t,n,s,i,r){const{_:o,getDirectReturnFunction:a,n:l}=t;if(r.has(mi)){const[e,t]=a(["e"],{functionReturn:!0,lineBreakIndent:null,name:pi});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${mi}(e)${t}${l}${l}`}return`function ${pi}(e)${o}{${l}${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${l}`+ki(e,e,t,n,s,i)+`}${l}${l}`},[yi](e,t,n,s,i){const{_:r,cnst:o,n:a}=t,l="var"===o&&n;return`function ${yi}(n, m)${r}{${a}${e}${Ci(`{${a}${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${a}`+(n?l?Oi:Ri:Mi)(e,e+e+e+e,t)+`${e}${e}${e}}${a}`+`${e}${e}}`,l,e,t)}${a}${e}return ${_i(s,Li(i,"n",t))};${a}}${a}${a}`}},vi=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`,Pi=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`,Ii=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`,ki=(e,t,n,s,i,r)=>{const{_:o,cnst:a,getObject:l,getPropertyAccess:c,n:u,s:d}=n,h=`{${u}`+(s?Di:Mi)(e,t+e+e,n)+`${t}${e}}`;return`${t}${a} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${Ti(l)}${o}}`:""});${u}${t}if${o}(e)${o}{${u}${t}${e}${Ni(h,!s,n)}${u}${t}}${u}${t}n${c("default")}${o}=${o}e;${u}${t}return ${_i(i,"n")}${d}${u}`},Ni=(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}`,Ci=(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}}`},Di=(e,t,n)=>{const{_:s,n:i}=n;return`${t}if${s}(k${s}!==${s}'default')${s}{${i}`+Oi(e,t+e,n)+`${t}}${i}`},Oi=(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}`},Ri=(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}`},Mi=(e,t,{_:n,n:s})=>`${t}n[k]${n}=${n}e[k];${s}`,_i=(e,t)=>e?`Object.freeze(${t})`:t,Li=(e,t,{_:n,getObject:s})=>e?`Object.defineProperty(${t},${n}Symbol.toStringTag,${n}${Ti(s)})`:t,Bi=Object.keys(wi);function Ti(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class zi extends Rn{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)?Ct:this.value}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Mt:An(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||$n(this.members,e[0],t,n))}}initialise(){super.initialise(),this.members=function(e){if(e instanceof RegExp)return En;switch(typeof e){case"boolean":return yn;case"number":return bn;case"string":return xn}return Object.create(null)}(this.value)}parseNode(e){return this.value=e.value,this.regex=e.regex,super.parseNode(e)}render(e){"string"==typeof this.value&&e.indentExclusionRanges.push([this.start+1,this.end-1])}}function Vi(e,t,n,s,i){if("getLiteralValueAtPathAsChainElement"in t){const n=t.getLiteralValueAtPathAsChainElement(xt,Pt,i);if(n===On||e.optional&&null==n)return On}else if(e.optional&&null==t.getLiteralValueAtPath(xt,Pt,i))return On;return e.getLiteralValueAtPath(n,s,i)}function Fi(e){return e.computed?function(e){if(e instanceof zi)return String(e.value);return null}(e.property):e.property.name}function ji(e){const t=e.propertyKey,n=e.object;if("string"==typeof t){if(n instanceof Is)return[{key:n.name,pos:n.start},{key:t,pos:e.property.start}];if(n instanceof Ui){const s=ji(n);return s&&[...s,{key:t,pos:e.property.start}]}}return null}class Ui extends Rn{constructor(){super(...arguments),this.variable=null,this.expressionsToBeDeoptimized=[]}get computed(){return kt(this.flags,1024)}set computed(e){this.flags=Nt(this.flags,1024,e)}get optional(){return kt(this.flags,128)}set optional(e){this.flags=Nt(this.flags,128,e)}get assignmentDeoptimized(){return kt(this.flags,16)}set assignmentDeoptimized(e){this.flags=Nt(this.flags,16,e)}get bound(){return kt(this.flags,32)}set bound(e){this.flags=Nt(this.flags,32,e)}get isUndefined(){return kt(this.flags,64)}set isUndefined(e){this.flags=Nt(this.flags,64,e)}bind(){this.bound=!0;const e=ji(this),t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const n=Gi(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.variable?this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n):this.isUndefined||(t.length<7?this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],n):_t(e))}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=J,this.propertyKey=gt,t.deoptimizePath($t);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&&e.length<7){const t=this.getPropertyKey();this.object.deoptimizePath([t===gt?yt:t,...e])}}getLiteralValueAtPath(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:this.propertyKey!==gt&&e.length<7?(this.expressionsToBeDeoptimized.push(n),this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,n)):Ct}getLiteralValueAtPathAsChainElement(e,t,n){return this.variable?this.variable.getLiteralValueAtPath(e,t,n):this.isUndefined?void 0:Vi(this,this.object,e,t,n)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.variable?this.variable.getReturnExpressionWhenCalledAtPath(e,t,n,s):this.isUndefined?[an,!1]:this.propertyKey!==gt&&e.length<7?(this.expressionsToBeDeoptimized.push(s),this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,n,s)):Mt}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===On?On:this.optional&&null==this.object.getLiteralValueAtPath(xt,Pt,this)?t||On:(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(xt,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,n){return this.variable?this.variable.hasEffectsOnInteractionAtPath(e,t,n):!!this.isUndefined||(!(e.length<7)||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,n))}include(e,t){this.deoptimized||this.applyDeoptimizations(),this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,n){this.assignmentDeoptimized||this.applyAssignmentDeoptimization(),n?this.include(e,t):this.includeProperties(e,t)}includeCallArguments(e,t){this.variable?this.variable.includeCallArguments(e,t):super.includeCallArguments(e,t)}initialise(){super.initialise(),this.propertyKey=Fi(this),this.accessInteraction={args:[this.object],type:0}}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,renderedSurroundingElement:i}=K){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;if(this.bound&&e&&!this.variable&&!this.isUndefined){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],Pt),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.getPropertyKey()],Pt),this.scope.context.requestTreeshakingPass())}disallowNamespaceReassignment(){if(this.object instanceof Is){this.scope.findVariable(this.object.name).isNamespace&&(this.variable&&this.scope.context.includeVariableInModule(this.variable),this.scope.context.log(ie,We(this.object.name,this.scope.context.module.id),this.start))}}getPropertyKey(){if(null===this.propertyKey){this.propertyKey=gt;const e=this.property.getLiteralValueAtPath(xt,Pt,this);return this.propertyKey=e===Et?e:"symbol"==typeof e?gt:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.scope.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&("always"===t||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){this.included||(this.included=!0,this.variable&&this.scope.context.includeVariableInModule(this.variable)),this.object.include(e,t),this.property.include(e,t)}}function Gi(e,t,n){if(0===t.length)return e;if(!e.isNamespace||e instanceof qt)return null;const s=t[0].key,i=e.context.traceExport(s);if(!i){if(1===t.length){const i=e.context.fileName;return n.log(ie,Qe(s,n.module.id,i),t[0].pos),"undefined"}return null}return Gi(i,t.slice(1),n)}const Wi="ROLLUP_FILE_URL_",qi="import";class Hi extends Rn{constructor(){super(...arguments),this.metaProperty=null,this.preliminaryChunkId=null,this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:n}=this;return t===qi&&n?.startsWith(Wi)?e.getFileName(n.slice(16)):null}hasEffects(){return!1}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||0!==t}include(){if(!this.included&&(this.included=!0,this.meta.name===qi)){this.scope.context.addImportMeta(this);const e=this.parent,t=this.metaProperty=e instanceof Ui&&"string"==typeof e.propertyKey?e.propertyKey:null;t?.startsWith(Wi)&&(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}=r;if(o!==qi)return;const f=c;if(u){const t=s.getFileName(u),i=k(O(C(f),t)),r=s.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:t,format:n,moduleId:p,referenceId:u,relativePath:i}])||sr[n](i);return void e.overwrite(l.start,l.end,r,{contentOnly:!0})}let m=s.hookFirstSync("resolveImportMeta",[a,{chunkId:f,format:n,moduleId:p}]);m||(m=ir[n]?.(a,{chunkId:f,snippets:i}),t.accessedDocumentCurrentScript||=Ki.includes(n)&&"undefined"!==m),"string"==typeof m&&(l instanceof Ui?e.overwrite(l.start,l.end,m,{contentOnly:!0}):e.overwrite(d,h,m,{contentOnly:!0}))}setResolution(e,t,n){this.preliminaryChunkId=n;const s=(this.metaProperty?.startsWith(Wi)?Ji:Yi)[e];s.length>0&&this.scope.addAccessedGlobals(s,t)}}const Ki=["cjs","iife","umd"],Yi={amd:["document","module","URL"],cjs:["document","require","URL",bi],es:[],iife:["document","URL",bi],system:["module"],umd:["document","require","URL",bi]},Ji={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]},Xi=(e,t="URL")=>`new ${t}(${e}).href`,Zi=(e,t=!1)=>Xi(`'${ui(e)}', ${t?"typeof document === 'undefined' ? location.href : ":""}document.currentScript && document.currentScript.src || document.baseURI`),Qi=e=>(t,{chunkId:n})=>{const s=e(n);return null===t?`({ url: ${s} })`:"url"===t?s:"undefined"},er=e=>`require('u' + 'rl').pathToFileURL(${e}).href`,tr=e=>er(`__dirname + '/${ui(e)}'`),nr=(e,t=!1)=>`${t?"typeof document === 'undefined' ? location.href : ":""}(${bi} && ${bi}.src || new URL('${ui(e)}', document.baseURI).href)`,sr={amd:e=>("."!==e[0]&&(e="./"+e),Xi(`require.toUrl('${ui(e)}'), document.baseURI`)),cjs:e=>`(typeof document === 'undefined' ? ${tr(e)} : ${Zi(e)})`,es:e=>Xi(`'${ui(e)}', import.meta.url`),iife:e=>Zi(e),system:e=>Xi(`'${ui(e)}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${tr(e)} : ${Zi(e,!0)})`},ir={amd:Qi((()=>Xi("module.uri, document.baseURI"))),cjs:Qi((e=>`(typeof document === 'undefined' ? ${er("__filename")} : ${nr(e)})`)),iife:Qi((e=>nr(e))),system:(e,{snippets:{getPropertyAccess:t}})=>null===e?"module.meta":`module.meta${t(e)}`,umd:Qi((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${er("__filename")} : ${nr(e,!0)})`))};class rr extends Wt{constructor(){super("undefined")}getLiteralValueAtPath(){}}class or extends vs{constructor(e,t,n){super(e,t,t.declaration,n,"other"),this.hasId=!1,this.originalId=null,this.originalVariable=null;const s=t.declaration;(s instanceof ri||s instanceof Fs)&&s.id?(this.hasId=!0,this.originalId=s.id):s instanceof Is&&(this.originalId=s)}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 rr||"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 or&&!n.has(t));return this.originalVariable=t||e}}class ar extends Wt{constructor(e){super(e.getModuleName()),this.memberVariables=null,this.mergedNamespaces=[],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.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),n):_t(e)}}deoptimizePath(e){if(e.length>1){const t=e[0];"string"==typeof t&&this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}getLiteralValueAtPath(e){return e[0]===Et?"Module":Ct}getMemberVariables(){if(this.memberVariables)return this.memberVariables;const e=Object.create(null),t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const n of t)if("*"!==n[0]&&n!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(n);t&&(e[n]=t)}return this.memberVariables=e}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.getMemberVariables()[i];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,n)}include(){super.include(),this.context.includeAllExports()}prepare(e){this.mergedNamespaces.length>0&&this.module.scope.addAccessedGlobals([yi],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.getMemberVariables(),p=Object.entries(h).filter((([e,t])=>t.included)).map((([e,t])=>this.referencedEarly||t.isReassigned||t===this?[null,`get ${en(e)}${o}()${o}{${o}return ${t.getName(c)}${d}${o}}`]:[e,t.getName(c)]));p.unshift([null,`__proto__:${o}null`]);let f=l(p,{lineBreakIndent:{base:"",t:i}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(c)));f=`/*#__PURE__*/${yi}(${f},${o}[${e.join(`,${o}`)}])`}else r&&(f=`/*#__PURE__*/Object.defineProperty(${f},${o}Symbol.toStringTag,${o}${Ti(l)})`),s&&(f=`/*#__PURE__*/Object.freeze(${f})`);return f=`${a} ${this.getName(c)}${o}=${o}${f};`,"system"===n&&t.has(this)&&(f+=`${u}${G([this],e)};`),f}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}}}}ar.prototype.isNamespace=!0;class lr extends Wt{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 or||e instanceof lr;){if(e instanceof or){const t=e.getOriginalVariable();if(t===e)break;e=t}e instanceof lr&&(e=e.syntheticNamespace)}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){super.include(),this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}class cr{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}getFileName(){if(this.fileName)return this.fileName;const{paths:e}=this.options;return this.fileName=("function"==typeof e?e(this.id):e[this.id])||(this.renormalizeRenderPath?k(O(this.inputBase,this.id)):this.id)}getImportAttributes(e){return this.importAttributes||=function(e,{getObject:t}){if(!e)return null;const n=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(n.length>0)return t(n,{lineBreakIndent:null});return null}("es"===this.options.format&&this.options.externalImportAttributes&&this.moduleInfo.attributes,e)}getImportPath(e){return ui(this.renormalizeRenderPath?pe(e,this.getFileName(),"amd"===this.options.format,!1):this.getFileName())}}function ur(e){return e.endsWith(".js")?e.slice(0,-3):e}function dr(e,t){return e.autoId?`${e.basePath?e.basePath+"/":""}${ur(t)}`:e.id??""}function hr(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 pr(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=pr(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}${gr(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 pr(e,t,n,s,i,r,o,a,l,c){if("default"===t){if(!s){const t=o(a),n=Ei[t]?i:e;return xi(t,l)?`${n}${c("default")}`:n}return n?`${e}${c("default")}`:e}return"*"===t?(s?!n:$i[o(a)])?r:e:`${e}${c(t)}`}function fr(e){return e([["value","true"]],{lineBreakIndent:null})}function mr(e,t,n,{_:s,getObject:i}){if(e){if(t)return n?`Object.defineProperties(exports,${s}${i([["__esModule",fr(i)],[null,`[Symbol.toStringTag]:${s}${Ti(i)}`]],{lineBreakIndent:null})});`:`Object.defineProperty(exports,${s}'__esModule',${s}${fr(i)});`;if(n)return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${Ti(i)});`}return""}const gr=(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 yr(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,gi,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=Ei[e])):"*"!==t||"*"===i||a||(a=!0,s=$i[e],c=l),s&&p(c,s,o)}}return`${Si(d,r,o,a,n,s,i)}${h.length>0?`${h.join(u)}${u}${u}`:""}`}function br(e,t){return"."!==e[0]?e:t?(n=e).endsWith(".js")?n:n+".js":ur(e);var n}const Er=new Set(["assert","assert/strict","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","dns/promises","domain","events","fs","fs/promises","http","http2","https","inspector","inspector/promises","module","net","os","path","path/posix","path/win32","perf_hooks","process","punycode","querystring","readline","readline/promises","repl","stream","stream/consumers","stream/promises","stream/web","string_decoder","timers","timers/promises","tls","trace_events","tty","url","util","util/types","v8","vm","wasi","worker_threads","zlib"]);function xr(e,t){const n=t.map((({importPath:e})=>e)).filter((e=>Er.has(e)||e.startsWith("node:")));0!==n.length&&e(ie,function(e){return{code:"MISSING_NODE_BUILTINS",ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${le(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}(n))}const $r=(e,t)=>e.split(".").map(t).join("");function Ar(e,t,n,s,{_:i,getPropertyAccess:r},o){const a=e.split("."),l=a[0]in{};o&&l&&o(ie,it(a[0])),a[0]=("function"==typeof n?n(a[0]):l?null: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 Sr(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 wr="_missingExportShim";const vr=({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},Pr=(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""},Ir=(e,t,{_:n,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${n}`)};`:"",kr=(e,t,n)=>Nr(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,n);function Nr(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}${en(e)}:${n}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const Cr=(e,t,n)=>Nr(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,n),Dr=(e,t,n)=>Nr(e.filter((e=>e.local===wr)).map((e=>({name:e.exported,value:wr}))),t,n);function Or(e,t,n){return e?`${t}${$r(e,n)}`:"null"}var Rr={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:$,strict:A}){xr(h,n);const S=n.map((e=>`'${br(e.importPath,m.forceJsExtensionForImports)}'`)),w=n.map((e=>e.name)),{n:v,getNonArrowFunctionIntro:P,_:I}=f;d&&r&&(w.unshift("exports"),S.unshift("'exports'")),t.has("require")&&(w.unshift("require"),S.unshift("'require'")),t.has("module")&&(w.unshift("module"),S.unshift("'module'"));const k=dr(m,o),N=(k?`'${k}',${I}`:"")+(S.length>0?`[${S.join(`,${I}`)}],${I}`:""),C=A?`${I}'use strict';`:"";e.prepend(`${l}${yr(n,x,y,b,E,t,a,f)}`);const D=hr(s,n,d,x,f,a,y,$);let O=mr(d&&r,c&&(!0===g||"if-default-prop"===g&&i),u&&E,f);O&&(O=v+v+O),e.append(`${D}${O}${p}`).indent(a).prepend(`${m.define}(${N}(${P(w,{isAsync:!1,name:null})}{${C}${v}${v}`).append(`${v}${v}}));`)},cjs:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasDefaultExport:i,hasExports:r,indent:o,intro:a,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:d,snippets:h},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,generatedCode:{symbols:b},reexportProtoFromExternal:E,strict:x}){const{_:$,n:A}=h,S=x?`'use strict';${A}${A}`:"";let w=mr(u&&r,l&&(!0===f||"if-default-prop"===f&&i),c&&b,h);w&&(w+=A+A);const v=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}')`);if(r)return`${r};${s}${s}`;return""}(n,h,p),P=yr(n,y,m,g,b,t,o,h);e.prepend(`${S}${a}${w}${v}${P}`);const I=hr(s,n,u,y,h,o,m,E,`module.exports${$}=${$}`);e.append(`${I}${d}`)},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}of e){const e=`'${i}'${l?`${n}${t}${n}${l}`:""};`;if(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:`${tn(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 ${tn(e.reexported)}`} };`)}l.length>0&&s.push(`export${n}{${n}${l.map((e=>e.imported===e.reexported?tn(e.imported):`${tn(e.imported)} as ${tn(e.reexported)}`)).join(`,${n}`)}${n}}${n}from${n}${e}`)}}else s.push(`import${n}${e}`)}return s}(r,d,a);p.length>0&&(s+=p.join(h)+h+h),(s+=Si(null,t,n,a,l,c,u))&&e.prepend(s);const f=function(e,{_:t,cnst:n}){const s=[],i=[];for(const r of e)r.expression&&s.push(`${n} ${r.local}${t}=${t}${r.expression};`),i.push(r.exported===r.local?r.local:`${r.local} as ${tn(r.exported)}`);i.length>0&&s.push(`export${t}{${t}${i.join(`,${t}`)}${t}};`);return 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,indent:o,intro:a,namedExportsMode:l,log:c,outro:u,snippets:d},{compact:h,esModule:p,extend:f,freeze:m,externalLiveBindings:g,reexportProtoFromExternal:y,globals:b,interop:E,name:x,generatedCode:{symbols:$},strict:A}){const{_:S,getNonArrowFunctionIntro:w,getPropertyAccess:v,n:P}=d,I=x&&x.includes("."),k=!f&&!I;if(x&&k&&(Jt(N=x)||Yt.test(N)))return ve(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:fe("configuration-options/#output-extend")}}(x));var N;xr(c,n);const C=Sr(n),D=C.map((e=>e.globalName||"null")),O=C.map((e=>e.name));r&&!x&&c(ie,{code:_e,message:'If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.',url:fe(Se)}),l&&r&&(f?(D.unshift(`this${$r(x,v)}${S}=${S}this${$r(x,v)}${S}||${S}{}`),O.unshift("exports")):(D.unshift("{}"),O.unshift("exports")));const R=A?`${o}'use strict';${P}`:"",M=yr(n,E,g,m,$,t,o,d);e.prepend(`${a}${M}`);let _=`(${w(O,{isAsync:!1,name:null})}{${P}${R}${P}`;r&&(!x||f&&l||(_=(k?`var ${x}`:`this${$r(x,v)}`)+`${S}=${S}${_}`),I&&(_=function(e,t,n,{_:s,getPropertyAccess:i,s:r},o,a){const l=e.split("."),c=l[0]in{};a&&c&&a(ie,it(l[0])),l[0]=("function"==typeof n?n(l[0]):c?null: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")}(x,"this",b,d,h,c)+_));let L=`${P}${P}})(${D.join(`,${S}`)});`;r&&!f&&l&&(L=`${P}${P}${o}return exports;${L}`);const B=hr(s,n,l,E,d,o,g,y);let T=mr(l&&r,!0===p||"if-default-prop"===p&&i,$,d);T&&(T=P+P+T),e.append(`${B}${T}${u}`).indent(o).prepend(_).append(L)},system:function(e,{accessedGlobals:t,dependencies:n,exports:s,hasExports:i,indent:r,intro:o,snippets:a,outro:l,usesTopLevelAwait:c},{externalLiveBindings:u,freeze:d,name:h,generatedCode:{symbols:p},strict:f,systemNullSetters:m}){const{_:g,getFunctionIntro:y,getNonArrowFunctionIntro:b,n:E,s:x}=a,{importBindings:$,setters:A,starExcludes:S}=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=vr({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,r,a),w=h?`'${h}',${g}`:"",v=t.has("module")?["exports","module"]:i?["exports"]:[];let P=`System.register(${w}[`+n.map((({importPath:e})=>`'${e}'`)).join(`,${g}`)+`],${g}(${b(v,{isAsync:!1,name:null})}{${E}${r}${f?"'use strict';":""}`+Pr(S,r,a)+Ir($,r,a)+`${E}${r}return${g}{${A.length>0?`${E}${r}${r}setters:${g}[${A.map((e=>e?`${y(["module"],{isAsync:!1,name:null})}{${E}${r}${r}${r}${e}${E}${r}${r}}`:m?"null":`${y([],{isAsync:!1,name:null})}{}`)).join(`,${g}`)}],`:""}${E}`;P+=`${r}${r}execute:${g}(${b([],{isAsync:c,name:null})}{${E}${E}`;const I=`${r}${r}})${E}${r}}${x}${E}}));`;e.prepend(o+Si(null,t,r,a,u,d,p)+kr(s,r,a)).append(`${l}${E}${E}`+Cr(s,r,a)+Dr(s,r,a)).indent(`${r}${r}${r}`).append(I).prepend(P)},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:$},globals:A,noConflict:S,reexportProtoFromExternal:w,strict:v}){const{_:P,cnst:I,getFunctionIntro:k,getNonArrowFunctionIntro:N,getPropertyAccess:C,n:D,s:O}=h,R=f?"f":"factory",M=f?"g":"global";if(r&&!x)return ve({code:_e,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:fe(Se)});xr(u,n);const _=n.map((e=>`'${br(e.importPath,p.forceJsExtensionForImports)}'`)),L=n.map((e=>`require('${e.importPath}')`)),B=Sr(n),T=B.map((e=>Or(e.globalName,M,C))),z=B.map((e=>e.name));c&&(r||S)&&(_.unshift("'exports'"),L.unshift("exports"),T.unshift(Ar(x,M,A,(g?`${Or(x,M,C)}${P}||${P}`:"")+"{}",h,u)),z.unshift("exports"));const V=dr(p,o),F=(V?`'${V}',${P}`:"")+(_.length>0?`[${_.join(`,${P}`)}],${P}`:""),j=p.define,U=!c&&r?`module.exports${P}=${P}`:"",G=v?`${P}'use strict';${D}`:"";let W;if(S){const e=f?"e":"exports";let t;if(!c&&r)t=`${I} ${e}${P}=${P}${Ar(x,M,A,`${R}(${T.join(`,${P}`)})`,h,u)};`;else{t=`${I} ${e}${P}=${P}${T.shift()};${D}${a}${a}${R}(${[e,...T].join(`,${P}`)});`}W=`(${k([],{isAsync:!1,name:null})}{${D}${a}${a}${I} current${P}=${P}${function(e,t,{_:n,getPropertyAccess:s}){let i=t;return e.split(".").map((e=>i+=s(e))).join(`${n}&&${n}`)}(x,M,h)};${D}${a}${a}${t}${D}${a}${a}${e}.noConflict${P}=${P}${k([],{isAsync:!1,name:null})}{${P}${Or(x,M,C)}${P}=${P}current;${P}return ${e}${O}${P}};${D}${a}})()`}else W=`${R}(${T.join(`,${P}`)})`,!c&&r&&(W=Ar(x,M,A,W,h,u));const q=r||S&&c||T.length>0,H=[R];q&&H.unshift(M);const K=q?`this,${P}`:"",Y=q?`(${M}${P}=${P}typeof globalThis${P}!==${P}'undefined'${P}?${P}globalThis${P}:${P}${M}${P}||${P}self,${P}`:"",J=q?")":"",X=q?`${a}typeof exports${P}===${P}'object'${P}&&${P}typeof module${P}!==${P}'undefined'${P}?${P}${U}${R}(${L.join(`,${P}`)})${P}:${D}`:"",Z=`(${N(H,{isAsync:!1,name:null})}{${D}`+X+`${a}typeof ${j}${P}===${P}'function'${P}&&${P}${j}.amd${P}?${P}${j}(${F}${R})${P}:${D}`+`${a}${Y}${W}${J};${D}`+`})(${K}(${N(z,{isAsync:!1,name:null})}{${G}${D}`,Q=D+D+"}));";e.prepend(`${l}${yr(n,E,y,b,$,t,a,h)}`);const ee=hr(s,n,c,E,h,a,y,w);let te=mr(c&&r,!0===m||"if-default-prop"===m&&i,$,h);te&&(te=D+D+te),e.append(`${ee}${te}${d}`).trim().indent(a).append(Q).prepend(Z)}};const Mr={ArrayPattern(e,t){for(const n of t.elements)n&&Mr[n.type](e,n)},AssignmentPattern(e,t){Mr[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?Mr.RestElement(e,n):Mr[n.value.type](e,n.value)},RestElement(e,t){Mr[t.argument.type](e,t.argument)}},_r=function(e){const t=[];return Mr[e.type](t,e),t};let Lr;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("");const Br=new Array(128).fill(void 0);function Tr(e){return Br[e]}Br.push(void 0,null,!0,!1);let zr=Br.length;function Vr(e){const t=Tr(e);return function(e){e<132||(Br[e]=zr,zr=e)}(e),t}const Fr="undefined"!=typeof TextDecoder?new TextDecoder("utf-8",{ignoreBOM:!0,fatal:!0}):{decode:()=>{throw Error("TextDecoder not available")}};"undefined"!=typeof TextDecoder&&Fr.decode();let jr=null;function Ur(){return null!==jr&&0!==jr.byteLength||(jr=new Uint8Array(Lr.memory.buffer)),jr}function Gr(e,t){return e>>>=0,Fr.decode(Ur().subarray(e,e+t))}function Wr(e){zr===Br.length&&Br.push(Br.length+1);const t=zr;return zr=Br[t],Br[t]=e,t}let qr=0;const Hr="undefined"!=typeof TextEncoder?new TextEncoder("utf-8"):{encode:()=>{throw Error("TextEncoder not available")}},Kr="function"==typeof Hr.encodeInto?function(e,t){return Hr.encodeInto(e,t)}:function(e,t){const n=Hr.encode(e);return t.set(n),{read:e.length,written:n.length}};let Yr=null;function Jr(){return(null===Yr||!0===Yr.buffer.detached||void 0===Yr.buffer.detached&&Yr.buffer!==Lr.memory.buffer)&&(Yr=new DataView(Lr.memory.buffer)),Yr}function Xr(e,t){try{const a=Lr.__wbindgen_add_to_stack_pointer(-16),l=function(e,t,n){if(void 0===n){const n=Hr.encode(e),s=t(n.length,1)>>>0;return Ur().subarray(s,s+n.length).set(n),qr=n.length,s}let s=e.length,i=t(s,1)>>>0;const r=Ur();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=Ur().subarray(i+o,i+s);o+=Kr(e,t).written,i=n(i,s,o,1)>>>0}return qr=o,i}(e,Lr.__wbindgen_export_0,Lr.__wbindgen_export_1),c=qr;Lr.parse(a,l,c,t);var n=Jr().getInt32(a+0,!0),s=Jr().getInt32(a+4,!0),i=(r=n,o=s,r>>>=0,Ur().subarray(r/1,r/1+o)).slice();return Lr.__wbindgen_export_2(n,1*s,1),i}finally{Lr.__wbindgen_add_to_stack_pointer(16)}var r,o}function Zr(e,t){try{return e.apply(this,t)}catch(e){Lr.__wbindgen_export_3(Wr(e))}}function Qr(){const e={wbg:{}};return e.wbg.__wbindgen_object_drop_ref=function(e){Vr(e)},e.wbg.__wbindgen_is_object=function(e){const t=Tr(e);return"object"==typeof t&&null!==t},e.wbg.__wbg_crypto_1d1f22824a6a080c=function(e){return Wr(Tr(e).crypto)},e.wbg.__wbg_process_4a72847cc503995b=function(e){return Wr(Tr(e).process)},e.wbg.__wbg_versions_f686565e586dd935=function(e){return Wr(Tr(e).versions)},e.wbg.__wbg_node_104a2ff8d6ea03a2=function(e){return Wr(Tr(e).node)},e.wbg.__wbindgen_is_string=function(e){return"string"==typeof Tr(e)},e.wbg.__wbg_require_cca90b1a94a0255b=function(){return Zr((function(){return Wr(module.require)}),arguments)},e.wbg.__wbindgen_string_new=function(e,t){return Wr(Gr(e,t))},e.wbg.__wbg_msCrypto_eb05e62b530a1508=function(e){return Wr(Tr(e).msCrypto)},e.wbg.__wbg_randomFillSync_5c9c955aa56b6049=function(){return Zr((function(e,t){Tr(e).randomFillSync(Vr(t))}),arguments)},e.wbg.__wbg_getRandomValues_3aa56aa6edec874c=function(){return Zr((function(e,t){Tr(e).getRandomValues(Tr(t))}),arguments)},e.wbg.__wbg_newnoargs_76313bd6ff35d0f2=function(e,t){return Wr(new Function(Gr(e,t)))},e.wbg.__wbindgen_is_function=function(e){return"function"==typeof Tr(e)},e.wbg.__wbg_self_3093d5d1f7bcb682=function(){return Zr((function(){return Wr(self.self)}),arguments)},e.wbg.__wbg_window_3bcfc4d31bc012f8=function(){return Zr((function(){return Wr(window.window)}),arguments)},e.wbg.__wbg_globalThis_86b222e13bdf32ed=function(){return Zr((function(){return Wr(globalThis.globalThis)}),arguments)},e.wbg.__wbg_global_e5a3fe56f8be9485=function(){return Zr((function(){return Wr(global.global)}),arguments)},e.wbg.__wbindgen_is_undefined=function(e){return void 0===Tr(e)},e.wbg.__wbg_call_1084a111329e68ce=function(){return Zr((function(e,t){return Wr(Tr(e).call(Tr(t)))}),arguments)},e.wbg.__wbg_call_89af060b4e1523f2=function(){return Zr((function(e,t,n){return Wr(Tr(e).call(Tr(t),Tr(n)))}),arguments)},e.wbg.__wbg_buffer_b7b08af79b0b0974=function(e){return Wr(Tr(e).buffer)},e.wbg.__wbg_newwithbyteoffsetandlength_8a2cb9ca96b27ec9=function(e,t,n){return Wr(new Uint8Array(Tr(e),t>>>0,n>>>0))},e.wbg.__wbg_new_ea1883e1e5e86686=function(e){return Wr(new Uint8Array(Tr(e)))},e.wbg.__wbg_newwithlength_ec548f448387c968=function(e){return Wr(new Uint8Array(e>>>0))},e.wbg.__wbg_subarray_7c2e3576afe181d1=function(e,t,n){return Wr(Tr(e).subarray(t>>>0,n>>>0))},e.wbg.__wbg_length_8339fcf5d8ecd12e=function(e){return Tr(e).length},e.wbg.__wbg_set_d1e79e2388520f18=function(e,t,n){Tr(e).set(Tr(t),n>>>0)},e.wbg.__wbindgen_object_clone_ref=function(e){return Wr(Tr(e))},e.wbg.__wbindgen_throw=function(e,t){throw new Error(Gr(e,t))},e.wbg.__wbindgen_memory=function(){return Wr(Lr.memory)},e}async function eo(e){if(void 0!==Lr)return Lr;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&&t.src||new URL("rollup.browser.js",document.baseURI).href));const n=Qr();("string"==typeof e||"function"==typeof Request&&e instanceof Request||"function"==typeof URL&&e instanceof URL)&&(e=fetch(e));const{instance:s,module:i}=await async function(e,t){if("function"==typeof Response&&e instanceof Response){if("function"==typeof WebAssembly.instantiateStreaming)try{return await WebAssembly.instantiateStreaming(e,t)}catch(t){if("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,t){return Lr=e.exports,eo.__wbindgen_wasm_module=t,Yr=null,jr=null,Lr}(s,i)}const to=[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:so(t[e+2],t)}},function(e,t){return{type:"ArrayPattern",start:t[e],end:t[e+1],elements:so(t[e+2],t)}},function(e,t){const n=t[e+2],s=Pn(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?{[wn]:s}:{},params:so(t[e+4],t),body:no(t[e+5],t),id:null}},function(e,t){return{type:"AssignmentExpression",start:t[e],end:t[e+1],operator:Sn[t[e+2]],left:no(t[e+3],t),right:no(t[e+4],t)}},function(e,t){return{type:"AssignmentPattern",start:t[e],end:t[e+1],left:no(t[e+2],t),right:no(t[e+3],t)}},function(e,t){return{type:"AwaitExpression",start:t[e],end:t[e+1],argument:no(t[e+2],t)}},function(e,t){return{type:"BinaryExpression",start:t[e],end:t[e+1],operator:Sn[t[e+2]],left:no(t[e+3],t),right:no(t[e+4],t)}},function(e,t){return{type:"BlockStatement",start:t[e],end:t[e+1],body:so(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:no(n,t)}},function(e,t){const n=t[e+2],s=Pn(t[e+3],t);return{type:"CallExpression",start:t[e],end:t[e+1],optional:!(1&~n),...s.length>0?{[wn]:s}:{},callee:no(t[e+4],t),arguments:so(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:no(n,t),body:no(t[e+3],t)}},function(e,t){return{type:"ChainExpression",start:t[e],end:t[e+1],expression:no(t[e+2],t)}},function(e,t){return{type:"ClassBody",start:t[e],end:t[e+1],body:so(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:so(t[e+2],t),id:0===n?null:no(n,t),superClass:0===s?null:no(s,t),body:no(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:so(t[e+2],t),id:0===n?null:no(n,t),superClass:0===s?null:no(s,t),body:no(t[e+5],t)}},function(e,t){return{type:"ConditionalExpression",start:t[e],end:t[e+1],test:no(t[e+2],t),consequent:no(t[e+3],t),alternate:no(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:no(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:no(t[e+2],t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],directive:t.convertString(t[e+2]),expression:no(t[e+3],t)}},function(e,t){return{type:"DoWhileStatement",start:t[e],end:t[e+1],body:no(t[e+2],t),test:no(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:no(n,t),source:no(t[e+3],t),attributes:so(t[e+4],t)}},function(e,t){return{type:"ExportDefaultDeclaration",start:t[e],end:t[e+1],declaration:no(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:so(t[e+2],t),source:0===n?null:no(n,t),attributes:so(t[e+4],t),declaration:0===s?null:no(s,t)}},function(e,t){const n=no(t[e+2],t),s=t[e+3];return{type:"ExportSpecifier",start:t[e],end:t[e+1],local:n,exported:0===s?{...n}:no(s,t)}},function(e,t){return{type:"ExpressionStatement",start:t[e],end:t[e+1],expression:no(t[e+2],t)}},function(e,t){return{type:"ForInStatement",start:t[e],end:t[e+1],left:no(t[e+2],t),right:no(t[e+3],t),body:no(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:no(t[e+3],t),right:no(t[e+4],t),body:no(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:no(n,t),test:0===s?null:no(s,t),update:0===i?null:no(i,t),body:no(t[e+5],t)}},function(e,t){const n=t[e+2],s=Pn(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?{[wn]:s}:{},id:0===i?null:no(i,t),params:so(t[e+5],t),body:no(t[e+6],t),expression:!1}},function(e,t){const n=t[e+2],s=Pn(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?{[wn]:s}:{},id:0===i?null:no(i,t),params:so(t[e+5],t),body:no(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:no(t[e+2],t),consequent:no(t[e+3],t),alternate:0===n?null:no(n,t)}},function(e,t){return{type:"ImportAttribute",start:t[e],end:t[e+1],key:no(t[e+2],t),value:no(t[e+3],t)}},function(e,t){return{type:"ImportDeclaration",start:t[e],end:t[e+1],specifiers:so(t[e+2],t),source:no(t[e+3],t),attributes:so(t[e+4],t)}},function(e,t){return{type:"ImportDefaultSpecifier",start:t[e],end:t[e+1],local:no(t[e+2],t)}},function(e,t){const n=t[e+3];return{type:"ImportExpression",start:t[e],end:t[e+1],source:no(t[e+2],t),options:0===n?null:no(n,t)}},function(e,t){return{type:"ImportNamespaceSpecifier",start:t[e],end:t[e+1],local:no(t[e+2],t)}},function(e,t){const n=t[e+2],s=no(t[e+3],t);return{type:"ImportSpecifier",start:t[e],end:t[e+1],imported:0===n?{...s}:no(n,t),local:s}},function(e,t){return{type:"LabeledStatement",start:t[e],end:t[e+1],label:no(t[e+2],t),body:no(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:Sn[t[e+2]],left:no(t[e+3],t),right:no(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:no(t[e+3],t),property:no(t[e+4],t)}},function(e,t){return{type:"MetaProperty",start:t[e],end:t[e+1],meta:no(t[e+2],t),property:no(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:so(t[e+3],t),key:no(t[e+4],t),value:no(t[e+5],t),kind:Sn[t[e+6]]}},function(e,t){const n=Pn(t[e+2],t);return{type:"NewExpression",start:t[e],end:t[e+1],...n.length>0?{[wn]:n}:{},callee:no(t[e+3],t),arguments:so(t[e+4],t)}},function(e,t){return{type:"ObjectExpression",start:t[e],end:t[e+1],properties:so(t[e+2],t)}},function(e,t){return{type:"ObjectPattern",start:t[e],end:t[e+1],properties:so(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=Pn(t[e+3],t);return{type:"Program",start:t[e],end:t[e+1],body:so(t[e+2],t),...n.length>0?{[vn]:n}:{},sourceType:"module"}},function(e,t){const n=t[e+2],s=t[e+3],i=no(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}:no(s,t),value:i,kind:Sn[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:so(t[e+3],t),key:no(t[e+4],t),value:0===s?null:no(s,t)}},function(e,t){return{type:"RestElement",start:t[e],end:t[e+1],argument:no(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:no(n,t)}},function(e,t){return{type:"SequenceExpression",start:t[e],end:t[e+1],expressions:so(t[e+2],t)}},function(e,t){return{type:"SpreadElement",start:t[e],end:t[e+1],argument:no(t[e+2],t)}},function(e,t){return{type:"StaticBlock",start:t[e],end:t[e+1],body:so(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:no(n,t),consequent:so(t[e+3],t)}},function(e,t){return{type:"SwitchStatement",start:t[e],end:t[e+1],discriminant:no(t[e+2],t),cases:so(t[e+3],t)}},function(e,t){return{type:"TaggedTemplateExpression",start:t[e],end:t[e+1],tag:no(t[e+2],t),quasi:no(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:so(t[e+2],t),expressions:so(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:no(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:no(t[e+2],t),handler:0===n?null:no(n,t),finalizer:0===s?null:no(s,t)}},function(e,t){return{type:"UnaryExpression",start:t[e],end:t[e+1],operator:Sn[t[e+2]],argument:no(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:Sn[t[e+3]],argument:no(t[e+4],t)}},function(e,t){return{type:"VariableDeclaration",start:t[e],end:t[e+1],kind:Sn[t[e+2]],declarations:so(t[e+3],t)}},function(e,t){const n=t[e+3];return{type:"VariableDeclarator",start:t[e],end:t[e+1],id:no(t[e+2],t),init:0===n?null:no(n,t)}},function(e,t){return{type:"WhileStatement",start:t[e],end:t[e+1],test:no(t[e+2],t),body:no(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:no(s,t)}}];function no(e,t){const n=t[e],s=to[n];if(!s)throw console.trace(),new Error(`Unknown node type: ${n}`);return s(e+1,t)}function so(e,t){if(0===e)return J;const n=t[e++],s=[];for(let i=0;i<n;i++){const n=t[e++];s.push(n?no(n,t):null)}return s}function io(e){const t=new Uint32Array(e.buffer);let n;if("undefined"!=typeof Buffer&&e instanceof Buffer)n=n=>{const s=t[n++],i=n<<2;return e.toString("utf8",i,i+s)};else{const s=new TextDecoder;n=n=>{const i=t[n++],r=n<<2;return s.decode(e.subarray(r,r+i))}}return Object.assign(t,{convertString:n})}class ro extends Rn{addExportedVariables(e,t){for(const n of this.elements)n?.addExportedVariables(e,t)}declare(e){const t=[];for(const n of this.elements)null!==n&&t.push(...n.declare(e,Rt));return t}deoptimizePath(){for(const e of this.elements)e?.deoptimizePath(xt)}hasEffectsOnInteractionAtPath(e,t,n){for(const e of this.elements)if(e?.hasEffectsOnInteractionAtPath(xt,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.elements)e?.markDeclarationReached()}}class oo extends si{constructor(){super(...arguments),this.objectEntity=null}get expression(){return kt(this.flags,8388608)}set expression(e){this.flags=Nt(this.flags,8388608,e)}createScope(e){this.scope=new Zs(e,!1)}hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!1}hasEffectsOnInteractionAtPath(e,t,n){if(super.hasEffectsOnInteractionAtPath(e,t,n))return!0;if(this.annotationNoSideEffects)return!1;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===Vt&&this.parent.callee===this||super.onlyFunctionCallUsed()}include(e,t){super.include(e,t);for(const n of this.params)n instanceof Is||n.include(e,t)}getObjectEntity(){return null!==this.objectEntity?this.objectEntity:this.objectEntity=new Fn([],Gn)}}class ao extends Rn{addExportedVariables(e,t){for(const n of this.properties)"Property"===n.type?n.value.addExportedVariables(e,t):n.argument.addExportedVariables(e,t)}declare(e,t){const n=[];for(const s of this.properties)n.push(...s.declare(e,t));return n}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(xt,t,n))return!0;return!1}markDeclarationReached(){for(const e of this.properties)e.markDeclarationReached()}}class lo extends Rn{hasEffects(e){const{deoptimized:t,left:n,operator:s,right:i}=this;return t||this.applyDeoptimizations(),i.hasEffects(e)||n.hasEffectsAsAssignmentTarget(e,"="!==s)}hasEffectsOnInteractionAtPath(e,t,n){return this.right.hasEffectsOnInteractionAtPath(e,t,n)}include(e,t){const{deoptimized:n,left:s,right:i,operator:r}=this;n||this.applyDeoptimizations(),this.included=!0,(t||"="!==r||s.included||s.hasEffectsAsAssignmentTarget(Cn(),!1))&&s.includeAsAssignmentTarget(e,t,"="!==r),i.include(e,t)}initialise(){if(super.initialise(),this.left instanceof Is){const e=this.scope.variables.get(this.left.name);"const"===e?.kind&&this.scope.context.error({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}=K){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=T(e.original,L(e.original,"=",r.end)+1);e.remove(a,l),n&&U(e,l,o.start),o.render(e,t,{renderedParentType:s||c.type,renderedSurroundingElement:i||c.type})}if("system"===t.format)if(r instanceof Is){const n=r.variable,s=t.exportNamesByVariable.get(n);if(s)return void(1===s.length?W(n,a,l,e,t):q(n,a,l,c.type!==jt,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"],`${G(e,r)},${o}v`,{needsArrowReturnParens:!0,needsWrappedFunction:s})),i.appendLeft(n,")")}(n,a,l,i===jt,e,t)}r.included&&r instanceof ao&&(i===jt||i===zt)&&(e.appendRight(a,"("),e.prependLeft(l,")"))}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(xt),this.right.deoptimizePath($t),this.scope.context.requestTreeshakingPass()}}class co extends Rn{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){0===e.length&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,n){return e.length>0||this.left.hasEffectsOnInteractionAtPath(xt,t,n)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:n}=K){this.left.render(e,t,{isShorthandProperty:n}),this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.left.deoptimizePath(xt),this.right.deoptimizePath($t),this.scope.context.requestTreeshakingPass()}}class uo extends Rn{hasEffects(){return this.deoptimized||this.applyDeoptimizations(),!0}include(e,t){if(this.deoptimized||this.applyDeoptimizations(),!this.included){this.included=!0;e:if(!this.scope.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof ii||e instanceof oo)break e}while(e=e.parent);this.scope.context.usesTopLevelAwait=!0}}this.argument.include(e,t)}}const ho={"!=":(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,"|":(e,t)=>e|t};class po extends Rn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ct;const s=this.left.getLiteralValueAtPath(xt,t,n);if("symbol"==typeof s)return Ct;const i=this.right.getLiteralValueAtPath(xt,t,n);if("symbol"==typeof i)return Ct;const r=ho[this.operator];return r?r(s,i):Ct}hasEffects(e){return"+"===this.operator&&this.parent instanceof ei&&""===this.left.getLiteralValueAtPath(xt,Pt,this)||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return 0!==t||e.length>1}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{renderedSurroundingElement:n}=K){this.left.render(e,t,{renderedSurroundingElement:n}),this.right.render(e,t)}}class fo extends Rn{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){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasBreak=!0,e.brokenFlow=!0}}function mo(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(L(e.original,",",n.arguments[s].end),n.end-1)}else e.remove(L(e.original,"(",n.callee.end)+1,n.end-1)}}class go extends Rn{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!==Rt));if(0!==o.length)if(i===Rt)for(const e of o)e.deoptimizePath($t);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]!==Rt){this.returnExpression=Mt;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=X,this.deoptimizableDependentExpressions=J;for(const t of e)t.deoptimizeCache();for(const e of t)e.deoptimizePath($t)}}deoptimizePath(e){if(0===e.length||this.scope.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this))return;const[t]=this.getReturnExpression();t!==Rt&&t.deoptimizePath(e)}getLiteralValueAtPath(e,t,n){const[s]=this.getReturnExpression(t);return s===Rt?Ct:t.withTrackedEntityAtPath(e,s,(()=>(this.deoptimizableDependentExpressions.push(n),s.getLiteralValueAtPath(e,t,n))),Ct)}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getReturnExpression(n);return i[0]===Rt?i:n.withTrackedEntityAtPath(e,i,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=i[0].getReturnExpressionWhenCalledAtPath(e,t,n,s);return[r,o||i[1]]}),Mt)}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)}}class yo extends go{get optional(){return kt(this.flags,128)}set optional(e){this.flags=Nt(this.flags,128,e)}bind(){if(super.bind(),this.callee instanceof Is){this.scope.findVariable(this.callee.name).isNamespace&&this.scope.context.log(ie,Fe(this.callee.name),this.start),"eval"===this.callee.name&&this.scope.context.log(ie,{code:"EVAL",id:e=this.scope.context.module.id,message:`Use of eval in "${ue(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:fe("troubleshooting/#avoiding-eval")},this.start)}var e;this.interaction={args:[this.callee instanceof Ui&&!this.callee.variable?this.callee.object:null,...this.arguments],type:2,withNew:!1}}getLiteralValueAtPathAsChainElement(e,t,n){return Vi(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(xt,this.interaction,e))}hasEffectsAsChainElement(e){const t="hasEffectsAsChainElement"in this.callee?this.callee.hasEffectsAsChainElement(e):this.callee.hasEffects(e);if(t===On)return On;if(this.optional&&null==this.callee.getLiteralValueAtPath(xt,Pt,this))return!this.annotationPure&&t||On;this.deoptimized||this.applyDeoptimizations();for(const t of this.arguments)if(t.hasEffects(e))return!0;return!this.annotationPure&&(t||this.callee.hasEffectsOnInteractionAtPath(xt,this.interaction,e))}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?(super.include(e,t),t===Dn&&this.callee instanceof Is&&this.callee.variable&&this.callee.variable.markCalledFromTryStatement()):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}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}=K){this.callee.render(e,t,{isCalleeOfRenderedParent:!0,renderedSurroundingElement:n}),mo(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,xt,Pt),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Pt){return null===this.returnExpression?(this.returnExpression=Mt,this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(xt,this.interaction,e,this)):this.returnExpression}}class bo extends Rn{createScope(e){this.scope=new Xs(e,!0)}parseNode(e){const{body:t,param:n,type:s}=e;return this.type=s,n&&(this.param=new(this.scope.context.getNodeConstructor(n.type))(this,this.scope).parseNode(n),this.param.declare("parameter",Rt)),this.body=new ti(this,this.scope.bodyScope).parseNode(t),super.parseNode(e)}}bo.prototype.preventChildBlockScope=!0;class Eo extends Rn{deoptimizeCache(){}getLiteralValueAtPath(e,t,n){const s=this.expression.getLiteralValueAtPathAsChainElement(e,t,n);return s===On?void 0:s}hasEffects(e){return!0===this.expression.hasEffectsAsChainElement(e)}removeAnnotations(e){this.expression.removeAnnotations(e)}applyDeoptimizations(){}}class xo extends Os{constructor(e,t){const{context:n}=e;super(e,n),this.variables.set("this",this.thisVariable=new vs("this",null,t,n,"other")),this.instanceScope=new Os(this,n),this.instanceScope.variables.set("this",new Ks(n))}findLexicalBoundary(){return this}}class $o extends Rn{createScope(e){this.scope=new xo(e,this.parent)}include(e,t){this.included=!0,this.scope.context.includeVariableInModule(this.scope.thisVariable);for(const n of this.body)n.include(e,t)}parseNode(e){const t=this.body=[];for(const n of e.body)t.push(new(this.scope.context.getNodeConstructor(n.type))(this,n.static?this.scope:this.scope.instanceScope).parseNode(n));return super.parseNode(e)}applyDeoptimizations(){}}class Ao extends Vs{render(e,t,{renderedSurroundingElement:n}=K){super.render(e,t),n===jt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class So extends Ot{constructor(e){super(),this.expressions=e}deoptimizePath(e){for(const t of this.expressions)t.deoptimizePath(e)}getReturnExpressionWhenCalledAtPath(e,t,n,s){return[new So(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 wo extends Rn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return kt(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Nt(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(null!==this.usedBranch){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null,e.deoptimizePath($t);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=J;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();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):Ct}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new So([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();t||this.test.shouldBeIncluded(e)||null===n?(this.test.include(e,t),this.consequent.include(e,t),this.alternate.include(e,t)):n.include(e,t)}includeCallArguments(e,t){const n=this.getUsedBranch();n?n.includeCallArguments(e,t):(this.consequent.includeCallArguments(e,t),this.alternate.includeCallArguments(e,t))}removeAnnotations(e){this.test.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=K){const o=this.getUsedBranch();if(this.test.included)this.test.render(e,t,{renderedSurroundingElement:r}),this.consequent.render(e,t),this.alternate.render(e,t);else{const a=L(e.original,":",this.consequent.end),l=T(e.original,(this.consequent.included?L(e.original,"?",this.test.end):a)+1);s&&U(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=this.test.getLiteralValueAtPath(xt,Pt,this);return"symbol"==typeof e?null:this.usedBranch=e?this.consequent:this.alternate}}class vo extends Rn{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){this.included=!0,this.label?(this.label.include(),e.includedLabels.add(this.label.name)):e.hasContinue=!0,e.brokenFlow=!0}}class Po extends Rn{hasEffects(){return!0}}class Io extends Rn{hasEffects(e){return this.expression.hasEffects(e)||this.expression.hasEffectsOnInteractionAtPath(xt,Tt,e)}}function ko(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 No(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}class Co extends Rn{hasEffects(e){return!!this.test.hasEffects(e)||ko(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),No(e,this.body,t)}}class Do extends Rn{hasEffects(){return!1}}class Oo extends Rn{hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addExport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Oo.prototype.needsBoundaries=!0;class Ro extends Rn{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;null===this.declaration?e.remove(s,i):(e.remove(this.start,this.declaration.start),this.declaration.render(e,t,{end:i,start:s}))}applyDeoptimizations(){}}Ro.prototype.needsBoundaries=!0;class Mo extends Rn{applyDeoptimizations(){}}class _o extends Rn{createScope(e){this.scope=new Ls(e)}hasEffects(e){const{body:t,deoptimized:n,left:s,right:i}=this;return n||this.applyDeoptimizations(),!(!s.hasEffectsAsAssignmentTarget(e,!1)&&!i.hasEffects(e))||ko(e,t)}include(e,t){const{body:n,deoptimized:s,left:i,right:r}=this;s||this.applyDeoptimizations(),this.included=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),No(e,n,t)}initialise(){super.initialise(),this.left.setAssignedValue(Rt)}render(e,t){this.left.render(e,t,_),this.right.render(e,t,_),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(xt),this.scope.context.requestTreeshakingPass()}}class Lo extends Rn{get await(){return kt(this.flags,131072)}set await(e){this.flags=Nt(this.flags,131072,e)}createScope(e){this.scope=new Ls(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=!0,i.includeAsAssignmentTarget(e,t||!0,!1),r.include(e,t),No(e,n,t)}initialise(){super.initialise(),this.left.setAssignedValue(Rt)}render(e,t){this.left.render(e,t,_),this.right.render(e,t,_),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(xt),this.right.deoptimizePath($t),this.scope.context.requestTreeshakingPass()}}class Bo extends Rn{createScope(e){this.scope=new Ls(e)}hasEffects(e){return!!(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e))||ko(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),No(e,this.body,t)}render(e,t){this.init?.render(e,t,_),this.test?.render(e,t,_),this.update?.render(e,t,_),this.body.render(e,t)}}class To extends ii{createScope(e){super.createScope(this.idScope=new Os(e,e.context))}parseNode(e){return null!==e.id&&(this.id=new Is(this,this.idScope).parseNode(e.id)),super.parseNode(e)}onlyFunctionCallUsed(){return this.parent.type===Vt&&this.parent.callee===this&&(null===this.id||this.id.variable.getOnlyFunctionCallUsed())||super.onlyFunctionCallUsed()}render(e,t,{renderedSurroundingElement:n}=K){super.render(e,t),n===jt&&(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}}class zo extends Ls{constructor(){super(...arguments),this.hoistedDeclarations=[]}addDeclaration(e,t,n,s){return this.hoistedDeclarations.push(e),super.addDeclaration(e,t,n,s)}}const Vo=Symbol("unset");class Fo extends Rn{constructor(){super(...arguments),this.testValue=Vo}deoptimizeCache(){this.testValue=Ct}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?!1:!!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)}}parseNode(e){return this.consequent=new(this.scope.context.getNodeConstructor(e.consequent.type))(this,this.consequentScope=new zo(this.scope)).parseNode(e.consequent),e.alternate&&(this.alternate=new(this.scope.context.getNodeConstructor(e.alternate.type))(this,this.alternateScope=new zo(this.scope)).parseNode(e.alternate)),super.parseNode(e)}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)}applyDeoptimizations(){}getTestValue(){return this.testValue===Vo?this.testValue=this.test.getLiteralValueAtPath(xt,Pt,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!==Gt&&"BlockStatement"!==e;t.prependRight(this.start,`${n?"{ ":""}var ${s}; `),n&&t.appendLeft(this.end," }")}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof Fo&&e.alternate)return!0;if(e instanceof ti)return!1;e=e.parent}while(e);return!1}}class jo extends Rn{}class Uo extends Rn{bind(){}hasEffects(){return!1}initialise(){super.initialise(),this.scope.context.addImport(this)}render(e,t,n){e.remove(n.start,n.end)}applyDeoptimizations(){}}Uo.prototype.needsBoundaries=!0;class Go extends Rn{applyDeoptimizations(){}}function Wo(e,t){return null!==e.renderBaseName&&t.has(e)&&e.isReassigned}class qo extends Rn{declareDeclarator(e,t){this.isUsingDeclaration=t,this.id.declare(e,this.init||an)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.init?.hasEffects(e);return this.id.markDeclarationReached(),t||this.id.hasEffects(e)||this.isUsingDeclaration}include(e,t){const{deoptimized:n,id:s,init:i}=this;n||this.applyDeoptimizations(),this.included=!0,i?.include(e,t),s.markDeclarationReached(),(t||s.shouldBeIncluded(e))&&s.include(e,t)}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;if(c)o.render(e,t);else{const t=L(e.original,"=",o.end);e.remove(l,T(e.original,t+1))}if(a){if(o instanceof Is&&a instanceof Ao&&!a.id){o.variable.getName(i)!==o.name&&e.appendLeft(a.start+5,` ${o.name}`)}a.render(e,t,c?K:{renderedSurroundingElement:jt})}else o instanceof Is&&Wo(o.variable,n)&&e.appendLeft(r,`${s}=${s}void 0`)}applyDeoptimizations(){this.deoptimized=!0;const{id:e,init:t}=this;if(t&&e instanceof Is&&t instanceof Ao&&!t.id){const{name:n,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values())e!==s&&e.forbidName(n)}}}class Ho extends Rn{constructor(){super(...arguments),this.inlineNamespace=null,this.attributes=null,this.mechanism=null,this.namespaceExportName=void 0,this.resolution=null,this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof ei)return J;if(e instanceof uo){const t=e.parent;if(t instanceof ei)return J;if(t instanceof qo){const e=t.id;return e instanceof ao?Jo(e):void 0}if(t instanceof Ui){const e=t.property;if(!t.computed&&e instanceof Is)return[e.name]}}else if(e instanceof Ui){const t=e.parent,n=e.property;if(!(t instanceof yo&&n instanceof Is))return;const s=n.name;if(t.parent instanceof ei&&["catch","finally"].includes(s))return J;if("then"!==s)return;if(0===t.arguments.length)return J;const i=t.arguments[0];if(1!==t.arguments.length||!(i instanceof oo||i instanceof To))return;if(0===i.params.length)return J;const r=i.params[0];return 1===i.params.length&&r instanceof ao?Jo(r):void 0}}hasEffects(){return!0}include(e,t){this.included||(this.included=!0,this.scope.context.includeDynamicImport(this),this.scope.addAccessedDynamicImport(this)),this.source.include(e,t)}initialise(){super.initialise(),this.scope.context.addDynamicImport(this)}parseNode(e){return this.sourceAstNode=e.source,super.parseNode(e)}render(e,t){const{snippets:{_:n,getDirectReturnFunction:s,getObject:i,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,n]=s([],{functionReturn:!0,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${n})`)}else{if(this.mechanism&&(e.overwrite(this.start,L(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([["assert",this.attributes]],{lineBreakIndent:null})}`))}}setExternalResolution(e,t,n,s,i,r,o,a,l){const{format:c}=n;this.inlineNamespace=null,this.resolution=t,this.resolutionString=o,this.namespaceExportName=a,this.attributes=l;const u=[...Yo[c]||[]];let d;({helper:d,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,n,s,i)),d&&u.push(d),u.length>0&&this.scope.addAccessedGlobals(u,r)}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:n,dynamicImportInCjs:s,format:i,generatedCode:{arrowFunctions:r},interop:o},{_:a,getDirectReturnFunction:l,getDirectReturnIifeLeft:c},u){const d=u.hookFirstSync("renderDynamicImport",[{customResolution:"string"==typeof this.resolution?this.resolution:null,format:i,moduleId:this.scope.context.module.id,targetModuleId:this.resolution&&"string"!=typeof this.resolution?this.resolution.id:null}]);if(d)return{helper:null,mechanism:d};const h=!this.resolution||"string"==typeof this.resolution;switch(i){case"cjs":{if(s&&(!e||"string"==typeof e||e instanceof nn))return{helper:null,mechanism:null};const n=Ko(e,t,o);let i="require(",a=")";n&&(i=`/*#__PURE__*/${n}(${i}`,a+=")");const[u,d]=l([],{functionReturn:!0,lineBreakIndent:null,name:null});return i=`Promise.resolve().then(${u}${i}`,a+=`${d})`,!r&&h&&(i=c(["t"],`${i}t${a}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),a=")"),{helper:n,mechanism:{left:i,right:a}}}case"amd":{const s=n?"c":"resolve",i=n?"e":"reject",u=Ko(e,t,o),[d,p]=l(["m"],{functionReturn:!1,lineBreakIndent:null,name:null}),f=u?`${d}${s}(/*#__PURE__*/${u}(m))${p}`:s,[m,g]=l([s,i],{functionReturn:!1,lineBreakIndent:null,name:null});let y=`new Promise(${m}require([`,b=`],${a}${f},${a}${i})${g})`;return!r&&h&&(y=c(["t"],`${y}t${b}`,{needsArrowReturnParens:!1,needsWrappedFunction:!0}),b=")"),{helper:u,mechanism:{left:y,right:b}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}}}return{helper:null,mechanism:null}}}function Ko(e,t,n){return"external"===t?$i[n(e instanceof nn?e.id:null)]:"default"===t?gi:null}const Yo={amd:["require"],cjs:["require"],system:["module"]};function Jo(e){const t=[];for(const n of e.properties){if("RestElement"===n.type||n.computed||"Identifier"!==n.key.type)return;t.push(n.key.name)}return t}class Xo extends Rn{applyDeoptimizations(){}}class Zo extends Rn{applyDeoptimizations(){}}class Qo extends Rn{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=!0;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.includedLabels.delete(this.label.name),e.brokenFlow=n),e.includedLabels=new Set([...s,...e.includedLabels])}render(e,t){this.label.included?this.label.render(e,t):e.remove(this.start,T(e.original,L(e.original,":",this.label.end)+1)),this.body.render(e,t)}}class ea extends Rn{constructor(){super(...arguments),this.expressionsToBeDeoptimized=[],this.usedBranch=null}get isBranchResolutionAnalysed(){return kt(this.flags,65536)}set isBranchResolutionAnalysed(e){this.flags=Nt(this.flags,65536,e)}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,n),this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null,e.deoptimizePath($t);const{scope:{context:t},expressionsToBeDeoptimized:n}=this;this.expressionsToBeDeoptimized=J;for(const e of n)e.deoptimizeCache();t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();t?t.deoptimizePath(e):(this.left.deoptimizePath(e),this.right.deoptimizePath(e))}getLiteralValueAtPath(e,t,n){const s=this.getUsedBranch();return s?(this.expressionsToBeDeoptimized.push(n),s.getLiteralValueAtPath(e,t,n)):Ct}getReturnExpressionWhenCalledAtPath(e,t,n,s){const i=this.getUsedBranch();return i?(this.expressionsToBeDeoptimized.push(s),i.getReturnExpressionWhenCalledAtPath(e,t,n,s)):[new So([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===this.right&&this.left.shouldBeIncluded(e)||!n?(this.left.include(e,t),this.right.include(e,t)):n.include(e,t)}removeAnnotations(e){this.left.removeAnnotations(e)}render(e,t,{isCalleeOfRenderedParent:n,preventASI:s,renderedParentType:i,renderedSurroundingElement:r}=K){if(this.left.included&&this.right.included)this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r}),this.right.render(e,t);else{const o=L(e.original,this.operator,this.left.end);if(this.right.included){const t=T(e.original,o+2);e.remove(this.start,t),s&&U(e,t,this.right.start),this.left.removeAnnotations(e)}else e.remove(function(e,t,n){for(;;){if(t>=n)return n;if(!z.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(xt,Pt,this);if("symbol"==typeof e)return null;this.usedBranch="||"===this.operator&&e||"&&"===this.operator&&!e||"??"===this.operator&&null!=e?this.left:this.right}return this.usedBranch}}class ta extends Rn{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(xt,this.interaction,e))}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||0!==t}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.callee.include(e,!1)),this.callee.includeCallArguments(e,this.arguments)}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),mo(e,t,this)}applyDeoptimizations(){this.deoptimized=!0,this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,xt,Pt),this.scope.context.requestTreeshakingPass()}}class na extends Rn{constructor(){super(...arguments),this.objectEntity=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)}render(e,t,{renderedSurroundingElement:n}=K){super.render(e,t),n!==jt&&n!==zt||(e.appendRight(this.start,"("),e.prependLeft(this.end,")"))}applyDeoptimizations(){}getObjectEntity(){if(null!==this.objectEntity)return this.objectEntity;let e=Gn;const t=[];for(const n of this.properties){if(n instanceof Mn){t.push({key:gt,kind:"init",property:n});continue}let s;if(n.computed){const e=n.key.getLiteralValueAtPath(xt,Pt,this);if("symbol"==typeof e){t.push({key:gt,kind:n.kind,property:n});continue}s=String(e)}else if(s=n.key instanceof Is?n.key.name:String(n.key.value),"__proto__"===s&&"init"===n.kind){e=n.value instanceof zi&&null===n.value.value?null:n.value;continue}t.push({key:s,kind:n.kind,property:n})}return this.objectEntity=new Fn(t,e)}}class sa extends Rn{initialise(){const e=this.scope.context.module.id;return ve(rt(Pe(nt(this.message)),e))}}class ia extends Rn{initialise(){const e=this.start,t=this.scope.context.module.id,n=rt(Pe(nt(this.message,e)),t);this.scope.context.error(n,e)}}class ra extends Rn{}class oa extends Rn{constructor(){super(...arguments),this.hasCachedEffect=null,this.hasLoggedEffect=!1}hasCachedEffects(){return!!this.included&&(null===this.hasCachedEffect?this.hasCachedEffect=this.hasEffects(Cn()):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(re,Ge(e,s.id,Q(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(ie,Ke(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=V(e.original.slice(n,this.body[0].start));if(-1===t[0])break;n+=t[1]}F(this.body,e,n,this.end,t)}else super.render(e,t)}applyDeoptimizations(){}}class aa extends Ms{constructor(){super(...arguments),this.declarationInit=null}get method(){return kt(this.flags,262144)}set method(e){this.flags=Nt(this.flags,262144,e)}get shorthand(){return kt(this.flags,524288)}set shorthand(e){this.flags=Nt(this.flags,524288,e)}declare(e,t){return this.declarationInit=t,this.value.declare(e,Rt)}hasEffects(e){this.deoptimized||this.applyDeoptimizations();const t=this.scope.context.options.treeshake.propertyReadSideEffects;return"ObjectPattern"===this.parent.type&&"always"===t||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){this.shorthand||this.key.render(e,t),this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=!0,null!==this.declarationInit&&(this.declarationInit.deoptimizePath([gt,gt]),this.scope.context.requestTreeshakingPass())}}class la extends Rn{get computed(){return kt(this.flags,1024)}set computed(e){this.flags=Nt(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):Ct}getReturnExpressionWhenCalledAtPath(e,t,n,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,n,s):Mt}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)||Rs(this.decorators,e)}hasEffectsOnInteractionAtPath(e,t,n){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,n)}applyDeoptimizations(){}}class ca extends Rn{hasEffects(e){return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))||(e.brokenFlow=!0,!1)}include(e,t){this.included=!0,this.argument?.include(e,t),e.brokenFlow=!0}initialise(){super.initialise(),this.scope.addReturnExpression(this.argument||Rt)}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+6&&e.prependLeft(this.start+6," "))}}class ua extends Rn{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 ei)||s.shouldBeIncluded(e))&&s.include(e,t)}removeAnnotations(e){this.expressions[0].removeAnnotations(e)}render(e,t,{renderedParentType:n,isCalleeOfRenderedParent:s,preventASI:i}=K){let r=0,o=null;const a=this.expressions[this.expressions.length-1];for(const{node:l,separator:c,start:u,end:d}of j(this.expressions,e,this.start,this.end))if(l.included)if(r++,o=c,1===r&&i&&U(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 M(l,e,u,d);o&&e.remove(o,this.end)}}class da extends Rn{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,n){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,n)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}}class ha extends Rn{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.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:L(e.original,"default",this.start)+7,i=L(e.original,":",s)+1;F(this.consequent,e,i,n.end,t)}else super.render(e,t)}}ha.prototype.needsBoundaries=!0;class pa extends Rn{createScope(e){this.parentScope=e,this.scope=new Ls(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=Cn();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}parseNode(e){return this.discriminant=new(this.scope.context.getNodeConstructor(e.discriminant.type))(this,this.parentScope).parseNode(e.discriminant),super.parseNode(e)}render(e,t){this.discriminant.render(e,t),this.cases.length>0&&F(this.cases,e,this.cases[0].start,this.end-1,t)}}class fa extends go{bind(){if(super.bind(),this.tag.type===Ut){const e=this.tag.name;this.scope.findVariable(e).isNamespace&&this.scope.context.log(ie,Fe(e),this.start)}}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(xt,this.interaction,e)}include(e,t){this.deoptimized||this.applyDeoptimizations(),t?super.include(e,t):(this.included=!0,this.tag.include(e,t),this.quasi.include(e,t)),this.tag.includeCallArguments(e,this.args);const[n]=this.getReturnExpression();n.included||n.include(e,!1)}initialise(){super.initialise(),this.args=[Rt,...this.quasi.expressions],this.interaction={args:[this.tag instanceof Ui&&!this.tag.variable?this.tag.object:null,...this.args],type:2,withNew:!1}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:!0}),this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=!0,this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,xt,Pt),this.scope.context.requestTreeshakingPass()}getReturnExpression(e=Pt){return null===this.returnExpression?(this.returnExpression=Mt,this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(xt,this.interaction,e,this)):this.returnExpression}}class ma extends Rn{get tail(){return kt(this.flags,1048576)}set tail(e){this.flags=Nt(this.flags,1048576,e)}bind(){}hasEffects(){return!1}include(){this.included=!0}parseNode(e){return this.value=e.value,super.parseNode(e)}render(){}}class ga extends Rn{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){return e.length>0||1!==this.quasis.length?Ct:this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){return 1!==e.length?Mt:An(xn,e[0])}hasEffectsOnInteractionAtPath(e,t,n){return 0===t.type?e.length>1:2!==t.type||1!==e.length||$n(xn,e[0],t,n)}render(e,t){e.indentExclusionRanges.push([this.start,this.end]),super.render(e,t)}}class ya extends Os{constructor(e,t){super(e,t),this.variables.set("this",new vs("this",null,an,t,"other"))}addDeclaration(e,t,n,s){return this.context.module.importDescriptions.has(e.name)&&t.error(st(e.name),e.start),super.addDeclaration(e,t,n,s)}addExportDefaultDeclaration(e,t,n){const s=new or(e,t,n);return this.variables.set("default",s),s}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 ws&&this.accessedOutsideVariables.set(e,n),n}}class ba extends Rn{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(){this.included||(this.included=!0,this.scope.context.includeVariableInModule(this.variable))}initialise(){super.initialise(),this.alias=this.scope.findLexicalBoundary()instanceof ya?this.scope.context.moduleContext:null,"undefined"===this.alias&&this.scope.context.log(ie,{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:fe("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 Ea extends Rn{hasEffects(){return!0}include(e,t){this.included=!0,this.argument.include(e,t),e.brokenFlow=!0}render(e,t){this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," ")}}class xa extends Rn{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?Dn: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)}}const $a={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>Ct,typeof:e=>typeof e,void:()=>{},"~":e=>~e};class Aa extends Rn{get prefix(){return kt(this.flags,2097152)}set prefix(e){this.flags=Nt(this.flags,2097152,e)}getLiteralValueAtPath(e,t,n){if(e.length>0)return Ct;const s=this.argument.getLiteralValueAtPath(xt,t,n);return"symbol"==typeof s?Ct:$a[this.operator](s)}hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!("typeof"===this.operator&&this.argument instanceof Is)&&(this.argument.hasEffects(e)||"delete"===this.operator&&this.argument.hasEffectsOnInteractionAtPath(xt,Bt,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(xt),this.scope.context.requestTreeshakingPass())}}class Sa extends Rn{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.deoptimized||this.applyDeoptimizations(),this.included=!0,this.argument.includeAsAssignmentTarget(e,t,!0)}initialise(){super.initialise(),this.argument.setAssignedValue(Rt)}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?W(s,this.start,this.end,e,t):q(s,this.start,this.end,this.parent.type!==jt,e,t);else{const n=this.operator[0];!function(e,t,n,s,i,r,o){const{_:a}=r.snippets;i.prependRight(t,`${G([e],r,o)},${a}`),s&&(i.prependRight(t,"("),i.appendLeft(n,")"))}(s,this.start,this.end,this.parent.type!==jt,e,t,`${i}${n}${i}1`)}}}applyDeoptimizations(){if(this.deoptimized=!0,this.argument.deoptimizePath(xt),this.argument instanceof Is){this.scope.findVariable(this.argument.name).markReassigned()}this.scope.context.requestTreeshakingPass()}}class wa extends Rn{deoptimizePath(){for(const e of this.declarations)e.deoptimizePath(xt)}hasEffectsOnInteractionAtPath(){return!1}include(e,t,{asSingleStatement:n}=K){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 ao||i instanceof ro)&&r.include(e,t)}}initialise(){super.initialise(),this.isUsingDeclaration="await using"===this.kind||"using"===this.kind;for(const e of this.declarations)e.declareDeclarator(this.kind,this.isUsingDeclaration)}removeAnnotations(e){this.declarations[0].removeAnnotations(e)}render(e,t,n=K){if(this.isUsingDeclaration||function(e,t){for(const n of e){if(!n.id.included)return!1;if(n.id.type===Ut){if(t.has(n.id.variable))return!1}else{const e=[];if(n.id.addExportedVariables(e,t),e.length>0)return!1}}return!0}(this.declarations,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)}applyDeoptimizations(){}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,` ${G(r,o)};`)}renderReplacedDeclarations(e,t){const n=j(this.declarations,e,this.start+this.kind.length,this.end-(59===e.original.charCodeAt(this.end-1)?1:0));let s,i;i=T(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 Is&&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 Is&&Wo(d.id.variable,t.exportNamesByVariable))c&&(u+=";"),l=!1;else{if(h&&h===d.id.variable){const n=L(e.original,"=",d.id.end);W(h,T(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 e.remove(p,g),d.removeAnnotations(e);this.renderDeclarationEnd(e,u,r,s,i,d,t)}}class va extends Rn{hasEffects(e){return!!this.test.hasEffects(e)||ko(e,this.body)}include(e,t){this.included=!0,this.test.include(e,t),No(e,this.body,t)}}class Pa extends Rn{hasEffects(e){return this.deoptimized||this.applyDeoptimizations(),!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){this.argument&&(this.argument.render(e,t,{preventASI:!0}),this.argument.start===this.start+5&&e.prependLeft(this.start+5," "))}}const Ia=["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","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"],ka=[sa,ia,is,ro,oo,lo,co,uo,po,ti,fo,yo,bo,Eo,$o,Fs,Ao,wo,vo,Po,Io,ei,Co,Do,Oo,oi,Ro,Mo,ei,_o,Lo,Bo,ri,To,Is,Fo,jo,Uo,Go,Ho,Xo,Zo,Qo,zi,zi,zi,zi,zi,zi,ea,Ui,Hi,_s,ta,na,ao,ra,oa,aa,la,ni,ca,ua,Mn,Bs,da,ha,pa,fa,ma,ga,ba,Ea,xa,Aa,Sa,wa,qo,va,Pa],Na=[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=Da(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.elements=Da(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=Pn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=e.params=Da(e,s,n[t+2],n);s.addParameterVariables(o.map((e=>e.declare("parameter",Rt))),o[o.length-1]instanceof ni),e.body=Ca(e,s.bodyScope,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.operator=Sn[n[t]],e.left=Ca(e,s,n[t+1],n),e.right=Ca(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.left=Ca(e,s,n[t],n),e.right=Ca(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.argument=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.operator=Sn[n[t]],e.left=Ca(e,s,n[t+1],n),e.right=Ca(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.body=Da(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:Ca(e,s,i,n)},function(e,t,n){const{scope:s}=e,i=n[t];e.optional=!(1&~i),e.annotations=Pn(n[t+1],n),e.callee=Ca(e,s,n[t+2],n),e.arguments=Da(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.param=0===i?null:Ca(e,s,i,n);r?.declare("parameter",Rt),e.body=Ca(e,s.bodyScope,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.expression=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t],r=e.body=[];if(i){const t=n[i];for(let o=0;o<t;o++){const t=n[i+1+o];r.push(Ca(e,1&n[t+3]?s:s.instanceScope,t,n))}}},function(e,t,n){const{scope:s}=e;e.decorators=Da(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:Ca(e,s.parent,i,n);const r=n[t+2];e.superClass=0===r?null:Ca(e,s,r,n),e.body=Ca(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.decorators=Da(e,s,n[t],n);const i=n[t+1];e.id=0===i?null:Ca(e,s,i,n);const r=n[t+2];e.superClass=0===r?null:Ca(e,s,r,n),e.body=Ca(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e;e.test=Ca(e,s,n[t],n),e.consequent=Ca(e,s,n[t+1],n),e.alternate=Ca(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.label=0===i?null:Ca(e,s,i,n)},function(){},function(e,t,n){const{scope:s}=e;e.expression=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.directive=n.convertString(n[t]),e.expression=Ca(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.body=Ca(e,s,n[t],n),e.test=Ca(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.exported=0===i?null:Ca(e,s,i,n),e.source=Ca(e,s,n[t+1],n),e.attributes=Da(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.declaration=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.specifiers=Da(e,s,n[t],n);const i=n[t+1];e.source=0===i?null:Ca(e,s,i,n),e.attributes=Da(e,s,n[t+2],n);const r=n[t+3];e.declaration=0===r?null:Ca(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.local=Ca(e,s,n[t],n);const i=n[t+1];e.exported=0===i?e.local:Ca(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expression=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.left=Ca(e,s,n[t],n),e.right=Ca(e,s,n[t+1],n),e.body=Ca(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.await=!(1&~i),e.left=Ca(e,s,n[t+1],n),e.right=Ca(e,s,n[t+2],n),e.body=Ca(e,s,n[t+3],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.init=0===i?null:Ca(e,s,i,n);const r=n[t+1];e.test=0===r?null:Ca(e,s,r,n);const o=n[t+2];e.update=0===o?null:Ca(e,s,o,n),e.body=Ca(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=Pn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:Ca(e,s.parent,o,n);const a=e.params=Da(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",Rt))),a[a.length-1]instanceof ni),e.body=Ca(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=Pn(n[t+1],n);e.annotationNoSideEffects=r.some((e=>"noSideEffects"===e.type));const o=n[t+2];e.id=0===o?null:Ca(e,e.idScope,o,n);const a=e.params=Da(e,s,n[t+3],n);s.addParameterVariables(a.map((e=>e.declare("parameter",Rt))),a[a.length-1]instanceof ni),e.body=Ca(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=Ca(e,s,n[t],n),e.consequent=Ca(e,e.consequentScope=new zo(s),n[t+1],n);const i=n[t+2];e.alternate=0===i?null:Ca(e,e.alternateScope=new zo(s),i,n)},function(e,t,n){const{scope:s}=e;e.key=Ca(e,s,n[t],n),e.value=Ca(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.specifiers=Da(e,s,n[t],n),e.source=Ca(e,s,n[t+1],n),e.attributes=Da(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.local=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.source=Ca(e,s,n[t],n),e.sourceAstNode=no(n[t],n);const i=n[t+1];e.options=0===i?null:Ca(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.local=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.local=Ca(e,s,n[t+1],n),e.imported=0===i?e.local:Ca(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.label=Ca(e,s,n[t],n),e.body=Ca(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=Sn[n[t]],e.left=Ca(e,s,n[t+1],n),e.right=Ca(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=Ca(e,s,n[t+1],n),e.property=Ca(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.meta=Ca(e,s,n[t],n),e.property=Ca(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=Da(e,s,n[t+1],n),e.key=Ca(e,s,n[t+2],n),e.value=Ca(e,s,n[t+3],n),e.kind=Sn[n[t+4]]},function(e,t,n){const{scope:s}=e;e.annotations=Pn(n[t],n),e.callee=Ca(e,s,n[t+1],n),e.arguments=Da(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.properties=Da(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.properties=Da(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=Da(e,s,n[t],n),e.invalidAnnotations=Pn(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=Ca(e,s,n[t+2],n),e.kind=Sn[n[t+3]],e.key=0===r?e.value:Ca(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=Da(e,s,n[t+1],n),e.key=Ca(e,s,n[t+2],n);const r=n[t+3];e.value=0===r?null:Ca(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.argument=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.argument=0===i?null:Ca(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.expressions=Da(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.argument=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.body=Da(e,s,n[t],n)},function(){},function(e,t,n){const{scope:s}=e,i=n[t];e.test=0===i?null:Ca(e,s,i,n),e.consequent=Da(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.discriminant=Ca(e,e.parentScope,n[t],n),e.cases=Da(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.tag=Ca(e,s,n[t],n),e.quasi=Ca(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=Da(e,s,n[t],n),e.expressions=Da(e,s,n[t+1],n)},function(){},function(e,t,n){const{scope:s}=e;e.argument=Ca(e,s,n[t],n)},function(e,t,n){const{scope:s}=e;e.block=Ca(e,s,n[t],n);const i=n[t+1];e.handler=0===i?null:Ca(e,s,i,n);const r=n[t+2];e.finalizer=0===r?null:Ca(e,s,r,n)},function(e,t,n){const{scope:s}=e;e.operator=Sn[n[t]],e.argument=Ca(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e,i=n[t];e.prefix=!(1&~i),e.operator=Sn[n[t+1]],e.argument=Ca(e,s,n[t+2],n)},function(e,t,n){const{scope:s}=e;e.kind=Sn[n[t]],e.declarations=Da(e,s,n[t+1],n)},function(e,t,n){const{scope:s}=e;e.id=Ca(e,s,n[t],n);const i=n[t+1];e.init=0===i?null:Ca(e,s,i,n)},function(e,t,n){const{scope:s}=e;e.test=Ca(e,s,n[t],n),e.body=Ca(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:Ca(e,s,r,n)}];function Ca(e,t,n,s){const i=s[n],r=ka[i];if(!r)throw console.trace(),new Error(`Unknown node type: ${i}`);const o=new r(e,t);return o.type=Ia[i],o.start=s[n+1],o.end=s[n+2],Na[i](o,n+3,s),o.initialise(),o}function Da(e,t,n,s){if(0===n)return J;const i=s[n++],r=[];for(let o=0;o<i;o++){const i=s[n++];r.push(i?Ca(e,t,i,s):null)}return r}const Oa={ArrayExpression:is,ArrayPattern:ro,ArrowFunctionExpression:oo,AssignmentExpression:lo,AssignmentPattern:co,AwaitExpression:uo,BinaryExpression:po,BlockStatement:ti,BreakStatement:fo,CallExpression:yo,CatchClause:bo,ChainExpression:Eo,ClassBody:$o,ClassDeclaration:Fs,ClassExpression:Ao,ConditionalExpression:wo,ContinueStatement:vo,DebuggerStatement:Po,Decorator:Io,DoWhileStatement:Co,EmptyStatement:Do,ExportAllDeclaration:Oo,ExportDefaultDeclaration:oi,ExportNamedDeclaration:Ro,ExportSpecifier:Mo,ExpressionStatement:ei,ForInStatement:_o,ForOfStatement:Lo,ForStatement:Bo,FunctionDeclaration:ri,FunctionExpression:To,Identifier:Is,IfStatement:Fo,ImportAttribute:jo,ImportDeclaration:Uo,ImportDefaultSpecifier:Go,ImportExpression:Ho,ImportNamespaceSpecifier:Xo,ImportSpecifier:Zo,LabeledStatement:Qo,Literal:zi,LogicalExpression:ea,MemberExpression:Ui,MetaProperty:Hi,MethodDefinition:_s,NewExpression:ta,ObjectExpression:na,ObjectPattern:ao,PanicError:sa,ParseError:ia,PrivateIdentifier:ra,Program:oa,Property:aa,PropertyDefinition:la,RestElement:ni,ReturnStatement:ca,SequenceExpression:ua,SpreadElement:Mn,StaticBlock:Bs,Super:da,SwitchCase:ha,SwitchStatement:pa,TaggedTemplateExpression:fa,TemplateElement:ma,TemplateLiteral:ga,ThisExpression:ba,ThrowStatement:Ea,TryStatement:xa,UnaryExpression:Aa,UnknownNode:class extends Rn{hasEffects(){return!0}include(e){super.include(e,!0)}},UpdateExpression:Sa,VariableDeclaration:wa,VariableDeclarator:qo,WhileStatement:va,YieldExpression:Pa};class Ra extends Wt{constructor(e){super(wr),this.module=e}include(){super.include(),this.module.needsExportShim=!0}}var Ma;!function(e){e[e.LOAD_AND_PARSE=0]="LOAD_AND_PARSE",e[e.ANALYSE=1]="ANALYSE",e[e.GENERATE=2]="GENERATE"}(Ma||(Ma={}));const _a=new WeakMap;function La(e,t){if(e){const t=_a.get(e);t&&function(e){void 0===e.encodedMappings&&e.decodedMappings&&(e.encodedMappings=i.encode(e.decodedMappings)),e.decodedMappings=void 0}(t)}if(t)for(const e of t)e.missing||La(e)}function Ba(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},r={...e,get mappings(){return s.decodedMappings||(s.decodedMappings=s.encodedMappings?i.decode(s.encodedMappings):[],s.encodedMappings=void 0),s.decodedMappings}};return _a.set(r,s),r}function Ta(e){return e.id}const za=(e,{allowReturnOutsideFunction:t=!1}={})=>function(e){const t=no(0,e);switch(t.type){case"PanicError":return ve(Pe(nt(t.message)));case"ParseError":return ve(Pe(nt(t.message,t.start)));default:return t}}(io(Xr(e,t))),Va=new Set(["assert","with"]);function Fa(e){const{scope:{context:t},options:n,start:s}=e;if(!(n instanceof na))return n&&t.module.log(ie,Xe(t.module.id),s),Y;const i=n.properties.find((e=>Va.has(ja(e))))?.value;if(!i)return Y;if(!(i instanceof na))return t.module.log(ie,(r=t.module.id,{code:De,message:`Rollup could not statically analyze the options argument of a dynamic import in "${ue(r)}". Dynamic import options need to be an object with a nested attributes object.`}),s),Y;var r;const o=i.properties.map((e=>{const n=ja(e);return"string"==typeof n&&"string"==typeof e.value.value?[n,e.value.value]:(t.module.log(ie,Xe(t.module.id),e.start),null)})).filter((e=>!!e));return o.length>0?Object.fromEntries(o):Y}const ja=e=>{const t=e.key;return t&&!e.computed&&(t.name||t.value)};function Ua(e,t){const n=Object.keys(e);return n.length!==Object.keys(t).length||n.some((n=>e[n]!==t[n]))}var Ga="performance"in("undefined"==typeof globalThis?"undefined"==typeof window?{}:window:globalThis)?performance:{now:()=>0},Wa={memoryUsage:()=>({heapUsed:0})};let qa=new Map;function Ha(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`- ${e}`}}function Ka(e,t=3){e=Ha(e,t);const n=Wa.memoryUsage().heapUsed,s=Ga.now(),i=qa.get(e);void 0===i?qa.set(e,{memory:0,startMemory:n,startTime:s,time:0,totalMemory:0}):(i.startMemory=n,i.startTime=s)}function Ya(e,t=3){e=Ha(e,t);const n=qa.get(e);if(void 0!==n){const e=Wa.memoryUsage().heapUsed;n.memory+=e-n.startMemory,n.time+=Ga.now()-n.startTime,n.totalMemory=Math.max(n.totalMemory,e)}}function Ja(){const e={};for(const[t,{memory:n,time:s,totalMemory:i}]of qa)e[t]=[s,n,i];return e}let Xa=rn,Za=rn;const Qa=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function el(e,t){if(e._hasTimer)return e;e._hasTimer=!0;for(const n of Qa)if(n in e){let s=`plugin ${t}`;e.name&&(s+=` (${e.name})`),s+=` - ${n}`;const i=function(...e){Xa(s,4);const t=r.apply(this,e);return Za(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 tl={identifier:null,localName:wr};function nl(e,t,n,s,i=new Map){const r=i.get(t);if(r){if(r.has(e))return s?[null]:ve((o=t,{code:"CIRCULAR_REEXPORT",exporter:a=e.id,message:`"${o}" cannot be exported from "${ue(a)}" as it is a reexport that references itself.`}));r.add(e)}else i.set(t,new Set([e]));var o,a;return e.getVariableForExportName(t,{importerForSideEffects:n,isExportAllSearch:s,searchedNamesAndModules:i})}function sl(e,t){const n=pt(t.sideEffectDependenciesByVariable,e,ft);let s=e;const i=new Set([s]);for(;;){const e=s.module;if(s=s instanceof or?s.getDirectOriginalVariable():s instanceof lr?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 il{constructor(e,t,n,s,i,r,o,a){this.graph=e,this.id=t,this.options=n,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.includedImports=new Set,this.isExecuted=!1,this.isUserDefinedEntryPoint=!1,this.needsExportShim=!1,this.sideEffectDependenciesByVariable=new Map,this.sourcesWithAttributes=new Map,this.allExportNames=null,this.ast=null,this.exportAllModules=[],this.exportAllSources=new Set,this.exportNamesByVariable=null,this.exportShimVariable=new Ra(this),this.exports=new Map,this.namespaceReexportsByName=new Map,this.reexportDescriptions=new Map,this.relevantDependencies=null,this.syntheticExports=new Map,this.syntheticNamespace=null,this.transformDependencies=[],this.transitiveReexports=null,this.excludeFromSourcemap=/\0/.test(t),this.context=n.moduleContext(t),this.preserveSignature=this.options.preserveEntrySignatures;const l=this,{dynamicImports:c,dynamicImporters:u,exportAllSources:d,exports:h,implicitlyLoadedAfter:p,implicitlyLoadedBefore:f,importers:m,reexportDescriptions:g,sourcesWithAttributes:y}=this;this.info={ast:null,attributes:a,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>"string"==typeof e&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>null!=e))},get dynamicImporters(){return u.sort()},get exportedBindings(){const e={".":[...h.keys()]};for(const[t,{source:n}]of g)(e[n]??=[]).push(t);for(const t of d)(e[t]??=[]).push("*");return e},get exports(){return[...h.keys(),...g.keys(),...[...d].map((()=>"*"))]},get hasDefaultExport(){return l.ast?l.exports.has("default")||g.has("default"):null},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(p,Ta).sort()},get implicitlyLoadedBefore(){return Array.from(f,Ta).sort()},get importedIdResolutions(){return Array.from(y.keys(),(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(y.keys(),(e=>l.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return m.sort()},isEntry:s,isExternal:!1,get isIncluded(){return e.phase!==Ma.GENERATE?null:l.isIncluded()},meta:{...o},moduleSideEffects:i,syntheticNamedExports:r}}basename(){const e=N(this.id),t=D(this.id);return Xt(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}cacheInfoGetters(){Ht(this.info,["dynamicallyImportedIdResolutions","dynamicallyImportedIds","dynamicImporters","exportedBindings","exports","hasDefaultExport","implicitlyLoadedAfterOneOf","implicitlyLoadedBefore","importedIdResolutions","importedIds","importers"])}error(e,t){return void 0!==t&&this.addLocationToLogProps(e,t),ve(e)}estimateSize(){let e=0;for(const t of this.ast.body)t.included&&(e+=t.end-t.start);return e}getAllExportNames(){if(this.allExportNames)return this.allExportNames;this.allExportNames=new Set([...this.exports.keys(),...this.reexportDescriptions.keys()]);for(const e of this.exportAllModules)if(e instanceof nn)this.allExportNames.add(`*${e.id}`);else for(const t of e.getAllExportNames())"default"!==t&&this.allExportNames.add(t);return"string"==typeof this.info.syntheticNamedExports&&this.allExportNames.delete(this.info.syntheticNamedExports),this.allExportNames}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.getReexports(),...this.getExports()]){const[t]=this.getVariableForExportName(e);t?.included&&n.add(t)}for(let s of n){const n=this.sideEffectDependenciesByVariable.get(s);if(n)for(const e of n)t.add(e);s instanceof lr?s=s.getBaseVariable():s instanceof or&&(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}getExportNamesByVariable(){if(this.exportNamesByVariable)return this.exportNamesByVariable;const e=new Map;for(const t of this.getAllExportNames()){let[n]=this.getVariableForExportName(t);if(n instanceof or&&(n=n.getOriginalVariable()),!n||!(n.included||n instanceof qt))continue;const s=e.get(n);s?s.push(t):e.set(n,[t])}return this.exportNamesByVariable=e}getExports(){return[...this.exports.keys()]}getReexports(){if(this.transitiveReexports)return this.transitiveReexports;this.transitiveReexports=[];const e=new Set(this.reexportDescriptions.keys());for(const t of this.exportAllModules)if(t instanceof nn)e.add(`*${t.id}`);else for(const n of[...t.getReexports(),...t.getExports()])"default"!==n&&e.add(n);return this.transitiveReexports=[...e]}getRenderedExports(){const e=[],t=[];for(const n of this.exports.keys()){const[s]=this.getVariableForExportName(n);(s?.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:ve((e=this.id,t=this.info.syntheticNamedExports,{code:"SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",exporter:e,message:`Module "${ue(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,isExportAllSearch:n,onlyExplicit:s,searchedNamesAndModules:i}=Y){if("*"===e[0]){if(1===e.length)return[this.namespace];return this.graph.modulesById.get(e.slice(1)).getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=nl(r.module,r.localName,t,!1,i);return e?(t&&(rl(e,t,this),this.info.moduleSideEffects&&pt(t.sideEffectDependenciesByVariable,e,ft).add(this)),[e]):this.error(Qe(r.localName,this.id,r.module.id),r.start)}const o=this.exports.get(e);if(o){if(o===tl)return[this.exportShimVariable];const e=o.localName,n=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:i});return t&&(rl(n,t,this),pt(t.sideEffectDependenciesByVariable,n,ft).add(this)),[n]}if(s)return[null];if("default"!==e){const n=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,i);if(this.namespaceReexportsByName.set(e,n),n[0])return n}return this.info.syntheticNamedExports?[pt(this.syntheticExports,e,(()=>new lr(this.astContext,e,this.getSyntheticNamespace())))]:!n&&this.options.shimMissingExports?(this.shimMissingExport(e),[this.exportShimVariable]):[null]}hasEffects(){return"no-treeshake"===this.info.moduleSideEffects||this.ast.hasCachedEffects()}include(){const e=Nn();this.ast.shouldBeIncluded(e)&&this.ast.include(e,!1)}includeAllExports(e){this.isExecuted||(sn(this),this.graph.needsTreeshakingPass=!0);for(const s of this.exports.keys())if(e||s!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(s)[0];if(!e)return ve((t=s,n=this.id,{binding:t,code:Re,exporter:n,message:`Exported variable "${t}" is not defined in "${ue(n)}".`,url:fe(me)}));e.deoptimizePath($t),e.included||this.includeVariable(e)}var t,n;for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);t&&(t.deoptimizePath($t),t.included||this.includeVariable(t),t instanceof qt&&(t.module.reexported=!0))}e&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}includeAllInBundle(){this.ast.include(Nn(),!0),this.includeAllExports(!1)}includeExportsByNames(e){this.isExecuted||(sn(this),this.graph.needsTreeshakingPass=!0);let t=!1;for(const n of e){const e=this.getVariableForExportName(n)[0];e&&(e.deoptimizePath($t),e.included||this.includeVariable(e)),this.exports.has(n)||this.reexportDescriptions.has(n)||(t=!0)}t&&this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}isIncluded(){return this.ast&&(this.ast.included||this.namespace.included||this.importedFromNotTreeshaken||this.exportShimVariable.included)}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions),this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const n=this.graph.modulesById.get(this.resolvedIds[t].id);n instanceof nn?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){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?ve((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.`})):{source:t,usesTopLevelAwait:n};var s,i}async setSource({ast:e,code:t,customTransformCache:n,originalCode:s,originalSourcemap:i,resolvedIds:r,sourcemapChain:o,transformDependencies:a,transformFiles:l,...c}){if(Xa("generate ast",3),t.startsWith("#!")){const e=t.indexOf("\n");this.shebang=t.slice(2,e)}this.info.code=t,this.originalCode=s,this.originalSourcemap=Ba(i),this.sourcemapChain=o.map((e=>e.missing?e:Ba(e))),La(this.originalSourcemap,this.sourcemapChain),l&&(this.transformFiles=l),this.transformDependencies=a,this.customTransformCache=n,this.updateOptions(c),this.resolvedIds=r??Object.create(null);const u=this.id;this.magicString=new b(t,{filename:this.excludeFromSourcemap?null:u,indentExclusionRanges:[]}),this.astContext={addDynamicImport:this.addDynamicImport.bind(this),addExport:this.addExport.bind(this),addImport:this.addImport.bind(this),addImportMeta:this.addImportMeta.bind(this),code:t,deoptimizationTracker:this.graph.deoptimizationTracker,error:this.error.bind(this),fileName:u,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>Oa[e]||Oa.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(!0),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,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=!0,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:!1},this.scope=new ya(this.graph.scope,this.astContext),this.namespace=new ar(this.astContext);const d={context:this.astContext,type:"Module"};if(e)this.ast=new Oa[e.type](d,this.scope).parseNode(e),this.info.ast=e;else{Za("generate ast",3);const e=await async function(e,t){return Xr(e,t)}(t,!1);Xa("generate ast",3),this.ast=(h=e,p=d,f=this.scope,Ca(p,f,0,io(h))),Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(u))return this.graph.astLru.get(u);{const e=this.tryParse();return!1!==this.options.cache?(Object.defineProperty(this.info,"ast",{value:e}),e):(this.graph.astLru.set(u,e),e)}}})}var h,p,f;Za("generate ast",3)}toJSON(){return{ast:this.info.ast,attributes:this.info.attributes,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,Ta),id:this.id,meta:this.info.meta,moduleSideEffects:this.info.moduleSideEffects,originalCode:this.originalCode,originalSourcemap:this.originalSourcemap,resolvedIds:this.resolvedIds,sourcemapChain:this.sourcemapChain,syntheticNamedExports:this.info.syntheticNamedExports,transformDependencies:this.transformDependencies,transformFiles:this.transformFiles}}traceVariable(e,{importerForSideEffects:t,isExportAllSearch:n,searchedNamesAndModules:s}=Y){const i=this.scope.variables.get(e);if(i)return i;const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof il&&"*"===r.name)return e.namespace;const[i]=nl(e,r.name,t||this,n,s);return i||this.error(Qe(r.name,this.id,e.id),r.start)}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:n}){null!=t&&(this.info.moduleSideEffects=t),null!=n&&(this.info.syntheticNamedExports=n),null!=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,resolution:null})}assertUniqueExportName(e,t){(this.exports.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 oi)this.assertUniqueExportName("default",e.start),this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"});else if(e instanceof Oo){const t=e.source.value;if(this.addSource(t,e),e.exported){const n=e.exported instanceof zi?e.exported.value:e.exported.name;this.assertUniqueExportName(n,e.exported.start),this.reexportDescriptions.set(n,{localName:"*",module:null,source:t,start:e.start})}else this.exportAllSources.add(t)}else if(e.source instanceof zi){const t=e.source.value;this.addSource(t,e);for(const{exported:n,local:s,start:i}of e.specifiers){const e=n instanceof zi?n.value:n.name;this.assertUniqueExportName(e,i),this.reexportDescriptions.set(e,{localName:s instanceof zi?s.value:s.name,module:null,source:t,start:i})}}else if(e.declaration){const t=e.declaration;if(t instanceof wa)for(const e of t.declarations)for(const t of _r(e.id))this.assertUniqueExportName(t,e.id.start),this.exports.set(t,{identifier:null,localName:t});else{const e=t.id.name;this.assertUniqueExportName(e,t.id.start),this.exports.set(e,{identifier:null,localName:e})}}else for(const{local:t,exported:n}of e.specifiers){const e=t.name,s=n instanceof Is?n.name:n.value;this.assertUniqueExportName(s,n.start),this.exports.set(s,{identifier:null,localName:e})}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const n of e.specifiers){const e=n.local.name;(this.scope.variables.has(e)||this.importDescriptions.has(e))&&this.error(st(e),n.local.start);const s=n instanceof Go?"default":n instanceof Xo?"*":n.imported instanceof Is?n.imported.name:n.imported.value;this.importDescriptions.set(e,{module:null,name:s,source:t,start:n.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id,e.pos=t;let n=this.info.code;const s=Q(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];for(const e of n)if(e[0]>=t.column||e===s){t={column:e[3],line:e[2]+1};continue 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(ie,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))}Ie(e,{column:i,line:r},n,this.id)}}addModulesToImportDescriptions(e){for(const t of e.values()){const{id:e}=this.resolvedIds[t.source];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 nn||o.hasEffects()?e.add(o):i(o.dependencies)))};i(this.dependencies),i(n)}addSource(e,t){const n=(s=t.attributes,s?.length?Object.fromEntries(s.map((e=>[ja(e),e.value.value]))):Y);var s;const i=this.sourcesWithAttributes.get(e);i?Ua(i,n)&&this.log(ie,qe(i,n,e,this.id),t.start):this.sourcesWithAttributes.set(e,n)}getVariableFromNamespaceReexports(e,t,n){let s=null;const i=new Map,r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e)continue;const[a,l]=nl(o,e,t,!0,ol(n));o instanceof nn||l?r.add(a):a instanceof lr?s||(s=a):a&&i.set(a,o)}if(i.size>0){const t=[...i],n=t[0][0];return 1===t.length?[n]:(this.options.onLog(ie,(o=e,a=this.id,l=t.map((([,e])=>e.id)),{binding:o,code:"NAMESPACE_CONFLICT",ids:l,message:`Conflicting namespaces: "${ue(a)}" re-exports "${o}" from one of the modules ${le(l.map((e=>ue(e))))} (will be ignored).`,reexporter:a})),[null])}var o,a,l;if(r.size>0){const t=[...r],n=t[0];return t.length>1&&this.options.onLog(ie,function(e,t,n,s){return{binding:e,code:"AMBIGUOUS_EXTERNAL_NAMESPACES",ids:s,message:`Ambiguous external namespace resolution: "${ue(t)}" re-exports "${e}" from one of the external modules ${le(s.map((e=>ue(e))))}, guessing "${ue(n)}".`,reexporter:t}}(e,this.id,n.module.id,t.map((e=>e.module.id)))),[n,!0]}return s?[s]:[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set,t=new Set;for(const n of[this,...this.exportAllModules])if(n instanceof nn){const[t]=n.getVariableForExportName("*");t.include(),this.includedImports.add(t),e.add(t)}else if(n.info.syntheticNamedExports){const e=n.getSyntheticNamespace();e.include(),this.includedImports.add(e),t.add(e)}return[...t,...e]}includeDynamicImport(e){const t=this.dynamicImports.find((t=>t.node===e)).resolution;if(t instanceof il){t.includedDynamicImporters.push(this);const n=this.options.treeshake?e.getDeterministicImportedNames():void 0;n?t.includeExportsByNames(n):t.includeAllExports(!0)}}includeVariable(e){const t=e.module;if(e.included)t instanceof il&&t!==this&&sl(e,this);else if(e.include(),this.graph.needsTreeshakingPass=!0,t instanceof il&&(t.isExecuted||sn(t),t!==this)){const t=sl(e,this);for(const e of t)e.isExecuted||sn(e)}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;t&&t!==this&&this.includedImports.add(e)}shimMissingExport(e){var t,n;this.options.onLog(ie,(t=this.id,{binding:n=e,code:"SHIMMED_EXPORT",exporter:t,message:`Missing export "${n}" has been shimmed in module "${ue(t)}".`})),this.exports.set(e,tl)}tryParse(){try{return za(this.info.code)}catch(e){return this.error(rt(e,this.id),e.pos)}}}function rl(e,t,n){if(e.module instanceof il&&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 ol=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)]))),al=(e,t)=>t?`${e}\n${t}`:e,ll=(e,t)=>t?`${e}\n\n${t}`:e;const cl={amd:hl,cjs:hl,es:dl,iife:hl,system:dl,umd:hl};function ul(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){for(const t of s.scope.variables.values())t.included&&!(t.renderBaseName||t instanceof or&&t.getOriginalVariable()!==t)&&t.setRenderNames(null,Cs(t.name,e,t.forbiddenNames));if(n.has(s)){const t=s.namespace;t.setRenderNames(null,Cs(t.name,e,t.forbiddenNames))}}}(s,f,p),cl[i](s,n,t,r,o,a,l,c,u);for(const e of f)e.scope.deconflict(i,d,h)}function dl(e,t,n,s,i,r,o,a,l){for(const t of n.dependencies)(i||t instanceof cr)&&(t.variableName=Cs(t.suggestedVariableName,e,null));for(const n of t){const t=n.module,s=n.name;n.isNamespace&&(i||t instanceof nn)?n.setRenderNames(null,(t instanceof nn?a.get(t):o.get(t)).variableName):t instanceof nn&&"default"===s?n.setRenderNames(null,Cs([...t.exportedVariables].some((([e,t])=>"*"===t&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,n.forbiddenNames)):n.setRenderNames(null,Cs(Xt(s),e,n.forbiddenNames))}for(const t of l)t.setRenderNames(null,Cs(t.name,e,t.forbiddenNames))}function hl(e,t,{deconflictedDefault:n,deconflictedNamespace:s,dependencies:i},r,o,a,l,c){for(const t of i)t.variableName=Cs(t.suggestedVariableName,e,null);for(const t of s)t.namespaceVariableName=Cs(`${t.suggestedVariableName}__namespace`,e,null);for(const t of n)t.defaultVariableName=s.has(t)&&Ai(r(t.id),a)?t.namespaceVariableName:Cs(`${t.suggestedVariableName}__default`,e,null);for(const e of t){const t=e.module;if(t instanceof nn){const n=c.get(t),s=e.name;if("default"===s){const s=r(t.id),i=Ei[s]?n.defaultVariableName:n.variableName;xi(s,a)?e.setRenderNames(i,"default"):e.setRenderNames(null,i)}else"*"===s?e.setRenderNames(null,$i[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 pl(e,{exports:t,name:n,format:s},i,r){const o=e.getExportNames();if("default"===t){if(1!==o.length||"default"!==o[0])return ve(Je("default",o,i))}else if("none"===t&&o.length>0)return ve(Je("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(ie,function(e,t){return{code:"MIXED_EXPORTS",id:e,message:`Entry module "${ue(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:fe(be)}}(i,n)),t="named")),t}function fl(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 ml(e,t,n,s,i,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof nn){t.push(r.get(e));continue}const o=i.get(e);o===s?n.has(e)||(n.add(e),ml(e,t,n,s,i,r)):t.push(o)}}const gl="!~{",yl="}~",bl=new RegExp(`${gl}[0-9a-zA-Z_$]{1,17}${yl}`,"g"),El=(e,t)=>e.replace(bl,(e=>t.get(e)||e)),xl=(e,t,n)=>e.replace(bl,(e=>e===t?n:e)),$l=Symbol("bundleKeys"),Al={type:"placeholder"};function Sl(e,t,n){return de(e)?ve(ut(`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 ve(ut(`"[${s}${i||""}]" is not a valid placeholder in the "${t}" pattern.`));const r=n[s](i&&Number.parseInt(i.slice(1)));return de(r)?ve(ut(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`)):r}))}function wl(e,{[$l]:t}){if(!t.has(e.toLowerCase()))return e;const n=D(e);e=e.slice(0,Math.max(0,e.length-n.length));let s,i=1;for(;t.has((s=e+ ++i+n).toLowerCase()););return s}const vl=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function Pl(e,t,n,s){const i="function"==typeof t?t(e.id):t[e.id];return i||(n?(s(ie,(r=e.id,o=e.variableName,{code:"MISSING_GLOBAL_NAME",id:r,message:`No name was provided for external module "${r}" in "output.globals" – guessing "${o}".`,names:[o],url:fe("configuration-options/#output-globals")})),e.variableName):void 0);var r,o}class Il{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.entryModules=[],this.exportMode="named",this.facadeModule=null,this.namespaceVariableName="",this.variableName="",this.accessedGlobalsByScope=new Map,this.dependencies=new Set,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.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)m.has(e)||(this.dynamicEntryModules.push(t),t.info.syntheticNamedExports&&(c.add(t),this.exports.add(t.namespace)));t.implicitlyLoadedAfter.size>0&&this.implicitEntryModules.push(t)}this.suggestedVariableName=Xt(this.generateVariableName())}static generateFacade(e,t,n,s,i,r,o,a,l,c,u,d,h,p,f){const m=new Il([],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 il?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 lr&&n.has(s.getBaseVariable())))return!1;return!0}finalizeChunk(e,t,n,s){const i=this.getRenderedChunkInfo(),r=e=>El(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)}}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=Ns(++s),49===e.charCodeAt(0)&&(s+=9*64**(e.length-1),e=Ns(s))}while(Kt.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=pl(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 e of t)if(e.preserveSignature)for(const t of e.getExportNamesByVariable().keys())this.chunkByModule.get(t.module)===this&&n.add(t);for(const s of t){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(Il.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=kl(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}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 ui(pe(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=N(i);else if(null===this.fileName){const[i,a]=o||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[n,"output.chunkFileNames"];e=Sl("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,a,{format:()=>r,hash:e=>t||(t=this.getPlaceholder(a,e||8)),name:()=>this.getChunkName()}),t||(e=wl(e,this.bundle))}else e=this.fileName;return t||(this.bundle[e]=Al),this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getPreliminarySourcemapFileName(){if(this.preliminarySourcemapFileName)return this.preliminarySourcemapFileName;let e=null,t=null;const{sourcemapFileNames:n,format:s}=this.outputOptions;if(!n)return null;{const[i,r]=[n,"output.sourcemapFileNames"];e=Sl("function"==typeof i?i(this.getPreRenderedChunkInfo()):i,r,{chunkhash:()=>this.getPreliminaryFileName().hashPlaceholder||"",format:()=>s,hash:e=>t||(t=this.getPlaceholder(r,e||8)),name:()=>this.getChunkName()}),t||(e=wl(e,this.bundle))}return this.preliminarySourcemapFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){return this.renderedChunkInfo?this.renderedChunkInfo:this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(Ol),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,Ol),importedBindings:Cl(this.getRenderedDependencies(),Ol),imports:Array.from(this.dependencies,Ol),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){return this.outputOptions.preserveModules&&e instanceof ar?"*":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=[];ml(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)}async render(){const{dependencies:e,exportMode:t,facadeModule:n,inputOptions:{onLog:s},outputOptions:i,pluginDriver:r,snippets:o}=this,{format:a,hoistTransitiveImports:l,preserveModules:c}=i;if(l&&!c&&null!==n)for(const t of e)t instanceof Il&&this.inlineChunkDependencies(t);const u=this.getPreliminaryFileName(),d=this.getPreliminarySourcemapFileName(),{accessedGlobals:h,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(u.fileName),b=[...this.getRenderedDependencies().values()],E="none"===t?[]:this.getChunkExportDeclarations(a);let x=E.length>0,$=!1;for(const e of b){const{reexports:t}=e;t?.length&&(x=!0,!$&&t.some((e=>"default"===e.reexported))&&($=!0),"es"===a&&(e.reexports=t.filter((({reexported:e})=>!E.find((({exported:t})=>t===e))))))}if(!$)for(const{exported:e}of E)if("default"===e){$=!0;break}const{intro:A,outro:S,banner:w,footer:v}=await async function(e,t,n){try{let[s,i,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(n),[n],al),t.hookReduceValue("footer",e.footer(n),[n],al),t.hookReduceValue("intro",e.intro(n),[n],ll),t.hookReduceValue("outro",e.outro(n),[n],ll)]);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 ve((s=e.message,{code:"ADDON_ERROR",message:`Could not retrieve "${e.hook}". Check configuration of plugin "${e.plugin}".\n\tError Message: ${s}`}))}var s}(i,r,this.getRenderedChunkInfo());if(Rr[a](m,{accessedGlobals:h,dependencies:b,exports:E,hasDefaultExport:$,hasExports:x,id:u.fileName,indent:p,intro:A,isEntryFacade:c||null!==n&&n.info.isEntry,isModuleFacade:null!==n,log:s,namedExportsMode:"default"!==t,outro:S,snippets:o,usesTopLevelAwait:y},i),w&&f.prepend(w),"es"===a||"cjs"===a){const e=null!==n&&n.info.isEntry&&n.shebang;e&&f.prepend(`#!${e}\n`)}return v&&f.append(v),{chunk:this,magicString:f,preliminaryFileName:u,preliminarySourcemapFileName:d,usedModules:g}}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):kl(n)))}checkCircularDependencyImport(e,t){const n=e.module;if(n instanceof il){const l=this.chunkByModule.get(n);let c;do{if(c=t.alternativeReexportModules.get(e),c){this.chunkByModule.get(c)!==l&&this.inputOptions.onLog(ie,(s=n.getExportNamesByVariable().get(e)?.[0]||"*",i=n.id,r=c.id,o=t.id,a=this.outputOptions.preserveModules,{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:i,id:o,message:`Export "${s}" of module "${ue(i)}" was reexported through module "${ue(r)}" 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 "${ue(o)}" to point directly to the exporting module or ${a?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:r})),t=c}}while(c)}var s,i,r,o,a}ensureReexportsAreAvailableForModule(e){const t=[],n=e.getExportNamesByVariable();for(const s of n.keys()){const n=s instanceof lr,i=n?s.getBaseVariable():s;if(this.checkCircularDependencyImport(i,e),!(i instanceof ar&&this.outputOptions.preserveModules)){const e=i.module;if(e instanceof il){const s=this.chunkByModule.get(e);s&&s!==this&&(s.exports.add(i),t.push(i),n&&this.imports.add(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?kl(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 lr)){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 vs){for(const e of s.declarations)if(e.parent instanceof ri||e instanceof oi&&e.declaration instanceof ri){r=!0;break}}else s instanceof lr&&(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 nn){const a=this.externalChunkByModule.get(o);s.add(a),e&&("default"===t.name?Ei[n(o.id)]&&i.add(a):t.isNamespace&&$i[n(o.id)]&&(this.imports.has(t)||!this.exportNamesByVariable.get(t)?.every((e=>e.startsWith("*"))))&&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 Il||e instanceof cr)))}getDynamicImportStringAndAttributes(e,t){if(e instanceof nn){const n=this.externalChunkByModule.get(e);return[`'${n.getImportPath(t)}'`,n.getImportAttributes(this.snippets)]}return[e||"","es"===this.outputOptions.format&&this.outputOptions.externalImportAttributes||null]}getFallbackChunkName(){return this.manualChunkAlias?this.manualChunkAlias:this.dynamicName?this.dynamicName:this.fileName?ce(this.fileName):ce(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;if(s instanceof nn){if(i=this.externalChunkByModule.get(s),r=n.name,"default"!==r&&"*"!==r&&"defaultOnly"===e(s.id))return ve(lt(s.id,r,!1))}else i=this.chunkByModule.get(s),r=i.getVariableExportName(n);pt(t,i,mt).push({imported:r,local:n.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports)return this.includedDynamicImports;const e=[];for(const t of this.orderedModules)for(const{node:n,resolution:s}of t.dynamicImports)n.included&&e.push(s instanceof il?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:n,resolution:s}:s instanceof nn?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:n,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:n,resolution:s});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(),facadeModuleId:t&&t.id,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=Nl(e);if(t)return t;const{preserveModulesRoot:n,sanitizeFileName:s}=this.outputOptions,i=s(k(e.id.split(Dl,1)[0])),r=D(i),o=vl.has(r)?i.slice(0,-r.length):i;return P(o)?n&&R(o).startsWith(n)?o.slice(n.length).replace(/^[/\\]/,""):"/"!==this.inputBase||o.startsWith("/")?O(this.inputBase,o):O(this.inputBase,o.replace(/^[a-zA-Z]:[/\\]/,"/")):this.outputOptions.virtualDirname.replace(/\/$/,"")+"/"+N(o)}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions,n=new Map;for(let s of this.getExportNames()){let i,r,o=!1;if("*"===s[0]){const n=s.slice(1);"defaultOnly"===t(n)&&this.inputOptions.onLog(ie,ct(n)),o=e,i=this.externalChunkByModule.get(this.modulesById.get(n)),r=s="*"}else{const n=this.exportsByName.get(s);if(n instanceof lr)continue;const a=n.module;if(a instanceof il){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 ve(lt(a.id,r,!0));o=e&&("default"!==r||xi(t(a.id),!0))}}pt(n,i,mt).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();for(const i of this.dependencies){const r=e.get(i)||null,o=t.get(i)||null,a=i instanceof cr||"default"!==i.exportMode,l=i.getImportPath(s);n.set(i,{attributes:i instanceof cr?i.getImportAttributes(this.snippets):null,defaultVariableName:i.defaultVariableName,globalName:i instanceof cr&&("umd"===this.outputOptions.format||"iife"===this.outputOptions.format)&&Pl(i,this.outputOptions.globals,null!==(r||o),this.inputOptions.onLog),importPath:l,imports:r,isChunk:i instanceof Il,name:i.variableName,namedExportsMode:a,namespaceVariableName:i.namespaceVariableName,reexports:o})}return this.renderedDependencies=n}inlineChunkDependencies(e){for(const t of e.dependencies)this.dependencies.has(t)||(this.dependencies.add(t),t instanceof Il&&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}}=l,{_:g,cnst:y,n:E}=d;this.setDynamicImportResolutions(e),this.setImportMetaResolutions(e),this.setIdentifierRenderResolutions();const $=new x({separator:`${E}${E}`}),A=function(e,t){if(!0!==t.indent)return t.indent;for(const t of e){const e=fl(t.originalCode);if(null!==e)return e}return"\t"}(a,l),S=[];let w="";const v=new Set,P=new Map,I={accessedDocumentCurrentScript:!1,exportNamesByVariable:s,format:p,freeze:f,indent:A,pluginDriver:c,snippets:d,symbols:m,useOriginalName:null};let k=!1;for(const e of a){let n,s=0;if(e.isIncluded()||i.has(e)){const r=e.render(I);!I.accessedDocumentCurrentScript&&Ki.includes(p)&&this.accessedGlobalsByScope.get(e.scope)?.delete(bi),I.accessedDocumentCurrentScript=!1,({source:n}=r),k||=r.usesTopLevelAwait,s=n.length(),s&&(h&&n.lastLine().includes("//")&&n.append("\n"),P.set(e,n),$.addSource(n),S.push(e));const o=e.namespace;if(i.has(e)){const e=o.renderBlock(I);o.renderFirst()?w+=E+e:$.addSource(new b(e))}const a=t.get(e.scope);if(a)for(const e of a)v.add(e)}const{renderedExports:r,removedExports:o}=e.getRenderedExports();u[e.id]={get code(){return n?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:s}}w&&$.prepend(w+E+E),this.needsExportsShim&&$.prepend(`${E}${y} ${wr}${g}=${g}void 0;${E}${E}`);const N=h?$:$.trim();var C;return o&&0===this.getExportNames().length&&0===n.size&&r(ie,{code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${C=this.getChunkName()}".`,names:[C]}),{accessedGlobals:v,indent:A,magicString:$,renderedSource:N,usedModules:S,usesTopLevelAwait:k}}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,c,n,i,s,t,`'${(a||o).getImportPath(e)}'`,!a?.strictFacade&&o.exportNamesByVariable.get(c.namespace)[0],null)}else{const{node:o,resolution:a}=r,[l,c]=this.getDynamicImportStringAndAttributes(a,e);o.setExternalResolution("external",a,n,i,s,t,l,!1,c)}}setIdentifierRenderResolutions(){const{format:e,generatedCode:{symbols:t},interop:n,preserveModules:s,externalLiveBindings:i}=this.outputOptions,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 lr?r.add(n):n.setRenderNames(null,null)}for(const e of this.orderedModules)if(e.needsExportShim){this.needsExportsShim=!0;break}const o=new Set(["Object","Promise"]);switch(this.needsExportsShim&&o.add(wr),t&&o.add("Symbol"),e){case"system":o.add("module").add("exports");break;case"es":break;case"cjs":o.add("module").add("require").add("__filename").add("__dirname");default:o.add("exports");for(const e of Bi)o.add(e)}ul(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)){const n=e.namespace.getMemberVariables();for(const e of Object.values(n))e.included&&t.add(e)}for(let n of t){n instanceof or&&(n=n.getOriginalVariable()),n instanceof lr&&(n=n.getBaseVariable());const t=this.chunkByModule.get(n.module);t!==this&&(this.imports.add(n),n.module instanceof il&&(this.checkCircularDependencyImport(n,e),n instanceof ar&&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:t,resolution:n}of e.dynamicImports)t.included&&n instanceof il&&this.chunkByModule.get(n)===this&&!this.includedNamespaces.has(n)&&(this.includedNamespaces.add(n),this.ensureReexportsAreAvailableForModule(n))}}function kl(e){return Nl(e)??ce(e.id)}function Nl(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function Cl(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 Dl=/[#?]/,Ol=e=>e.getFileName();function*Rl(e){for(const t of e)yield*t}function Ml(e,t,n,s){const{chunkDefinitions:i,modulesInManualChunks:r}=function(e){const t=[],n=new Set(e.keys()),s=Object.create(null);for(const[t,i]of e)_l(t,s[i]||=[],n);for(const[e,n]of Object.entries(s))t.push({alias:e,modules:n});return{chunkDefinitions:t,modulesInManualChunks:n}}(t),{allEntries:o,dependentEntriesByModule:a,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=function(e){const t=new Set,n=new Map,s=[],i=new Set(e);let r=0;for(const e of i){const o=new Set;s.push(o);const a=new Set([e]);for(const e of a){pt(n,e,ft).add(r);for(const t of e.getDependenciesToBeIncluded())t instanceof nn||a.add(t);for(const{resolution:n}of e.dynamicImports)n instanceof il&&n.includedDynamicImporters.length>0&&!i.has(n)&&(t.add(n),i.add(n),o.add(n));for(const n of e.implicitlyLoadedBefore)i.has(n)||(t.add(n),i.add(n))}r++}const o=[...i],{dynamicEntries:a,dynamicImportsByEntry:l}=function(e,t,n){const s=new Map,i=new Set;for(const[n,r]of e.entries())s.set(r,n),t.has(r)&&i.add(n);const r=[];for(const e of n){const t=new Set;for(const n of e)t.add(s.get(n));r.push(t)}return{dynamicEntries:i,dynamicImportsByEntry:r}}(o,t,s);return{allEntries:o,dependentEntriesByModule:n,dynamicallyDependentEntriesByDynamicEntry:Ll(n,a,o),dynamicImportsByEntry:l}}(e),u=function(e){const t=Object.create(null);for(const{dependentEntries:n,modules:s}of e){let e=0n;for(const t of n)e|=1n<<BigInt(t);(t[String(e)]||={dependentEntries:new Set(n),modules:[]}).modules.push(...s)}return Object.values(t)}(function*(e,t){for(const[n,s]of e)t.has(n)||(yield{dependentEntries:s,modules:[n]})}(a,r)),d=function(e,t){const n=e.map((()=>0n));let s=1n;for(const{dependentEntries:e}of t){for(const t of e)n[t]|=s;s<<=1n}return n}(o,u),h=function(e,t,n,s){const i=s.map(((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])pt(t,e,ft).add(s)}}return i}(d,l,c,o);!function(e,t){let n=1n;for(const{dependentEntries:s}of e){for(const e of s)(t[e]&n)===n&&s.delete(e);n<<=1n}}(u,h);const{chunks:p,sideEffectAtoms:f,sizeByAtom:m}=function(e,t,n,s){const i=Object.create(null),r=new Map,o=[];let a=0n,l=1n;for(const{dependentEntries:c,modules:u}of e){let e=0n,d=-1n;for(const s of c)e|=1n<<BigInt(s),d&=t[s]|n[s];const h=i[String(e)]||={containedAtoms:0n,correlatedAtoms:d,dependencies:new Set,dependentChunks:new Set,dependentEntries:new Set(c),modules:[],pure:!0,size:0};let p=0,f=!0;for(const e of u)r.set(e,h),e.isIncluded()&&(f&&=!e.hasEffects(),p+=s>1?e.estimateSize():1);f||(a|=l),o.push(p),h.containedAtoms|=l,h.modules.push(...u),h.pure&&=f,h.size+=p,l<<=1n}const c=Object.values(i);return a|=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 nn){if(o.info.moduleSideEffects){const e=pt(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}(c,r,l),{chunks:c,sideEffectAtoms:a,sizeByAtom:o}}(u,d,h,n);return i.push(...function(e,t,n,s,i){Xa("optimize chunks",3);const r=function(e,t){const n=[],s=[];for(const i of e)(i.size<t?n:s).push(i);if(0===n.length)return null;return n.sort(Bl),s.sort(Bl),{big:new Set(s),small:new Set(n)}}(e,t);if(!r)return Za("optimize chunks",3),e;t>1&&i("info",tt(e.length,r.small.size,"Initially"));(function(e,t,n,s){const{small:i}=e;for(const r of i){const o=Tl(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),Fl(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),Fl(o,t,e).add(o)}}})(r,t,n,s),t>1&&i("info",tt(r.small.size+r.big.size,r.small.size,"After merging chunks"));return Za("optimize chunks",3),[...r.small,...r.big]}(p,n,f,m,s).map((({modules:e})=>({alias:null,modules:e})))),i}function _l(e,t,n){const s=new Set([e]);for(const e of s){n.add(e),t.push(e);for(const t of e.dependencies)t instanceof nn||n.has(t)||s.add(t)}}function Ll(e,t,n){const s=new Map;for(const i of t){const t=pt(s,i,ft),r=n[i];for(const n of Rl([r.includedDynamicImporters,r.implicitlyLoadedAfter]))for(const s of e.get(n))t.add(s)}return s}function Bl({size:e},{size:t}){return e-t}function Tl(e,{big:t,small:n},s,i,r){let o=null;for(const a of Rl([n,t])){if(e===a)continue;const t=zl(e,a,r,s,i);if(t<r){if(o=a,0===t)break;r=t}}return o}function zl(e,t,n,s,i){const r=Vl(e,t,n,s,i);return r<n?r+Vl(t,e,n-r,s,i):1/0}function Vl(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 Fl(e,t,n){return e.size<t?n.small:n.big}const jl=(e,t)=>e.execIndex>t.execIndex?1:-1;function Ul(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}const Gl=(e,t)=>t?`(${e})`:e;class Wl{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 ql{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 ve(at(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,o=s[e];if(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 Hl(e){return function(t,n){return n.missing?(e(ie,(s=n.plugin,{code:Be,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:fe("troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect")})),new ql({mappings:[],names:[]},[t])):new ql(n,[t]);var s}}function Kl(e,t,n,s,i){let r;if(n){const t=n.sources,s=n.sourcesContent||[],i=C(e)||".",o=n.sourceRoot||".",a=t.map(((e,t)=>new Wl(R(i,o,e),s[t])));r=new ql(n,a)}else r=new Wl(e,t);return s.reduce(i,r)}let Yl;const Jl=e=>function(e){let t,n;try{const r=Lr.__wbindgen_add_to_stack_pointer(-16);Lr.xxhashBase64Url(r,Wr(e));var s=Jr().getInt32(r+0,!0),i=Jr().getInt32(r+4,!0);return t=s,n=i,Gr(s,i)}finally{Lr.__wbindgen_add_to_stack_pointer(16),Lr.__wbindgen_export_2(t,n,1)}}(Zl(e)),Xl={base36:e=>function(e){let t,n;try{const r=Lr.__wbindgen_add_to_stack_pointer(-16);Lr.xxhashBase36(r,Wr(e));var s=Jr().getInt32(r+0,!0),i=Jr().getInt32(r+4,!0);return t=s,n=i,Gr(s,i)}finally{Lr.__wbindgen_add_to_stack_pointer(16),Lr.__wbindgen_export_2(t,n,1)}}(Zl(e)),base64:Jl,hex:e=>function(e){let t,n;try{const r=Lr.__wbindgen_add_to_stack_pointer(-16);Lr.xxhashBase16(r,Wr(e));var s=Jr().getInt32(r+0,!0),i=Jr().getInt32(r+4,!0);return t=s,n=i,Gr(s,i)}finally{Lr.__wbindgen_add_to_stack_pointer(16),Lr.__wbindgen_export_2(t,n,1)}}(Zl(e))};function Zl(e){return"string"==typeof e?"undefined"==typeof Buffer?(Yl??=new TextEncoder,Yl.encode(e)):Buffer.from(e):e}let Ql="sourceMa";async function ec(e,t,n,s,i){Xa("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())));Za("render chunks",2),Xa("transform chunks",2);const o=Xl[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 tc(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(bl,(e=>t.has(e)?(n.add(e),`${gl}${"0".repeat(e.length-5)}${yl}`):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=xl(s,n,u)}while(i[$l].has(c.toLowerCase()));i[c]=Al,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=El(o,t);const u=El(a,t);let d=null;c&&(d=l?El(l,t):`${u}.map`,c.file=El(c.file,t),e+=nc(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?El(o,t):o,u=null;c&&(u=l?El(l,t):`${a}.map`,s+=nc(u,c,i,r)),n[a]=e.finalizeChunk(s,c,u,t)}}(h,p,t,u,n,s),Za("transform chunks",2)}async function tc(e,t,n,s,i,r,o){let a=null;const l=[];let u=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=Ba(t.map);l.push(e||{missing:!0,plugin:n.name})}return t.code}));const{compact:d,dir:h,file:p,sourcemap:f,sourcemapExcludeSources:m,sourcemapFile:g,sourcemapPathTransform:y,sourcemapIgnoreList:b}=i;if(d||"\n"===u[u.length-1]||(u+="\n"),f){let s;Xa("sourcemaps",3),s=p?R(g||p):h?R(h,t):R(t);a=function(e,t,n,s,i,r){const o=Hl(r),a=n.filter((e=>!e.excludeFromSourcemap)).map((e=>Kl(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,o))),l=new ql(t,a),u=s.reduce(o,l);let{sources:d,sourcesContent:h,names:p,mappings:f}=u.traceMappings();if(e){const t=C(e);d=d.map((e=>O(t,e))),e=N(e)}h=i?null:h;for(const e of n)La(e.originalSourcemap,e.sourcemapChain);return new c({file:e,mappings:f,names:p,sources:d,sourcesContent:h})}(s,e.generateDecodedMap({}),n,l,m,o);for(let e=0;e<a.sources.length;++e){let t=a.sources[e];const n=`${s}.map`,i=b(t,n);"boolean"!=typeof i&&ve(ut("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)),y&&(t=y(t,n),"string"!=typeof t&&ve(ut("sourcemapPathTransform function must return a string."))),a.sources[e]=k(t)}Za("sourcemaps",3)}return{code:u,map:a}}function nc(e,t,n,{sourcemap:s,sourcemapBaseUrl:i}){let r;if("inline"===s)r=t.toUrl();else{const s=N(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`}Ql+="ppingURL";class sc{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){Xa("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===$l?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{Xa("initialize render",2),await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]),Za("initialize render",2),Xa("generate chunks",2);const e=(()=>{let e=0;return(t,n)=>{if(n>22)return ve(ut(`Hashes cannot be longer than 22 characters, received ${n}. Check the "${t}" option.`));const s=`${gl}${Ns(++e).padStart(n-5,"0")}${yl}`;return s.length>n?ve(ut(`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&&function(e,t){if("umd"===e.format||"iife"===e.format)return ve(Ze("output.format",Ee,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if("string"==typeof e.file)return ve(Ze("output.file",ye,'when building multiple chunks, the "output.dir" option must be used, not "output.file". To inline dynamic imports, set the "inlineDynamicImports" option'));if(e.sourcemapFile)return ve(Ze("output.sourcemapFile",we,'"output.sourcemapFile" is only supported for single-file builds'));!e.amd.autoId&&e.amd.id&&t(ie,Ze("output.amd.id",ge,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}(this.outputOptions,this.inputOptions.onLog),this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t)e.generateExports();Za("generate chunks",2),await ec(t,n,this.pluginDriver,this.outputOptions,this.inputOptions.onLog)}catch(e){throw await this.pluginDriver.hookParallel("renderError",[e]),e}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),Xa("generate bundle",2),await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,n,e]),this.finaliseAssets(n),Za("generate bundle",2),Za("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)ic(e,n,t);return t}assignManualChunks(e){const t=[],n={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values())if(s instanceof il){const i=e(s.id,n);"string"==typeof i&&t.push([i,s])}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,n]of t)ic(e,n,s);return s}finaliseAssets(e){if(this.outputOptions.validate)for(const t of Object.values(e))if("code"in t)try{za(t.code)}catch(e){this.inputOptions.onLog(ie,je(t,e))}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:n,inlineDynamicImports:s,manualChunks:i,preserveModules:r}=this.outputOptions,o="object"==typeof i?await this.addManualChunks(i):this.assignManualChunks(i),a=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=>Zt.test(e):e=>!Kt.has(e)&&Zt.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`${Gl(`${r}${Gl(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=en(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),l=function(e){const t=[];for(const n of e.values())n instanceof il&&(n.isIncluded()||n.info.isEntry||n.includedDynamicImporters.length>0)&&t.push(n);return t}(this.graph.modulesById),c=function(e){if(0===e.length)return"/";if(1===e.length)return C(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)&&P(s.id)&&n.push(s.id);return n}(l,r)),u=function(e,t,n){const s=new Map;for(const i of e.values())i instanceof nn&&s.set(i,new cr(i,t,n));return s}(this.graph.modulesById,this.outputOptions,c),d=[],h=new Map;for(const{alias:i,modules:p}of s?[{alias:null,modules:l}]:r?l.map((e=>({alias:null,modules:[e]}))):Ml(this.graph.entryModules,o,n,this.inputOptions.onLog)){p.sort(jl);const n=new Il(p,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,h,u,this.facadeChunkByModule,this.includedNamespaces,i,t,e,c,a);d.push(n)}for(const e of d)e.link();const p=[];for(const e of d)p.push(...e.generateFacades());return[...d,...p]}}function ic(e,t,n){const s=n.get(t);if("string"==typeof s&&s!==e)return ve((i=t.id,r=e,o=s,{code:"INVALID_CHUNK",message:`Cannot assign "${ue(i)}" to the "${r}" chunk as it is already in the "${o}" chunk.`}));var i,r,o;n.set(t,e)}class rc extends Ds{constructor(){super(),this.parent=null,this.variables.set("undefined",new rr)}findVariable(e){let t=this.variables.get(e);return t||(t=new ws(e),this.variables.set(e,t)),t}}const oc=e=>()=>ve(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:fe("plugin-development/#a-simple-example")}}(e)),ac=oc("fs.mkdir"),lc=oc("fs.readFile"),cc=oc("fs.writeFile");async function uc(e,t,n,s,i,r,o,a,l){const c=await function(e,t,n,s,i,r,o,a){let l=null,c=null;if(i){l=new Set;for(const n of i)e===n.source&&t===n.importer&&l.add(n.plugin);c=(e,t)=>({...e,resolve:(e,n,{attributes:r,custom:o,isEntry:a,skipSelf:l}=K)=>(l??=!0,s(e,n,o,a,r||Y,l?[...i,{importer:n,plugin:t,source:e}]:i))})}return n.hookFirstAndGetPlugin("resolveId",[e,t,{attributes:a,custom:r,isEntry:o}],c,l)}(e,t,s,i,r,o,a,l);return null==c?oc("path.resolve")():c[0]}const dc="at position ",hc="at output position ";const pc={delete:()=>!1,get(){},has:()=>!1,set(){}};function fc(e){return e.startsWith(dc)||e.startsWith(hc)?ve({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}):ve({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 mc=(e,t,n=Ec)=>{const{onwarn:s,onLog:i}=e,r=gc(n,s);if(i){const e=ae[t];return(t,n)=>i(t,yc(n),((t,n)=>{if("error"===t)return ve(bc(n));ae[t]>=e&&r(t,bc(n))}))}return r},gc=(e,t)=>t?(n,s)=>{n===ie?t(yc(s),(t=>e(ie,bc(t)))):e(n,s)}:e,yc=e=>(Object.defineProperty(e,"toString",{value:()=>e.message,writable:!0}),e),bc=e=>"string"==typeof e?{message:e}:"function"==typeof e?bc(e()):e,Ec=(e,{message:t})=>{switch(e){case ie:return console.warn(t);case oe:return console.debug(t);default:return console.info(t)}};function xc(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(ie,function(e,t,n){return{code:"UNKNOWN_OPTION",message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${n.join(", ")}`}}(n,o,[...r].sort()))}const $c={recommended:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:J,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!1},safest:{annotations:!0,correctVarValueBeforeDeclaration:!0,manualPureFunctions:J,moduleSideEffects:()=>!0,propertyReadSideEffects:!0,tryCatchDeoptimization:!0,unknownGlobalSideEffects:!0},smallest:{annotations:!0,correctVarValueBeforeDeclaration:!1,manualPureFunctions:J,moduleSideEffects:()=>!1,propertyReadSideEffects:!1,tryCatchDeoptimization:!1,unknownGlobalSideEffects:!1}},Ac={es2015:{arrowFunctions:!0,constBindings:!0,objectShorthand:!0,reservedNamesAsProps:!0,symbols:!0},es5:{arrowFunctions:!1,constBindings:!1,objectShorthand:!1,reservedNamesAsProps:!0,symbols:!1}},Sc=(e,t,n,s,i)=>{const r=e?.preset;if(r){const i=t[r];if(i)return{...i,...e};ve(Ze(`${n}.preset`,s,`valid values are ${le(Object.keys(t))}`,r))}return((e,t,n,s)=>i=>{if("string"==typeof i){const r=e[i];if(r)return r;ve(Ze(t,n,`valid values are ${s}${le(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)},wc=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);async function vc(e,t,n,s){const i=t.id,r=[];let o=null===e.map?null:Ba(e.map);const a=e.code;let l=e.ast;const u=[],d=[];let h=!1;const p=()=>h=!0;let f="",m=e.code;const g=e=>(t,n)=>{t=bc(t),n&&Ie(t,n,m,i),t.id=i,t.hook="transform",e(t)};let y;try{y=await n.hookReduceArg0("transform",[m,i],(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(ie,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;({code:o,map:a,ast:l}=n)}return null!==a&&r.push(Ba("string"==typeof a?JSON.parse(a):a)||{missing:!0,plugin:i.name}),m=o,o}),((e,t)=>{return f=t.name,{...e,addWatchFile(t){u.push(t),e.addWatchFile(t)},cache:h?e.cache:(l=e.cache,y=p,{delete:e=>(y(),l.delete(e)),get:e=>(y(),l.get(e)),has:e=>(y(),l.has(e)),set:(e,t)=>(y(),l.set(e,t))}),debug:g(e.debug),emitFile:e=>(d.push(e),n.emitFile(e)),error:(t,n)=>("string"==typeof t&&(t={message:t}),n&&Ie(t,n,m,i),t.id=i,t.hook="transform",e.error(t)),getCombinedSourcemap(){const e=function(e,t,n,s,i){return 0===s.length?n:Ba({version:3,...Kl(e,t,n,s,Hl(i)).traceMappings()})}(i,a,o,r,s);if(!e){return new b(a).generateMap({hires:!0,includeContent:!0,source:i})}return o!==e&&(o=e,r.length=0),new c({...e,file:null,sourcesContent:e.sourcesContent})},info:g(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:g(e.warn)};var l,y}))}catch(e){return ve(ot(e,f,{hook:"transform",id:i}))}return!h&&d.length>0&&(t.transformFiles=d),{ast:l,code:y,customTransformCache:h,originalCode:a,originalSourcemap:o,sourcemapChain:r,transformDependencies:u}}const Pc="resolveDependencies";class Ic{constructor(e,t,n,s){this.graph=e,this.modulesById=t,this.options=n,this.pluginDriver=s,this.implicitEntryModules=new Set,this.indexedEntryModules=[],this.latestLoadModulesPromise=Promise.resolve(),this.moduleLoadPromises=new Map,this.modulesWithLoadedDependencies=new Set,this.nextChunkNamePriority=0,this.nextEntryModuleIndex=0,this.resolveId=async(e,t,n,s,i,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(!this.options.external(e,t,!1)&&await uc(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,n,"boolean"==typeof s?s:!t,i),t,e),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=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const i=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,!0,t,null)))).then((i=>{for(const[r,o]of i.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t,Nc(o,e[r],t,s+r);const i=this.indexedEntryModules.find((e=>e.module===o));i?i.index=Math.min(i.index,n+r):this.indexedEntryModules.push({index:n+r,module:o})}return this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1)),i})));return await this.awaitLoadModulesPromise(),{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:i}}async emitChunk({fileName:e,id:t,importer:n,name:s,implicitlyLoadedAfterOneOf:i,preserveSignature:r}){const o={fileName:e||null,id:t,importer:n,name:s||null},a=i?await this.addEntryWithImplicitDependants(o,i):(await this.addEntryModules([o],!1)).newEntryModules[0];return null!=r&&(a.preserveSignature=r),a}async preloadModule(e){return(await this.fetchModule(this.getResolvedIdWithDefaults(e,Y),void 0,!1,!e.resolveDependencies||Pc)).info}addEntryWithImplicitDependants(e,t){const n=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,!1,e.importer,null).then((async s=>{if(Nc(s,e,!1,n),!s.info.isEntry){const n=await Promise.all(t.map((t=>this.loadEntryModule(t,!1,e.importer,s.id))));if(!s.info.isEntry){this.implicitEntryModules.add(s);for(const e of n)s.implicitlyLoadedAfter.add(e);for(const e of s.implicitlyLoadedAfter)e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,n){let s;try{s=await this.graph.fileOperationQueue.run((async()=>{const t=await this.pluginDriver.hookFirst("load",[e]);return null!==t?t:(this.graph.watchFiles[e]=!0,await lc(e,"utf8"))}))}catch(n){let s=`Could not load ${e}`;throw t&&(s+=` (imported by ${ue(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:ve(function(e){return{code:"BAD_LOADER",message:`Error loading "${ue(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}(e)),r=i.code;65279===r.charCodeAt(0)&&(i.code=r.slice(1));const o=this.graph.cachedModules.get(e);if(!o||o.customTransformCache||o.originalCode!==i.code||await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:o.ast,code:o.code,id:o.id,meta:o.meta,moduleSideEffects:o.moduleSideEffects,resolvedSources:o.resolvedIds,syntheticNamedExports:o.syntheticNamedExports}]))n.updateOptions(i),await n.setSource(await vc(i,n,this.pluginDriver,this.options.onLog));else{if(o.transformFiles)for(const e of o.transformFiles)this.pluginDriver.emitFile(e);await n.setSource(o)}}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([t,n])=>null===n?null:"string"==typeof n?(t.resolution=n,null):t.resolution=await this.fetchResolvedDependency(ue(n.id),e.id,n))))));for(const t of n)t&&(e.dynamicDependencies.add(t),t.dynamicImporters.push(e.id))}async fetchModule({attributes:e,id:t,meta:n,moduleSideEffects:s,syntheticNamedExports:i},r,o,a){const l=this.modulesById.get(t);if(l instanceof il)return r&&Ua(e,l.info.attributes)&&this.options.onLog(ie,qe(l.info.attributes,e,t,r)),await this.handleExistingModule(l,o,a),l;if(l instanceof nn)return ve({code:"EXTERNAL_MODULES_CANNOT_BE_TRANSFORMED_TO_MODULES",message:`${l.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 c=new il(this.graph,t,this.options,o,s,i,n,e);this.modulesById.set(t,c);const u=this.addModuleSource(t,r,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),d])),d=Dc(u).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));d.catch((()=>{})),this.moduleLoadPromises.set(c,u);const h=await u;return a?a===Pc&&await d:await this.fetchModuleDependencies(c,...h),c}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,moduleSideEffects:o,meta:a}=n;let l=this.modulesById.get(r);if(l){if(!(l instanceof nn))return ve(function(e,t){return{code:"INVALID_EXTERNAL_ID",message:`"${e}" is imported as an external by "${ue(t)}", but is already an existing non-external module id.`}}(e,t));Ua(l.info.attributes,s)&&this.options.onLog(ie,qe(l.info.attributes,s,e,t))}else l=new nn(this.options,r,o,a,"absolute"!==i&&P(r),s),this.modulesById.set(r,l);return Promise.resolve(l)}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])=>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 il&&(t.importedFromNotTreeshaken=!0)}getNormalizedResolvedIdWithoutDefaults(e,t,n){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if("object"==typeof e){const i=e.external||this.options.external(e.id,t,!0);return{...e,external:i&&("relative"===i||!P(e.id)||!0===i&&Cc(e.id,n,s)||"absolute")}}const i=this.options.external(e,t,!0);return{external:i&&(Cc(e,n,s)||"absolute"),id:i&&s?kc(e,t):e}}const i=s?kc(n,t):n;return!1===e||this.options.external(i,t,!0)?{external:Cc(i,n,s)||"absolute",id:i}:null}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const n=await this.resolveDynamicImport(e,t.argument,e.id,Fa(t.node));return n&&"object"==typeof n&&(t.id=n.id),[t,n]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAttributes,(async([t,n])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,Y,!1,n),t,e.id,n)]))}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===Pc?Dc(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?I(t)?ve(function(e,t){return{code:Ve,exporter:e,id:t,message:`Could not resolve "${e}" from "${ue(t)}"`}}(t,n)):(this.options.onLog(ie,function(e,t){return{code:Ve,exporter:e,id:t,message:`"${e}" is imported by "${ue(t)}", but could not be resolved – treating it as an external dependency.`,url:fe("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(ie,function(e,t){return{code:"EXTERNAL_SYNTHETIC_EXPORTS",exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${ue(t)}").`}}(t,n)),e)}async loadEntryModule(e,t,n,s,i=!1){const r=await uc(e,n,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Y,!0,Y);if(null==r)return ve(null===s?function(e){return{code:ze,message:`Could not resolve entry module "${ue(e)}".`}}(e):function(e,t){return{code:Me,message:`Module "${ue(e)}" that should be implicitly loaded before "${ue(t)}" could not be resolved.`}}(e,s));const o="object"==typeof r&&r.external;return!1===r||o?ve(null===s?o&&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:ze,message:`Entry module "${ue(e)}" cannot be external.`}}(e):function(e,t){return{code:Me,message:`Module "${ue(e)}" that should be implicitly loaded before "${ue(t)}" cannot be external.`}}(e,s)):this.fetchModule(this.getResolvedIdWithDefaults("object"==typeof r?r:{id:r},Y),void 0,t,!1)}async resolveDynamicImport(e,t,n,s){const i=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,n,{attributes:s}]);if("string"!=typeof t)return"string"==typeof i?i:i?this.getResolvedIdWithDefaults(i,s):null;if(null==i){const i=e.resolvedIds[t];return i?(Ua(i.attributes,s)&&this.options.onLog(ie,qe(i.attributes,s,t,n)),i):e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,Y,!1,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(i,n,t),s),t,n,s)}}function kc(e,t){return I(e)?t?R(t,"..",e):R(e):e}function Nc(e,{fileName:t,name:n},s,i){if(null!==t)e.chunkFileNames.add(t);else if(null!==n){let t=0;for(;e.chunkNames[t]?.priority<i;)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:n,priority:i})}}function Cc(e,t,n){return!0===n||"ifRelativeSource"===n&&I(t)||!P(e)}async function Dc(e){const[t,n]=await e;return Promise.all([...t,...n])}function Oc(e,t,n,s,i,r){const o=i.sanitizeFileName(e||"asset");return wl(Sl("function"==typeof i.assetFileNames?i.assetFileNames({name:e,originalFileName:n,source:t,type:"asset"}):i.assetFileNames,"output.assetFileNames",{ext:()=>D(o).slice(1),extname:()=>D(o),hash:e=>s.slice(0,Math.max(0,e||8)),name:()=>o.slice(0,Math.max(0,o.length-D(o).length))}),r)}function Rc(e,{bundle:t},n){t[$l].has(e.toLowerCase())?n(ie,function(e){return{code:"FILE_NAME_CONFLICT",message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}(e)):t[e]=Al}const Mc=new Set(["chunk","asset","prebuilt-chunk"]);function _c(e,t,n){if(!("string"==typeof e||e instanceof Uint8Array)){const e=t.fileName||t.name||n;return ve(ut(`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 Lc{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&&Mc.has(e.type))}(e)?"prebuilt-chunk"===e.type?this.emitPrebuiltChunk(e):function(e){const t=e.fileName||e.name;return!t||"string"==typeof t&&!de(t)}(e)?"chunk"===e.type?this.emitChunk(e):this.emitAsset(e):ve(ut(`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}".`)):ve(ut(`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 ve({code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t.name||e}" - no asset source set.`})},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():ve({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?ve({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):ve({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 ve({code:"ASSET_NOT_FOUND",message:`Plugin error - Unable to set the source for unknown asset "${e}".`});if("asset"!==n.type)return ve(ut(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`));if(void 0!==n.source)return ve({code:"ASSET_SOURCE_ALREADY_SET",message:`Unable to set the source for asset "${n.name||e}", source already set.`});const s=_c(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=Xl[t.hashCharacters],s=this.output={bundle:e,fileNamesBySource:new Map,getHash:n,outputOptions:t};for(const e of this.filesByReferenceId.values())e.fileName&&Rc(e.fileName,s,this.options.onLog);const i=new Map;for(const e of this.filesByReferenceId.values())if("asset"===e.type&&void 0!==e.source)if(e.fileName)this.finalizeAdditionalAsset(e,e.source,s);else{pt(i,n(e.source),(()=>[])).push(e)}else"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=Jl(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||[],facadeModuleId: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:_c(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&&Rc(n,t,this.options.onLog),void 0!==s&&this.finalizeAdditionalAsset(e,s,t)}emitChunk(e){if(this.graph.phase>Ma.LOAD_AND_PARSE)return ve({code:"INVALID_ROLLUP_PHASE",message:"Cannot emit chunks after module loading has finished."});if("string"!=typeof e.id)return ve(ut(`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 ve(ut(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`));if("string"!=typeof e.fileName||de(e.fileName))return ve(ut(`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,fileNamesBySource:s,getHash:i,outputOptions:r}){let{fileName:o,needsCodeReference:a,originalFileName:l,referenceId:c}=e;if(!o){const a=i(t);o=s.get(a),o||(o=Oc(e.name,t,l,a,r,n),s.set(a,o))}const u={...e,fileName:o,source:t};this.filesByReferenceId.set(c,u);const d=n[o];"asset"===d?.type?d.needsCodeReference&&=a:n[o]={fileName:o,name:e.name,needsCodeReference:a,originalFileName:l,source:t,type:"asset"}}finalizeAssetsWithSameSource(e,t,{bundle:n,fileNamesBySource:s,outputOptions:i}){let r,o="",a=!0;for(const s of e){a&&=s.needsCodeReference;const e=Oc(s.name,s.source,s.originalFileName,t,i,n);(!o||e.length<o.length||e.length===o.length&&e<o)&&(o=e,r=s)}s.set(t,o);for(const t of e){const e={...t,fileName:o};this.filesByReferenceId.set(t.referenceId,e)}n[o]={fileName:o,name:r.name,needsCodeReference:a,originalFileName:r.originalFileName,source:r.source,type:"asset"}}}function Bc(e,t,n,s,i){return ae[e]<ae[i]?rn:(i,r)=>{null!=r&&n(ie,{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=bc(i)).code&&!i.pluginCode&&(i.pluginCode=i.code),i.code=t,i.plugin=s,n(e,i)}}function Tc(e,t,s,i,r,o){const{logLevel:a,onLog:l}=i;let c,u=!0;if("string"!=typeof e.cacheKey&&(e.name.startsWith(dc)||e.name.startsWith(hc)||o.has(e.name)?u=!1:o.add(e.name)),t)if(u){const n=e.cacheKey||e.name;h=t[n]||(t[n]=Object.create(null)),c={delete:e=>delete h[e],get(e){const t=h[e];if(t)return t[0]=0,t[1]},has(e){const t=h[e];return!!t&&(t[0]=0,!0)},set(e,t){h[e]=[0,t]}}}else d=e.name,c={delete:()=>fc(d),get:()=>fc(d),has:()=>fc(d),set:()=>fc(d)};else c=pc;var d,h;return{addWatchFile(e){s.watchFiles[e]=!0},cache:c,debug:Bc(oe,"PLUGIN_LOG",l,e.name,a),emitFile:r.emitFile.bind(r),error:t=>ve(ot(bc(t),e.name)),getFileName:r.getFileName,getModuleIds:()=>s.modulesById.keys(),getModuleInfo:s.getModuleInfo,getWatchFiles:()=>Object.keys(s.watchFiles),info:Bc(re,"PLUGIN_LOG",l,e.name,a),load:e=>s.moduleLoader.preloadModule(e),meta:{rollupVersion:n,watchMode:s.watchMode},parse:za,resolve:(t,n,{attributes:i,custom:r,isEntry:o,skipSelf:a}=K)=>(a??=!0,s.moduleLoader.resolveId(t,n,r,o,i||Y,a?[{importer:n,plugin:e,source:t}]:null)),setAssetSource:r.setAssetSource,warn:Bc(ie,"PLUGIN_WARNING",l,e.name,a)}}const zc=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 Vc{constructor(e,t,n,s,i){this.graph=e,this.options=t,this.pluginCache=s,this.sortedPlugins=new Map,this.unfulfilledActions=new Set,this.fileEmitter=new Lc(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,Tc(n,s,e,t,this.fileEmitter,r)]))),i)for(const e of n)for(const n of zc)n in e&&t.onLog(ie,(o=e.name,{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${n}" hook used by the output plugin ${o} 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.`}));var o}createOutputPluginDriver(e){return new Vc(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,Uc))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(Gc)}getSortedPlugins(e,t){return pt(this.sortedPlugins,e,(()=>Fc(e,this.plugins,t)))}runHook(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));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),ve(ot(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 ve(ot(t,n.name,{hook:e}))}}}function Fc(e,t,n=jc){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 jc(e,t,n){"function"!=typeof e&&ve(function(e,t){return{code:Oe,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 Uc(e,t,n){if("string"!=typeof e&&"function"!=typeof e)return ve(function(e,t){return{code:Oe,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 Gc(){}class Wc{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 qc{constructor(e,t){if(this.options=e,this.astLru=function(e){var t,n,s,i=e;function r(e,r){++t>i&&(s=n,o(1),++t),n[e]=r}function o(e){t=0,n=Object.create(null),e||(s=Object.create(null))}return o(),{clear:o,has:function(e){return void 0!==n[e]||void 0!==s[e]},get:function(e){var t=n[e];return void 0!==t?t:void 0!==(t=s[e])?(r(e,t),t):void 0},set:function(e,t){void 0!==n[e]?n[e]=t:r(e,t)}}}(5),this.cachedModules=new Map,this.deoptimizationTracker=new vt,this.entryModules=[],this.modulesById=new Map,this.needsTreeshakingPass=!1,this.phase=Ma.LOAD_AND_PARSE,this.scope=new rc,this.watchFiles=Object.create(null),this.watchMode=!1,this.externalModules=[],this.implicitEntryModules=[],this.modules=[],this.getModuleInfo=e=>{const t=this.modulesById.get(e);return t?t.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]++}}if(t){this.watchMode=!0;const e=(...e)=>this.pluginDriver.hookParallel("watchChange",e),n=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",e),t.onCurrentRun("close",n)}this.pluginDriver=new Vc(this,e,e.plugins,this.pluginCache),this.moduleLoader=new Ic(this,this.modulesById,this.options,this.pluginDriver),this.fileOperationQueue=new Wc(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[ht]=!0}return t})(e)}async build(){Xa("generate module graph",2),await this.generateModuleGraph(),Za("generate module graph",2),Xa("sort and bind modules",2),this.phase=Ma.ANALYSE,this.sortModules(),Za("sort and bind modules",2),Xa("mark included statements",2),this.includeStatements(),Za("mark included statements",2),this.phase=Ma.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 il?this.modules.push(e):this.externalModules.push(e)}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e)sn(t);if(this.options.treeshake){let t=1;do{Xa(`treeshaking pass ${t}`,3),this.needsTreeshakingPass=!1;for(const e of this.modules)e.isExecuted&&(e.hasTreeShakingPassStarted=!0,"no-treeshake"===e.info.moduleSideEffects?e.includeAllInBundle():e.include());if(1===t)for(const t of e)!1!==t.preserveSignature&&(t.includeAllExports(!1),this.needsTreeshakingPass=!0);Za("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()||ve(et(t))}sortModules(){const{orderedModules:e,cyclePaths:t}=function(e){let t=0;const n=[],s=new Set,i=new Set,r=new Map,o=[],a=e=>{if(e instanceof il){for(const t of e.dependencies)r.has(t)?s.has(t)||n.push(Ul(t,e,r)):(r.set(t,e),a(t));for(const t of e.implicitlyLoadedBefore)i.add(t);for(const{resolution:t}of e.dynamicImports)t instanceof il&&i.add(t);o.push(e)}e.execIndex=t++,s.add(e)};for(const t of e)r.has(t)||(r.set(t,null),a(t));for(const e of i)r.has(e)||(r.set(e,null),a(e));return{cyclePaths:n,orderedModules:o}}(this.entryModules);for(const e of t)this.options.onLog(ie,Ue(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())"*"===t.name||t.module.getVariableForExportName(t.name)[0]||e.log(ie,Qe(t.name,e.id,t.module.id),t.start)}}function Hc(e,t){return t()}function Kc(e,t,s,i){e=Fc("onLog",e);const r=ae[i],o=(i,a,l=X)=>{Ne(a);if(!(ae[i]<r)){for(const t of e){if(l.has(t))continue;const{onLog:e}=t,c=e=>ae[e]<r?rn:n=>o(e,bc(n),new Set(l).add(t));if(!1===("handler"in e?e.handler:e).call({debug:c(oe),error:e=>ve(bc(e)),info:c(re),meta:{rollupVersion:n,watchMode:s},warn:c(ie)},i,a))return}t(i,a)}};return o}const Yc=e=>!0===e.cache?void 0:e.cache?.cache||e.cache,Jc=e=>{if(!0===e)return()=>!0;if("function"==typeof e)return(t,...n)=>!t.startsWith("\0")&&e(t,...n)||!1;if(e){const n=new Set,s=[];for(const i of(t=e,Array.isArray(t)?t.filter(Boolean):t?[t]:[]))i instanceof RegExp?s.push(i):n.add(i);return(e,...t)=>n.has(e)||s.some((t=>t.test(e)))}var t;return()=>!1},Xc=e=>{const t=e.input;return null==t?[]:"string"==typeof t?[t]:t},Zc=e=>{const t=e.maxParallelFileOps;return"number"==typeof t?t<=0?1/0:t:20},Qc=(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[R(t)]=s;return n=>e[n]??t}return()=>t},eu=e=>{if(!1===e.treeshake)return!1;const t=Sc(e.treeshake,$c,"treeshake","configuration-options/#treeshake","false, true, ");return{annotations:!1!==t.annotations,correctVarValueBeforeDeclaration:!0===t.correctVarValueBeforeDeclaration,manualPureFunctions:t.manualPureFunctions??J,moduleSideEffects:tu(t.moduleSideEffects),propertyReadSideEffects:"always"===t.propertyReadSideEffects?"always":!1!==t.propertyReadSideEffects,tryCatchDeoptimization:!1!==t.tryCatchDeoptimization,unknownGlobalSideEffects:!1!==t.unknownGlobalSideEffects}},tu=e=>{if("boolean"==typeof e)return()=>e;if("no-external"===e)return(e,t)=>!t;if("function"==typeof e)return(t,n)=>!!t.startsWith("\0")||!1!==e(t,n);if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}return e&&ve(Ze("treeshake.moduleSideEffects","configuration-options/#treeshake-modulesideeffects",'please use one of false, "no-external", a function or an array')),()=>!0},nu=/[\u0000-\u001F"#$%&*+,:;<=>?[\]^`{|}\u007F]/g,su=/^[a-z]:/i;function iu(e){const t=su.exec(e),n=t?t[0]:"";return n+e.slice(n.length).replace(nu,"_")}const ru=(e,t,n)=>{const{file:s}=e;if("string"==typeof s){if(t)return ve(Ze("output.file",ye,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'));if(!Array.isArray(n.input))return ve(Ze("output.file",ye,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s},ou=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 ve(Ze("output.format",Ee,'Valid values are "amd", "cjs", "system", "es", "iife" or "umd"',t))}},au=(e,t)=>{const n=e.inlineDynamicImports||!1,{input:s}=t;return n&&(Array.isArray(s)?s:Object.keys(s)).length>1?ve(Ze("output.inlineDynamicImports",xe,'multiple inputs are not supported when "output.inlineDynamicImports" is true')):n},lu=(e,t,n)=>{const s=e.preserveModules||!1;if(s){if(t)return ve(Ze("output.inlineDynamicImports",xe,'this option is not supported for "output.preserveModules"'));if(!1===n.preserveEntrySignatures)return ve(Ze("preserveEntrySignatures","configuration-options/#preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}return s},cu=e=>{const{preserveModulesRoot:t}=e;if(null!=t)return R(t)},uu=e=>{const t={autoId:!1,basePath:"",define:"define",forceJsExtensionForImports:!1,...e.amd};return(t.autoId||t.basePath)&&t.id?ve(Ze("output.amd.id",ge,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"')):t.basePath&&!t.autoId?ve(Ze("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}},du=(e,t)=>{const n=e[t];return"function"==typeof n?n:()=>n||""},hu=(e,t)=>{const{dir:n}=e;return"string"==typeof n&&"string"==typeof t?ve(Ze("output.dir",ye,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks')):n},pu=(e,t)=>{const n=e.entryFileNames;return null==n&&t.add("entryFileNames"),n??"[name].js"};function fu(e,t){const n=e.exports;if(null==n)t.add("exports");else if(!["default","named","none","auto"].includes(n))return ve({code:Ce,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${n}".`,url:fe(be)});return n||"auto"}const mu=(e,t)=>(null!=e.externalImportAssertions&&dt('The "output.externalImportAssertions" option is deprecated. Use the "output.externalImportAttributes" option instead.',"configuration-options/#output-externalimportattributes",0,t),e.externalImportAttributes??e.externalImportAssertions??!0),gu=e=>{const t=Sc(e.generatedCode,Ac,"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}},yu=(e,t)=>{if(t)return"";const n=e.indent;return!1===n?"":n??!0},bu=new Set(["compat","auto","esModule","default","defaultOnly"]),Eu=e=>{const t=e.interop;if("function"==typeof t){const e=Object.create(null);let n=null;return s=>null===s?n||xu(n=t(s)):s in e?e[s]:xu(e[s]=t(s))}return void 0===t?()=>"default":()=>xu(t)},xu=e=>bu.has(e)?e:ve(Ze("output.interop",$e,`use one of ${Array.from(bu,(e=>JSON.stringify(e))).join(", ")}`,e)),$u=(e,t,n)=>{const s=e.manualChunks;if(s){if(t)return ve(Ze("output.manualChunks",Ae,'this option is not supported for "output.inlineDynamicImports"'));if(n)return ve(Ze("output.manualChunks",Ae,'this option is not supported for "output.preserveModules"'))}return s||{}},Au=(e,t,n)=>e.minifyInternalExports??(n||"es"===t||"system"===t),Su=(e,t)=>{const n=e.sourcemapFileNames;return null==n&&t.add("sourcemapFileNames"),n},wu=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+"/":ve(Ze("output.sourcemapBaseUrl","configuration-options/#output-sourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`));var n};function vu(e,t){for(const[n,s]of e.entries())s.name||(s.name=`${t}${n+1}`)}async function Pu(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 wc(e.plugins);vu(i,hc);const r=t.createOutputPluginDriver(i);return{...await Iu(n,s,e,r),outputPluginDriver:r}}(s,i.pluginDriver,t,n);return Hc(0,(async()=>{const n=new sc(r,a,t,o,i),s=await n.generate(e);if(e){if(Xa("WRITE",1),!r.dir&&!r.file)return ve({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.',url:fe(ye)});await Promise.all(Object.values(s).map((e=>i.fileOperationQueue.run((()=>async function(e,t){const n=R(t.dir||C(t.file),e.fileName);return await ac(C(n),{recursive:!0}),cc(n,"asset"===e.type?e.source:e.code)}(e,r)))))),await o.hookParallel("writeBundle",[r,s]),Za("WRITE",1)}return l=s,{output:Object.values(l).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>Nu(e)-Nu(t)))};var l}))}function Iu(e,t,n,s){return async function(e,t,n){const s=new Set(n),i=e.compact||!1,r=ou(e),o=au(e,t),a=lu(e,o,t),l=ru(e,a,t),c=gu(e),u=mu(e,t),d={amd:uu(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:du(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:i,dir:hu(e,l),dynamicImportInCjs:e.dynamicImportInCjs??!0,entryFileNames:pu(e,s),esModule:e.esModule??"if-default-prop",experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:fu(e,s),extend:e.extend||!1,externalImportAssertions:u,externalImportAttributes:u,externalLiveBindings:e.externalLiveBindings??!0,file:l,footer:du(e,"footer"),format:r,freeze:e.freeze??!0,generatedCode:c,globals:e.globals||{},hashCharacters:e.hashCharacters??"base64",hoistTransitiveImports:e.hoistTransitiveImports??!0,importAttributesKey:e.importAttributesKey??"assert",indent:yu(e,i),inlineDynamicImports:o,interop:Eu(e),intro:du(e,"intro"),manualChunks:$u(e,o,a),minifyInternalExports:Au(e,r,i),name:e.name,noConflict:e.noConflict||!1,outro:du(e,"outro"),paths:e.paths||{},plugins:await wc(e.plugins),preserveModules:a,preserveModulesRoot:cu(e),reexportProtoFromExternal:e.reexportProtoFromExternal??!0,sanitizeFileName:"function"==typeof e.sanitizeFileName?e.sanitizeFileName:!1===e.sanitizeFileName?e=>e:iu,sourcemap:e.sourcemap||!1,sourcemapBaseUrl:wu(e),sourcemapExcludeSources:e.sourcemapExcludeSources||!1,sourcemapFile:e.sourcemapFile,sourcemapFileNames:Su(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 xc(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 ku;function Nu(e){return"asset"===e.type?ku.ASSET:e.isEntry?ku.ENTRY_CHUNK:ku.SECONDARY_CHUNK}!function(e){e[e.ENTRY_CHUNK=0]="ENTRY_CHUNK",e[e.SECONDARY_CHUNK=1]="SECONDARY_CHUNK",e[e.ASSET=2]="ASSET"}(ku||(ku={})),e.VERSION=n,e.defineConfig=function(e){return e},e.rollup=function(e){return async function(e,t){const{options:s,unsetOptions:i}=await async function(e,t){if(!e)throw new Error("You must supply an options object to rollup");const s=await async function(e,t){const s=Fc("options",await wc(e.plugins)),i=e.logLevel||re,r=Kc(s,mc(e,i),t,i);for(const o of s){const{name:s,options:a}=o,l="handler"in a?a.handler:a,c=await l.call({debug:Bc(oe,"PLUGIN_LOG",r,s,i),error:e=>ve(ot(bc(e),s,{hook:"onLog"})),info:Bc(re,"PLUGIN_LOG",r,s,i),meta:{rollupVersion:n,watchMode:t},warn:Bc(ie,"PLUGIN_WARNING",r,s,i)},e);c&&(e=c)}return e}(e,t),{options:i,unsetOptions:r}=await async function(e,t){const n=new Set,s=e.context??"undefined",i=await wc(e.plugins),r=e.logLevel||re,o=Kc(i,mc(e,r),t,r),a=e.strictDeprecations||!1,l=Zc(e),c={cache:Yc(e),context:s,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||!1,external:Jc(e.external),input:Xc(e),logLevel:r,makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",maxParallelFileOps:l,moduleContext:Qc(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:eu(e)};return xc(e,[...Object.keys(c),"onwarn","watch"],"input options",o,/^(output)$/),{options:c,unsetOptions:n}}(s,t);return vu(i.plugins,dc),{options:i,unsetOptions:r}}(e,null!==t);(function(e){e.perf?(qa=new Map,Xa=Ka,Za=Ya,e.plugins=e.plugins.map(el)):(Xa=rn,Za=rn)})(s),await async function(){await eo()}();const r=new qc(s,t),o=!1!==e.cache;e.cache&&(s.cache=void 0,e.cache=void 0);Xa("BUILD",1),await Hc(r.pluginDriver,(async()=>{try{Xa("initialize",2),await r.pluginDriver.hookParallel("buildStart",[s]),Za("initialize",2),await r.build()}catch(e){const t=Object.keys(r.watchFiles);throw t.length>0&&(e.watchFiles=t),await r.pluginDriver.hookParallel("buildEnd",[e]),await r.pluginDriver.hookParallel("closeBundle",[]),e}await r.pluginDriver.hookParallel("buildEnd",[])})),Za("BUILD",1);const a={cache:o?r.getCache():void 0,async close(){a.closed||(a.closed=!0,await r.pluginDriver.hookParallel("closeBundle",[]))},closed:!1,generate:async e=>a.closed?ve({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Pu(!1,s,i,e,r),get watchFiles(){return Object.keys(r.watchFiles)},write:async e=>a.closed?ve({code:"ALREADY_CLOSED",message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}):Pu(!0,s,i,e,r)};s.perf&&(a.getTimings=Ja);return a}(e,null)}}));
|
|
11
11
|
//# sourceMappingURL=rollup.browser.js.map
|