UNPKG

vzcode

Version:
28 lines (26 loc) 648 kB
(function(){"use strict";var Qo="4.50.1",Ou=44,pm=59,fm="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",Lu=new Uint8Array(64),Mu=new Uint8Array(128);for(let t=0;t<64;t++){const e=fm.charCodeAt(t);Lu[t]=e,Mu[e]=t}function qs(t,e){let n=0,s=0,r=0;do{const a=t.next();r=Mu[a],n|=(31&r)<<s,s+=5}while(32&r);const i=1&n;return n>>>=1,i&&(n=-2147483648|-n),e+n}function Hs(t,e,n){let s=e-n;s=s<0?-s<<1|1:s<<1;do{let r=31&s;s>>>=5,s>0&&(r|=32),t.write(Lu[r])}while(s>0);return e}function Fu(t,e){return!(t.pos>=e)&&t.peek()!==Ou}var Bu=typeof TextDecoder<"u"?new TextDecoder:typeof Buffer<"u"?{decode:t=>Buffer.from(t.buffer,t.byteOffset,t.byteLength).toString()}:{decode(t){let e="";for(let n=0;n<t.length;n++)e+=String.fromCharCode(t[n]);return e}},mm=class{constructor(){this.pos=0,this.out="",this.buffer=new Uint8Array(16384)}write(e){const{buffer:n}=this;n[this.pos++]=e,this.pos===16384&&(this.out+=Bu.decode(n),this.pos=0)}flush(){const{buffer:e,out:n,pos:s}=this;return s>0?n+Bu.decode(e.subarray(0,s)):n}},gm=class{constructor(e){this.pos=0,this.buffer=e}next(){return this.buffer.charCodeAt(this.pos++)}peek(){return this.buffer.charCodeAt(this.pos)}indexOf(e){const{buffer:n,pos:s}=this,r=n.indexOf(e,s);return r===-1?n.length:r}};function ym(t){t.sort(bm)}function bm(t,e){return t[0]-e[0]}function ju(t){const e=new mm;let n=0,s=0,r=0,i=0;for(let a=0;a<t.length;a++){const l=t[a];if(a>0&&e.write(pm),l.length===0)continue;let c=0;for(let u=0;u<l.length;u++){const d=l[u];u>0&&e.write(Ou),c=Hs(e,d[0],c),d.length!==1&&(n=Hs(e,d[1],n),s=Hs(e,d[2],s),r=Hs(e,d[3],r),d.length!==4&&(i=Hs(e,d[4],i)))}}return e.flush()}class ei{constructor(e){this.bits=e instanceof ei?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(31&e)}has(e){return!!(this.bits[e>>5]&1<<(31&e))}}let zu=class Du{constructor(e,n,s){this.start=e,this.end=n,this.original=s,this.intro="",this.outro="",this.content=s,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 e=new Du(this.start,this.end,this.original);return e.intro=this.intro,e.outro=this.outro,e.content=this.content,e.storeName=this.storeName,e.edited=this.edited,e}contains(e){return this.start<e&&e<this.end}eachNext(e){let n=this;for(;n;)e(n),n=n.next}eachPrevious(e){let n=this;for(;n;)e(n),n=n.previous}edit(e,n,s){return this.content=e,s||(this.intro="",this.outro=""),this.storeName=n,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(e){const n=e-this.start,s=this.original.slice(0,n),r=this.original.slice(n);this.original=s;const i=new Du(e,this.end,r);return i.outro=this.outro,this.outro="",this.end=e,this.edited?(i.edit("",!1),this.content=""):this.content=s,i.next=this.next,i.next&&(i.next.previous=i),i.previous=this,this.next=i,i}toString(){return this.intro+this.content+this.outro}trimEnd(e){if(this.outro=this.outro.replace(e,""),this.outro.length)return!0;const n=this.content.replace(e,"");return n.length?(n!==this.content&&(this.split(this.start+n.length).edit("",void 0,!0),this.edited&&this.edit(n,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 n=this.content.replace(e,"");if(n.length){if(n!==this.content){const s=this.split(this.end-n.length);this.edited&&s.edit(n,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 xm(){return typeof globalThis<"u"&&typeof globalThis.btoa=="function"?t=>globalThis.btoa(unescape(encodeURIComponent(t))):typeof Buffer=="function"?t=>Buffer.from(t,"utf-8").toString("base64"):()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}const km=xm();class ti{constructor(e){this.version=3,this.file=e.file,this.sources=e.sources,this.sourcesContent=e.sourcesContent,this.names=e.names,this.mappings=ju(e.mappings),e.x_google_ignoreList!==void 0&&(this.x_google_ignoreList=e.x_google_ignoreList),e.debugId!==void 0&&(this.debugId=e.debugId)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+km(this.toString())}}function Vu(t,e){const n=t.split(/[/\\]/),s=e.split(/[/\\]/);for(n.pop();n[0]===s[0];)n.shift(),s.shift();if(n.length){let r=n.length;for(;r--;)n[r]=".."}return n.concat(s).join("/")}const Em=Object.prototype.toString;function Uu(t){return Em.call(t)==="[object Object]"}function Zo(t){const e=t.split(` `),n=[];for(let s=0,r=0;s<e.length;s++)n.push(r),r+=e[s].length+1;return function(s){let r=0,i=n.length;for(;r<i;){const l=r+i>>1;s<n[l]?i=l:r=l+1}const a=r-1;return{line:a,column:s-n[a]}}}const Am=/\w/;let qu=class{constructor(e){this.hires=e,this.generatedCodeLine=0,this.generatedCodeColumn=0,this.raw=[],this.rawSegments=this.raw[this.generatedCodeLine]=[],this.pending=null}addEdit(e,n,s,r){if(n.length){const i=n.length-1;let a=n.indexOf(` `,0),l=-1;for(;a>=0&&i>a;){const u=[this.generatedCodeColumn,e,s.line,s.column];r>=0&&u.push(r),this.rawSegments.push(u),this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=a,a=n.indexOf(` `,a+1)}const c=[this.generatedCodeColumn,e,s.line,s.column];r>=0&&c.push(r),this.rawSegments.push(c),this.advance(n.slice(l+1))}else this.pending&&(this.rawSegments.push(this.pending),this.advance(n));this.pending=null}addUneditedChunk(e,n,s,r,i){let a=n.start,l=!0,c=!1;for(;a<n.end;){if(s[a]===` `)r.line+=1,r.column=0,this.generatedCodeLine+=1,this.raw[this.generatedCodeLine]=this.rawSegments=[],this.generatedCodeColumn=0,l=!0,c=!1;else{if(this.hires||l||i.has(a)){const u=[this.generatedCodeColumn,e,r.line,r.column];this.hires==="boundary"?Am.test(s[a])?c||(this.rawSegments.push(u),c=!0):(this.rawSegments.push(u),c=!1):this.rawSegments.push(u)}r.column+=1,this.generatedCodeColumn+=1,l=!1}a+=1}this.pending=null}advance(e){if(!e)return;const n=e.split(` `);if(n.length>1){for(let s=0;s<n.length-1;s++)this.generatedCodeLine++,this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0}this.generatedCodeColumn+=n[n.length-1].length}};const Ws=` `,hs={insertLeft:!1,insertRight:!1,storeName:!1};let Gs=class hm{constructor(e,n={}){const s=new zu(0,e.length,e);Object.defineProperties(this,{original:{writable:!0,value:e},outro:{writable:!0,value:""},intro:{writable:!0,value:""},firstChunk:{writable:!0,value:s},lastChunk:{writable:!0,value:s},lastSearchedChunk:{writable:!0,value:s},byStart:{writable:!0,value:{}},byEnd:{writable:!0,value:{}},filename:{writable:!0,value:n.filename},indentExclusionRanges:{writable:!0,value:n.indentExclusionRanges},sourcemapLocations:{writable:!0,value:new ei},storedNames:{writable:!0,value:{}},indentStr:{writable:!0,value:void 0},ignoreList:{writable:!0,value:n.ignoreList},offset:{writable:!0,value:n.offset||0}}),this.byStart[0]=s,this.byEnd[e.length]=s}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.outro+=e,this}appendLeft(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.appendLeft(n):this.intro+=n,this}appendRight(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.appendRight(n):this.outro+=n,this}clone(){const e=new hm(this.original,{filename:this.filename,offset:this.offset});let n=this.firstChunk,s=e.firstChunk=e.lastSearchedChunk=n.clone();for(;n;){e.byStart[s.start]=s,e.byEnd[s.end]=s;const r=n.next,i=r&&r.clone();i&&(s.next=i,i.previous=s,s=i),n=r}return e.lastChunk=s,this.indentExclusionRanges&&(e.indentExclusionRanges=this.indentExclusionRanges.slice()),e.sourcemapLocations=new ei(this.sourcemapLocations),e.intro=this.intro,e.outro=this.outro,e}generateDecodedMap(e){e=e||{};const n=Object.keys(this.storedNames),s=new qu(e.hires),r=Zo(this.original);return this.intro&&s.advance(this.intro),this.firstChunk.eachNext(i=>{const a=r(i.start);i.intro.length&&s.advance(i.intro),i.edited?s.addEdit(0,i.content,a,i.storeName?n.indexOf(i.original):-1):s.addUneditedChunk(0,i,this.original,a,this.sourcemapLocations),i.outro.length&&s.advance(i.outro)}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:[e.source?Vu(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:void 0,names:n,mappings:s.raw,x_google_ignoreList:this.ignoreList?[0]:void 0}}generateMap(e){return new ti(this.generateDecodedMap(e))}_ensureindentStr(){this.indentStr===void 0&&(this.indentStr=function(e){const n=e.split(` `),s=n.filter(a=>/^\t+/.test(a)),r=n.filter(a=>/^ {2,}/.test(a));if(s.length===0&&r.length===0)return null;if(s.length>=r.length)return" ";const i=r.reduce((a,l)=>{const c=/^ +/.exec(l)[0].length;return Math.min(c,a)},1/0);return new Array(i+1).join(" ")}(this.original))}_getRawIndentString(){return this._ensureindentStr(),this.indentStr}getIndentString(){return this._ensureindentStr(),this.indentStr===null?" ":this.indentStr}indent(e,n){const s=/^[^\r\n]/gm;if(Uu(e)&&(n=e,e=void 0),e===void 0&&(this._ensureindentStr(),e=this.indentStr||" "),e==="")return this;const r={};(n=n||{}).exclude&&(typeof n.exclude[0]=="number"?[n.exclude]:n.exclude).forEach(u=>{for(let d=u[0];d<u[1];d+=1)r[d]=!0});let i=n.indentStart!==!1;const a=u=>i?`${e}${u}`:(i=!0,u);this.intro=this.intro.replace(s,a);let l=0,c=this.firstChunk;for(;c;){const u=c.end;if(c.edited)r[l]||(c.content=c.content.replace(s,a),c.content.length&&(i=c.content[c.content.length-1]===` `));else for(l=c.start;l<u;){if(!r[l]){const d=this.original[l];d===` `?i=!0:d!=="\r"&&i&&(i=!1,l===c.start||(this._splitChunk(c,l),c=c.next),c.prependRight(e))}l+=1}l=c.end,c=c.next}return this.outro=this.outro.replace(s,a),this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,n){return hs.insertLeft||(console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead"),hs.insertLeft=!0),this.appendLeft(e,n)}insertRight(e,n){return hs.insertRight||(console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead"),hs.insertRight=!0),this.prependRight(e,n)}move(e,n,s){if(e+=this.offset,n+=this.offset,(s+=this.offset)>=e&&s<=n)throw new Error("Cannot move a selection inside itself");this._split(e),this._split(n),this._split(s);const r=this.byStart[e],i=this.byEnd[n],a=r.previous,l=i.next,c=this.byStart[s];if(!c&&i===this.lastChunk)return this;const u=c?c.previous:this.lastChunk;return a&&(a.next=l),l&&(l.previous=a),u&&(u.next=r),c&&(c.previous=i),r.previous||(this.firstChunk=i.next),i.next||(this.lastChunk=r.previous,this.lastChunk.next=null),r.previous=u,i.next=c||null,u||(this.firstChunk=r),c||(this.lastChunk=i),this}overwrite(e,n,s,r){return r=r||{},this.update(e,n,s,{...r,overwrite:!r.contentOnly})}update(e,n,s,r){if(e+=this.offset,n+=this.offset,typeof s!="string")throw new TypeError("replacement content must be a string");if(this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(n>this.original.length)throw new Error("end is out of bounds");if(e===n)throw new Error("Cannot overwrite a zero-length range – use appendLeft or prependRight instead");this._split(e),this._split(n),r===!0&&(hs.storeName||(console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string"),hs.storeName=!0),r={storeName:!0});const i=r!==void 0&&r.storeName,a=r!==void 0&&r.overwrite;if(i){const u=this.original.slice(e,n);Object.defineProperty(this.storedNames,u,{writable:!0,value:!0,enumerable:!0})}const l=this.byStart[e],c=this.byEnd[n];if(l){let u=l;for(;u!==c;){if(u.next!==this.byStart[u.end])throw new Error("Cannot overwrite across a split point");u=u.next,u.edit("",!1)}l.edit(s,i,!a)}else{const u=new zu(e,n,"").edit(s,i);c.next=u,u.previous=c}return this}prepend(e){if(typeof e!="string")throw new TypeError("outro content must be a string");return this.intro=e+this.intro,this}prependLeft(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byEnd[e];return s?s.prependLeft(n):this.intro=n+this.intro,this}prependRight(e,n){if(e+=this.offset,typeof n!="string")throw new TypeError("inserted content must be a string");this._split(e);const s=this.byStart[e];return s?s.prependRight(n):this.outro=n+this.outro,this}remove(e,n){if(e+=this.offset,n+=this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let s=this.byStart[e];for(;s;)s.intro="",s.outro="",s.edit(""),s=n>s.end?this.byStart[s.end]:null;return this}reset(e,n){if(e+=this.offset,n+=this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}if(e===n)return this;if(e<0||n>this.original.length)throw new Error("Character is out of bounds");if(e>n)throw new Error("end must be greater than start");this._split(e),this._split(n);let s=this.byStart[e];for(;s;)s.reset(),s=n>s.end?this.byStart[s.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(Ws);if(e!==-1)return this.outro.substr(e+1);let n=this.outro,s=this.lastChunk;do{if(s.outro.length>0){if(e=s.outro.lastIndexOf(Ws),e!==-1)return s.outro.substr(e+1)+n;n=s.outro+n}if(s.content.length>0){if(e=s.content.lastIndexOf(Ws),e!==-1)return s.content.substr(e+1)+n;n=s.content+n}if(s.intro.length>0){if(e=s.intro.lastIndexOf(Ws),e!==-1)return s.intro.substr(e+1)+n;n=s.intro+n}}while(s=s.previous);return e=this.intro.lastIndexOf(Ws),e!==-1?this.intro.substr(e+1)+n:this.intro+n}slice(e=0,n=this.original.length-this.offset){if(e+=this.offset,n+=this.offset,this.original.length!==0){for(;e<0;)e+=this.original.length;for(;n<0;)n+=this.original.length}let s="",r=this.firstChunk;for(;r&&(r.start>e||r.end<=e);){if(r.start<n&&r.end>=n)return s;r=r.next}if(r&&r.edited&&r.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const i=r;for(;r;){!r.intro||i===r&&r.start!==e||(s+=r.intro);const a=r.start<n&&r.end>=n;if(a&&r.edited&&r.end!==n)throw new Error(`Cannot use replaced character ${n} as slice end anchor.`);const l=i===r?e-r.start:0,c=a?r.content.length+n-r.end:r.content.length;if(s+=r.content.slice(l,c),!r.outro||a&&r.end!==n||(s+=r.outro),a)break;r=r.next}return s}snip(e,n){const s=this.clone();return s.remove(0,e),s.remove(n,s.original.length),s}_split(e){if(this.byStart[e]||this.byEnd[e])return;let n=this.lastSearchedChunk,s=n;const r=e>n.end;for(;n;){if(n.contains(e))return this._splitChunk(n,e);if(n=r?this.byStart[n.end]:this.byEnd[n.start],n===s)return;s=n}}_splitChunk(e,n){if(e.edited&&e.content.length){const r=Zo(this.original)(n);throw new Error(`Cannot split a chunk that has already been edited (${r.line}:${r.column} – "${e.original}")`)}const s=e.split(n);return this.byEnd[n]=e,this.byStart[n]=s,this.byEnd[s.end]=s,e===this.lastChunk&&(this.lastChunk=s),this.lastSearchedChunk=e,!0}toString(){let e=this.intro,n=this.firstChunk;for(;n;)e+=n.toString(),n=n.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,n=0;do n+=e.intro.length+e.content.length+e.outro.length;while(e=e.next);return n}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimEndAborted(e){const n=new RegExp((e||"\\s")+"+$");if(this.outro=this.outro.replace(n,""),this.outro.length)return!0;let s=this.lastChunk;do{const r=s.end,i=s.trimEnd(n);if(s.end!==r&&(this.lastChunk===s&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.previous}while(s);return!1}trimEnd(e){return this.trimEndAborted(e),this}trimStartAborted(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),this.intro.length)return!0;let s=this.firstChunk;do{const r=s.end,i=s.trimStart(n);if(s.end!==r&&(s===this.lastChunk&&(this.lastChunk=s.next),this.byEnd[s.end]=s,this.byStart[s.next.start]=s.next,this.byEnd[s.next.end]=s.next),i)return!0;s=s.next}while(s);return!1}trimStart(e){return this.trimStartAborted(e),this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,n){function s(r,i){return typeof n=="string"?n.replace(/\$(\$|&|\d+)/g,(a,l)=>l==="$"?"$":l==="&"?r[0]:+l<r.length?r[+l]:`$${l}`):n(...r,r.index,i,r.groups)}if(e.global)(function(r,i){let a;const l=[];for(;a=r.exec(i);)l.push(a);return l})(e,this.original).forEach(r=>{if(r.index!=null){const i=s(r,this.original);i!==r[0]&&this.overwrite(r.index,r.index+r[0].length,i)}});else{const r=this.original.match(e);if(r&&r.index!=null){const i=s(r,this.original);i!==r[0]&&this.overwrite(r.index,r.index+r[0].length,i)}}return this}_replaceString(e,n){const{original:s}=this,r=s.indexOf(e);return r!==-1&&this.overwrite(r,r+e.length,n),this}replace(e,n){return typeof e=="string"?this._replaceString(e,n):this._replaceRegexp(e,n)}_replaceAllString(e,n){const{original:s}=this,r=e.length;for(let i=s.indexOf(e);i!==-1;i=s.indexOf(e,i+r))s.slice(i,i+r)!==n&&this.overwrite(i,i+r,n);return this}replaceAll(e,n){if(typeof e=="string")return this._replaceAllString(e,n);if(!e.global)throw new TypeError("MagicString.prototype.replaceAll called with a non-global RegExp argument");return this._replaceRegexp(e,n)}};const Hu=Object.prototype.hasOwnProperty;let wm=class dm{constructor(e={}){this.intro=e.intro||"",this.separator=e.separator!==void 0?e.separator:` `,this.sources=[],this.uniqueSources=[],this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof Gs)return this.addSource({content:e,filename:e.filename,separator:this.separator});if(!Uu(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(n=>{Hu.call(e,n)||(e[n]=e.content[n])}),e.separator===void 0&&(e.separator=this.separator),e.filename)if(Hu.call(this.uniqueSourceIndexByFilename,e.filename)){const n=this.uniqueSources[this.uniqueSourceIndexByFilename[e.filename]];if(e.content.original!==n.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,n){return this.addSource({content:new Gs(e),separator:n&&n.separator||""}),this}clone(){const e=new dm({intro:this.intro,separator:this.separator});return this.sources.forEach(n=>{e.addSource({filename:n.filename,content:n.content.clone(),separator:n.separator})}),e}generateDecodedMap(e={}){const n=[];let s;this.sources.forEach(i=>{Object.keys(i.content.storedNames).forEach(a=>{~n.indexOf(a)||n.push(a)})});const r=new qu(e.hires);return this.intro&&r.advance(this.intro),this.sources.forEach((i,a)=>{a>0&&r.advance(this.separator);const l=i.filename?this.uniqueSourceIndexByFilename[i.filename]:-1,c=i.content,u=Zo(c.original);c.intro&&r.advance(c.intro),c.firstChunk.eachNext(d=>{const m=u(d.start);d.intro.length&&r.advance(d.intro),i.filename?d.edited?r.addEdit(l,d.content,m,d.storeName?n.indexOf(d.original):-1):r.addUneditedChunk(l,d,c.original,m,c.sourcemapLocations):r.advance(d.content),d.outro.length&&r.advance(d.outro)}),c.outro&&r.advance(c.outro),i.ignoreList&&l!==-1&&(s===void 0&&(s=[]),s.push(l))}),{file:e.file?e.file.split(/[/\\]/).pop():void 0,sources:this.uniqueSources.map(i=>e.file?Vu(e.file,i.filename):i.filename),sourcesContent:this.uniqueSources.map(i=>e.includeContent?i.content:null),names:n,mappings:r.raw,x_google_ignoreList:s}}generateMap(e){return new ti(this.generateDecodedMap(e))}getIndentString(){const e={};return this.sources.forEach(n=>{const s=n.content._getRawIndentString();s!==null&&(e[s]||(e[s]=0),e[s]+=1)}),Object.keys(e).sort((n,s)=>e[n]-e[s])[0]||" "}indent(e){if(arguments.length||(e=this.getIndentString()),e==="")return this;let n=!this.intro||this.intro.slice(-1)===` `;return this.sources.forEach((s,r)=>{const i=s.separator!==void 0?s.separator:this.separator,a=n||r>0&&/\r?\n$/.test(i);s.content.indent(e,{exclude:s.indentExclusionRanges,indentStart:a}),n=s.content.lastChar()===` `}),this.intro&&(this.intro=e+this.intro.replace(/^[^\n]/gm,(s,r)=>r>0?e+s:s)),this}prepend(e){return this.intro=e+this.intro,this}toString(){const e=this.sources.map((n,s)=>{const r=n.separator!==void 0?n.separator:this.separator;return(s>0?r:"")+n.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,n)=>e+n.content.length(),this.intro.length)}trimLines(){return this.trim("[\\r\\n]")}trim(e){return this.trimStart(e).trimEnd(e)}trimStart(e){const n=new RegExp("^"+(e||"\\s")+"+");if(this.intro=this.intro.replace(n,""),!this.intro){let s,r=0;do if(s=this.sources[r++],!s)break;while(!s.content.trimStartAborted(e))}return this}trimEnd(e){const n=new RegExp((e||"\\s")+"+$");let s,r=this.sources.length-1;do if(s=this.sources[r--],!s){this.intro=this.intro.replace(n,"");break}while(!s.content.trimEndAborted(e));return this}};const Sm=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/,Im=/^\.?\.\//,vm=/\\/g,ds=/[/\\]/,_m=/\.[^.]+$/;function Ht(t){return Sm.test(t)}function ea(t){return Im.test(t)}function an(t){return t.replace(vm,"/")}function Wt(t){return t.split(ds).pop()||""}function ln(t){const e=/[/\\][^/\\]*$/.exec(t);return e?t.slice(0,-e[0].length)||"/":"."}function xn(t){const e=_m.exec(Wt(t));return e?e[0]:""}function Tn(t,e){const n=t.split(ds).filter(Boolean),s=e.split(ds).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 St(...t){const e=t.shift();if(!e)return"/";let n=e.split(ds);for(const s of t)if(Ht(s))n=s.split(ds);else{const r=s.split(ds);for(;r[0]==="."||r[0]==="..";)r.shift()===".."&&n.pop();n.push(...r)}return n.join("/")}function ps(t,e,n,s){e.remove(n,s),t.removeAnnotations(e)}const Rn={isNoStatement:!0};function ht(t,e,n=0){let s,r;for(s=t.indexOf(e,n);;){if((n=t.indexOf("/",n))===-1||n>=s)return s;r=t.charCodeAt(++n),++n,(n=r===47?t.indexOf(` `,n)+1:t.indexOf("*/",n)+2)>s&&(s=t.indexOf(e,n))}}const Wu=/\S/g;function kn(t,e){return Wu.lastIndex=e,Wu.exec(t).index}const Pm=/\s/;function Xs(t){let e,n,s=0;for(e=t.indexOf(` `,s);;){if(s=t.indexOf("/",s),s===-1||s>e)return[e,e+1];if(n=t.charCodeAt(s+1),n===47)return[s,e+1];s=t.indexOf("*/",s+2)+2,s>e&&(e=t.indexOf(` `,s))}}function Ks(t,e,n,s,r){let i,a,l,c,u=t[0],d=!u.included||u.needsBoundaries;d&&(c=n+Xs(e.original.slice(n,u.start))[1]);for(let m=1;m<=t.length;m++)i=u,a=c,l=d,u=t[m],d=u!==void 0&&(!u.included||u.needsBoundaries),l||d?(c=i.end+Xs(e.original.slice(i.end,u===void 0?s:u.start))[1],i.included?l?i.render(e,r,{end:c,start:a}):i.render(e,r):ps(i,e,a,c)):i.render(e,r)}function ni(t,e,n,s){const r=[];let i,a,l,c,u=n-1;for(const d of t){for(i!==void 0&&(u=i.end+ht(e.original.slice(i.end,d.start),",")),a=l=u+1+Xs(e.original.slice(u+1,d.start))[1];c=e.original.charCodeAt(a),c===32||c===9||c===10||c===13;)a++;i!==void 0&&r.push({contentEnd:l,end:a,node:i,separator:u,start:n}),i=d,n=a}return r.push({contentEnd:s,end:s,node:i,separator:null,start:n}),r}function si(t,e,n){for(;;){const[s,r]=Xs(t.original.slice(e,n));if(s===-1)break;t.remove(e+s,e+=r)}}function Dn(t,{exportNamesByVariable:e,snippets:{_:n,getObject:s,getPropertyAccess:r}},i=""){if(t.length===1&&e.get(t[0]).length===1){const a=t[0];return`exports(${JSON.stringify(e.get(a)[0])},${n}${a.getName(r)}${i})`}{const a=[];for(const l of t)for(const c of e.get(l))a.push([c,l.getName(r)+i]);return`exports(${s(a,{lineBreakIndent:null})})`}}function ta(t,e,n,s,{exportNamesByVariable:r,snippets:{_:i}}){s.prependRight(e,`exports(${JSON.stringify(r.get(t)[0])},${i}`),s.appendLeft(n,")")}function Gu(t,e,n,s,r,i){const{_:a,getPropertyAccess:l}=i.snippets;r.appendLeft(n,`,${a}${Dn([t],i)},${a}${t.getName(l)}`),s&&(r.prependRight(e,"("),r.appendLeft(n,")"))}const pt=Object.freeze(Object.create(null)),ft=Object.freeze({}),Qe=Object.freeze([]),Xu=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function bt(t,e,n){const s=t.get(e);if(s!==void 0)return s;const r=n();return t.set(e,r),r}function On(){return new Set}function Ku(){return[]}const Ie=Symbol("Unknown Key"),ri=Symbol("Unknown Non-Accessor Key"),fs=Symbol("Unknown Integer"),na=Symbol("Symbol.toStringTag"),ae=[],ie=[Ie],$m=[ri],sa=[fs],ms=Symbol("Entities");let gs=class{constructor(){this.entityPaths=Object.create(null,{[ms]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,n){const s=this.getEntities(e);return!!s.has(n)||(s.add(n),!1)}withTrackedEntityAtPath(e,n,s,r){const i=this.getEntities(e);if(i.has(n))return r;i.add(n);const a=s();return i.delete(n),a}getEntities(e){let n=this.entityPaths;for(const s of e)n=n[s]||=Object.create(null,{[ms]:{value:new Set}});return n[ms]}};const He=new gs;let Ju=class{constructor(){this.entityPaths=Object.create(null,{[ms]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,n,s){let r=this.entityPaths;for(const a of e)r=r[a]||=Object.create(null,{[ms]:{value:new Map}});const i=bt(r[ms],n,On);return!!i.has(s)||(i.add(s),!1)}};const Nm=Object.freeze({[Ie]:ft});let Cm=class{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let n=!0,s=this,r="includedPaths",i=this.includedPaths||=(n=!1,Object.create(null));for(const a of e){if(i[Ie])return!0;if(typeof a=="symbol")return s[r]=Nm,!1;s=i,r=a,i=i[a]||=(n=!1,Object.create(null))}return n}};const Tm=Object.freeze({[Ie]:!0});let Rm=class{constructor(){this.includedPaths=null}includePathAndGetIfIncluded(e){let n=!0;const s=this.includedPaths||=(n=!1,Object.create(null));if(s[Ie])return!0;const[r,i]=e;return r?typeof r=="symbol"?(this.includedPaths=Tm,!1):i?s[r]===Ie||(s[r]=Ie,!1):!!s[r]||(s[r]=!0,!1):n}includeAllPaths(e,n,s){const{includedPaths:r}=this;if(r)if(r[Ie])e.includePath([...s,Ie],n);else{const i=Object.entries(r);if(i.length===0)e.includePath(s,n);else for(const[a,l]of i)e.includePath(l===Ie?[...s,a,Ie]:[...s,a],n)}}};function Yu(t,e){if(t.type==="MemberExpression")return!t.computed&&Yu(t.object,t);if(t.type!=="Identifier")return!1;switch(e?.type){case"MemberExpression":return e.computed||t===e.object;case"MethodDefinition":return e.computed;case"MetaProperty":return e.meta===t;case"PropertyDefinition":case"Property":return e.computed||t===e.value;case"ExportSpecifier":case"ImportSpecifier":return t===e.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return!1;default:return!0}}function Lt(){return{brokenFlow:!1,hasBreak:!1,hasContinue:!1,includedCallArguments:new Set,includedLabels:new Set}}function ys(){return{accessed:new gs,assigned:new gs,brokenFlow:!1,called:new Ju,hasBreak:!1,hasContinue:!1,ignore:{breaks:!1,continues:!1,labels:new Set,returnYield:!1,this:!1},includedLabels:new Set,instantiated:new Ju,replacedVariableInits:new Map}}function Oe(t,e){return(t&e)!==0}function Le(t,e,n){return t&~e|-n&e}const Ce=Symbol("Unknown Value"),ii=Symbol("Unknown Truthy Value"),oi=Symbol("Unknown Falsy Value");class Pt{constructor(){this.flags=0}get included(){return Oe(this.flags,1)}set included(e){this.flags=Le(this.flags,1,e)}deoptimizeArgumentsOnInteractionAtPath(e,n,s){En(e)}deoptimizePath(e){}getLiteralValueAtPath(e,n,s){return Ce}getReturnExpressionWhenCalledAtPath(e,n,s,r){return it}hasEffectsOnInteractionAtPath(e,n,s){return!0}include(e,n,s){this.included||this.includeNode(e)}includeNode(e){this.included=!0}includePath(e,n){this.included||this.includeNode(n)}includeCallArguments(e,n){ra(e,n)}shouldBeIncluded(e){return!0}}const ve=new class extends Pt{},it=[ve,!1],En=t=>{for(const e of t.args)e?.deoptimizePath(ie)},ra=(t,e)=>{t.args[0]?.includePath(ie,e),Qu(t,e)},Qu=({args:t},e)=>{for(let n=1;n<t.length;n++){const s=t[n];s&&(s.includePath(ie,e),s.include(e,!1))}},Ln={args:[null],type:0},ia={args:[null,ve],type:1},Js={args:[null],type:2,withNew:!1},oa="ArrowFunctionExpression",Ys="CallExpression",Zu="ExportDefaultDeclaration",Gt="ExpressionStatement",aa="Identifier",ai="Program",eh="Property";function Dm(t,e){return t.start<=e&&e<t.end}function la(t,e,n){return function(s,r={}){const{offsetLine:i=0,offsetColumn:a=0}=r;let l=0;const c=s.split(` `).map((d,m)=>{const f=l+d.length+1,g={start:l,end:f,line:m};return l=f,g});let u=0;return function(d,m){if(typeof d=="string"&&(d=s.indexOf(d,m??0)),d===-1)return;let f=c[u];const g=d>=f.end?1:-1;for(;f;){if(Dm(f,d))return{line:i+f.line,column:a+d-f.start,character:d};u+=g,f=c[u]}}}(t,n)(e,n&&n.startIndex)}function ca(t){return t.replace(/^\t+/,e=>e.split(" ").join(" "))}const Om="...";function th(t,e,n){let s=t.split(` `);if(e>s.length)return"";const r=Math.max(ca(s[e-1].slice(0,n)).length+10+3,120),i=Math.max(0,e-3);let a=Math.min(e+2,s.length);for(s=s.slice(i,a);!/\S/.test(s[s.length-1]);)s.pop(),a-=1;const l=String(a).length;return s.map((c,u)=>{const d=i+u+1===e;let m=String(u+i+1);for(;m.length<l;)m=` ${m}`;let f=ca(c);if(f.length>r&&(f=`${f.slice(0,r-3)}${Om}`),d){const g=function(S){let x="";for(;S--;)x+=" ";return x}(l+2+ca(c.slice(0,n)).length)+"^";return`${m}: ${f} ${g}`}return`${m}: ${f}`}).join(` `)}const Lm="silent",be="warn",Mn="info",Qs="debug",Fn={[Qs]:0,[Mn]:1,[Lm]:3,[be]:2};function cn(t,e){const n=t.length<=1,s=t.map(i=>`"${i}"`);let r=n?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;return e&&(r+=` ${n?e[0]:e[1]}`),r}function ua(t){const e=Wt(t);return e.slice(0,Math.max(0,e.length-xn(t).length))}function xe(t){return Ht(t)?Tn(St(),t):t}function li(t){return t[0]==="/"||t[0]==="."&&(t[1]==="/"||t[1]===".")||Ht(t)}const Mm=/^(\.\.\/)*\.\.$/;function nh(t,e,n,s){for(;e.startsWith("../");)e=e.slice(3),t="_/"+t;let r=an(Tn(ln(t),e));if(n&&r.endsWith(".js")&&(r=r.slice(0,-3)),s){if(r==="")return"../"+Wt(e);if(Mm.test(r))return[...r.split("/"),"..",Wt(e)].join("/")}return r?r.startsWith("..")?r:"./"+r:"."}function ot(t){return`https://rollupjs.org/${t}`}const sh="troubleshooting/#error-name-is-not-exported-by-module",ci="configuration-options/#jsx",rh="configuration-options/#output-amd-id",Zs="configuration-options/#output-dir",ha="configuration-options/#output-exports",ih="configuration-options/#output-format",oh="configuration-options/#output-inlinedynamicimports",da="configuration-options/#output-interop",ah="configuration-options/#output-manualchunks",lh="configuration-options/#output-name",Fm="configuration-options/#output-sourcemapfile",bs="plugin-development/#generatebundle";function re(t){throw t instanceof Error?t:xs(t)}function xs(t){uh(t);const e=Object.assign(new Error(t.message),t);return Object.defineProperty(e,"name",{value:"RollupError",writable:!0}),e}function ui(t,e,n,s){if(typeof e=="object"){const{line:r,column:i}=e;t.loc={column:i,file:s,line:r}}else{t.pos=e;const r=la(n,e,{offsetLine:1});if(!r)return;const{line:i,column:a}=r;t.loc={column:a,file:s,line:i}}if(t.frame===void 0){const{line:r,column:i}=t.loc;t.frame=th(n,r,i)}}const ch=Symbol("augmented");function uh(t){if(!t.plugin&&!t.loc||t[ch])return;t[ch]=!0;let e="";t.plugin&&(e+=`[plugin ${t.plugin}] `);const n=t.id||t.loc?.file;if(n){const r=t.loc?` (${t.loc.line}:${t.loc.column})`:"";e+=`${xe(n)}${r}: `}const s=t.message;t.message=e+t.message,Sh(t,s)}const hh="INVALID_EXPORT_OPTION",dh="INVALID_IMPORT_ATTRIBUTE",ph="INVALID_PLUGIN_HOOK",fh="MISSING_EXPORT",pa="MISSING_IMPLICIT_DEPENDANT",mh="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",gh="PARSE_ERROR",yh="SOURCEMAP_BROKEN",bh="UNEXPECTED_NAMED_IMPORT",xh="UNRESOLVED_ENTRY",kh="UNRESOLVED_IMPORT";function Bm(t){return{code:"ASSET_SOURCE_MISSING",message:`Plugin error creating asset "${t}" - no asset source set.`}}function Eh(t){return{code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ("${t}").`}}function jm({fileName:t,code:e},{pos:n,message:s}){const r={code:"CHUNK_INVALID",message:`Chunk "${t}" is not valid JavaScript: ${s}.`};return ui(r,n,e,t),r}function zm(t){return{code:"CIRCULAR_DEPENDENCY",ids:t,message:`Circular dependency: ${t.map(xe).join(" -> ")}`}}function Vm(t,e,n,s,r){return{code:"CYCLIC_CROSS_CHUNK_REEXPORT",exporter:e,id:s,message:`Export "${t}" of module "${xe(e)}" was reexported through module "${xe(n)}" while both modules are dependencies of each other and will end up in different chunks by current Rollup settings. This scenario is not well supported at the moment as it will produce a circular dependency between chunks and will likely lead to broken execution order. Either change the import in "${xe(s)}" to point directly to the exporting module or ${r?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:n}}function Um(t,e,{line:n,column:s}){return{code:"FIRST_SIDE_EFFECT",message:`First side effect in ${xe(e)} is at (${n}:${s}) ${th(t,n,s)}`}}function Ah(t,e){return{code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment of import "${t}" in "${xe(e)}".`}}function hi(t,e,n,s){return{code:"INCONSISTENT_IMPORT_ATTRIBUTES",message:`Module "${xe(s)}" tried to import "${xe(n)}" with ${wh(e)} attributes, but it was already imported elsewhere with ${wh(t)} attributes. Please ensure that import attributes for the same module are always consistent.`}}const wh=t=>{const e=Object.entries(t);return e.length===0?"no":e.map(([n,s])=>`"${n}": "${s}"`).join(", ")};function qm(t,e,n){return{code:"INVALID_ANNOTATION",id:e,message:`A comment "${t}" in "${xe(e)}" contains an annotation that Rollup cannot interpret due to the position of the comment. The comment will be removed to avoid issues.`,url:ot(n==="noSideEffects"?"configuration-options/#no-side-effects":"configuration-options/#pure")}}function Hm(t,e){return{code:"INPUT_HOOK_IN_OUTPUT_PLUGIN",message:`The "${e}" hook used by the output plugin ${t} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function Sh(t,e){return t.stack&&(t.stack=t.stack.replace(e,t.message)),t}function Ih(t,e,n){return{code:hh,message:`"${t}" was specified for "output.exports", but entry module "${xe(n)}" has the following exports: ${cn(e)}`,url:ot(ha)}}function vh(t){return{code:dh,message:`Rollup could not statically analyze an import attribute of a dynamic import in "${xe(t)}". Import attributes need to have string keys and values.`}}function nt(t,e,n,s){return{code:"INVALID_OPTION",message:`Invalid value ${s===void 0?"":`${JSON.stringify(s)} `}for option "${t}" - ${n}.`,url:ot(e)}}function Wm(t,e){return{binding:t,code:fh,exporter:e,message:`Exported variable "${t}" is not defined in "${xe(e)}".`,url:ot(sh)}}function di(t,e,n,s){const r={binding:t,code:fh,exporter:n,id:e,url:ot(sh)};if(s)return{...r,message:`Exported variable "${t}" is not defined in "${xe(n)}", but it is imported by "${xe(e)}".`};const i=xn(n)===".json";return{...r,message:`"${t}" is not exported by "${xe(n)}", imported by "${xe(e)}".${i?" (Note that you need @rollup/plugin-json to import JSON files)":""}`}}function Gm(t){const e=[...t.implicitlyLoadedBefore].map(n=>xe(n.id)).sort();return{code:pa,message:`Module "${xe(t.id)}" that should be implicitly loaded before ${cn(e)} 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 _h(t,e,n){return{code:"OPTIMIZE_CHUNK_STATUS",message:`${n}, there are ${t} chunks, of which ${e} are below minChunkSize.`}}function pi(t,e){return{code:gh,message:t,pos:e}}function ks(t){return{code:"REDECLARATION_ERROR",message:`Identifier "${t}" has already been declared`}}function Ph(t){return{code:"RESERVED_NAMESPACE",message:`You have overridden reserved namespace "${t}"`}}function fa(t,e){let n=t.message.replace(/ \(\d+:\d+\)$/,"");return e.endsWith(".json")?n+=" (Note that you need @rollup/plugin-json to import JSON files)":e.endsWith(".js")||(n+=" (Note that you need plugins to import files that are not JavaScript)"),Sh({cause:t,code:gh,id:e,message:n,stack:t.stack},t.message)}function er(t,e,{hook:n,id:s}={}){const r=t.code;return t.pluginCode||r==null||typeof r=="string"&&r.startsWith("PLUGIN_")||(t.pluginCode=r),t.code="PLUGIN_ERROR",t.plugin=e,n&&(t.hook=n),s&&(t.id=s),t}function Xm(t){return{code:yh,message:`Multiple conflicting contents for sourcemap source ${t}`}}function $h(t,e,n){const s=n?"reexport":"import";return{code:bh,exporter:t,message:`The named export "${e}" was ${s}ed from the external module "${xe(t)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:ot(da)}}function Km(t){return{code:bh,exporter:t,message:`There was a namespace "*" reexport from the external module "${xe(t)}" 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:ot(da)}}function It(t){return{code:"VALIDATION_ERROR",message:t}}function Bn(t,e,n,s,r){(function(i,a,l,c,u){if(l||u){const d=function(m,f){return{code:"DEPRECATED_FEATURE",message:m,url:ot(f)}}(i,a);if(u)return re(d);c(be,d)}})(t,e,n,s.onLog,s.strictDeprecations)}const ma=Symbol("PureFunction");class jn extends Pt{markReassigned(){this.isReassigned=!0}constructor(e){super(),this.name=e,this.alwaysRendered=!1,this.forbiddenNames=null,this.globalName=null,this.initReached=!1,this.isId=!1,this.kind=null,this.renderBaseName=null,this.renderName=null,this.isReassigned=!1,this.onlyFunctionCallUsed=!0}addReference(e){}getOnlyFunctionCallUsed(){return this.onlyFunctionCallUsed}addUsedPlace(e){e.parent.type===Ys&&e.parent.callee===e||e.parent.type===Zu||(this.onlyFunctionCallUsed=!1)}forbidName(e){(this.forbiddenNames||=new Set).add(e)}getBaseVariableName(){return this.renderedLikeHoisted?.getBaseVariableName()||this.renderBaseName||this.renderName||this.name}getName(e,n){if(this.globalName)return this.globalName;if(n?.(this))return this.name;if(this.renderedLikeHoisted)return this.renderedLikeHoisted.getName(e,n);const s=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(s)}`:s}hasEffectsOnInteractionAtPath(e,{type:n},s){return n!==0||e.length>0}includePath(e,n){this.included=!0,this.renderedLikeHoisted?.includePath(e,n)}renderLikeHoisted(e){this.renderedLikeHoisted=e}markCalledFromTryStatement(){}setRenderNames(e,n){this.renderBaseName=e,this.renderName=n}}class tr extends jn{constructor(e,n){super(n),this.referenced=!1,this.module=e,this.isNamespace=n==="*"}addReference(e){this.referenced=!0,this.name!=="default"&&this.name!=="*"||this.module.suggestName(e.name)}hasEffectsOnInteractionAtPath(e,{type:n}){return n!==0||e.length>(this.isNamespace?1:0)}includePath(e,n){super.includePath(e,n),this.module.used=!0}}function Nh(t,e){for(const n of e){const s=Object.getOwnPropertyDescriptor(t,n).get;Object.defineProperty(t,n,{get(){const r=s.call(t);return Object.defineProperty(t,n,{value:r}),r}})}}const fi=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"]),Ch=/[^\w$]/g,Th=t=>(e=>/\d/.test(e[0]))(t)||fi.has(t)||t==="arguments";function mi(t){return t=t.replace(/-(\w)/g,(e,n)=>n.toUpperCase()).replace(Ch,"_"),Th(t)&&(t=`_${t}`),t||"_"}const gi=/^[$_\p{ID_Start}][$\u200C\u200D\p{ID_Continue}]*$/u,Jm=/^(?:0|[1-9]\d*)$/;function yi(t){return gi.test(t)?t==="__proto__"?'["__proto__"]':t:Jm.test(t)&&+t<=Number.MAX_SAFE_INTEGER?t:JSON.stringify(t)}function Es(t){return gi.test(t)?t:JSON.stringify(t)}class Ze{constructor(e,n,s,r,i,a){this.options=e,this.id=n,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=mi(n.split(/[/\\]/).pop());const{importers:l,dynamicImporters:c}=this;this.info={ast:null,attributes:a,code:null,dynamicallyImportedIdResolutions:Qe,dynamicallyImportedIds:Qe,get dynamicImporters(){return c.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,id:n,implicitlyLoadedAfterOneOf:Qe,implicitlyLoadedBefore:Qe,importedIdResolutions:Qe,importedIds:Qe,get importers(){return l.sort()},isEntry:!1,isExternal:!0,isIncluded:null,meta:r,moduleSideEffects:s,syntheticNamedExports:!1}}cacheInfoGetters(){Nh(this.info,["dynamicImporters","importers"])}getVariableForExportName(e){const n=this.declarations.get(e);if(n)return[n];const s=new tr(this,e);return this.declarations.set(e,s),this.exportedVariables.set(s,e),[s]}suggestName(e){const n=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,n),n>this.mostCommonSuggestion&&(this.mostCommonSuggestion=n,this.suggestedVariableName=e)}warnUnusedImports(){const e=[...this.declarations].filter(([l,c])=>l!=="*"&&!c.included&&!this.reexported&&!c.referenced).map(([l])=>l);if(e.length===0)return;const n=new Set;for(const l of e)for(const c of this.declarations.get(l).module.importers)n.add(c);const s=[...n];var r,i,a;this.options.onLog(be,{code:"UNUSED_EXTERNAL_IMPORT",exporter:r=this.id,ids:a=s,message:`${cn(i=e,["is","are"])} imported from external module "${r}" but never used in ${cn(a.map(l=>xe(l)))}.`,names:i})}}function As(t){t.isExecuted=!0;const e=[t],n=new Set;for(const s of e)for(const r of[...s.dependencies,...s.implicitlyLoadedBefore])r instanceof Ze||r.isExecuted||!r.info.moduleSideEffects&&!s.implicitlyLoadedBefore.has(r)||n.has(r.id)||(r.isExecuted=!0,n.add(r.id),e.push(r))}const Mt=()=>{};var yt=["var","let","const","init","get","set","constructor","method","-","+","!","~","typeof","void","delete","++","--","==","!=","===","!==","<","<=",">",">=","<<",">>",">>>","+","-","*","/","%","|","^","&","||","&&","in","instanceof","**","??","=","+=","-=","*=","/=","%=","<<=",">>=",">>>=","|=","^=","&=","**=","&&=","||=","??=","pure","noSideEffects","sourcemap","using","await using"];const ws="_rollupAnnotations",Rh="_rollupRemoved",Rt=(t,e)=>{if(t===0)return Qe;const n=e[t++],s=new Array(n);for(let r=0;r<n;r++)s[r]=Ym(e[t++],e);return s},Ym=(t,e)=>{const n=e[t++];return{end:e[t++],start:n,type:yt[e[t]]}},zn={ArrayExpression:["elements"],ArrayPattern:["elements"],ArrowFunctionExpression:["params","body"],AssignmentExpression:["left","right"],AssignmentPattern:["left","right"],AwaitExpression:["argument"],BinaryExpression:["left","right"],BlockStatement:["body"],BreakStatement:["label"],CallExpression:["callee","arguments"],CatchClause:["param","body"],ChainExpression:["expression"],ClassBody:["body"],ClassDeclaration:["decorators","id","superClass","body"],ClassExpression:["decorators","id","superClass","body"],ConditionalExpression:["test","consequent","alternate"],ContinueStatement:["label"],DebuggerStatement:[],Decorator:["expression"],DoWhileStatement:["body","test"],EmptyStatement:[],ExportAllDeclaration:["exported","source","attributes"],ExportDefaultDeclaration:["declaration"],ExportNamedDeclaration:["specifiers","source","attributes","declaration"],ExportSpecifier:["local","exported"],ExpressionStatement:["expression"],ForInStatement:["left","right","body"],ForOfStatement:["left","right","body"],ForStatement:["init","test","update","body"],FunctionDeclaration:["id","params","body"],FunctionExpression:["id","params","body"],Identifier:[],IfStatement:["test","consequent","alternate"],ImportAttribute:["key","value"],ImportDeclaration:["specifiers","source","attributes"],ImportDefaultSpecifier:["local"],ImportExpression:["source","options"],ImportNamespaceSpecifier:["local"],ImportSpecifier:["imported","local"],JSXAttribute:["name","value"],JSXClosingElement:["name"],JSXClosingFragment:[],JSXElement:["openingElement","children","closingElement"],JSXEmptyExpression:[],JSXExpressionContainer:["expression"],JSXFragment:["openingFragment","children","closingFragment"],JSXIdentifier:[],JSXMemberExpression:["object","property"],JSXNamespacedName:["namespace","name"],JSXOpeningElement:["name","attributes"],JSXOpeningFragment:[],JSXSpreadAttribute:["argument"],JSXSpreadChild:["expression"],JSXText:[],LabeledStatement:["label","body"],Literal:[],LogicalExpression:["left","right"],MemberExpression:["object","property"],MetaProperty:["meta","property"],MethodDefinition:["decorators","key","value"],NewExpression:["callee","arguments"],ObjectExpression:["properties"],ObjectPattern:["properties"],PanicError:[],ParseError:[],PrivateIdentifier:[],Program:["body"],Property:["key","value"],PropertyDefinition:["decorators","key","value"],RestElement:["argument"],ReturnStatement:["argument"],SequenceExpression:["expressions"],SpreadElement:["argument"],StaticBlock:["body"],Super:[],SwitchCase:["test","consequent"],SwitchStatement:["discriminant","cases"],TaggedTemplateExpression:["tag","quasi"],TemplateElement:[],TemplateLiteral:["quasis","expressions"],ThisExpression:[],ThrowStatement:["argument"],TryStatement:["block","handler","finalizer"],UnaryExpression:["argument"],UpdateExpression:["argument"],VariableDeclaration:["declarations"],VariableDeclarator:["id","init"],WhileStatement:["test","body"],YieldExpression:["argument"]},Dh="variables",Xt=Symbol("IS_SKIPPED_CHAIN");class ee extends Pt{get deoptimized(){return Oe(this.flags,2)}set deoptimized(e){this.flags=Le(this.flags,2,e)}constructor(e,n){super(),this.parent=e,this.scope=n,this.createScope(n)}addExportedVariables(e,n){}bind(){for(const e of zn[this.type]){const n=this[e];if(Array.isArray(n))for(const s of n)s?.bind();else n&&n.bind()}}createScope(e){this.scope=e}hasEffects(e){this.deoptimized||this.applyDeoptimizations();for(const n of zn[this.type]){const s=this[n];if(s!==null){if(Array.isArray(s)){for(const r of s)if(r?.hasEffects(e))return!0}else if(s.hasEffects(e))return!0}}return!1}hasEffectsAsAssignmentTarget(e,n){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(ae,this.assignmentInteraction,e)}include(e,n,s){this.included||this.includeNode(e);for(const r of zn[this.type]){const i=this[r];if(i!==null)if(Array.isArray(i))for(const a of i)a?.include(e,n);else i.include(e,n)}}includeNode(e){this.included=!0,this.deoptimized||this.applyDeoptimizations();for(const n of zn[this.type]){const s=this[n];if(s!==null)if(Array.isArray(s))for(const r of s)r?.includePath(ie,e);else s.includePath(ie,e)}}includeAsAssignmentTarget(e,n,s){this.include(e,n)}initialise(){this.scope.context.magicString.addSourcemapLocation(this.start),this.scope.context.magicString.addSourcemapLocation(this.end)}parseNode(e){for(const[n,s]of Object.entries(e))if(!this.hasOwnProperty(n))if(n.charCodeAt(0)===95)n===ws?this.annotations=s:n===Rh&&(this.invalidAnnotations=s);else if(typeof s!="object"||s===null)this[n]=s;else if(Array.isArray(s)){this[n]=new Array(s.length);let r=0;for(const i of s)this[n][r++]=i===null?null:new(this.scope.context.getNodeConstructor(i.type))(this,this.scope).parseNode(i)}else this[n]=new(this.scope.context.getNodeConstructor(s.type))(this,this.scope).parseNode(s);return zn[e.type]||=function(n){return Object.keys(n).filter(s=>typeof n[s]=="object"&&s.charCodeAt(0)!==95)}(e),this.initialise(),this}removeAnnotations(e){if(this.annotations)for(const n of this.annotations)e.remove(n.start,n.end)}render(e,n){for(const s of zn[this.type]){const r=this[s];if(r!==null)if(Array.isArray(r))for(const i of r)i?.render(e,n);else r.render(e,n)}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:1}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(ys())}applyDeoptimizations(){this.deoptimized=!0;for(const e of zn[this.type]){const n=this[e];if(n!==null)if(Array.isArray(n))for(const s of n)s?.deoptimizePath(ie);else n.deoptimizePath(ie)}this.scope.context.requestTreeshakingPass()}}function dt(){this.included=!0,this.deoptimized||this.applyDeoptimizations()}function ze(){this.included=!0}function Te(){this.deoptimized=!0}function Qm(t){return t instanceof ee&&t.type===oa}function Zm(t){return t instanceof ee&&t.type==="FunctionExpression"}function eg(t){return t instanceof ee&&t.type===Ys}function tg(t){return t instanceof ee&&t.type==="MemberExpression"}function ga(t){return t instanceof ee&&t.type==="ImportExpression"}function ng(t){re