@modern-js/module-tools 2.21.1 → 2.22.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.
Files changed (115) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/compiled/@rollup/plugin-json/@rollup/pluginutils/types/index.d.ts +8 -2
  3. package/compiled/@rollup/plugin-json/estree/index.d.ts +677 -548
  4. package/compiled/@rollup/plugin-json/index.js +1 -1
  5. package/compiled/@rollup/plugin-json/package.json +1 -1
  6. package/compiled/@rollup/plugin-json/rollup/dist/rollup.d.ts +167 -150
  7. package/compiled/@rollup/plugin-json/types/index.d.ts +2 -2
  8. package/compiled/rollup/249.index.js +103 -0
  9. package/compiled/rollup/index.js +36 -21
  10. package/compiled/rollup/package.json +1 -1
  11. package/compiled/rollup/types/rollup.d.ts +167 -150
  12. package/compiled/rollup-plugin-dts/dist/rollup-plugin-dts.d.ts +3 -105
  13. package/compiled/rollup-plugin-dts/index.js +1 -1
  14. package/compiled/rollup-plugin-dts/package.json +1 -1
  15. package/compiled/rollup-plugin-dts/rollup/dist/rollup.d.ts +167 -150
  16. package/dist/build.js +3 -1
  17. package/dist/build.js.map +1 -1
  18. package/dist/builder/build.js +37 -14
  19. package/dist/builder/build.js.map +1 -1
  20. package/dist/builder/clear.js +6 -2
  21. package/dist/builder/clear.js.map +1 -1
  22. package/dist/builder/copy.js +9 -3
  23. package/dist/builder/copy.js.map +1 -1
  24. package/dist/builder/dts/index.js +6 -2
  25. package/dist/builder/dts/index.js.map +1 -1
  26. package/dist/builder/dts/rollup.js +3 -1
  27. package/dist/builder/dts/rollup.js.map +1 -1
  28. package/dist/builder/dts/tsc.js +6 -2
  29. package/dist/builder/dts/tsc.js.map +1 -1
  30. package/dist/builder/index.js +3 -1
  31. package/dist/builder/index.js.map +1 -1
  32. package/dist/builder/platform.js +3 -1
  33. package/dist/builder/platform.js.map +1 -1
  34. package/dist/cli.js +3 -1
  35. package/dist/cli.js.map +1 -1
  36. package/dist/command.js +12 -4
  37. package/dist/command.js.map +1 -1
  38. package/dist/config/defineConfig.js +6 -2
  39. package/dist/config/defineConfig.js.map +1 -1
  40. package/dist/config/legacySchema.js +21 -7
  41. package/dist/config/legacySchema.js.map +1 -1
  42. package/dist/config/normalize.js +18 -6
  43. package/dist/config/normalize.js.map +1 -1
  44. package/dist/config/schema.js +21 -7
  45. package/dist/config/schema.js.map +1 -1
  46. package/dist/config/transformLegacyConfig.js +30 -10
  47. package/dist/config/transformLegacyConfig.js.map +1 -1
  48. package/dist/constants/build.js +3 -1
  49. package/dist/constants/build.js.map +1 -1
  50. package/dist/constants/buildPresets.js +54 -18
  51. package/dist/constants/buildPresets.js.map +1 -1
  52. package/dist/constants/colors.js +9 -3
  53. package/dist/constants/colors.js.map +1 -1
  54. package/dist/constants/dts.js +12 -4
  55. package/dist/constants/dts.js.map +1 -1
  56. package/dist/constants/file.js +9 -3
  57. package/dist/constants/file.js.map +1 -1
  58. package/dist/constants/legacyBuildPresets.js +18 -6
  59. package/dist/constants/legacyBuildPresets.js.map +1 -1
  60. package/dist/constants/log.js +21 -7
  61. package/dist/constants/log.js.map +1 -1
  62. package/dist/dev.js +6 -2
  63. package/dist/dev.js.map +1 -1
  64. package/dist/error.js +18 -6
  65. package/dist/error.js.map +1 -1
  66. package/dist/hooks/build.js +6 -2
  67. package/dist/hooks/build.js.map +1 -1
  68. package/dist/hooks/dev.js +3 -1
  69. package/dist/hooks/dev.js.map +1 -1
  70. package/dist/hooks/index.js +3 -1
  71. package/dist/hooks/index.js.map +1 -1
  72. package/dist/hooks/misc.js +3 -1
  73. package/dist/hooks/misc.js.map +1 -1
  74. package/dist/index.js +12 -4
  75. package/dist/index.js.map +1 -1
  76. package/dist/locale/en.js +3 -1
  77. package/dist/locale/en.js.map +1 -1
  78. package/dist/locale/index.js +6 -2
  79. package/dist/locale/index.js.map +1 -1
  80. package/dist/locale/zh.js +3 -1
  81. package/dist/locale/zh.js.map +1 -1
  82. package/dist/plugins.js +3 -1
  83. package/dist/plugins.js.map +1 -1
  84. package/dist/types/config/index.d.ts +3 -0
  85. package/dist/types/config/index.js.map +1 -1
  86. package/dist/utils/builder.js +15 -5
  87. package/dist/utils/builder.js.map +1 -1
  88. package/dist/utils/common.js +3 -1
  89. package/dist/utils/common.js.map +1 -1
  90. package/dist/utils/config.js +15 -5
  91. package/dist/utils/config.js.map +1 -1
  92. package/dist/utils/context.js +3 -1
  93. package/dist/utils/context.js.map +1 -1
  94. package/dist/utils/dts.js +15 -5
  95. package/dist/utils/dts.js.map +1 -1
  96. package/dist/utils/input.js +15 -5
  97. package/dist/utils/input.js.map +1 -1
  98. package/dist/utils/language.js +3 -1
  99. package/dist/utils/language.js.map +1 -1
  100. package/dist/utils/libuildPlugins.js +6 -2
  101. package/dist/utils/libuildPlugins.js.map +1 -1
  102. package/dist/utils/log.js +3 -1
  103. package/dist/utils/log.js.map +1 -1
  104. package/dist/utils/onExit.js +3 -1
  105. package/dist/utils/onExit.js.map +1 -1
  106. package/dist/utils/path.js +3 -1
  107. package/dist/utils/path.js.map +1 -1
  108. package/dist/utils/print.js +21 -7
  109. package/dist/utils/print.js.map +1 -1
  110. package/dist/utils/style.js +12 -4
  111. package/dist/utils/style.js.map +1 -1
  112. package/dist/utils/tspathsTransform.js +3 -1
  113. package/dist/utils/tspathsTransform.js.map +1 -1
  114. package/package.json +16 -16
  115. package/compiled/@rollup/plugin-json/license +0 -21
@@ -1,40 +1,52 @@
1
- (()=>{var e={249:(e,t,i)=>{"use strict";if(process.platform!=="darwin"){throw new Error(`Module 'fsevents' is not compatible with platform '${process.platform}'`)}const s=i(653);const n=s.constants;function watch(e,t,i){if(typeof e!=="string"){throw new TypeError(`fsevents argument 1 must be a string and not a ${typeof e}`)}if("function"===typeof t&&"undefined"===typeof i){i=t;t=s.flags.SinceNow}if(typeof t!=="number"){throw new TypeError(`fsevents argument 2 must be a number and not a ${typeof t}`)}if(typeof i!=="function"){throw new TypeError(`fsevents argument 3 must be a function and not a ${typeof i}`)}let n=s.start(s.global,e,t,i);if(!n)throw new Error(`could not watch: ${e}`);return()=>{const e=n?Promise.resolve(n).then(s.stop):Promise.resolve(undefined);n=undefined;return e}}function getInfo(e,t){return{path:e,flags:t,event:getEventType(t),type:getFileType(t),changes:getFileChanges(t)}}function getFileType(e){if(n.ItemIsFile&e)return"file";if(n.ItemIsDir&e)return"directory";if(n.ItemIsSymlink&e)return"symlink"}function anyIsTrue(e){for(let t in e){if(e[t])return true}return false}function getEventType(e){if(n.ItemRemoved&e)return"deleted";if(n.ItemRenamed&e)return"moved";if(n.ItemCreated&e)return"created";if(n.ItemModified&e)return"modified";if(n.RootChanged&e)return"root-changed";if(n.ItemCloned&e)return"cloned";if(anyIsTrue(e))return"modified";return"unknown"}function getFileChanges(e){return{inode:!!(n.ItemInodeMetaMod&e),finder:!!(n.ItemFinderInfoMod&e),access:!!(n.ItemChangeOwner&e),xattrs:!!(n.ItemXattrMod&e)}}t.watch=watch;t.getInfo=getInfo;t.constants=n},695:(e,t,i)=>{"use strict";
1
+ (()=>{"use strict";var e={10:(e,t,i)=>{
2
2
  /*
3
3
  @license
4
- Rollup.js v2.79.0
5
- Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
4
+ Rollup.js v3.23.0
5
+ Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975
6
6
 
7
7
  https://github.com/rollup/rollup
8
8
 
9
9
  Released under the MIT License.
10
- */Object.defineProperties(t,{__esModule:{value:true},[Symbol.toStringTag]:{value:"Module"}});const s=i(17);i(822);i(282);i(74);i(113);i(147);i(361);t.VERSION=s.version;t.defineConfig=s.defineConfig;t.rollup=s.rollup;t.watch=s.watch},227:(e,t,i)=>{"use strict";
10
+ */
11
+ Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=i(194);const n=i(12);i(742);i(224);i(411);i(17);i(846);i(5);i(977);i(882);t.VERSION=s.version;t.defineConfig=s.defineConfig;t.rollup=s.rollup;t.watch=n.watch},882:(e,t,i)=>{
11
12
  /*
12
13
  @license
13
- Rollup.js v2.79.0
14
- Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
14
+ Rollup.js v3.23.0
15
+ Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975
15
16
 
16
17
  https://github.com/rollup/rollup
17
18
 
18
19
  Released under the MIT License.
19
- */const s=i(17);const n=i(147);const r=i(837);const o=i(781);const l=i(822);const c=i(37);const u=i(361);var h={};const d=n;const{Readable:p}=o;const f=l;const{promisify:m}=r;const g=s.picomatch.exports;const y=m(d.readdir);const E=m(d.stat);const x=m(d.lstat);const v=m(d.realpath);const b="!";const S="READDIRP_RECURSIVE_ERROR";const A=new Set(["ENOENT","EPERM","EACCES","ELOOP",S]);const w="files";const I="directories";const C="files_directories";const k="all";const _=[w,I,C,k];const isNormalFlowError=e=>A.has(e.code);const[P,N]=process.versions.node.split(".").slice(0,2).map((e=>Number.parseInt(e,10)));const R=process.platform==="win32"&&(P>10||P===10&&N>=5);const normalizeFilter=e=>{if(e===undefined)return;if(typeof e==="function")return e;if(typeof e==="string"){const t=g(e.trim());return e=>t(e.basename)}if(Array.isArray(e)){const t=[];const i=[];for(const s of e){const e=s.trim();if(e.charAt(0)===b){i.push(g(e.slice(1)))}else{t.push(g(e))}}if(i.length>0){if(t.length>0){return e=>t.some((t=>t(e.basename)))&&!i.some((t=>t(e.basename)))}return e=>!i.some((t=>t(e.basename)))}return e=>t.some((t=>t(e.basename)))}};class ReaddirpStream extends p{static get defaultOptions(){return{root:".",fileFilter:e=>true,directoryFilter:e=>true,type:w,lstat:false,depth:2147483648,alwaysStat:false}}constructor(e={}){super({objectMode:true,autoDestroy:true,highWaterMark:e.highWaterMark||4096});const t={...ReaddirpStream.defaultOptions,...e};const{root:i,type:s}=t;this._fileFilter=normalizeFilter(t.fileFilter);this._directoryFilter=normalizeFilter(t.directoryFilter);const n=t.lstat?x:E;if(R){this._stat=e=>n(e,{bigint:true})}else{this._stat=n}this._maxDepth=t.depth;this._wantsDir=[I,C,k].includes(s);this._wantsFile=[w,C,k].includes(s);this._wantsEverything=s===k;this._root=f.resolve(i);this._isDirent="Dirent"in d&&!t.alwaysStat;this._statsProp=this._isDirent?"dirent":"stats";this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};this.parents=[this._exploreDir(i,1)];this.reading=false;this.parent=undefined}async _read(e){if(this.reading)return;this.reading=true;try{while(!this.destroyed&&e>0){const{path:t,depth:i,files:s=[]}=this.parent||{};if(s.length>0){const n=s.splice(0,e).map((e=>this._formatEntry(e,t)));for(const t of await Promise.all(n)){if(this.destroyed)return;const s=await this._getEntryType(t);if(s==="directory"&&this._directoryFilter(t)){if(i<=this._maxDepth){this.parents.push(this._exploreDir(t.fullPath,i+1))}if(this._wantsDir){this.push(t);e--}}else if((s==="file"||this._includeAsFile(t))&&this._fileFilter(t)){if(this._wantsFile){this.push(t);e--}}}}else{const e=this.parents.pop();if(!e){this.push(null);break}this.parent=await e;if(this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=false}}async _exploreDir(e,t){let i;try{i=await y(e,this._rdOptions)}catch(e){this._onError(e)}return{files:i,depth:t,path:e}}async _formatEntry(e,t){let i;try{const s=this._isDirent?e.name:e;const n=f.resolve(f.join(t,s));i={path:f.relative(this._root,n),fullPath:n,basename:s};i[this._statsProp]=this._isDirent?e:await this._stat(n)}catch(e){this._onError(e)}return i}_onError(e){if(isNormalFlowError(e)&&!this.destroyed){this.emit("warn",e)}else{this.destroy(e)}}async _getEntryType(e){const t=e&&e[this._statsProp];if(!t){return}if(t.isFile()){return"file"}if(t.isDirectory()){return"directory"}if(t&&t.isSymbolicLink()){const t=e.fullPath;try{const e=await v(t);const i=await x(e);if(i.isFile()){return"file"}if(i.isDirectory()){const i=e.length;if(t.startsWith(e)&&t.substr(i,1)===f.sep){const i=new Error(`Circular symlink detected: "${t}" points to "${e}"`);i.code=S;return this._onError(i)}return"directory"}}catch(e){this._onError(e)}}}_includeAsFile(e){const t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}}const readdirp$1=(e,t={})=>{let i=t.entryType||t.type;if(i==="both")i=C;if(i)t.type=i;if(!e){throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)")}else if(typeof e!=="string"){throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)")}else if(i&&!_.includes(i)){throw new Error(`readdirp: Invalid type passed. Use one of ${_.join(", ")}`)}t.root=e;return new ReaddirpStream(t)};const readdirpPromise=(e,t={})=>new Promise(((i,s)=>{const n=[];readdirp$1(e,t).on("data",(e=>n.push(e))).on("end",(()=>i(n))).on("error",(e=>s(e)))}));readdirp$1.promise=readdirpPromise;readdirp$1.ReaddirpStream=ReaddirpStream;readdirp$1.default=readdirp$1;var T=readdirp$1;var $={exports:{}};
20
+ */
21
+ let s;let n;async function loadFsEvents(){try{({default:s}=await i.e(249).then(i.t.bind(i,249,19)))}catch(e){n=e}}function getFsEvents(){if(n)throw n;return s}const r=Object.defineProperty({__proto__:null,getFsEvents:getFsEvents,loadFsEvents:loadFsEvents},Symbol.toStringTag,{value:"Module"});t.fseventsImporter=r;t.loadFsEvents=loadFsEvents},844:(e,t,i)=>{
22
+ /*
23
+ @license
24
+ Rollup.js v3.23.0
25
+ Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975
26
+
27
+ https://github.com/rollup/rollup
28
+
29
+ Released under the MIT License.
30
+ */
31
+ const s=i(194);const n=i(147);const r=i(837);const o=i(781);const l=i(17);const c=i(37);const u=i(882);const h=i(361);var d={};const p=n;const{Readable:f}=o;const m=l;const{promisify:g}=r;const y=s.picomatch;const E=g(p.readdir);const x=g(p.stat);const b=g(p.lstat);const v=g(p.realpath);const S="!";const A="READDIRP_RECURSIVE_ERROR";const w=new Set(["ENOENT","EPERM","EACCES","ELOOP",A]);const I="files";const k="directories";const C="files_directories";const _="all";const P=[I,k,C,_];const isNormalFlowError=e=>w.has(e.code);const[N,R]=process.versions.node.split(".").slice(0,2).map((e=>Number.parseInt(e,10)));const $=process.platform==="win32"&&(N>10||N===10&&R>=5);const normalizeFilter=e=>{if(e===undefined)return;if(typeof e==="function")return e;if(typeof e==="string"){const t=y(e.trim());return e=>t(e.basename)}if(Array.isArray(e)){const t=[];const i=[];for(const s of e){const e=s.trim();if(e.charAt(0)===S){i.push(y(e.slice(1)))}else{t.push(y(e))}}if(i.length>0){if(t.length>0){return e=>t.some((t=>t(e.basename)))&&!i.some((t=>t(e.basename)))}return e=>!i.some((t=>t(e.basename)))}return e=>t.some((t=>t(e.basename)))}};class ReaddirpStream extends f{static get defaultOptions(){return{root:".",fileFilter:e=>true,directoryFilter:e=>true,type:I,lstat:false,depth:2147483648,alwaysStat:false}}constructor(e={}){super({objectMode:true,autoDestroy:true,highWaterMark:e.highWaterMark||4096});const t={...ReaddirpStream.defaultOptions,...e};const{root:i,type:s}=t;this._fileFilter=normalizeFilter(t.fileFilter);this._directoryFilter=normalizeFilter(t.directoryFilter);const n=t.lstat?b:x;if($){this._stat=e=>n(e,{bigint:true})}else{this._stat=n}this._maxDepth=t.depth;this._wantsDir=[k,C,_].includes(s);this._wantsFile=[I,C,_].includes(s);this._wantsEverything=s===_;this._root=m.resolve(i);this._isDirent="Dirent"in p&&!t.alwaysStat;this._statsProp=this._isDirent?"dirent":"stats";this._rdOptions={encoding:"utf8",withFileTypes:this._isDirent};this.parents=[this._exploreDir(i,1)];this.reading=false;this.parent=undefined}async _read(e){if(this.reading)return;this.reading=true;try{while(!this.destroyed&&e>0){const{path:t,depth:i,files:s=[]}=this.parent||{};if(s.length>0){const n=s.splice(0,e).map((e=>this._formatEntry(e,t)));for(const t of await Promise.all(n)){if(this.destroyed)return;const s=await this._getEntryType(t);if(s==="directory"&&this._directoryFilter(t)){if(i<=this._maxDepth){this.parents.push(this._exploreDir(t.fullPath,i+1))}if(this._wantsDir){this.push(t);e--}}else if((s==="file"||this._includeAsFile(t))&&this._fileFilter(t)){if(this._wantsFile){this.push(t);e--}}}}else{const e=this.parents.pop();if(!e){this.push(null);break}this.parent=await e;if(this.destroyed)return}}}catch(e){this.destroy(e)}finally{this.reading=false}}async _exploreDir(e,t){let i;try{i=await E(e,this._rdOptions)}catch(e){this._onError(e)}return{files:i,depth:t,path:e}}async _formatEntry(e,t){let i;try{const s=this._isDirent?e.name:e;const n=m.resolve(m.join(t,s));i={path:m.relative(this._root,n),fullPath:n,basename:s};i[this._statsProp]=this._isDirent?e:await this._stat(n)}catch(e){this._onError(e)}return i}_onError(e){if(isNormalFlowError(e)&&!this.destroyed){this.emit("warn",e)}else{this.destroy(e)}}async _getEntryType(e){const t=e&&e[this._statsProp];if(!t){return}if(t.isFile()){return"file"}if(t.isDirectory()){return"directory"}if(t&&t.isSymbolicLink()){const t=e.fullPath;try{const e=await v(t);const i=await b(e);if(i.isFile()){return"file"}if(i.isDirectory()){const i=e.length;if(t.startsWith(e)&&t.substr(i,1)===m.sep){const i=new Error(`Circular symlink detected: "${t}" points to "${e}"`);i.code=A;return this._onError(i)}return"directory"}}catch(e){this._onError(e)}}}_includeAsFile(e){const t=e&&e[this._statsProp];return t&&this._wantsEverything&&!t.isDirectory()}}const readdirp$1=(e,t={})=>{let i=t.entryType||t.type;if(i==="both")i=C;if(i)t.type=i;if(!e){throw new Error("readdirp: root argument is required. Usage: readdirp(root, options)")}else if(typeof e!=="string"){throw new TypeError("readdirp: root argument must be a string. Usage: readdirp(root, options)")}else if(i&&!P.includes(i)){throw new Error(`readdirp: Invalid type passed. Use one of ${P.join(", ")}`)}t.root=e;return new ReaddirpStream(t)};const readdirpPromise=(e,t={})=>new Promise(((i,s)=>{const n=[];readdirp$1(e,t).on("data",(e=>n.push(e))).on("end",(()=>i(n))).on("error",(e=>s(e)))}));readdirp$1.promise=readdirpPromise;readdirp$1.ReaddirpStream=ReaddirpStream;readdirp$1.default=readdirp$1;var O=readdirp$1;var T={exports:{}};
20
32
  /*!
21
33
  * normalize-path <https://github.com/jonschlinkert/normalize-path>
22
34
  *
23
35
  * Copyright (c) 2014-2018, Jon Schlinkert.
24
36
  * Released under the MIT License.
25
- */var normalizePath$2=function(e,t){if(typeof e!=="string"){throw new TypeError("expected path to be a string")}if(e==="\\"||e==="/")return"/";var i=e.length;if(i<=1)return e;var s="";if(i>4&&e[3]==="\\"){var n=e[2];if((n==="?"||n===".")&&e.slice(0,2)==="\\\\"){e=e.slice(2);s="//"}}var r=e.split(/[/\\]+/);if(t!==false&&r[r.length-1]===""){r.pop()}return s+r.join("/")};Object.defineProperty($.exports,"__esModule",{value:true});const O=s.picomatch.exports;const D=normalizePath$2;const M="!";const L={returnIndex:false};const arrify$1=e=>Array.isArray(e)?e:[e];const createPattern=(e,t)=>{if(typeof e==="function"){return e}if(typeof e==="string"){const i=O(e,t);return t=>e===t||i(t)}if(e instanceof RegExp){return t=>e.test(t)}return e=>false};const matchPatterns=(e,t,i,s)=>{const n=Array.isArray(i);const r=n?i[0]:i;if(!n&&typeof r!=="string"){throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r))}const o=D(r);for(let e=0;e<t.length;e++){const i=t[e];if(i(o)){return s?-1:false}}const l=n&&[o].concat(i.slice(1));for(let t=0;t<e.length;t++){const i=e[t];if(n?i(...l):i(o)){return s?t:true}}return s?-1:false};const anymatch$1=(e,t,i=L)=>{if(e==null){throw new TypeError("anymatch: specify first argument")}const s=typeof i==="boolean"?{returnIndex:i}:i;const n=s.returnIndex||false;const r=arrify$1(e);const o=r.filter((e=>typeof e==="string"&&e.charAt(0)===M)).map((e=>e.slice(1))).map((e=>O(e,s)));const l=r.filter((e=>typeof e!=="string"||typeof e==="string"&&e.charAt(0)!==M)).map((e=>createPattern(e,s)));if(t==null){return(e,t=false)=>{const i=typeof t==="boolean"?t:false;return matchPatterns(l,o,e,i)}}return matchPatterns(l,o,t,n)};anymatch$1.default=anymatch$1;$.exports=anymatch$1;
37
+ */var normalizePath$2=function(e,t){if(typeof e!=="string"){throw new TypeError("expected path to be a string")}if(e==="\\"||e==="/")return"/";var i=e.length;if(i<=1)return e;var s="";if(i>4&&e[3]==="\\"){var n=e[2];if((n==="?"||n===".")&&e.slice(0,2)==="\\\\"){e=e.slice(2);s="//"}}var r=e.split(/[/\\]+/);if(t!==false&&r[r.length-1]===""){r.pop()}return s+r.join("/")};var D=T.exports;Object.defineProperty(D,"__esModule",{value:true});const M=s.picomatch;const L=normalizePath$2;const B="!";const F={returnIndex:false};const arrify$1=e=>Array.isArray(e)?e:[e];const createPattern=(e,t)=>{if(typeof e==="function"){return e}if(typeof e==="string"){const i=M(e,t);return t=>e===t||i(t)}if(e instanceof RegExp){return t=>e.test(t)}return e=>false};const matchPatterns=(e,t,i,s)=>{const n=Array.isArray(i);const r=n?i[0]:i;if(!n&&typeof r!=="string"){throw new TypeError("anymatch: second argument must be a string: got "+Object.prototype.toString.call(r))}const o=L(r,false);for(let e=0;e<t.length;e++){const i=t[e];if(i(o)){return s?-1:false}}const l=n&&[o].concat(i.slice(1));for(let t=0;t<e.length;t++){const i=e[t];if(n?i(...l):i(o)){return s?t:true}}return s?-1:false};const anymatch$1=(e,t,i=F)=>{if(e==null){throw new TypeError("anymatch: specify first argument")}const s=typeof i==="boolean"?{returnIndex:i}:i;const n=s.returnIndex||false;const r=arrify$1(e);const o=r.filter((e=>typeof e==="string"&&e.charAt(0)===B)).map((e=>e.slice(1))).map((e=>M(e,s)));const l=r.filter((e=>typeof e!=="string"||typeof e==="string"&&e.charAt(0)!==B)).map((e=>createPattern(e,s)));if(t==null){return(e,t=false)=>{const i=typeof t==="boolean"?t:false;return matchPatterns(l,o,e,i)}}return matchPatterns(l,o,t,n)};anymatch$1.default=anymatch$1;T.exports=anymatch$1;var V=T.exports;
26
38
  /*!
27
39
  * is-extglob <https://github.com/jonschlinkert/is-extglob>
28
40
  *
29
41
  * Copyright (c) 2014-2016, Jon Schlinkert.
30
42
  * Licensed under the MIT License.
31
- */var F=function isExtglob(e){if(typeof e!=="string"||e===""){return false}var t;while(t=/(\\).|([@?!+*]\(.*\))/g.exec(e)){if(t[2])return true;e=e.slice(t.index+t[0].length)}return false};
43
+ */var z=function isExtglob(e){if(typeof e!=="string"||e===""){return false}var t;while(t=/(\\).|([@?!+*]\(.*\))/g.exec(e)){if(t[2])return true;e=e.slice(t.index+t[0].length)}return false};
32
44
  /*!
33
45
  * is-glob <https://github.com/jonschlinkert/is-glob>
34
46
  *
35
47
  * Copyright (c) 2014-2017, Jon Schlinkert.
36
48
  * Released under the MIT License.
37
- */var V=F;var B={"{":"}","(":")","[":"]"};var strictCheck=function(e){if(e[0]==="!"){return true}var t=0;var i=-2;var s=-2;var n=-2;var r=-2;var o=-2;while(t<e.length){if(e[t]==="*"){return true}if(e[t+1]==="?"&&/[\].+)]/.test(e[t])){return true}if(s!==-1&&e[t]==="["&&e[t+1]!=="]"){if(s<t){s=e.indexOf("]",t)}if(s>t){if(o===-1||o>s){return true}o=e.indexOf("\\",t);if(o===-1||o>s){return true}}}if(n!==-1&&e[t]==="{"&&e[t+1]!=="}"){n=e.indexOf("}",t);if(n>t){o=e.indexOf("\\",t);if(o===-1||o>n){return true}}}if(r!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"){r=e.indexOf(")",t);if(r>t){o=e.indexOf("\\",t);if(o===-1||o>r){return true}}}if(i!==-1&&e[t]==="("&&e[t+1]!=="|"){if(i<t){i=e.indexOf("|",t)}if(i!==-1&&e[i+1]!==")"){r=e.indexOf(")",i);if(r>i){o=e.indexOf("\\",i);if(o===-1||o>r){return true}}}}if(e[t]==="\\"){var l=e[t+1];t+=2;var c=B[l];if(c){var u=e.indexOf(c,t);if(u!==-1){t=u+1}}if(e[t]==="!"){return true}}else{t++}}return false};var relaxedCheck=function(e){if(e[0]==="!"){return true}var t=0;while(t<e.length){if(/[*?{}()[\]]/.test(e[t])){return true}if(e[t]==="\\"){var i=e[t+1];t+=2;var s=B[i];if(s){var n=e.indexOf(s,t);if(n!==-1){t=n+1}}if(e[t]==="!"){return true}}else{t++}}return false};var z=function isGlob(e,t){if(typeof e!=="string"||e===""){return false}if(V(e)){return true}var i=strictCheck;if(t&&t.strict===false){i=relaxedCheck}return i(e)};var U=z;var H=l.posix.dirname;var j=c.platform()==="win32";var G="/";var W=/\\/g;var q=/[\{\[].*[\}\]]$/;var K=/(^|[^\\])([\{\[]|\([^\)]+$)/;var Y=/\\([\!\*\?\|\[\]\(\)\{\}])/g;var X=function globParent(e,t){var i=Object.assign({flipBackslashes:true},t);if(i.flipBackslashes&&j&&e.indexOf(G)<0){e=e.replace(W,G)}if(q.test(e)){e+=G}e+="a";do{e=H(e)}while(U(e)||K.test(e));return e.replace(Y,"$1")};var Q={};(function(e){e.isInteger=e=>{if(typeof e==="number"){return Number.isInteger(e)}if(typeof e==="string"&&e.trim()!==""){return Number.isInteger(Number(e))}return false};e.find=(e,t)=>e.nodes.find((e=>e.type===t));e.exceedsLimit=(t,i,s=1,n)=>{if(n===false)return false;if(!e.isInteger(t)||!e.isInteger(i))return false;return(Number(i)-Number(t))/Number(s)>=n};e.escapeNode=(e,t=0,i)=>{let s=e.nodes[t];if(!s)return;if(i&&s.type===i||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};e.encloseBrace=e=>{if(e.type!=="brace")return false;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}return false};e.isInvalidBrace=e=>{if(e.type!=="brace")return false;if(e.invalid===true||e.dollar)return true;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}if(e.open!==true||e.close!==true){e.invalid=true;return true}return false};e.isOpenOrClose=e=>{if(e.type==="open"||e.type==="close"){return true}return e.open===true||e.close===true};e.reduce=e=>e.reduce(((e,t)=>{if(t.type==="text")e.push(t.value);if(t.type==="range")t.type="text";return e}),[]);e.flatten=(...e)=>{const t=[];const flat=e=>{for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?flat(s):s!==void 0&&t.push(s)}return t};flat(e);return t}})(Q);const Z=Q;var stringify$4=(e,t={})=>{let stringify=(e,i={})=>{let s=t.escapeInvalid&&Z.isInvalidBrace(i);let n=e.invalid===true&&t.escapeInvalid===true;let r="";if(e.value){if((s||n)&&Z.isOpenOrClose(e)){return"\\"+e.value}return e.value}if(e.value){return e.value}if(e.nodes){for(let t of e.nodes){r+=stringify(t)}}return r};return stringify(e)};
49
+ */var j=z;var U={"{":"}","(":")","[":"]"};var strictCheck=function(e){if(e[0]==="!"){return true}var t=0;var i=-2;var s=-2;var n=-2;var r=-2;var o=-2;while(t<e.length){if(e[t]==="*"){return true}if(e[t+1]==="?"&&/[\].+)]/.test(e[t])){return true}if(s!==-1&&e[t]==="["&&e[t+1]!=="]"){if(s<t){s=e.indexOf("]",t)}if(s>t){if(o===-1||o>s){return true}o=e.indexOf("\\",t);if(o===-1||o>s){return true}}}if(n!==-1&&e[t]==="{"&&e[t+1]!=="}"){n=e.indexOf("}",t);if(n>t){o=e.indexOf("\\",t);if(o===-1||o>n){return true}}}if(r!==-1&&e[t]==="("&&e[t+1]==="?"&&/[:!=]/.test(e[t+2])&&e[t+3]!==")"){r=e.indexOf(")",t);if(r>t){o=e.indexOf("\\",t);if(o===-1||o>r){return true}}}if(i!==-1&&e[t]==="("&&e[t+1]!=="|"){if(i<t){i=e.indexOf("|",t)}if(i!==-1&&e[i+1]!==")"){r=e.indexOf(")",i);if(r>i){o=e.indexOf("\\",i);if(o===-1||o>r){return true}}}}if(e[t]==="\\"){var l=e[t+1];t+=2;var c=U[l];if(c){var u=e.indexOf(c,t);if(u!==-1){t=u+1}}if(e[t]==="!"){return true}}else{t++}}return false};var relaxedCheck=function(e){if(e[0]==="!"){return true}var t=0;while(t<e.length){if(/[*?{}()[\]]/.test(e[t])){return true}if(e[t]==="\\"){var i=e[t+1];t+=2;var s=U[i];if(s){var n=e.indexOf(s,t);if(n!==-1){t=n+1}}if(e[t]==="!"){return true}}else{t++}}return false};var H=function isGlob(e,t){if(typeof e!=="string"||e===""){return false}if(j(e)){return true}var i=strictCheck;if(t&&t.strict===false){i=relaxedCheck}return i(e)};var G=H;var W=l.posix.dirname;var q=c.platform()==="win32";var K="/";var Y=/\\/g;var Q=/[\{\[].*[\}\]]$/;var X=/(^|[^\\])([\{\[]|\([^\)]+$)/;var Z=/\\([\!\*\?\|\[\]\(\)\{\}])/g;var J=function globParent(e,t){var i=Object.assign({flipBackslashes:true},t);if(i.flipBackslashes&&q&&e.indexOf(K)<0){e=e.replace(Y,K)}if(Q.test(e)){e+=K}e+="a";do{e=W(e)}while(G(e)||X.test(e));return e.replace(Z,"$1")};var ee={};(function(e){e.isInteger=e=>{if(typeof e==="number"){return Number.isInteger(e)}if(typeof e==="string"&&e.trim()!==""){return Number.isInteger(Number(e))}return false};e.find=(e,t)=>e.nodes.find((e=>e.type===t));e.exceedsLimit=(t,i,s=1,n)=>{if(n===false)return false;if(!e.isInteger(t)||!e.isInteger(i))return false;return(Number(i)-Number(t))/Number(s)>=n};e.escapeNode=(e,t=0,i)=>{let s=e.nodes[t];if(!s)return;if(i&&s.type===i||s.type==="open"||s.type==="close"){if(s.escaped!==true){s.value="\\"+s.value;s.escaped=true}}};e.encloseBrace=e=>{if(e.type!=="brace")return false;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}return false};e.isInvalidBrace=e=>{if(e.type!=="brace")return false;if(e.invalid===true||e.dollar)return true;if(e.commas>>0+e.ranges>>0===0){e.invalid=true;return true}if(e.open!==true||e.close!==true){e.invalid=true;return true}return false};e.isOpenOrClose=e=>{if(e.type==="open"||e.type==="close"){return true}return e.open===true||e.close===true};e.reduce=e=>e.reduce(((e,t)=>{if(t.type==="text")e.push(t.value);if(t.type==="range")t.type="text";return e}),[]);e.flatten=(...e)=>{const t=[];const flat=e=>{for(let i=0;i<e.length;i++){let s=e[i];Array.isArray(s)?flat(s):s!==void 0&&t.push(s)}return t};flat(e);return t}})(ee);const te=ee;var stringify$4=(e,t={})=>{let stringify=(e,i={})=>{let s=t.escapeInvalid&&te.isInvalidBrace(i);let n=e.invalid===true&&t.escapeInvalid===true;let r="";if(e.value){if((s||n)&&te.isOpenOrClose(e)){return"\\"+e.value}return e.value}if(e.value){return e.value}if(e.nodes){for(let t of e.nodes){r+=stringify(t)}}return r};return stringify(e)};
38
50
  /*!
39
51
  * is-number <https://github.com/jonschlinkert/is-number>
40
52
  *
@@ -46,37 +58,40 @@
46
58
  *
47
59
  * Copyright (c) 2015-present, Jon Schlinkert.
48
60
  * Released under the MIT License.
49
- */const J=isNumber$2;const toRegexRange$1=(e,t,i)=>{if(J(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(J(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...i};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let n=String(s.relaxZeros);let r=String(s.shorthand);let o=String(s.capture);let l=String(s.wrap);let c=e+":"+t+"="+n+r+o+l;if(toRegexRange$1.cache.hasOwnProperty(c)){return toRegexRange$1.cache[c].result}let u=Math.min(e,t);let h=Math.max(e,t);if(Math.abs(u-h)===1){let i=e+"|"+t;if(s.capture){return`(${i})`}if(s.wrap===false){return i}return`(?:${i})`}let d=hasPadding(e)||hasPadding(t);let p={min:e,max:t,a:u,b:h};let f=[];let m=[];if(d){p.isPadded=d;p.maxLen=String(p.max).length}if(u<0){let e=h<0?Math.abs(h):1;m=splitToPatterns(e,Math.abs(u),p,s);u=p.a=0}if(h>=0){f=splitToPatterns(u,h,p,s)}p.negatives=m;p.positives=f;p.result=collatePatterns(m,f);if(s.capture===true){p.result=`(${p.result})`}else if(s.wrap!==false&&f.length+m.length>1){p.result=`(?:${p.result})`}toRegexRange$1.cache[c]=p;return p.result};function collatePatterns(e,t,i){let s=filterPatterns(e,t,"-",false)||[];let n=filterPatterns(t,e,"",false)||[];let r=filterPatterns(e,t,"-?",true)||[];let o=s.concat(r).concat(n);return o.join("|")}function splitToRanges(e,t){let i=1;let s=1;let n=countNines(e,i);let r=new Set([t]);while(e<=n&&n<=t){r.add(n);i+=1;n=countNines(e,i)}n=countZeros(t+1,s)-1;while(e<n&&n<=t){r.add(n);s+=1;n=countZeros(t+1,s)-1}r=[...r];r.sort(compare);return r}function rangeToPattern(e,t,i){if(e===t){return{pattern:e,count:[],digits:0}}let s=zip(e,t);let n=s.length;let r="";let o=0;for(let e=0;e<n;e++){let[t,i]=s[e];if(t===i){r+=t}else if(t!=="0"||i!=="9"){r+=toCharacterClass(t,i)}else{o++}}if(o){r+=i.shorthand===true?"\\d":"[0-9]"}return{pattern:r,count:[o],digits:n}}function splitToPatterns(e,t,i,s){let n=splitToRanges(e,t);let r=[];let o=e;let l;for(let e=0;e<n.length;e++){let t=n[e];let c=rangeToPattern(String(o),String(t),s);let u="";if(!i.isPadded&&l&&l.pattern===c.pattern){if(l.count.length>1){l.count.pop()}l.count.push(c.count[0]);l.string=l.pattern+toQuantifier(l.count);o=t+1;continue}if(i.isPadded){u=padZeros(t,i,s)}c.string=u+c.pattern+toQuantifier(c.count);r.push(c);o=t+1;l=c}return r}function filterPatterns(e,t,i,s,n){let r=[];for(let n of e){let{string:e}=n;if(!s&&!contains(t,"string",e)){r.push(i+e)}if(s&&contains(t,"string",e)){r.push(i+e)}}return r}function zip(e,t){let i=[];for(let s=0;s<e.length;s++)i.push([e[s],t[s]]);return i}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,i){return e.some((e=>e[t]===i))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,i=""]=e;if(i||t>1){return`{${t+(i?","+i:"")}}`}return""}function toCharacterClass(e,t,i){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,i){if(!t.isPadded){return e}let s=Math.abs(t.maxLen-String(e).length);let n=i.relaxZeros!==false;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${s}}`:`0{${s}}`}}}toRegexRange$1.cache={};toRegexRange$1.clearCache=()=>toRegexRange$1.cache={};var ee=toRegexRange$1;
61
+ */const ie=isNumber$2;const toRegexRange$1=(e,t,i)=>{if(ie(e)===false){throw new TypeError("toRegexRange: expected the first argument to be a number")}if(t===void 0||e===t){return String(e)}if(ie(t)===false){throw new TypeError("toRegexRange: expected the second argument to be a number.")}let s={relaxZeros:true,...i};if(typeof s.strictZeros==="boolean"){s.relaxZeros=s.strictZeros===false}let n=String(s.relaxZeros);let r=String(s.shorthand);let o=String(s.capture);let l=String(s.wrap);let c=e+":"+t+"="+n+r+o+l;if(toRegexRange$1.cache.hasOwnProperty(c)){return toRegexRange$1.cache[c].result}let u=Math.min(e,t);let h=Math.max(e,t);if(Math.abs(u-h)===1){let i=e+"|"+t;if(s.capture){return`(${i})`}if(s.wrap===false){return i}return`(?:${i})`}let d=hasPadding(e)||hasPadding(t);let p={min:e,max:t,a:u,b:h};let f=[];let m=[];if(d){p.isPadded=d;p.maxLen=String(p.max).length}if(u<0){let e=h<0?Math.abs(h):1;m=splitToPatterns(e,Math.abs(u),p,s);u=p.a=0}if(h>=0){f=splitToPatterns(u,h,p,s)}p.negatives=m;p.positives=f;p.result=collatePatterns(m,f);if(s.capture===true){p.result=`(${p.result})`}else if(s.wrap!==false&&f.length+m.length>1){p.result=`(?:${p.result})`}toRegexRange$1.cache[c]=p;return p.result};function collatePatterns(e,t,i){let s=filterPatterns(e,t,"-",false)||[];let n=filterPatterns(t,e,"",false)||[];let r=filterPatterns(e,t,"-?",true)||[];let o=s.concat(r).concat(n);return o.join("|")}function splitToRanges(e,t){let i=1;let s=1;let n=countNines(e,i);let r=new Set([t]);while(e<=n&&n<=t){r.add(n);i+=1;n=countNines(e,i)}n=countZeros(t+1,s)-1;while(e<n&&n<=t){r.add(n);s+=1;n=countZeros(t+1,s)-1}r=[...r];r.sort(compare);return r}function rangeToPattern(e,t,i){if(e===t){return{pattern:e,count:[],digits:0}}let s=zip(e,t);let n=s.length;let r="";let o=0;for(let e=0;e<n;e++){let[t,i]=s[e];if(t===i){r+=t}else if(t!=="0"||i!=="9"){r+=toCharacterClass(t,i)}else{o++}}if(o){r+=i.shorthand===true?"\\d":"[0-9]"}return{pattern:r,count:[o],digits:n}}function splitToPatterns(e,t,i,s){let n=splitToRanges(e,t);let r=[];let o=e;let l;for(let e=0;e<n.length;e++){let t=n[e];let c=rangeToPattern(String(o),String(t),s);let u="";if(!i.isPadded&&l&&l.pattern===c.pattern){if(l.count.length>1){l.count.pop()}l.count.push(c.count[0]);l.string=l.pattern+toQuantifier(l.count);o=t+1;continue}if(i.isPadded){u=padZeros(t,i,s)}c.string=u+c.pattern+toQuantifier(c.count);r.push(c);o=t+1;l=c}return r}function filterPatterns(e,t,i,s,n){let r=[];for(let n of e){let{string:e}=n;if(!s&&!contains(t,"string",e)){r.push(i+e)}if(s&&contains(t,"string",e)){r.push(i+e)}}return r}function zip(e,t){let i=[];for(let s=0;s<e.length;s++)i.push([e[s],t[s]]);return i}function compare(e,t){return e>t?1:t>e?-1:0}function contains(e,t,i){return e.some((e=>e[t]===i))}function countNines(e,t){return Number(String(e).slice(0,-t)+"9".repeat(t))}function countZeros(e,t){return e-e%Math.pow(10,t)}function toQuantifier(e){let[t=0,i=""]=e;if(i||t>1){return`{${t+(i?","+i:"")}}`}return""}function toCharacterClass(e,t,i){return`[${e}${t-e===1?"":"-"}${t}]`}function hasPadding(e){return/^-?(0+)\d/.test(e)}function padZeros(e,t,i){if(!t.isPadded){return e}let s=Math.abs(t.maxLen-String(e).length);let n=i.relaxZeros!==false;switch(s){case 0:return"";case 1:return n?"0?":"0";case 2:return n?"0{0,2}":"00";default:{return n?`0{0,${s}}`:`0{${s}}`}}}toRegexRange$1.cache={};toRegexRange$1.clearCache=()=>toRegexRange$1.cache={};var se=toRegexRange$1;
50
62
  /*!
51
63
  * fill-range <https://github.com/jonschlinkert/fill-range>
52
64
  *
53
65
  * Copyright (c) 2014-present, Jon Schlinkert.
54
66
  * Licensed under the MIT License.
55
- */const te=r;const ie=ee;const isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);const transform=e=>t=>e===true?Number(t):String(t);const isValidValue=e=>typeof e==="number"||typeof e==="string"&&e!=="";const isNumber=e=>Number.isInteger(+e);const zeros=e=>{let t=`${e}`;let i=-1;if(t[0]==="-")t=t.slice(1);if(t==="0")return false;while(t[++i]==="0");return i>0};const stringify$3=(e,t,i)=>{if(typeof e==="string"||typeof t==="string"){return true}return i.stringify===true};const pad=(e,t,i)=>{if(t>0){let i=e[0]==="-"?"-":"";if(i)e=e.slice(1);e=i+e.padStart(i?t-1:t,"0")}if(i===false){return String(e)}return e};const toMaxLen=(e,t)=>{let i=e[0]==="-"?"-":"";if(i){e=e.slice(1);t--}while(e.length<t)e="0"+e;return i?"-"+e:e};const toSequence=(e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0));e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let i=t.capture?"":"?:";let s="";let n="";let r;if(e.positives.length){s=e.positives.join("|")}if(e.negatives.length){n=`-(${i}${e.negatives.join("|")})`}if(s&&n){r=`${s}|${n}`}else{r=s||n}if(t.wrap){return`(${i}${r})`}return r};const toRange=(e,t,i,s)=>{if(i){return ie(e,t,{wrap:false,...s})}let n=String.fromCharCode(e);if(e===t)return n;let r=String.fromCharCode(t);return`[${n}-${r}]`};const toRegex=(e,t,i)=>{if(Array.isArray(e)){let t=i.wrap===true;let s=i.capture?"":"?:";return t?`(${s}${e.join("|")})`:e.join("|")}return ie(e,t,i)};const rangeError=(...e)=>new RangeError("Invalid range arguments: "+te.inspect(...e));const invalidRange=(e,t,i)=>{if(i.strictRanges===true)throw rangeError([e,t]);return[]};const invalidStep=(e,t)=>{if(t.strictRanges===true){throw new TypeError(`Expected step "${e}" to be a number`)}return[]};const fillNumbers=(e,t,i=1,s={})=>{let n=Number(e);let r=Number(t);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===true)throw rangeError([e,t]);return[]}if(n===0)n=0;if(r===0)r=0;let o=n>r;let l=String(e);let c=String(t);let u=String(i);i=Math.max(Math.abs(i),1);let h=zeros(l)||zeros(c)||zeros(u);let d=h?Math.max(l.length,c.length,u.length):0;let p=h===false&&stringify$3(e,t,s)===false;let f=s.transform||transform(p);if(s.toRegex&&i===1){return toRange(toMaxLen(e,d),toMaxLen(t,d),true,s)}let m={negatives:[],positives:[]};let push=e=>m[e<0?"negatives":"positives"].push(Math.abs(e));let g=[];let y=0;while(o?n>=r:n<=r){if(s.toRegex===true&&i>1){push(n)}else{g.push(pad(f(n,y),d,p))}n=o?n-i:n+i;y++}if(s.toRegex===true){return i>1?toSequence(m,s):toRegex(g,null,{wrap:false,...s})}return g};const fillLetters=(e,t,i=1,s={})=>{if(!isNumber(e)&&e.length>1||!isNumber(t)&&t.length>1){return invalidRange(e,t,s)}let n=s.transform||(e=>String.fromCharCode(e));let r=`${e}`.charCodeAt(0);let o=`${t}`.charCodeAt(0);let l=r>o;let c=Math.min(r,o);let u=Math.max(r,o);if(s.toRegex&&i===1){return toRange(c,u,false,s)}let h=[];let d=0;while(l?r>=o:r<=o){h.push(n(r,d));r=l?r-i:r+i;d++}if(s.toRegex===true){return toRegex(h,null,{wrap:false,options:s})}return h};const fill$2=(e,t,i,s={})=>{if(t==null&&isValidValue(e)){return[e]}if(!isValidValue(e)||!isValidValue(t)){return invalidRange(e,t,s)}if(typeof i==="function"){return fill$2(e,t,1,{transform:i})}if(isObject(i)){return fill$2(e,t,0,i)}let n={...s};if(n.capture===true)n.wrap=true;i=i||n.step||1;if(!isNumber(i)){if(i!=null&&!isObject(i))return invalidStep(i,n);return fill$2(e,t,1,i)}if(isNumber(e)&&isNumber(t)){return fillNumbers(e,t,i,n)}return fillLetters(e,t,Math.max(Math.abs(i),1),n)};var se=fill$2;const ne=se;const re=Q;const compile$1=(e,t={})=>{let walk=(e,i={})=>{let s=re.isInvalidBrace(i);let n=e.invalid===true&&t.escapeInvalid===true;let r=s===true||n===true;let o=t.escapeInvalid===true?"\\":"";let l="";if(e.isOpen===true){return o+e.value}if(e.isClose===true){return o+e.value}if(e.type==="open"){return r?o+e.value:"("}if(e.type==="close"){return r?o+e.value:")"}if(e.type==="comma"){return e.prev.type==="comma"?"":r?e.value:"|"}if(e.value){return e.value}if(e.nodes&&e.ranges>0){let i=re.reduce(e.nodes);let s=ne(...i,{...t,wrap:false,toRegex:true});if(s.length!==0){return i.length>1&&s.length>1?`(${s})`:s}}if(e.nodes){for(let t of e.nodes){l+=walk(t,e)}}return l};return walk(e)};var ae=compile$1;const oe=se;const le=stringify$4;const ce=Q;const append=(e="",t="",i=false)=>{let s=[];e=[].concat(e);t=[].concat(t);if(!t.length)return e;if(!e.length){return i?ce.flatten(t).map((e=>`{${e}}`)):t}for(let n of e){if(Array.isArray(n)){for(let e of n){s.push(append(e,t,i))}}else{for(let e of t){if(i===true&&typeof e==="string")e=`{${e}}`;s.push(Array.isArray(e)?append(n,e,i):n+e)}}}return ce.flatten(s)};const expand$1=(e,t={})=>{let i=t.rangeLimit===void 0?1e3:t.rangeLimit;let walk=(e,s={})=>{e.queue=[];let n=s;let r=s.queue;while(n.type!=="brace"&&n.type!=="root"&&n.parent){n=n.parent;r=n.queue}if(e.invalid||e.dollar){r.push(append(r.pop(),le(e,t)));return}if(e.type==="brace"&&e.invalid!==true&&e.nodes.length===2){r.push(append(r.pop(),["{}"]));return}if(e.nodes&&e.ranges>0){let s=ce.reduce(e.nodes);if(ce.exceedsLimit(...s,t.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let n=oe(...s,t);if(n.length===0){n=le(e,t)}r.push(append(r.pop(),n));e.nodes=[];return}let o=ce.encloseBrace(e);let l=e.queue;let c=e;while(c.type!=="brace"&&c.type!=="root"&&c.parent){c=c.parent;l=c.queue}for(let t=0;t<e.nodes.length;t++){let i=e.nodes[t];if(i.type==="comma"&&e.type==="brace"){if(t===1)l.push("");l.push("");continue}if(i.type==="close"){r.push(append(r.pop(),l,o));continue}if(i.value&&i.type!=="open"){l.push(append(l.pop(),i.value));continue}if(i.nodes){walk(i,e)}}return l};return ce.flatten(walk(e))};var ue=expand$1;var he={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};const de=stringify$4;const{MAX_LENGTH:pe,CHAR_BACKSLASH:fe,CHAR_BACKTICK:me,CHAR_COMMA:ge,CHAR_DOT:ye,CHAR_LEFT_PARENTHESES:Ee,CHAR_RIGHT_PARENTHESES:xe,CHAR_LEFT_CURLY_BRACE:ve,CHAR_RIGHT_CURLY_BRACE:be,CHAR_LEFT_SQUARE_BRACKET:Se,CHAR_RIGHT_SQUARE_BRACKET:Ae,CHAR_DOUBLE_QUOTE:we,CHAR_SINGLE_QUOTE:Ie,CHAR_NO_BREAK_SPACE:Ce,CHAR_ZERO_WIDTH_NOBREAK_SPACE:ke}=he;const parse$1=(e,t={})=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}let i=t||{};let s=typeof i.maxLength==="number"?Math.min(pe,i.maxLength):pe;if(e.length>s){throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${s})`)}let n={type:"root",input:e,nodes:[]};let r=[n];let o=n;let l=n;let c=0;let u=e.length;let h=0;let d=0;let p;const advance=()=>e[h++];const push=e=>{if(e.type==="text"&&l.type==="dot"){l.type="text"}if(l&&l.type==="text"&&e.type==="text"){l.value+=e.value;return}o.nodes.push(e);e.parent=o;e.prev=l;l=e;return e};push({type:"bos"});while(h<u){o=r[r.length-1];p=advance();if(p===ke||p===Ce){continue}if(p===fe){push({type:"text",value:(t.keepEscaping?p:"")+advance()});continue}if(p===Ae){push({type:"text",value:"\\"+p});continue}if(p===Se){c++;let e;while(h<u&&(e=advance())){p+=e;if(e===Se){c++;continue}if(e===fe){p+=advance();continue}if(e===Ae){c--;if(c===0){break}}}push({type:"text",value:p});continue}if(p===Ee){o=push({type:"paren",nodes:[]});r.push(o);push({type:"text",value:p});continue}if(p===xe){if(o.type!=="paren"){push({type:"text",value:p});continue}o=r.pop();push({type:"text",value:p});o=r[r.length-1];continue}if(p===we||p===Ie||p===me){let e=p;let i;if(t.keepQuotes!==true){p=""}while(h<u&&(i=advance())){if(i===fe){p+=i+advance();continue}if(i===e){if(t.keepQuotes===true)p+=i;break}p+=i}push({type:"text",value:p});continue}if(p===ve){d++;let e=l.value&&l.value.slice(-1)==="$"||o.dollar===true;let t={type:"brace",open:true,close:false,dollar:e,depth:d,commas:0,ranges:0,nodes:[]};o=push(t);r.push(o);push({type:"open",value:p});continue}if(p===be){if(o.type!=="brace"){push({type:"text",value:p});continue}let e="close";o=r.pop();o.close=true;push({type:e,value:p});d--;o=r[r.length-1];continue}if(p===ge&&d>0){if(o.ranges>0){o.ranges=0;let e=o.nodes.shift();o.nodes=[e,{type:"text",value:de(o)}]}push({type:"comma",value:p});o.commas++;continue}if(p===ye&&d>0&&o.commas===0){let e=o.nodes;if(d===0||e.length===0){push({type:"text",value:p});continue}if(l.type==="dot"){o.range=[];l.value+=p;l.type="range";if(o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true;o.ranges=0;l.type="text";continue}o.ranges++;o.args=[];continue}if(l.type==="range"){e.pop();let t=e[e.length-1];t.value+=l.value+p;l=t;o.ranges--;continue}push({type:"dot",value:p});continue}push({type:"text",value:p})}do{o=r.pop();if(o.type!=="root"){o.nodes.forEach((e=>{if(!e.nodes){if(e.type==="open")e.isOpen=true;if(e.type==="close")e.isClose=true;if(!e.nodes)e.type="text";e.invalid=true}}));let e=r[r.length-1];let t=e.nodes.indexOf(o);e.nodes.splice(t,1,...o.nodes)}}while(r.length>0);push({type:"eos"});return n};var _e=parse$1;const Pe=stringify$4;const Ne=ae;const Re=ue;const Te=_e;const braces$1=(e,t={})=>{let i=[];if(Array.isArray(e)){for(let s of e){let e=braces$1.create(s,t);if(Array.isArray(e)){i.push(...e)}else{i.push(e)}}}else{i=[].concat(braces$1.create(e,t))}if(t&&t.expand===true&&t.nodupes===true){i=[...new Set(i)]}return i};braces$1.parse=(e,t={})=>Te(e,t);braces$1.stringify=(e,t={})=>{if(typeof e==="string"){return Pe(braces$1.parse(e,t),t)}return Pe(e,t)};braces$1.compile=(e,t={})=>{if(typeof e==="string"){e=braces$1.parse(e,t)}return Ne(e,t)};braces$1.expand=(e,t={})=>{if(typeof e==="string"){e=braces$1.parse(e,t)}let i=Re(e,t);if(t.noempty===true){i=i.filter(Boolean)}if(t.nodupes===true){i=[...new Set(i)]}return i};braces$1.create=(e,t={})=>{if(e===""||e.length<3){return[e]}return t.expand!==true?braces$1.compile(e,t):braces$1.expand(e,t)};var $e=braces$1;var Oe={exports:{}};const De=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];(function(e){e.exports=De})(Oe);const Me=l;const Le=Oe.exports;const Fe=new Set(Le);var isBinaryPath$1=e=>Fe.has(Me.extname(e).slice(1).toLowerCase());var Ve={};(function(e){const{sep:t}=l;const{platform:i}=process;const s=c;e.EV_ALL="all";e.EV_READY="ready";e.EV_ADD="add";e.EV_CHANGE="change";e.EV_ADD_DIR="addDir";e.EV_UNLINK="unlink";e.EV_UNLINK_DIR="unlinkDir";e.EV_RAW="raw";e.EV_ERROR="error";e.STR_DATA="data";e.STR_END="end";e.STR_CLOSE="close";e.FSEVENT_CREATED="created";e.FSEVENT_MODIFIED="modified";e.FSEVENT_DELETED="deleted";e.FSEVENT_MOVED="moved";e.FSEVENT_CLONED="cloned";e.FSEVENT_UNKNOWN="unknown";e.FSEVENT_TYPE_FILE="file";e.FSEVENT_TYPE_DIRECTORY="directory";e.FSEVENT_TYPE_SYMLINK="symlink";e.KEY_LISTENERS="listeners";e.KEY_ERR="errHandlers";e.KEY_RAW="rawEmitters";e.HANDLER_KEYS=[e.KEY_LISTENERS,e.KEY_ERR,e.KEY_RAW];e.DOT_SLASH=`.${t}`;e.BACK_SLASH_RE=/\\/g;e.DOUBLE_SLASH_RE=/\/\//;e.SLASH_OR_BACK_SLASH_RE=/[/\\]/;e.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;e.REPLACER_RE=/^\.[/\\]/;e.SLASH="/";e.SLASH_SLASH="//";e.BRACE_START="{";e.BANG="!";e.ONE_DOT=".";e.TWO_DOTS="..";e.STAR="*";e.GLOBSTAR="**";e.ROOT_GLOBSTAR="/**/*";e.SLASH_GLOBSTAR="/**";e.DIR_SUFFIX="Dir";e.ANYMATCH_OPTS={dot:true};e.STRING_TYPE="string";e.FUNCTION_TYPE="function";e.EMPTY_STR="";e.EMPTY_FN=()=>{};e.IDENTITY_FN=e=>e;e.isWindows=i==="win32";e.isMacos=i==="darwin";e.isLinux=i==="linux";e.isIBMi=s.type()==="OS400"})(Ve);const Be=n;const ze=l;const{promisify:Ue}=r;const He=isBinaryPath$1;const{isWindows:je,isLinux:Ge,EMPTY_FN:We,EMPTY_STR:qe,KEY_LISTENERS:Ke,KEY_ERR:Ye,KEY_RAW:Xe,HANDLER_KEYS:Qe,EV_CHANGE:Ze,EV_ADD:Je,EV_ADD_DIR:et,EV_ERROR:tt,STR_DATA:it,STR_END:st,BRACE_START:nt,STAR:rt}=Ve;const ot="watch";const lt=Ue(Be.open);const ct=Ue(Be.stat);const ut=Ue(Be.lstat);const ht=Ue(Be.close);const dt=Ue(Be.realpath);const pt={lstat:ut,stat:ct};const foreach=(e,t)=>{if(e instanceof Set){e.forEach(t)}else{t(e)}};const addAndConvert=(e,t,i)=>{let s=e[t];if(!(s instanceof Set)){e[t]=s=new Set([s])}s.add(i)};const clearItem=e=>t=>{const i=e[t];if(i instanceof Set){i.clear()}else{delete e[t]}};const delFromSet=(e,t,i)=>{const s=e[t];if(s instanceof Set){s.delete(i)}else if(s===i){delete e[t]}};const isEmptySet=e=>e instanceof Set?e.size===0:!e;const ft=new Map;function createFsWatchInstance(e,t,i,s,n){const handleEvent=(t,s)=>{i(e);n(t,s,{watchedPath:e});if(s&&e!==s){fsWatchBroadcast(ze.resolve(e,s),Ke,ze.join(e,s))}};try{return Be.watch(e,t,handleEvent)}catch(e){s(e)}}const fsWatchBroadcast=(e,t,i,s,n)=>{const r=ft.get(e);if(!r)return;foreach(r[t],(e=>{e(i,s,n)}))};const setFsWatchListener=(e,t,i,s)=>{const{listener:n,errHandler:r,rawEmitter:o}=s;let l=ft.get(t);let c;if(!i.persistent){c=createFsWatchInstance(e,i,n,r,o);return c.close.bind(c)}if(l){addAndConvert(l,Ke,n);addAndConvert(l,Ye,r);addAndConvert(l,Xe,o)}else{c=createFsWatchInstance(e,i,fsWatchBroadcast.bind(null,t,Ke),r,fsWatchBroadcast.bind(null,t,Xe));if(!c)return;c.on(tt,(async i=>{const s=fsWatchBroadcast.bind(null,t,Ye);l.watcherUnusable=true;if(je&&i.code==="EPERM"){try{const t=await lt(e,"r");await ht(t);s(i)}catch(e){}}else{s(i)}}));l={listeners:n,errHandlers:r,rawEmitters:o,watcher:c};ft.set(t,l)}return()=>{delFromSet(l,Ke,n);delFromSet(l,Ye,r);delFromSet(l,Xe,o);if(isEmptySet(l.listeners)){l.watcher.close();ft.delete(t);Qe.forEach(clearItem(l));l.watcher=undefined;Object.freeze(l)}}};const mt=new Map;const setFsWatchFileListener=(e,t,i,s)=>{const{listener:n,rawEmitter:r}=s;let o=mt.get(t);const l=o&&o.options;if(l&&(l.persistent<i.persistent||l.interval>i.interval)){Be.unwatchFile(t);o=undefined}if(o){addAndConvert(o,Ke,n);addAndConvert(o,Xe,r)}else{o={listeners:n,rawEmitters:r,options:i,watcher:Be.watchFile(t,i,((i,s)=>{foreach(o.rawEmitters,(e=>{e(Ze,t,{curr:i,prev:s})}));const n=i.mtimeMs;if(i.size!==s.size||n>s.mtimeMs||n===0){foreach(o.listeners,(t=>t(e,i)))}}))};mt.set(t,o)}return()=>{delFromSet(o,Ke,n);delFromSet(o,Xe,r);if(isEmptySet(o.listeners)){mt.delete(t);Be.unwatchFile(t);o.options=o.watcher=undefined;Object.freeze(o)}}};class NodeFsHandler$1{constructor(e){this.fsw=e;this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){const i=this.fsw.options;const s=ze.dirname(e);const n=ze.basename(e);const r=this.fsw._getWatchedDir(s);r.add(n);const o=ze.resolve(e);const l={persistent:i.persistent};if(!t)t=We;let c;if(i.usePolling){l.interval=i.enableBinaryInterval&&He(n)?i.binaryInterval:i.interval;c=setFsWatchFileListener(e,o,l,{listener:t,rawEmitter:this.fsw._emitRaw})}else{c=setFsWatchListener(e,o,l,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw})}return c}_handleFile(e,t,i){if(this.fsw.closed){return}const s=ze.dirname(e);const n=ze.basename(e);const r=this.fsw._getWatchedDir(s);let o=t;if(r.has(n))return;const listener=async(t,i)=>{if(!this.fsw._throttle(ot,e,5))return;if(!i||i.mtimeMs===0){try{const i=await ct(e);if(this.fsw.closed)return;const s=i.atimeMs;const n=i.mtimeMs;if(!s||s<=n||n!==o.mtimeMs){this.fsw._emit(Ze,e,i)}if(Ge&&o.ino!==i.ino){this.fsw._closeFile(t);o=i;this.fsw._addPathCloser(t,this._watchWithNodeFs(e,listener))}else{o=i}}catch(e){this.fsw._remove(s,n)}}else if(r.has(n)){const t=i.atimeMs;const s=i.mtimeMs;if(!t||t<=s||s!==o.mtimeMs){this.fsw._emit(Ze,e,i)}o=i}};const l=this._watchWithNodeFs(e,listener);if(!(i&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(Je,e,0))return;this.fsw._emit(Je,e,t)}return l}async _handleSymlink(e,t,i,s){if(this.fsw.closed){return}const n=e.fullPath;const r=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let t;try{t=await dt(i)}catch(e){this.fsw._emitReady();return true}if(this.fsw.closed)return;if(r.has(s)){if(this.fsw._symlinkPaths.get(n)!==t){this.fsw._symlinkPaths.set(n,t);this.fsw._emit(Ze,i,e.stats)}}else{r.add(s);this.fsw._symlinkPaths.set(n,t);this.fsw._emit(Je,i,e.stats)}this.fsw._emitReady();return true}if(this.fsw._symlinkPaths.has(n)){return true}this.fsw._symlinkPaths.set(n,true)}_handleRead(e,t,i,s,n,r,o){e=ze.join(e,qe);if(!i.hasGlob){o=this.fsw._throttle("readdir",e,1e3);if(!o)return}const l=this.fsw._getWatchedDir(i.path);const c=new Set;let u=this.fsw._readdirp(e,{fileFilter:e=>i.filterPath(e),directoryFilter:e=>i.filterDir(e),depth:0}).on(it,(async o=>{if(this.fsw.closed){u=undefined;return}const h=o.path;let d=ze.join(e,h);c.add(h);if(o.stats.isSymbolicLink()&&await this._handleSymlink(o,e,d,h)){return}if(this.fsw.closed){u=undefined;return}if(h===s||!s&&!l.has(h)){this.fsw._incrReadyCount();d=ze.join(n,ze.relative(n,d));this._addToNodeFs(d,t,i,r+1)}})).on(tt,this._boundHandleError);return new Promise((t=>u.once(st,(()=>{if(this.fsw.closed){u=undefined;return}const h=o?o.clear():false;t();l.getChildren().filter((t=>t!==e&&!c.has(t)&&(!i.hasGlob||i.filterPath({fullPath:ze.resolve(e,t)})))).forEach((t=>{this.fsw._remove(e,t)}));u=undefined;if(h)this._handleRead(e,false,i,s,n,r,o)}))))}async _handleDir(e,t,i,s,n,r,o){const l=this.fsw._getWatchedDir(ze.dirname(e));const c=l.has(ze.basename(e));if(!(i&&this.fsw.options.ignoreInitial)&&!n&&!c){if(!r.hasGlob||r.globFilter(e))this.fsw._emit(et,e,t)}l.add(ze.basename(e));this.fsw._getWatchedDir(e);let u;let h;const d=this.fsw.options.depth;if((d==null||s<=d)&&!this.fsw._symlinkPaths.has(o)){if(!n){await this._handleRead(e,i,r,n,e,s,u);if(this.fsw.closed)return}h=this._watchWithNodeFs(e,((t,i)=>{if(i&&i.mtimeMs===0)return;this._handleRead(t,false,r,n,e,s,u)}))}return h}async _addToNodeFs(e,t,i,s,n){const r=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed){r();return false}const o=this.fsw._getWatchHelpers(e,s);if(!o.hasGlob&&i){o.hasGlob=i.hasGlob;o.globFilter=i.globFilter;o.filterPath=e=>i.filterPath(e);o.filterDir=e=>i.filterDir(e)}try{const i=await pt[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,i)){r();return false}const l=this.fsw.options.followSymlinks&&!e.includes(rt)&&!e.includes(nt);let c;if(i.isDirectory()){const r=ze.resolve(e);const u=l?await dt(e):e;if(this.fsw.closed)return;c=await this._handleDir(o.watchPath,i,t,s,n,o,u);if(this.fsw.closed)return;if(r!==u&&u!==undefined){this.fsw._symlinkPaths.set(r,u)}}else if(i.isSymbolicLink()){const n=l?await dt(e):e;if(this.fsw.closed)return;const r=ze.dirname(o.watchPath);this.fsw._getWatchedDir(r).add(o.watchPath);this.fsw._emit(Je,o.watchPath,i);c=await this._handleDir(r,i,t,s,e,o,n);if(this.fsw.closed)return;if(n!==undefined){this.fsw._symlinkPaths.set(ze.resolve(e),n)}}else{c=this._handleFile(o.watchPath,i,t)}r();this.fsw._addPathCloser(e,c);return false}catch(t){if(this.fsw._handleError(t)){r();return e}}}}var gt=NodeFsHandler$1;var yt={exports:{}};const Et=s.getAugmentedNamespace(s.fseventsImporter);const xt=n;const vt=l;const{promisify:bt}=r;let St;try{St=Et.getFsEvents()}catch(e){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(e)}if(St){const e=process.version.match(/v(\d+)\.(\d+)/);if(e&&e[1]&&e[2]){const t=Number.parseInt(e[1],10);const i=Number.parseInt(e[2],10);if(t===8&&i<16){St=undefined}}}const{EV_ADD:At,EV_CHANGE:wt,EV_ADD_DIR:It,EV_UNLINK:Ct,EV_ERROR:kt,STR_DATA:_t,STR_END:Pt,FSEVENT_CREATED:Nt,FSEVENT_MODIFIED:Rt,FSEVENT_DELETED:Tt,FSEVENT_MOVED:$t,FSEVENT_UNKNOWN:Ot,FSEVENT_TYPE_FILE:Dt,FSEVENT_TYPE_DIRECTORY:Mt,FSEVENT_TYPE_SYMLINK:Lt,ROOT_GLOBSTAR:Ft,DIR_SUFFIX:Vt,DOT_SLASH:Bt,FUNCTION_TYPE:zt,EMPTY_FN:Ut,IDENTITY_FN:Ht}=Ve;const Depth=e=>isNaN(e)?{}:{depth:e};const jt=bt(xt.stat);const Gt=bt(xt.lstat);const Wt=bt(xt.realpath);const qt={stat:jt,lstat:Gt};const Kt=new Map;const Yt=10;const Xt=new Set([69888,70400,71424,72704,73472,131328,131840,262912]);const createFSEventsInstance=(e,t)=>{const i=St.watch(e,t);return{stop:i}};function setFSEventsListener(e,t,i,s){let n=vt.extname(t)?vt.dirname(t):t;const r=vt.dirname(n);let o=Kt.get(n);if(couldConsolidate(r)){n=r}const l=vt.resolve(e);const c=l!==t;const filteredListener=(e,s,n)=>{if(c)e=e.replace(t,l);if(e===l||!e.indexOf(l+vt.sep))i(e,s,n)};let u=false;for(const e of Kt.keys()){if(t.indexOf(vt.resolve(e)+vt.sep)===0){n=e;o=Kt.get(n);u=true;break}}if(o||u){o.listeners.add(filteredListener)}else{o={listeners:new Set([filteredListener]),rawEmitter:s,watcher:createFSEventsInstance(n,((e,t)=>{if(!o.listeners.size)return;const i=St.getInfo(e,t);o.listeners.forEach((s=>{s(e,t,i)}));o.rawEmitter(i.event,e,i)}))};Kt.set(n,o)}return()=>{const e=o.listeners;e.delete(filteredListener);if(!e.size){Kt.delete(n);if(o.watcher)return o.watcher.stop().then((()=>{o.rawEmitter=o.watcher=undefined;Object.freeze(o)}))}}}const couldConsolidate=e=>{let t=0;for(const i of Kt.keys()){if(i.indexOf(e)===0){t++;if(t>=Yt){return true}}}return false};const canUse=()=>St&&Kt.size<128;const calcDepth=(e,t)=>{let i=0;while(!e.indexOf(t)&&(e=vt.dirname(e))!==t)i++;return i};const sameTypes=(e,t)=>e.type===Mt&&t.isDirectory()||e.type===Lt&&t.isSymbolicLink()||e.type===Dt&&t.isFile();class FsEventsHandler$1{constructor(e){this.fsw=e}checkIgnored(e,t){const i=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,t)){i.add(e);if(t&&t.isDirectory()){i.add(e+Ft)}return true}i.delete(e);i.delete(e+Ft)}addOrChange(e,t,i,s,n,r,o,l){const c=n.has(r)?wt:At;this.handleEvent(c,e,t,i,s,n,r,o,l)}async checkExists(e,t,i,s,n,r,o,l){try{const c=await jt(e);if(this.fsw.closed)return;if(sameTypes(o,c)){this.addOrChange(e,t,i,s,n,r,o,l)}else{this.handleEvent(Ct,e,t,i,s,n,r,o,l)}}catch(c){if(c.code==="EACCES"){this.addOrChange(e,t,i,s,n,r,o,l)}else{this.handleEvent(Ct,e,t,i,s,n,r,o,l)}}}handleEvent(e,t,i,s,n,r,o,l,c){if(this.fsw.closed||this.checkIgnored(t))return;if(e===Ct){const e=l.type===Mt;if(e||r.has(o)){this.fsw._remove(n,o,e)}}else{if(e===At){if(l.type===Mt)this.fsw._getWatchedDir(t);if(l.type===Lt&&c.followSymlinks){const e=c.depth===undefined?undefined:calcDepth(i,s)+1;return this._addToFsEvents(t,false,true,e)}this.fsw._getWatchedDir(n).add(o)}const r=l.type===Mt?e+Vt:e;this.fsw._emit(r,t);if(r===It)this._addToFsEvents(t,false,true)}}_watchWithFsEvents(e,t,i,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const n=this.fsw.options;const watchCallback=async(r,o,l)=>{if(this.fsw.closed)return;if(n.depth!==undefined&&calcDepth(r,t)>n.depth)return;const c=i(vt.join(e,vt.relative(e,r)));if(s&&!s(c))return;const u=vt.dirname(c);const h=vt.basename(c);const d=this.fsw._getWatchedDir(l.type===Mt?c:u);if(Xt.has(o)||l.event===Ot){if(typeof n.ignored===zt){let e;try{e=await jt(c)}catch(e){}if(this.fsw.closed)return;if(this.checkIgnored(c,e))return;if(sameTypes(l,e)){this.addOrChange(c,r,t,u,d,h,l,n)}else{this.handleEvent(Ct,c,r,t,u,d,h,l,n)}}else{this.checkExists(c,r,t,u,d,h,l,n)}}else{switch(l.event){case Nt:case Rt:return this.addOrChange(c,r,t,u,d,h,l,n);case Tt:case $t:return this.checkExists(c,r,t,u,d,h,l,n)}}};const r=setFSEventsListener(e,t,watchCallback,this.fsw._emitRaw);this.fsw._emitReady();return r}async _handleFsEventsSymlink(e,t,i,s){if(this.fsw.closed||this.fsw._symlinkPaths.has(t))return;this.fsw._symlinkPaths.set(t,true);this.fsw._incrReadyCount();try{const t=await Wt(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(t)){return this.fsw._emitReady()}this.fsw._incrReadyCount();this._addToFsEvents(t||e,(s=>{let n=e;if(t&&t!==Bt){n=s.replace(t,e)}else if(s!==Bt){n=vt.join(e,s)}return i(n)}),false,s)}catch(e){if(this.fsw._handleError(e)){return this.fsw._emitReady()}}}emitAdd(e,t,i,s,n){const r=i(e);const o=t.isDirectory();const l=this.fsw._getWatchedDir(vt.dirname(r));const c=vt.basename(r);if(o)this.fsw._getWatchedDir(r);if(l.has(c))return;l.add(c);if(!s.ignoreInitial||n===true){this.fsw._emit(o?It:At,r,t)}}initWatch(e,t,i,s){if(this.fsw.closed)return;const n=this._watchWithFsEvents(i.watchPath,vt.resolve(e||i.watchPath),s,i.globFilter);this.fsw._addPathCloser(t,n)}async _addToFsEvents(e,t,i,s){if(this.fsw.closed){return}const n=this.fsw.options;const r=typeof t===zt?t:Ht;const o=this.fsw._getWatchHelpers(e);try{const t=await qt[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,t)){throw null}if(t.isDirectory()){if(!o.globFilter)this.emitAdd(r(e),t,r,n,i);if(s&&s>n.depth)return;this.fsw._readdirp(o.watchPath,{fileFilter:e=>o.filterPath(e),directoryFilter:e=>o.filterDir(e),...Depth(n.depth-(s||0))}).on(_t,(e=>{if(this.fsw.closed){return}if(e.stats.isDirectory()&&!o.filterPath(e))return;const t=vt.join(o.watchPath,e.path);const{fullPath:s}=e;if(o.followSymlinks&&e.stats.isSymbolicLink()){const e=n.depth===undefined?undefined:calcDepth(t,vt.resolve(o.watchPath))+1;this._handleFsEventsSymlink(t,s,r,e)}else{this.emitAdd(t,e.stats,r,n,i)}})).on(kt,Ut).on(Pt,(()=>{this.fsw._emitReady()}))}else{this.emitAdd(o.watchPath,t,r,n,i);this.fsw._emitReady()}}catch(e){if(!e||this.fsw._handleError(e)){this.fsw._emitReady();this.fsw._emitReady()}}if(n.persistent&&i!==true){if(typeof t===zt){this.initWatch(undefined,e,o,r)}else{let t;try{t=await Wt(o.watchPath)}catch(e){}this.initWatch(t,e,o,r)}}}}yt.exports=FsEventsHandler$1;yt.exports.canUse=canUse;const{EventEmitter:Qt}=u;const Zt=n;const Jt=l;const{promisify:ei}=r;const ti=T;const ii=$.exports.default;const si=X;const ni=z;const ri=$e;const ai=normalizePath$2;const oi=gt;const li=yt.exports;const{EV_ALL:ci,EV_READY:ui,EV_ADD:hi,EV_CHANGE:di,EV_UNLINK:pi,EV_ADD_DIR:fi,EV_UNLINK_DIR:mi,EV_RAW:gi,EV_ERROR:yi,STR_CLOSE:Ei,STR_END:xi,BACK_SLASH_RE:vi,DOUBLE_SLASH_RE:bi,SLASH_OR_BACK_SLASH_RE:Si,DOT_RE:Ai,REPLACER_RE:wi,SLASH:Ii,SLASH_SLASH:Ci,BRACE_START:ki,BANG:_i,ONE_DOT:Pi,TWO_DOTS:Ni,GLOBSTAR:Ri,SLASH_GLOBSTAR:Ti,ANYMATCH_OPTS:$i,STRING_TYPE:Oi,FUNCTION_TYPE:Di,EMPTY_STR:Mi,EMPTY_FN:Li,isWindows:Fi,isMacos:Vi,isIBMi:Bi}=Ve;const zi=ei(Zt.stat);const Ui=ei(Zt.readdir);const arrify=(e=[])=>Array.isArray(e)?e:[e];const flatten=(e,t=[])=>{e.forEach((e=>{if(Array.isArray(e)){flatten(e,t)}else{t.push(e)}}));return t};const unifyPaths=e=>{const t=flatten(arrify(e));if(!t.every((e=>typeof e===Oi))){throw new TypeError(`Non-string provided as watch path: ${t}`)}return t.map(normalizePathToUnix)};const toUnix=e=>{let t=e.replace(vi,Ii);let i=false;if(t.startsWith(Ci)){i=true}while(t.match(bi)){t=t.replace(bi,Ii)}if(i){t=Ii+t}return t};const normalizePathToUnix=e=>toUnix(Jt.normalize(toUnix(e)));const normalizeIgnored=(e=Mi)=>t=>{if(typeof t!==Oi)return t;return normalizePathToUnix(Jt.isAbsolute(t)?t:Jt.join(e,t))};const getAbsolutePath=(e,t)=>{if(Jt.isAbsolute(e)){return e}if(e.startsWith(_i)){return _i+Jt.join(t,e.slice(1))}return Jt.join(t,e)};const undef=(e,t)=>e[t]===undefined;class DirEntry{constructor(e,t){this.path=e;this._removeWatcher=t;this.items=new Set}add(e){const{items:t}=this;if(!t)return;if(e!==Pi&&e!==Ni)t.add(e)}async remove(e){const{items:t}=this;if(!t)return;t.delete(e);if(t.size>0)return;const i=this.path;try{await Ui(i)}catch(e){if(this._removeWatcher){this._removeWatcher(Jt.dirname(i),Jt.basename(i))}}}has(e){const{items:t}=this;if(!t)return;return t.has(e)}getChildren(){const{items:e}=this;if(!e)return;return[...e.values()]}dispose(){this.items.clear();delete this.path;delete this._removeWatcher;delete this.items;Object.freeze(this)}}const Hi="stat";const ji="lstat";class WatchHelper{constructor(e,t,i,s){this.fsw=s;this.path=e=e.replace(wi,Mi);this.watchPath=t;this.fullWatchPath=Jt.resolve(t);this.hasGlob=t!==e;if(e===Mi)this.hasGlob=false;this.globSymlink=this.hasGlob&&i?undefined:false;this.globFilter=this.hasGlob?ii(e,undefined,$i):false;this.dirParts=this.getDirParts(e);this.dirParts.forEach((e=>{if(e.length>1)e.pop()}));this.followSymlinks=i;this.statMethod=i?Hi:ji}checkGlobSymlink(e){if(this.globSymlink===undefined){this.globSymlink=e.fullParentDir===this.fullWatchPath?false:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}}if(this.globSymlink){return e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath)}return e.fullPath}entryPath(e){return Jt.join(this.watchPath,Jt.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);const i=this.entryPath(e);const s=this.hasGlob&&typeof this.globFilter===Di?this.globFilter(i):true;return s&&this.fsw._isntIgnored(i,t)&&this.fsw._hasReadPermissions(t)}getDirParts(e){if(!this.hasGlob)return[];const t=[];const i=e.includes(ki)?ri.expand(e):[e];i.forEach((e=>{t.push(Jt.relative(this.watchPath,e).split(Si))}));return t}filterDir(e){if(this.hasGlob){const t=this.getDirParts(this.checkGlobSymlink(e));let i=false;this.unmatchedGlob=!this.dirParts.some((e=>e.every(((e,s)=>{if(e===Ri)i=true;return i||!t[0][s]||ii(e,t[0][s],$i)}))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class FSWatcher extends Qt{constructor(e){super();const t={};if(e)Object.assign(t,e);this._watched=new Map;this._closers=new Map;this._ignoredPaths=new Set;this._throttled=new Map;this._symlinkPaths=new Map;this._streams=new Set;this.closed=false;if(undef(t,"persistent"))t.persistent=true;if(undef(t,"ignoreInitial"))t.ignoreInitial=false;if(undef(t,"ignorePermissionErrors"))t.ignorePermissionErrors=false;if(undef(t,"interval"))t.interval=100;if(undef(t,"binaryInterval"))t.binaryInterval=300;if(undef(t,"disableGlobbing"))t.disableGlobbing=false;t.enableBinaryInterval=t.binaryInterval!==t.interval;if(undef(t,"useFsEvents"))t.useFsEvents=!t.usePolling;const i=li.canUse();if(!i)t.useFsEvents=false;if(undef(t,"usePolling")&&!t.useFsEvents){t.usePolling=Vi}if(Bi){t.usePolling=true}const s=process.env.CHOKIDAR_USEPOLLING;if(s!==undefined){const e=s.toLowerCase();if(e==="false"||e==="0"){t.usePolling=false}else if(e==="true"||e==="1"){t.usePolling=true}else{t.usePolling=!!e}}const n=process.env.CHOKIDAR_INTERVAL;if(n){t.interval=Number.parseInt(n,10)}if(undef(t,"atomic"))t.atomic=!t.usePolling&&!t.useFsEvents;if(t.atomic)this._pendingUnlinks=new Map;if(undef(t,"followSymlinks"))t.followSymlinks=true;if(undef(t,"awaitWriteFinish"))t.awaitWriteFinish=false;if(t.awaitWriteFinish===true)t.awaitWriteFinish={};const r=t.awaitWriteFinish;if(r){if(!r.stabilityThreshold)r.stabilityThreshold=2e3;if(!r.pollInterval)r.pollInterval=100;this._pendingWrites=new Map}if(t.ignored)t.ignored=arrify(t.ignored);let o=0;this._emitReady=()=>{o++;if(o>=this._readyCount){this._emitReady=Li;this._readyEmitted=true;process.nextTick((()=>this.emit(ui)))}};this._emitRaw=(...e)=>this.emit(gi,...e);this._readyEmitted=false;this.options=t;if(t.useFsEvents){this._fsEventsHandler=new li(this)}else{this._nodeFsHandler=new oi(this)}Object.freeze(t)}add(e,t,i){const{cwd:s,disableGlobbing:n}=this.options;this.closed=false;let r=unifyPaths(e);if(s){r=r.map((e=>{const t=getAbsolutePath(e,s);if(n||!ni(e)){return t}return ai(t)}))}r=r.filter((e=>{if(e.startsWith(_i)){this._ignoredPaths.add(e.slice(1));return false}this._ignoredPaths.delete(e);this._ignoredPaths.delete(e+Ti);this._userIgnored=undefined;return true}));if(this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=r.length;if(this.options.persistent)this._readyCount*=2;r.forEach((e=>this._fsEventsHandler._addToFsEvents(e)))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=r.length;Promise.all(r.map((async e=>{const s=await this._nodeFsHandler._addToNodeFs(e,!i,0,0,t);if(s)this._emitReady();return s}))).then((e=>{if(this.closed)return;e.filter((e=>e)).forEach((e=>{this.add(Jt.dirname(e),Jt.basename(t||e))}))}))}return this}unwatch(e){if(this.closed)return this;const t=unifyPaths(e);const{cwd:i}=this.options;t.forEach((e=>{if(!Jt.isAbsolute(e)&&!this._closers.has(e)){if(i)e=Jt.join(i,e);e=Jt.resolve(e)}this._closePath(e);this._ignoredPaths.add(e);if(this._watched.has(e)){this._ignoredPaths.add(e+Ti)}this._userIgnored=undefined}));return this}close(){if(this.closed)return this._closePromise;this.closed=true;this.removeAllListeners();const e=[];this._closers.forEach((t=>t.forEach((t=>{const i=t();if(i instanceof Promise)e.push(i)}))));this._streams.forEach((e=>e.destroy()));this._userIgnored=undefined;this._readyCount=0;this._readyEmitted=false;this._watched.forEach((e=>e.dispose()));["closers","watched","streams","symlinkPaths","throttled"].forEach((e=>{this[`_${e}`].clear()}));this._closePromise=e.length?Promise.all(e).then((()=>undefined)):Promise.resolve();return this._closePromise}getWatched(){const e={};this._watched.forEach(((t,i)=>{const s=this.options.cwd?Jt.relative(this.options.cwd,i):i;e[s||Pi]=t.getChildren().sort()}));return e}emitWithAll(e,t){this.emit(...t);if(e!==yi)this.emit(ci,...t)}async _emit(e,t,i,s,n){if(this.closed)return;const r=this.options;if(Fi)t=Jt.normalize(t);if(r.cwd)t=Jt.relative(r.cwd,t);const o=[e,t];if(n!==undefined)o.push(i,s,n);else if(s!==undefined)o.push(i,s);else if(i!==undefined)o.push(i);const l=r.awaitWriteFinish;let c;if(l&&(c=this._pendingWrites.get(t))){c.lastChange=new Date;return this}if(r.atomic){if(e===pi){this._pendingUnlinks.set(t,o);setTimeout((()=>{this._pendingUnlinks.forEach(((e,t)=>{this.emit(...e);this.emit(ci,...e);this._pendingUnlinks.delete(t)}))}),typeof r.atomic==="number"?r.atomic:100);return this}if(e===hi&&this._pendingUnlinks.has(t)){e=o[0]=di;this._pendingUnlinks.delete(t)}}if(l&&(e===hi||e===di)&&this._readyEmitted){const awfEmit=(t,i)=>{if(t){e=o[0]=yi;o[1]=t;this.emitWithAll(e,o)}else if(i){if(o.length>2){o[2]=i}else{o.push(i)}this.emitWithAll(e,o)}};this._awaitWriteFinish(t,l.stabilityThreshold,e,awfEmit);return this}if(e===di){const e=!this._throttle(di,t,50);if(e)return this}if(r.alwaysStat&&i===undefined&&(e===hi||e===fi||e===di)){const e=r.cwd?Jt.join(r.cwd,t):t;let i;try{i=await zi(e)}catch(e){}if(!i||this.closed)return;o.push(i)}this.emitWithAll(e,o);return this}_handleError(e){const t=e&&e.code;if(e&&t!=="ENOENT"&&t!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||t!=="EPERM"&&t!=="EACCES")){this.emit(yi,e)}return e||this.closed}_throttle(e,t,i){if(!this._throttled.has(e)){this._throttled.set(e,new Map)}const s=this._throttled.get(e);const n=s.get(t);if(n){n.count++;return false}let r;const clear=()=>{const e=s.get(t);const i=e?e.count:0;s.delete(t);clearTimeout(r);if(e)clearTimeout(e.timeoutObject);return i};r=setTimeout(clear,i);const o={timeoutObject:r,clear:clear,count:0};s.set(t,o);return o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,i,s){let n;let r=e;if(this.options.cwd&&!Jt.isAbsolute(e)){r=Jt.join(this.options.cwd,e)}const o=new Date;const awaitWriteFinish=i=>{Zt.stat(r,((r,o)=>{if(r||!this._pendingWrites.has(e)){if(r&&r.code!=="ENOENT")s(r);return}const l=Number(new Date);if(i&&o.size!==i.size){this._pendingWrites.get(e).lastChange=l}const c=this._pendingWrites.get(e);const u=l-c.lastChange;if(u>=t){this._pendingWrites.delete(e);s(undefined,o)}else{n=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval,o)}}))};if(!this._pendingWrites.has(e)){this._pendingWrites.set(e,{lastChange:o,cancelWait:()=>{this._pendingWrites.delete(e);clearTimeout(n);return i}});n=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval)}}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,t){if(this.options.atomic&&Ai.test(e))return true;if(!this._userIgnored){const{cwd:e}=this.options;const t=this.options.ignored;const i=t&&t.map(normalizeIgnored(e));const s=arrify(i).filter((e=>typeof e===Oi&&!ni(e))).map((e=>e+Ti));const n=this._getGlobIgnored().map(normalizeIgnored(e)).concat(i,s);this._userIgnored=ii(n,undefined,$i)}return this._userIgnored([e,t])}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e,t){const i=t||this.options.disableGlobbing||!ni(e)?e:si(e);const s=this.options.followSymlinks;return new WatchHelper(e,i,s,this)}_getWatchedDir(e){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);const t=Jt.resolve(e);if(!this._watched.has(t))this._watched.set(t,new DirEntry(t,this._boundRemove));return this._watched.get(t)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return true;const t=e&&Number.parseInt(e.mode,10);const i=t&511;const s=Number.parseInt(i.toString(8)[0],10);return Boolean(4&s)}_remove(e,t,i){const s=Jt.join(e,t);const n=Jt.resolve(s);i=i!=null?i:this._watched.has(s)||this._watched.has(n);if(!this._throttle("remove",s,100))return;if(!i&&!this.options.useFsEvents&&this._watched.size===1){this.add(e,t,true)}const r=this._getWatchedDir(s);const o=r.getChildren();o.forEach((e=>this._remove(s,e)));const l=this._getWatchedDir(e);const c=l.has(t);l.remove(t);if(this._symlinkPaths.has(n)){this._symlinkPaths.delete(n)}let u=s;if(this.options.cwd)u=Jt.relative(this.options.cwd,s);if(this.options.awaitWriteFinish&&this._pendingWrites.has(u)){const e=this._pendingWrites.get(u).cancelWait();if(e===hi)return}this._watched.delete(s);this._watched.delete(n);const h=i?mi:pi;if(c&&!this._isIgnored(s))this._emit(h,s);if(!this.options.useFsEvents){this._closePath(s)}}_closePath(e){this._closeFile(e);const t=Jt.dirname(e);this._getWatchedDir(t).remove(Jt.basename(e))}_closeFile(e){const t=this._closers.get(e);if(!t)return;t.forEach((e=>e()));this._closers.delete(e)}_addPathCloser(e,t){if(!t)return;let i=this._closers.get(e);if(!i){i=[];this._closers.set(e,i)}i.push(t)}_readdirp(e,t){if(this.closed)return;const i={type:ci,alwaysStat:true,lstat:true,...t};let s=ti(e,i);this._streams.add(s);s.once(Ei,(()=>{s=undefined}));s.once(xi,(()=>{if(s){this._streams.delete(s);s=undefined}}));return s}}h.FSWatcher=FSWatcher;const watch=(e,t)=>{const i=new FSWatcher(t);i.add(e);return i};h.watch=watch;t.chokidar=h},173:(e,t,i)=>{"use strict";
67
+ */const ne=r;const re=se;const isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);const transform=e=>t=>e===true?Number(t):String(t);const isValidValue=e=>typeof e==="number"||typeof e==="string"&&e!=="";const isNumber=e=>Number.isInteger(+e);const zeros=e=>{let t=`${e}`;let i=-1;if(t[0]==="-")t=t.slice(1);if(t==="0")return false;while(t[++i]==="0");return i>0};const stringify$3=(e,t,i)=>{if(typeof e==="string"||typeof t==="string"){return true}return i.stringify===true};const pad=(e,t,i)=>{if(t>0){let i=e[0]==="-"?"-":"";if(i)e=e.slice(1);e=i+e.padStart(i?t-1:t,"0")}if(i===false){return String(e)}return e};const toMaxLen=(e,t)=>{let i=e[0]==="-"?"-":"";if(i){e=e.slice(1);t--}while(e.length<t)e="0"+e;return i?"-"+e:e};const toSequence=(e,t)=>{e.negatives.sort(((e,t)=>e<t?-1:e>t?1:0));e.positives.sort(((e,t)=>e<t?-1:e>t?1:0));let i=t.capture?"":"?:";let s="";let n="";let r;if(e.positives.length){s=e.positives.join("|")}if(e.negatives.length){n=`-(${i}${e.negatives.join("|")})`}if(s&&n){r=`${s}|${n}`}else{r=s||n}if(t.wrap){return`(${i}${r})`}return r};const toRange=(e,t,i,s)=>{if(i){return re(e,t,{wrap:false,...s})}let n=String.fromCharCode(e);if(e===t)return n;let r=String.fromCharCode(t);return`[${n}-${r}]`};const toRegex=(e,t,i)=>{if(Array.isArray(e)){let t=i.wrap===true;let s=i.capture?"":"?:";return t?`(${s}${e.join("|")})`:e.join("|")}return re(e,t,i)};const rangeError=(...e)=>new RangeError("Invalid range arguments: "+ne.inspect(...e));const invalidRange=(e,t,i)=>{if(i.strictRanges===true)throw rangeError([e,t]);return[]};const invalidStep=(e,t)=>{if(t.strictRanges===true){throw new TypeError(`Expected step "${e}" to be a number`)}return[]};const fillNumbers=(e,t,i=1,s={})=>{let n=Number(e);let r=Number(t);if(!Number.isInteger(n)||!Number.isInteger(r)){if(s.strictRanges===true)throw rangeError([e,t]);return[]}if(n===0)n=0;if(r===0)r=0;let o=n>r;let l=String(e);let c=String(t);let u=String(i);i=Math.max(Math.abs(i),1);let h=zeros(l)||zeros(c)||zeros(u);let d=h?Math.max(l.length,c.length,u.length):0;let p=h===false&&stringify$3(e,t,s)===false;let f=s.transform||transform(p);if(s.toRegex&&i===1){return toRange(toMaxLen(e,d),toMaxLen(t,d),true,s)}let m={negatives:[],positives:[]};let push=e=>m[e<0?"negatives":"positives"].push(Math.abs(e));let g=[];let y=0;while(o?n>=r:n<=r){if(s.toRegex===true&&i>1){push(n)}else{g.push(pad(f(n,y),d,p))}n=o?n-i:n+i;y++}if(s.toRegex===true){return i>1?toSequence(m,s):toRegex(g,null,{wrap:false,...s})}return g};const fillLetters=(e,t,i=1,s={})=>{if(!isNumber(e)&&e.length>1||!isNumber(t)&&t.length>1){return invalidRange(e,t,s)}let n=s.transform||(e=>String.fromCharCode(e));let r=`${e}`.charCodeAt(0);let o=`${t}`.charCodeAt(0);let l=r>o;let c=Math.min(r,o);let u=Math.max(r,o);if(s.toRegex&&i===1){return toRange(c,u,false,s)}let h=[];let d=0;while(l?r>=o:r<=o){h.push(n(r,d));r=l?r-i:r+i;d++}if(s.toRegex===true){return toRegex(h,null,{wrap:false,options:s})}return h};const fill$2=(e,t,i,s={})=>{if(t==null&&isValidValue(e)){return[e]}if(!isValidValue(e)||!isValidValue(t)){return invalidRange(e,t,s)}if(typeof i==="function"){return fill$2(e,t,1,{transform:i})}if(isObject(i)){return fill$2(e,t,0,i)}let n={...s};if(n.capture===true)n.wrap=true;i=i||n.step||1;if(!isNumber(i)){if(i!=null&&!isObject(i))return invalidStep(i,n);return fill$2(e,t,1,i)}if(isNumber(e)&&isNumber(t)){return fillNumbers(e,t,i,n)}return fillLetters(e,t,Math.max(Math.abs(i),1),n)};var oe=fill$2;const ae=oe;const le=ee;const compile$1=(e,t={})=>{let walk=(e,i={})=>{let s=le.isInvalidBrace(i);let n=e.invalid===true&&t.escapeInvalid===true;let r=s===true||n===true;let o=t.escapeInvalid===true?"\\":"";let l="";if(e.isOpen===true){return o+e.value}if(e.isClose===true){return o+e.value}if(e.type==="open"){return r?o+e.value:"("}if(e.type==="close"){return r?o+e.value:")"}if(e.type==="comma"){return e.prev.type==="comma"?"":r?e.value:"|"}if(e.value){return e.value}if(e.nodes&&e.ranges>0){let i=le.reduce(e.nodes);let s=ae(...i,{...t,wrap:false,toRegex:true});if(s.length!==0){return i.length>1&&s.length>1?`(${s})`:s}}if(e.nodes){for(let t of e.nodes){l+=walk(t,e)}}return l};return walk(e)};var ce=compile$1;const ue=oe;const he=stringify$4;const de=ee;const append=(e="",t="",i=false)=>{let s=[];e=[].concat(e);t=[].concat(t);if(!t.length)return e;if(!e.length){return i?de.flatten(t).map((e=>`{${e}}`)):t}for(let n of e){if(Array.isArray(n)){for(let e of n){s.push(append(e,t,i))}}else{for(let e of t){if(i===true&&typeof e==="string")e=`{${e}}`;s.push(Array.isArray(e)?append(n,e,i):n+e)}}}return de.flatten(s)};const expand$1=(e,t={})=>{let i=t.rangeLimit===void 0?1e3:t.rangeLimit;let walk=(e,s={})=>{e.queue=[];let n=s;let r=s.queue;while(n.type!=="brace"&&n.type!=="root"&&n.parent){n=n.parent;r=n.queue}if(e.invalid||e.dollar){r.push(append(r.pop(),he(e,t)));return}if(e.type==="brace"&&e.invalid!==true&&e.nodes.length===2){r.push(append(r.pop(),["{}"]));return}if(e.nodes&&e.ranges>0){let s=de.reduce(e.nodes);if(de.exceedsLimit(...s,t.step,i)){throw new RangeError("expanded array length exceeds range limit. Use options.rangeLimit to increase or disable the limit.")}let n=ue(...s,t);if(n.length===0){n=he(e,t)}r.push(append(r.pop(),n));e.nodes=[];return}let o=de.encloseBrace(e);let l=e.queue;let c=e;while(c.type!=="brace"&&c.type!=="root"&&c.parent){c=c.parent;l=c.queue}for(let t=0;t<e.nodes.length;t++){let i=e.nodes[t];if(i.type==="comma"&&e.type==="brace"){if(t===1)l.push("");l.push("");continue}if(i.type==="close"){r.push(append(r.pop(),l,o));continue}if(i.value&&i.type!=="open"){l.push(append(l.pop(),i.value));continue}if(i.nodes){walk(i,e)}}return l};return de.flatten(walk(e))};var pe=expand$1;var fe={MAX_LENGTH:1024*64,CHAR_0:"0",CHAR_9:"9",CHAR_UPPERCASE_A:"A",CHAR_LOWERCASE_A:"a",CHAR_UPPERCASE_Z:"Z",CHAR_LOWERCASE_Z:"z",CHAR_LEFT_PARENTHESES:"(",CHAR_RIGHT_PARENTHESES:")",CHAR_ASTERISK:"*",CHAR_AMPERSAND:"&",CHAR_AT:"@",CHAR_BACKSLASH:"\\",CHAR_BACKTICK:"`",CHAR_CARRIAGE_RETURN:"\r",CHAR_CIRCUMFLEX_ACCENT:"^",CHAR_COLON:":",CHAR_COMMA:",",CHAR_DOLLAR:"$",CHAR_DOT:".",CHAR_DOUBLE_QUOTE:'"',CHAR_EQUAL:"=",CHAR_EXCLAMATION_MARK:"!",CHAR_FORM_FEED:"\f",CHAR_FORWARD_SLASH:"/",CHAR_HASH:"#",CHAR_HYPHEN_MINUS:"-",CHAR_LEFT_ANGLE_BRACKET:"<",CHAR_LEFT_CURLY_BRACE:"{",CHAR_LEFT_SQUARE_BRACKET:"[",CHAR_LINE_FEED:"\n",CHAR_NO_BREAK_SPACE:" ",CHAR_PERCENT:"%",CHAR_PLUS:"+",CHAR_QUESTION_MARK:"?",CHAR_RIGHT_ANGLE_BRACKET:">",CHAR_RIGHT_CURLY_BRACE:"}",CHAR_RIGHT_SQUARE_BRACKET:"]",CHAR_SEMICOLON:";",CHAR_SINGLE_QUOTE:"'",CHAR_SPACE:" ",CHAR_TAB:"\t",CHAR_UNDERSCORE:"_",CHAR_VERTICAL_LINE:"|",CHAR_ZERO_WIDTH_NOBREAK_SPACE:"\ufeff"};const me=stringify$4;const{MAX_LENGTH:ge,CHAR_BACKSLASH:ye,CHAR_BACKTICK:Ee,CHAR_COMMA:xe,CHAR_DOT:be,CHAR_LEFT_PARENTHESES:ve,CHAR_RIGHT_PARENTHESES:Se,CHAR_LEFT_CURLY_BRACE:Ae,CHAR_RIGHT_CURLY_BRACE:we,CHAR_LEFT_SQUARE_BRACKET:Ie,CHAR_RIGHT_SQUARE_BRACKET:ke,CHAR_DOUBLE_QUOTE:Ce,CHAR_SINGLE_QUOTE:_e,CHAR_NO_BREAK_SPACE:Pe,CHAR_ZERO_WIDTH_NOBREAK_SPACE:Ne}=fe;const parse$1=(e,t={})=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}let i=t||{};let s=typeof i.maxLength==="number"?Math.min(ge,i.maxLength):ge;if(e.length>s){throw new SyntaxError(`Input length (${e.length}), exceeds max characters (${s})`)}let n={type:"root",input:e,nodes:[]};let r=[n];let o=n;let l=n;let c=0;let u=e.length;let h=0;let d=0;let p;const advance=()=>e[h++];const push=e=>{if(e.type==="text"&&l.type==="dot"){l.type="text"}if(l&&l.type==="text"&&e.type==="text"){l.value+=e.value;return}o.nodes.push(e);e.parent=o;e.prev=l;l=e;return e};push({type:"bos"});while(h<u){o=r[r.length-1];p=advance();if(p===Ne||p===Pe){continue}if(p===ye){push({type:"text",value:(t.keepEscaping?p:"")+advance()});continue}if(p===ke){push({type:"text",value:"\\"+p});continue}if(p===Ie){c++;let e;while(h<u&&(e=advance())){p+=e;if(e===Ie){c++;continue}if(e===ye){p+=advance();continue}if(e===ke){c--;if(c===0){break}}}push({type:"text",value:p});continue}if(p===ve){o=push({type:"paren",nodes:[]});r.push(o);push({type:"text",value:p});continue}if(p===Se){if(o.type!=="paren"){push({type:"text",value:p});continue}o=r.pop();push({type:"text",value:p});o=r[r.length-1];continue}if(p===Ce||p===_e||p===Ee){let e=p;let i;if(t.keepQuotes!==true){p=""}while(h<u&&(i=advance())){if(i===ye){p+=i+advance();continue}if(i===e){if(t.keepQuotes===true)p+=i;break}p+=i}push({type:"text",value:p});continue}if(p===Ae){d++;let e=l.value&&l.value.slice(-1)==="$"||o.dollar===true;let t={type:"brace",open:true,close:false,dollar:e,depth:d,commas:0,ranges:0,nodes:[]};o=push(t);r.push(o);push({type:"open",value:p});continue}if(p===we){if(o.type!=="brace"){push({type:"text",value:p});continue}let e="close";o=r.pop();o.close=true;push({type:e,value:p});d--;o=r[r.length-1];continue}if(p===xe&&d>0){if(o.ranges>0){o.ranges=0;let e=o.nodes.shift();o.nodes=[e,{type:"text",value:me(o)}]}push({type:"comma",value:p});o.commas++;continue}if(p===be&&d>0&&o.commas===0){let e=o.nodes;if(d===0||e.length===0){push({type:"text",value:p});continue}if(l.type==="dot"){o.range=[];l.value+=p;l.type="range";if(o.nodes.length!==3&&o.nodes.length!==5){o.invalid=true;o.ranges=0;l.type="text";continue}o.ranges++;o.args=[];continue}if(l.type==="range"){e.pop();let t=e[e.length-1];t.value+=l.value+p;l=t;o.ranges--;continue}push({type:"dot",value:p});continue}push({type:"text",value:p})}do{o=r.pop();if(o.type!=="root"){o.nodes.forEach((e=>{if(!e.nodes){if(e.type==="open")e.isOpen=true;if(e.type==="close")e.isClose=true;if(!e.nodes)e.type="text";e.invalid=true}}));let e=r[r.length-1];let t=e.nodes.indexOf(o);e.nodes.splice(t,1,...o.nodes)}}while(r.length>0);push({type:"eos"});return n};var Re=parse$1;const $e=stringify$4;const Oe=ce;const Te=pe;const De=Re;const braces$1=(e,t={})=>{let i=[];if(Array.isArray(e)){for(let s of e){let e=braces$1.create(s,t);if(Array.isArray(e)){i.push(...e)}else{i.push(e)}}}else{i=[].concat(braces$1.create(e,t))}if(t&&t.expand===true&&t.nodupes===true){i=[...new Set(i)]}return i};braces$1.parse=(e,t={})=>De(e,t);braces$1.stringify=(e,t={})=>{if(typeof e==="string"){return $e(braces$1.parse(e,t),t)}return $e(e,t)};braces$1.compile=(e,t={})=>{if(typeof e==="string"){e=braces$1.parse(e,t)}return Oe(e,t)};braces$1.expand=(e,t={})=>{if(typeof e==="string"){e=braces$1.parse(e,t)}let i=Te(e,t);if(t.noempty===true){i=i.filter(Boolean)}if(t.nodupes===true){i=[...new Set(i)]}return i};braces$1.create=(e,t={})=>{if(e===""||e.length<3){return[e]}return t.expand!==true?braces$1.compile(e,t):braces$1.expand(e,t)};var Me=braces$1;const Le=["3dm","3ds","3g2","3gp","7z","a","aac","adp","ai","aif","aiff","alz","ape","apk","appimage","ar","arj","asf","au","avi","bak","baml","bh","bin","bk","bmp","btif","bz2","bzip2","cab","caf","cgm","class","cmx","cpio","cr2","cur","dat","dcm","deb","dex","djvu","dll","dmg","dng","doc","docm","docx","dot","dotm","dra","DS_Store","dsk","dts","dtshd","dvb","dwg","dxf","ecelp4800","ecelp7470","ecelp9600","egg","eol","eot","epub","exe","f4v","fbs","fh","fla","flac","flatpak","fli","flv","fpx","fst","fvt","g3","gh","gif","graffle","gz","gzip","h261","h263","h264","icns","ico","ief","img","ipa","iso","jar","jpeg","jpg","jpgv","jpm","jxr","key","ktx","lha","lib","lvp","lz","lzh","lzma","lzo","m3u","m4a","m4v","mar","mdi","mht","mid","midi","mj2","mka","mkv","mmr","mng","mobi","mov","movie","mp3","mp4","mp4a","mpeg","mpg","mpga","mxu","nef","npx","numbers","nupkg","o","odp","ods","odt","oga","ogg","ogv","otf","ott","pages","pbm","pcx","pdb","pdf","pea","pgm","pic","png","pnm","pot","potm","potx","ppa","ppam","ppm","pps","ppsm","ppsx","ppt","pptm","pptx","psd","pya","pyc","pyo","pyv","qt","rar","ras","raw","resources","rgb","rip","rlc","rmf","rmvb","rpm","rtf","rz","s3m","s7z","scpt","sgi","shar","snap","sil","sketch","slk","smv","snk","so","stl","suo","sub","swf","tar","tbz","tbz2","tga","tgz","thmx","tif","tiff","tlz","ttc","ttf","txz","udf","uvh","uvi","uvm","uvp","uvs","uvu","viv","vob","war","wav","wax","wbmp","wdp","weba","webm","webp","whl","wim","wm","wma","wmv","wmx","woff","woff2","wrm","wvx","xbm","xif","xla","xlam","xls","xlsb","xlsm","xlsx","xlt","xltm","xltx","xm","xmind","xpi","xpm","xwd","xz","z","zip","zipx"];var Be=Le;const Fe=l;const Ve=Be;const ze=new Set(Ve);var isBinaryPath$1=e=>ze.has(Fe.extname(e).slice(1).toLowerCase());var je={};(function(e){const{sep:t}=l;const{platform:i}=process;const s=c;e.EV_ALL="all";e.EV_READY="ready";e.EV_ADD="add";e.EV_CHANGE="change";e.EV_ADD_DIR="addDir";e.EV_UNLINK="unlink";e.EV_UNLINK_DIR="unlinkDir";e.EV_RAW="raw";e.EV_ERROR="error";e.STR_DATA="data";e.STR_END="end";e.STR_CLOSE="close";e.FSEVENT_CREATED="created";e.FSEVENT_MODIFIED="modified";e.FSEVENT_DELETED="deleted";e.FSEVENT_MOVED="moved";e.FSEVENT_CLONED="cloned";e.FSEVENT_UNKNOWN="unknown";e.FSEVENT_TYPE_FILE="file";e.FSEVENT_TYPE_DIRECTORY="directory";e.FSEVENT_TYPE_SYMLINK="symlink";e.KEY_LISTENERS="listeners";e.KEY_ERR="errHandlers";e.KEY_RAW="rawEmitters";e.HANDLER_KEYS=[e.KEY_LISTENERS,e.KEY_ERR,e.KEY_RAW];e.DOT_SLASH=`.${t}`;e.BACK_SLASH_RE=/\\/g;e.DOUBLE_SLASH_RE=/\/\//;e.SLASH_OR_BACK_SLASH_RE=/[/\\]/;e.DOT_RE=/\..*\.(sw[px])$|~$|\.subl.*\.tmp/;e.REPLACER_RE=/^\.[/\\]/;e.SLASH="/";e.SLASH_SLASH="//";e.BRACE_START="{";e.BANG="!";e.ONE_DOT=".";e.TWO_DOTS="..";e.STAR="*";e.GLOBSTAR="**";e.ROOT_GLOBSTAR="/**/*";e.SLASH_GLOBSTAR="/**";e.DIR_SUFFIX="Dir";e.ANYMATCH_OPTS={dot:true};e.STRING_TYPE="string";e.FUNCTION_TYPE="function";e.EMPTY_STR="";e.EMPTY_FN=()=>{};e.IDENTITY_FN=e=>e;e.isWindows=i==="win32";e.isMacos=i==="darwin";e.isLinux=i==="linux";e.isIBMi=s.type()==="OS400"})(je);const Ue=n;const He=l;const{promisify:Ge}=r;const We=isBinaryPath$1;const{isWindows:qe,isLinux:Ke,EMPTY_FN:Ye,EMPTY_STR:Qe,KEY_LISTENERS:Xe,KEY_ERR:Ze,KEY_RAW:Je,HANDLER_KEYS:et,EV_CHANGE:tt,EV_ADD:it,EV_ADD_DIR:st,EV_ERROR:nt,STR_DATA:rt,STR_END:ot,BRACE_START:lt,STAR:ct}=je;const ut="watch";const ht=Ge(Ue.open);const dt=Ge(Ue.stat);const pt=Ge(Ue.lstat);const ft=Ge(Ue.close);const mt=Ge(Ue.realpath);const gt={lstat:pt,stat:dt};const foreach=(e,t)=>{if(e instanceof Set){e.forEach(t)}else{t(e)}};const addAndConvert=(e,t,i)=>{let s=e[t];if(!(s instanceof Set)){e[t]=s=new Set([s])}s.add(i)};const clearItem=e=>t=>{const i=e[t];if(i instanceof Set){i.clear()}else{delete e[t]}};const delFromSet=(e,t,i)=>{const s=e[t];if(s instanceof Set){s.delete(i)}else if(s===i){delete e[t]}};const isEmptySet=e=>e instanceof Set?e.size===0:!e;const yt=new Map;function createFsWatchInstance(e,t,i,s,n){const handleEvent=(t,s)=>{i(e);n(t,s,{watchedPath:e});if(s&&e!==s){fsWatchBroadcast(He.resolve(e,s),Xe,He.join(e,s))}};try{return Ue.watch(e,t,handleEvent)}catch(e){s(e)}}const fsWatchBroadcast=(e,t,i,s,n)=>{const r=yt.get(e);if(!r)return;foreach(r[t],(e=>{e(i,s,n)}))};const setFsWatchListener=(e,t,i,s)=>{const{listener:n,errHandler:r,rawEmitter:o}=s;let l=yt.get(t);let c;if(!i.persistent){c=createFsWatchInstance(e,i,n,r,o);return c.close.bind(c)}if(l){addAndConvert(l,Xe,n);addAndConvert(l,Ze,r);addAndConvert(l,Je,o)}else{c=createFsWatchInstance(e,i,fsWatchBroadcast.bind(null,t,Xe),r,fsWatchBroadcast.bind(null,t,Je));if(!c)return;c.on(nt,(async i=>{const s=fsWatchBroadcast.bind(null,t,Ze);l.watcherUnusable=true;if(qe&&i.code==="EPERM"){try{const t=await ht(e,"r");await ft(t);s(i)}catch(e){}}else{s(i)}}));l={listeners:n,errHandlers:r,rawEmitters:o,watcher:c};yt.set(t,l)}return()=>{delFromSet(l,Xe,n);delFromSet(l,Ze,r);delFromSet(l,Je,o);if(isEmptySet(l.listeners)){l.watcher.close();yt.delete(t);et.forEach(clearItem(l));l.watcher=undefined;Object.freeze(l)}}};const Et=new Map;const setFsWatchFileListener=(e,t,i,s)=>{const{listener:n,rawEmitter:r}=s;let o=Et.get(t);const l=o&&o.options;if(l&&(l.persistent<i.persistent||l.interval>i.interval)){Ue.unwatchFile(t);o=undefined}if(o){addAndConvert(o,Xe,n);addAndConvert(o,Je,r)}else{o={listeners:n,rawEmitters:r,options:i,watcher:Ue.watchFile(t,i,((i,s)=>{foreach(o.rawEmitters,(e=>{e(tt,t,{curr:i,prev:s})}));const n=i.mtimeMs;if(i.size!==s.size||n>s.mtimeMs||n===0){foreach(o.listeners,(t=>t(e,i)))}}))};Et.set(t,o)}return()=>{delFromSet(o,Xe,n);delFromSet(o,Je,r);if(isEmptySet(o.listeners)){Et.delete(t);Ue.unwatchFile(t);o.options=o.watcher=undefined;Object.freeze(o)}}};let xt=class NodeFsHandler{constructor(e){this.fsw=e;this._boundHandleError=t=>e._handleError(t)}_watchWithNodeFs(e,t){const i=this.fsw.options;const s=He.dirname(e);const n=He.basename(e);const r=this.fsw._getWatchedDir(s);r.add(n);const o=He.resolve(e);const l={persistent:i.persistent};if(!t)t=Ye;let c;if(i.usePolling){l.interval=i.enableBinaryInterval&&We(n)?i.binaryInterval:i.interval;c=setFsWatchFileListener(e,o,l,{listener:t,rawEmitter:this.fsw._emitRaw})}else{c=setFsWatchListener(e,o,l,{listener:t,errHandler:this._boundHandleError,rawEmitter:this.fsw._emitRaw})}return c}_handleFile(e,t,i){if(this.fsw.closed){return}const s=He.dirname(e);const n=He.basename(e);const r=this.fsw._getWatchedDir(s);let o=t;if(r.has(n))return;const listener=async(t,i)=>{if(!this.fsw._throttle(ut,e,5))return;if(!i||i.mtimeMs===0){try{const i=await dt(e);if(this.fsw.closed)return;const s=i.atimeMs;const n=i.mtimeMs;if(!s||s<=n||n!==o.mtimeMs){this.fsw._emit(tt,e,i)}if(Ke&&o.ino!==i.ino){this.fsw._closeFile(t);o=i;this.fsw._addPathCloser(t,this._watchWithNodeFs(e,listener))}else{o=i}}catch(e){this.fsw._remove(s,n)}}else if(r.has(n)){const t=i.atimeMs;const s=i.mtimeMs;if(!t||t<=s||s!==o.mtimeMs){this.fsw._emit(tt,e,i)}o=i}};const l=this._watchWithNodeFs(e,listener);if(!(i&&this.fsw.options.ignoreInitial)&&this.fsw._isntIgnored(e)){if(!this.fsw._throttle(it,e,0))return;this.fsw._emit(it,e,t)}return l}async _handleSymlink(e,t,i,s){if(this.fsw.closed){return}const n=e.fullPath;const r=this.fsw._getWatchedDir(t);if(!this.fsw.options.followSymlinks){this.fsw._incrReadyCount();let t;try{t=await mt(i)}catch(e){this.fsw._emitReady();return true}if(this.fsw.closed)return;if(r.has(s)){if(this.fsw._symlinkPaths.get(n)!==t){this.fsw._symlinkPaths.set(n,t);this.fsw._emit(tt,i,e.stats)}}else{r.add(s);this.fsw._symlinkPaths.set(n,t);this.fsw._emit(it,i,e.stats)}this.fsw._emitReady();return true}if(this.fsw._symlinkPaths.has(n)){return true}this.fsw._symlinkPaths.set(n,true)}_handleRead(e,t,i,s,n,r,o){e=He.join(e,Qe);if(!i.hasGlob){o=this.fsw._throttle("readdir",e,1e3);if(!o)return}const l=this.fsw._getWatchedDir(i.path);const c=new Set;let u=this.fsw._readdirp(e,{fileFilter:e=>i.filterPath(e),directoryFilter:e=>i.filterDir(e),depth:0}).on(rt,(async o=>{if(this.fsw.closed){u=undefined;return}const h=o.path;let d=He.join(e,h);c.add(h);if(o.stats.isSymbolicLink()&&await this._handleSymlink(o,e,d,h)){return}if(this.fsw.closed){u=undefined;return}if(h===s||!s&&!l.has(h)){this.fsw._incrReadyCount();d=He.join(n,He.relative(n,d));this._addToNodeFs(d,t,i,r+1)}})).on(nt,this._boundHandleError);return new Promise((t=>u.once(ot,(()=>{if(this.fsw.closed){u=undefined;return}const h=o?o.clear():false;t();l.getChildren().filter((t=>t!==e&&!c.has(t)&&(!i.hasGlob||i.filterPath({fullPath:He.resolve(e,t)})))).forEach((t=>{this.fsw._remove(e,t)}));u=undefined;if(h)this._handleRead(e,false,i,s,n,r,o)}))))}async _handleDir(e,t,i,s,n,r,o){const l=this.fsw._getWatchedDir(He.dirname(e));const c=l.has(He.basename(e));if(!(i&&this.fsw.options.ignoreInitial)&&!n&&!c){if(!r.hasGlob||r.globFilter(e))this.fsw._emit(st,e,t)}l.add(He.basename(e));this.fsw._getWatchedDir(e);let u;let h;const d=this.fsw.options.depth;if((d==null||s<=d)&&!this.fsw._symlinkPaths.has(o)){if(!n){await this._handleRead(e,i,r,n,e,s,u);if(this.fsw.closed)return}h=this._watchWithNodeFs(e,((t,i)=>{if(i&&i.mtimeMs===0)return;this._handleRead(t,false,r,n,e,s,u)}))}return h}async _addToNodeFs(e,t,i,s,n){const r=this.fsw._emitReady;if(this.fsw._isIgnored(e)||this.fsw.closed){r();return false}const o=this.fsw._getWatchHelpers(e,s);if(!o.hasGlob&&i){o.hasGlob=i.hasGlob;o.globFilter=i.globFilter;o.filterPath=e=>i.filterPath(e);o.filterDir=e=>i.filterDir(e)}try{const i=await gt[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,i)){r();return false}const l=this.fsw.options.followSymlinks&&!e.includes(ct)&&!e.includes(lt);let c;if(i.isDirectory()){const r=He.resolve(e);const u=l?await mt(e):e;if(this.fsw.closed)return;c=await this._handleDir(o.watchPath,i,t,s,n,o,u);if(this.fsw.closed)return;if(r!==u&&u!==undefined){this.fsw._symlinkPaths.set(r,u)}}else if(i.isSymbolicLink()){const n=l?await mt(e):e;if(this.fsw.closed)return;const r=He.dirname(o.watchPath);this.fsw._getWatchedDir(r).add(o.watchPath);this.fsw._emit(it,o.watchPath,i);c=await this._handleDir(r,i,t,s,e,o,n);if(this.fsw.closed)return;if(n!==undefined){this.fsw._symlinkPaths.set(He.resolve(e),n)}}else{c=this._handleFile(o.watchPath,i,t)}r();this.fsw._addPathCloser(e,c);return false}catch(t){if(this.fsw._handleError(t)){r();return e}}}};var bt=xt;var vt={exports:{}};const St=s.getAugmentedNamespace(u.fseventsImporter);const At=n;const wt=l;const{promisify:It}=r;let kt;try{kt=St.getFsEvents()}catch(e){if(process.env.CHOKIDAR_PRINT_FSEVENTS_REQUIRE_ERROR)console.error(e)}if(kt){const e=process.version.match(/v(\d+)\.(\d+)/);if(e&&e[1]&&e[2]){const t=Number.parseInt(e[1],10);const i=Number.parseInt(e[2],10);if(t===8&&i<16){kt=undefined}}}const{EV_ADD:Ct,EV_CHANGE:_t,EV_ADD_DIR:Pt,EV_UNLINK:Nt,EV_ERROR:Rt,STR_DATA:$t,STR_END:Ot,FSEVENT_CREATED:Tt,FSEVENT_MODIFIED:Dt,FSEVENT_DELETED:Mt,FSEVENT_MOVED:Lt,FSEVENT_UNKNOWN:Bt,FSEVENT_TYPE_FILE:Ft,FSEVENT_TYPE_DIRECTORY:Vt,FSEVENT_TYPE_SYMLINK:zt,ROOT_GLOBSTAR:jt,DIR_SUFFIX:Ut,DOT_SLASH:Ht,FUNCTION_TYPE:Gt,EMPTY_FN:Wt,IDENTITY_FN:qt}=je;const Depth=e=>isNaN(e)?{}:{depth:e};const Kt=It(At.stat);const Yt=It(At.lstat);const Qt=It(At.realpath);const Xt={stat:Kt,lstat:Yt};const Zt=new Map;const Jt=10;const ei=new Set([69888,70400,71424,72704,73472,131328,131840,262912]);const createFSEventsInstance=(e,t)=>{const i=kt.watch(e,t);return{stop:i}};function setFSEventsListener(e,t,i,s){let n=wt.extname(t)?wt.dirname(t):t;const r=wt.dirname(n);let o=Zt.get(n);if(couldConsolidate(r)){n=r}const l=wt.resolve(e);const c=l!==t;const filteredListener=(e,s,n)=>{if(c)e=e.replace(t,l);if(e===l||!e.indexOf(l+wt.sep))i(e,s,n)};let u=false;for(const e of Zt.keys()){if(t.indexOf(wt.resolve(e)+wt.sep)===0){n=e;o=Zt.get(n);u=true;break}}if(o||u){o.listeners.add(filteredListener)}else{o={listeners:new Set([filteredListener]),rawEmitter:s,watcher:createFSEventsInstance(n,((e,t)=>{if(!o.listeners.size)return;const i=kt.getInfo(e,t);o.listeners.forEach((s=>{s(e,t,i)}));o.rawEmitter(i.event,e,i)}))};Zt.set(n,o)}return()=>{const e=o.listeners;e.delete(filteredListener);if(!e.size){Zt.delete(n);if(o.watcher)return o.watcher.stop().then((()=>{o.rawEmitter=o.watcher=undefined;Object.freeze(o)}))}}}const couldConsolidate=e=>{let t=0;for(const i of Zt.keys()){if(i.indexOf(e)===0){t++;if(t>=Jt){return true}}}return false};const canUse=()=>kt&&Zt.size<128;const calcDepth=(e,t)=>{let i=0;while(!e.indexOf(t)&&(e=wt.dirname(e))!==t)i++;return i};const sameTypes=(e,t)=>e.type===Vt&&t.isDirectory()||e.type===zt&&t.isSymbolicLink()||e.type===Ft&&t.isFile();let ti=class FsEventsHandler{constructor(e){this.fsw=e}checkIgnored(e,t){const i=this.fsw._ignoredPaths;if(this.fsw._isIgnored(e,t)){i.add(e);if(t&&t.isDirectory()){i.add(e+jt)}return true}i.delete(e);i.delete(e+jt)}addOrChange(e,t,i,s,n,r,o,l){const c=n.has(r)?_t:Ct;this.handleEvent(c,e,t,i,s,n,r,o,l)}async checkExists(e,t,i,s,n,r,o,l){try{const c=await Kt(e);if(this.fsw.closed)return;if(sameTypes(o,c)){this.addOrChange(e,t,i,s,n,r,o,l)}else{this.handleEvent(Nt,e,t,i,s,n,r,o,l)}}catch(c){if(c.code==="EACCES"){this.addOrChange(e,t,i,s,n,r,o,l)}else{this.handleEvent(Nt,e,t,i,s,n,r,o,l)}}}handleEvent(e,t,i,s,n,r,o,l,c){if(this.fsw.closed||this.checkIgnored(t))return;if(e===Nt){const e=l.type===Vt;if(e||r.has(o)){this.fsw._remove(n,o,e)}}else{if(e===Ct){if(l.type===Vt)this.fsw._getWatchedDir(t);if(l.type===zt&&c.followSymlinks){const e=c.depth===undefined?undefined:calcDepth(i,s)+1;return this._addToFsEvents(t,false,true,e)}this.fsw._getWatchedDir(n).add(o)}const r=l.type===Vt?e+Ut:e;this.fsw._emit(r,t);if(r===Pt)this._addToFsEvents(t,false,true)}}_watchWithFsEvents(e,t,i,s){if(this.fsw.closed||this.fsw._isIgnored(e))return;const n=this.fsw.options;const watchCallback=async(r,o,l)=>{if(this.fsw.closed)return;if(n.depth!==undefined&&calcDepth(r,t)>n.depth)return;const c=i(wt.join(e,wt.relative(e,r)));if(s&&!s(c))return;const u=wt.dirname(c);const h=wt.basename(c);const d=this.fsw._getWatchedDir(l.type===Vt?c:u);if(ei.has(o)||l.event===Bt){if(typeof n.ignored===Gt){let e;try{e=await Kt(c)}catch(e){}if(this.fsw.closed)return;if(this.checkIgnored(c,e))return;if(sameTypes(l,e)){this.addOrChange(c,r,t,u,d,h,l,n)}else{this.handleEvent(Nt,c,r,t,u,d,h,l,n)}}else{this.checkExists(c,r,t,u,d,h,l,n)}}else{switch(l.event){case Tt:case Dt:return this.addOrChange(c,r,t,u,d,h,l,n);case Mt:case Lt:return this.checkExists(c,r,t,u,d,h,l,n)}}};const r=setFSEventsListener(e,t,watchCallback,this.fsw._emitRaw);this.fsw._emitReady();return r}async _handleFsEventsSymlink(e,t,i,s){if(this.fsw.closed||this.fsw._symlinkPaths.has(t))return;this.fsw._symlinkPaths.set(t,true);this.fsw._incrReadyCount();try{const t=await Qt(e);if(this.fsw.closed)return;if(this.fsw._isIgnored(t)){return this.fsw._emitReady()}this.fsw._incrReadyCount();this._addToFsEvents(t||e,(s=>{let n=e;if(t&&t!==Ht){n=s.replace(t,e)}else if(s!==Ht){n=wt.join(e,s)}return i(n)}),false,s)}catch(e){if(this.fsw._handleError(e)){return this.fsw._emitReady()}}}emitAdd(e,t,i,s,n){const r=i(e);const o=t.isDirectory();const l=this.fsw._getWatchedDir(wt.dirname(r));const c=wt.basename(r);if(o)this.fsw._getWatchedDir(r);if(l.has(c))return;l.add(c);if(!s.ignoreInitial||n===true){this.fsw._emit(o?Pt:Ct,r,t)}}initWatch(e,t,i,s){if(this.fsw.closed)return;const n=this._watchWithFsEvents(i.watchPath,wt.resolve(e||i.watchPath),s,i.globFilter);this.fsw._addPathCloser(t,n)}async _addToFsEvents(e,t,i,s){if(this.fsw.closed){return}const n=this.fsw.options;const r=typeof t===Gt?t:qt;const o=this.fsw._getWatchHelpers(e);try{const t=await Xt[o.statMethod](o.watchPath);if(this.fsw.closed)return;if(this.fsw._isIgnored(o.watchPath,t)){throw null}if(t.isDirectory()){if(!o.globFilter)this.emitAdd(r(e),t,r,n,i);if(s&&s>n.depth)return;this.fsw._readdirp(o.watchPath,{fileFilter:e=>o.filterPath(e),directoryFilter:e=>o.filterDir(e),...Depth(n.depth-(s||0))}).on($t,(e=>{if(this.fsw.closed){return}if(e.stats.isDirectory()&&!o.filterPath(e))return;const t=wt.join(o.watchPath,e.path);const{fullPath:s}=e;if(o.followSymlinks&&e.stats.isSymbolicLink()){const e=n.depth===undefined?undefined:calcDepth(t,wt.resolve(o.watchPath))+1;this._handleFsEventsSymlink(t,s,r,e)}else{this.emitAdd(t,e.stats,r,n,i)}})).on(Rt,Wt).on(Ot,(()=>{this.fsw._emitReady()}))}else{this.emitAdd(o.watchPath,t,r,n,i);this.fsw._emitReady()}}catch(e){if(!e||this.fsw._handleError(e)){this.fsw._emitReady();this.fsw._emitReady()}}if(n.persistent&&i!==true){if(typeof t===Gt){this.initWatch(undefined,e,o,r)}else{let t;try{t=await Qt(o.watchPath)}catch(e){}this.initWatch(t,e,o,r)}}}};vt.exports=ti;vt.exports.canUse=canUse;var ii=vt.exports;const{EventEmitter:si}=h;const ni=n;const ri=l;const{promisify:oi}=r;const ai=O;const li=V.default;const ci=J;const ui=H;const hi=Me;const di=normalizePath$2;const pi=bt;const fi=ii;const{EV_ALL:mi,EV_READY:gi,EV_ADD:yi,EV_CHANGE:Ei,EV_UNLINK:xi,EV_ADD_DIR:bi,EV_UNLINK_DIR:vi,EV_RAW:Si,EV_ERROR:Ai,STR_CLOSE:wi,STR_END:Ii,BACK_SLASH_RE:ki,DOUBLE_SLASH_RE:Ci,SLASH_OR_BACK_SLASH_RE:_i,DOT_RE:Pi,REPLACER_RE:Ni,SLASH:Ri,SLASH_SLASH:$i,BRACE_START:Oi,BANG:Ti,ONE_DOT:Di,TWO_DOTS:Mi,GLOBSTAR:Li,SLASH_GLOBSTAR:Bi,ANYMATCH_OPTS:Fi,STRING_TYPE:Vi,FUNCTION_TYPE:zi,EMPTY_STR:ji,EMPTY_FN:Ui,isWindows:Hi,isMacos:Gi,isIBMi:Wi}=je;const qi=oi(ni.stat);const Ki=oi(ni.readdir);const arrify=(e=[])=>Array.isArray(e)?e:[e];const flatten=(e,t=[])=>{e.forEach((e=>{if(Array.isArray(e)){flatten(e,t)}else{t.push(e)}}));return t};const unifyPaths=e=>{const t=flatten(arrify(e));if(!t.every((e=>typeof e===Vi))){throw new TypeError(`Non-string provided as watch path: ${t}`)}return t.map(normalizePathToUnix)};const toUnix=e=>{let t=e.replace(ki,Ri);let i=false;if(t.startsWith($i)){i=true}while(t.match(Ci)){t=t.replace(Ci,Ri)}if(i){t=Ri+t}return t};const normalizePathToUnix=e=>toUnix(ri.normalize(toUnix(e)));const normalizeIgnored=(e=ji)=>t=>{if(typeof t!==Vi)return t;return normalizePathToUnix(ri.isAbsolute(t)?t:ri.join(e,t))};const getAbsolutePath=(e,t)=>{if(ri.isAbsolute(e)){return e}if(e.startsWith(Ti)){return Ti+ri.join(t,e.slice(1))}return ri.join(t,e)};const undef=(e,t)=>e[t]===undefined;class DirEntry{constructor(e,t){this.path=e;this._removeWatcher=t;this.items=new Set}add(e){const{items:t}=this;if(!t)return;if(e!==Di&&e!==Mi)t.add(e)}async remove(e){const{items:t}=this;if(!t)return;t.delete(e);if(t.size>0)return;const i=this.path;try{await Ki(i)}catch(e){if(this._removeWatcher){this._removeWatcher(ri.dirname(i),ri.basename(i))}}}has(e){const{items:t}=this;if(!t)return;return t.has(e)}getChildren(){const{items:e}=this;if(!e)return;return[...e.values()]}dispose(){this.items.clear();delete this.path;delete this._removeWatcher;delete this.items;Object.freeze(this)}}const Yi="stat";const Qi="lstat";class WatchHelper{constructor(e,t,i,s){this.fsw=s;this.path=e=e.replace(Ni,ji);this.watchPath=t;this.fullWatchPath=ri.resolve(t);this.hasGlob=t!==e;if(e===ji)this.hasGlob=false;this.globSymlink=this.hasGlob&&i?undefined:false;this.globFilter=this.hasGlob?li(e,undefined,Fi):false;this.dirParts=this.getDirParts(e);this.dirParts.forEach((e=>{if(e.length>1)e.pop()}));this.followSymlinks=i;this.statMethod=i?Yi:Qi}checkGlobSymlink(e){if(this.globSymlink===undefined){this.globSymlink=e.fullParentDir===this.fullWatchPath?false:{realPath:e.fullParentDir,linkPath:this.fullWatchPath}}if(this.globSymlink){return e.fullPath.replace(this.globSymlink.realPath,this.globSymlink.linkPath)}return e.fullPath}entryPath(e){return ri.join(this.watchPath,ri.relative(this.watchPath,this.checkGlobSymlink(e)))}filterPath(e){const{stats:t}=e;if(t&&t.isSymbolicLink())return this.filterDir(e);const i=this.entryPath(e);const s=this.hasGlob&&typeof this.globFilter===zi?this.globFilter(i):true;return s&&this.fsw._isntIgnored(i,t)&&this.fsw._hasReadPermissions(t)}getDirParts(e){if(!this.hasGlob)return[];const t=[];const i=e.includes(Oi)?hi.expand(e):[e];i.forEach((e=>{t.push(ri.relative(this.watchPath,e).split(_i))}));return t}filterDir(e){if(this.hasGlob){const t=this.getDirParts(this.checkGlobSymlink(e));let i=false;this.unmatchedGlob=!this.dirParts.some((e=>e.every(((e,s)=>{if(e===Li)i=true;return i||!t[0][s]||li(e,t[0][s],Fi)}))))}return!this.unmatchedGlob&&this.fsw._isntIgnored(this.entryPath(e),e.stats)}}class FSWatcher extends si{constructor(e){super();const t={};if(e)Object.assign(t,e);this._watched=new Map;this._closers=new Map;this._ignoredPaths=new Set;this._throttled=new Map;this._symlinkPaths=new Map;this._streams=new Set;this.closed=false;if(undef(t,"persistent"))t.persistent=true;if(undef(t,"ignoreInitial"))t.ignoreInitial=false;if(undef(t,"ignorePermissionErrors"))t.ignorePermissionErrors=false;if(undef(t,"interval"))t.interval=100;if(undef(t,"binaryInterval"))t.binaryInterval=300;if(undef(t,"disableGlobbing"))t.disableGlobbing=false;t.enableBinaryInterval=t.binaryInterval!==t.interval;if(undef(t,"useFsEvents"))t.useFsEvents=!t.usePolling;const i=fi.canUse();if(!i)t.useFsEvents=false;if(undef(t,"usePolling")&&!t.useFsEvents){t.usePolling=Gi}if(Wi){t.usePolling=true}const s=process.env.CHOKIDAR_USEPOLLING;if(s!==undefined){const e=s.toLowerCase();if(e==="false"||e==="0"){t.usePolling=false}else if(e==="true"||e==="1"){t.usePolling=true}else{t.usePolling=!!e}}const n=process.env.CHOKIDAR_INTERVAL;if(n){t.interval=Number.parseInt(n,10)}if(undef(t,"atomic"))t.atomic=!t.usePolling&&!t.useFsEvents;if(t.atomic)this._pendingUnlinks=new Map;if(undef(t,"followSymlinks"))t.followSymlinks=true;if(undef(t,"awaitWriteFinish"))t.awaitWriteFinish=false;if(t.awaitWriteFinish===true)t.awaitWriteFinish={};const r=t.awaitWriteFinish;if(r){if(!r.stabilityThreshold)r.stabilityThreshold=2e3;if(!r.pollInterval)r.pollInterval=100;this._pendingWrites=new Map}if(t.ignored)t.ignored=arrify(t.ignored);let o=0;this._emitReady=()=>{o++;if(o>=this._readyCount){this._emitReady=Ui;this._readyEmitted=true;process.nextTick((()=>this.emit(gi)))}};this._emitRaw=(...e)=>this.emit(Si,...e);this._readyEmitted=false;this.options=t;if(t.useFsEvents){this._fsEventsHandler=new fi(this)}else{this._nodeFsHandler=new pi(this)}Object.freeze(t)}add(e,t,i){const{cwd:s,disableGlobbing:n}=this.options;this.closed=false;let r=unifyPaths(e);if(s){r=r.map((e=>{const t=getAbsolutePath(e,s);if(n||!ui(e)){return t}return di(t)}))}r=r.filter((e=>{if(e.startsWith(Ti)){this._ignoredPaths.add(e.slice(1));return false}this._ignoredPaths.delete(e);this._ignoredPaths.delete(e+Bi);this._userIgnored=undefined;return true}));if(this.options.useFsEvents&&this._fsEventsHandler){if(!this._readyCount)this._readyCount=r.length;if(this.options.persistent)this._readyCount*=2;r.forEach((e=>this._fsEventsHandler._addToFsEvents(e)))}else{if(!this._readyCount)this._readyCount=0;this._readyCount+=r.length;Promise.all(r.map((async e=>{const s=await this._nodeFsHandler._addToNodeFs(e,!i,0,0,t);if(s)this._emitReady();return s}))).then((e=>{if(this.closed)return;e.filter((e=>e)).forEach((e=>{this.add(ri.dirname(e),ri.basename(t||e))}))}))}return this}unwatch(e){if(this.closed)return this;const t=unifyPaths(e);const{cwd:i}=this.options;t.forEach((e=>{if(!ri.isAbsolute(e)&&!this._closers.has(e)){if(i)e=ri.join(i,e);e=ri.resolve(e)}this._closePath(e);this._ignoredPaths.add(e);if(this._watched.has(e)){this._ignoredPaths.add(e+Bi)}this._userIgnored=undefined}));return this}close(){if(this.closed)return this._closePromise;this.closed=true;this.removeAllListeners();const e=[];this._closers.forEach((t=>t.forEach((t=>{const i=t();if(i instanceof Promise)e.push(i)}))));this._streams.forEach((e=>e.destroy()));this._userIgnored=undefined;this._readyCount=0;this._readyEmitted=false;this._watched.forEach((e=>e.dispose()));["closers","watched","streams","symlinkPaths","throttled"].forEach((e=>{this[`_${e}`].clear()}));this._closePromise=e.length?Promise.all(e).then((()=>undefined)):Promise.resolve();return this._closePromise}getWatched(){const e={};this._watched.forEach(((t,i)=>{const s=this.options.cwd?ri.relative(this.options.cwd,i):i;e[s||Di]=t.getChildren().sort()}));return e}emitWithAll(e,t){this.emit(...t);if(e!==Ai)this.emit(mi,...t)}async _emit(e,t,i,s,n){if(this.closed)return;const r=this.options;if(Hi)t=ri.normalize(t);if(r.cwd)t=ri.relative(r.cwd,t);const o=[e,t];if(n!==undefined)o.push(i,s,n);else if(s!==undefined)o.push(i,s);else if(i!==undefined)o.push(i);const l=r.awaitWriteFinish;let c;if(l&&(c=this._pendingWrites.get(t))){c.lastChange=new Date;return this}if(r.atomic){if(e===xi){this._pendingUnlinks.set(t,o);setTimeout((()=>{this._pendingUnlinks.forEach(((e,t)=>{this.emit(...e);this.emit(mi,...e);this._pendingUnlinks.delete(t)}))}),typeof r.atomic==="number"?r.atomic:100);return this}if(e===yi&&this._pendingUnlinks.has(t)){e=o[0]=Ei;this._pendingUnlinks.delete(t)}}if(l&&(e===yi||e===Ei)&&this._readyEmitted){const awfEmit=(t,i)=>{if(t){e=o[0]=Ai;o[1]=t;this.emitWithAll(e,o)}else if(i){if(o.length>2){o[2]=i}else{o.push(i)}this.emitWithAll(e,o)}};this._awaitWriteFinish(t,l.stabilityThreshold,e,awfEmit);return this}if(e===Ei){const e=!this._throttle(Ei,t,50);if(e)return this}if(r.alwaysStat&&i===undefined&&(e===yi||e===bi||e===Ei)){const e=r.cwd?ri.join(r.cwd,t):t;let i;try{i=await qi(e)}catch(e){}if(!i||this.closed)return;o.push(i)}this.emitWithAll(e,o);return this}_handleError(e){const t=e&&e.code;if(e&&t!=="ENOENT"&&t!=="ENOTDIR"&&(!this.options.ignorePermissionErrors||t!=="EPERM"&&t!=="EACCES")){this.emit(Ai,e)}return e||this.closed}_throttle(e,t,i){if(!this._throttled.has(e)){this._throttled.set(e,new Map)}const s=this._throttled.get(e);const n=s.get(t);if(n){n.count++;return false}let r;const clear=()=>{const e=s.get(t);const i=e?e.count:0;s.delete(t);clearTimeout(r);if(e)clearTimeout(e.timeoutObject);return i};r=setTimeout(clear,i);const o={timeoutObject:r,clear:clear,count:0};s.set(t,o);return o}_incrReadyCount(){return this._readyCount++}_awaitWriteFinish(e,t,i,s){let n;let r=e;if(this.options.cwd&&!ri.isAbsolute(e)){r=ri.join(this.options.cwd,e)}const o=new Date;const awaitWriteFinish=i=>{ni.stat(r,((r,o)=>{if(r||!this._pendingWrites.has(e)){if(r&&r.code!=="ENOENT")s(r);return}const l=Number(new Date);if(i&&o.size!==i.size){this._pendingWrites.get(e).lastChange=l}const c=this._pendingWrites.get(e);const u=l-c.lastChange;if(u>=t){this._pendingWrites.delete(e);s(undefined,o)}else{n=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval,o)}}))};if(!this._pendingWrites.has(e)){this._pendingWrites.set(e,{lastChange:o,cancelWait:()=>{this._pendingWrites.delete(e);clearTimeout(n);return i}});n=setTimeout(awaitWriteFinish,this.options.awaitWriteFinish.pollInterval)}}_getGlobIgnored(){return[...this._ignoredPaths.values()]}_isIgnored(e,t){if(this.options.atomic&&Pi.test(e))return true;if(!this._userIgnored){const{cwd:e}=this.options;const t=this.options.ignored;const i=t&&t.map(normalizeIgnored(e));const s=arrify(i).filter((e=>typeof e===Vi&&!ui(e))).map((e=>e+Bi));const n=this._getGlobIgnored().map(normalizeIgnored(e)).concat(i,s);this._userIgnored=li(n,undefined,Fi)}return this._userIgnored([e,t])}_isntIgnored(e,t){return!this._isIgnored(e,t)}_getWatchHelpers(e,t){const i=t||this.options.disableGlobbing||!ui(e)?e:ci(e);const s=this.options.followSymlinks;return new WatchHelper(e,i,s,this)}_getWatchedDir(e){if(!this._boundRemove)this._boundRemove=this._remove.bind(this);const t=ri.resolve(e);if(!this._watched.has(t))this._watched.set(t,new DirEntry(t,this._boundRemove));return this._watched.get(t)}_hasReadPermissions(e){if(this.options.ignorePermissionErrors)return true;const t=e&&Number.parseInt(e.mode,10);const i=t&511;const s=Number.parseInt(i.toString(8)[0],10);return Boolean(4&s)}_remove(e,t,i){const s=ri.join(e,t);const n=ri.resolve(s);i=i!=null?i:this._watched.has(s)||this._watched.has(n);if(!this._throttle("remove",s,100))return;if(!i&&!this.options.useFsEvents&&this._watched.size===1){this.add(e,t,true)}const r=this._getWatchedDir(s);const o=r.getChildren();o.forEach((e=>this._remove(s,e)));const l=this._getWatchedDir(e);const c=l.has(t);l.remove(t);if(this._symlinkPaths.has(n)){this._symlinkPaths.delete(n)}let u=s;if(this.options.cwd)u=ri.relative(this.options.cwd,s);if(this.options.awaitWriteFinish&&this._pendingWrites.has(u)){const e=this._pendingWrites.get(u).cancelWait();if(e===yi)return}this._watched.delete(s);this._watched.delete(n);const h=i?vi:xi;if(c&&!this._isIgnored(s))this._emit(h,s);if(!this.options.useFsEvents){this._closePath(s)}}_closePath(e){this._closeFile(e);const t=ri.dirname(e);this._getWatchedDir(t).remove(ri.basename(e))}_closeFile(e){const t=this._closers.get(e);if(!t)return;t.forEach((e=>e()));this._closers.delete(e)}_addPathCloser(e,t){if(!t)return;let i=this._closers.get(e);if(!i){i=[];this._closers.set(e,i)}i.push(t)}_readdirp(e,t){if(this.closed)return;const i={type:mi,alwaysStat:true,lstat:true,...t};let s=ai(e,i);this._streams.add(s);s.once(wi,(()=>{s=undefined}));s.once(Ii,(()=>{if(s){this._streams.delete(s);s=undefined}}));return s}}d.FSWatcher=FSWatcher;const watch=(e,t)=>{const i=new FSWatcher(t);i.add(e);return i};d.watch=watch;t.chokidar=d},194:(e,t,i)=>{
56
68
  /*
57
69
  @license
58
- Rollup.js v2.79.0
59
- Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
70
+ Rollup.js v3.23.0
71
+ Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975
60
72
 
61
73
  https://github.com/rollup/rollup
62
74
 
63
75
  Released under the MIT License.
64
- */const s=i(17);const n={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",p:"plugin",v:"version",w:"watch"};function mergeOptions(e,t={external:[],globals:undefined},i=s.defaultOnWarn){const r=getCommandOptions(t);const o=mergeInputOptions(e,r,i);const l=o.onwarn;if(r.output){Object.assign(r,r.output)}const c=s.ensureArray(e.output);if(c.length===0)c.push({});const u=c.map((e=>mergeOutputOptions(e,r,l)));s.warnUnknownOptions(r,Object.keys(o).concat(Object.keys(u[0]).filter((e=>e!=="sourcemapPathTransform")),Object.keys(n),"config","environment","plugin","silent","failAfterWarnings","stdin","waitForBundleInput","configPlugin"),"CLI flags",l,/^_$|output$|config/);o.output=u;return o}function getCommandOptions(e){const t=e.external&&typeof e.external==="string"?e.external.split(","):[];return{...e,external:t,globals:typeof e.globals==="string"?e.globals.split(",").reduce(((e,i)=>{const[s,n]=i.split(":");e[s]=n;if(!t.includes(s)){t.push(s)}return e}),Object.create(null)):undefined}}function mergeInputOptions(e,t,i){const getOption=i=>{var s;return(s=t[i])!==null&&s!==void 0?s:e[i]};const n={acorn:getOption("acorn"),acornInjectPlugins:e.acornInjectPlugins,cache:e.cache,context:getOption("context"),experimentalCacheExpiry:getOption("experimentalCacheExpiry"),external:getExternal(e,t),inlineDynamicImports:getOption("inlineDynamicImports"),input:getOption("input")||[],makeAbsoluteExternalsRelative:getOption("makeAbsoluteExternalsRelative"),manualChunks:getOption("manualChunks"),maxParallelFileOps:getOption("maxParallelFileOps"),maxParallelFileReads:getOption("maxParallelFileReads"),moduleContext:getOption("moduleContext"),onwarn:getOnWarn(e,i),perf:getOption("perf"),plugins:s.ensureArray(e.plugins),preserveEntrySignatures:getOption("preserveEntrySignatures"),preserveModules:getOption("preserveModules"),preserveSymlinks:getOption("preserveSymlinks"),shimMissingExports:getOption("shimMissingExports"),strictDeprecations:getOption("strictDeprecations"),treeshake:getObjectOption(e,t,"treeshake",s.objectifyOptionWithPresets(s.treeshakePresets,"treeshake","false, true, ")),watch:getWatch(e,t)};s.warnUnknownOptions(e,Object.keys(n),"input options",n.onwarn,/^output$/);return n}const getExternal=(e,t)=>{const i=e.external;return typeof i==="function"?(e,s,n)=>i(e,s,n)||t.external.includes(e):s.ensureArray(i).concat(t.external)};const getOnWarn=(e,t)=>e.onwarn?i=>e.onwarn(i,t):t;const getObjectOption=(e,t,i,n=s.objectifyOption)=>{const r=normalizeObjectOptionValue(t[i],n);const o=normalizeObjectOptionValue(e[i],n);if(r!==undefined){return r&&{...o,...r}}return o};const getWatch=(e,t)=>e.watch!==false&&getObjectOption(e,t,"watch");const isWatchEnabled=e=>{if(Array.isArray(e)){return e.reduce(((e,t)=>typeof t==="boolean"?t:e),false)}return e===true};const normalizeObjectOptionValue=(e,t)=>{if(!e){return e}if(Array.isArray(e)){return e.reduce(((e,i)=>i&&e&&{...e,...t(i)}),{})}return t(e)};function mergeOutputOptions(e,t,i){const getOption=i=>{var s;return(s=t[i])!==null&&s!==void 0?s:e[i]};const n={amd:getObjectOption(e,t,"amd"),assetFileNames:getOption("assetFileNames"),banner:getOption("banner"),chunkFileNames:getOption("chunkFileNames"),compact:getOption("compact"),dir:getOption("dir"),dynamicImportFunction:getOption("dynamicImportFunction"),entryFileNames:getOption("entryFileNames"),esModule:getOption("esModule"),exports:getOption("exports"),extend:getOption("extend"),externalLiveBindings:getOption("externalLiveBindings"),file:getOption("file"),footer:getOption("footer"),format:getOption("format"),freeze:getOption("freeze"),generatedCode:getObjectOption(e,t,"generatedCode",s.objectifyOptionWithPresets(s.generatedCodePresets,"output.generatedCode","")),globals:getOption("globals"),hoistTransitiveImports:getOption("hoistTransitiveImports"),indent:getOption("indent"),inlineDynamicImports:getOption("inlineDynamicImports"),interop:getOption("interop"),intro:getOption("intro"),manualChunks:getOption("manualChunks"),minifyInternalExports:getOption("minifyInternalExports"),name:getOption("name"),namespaceToStringTag:getOption("namespaceToStringTag"),noConflict:getOption("noConflict"),outro:getOption("outro"),paths:getOption("paths"),plugins:s.ensureArray(e.plugins),preferConst:getOption("preferConst"),preserveModules:getOption("preserveModules"),preserveModulesRoot:getOption("preserveModulesRoot"),sanitizeFileName:getOption("sanitizeFileName"),sourcemap:getOption("sourcemap"),sourcemapBaseUrl:getOption("sourcemapBaseUrl"),sourcemapExcludeSources:getOption("sourcemapExcludeSources"),sourcemapFile:getOption("sourcemapFile"),sourcemapPathTransform:getOption("sourcemapPathTransform"),strict:getOption("strict"),systemNullSetters:getOption("systemNullSetters"),validate:getOption("validate")};s.warnUnknownOptions(e,Object.keys(n),"output options",i);return n}t.commandAliases=n;t.isWatchEnabled=isWatchEnabled;t.mergeOptions=mergeOptions},17:(e,t,i)=>{"use strict";
76
+ */
77
+ const s=i(742);const n=i(224);const r=i(411);const o=i(17);const l=i(846);const c=i(5);const u=i(977);function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e){t[i]=e[i]}}t.default=e;return t}const h=_interopNamespaceDefault(n);var d="3.23.0";function ensureArray$1(e){if(Array.isArray(e)){return e.filter(Boolean)}if(e){return[e]}return[]}const p="troubleshooting/#avoiding-eval";const f="troubleshooting/#error-name-is-not-exported-by-module";const m="troubleshooting/#error-this-is-undefined";const g="troubleshooting/#warning-treating-module-as-external-dependency";const y="troubleshooting/#warning-sourcemap-is-likely-to-be-incorrect";const E="configuration-options/#maxparallelfileops";const x="configuration-options/#output-amd-id";const b="configuration-options/#output-amd-basepath";const v="configuration-options/#output-dir";const S="configuration-options/#output-dynamicimportfunction";const A="configuration-options/#output-exports";const w="configuration-options/#output-extend";const I="configuration-options/#output-format";const k="configuration-options/#output-generatedcode";const C="configuration-options/#output-experimentaldeepdynamicchunkoptimization";const _="configuration-options/#output-generatedcode-constbindings";const P="configuration-options/#output-generatedcode-symbols";const N="configuration-options/#output-globals";const R="configuration-options/#output-inlinedynamicimports";const $="configuration-options/#output-interop";const O="configuration-options/#output-manualchunks";const T="configuration-options/#output-name";const D="configuration-options/#output-preservemodules";const M="configuration-options/#output-sourcemapbaseurl";const L="configuration-options/#output-sourcemapfile";const B="configuration-options/#preserveentrysignatures";const F="configuration-options/#treeshake";const V="configuration-options/#treeshake-modulesideeffects";const z="configuration-options/#watch";const j="command-line-interface/#bundleconfigascjs";const U="command-line-interface/#configuration-files";const H="plugin-development/#renderdynamicimport";const G="plugin-development/#this-getmoduleids";const W="plugin-development/#this-getmoduleinfo";async function asyncFlatten(e){do{e=(await Promise.all(e)).flat(Infinity)}while(e.some((e=>e?.then)));return e}const q=Object.freeze(Object.create(null));const K=Object.freeze({});const Y=Object.freeze([]);const Q=Object.freeze(new class extends Set{add(){throw new Error("Cannot add to empty set")}});function getLocator$1(e,t){if(t===void 0){t={}}var i=t.offsetLine||0;var s=t.offsetColumn||0;var n=e.split("\n");var r=0;var o=n.map((function(e,t){var i=r+e.length+1;var s={start:r,end:i,line:t};r=i;return s}));var l=0;function rangeContains(e,t){return e.start<=t&&t<e.end}function getLocation(e,t){return{line:i+e.line,column:s+t-e.start,character:t}}function locate(t,i){if(typeof t==="string"){t=e.indexOf(t,i||0)}var s=o[l];var n=t>=s.end?1:-1;while(s){if(rangeContains(s,t))return getLocation(s,t);l+=n;s=o[l]}}return locate}function locate(e,t,i){if(typeof i==="number"){throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument")}return getLocator$1(e,i)(t,i&&i.startIndex)}function spaces(e){let t="";while(e--)t+=" ";return t}function tabsToSpaces(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}const X=120;const Z=10;const J="...";function getCodeFrame(e,t,i){let s=e.split("\n");if(t>s.length)return"";const n=Math.max(tabsToSpaces(s[t-1].slice(0,i)).length+Z+J.length,X);const r=Math.max(0,t-3);let o=Math.min(t+2,s.length);s=s.slice(r,o);while(!/\S/.test(s[s.length-1])){s.pop();o-=1}const l=String(o).length;return s.map(((e,s)=>{const o=r+s+1===t;let c=String(s+r+1);while(c.length<l)c=` ${c}`;let u=tabsToSpaces(e);if(u.length>n){u=`${u.slice(0,n-J.length)}${J}`}if(o){const t=spaces(l+2+tabsToSpaces(e.slice(0,i)).length)+"^";return`${c}: ${u}\n${t}`}return`${c}: ${u}`})).join("\n")}const ee=/^(?:\/|(?:[A-Za-z]:)?[/\\|])/;const te=/^\.?\.(\/|$)/;function isAbsolute(e){return ee.test(e)}function isRelative(e){return te.test(e)}const ie=/\\/g;function normalize(e){return e.replace(ie,"/")}function printQuotedStringList(e,t){const i=e.length<=1;const s=e.map((e=>`"${e}"`));let n=i?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;if(t){n+=` ${i?t[0]:t[1]}`}return n}const se=/[/\\]/;function relative(e,t){const i=e.split(se).filter(Boolean);const s=t.split(se).filter(Boolean);if(i[0]===".")i.shift();if(s[0]===".")s.shift();while(i[0]&&s[0]&&i[0]===s[0]){i.shift();s.shift()}while(s[0]===".."&&i.length>0){s.shift();i.pop()}while(i.pop()){s.unshift("..")}return s.join("/")}function getAliasName(e){const t=r.basename(e);return t.slice(0,Math.max(0,t.length-r.extname(e).length))}function relativeId(e){if(!isAbsolute(e))return e;return relative(r.resolve(),e)}function isPathFragment(e){return e[0]==="/"||e[0]==="."&&(e[1]==="/"||e[1]===".")||isAbsolute(e)}const ne=/^(\.\.\/)*\.\.$/;function getImportPath(e,t,i,s){let n=normalize(relative(r.dirname(e),t));if(i&&n.endsWith(".js")){n=n.slice(0,-3)}if(s){if(n==="")return"../"+r.basename(t);if(ne.test(n)){return[...n.split("/"),"..",r.basename(t)].join("/")}}return n?n.startsWith("..")?n:"./"+n:"."}function isValidUrl(e){try{new URL(e)}catch{return false}return true}function getRollupUrl(e){return`https://rollupjs.org/${e}`}function error(e){if(!(e instanceof Error)){e=Object.assign(new Error(e.message),e);Object.defineProperty(e,"name",{value:"RollupError"})}throw e}function augmentCodeLocation(e,t,i,s){if(typeof t==="object"){const{line:i,column:n}=t;e.loc={column:n,file:s,line:i}}else{e.pos=t;const{line:n,column:r}=locate(i,t,{offsetLine:1});e.loc={column:r,file:s,line:n}}if(e.frame===undefined){const{line:t,column:s}=e.loc;e.frame=getCodeFrame(i,t,s)}}const re="ADDON_ERROR",oe="ALREADY_CLOSED",ae="AMBIGUOUS_EXTERNAL_NAMESPACES",le="ANONYMOUS_PLUGIN_CACHE",ce="ASSET_NOT_FINALISED",ue="ASSET_NOT_FOUND",he="ASSET_SOURCE_ALREADY_SET",de="ASSET_SOURCE_MISSING",pe="BAD_LOADER",fe="CANNOT_CALL_NAMESPACE",me="CANNOT_EMIT_FROM_OPTIONS_HOOK",ge="CHUNK_NOT_GENERATED",ye="CHUNK_INVALID",Ee="CIRCULAR_DEPENDENCY",xe="CIRCULAR_REEXPORT",be="CYCLIC_CROSS_CHUNK_REEXPORT",ve="DEPRECATED_FEATURE",Se="DUPLICATE_IMPORT_OPTIONS",Ae="DUPLICATE_PLUGIN_NAME",we="EMPTY_BUNDLE",Ie="EVAL",ke="EXTERNAL_SYNTHETIC_EXPORTS",Ce="FAIL_AFTER_WARNINGS",_e="FILE_NAME_CONFLICT",Pe="FILE_NOT_FOUND",Ne="ILLEGAL_IDENTIFIER_AS_NAME",Re="ILLEGAL_REASSIGNMENT",$e="INCONSISTENT_IMPORT_ASSERTIONS",Oe="INPUT_HOOK_IN_OUTPUT_PLUGIN",Te="INVALID_CHUNK",De="INVALID_CONFIG_MODULE_FORMAT",Me="INVALID_EXPORT_OPTION",Le="INVALID_EXTERNAL_ID",Be="INVALID_OPTION",Fe="INVALID_PLUGIN_HOOK",Ve="INVALID_ROLLUP_PHASE",ze="INVALID_SETASSETSOURCE",je="INVALID_TLA_FORMAT",Ue="MISSING_CONFIG",He="MISSING_EXPORT",Ge="MISSING_EXTERNAL_CONFIG",We="MISSING_GLOBAL_NAME",qe="MISSING_IMPLICIT_DEPENDANT",Ke="MISSING_NAME_OPTION_FOR_IIFE_EXPORT",Ye="MISSING_NODE_BUILTINS",Qe="MISSING_OPTION",Xe="MIXED_EXPORTS",Ze="MODULE_LEVEL_DIRECTIVE",Je="NAMESPACE_CONFLICT",et="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE",tt="ONLY_INLINE_SOURCEMAPS",it="PARSE_ERROR",st="PLUGIN_ERROR",nt="SHIMMED_EXPORT",rt="SOURCEMAP_BROKEN",ot="SOURCEMAP_ERROR",lt="SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT",ct="THIS_IS_UNDEFINED",ut="UNEXPECTED_NAMED_IMPORT",ht="UNKNOWN_OPTION",dt="UNRESOLVED_ENTRY",pt="UNRESOLVED_IMPORT",ft="UNUSED_EXTERNAL_IMPORT",mt="VALIDATION_ERROR";function errorAddonNotGenerated(e,t,i){return{code:re,message:`Could not retrieve "${t}". Check configuration of plugin "${i}".\n\tError Message: ${e}`}}function errorAlreadyClosed(){return{code:oe,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function errorAmbiguousExternalNamespaces(e,t,i,s){return{binding:e,code:ae,ids:s,message:`Ambiguous external namespace resolution: "${relativeId(t)}" re-exports "${e}" from one of the external modules ${printQuotedStringList(s.map((e=>relativeId(e))))}, guessing "${relativeId(i)}".`,reexporter:t}}function errorAnonymousPluginCache(){return{code:le,message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."}}function errorAssetNotFinalisedForFileName(e){return{code:ce,message:`Plugin error - Unable to get file name for asset "${e}". 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.`}}function errorAssetReferenceIdNotFoundForSetSource(e){return{code:ue,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}function errorAssetSourceAlreadySet(e){return{code:he,message:`Unable to set the source for asset "${e}", source already set.`}}function errorNoAssetSourceSet(e){return{code:de,message:`Plugin error creating asset "${e}" - no asset source set.`}}function errorBadLoader(e){return{code:pe,message:`Error loading "${relativeId(e)}": plugin load hook should return a string, a { code, map } object, or nothing/null.`}}function errorCannotCallNamespace(e){return{code:fe,message:`Cannot call a namespace ("${e}").`}}function errorCannotEmitFromOptionsHook(){return{code:me,message:`Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.`}}function errorChunkNotGeneratedForFileName(e){return{code:ge,message:`Plugin error - Unable to get file name for emitted chunk "${e}". You can only get file names once chunks have been generated after the "renderStart" hook.`}}function errorChunkInvalid({fileName:e,code:t},i){const s={code:ye,message:`Chunk "${e}" is not valid JavaScript: ${i.message}.`};augmentCodeLocation(s,i.loc,t,e);return s}function errorCircularDependency(e){return{code:Ee,ids:e,message:`Circular dependency: ${e.map(relativeId).join(" -> ")}`}}function errorCircularReexport(e,t){return{code:xe,exporter:t,message:`"${e}" cannot be exported from "${relativeId(t)}" as it is a reexport that references itself.`}}function errorCyclicCrossChunkReexport(e,t,i,s,n){return{code:be,exporter:t,id:s,message:`Export "${e}" of module "${relativeId(t)}" was reexported through module "${relativeId(i)}" 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 "${relativeId(s)}" to point directly to the exporting module or ${n?'do not use "output.preserveModules"':'reconfigure "output.manualChunks"'} to ensure these modules end up in the same chunk.`,reexporter:i}}function errorDeprecation(e,t,i){return{code:ve,message:e,url:getRollupUrl(t),...i?{plugin:i}:{}}}function errorDuplicateImportOptions(){return{code:Se,message:"Either use --input, or pass input path as argument"}}function errorDuplicatePluginName(e){return{code:Ae,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).`}}function errorEmptyChunk(e){return{code:we,message:`Generated an empty chunk: "${e}".`,names:[e]}}function errorEval(e){return{code:Ie,id:e,message:`Use of eval in "${relativeId(e)}" is strongly discouraged as it poses security risks and may cause issues with minification.`,url:getRollupUrl(p)}}function errorExternalSyntheticExports(e,t){return{code:ke,exporter:e,message:`External "${e}" cannot have "syntheticNamedExports" enabled (imported by "${relativeId(t)}").`}}function errorFailAfterWarnings(){return{code:Ce,message:"Warnings occurred and --failAfterWarnings flag present."}}function errorFileNameConflict(e){return{code:_e,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}function errorFileReferenceIdNotFoundForFilename(e){return{code:Pe,message:`Plugin error - Unable to get file name for unknown file "${e}".`}}function errorIllegalIdentifierAsName(e){return{code:Ne,message:`Given name "${e}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`,url:getRollupUrl(w)}}function errorIllegalImportReassignment(e,t){return{code:Re,message:`Illegal reassignment of import "${e}" in "${relativeId(t)}".`}}function errorInconsistentImportAssertions(e,t,i,s){return{code:$e,message:`Module "${relativeId(s)}" tried to import "${relativeId(i)}" with ${formatAssertions$1(t)} assertions, but it was already imported elsewhere with ${formatAssertions$1(e)} assertions. Please ensure that import assertions for the same module are always consistent.`}}const formatAssertions$1=e=>{const t=Object.entries(e);if(t.length===0)return"no";return t.map((([e,t])=>`"${e}": "${t}"`)).join(", ")};function errorInputHookInOutputPlugin(e,t){return{code:Oe,message:`The "${t}" hook used by the output plugin ${e} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function errorCannotAssignModuleToChunk(e,t,i){return{code:Te,message:`Cannot assign "${relativeId(e)}" to the "${t}" chunk as it is already in the "${i}" chunk.`}}function errorCannotBundleConfigAsEsm(e){return{cause:e,code:De,message:`Rollup transpiled your configuration to an ES module even though it appears to contain CommonJS elements. To resolve this, you can pass the "--bundleConfigAsCjs" flag to Rollup or change your configuration to only contain valid ESM code.\n\nOriginal error: ${e.message}`,stack:e.stack,url:getRollupUrl(j)}}function errorCannotLoadConfigAsCjs(e){return{cause:e,code:De,message:`Node tried to load your configuration file as CommonJS even though it is likely an ES module. To resolve this, change the extension of your configuration to ".mjs", set "type": "module" in your package.json file or pass the "--bundleConfigAsCjs" flag.\n\nOriginal error: ${e.message}`,stack:e.stack,url:getRollupUrl(j)}}function errorCannotLoadConfigAsEsm(e){return{cause:e,code:De,message:`Node tried to load your configuration as an ES module even though it is likely CommonJS. To resolve this, change the extension of your configuration to ".cjs" or pass the "--bundleConfigAsCjs" flag.\n\nOriginal error: ${e.message}`,stack:e.stack,url:getRollupUrl(j)}}function errorInvalidExportOptionValue(e){return{code:Me,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${e}".`,url:getRollupUrl(A)}}function errorIncompatibleExportOptionValue(e,t,i){return{code:Me,message:`"${e}" was specified for "output.exports", but entry module "${relativeId(i)}" has the following exports: ${printQuotedStringList(t)}`,url:getRollupUrl(A)}}function errorInternalIdCannotBeExternal(e,t){return{code:Le,message:`"${e}" is imported as an external by "${relativeId(t)}", but is already an existing non-external module id.`}}function errorInvalidOption(e,t,i,s){return{code:Be,message:`Invalid value ${s===undefined?"":`${JSON.stringify(s)} `}for option "${e}" - ${i}.`,url:getRollupUrl(t)}}function errorInvalidAddonPluginHook(e,t){return{code:Fe,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}}function errorInvalidFunctionPluginHook(e,t){return{code:Fe,hook:e,message:`Error running plugin hook "${e}" for plugin "${t}", expected a function hook or an object with a "handler" function.`,plugin:t}}function errorInvalidRollupPhaseForAddWatchFile(){return{code:Ve,message:`Cannot call "addWatchFile" after the build has finished.`}}function errorInvalidRollupPhaseForChunkEmission(){return{code:Ve,message:`Cannot emit chunks after module loading has finished.`}}function errorInvalidSetAssetSourceCall(){return{code:ze,message:`setAssetSource cannot be called in transform for caching reasons. Use emitFile with a source, or call setAssetSource in another hook.`}}function errorInvalidFormatForTopLevelAwait(e,t){return{code:je,id:e,message:`Module format "${t}" does not support top-level await. Use the "es" or "system" output formats rather.`}}function errorMissingConfig(){return{code:Ue,message:"Config file must export an options object, or an array of options objects",url:getRollupUrl(U)}}function errorMissingExport(e,t,i){const s=r.extname(i)===".json";return{binding:e,code:He,exporter:i,id:t,message:`"${e}" is not exported by "${relativeId(i)}", imported by "${relativeId(t)}".${s?" (Note that you need @rollup/plugin-json to import JSON files)":""}`,url:getRollupUrl(f)}}function errorMissingExternalConfig(e){return{code:Ge,message:`Could not resolve config file "${e}"`}}function errorMissingGlobalName(e,t){return{code:We,id:e,message:`No name was provided for external module "${e}" in "output.globals" – guessing "${t}".`,names:[t],url:getRollupUrl(N)}}function errorImplicitDependantCannotBeExternal(e,t){return{code:qe,message:`Module "${relativeId(e)}" that should be implicitly loaded before "${relativeId(t)}" cannot be external.`}}function errorUnresolvedImplicitDependant(e,t){return{code:qe,message:`Module "${relativeId(e)}" that should be implicitly loaded before "${relativeId(t)}" could not be resolved.`}}function errorImplicitDependantIsNotIncluded(e){const t=[...e.implicitlyLoadedBefore].map((e=>relativeId(e.id))).sort();return{code:qe,message:`Module "${relativeId(e.id)}" that should be implicitly loaded before ${printQuotedStringList(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 errorMissingNameOptionForIifeExport(){return{code:Ke,message:`If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.`,url:getRollupUrl(T)}}function errorMissingNameOptionForUmdExport(){return{code:Ke,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:getRollupUrl(T)}}function errorMissingNodeBuiltins(e){return{code:Ye,ids:e,message:`Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(e)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`}}function errorMissingFileOrDirOption(){return{code:Qe,message:'You must specify "output.file" or "output.dir" for the build.',url:getRollupUrl(v)}}function errorMixedExport(e,t){return{code:Xe,id:e,message:`Entry module "${relativeId(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:getRollupUrl(A)}}function errorModuleLevelDirective(e,t){return{code:Ze,id:t,message:`Module level directives cause errors when bundled, "${e}" in "${relativeId(t)}" was ignored.`}}function errorNamespaceConflict(e,t,i){return{binding:e,code:Je,ids:i,message:`Conflicting namespaces: "${relativeId(t)}" re-exports "${e}" from one of the modules ${printQuotedStringList(i.map((e=>relativeId(e))))} (will be ignored).`,reexporter:t}}function errorNoTransformMapOrAstWithoutCode(e){return{code:et,message:`The plugin "${e}" returned a "map" or "ast" without returning `+'a "code". This will be ignored.'}}function errorOnlyInlineSourcemapsForStdout(){return{code:tt,message:"Only inline sourcemaps are supported when bundling to stdout."}}function errorParseError(e,t){let i=e.message.replace(/ \(\d+:\d+\)$/,"");if(t.endsWith(".json")){i+=" (Note that you need @rollup/plugin-json to import JSON files)"}else if(!t.endsWith(".js")){i+=" (Note that you need plugins to import files that are not JavaScript)"}return{cause:e,code:it,id:t,message:i}}function errorPluginError(e,t,{hook:i,id:s}={}){if(typeof e==="string")e={message:e};if(e.code&&e.code!==st){e.pluginCode=e.code}e.code=st;e.plugin=t;if(i){e.hook=i}if(s){e.id=s}return e}function errorShimmedExport(e,t){return{binding:t,code:nt,exporter:e,message:`Missing export "${t}" has been shimmed in module "${relativeId(e)}".`}}function errorSourcemapBroken(e){return{code:rt,message:`Sourcemap is likely to be incorrect: a plugin (${e}) was used to transform files, but didn't generate a sourcemap for the transformation. Consult the plugin documentation for help`,plugin:e,url:getRollupUrl(y)}}function errorConflictingSourcemapSources(e){return{code:rt,message:`Multiple conflicting contents for sourcemap source ${e}`}}function errorInvalidSourcemapForError(e,t,i,s,n){return{cause:e,code:ot,id:t,loc:{column:i,file:t,line:s},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:n}}function errorSyntheticNamedExportsNeedNamespaceExport(e,t){return{code:lt,exporter:e,message:`Module "${relativeId(e)}" that is marked with \`syntheticNamedExports: ${JSON.stringify(t)}\` needs ${typeof t==="string"&&t!=="default"?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}}function errorThisIsUndefined(){return{code:ct,message:`The 'this' keyword is equivalent to 'undefined' at the top level of an ES module, and has been rewritten`,url:getRollupUrl(m)}}function errorUnexpectedNamedImport(e,t,i){const s=i?"reexport":"import";return{code:ut,exporter:e,message:`The named export "${t}" was ${s}ed from the external module "${relativeId(e)}" even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:getRollupUrl($)}}function errorUnexpectedNamespaceReexport(e){return{code:ut,exporter:e,message:`There was a namespace "*" reexport from the external module "${relativeId(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:getRollupUrl($)}}function errorUnknownOption(e,t,i){return{code:ht,message:`Unknown ${e}: ${t.join(", ")}. Allowed options: ${i.join(", ")}`}}function errorEntryCannotBeExternal(e){return{code:dt,message:`Entry module "${relativeId(e)}" cannot be external.`}}function errorUnresolvedEntry(e){return{code:dt,message:`Could not resolve entry module "${relativeId(e)}".`}}function errorUnresolvedImport(e,t){return{code:pt,exporter:e,id:t,message:`Could not resolve "${e}" from "${relativeId(t)}"`}}function errorUnresolvedImportTreatedAsExternal(e,t){return{code:pt,exporter:e,id:t,message:`"${e}" is imported by "${relativeId(t)}", but could not be resolved – treating it as an external dependency.`,url:getRollupUrl(g)}}function errorUnusedExternalImports(e,t,i){return{code:ft,exporter:e,ids:i,message:`${printQuotedStringList(t,["is","are"])} imported from external module "${e}" but never used in ${printQuotedStringList(i.map((e=>relativeId(e))))}.`,names:t}}function errorFailedValidation(e){return{code:mt,message:e}}function warnDeprecation(e,t,i,s,n){warnDeprecationWithOptions(e,t,i,s.onwarn,s.strictDeprecations,n)}function warnDeprecationWithOptions(e,t,i,s,n,r){if(i||n){const i=errorDeprecation(e,t,r);if(n){return error(i)}s(i)}}const defaultOnWarn=e=>console.warn(e.message||e);function warnUnknownOptions(e,t,i,s,n=/$./){const r=new Set(t);const o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));if(o.length>0){s(errorUnknownOption(i,o,[...r].sort()))}}const gt={recommended:{annotations:true,correctVarValueBeforeDeclaration:false,manualPureFunctions:Y,moduleSideEffects:()=>true,propertyReadSideEffects:true,tryCatchDeoptimization:true,unknownGlobalSideEffects:false},safest:{annotations:true,correctVarValueBeforeDeclaration:true,manualPureFunctions:Y,moduleSideEffects:()=>true,propertyReadSideEffects:true,tryCatchDeoptimization:true,unknownGlobalSideEffects:true},smallest:{annotations:true,correctVarValueBeforeDeclaration:false,manualPureFunctions:Y,moduleSideEffects:()=>false,propertyReadSideEffects:false,tryCatchDeoptimization:false,unknownGlobalSideEffects:false}};const yt={es2015:{arrowFunctions:true,constBindings:true,objectShorthand:true,reservedNamesAsProps:true,symbols:true},es5:{arrowFunctions:false,constBindings:false,objectShorthand:false,reservedNamesAsProps:true,symbols:false}};const objectifyOption=e=>e&&typeof e==="object"?e:{};const objectifyOptionWithPresets=(e,t,i,s)=>n=>{if(typeof n==="string"){const r=e[n];if(r){return r}error(errorInvalidOption(t,i,`valid values are ${s}${printQuotedStringList(Object.keys(e))}. You can also supply an object for more fine-grained control`,n))}return objectifyOption(n)};const getOptionWithPreset=(e,t,i,s,n)=>{const r=e?.preset;if(r){const n=t[r];if(n){return{...n,...e}}else{error(errorInvalidOption(`${i}.preset`,s,`valid values are ${printQuotedStringList(Object.keys(t))}`,r))}}return objectifyOptionWithPresets(t,i,s,n)(e)};const normalizePluginOption=async e=>(await asyncFlatten([e])).filter(Boolean);const Et={c:"config",d:"dir",e:"external",f:"format",g:"globals",h:"help",i:"input",m:"sourcemap",n:"name",o:"file",p:"plugin",v:"version",w:"watch"};const xt={external:[],globals:undefined};async function mergeOptions(e,t=xt,i=defaultOnWarn){const s=getCommandOptions(t);const n=await mergeInputOptions(e,s,i);const r=n.onwarn;if(s.output){Object.assign(s,s.output)}const o=ensureArray$1(e.output);if(o.length===0)o.push({});const l=await Promise.all(o.map((e=>mergeOutputOptions(e,s,r))));warnUnknownOptions(s,[...Object.keys(n),...Object.keys(l[0]).filter((e=>e!=="sourcemapIgnoreList"&&e!=="sourcemapPathTransform")),...Object.keys(Et),"bundleConfigAsCjs","config","environment","plugin","silent","failAfterWarnings","stdin","waitForBundleInput","configPlugin"],"CLI flags",r,/^_$|output$|config/);n.output=l;return n}function getCommandOptions(e){const t=e.external&&typeof e.external==="string"?e.external.split(","):[];return{...e,external:t,globals:typeof e.globals==="string"?e.globals.split(",").reduce(((e,i)=>{const[s,n]=i.split(":");e[s]=n;if(!t.includes(s)){t.push(s)}return e}),Object.create(null)):undefined}}async function mergeInputOptions(e,t,i){const getOption=i=>t[i]??e[i];const s={acorn:getOption("acorn"),acornInjectPlugins:e.acornInjectPlugins,cache:e.cache,context:getOption("context"),experimentalCacheExpiry:getOption("experimentalCacheExpiry"),experimentalLogSideEffects:getOption("experimentalLogSideEffects"),external:getExternal(e,t),inlineDynamicImports:getOption("inlineDynamicImports"),input:getOption("input")||[],makeAbsoluteExternalsRelative:getOption("makeAbsoluteExternalsRelative"),manualChunks:getOption("manualChunks"),maxParallelFileOps:getOption("maxParallelFileOps"),maxParallelFileReads:getOption("maxParallelFileReads"),moduleContext:getOption("moduleContext"),onwarn:getOnWarn(e,i),perf:getOption("perf"),plugins:await normalizePluginOption(e.plugins),preserveEntrySignatures:getOption("preserveEntrySignatures"),preserveModules:getOption("preserveModules"),preserveSymlinks:getOption("preserveSymlinks"),shimMissingExports:getOption("shimMissingExports"),strictDeprecations:getOption("strictDeprecations"),treeshake:getObjectOption(e,t,"treeshake",objectifyOptionWithPresets(gt,"treeshake",F,"false, true, ")),watch:getWatch(e,t)};warnUnknownOptions(e,Object.keys(s),"input options",s.onwarn,/^output$/);return s}const getExternal=(e,t)=>{const i=e.external;return typeof i==="function"?(e,s,n)=>i(e,s,n)||t.external.includes(e):[...ensureArray$1(i),...t.external]};const getOnWarn=(e,t)=>e.onwarn?i=>e.onwarn(i,t):t;const getObjectOption=(e,t,i,s=objectifyOption)=>{const n=normalizeObjectOptionValue(t[i],s);const r=normalizeObjectOptionValue(e[i],s);if(n!==undefined){return n&&{...r,...n}}return r};const getWatch=(e,t)=>e.watch!==false&&getObjectOption(e,t,"watch");const isWatchEnabled=e=>{if(Array.isArray(e)){return e.reduce(((e,t)=>typeof t==="boolean"?t:e),false)}return e===true};const normalizeObjectOptionValue=(e,t)=>{if(!e){return e}if(Array.isArray(e)){return e.reduce(((e,i)=>i&&e&&{...e,...t(i)}),{})}return t(e)};async function mergeOutputOptions(e,t,i){const getOption=i=>t[i]??e[i];const s={amd:getObjectOption(e,t,"amd"),assetFileNames:getOption("assetFileNames"),banner:getOption("banner"),chunkFileNames:getOption("chunkFileNames"),compact:getOption("compact"),dir:getOption("dir"),dynamicImportFunction:getOption("dynamicImportFunction"),dynamicImportInCjs:getOption("dynamicImportInCjs"),entryFileNames:getOption("entryFileNames"),esModule:getOption("esModule"),experimentalDeepDynamicChunkOptimization:getOption("experimentalDeepDynamicChunkOptimization"),experimentalMinChunkSize:getOption("experimentalMinChunkSize"),exports:getOption("exports"),extend:getOption("extend"),externalImportAssertions:getOption("externalImportAssertions"),externalLiveBindings:getOption("externalLiveBindings"),file:getOption("file"),footer:getOption("footer"),format:getOption("format"),freeze:getOption("freeze"),generatedCode:getObjectOption(e,t,"generatedCode",objectifyOptionWithPresets(yt,"output.generatedCode",k,"")),globals:getOption("globals"),hoistTransitiveImports:getOption("hoistTransitiveImports"),indent:getOption("indent"),inlineDynamicImports:getOption("inlineDynamicImports"),interop:getOption("interop"),intro:getOption("intro"),manualChunks:getOption("manualChunks"),minifyInternalExports:getOption("minifyInternalExports"),name:getOption("name"),namespaceToStringTag:getOption("namespaceToStringTag"),noConflict:getOption("noConflict"),outro:getOption("outro"),paths:getOption("paths"),plugins:await normalizePluginOption(e.plugins),preferConst:getOption("preferConst"),preserveModules:getOption("preserveModules"),preserveModulesRoot:getOption("preserveModulesRoot"),sanitizeFileName:getOption("sanitizeFileName"),sourcemap:getOption("sourcemap"),sourcemapBaseUrl:getOption("sourcemapBaseUrl"),sourcemapExcludeSources:getOption("sourcemapExcludeSources"),sourcemapFile:getOption("sourcemapFile"),sourcemapIgnoreList:getOption("sourcemapIgnoreList"),sourcemapPathTransform:getOption("sourcemapPathTransform"),strict:getOption("strict"),systemNullSetters:getOption("systemNullSetters"),validate:getOption("validate")};warnUnknownOptions(e,Object.keys(s),"output options",i);return s}const{env:bt={},argv:vt=[],platform:St=""}=typeof process==="undefined"?{}:process;const At="NO_COLOR"in bt||vt.includes("--no-color");const wt="FORCE_COLOR"in bt||vt.includes("--color");const It=St==="win32";const kt=bt.TERM==="dumb";const Ct=h&&h.isatty&&h.isatty(1)&&bt.TERM&&!kt;const _t="CI"in bt&&("GITHUB_ACTIONS"in bt||"GITLAB_CI"in bt||"CIRCLECI"in bt);const Pt=!At&&(wt||It&&!kt||Ct||_t);const replaceClose=(e,t,i,s,n=t.substring(0,e)+s,r=t.substring(e+i.length),o=r.indexOf(i))=>n+(o<0?r:replaceClose(o,r,i,s));const clearBleed=(e,t,i,s,n)=>e<0?i+t+s:i+replaceClose(e,t,s,n)+s;const filterEmpty=(e,t,i=e,s=e.length+1)=>n=>n||!(n===""||n===undefined)?clearBleed((""+n).indexOf(t,s),n,e,t,i):"";const init=(e,t,i)=>filterEmpty(`[${e}m`,`[${t}m`,i);const Nt={reset:init(0,0),bold:init(1,22,""),dim:init(2,22,""),italic:init(3,23),underline:init(4,24),inverse:init(7,27),hidden:init(8,28),strikethrough:init(9,29),black:init(30,39),red:init(31,39),green:init(32,39),yellow:init(33,39),blue:init(34,39),magenta:init(35,39),cyan:init(36,39),white:init(37,39),gray:init(90,39),bgBlack:init(40,49),bgRed:init(41,49),bgGreen:init(42,49),bgYellow:init(43,49),bgBlue:init(44,49),bgMagenta:init(45,49),bgCyan:init(46,49),bgWhite:init(47,49),blackBright:init(90,39),redBright:init(91,39),greenBright:init(92,39),yellowBright:init(93,39),blueBright:init(94,39),magentaBright:init(95,39),cyanBright:init(96,39),whiteBright:init(97,39),bgBlackBright:init(100,49),bgRedBright:init(101,49),bgGreenBright:init(102,49),bgYellowBright:init(103,49),bgBlueBright:init(104,49),bgMagentaBright:init(105,49),bgCyanBright:init(106,49),bgWhiteBright:init(107,49)};const createColors=({useColor:e=Pt}={})=>e?Nt:Object.keys(Nt).reduce(((e,t)=>({...e,[t]:String})),{});createColors();const{bold:Rt,cyan:$t,dim:Ot,gray:Tt,green:Dt,red:Mt,underline:Lt,yellow:Bt}=createColors({useColor:s.env.FORCE_COLOR!=="0"&&!s.env.NO_COLOR});const stderr=(...e)=>s.stderr.write(`${e.join("")}\n`);function handleError(e,t=false){const i=e.name||e.cause?.name;const n=i?`${i}: `:"";const r=e.plugin?`(plugin ${e.plugin}) `:"";const o=`${r}${n}${e.message}`;const l=[Rt(Mt(`[!] ${Rt(o.toString())}`))];if(e.url){l.push($t(e.url))}if(e.loc){l.push(`${relativeId(e.loc.file||e.id)} (${e.loc.line}:${e.loc.column})`)}else if(e.id){l.push(relativeId(e.id))}if(e.frame){l.push(Ot(e.frame))}if(e.stack){l.push(Ot(e.stack?.replace(`${n}${e.message}\n`,"")))}l.push("","");stderr(l.join("\n"));if(!t)s.exit(1)}const Ft=",".charCodeAt(0);const Vt=";".charCodeAt(0);const zt="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";const jt=new Uint8Array(64);const Ut=new Uint8Array(128);for(let e=0;e<zt.length;e++){const t=zt.charCodeAt(e);jt[e]=t;Ut[t]=e}const Ht=typeof TextDecoder!=="undefined"?new TextDecoder:typeof Buffer!=="undefined"?{decode(e){const t=Buffer.from(e.buffer,e.byteOffset,e.byteLength);return t.toString()}}:{decode(e){let t="";for(let i=0;i<e.length;i++){t+=String.fromCharCode(e[i])}return t}};function decode(e){const t=new Int32Array(5);const i=[];let s=0;do{const n=indexOf(e,s);const r=[];let o=true;let l=0;t[0]=0;for(let i=s;i<n;i++){let s;i=decodeInteger(e,i,t,0);const c=t[0];if(c<l)o=false;l=c;if(hasMoreVlq(e,i,n)){i=decodeInteger(e,i,t,1);i=decodeInteger(e,i,t,2);i=decodeInteger(e,i,t,3);if(hasMoreVlq(e,i,n)){i=decodeInteger(e,i,t,4);s=[c,t[1],t[2],t[3],t[4]]}else{s=[c,t[1],t[2],t[3]]}}else{s=[c]}r.push(s)}if(!o)sort(r);i.push(r);s=n+1}while(s<=e.length);return i}function indexOf(e,t){const i=e.indexOf(";",t);return i===-1?e.length:i}function decodeInteger(e,t,i,s){let n=0;let r=0;let o=0;do{const i=e.charCodeAt(t++);o=Ut[i];n|=(o&31)<<r;r+=5}while(o&32);const l=n&1;n>>>=1;if(l){n=-2147483648|-n}i[s]+=n;return t}function hasMoreVlq(e,t,i){if(t>=i)return false;return e.charCodeAt(t)!==Ft}function sort(e){e.sort(sortComparator)}function sortComparator(e,t){return e[0]-t[0]}function encode(e){const t=new Int32Array(5);const i=1024*16;const s=i-36;const n=new Uint8Array(i);const r=n.subarray(0,s);let o=0;let l="";for(let c=0;c<e.length;c++){const u=e[c];if(c>0){if(o===i){l+=Ht.decode(n);o=0}n[o++]=Vt}if(u.length===0)continue;t[0]=0;for(let e=0;e<u.length;e++){const i=u[e];if(o>s){l+=Ht.decode(r);n.copyWithin(0,s,o);o-=s}if(e>0)n[o++]=Ft;o=encodeInteger(n,o,t,i,0);if(i.length===1)continue;o=encodeInteger(n,o,t,i,1);o=encodeInteger(n,o,t,i,2);o=encodeInteger(n,o,t,i,3);if(i.length===4)continue;o=encodeInteger(n,o,t,i,4)}}return l+Ht.decode(n.subarray(0,o))}function encodeInteger(e,t,i,s,n){const r=s[n];let o=r-i[n];i[n]=r;o=o<0?-o<<1|1:o<<1;do{let i=o&31;o>>>=5;if(o>0)i|=32;e[t++]=jt[i]}while(o>0);return t}class BitSet{constructor(e){this.bits=e instanceof BitSet?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}let Gt=class Chunk{constructor(e,t,i){this.start=e;this.end=t;this.original=i;this.intro="";this.outro="";this.content=i;this.storeName=false;this.edited=false;{this.previous=null;this.next=null}}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new Chunk(this.start,this.end,this.original);e.intro=this.intro;e.outro=this.outro;e.content=this.content;e.storeName=this.storeName;e.edited=this.edited;return e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;while(t){e(t);t=t.next}}eachPrevious(e){let t=this;while(t){e(t);t=t.previous}}edit(e,t,i){this.content=e;if(!i){this.intro="";this.outro=""}this.storeName=t;this.edited=true;return this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}split(e){const t=e-this.start;const i=this.original.slice(0,t);const s=this.original.slice(t);this.original=i;const n=new Chunk(e,this.end,s);n.outro=this.outro;this.outro="";this.end=e;if(this.edited){n.edit("",false);this.content=""}else{this.content=i}n.next=this.next;if(n.next)n.next.previous=n;n.previous=this;this.next=n;return n}toString(){return this.intro+this.content+this.outro}trimEnd(e){this.outro=this.outro.replace(e,"");if(this.outro.length)return true;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){this.split(this.start+t.length).edit("",undefined,true)}return true}else{this.edit("",undefined,true);this.intro=this.intro.replace(e,"");if(this.intro.length)return true}}trimStart(e){this.intro=this.intro.replace(e,"");if(this.intro.length)return true;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){this.split(this.end-t.length);this.edit("",undefined,true)}return true}else{this.edit("",undefined,true);this.outro=this.outro.replace(e,"");if(this.outro.length)return true}}};function getBtoa(){if(typeof window!=="undefined"&&typeof window.btoa==="function"){return e=>window.btoa(unescape(encodeURIComponent(e)))}else if(typeof Buffer==="function"){return e=>Buffer.from(e,"utf-8").toString("base64")}else{return()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")}}}const Wt=getBtoa();class SourceMap{constructor(e){this.version=3;this.file=e.file;this.sources=e.sources;this.sourcesContent=e.sourcesContent;this.names=e.names;this.mappings=encode(e.mappings);if(typeof e.x_google_ignoreList!=="undefined"){this.x_google_ignoreList=e.x_google_ignoreList}}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+Wt(this.toString())}}function guessIndent(e){const t=e.split("\n");const i=t.filter((e=>/^\t+/.test(e)));const s=t.filter((e=>/^ {2,}/.test(e)));if(i.length===0&&s.length===0){return null}if(i.length>=s.length){return"\t"}const n=s.reduce(((e,t)=>{const i=/^ +/.exec(t)[0].length;return Math.min(i,e)}),Infinity);return new Array(n+1).join(" ")}function getRelativePath(e,t){const i=e.split(/[/\\]/);const s=t.split(/[/\\]/);i.pop();while(i[0]===s[0]){i.shift();s.shift()}if(i.length){let e=i.length;while(e--)i[e]=".."}return i.concat(s).join("/")}const qt=Object.prototype.toString;function isObject$1(e){return qt.call(e)==="[object Object]"}function getLocator(e){const t=e.split("\n");const i=[];for(let e=0,s=0;e<t.length;e++){i.push(s);s+=t[e].length+1}return function locate(e){let t=0;let s=i.length;while(t<s){const n=t+s>>1;if(e<i[n]){s=n}else{t=n+1}}const n=t-1;const r=e-i[n];return{line:n,column:r}}}class Mappings{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,i,s){if(t.length){const t=[this.generatedCodeColumn,e,i.line,i.column];if(s>=0){t.push(s)}this.rawSegments.push(t)}else if(this.pending){this.rawSegments.push(this.pending)}this.advance(t);this.pending=null}addUneditedChunk(e,t,i,s,n){let r=t.start;let o=true;while(r<t.end){if(this.hires||o||n.has(r)){this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column])}if(i[r]==="\n"){s.line+=1;s.column=0;this.generatedCodeLine+=1;this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;o=true}else{s.column+=1;this.generatedCodeColumn+=1;o=false}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 Kt="\n";const Yt={insertLeft:false,insertRight:false,storeName:false};class MagicString{constructor(e,t={}){const i=new Gt(0,e.length,e);Object.defineProperties(this,{original:{writable:true,value:e},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:i},lastChunk:{writable:true,value:i},lastSearchedChunk:{writable:true,value:i},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:t.filename},indentExclusionRanges:{writable:true,value:t.indentExclusionRanges},sourcemapLocations:{writable:true,value:new BitSet},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:undefined},ignoreList:{writable:true,value:t.ignoreList}});this.byStart[0]=i;this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!=="string")throw new TypeError("outro content must be a string");this.outro+=e;return this}appendLeft(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];if(i){i.appendLeft(t)}else{this.intro+=t}return this}appendRight(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];if(i){i.appendRight(t)}else{this.outro+=t}return this}clone(){const e=new MagicString(this.original,{filename:this.filename});let t=this.firstChunk;let i=e.firstChunk=e.lastSearchedChunk=t.clone();while(t){e.byStart[i.start]=i;e.byEnd[i.end]=i;const s=t.next;const n=s&&s.clone();if(n){i.next=n;n.previous=i;i=n}t=s}e.lastChunk=i;if(this.indentExclusionRanges){e.indentExclusionRanges=this.indentExclusionRanges.slice()}e.sourcemapLocations=new BitSet(this.sourcemapLocations);e.intro=this.intro;e.outro=this.outro;return e}generateDecodedMap(e){e=e||{};const t=0;const i=Object.keys(this.storedNames);const s=new Mappings(e.hires);const n=getLocator(this.original);if(this.intro){s.advance(this.intro)}this.firstChunk.eachNext((e=>{const r=n(e.start);if(e.intro.length)s.advance(e.intro);if(e.edited){s.addEdit(t,e.content,r,e.storeName?i.indexOf(e.original):-1)}else{s.addUneditedChunk(t,e,this.original,r,this.sourcemapLocations)}if(e.outro.length)s.advance(e.outro)}));return{file:e.file?e.file.split(/[/\\]/).pop():undefined,sources:[e.source?getRelativePath(e.file||"",e.source):e.file||""],sourcesContent:e.includeContent?[this.original]:undefined,names:i,mappings:s.raw,x_google_ignoreList:this.ignoreList?[t]:undefined}}generateMap(e){return new SourceMap(this.generateDecodedMap(e))}_ensureindentStr(){if(this.indentStr===undefined){this.indentStr=guessIndent(this.original)}}_getRawIndentString(){this._ensureindentStr();return this.indentStr}getIndentString(){this._ensureindentStr();return this.indentStr===null?"\t":this.indentStr}indent(e,t){const i=/^[^\r\n]/gm;if(isObject$1(e)){t=e;e=undefined}if(e===undefined){this._ensureindentStr();e=this.indentStr||"\t"}if(e==="")return this;t=t||{};const s={};if(t.exclude){const e=typeof t.exclude[0]==="number"?[t.exclude]:t.exclude;e.forEach((e=>{for(let t=e[0];t<e[1];t+=1){s[t]=true}}))}let n=t.indentStart!==false;const replacer=t=>{if(n)return`${e}${t}`;n=true;return t};this.intro=this.intro.replace(i,replacer);let r=0;let o=this.firstChunk;while(o){const t=o.end;if(o.edited){if(!s[r]){o.content=o.content.replace(i,replacer);if(o.content.length){n=o.content[o.content.length-1]==="\n"}}}else{r=o.start;while(r<t){if(!s[r]){const t=this.original[r];if(t==="\n"){n=true}else if(t!=="\r"&&n){n=false;if(r===o.start){o.prependRight(e)}else{this._splitChunk(o,r);o=o.next;o.prependRight(e)}}}r+=1}}r=o.end;o=o.next}this.outro=this.outro.replace(i,replacer);return this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){if(!Yt.insertLeft){console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead");Yt.insertLeft=true}return this.appendLeft(e,t)}insertRight(e,t){if(!Yt.insertRight){console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead");Yt.insertRight=true}return this.prependRight(e,t)}move(e,t,i){if(i>=e&&i<=t)throw new Error("Cannot move a selection inside itself");this._split(e);this._split(t);this._split(i);const s=this.byStart[e];const n=this.byEnd[t];const r=s.previous;const o=n.next;const l=this.byStart[i];if(!l&&n===this.lastChunk)return this;const c=l?l.previous:this.lastChunk;if(r)r.next=o;if(o)o.previous=r;if(c)c.next=s;if(l)l.previous=n;if(!s.previous)this.firstChunk=n.next;if(!n.next){this.lastChunk=s.previous;this.lastChunk.next=null}s.previous=c;n.next=l||null;if(!c)this.firstChunk=s;if(!l)this.lastChunk=n;return this}overwrite(e,t,i,s){s=s||{};return this.update(e,t,i,{...s,overwrite:!s.contentOnly})}update(e,t,i,s){if(typeof i!=="string")throw new TypeError("replacement content must be a string");while(e<0)e+=this.original.length;while(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);if(s===true){if(!Yt.storeName){console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string");Yt.storeName=true}s={storeName:true}}const n=s!==undefined?s.storeName:false;const r=s!==undefined?s.overwrite:false;if(n){const i=this.original.slice(e,t);Object.defineProperty(this.storedNames,i,{writable:true,value:true,enumerable:true})}const o=this.byStart[e];const l=this.byEnd[t];if(o){let e=o;while(e!==l){if(e.next!==this.byStart[e.end]){throw new Error("Cannot overwrite across a split point")}e=e.next;e.edit("",false)}o.edit(i,n,!r)}else{const s=new Gt(e,t,"").edit(i,n);l.next=s;s.previous=l}return this}prepend(e){if(typeof e!=="string")throw new TypeError("outro content must be a string");this.intro=e+this.intro;return this}prependLeft(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];if(i){i.prependLeft(t)}else{this.intro=t+this.intro}return this}prependRight(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];if(i){i.prependRight(t)}else{this.outro=t+this.outro}return this}remove(e,t){while(e<0)e+=this.original.length;while(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 i=this.byStart[e];while(i){i.intro="";i.outro="";i.edit("");i=t>i.end?this.byStart[i.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);if(this.intro.length)return this.intro[this.intro.length-1];return""}lastLine(){let e=this.outro.lastIndexOf(Kt);if(e!==-1)return this.outro.substr(e+1);let t=this.outro;let i=this.lastChunk;do{if(i.outro.length>0){e=i.outro.lastIndexOf(Kt);if(e!==-1)return i.outro.substr(e+1)+t;t=i.outro+t}if(i.content.length>0){e=i.content.lastIndexOf(Kt);if(e!==-1)return i.content.substr(e+1)+t;t=i.content+t}if(i.intro.length>0){e=i.intro.lastIndexOf(Kt);if(e!==-1)return i.intro.substr(e+1)+t;t=i.intro+t}}while(i=i.previous);e=this.intro.lastIndexOf(Kt);if(e!==-1)return this.intro.substr(e+1)+t;return this.intro+t}slice(e=0,t=this.original.length){while(e<0)e+=this.original.length;while(t<0)t+=this.original.length;let i="";let s=this.firstChunk;while(s&&(s.start>e||s.end<=e)){if(s.start<t&&s.end>=t){return i}s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=s;while(s){if(s.intro&&(n!==s||s.start===e)){i+=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=n===s?e-s.start:0;const l=r?s.content.length+t-s.end:s.content.length;i+=s.content.slice(o,l);if(s.outro&&(!r||s.end===t)){i+=s.outro}if(r){break}s=s.next}return i}snip(e,t){const i=this.clone();i.remove(0,e);i.remove(t,i.original.length);return i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const i=e>t.end;while(t){if(t.contains(e))return this._splitChunk(t,e);t=i?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const i=getLocator(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${e.original}")`)}const i=e.split(t);this.byEnd[t]=e;this.byStart[t]=i;this.byEnd[i.end]=i;if(e===this.lastChunk)this.lastChunk=i;this.lastSearchedChunk=e;return true}toString(){let e=this.intro;let t=this.firstChunk;while(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 false}while(e=e.next);return true}length(){let e=this.firstChunk;let 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")+"+$");this.outro=this.outro.replace(t,"");if(this.outro.length)return true;let i=this.lastChunk;do{const e=i.end;const s=i.trimEnd(t);if(i.end!==e){if(this.lastChunk===i){this.lastChunk=i.next}this.byEnd[i.end]=i;this.byStart[i.next.start]=i.next;this.byEnd[i.next.end]=i.next}if(s)return true;i=i.previous}while(i);return false}trimEnd(e){this.trimEndAborted(e);return this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");this.intro=this.intro.replace(t,"");if(this.intro.length)return true;let i=this.firstChunk;do{const e=i.end;const s=i.trimStart(t);if(i.end!==e){if(i===this.lastChunk)this.lastChunk=i.next;this.byEnd[i.end]=i;this.byStart[i.next.start]=i.next;this.byEnd[i.next.end]=i.next}if(s)return true;i=i.next}while(i);return false}trimStart(e){this.trimStartAborted(e);return this}hasChanged(){return this.original!==this.toString()}_replaceRegexp(e,t){function getReplacement(e,i){if(typeof t==="string"){return t.replace(/\$(\$|&|\d+)/g,((t,i)=>{if(i==="$")return"$";if(i==="&")return e[0];const s=+i;if(s<e.length)return e[+i];return`$${i}`}))}else{return t(...e,e.index,i,e.groups)}}function matchAll(e,t){let i;const s=[];while(i=e.exec(t)){s.push(i)}return s}if(e.global){const t=matchAll(e,this.original);t.forEach((e=>{if(e.index!=null)this.overwrite(e.index,e.index+e[0].length,getReplacement(e,this.original))}))}else{const t=this.original.match(e);if(t&&t.index!=null)this.overwrite(t.index,t.index+t[0].length,getReplacement(t,this.original))}return this}_replaceString(e,t){const{original:i}=this;const s=i.indexOf(e);if(s!==-1){this.overwrite(s,s+e.length,t)}return this}replace(e,t){if(typeof e==="string"){return this._replaceString(e,t)}return this._replaceRegexp(e,t)}_replaceAllString(e,t){const{original:i}=this;const s=e.length;for(let n=i.indexOf(e);n!==-1;n=i.indexOf(e,n+s)){this.overwrite(n,n+s,t)}return this}replaceAll(e,t){if(typeof e==="string"){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 Qt=Object.prototype.hasOwnProperty;let Xt=class Bundle{constructor(e={}){this.intro=e.intro||"";this.separator=e.separator!==undefined?e.separator:"\n";this.sources=[];this.uniqueSources=[];this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof MagicString){return this.addSource({content:e,filename:e.filename,separator:this.separator})}if(!isObject$1(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`")}["filename","ignoreList","indentExclusionRanges","separator"].forEach((t=>{if(!Qt.call(e,t))e[t]=e.content[t]}));if(e.separator===undefined){e.separator=this.separator}if(e.filename){if(!Qt.call(this.uniqueSourceIndexByFilename,e.filename)){this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length;this.uniqueSources.push({filename:e.filename,content:e.content.original})}else{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`)}}}this.sources.push(e);return this}append(e,t){this.addSource({content:new MagicString(e),separator:t&&t.separator||""});return this}clone(){const e=new Bundle({intro:this.intro,separator:this.separator});this.sources.forEach((t=>{e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}));return e}generateDecodedMap(e={}){const t=[];let i=undefined;this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{if(!~t.indexOf(e))t.push(e)}))}));const s=new Mappings(e.hires);if(this.intro){s.advance(this.intro)}this.sources.forEach(((e,n)=>{if(n>0){s.advance(this.separator)}const r=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1;const o=e.content;const l=getLocator(o.original);if(o.intro){s.advance(o.intro)}o.firstChunk.eachNext((i=>{const n=l(i.start);if(i.intro.length)s.advance(i.intro);if(e.filename){if(i.edited){s.addEdit(r,i.content,n,i.storeName?t.indexOf(i.original):-1)}else{s.addUneditedChunk(r,i,o.original,n,o.sourcemapLocations)}}else{s.advance(i.content)}if(i.outro.length)s.advance(i.outro)}));if(o.outro){s.advance(o.outro)}if(e.ignoreList&&r!==-1){if(i===undefined){i=[]}i.push(r)}}));return{file:e.file?e.file.split(/[/\\]/).pop():undefined,sources:this.uniqueSources.map((t=>e.file?getRelativePath(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:s.raw,x_google_ignoreList:i}}generateMap(e){return new SourceMap(this.generateDecodedMap(e))}getIndentString(){const e={};this.sources.forEach((t=>{const i=t.content._getRawIndentString();if(i===null)return;if(!e[i])e[i]=0;e[i]+=1}));return Object.keys(e).sort(((t,i)=>e[t]-e[i]))[0]||"\t"}indent(e){if(!arguments.length){e=this.getIndentString()}if(e==="")return this;let t=!this.intro||this.intro.slice(-1)==="\n";this.sources.forEach(((i,s)=>{const n=i.separator!==undefined?i.separator:this.separator;const r=t||s>0&&/\r?\n$/.test(n);i.content.indent(e,{exclude:i.indentExclusionRanges,indentStart:r});t=i.content.lastChar()==="\n"}));if(this.intro){this.intro=e+this.intro.replace(/^[^\n]/gm,((t,i)=>i>0?e+t:t))}return this}prepend(e){this.intro=e+this.intro;return this}toString(){const e=this.sources.map(((e,t)=>{const i=e.separator!==undefined?e.separator:this.separator;const s=(t>0?i:"")+e.content.toString();return s})).join("");return this.intro+e}isEmpty(){if(this.intro.length&&this.intro.trim())return false;if(this.sources.some((e=>!e.content.isEmpty())))return false;return true}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")+"+");this.intro=this.intro.replace(t,"");if(!this.intro){let t;let i=0;do{t=this.sources[i++];if(!t){break}}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let i;let s=this.sources.length-1;do{i=this.sources[s--];if(!i){this.intro=this.intro.replace(t,"");break}}while(!i.content.trimEndAborted(e));return this}};const Zt=/[\n\r'\\\u2028\u2029]/;const Jt=/([\n\r'\u2028\u2029])/g;const ei=/\\/g;function escapeId(e){if(!Zt.test(e))return e;return e.replace(ei,"\\\\").replace(Jt,"\\$1")}class ExternalChunk{constructor(e,t,i){this.options=t;this.inputBase=i;this.defaultVariableName="";this.namespaceVariableName="";this.variableName="";this.fileName=null;this.importAssertions=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=(typeof e==="function"?e(this.id):e[this.id])||(this.renormalizeRenderPath?normalize(r.relative(this.inputBase,this.id)):this.id)}getImportAssertions(e){return this.importAssertions||(this.importAssertions=formatAssertions(this.options.format==="es"&&this.options.externalImportAssertions&&this.moduleInfo.assertions,e))}getImportPath(e){return escapeId(this.renormalizeRenderPath?getImportPath(e,this.getFileName(),this.options.format==="amd",false):this.getFileName())}}function formatAssertions(e,{getObject:t}){if(!e){return null}const i=Object.entries(e).map((([e,t])=>[e,`'${t}'`]));if(i.length>0){return t(i,{lineBreakIndent:null})}return null}function getOrCreate(e,t,i){const s=e.get(t);if(s!==undefined){return s}const n=i();e.set(t,n);return n}function getNewSet(){return new Set}function getNewArray(){return[]}const ti=Symbol("Unknown Key");const ii=Symbol("Unknown Non-Accessor Key");const si=Symbol("Unknown Integer");const ni=Symbol("Symbol.toStringTag");const ri=[];const oi=[ti];const ai=[ii];const li=[si];const ci=Symbol("Entities");class PathTracker{constructor(){this.entityPaths=Object.create(null,{[ci]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const i=this.getEntities(e);if(i.has(t))return true;i.add(t);return false}withTrackedEntityAtPath(e,t,i,s){const n=this.getEntities(e);if(n.has(t))return s;n.add(t);const r=i();n.delete(t);return r}getEntities(e){let t=this.entityPaths;for(const i of e){t=t[i]=t[i]||Object.create(null,{[ci]:{value:new Set}})}return t[ci]}}const ui=new PathTracker;class DiscriminatedPathTracker{constructor(){this.entityPaths=Object.create(null,{[ci]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,i){let s=this.entityPaths;for(const t of e){s=s[t]=s[t]||Object.create(null,{[ci]:{value:new Map}})}const n=getOrCreate(s[ci],t,getNewSet);if(n.has(i))return true;n.add(i);return false}}const hi=Symbol("Unknown Value");const di=Symbol("Unknown Truthy Value");class ExpressionEntity{constructor(){this.included=false}deoptimizeArgumentsOnInteractionAtPath(e,t,i){deoptimizeInteraction(e)}deoptimizePath(e){}getLiteralValueAtPath(e,t,i){return hi}getReturnExpressionWhenCalledAtPath(e,t,i,s){return fi}hasEffectsOnInteractionAtPath(e,t,i){return true}include(e,t,i){this.included=true}includeCallArguments(e,t){for(const i of t){i.include(e,false)}}shouldBeIncluded(e){return true}}const pi=new class UnknownExpression extends ExpressionEntity{};const fi=[pi,false];const deoptimizeInteraction=e=>{for(const t of e.args){t?.deoptimizePath(oi)}};const mi=0;const gi=1;const yi=2;const Ei={args:[null],type:mi};const xi={args:[null,pi],type:gi};const bi={args:[null],type:yi,withNew:false};class Variable extends ExpressionEntity{constructor(e){super();this.name=e;this.alwaysRendered=false;this.forbiddenNames=null;this.initReached=false;this.isId=false;this.isReassigned=false;this.kind=null;this.renderBaseName=null;this.renderName=null}addReference(e){}forbidName(e){(this.forbiddenNames||(this.forbiddenNames=new Set)).add(e)}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e,t){if(t?.(this)){return this.name}const i=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(i)}`:i}hasEffectsOnInteractionAtPath(e,{type:t},i){return t!==mi||e.length>0}include(){this.included=true}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e;this.renderName=t}}class ExternalVariable extends Variable{constructor(e,t){super(t);this.referenced=false;this.module=e;this.isNamespace=t==="*"}addReference(e){this.referenced=true;if(this.name==="default"||this.name==="*"){this.module.suggestName(e.name)}}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==mi||e.length>(this.isNamespace?1:0)}include(){if(!this.included){this.included=true;this.module.used=true}}}const vi=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"]);const Si=vi;const Ai=/[^\w$]/g;const startsWithDigit=e=>/\d/.test(e[0]);const needsEscape=e=>startsWithDigit(e)||Si.has(e)||e==="arguments";function isLegal(e){if(needsEscape(e)){return false}return!Ai.test(e)}function makeLegal(e){e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(Ai,"_");if(needsEscape(e))e=`_${e}`;return e||"_"}class ExternalModule{constructor(e,t,i,s,n,r){this.options=e;this.id=t;this.renormalizeRenderPath=n;this.dynamicImporters=[];this.execIndex=Infinity;this.exportedVariables=new Map;this.importers=[];this.reexported=false;this.used=false;this.declarations=new Map;this.mostCommonSuggestion=0;this.nameSuggestions=new Map;this.suggestedVariableName=makeLegal(t.split(/[/\\]/).pop());const{importers:o,dynamicImporters:l}=this;const c=this.info={assertions:r,ast:null,code:null,dynamicallyImportedIdResolutions:Y,dynamicallyImportedIds:Y,get dynamicImporters(){return l.sort()},exportedBindings:null,exports:null,hasDefaultExport:null,get hasModuleSideEffects(){warnDeprecation("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",W,true,e);return c.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:Y,implicitlyLoadedBefore:Y,importedIdResolutions:Y,importedIds:Y,get importers(){return o.sort()},isEntry:false,isExternal:true,isIncluded:null,meta:s,moduleSideEffects:i,syntheticNamedExports:false};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:false})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const i=new ExternalVariable(this,e);this.declarations.set(e,i);this.exportedVariables.set(i,e);return[i]}suggestName(e){const t=(this.nameSuggestions.get(e)??0)+1;this.nameSuggestions.set(e,t);if(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(e.length===0)return;const t=new Set;for(const i of e){for(const e of this.declarations.get(i).module.importers){t.add(e)}}const i=[...t];this.options.onwarn(errorUnusedExternalImports(this.id,e,i))}}function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function getAugmentedNamespace(e){if(e.__esModule)return e;var t=e.default;if(typeof t=="function"){var i=function a(){if(this instanceof a){var e=[null];e.push.apply(e,arguments);var i=Function.bind.apply(t,e);return new i}return t.apply(this,arguments)};i.prototype=t.prototype}else i={};Object.defineProperty(i,"__esModule",{value:true});Object.keys(e).forEach((function(t){var s=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(i,t,s.get?s:{enumerable:true,get:function(){return e[t]}})}));return i}var wi={};const Ii=o;const ki="\\\\/";const Ci=`[^${ki}]`;const _i="\\.";const Pi="\\+";const Ni="\\?";const Ri="\\/";const $i="(?=.)";const Oi="[^/]";const Ti=`(?:${Ri}|$)`;const Di=`(?:^|${Ri})`;const Mi=`${_i}{1,2}${Ti}`;const Li=`(?!${_i})`;const Bi=`(?!${Di}${Mi})`;const Fi=`(?!${_i}{0,1}${Ti})`;const Vi=`(?!${Mi})`;const zi=`[^.${Ri}]`;const ji=`${Oi}*?`;const Ui={DOT_LITERAL:_i,PLUS_LITERAL:Pi,QMARK_LITERAL:Ni,SLASH_LITERAL:Ri,ONE_CHAR:$i,QMARK:Oi,END_ANCHOR:Ti,DOTS_SLASH:Mi,NO_DOT:Li,NO_DOTS:Bi,NO_DOT_SLASH:Fi,NO_DOTS_SLASH:Vi,QMARK_NO_DOT:zi,STAR:ji,START_ANCHOR:Di};const Hi={...Ui,SLASH_LITERAL:`[${ki}]`,QMARK:Ci,STAR:`${Ci}*?`,DOTS_SLASH:`${_i}{1,2}(?:[${ki}]|$)`,NO_DOT:`(?!${_i})`,NO_DOTS:`(?!(?:^|[${ki}])${_i}{1,2}(?:[${ki}]|$))`,NO_DOT_SLASH:`(?!${_i}{0,1}(?:[${ki}]|$))`,NO_DOTS_SLASH:`(?!${_i}{1,2}(?:[${ki}]|$))`,QMARK_NO_DOT:`[^.${ki}]`,START_ANCHOR:`(?:^|[${ki}])`,END_ANCHOR:`(?:[${ki}]|$)`};const Gi={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Wi={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:Gi,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:Ii.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?Hi:Ui}};(function(e){const t=o;const i=process.platform==="win32";const{REGEX_BACKSLASH:s,REGEX_REMOVE_BACKSLASH:n,REGEX_SPECIAL_CHARS:r,REGEX_SPECIAL_CHARS_GLOBAL:l}=Wi;e.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);e.hasRegexChars=e=>r.test(e);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=e=>e.replace(l,"\\$1");e.toPosixSlashes=e=>e.replace(s,"/");e.removeBackslashes=e=>e.replace(n,(e=>e==="\\"?"":e));e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};e.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return i===true||t.sep==="\\"};e.escapeLast=(t,i,s)=>{const n=t.lastIndexOf(i,s);if(n===-1)return t;if(t[n-1]==="\\")return e.escapeLast(t,i,n-1);return`${t.slice(0,n)}\\${t.slice(n)}`};e.removePrefix=(e,t={})=>{let i=e;if(i.startsWith("./")){i=i.slice(2);t.prefix="./"}return i};e.wrapOutput=(e,t={},i={})=>{const s=i.contains?"":"^";const n=i.contains?"":"$";let r=`${s}(?:${e})${n}`;if(t.negated===true){r=`(?:^(?!${r}).*$)`}return r}})(wi);const qi=wi;const{CHAR_ASTERISK:Ki,CHAR_AT:Yi,CHAR_BACKWARD_SLASH:Qi,CHAR_COMMA:Xi,CHAR_DOT:Zi,CHAR_EXCLAMATION_MARK:Ji,CHAR_FORWARD_SLASH:ts,CHAR_LEFT_CURLY_BRACE:is,CHAR_LEFT_PARENTHESES:ss,CHAR_LEFT_SQUARE_BRACKET:ns,CHAR_PLUS:rs,CHAR_QUESTION_MARK:os,CHAR_RIGHT_CURLY_BRACE:as,CHAR_RIGHT_PARENTHESES:ls,CHAR_RIGHT_SQUARE_BRACKET:cs}=Wi;const isPathSeparator=e=>e===ts||e===Qi;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan$1=(e,t)=>{const i=t||{};const s=e.length-1;const n=i.parts===true||i.scanToEnd===true;const r=[];const o=[];const l=[];let c=e;let u=-1;let h=0;let d=0;let p=false;let f=false;let m=false;let g=false;let y=false;let E=false;let x=false;let b=false;let v=false;let S=false;let A=0;let w;let I;let k={value:"",depth:0,isGlob:false};const eos=()=>u>=s;const peek=()=>c.charCodeAt(u+1);const advance=()=>{w=I;return c.charCodeAt(++u)};while(u<s){I=advance();let e;if(I===Qi){x=k.backslashes=true;I=advance();if(I===is){E=true}continue}if(E===true||I===is){A++;while(eos()!==true&&(I=advance())){if(I===Qi){x=k.backslashes=true;advance();continue}if(I===is){A++;continue}if(E!==true&&I===Zi&&(I=advance())===Zi){p=k.isBrace=true;m=k.isGlob=true;S=true;if(n===true){continue}break}if(E!==true&&I===Xi){p=k.isBrace=true;m=k.isGlob=true;S=true;if(n===true){continue}break}if(I===as){A--;if(A===0){E=false;p=k.isBrace=true;S=true;break}}}if(n===true){continue}break}if(I===ts){r.push(u);o.push(k);k={value:"",depth:0,isGlob:false};if(S===true)continue;if(w===Zi&&u===h+1){h+=2;continue}d=u+1;continue}if(i.noext!==true){const e=I===rs||I===Yi||I===Ki||I===os||I===Ji;if(e===true&&peek()===ss){m=k.isGlob=true;g=k.isExtglob=true;S=true;if(I===Ji&&u===h){v=true}if(n===true){while(eos()!==true&&(I=advance())){if(I===Qi){x=k.backslashes=true;I=advance();continue}if(I===ls){m=k.isGlob=true;S=true;break}}continue}break}}if(I===Ki){if(w===Ki)y=k.isGlobstar=true;m=k.isGlob=true;S=true;if(n===true){continue}break}if(I===os){m=k.isGlob=true;S=true;if(n===true){continue}break}if(I===ns){while(eos()!==true&&(e=advance())){if(e===Qi){x=k.backslashes=true;advance();continue}if(e===cs){f=k.isBracket=true;m=k.isGlob=true;S=true;break}}if(n===true){continue}break}if(i.nonegate!==true&&I===Ji&&u===h){b=k.negated=true;h++;continue}if(i.noparen!==true&&I===ss){m=k.isGlob=true;if(n===true){while(eos()!==true&&(I=advance())){if(I===ss){x=k.backslashes=true;I=advance();continue}if(I===ls){S=true;break}}continue}break}if(m===true){S=true;if(n===true){continue}break}}if(i.noext===true){g=false;m=false}let C=c;let _="";let P="";if(h>0){_=c.slice(0,h);c=c.slice(h);d-=h}if(C&&m===true&&d>0){C=c.slice(0,d);P=c.slice(d)}else if(m===true){C="";P=c}else{C=c}if(C&&C!==""&&C!=="/"&&C!==c){if(isPathSeparator(C.charCodeAt(C.length-1))){C=C.slice(0,-1)}}if(i.unescape===true){if(P)P=qi.removeBackslashes(P);if(C&&x===true){C=qi.removeBackslashes(C)}}const N={prefix:_,input:e,start:h,base:C,glob:P,isBrace:p,isBracket:f,isGlob:m,isExtglob:g,isGlobstar:y,negated:b,negatedExtglob:v};if(i.tokens===true){N.maxDepth=0;if(!isPathSeparator(I)){o.push(k)}N.tokens=o}if(i.parts===true||i.tokens===true){let t;for(let s=0;s<r.length;s++){const n=t?t+1:h;const c=r[s];const u=e.slice(n,c);if(i.tokens){if(s===0&&h!==0){o[s].isPrefix=true;o[s].value=_}else{o[s].value=u}depth(o[s]);N.maxDepth+=o[s].depth}if(s!==0||u!==""){l.push(u)}t=c}if(t&&t+1<e.length){const s=e.slice(t+1);l.push(s);if(i.tokens){o[o.length-1].value=s;depth(o[o.length-1]);N.maxDepth+=o[o.length-1].depth}}N.slashes=r;N.parts=l}return N};var us=scan$1;const hs=Wi;const ds=wi;const{MAX_LENGTH:ps,POSIX_REGEX_SOURCE:fs,REGEX_NON_SPECIAL_CHARS:ms,REGEX_SPECIAL_CHARS_BACKREF:gs,REPLACEMENTS:ys}=hs;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const i=`[${e.join("-")}]`;return i};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse$2=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=ys[e]||e;const i={...t};const s=typeof i.maxLength==="number"?Math.min(ps,i.maxLength):ps;let n=e.length;if(n>s){throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`)}const r={type:"bos",value:"",output:i.prepend||""};const o=[r];const l=i.capture?"":"?:";const c=ds.isWindows(t);const u=hs.globChars(c);const h=hs.extglobChars(u);const{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:f,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:E,NO_DOTS_SLASH:x,QMARK:b,QMARK_NO_DOT:v,STAR:S,START_ANCHOR:A}=u;const globstar=e=>`(${l}(?:(?!${A}${e.dot?g:d}).)*?)`;const w=i.dot?"":y;const I=i.dot?b:v;let k=i.bash===true?globstar(i):S;if(i.capture){k=`(${k})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const C={input:e,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:o};e=ds.removePrefix(e,C);n=e.length;const _=[];const P=[];const N=[];let R=r;let $;const eos=()=>C.index===n-1;const O=C.peek=(t=1)=>e[C.index+t];const T=C.advance=()=>e[++C.index]||"";const remaining=()=>e.slice(C.index+1);const consume=(e="",t=0)=>{C.consumed+=e;C.index+=t};const append=e=>{C.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while(O()==="!"&&(O(2)!=="("||O(3)==="?")){T();C.start++;e++}if(e%2===0){return false}C.negated=true;C.start++;return true};const increment=e=>{C[e]++;N.push(e)};const decrement=e=>{C[e]--;N.pop()};const push=e=>{if(R.type==="globstar"){const t=C.braces>0&&(e.type==="comma"||e.type==="brace");const i=e.extglob===true||_.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!i){C.output=C.output.slice(0,-R.output.length);R.type="star";R.value="*";R.output=k;C.output+=R.output}}if(_.length&&e.type!=="paren"){_[_.length-1].inner+=e.value}if(e.value||e.output)append(e);if(R&&R.type==="text"&&e.type==="text"){R.value+=e.value;R.output=(R.output||"")+e.value;return}e.prev=R;o.push(e);R=e};const extglobOpen=(e,t)=>{const s={...h[t],conditions:1,inner:""};s.prev=R;s.parens=C.parens;s.output=C.output;const n=(i.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:C.output?"":m});push({type:"paren",extglob:true,value:T(),output:n});_.push(s)};const extglobClose=e=>{let s=e.close+(i.capture?")":"");let n;if(e.type==="negate"){let r=k;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){r=globstar(i)}if(r!==k||eos()||/^\)+$/.test(remaining())){s=e.close=`)$))${r}`}if(e.inner.includes("*")&&(n=remaining())&&/^\.[^\\/.]+$/.test(n)){const i=parse$2(n,{...t,fastpaths:false}).output;s=e.close=`)${i})${r})`}if(e.prev.type==="bos"){C.negatedExtglob=true}}push({type:"paren",extglob:true,value:$,output:s});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let n=e.replace(gs,((e,t,i,n,r,o)=>{if(n==="\\"){s=true;return e}if(n==="?"){if(t){return t+n+(r?b.repeat(r.length):"")}if(o===0){return I+(r?b.repeat(r.length):"")}return b.repeat(i.length)}if(n==="."){return d.repeat(i.length)}if(n==="*"){if(t){return t+n+(r?k:"")}return k}return t?e:`\\${e}`}));if(s===true){if(i.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(n===e&&i.contains===true){C.output=e;return C}C.output=ds.wrapOutput(n,C,t);return C}while(!eos()){$=T();if($==="\0"){continue}if($==="\\"){const e=O();if(e==="/"&&i.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){$+="\\";push({type:"text",value:$});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;C.index+=s;if(s%2!==0){$+="\\"}}if(i.unescape===true){$=T()}else{$+=T()}if(C.brackets===0){push({type:"text",value:$});continue}}if(C.brackets>0&&($!=="]"||R.value==="["||R.value==="[^")){if(i.posix!==false&&$===":"){const e=R.value.slice(1);if(e.includes("[")){R.posix=true;if(e.includes(":")){const e=R.value.lastIndexOf("[");const t=R.value.slice(0,e);const i=R.value.slice(e+2);const s=fs[i];if(s){R.value=t+s;C.backtrack=true;T();if(!r.output&&o.indexOf(R)===1){r.output=m}continue}}}}if($==="["&&O()!==":"||$==="-"&&O()==="]"){$=`\\${$}`}if($==="]"&&(R.value==="["||R.value==="[^")){$=`\\${$}`}if(i.posix===true&&$==="!"&&R.value==="["){$="^"}R.value+=$;append({value:$});continue}if(C.quotes===1&&$!=='"'){$=ds.escapeRegex($);R.value+=$;append({value:$});continue}if($==='"'){C.quotes=C.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:$})}continue}if($==="("){increment("parens");push({type:"paren",value:$});continue}if($===")"){if(C.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=_[_.length-1];if(e&&C.parens===e.parens+1){extglobClose(_.pop());continue}push({type:"paren",value:$,output:C.parens?")":"\\)"});decrement("parens");continue}if($==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}$=`\\${$}`}else{increment("brackets")}push({type:"bracket",value:$});continue}if($==="]"){if(i.nobracket===true||R&&R.type==="bracket"&&R.value.length===1){push({type:"text",value:$,output:`\\${$}`});continue}if(C.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:$,output:`\\${$}`});continue}decrement("brackets");const e=R.value.slice(1);if(R.posix!==true&&e[0]==="^"&&!e.includes("/")){$=`/${$}`}R.value+=$;append({value:$});if(i.literalBrackets===false||ds.hasRegexChars(e)){continue}const t=ds.escapeRegex(R.value);C.output=C.output.slice(0,-R.value.length);if(i.literalBrackets===true){C.output+=t;R.value=t;continue}R.value=`(${l}${t}|${R.value})`;C.output+=R.value;continue}if($==="{"&&i.nobrace!==true){increment("braces");const e={type:"brace",value:$,output:"(",outputIndex:C.output.length,tokensIndex:C.tokens.length};P.push(e);push(e);continue}if($==="}"){const e=P[P.length-1];if(i.nobrace===true||!e){push({type:"text",value:$,output:$});continue}let t=")";if(e.dots===true){const e=o.slice();const s=[];for(let t=e.length-1;t>=0;t--){o.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,i);C.backtrack=true}if(e.comma!==true&&e.dots!==true){const i=C.output.slice(0,e.outputIndex);const s=C.tokens.slice(e.tokensIndex);e.value=e.output="\\{";$=t="\\}";C.output=i;for(const e of s){C.output+=e.output||e.value}}push({type:"brace",value:$,output:t});decrement("braces");P.pop();continue}if($==="|"){if(_.length>0){_[_.length-1].conditions++}push({type:"text",value:$});continue}if($===","){let e=$;const t=P[P.length-1];if(t&&N[N.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:$,output:e});continue}if($==="/"){if(R.type==="dot"&&C.index===C.start+1){C.start=C.index+1;C.consumed="";C.output="";o.pop();R=r;continue}push({type:"slash",value:$,output:f});continue}if($==="."){if(C.braces>0&&R.type==="dot"){if(R.value===".")R.output=d;const e=P[P.length-1];R.type="dots";R.output+=$;R.value+=$;e.dots=true;continue}if(C.braces+C.parens===0&&R.type!=="bos"&&R.type!=="slash"){push({type:"text",value:$,output:d});continue}push({type:"dot",value:$,output:d});continue}if($==="?"){const e=R&&R.value==="(";if(!e&&i.noextglob!==true&&O()==="("&&O(2)!=="?"){extglobOpen("qmark",$);continue}if(R&&R.type==="paren"){const e=O();let t=$;if(e==="<"&&!ds.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(R.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${$}`}push({type:"text",value:$,output:t});continue}if(i.dot!==true&&(R.type==="slash"||R.type==="bos")){push({type:"qmark",value:$,output:v});continue}push({type:"qmark",value:$,output:b});continue}if($==="!"){if(i.noextglob!==true&&O()==="("){if(O(2)!=="?"||!/[!=<:]/.test(O(3))){extglobOpen("negate",$);continue}}if(i.nonegate!==true&&C.index===0){negate();continue}}if($==="+"){if(i.noextglob!==true&&O()==="("&&O(2)!=="?"){extglobOpen("plus",$);continue}if(R&&R.value==="("||i.regex===false){push({type:"plus",value:$,output:p});continue}if(R&&(R.type==="bracket"||R.type==="paren"||R.type==="brace")||C.parens>0){push({type:"plus",value:$});continue}push({type:"plus",value:p});continue}if($==="@"){if(i.noextglob!==true&&O()==="("&&O(2)!=="?"){push({type:"at",extglob:true,value:$,output:""});continue}push({type:"text",value:$});continue}if($!=="*"){if($==="$"||$==="^"){$=`\\${$}`}const e=ms.exec(remaining());if(e){$+=e[0];C.index+=e[0].length}push({type:"text",value:$});continue}if(R&&(R.type==="globstar"||R.star===true)){R.type="star";R.star=true;R.value+=$;R.output=k;C.backtrack=true;C.globstar=true;consume($);continue}let t=remaining();if(i.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",$);continue}if(R.type==="star"){if(i.noglobstar===true){consume($);continue}const s=R.prev;const n=s.prev;const r=s.type==="slash"||s.type==="bos";const o=n&&(n.type==="star"||n.type==="globstar");if(i.bash===true&&(!r||t[0]&&t[0]!=="/")){push({type:"star",value:$,output:""});continue}const l=C.braces>0&&(s.type==="comma"||s.type==="brace");const c=_.length&&(s.type==="pipe"||s.type==="paren");if(!r&&s.type!=="paren"&&!l&&!c){push({type:"star",value:$,output:""});continue}while(t.slice(0,3)==="/**"){const i=e[C.index+4];if(i&&i!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){R.type="globstar";R.value+=$;R.output=globstar(i);C.output=R.output;C.globstar=true;consume($);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){C.output=C.output.slice(0,-(s.output+R.output).length);s.output=`(?:${s.output}`;R.type="globstar";R.output=globstar(i)+(i.strictSlashes?")":"|$)");R.value+=$;C.globstar=true;C.output+=s.output+R.output;consume($);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";C.output=C.output.slice(0,-(s.output+R.output).length);s.output=`(?:${s.output}`;R.type="globstar";R.output=`${globstar(i)}${f}|${f}${e})`;R.value+=$;C.output+=s.output+R.output;C.globstar=true;consume($+T());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){R.type="globstar";R.value+=$;R.output=`(?:^|${f}|${globstar(i)}${f})`;C.output=R.output;C.globstar=true;consume($+T());push({type:"slash",value:"/",output:""});continue}C.output=C.output.slice(0,-R.output.length);R.type="globstar";R.output=globstar(i);R.value+=$;C.output+=R.output;C.globstar=true;consume($);continue}const s={type:"star",value:$,output:k};if(i.bash===true){s.output=".*?";if(R.type==="bos"||R.type==="slash"){s.output=w+s.output}push(s);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&i.regex===true){s.output=$;push(s);continue}if(C.index===C.start||R.type==="slash"||R.type==="dot"){if(R.type==="dot"){C.output+=E;R.output+=E}else if(i.dot===true){C.output+=x;R.output+=x}else{C.output+=w;R.output+=w}if(O()!=="*"){C.output+=m;R.output+=m}}push(s)}while(C.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));C.output=ds.escapeLast(C.output,"[");decrement("brackets")}while(C.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));C.output=ds.escapeLast(C.output,"(");decrement("parens")}while(C.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));C.output=ds.escapeLast(C.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(R.type==="star"||R.type==="bracket")){push({type:"maybe_slash",value:"",output:`${f}?`})}if(C.backtrack===true){C.output="";for(const e of C.tokens){C.output+=e.output!=null?e.output:e.value;if(e.suffix){C.output+=e.suffix}}}return C};parse$2.fastpaths=(e,t)=>{const i={...t};const s=typeof i.maxLength==="number"?Math.min(ps,i.maxLength):ps;const n=e.length;if(n>s){throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`)}e=ys[e]||e;const r=ds.isWindows(t);const{DOT_LITERAL:o,SLASH_LITERAL:l,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:h,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:f,START_ANCHOR:m}=hs.globChars(r);const g=i.dot?d:h;const y=i.dot?p:h;const E=i.capture?"":"?:";const x={negated:false,prefix:""};let b=i.bash===true?".*?":f;if(i.capture){b=`(${b})`}const globstar=e=>{if(e.noglobstar===true)return b;return`(${E}(?:(?!${m}${e.dot?u:o}).)*?)`};const create=e=>{switch(e){case"*":return`${g}${c}${b}`;case".*":return`${o}${c}${b}`;case"*.*":return`${g}${b}${o}${c}${b}`;case"*/*":return`${g}${b}${l}${c}${y}${b}`;case"**":return g+globstar(i);case"**/*":return`(?:${g}${globstar(i)}${l})?${y}${c}${b}`;case"**/*.*":return`(?:${g}${globstar(i)}${l})?${y}${b}${o}${c}${b}`;case"**/.*":return`(?:${g}${globstar(i)}${l})?${o}${c}${b}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const i=create(t[1]);if(!i)return;return i+o+t[2]}}};const v=ds.removePrefix(e,x);let S=create(v);if(S&&i.strictSlashes!==true){S+=`${l}?`}return S};var Es=parse$2;const xs=o;const bs=us;const vs=Es;const Ss=wi;const As=Wi;const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch$1=(e,t,i=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch$1(e,t,i)));const arrayMatcher=e=>{for(const t of s){const i=t(e);if(i)return i}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const n=t||{};const r=Ss.isWindows(t);const o=s?picomatch$1.compileRe(e,t):picomatch$1.makeRe(e,t,false,true);const l=o.state;delete o.state;let isIgnored=()=>false;if(n.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch$1(n.ignore,e,i)}const matcher=(i,s=false)=>{const{isMatch:c,match:u,output:h}=picomatch$1.test(i,o,t,{glob:e,posix:r});const d={glob:e,state:l,regex:o,posix:r,input:i,output:h,match:u,isMatch:c};if(typeof n.onResult==="function"){n.onResult(d)}if(c===false){d.isMatch=false;return s?d:false}if(isIgnored(i)){if(typeof n.onIgnore==="function"){n.onIgnore(d)}d.isMatch=false;return s?d:false}if(typeof n.onMatch==="function"){n.onMatch(d)}return s?d:true};if(i){matcher.state=l}return matcher};picomatch$1.test=(e,t,i,{glob:s,posix:n}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const r=i||{};const o=r.format||(n?Ss.toPosixSlashes:null);let l=e===s;let c=l&&o?o(e):e;if(l===false){c=o?o(e):e;l=c===s}if(l===false||r.capture===true){if(r.matchBase===true||r.basename===true){l=picomatch$1.matchBase(e,t,i,n)}else{l=t.exec(c)}}return{isMatch:Boolean(l),match:l,output:c}};picomatch$1.matchBase=(e,t,i,s=Ss.isWindows(i))=>{const n=t instanceof RegExp?t:picomatch$1.makeRe(t,i);return n.test(xs.basename(e))};picomatch$1.isMatch=(e,t,i)=>picomatch$1(t,i)(e);picomatch$1.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch$1.parse(e,t)));return vs(e,{...t,fastpaths:false})};picomatch$1.scan=(e,t)=>bs(e,t);picomatch$1.compileRe=(e,t,i=false,s=false)=>{if(i===true){return e.output}const n=t||{};const r=n.contains?"":"^";const o=n.contains?"":"$";let l=`${r}(?:${e.output})${o}`;if(e&&e.negated===true){l=`^(?!${l}).*$`}const c=picomatch$1.toRegex(l,t);if(s===true){c.state=e}return c};picomatch$1.makeRe=(e,t={},i=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let n={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){n.output=vs.fastpaths(e,t)}if(!n.output){n=vs(e,t)}return picomatch$1.compileRe(n,t,i,s)};picomatch$1.toRegex=(e,t)=>{try{const i=t||{};return new RegExp(e,i.flags||(i.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch$1.constants=As;var ws=picomatch$1;var Is=ws;const ks=getDefaultExportFromCjs(Is);const Cs={ArrayPattern(e,t){for(const i of t.elements){if(i)Cs[i.type](e,i)}},AssignmentPattern(e,t){Cs[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const i of t.properties){if(i.type==="RestElement"){Cs.RestElement(e,i)}else{Cs[i.value.type](e,i.value)}}},RestElement(e,t){Cs[t.argument.type](e,t.argument)}};const _s=function extractAssignedNames(e){const t=[];Cs[e.type](t,e);return t};function isArray$1(e){return Array.isArray(e)}function ensureArray(e){if(isArray$1(e))return e;if(e==null)return[];return[e]}const Ps=function normalizePath(e){return e.split(o.win32.sep).join(o.posix.sep)};function getMatcherString(e,t){if(t===false||o.isAbsolute(e)||e.startsWith("*")){return Ps(e)}const i=Ps(o.resolve(t||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return o.posix.join(i,Ps(e))}const Ns=function createFilter(e,t,i){const s=i&&i.resolve;const getMatcher=e=>e instanceof RegExp?e:{test:t=>{const i=getMatcherString(e,s);const n=ks(i,{dot:true});const r=n(t);return r}};const n=ensureArray(e).map(getMatcher);const r=ensureArray(t).map(getMatcher);return function result(e){if(typeof e!=="string")return false;if(/\0/.test(e))return false;const t=Ps(e);for(let e=0;e<r.length;++e){const i=r[e];if(i.test(t))return false}for(let e=0;e<n.length;++e){const i=n[e];if(i.test(t))return true}return!n.length}};const Rs="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";const $s="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";const Os=new Set(`${Rs} ${$s}`.split(" "));Os.add("");function createInclusionContext(){return{brokenFlow:false,hasBreak:false,hasContinue:false,includedCallArguments:new Set,includedLabels:new Set}}function createHasEffectsContext(){return{accessed:new PathTracker,assigned:new PathTracker,brokenFlow:false,called:new DiscriminatedPathTracker,hasBreak:false,hasContinue:false,ignore:{breaks:false,continues:false,labels:new Set,returnYield:false,this:false},includedLabels:new Set,instantiated:new DiscriminatedPathTracker,replacedVariableInits:new Map}}function assembleMemberDescriptions(e,t=null){return Object.create(t,e)}const Ts=new class UndefinedExpression extends ExpressionEntity{getLiteralValueAtPath(){return undefined}};const Ds={value:{hasEffectsWhenCalled:null,returns:pi}};const Ms=new class UnknownBoolean extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(Hs,e[0])}return fi}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===mi){return e.length>1}if(t.type===yi&&e.length===1){return hasMemberEffectWhenCalled(Hs,e[0],t,i)}return true}};const Ls={value:{hasEffectsWhenCalled:null,returns:Ms}};const Bs=new class UnknownNumber extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(Gs,e[0])}return fi}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===mi){return e.length>1}if(t.type===yi&&e.length===1){return hasMemberEffectWhenCalled(Gs,e[0],t,i)}return true}};const Fs={value:{hasEffectsWhenCalled:null,returns:Bs}};const Vs=new class UnknownString extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(qs,e[0])}return fi}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===mi){return e.length>1}if(t.type===yi&&e.length===1){return hasMemberEffectWhenCalled(qs,e[0],t,i)}return true}};const zs={value:{hasEffectsWhenCalled:null,returns:Vs}};const js={value:{hasEffectsWhenCalled({args:e},t){const i=e[2];return e.length<3||typeof i.getLiteralValueAtPath(ri,ui,{deoptimizeCache(){}})==="symbol"&&i.hasEffectsOnInteractionAtPath(ri,bi,t)},returns:Vs}};const Us=assembleMemberDescriptions({hasOwnProperty:Ls,isPrototypeOf:Ls,propertyIsEnumerable:Ls,toLocaleString:zs,toString:zs,valueOf:Ds});const Hs=assembleMemberDescriptions({valueOf:Ls},Us);const Gs=assembleMemberDescriptions({toExponential:zs,toFixed:zs,toLocaleString:zs,toPrecision:zs,valueOf:Fs},Us);const Ws=assembleMemberDescriptions({exec:Ds,test:Ls},Us);const qs=assembleMemberDescriptions({anchor:zs,at:Ds,big:zs,blink:zs,bold:zs,charAt:zs,charCodeAt:Fs,codePointAt:Ds,concat:zs,endsWith:Ls,fixed:zs,fontcolor:zs,fontsize:zs,includes:Ls,indexOf:Fs,italics:zs,lastIndexOf:Fs,link:zs,localeCompare:Fs,match:Ds,matchAll:Ds,normalize:zs,padEnd:zs,padStart:zs,repeat:zs,replace:js,replaceAll:js,search:Fs,slice:zs,small:zs,split:Ds,startsWith:Ls,strike:zs,sub:zs,substr:zs,substring:zs,sup:zs,toLocaleLowerCase:zs,toLocaleUpperCase:zs,toLowerCase:zs,toString:zs,toUpperCase:zs,trim:zs,trimEnd:zs,trimLeft:zs,trimRight:zs,trimStart:zs,valueOf:zs},Us);function getLiteralMembersForValue(e){if(e instanceof RegExp){return Ws}switch(typeof e){case"boolean":{return Hs}case"number":{return Gs}case"string":{return qs}}return Object.create(null)}function hasMemberEffectWhenCalled(e,t,i,s){if(typeof t!=="string"||!e[t]){return true}return e[t].hasEffectsWhenCalled?.(i,s)||false}function getMemberReturnExpressionWhenCalled(e,t){if(typeof t!=="string"||!e[t])return fi;return[e[t].returns,false]}function skipThrough(e,t,i){i(e,t)}function ignore(e,t,i){}var Ks={};Ks.Program=Ks.BlockStatement=Ks.StaticBlock=function(e,t,i){for(var s=0,n=e.body;s<n.length;s+=1){var r=n[s];i(r,t,"Statement")}};Ks.Statement=skipThrough;Ks.EmptyStatement=ignore;Ks.ExpressionStatement=Ks.ParenthesizedExpression=Ks.ChainExpression=function(e,t,i){return i(e.expression,t,"Expression")};Ks.IfStatement=function(e,t,i){i(e.test,t,"Expression");i(e.consequent,t,"Statement");if(e.alternate){i(e.alternate,t,"Statement")}};Ks.LabeledStatement=function(e,t,i){return i(e.body,t,"Statement")};Ks.BreakStatement=Ks.ContinueStatement=ignore;Ks.WithStatement=function(e,t,i){i(e.object,t,"Expression");i(e.body,t,"Statement")};Ks.SwitchStatement=function(e,t,i){i(e.discriminant,t,"Expression");for(var s=0,n=e.cases;s<n.length;s+=1){var r=n[s];if(r.test){i(r.test,t,"Expression")}for(var o=0,l=r.consequent;o<l.length;o+=1){var c=l[o];i(c,t,"Statement")}}};Ks.SwitchCase=function(e,t,i){if(e.test){i(e.test,t,"Expression")}for(var s=0,n=e.consequent;s<n.length;s+=1){var r=n[s];i(r,t,"Statement")}};Ks.ReturnStatement=Ks.YieldExpression=Ks.AwaitExpression=function(e,t,i){if(e.argument){i(e.argument,t,"Expression")}};Ks.ThrowStatement=Ks.SpreadElement=function(e,t,i){return i(e.argument,t,"Expression")};Ks.TryStatement=function(e,t,i){i(e.block,t,"Statement");if(e.handler){i(e.handler,t)}if(e.finalizer){i(e.finalizer,t,"Statement")}};Ks.CatchClause=function(e,t,i){if(e.param){i(e.param,t,"Pattern")}i(e.body,t,"Statement")};Ks.WhileStatement=Ks.DoWhileStatement=function(e,t,i){i(e.test,t,"Expression");i(e.body,t,"Statement")};Ks.ForStatement=function(e,t,i){if(e.init){i(e.init,t,"ForInit")}if(e.test){i(e.test,t,"Expression")}if(e.update){i(e.update,t,"Expression")}i(e.body,t,"Statement")};Ks.ForInStatement=Ks.ForOfStatement=function(e,t,i){i(e.left,t,"ForInit");i(e.right,t,"Expression");i(e.body,t,"Statement")};Ks.ForInit=function(e,t,i){if(e.type==="VariableDeclaration"){i(e,t)}else{i(e,t,"Expression")}};Ks.DebuggerStatement=ignore;Ks.FunctionDeclaration=function(e,t,i){return i(e,t,"Function")};Ks.VariableDeclaration=function(e,t,i){for(var s=0,n=e.declarations;s<n.length;s+=1){var r=n[s];i(r,t)}};Ks.VariableDeclarator=function(e,t,i){i(e.id,t,"Pattern");if(e.init){i(e.init,t,"Expression")}};Ks.Function=function(e,t,i){if(e.id){i(e.id,t,"Pattern")}for(var s=0,n=e.params;s<n.length;s+=1){var r=n[s];i(r,t,"Pattern")}i(e.body,t,e.expression?"Expression":"Statement")};Ks.Pattern=function(e,t,i){if(e.type==="Identifier"){i(e,t,"VariablePattern")}else if(e.type==="MemberExpression"){i(e,t,"MemberPattern")}else{i(e,t)}};Ks.VariablePattern=ignore;Ks.MemberPattern=skipThrough;Ks.RestElement=function(e,t,i){return i(e.argument,t,"Pattern")};Ks.ArrayPattern=function(e,t,i){for(var s=0,n=e.elements;s<n.length;s+=1){var r=n[s];if(r){i(r,t,"Pattern")}}};Ks.ObjectPattern=function(e,t,i){for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];if(r.type==="Property"){if(r.computed){i(r.key,t,"Expression")}i(r.value,t,"Pattern")}else if(r.type==="RestElement"){i(r.argument,t,"Pattern")}}};Ks.Expression=skipThrough;Ks.ThisExpression=Ks.Super=Ks.MetaProperty=ignore;Ks.ArrayExpression=function(e,t,i){for(var s=0,n=e.elements;s<n.length;s+=1){var r=n[s];if(r){i(r,t,"Expression")}}};Ks.ObjectExpression=function(e,t,i){for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];i(r,t)}};Ks.FunctionExpression=Ks.ArrowFunctionExpression=Ks.FunctionDeclaration;Ks.SequenceExpression=function(e,t,i){for(var s=0,n=e.expressions;s<n.length;s+=1){var r=n[s];i(r,t,"Expression")}};Ks.TemplateLiteral=function(e,t,i){for(var s=0,n=e.quasis;s<n.length;s+=1){var r=n[s];i(r,t)}for(var o=0,l=e.expressions;o<l.length;o+=1){var c=l[o];i(c,t,"Expression")}};Ks.TemplateElement=ignore;Ks.UnaryExpression=Ks.UpdateExpression=function(e,t,i){i(e.argument,t,"Expression")};Ks.BinaryExpression=Ks.LogicalExpression=function(e,t,i){i(e.left,t,"Expression");i(e.right,t,"Expression")};Ks.AssignmentExpression=Ks.AssignmentPattern=function(e,t,i){i(e.left,t,"Pattern");i(e.right,t,"Expression")};Ks.ConditionalExpression=function(e,t,i){i(e.test,t,"Expression");i(e.consequent,t,"Expression");i(e.alternate,t,"Expression")};Ks.NewExpression=Ks.CallExpression=function(e,t,i){i(e.callee,t,"Expression");if(e.arguments){for(var s=0,n=e.arguments;s<n.length;s+=1){var r=n[s];i(r,t,"Expression")}}};Ks.MemberExpression=function(e,t,i){i(e.object,t,"Expression");if(e.computed){i(e.property,t,"Expression")}};Ks.ExportNamedDeclaration=Ks.ExportDefaultDeclaration=function(e,t,i){if(e.declaration){i(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression")}if(e.source){i(e.source,t,"Expression")}};Ks.ExportAllDeclaration=function(e,t,i){if(e.exported){i(e.exported,t)}i(e.source,t,"Expression")};Ks.ImportDeclaration=function(e,t,i){for(var s=0,n=e.specifiers;s<n.length;s+=1){var r=n[s];i(r,t)}i(e.source,t,"Expression")};Ks.ImportExpression=function(e,t,i){i(e.source,t,"Expression")};Ks.ImportSpecifier=Ks.ImportDefaultSpecifier=Ks.ImportNamespaceSpecifier=Ks.Identifier=Ks.PrivateIdentifier=Ks.Literal=ignore;Ks.TaggedTemplateExpression=function(e,t,i){i(e.tag,t,"Expression");i(e.quasi,t,"Expression")};Ks.ClassDeclaration=Ks.ClassExpression=function(e,t,i){return i(e,t,"Class")};Ks.Class=function(e,t,i){if(e.id){i(e.id,t,"Pattern")}if(e.superClass){i(e.superClass,t,"Expression")}i(e.body,t)};Ks.ClassBody=function(e,t,i){for(var s=0,n=e.body;s<n.length;s+=1){var r=n[s];i(r,t)}};Ks.MethodDefinition=Ks.PropertyDefinition=Ks.Property=function(e,t,i){if(e.computed){i(e.key,t,"Expression")}if(e.value){i(e.value,t,"Expression")}};const Ys="ArrowFunctionExpression";const Qs="BinaryExpression";const Xs="BlockStatement";const Zs="CallExpression";const Js="ChainExpression";const en="ConditionalExpression";const tn="ExpressionStatement";const sn="Identifier";const nn="LogicalExpression";const rn="NewExpression";const on="Program";const an="Property";const ln="ReturnStatement";const cn="SequenceExpression";let un="sourceMa";un+="ppingURL";const hn="[ \\f\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]";const dn=new RegExp(`^#${hn}+${un}=.+`);const pn="_rollupAnnotations";const fn="_rollupRemoved";function handlePureAnnotationsOfNode(e,t,i=e.type){const{annotations:s,code:n}=t;let r=s[t.annotationIndex];while(r&&e.start>=r.end){markPureNode(e,r,n);r=s[++t.annotationIndex]}if(r&&r.end<=e.end){Ks[i](e,t,handlePureAnnotationsOfNode);while((r=s[t.annotationIndex])&&r.end<=e.end){++t.annotationIndex;annotateNode(e,r,false)}}}const mn=/[^\s(]/g;const gn=/\S/g;function markPureNode(e,t,i){const s=[];let n;const r=i.slice(t.end,e.start);if(doesNotMatchOutsideComment(r,mn)){const t=e.start;while(true){s.push(e);switch(e.type){case tn:case Js:{e=e.expression;continue}case cn:{if(doesNotMatchOutsideComment(i.slice(t,e.start),gn)){e=e.expressions[0];continue}n=true;break}case en:{if(doesNotMatchOutsideComment(i.slice(t,e.start),gn)){e=e.test;continue}n=true;break}case nn:case Qs:{if(doesNotMatchOutsideComment(i.slice(t,e.start),gn)){e=e.left;continue}n=true;break}case Zs:case rn:{break}default:{n=true}}break}}else{n=true}if(n){annotateNode(e,t,false)}else{for(const e of s){annotateNode(e,t,true)}}}function doesNotMatchOutsideComment(e,t){let i;while((i=t.exec(e))!==null){if(i[0]==="/"){const i=e.charCodeAt(t.lastIndex);if(i===42){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}else if(i===47){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}t.lastIndex=0;return false}return true}const yn=/[#@]__PURE__/;function addAnnotations(e,t,i){const s=[];const n=[];for(const t of e){if(yn.test(t.value)){s.push(t)}else if(dn.test(t.value)){n.push(t)}}for(const e of n){annotateNode(t,e,false)}handlePureAnnotationsOfNode(t,{annotationIndex:0,annotations:s,code:i})}function annotateNode(e,t,i){const s=i?pn:fn;const n=e[s];if(n){n.push(t)}else{e[s]=[t]}}const En={ImportExpression:["arguments"],Literal:[],Program:["body"]};function getAndCreateKeys(e){En[e.type]=Object.keys(e).filter((t=>typeof e[t]==="object"&&t.charCodeAt(0)!==95));return En[e.type]}const xn="variables";class NodeBase extends ExpressionEntity{constructor(e,t,i,s=false){super();this.deoptimized=false;this.esTreeNode=s?e:null;this.keys=En[e.type]||getAndCreateKeys(e);this.parent=t;this.context=t.context;this.createScope(i);this.parseNode(e);this.initialise();this.context.magicString.addSourcemapLocation(this.start);this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(Array.isArray(t)){for(const e of t){e?.bind()}}else if(t){t.bind()}}}createScope(e){this.scope=e}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();for(const t of this.keys){const i=this[t];if(i===null)continue;if(Array.isArray(i)){for(const t of i){if(t?.hasEffects(e))return true}}else if(i.hasEffects(e))return true}return false}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath(ri,this.assignmentInteraction,e)}include(e,t,i){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;for(const i of this.keys){const s=this[i];if(s===null)continue;if(Array.isArray(s)){for(const i of s){i?.include(e,t)}}else{s.include(e,t)}}}includeAsAssignmentTarget(e,t,i){this.include(e,t)}initialise(){}insertSemicolon(e){if(e.original[this.end-1]!==";"){e.appendLeft(this.end,";")}}parseNode(e,t){for(const[i,s]of Object.entries(e)){if(this.hasOwnProperty(i))continue;if(i.charCodeAt(0)===95){if(i===pn){this.annotations=s}else if(i===fn){for(const{start:e,end:t}of s)this.context.magicString.remove(e,t)}}else if(typeof s!=="object"||s===null){this[i]=s}else if(Array.isArray(s)){this[i]=[];for(const e of s){this[i].push(e===null?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope,t?.includes(i)))}}else{this[i]=new(this.context.getNodeConstructor(s.type))(s,this,this.scope,t?.includes(i))}}}render(e,t){for(const i of this.keys){const s=this[i];if(s===null)continue;if(Array.isArray(s)){for(const i of s){i?.render(e,t)}}else{s.render(e,t)}}}setAssignedValue(e){this.assignmentInteraction={args:[null,e],type:gi}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(createHasEffectsContext())}applyDeoptimizations(){this.deoptimized=true;for(const e of this.keys){const t=this[e];if(t===null)continue;if(Array.isArray(t)){for(const e of t){e?.deoptimizePath(oi)}}else{t.deoptimizePath(oi)}}this.context.requestTreeshakingPass()}}class SpreadElement extends NodeBase{deoptimizeArgumentsOnInteractionAtPath(e,t,i){if(t.length>0){this.argument.deoptimizeArgumentsOnInteractionAtPath(e,[ti,...t],i)}}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&(t==="always"||this.argument.hasEffectsOnInteractionAtPath(oi,Ei,e))}applyDeoptimizations(){this.deoptimized=true;this.argument.deoptimizePath([ti,ti]);this.context.requestTreeshakingPass()}}class Method extends ExpressionEntity{constructor(e){super();this.description=e}deoptimizeArgumentsOnInteractionAtPath({args:e,type:t},i){if(t===yi&&i.length===0&&this.description.mutatesSelfAsArray){e[0]?.deoptimizePath(li)}}getReturnExpressionWhenCalledAtPath(e,{args:t}){if(e.length>0){return fi}return[this.description.returnsPrimitive||(this.description.returns==="self"?t[0]||pi:this.description.returns()),false]}hasEffectsOnInteractionAtPath(e,t,i){const{type:s}=t;if(e.length>(s===mi?1:0)){return true}if(s===yi){const{args:e}=t;if(this.description.mutatesSelfAsArray===true&&e[0]?.hasEffectsOnInteractionAtPath(li,xi,i)){return true}if(this.description.callsArgs){for(const t of this.description.callsArgs){if(e[t+1]?.hasEffectsOnInteractionAtPath(ri,bi,i)){return true}}}}return false}}const bn=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:Ms})];const vn=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:Vs})];const Sn=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:Bs})];const An=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:pi})];const wn=/^\d+$/;class ObjectEntity extends ExpressionEntity{constructor(e,t,i=false){super();this.prototypeExpression=t;this.immutable=i;this.additionalExpressionsToBeDeoptimized=new Set;this.allProperties=[];this.deoptimizedPaths=Object.create(null);this.expressionsToBeDeoptimizedByKey=Object.create(null);this.gettersByKey=Object.create(null);this.hasLostTrack=false;this.hasUnknownDeoptimizedInteger=false;this.hasUnknownDeoptimizedProperty=false;this.propertiesAndGettersByKey=Object.create(null);this.propertiesAndSettersByKey=Object.create(null);this.settersByKey=Object.create(null);this.unknownIntegerProps=[];this.unmatchableGetters=[];this.unmatchablePropertiesAndGetters=[];this.unmatchableSetters=[];if(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=true}else{this.hasLostTrack=true}if(t){return}for(const e of[...Object.values(this.propertiesAndGettersByKey),...Object.values(this.settersByKey)]){for(const t of e){t.deoptimizePath(oi)}}this.prototypeExpression?.deoptimizePath([ti,ti]);this.deoptimizeCachedEntities()}deoptimizeArgumentsOnInteractionAtPath(e,t,i){const[s,...n]=t;const{args:r,type:o}=e;if(this.hasLostTrack||(o===yi||t.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof s==="string"&&this.deoptimizedPaths[s])){deoptimizeInteraction(e);return}const[l,c,u]=o===yi||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:o===mi?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof s==="string"){if(l[s]){const t=c[s];if(t){for(const s of t){s.deoptimizeArgumentsOnInteractionAtPath(e,n,i)}}if(!this.immutable){for(const e of r){if(e){this.additionalExpressionsToBeDeoptimized.add(e)}}}return}for(const t of u){t.deoptimizeArgumentsOnInteractionAtPath(e,n,i)}if(wn.test(s)){for(const t of this.unknownIntegerProps){t.deoptimizeArgumentsOnInteractionAtPath(e,n,i)}}}else{for(const t of[...Object.values(c),u]){for(const s of t){s.deoptimizeArgumentsOnInteractionAtPath(e,n,i)}}for(const t of this.unknownIntegerProps){t.deoptimizeArgumentsOnInteractionAtPath(e,n,i)}}if(!this.immutable){for(const e of r){if(e){this.additionalExpressionsToBeDeoptimized.add(e)}}}this.prototypeExpression?.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizeIntegerProperties(){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger){return}this.hasUnknownDeoptimizedInteger=true;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey)){if(wn.test(e)){for(const e of t){e.deoptimizePath(oi)}}}this.deoptimizeCachedIntegerEntities()}deoptimizePath(e){if(this.hasLostTrack||this.immutable){return}const t=e[0];if(e.length===1){if(typeof t!=="string"){if(t===si){return this.deoptimizeIntegerProperties()}return this.deoptimizeAllProperties(t===ii)}if(!this.deoptimizedPaths[t]){this.deoptimizedPaths[t]=true;const e=this.expressionsToBeDeoptimizedByKey[t];if(e){for(const t of e){t.deoptimizeCache()}}}}const i=e.length===1?oi:e.slice(1);for(const e of typeof t==="string"?[...this.propertiesAndGettersByKey[t]||this.unmatchablePropertiesAndGetters,...this.settersByKey[t]||this.unmatchableSetters]:this.allProperties){e.deoptimizePath(i)}this.prototypeExpression?.deoptimizePath(e.length===1?[...e,ti]:e)}getLiteralValueAtPath(e,t,i){if(e.length===0){return di}const s=e[0];const n=this.getMemberExpressionAndTrackDeopt(s,i);if(n){return n.getLiteralValueAtPath(e.slice(1),t,i)}if(this.prototypeExpression){return this.prototypeExpression.getLiteralValueAtPath(e,t,i)}if(e.length===1){return undefined}return hi}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(e.length===0){return fi}const[n,...r]=e;const o=this.getMemberExpressionAndTrackDeopt(n,s);if(o){return o.getReturnExpressionWhenCalledAtPath(r,t,i,s)}if(this.prototypeExpression){return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,i,s)}return fi}hasEffectsOnInteractionAtPath(e,t,i){const[s,...n]=e;if(n.length>0||t.type===yi){const r=this.getMemberExpression(s);if(r){return r.hasEffectsOnInteractionAtPath(n,t,i)}if(this.prototypeExpression){return this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,i)}return true}if(s===ii)return false;if(this.hasLostTrack)return true;const[r,o,l]=t.type===mi?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof s==="string"){if(r[s]){const e=o[s];if(e){for(const s of e){if(s.hasEffectsOnInteractionAtPath(n,t,i))return true}}return false}for(const e of l){if(e.hasEffectsOnInteractionAtPath(n,t,i)){return true}}}else{for(const e of[...Object.values(o),l]){for(const s of e){if(s.hasEffectsOnInteractionAtPath(n,t,i))return true}}}if(this.prototypeExpression){return this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,i)}return false}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:i,propertiesAndSettersByKey:s,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:l,unmatchableGetters:c,unmatchableSetters:u}=this;const h=[];for(let d=e.length-1;d>=0;d--){const{key:p,kind:f,property:m}=e[d];t.push(m);if(typeof p==="string"){if(f==="set"){if(!s[p]){s[p]=[m,...h];n[p]=[m,...u]}}else if(f==="get"){if(!i[p]){i[p]=[m,...l];r[p]=[m,...c]}}else{if(!s[p]){s[p]=[m,...h]}if(!i[p]){i[p]=[m,...l]}}}else{if(p===si){o.push(m);continue}if(f==="set")u.push(m);if(f==="get")c.push(m);if(f!=="get")h.push(m);if(f!=="set")l.push(m)}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey)){for(const t of e){t.deoptimizeCache()}}for(const e of this.additionalExpressionsToBeDeoptimized){e.deoptimizePath(oi)}}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey)){if(wn.test(e)){for(const e of t){e.deoptimizeCache()}}}for(const e of this.additionalExpressionsToBeDeoptimized){e.deoptimizePath(li)}}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof e!=="string"||this.hasUnknownDeoptimizedInteger&&wn.test(e)||this.deoptimizedPaths[e]){return pi}const t=this.propertiesAndGettersByKey[e];if(t?.length===1){return t[0]}if(t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length>0&&wn.test(e)){return pi}return null}getMemberExpressionAndTrackDeopt(e,t){if(typeof e!=="string"){return pi}const i=this.getMemberExpression(e);if(!(i===pi||this.immutable)){const i=this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[];i.push(t)}return i}}const isInteger=e=>typeof e==="string"&&/^\d+$/.test(e);const In=new class ObjectPrototypeFallbackExpression extends ExpressionEntity{deoptimizeArgumentsOnInteractionAtPath(e,t){if(e.type===yi&&t.length===1&&!isInteger(t[0])){deoptimizeInteraction(e)}}getLiteralValueAtPath(e){return e.length===1&&isInteger(e[0])?undefined:hi}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t===yi}};const kn=new ObjectEntity({__proto__:null,hasOwnProperty:bn,isPrototypeOf:bn,propertyIsEnumerable:bn,toLocaleString:vn,toString:vn,valueOf:An},In,true);const Cn=[{key:si,kind:"init",property:pi},{key:"length",kind:"init",property:Bs}];const _n=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Ms})];const Pn=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:Bs})];const Nn=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:()=>new ObjectEntity(Cn,Fn),returnsPrimitive:null})];const Rn=[new Method({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new ObjectEntity(Cn,Fn),returnsPrimitive:null})];const $n=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new ObjectEntity(Cn,Fn),returnsPrimitive:null})];const On=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:null,returnsPrimitive:Bs})];const Tn=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:null,returnsPrimitive:pi})];const Dn=[new Method({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:pi})];const Mn=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:pi})];const Ln=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:"self",returnsPrimitive:null})];const Bn=[new Method({callsArgs:[0],mutatesSelfAsArray:true,returns:"self",returnsPrimitive:null})];const Fn=new ObjectEntity({__proto__:null,at:Dn,concat:Rn,copyWithin:Ln,entries:Rn,every:_n,fill:Ln,filter:$n,find:Mn,findIndex:Pn,findLast:Mn,findLastIndex:Pn,flat:Rn,flatMap:$n,forEach:Mn,includes:bn,indexOf:Sn,join:vn,keys:An,lastIndexOf:Sn,map:$n,pop:Tn,push:On,reduce:Mn,reduceRight:Mn,reverse:Ln,shift:Tn,slice:Rn,some:_n,sort:Bn,splice:Nn,toLocaleString:vn,toString:vn,unshift:On,values:Dn},kn,true);class ArrayExpression extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){this.deoptimized=true;let e=false;for(let t=0;t<this.elements.length;t++){const i=this.elements[t];if(i&&(e||i instanceof SpreadElement)){e=true;i.deoptimizePath(oi)}}this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}const e=[{key:"length",kind:"init",property:Bs}];let t=false;for(let i=0;i<this.elements.length;i++){const s=this.elements[i];if(t||s instanceof SpreadElement){if(s){t=true;e.unshift({key:si,kind:"init",property:s})}}else if(s){e.push({key:String(i),kind:"init",property:s})}else{e.push({key:String(i),kind:"init",property:Ts})}}return this.objectEntity=new ObjectEntity(e,Fn)}}class ArrayPattern extends NodeBase{addExportedVariables(e,t){for(const i of this.elements){i?.addExportedVariables(e,t)}}declare(e){const t=[];for(const i of this.elements){if(i!==null){t.push(...i.declare(e,pi))}}return t}deoptimizePath(){for(const e of this.elements){e?.deoptimizePath(ri)}}hasEffectsOnInteractionAtPath(e,t,i){for(const e of this.elements){if(e?.hasEffectsOnInteractionAtPath(ri,t,i))return true}return false}markDeclarationReached(){for(const e of this.elements){e?.markDeclarationReached()}}}class LocalVariable extends Variable{constructor(e,t,i,s){super(e);this.init=i;this.calledFromTryStatement=false;this.additionalInitializers=null;this.expressionsToBeDeoptimized=[];this.declarations=t?[t]:[];this.deoptimizationTracker=s.deoptimizationTracker;this.module=s.module}addDeclaration(e,t){this.declarations.push(e);this.markInitializersForDeoptimization().push(t)}consolidateInitializers(){if(this.additionalInitializers){for(const e of this.additionalInitializers){e.deoptimizePath(oi)}this.additionalInitializers=null}}deoptimizeArgumentsOnInteractionAtPath(e,t,i){if(this.isReassigned){deoptimizeInteraction(e);return}i.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeArgumentsOnInteractionAtPath(e,t,i)),undefined)}deoptimizePath(e){if(this.isReassigned||this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}if(e.length===0){if(!this.isReassigned){this.isReassigned=true;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=Y;for(const t of e){t.deoptimizeCache()}this.init.deoptimizePath(oi)}}else{this.init.deoptimizePath(e)}}getLiteralValueAtPath(e,t,i){if(this.isReassigned){return hi}return t.withTrackedEntityAtPath(e,this.init,(()=>{this.expressionsToBeDeoptimized.push(i);return this.init.getLiteralValueAtPath(e,t,i)}),hi)}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(this.isReassigned){return fi}return i.withTrackedEntityAtPath(e,this.init,(()=>{this.expressionsToBeDeoptimized.push(s);return this.init.getReturnExpressionWhenCalledAtPath(e,t,i,s)}),fi)}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case mi:{if(this.isReassigned)return true;return!i.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i)}case gi:{if(this.included)return true;if(e.length===0)return false;if(this.isReassigned)return true;return!i.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i)}case yi:{if(this.isReassigned)return true;return!(t.withNew?i.instantiated:i.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i)}}}include(){if(!this.included){this.included=true;for(const e of this.declarations){if(!e.included)e.include(createInclusionContext(),false);let t=e.parent;while(!t.included){t.included=true;if(t.type===on)break;t=t.parent}}}}includeCallArguments(e,t){if(this.isReassigned||e.includedCallArguments.has(this.init)){for(const i of t){i.include(e,false)}}else{e.includedCallArguments.add(this.init);this.init.includeCallArguments(e,t);e.includedCallArguments.delete(this.init)}}markCalledFromTryStatement(){this.calledFromTryStatement=true}markInitializersForDeoptimization(){if(this.additionalInitializers===null){this.additionalInitializers=[this.init];this.init=pi;this.isReassigned=true}return this.additionalInitializers}mergeDeclarations(e){const{declarations:t}=this;for(const i of e.declarations){t.push(i)}const i=this.markInitializersForDeoptimization();i.push(e.init);if(e.additionalInitializers){for(const t of e.additionalInitializers){i.push(t)}}}}const Vn=20;const zn=Y;const jn=new Set([ti]);const Un=new PathTracker;const Hn=new Set([pi]);class ParameterVariable extends LocalVariable{constructor(e,t,i){super(e,t,pi,i);this.deoptimizationInteractions=[];this.deoptimizations=new PathTracker;this.deoptimizedFields=new Set;this.entitiesToBeDeoptimized=new Set}addEntityToBeDeoptimized(e){if(e===pi){if(!this.entitiesToBeDeoptimized.has(pi)){this.entitiesToBeDeoptimized.add(pi);for(const{interaction:e}of this.deoptimizationInteractions){deoptimizeInteraction(e)}this.deoptimizationInteractions=zn}}else if(this.deoptimizedFields.has(ti)){e.deoptimizePath(oi)}else if(!this.entitiesToBeDeoptimized.has(e)){this.entitiesToBeDeoptimized.add(e);for(const t of this.deoptimizedFields){e.deoptimizePath([t])}for(const{interaction:t,path:i}of this.deoptimizationInteractions){e.deoptimizeArgumentsOnInteractionAtPath(t,i,ui)}}}deoptimizeArgumentsOnInteractionAtPath(e,t){if(t.length>=2||this.entitiesToBeDeoptimized.has(pi)||this.deoptimizationInteractions.length>=Vn||t.length===1&&(this.deoptimizedFields.has(ti)||e.type===yi&&this.deoptimizedFields.has(t[0]))){deoptimizeInteraction(e);return}if(!this.deoptimizations.trackEntityAtPathAndGetIfTracked(t,e.args)){for(const i of this.entitiesToBeDeoptimized){i.deoptimizeArgumentsOnInteractionAtPath(e,t,ui)}if(!this.entitiesToBeDeoptimized.has(pi)){this.deoptimizationInteractions.push({interaction:e,path:t})}}}deoptimizePath(e){if(e.length===0||this.deoptimizedFields.has(ti)){return}const t=e[0];if(this.deoptimizedFields.has(t)){return}this.deoptimizedFields.add(t);for(const t of this.entitiesToBeDeoptimized){t.deoptimizePath(e)}if(t===ti){this.deoptimizationInteractions=zn;this.deoptimizations=Un;this.deoptimizedFields=jn;this.entitiesToBeDeoptimized=Hn}}getReturnExpressionWhenCalledAtPath(e){if(e.length===0){this.deoptimizePath(oi)}else if(!this.deoptimizedFields.has(e[0])){this.deoptimizePath([e[0]])}return fi}}const Gn="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";const Wn=64;function toBase64(e){let t="";do{const i=e%Wn;e=e/Wn|0;t=Gn[i]+t}while(e!==0);return t}function getSafeName(e,t,i){let s=e;let n=1;while(t.has(s)||Si.has(s)||i?.has(s)){s=`${e}$${toBase64(n++)}`}t.add(s);return s}let qn=class Scope{constructor(){this.children=[];this.variables=new Map}addDeclaration(e,t,i,s){const n=e.name;let r=this.variables.get(n);if(r){r.addDeclaration(e,i)}else{r=new LocalVariable(e.name,e,i||Ts,t);this.variables.set(n,r)}return r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}};class ChildScope extends qn{constructor(e){super();this.accessedOutsideVariables=new Map;this.parent=e;e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e);if(this.parent instanceof ChildScope){this.parent.addAccessedDynamicImport(e)}}addAccessedGlobals(e,t){const i=t.get(this)||new Set;for(const t of e){i.add(t)}t.set(this,i);if(this.parent instanceof ChildScope){this.parent.addAccessedGlobals(e,t)}}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t);this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof ChildScope&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,i,s){for(const s of this.accessedOutsideVariables.values()){if(s.included){e.add(s.getBaseVariableName());if(t==="system"&&i.has(s)){e.add("exports")}}}const n=s.get(this);if(n){for(const t of n){e.add(t)}}}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,i){const s=new Set;this.addUsedOutsideNames(s,e,t,i);if(this.accessedDynamicImports){for(const e of this.accessedDynamicImports){if(e.inlineNamespace){s.add(e.inlineNamespace.getBaseVariableName())}}}for(const[e,t]of this.variables){if(t.included||t.alwaysRendered){t.setRenderNames(null,getSafeName(e,s,t.forbiddenNames))}}for(const s of this.children){s.deconflict(e,t,i)}}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t){return t}const i=this.parent.findVariable(e);this.accessedOutsideVariables.set(e,i);return i}}class ParameterScope extends ChildScope{constructor(e,t){super(e);this.parameters=[];this.hasRest=false;this.context=t;this.hoistedBodyVarScope=new ChildScope(this)}addParameterDeclaration(e){const{name:t}=e;const i=new ParameterVariable(t,e,this.context);const s=this.hoistedBodyVarScope.variables.get(t);if(s){this.hoistedBodyVarScope.variables.set(t,i);i.mergeDeclarations(s)}this.variables.set(t,i);return i}addParameterVariables(e,t){this.parameters=e;for(const t of e){for(const e of t){e.alwaysRendered=true}}this.hasRest=t}includeCallArguments(e,t){let i=false;let s=false;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const i of t){if(i instanceof SpreadElement){for(const i of t){i.include(e,false)}break}}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n;const l=t[r];if(o){i=false;if(o.length===0){s=true}else{for(const e of o){if(e.included){s=true}if(e.calledFromTryStatement){i=true}}}}if(!s&&l.shouldBeIncluded(e)){s=true}if(s){l.include(e,i)}}}}class ReturnValueScope extends ParameterScope{constructor(){super(...arguments);this.returnExpression=null;this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){if(this.returnExpression===null)this.updateReturnExpression();return this.returnExpression}updateReturnExpression(){if(this.returnExpressions.length===1){this.returnExpression=this.returnExpressions[0]}else{this.returnExpression=pi;for(const e of this.returnExpressions){e.deoptimizePath(oi)}}}}function is_reference(e,t){if(e.type==="MemberExpression"){return!e.computed&&is_reference(e.object,e)}if(e.type==="Identifier"){if(!t)return true;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return false;default:return true}}return false}const Kn=Symbol("PureFunction");const getPureFunctions=({treeshake:e})=>{const t=Object.create(null);for(const i of e?e.manualPureFunctions:[]){let e=t;for(const t of i.split(".")){e=e[t]||(e[t]=Object.create(null))}e[Kn]=true}return t};const doNothing=()=>{};const Yn=Symbol("Value Properties");const getTruthyLiteralValue=()=>di;const returnFalse=()=>false;const returnTrue=()=>true;const Qn={deoptimizeArgumentsOnCall:doNothing,getLiteralValue:getTruthyLiteralValue,hasEffectsWhenCalled:returnFalse};const Xn={deoptimizeArgumentsOnCall:doNothing,getLiteralValue:getTruthyLiteralValue,hasEffectsWhenCalled:returnTrue};const Zn={deoptimizeArgumentsOnCall:doNothing,getLiteralValue:getTruthyLiteralValue,hasEffectsWhenCalled({args:e}){return e.length>1&&!(e[1]instanceof ArrayExpression)}};const Jn={__proto__:null,[Yn]:Xn};const er={__proto__:null,[Yn]:Qn};const tr={__proto__:null,[Yn]:{deoptimizeArgumentsOnCall({args:[,e]}){e?.deoptimizePath(oi)},getLiteralValue:getTruthyLiteralValue,hasEffectsWhenCalled({args:e},t){return e.length<=1||e[1].hasEffectsOnInteractionAtPath(ai,xi,t)}}};const ir={__proto__:null,[Yn]:Xn,prototype:Jn};const sr={__proto__:null,[Yn]:Qn,prototype:Jn};const nr={__proto__:null,[Yn]:Zn,prototype:Jn};const rr={__proto__:null,[Yn]:Qn,from:Jn,of:er,prototype:Jn};const or={__proto__:null,[Yn]:Qn,supportedLocalesOf:sr};const ar={global:Jn,globalThis:Jn,self:Jn,window:Jn,__proto__:null,[Yn]:Xn,Array:{__proto__:null,[Yn]:Xn,from:Jn,isArray:er,of:er,prototype:Jn},ArrayBuffer:{__proto__:null,[Yn]:Qn,isView:er,prototype:Jn},Atomics:Jn,BigInt:ir,BigInt64Array:ir,BigUint64Array:ir,Boolean:sr,constructor:ir,DataView:sr,Date:{__proto__:null,[Yn]:Qn,now:er,parse:er,prototype:Jn,UTC:er},decodeURI:er,decodeURIComponent:er,encodeURI:er,encodeURIComponent:er,Error:sr,escape:er,eval:Jn,EvalError:sr,Float32Array:rr,Float64Array:rr,Function:ir,hasOwnProperty:Jn,Infinity:Jn,Int16Array:rr,Int32Array:rr,Int8Array:rr,isFinite:er,isNaN:er,isPrototypeOf:Jn,JSON:Jn,Map:nr,Math:{__proto__:null,[Yn]:Xn,abs:er,acos:er,acosh:er,asin:er,asinh:er,atan:er,atan2:er,atanh:er,cbrt:er,ceil:er,clz32:er,cos:er,cosh:er,exp:er,expm1:er,floor:er,fround:er,hypot:er,imul:er,log:er,log10:er,log1p:er,log2:er,max:er,min:er,pow:er,random:er,round:er,sign:er,sin:er,sinh:er,sqrt:er,tan:er,tanh:er,trunc:er},NaN:Jn,Number:{__proto__:null,[Yn]:Qn,isFinite:er,isInteger:er,isNaN:er,isSafeInteger:er,parseFloat:er,parseInt:er,prototype:Jn},Object:{__proto__:null,[Yn]:Qn,create:er,defineProperty:tr,defineProperties:tr,freeze:tr,getOwnPropertyDescriptor:er,getOwnPropertyDescriptors:er,getOwnPropertyNames:er,getOwnPropertySymbols:er,getPrototypeOf:er,hasOwn:er,is:er,isExtensible:er,isFrozen:er,isSealed:er,keys:er,fromEntries:Jn,entries:er,prototype:Jn},parseFloat:er,parseInt:er,Promise:{__proto__:null,[Yn]:Xn,all:Jn,allSettled:Jn,any:Jn,prototype:Jn,race:Jn,reject:Jn,resolve:Jn},propertyIsEnumerable:Jn,Proxy:Jn,RangeError:sr,ReferenceError:sr,Reflect:Jn,RegExp:sr,Set:nr,SharedArrayBuffer:ir,String:{__proto__:null,[Yn]:Qn,fromCharCode:er,fromCodePoint:er,prototype:Jn,raw:er},Symbol:{__proto__:null,[Yn]:Qn,for:er,keyFor:er,prototype:Jn,toStringTag:{__proto__:null,[Yn]:{deoptimizeArgumentsOnCall:doNothing,getLiteralValue(){return ni},hasEffectsWhenCalled:returnTrue}}},SyntaxError:sr,toLocaleString:Jn,toString:Jn,TypeError:sr,Uint16Array:rr,Uint32Array:rr,Uint8Array:rr,Uint8ClampedArray:rr,unescape:er,URIError:sr,valueOf:Jn,WeakMap:nr,WeakSet:nr,clearInterval:ir,clearTimeout:ir,console:{__proto__:null,[Yn]:Xn,assert:ir,clear:ir,count:ir,countReset:ir,debug:ir,dir:ir,dirxml:ir,error:ir,exception:ir,group:ir,groupCollapsed:ir,groupEnd:ir,info:ir,log:ir,table:ir,time:ir,timeEnd:ir,timeLog:ir,trace:ir,warn:ir},Intl:{__proto__:null,[Yn]:Xn,Collator:or,DateTimeFormat:or,ListFormat:or,NumberFormat:or,PluralRules:or,RelativeTimeFormat:or},setInterval:ir,setTimeout:ir,TextDecoder:ir,TextEncoder:ir,URL:ir,URLSearchParams:ir,AbortController:ir,AbortSignal:ir,addEventListener:Jn,alert:Jn,AnalyserNode:ir,Animation:ir,AnimationEvent:ir,applicationCache:Jn,ApplicationCache:ir,ApplicationCacheErrorEvent:ir,atob:Jn,Attr:ir,Audio:ir,AudioBuffer:ir,AudioBufferSourceNode:ir,AudioContext:ir,AudioDestinationNode:ir,AudioListener:ir,AudioNode:ir,AudioParam:ir,AudioProcessingEvent:ir,AudioScheduledSourceNode:ir,AudioWorkletNode:ir,BarProp:ir,BaseAudioContext:ir,BatteryManager:ir,BeforeUnloadEvent:ir,BiquadFilterNode:ir,Blob:ir,BlobEvent:ir,blur:Jn,BroadcastChannel:ir,btoa:Jn,ByteLengthQueuingStrategy:ir,Cache:ir,caches:Jn,CacheStorage:ir,cancelAnimationFrame:Jn,cancelIdleCallback:Jn,CanvasCaptureMediaStreamTrack:ir,CanvasGradient:ir,CanvasPattern:ir,CanvasRenderingContext2D:ir,ChannelMergerNode:ir,ChannelSplitterNode:ir,CharacterData:ir,clientInformation:Jn,ClipboardEvent:ir,close:Jn,closed:Jn,CloseEvent:ir,Comment:ir,CompositionEvent:ir,confirm:Jn,ConstantSourceNode:ir,ConvolverNode:ir,CountQueuingStrategy:ir,createImageBitmap:Jn,Credential:ir,CredentialsContainer:ir,crypto:Jn,Crypto:ir,CryptoKey:ir,CSS:ir,CSSConditionRule:ir,CSSFontFaceRule:ir,CSSGroupingRule:ir,CSSImportRule:ir,CSSKeyframeRule:ir,CSSKeyframesRule:ir,CSSMediaRule:ir,CSSNamespaceRule:ir,CSSPageRule:ir,CSSRule:ir,CSSRuleList:ir,CSSStyleDeclaration:ir,CSSStyleRule:ir,CSSStyleSheet:ir,CSSSupportsRule:ir,CustomElementRegistry:ir,customElements:Jn,CustomEvent:ir,DataTransfer:ir,DataTransferItem:ir,DataTransferItemList:ir,defaultstatus:Jn,defaultStatus:Jn,DelayNode:ir,DeviceMotionEvent:ir,DeviceOrientationEvent:ir,devicePixelRatio:Jn,dispatchEvent:Jn,document:Jn,Document:ir,DocumentFragment:ir,DocumentType:ir,DOMError:ir,DOMException:ir,DOMImplementation:ir,DOMMatrix:ir,DOMMatrixReadOnly:ir,DOMParser:ir,DOMPoint:ir,DOMPointReadOnly:ir,DOMQuad:ir,DOMRect:ir,DOMRectReadOnly:ir,DOMStringList:ir,DOMStringMap:ir,DOMTokenList:ir,DragEvent:ir,DynamicsCompressorNode:ir,Element:ir,ErrorEvent:ir,Event:ir,EventSource:ir,EventTarget:ir,external:Jn,fetch:Jn,File:ir,FileList:ir,FileReader:ir,find:Jn,focus:Jn,FocusEvent:ir,FontFace:ir,FontFaceSetLoadEvent:ir,FormData:ir,frames:Jn,GainNode:ir,Gamepad:ir,GamepadButton:ir,GamepadEvent:ir,getComputedStyle:Jn,getSelection:Jn,HashChangeEvent:ir,Headers:ir,history:Jn,History:ir,HTMLAllCollection:ir,HTMLAnchorElement:ir,HTMLAreaElement:ir,HTMLAudioElement:ir,HTMLBaseElement:ir,HTMLBodyElement:ir,HTMLBRElement:ir,HTMLButtonElement:ir,HTMLCanvasElement:ir,HTMLCollection:ir,HTMLContentElement:ir,HTMLDataElement:ir,HTMLDataListElement:ir,HTMLDetailsElement:ir,HTMLDialogElement:ir,HTMLDirectoryElement:ir,HTMLDivElement:ir,HTMLDListElement:ir,HTMLDocument:ir,HTMLElement:ir,HTMLEmbedElement:ir,HTMLFieldSetElement:ir,HTMLFontElement:ir,HTMLFormControlsCollection:ir,HTMLFormElement:ir,HTMLFrameElement:ir,HTMLFrameSetElement:ir,HTMLHeadElement:ir,HTMLHeadingElement:ir,HTMLHRElement:ir,HTMLHtmlElement:ir,HTMLIFrameElement:ir,HTMLImageElement:ir,HTMLInputElement:ir,HTMLLabelElement:ir,HTMLLegendElement:ir,HTMLLIElement:ir,HTMLLinkElement:ir,HTMLMapElement:ir,HTMLMarqueeElement:ir,HTMLMediaElement:ir,HTMLMenuElement:ir,HTMLMetaElement:ir,HTMLMeterElement:ir,HTMLModElement:ir,HTMLObjectElement:ir,HTMLOListElement:ir,HTMLOptGroupElement:ir,HTMLOptionElement:ir,HTMLOptionsCollection:ir,HTMLOutputElement:ir,HTMLParagraphElement:ir,HTMLParamElement:ir,HTMLPictureElement:ir,HTMLPreElement:ir,HTMLProgressElement:ir,HTMLQuoteElement:ir,HTMLScriptElement:ir,HTMLSelectElement:ir,HTMLShadowElement:ir,HTMLSlotElement:ir,HTMLSourceElement:ir,HTMLSpanElement:ir,HTMLStyleElement:ir,HTMLTableCaptionElement:ir,HTMLTableCellElement:ir,HTMLTableColElement:ir,HTMLTableElement:ir,HTMLTableRowElement:ir,HTMLTableSectionElement:ir,HTMLTemplateElement:ir,HTMLTextAreaElement:ir,HTMLTimeElement:ir,HTMLTitleElement:ir,HTMLTrackElement:ir,HTMLUListElement:ir,HTMLUnknownElement:ir,HTMLVideoElement:ir,IDBCursor:ir,IDBCursorWithValue:ir,IDBDatabase:ir,IDBFactory:ir,IDBIndex:ir,IDBKeyRange:ir,IDBObjectStore:ir,IDBOpenDBRequest:ir,IDBRequest:ir,IDBTransaction:ir,IDBVersionChangeEvent:ir,IdleDeadline:ir,IIRFilterNode:ir,Image:ir,ImageBitmap:ir,ImageBitmapRenderingContext:ir,ImageCapture:ir,ImageData:ir,indexedDB:Jn,innerHeight:Jn,innerWidth:Jn,InputEvent:ir,IntersectionObserver:ir,IntersectionObserverEntry:ir,isSecureContext:Jn,KeyboardEvent:ir,KeyframeEffect:ir,length:Jn,localStorage:Jn,location:Jn,Location:ir,locationbar:Jn,matchMedia:Jn,MediaDeviceInfo:ir,MediaDevices:ir,MediaElementAudioSourceNode:ir,MediaEncryptedEvent:ir,MediaError:ir,MediaKeyMessageEvent:ir,MediaKeySession:ir,MediaKeyStatusMap:ir,MediaKeySystemAccess:ir,MediaList:ir,MediaQueryList:ir,MediaQueryListEvent:ir,MediaRecorder:ir,MediaSettingsRange:ir,MediaSource:ir,MediaStream:ir,MediaStreamAudioDestinationNode:ir,MediaStreamAudioSourceNode:ir,MediaStreamEvent:ir,MediaStreamTrack:ir,MediaStreamTrackEvent:ir,menubar:Jn,MessageChannel:ir,MessageEvent:ir,MessagePort:ir,MIDIAccess:ir,MIDIConnectionEvent:ir,MIDIInput:ir,MIDIInputMap:ir,MIDIMessageEvent:ir,MIDIOutput:ir,MIDIOutputMap:ir,MIDIPort:ir,MimeType:ir,MimeTypeArray:ir,MouseEvent:ir,moveBy:Jn,moveTo:Jn,MutationEvent:ir,MutationObserver:ir,MutationRecord:ir,name:Jn,NamedNodeMap:ir,NavigationPreloadManager:ir,navigator:Jn,Navigator:ir,NetworkInformation:ir,Node:ir,NodeFilter:Jn,NodeIterator:ir,NodeList:ir,Notification:ir,OfflineAudioCompletionEvent:ir,OfflineAudioContext:ir,offscreenBuffering:Jn,OffscreenCanvas:ir,open:Jn,openDatabase:Jn,Option:ir,origin:Jn,OscillatorNode:ir,outerHeight:Jn,outerWidth:Jn,PageTransitionEvent:ir,pageXOffset:Jn,pageYOffset:Jn,PannerNode:ir,parent:Jn,Path2D:ir,PaymentAddress:ir,PaymentRequest:ir,PaymentRequestUpdateEvent:ir,PaymentResponse:ir,performance:Jn,Performance:ir,PerformanceEntry:ir,PerformanceLongTaskTiming:ir,PerformanceMark:ir,PerformanceMeasure:ir,PerformanceNavigation:ir,PerformanceNavigationTiming:ir,PerformanceObserver:ir,PerformanceObserverEntryList:ir,PerformancePaintTiming:ir,PerformanceResourceTiming:ir,PerformanceTiming:ir,PeriodicWave:ir,Permissions:ir,PermissionStatus:ir,personalbar:Jn,PhotoCapabilities:ir,Plugin:ir,PluginArray:ir,PointerEvent:ir,PopStateEvent:ir,postMessage:Jn,Presentation:ir,PresentationAvailability:ir,PresentationConnection:ir,PresentationConnectionAvailableEvent:ir,PresentationConnectionCloseEvent:ir,PresentationConnectionList:ir,PresentationReceiver:ir,PresentationRequest:ir,print:Jn,ProcessingInstruction:ir,ProgressEvent:ir,PromiseRejectionEvent:ir,prompt:Jn,PushManager:ir,PushSubscription:ir,PushSubscriptionOptions:ir,queueMicrotask:Jn,RadioNodeList:ir,Range:ir,ReadableStream:ir,RemotePlayback:ir,removeEventListener:Jn,Request:ir,requestAnimationFrame:Jn,requestIdleCallback:Jn,resizeBy:Jn,ResizeObserver:ir,ResizeObserverEntry:ir,resizeTo:Jn,Response:ir,RTCCertificate:ir,RTCDataChannel:ir,RTCDataChannelEvent:ir,RTCDtlsTransport:ir,RTCIceCandidate:ir,RTCIceTransport:ir,RTCPeerConnection:ir,RTCPeerConnectionIceEvent:ir,RTCRtpReceiver:ir,RTCRtpSender:ir,RTCSctpTransport:ir,RTCSessionDescription:ir,RTCStatsReport:ir,RTCTrackEvent:ir,screen:Jn,Screen:ir,screenLeft:Jn,ScreenOrientation:ir,screenTop:Jn,screenX:Jn,screenY:Jn,ScriptProcessorNode:ir,scroll:Jn,scrollbars:Jn,scrollBy:Jn,scrollTo:Jn,scrollX:Jn,scrollY:Jn,SecurityPolicyViolationEvent:ir,Selection:ir,ServiceWorker:ir,ServiceWorkerContainer:ir,ServiceWorkerRegistration:ir,sessionStorage:Jn,ShadowRoot:ir,SharedWorker:ir,SourceBuffer:ir,SourceBufferList:ir,speechSynthesis:Jn,SpeechSynthesisEvent:ir,SpeechSynthesisUtterance:ir,StaticRange:ir,status:Jn,statusbar:Jn,StereoPannerNode:ir,stop:Jn,Storage:ir,StorageEvent:ir,StorageManager:ir,styleMedia:Jn,StyleSheet:ir,StyleSheetList:ir,SubtleCrypto:ir,SVGAElement:ir,SVGAngle:ir,SVGAnimatedAngle:ir,SVGAnimatedBoolean:ir,SVGAnimatedEnumeration:ir,SVGAnimatedInteger:ir,SVGAnimatedLength:ir,SVGAnimatedLengthList:ir,SVGAnimatedNumber:ir,SVGAnimatedNumberList:ir,SVGAnimatedPreserveAspectRatio:ir,SVGAnimatedRect:ir,SVGAnimatedString:ir,SVGAnimatedTransformList:ir,SVGAnimateElement:ir,SVGAnimateMotionElement:ir,SVGAnimateTransformElement:ir,SVGAnimationElement:ir,SVGCircleElement:ir,SVGClipPathElement:ir,SVGComponentTransferFunctionElement:ir,SVGDefsElement:ir,SVGDescElement:ir,SVGDiscardElement:ir,SVGElement:ir,SVGEllipseElement:ir,SVGFEBlendElement:ir,SVGFEColorMatrixElement:ir,SVGFEComponentTransferElement:ir,SVGFECompositeElement:ir,SVGFEConvolveMatrixElement:ir,SVGFEDiffuseLightingElement:ir,SVGFEDisplacementMapElement:ir,SVGFEDistantLightElement:ir,SVGFEDropShadowElement:ir,SVGFEFloodElement:ir,SVGFEFuncAElement:ir,SVGFEFuncBElement:ir,SVGFEFuncGElement:ir,SVGFEFuncRElement:ir,SVGFEGaussianBlurElement:ir,SVGFEImageElement:ir,SVGFEMergeElement:ir,SVGFEMergeNodeElement:ir,SVGFEMorphologyElement:ir,SVGFEOffsetElement:ir,SVGFEPointLightElement:ir,SVGFESpecularLightingElement:ir,SVGFESpotLightElement:ir,SVGFETileElement:ir,SVGFETurbulenceElement:ir,SVGFilterElement:ir,SVGForeignObjectElement:ir,SVGGElement:ir,SVGGeometryElement:ir,SVGGradientElement:ir,SVGGraphicsElement:ir,SVGImageElement:ir,SVGLength:ir,SVGLengthList:ir,SVGLinearGradientElement:ir,SVGLineElement:ir,SVGMarkerElement:ir,SVGMaskElement:ir,SVGMatrix:ir,SVGMetadataElement:ir,SVGMPathElement:ir,SVGNumber:ir,SVGNumberList:ir,SVGPathElement:ir,SVGPatternElement:ir,SVGPoint:ir,SVGPointList:ir,SVGPolygonElement:ir,SVGPolylineElement:ir,SVGPreserveAspectRatio:ir,SVGRadialGradientElement:ir,SVGRect:ir,SVGRectElement:ir,SVGScriptElement:ir,SVGSetElement:ir,SVGStopElement:ir,SVGStringList:ir,SVGStyleElement:ir,SVGSVGElement:ir,SVGSwitchElement:ir,SVGSymbolElement:ir,SVGTextContentElement:ir,SVGTextElement:ir,SVGTextPathElement:ir,SVGTextPositioningElement:ir,SVGTitleElement:ir,SVGTransform:ir,SVGTransformList:ir,SVGTSpanElement:ir,SVGUnitTypes:ir,SVGUseElement:ir,SVGViewElement:ir,TaskAttributionTiming:ir,Text:ir,TextEvent:ir,TextMetrics:ir,TextTrack:ir,TextTrackCue:ir,TextTrackCueList:ir,TextTrackList:ir,TimeRanges:ir,toolbar:Jn,top:Jn,Touch:ir,TouchEvent:ir,TouchList:ir,TrackEvent:ir,TransitionEvent:ir,TreeWalker:ir,UIEvent:ir,ValidityState:ir,visualViewport:Jn,VisualViewport:ir,VTTCue:ir,WaveShaperNode:ir,WebAssembly:Jn,WebGL2RenderingContext:ir,WebGLActiveInfo:ir,WebGLBuffer:ir,WebGLContextEvent:ir,WebGLFramebuffer:ir,WebGLProgram:ir,WebGLQuery:ir,WebGLRenderbuffer:ir,WebGLRenderingContext:ir,WebGLSampler:ir,WebGLShader:ir,WebGLShaderPrecisionFormat:ir,WebGLSync:ir,WebGLTexture:ir,WebGLTransformFeedback:ir,WebGLUniformLocation:ir,WebGLVertexArrayObject:ir,WebSocket:ir,WheelEvent:ir,Window:ir,Worker:ir,WritableStream:ir,XMLDocument:ir,XMLHttpRequest:ir,XMLHttpRequestEventTarget:ir,XMLHttpRequestUpload:ir,XMLSerializer:ir,XPathEvaluator:ir,XPathExpression:ir,XPathResult:ir,XSLTProcessor:ir};for(const e of["window","global","self","globalThis"]){ar[e]=ar}function getGlobalAtPath(e){let t=ar;for(const i of e){if(typeof i!=="string"){return null}t=t[i];if(!t){return null}}return t[Yn]}class GlobalVariable extends Variable{constructor(){super(...arguments);this.isReassigned=true}deoptimizeArgumentsOnInteractionAtPath(e,t,i){switch(e.type){case mi:case gi:{if(!getGlobalAtPath([this.name,...t].slice(0,-1))){super.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}return}case yi:{const s=getGlobalAtPath([this.name,...t]);if(s){s.deoptimizeArgumentsOnCall(e)}else{super.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}return}}}getLiteralValueAtPath(e,t,i){const s=getGlobalAtPath([this.name,...e]);return s?s.getLiteralValue():hi}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case mi:{if(e.length===0){return this.name!=="undefined"&&!getGlobalAtPath([this.name])}return!getGlobalAtPath([this.name,...e].slice(0,-1))}case gi:{return true}case yi:{const s=getGlobalAtPath([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,i)}}}}const lr={__proto__:null,class:true,const:true,let:true,var:true};class Identifier extends NodeBase{constructor(){super(...arguments);this.variable=null;this.isTDZAccess=null}addExportedVariables(e,t){if(t.has(this.variable)){e.push(this.variable)}}bind(){if(!this.variable&&is_reference(this,this.parent)){this.variable=this.scope.findVariable(this.name);this.variable.addReference(this)}}declare(e,t){let i;const{treeshake:s}=this.context.options;switch(e){case"var":{i=this.scope.addDeclaration(this,this.context,t,true);if(s&&s.correctVarValueBeforeDeclaration){i.markInitializersForDeoptimization()}break}case"function":{i=this.scope.addDeclaration(this,this.context,t,false);break}case"let":case"const":case"class":{i=this.scope.addDeclaration(this,this.context,t,false);break}case"parameter":{i=this.scope.addParameterDeclaration(this);break}default:{throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}}i.kind=e;return[this.variable=i]}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizePath(e){if(e.length===0&&!this.scope.contains(this.name)){this.disallowImportReassignment()}this.variable?.deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const[n,r]=this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,i,s);return[n,r||this.isPureFunction(e)]}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();if(this.isPossibleTDZ()&&this.variable.kind!=="var"){return true}return this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof GlobalVariable&&!this.isPureFunction(ri)&&this.variable.hasEffectsOnInteractionAtPath(ri,Ei,e)}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case mi:{return this.variable!==null&&!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,i)}case gi:{return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,i)}case yi:{return!this.isPureFunction(e)&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,i)}}}include(){if(!this.deoptimized)this.applyDeoptimizations();if(!this.included){this.included=true;if(this.variable!==null){this.context.includeVariableInModule(this.variable)}}}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(this.isTDZAccess!==null)return this.isTDZAccess;if(!(this.variable instanceof LocalVariable&&this.variable.kind&&this.variable.kind in lr&&this.variable.module===this.context.module)){return this.isTDZAccess=false}let e;if(this.variable.declarations&&this.variable.declarations.length===1&&(e=this.variable.declarations[0])&&this.start<e.start&&closestParentFunctionOrProgram(this)===closestParentFunctionOrProgram(e)){return this.isTDZAccess=true}if(!this.variable.initReached){return this.isTDZAccess=true}return this.isTDZAccess=false}markDeclarationReached(){this.variable.initReached=true}render(e,{snippets:{getPropertyAccess:t},useOriginalName:i},{renderedParentType:s,isCalleeOfRenderedParent:n,isShorthandProperty:r}=q){if(this.variable){const o=this.variable.getName(t,i);if(o!==this.name){e.overwrite(this.start,this.end,o,{contentOnly:true,storeName:true});if(r){e.prependRight(this.start,`${this.name}: `)}}if(o==="eval"&&s===Zs&&n){e.appendRight(this.start,"0, ")}}}applyDeoptimizations(){this.deoptimized=true;if(this.variable instanceof LocalVariable){this.variable.consolidateInitializers();this.context.requestTreeshakingPass()}}disallowImportReassignment(){return this.context.error(errorIllegalImportReassignment(this.name,this.context.module.id),this.start)}getVariableRespectingTDZ(){if(this.isPossibleTDZ()){return pi}return this.variable}isPureFunction(e){let t=this.context.manualPureFunctions[this.name];for(const i of e){if(t){if(t[Kn]){return true}t=t[i]}else{return false}}return t?.[Kn]}}function closestParentFunctionOrProgram(e){while(e&&!/^Program|Function/.test(e.type)){e=e.parent}return e}function treeshakeNode(e,t,i,s){t.remove(i,s);if(e.annotations){for(const s of e.annotations){if(s.start<i){t.remove(s.start,s.end)}else{return}}}}function removeAnnotations(e,t){if(!e.annotations&&e.parent.type===tn){e=e.parent}if(e.annotations){for(const i of e.annotations){t.remove(i.start,i.end)}}}const cr={isNoStatement:true};function findFirstOccurrenceOutsideComment(e,t,i=0){let s,n;s=e.indexOf(t,i);while(true){i=e.indexOf("/",i);if(i===-1||i>=s)return s;n=e.charCodeAt(++i);++i;i=n===47?e.indexOf("\n",i)+1:e.indexOf("*/",i)+2;if(i>s){s=e.indexOf(t,i)}}}const ur=/\S/g;function findNonWhiteSpace(e,t){ur.lastIndex=t;const i=ur.exec(e);return i.index}function findFirstLineBreakOutsideComment(e){let t,i,s=0;t=e.indexOf("\n",s);while(true){s=e.indexOf("/",s);if(s===-1||s>t)return[t,t+1];i=e.charCodeAt(s+1);if(i===47)return[s,t+1];s=e.indexOf("*/",s+3)+2;if(s>t){t=e.indexOf("\n",s)}}}function renderStatementList(e,t,i,s,n){let r,o,l,c;let u=e[0];let h=!u.included||u.needsBoundaries;if(h){c=i+findFirstLineBreakOutsideComment(t.original.slice(i,u.start))[1]}for(let i=1;i<=e.length;i++){r=u;o=c;l=h;u=e[i];h=u===undefined?false:!u.included||u.needsBoundaries;if(l||h){c=r.end+findFirstLineBreakOutsideComment(t.original.slice(r.end,u===undefined?s:u.start))[1];if(r.included){l?r.render(t,n,{end:c,start:o}):r.render(t,n)}else{treeshakeNode(r,t,o,c)}}else{r.render(t,n)}}}function getCommaSeparatedNodesWithBoundaries(e,t,i,s){const n=[];let r,o,l,c;let u=i-1;for(const s of e){if(r!==undefined){u=r.end+findFirstOccurrenceOutsideComment(t.original.slice(r.end,s.start),",")}o=l=u+1+findFirstLineBreakOutsideComment(t.original.slice(u+1,s.start))[1];while(c=t.original.charCodeAt(o),c===32||c===9||c===10||c===13)o++;if(r!==undefined){n.push({contentEnd:l,end:o,node:r,separator:u,start:i})}r=s;i=o}n.push({contentEnd:s,end:s,node:r,separator:null,start:i});return n}function removeLineBreaks(e,t,i){while(true){const[s,n]=findFirstLineBreakOutsideComment(e.original.slice(t,i));if(s===-1){break}e.remove(t+s,t+=n)}}class BlockScope extends ChildScope{addDeclaration(e,t,i,s){if(s){const n=this.parent.addDeclaration(e,t,i,s);n.markInitializersForDeoptimization();return n}else{return super.addDeclaration(e,t,i,false)}}}class ExpressionStatement extends NodeBase{initialise(){if(this.directive&&this.directive!=="use strict"&&this.parent.type===on){this.context.warn(errorModuleLevelDirective(this.directive,this.context.module.id),this.start)}}render(e,t){super.render(e,t);if(this.included)this.insertSemicolon(e)}shouldBeIncluded(e){if(this.directive&&this.directive!=="use strict")return this.parent.type!==on;return super.shouldBeIncluded(e)}applyDeoptimizations(){}}class BlockStatement extends NodeBase{constructor(){super(...arguments);this.directlyIncluded=false}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];if(!e||e.type!==ln){this.scope.addReturnExpression(pi)}}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new BlockScope(e)}hasEffects(e){if(this.deoptimizeBody)return true;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return true}return false}include(e,t){if(!(this.deoptimizeBody&&this.directlyIncluded)){this.included=true;this.directlyIncluded=true;if(this.deoptimizeBody)t=true;for(const i of this.body){if(t||i.shouldBeIncluded(e))i.include(e,t)}}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof ExpressionStatement&&e.directive==="use asm"}render(e,t){if(this.body.length>0){renderStatementList(this.body,e,this.start+1,this.end-1,t)}else{super.render(e,t)}}}class RestElement extends NodeBase{constructor(){super(...arguments);this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){this.declarationInit=t;return this.argument.declare(e,pi)}deoptimizePath(e){e.length===0&&this.argument.deoptimizePath(ri)}hasEffectsOnInteractionAtPath(e,t,i){return e.length>0||this.argument.hasEffectsOnInteractionAtPath(ri,t,i)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=true;if(this.declarationInit!==null){this.declarationInit.deoptimizePath([ti,ti]);this.context.requestTreeshakingPass()}}}class FunctionBase extends NodeBase{constructor(){super(...arguments);this.objectEntity=null;this.deoptimizedReturn=false}deoptimizeArgumentsOnInteractionAtPath(e,t,i){if(e.type===yi){const{parameters:t}=this.scope;const{args:i}=e;let s=false;for(let e=0;e<i.length-1;e++){const n=this.params[e];const r=i[e+1];if(s||n instanceof RestElement){s=true;r.deoptimizePath(oi)}else if(n instanceof Identifier){t[e][0].addEntityToBeDeoptimized(r);this.addArgumentToBeDeoptimized(r)}else if(n){r.deoptimizePath(oi)}else{this.addArgumentToBeDeoptimized(r)}}}else{this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,i)}}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e);if(e.length===1&&e[0]===ti){this.scope.getReturnExpression().deoptimizePath(oi)}}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(e.length>0){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}if(this.async){if(!this.deoptimizedReturn){this.deoptimizedReturn=true;this.scope.getReturnExpression().deoptimizePath(oi);this.context.requestTreeshakingPass()}return fi}return[this.scope.getReturnExpression(),false]}hasEffectsOnInteractionAtPath(e,t,i){if(e.length>0||t.type!==yi){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake;const t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],bi,i)||e&&(e==="always"||t.hasEffectsOnInteractionAtPath(["then"],Ei,i))){return true}}for(const e of this.params){if(e.hasEffects(i))return true}return false}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;const{brokenFlow:i}=e;e.brokenFlow=false;this.body.include(e,t);e.brokenFlow=i}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",pi))),this.params[this.params.length-1]instanceof RestElement);if(this.body instanceof BlockStatement){this.body.addImplicitReturnExpressionToScope()}else{this.scope.addReturnExpression(this.body)}}parseNode(e){if(e.body.type===Xs){this.body=new BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)}super.parseNode(e)}addArgumentToBeDeoptimized(e){}applyDeoptimizations(){}}FunctionBase.prototype.preventChildBlockScope=true;class ArrowFunctionExpression extends FunctionBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new ReturnValueScope(e,this.context)}hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return false}hasEffectsOnInteractionAtPath(e,t,i){if(super.hasEffectsOnInteractionAtPath(e,t,i))return true;if(t.type===yi){const{ignore:e,brokenFlow:t}=i;i.ignore={breaks:false,continues:false,labels:new Set,returnYield:true,this:false};if(this.body.hasEffects(i))return true;i.ignore=e;i.brokenFlow=t}return false}include(e,t){super.include(e,t);for(const i of this.params){if(!(i instanceof Identifier)){i.include(e,t)}}}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}return this.objectEntity=new ObjectEntity([],kn)}}function getSystemExportStatement(e,{exportNamesByVariable:t,snippets:{_:i,getObject:s,getPropertyAccess:n}},r=""){if(e.length===1&&t.get(e[0]).length===1){const s=e[0];return`exports('${t.get(s)}',${i}${s.getName(n)}${r})`}else{const i=[];for(const s of e){for(const e of t.get(s)){i.push([e,s.getName(n)+r])}}return`exports(${s(i,{lineBreakIndent:null})})`}}function renderSystemExportExpression(e,t,i,s,{exportNamesByVariable:n,snippets:{_:r}}){s.prependRight(t,`exports('${n.get(e)}',${r}`);s.appendLeft(i,")")}function renderSystemExportFunction(e,t,i,s,n,r){const{_:o,getDirectReturnIifeLeft:l}=r.snippets;n.prependRight(t,l(["v"],`${getSystemExportStatement(e,r)},${o}v`,{needsArrowReturnParens:true,needsWrappedFunction:s}));n.appendLeft(i,")")}function renderSystemExportSequenceAfterExpression(e,t,i,s,n,r){const{_:o,getPropertyAccess:l}=r.snippets;n.appendLeft(i,`,${o}${getSystemExportStatement([e],r)},${o}${e.getName(l)}`);if(s){n.prependRight(t,"(");n.appendLeft(i,")")}}function renderSystemExportSequenceBeforeExpression(e,t,i,s,n,r,o){const{_:l}=r.snippets;n.prependRight(t,`${getSystemExportStatement([e],r,o)},${l}`);if(s){n.prependRight(t,"(");n.appendLeft(i,")")}}class ObjectPattern extends NodeBase{addExportedVariables(e,t){for(const i of this.properties){if(i.type===an){i.value.addExportedVariables(e,t)}else{i.argument.addExportedVariables(e,t)}}}declare(e,t){const i=[];for(const s of this.properties){i.push(...s.declare(e,t))}return i}deoptimizePath(e){if(e.length===0){for(const t of this.properties){t.deoptimizePath(e)}}}hasEffectsOnInteractionAtPath(e,t,i){for(const e of this.properties){if(e.hasEffectsOnInteractionAtPath(ri,t,i))return true}return false}markDeclarationReached(){for(const e of this.properties){e.markDeclarationReached()}}}class AssignmentExpression extends NodeBase{hasEffects(e){const{deoptimized:t,left:i,operator:s,right:n}=this;if(!t)this.applyDeoptimizations();return n.hasEffects(e)||i.hasEffectsAsAssignmentTarget(e,s!=="=")}hasEffectsOnInteractionAtPath(e,t,i){return this.right.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){const{deoptimized:i,left:s,right:n,operator:r}=this;if(!i)this.applyDeoptimizations();this.included=true;if(t||r!=="="||s.included||s.hasEffectsAsAssignmentTarget(createHasEffectsContext(),false)){s.includeAsAssignmentTarget(e,t,r!=="=")}n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:i,renderedParentType:s,renderedSurroundingElement:n}=q){const{left:r,right:o,start:l,end:c,parent:u}=this;if(r.included){r.render(e,t);o.render(e,t)}else{const c=findNonWhiteSpace(e.original,findFirstOccurrenceOutsideComment(e.original,"=",r.end)+1);e.remove(l,c);if(i){removeLineBreaks(e,c,o.start)}o.render(e,t,{renderedParentType:s||u.type,renderedSurroundingElement:n||u.type})}if(t.format==="system"){if(r instanceof Identifier){const i=r.variable;const s=t.exportNamesByVariable.get(i);if(s){if(s.length===1){renderSystemExportExpression(i,l,c,e,t)}else{renderSystemExportSequenceAfterExpression(i,l,c,u.type!==tn,e,t)}return}}else{const i=[];r.addExportedVariables(i,t.exportNamesByVariable);if(i.length>0){renderSystemExportFunction(i,l,c,n===tn,e,t);return}}}if(r.included&&r instanceof ObjectPattern&&(n===tn||n===Ys)){e.appendRight(l,"(");e.prependLeft(c,")")}}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath(ri);this.right.deoptimizePath(oi);this.context.requestTreeshakingPass()}}class AssignmentPattern extends NodeBase{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){e.length===0&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,i){return e.length>0||this.left.hasEffectsOnInteractionAtPath(ri,t,i)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:i}=q){this.left.render(e,t,{isShorthandProperty:i});this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath(ri);this.right.deoptimizePath(oi);this.context.requestTreeshakingPass()}}class ArgumentsVariable extends LocalVariable{constructor(e){super("arguments",null,pi,e);this.deoptimizedArguments=[]}addArgumentToBeDeoptimized(e){if(this.included){e.deoptimizePath(oi)}else{this.deoptimizedArguments.push(e)}}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==mi||e.length>1}include(){super.include();for(const e of this.deoptimizedArguments){e.deoptimizePath(oi)}this.deoptimizedArguments.length=0}}class ThisVariable extends ParameterVariable{constructor(e){super("this",null,e)}hasEffectsOnInteractionAtPath(e,t,i){return(i.replacedVariableInits.get(this)||pi).hasEffectsOnInteractionAtPath(e,t,i)}}class FunctionScope extends ReturnValueScope{constructor(e,t){super(e,t);this.variables.set("arguments",this.argumentsVariable=new ArgumentsVariable(t));this.variables.set("this",this.thisVariable=new ThisVariable(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){super.includeCallArguments(e,t);if(this.argumentsVariable.included){for(const i of t){if(!i.included){i.include(e,false)}}}}}class FunctionNode extends FunctionBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new FunctionScope(e,this.context);this.constructedEntity=new ObjectEntity(Object.create(null),kn);this.scope.thisVariable.addEntityToBeDeoptimized(this.constructedEntity)}deoptimizeArgumentsOnInteractionAtPath(e,t,i){super.deoptimizeArgumentsOnInteractionAtPath(e,t,i);if(e.type===yi&&t.length===0&&e.args[0]){this.scope.thisVariable.addEntityToBeDeoptimized(e.args[0])}}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return!!this.id?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){if(super.hasEffectsOnInteractionAtPath(e,t,i))return true;if(t.type===yi){const e=i.replacedVariableInits.get(this.scope.thisVariable);i.replacedVariableInits.set(this.scope.thisVariable,t.withNew?this.constructedEntity:pi);const{brokenFlow:s,ignore:n,replacedVariableInits:r}=i;i.ignore={breaks:false,continues:false,labels:new Set,returnYield:true,this:t.withNew};if(this.body.hasEffects(i))return true;i.brokenFlow=s;if(e){r.set(this.scope.thisVariable,e)}else{r.delete(this.scope.thisVariable)}i.ignore=n}return false}include(e,t){super.include(e,t);this.id?.include();const i=this.scope.argumentsVariable.included;for(const s of this.params){if(!(s instanceof Identifier)||i){s.include(e,t)}}}initialise(){super.initialise();this.id?.declare("function",this)}addArgumentToBeDeoptimized(e){this.scope.argumentsVariable.addArgumentToBeDeoptimized(e)}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}return this.objectEntity=new ObjectEntity([{key:"prototype",kind:"init",property:new ObjectEntity([],kn)}],kn)}}class AwaitExpression extends NodeBase{hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return true}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(!this.included){this.included=true;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof FunctionNode||e instanceof ArrowFunctionExpression)break e}while(e=e.parent);this.context.usesTopLevelAwait=true}}this.argument.include(e,t)}}const hr={"!=":(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 BinaryExpression extends NodeBase{deoptimizeCache(){}getLiteralValueAtPath(e,t,i){if(e.length>0)return hi;const s=this.left.getLiteralValueAtPath(ri,t,i);if(typeof s==="symbol")return hi;const n=this.right.getLiteralValueAtPath(ri,t,i);if(typeof n==="symbol")return hi;const r=hr[this.operator];if(!r)return hi;return r(s,n)}hasEffects(e){if(this.operator==="+"&&this.parent instanceof ExpressionStatement&&this.left.getLiteralValueAtPath(ri,ui,this)===""){return true}return super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==mi||e.length>1}render(e,t,{renderedSurroundingElement:i}=q){this.left.render(e,t,{renderedSurroundingElement:i});this.right.render(e,t)}}class BreakStatement extends NodeBase{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return true;e.includedLabels.add(this.label.name)}else{if(!e.ignore.breaks)return true;e.hasBreak=true}e.brokenFlow=true;return false}include(e){this.included=true;if(this.label){this.label.include();e.includedLabels.add(this.label.name)}else{e.hasBreak=true}e.brokenFlow=true}}function renderCallArguments(e,t,i){if(i.arguments.length>0){if(i.arguments[i.arguments.length-1].included){for(const s of i.arguments){s.render(e,t)}}else{let s=i.arguments.length-2;while(s>=0&&!i.arguments[s].included){s--}if(s>=0){for(let n=0;n<=s;n++){i.arguments[n].render(e,t)}e.remove(findFirstOccurrenceOutsideComment(e.original,",",i.arguments[s].end),i.end-1)}else{e.remove(findFirstOccurrenceOutsideComment(e.original,"(",i.callee.end)+1,i.end-1)}}}}class Literal extends NodeBase{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){if(e.length>0||this.value===null&&this.context.code.charCodeAt(this.start)!==110||typeof this.value==="bigint"||this.context.code.charCodeAt(this.start)===47){return hi}return this.value}getReturnExpressionWhenCalledAtPath(e){if(e.length!==1)return fi;return getMemberReturnExpressionWhenCalled(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case mi:{return e.length>(this.value===null?0:1)}case gi:{return true}case yi:{if(this.included&&this.value instanceof RegExp&&(this.value.global||this.value.sticky)){return true}return e.length!==1||hasMemberEffectWhenCalled(this.members,e[0],t,i)}}}initialise(){this.members=getLiteralMembersForValue(this.value)}parseNode(e){this.value=e.value;this.regex=e.regex;super.parseNode(e)}render(e){if(typeof this.value==="string"){e.indentExclusionRanges.push([this.start+1,this.end-1])}}}const dr=7;function getResolvablePropertyKey(e){return e.computed?getResolvableComputedPropertyKey(e.property):e.property.name}function getResolvableComputedPropertyKey(e){if(e instanceof Literal){return String(e.value)}return null}function getPathIfNotComputed(e){const t=e.propertyKey;const i=e.object;if(typeof t==="string"){if(i instanceof Identifier){return[{key:i.name,pos:i.start},{key:t,pos:e.property.start}]}if(i instanceof MemberExpression){const s=getPathIfNotComputed(i);return s&&[...s,{key:t,pos:e.property.start}]}}return null}function getStringFromPath(e){let t=e[0].key;for(let i=1;i<e.length;i++){t+="."+e[i].key}return t}class MemberExpression extends NodeBase{constructor(){super(...arguments);this.variable=null;this.assignmentDeoptimized=false;this.bound=false;this.expressionsToBeDeoptimized=[];this.isUndefined=false}bind(){this.bound=true;const e=getPathIfNotComputed(this);const t=e&&this.scope.findVariable(e[0].key);if(t?.isNamespace){const i=resolveNamespaceVariables(t,e.slice(1),this.context);if(!i){super.bind()}else if(i==="undefined"){this.isUndefined=true}else{this.variable=i;this.scope.addNamespaceMemberAccess(getStringFromPath(e),i)}}else{super.bind()}}deoptimizeArgumentsOnInteractionAtPath(e,t,i){if(this.variable){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}else if(!this.isUndefined){if(t.length<dr){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.getPropertyKey(),...t],i)}else{deoptimizeInteraction(e)}}}deoptimizeCache(){const{expressionsToBeDeoptimized:e,object:t}=this;this.expressionsToBeDeoptimized=Y;this.propertyKey=ti;t.deoptimizePath(oi);for(const t of e){t.deoptimizeCache()}}deoptimizePath(e){if(e.length===0)this.disallowNamespaceReassignment();if(this.variable){this.variable.deoptimizePath(e)}else if(!this.isUndefined&&e.length<dr){const t=this.getPropertyKey();this.object.deoptimizePath([t===ti?ii:t,...e])}}getLiteralValueAtPath(e,t,i){if(this.variable){return this.variable.getLiteralValueAtPath(e,t,i)}if(this.isUndefined){return undefined}if(this.propertyKey!==ti&&e.length<dr){this.expressionsToBeDeoptimized.push(i);return this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,i)}return hi}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(this.variable){return this.variable.getReturnExpressionWhenCalledAtPath(e,t,i,s)}if(this.isUndefined){return[Ts,false]}if(this.propertyKey!==ti&&e.length<dr){this.expressionsToBeDeoptimized.push(s);return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,i,s)}return fi}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsAssignmentTarget(e,t){if(t&&!this.deoptimized)this.applyDeoptimizations();if(!this.assignmentDeoptimized)this.applyAssignmentDeoptimization();return this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath(ri,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,i){if(this.variable){return this.variable.hasEffectsOnInteractionAtPath(e,t,i)}if(this.isUndefined){return true}if(e.length<dr){return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,i)}return true}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,i){if(!this.assignmentDeoptimized)this.applyAssignmentDeoptimization();if(i){this.include(e,t)}else{this.includeProperties(e,t)}}includeCallArguments(e,t){if(this.variable){this.variable.includeCallArguments(e,t)}else{super.includeCallArguments(e,t)}}initialise(){this.propertyKey=getResolvablePropertyKey(this);this.accessInteraction={args:[this.object],type:mi}}isSkippedAsOptional(e){return!this.variable&&!this.isUndefined&&(this.object.isSkippedAsOptional?.(e)||this.optional&&this.object.getLiteralValueAtPath(ri,ui,e)==null)}render(e,t,{renderedParentType:i,isCalleeOfRenderedParent:s,renderedSurroundingElement:n}=q){if(this.variable||this.isUndefined){const{snippets:{getPropertyAccess:n}}=t;let r=this.variable?this.variable.getName(n):"undefined";if(i&&s)r="0, "+r;e.overwrite(this.start,this.end,r,{contentOnly:true,storeName:true})}else{if(i&&s){e.appendRight(this.start,"0, ")}this.object.render(e,t,{renderedSurroundingElement:n});this.property.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[this.object,e],type:gi}}applyDeoptimizations(){this.deoptimized=true;const{propertyReadSideEffects:e}=this.context.options.treeshake;if(this.bound&&e&&!(this.variable||this.isUndefined)){const e=this.getPropertyKey();this.object.deoptimizeArgumentsOnInteractionAtPath(this.accessInteraction,[e],ui);this.context.requestTreeshakingPass()}}applyAssignmentDeoptimization(){this.assignmentDeoptimized=true;const{propertyReadSideEffects:e}=this.context.options.treeshake;if(this.bound&&e&&!(this.variable||this.isUndefined)){this.object.deoptimizeArgumentsOnInteractionAtPath(this.assignmentInteraction,[this.getPropertyKey()],ui);this.context.requestTreeshakingPass()}}disallowNamespaceReassignment(){if(this.object instanceof Identifier){const e=this.scope.findVariable(this.object.name);if(e.isNamespace){if(this.variable){this.context.includeVariableInModule(this.variable)}this.context.warn(errorIllegalImportReassignment(this.object.name,this.context.module.id),this.start)}}}getPropertyKey(){if(this.propertyKey===null){this.propertyKey=ti;const e=this.property.getLiteralValueAtPath(ri,ui,this);return this.propertyKey=e===ni?e:typeof e==="symbol"?ti:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.context.options.treeshake;return!(this.variable||this.isUndefined)&&t&&(t==="always"||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){if(!this.included){this.included=true;if(this.variable){this.context.includeVariableInModule(this.variable)}}this.object.include(e,t);this.property.include(e,t)}}function resolveNamespaceVariables(e,t,i){if(t.length===0)return e;if(!e.isNamespace||e instanceof ExternalVariable)return null;const s=t[0].key;const n=e.context.traceExport(s);if(!n){if(t.length===1){const n=e.context.fileName;i.warn(errorMissingExport(s,i.module.id,n),t[0].pos);return"undefined"}return null}return resolveNamespaceVariables(n,t.slice(1),i)}class CallExpressionBase extends NodeBase{constructor(){super(...arguments);this.returnExpression=null;this.deoptimizableDependentExpressions=[];this.expressionsToBeDeoptimized=new Set}deoptimizeArgumentsOnInteractionAtPath(e,t,i){const{args:s}=e;const[n,r]=this.getReturnExpression(i);if(r)return;const o=s.filter((e=>!!e&&e!==pi));if(o.length===0)return;if(n===pi){for(const e of o){e.deoptimizePath(oi)}}else{i.withTrackedEntityAtPath(t,n,(()=>{for(const e of o){this.expressionsToBeDeoptimized.add(e)}n.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}),null)}}deoptimizeCache(){if(this.returnExpression?.[0]!==pi){this.returnExpression=fi;const{deoptimizableDependentExpressions:e,expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Q;this.deoptimizableDependentExpressions=Y;for(const t of e){t.deoptimizeCache()}for(const e of t){e.deoptimizePath(oi)}}}deoptimizePath(e){if(e.length===0||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}const[t]=this.getReturnExpression();if(t!==pi){t.deoptimizePath(e)}}getLiteralValueAtPath(e,t,i){const[s]=this.getReturnExpression(t);if(s===pi){return hi}return t.withTrackedEntityAtPath(e,s,(()=>{this.deoptimizableDependentExpressions.push(i);return s.getLiteralValueAtPath(e,t,i)}),hi)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getReturnExpression(i);if(n[0]===pi){return n}return i.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(s);const[r,o]=n[0].getReturnExpressionWhenCalledAtPath(e,t,i,s);return[r,o||n[1]]}),fi)}hasEffectsOnInteractionAtPath(e,t,i){const{type:s}=t;if(s===yi){const{args:s,withNew:n}=t;if((n?i.instantiated:i.called).trackEntityAtPathAndGetIfTracked(e,s,this)){return false}}else if((s===gi?i.assigned:i.accessed).trackEntityAtPathAndGetIfTracked(e,this)){return false}const[n,r]=this.getReturnExpression();return(s===gi||!r)&&n.hasEffectsOnInteractionAtPath(e,t,i)}}class CallExpression extends CallExpressionBase{bind(){super.bind();if(this.callee instanceof Identifier){const e=this.scope.findVariable(this.callee.name);if(e.isNamespace){this.context.warn(errorCannotCallNamespace(this.callee.name),this.start)}if(this.callee.name==="eval"){this.context.warn(errorEval(this.context.module.id),this.start)}}this.interaction={args:[this.callee instanceof MemberExpression&&!this.callee.variable?this.callee.object:null,...this.arguments],type:yi,withNew:false}}hasEffects(e){try{for(const t of this.arguments){if(t.hasEffects(e))return true}if(this.context.options.treeshake.annotations&&this.annotations)return false;return this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(ri,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t);if(t===xn&&this.callee instanceof Identifier&&this.callee.variable){this.callee.variable.markCalledFromTryStatement()}}else{this.included=true;this.callee.include(e,false)}this.callee.includeCallArguments(e,this.arguments)}isSkippedAsOptional(e){return this.callee.isSkippedAsOptional?.(e)||this.optional&&this.callee.getLiteralValueAtPath(ri,ui,e)==null}render(e,t,{renderedSurroundingElement:i}=q){this.callee.render(e,t,{isCalleeOfRenderedParent:true,renderedSurroundingElement:i});renderCallArguments(e,t,this)}applyDeoptimizations(){this.deoptimized=true;this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ri,ui);this.context.requestTreeshakingPass()}getReturnExpression(e=ui){if(this.returnExpression===null){this.returnExpression=fi;return this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath(ri,this.interaction,e,this)}return this.returnExpression}}class CatchScope extends ParameterScope{addDeclaration(e,t,i,s){const n=this.variables.get(e.name);if(n){this.parent.addDeclaration(e,t,Ts,s);n.addDeclaration(e,i);return n}return this.parent.addDeclaration(e,t,i,s)}}class CatchClause extends NodeBase{createScope(e){this.scope=new CatchScope(e,this.context)}parseNode(e){const{param:t}=e;if(t){this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope);this.param.declare("parameter",pi)}super.parseNode(e)}}class ChainExpression extends NodeBase{deoptimizeCache(){}getLiteralValueAtPath(e,t,i){if(this.expression.isSkippedAsOptional(i))return undefined;return this.expression.getLiteralValueAtPath(e,t,i)}hasEffects(e){if(this.expression.isSkippedAsOptional(this))return false;return this.expression.hasEffects(e)}}class ClassBodyScope extends ChildScope{constructor(e,t,i){super(e);this.variables.set("this",this.thisVariable=new LocalVariable("this",null,t,i));this.instanceScope=new ChildScope(this);this.instanceScope.variables.set("this",new ThisVariable(i))}findLexicalBoundary(){return this}}class ClassBody extends NodeBase{createScope(e){this.scope=new ClassBodyScope(e,this.parent,this.context)}include(e,t){this.included=true;this.context.includeVariableInModule(this.scope.thisVariable);for(const i of this.body){i.include(e,t)}}parseNode(e){const t=this.body=[];for(const i of e.body){t.push(new(this.context.getNodeConstructor(i.type))(i,this,i.static?this.scope:this.scope.instanceScope))}super.parseNode(e)}applyDeoptimizations(){}}class MethodBase extends NodeBase{constructor(){super(...arguments);this.accessedValue=null}deoptimizeArgumentsOnInteractionAtPath(e,t,i){if(e.type===mi&&this.kind==="get"&&t.length===0){return this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:yi,withNew:false},ri,i)}if(e.type===gi&&this.kind==="set"&&t.length===0){return this.value.deoptimizeArgumentsOnInteractionAtPath({args:e.args,type:yi,withNew:false},ri,i)}this.getAccessedValue()[0].deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue()[0].deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.getAccessedValue()[0].getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getAccessedValue()[0].getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){if(this.kind==="get"&&t.type===mi&&e.length===0){return this.value.hasEffectsOnInteractionAtPath(ri,{args:t.args,type:yi,withNew:false},i)}if(this.kind==="set"&&t.type===gi){return this.value.hasEffectsOnInteractionAtPath(ri,{args:t.args,type:yi,withNew:false},i)}return this.getAccessedValue()[0].hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){}getAccessedValue(){if(this.accessedValue===null){if(this.kind==="get"){this.accessedValue=fi;return this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath(ri,bi,ui,this)}else{return this.accessedValue=[this.value,false]}}return this.accessedValue}}class MethodDefinition extends MethodBase{applyDeoptimizations(){}}class ObjectMember extends ExpressionEntity{constructor(e,t){super();this.object=e;this.key=t}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.object.deoptimizeArgumentsOnInteractionAtPath(e,[this.key,...t],i)}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}getLiteralValueAtPath(e,t,i){return this.object.getLiteralValueAtPath([this.key,...e],t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,i)}}class ClassNode extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new ChildScope(e)}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const t=this.superClass?.hasEffects(e)||this.body.hasEffects(e);this.id?.markDeclarationReached();return t||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){return t.type===yi&&e.length===0?!t.withNew||(this.classConstructor===null?this.superClass?.hasEffectsOnInteractionAtPath(e,t,i):this.classConstructor.hasEffectsOnInteractionAtPath(e,t,i))||false:this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;this.superClass?.include(e,t);this.body.include(e,t);if(this.id){this.id.markDeclarationReached();this.id.include()}}initialise(){this.id?.declare("class",this);for(const e of this.body.body){if(e instanceof MethodDefinition&&e.kind==="constructor"){this.classConstructor=e;return}}this.classConstructor=null}applyDeoptimizations(){this.deoptimized=true;for(const e of this.body.body){if(!(e.static||e instanceof MethodDefinition&&e.kind==="constructor")){e.deoptimizePath(oi)}}this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}const e=[];const t=[];for(const i of this.body.body){const s=i.static?e:t;const n=i.kind;if(s===t&&!n)continue;const r=n==="set"||n==="get"?n:"init";let o;if(i.computed){const e=i.key.getLiteralValueAtPath(ri,ui,this);if(typeof e==="symbol"){s.push({key:ti,kind:r,property:i});continue}else{o=String(e)}}else{o=i.key instanceof Identifier?i.key.name:String(i.key.value)}s.push({key:o,kind:r,property:i})}e.unshift({key:"prototype",kind:"init",property:new ObjectEntity(t,this.superClass?new ObjectMember(this.superClass,"prototype"):kn)});return this.objectEntity=new ObjectEntity(e,this.superClass||kn)}}class ClassDeclaration extends ClassNode{initialise(){super.initialise();if(this.id!==null){this.id.variable.isId=true}}parseNode(e){if(e.id!==null){this.id=new Identifier(e.id,this,this.scope.parent)}super.parseNode(e)}render(e,t){const{exportNamesByVariable:i,format:s,snippets:{_:n,getPropertyAccess:r}}=t;if(this.id){const{variable:o,name:l}=this.id;if(s==="system"&&i.has(o)){e.appendLeft(this.end,`${n}${getSystemExportStatement([o],t)};`)}const c=o.getName(r);if(c!==l){this.superClass?.render(e,t);this.body.render(e,{...t,useOriginalName:e=>e===o});e.prependRight(this.start,`let ${c}${n}=${n}`);e.prependLeft(this.end,";");return}}super.render(e,t)}applyDeoptimizations(){super.applyDeoptimizations();const{id:e,scope:t}=this;if(e){const{name:i,variable:s}=e;for(const e of t.accessedOutsideVariables.values()){if(e!==s){e.forbidName(i)}}}}}class ClassExpression extends ClassNode{render(e,t,{renderedSurroundingElement:i}=q){super.render(e,t);if(i===tn){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}}class MultiExpression extends ExpressionEntity{constructor(e){super();this.expressions=e;this.included=false}deoptimizePath(e){for(const t of this.expressions){t.deoptimizePath(e)}}getReturnExpressionWhenCalledAtPath(e,t,i,s){return[new MultiExpression(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,i,s)[0]))),false]}hasEffectsOnInteractionAtPath(e,t,i){for(const s of this.expressions){if(s.hasEffectsOnInteractionAtPath(e,t,i))return true}return false}}class ConditionalExpression extends NodeBase{constructor(){super(...arguments);this.expressionsToBeDeoptimized=[];this.isBranchResolutionAnalysed=false;this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.consequent.deoptimizeArgumentsOnInteractionAtPath(e,t,i);this.alternate.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizeCache(){if(this.usedBranch!==null){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null;e.deoptimizePath(oi);const{expressionsToBeDeoptimized:t}=this;this.expressionsToBeDeoptimized=Y;for(const e of t){e.deoptimizeCache()}}}deoptimizePath(e){const t=this.getUsedBranch();if(t){t.deoptimizePath(e)}else{this.consequent.deoptimizePath(e);this.alternate.deoptimizePath(e)}}getLiteralValueAtPath(e,t,i){const s=this.getUsedBranch();if(!s)return hi;this.expressionsToBeDeoptimized.push(i);return s.getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getUsedBranch();if(!n)return[new MultiExpression([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,i,s)[0],this.alternate.getReturnExpressionWhenCalledAtPath(e,t,i,s)[0]]),false];this.expressionsToBeDeoptimized.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(this.test.hasEffects(e))return true;const t=this.getUsedBranch();if(!t){return this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}return t.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){const s=this.getUsedBranch();if(!s){return this.consequent.hasEffectsOnInteractionAtPath(e,t,i)||this.alternate.hasEffectsOnInteractionAtPath(e,t,i)}return s.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.getUsedBranch();if(t||this.test.shouldBeIncluded(e)||i===null){this.test.include(e,t);this.consequent.include(e,t);this.alternate.include(e,t)}else{i.include(e,t)}}includeCallArguments(e,t){const i=this.getUsedBranch();if(i){i.includeCallArguments(e,t)}else{this.consequent.includeCallArguments(e,t);this.alternate.includeCallArguments(e,t)}}render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n,renderedSurroundingElement:r}=q){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 l=findFirstOccurrenceOutsideComment(e.original,":",this.consequent.end);const c=findNonWhiteSpace(e.original,(this.consequent.included?findFirstOccurrenceOutsideComment(e.original,"?",this.test.end):l)+1);if(s){removeLineBreaks(e,c,o.start)}e.remove(this.start,c);if(this.consequent.included){e.remove(l,this.end)}removeAnnotations(this,e);o.render(e,t,{isCalleeOfRenderedParent:i,preventASI:true,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}}getUsedBranch(){if(this.isBranchResolutionAnalysed){return this.usedBranch}this.isBranchResolutionAnalysed=true;const e=this.test.getLiteralValueAtPath(ri,ui,this);return typeof e==="symbol"?null:this.usedBranch=e?this.consequent:this.alternate}}class ContinueStatement extends NodeBase{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return true;e.includedLabels.add(this.label.name)}else{if(!e.ignore.continues)return true;e.hasContinue=true}e.brokenFlow=true;return false}include(e){this.included=true;if(this.label){this.label.include();e.includedLabels.add(this.label.name)}else{e.hasContinue=true}e.brokenFlow=true}}function hasLoopBodyEffects(e,t){const{brokenFlow:i,hasBreak:s,hasContinue:n,ignore:r}=e;const{breaks:o,continues:l}=r;r.breaks=true;r.continues=true;e.hasBreak=false;e.hasContinue=false;if(t.hasEffects(e))return true;r.breaks=o;r.continues=l;e.hasBreak=s;e.hasContinue=n;e.brokenFlow=i;return false}function includeLoopBody(e,t,i){const{brokenFlow:s,hasBreak:n,hasContinue:r}=e;e.hasBreak=false;e.hasContinue=false;t.include(e,i,{asSingleStatement:true});e.hasBreak=n;e.hasContinue=r;e.brokenFlow=s}class DoWhileStatement extends NodeBase{hasEffects(e){if(this.test.hasEffects(e))return true;return hasLoopBodyEffects(e,this.body)}include(e,t){this.included=true;this.test.include(e,t);includeLoopBody(e,this.body,t)}}class EmptyStatement extends NodeBase{hasEffects(){return false}}class ExportAllDeclaration extends NodeBase{hasEffects(){return false}initialise(){this.context.addExport(this)}render(e,t,i){e.remove(i.start,i.end)}applyDeoptimizations(){}}ExportAllDeclaration.prototype.needsBoundaries=true;class FunctionDeclaration extends FunctionNode{initialise(){super.initialise();if(this.id!==null){this.id.variable.isId=true}}parseNode(e){if(e.id!==null){this.id=new Identifier(e.id,this,this.scope.parent)}super.parseNode(e)}}function getDeclarationStart(e,t){return findNonWhiteSpace(e,findFirstOccurrenceOutsideComment(e,"default",t)+7)}function getFunctionIdInsertPosition(e,t){const i=findFirstOccurrenceOutsideComment(e,"function",t)+"function".length;e=e.slice(i,findFirstOccurrenceOutsideComment(e,"(",i));const s=findFirstOccurrenceOutsideComment(e,"*");if(s===-1){return i}return i+s+1}class ExportDefaultDeclaration extends NodeBase{include(e,t){super.include(e,t);if(t){this.context.includeVariableInModule(this.variable)}}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name;this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context);this.context.addExport(this)}render(e,t,i){const{start:s,end:n}=i;const r=getDeclarationStart(e.original,this.start);if(this.declaration instanceof FunctionDeclaration){this.renderNamedDeclaration(e,r,this.declaration.id===null?getFunctionIdInsertPosition(e.original,r):null,t)}else if(this.declaration instanceof ClassDeclaration){this.renderNamedDeclaration(e,r,this.declaration.id===null?findFirstOccurrenceOutsideComment(e.original,"class",s)+"class".length:null,t)}else if(this.variable.getOriginalVariable()!==this.variable){treeshakeNode(this,e,s,n);return}else if(this.variable.included){this.renderVariableDeclaration(e,r,t)}else{e.remove(this.start,r);this.declaration.render(e,t,{renderedSurroundingElement:tn});if(e.original[this.end-1]!==";"){e.appendLeft(this.end,";")}return}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,i,s){const{exportNamesByVariable:n,format:r,snippets:{getPropertyAccess:o}}=s;const l=this.variable.getName(o);e.remove(this.start,t);if(i!==null){e.appendLeft(i,` ${l}`)}if(r==="system"&&this.declaration instanceof ClassDeclaration&&n.has(this.variable)){e.appendLeft(this.end,` ${getSystemExportStatement([this.variable],s)};`)}}renderVariableDeclaration(e,t,{format:i,exportNamesByVariable:s,snippets:{cnst:n,getPropertyAccess:r}}){const o=e.original.charCodeAt(this.end-1)===59;const l=i==="system"&&s.get(this.variable);if(l){e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${l[0]}', `);e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))}else{e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `);if(!o){e.appendLeft(this.end,";")}}}}ExportDefaultDeclaration.prototype.needsBoundaries=true;class ExportNamedDeclaration extends NodeBase{bind(){this.declaration?.bind()}hasEffects(e){return!!this.declaration?.hasEffects(e)}initialise(){this.context.addExport(this)}render(e,t,i){const{start:s,end:n}=i;if(this.declaration===null){e.remove(s,n)}else{e.remove(this.start,this.declaration.start);this.declaration.render(e,t,{end:n,start:s})}}applyDeoptimizations(){}}ExportNamedDeclaration.prototype.needsBoundaries=true;class ExportSpecifier extends NodeBase{applyDeoptimizations(){}}class ForInStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){const{body:t,deoptimized:i,left:s,right:n}=this;if(!i)this.applyDeoptimizations();if(s.hasEffectsAsAssignmentTarget(e,false)||n.hasEffects(e))return true;return hasLoopBodyEffects(e,t)}include(e,t){const{body:i,deoptimized:s,left:n,right:r}=this;if(!s)this.applyDeoptimizations();this.included=true;n.includeAsAssignmentTarget(e,t||true,false);r.include(e,t);includeLoopBody(e,i,t)}initialise(){this.left.setAssignedValue(pi)}render(e,t){this.left.render(e,t,cr);this.right.render(e,t,cr);if(e.original.charCodeAt(this.right.start-1)===110){e.prependLeft(this.right.start," ")}this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath(ri);this.context.requestTreeshakingPass()}}class ForOfStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return true}include(e,t){const{body:i,deoptimized:s,left:n,right:r}=this;if(!s)this.applyDeoptimizations();this.included=true;n.includeAsAssignmentTarget(e,t||true,false);r.include(e,t);includeLoopBody(e,i,t)}initialise(){this.left.setAssignedValue(pi)}render(e,t){this.left.render(e,t,cr);this.right.render(e,t,cr);if(e.original.charCodeAt(this.right.start-1)===102){e.prependLeft(this.right.start," ")}this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath(ri);this.right.deoptimizePath(oi);this.context.requestTreeshakingPass()}}class ForStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){if(this.init?.hasEffects(e)||this.test?.hasEffects(e)||this.update?.hasEffects(e)){return true}return hasLoopBodyEffects(e,this.body)}include(e,t){this.included=true;this.init?.include(e,t,{asSingleStatement:true});this.test?.include(e,t);this.update?.include(e,t);includeLoopBody(e,this.body,t)}render(e,t){this.init?.render(e,t,cr);this.test?.render(e,t,cr);this.update?.render(e,t,cr);this.body.render(e,t)}}class FunctionExpression extends FunctionNode{render(e,t,{renderedSurroundingElement:i}=q){super.render(e,t);if(i===tn){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}}class TrackingScope extends BlockScope{constructor(){super(...arguments);this.hoistedDeclarations=[]}addDeclaration(e,t,i,s){this.hoistedDeclarations.push(e);return super.addDeclaration(e,t,i,s)}}const pr=Symbol("unset");class IfStatement extends NodeBase{constructor(){super(...arguments);this.testValue=pr}deoptimizeCache(){this.testValue=hi}hasEffects(e){if(this.test.hasEffects(e)){return true}const t=this.getTestValue();if(typeof t==="symbol"){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return true;const i=e.brokenFlow;e.brokenFlow=t;if(this.alternate===null)return false;if(this.alternate.hasEffects(e))return true;e.brokenFlow=e.brokenFlow&&i;return false}return t?this.consequent.hasEffects(e):!!this.alternate?.hasEffects(e)}include(e,t){this.included=true;if(t){this.includeRecursively(t,e)}else{const t=this.getTestValue();if(typeof t==="symbol"){this.includeUnknownTest(e)}else{this.includeKnownTest(e,t)}}}parseNode(e){this.consequentScope=new TrackingScope(this.scope);this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope);if(e.alternate){this.alternateScope=new TrackingScope(this.scope);this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)}super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:i}}=t;const s=this.getTestValue();const n=[];const r=this.test.included;const o=!this.context.options.treeshake;if(r){this.test.render(e,t)}else{e.remove(this.start,this.consequent.start)}if(this.consequent.included&&(o||typeof s==="symbol"||s)){this.consequent.render(e,t)}else{e.overwrite(this.consequent.start,this.consequent.end,r?";":"");n.push(...this.consequentScope.hoistedDeclarations)}if(this.alternate){if(this.alternate.included&&(o||typeof s==="symbol"||!s)){if(r){if(e.original.charCodeAt(this.alternate.start-1)===101){e.prependLeft(this.alternate.start," ")}}else{e.remove(this.consequent.end,this.alternate.start)}this.alternate.render(e,t)}else{if(r&&this.shouldKeepAlternateBranch()){e.overwrite(this.alternate.start,this.end,";")}else{e.remove(this.consequent.end,this.end)}n.push(...this.alternateScope.hoistedDeclarations)}}this.renderHoistedDeclarations(n,e,i)}applyDeoptimizations(){}getTestValue(){if(this.testValue===pr){return this.testValue=this.test.getLiteralValueAtPath(ri,ui,this)}return this.testValue}includeKnownTest(e,t){if(this.test.shouldBeIncluded(e)){this.test.include(e,false)}if(t&&this.consequent.shouldBeIncluded(e)){this.consequent.include(e,false,{asSingleStatement:true})}if(!t&&this.alternate?.shouldBeIncluded(e)){this.alternate.include(e,false,{asSingleStatement:true})}}includeRecursively(e,t){this.test.include(t,e);this.consequent.include(t,e);this.alternate?.include(t,e)}includeUnknownTest(e){this.test.include(e,false);const{brokenFlow:t}=e;let i=false;if(this.consequent.shouldBeIncluded(e)){this.consequent.include(e,false,{asSingleStatement:true});i=e.brokenFlow;e.brokenFlow=t}if(this.alternate?.shouldBeIncluded(e)){this.alternate.include(e,false,{asSingleStatement:true});e.brokenFlow=e.brokenFlow&&i}}renderHoistedDeclarations(e,t,i){const s=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(i):""})))].filter(Boolean).join(", ");if(s){const e=this.parent.type;const i=e!==on&&e!==Xs;t.prependRight(this.start,`${i?"{ ":""}var ${s}; `);if(i){t.appendLeft(this.end,` }`)}}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof IfStatement&&e.alternate){return true}if(e instanceof BlockStatement){return false}e=e.parent}while(e);return false}}class ImportAttribute extends NodeBase{}class ImportDeclaration extends NodeBase{bind(){}hasEffects(){return false}initialise(){this.context.addImport(this)}render(e,t,i){e.remove(i.start,i.end)}applyDeoptimizations(){}}ImportDeclaration.prototype.needsBoundaries=true;class ImportDefaultSpecifier extends NodeBase{applyDeoptimizations(){}}const fr="_interopDefault";const mr="_interopDefaultCompat";const gr="_interopNamespace";const yr="_interopNamespaceCompat";const Er="_interopNamespaceDefault";const xr="_interopNamespaceDefaultOnly";const br="_mergeNamespaces";const vr={auto:fr,compat:mr,default:null,defaultOnly:null,esModule:null};const isDefaultAProperty=(e,t)=>e==="esModule"||t&&(e==="auto"||e==="compat");const Sr={auto:gr,compat:yr,default:Er,defaultOnly:xr,esModule:null};const canDefaultBeTakenFromNamespace=(e,t)=>e!=="esModule"&&isDefaultAProperty(e,t);const getHelpersBlock=(e,t,i,s,n,r,o)=>{const l=new Set(e);for(const e of wr){if(t.has(e)){l.add(e)}}return wr.map((e=>l.has(e)?Ar[e](i,s,n,r,o,l):"")).join("")};const Ar={[mr](e,t,i){const{_:s,getDirectReturnFunction:n,n:r}=t;const[o,l]=n(["e"],{functionReturn:true,lineBreakIndent:null,name:mr});return`${o}${getIsCompatNamespace(t)}${s}?${s}`+`${i?getDefaultLiveBinding(t):getDefaultStatic(t)}${l}${r}${r}`},[fr](e,t,i){const{_:s,getDirectReturnFunction:n,n:r}=t;const[o,l]=n(["e"],{functionReturn:true,lineBreakIndent:null,name:fr});return`${o}e${s}&&${s}e.__esModule${s}?${s}`+`${i?getDefaultLiveBinding(t):getDefaultStatic(t)}${l}${r}${r}`},[yr](e,t,i,s,n,r){const{_:o,getDirectReturnFunction:l,n:c}=t;if(r.has(Er)){const[e,i]=l(["e"],{functionReturn:true,lineBreakIndent:null,name:yr});return`${e}${getIsCompatNamespace(t)}${o}?${o}e${o}:${o}${Er}(e)${i}${c}${c}`}return`function ${yr}(e)${o}{${c}`+`${e}if${o}(${getIsCompatNamespace(t)})${o}return e;${c}`+createNamespaceObject(e,e,t,i,s,n)+`}${c}${c}`},[xr](e,t,i,s,n){const{getDirectReturnFunction:r,getObject:o,n:l}=t;const[c,u]=r(["e"],{functionReturn:true,lineBreakIndent:null,name:xr});return`${c}${getFrozen(s,getWithToStringTag(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${u}${l}${l}`},[Er](e,t,i,s,n){const{_:r,n:o}=t;return`function ${Er}(e)${r}{${o}`+createNamespaceObject(e,e,t,i,s,n)+`}${o}${o}`},[gr](e,t,i,s,n,r){const{_:o,getDirectReturnFunction:l,n:c}=t;if(r.has(Er)){const[e,t]=l(["e"],{functionReturn:true,lineBreakIndent:null,name:gr});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Er}(e)${t}${c}${c}`}return`function ${gr}(e)${o}{${c}`+`${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${c}`+createNamespaceObject(e,e,t,i,s,n)+`}${c}${c}`},[br](e,t,i,s,n){const{_:r,cnst:o,n:l}=t;const c=o==="var"&&i;return`function ${br}(n, m)${r}{${l}`+`${e}${loopOverNamespaces(`{${l}`+`${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${l}`+(i?c?copyOwnPropertyLiveBinding:copyPropertyLiveBinding:copyPropertyStatic)(e,e+e+e+e,t)+`${e}${e}${e}}${l}`+`${e}${e}}`,c,e,t)}${l}`+`${e}return ${getFrozen(s,getWithToStringTag(n,"n",t))};${l}`+`}${l}${l}`}};const getDefaultLiveBinding=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`;const getDefaultStatic=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`;const getIsCompatNamespace=({_:e})=>`e${e}&&${e}typeof e${e}===${e}'object'${e}&&${e}'default'${e}in e`;const createNamespaceObject=(e,t,i,s,n,r)=>{const{_:o,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}=i;const p=`{${h}`+(s?copyNonDefaultOwnPropertyLiveBinding:copyPropertyStatic)(e,t+e+e,i)+`${t}${e}}`;return`${t}${l} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${getToStringTagValue(c)}${o}}`:""});${h}`+`${t}if${o}(e)${o}{${h}`+`${t}${e}${loopOverKeys(p,!s,i)}${h}`+`${t}}${h}`+`${t}n${u("default")}${o}=${o}e;${h}`+`${t}return ${getFrozen(n,"n")}${d}${h}`};const loopOverKeys=(e,t,{_:i,cnst:s,getFunctionIntro:n,s:r})=>s!=="var"||t?`for${i}(${s} k in e)${i}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:false,name:null})}${e})${r}`;const loopOverNamespaces=(e,t,i,{_:s,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:l})=>{if(t){const[t,n]=r(["e"],{functionReturn:false,lineBreakIndent:{base:i,t:i},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:false,name:null})}${e})${n});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${l}`+`${i}${i}${n} e${s}=${s}m[i];${l}`+`${i}${i}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${n} k in e)${s}${e}${s}}${l}${i}}`};const copyNonDefaultOwnPropertyLiveBinding=(e,t,i)=>{const{_:s,n:n}=i;return`${t}if${s}(k${s}!==${s}'default')${s}{${n}`+copyOwnPropertyLiveBinding(e,t+e,i)+`${t}}${n}`};const copyOwnPropertyLiveBinding=(e,t,{_:i,cnst:s,getDirectReturnFunction:n,n:r})=>{const[o,l]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`${t}${s} d${i}=${i}Object.getOwnPropertyDescriptor(e,${i}k);${r}`+`${t}Object.defineProperty(n,${i}k,${i}d.get${i}?${i}d${i}:${i}{${r}`+`${t}${e}enumerable:${i}true,${r}`+`${t}${e}get:${i}${o}e[k]${l}${r}`+`${t}});${r}`};const copyPropertyLiveBinding=(e,t,{_:i,cnst:s,getDirectReturnFunction:n,n:r})=>{const[o,l]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`${t}${s} d${i}=${i}Object.getOwnPropertyDescriptor(e,${i}k);${r}`+`${t}if${i}(d)${i}{${r}`+`${t}${e}Object.defineProperty(n,${i}k,${i}d.get${i}?${i}d${i}:${i}{${r}`+`${t}${e}${e}enumerable:${i}true,${r}`+`${t}${e}${e}get:${i}${o}e[k]${l}${r}`+`${t}${e}});${r}`+`${t}}${r}`};const copyPropertyStatic=(e,t,{_:i,n:s})=>`${t}n[k]${i}=${i}e[k];${s}`;const getFrozen=(e,t)=>e?`Object.freeze(${t})`:t;const getWithToStringTag=(e,t,{_:i,getObject:s})=>e?`Object.defineProperty(${t},${i}Symbol.toStringTag,${i}${getToStringTagValue(s)})`:t;const wr=Object.keys(Ar);function getToStringTagValue(e){return e([["value","'Module'"]],{lineBreakIndent:null})}function isReassignedExportsMember(e,t){return e.renderBaseName!==null&&t.has(e)&&e.isReassigned}class VariableDeclarator extends NodeBase{declareDeclarator(e){this.id.declare(e,this.init||Ts)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const t=this.init?.hasEffects(e);this.id.markDeclarationReached();return t||this.id.hasEffects(e)}include(e,t){const{deoptimized:i,id:s,init:n}=this;if(!i)this.applyDeoptimizations();this.included=true;n?.include(e,t);s.markDeclarationReached();if(t||s.shouldBeIncluded(e)){s.include(e,t)}}render(e,t){const{exportNamesByVariable:i,snippets:{_:s,getPropertyAccess:n}}=t;const{end:r,id:o,init:l,start:c}=this;const u=o.included;if(u){o.render(e,t)}else{const t=findFirstOccurrenceOutsideComment(e.original,"=",o.end);e.remove(c,findNonWhiteSpace(e.original,t+1))}if(l){if(o instanceof Identifier&&l instanceof ClassExpression&&!l.id){const t=o.variable.getName(n);if(t!==o.name){e.appendLeft(l.start+5,` ${o.name}`)}}l.render(e,t,u?q:{renderedSurroundingElement:tn})}else if(o instanceof Identifier&&isReassignedExportsMember(o.variable,i)){e.appendLeft(r,`${s}=${s}void 0`)}}applyDeoptimizations(){this.deoptimized=true;const{id:e,init:t}=this;if(t&&e instanceof Identifier&&t instanceof ClassExpression&&!t.id){const{name:i,variable:s}=e;for(const e of t.scope.accessedOutsideVariables.values()){if(e!==s){e.forbidName(i)}}}}}class ImportExpression extends NodeBase{constructor(){super(...arguments);this.inlineNamespace=null;this.assertions=null;this.mechanism=null;this.namespaceExportName=undefined;this.resolution=null;this.resolutionString=null}bind(){this.source.bind()}getDeterministicImportedNames(){const e=this.parent;if(e instanceof ExpressionStatement){return Y}if(e instanceof AwaitExpression){const t=e.parent;if(t instanceof ExpressionStatement){return Y}if(t instanceof VariableDeclarator){const e=t.id;return e instanceof ObjectPattern?getDeterministicObjectDestructure(e):undefined}if(t instanceof MemberExpression){const e=t.property;if(!t.computed&&e instanceof Identifier){return[e.name]}}return}if(e instanceof MemberExpression){const t=e.parent;const i=e.property;if(!(t instanceof CallExpression)||!(i instanceof Identifier)){return}const s=i.name;if(t.parent instanceof ExpressionStatement&&["catch","finally"].includes(s)){return Y}if(s!=="then")return;if(t.arguments.length===0){return Y}const n=t.arguments[0];if(t.arguments.length!==1||!(n instanceof ArrowFunctionExpression||n instanceof FunctionExpression)){return}if(n.params.length===0){return Y}const r=n.params[0];if(n.params.length===1&&r instanceof ObjectPattern){return getDeterministicObjectDestructure(r)}return}}hasEffects(){return true}include(e,t){if(!this.included){this.included=true;this.context.includeDynamicImport(this);this.scope.addAccessedDynamicImport(this)}this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}parseNode(e){super.parseNode(e,["source"])}render(e,t){const{snippets:{_:i,getDirectReturnFunction:s,getObject:n,getPropertyAccess:r}}=t;if(this.inlineNamespace){const[t,i]=s([],{functionReturn:true,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${t}${this.inlineNamespace.getName(r)}${i})`);return}if(this.mechanism){e.overwrite(this.start,findFirstOccurrenceOutsideComment(e.original,"(",this.start+6)+1,this.mechanism.left);e.overwrite(this.end-1,this.end,this.mechanism.right)}if(this.resolutionString){e.overwrite(this.source.start,this.source.end,this.resolutionString);if(this.namespaceExportName){const[t,i]=s(["n"],{functionReturn:true,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${this.namespaceExportName}${i})`)}}else{this.source.render(e,t)}if(this.assertions!==true){if(this.arguments){e.overwrite(this.source.end,this.end-1,"",{contentOnly:true})}if(this.assertions){e.appendLeft(this.end-1,`,${i}${n([["assert",this.assertions]],{lineBreakIndent:null})}`)}}}setExternalResolution(e,t,i,s,n,r,o,l,c){const{format:u}=i;this.inlineNamespace=null;this.resolution=t;this.resolutionString=o;this.namespaceExportName=l;this.assertions=c;const h=[...Ir[u]||[]];let d;({helper:d,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,i,s,n));if(d){h.push(d)}if(h.length>0){this.scope.addAccessedGlobals(h,r)}}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:i,dynamicImportFunction:s,dynamicImportInCjs:n,format:r,generatedCode:{arrowFunctions:o},interop:l},{_:c,getDirectReturnFunction:u,getDirectReturnIifeLeft:h},d){const p=d.hookFirstSync("renderDynamicImport",[{customResolution:typeof this.resolution==="string"?this.resolution:null,format:r,moduleId:this.context.module.id,targetModuleId:this.resolution&&typeof this.resolution!=="string"?this.resolution.id:null}]);if(p){return{helper:null,mechanism:p}}const f=!this.resolution||typeof this.resolution==="string";switch(r){case"cjs":{if(n&&(!e||typeof e==="string"||e instanceof ExternalModule)){return{helper:null,mechanism:null}}const i=getInteropHelper(e,t,l);let s=`require(`;let r=`)`;if(i){s=`/*#__PURE__*/${i}(${s}`;r+=")"}const[c,d]=u([],{functionReturn:true,lineBreakIndent:null,name:null});s=`Promise.resolve().then(${c}${s}`;r+=`${d})`;if(!o&&f){s=h(["t"],`${s}t${r}`,{needsArrowReturnParens:false,needsWrappedFunction:true});r=")"}return{helper:i,mechanism:{left:s,right:r}}}case"amd":{const s=i?"c":"resolve";const n=i?"e":"reject";const r=getInteropHelper(e,t,l);const[d,p]=u(["m"],{functionReturn:false,lineBreakIndent:null,name:null});const m=r?`${d}${s}(/*#__PURE__*/${r}(m))${p}`:s;const[g,y]=u([s,n],{functionReturn:false,lineBreakIndent:null,name:null});let E=`new Promise(${g}require([`;let x=`],${c}${m},${c}${n})${y})`;if(!o&&f){E=h(["t"],`${E}t${x}`,{needsArrowReturnParens:false,needsWrappedFunction:true});x=")"}return{helper:r,mechanism:{left:E,right:x}}}case"system":{return{helper:null,mechanism:{left:"module.import(",right:")"}}}case"es":{if(s){return{helper:null,mechanism:{left:`${s}(`,right:")"}}}}}return{helper:null,mechanism:null}}}function getInteropHelper(e,t,i){return t==="external"?Sr[i(e instanceof ExternalModule?e.id:null)]:t==="default"?xr:null}const Ir={amd:["require"],cjs:["require"],system:["module"]};function getDeterministicObjectDestructure(e){const t=[];for(const i of e.properties){if(i.type==="RestElement"||i.computed||i.key.type!=="Identifier")return;t.push(i.key.name)}return t}class ImportNamespaceSpecifier extends NodeBase{applyDeoptimizations(){}}class ImportSpecifier extends NodeBase{applyDeoptimizations(){}}class LabeledStatement extends NodeBase{hasEffects(e){const t=e.brokenFlow;e.ignore.labels.add(this.label.name);if(this.body.hasEffects(e))return true;e.ignore.labels.delete(this.label.name);if(e.includedLabels.has(this.label.name)){e.includedLabels.delete(this.label.name);e.brokenFlow=t}return false}include(e,t){this.included=true;const i=e.brokenFlow;this.body.include(e,t);if(t||e.includedLabels.has(this.label.name)){this.label.include();e.includedLabels.delete(this.label.name);e.brokenFlow=i}}render(e,t){if(this.label.included){this.label.render(e,t)}else{e.remove(this.start,findNonWhiteSpace(e.original,findFirstOccurrenceOutsideComment(e.original,":",this.label.end)+1))}this.body.render(e,t)}}class LogicalExpression extends NodeBase{constructor(){super(...arguments);this.expressionsToBeDeoptimized=[];this.isBranchResolutionAnalysed=false;this.usedBranch=null}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.left.deoptimizeArgumentsOnInteractionAtPath(e,t,i);this.right.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null;e.deoptimizePath(oi);const{context:t,expressionsToBeDeoptimized:i}=this;this.expressionsToBeDeoptimized=Y;for(const e of i){e.deoptimizeCache()}t.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();if(t){t.deoptimizePath(e)}else{this.left.deoptimizePath(e);this.right.deoptimizePath(e)}}getLiteralValueAtPath(e,t,i){const s=this.getUsedBranch();if(!s)return hi;this.expressionsToBeDeoptimized.push(i);return s.getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getUsedBranch();if(!n)return[new MultiExpression([this.left.getReturnExpressionWhenCalledAtPath(e,t,i,s)[0],this.right.getReturnExpressionWhenCalledAtPath(e,t,i,s)[0]]),false];this.expressionsToBeDeoptimized.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(this.left.hasEffects(e)){return true}if(this.getUsedBranch()!==this.left){return this.right.hasEffects(e)}return false}hasEffectsOnInteractionAtPath(e,t,i){const s=this.getUsedBranch();if(!s){return this.left.hasEffectsOnInteractionAtPath(e,t,i)||this.right.hasEffectsOnInteractionAtPath(e,t,i)}return s.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.getUsedBranch();if(t||i===this.right&&this.left.shouldBeIncluded(e)||!i){this.left.include(e,t);this.right.include(e,t)}else{i.include(e,t)}}render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n,renderedSurroundingElement:r}=q){if(!this.left.included||!this.right.included){const o=findFirstOccurrenceOutsideComment(e.original,this.operator,this.left.end);if(this.right.included){const t=findNonWhiteSpace(e.original,o+2);e.remove(this.start,t);if(s){removeLineBreaks(e,t,this.right.start)}}else{e.remove(o,this.end)}removeAnnotations(this,e);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}else{this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r});this.right.render(e,t)}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=true;const e=this.left.getLiteralValueAtPath(ri,ui,this);if(typeof e==="symbol"){return null}else{this.usedBranch=this.operator==="||"&&e||this.operator==="&&"&&!e||this.operator==="??"&&e!=null?this.left:this.right}}return this.usedBranch}}const kr="ROLLUP_FILE_URL_";const Cr="import";class MetaProperty extends NodeBase{constructor(){super(...arguments);this.metaProperty=null;this.preliminaryChunkId=null;this.referenceId=null}getReferencedFileName(e){const{meta:{name:t},metaProperty:i}=this;if(t===Cr&&i?.startsWith(kr)){return e.getFileName(i.slice(kr.length))}return null}hasEffects(){return false}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t!==mi}include(){if(!this.included){this.included=true;if(this.meta.name===Cr){this.context.addImportMeta(this);const e=this.parent;const t=this.metaProperty=e instanceof MemberExpression&&typeof e.propertyKey==="string"?e.propertyKey:null;if(t?.startsWith(kr)){this.referenceId=t.slice(kr.length)}}}}render(e,{format:t,pluginDriver:i,snippets:s}){const{context:{module:{id:n}},meta:{name:o},metaProperty:l,parent:c,preliminaryChunkId:u,referenceId:h,start:d,end:p}=this;if(o!==Cr)return;const f=u;if(h){const s=i.getFileName(h);const o=normalize(r.relative(r.dirname(f),s));const l=i.hookFirstSync("resolveFileUrl",[{chunkId:f,fileName:s,format:t,moduleId:n,referenceId:h,relativePath:o}])||Nr[t](o);e.overwrite(c.start,c.end,l,{contentOnly:true});return}const m=i.hookFirstSync("resolveImportMeta",[l,{chunkId:f,format:t,moduleId:n}])||Rr[t]?.(l,{chunkId:f,snippets:s});if(typeof m==="string"){if(c instanceof MemberExpression){e.overwrite(c.start,c.end,m,{contentOnly:true})}else{e.overwrite(d,p,m,{contentOnly:true})}}}setResolution(e,t,i){this.preliminaryChunkId=i;const s=(this.metaProperty?.startsWith(kr)?Pr:_r)[e];if(s.length>0){this.scope.addAccessedGlobals(s,t)}}}const _r={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]};const Pr={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]};const getResolveUrl=(e,t="URL")=>`new ${t}(${e}).href`;const getRelativeUrlFromDocument=(e,t=false)=>getResolveUrl(`'${escapeId(e)}', ${t?`typeof document === 'undefined' ? location.href : `:""}document.currentScript && document.currentScript.src || document.baseURI`);const getGenericImportMetaMechanism=e=>(t,{chunkId:i})=>{const s=e(i);return t===null?`({ url: ${s} })`:t==="url"?s:"undefined"};const getFileUrlFromFullPath=e=>`require('u' + 'rl').pathToFileURL(${e}).href`;const getFileUrlFromRelativePath=e=>getFileUrlFromFullPath(`__dirname + '/${e}'`);const getUrlFromDocument=(e,t=false)=>`${t?`typeof document === 'undefined' ? location.href : `:""}(document.currentScript && document.currentScript.src || new URL('${escapeId(e)}', document.baseURI).href)`;const Nr={amd:e=>{if(e[0]!==".")e="./"+e;return getResolveUrl(`require.toUrl('${e}'), document.baseURI`)},cjs:e=>`(typeof document === 'undefined' ? ${getFileUrlFromRelativePath(e)} : ${getRelativeUrlFromDocument(e)})`,es:e=>getResolveUrl(`'${e}', import.meta.url`),iife:e=>getRelativeUrlFromDocument(e),system:e=>getResolveUrl(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromRelativePath(e)} : ${getRelativeUrlFromDocument(e,true)})`};const Rr={amd:getGenericImportMetaMechanism((()=>getResolveUrl(`module.uri, document.baseURI`))),cjs:getGenericImportMetaMechanism((e=>`(typeof document === 'undefined' ? ${getFileUrlFromFullPath("__filename")} : ${getUrlFromDocument(e)})`)),iife:getGenericImportMetaMechanism((e=>getUrlFromDocument(e))),system:(e,{snippets:{getPropertyAccess:t}})=>e===null?`module.meta`:`module.meta${t(e)}`,umd:getGenericImportMetaMechanism((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${getFileUrlFromFullPath("__filename")} : ${getUrlFromDocument(e,true)})`))};class NewExpression extends NodeBase{hasEffects(e){try{for(const t of this.arguments){if(t.hasEffects(e))return true}if(this.context.options.treeshake.annotations&&this.annotations){return false}return this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath(ri,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||t!==mi}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t)}else{this.included=true;this.callee.include(e,false)}this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:[null,...this.arguments],type:yi,withNew:true}}render(e,t){this.callee.render(e,t);renderCallArguments(e,t,this)}applyDeoptimizations(){this.deoptimized=true;this.callee.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ri,ui);this.context.requestTreeshakingPass()}}class ObjectExpression extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}render(e,t,{renderedSurroundingElement:i}=q){super.render(e,t);if(i===tn||i===Ys){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}applyDeoptimizations(){}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}let e=kn;const t=[];for(const i of this.properties){if(i instanceof SpreadElement){t.push({key:ti,kind:"init",property:i});continue}let s;if(i.computed){const e=i.key.getLiteralValueAtPath(ri,ui,this);if(typeof e==="symbol"){t.push({key:ti,kind:i.kind,property:i});continue}else{s=String(e)}}else{s=i.key instanceof Identifier?i.key.name:String(i.key.value);if(s==="__proto__"&&i.kind==="init"){e=i.value instanceof Literal&&i.value.value===null?null:i.value;continue}}t.push({key:s,kind:i.kind,property:i})}return this.objectEntity=new ObjectEntity(t,e)}}class PrivateIdentifier extends NodeBase{}function getOriginalLocation(e,t){const i=e.filter((e=>!!e.mappings));e:while(i.length>0){const e=i.pop();const s=e.mappings[t.line-1];if(s){const e=s.filter((e=>e.length>1));const i=e[e.length-1];for(const s of e){if(s[0]>=t.column||s===i){t={column:s[3],line:s[2]+1};continue e}}}throw new Error("Can't resolve original location of error.")}return t}class Program extends NodeBase{constructor(){super(...arguments);this.hasCachedEffect=null;this.hasLoggedEffect=false}hasCachedEffects(){if(!this.included){return false}return this.hasCachedEffect===null?this.hasCachedEffect=this.hasEffects(createHasEffectsContext()):this.hasCachedEffect}hasEffects(e){for(const t of this.body){if(t.hasEffects(e)){if(this.context.options.experimentalLogSideEffects&&!this.hasLoggedEffect){this.hasLoggedEffect=true;const{code:e,module:i}=this.context;const{line:s,column:n}=locate(e,t.start,{offsetLine:1});console.log(`First side effect in ${relativeId(i.id)} is at (${s}:${n})\n${getCodeFrame(e,s,n)}`);try{const{column:e,line:t}=getOriginalLocation(i.sourcemapChain,{column:n,line:s});if(t!==s){console.log(`Original location is at (${t}:${e})\n${getCodeFrame(i.originalCode,t,e)}\n`)}}catch{}console.log()}return this.hasCachedEffect=true}}return false}include(e,t){this.included=true;for(const i of this.body){if(t||i.shouldBeIncluded(e)){i.include(e,t)}}}render(e,t){let i=this.start;if(e.original.startsWith("#!")){i=Math.min(e.original.indexOf("\n")+1,this.end);e.remove(0,i)}if(this.body.length>0){while(e.original[i]==="/"&&/[*/]/.test(e.original[i+1])){const t=findFirstLineBreakOutsideComment(e.original.slice(i,this.body[0].start));if(t[0]===-1){break}i+=t[1]}renderStatementList(this.body,e,i,this.end,t)}else{super.render(e,t)}}applyDeoptimizations(){}}class Property extends MethodBase{constructor(){super(...arguments);this.declarationInit=null}declare(e,t){this.declarationInit=t;return this.value.declare(e,pi)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return this.parent.type==="ObjectPattern"&&t==="always"||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){if(!this.shorthand){this.key.render(e,t)}this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=true;if(this.declarationInit!==null){this.declarationInit.deoptimizePath([ti,ti]);this.context.requestTreeshakingPass()}}}class PropertyDefinition extends NodeBase{deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.value?.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizePath(e){this.value?.deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.value?this.value.getLiteralValueAtPath(e,t,i):hi}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,i,s):fi}hasEffects(e){return this.key.hasEffects(e)||this.static&&!!this.value?.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){}}class ReturnStatement extends NodeBase{hasEffects(e){if(!e.ignore.returnYield||this.argument?.hasEffects(e))return true;e.brokenFlow=true;return false}include(e,t){this.included=true;this.argument?.include(e,t);e.brokenFlow=true}initialise(){this.scope.addReturnExpression(this.argument||pi)}render(e,t){if(this.argument){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+6){e.prependLeft(this.start+6," ")}}}}class SequenceExpression extends NodeBase{deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.expressions[this.expressions.length-1].deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}getLiteralValueAtPath(e,t,i){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,i)}hasEffects(e){for(const t of this.expressions){if(t.hasEffects(e))return true}return false}hasEffectsOnInteractionAtPath(e,t,i){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.expressions[this.expressions.length-1];for(const s of this.expressions){if(t||s===i&&!(this.parent instanceof ExpressionStatement)||s.shouldBeIncluded(e))s.include(e,t)}}render(e,t,{renderedParentType:i,isCalleeOfRenderedParent:s,preventASI:n}=q){let r=0;let o=null;const l=this.expressions[this.expressions.length-1];for(const{node:c,separator:u,start:h,end:d}of getCommaSeparatedNodesWithBoundaries(this.expressions,e,this.start,this.end)){if(!c.included){treeshakeNode(c,e,h,d);continue}r++;o=u;if(r===1&&n){removeLineBreaks(e,h,c.start)}if(r===1){const n=i||this.parent.type;c.render(e,t,{isCalleeOfRenderedParent:s&&c===l,renderedParentType:n,renderedSurroundingElement:n})}else{c.render(e,t)}}if(o){e.remove(o,this.end)}}}class StaticBlock extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){for(const t of this.body){if(t.hasEffects(e))return true}return false}include(e,t){this.included=true;for(const i of this.body){if(t||i.shouldBeIncluded(e))i.include(e,t)}}render(e,t){if(this.body.length>0){const i=findFirstOccurrenceOutsideComment(e.original.slice(this.start,this.end),"{")+1;renderStatementList(this.body,e,this.start+i,this.end-1,t)}else{super.render(e,t)}}}class Super extends NodeBase{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizePath(e){this.variable.deoptimizePath(e)}include(){if(!this.included){this.included=true;this.context.includeVariableInModule(this.variable)}}}class SwitchCase extends NodeBase{hasEffects(e){if(this.test?.hasEffects(e))return true;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return true}return false}include(e,t){this.included=true;this.test?.include(e,t);for(const i of this.consequent){if(t||i.shouldBeIncluded(e))i.include(e,t)}}render(e,t,i){if(this.consequent.length>0){this.test&&this.test.render(e,t);const s=this.test?this.test.end:findFirstOccurrenceOutsideComment(e.original,"default",this.start)+7;const n=findFirstOccurrenceOutsideComment(e.original,":",s)+1;renderStatementList(this.consequent,e,n,i.end,t)}else{super.render(e,t)}}}SwitchCase.prototype.needsBoundaries=true;class SwitchStatement extends NodeBase{createScope(e){this.parentScope=e;this.scope=new BlockScope(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return true;const{brokenFlow:t,hasBreak:i,ignore:s}=e;const{breaks:n}=s;s.breaks=true;e.hasBreak=false;let r=true;for(const i of this.cases){if(i.hasEffects(e))return true;r&&(r=e.brokenFlow&&!e.hasBreak);e.hasBreak=false;e.brokenFlow=t}if(this.defaultCase!==null){e.brokenFlow=r}s.breaks=n;e.hasBreak=i;return false}include(e,t){this.included=true;this.discriminant.include(e,t);const{brokenFlow:i,hasBreak:s}=e;e.hasBreak=false;let n=true;let r=t||this.defaultCase!==null&&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=true}if(!r){const e=createHasEffectsContext();e.ignore.breaks=true;r=o.hasEffects(e)}if(r){o.include(e,t);n&&(n=e.brokenFlow&&!e.hasBreak);e.hasBreak=false;e.brokenFlow=i}else{n=i}}if(r&&this.defaultCase!==null){e.brokenFlow=n}e.hasBreak=s}initialise(){for(let e=0;e<this.cases.length;e++){if(this.cases[e].test===null){this.defaultCase=e;return}}this.defaultCase=null}parseNode(e){this.discriminant=new(this.context.getNodeConstructor(e.discriminant.type))(e.discriminant,this,this.parentScope);super.parseNode(e)}render(e,t){this.discriminant.render(e,t);if(this.cases.length>0){renderStatementList(this.cases,e,this.cases[0].start,this.end-1,t)}}}class TaggedTemplateExpression extends CallExpressionBase{bind(){super.bind();if(this.tag.type===sn){const e=this.tag.name;const t=this.scope.findVariable(e);if(t.isNamespace){this.context.warn(errorCannotCallNamespace(e),this.start)}}}hasEffects(e){try{for(const t of this.quasi.expressions){if(t.hasEffects(e))return true}return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath(ri,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t)}else{this.included=true;this.tag.include(e,t);this.quasi.include(e,t)}this.tag.includeCallArguments(e,this.args);const[i]=this.getReturnExpression();if(!i.included){i.include(e,false)}}initialise(){this.args=[pi,...this.quasi.expressions];this.interaction={args:[this.tag instanceof MemberExpression&&!this.tag.variable?this.tag.object:null,...this.args],type:yi,withNew:false}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:true});this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.tag.deoptimizeArgumentsOnInteractionAtPath(this.interaction,ri,ui);this.context.requestTreeshakingPass()}getReturnExpression(e=ui){if(this.returnExpression===null){this.returnExpression=fi;return this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath(ri,this.interaction,e,this)}return this.returnExpression}}class TemplateElement extends NodeBase{bind(){}hasEffects(){return false}include(){this.included=true}parseNode(e){this.value=e.value;super.parseNode(e)}render(){}}class TemplateLiteral extends NodeBase{deoptimizeArgumentsOnInteractionAtPath(){}getLiteralValueAtPath(e){if(e.length>0||this.quasis.length!==1){return hi}return this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){if(e.length!==1){return fi}return getMemberReturnExpressionWhenCalled(qs,e[0])}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===mi){return e.length>1}if(t.type===yi&&e.length===1){return hasMemberEffectWhenCalled(qs,e[0],t,i)}return true}render(e,t){e.indentExclusionRanges.push([this.start,this.end]);super.render(e,t)}}class UndefinedVariable extends Variable{constructor(){super("undefined")}getLiteralValueAtPath(){return undefined}}class ExportDefaultVariable extends LocalVariable{constructor(e,t,i){super(e,t,t.declaration,i);this.hasId=false;this.originalId=null;this.originalVariable=null;const s=t.declaration;if((s instanceof FunctionDeclaration||s instanceof ClassDeclaration)&&s.id){this.hasId=true;this.originalId=s.id}else if(s instanceof Identifier){this.originalId=s}}addReference(e){if(!this.hasId){this.name=e.name}}forbidName(e){const t=this.getOriginalVariable();if(t===this){super.forbidName(e)}else{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 UndefinedVariable||"syntheticNamespace"in this.originalId.variable))?this.originalId.variable:null}getName(e){const t=this.getOriginalVariable();return t===this?super.getName(e):t.getName(e)}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e=this;let t;const i=new Set;do{i.add(e);t=e;e=t.getDirectOriginalVariable()}while(e instanceof ExportDefaultVariable&&!i.has(e));return this.originalVariable=e||t}}class ModuleScope extends ChildScope{constructor(e,t){super(e);this.context=t;this.variables.set("this",new LocalVariable("this",null,Ts,t))}addExportDefaultDeclaration(e,t,i){const s=new ExportDefaultVariable(e,t,i);this.variables.set("default",s);return s}addNamespaceMemberAccess(){}deconflict(e,t,i){for(const s of this.children)s.deconflict(e,t,i)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t){return t}const i=this.context.traceVariable(e)||this.parent.findVariable(e);if(i instanceof GlobalVariable){this.accessedOutsideVariables.set(e,i)}return i}}class ThisExpression extends NodeBase{bind(){this.variable=this.scope.findVariable("this")}deoptimizeArgumentsOnInteractionAtPath(e,t,i){this.variable.deoptimizeArgumentsOnInteractionAtPath(e,t,i)}deoptimizePath(e){this.variable.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,i){if(e.length===0){return t.type!==mi}return this.variable.hasEffectsOnInteractionAtPath(e,t,i)}include(){if(!this.included){this.included=true;this.context.includeVariableInModule(this.variable)}}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof ModuleScope?this.context.moduleContext:null;if(this.alias==="undefined"){this.context.warn(errorThisIsUndefined(),this.start)}}render(e){if(this.alias!==null){e.overwrite(this.start,this.end,this.alias,{contentOnly:false,storeName:true})}}}class ThrowStatement extends NodeBase{hasEffects(){return true}include(e,t){this.included=true;this.argument.include(e,t);e.brokenFlow=true}render(e,t){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+5){e.prependLeft(this.start+5," ")}}}class TryStatement extends NodeBase{constructor(){super(...arguments);this.directlyIncluded=false;this.includedLabelsAfterBlock=null}hasEffects(e){return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!this.finalizer?.hasEffects(e)}include(e,t){const i=this.context.options.treeshake?.tryCatchDeoptimization;const{brokenFlow:s,includedLabels:n}=e;if(!this.directlyIncluded||!i){this.included=true;this.directlyIncluded=true;this.block.include(e,i?xn:t);if(n.size>0){this.includedLabelsAfterBlock=[...n]}e.brokenFlow=s}else if(this.includedLabelsAfterBlock){for(const e of this.includedLabelsAfterBlock){n.add(e)}}if(this.handler!==null){this.handler.include(e,t);e.brokenFlow=s}this.finalizer?.include(e,t)}}const $r={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>hi,typeof:e=>typeof e,void:()=>undefined,"~":e=>~e};class UnaryExpression extends NodeBase{getLiteralValueAtPath(e,t,i){if(e.length>0)return hi;const s=this.argument.getLiteralValueAtPath(ri,t,i);if(typeof s==="symbol")return hi;return $r[this.operator](s)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();if(this.operator==="typeof"&&this.argument instanceof Identifier)return false;return this.argument.hasEffects(e)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath(ri,xi,e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==mi||e.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=true;if(this.operator==="delete"){this.argument.deoptimizePath(ri);this.context.requestTreeshakingPass()}}}class UnknownNode extends NodeBase{hasEffects(){return true}include(e){super.include(e,true)}}class UpdateExpression extends NodeBase{hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return this.argument.hasEffectsAsAssignmentTarget(e,true)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t!==mi}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;this.argument.includeAsAssignmentTarget(e,t,true)}initialise(){this.argument.setAssignedValue(pi)}render(e,t){const{exportNamesByVariable:i,format:s,snippets:{_:n}}=t;this.argument.render(e,t);if(s==="system"){const s=this.argument.variable;const r=i.get(s);if(r){if(this.prefix){if(r.length===1){renderSystemExportExpression(s,this.start,this.end,e,t)}else{renderSystemExportSequenceAfterExpression(s,this.start,this.end,this.parent.type!==tn,e,t)}}else{const i=this.operator[0];renderSystemExportSequenceBeforeExpression(s,this.start,this.end,this.parent.type!==tn,e,t,`${n}${i}${n}1`)}}}}applyDeoptimizations(){this.deoptimized=true;this.argument.deoptimizePath(ri);if(this.argument instanceof Identifier){const e=this.scope.findVariable(this.argument.name);e.isReassigned=true}this.context.requestTreeshakingPass()}}function areAllDeclarationsIncludedAndNotExported(e,t){for(const i of e){if(!i.id.included)return false;if(i.id.type===sn){if(t.has(i.id.variable))return false}else{const e=[];i.id.addExportedVariables(e,t);if(e.length>0)return false}}return true}class VariableDeclaration extends NodeBase{deoptimizePath(){for(const e of this.declarations){e.deoptimizePath(ri)}}hasEffectsOnInteractionAtPath(){return false}include(e,t,{asSingleStatement:i}=q){this.included=true;for(const s of this.declarations){if(t||s.shouldBeIncluded(e))s.include(e,t);const{id:n,init:r}=s;if(i){n.include(e,t)}if(r&&n.included&&!r.included&&(n instanceof ObjectPattern||n instanceof ArrayPattern)){r.include(e,t)}}}initialise(){for(const e of this.declarations){e.declareDeclarator(this.kind)}}render(e,t,i=q){if(areAllDeclarationsIncludedAndNotExported(this.declarations,t.exportNamesByVariable)){for(const i of this.declarations){i.render(e,t)}if(!i.isNoStatement&&e.original.charCodeAt(this.end-1)!==59){e.appendLeft(this.end,";")}}else{this.renderReplacedDeclarations(e,t)}}applyDeoptimizations(){}renderDeclarationEnd(e,t,i,s,n,r,o){if(e.original.charCodeAt(this.end-1)===59){e.remove(this.end-1,this.end)}t+=";";if(i===null){e.appendLeft(n,t)}else{if(e.original.charCodeAt(s-1)===10&&(e.original.charCodeAt(this.end)===10||e.original.charCodeAt(this.end)===13)){s--;if(e.original.charCodeAt(s)===13){s--}}if(s===i+1){e.overwrite(i,n,t)}else{e.overwrite(i,i+1,t);e.remove(s,n)}}if(r.length>0){e.appendLeft(n,` ${getSystemExportStatement(r,o)};`)}}renderReplacedDeclarations(e,t){const i=getCommaSeparatedNodesWithBoundaries(this.declarations,e,this.start+this.kind.length,this.end-(e.original.charCodeAt(this.end-1)===59?1:0));let s,n;n=findNonWhiteSpace(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o=false;let l=false;let c="",u,h;const d=[];const p=gatherSystemExportsAndGetSingleExport(i,t,d);for(const{node:d,start:f,separator:m,contentEnd:g,end:y}of i){if(!d.included){e.remove(f,y);continue}d.render(e,t);u="";h="";if(!d.id.included||d.id instanceof Identifier&&isReassignedExportsMember(d.id.variable,t.exportNamesByVariable)){if(l){c+=";"}o=false}else{if(p&&p===d.id.variable){const i=findFirstOccurrenceOutsideComment(e.original,"=",d.id.end);renderSystemExportExpression(p,findNonWhiteSpace(e.original,i+1),m===null?g:m,e,t)}if(o){c+=","}else{if(l){c+=";"}u+=`${this.kind} `;o=true}}if(n===r+1){e.overwrite(r,n,c+u)}else{e.overwrite(r,r+1,c);e.appendLeft(n,u)}s=g;n=y;l=true;r=m;c=h}this.renderDeclarationEnd(e,c,r,s,n,d,t)}}function gatherSystemExportsAndGetSingleExport(e,t,i){let s=null;if(t.format==="system"){for(const{node:n}of e){if(n.id instanceof Identifier&&n.init&&i.length===0&&t.exportNamesByVariable.get(n.id.variable)?.length===1){s=n.id.variable;i.push(s)}else{n.id.addExportedVariables(i,t.exportNamesByVariable)}}if(i.length>1){s=null}else if(s){i.length=0}}return s}class WhileStatement extends NodeBase{hasEffects(e){if(this.test.hasEffects(e))return true;return hasLoopBodyEffects(e,this.body)}include(e,t){this.included=true;this.test.include(e,t);includeLoopBody(e,this.body,t)}}class YieldExpression extends NodeBase{hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return!(e.ignore.returnYield&&!this.argument?.hasEffects(e))}render(e,t){if(this.argument){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+5){e.prependLeft(this.start+5," ")}}}}const Or={ArrayExpression:ArrayExpression,ArrayPattern:ArrayPattern,ArrowFunctionExpression:ArrowFunctionExpression,AssignmentExpression:AssignmentExpression,AssignmentPattern:AssignmentPattern,AwaitExpression:AwaitExpression,BinaryExpression:BinaryExpression,BlockStatement:BlockStatement,BreakStatement:BreakStatement,CallExpression:CallExpression,CatchClause:CatchClause,ChainExpression:ChainExpression,ClassBody:ClassBody,ClassDeclaration:ClassDeclaration,ClassExpression:ClassExpression,ConditionalExpression:ConditionalExpression,ContinueStatement:ContinueStatement,DoWhileStatement:DoWhileStatement,EmptyStatement:EmptyStatement,ExportAllDeclaration:ExportAllDeclaration,ExportDefaultDeclaration:ExportDefaultDeclaration,ExportNamedDeclaration:ExportNamedDeclaration,ExportSpecifier:ExportSpecifier,ExpressionStatement:ExpressionStatement,ForInStatement:ForInStatement,ForOfStatement:ForOfStatement,ForStatement:ForStatement,FunctionDeclaration:FunctionDeclaration,FunctionExpression:FunctionExpression,Identifier:Identifier,IfStatement:IfStatement,ImportAttribute:ImportAttribute,ImportDeclaration:ImportDeclaration,ImportDefaultSpecifier:ImportDefaultSpecifier,ImportExpression:ImportExpression,ImportNamespaceSpecifier:ImportNamespaceSpecifier,ImportSpecifier:ImportSpecifier,LabeledStatement:LabeledStatement,Literal:Literal,LogicalExpression:LogicalExpression,MemberExpression:MemberExpression,MetaProperty:MetaProperty,MethodDefinition:MethodDefinition,NewExpression:NewExpression,ObjectExpression:ObjectExpression,ObjectPattern:ObjectPattern,PrivateIdentifier:PrivateIdentifier,Program:Program,Property:Property,PropertyDefinition:PropertyDefinition,RestElement:RestElement,ReturnStatement:ReturnStatement,SequenceExpression:SequenceExpression,SpreadElement:SpreadElement,StaticBlock:StaticBlock,Super:Super,SwitchCase:SwitchCase,SwitchStatement:SwitchStatement,TaggedTemplateExpression:TaggedTemplateExpression,TemplateElement:TemplateElement,TemplateLiteral:TemplateLiteral,ThisExpression:ThisExpression,ThrowStatement:ThrowStatement,TryStatement:TryStatement,UnaryExpression:UnaryExpression,UnknownNode:UnknownNode,UpdateExpression:UpdateExpression,VariableDeclaration:VariableDeclaration,VariableDeclarator:VariableDeclarator,WhileStatement:WhileStatement,YieldExpression:YieldExpression};const Tr="_missingExportShim";class ExportShimVariable extends Variable{constructor(e){super(Tr);this.module=e}include(){super.include();this.module.needsExportShim=true}}class NamespaceVariable extends Variable{constructor(e){super(e.getModuleName());this.memberVariables=null;this.mergedNamespaces=[];this.referencedEarly=false;this.references=[];this.context=e;this.module=e.module}addReference(e){this.references.push(e);this.name=e.name}deoptimizeArgumentsOnInteractionAtPath(e,t,i){if(t.length>1||t.length===1&&e.type===yi){const s=t[0];if(typeof s==="string"){this.getMemberVariables()[s]?.deoptimizeArgumentsOnInteractionAtPath(e,t.slice(1),i)}else{deoptimizeInteraction(e)}}}deoptimizePath(e){if(e.length>1){const t=e[0];if(typeof t==="string"){this.getMemberVariables()[t]?.deoptimizePath(e.slice(1))}}}getLiteralValueAtPath(e){if(e[0]===ni){return"Module"}return hi}getMemberVariables(){if(this.memberVariables){return this.memberVariables}const e=Object.create(null);const t=[...this.context.getExports(),...this.context.getReexports()].sort();for(const i of t){if(i[0]!=="*"&&i!==this.module.info.syntheticNamedExports){const t=this.context.traceExport(i);if(t){e[i]=t}}}return this.memberVariables=e}hasEffectsOnInteractionAtPath(e,t,i){const{type:s}=t;if(e.length===0){return true}if(e.length===1&&s!==yi){return s===gi}const n=e[0];if(typeof n!=="string"){return true}const r=this.getMemberVariables()[n];return!r||r.hasEffectsOnInteractionAtPath(e.slice(1),t,i)}include(){this.included=true;this.context.includeAllExports()}prepare(e){if(this.mergedNamespaces.length>0){this.module.scope.addAccessedGlobals([br],e)}}renderBlock(e){const{exportNamesByVariable:t,format:i,freeze:s,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}}=e;const p=this.getMemberVariables();const f=Object.entries(p).filter((([e,t])=>t.included)).map((([e,t])=>{if(this.referencedEarly||t.isReassigned||t===this){return[null,`get ${e}${o}()${o}{${o}return ${t.getName(u)}${d}${o}}`]}return[e,t.getName(u)]}));f.unshift([null,`__proto__:${o}null`]);let m=c(f,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(u)));m=`/*#__PURE__*/${br}(${m},${o}[${e.join(`,${o}`)}])`}else{if(r){m=`/*#__PURE__*/Object.defineProperty(${m},${o}Symbol.toStringTag,${o}${getToStringTagValue(c)})`}if(s){m=`/*#__PURE__*/Object.freeze(${m})`}}const g=this.getName(u);m=`${l} ${g}${o}=${o}${m};`;if(i==="system"&&t.has(this)){m+=`${h}${getSystemExportStatement([this],e)};`}return m}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){if(e.context.getModuleExecIndex()<=t){this.referencedEarly=true;break}}}}NamespaceVariable.prototype.isNamespace=true;class SyntheticNamedExportVariable extends Variable{constructor(e,t,i){super(t);this.baseVariable=null;this.context=e;this.module=e.module;this.syntheticNamespace=i}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;while(e instanceof ExportDefaultVariable||e instanceof SyntheticNamedExportVariable){if(e instanceof ExportDefaultVariable){const t=e.getOriginalVariable();if(t===e)break;e=t}if(e instanceof SyntheticNamedExportVariable){e=e.syntheticNamespace}}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=true;this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var Dr;(function(e){e[e["LOAD_AND_PARSE"]=0]="LOAD_AND_PARSE";e[e["ANALYSE"]=1]="ANALYSE";e[e["GENERATE"]=2]="GENERATE"})(Dr||(Dr={}));function getId(e){return e.id}function getAssertionsFromImportExpression(e){const t=e.arguments?.[0]?.properties.find((e=>getPropertyKey(e)==="assert"))?.value;if(!t){return K}const i=t.properties.map((e=>{const t=getPropertyKey(e);if(typeof t==="string"&&typeof e.value.value==="string"){return[t,e.value.value]}return null})).filter((e=>!!e));if(i.length>0){return Object.fromEntries(i)}return K}const getPropertyKey=e=>{const t=e.key;return t&&(t.name||t.value)};function getAssertionsFromImportExportDeclaration(e){return e?.length?Object.fromEntries(e.map((e=>[getPropertyKey(e),e.value.value]))):K}function doAssertionsDiffer(e,t){const i=Object.keys(e);return i.length!==Object.keys(t).length||i.some((i=>e[i]!==t[i]))}let Mr=new Map;function getPersistedLabel(e,t){switch(t){case 1:{return`# ${e}`}case 2:{return`## ${e}`}case 3:{return e}default:{return`${" ".repeat(t-4)}- ${e}`}}}function timeStartImpl(e,t=3){e=getPersistedLabel(e,t);const i=s.memoryUsage().heapUsed;const n=l.performance.now();const r=Mr.get(e);if(r===undefined){Mr.set(e,{memory:0,startMemory:i,startTime:n,time:0,totalMemory:0})}else{r.startMemory=i;r.startTime=n}}function timeEndImpl(e,t=3){e=getPersistedLabel(e,t);const i=Mr.get(e);if(i!==undefined){const e=s.memoryUsage().heapUsed;i.memory+=e-i.startMemory;i.time+=l.performance.now()-i.startTime;i.totalMemory=Math.max(i.totalMemory,e)}}function getTimings(){const e={};for(const[t,{memory:i,time:s,totalMemory:n}]of Mr){e[t]=[s,i,n]}return e}let Lr=doNothing;let Br=doNothing;const Fr=["augmentChunkHash","buildEnd","buildStart","generateBundle","load","moduleParsed","options","outputOptions","renderChunk","renderDynamicImport","renderStart","resolveDynamicImport","resolveFileUrl","resolveId","resolveImportMeta","shouldTransformCachedModule","transform","writeBundle"];function getPluginWithTimers(e,t){for(const i of Fr){if(i in e){let s=`plugin ${t}`;if(e.name){s+=` (${e.name})`}s+=` - ${i}`;const handler=function(...e){Lr(s,4);const t=n.apply(this,e);Br(s,4);return t};let n;if(typeof e[i].handler==="function"){n=e[i].handler;e[i].handler=handler}else{n=e[i];e[i]=handler}}}return e}function initialiseTimers(e){if(e.perf){Mr=new Map;Lr=timeStartImpl;Br=timeEndImpl;e.plugins=e.plugins.map(getPluginWithTimers)}else{Lr=doNothing;Br=doNothing}}function markModuleAndImpureDependenciesAsExecuted(e){e.isExecuted=true;const t=[e];const i=new Set;for(const e of t){for(const s of[...e.dependencies,...e.implicitlyLoadedBefore]){if(!(s instanceof ExternalModule)&&!s.isExecuted&&(s.info.moduleSideEffects||e.implicitlyLoadedBefore.has(s))&&!i.has(s.id)){s.isExecuted=true;i.add(s.id);t.push(s)}}}}const Vr={identifier:null,localName:Tr};function getVariableForExportNameRecursive(e,t,i,s,n=new Map){const r=n.get(t);if(r){if(r.has(e)){return s?[null]:error(errorCircularReexport(t,e.id))}r.add(e)}else{n.set(t,new Set([e]))}return e.getVariableForExportName(t,{importerForSideEffects:i,isExportAllSearch:s,searchedNamesAndModules:n})}function getAndExtendSideEffectModules(e,t){const i=getOrCreate(t.sideEffectDependenciesByVariable,e,getNewSet);let s=e;const n=new Set([s]);while(true){const e=s.module;s=s instanceof ExportDefaultVariable?s.getDirectOriginalVariable():s instanceof SyntheticNamedExportVariable?s.syntheticNamespace:null;if(!s||n.has(s)){break}n.add(s);i.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t){for(const e of t){i.add(e)}}}return i}class Module{constructor(e,t,i,s,n,r,o,l){this.graph=e;this.id=t;this.options=i;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=Infinity;this.implicitlyLoadedAfter=new Set;this.implicitlyLoadedBefore=new Set;this.importDescriptions=new Map;this.importMetas=[];this.importedFromNotTreeshaken=false;this.importers=[];this.includedDynamicImporters=[];this.includedImports=new Set;this.isExecuted=false;this.isUserDefinedEntryPoint=false;this.needsExportShim=false;this.sideEffectDependenciesByVariable=new Map;this.sourcesWithAssertions=new Map;this.allExportNames=null;this.ast=null;this.exportAllModules=[];this.exportAllSources=new Set;this.exportNamesByVariable=null;this.exportShimVariable=new ExportShimVariable(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=i.moduleContext(t);this.preserveSignature=this.options.preserveEntrySignatures;const c=this;const{dynamicImports:u,dynamicImporters:h,exportAllSources:d,exports:p,implicitlyLoadedAfter:f,implicitlyLoadedBefore:m,importers:g,reexportDescriptions:y,sourcesWithAssertions:E}=this;this.info={assertions:l,ast:null,code:null,get dynamicallyImportedIdResolutions(){return u.map((({argument:e})=>typeof e==="string"&&c.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return u.map((({id:e})=>e)).filter((e=>e!=null))},get dynamicImporters(){return h.sort()},get exportedBindings(){const e={".":[...p.keys()]};for(const[t,{source:i}]of y){(e[i]??(e[i]=[])).push(t)}for(const t of d){(e[t]??(e[t]=[])).push("*")}return e},get exports(){return[...p.keys(),...y.keys(),...[...d].map((()=>"*"))]},get hasDefaultExport(){if(!c.ast){return null}return c.exports.has("default")||y.has("default")},get hasModuleSideEffects(){warnDeprecation("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",W,true,i);return this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(f,getId).sort()},get implicitlyLoadedBefore(){return Array.from(m,getId).sort()},get importedIdResolutions(){return Array.from(E.keys(),(e=>c.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(E.keys(),(e=>c.resolvedIds[e]?.id)).filter(Boolean)},get importers(){return g.sort()},isEntry:s,isExternal:false,get isIncluded(){if(e.phase!==Dr.GENERATE){return null}return c.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:false})}basename(){const e=r.basename(this.id);const t=r.extname(this.id);return makeLegal(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){this.addLocationToLogProps(e,t);return error(e)}estimateSize(){let e=0;for(const t of this.ast.body){if(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 ExternalModule){this.allExportNames.add(`*${e.id}`);continue}for(const t of e.getAllExportNames()){if(t!=="default")this.allExportNames.add(t)}}if(typeof this.info.syntheticNamedExports==="string"){this.allExportNames.delete(this.info.syntheticNamedExports)}return this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set;const t=new Set;const i=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);if(t){i.add(t)}}}for(let s of i){const i=this.sideEffectDependenciesByVariable.get(s);if(i){for(const e of i){t.add(e)}}if(s instanceof SyntheticNamedExportVariable){s=s.getBaseVariable()}else if(s instanceof ExportDefaultVariable){s=s.getOriginalVariable()}e.add(s.module)}if(!this.options.treeshake||this.info.moduleSideEffects==="no-treeshake"){for(const e of this.dependencies){this.relevantDependencies.add(e)}}else{this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t)}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[i]=this.getVariableForExportName(t);if(i instanceof ExportDefaultVariable){i=i.getOriginalVariable()}if(!i||!(i.included||i instanceof ExternalVariable)){continue}const s=e.get(i);if(s){s.push(t)}else{e.set(i,[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 ExternalModule){e.add(`*${t.id}`)}else{for(const i of[...t.getReexports(),...t.getExports()]){if(i!=="default")e.add(i)}}}return this.transitiveReexports=[...e]}getRenderedExports(){const e=[];const t=[];for(const i of this.exports.keys()){const[s]=this.getVariableForExportName(i);(s&&s.included?e:t).push(i)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){if(this.syntheticNamespace===null){this.syntheticNamespace=undefined;[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports==="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:true})}if(!this.syntheticNamespace){return error(errorSyntheticNamedExportsNeedNamespaceExport(this.id,this.info.syntheticNamedExports))}return this.syntheticNamespace}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:i,onlyExplicit:s,searchedNamesAndModules:n}=K){if(e[0]==="*"){if(e.length===1){return[this.namespace]}const t=this.graph.modulesById.get(e.slice(1));return t.getVariableForExportName("*")}const r=this.reexportDescriptions.get(e);if(r){const[e]=getVariableForExportNameRecursive(r.module,r.localName,t,false,n);if(!e){return this.error(errorMissingExport(r.localName,this.id,r.module.id),r.start)}if(t){setAlternativeExporterIfCyclic(e,t,this);if(this.info.moduleSideEffects){getOrCreate(t.sideEffectDependenciesByVariable,e,getNewSet).add(this)}}return[e]}const o=this.exports.get(e);if(o){if(o===Vr){return[this.exportShimVariable]}const e=o.localName;const i=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});if(t){setAlternativeExporterIfCyclic(i,t,this);getOrCreate(t.sideEffectDependenciesByVariable,i,getNewSet).add(this)}return[i]}if(s){return[null]}if(e!=="default"){const i=this.namespaceReexportsByName.get(e)??this.getVariableFromNamespaceReexports(e,t,n);this.namespaceReexportsByName.set(e,i);if(i[0]){return i}}if(this.info.syntheticNamedExports){return[getOrCreate(this.syntheticExports,e,(()=>new SyntheticNamedExportVariable(this.astContext,e,this.getSyntheticNamespace())))]}if(!i&&this.options.shimMissingExports){this.shimMissingExport(e);return[this.exportShimVariable]}return[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.hasCachedEffects()}include(){const e=createInclusionContext();if(this.ast.shouldBeIncluded(e))this.ast.include(e,false)}includeAllExports(e){if(!this.isExecuted){markModuleAndImpureDependenciesAsExecuted(this);this.graph.needsTreeshakingPass=true}for(const t of this.exports.keys()){if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(oi);if(!e.included){this.includeVariable(e)}}}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);if(t){t.deoptimizePath(oi);if(!t.included){this.includeVariable(t)}if(t instanceof ExternalVariable){t.module.reexported=true}}}if(e){this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}}includeAllInBundle(){this.ast.include(createInclusionContext(),true);this.includeAllExports(false)}includeExportsByNames(e){if(!this.isExecuted){markModuleAndImpureDependenciesAsExecuted(this);this.graph.needsTreeshakingPass=true}let t=false;for(const i of e){const e=this.getVariableForExportName(i)[0];if(e){e.deoptimizePath(oi);if(!e.included){this.includeVariable(e)}}if(!this.exports.has(i)&&!this.reexportDescriptions.has(i)){t=true}}if(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 i=this.graph.modulesById.get(this.resolvedIds[t].id);if(i instanceof ExternalModule){e.push(i);continue}this.exportAllModules.push(i)}this.exportAllModules.push(...e)}render(e){const t=this.magicString.clone();this.ast.render(t,e);t.trim();const{usesTopLevelAwait:i}=this.astContext;if(i&&e.format!=="es"&&e.format!=="system"){return error(errorInvalidFormatForTopLevelAwait(this.id,e.format))}return{source:t,usesTopLevelAwait:i}}setSource({ast:e,code:t,customTransformCache:i,originalCode:s,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:l,transformFiles:c,...u}){Lr("generate ast",3);this.info.code=t;this.originalCode=s;this.originalSourcemap=n;this.sourcemapChain=o;if(c){this.transformFiles=c}this.transformDependencies=l;this.customTransformCache=i;this.updateOptions(u);const h=e??this.tryParse();Br("generate ast",3);Lr("analyze ast",3);this.resolvedIds=r??Object.create(null);const d=this.id;this.magicString=new MagicString(t,{filename:this.excludeFromSourcemap?null:d,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:d,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>Or[e]||Or.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(true),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),magicString:this.magicString,manualPureFunctions:this.graph.pureFunctions,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=true,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:false,warn:this.warn.bind(this)};this.scope=new ModuleScope(this.graph.scope,this.astContext);this.namespace=new NamespaceVariable(this.astContext);this.ast=new Program(h,{context:this.astContext,type:"Module"},this.scope);if(e||this.options.cache!==false){this.info.ast=h}else{Object.defineProperty(this.info,"ast",{get:()=>{if(this.graph.astLru.has(d)){return this.graph.astLru.get(d)}else{const e=this.tryParse();this.graph.astLru.set(d,e);return e}}})}Br("analyze ast",3)}toJSON(){return{assertions:this.info.assertions,ast:this.info.ast,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,getId),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:i,searchedNamesAndModules:s}=K){const n=this.scope.variables.get(e);if(n){return n}const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof Module&&r.name==="*"){return e.namespace}const[n]=getVariableForExportNameRecursive(e,r.name,t||this,i,s);if(!n){return this.error(errorMissingExport(r.name,this.id,e.id),r.start)}return n}return null}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:i}){if(t!=null){this.info.moduleSideEffects=t}if(i!=null){this.info.syntheticNamedExports=i}if(e!=null){Object.assign(this.info.meta,e)}}warn(e,t){this.addLocationToLogProps(e,t);this.options.onwarn(e)}addDynamicImport(e){let t=e.source;if(t instanceof TemplateLiteral){if(t.quasis.length===1&&t.quasis[0].value.cooked){t=t.quasis[0].value.cooked}}else if(t instanceof Literal&&typeof t.value==="string"){t=t.value}this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof ExportDefaultDeclaration){this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"})}else if(e instanceof ExportAllDeclaration){const t=e.source.value;this.addSource(t,e);if(e.exported){const i=e.exported.name;this.reexportDescriptions.set(i,{localName:"*",module:null,source:t,start:e.start})}else{this.exportAllSources.add(t)}}else if(e.source instanceof Literal){const t=e.source.value;this.addSource(t,e);for(const{exported:i,local:s,start:n}of e.specifiers){const e=i instanceof Literal?i.value:i.name;this.reexportDescriptions.set(e,{localName:s instanceof Literal?s.value:s.name,module:null,source:t,start:n})}}else if(e.declaration){const t=e.declaration;if(t instanceof VariableDeclaration){for(const e of t.declarations){for(const t of _s(e.id)){this.exports.set(t,{identifier:null,localName:t})}}}else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else{for(const{local:t,exported:i}of e.specifiers){const e=t.name;const s=i instanceof Identifier?i.name:i.value;this.exports.set(s,{identifier:null,localName:e})}}}addImport(e){const t=e.source.value;this.addSource(t,e);for(const i of e.specifiers){const e=i instanceof ImportDefaultSpecifier?"default":i instanceof ImportNamespaceSpecifier?"*":i.imported instanceof Identifier?i.imported.name:i.imported.value;this.importDescriptions.set(i.local.name,{module:null,name:e,source:t,start:i.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id;e.pos=t;let i=this.info.code;const s=locate(i,t,{offsetLine:1});if(s){let{column:n,line:r}=s;try{({column:n,line:r}=getOriginalLocation(this.sourcemapChain,{column:n,line:r}));i=this.originalCode}catch(e){this.options.onwarn(errorInvalidSourcemapForError(e,this.id,n,r,t))}augmentCodeLocation(e,{column:n,line:r},i,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,i){const s=new Set;const addSideEffectDependencies=n=>{for(const r of n){if(s.has(r)){continue}s.add(r);if(t.has(r)){e.add(r);continue}if(!(r.info.moduleSideEffects||i.has(r))){continue}if(r instanceof ExternalModule||r.hasEffects()){e.add(r);continue}addSideEffectDependencies(r.dependencies)}};addSideEffectDependencies(this.dependencies);addSideEffectDependencies(i)}addSource(e,t){const i=getAssertionsFromImportExportDeclaration(t.assertions);const s=this.sourcesWithAssertions.get(e);if(s){if(doAssertionsDiffer(s,i)){this.warn(errorInconsistentImportAssertions(s,i,e,this.id),t.start)}}else{this.sourcesWithAssertions.set(e,i)}}getVariableFromNamespaceReexports(e,t,i){let s=null;const n=new Map;const r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e){continue}const[l,c]=getVariableForExportNameRecursive(o,e,t,true,copyNameToModulesMap(i));if(o instanceof ExternalModule||c){r.add(l)}else if(l instanceof SyntheticNamedExportVariable){if(!s){s=l}}else if(l){n.set(l,o)}}if(n.size>0){const t=[...n];const i=t[0][0];if(t.length===1){return[i]}this.options.onwarn(errorNamespaceConflict(e,this.id,t.map((([,e])=>e.id))));return[null]}if(r.size>0){const t=[...r];const i=t[0];if(t.length>1){this.options.onwarn(errorAmbiguousExternalNamespaces(e,this.id,i.module.id,t.map((e=>e.module.id))))}return[i,true]}if(s){return[s]}return[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set;const t=new Set;for(const i of[this,...this.exportAllModules]){if(i instanceof ExternalModule){const[t]=i.getVariableForExportName("*");t.include();this.includedImports.add(t);e.add(t)}else if(i.info.syntheticNamedExports){const e=i.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 Module){t.includedDynamicImporters.push(this);const i=this.options.treeshake?e.getDeterministicImportedNames():undefined;if(i){t.includeExportsByNames(i)}else{t.includeAllExports(true)}}}includeVariable(e){if(!e.included){e.include();this.graph.needsTreeshakingPass=true;const t=e.module;if(t instanceof Module){if(!t.isExecuted){markModuleAndImpureDependenciesAsExecuted(t)}if(t!==this){const t=getAndExtendSideEffectModules(e,this);for(const e of t){if(!e.isExecuted){markModuleAndImpureDependenciesAsExecuted(e)}}}}}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;if(t&&t!==this){this.includedImports.add(e)}}shimMissingExport(e){this.options.onwarn(errorShimmedExport(this.id,e));this.exports.set(e,Vr)}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){return this.error(errorParseError(e,this.id),e.pos)}}}function setAlternativeExporterIfCyclic(e,t,i){if(e.module instanceof Module&&e.module!==i){const s=e.module.cycles;if(s.size>0){const n=i.cycles;for(const r of n){if(s.has(r)){t.alternativeReexportModules.set(e,i);break}}}}}const copyNameToModulesMap=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function removeJsExtension(e){return e.endsWith(".js")?e.slice(0,-3):e}function getCompleteAmdId(e,t){if(e.autoId){return`${e.basePath?e.basePath+"/":""}${removeJsExtension(t)}`}return e.id??""}function getExportBlock$1(e,t,i,s,n,r,o,l="return "){const{_:c,getDirectReturnFunction:u,getFunctionIntro:h,getPropertyAccess:d,n:p,s:f}=n;if(!i){return`${p}${p}${l}${getSingleDefaultExport(e,t,s,o,d)};`}let m="";for(const{defaultVariableName:e,importPath:n,isChunk:l,name:h,namedExportsMode:f,namespaceVariableName:g,reexports:y}of t){if(y&&i){for(const t of y){if(t.reexported!=="*"){const i=getReexportedImportName(h,t.imported,f,l,e,g,s,n,o,d);if(m)m+=p;if(t.imported!=="*"&&t.needsLiveBinding){const[e,s]=u([],{functionReturn:true,lineBreakIndent:null,name:null});m+=`Object.defineProperty(exports,${c}'${t.reexported}',${c}{${p}`+`${r}enumerable:${c}true,${p}`+`${r}get:${c}${e}${i}${s}${p}});`}else{m+=`exports${d(t.reexported)}${c}=${c}${i};`}}}}}for(const{exported:t,local:i}of e){const e=`exports${d(t)}`;const s=i;if(e!==s){if(m)m+=p;m+=`${e}${c}=${c}${s};`}}for(const{name:e,reexports:s}of t){if(s&&i){for(const t of s){if(t.reexported==="*"){if(m)m+=p;const i=`{${p}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!exports.hasOwnProperty(k))${c}${getDefineProperty(e,t.needsLiveBinding,r,n)}${f}${p}}`;m+=`Object.keys(${e}).forEach(${h(["k"],{isAsync:false,name:null})}${i});`}}}}if(m){return`${p}${p}${m}`}return""}function getSingleDefaultExport(e,t,i,s,n){if(e.length>0){return e[0].local}else{for(const{defaultVariableName:e,importPath:r,isChunk:o,name:l,namedExportsMode:c,namespaceVariableName:u,reexports:h}of t){if(h){return getReexportedImportName(l,h[0].imported,c,o,e,u,i,r,s,n)}}}}function getReexportedImportName(e,t,i,s,n,r,o,l,c,u){if(t==="default"){if(!s){const t=o(l);const i=vr[t]?n:e;return isDefaultAProperty(t,c)?`${i}${u("default")}`:i}return i?`${e}${u("default")}`:e}if(t==="*"){return(s?!i:Sr[o(l)])?r:e}return`${e}${u(t)}`}function getEsModuleValue(e){return e([["value","true"]],{lineBreakIndent:null})}function getNamespaceMarkers(e,t,i,{_:s,getObject:n}){if(e){if(t){if(i){return`Object.defineProperties(exports,${s}${n([["__esModule",getEsModuleValue(n)],[null,`[Symbol.toStringTag]:${s}${getToStringTagValue(n)}`]],{lineBreakIndent:null})});`}return`Object.defineProperty(exports,${s}'__esModule',${s}${getEsModuleValue(n)});`}if(i){return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${getToStringTagValue(n)});`}}return""}const getDefineProperty=(e,t,i,{_:s,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}`+`${i}${i}enumerable:${s}true,${r}`+`${i}${i}get:${s}${t}${e}[k]${o}${r}${i}})`}return`exports[k]${s}=${s}${e}[k]`};function getInteropBlock(e,t,i,s,n,r,o,l){const{_:c,cnst:u,n:h}=l;const d=new Set;const p=[];const addInteropStatement=(e,t,i)=>{d.add(t);p.push(`${u} ${e}${c}=${c}/*#__PURE__*/${t}(${i});`)};for(const{defaultVariableName:i,imports:s,importPath:n,isChunk:r,name:o,namedExportsMode:l,namespaceVariableName:c,reexports:u}of e){if(r){for(const{imported:e,reexported:t}of[...s||[],...u||[]]){if(e==="*"&&t!=="*"){if(!l){addInteropStatement(c,xr,o)}break}}}else{const e=t(n);let r=false;let l=false;for(const{imported:t,reexported:n}of[...s||[],...u||[]]){let s;let u;if(t==="default"){if(!r){r=true;if(i!==c){u=i;s=vr[e]}}}else if(t==="*"&&n!=="*"&&!l){l=true;s=Sr[e];u=c}if(s){addInteropStatement(u,s,o)}}}}return`${getHelpersBlock(d,r,o,l,i,s,n)}${p.length>0?`${p.join(h)}${h}${h}`:""}`}function addJsExtension(e){return e.endsWith(".js")?e:e+".js"}function updateExtensionForRelativeAmdId(e,t){if(e[0]!=="."){return e}return t?addJsExtension(e):removeJsExtension(e)}const zr=["assert","async_hooks","buffer","child_process","cluster","console","constants","crypto","dgram","diagnostics_channel","dns","domain","events","fs","http","http2","https","inspector","module","net","os","path","perf_hooks","process","punycode","querystring","readline","repl","stream","string_decoder","timers","tls","trace_events","tty","url","util","v8","vm","wasi","worker_threads","zlib"];var jr=zr;const Ur=getDefaultExportFromCjs(jr);const Hr=new Set([...Ur,"assert/strict","dns/promises","fs/promises","path/posix","path/win32","readline/promises","stream/consumers","stream/promises","stream/web","timers/promises","util/types"]);function warnOnBuiltins(e,t){const i=t.map((({importPath:e})=>e)).filter((e=>Hr.has(e)||e.startsWith("node:")));if(i.length===0)return;e(errorMissingNodeBuiltins(i))}function amd(e,{accessedGlobals:t,dependencies:i,exports:s,hasDefaultExport:n,hasExports:r,id:o,indent:l,intro:c,isEntryFacade:u,isModuleFacade:h,namedExportsMode:d,outro:p,snippets:f,onwarn:m},{amd:g,esModule:y,externalLiveBindings:E,freeze:x,interop:b,namespaceToStringTag:v,strict:S}){warnOnBuiltins(m,i);const A=i.map((e=>`'${updateExtensionForRelativeAmdId(e.importPath,g.forceJsExtensionForImports)}'`));const w=i.map((e=>e.name));const{n:I,getNonArrowFunctionIntro:k,_:C}=f;if(d&&r){w.unshift(`exports`);A.unshift(`'exports'`)}if(t.has("require")){w.unshift("require");A.unshift(`'require'`)}if(t.has("module")){w.unshift("module");A.unshift(`'module'`)}const _=getCompleteAmdId(g,o);const P=(_?`'${_}',${C}`:``)+(A.length>0?`[${A.join(`,${C}`)}],${C}`:``);const N=S?`${C}'use strict';`:"";e.prepend(`${c}${getInteropBlock(i,b,E,x,v,t,l,f)}`);const R=getExportBlock$1(s,i,d,b,f,l,E);let $=getNamespaceMarkers(d&&r,u&&(y===true||y==="if-default-prop"&&n),h&&v,f);if($){$=I+I+$}e.append(`${R}${$}${p}`).indent(l).prepend(`${g.define}(${P}(${k(w,{isAsync:false,name:null})}{${N}${I}${I}`).append(`${I}${I}}));`)}function cjs(e,{accessedGlobals:t,dependencies:i,exports:s,hasDefaultExport:n,hasExports:r,indent:o,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:h,outro:d,snippets:p},{compact:f,esModule:m,externalLiveBindings:g,freeze:y,interop:E,namespaceToStringTag:x,strict:b}){const{_:v,n:S}=p;const A=b?`'use strict';${S}${S}`:"";let w=getNamespaceMarkers(h&&r,c&&(m===true||m==="if-default-prop"&&n),u&&x,p);if(w){w+=S+S}const I=getImportBlock$1(i,p,f);const k=getInteropBlock(i,E,g,y,x,t,o,p);e.prepend(`${A}${l}${w}${I}${k}`);const C=getExportBlock$1(s,i,h,E,p,o,g,`module.exports${v}=${v}`);e.append(`${C}${d}`)}function getImportBlock$1(e,{_:t,cnst:i,n:s},n){let r="";let o=false;for(const{importPath:l,name:c,reexports:u,imports:h}of e){if(!u&&!h){if(r){r+=n&&!o?",":`;${s}`}o=false;r+=`require('${l}')`}else{r+=n&&o?",":`${r?`;${s}`:""}${i} `;o=true;r+=`${c}${t}=${t}require('${l}')`}}if(r){return`${r};${s}${s}`}return""}function es(e,{accessedGlobals:t,indent:i,intro:s,outro:n,dependencies:r,exports:o,snippets:l},{externalLiveBindings:c,freeze:u,namespaceToStringTag:h}){const{n:d}=l;const p=getImportBlock(r,l);if(p.length>0)s+=p.join(d)+d+d;s+=getHelpersBlock(null,t,i,l,c,u,h);if(s)e.prepend(s);const f=getExportBlock(o,l);if(f.length>0)e.append(d+d+f.join(d).trim());if(n)e.append(n);e.trim()}function getImportBlock(e,{_:t}){const i=[];for(const{importPath:s,reexports:n,imports:r,name:o,assertions:l}of e){const e=l?`${t}assert${t}${l}`:"";const c=`'${s}'${e};`;if(!n&&!r){i.push(`import${t}${c}`);continue}if(r){let e=null;let s=null;const n=[];for(const t of r){if(t.imported==="default"){e=t}else if(t.imported==="*"){s=t}else{n.push(t)}}if(s){i.push(`import${t}*${t}as ${s.local} from${t}${c}`)}if(e&&n.length===0){i.push(`import ${e.local} from${t}${c}`)}else if(n.length>0){i.push(`import ${e?`${e.local},${t}`:""}{${t}${n.map((e=>e.imported===e.local?e.imported:`${e.imported} as ${e.local}`)).join(`,${t}`)}${t}}${t}from${t}${c}`)}}if(n){let e=null;const s=[];const l=[];for(const t of n){if(t.reexported==="*"){e=t}else if(t.imported==="*"){s.push(t)}else{l.push(t)}}if(e){i.push(`export${t}*${t}from${t}${c}`)}if(s.length>0){if(!r||!r.some((e=>e.imported==="*"&&e.local===o))){i.push(`import${t}*${t}as ${o} from${t}${c}`)}for(const e of s){i.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}}if(l.length>0){i.push(`export${t}{${t}${l.map((e=>e.imported===e.reexported?e.imported:`${e.imported} as ${e.reexported}`)).join(`,${t}`)}${t}}${t}from${t}${c}`)}}}return i}function getExportBlock(e,{_:t,cnst:i}){const s=[];const n=[];for(const r of e){if(r.expression){s.push(`${i} ${r.local}${t}=${t}${r.expression};`)}n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`)}if(n.length>0){s.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`)}return s}const keypath=(e,t)=>e.split(".").map(t).join("");function setupNamespace(e,t,i,{_:s,getPropertyAccess:n,s:r},o){const l=e.split(".");l[0]=(typeof i==="function"?i(l[0]):i[l[0]])||l[0];l.pop();let c=t;return l.map((e=>{c+=n(e);return`${c}${s}=${s}${c}${s}||${s}{}${r}`})).join(o?",":"\n")+(o&&l.length>0?";":"\n")}function assignToDeepVariable(e,t,i,s,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=(typeof i==="function"?i(o[0]):i[o[0]])||o[0];const l=o.pop();let c=t;let u=[...o.map((e=>{c+=r(e);return`${c}${n}=${n}${c}${n}||${n}{}`})),`${c}${r(l)}`].join(`,${n}`)+`${n}=${n}${s}`;if(o.length>0){u=`(${u})`}return u}function trimEmptyImports(e){let t=e.length;while(t--){const{imports:i,reexports:s}=e[t];if(i||s){return e.slice(0,t+1)}}return[]}function iife(e,{accessedGlobals:t,dependencies:i,exports:s,hasDefaultExport:n,hasExports:r,indent:o,intro:l,namedExportsMode:c,outro:u,snippets:h,onwarn:d},{compact:p,esModule:f,extend:m,freeze:g,externalLiveBindings:y,globals:E,interop:x,name:b,namespaceToStringTag:v,strict:S}){const{_:A,getNonArrowFunctionIntro:w,getPropertyAccess:I,n:k}=h;const C=b&&b.includes(".");const _=!m&&!C;if(b&&_&&!isLegal(b)){return error(errorIllegalIdentifierAsName(b))}warnOnBuiltins(d,i);const P=trimEmptyImports(i);const N=P.map((e=>e.globalName||"null"));const R=P.map((e=>e.name));if(r&&!b){d(errorMissingNameOptionForIifeExport())}if(c&&r){if(m){N.unshift(`this${keypath(b,I)}${A}=${A}this${keypath(b,I)}${A}||${A}{}`);R.unshift("exports")}else{N.unshift("{}");R.unshift("exports")}}const $=S?`${o}'use strict';${k}`:"";const O=getInteropBlock(i,x,y,g,v,t,o,h);e.prepend(`${l}${O}`);let T=`(${w(R,{isAsync:false,name:null})}{${k}${$}${k}`;if(r){if(b&&!(m&&c)){T=(_?`var ${b}`:`this${keypath(b,I)}`)+`${A}=${A}${T}`}if(C){T=setupNamespace(b,"this",E,h,p)+T}}let D=`${k}${k}})(${N.join(`,${A}`)});`;if(r&&!m&&c){D=`${k}${k}${o}return exports;${D}`}const M=getExportBlock$1(s,i,c,x,h,o,y);let L=getNamespaceMarkers(c&&r,f===true||f==="if-default-prop"&&n,v,h);if(L){L=k+k+L}e.append(`${M}${L}${u}`).indent(o).prepend(T).append(D)}function system(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:h,freeze:d,name:p,namespaceToStringTag:f,strict:m,systemNullSetters:g}){const{_:y,getFunctionIntro:E,getNonArrowFunctionIntro:x,n:b,s:v}=l;const{importBindings:S,setters:A,starExcludes:w}=analyzeDependencies(i,s,r,l);const I=p?`'${p}',${y}`:"";const k=t.has("module")?["exports","module"]:n?["exports"]:[];let C=`System.register(${I}[`+i.map((({importPath:e})=>`'${e}'`)).join(`,${y}`)+`],${y}(${x(k,{isAsync:false,name:null})}{${b}${r}${m?"'use strict';":""}`+getStarExcludesBlock(w,r,l)+getImportBindingsBlock(S,r,l)+`${b}${r}return${y}{${A.length>0?`${b}${r}${r}setters:${y}[${A.map((e=>e?`${E(["module"],{isAsync:false,name:null})}{${b}${r}${r}${r}${e}${b}${r}${r}}`:g?`null`:`${E([],{isAsync:false,name:null})}{}`)).join(`,${y}`)}],`:""}${b}`;C+=`${r}${r}execute:${y}(${x([],{isAsync:u,name:null})}{${b}${b}`;const _=`${r}${r}})${b}${r}}${v}${b}}));`;e.prepend(o+getHelpersBlock(null,t,r,l,h,d,f)+getHoistedExportsBlock(s,r,l)).append(`${c}${b}${b}`+getSyntheticExportsBlock(s,r,l)+getMissingExportsBlock(s,r,l)).indent(`${r}${r}${r}`).append(_).prepend(C)}function analyzeDependencies(e,t,i,{_:s,cnst:n,getObject:r,getPropertyAccess:o,n:l}){const c=[];const u=[];let h=null;for(const{imports:d,reexports:p}of e){const f=[];if(d){for(const e of d){c.push(e.local);if(e.imported==="*"){f.push(`${e.local}${s}=${s}module;`)}else{f.push(`${e.local}${s}=${s}module${o(e.imported)};`)}}}if(p){const l=[];let c=false;for(const{imported:e,reexported:t}of p){if(t==="*"){c=true}else{l.push([t,e==="*"?"module":`module${o(e)}`])}}if(l.length>1||c){const o=r(l,{lineBreakIndent:null});if(c){if(!h){h=getStarExcludes({dependencies:e,exports:t})}f.push(`${n} setter${s}=${s}${o};`,`for${s}(${n} name in module)${s}{`,`${i}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{f.push(`exports(${o});`)}}else{const[e,t]=l[0];f.push(`exports('${e}',${s}${t});`)}}u.push(f.join(`${l}${i}${i}${i}`))}return{importBindings:c,setters:u,starExcludes:h}}const getStarExcludes=({dependencies:e,exports:t})=>{const i=new Set(t.map((e=>e.exported)));i.add("default");for(const{reexports:t}of e){if(t){for(const e of t){if(e.reexported!=="*")i.add(e.reexported)}}}return i};const getStarExcludesBlock=(e,t,{_:i,cnst:s,getObject:n,n:r})=>e?`${r}${t}${s} _starExcludes${i}=${i}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"";const getImportBindingsBlock=(e,t,{_:i,n:s})=>e.length>0?`${s}${t}var ${e.join(`,${i}`)};`:"";const getHoistedExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,i);function getExportsBlock(e,t,{_:i,n:s}){if(e.length===0){return""}if(e.length===1){return`exports('${e[0].name}',${i}${e[0].value});${s}${s}`}return`exports({${s}`+e.map((({name:e,value:s})=>`${t}${e}:${i}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const getSyntheticExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,i);const getMissingExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.local===Tr)).map((e=>({name:e.exported,value:Tr}))),t,i);function globalProperty(e,t,i){if(!e)return"null";return`${t}${keypath(e,i)}`}function safeAccess(e,t,{_:i,getPropertyAccess:s}){let n=t;return e.split(".").map((e=>n+=s(e))).join(`${i}&&${i}`)}function umd(e,{accessedGlobals:t,dependencies:i,exports:s,hasDefaultExport:n,hasExports:r,id:o,indent:l,intro:c,namedExportsMode:u,outro:h,snippets:d,onwarn:p},{amd:f,compact:m,esModule:g,extend:y,externalLiveBindings:E,freeze:x,interop:b,name:v,namespaceToStringTag:S,globals:A,noConflict:w,strict:I}){const{_:k,cnst:C,getFunctionIntro:_,getNonArrowFunctionIntro:P,getPropertyAccess:N,n:R,s:$}=d;const O=m?"f":"factory";const T=m?"g":"global";if(r&&!v){return error(errorMissingNameOptionForUmdExport())}warnOnBuiltins(p,i);const D=i.map((e=>`'${updateExtensionForRelativeAmdId(e.importPath,f.forceJsExtensionForImports)}'`));const M=i.map((e=>`require('${e.importPath}')`));const L=trimEmptyImports(i);const B=L.map((e=>globalProperty(e.globalName,T,N)));const F=L.map((e=>e.name));if(u&&(r||w)){D.unshift(`'exports'`);M.unshift(`exports`);B.unshift(assignToDeepVariable(v,T,A,`${y?`${globalProperty(v,T,N)}${k}||${k}`:""}{}`,d));F.unshift("exports")}const V=getCompleteAmdId(f,o);const z=(V?`'${V}',${k}`:``)+(D.length>0?`[${D.join(`,${k}`)}],${k}`:``);const j=f.define;const U=!u&&r?`module.exports${k}=${k}`:``;const H=I?`${k}'use strict';${R}`:``;let G;if(w){const e=m?"e":"exports";let t;if(!u&&r){t=`${C} ${e}${k}=${k}${assignToDeepVariable(v,T,A,`${O}(${B.join(`,${k}`)})`,d)};`}else{const i=B.shift();t=`${C} ${e}${k}=${k}${i};${R}`+`${l}${l}${O}(${[e,...B].join(`,${k}`)});`}G=`(${_([],{isAsync:false,name:null})}{${R}`+`${l}${l}${C} current${k}=${k}${safeAccess(v,T,d)};${R}`+`${l}${l}${t}${R}`+`${l}${l}${e}.noConflict${k}=${k}${_([],{isAsync:false,name:null})}{${k}`+`${globalProperty(v,T,N)}${k}=${k}current;${k}return ${e}${$}${k}};${R}`+`${l}})()`}else{G=`${O}(${B.join(`,${k}`)})`;if(!u&&r){G=assignToDeepVariable(v,T,A,G,d)}}const W=r||w&&u||B.length>0;const q=[O];if(W){q.unshift(T)}const K=W?`this,${k}`:"";const Y=W?`(${T}${k}=${k}typeof globalThis${k}!==${k}'undefined'${k}?${k}globalThis${k}:${k}${T}${k}||${k}self,${k}`:"";const Q=W?")":"";const X=W?`${l}typeof exports${k}===${k}'object'${k}&&${k}typeof module${k}!==${k}'undefined'${k}?`+`${k}${U}${O}(${M.join(`,${k}`)})${k}:${R}`:"";const Z=`(${P(q,{isAsync:false,name:null})}{${R}`+X+`${l}typeof ${j}${k}===${k}'function'${k}&&${k}${j}.amd${k}?${k}${j}(${z}${O})${k}:${R}`+`${l}${Y}${G}${Q};${R}`+`})(${K}(${P(F,{isAsync:false,name:null})}{${H}${R}`;const J=R+R+"}));";e.prepend(`${c}${getInteropBlock(i,b,E,x,S,t,l,d)}`);const ee=getExportBlock$1(s,i,u,b,d,l,E);let te=getNamespaceMarkers(u&&r,g===true||g==="if-default-prop"&&n,S,d);if(te){te=R+R+te}e.append(`${ee}${te}${h}`).trim().indent(l).append(J).prepend(Z)}const Gr={amd:amd,cjs:cjs,es:es,iife:iife,system:system,umd:umd};const concatSeparator=(e,t)=>t?`${e}\n${t}`:e;const concatDblSeparator=(e,t)=>t?`${e}\n\n${t}`:e;async function createAddons(e,t,i){try{let[s,n,r,o]=await Promise.all([t.hookReduceValue("banner",e.banner(i),[i],concatSeparator),t.hookReduceValue("footer",e.footer(i),[i],concatSeparator),t.hookReduceValue("intro",e.intro(i),[i],concatDblSeparator),t.hookReduceValue("outro",e.outro(i),[i],concatDblSeparator)]);if(r)r+="\n\n";if(o)o=`\n\n${o}`;if(s)s+="\n";if(n)n="\n"+n;return{banner:s,footer:n,intro:r,outro:o}}catch(e){return error(errorAddonNotGenerated(e.message,e.hook,e.plugin))}}const Wr={amd:deconflictImportsOther,cjs:deconflictImportsOther,es:deconflictImportsEsmOrSystem,iife:deconflictImportsOther,system:deconflictImportsEsmOrSystem,umd:deconflictImportsOther};function deconflictChunk(e,t,i,s,n,r,o,l,c,u,h,d,p,f){const m=[...e].reverse();for(const e of m){e.scope.addUsedOutsideNames(s,n,d,p)}deconflictTopLevelVariables(s,m,f);Wr[n](s,i,t,r,o,l,c,u,h);for(const e of m){e.scope.deconflict(n,d,p)}}function deconflictImportsEsmOrSystem(e,t,i,s,n,r,o,l,c){for(const t of i.dependencies){if(n||t instanceof ExternalChunk){t.variableName=getSafeName(t.suggestedVariableName,e,null)}}for(const i of t){const t=i.module;const s=i.name;if(i.isNamespace&&(n||t instanceof ExternalModule)){i.setRenderNames(null,(t instanceof ExternalModule?l.get(t):o.get(t)).variableName)}else if(t instanceof ExternalModule&&s==="default"){i.setRenderNames(null,getSafeName([...t.exportedVariables].some((([e,t])=>t==="*"&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e,i.forbiddenNames))}else{i.setRenderNames(null,getSafeName(s,e,i.forbiddenNames))}}for(const t of c){t.setRenderNames(null,getSafeName(t.name,e,t.forbiddenNames))}}function deconflictImportsOther(e,t,{deconflictedDefault:i,deconflictedNamespace:s,dependencies:n},r,o,l,c,u){for(const t of n){t.variableName=getSafeName(t.suggestedVariableName,e,null)}for(const t of s){t.namespaceVariableName=getSafeName(`${t.suggestedVariableName}__namespace`,e,null)}for(const t of i){t.defaultVariableName=s.has(t)&&canDefaultBeTakenFromNamespace(r(t.id),l)?t.namespaceVariableName:getSafeName(`${t.suggestedVariableName}__default`,e,null)}for(const e of t){const t=e.module;if(t instanceof ExternalModule){const i=u.get(t);const s=e.name;if(s==="default"){const s=r(t.id);const n=vr[s]?i.defaultVariableName:i.variableName;if(isDefaultAProperty(s,l)){e.setRenderNames(n,"default")}else{e.setRenderNames(null,n)}}else if(s==="*"){e.setRenderNames(null,Sr[r(t.id)]?i.namespaceVariableName:i.variableName)}else{e.setRenderNames(i.variableName,null)}}else{const i=c.get(t);if(o&&e.isNamespace){e.setRenderNames(null,i.exportMode==="default"?i.namespaceVariableName:i.variableName)}else if(i.exportMode==="default"){e.setRenderNames(null,i.variableName)}else{e.setRenderNames(i.variableName,i.getVariableExportName(e))}}}}function deconflictTopLevelVariables(e,t,i){for(const s of t){for(const t of s.scope.variables.values()){if(t.included&&!(t.renderBaseName||t instanceof ExportDefaultVariable&&t.getOriginalVariable()!==t)){t.setRenderNames(null,getSafeName(t.name,e,t.forbiddenNames))}}if(i.has(s)){const t=s.namespace;t.setRenderNames(null,getSafeName(t.name,e,t.forbiddenNames))}}}function assignExportsToMangledNames(e,t,i){let s=0;for(const n of e){let[e]=n.name;if(t.has(e)){do{e=toBase64(++s);if(e.charCodeAt(0)===49){s+=9*64**(e.length-1);e=toBase64(s)}}while(Si.has(e)||t.has(e))}t.set(e,n);i.set(n,[e])}}function assignExportsToNames(e,t,i){for(const s of e){let e=0;let n=s.name;while(t.has(n)){n=s.name+"$"+ ++e}t.set(n,s);i.set(s,[n])}}function getExportMode(e,{exports:t,name:i,format:s},n,r){const o=e.getExportNames();if(t==="default"){if(o.length!==1||o[0]!=="default"){return error(errorIncompatibleExportOptionValue("default",o,n))}}else if(t==="none"&&o.length>0){return error(errorIncompatibleExportOptionValue("none",o,n))}if(t==="auto"){if(o.length===0){t="none"}else if(o.length===1&&o[0]==="default"){t="default"}else{if(s!=="es"&&s!=="system"&&o.includes("default")){r(errorMixedExport(n,i))}t="named"}}return t}function guessIndentString(e){const t=e.split("\n");const i=t.filter((e=>/^\t+/.test(e)));const s=t.filter((e=>/^ {2,}/.test(e)));if(i.length===0&&s.length===0){return null}if(i.length>=s.length){return"\t"}const n=s.reduce(((e,t)=>{const i=/^ +/.exec(t)[0].length;return Math.min(i,e)}),Infinity);return" ".repeat(n)}function getIndentString(e,t){if(t.indent!==true)return t.indent;for(const t of e){const e=guessIndentString(t.originalCode);if(e!==null)return e}return"\t"}function getStaticDependencies(e,t,i,s){const n=[];const r=new Set;for(let o=t.length-1;o>=0;o--){const l=t[o];if(!r.has(l)){const t=[];addStaticDependencies(l,t,r,e,i,s);n.unshift(t)}}const o=new Set;for(const e of n){for(const t of e){o.add(t)}}return o}function addStaticDependencies(e,t,i,s,n,r){const o=e.getDependenciesToBeIncluded();for(const e of o){if(e instanceof ExternalModule){t.push(r.get(e));continue}const o=n.get(e);if(o!==s){t.push(o);continue}if(!i.has(e)){i.add(e);addStaticDependencies(e,t,i,s,n,r)}}}const qr="!~{";const Kr="}~";const Yr=qr.length+Kr.length;const Qr=64;const Xr=8;const getHashPlaceholderGenerator=()=>{let e=0;return(t,i=Xr)=>{if(i>Qr){return error(errorFailedValidation(`Hashes cannot be longer than ${Qr} characters, received ${i}. Check the "${t}" option.`))}const s=`${qr}${toBase64(++e).padStart(i-Yr,"0")}${Kr}`;if(s.length>i){return error(errorFailedValidation(`To generate hashes for this number of chunks (currently ${e}), you need a minimum hash size of ${s.length}, received ${i}. Check the "${t}" option.`))}return s}};const Zr=new RegExp(`${qr}[0-9a-zA-Z_$]{1,${Qr-Yr}}${Kr}`,"g");const replacePlaceholders=(e,t)=>e.replace(Zr,(e=>t.get(e)||e));const replaceSinglePlaceholder=(e,t,i)=>e.replace(Zr,(e=>e===t?i:e));const replacePlaceholdersWithDefaultAndGetContainedPlaceholders=(e,t)=>{const i=new Set;const s=e.replace(Zr,(e=>{if(t.has(e)){i.add(e);return`${qr}${"0".repeat(e.length-Yr)}${Kr}`}return e}));return{containedPlaceholders:i,transformedCode:s}};const Jr=Symbol("bundleKeys");const eo={type:"placeholder"};const getOutputBundle=e=>{const t=new Set;return new Proxy(e,{deleteProperty(e,i){if(typeof i==="string"){t.delete(i.toLowerCase())}return Reflect.deleteProperty(e,i)},get(e,i){if(i===Jr){return t}return Reflect.get(e,i)},set(e,i,s){if(typeof i==="string"){t.add(i.toLowerCase())}return Reflect.set(e,i,s)}})};const removeUnreferencedAssets=e=>{const t=new Set;const i=Object.values(e);for(const e of i){e.type==="asset"&&e.needsCodeReference&&t.add(e.fileName)}for(const e of i){if(e.type==="chunk"){for(const i of e.referencedFiles){t.has(i)&&t.delete(i)}}}for(const i of t){delete e[i]}};function renderNamePattern(e,t,i){if(isPathFragment(e))return error(errorFailedValidation(`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.`));return e.replace(/\[(\w+)(:\d+)?]/g,((e,s,n)=>{if(!i.hasOwnProperty(s)||n&&s!=="hash"){return error(errorFailedValidation(`"[${s}${n||""}]" is not a valid placeholder in the "${t}" pattern.`))}const r=i[s](n&&Number.parseInt(n.slice(1)));if(isPathFragment(r))return error(errorFailedValidation(`Invalid substitution "${r}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`));return r}))}function makeUnique(e,{[Jr]:t}){if(!t.has(e.toLowerCase()))return e;const i=r.extname(e);e=e.slice(0,Math.max(0,e.length-i.length));let s,n=1;while(t.has((s=e+ ++n+i).toLowerCase()));return s}const to=new Set([".js",".jsx",".ts",".tsx",".mjs",".mts",".cjs",".cts"]);function getGlobalName(e,t,i,s){const n=typeof t==="function"?t(e.id):t[e.id];if(n){return n}if(i){s(errorMissingGlobalName(e.id,e.variableName));return e.variableName}}class Chunk{constructor(e,t,i,s,n,r,o,l,c,u,h,d,p,f,m){this.orderedModules=e;this.inputOptions=t;this.outputOptions=i;this.unsetOptions=s;this.pluginDriver=n;this.modulesById=r;this.chunkByModule=o;this.externalChunkByModule=l;this.facadeChunkByModule=c;this.includedNamespaces=u;this.manualChunkAlias=h;this.getPlaceholder=d;this.bundle=p;this.inputBase=f;this.snippets=m;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=true;this.name=null;this.needsExportsShim=false;this.preRenderedChunkInfo=null;this.preliminaryFileName=null;this.renderedChunkInfo=null;this.renderedDependencies=null;this.renderedModules=Object.create(null);this.sortedExportNames=null;this.strictFacade=false;this.execIndex=e.length>0?e[0].execIndex:Infinity;const g=new Set(e);for(const t of e){o.set(t,this);if(t.namespace.included&&!i.preserveModules){u.add(t)}if(this.isEmpty&&t.isIncluded()){this.isEmpty=false}if(t.info.isEntry||i.preserveModules){this.entryModules.push(t)}for(const e of t.includedDynamicImporters){if(!g.has(e)){this.dynamicEntryModules.push(t);if(t.info.syntheticNamedExports){u.add(t);this.exports.add(t.namespace)}}}if(t.implicitlyLoadedAfter.size>0){this.implicitEntryModules.push(t)}}this.suggestedVariableName=makeLegal(this.generateVariableName())}static generateFacade(e,t,i,s,n,r,o,l,c,u,h,d,p,f,m){const g=new Chunk([],e,t,i,s,n,r,o,l,c,null,d,p,f,m);g.assignFacadeName(h,u);if(!l.has(u)){l.set(u,g)}for(const e of u.getDependenciesToBeIncluded()){g.dependencies.add(e instanceof Module?r.get(e):o.get(e))}if(!g.dependencies.has(r.get(u))&&u.info.moduleSideEffects&&u.hasEffects()){g.dependencies.add(r.get(u))}g.ensureReexportsAreAvailableForModule(u);g.facadeModule=u;g.strictFacade=true;return g}canModuleBeFacade(e,t){const i=e.getExportNamesByVariable();for(const e of this.exports){if(!i.has(e)){return false}}for(const s of t){if(!(s.module===e||i.has(s)||s instanceof SyntheticNamedExportVariable&&i.has(s.getBaseVariable()))){return false}}return true}finalizeChunk(e,t,i){const s=this.getRenderedChunkInfo();const finalize=e=>replacePlaceholders(e,i);const n=this.fileName=finalize(s.fileName);return{...s,code:e,dynamicImports:s.dynamicImports.map(finalize),fileName:n,implicitlyLoadedBefore:s.implicitlyLoadedBefore.map(finalize),importedBindings:Object.fromEntries(Object.entries(s.importedBindings).map((([e,t])=>[finalize(e),t]))),imports:s.imports.map(finalize),map:t,referencedFiles:s.referencedFiles.map(finalize)}}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==false||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[i,s]of t){this.exportNamesByVariable.set(i,[...s]);for(const e of s){this.exportsByName.set(e,i)}e.delete(i)}}if(this.outputOptions.minifyInternalExports){assignExportsToMangledNames(e,this.exportsByName,this.exportNamesByVariable)}else{assignExportsToNames(e,this.exportsByName,this.exportNamesByVariable)}if(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)this.exportMode=getExportMode(this,this.outputOptions,this.facadeModule.id,this.inputOptions.onwarn)}generateFacades(){const e=[];const t=new Set([...this.entryModules,...this.implicitEntryModules]);const i=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of t){if(e.preserveSignature){for(const t of e.getExportNamesByVariable().keys()){if(this.chunkByModule.get(t.module)===this){i.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(t.length===0&&s.isUserDefinedEntryPoint){t.push({})}t.push(...Array.from(s.chunkFileNames,(e=>({fileName:e}))));if(t.length===0){t.push({})}if(!this.facadeModule){const e=!this.outputOptions.preserveModules&&(s.preserveSignature==="strict"||s.preserveSignature==="exports-only"&&s.getExportNamesByVariable().size>0);if(!e||this.canModuleBeFacade(s,i)){this.facadeModule=s;this.facadeChunkByModule.set(s,this);if(s.preserveSignature){this.strictFacade=e}this.assignFacadeName(t.shift(),s,this.outputOptions.preserveModules)}}for(const i of t){e.push(Chunk.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.externalChunkByModule,this.facadeChunkByModule,this.includedNamespaces,s,i,this.getPlaceholder,this.bundle,this.inputBase,this.snippets))}}for(const e of this.dynamicEntryModules){if(e.info.syntheticNamedExports)continue;if(!this.facadeModule&&this.canModuleBeFacade(e,i)){this.facadeModule=e;this.facadeChunkByModule.set(e,this);this.strictFacade=true;this.dynamicName=getChunkNameFromModule(e)}else if(this.facadeModule===e&&!this.strictFacade&&this.canModuleBeFacade(e,i)){this.strictFacade=true}else if(!this.facadeChunkByModule.get(e)?.strictFacade){this.includedNamespaces.add(e);this.exports.add(e.namespace)}}if(!this.outputOptions.preserveModules){this.addNecessaryImportsForFacades()}return e}getChunkName(){return this.name??(this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName()))}getExportNames(){return this.sortedExportNames??(this.sortedExportNames=[...this.exportsByName.keys()].sort())}getFileName(){return this.fileName||this.getPreliminaryFileName().fileName}getImportPath(e){return escapeId(getImportPath(e,this.getFileName(),this.outputOptions.format==="amd"&&!this.outputOptions.amd.forceJsExtensionForImports,true))}getPreliminaryFileName(){if(this.preliminaryFileName){return this.preliminaryFileName}let e;let t=null;const{chunkFileNames:i,entryFileNames:s,file:n,format:o,preserveModules:l}=this.outputOptions;if(n){e=r.basename(n)}else if(this.fileName===null){const[n,r]=l||this.facadeModule?.isUserDefinedEntryPoint?[s,"output.entryFileNames"]:[i,"output.chunkFileNames"];e=renderNamePattern(typeof n==="function"?n(this.getPreRenderedChunkInfo()):n,r,{format:()=>o,hash:e=>t||(t=this.getPlaceholder(r,e)),name:()=>this.getChunkName()});if(!t){e=makeUnique(e,this.bundle)}}else{e=this.fileName}if(!t){this.bundle[e]=eo}return this.preliminaryFileName={fileName:e,hashPlaceholder:t}}getRenderedChunkInfo(){if(this.renderedChunkInfo){return this.renderedChunkInfo}return this.renderedChunkInfo={...this.getPreRenderedChunkInfo(),dynamicImports:this.getDynamicDependencies().map(resolveFileName),fileName:this.getFileName(),implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,resolveFileName),importedBindings:getImportedBindingsPerDependency(this.getRenderedDependencies(),resolveFileName),imports:Array.from(this.dependencies,resolveFileName),modules:this.renderedModules,referencedFiles:this.getReferencedFiles()}}getVariableExportName(e){if(this.outputOptions.preserveModules&&e instanceof NamespaceVariable){return"*"}return this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=getStaticDependencies(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:i,inputOptions:{onwarn:s},outputOptions:n,pluginDriver:r,snippets:o}=this;const{format:l,hoistTransitiveImports:c,preserveModules:u}=n;if(c&&!u&&i!==null){for(const t of e){if(t instanceof Chunk)this.inlineChunkDependencies(t)}}const h=this.getPreliminaryFileName();const{accessedGlobals:d,indent:p,magicString:f,renderedSource:m,usedModules:g,usesTopLevelAwait:y}=this.renderModules(h.fileName);const E=[...this.getRenderedDependencies().values()];const x=t==="none"?[]:this.getChunkExportDeclarations(l);let b=x.length>0;let v=false;for(const e of E){const{reexports:t}=e;if(t?.length){b=true;if(!v&&t.some((e=>e.reexported==="default"))){v=true}if(l==="es"){e.reexports=t.filter((({reexported:e})=>!x.find((({exported:t})=>t===e))))}}}if(!v){for(const{exported:e}of x){if(e==="default"){v=true;break}}}const{intro:S,outro:A,banner:w,footer:I}=await createAddons(n,r,this.getRenderedChunkInfo());Gr[l](m,{accessedGlobals:d,dependencies:E,exports:x,hasDefaultExport:v,hasExports:b,id:h.fileName,indent:p,intro:S,isEntryFacade:u||i!==null&&i.info.isEntry,isModuleFacade:i!==null,namedExportsMode:t!=="default",onwarn:s,outro:A,snippets:o,usesTopLevelAwait:y},n);if(w)f.prepend(w);if(I)f.append(I);return{chunk:this,magicString:f,preliminaryFileName:h,usedModules:g}}addImplicitlyLoadedBeforeFromModule(e){const{chunkByModule:t,implicitlyLoadedBefore:i}=this;for(const s of e.implicitlyLoadedBefore){const e=t.get(s);if(e&&e!==this){i.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},i,s){if(e){this.fileName=e}else{this.name=this.outputOptions.sanitizeFileName(t||(s?this.getPreserveModulesChunkNameFromModule(i):getChunkNameFromModule(i)))}}checkCircularDependencyImport(e,t){const i=e.module;if(i instanceof Module){const s=this.chunkByModule.get(i);let n;do{n=t.alternativeReexportModules.get(e);if(n){const r=this.chunkByModule.get(n);if(r!==s){this.inputOptions.onwarn(errorCyclicCrossChunkReexport(i.getExportNamesByVariable().get(e)?.[0]||"*",i.id,n.id,t.id,this.outputOptions.preserveModules))}t=n}}while(n)}}ensureReexportsAreAvailableForModule(e){const t=[];const i=e.getExportNamesByVariable();for(const s of i.keys()){const i=s instanceof SyntheticNamedExportVariable;const n=i?s.getBaseVariable():s;this.checkCircularDependencyImport(n,e);if(!(n instanceof NamespaceVariable&&this.outputOptions.preserveModules)){const e=n.module;if(e instanceof Module){const s=this.chunkByModule.get(e);if(s&&s!==this){s.exports.add(n);t.push(n);if(i){this.imports.add(n)}}}}}if(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];if(e){return getChunkNameFromModule(e)}return"chunk"}getChunkExportDeclarations(e){const t=[];for(const i of this.getExportNames()){if(i[0]==="*")continue;const s=this.exportsByName.get(i);if(!(s instanceof SyntheticNamedExportVariable)){const t=s.module;if(t){const s=this.chunkByModule.get(t);if(s!==this){if(!s||e!=="es"){continue}const t=this.renderedDependencies.get(s);if(!t){continue}const{imports:n,reexports:r}=t;const o=r?.find((({reexported:e})=>e===i));const l=n?.find((({imported:e})=>e===o?.imported));if(!l){continue}}}}let n=null;let r=false;let o=s.getName(this.snippets.getPropertyAccess);if(s instanceof LocalVariable){for(const e of s.declarations){if(e.parent instanceof FunctionDeclaration||e instanceof ExportDefaultDeclaration&&e.declaration instanceof FunctionDeclaration){r=true;break}}}else if(s instanceof SyntheticNamedExportVariable){n=o;if(e==="es"){o=s.renderName}}t.push({exported:i,expression:n,hoisted:r,local:o})}return t}getDependenciesToBeDeconflicted(e,t,i){const s=new Set;const n=new Set;const r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports]){if(e||t.isNamespace){const o=t.module;if(o instanceof ExternalModule){const l=this.externalChunkByModule.get(o);s.add(l);if(e){if(t.name==="default"){if(vr[i(o.id)]){n.add(l)}}else if(t.name==="*"&&Sr[i(o.id)]){r.add(l)}}}else{const i=this.chunkByModule.get(o);if(i!==this){s.add(i);if(e&&i.exportMode==="default"&&t.isNamespace){r.add(i)}}}}}if(t){for(const e of this.dependencies){s.add(e)}}return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:s}}getDynamicDependencies(){return this.getIncludedDynamicImports().map((e=>e.facadeChunk||e.chunk||e.externalChunk||e.resolution)).filter((e=>e!==this&&(e instanceof Chunk||e instanceof ExternalChunk)))}getDynamicImportStringAndAssertions(e,t){if(e instanceof ExternalModule){const i=this.externalChunkByModule.get(e);return[`'${i.getImportPath(t)}'`,i.getImportAssertions(this.snippets)]}return[e||"",this.outputOptions.format==="es"&&this.outputOptions.externalImportAssertions||null]}getFallbackChunkName(){if(this.manualChunkAlias){return this.manualChunkAlias}if(this.dynamicName){return this.dynamicName}if(this.fileName){return getAliasName(this.fileName)}return getAliasName(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(){const{interop:e}=this.outputOptions;const t=new Map;for(const i of this.imports){const s=i.module;let n;let r;if(s instanceof ExternalModule){n=this.externalChunkByModule.get(s);r=i.name;if(r!=="default"&&r!=="*"&&e(s.id)==="defaultOnly"){return error(errorUnexpectedNamedImport(s.id,r,false))}}else{n=this.chunkByModule.get(s);r=n.getVariableExportName(i)}getOrCreate(t,n,getNewArray).push({imported:r,local:i.getName(this.snippets.getPropertyAccess)})}return t}getIncludedDynamicImports(){if(this.includedDynamicImports){return this.includedDynamicImports}const e=[];for(const t of this.orderedModules){for(const{node:i,resolution:s}of t.dynamicImports){if(!i.included){continue}e.push(s instanceof Module?{chunk:this.chunkByModule.get(s),externalChunk:null,facadeChunk:this.facadeChunkByModule.get(s),node:i,resolution:s}:s instanceof ExternalModule?{chunk:null,externalChunk:this.externalChunkByModule.get(s),facadeChunk:null,node:i,resolution:s}:{chunk:null,externalChunk:null,facadeChunk:null,node:i,resolution:s})}}return this.includedDynamicImports=e}getPreRenderedChunkInfo(){if(this.preRenderedChunkInfo){return this.preRenderedChunkInfo}const{dynamicEntryModules:e,facadeModule:t,implicitEntryModules:i,orderedModules:s}=this;return this.preRenderedChunkInfo={exports:this.getExportNames(),facadeModuleId:t&&t.id,isDynamicEntry:e.length>0,isEntry:!!t?.info.isEntry,isImplicitEntry:i.length>0,moduleIds:s.map((({id:e})=>e)),name:this.getChunkName(),type:"chunk"}}getPreserveModulesChunkNameFromModule(e){const t=getPredefinedChunkNameFromModule(e);if(t)return t;const{preserveModulesRoot:i,sanitizeFileName:s}=this.outputOptions;const n=s(normalize(e.id.split(io,1)[0]));const o=r.extname(n);const l=to.has(o)?n.slice(0,-o.length):n;if(isAbsolute(l)){return i&&r.resolve(l).startsWith(i)?l.slice(i.length).replace(/^[/\\]/,""):relative(this.inputBase,l)}else{return`_virtual/${r.basename(l)}`}}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions;const i=new Map;for(let s of this.getExportNames()){let n;let r;let o=false;if(s[0]==="*"){const i=s.slice(1);if(t(i)==="defaultOnly"){this.inputOptions.onwarn(errorUnexpectedNamespaceReexport(i))}o=e;n=this.externalChunkByModule.get(this.modulesById.get(i));r=s="*"}else{const i=this.exportsByName.get(s);if(i instanceof SyntheticNamedExportVariable)continue;const l=i.module;if(l instanceof Module){n=this.chunkByModule.get(l);if(n===this)continue;r=n.getVariableExportName(i);o=i.isReassigned}else{n=this.externalChunkByModule.get(l);r=i.name;if(r!=="default"&&r!=="*"&&t(l.id)==="defaultOnly"){return error(errorUnexpectedNamedImport(l.id,r,true))}o=e&&(r!=="default"||isDefaultAProperty(t(l.id),true))}}getOrCreate(i,n,getNewArray).push({imported:r,needsLiveBinding:o,reexported:s})}return i}getReferencedFiles(){const e=new Set;for(const t of this.orderedModules){for(const i of t.importMetas){const t=i.getReferencedFileName(this.pluginDriver);if(t){e.add(t)}}}return[...e]}getRenderedDependencies(){if(this.renderedDependencies){return this.renderedDependencies}const e=this.getImportSpecifiers();const t=this.getReexportSpecifiers();const i=new Map;const s=this.getFileName();for(const n of this.dependencies){const r=e.get(n)||null;const o=t.get(n)||null;const l=n instanceof ExternalChunk||n.exportMode!=="default";const c=n.getImportPath(s);i.set(n,{assertions:n instanceof ExternalChunk?n.getImportAssertions(this.snippets):null,defaultVariableName:n.defaultVariableName,globalName:n instanceof ExternalChunk&&(this.outputOptions.format==="umd"||this.outputOptions.format==="iife")&&getGlobalName(n,this.outputOptions.globals,(r||o)!==null,this.inputOptions.onwarn),importPath:c,imports:r,isChunk:n instanceof Chunk,name:n.variableName,namedExportsMode:l,namespaceVariableName:n.namespaceVariableName,reexports:o})}return this.renderedDependencies=i}inlineChunkDependencies(e){for(const t of e.dependencies){if(this.dependencies.has(t))continue;this.dependencies.add(t);if(t instanceof Chunk){this.inlineChunkDependencies(t)}}}renderModules(e){const{accessedGlobalsByScope:t,dependencies:i,exportNamesByVariable:s,includedNamespaces:n,inputOptions:{onwarn:r},isEmpty:o,orderedModules:l,outputOptions:c,pluginDriver:u,renderedModules:h,snippets:d}=this;const{compact:p,dynamicImportFunction:f,format:m,freeze:g,namespaceToStringTag:y}=c;const{_:E,cnst:x,n:b}=d;this.setDynamicImportResolutions(e);this.setImportMetaResolutions(e);this.setIdentifierRenderResolutions();const v=new Xt({separator:`${b}${b}`});const S=getIndentString(l,c);const A=[];let w="";const I=new Set;const k=new Map;const C={dynamicImportFunction:f,exportNamesByVariable:s,format:m,freeze:g,indent:S,namespaceToStringTag:y,pluginDriver:u,snippets:d,useOriginalName:null};let _=false;for(const e of l){let i=0;let s;if(e.isIncluded()||n.has(e)){const r=e.render(C);({source:s}=r);_||(_=r.usesTopLevelAwait);i=s.length();if(i){if(p&&s.lastLine().includes("//"))s.append("\n");k.set(e,s);v.addSource(s);A.push(e)}const o=e.namespace;if(n.has(e)){const e=o.renderBlock(C);if(o.renderFirst())w+=b+e;else v.addSource(new MagicString(e))}const l=t.get(e.scope);if(l){for(const e of l){I.add(e)}}}const{renderedExports:r,removedExports:o}=e.getRenderedExports();h[e.id]={get code(){return s?.toString()??null},originalLength:e.originalCode.length,removedExports:o,renderedExports:r,renderedLength:i}}if(w)v.prepend(w+b+b);if(this.needsExportsShim){v.prepend(`${b}${x} ${Tr}${E}=${E}void 0;${b}${b}`)}const P=p?v:v.trim();if(o&&this.getExportNames().length===0&&i.size===0){r(errorEmptyChunk(this.getChunkName()))}return{accessedGlobals:I,indent:S,magicString:v,renderedSource:P,usedModules:A,usesTopLevelAwait:_}}setDynamicImportResolutions(e){const{accessedGlobalsByScope:t,outputOptions:i,pluginDriver:s,snippets:n}=this;for(const r of this.getIncludedDynamicImports()){if(r.chunk){const{chunk:o,facadeChunk:l,node:c,resolution:u}=r;if(o===this){c.setInternalResolution(u.namespace)}else{c.setExternalResolution((l||o).exportMode,u,i,n,s,t,`'${(l||o).getImportPath(e)}'`,!l?.strictFacade&&o.exportNamesByVariable.get(u.namespace)[0],null)}}else{const{node:o,resolution:l}=r;const[c,u]=this.getDynamicImportStringAndAssertions(l,e);o.setExternalResolution("external",l,i,n,s,t,c,false,u)}}}setIdentifierRenderResolutions(){const{format:e,interop:t,namespaceToStringTag:i,preserveModules:s,externalLiveBindings:n}=this.outputOptions;const r=new Set;for(const t of this.getExportNames()){const i=this.exportsByName.get(t);if(e!=="es"&&e!=="system"&&i.isReassigned&&!i.isId){i.setRenderNames("exports",t)}else if(i instanceof SyntheticNamedExportVariable){r.add(i)}else{i.setRenderNames(null,null)}}for(const e of this.orderedModules){if(e.needsExportShim){this.needsExportsShim=true;break}}const o=new Set(["Object","Promise"]);if(this.needsExportsShim){o.add(Tr)}if(i){o.add("Symbol")}switch(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 wr){o.add(e)}}}deconflictChunk(this.orderedModules,this.getDependenciesToBeDeconflicted(e!=="es"&&e!=="system",e==="amd"||e==="umd"||e==="iife",t),this.imports,o,e,t,s,n,this.chunkByModule,this.externalChunkByModule,r,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setImportMetaResolutions(e){const{accessedGlobalsByScope:t,includedNamespaces:i,orderedModules:s,outputOptions:{format:n}}=this;for(const r of s){for(const i of r.importMetas){i.setResolution(n,t,e)}if(i.has(r)){r.namespace.prepare(t)}}}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules&&this.includedNamespaces.has(e)){const i=e.namespace.getMemberVariables();for(const e of Object.values(i)){t.add(e)}}for(let i of t){if(i instanceof ExportDefaultVariable){i=i.getOriginalVariable()}if(i instanceof SyntheticNamedExportVariable){i=i.getBaseVariable()}const t=this.chunkByModule.get(i.module);if(t!==this){this.imports.add(i);if(i.module instanceof Module){this.checkCircularDependencyImport(i,e);if(!(i instanceof NamespaceVariable&&this.outputOptions.preserveModules)){t.exports.add(i)}}}}if(this.includedNamespaces.has(e)||e.info.isEntry&&e.preserveSignature!==false||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this))){this.ensureReexportsAreAvailableForModule(e)}for(const{node:t,resolution:i}of e.dynamicImports){if(t.included&&i instanceof Module&&this.chunkByModule.get(i)===this&&!this.includedNamespaces.has(i)){this.includedNamespaces.add(i);this.ensureReexportsAreAvailableForModule(i)}}}}function getChunkNameFromModule(e){return getPredefinedChunkNameFromModule(e)??getAliasName(e.id)}function getPredefinedChunkNameFromModule(e){return e.chunkNames.find((({isUserDefined:e})=>e))?.name??e.chunkNames[0]?.name}function getImportedBindingsPerDependency(e,t){const i={};for(const[s,n]of e){const e=new Set;if(n.imports){for(const{imported:t}of n.imports){e.add(t)}}if(n.reexports){for(const{imported:t}of n.reexports){e.add(t)}}i[t(s)]=[...e]}return i}const io=/[#?]/;const resolveFileName=e=>e.getFileName();function*concatLazy(e){for(const t of e){yield*t}}function getChunkAssignments(e,t,i){const{chunkDefinitions:s,modulesInManualChunks:n}=getChunkDefinitionsFromManualChunks(t);const{allEntries:r,dependentEntriesByModule:o,dynamicallyDependentEntriesByDynamicEntry:l,dynamicImportsByEntry:c}=analyzeModuleGraph(e);const u=getChunksFromDependentEntries(getModulesWithDependentEntries(o,n));removeUnnecessaryDependentEntries(u,l,c,r);s.push(...getOptimizedChunks(getChunksFromDependentEntries(u),r.length,i).map((({modules:e})=>({alias:null,modules:e}))));return s}function getChunkDefinitionsFromManualChunks(e){const t=[];const i=new Set(e.keys());const s=Object.create(null);for(const[t,n]of e){addStaticDependenciesToManualChunk(t,s[n]||(s[n]=[]),i)}for(const[e,i]of Object.entries(s)){t.push({alias:e,modules:i})}return{chunkDefinitions:t,modulesInManualChunks:i}}function addStaticDependenciesToManualChunk(e,t,i){const s=new Set([e]);for(const e of s){i.add(e);t.push(e);for(const t of e.dependencies){if(!(t instanceof ExternalModule||i.has(t))){s.add(t)}}}}function analyzeModuleGraph(e){const t=new Set;const i=new Map;const s=[];const n=new Set(e);let r=0;for(const e of n){const o=new Set;s.push(o);const l=new Set([e]);for(const e of l){getOrCreate(i,e,getNewSet).add(r);for(const t of e.getDependenciesToBeIncluded()){if(!(t instanceof ExternalModule)){l.add(t)}}for(const{resolution:i}of e.dynamicImports){if(i instanceof Module&&i.includedDynamicImporters.length>0&&!n.has(i)){t.add(i);n.add(i);o.add(i)}}for(const i of e.implicitlyLoadedBefore){if(!n.has(i)){t.add(i);n.add(i)}}}r++}const o=[...n];const{dynamicEntries:l,dynamicImportsByEntry:c}=getDynamicEntries(o,t,s);return{allEntries:o,dependentEntriesByModule:i,dynamicallyDependentEntriesByDynamicEntry:getDynamicallyDependentEntriesByDynamicEntry(i,l,o),dynamicImportsByEntry:c}}function getDynamicEntries(e,t,i){const s=new Map;const n=new Set;for(const[i,r]of e.entries()){s.set(r,i);if(t.has(r)){n.add(i)}}const r=[];for(const e of i){const t=new Set;for(const i of e){t.add(s.get(i))}r.push(t)}return{dynamicEntries:n,dynamicImportsByEntry:r}}function getDynamicallyDependentEntriesByDynamicEntry(e,t,i){const s=new Map;for(const n of t){const t=getOrCreate(s,n,getNewSet);const r=i[n];for(const i of concatLazy([r.includedDynamicImporters,r.implicitlyLoadedAfter])){for(const s of e.get(i)){t.add(s)}}}return s}function getChunksFromDependentEntries(e){var t;const i=Object.create(null);for(const{dependentEntries:s,modules:n}of e){let e=0n;for(const t of s){e|=1n<<BigInt(t)}(i[t=String(e)]||(i[t]={dependentEntries:new Set(s),modules:[]})).modules.push(...n)}return Object.values(i)}function*getModulesWithDependentEntries(e,t){for(const[i,s]of e){if(!t.has(i)){yield{dependentEntries:s,modules:[i]}}}}function removeUnnecessaryDependentEntries(e,t,i,s){const n=s.map((()=>0n));const r=s.map(((e,i)=>t.has(i)?-1n:0n));let o=1n;for(const{dependentEntries:t}of e){for(const e of t){n[e]|=o}o<<=1n}const l=t;for(const[e,t]of l){l.delete(e);const s=r[e];let o=s;for(const e of t){o&=n[e]|r[e]}if(o!==s){r[e]=o;for(const t of i[e]){getOrCreate(l,t,getNewSet).add(e)}}}o=1n;for(const{dependentEntries:t}of e){for(const e of t){if((r[e]&o)===o){t.delete(e)}}o<<=1n}}function getOptimizedChunks(e,t,i){Lr("optimize chunks",3);const s=getPartitionedChunks(e,t,i);if(!s){Br("optimize chunks",3);return e}i>1&&console.log("Before eliminating small chunks, there were\n",e.length,"chunks, of which\n",s.small.size,"were below minChunkSize.");mergeChunks(s,i);i>1&&console.log("After merging chunks,\n",s.small.size+s.big.size,"chunks remain, of which\n",s.small.size,"are below minChunkSize.");Br("optimize chunks",3);return[...s.small,...s.big]}function getPartitionedChunks(e,t,i){const s=[];const n=[];const r=new Map;const o=[];let l=0n;let c=1n;for(const{dependentEntries:t,modules:u}of e){const e={containedAtoms:c,correlatedAtoms:0n,dependencies:new Set,dependentChunks:new Set,dependentEntries:t,modules:u,pure:true,size:0};let h=0;let d=true;for(const t of u){r.set(t,e);if(t.isIncluded()){d&&(d=!t.hasEffects());h+=i>1?t.estimateSize():1}}e.pure=d;e.size=h;o.push(h);if(!d){l|=c}(h<i?s:n).push(e);c<<=1n}if(s.length===0){return null}l|=addChunkDependenciesAndAtomsAndGetSideEffectAtoms([n,s],r,t,c);return{big:new Set(n),sideEffectAtoms:l,sizeByAtom:o,small:new Set(s)}}function mergeChunks(e,t){const{small:i}=e;for(const s of i){const n=findBestMergeTarget(s,e,t<=1?1:Infinity);if(n){const{containedAtoms:r,correlatedAtoms:o,modules:l,pure:c,size:u}=s;i.delete(s);getChunksInPartition(n,t,e).delete(n);n.modules.push(...l);n.size+=u;n.pure&&(n.pure=c);const{dependencies:h,dependentChunks:d,dependentEntries:p}=n;n.correlatedAtoms&=o;n.containedAtoms|=r;for(const e of s.dependentEntries){p.add(e)}for(const e of s.dependencies){h.add(e);e.dependentChunks.delete(s);e.dependentChunks.add(n)}for(const e of s.dependentChunks){d.add(e);e.dependencies.delete(s);e.dependencies.add(n)}h.delete(n);d.delete(n);getChunksInPartition(n,t,e).add(n)}}}function addChunkDependenciesAndAtomsAndGetSideEffectAtoms(e,t,i,s){const n=new Map;let r=0n;const o=[];for(let e=0;e<i;e++){o.push(0n)}for(const i of e){i.sort(compareChunkSize);for(const e of i){const{dependencies:i,dependentEntries:l,modules:c}=e;for(const o of c){for(const l of o.getDependenciesToBeIncluded()){if(l instanceof ExternalModule){if(l.info.moduleSideEffects){e.containedAtoms|=getOrCreate(n,l,(()=>{const e=s;s<<=1n;r|=e;return e}))}}else{const s=t.get(l);if(s&&s!==e){i.add(s);s.dependentChunks.add(e)}}}}const{containedAtoms:u}=e;for(const e of l){o[e]|=u}}}for(const t of e){for(const e of t){const{dependentEntries:t}=e;e.correlatedAtoms=-1n;for(const i of t){e.correlatedAtoms&=o[i]}}}return r}function findBestMergeTarget(e,{big:t,sideEffectAtoms:i,sizeByAtom:s,small:n},r){let o=null;for(const l of concatLazy([n,t])){if(e===l)continue;const t=getAdditionalSizeAfterMerge(e,l,r,i,s);if(t<r){o=l;if(t===0)break;r=t}}return o}function getChunksInPartition(e,t,i){return e.size<t?i.small:i.big}function compareChunkSize({size:e},{size:t}){return e-t}function getAdditionalSizeAfterMerge(e,t,i,s,n){const r=getAdditionalSizeIfNoTransitiveDependencyOrNonCorrelatedSideEffect(e,t,i,s,n);return r<i?r+getAdditionalSizeIfNoTransitiveDependencyOrNonCorrelatedSideEffect(t,e,i-r,s,n):Infinity}function getAdditionalSizeIfNoTransitiveDependencyOrNonCorrelatedSideEffect(e,t,i,s,n){const{correlatedAtoms:r}=t;let o=e.containedAtoms;const l=o&s;if((r&l)!==l){return Infinity}const c=new Set(e.dependencies);for(const{dependencies:e,containedAtoms:i}of c){o|=i;const n=i&s;if((r&n)!==n){return Infinity}for(const i of e){if(i===t){return Infinity}c.add(i)}}return getAtomsSizeIfBelowLimit(o&~r,i,n)}function getAtomsSizeIfBelowLimit(e,t,i){let s=0;let n=0;let r=1n;const{length:o}=i;for(;n<o;n++){if((e&r)===r){s+=i[n]}r<<=1n;if(s>=t){return Infinity}}return s}function commondir(e){if(e.length===0)return"/";if(e.length===1)return r.dirname(e[0]);const t=e.slice(1).reduce(((e,t)=>{const i=t.split(/\/+|\\+/);let s;for(s=0;e[s]===i[s]&&s<Math.min(e.length,i.length);s++);return e.slice(0,s)}),e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}const compareExecIndex=(e,t)=>e.execIndex>t.execIndex?1:-1;function sortByExecutionOrder(e){e.sort(compareExecIndex)}function analyseModuleExecution(e){let t=0;const i=[];const s=new Set;const n=new Set;const r=new Map;const o=[];const analyseModule=e=>{if(e instanceof Module){for(const t of e.dependencies){if(r.has(t)){if(!s.has(t)){i.push(getCyclePath(t,e,r))}continue}r.set(t,e);analyseModule(t)}for(const t of e.implicitlyLoadedBefore){n.add(t)}for(const{resolution:t}of e.dynamicImports){if(t instanceof Module){n.add(t)}}o.push(e)}e.execIndex=t++;s.add(e)};for(const t of e){if(!r.has(t)){r.set(t,null);analyseModule(t)}}for(const e of n){if(!r.has(e)){r.set(e,null);analyseModule(e)}}return{cyclePaths:i,orderedModules:o}}function getCyclePath(e,t,i){const s=Symbol(e.id);const n=[e.id];let r=t;e.cycles.add(s);while(r!==e){r.cycles.add(s);n.push(r.id);r=i.get(r)}n.push(n[0]);n.reverse();return n}function getGenerateCodeSnippets({compact:e,generatedCode:{arrowFunctions:t,constBindings:i,objectShorthand:s,reservedNamesAsProps:n}}){const{_:r,n:o,s:l}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"};const c=i?"const":"var";const getNonArrowFunctionIntro=(e,{isAsync:t,name:i})=>`${t?`async `:""}function${i?` ${i}`:""}${r}(${e.join(`,${r}`)})${r}`;const u=t?(e,{isAsync:t,name:i})=>{const s=e.length===1;const n=t?`async${s?" ":r}`:"";return`${i?`${c} ${i}${r}=${r}`:""}${n}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:getNonArrowFunctionIntro;const getDirectReturnFunction=(e,{functionReturn:i,lineBreakIndent:s,name:n})=>[`${u(e,{isAsync:false,name:n})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${i?"return ":""}`}`,t?`${n?";":""}${s?`${o}${s.base}`:""}`:`${l}${s?`${o}${s.base}`:r}}`];const h=n?e=>so.test(e):e=>!Si.has(e)&&so.test(e);return{_:r,cnst:c,getDirectReturnFunction:getDirectReturnFunction,getDirectReturnIifeLeft:(e,i,{needsArrowReturnParens:s,needsWrappedFunction:n})=>{const[r,o]=getDirectReturnFunction(e,{functionReturn:true,lineBreakIndent:null,name:null});return`${wrapIfNeeded(`${r}${wrapIfNeeded(i,t&&s)}${o}`,t||n)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:getNonArrowFunctionIntro,getObject(e,{lineBreakIndent:t}){const i=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(e===null)return`${i}${t}`;const n=!h(e);return e===t&&s&&!n?i+e:`${i}${n?`'${e}'`:e}:${r}${t}`})).join(`,`)}${e.length===0?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:l}}const wrapIfNeeded=(e,t)=>t?`(${e})`:e;const so=/^(?!\d)[\w$]+$/;class Source{constructor(e,t){this.isOriginal=true;this.filename=e;this.content=t}traceSegment(e,t,i){return{column:t,line:e,name:i,source:this}}}class Link{constructor(e,t){this.sources=t;this.names=e.names;this.mappings=e.mappings}traceMappings(){const e=[];const t=new Map;const i=[];const s=[];const n=new Map;const r=[];for(const o of this.mappings){const l=[];for(const r of o){if(r.length===1)continue;const o=this.sources[r[1]];if(!o)continue;const c=o.traceSegment(r[2],r[3],r.length===5?this.names[r[4]]:"");if(c){const{column:o,line:u,name:h,source:{content:d,filename:p}}=c;let f=t.get(p);if(f===undefined){f=e.length;e.push(p);t.set(p,f);i[f]=d}else if(i[f]==null){i[f]=d}else if(d!=null&&i[f]!==d){return error(errorConflictingSourcemapSources(p))}const m=[r[0],f,u,o];if(h){let e=n.get(h);if(e===undefined){e=s.length;s.push(h);n.set(h,e)}m[4]=e}l.push(m)}}r.push(l)}return{mappings:r,names:s,sources:e,sourcesContent:i}}traceSegment(e,t,i){const s=this.mappings[e];if(!s)return null;let n=0;let r=s.length-1;while(n<=r){const e=n+r>>1;const o=s[e];if(o[0]===t||n===r){if(o.length==1)return null;const e=this.sources[o[1]];if(!e)return null;return e.traceSegment(o[2],o[3],o.length===5?this.names[o[4]]:i)}if(o[0]>t){r=e-1}else{n=e+1}}return null}}function getLinkMap(e){return function linkMap(t,i){if(i.mappings){return new Link(i,[t])}e(errorSourcemapBroken(i.plugin));return new Link({mappings:[],names:[]},[t])}}function getCollapsedSourcemap(e,t,i,s,n){let o;if(i){const t=i.sources;const s=i.sourcesContent||[];const n=r.dirname(e)||".";const l=i.sourceRoot||".";const c=t.map(((e,t)=>new Source(r.resolve(n,l,e),s[t])));o=new Link(i,c)}else{o=new Source(e,t)}return s.reduce(n,o)}function collapseSourcemaps(e,t,i,s,n,o){const l=getLinkMap(o);const c=i.filter((e=>!e.excludeFromSourcemap)).map((e=>getCollapsedSourcemap(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,l)));const u=new Link(t,c);const h=s.reduce(l,u);let{sources:d,sourcesContent:p,names:f,mappings:m}=h.traceMappings();if(e){const t=r.dirname(e);d=d.map((e=>r.relative(t,e)));e=r.basename(e)}p=n?null:p;return new SourceMap({file:e,mappings:m,names:f,sources:d,sourcesContent:p})}function collapseSourcemap(e,t,i,s,n){if(s.length===0){return i}const r=getCollapsedSourcemap(e,t,i,s,getLinkMap(n));const o=r.traceMappings();return{version:3,...o}}const createHash=()=>c.createHash("sha256");function decodedSourcemap(e){if(!e)return null;if(typeof e==="string"){e=JSON.parse(e)}if(e.mappings===""){return{mappings:[],names:[],sources:[],version:3}}const t=typeof e.mappings==="string"?decode(e.mappings):e.mappings;return{...e,mappings:t}}async function renderChunks(e,t,i,s,n){Lr("render chunks",2);reserveEntryChunksInBundle(e);const r=await Promise.all(e.map((e=>e.render())));Br("render chunks",2);Lr("transform chunks",2);const o=getChunkGraph(e);const{nonHashedChunksWithPlaceholders:l,renderedChunksByPlaceholder:c,hashDependenciesByPlaceholder:u}=await transformChunksAndGenerateContentHashes(r,o,s,i,n);const h=generateFinalHashes(c,u,t);addChunksToBundle(c,h,t,l,i,s);Br("transform chunks",2)}function reserveEntryChunksInBundle(e){for(const t of e){if(t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint){t.getPreliminaryFileName()}}}function getChunkGraph(e){return Object.fromEntries(e.map((e=>{const t=e.getRenderedChunkInfo();return[t.fileName,t]})))}async function transformChunk(e,t,i,s,n,o,l){let c=null;const u=[];let h=await o.hookReduceArg0("renderChunk",[e.toString(),s[t],n,{chunks:s}],((e,t,i)=>{if(t==null)return e;if(typeof t==="string")t={code:t,map:undefined};if(t.map!==null){const e=decodedSourcemap(t.map);u.push(e||{missing:true,plugin:i.name})}return t.code}));const{compact:d,dir:p,file:f,sourcemap:m,sourcemapExcludeSources:g,sourcemapFile:y,sourcemapPathTransform:E,sourcemapIgnoreList:x}=n;if(!d&&h[h.length-1]!=="\n")h+="\n";if(m){Lr("sourcemaps",3);let s;if(f)s=r.resolve(y||f);else if(p)s=r.resolve(p,t);else s=r.resolve(t);const n=e.generateDecodedMap({});c=collapseSourcemaps(s,n,i,u,g,l);for(let e=0;e<c.sources.length;++e){let t=c.sources[e];const i=`${s}.map`;const n=x(t,i);if(typeof n!=="boolean"){error(errorFailedValidation("sourcemapIgnoreList function must return a boolean."))}if(n){if(c.x_google_ignoreList===undefined){c.x_google_ignoreList=[]}if(!c.x_google_ignoreList.includes(e)){c.x_google_ignoreList.push(e)}}if(E){t=E(t,i);if(typeof t!=="string"){error(errorFailedValidation(`sourcemapPathTransform function must return a string.`))}}c.sources[e]=normalize(t)}Br("sourcemaps",3)}return{code:h,map:c}}async function transformChunksAndGenerateContentHashes(e,t,i,s,n){const r=[];const o=new Map;const l=new Map;const c=new Set;for(const{preliminaryFileName:{hashPlaceholder:t}}of e){if(t)c.add(t)}await Promise.all(e.map((async({chunk:e,preliminaryFileName:{fileName:u,hashPlaceholder:h},magicString:d,usedModules:p})=>{const f={chunk:e,fileName:u,...await transformChunk(d,u,p,t,i,s,n)};const{code:m}=f;if(h){const{containedPlaceholders:t,transformedCode:i}=replacePlaceholdersWithDefaultAndGetContainedPlaceholders(m,c);const n=createHash().update(i);const r=s.hookReduceValueSync("augmentChunkHash","",[e.getRenderedChunkInfo()],((e,t)=>{if(t){e+=t}return e}));if(r){n.update(r)}o.set(h,f);l.set(h,{containedPlaceholders:t,contentHash:n.digest("hex")})}else{r.push(f)}})));return{hashDependenciesByPlaceholder:l,nonHashedChunksWithPlaceholders:r,renderedChunksByPlaceholder:o}}function generateFinalHashes(e,t,i){const s=new Map;for(const[n,{fileName:r}]of e){let e=createHash();const o=new Set([n]);for(const i of o){const{containedPlaceholders:s,contentHash:n}=t.get(i);e.update(n);for(const e of s){o.add(e)}}let l;let c;do{if(c){e=createHash().update(c)}c=e.digest("hex").slice(0,n.length);l=replaceSinglePlaceholder(r,n,c)}while(i[Jr].has(l.toLowerCase()));i[l]=eo;s.set(n,c)}return s}function addChunksToBundle(e,t,i,s,n,r){for(const{chunk:s,code:o,fileName:l,map:c}of e.values()){let e=replacePlaceholders(o,t);const u=replacePlaceholders(l,t);if(c){c.file=replacePlaceholders(c.file,t);e+=emitSourceMapAndGetComment(u,c,n,r)}i[u]=s.finalizeChunk(e,c,t)}for(const{chunk:e,code:o,fileName:l,map:c}of s){let s=t.size>0?replacePlaceholders(o,t):o;if(c){s+=emitSourceMapAndGetComment(l,c,n,r)}i[l]=e.finalizeChunk(s,c,t)}}function emitSourceMapAndGetComment(e,t,i,{sourcemap:s,sourcemapBaseUrl:n}){let o;if(s==="inline"){o=t.toUrl()}else{const s=`${r.basename(e)}.map`;o=n?new URL(s,n).toString():s;i.emitFile({fileName:`${e}.map`,source:t.toString(),type:"asset"})}return s==="hidden"?"":`//# ${un}=${o}\n`}class Bundle{constructor(e,t,i,s,n){this.outputOptions=e;this.unsetOptions=t;this.inputOptions=i;this.pluginDriver=s;this.graph=n;this.facadeChunkByModule=new Map;this.includedNamespaces=new Set}async generate(e){Lr("GENERATE",1);const t=Object.create(null);const i=getOutputBundle(t);this.pluginDriver.setOutputBundle(i,this.outputOptions);try{Lr("initialize render",2);await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]);Br("initialize render",2);Lr("generate chunks",2);const e=getHashPlaceholderGenerator();const t=await this.generateChunks(i,e);if(t.length>1){validateOptionsForMultiChunkOutput(this.outputOptions,this.inputOptions.onwarn)}this.pluginDriver.setChunkInformation(this.facadeChunkByModule);for(const e of t){e.generateExports()}Br("generate chunks",2);await renderChunks(t,i,this.pluginDriver,this.outputOptions,this.inputOptions.onwarn)}catch(e){await this.pluginDriver.hookParallel("renderError",[e]);throw e}removeUnreferencedAssets(i);Lr("generate bundle",2);await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,i,e]);this.finaliseAssets(i);Br("generate bundle",2);Br("GENERATE",1);return t}async addManualChunks(e){const t=new Map;const i=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t)}))));for(const{alias:e,entries:s}of i){for(const i of s){addModuleToManualChunk(e,i,t)}}return t}assignManualChunks(e){const t=[];const i={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values()){if(s instanceof Module){const n=e(s.id,i);if(typeof n==="string"){t.push([n,s])}}}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,i]of t){addModuleToManualChunk(e,i,s)}return s}finaliseAssets(e){if(this.outputOptions.validate){for(const t of Object.values(e)){if("code"in t){try{this.graph.contextParse(t.code,{ecmaVersion:"latest"})}catch(e){this.inputOptions.onwarn(errorChunkInvalid(t,e))}}}}this.pluginDriver.finaliseAssets()}async generateChunks(e,t){const{experimentalMinChunkSize:i,inlineDynamicImports:s,manualChunks:n,preserveModules:r}=this.outputOptions;const o=typeof n==="object"?await this.addManualChunks(n):this.assignManualChunks(n);const l=getGenerateCodeSnippets(this.outputOptions);const c=getIncludedModules(this.graph.modulesById);const u=commondir(getAbsoluteEntryModulePaths(c,r));const h=getExternalChunkByModule(this.graph.modulesById,this.outputOptions,u);const d=[];const p=new Map;for(const{alias:n,modules:f}of s?[{alias:null,modules:c}]:r?c.map((e=>({alias:null,modules:[e]}))):getChunkAssignments(this.graph.entryModules,o,i)){sortByExecutionOrder(f);const i=new Chunk(f,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,p,h,this.facadeChunkByModule,this.includedNamespaces,n,t,e,u,l);d.push(i)}for(const e of d){e.link()}const f=[];for(const e of d){f.push(...e.generateFacades())}return[...d,...f]}}function validateOptionsForMultiChunkOutput(e,t){if(e.format==="umd"||e.format==="iife")return error(errorInvalidOption("output.format",I,"UMD and IIFE output formats are not supported for code-splitting builds",e.format));if(typeof e.file==="string")return error(errorInvalidOption("output.file",v,'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 error(errorInvalidOption("output.sourcemapFile",L,'"output.sourcemapFile" is only supported for single-file builds'));if(!e.amd.autoId&&e.amd.id)t(errorInvalidOption("output.amd.id",x,'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}function getIncludedModules(e){const t=[];for(const i of e.values()){if(i instanceof Module&&(i.isIncluded()||i.info.isEntry||i.includedDynamicImporters.length>0)){t.push(i)}}return t}function getAbsoluteEntryModulePaths(e,t){const i=[];for(const s of e){if((s.info.isEntry||t)&&isAbsolute(s.id)){i.push(s.id)}}return i}function getExternalChunkByModule(e,t,i){const s=new Map;for(const n of e.values()){if(n instanceof ExternalModule){s.set(n,new ExternalChunk(n,t,i))}}return s}function addModuleToManualChunk(e,t,i){const s=i.get(t);if(typeof s==="string"&&s!==e){return error(errorCannotAssignModuleToChunk(t.id,e,s))}i.set(t,e)}var no=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,81,2,71,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,3,0,158,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,10,1,2,0,49,6,4,4,14,9,5351,0,7,14,13835,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,101,0,161,6,10,9,357,0,62,13,499,13,983,6,110,6,6,9,4759,9,787719,239];var ro=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,20,1,64,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,16,0,2,12,2,33,125,0,80,921,103,110,18,195,2637,96,16,1071,18,5,4026,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,16,0,30,2,3,0,15,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,7,5,262,61,147,44,11,6,17,0,322,29,19,43,485,27,757,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4153,7,221,3,5761,15,7472,3104,541,1507,4938,6,4191];var oo="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";var ao="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var lo={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"};var co="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";var uo={5:co,"5module":co+" export import",6:co+" const class extends export import super"};var ho=/^in(stanceof)?$/;var po=new RegExp("["+ao+"]");var fo=new RegExp("["+ao+oo+"]");function isInAstralSet(e,t){var i=65536;for(var s=0;s<t.length;s+=2){i+=t[s];if(i>e){return false}i+=t[s+1];if(i>=e){return true}}return false}function isIdentifierStart(e,t){if(e<65){return e===36}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&po.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,ro)}function isIdentifierChar(e,t){if(e<48){return e===36}if(e<58){return true}if(e<65){return false}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&fo.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,ro)||isInAstralSet(e,no)}var mo=function TokenType(e,t){if(t===void 0)t={};this.label=e;this.keyword=t.keyword;this.beforeExpr=!!t.beforeExpr;this.startsExpr=!!t.startsExpr;this.isLoop=!!t.isLoop;this.isAssign=!!t.isAssign;this.prefix=!!t.prefix;this.postfix=!!t.postfix;this.binop=t.binop||null;this.updateContext=null};function binop(e,t){return new mo(e,{beforeExpr:true,binop:t})}var go={beforeExpr:true},yo={startsExpr:true};var Eo={};function kw(e,t){if(t===void 0)t={};t.keyword=e;return Eo[e]=new mo(e,t)}var xo={num:new mo("num",yo),regexp:new mo("regexp",yo),string:new mo("string",yo),name:new mo("name",yo),privateId:new mo("privateId",yo),eof:new mo("eof"),bracketL:new mo("[",{beforeExpr:true,startsExpr:true}),bracketR:new mo("]"),braceL:new mo("{",{beforeExpr:true,startsExpr:true}),braceR:new mo("}"),parenL:new mo("(",{beforeExpr:true,startsExpr:true}),parenR:new mo(")"),comma:new mo(",",go),semi:new mo(";",go),colon:new mo(":",go),dot:new mo("."),question:new mo("?",go),questionDot:new mo("?."),arrow:new mo("=>",go),template:new mo("template"),invalidTemplate:new mo("invalidTemplate"),ellipsis:new mo("...",go),backQuote:new mo("`",yo),dollarBraceL:new mo("${",{beforeExpr:true,startsExpr:true}),eq:new mo("=",{beforeExpr:true,isAssign:true}),assign:new mo("_=",{beforeExpr:true,isAssign:true}),incDec:new mo("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new mo("!/~",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("</>/<=/>=",7),bitShift:binop("<</>>/>>>",8),plusMin:new mo("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new mo("**",{beforeExpr:true}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",go),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",go),_do:kw("do",{isLoop:true,beforeExpr:true}),_else:kw("else",go),_finally:kw("finally"),_for:kw("for",{isLoop:true}),_function:kw("function",yo),_if:kw("if"),_return:kw("return",go),_switch:kw("switch"),_throw:kw("throw",go),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:true}),_with:kw("with"),_new:kw("new",{beforeExpr:true,startsExpr:true}),_this:kw("this",yo),_super:kw("super",yo),_class:kw("class",yo),_extends:kw("extends",go),_export:kw("export"),_import:kw("import",yo),_null:kw("null",yo),_true:kw("true",yo),_false:kw("false",yo),_in:kw("in",{beforeExpr:true,binop:7}),_instanceof:kw("instanceof",{beforeExpr:true,binop:7}),_typeof:kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:kw("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})};var bo=/\r\n?|\n|\u2028|\u2029/;var vo=new RegExp(bo.source,"g");function isNewLine(e){return e===10||e===13||e===8232||e===8233}function nextLineBreak(e,t,i){if(i===void 0)i=e.length;for(var s=t;s<i;s++){var n=e.charCodeAt(s);if(isNewLine(n)){return s<i-1&&n===13&&e.charCodeAt(s+1)===10?s+2:s+1}}return-1}var So=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var Ao=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;var wo=Object.prototype;var Io=wo.hasOwnProperty;var ko=wo.toString;var Co=Object.hasOwn||function(e,t){return Io.call(e,t)};var _o=Array.isArray||function(e){return ko.call(e)==="[object Array]"};function wordsRegexp(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function codePointToString(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var Po=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;var No=function Position(e,t){this.line=e;this.column=t};No.prototype.offset=function offset(e){return new No(this.line,this.column+e)};var Ro=function SourceLocation(e,t,i){this.start=t;this.end=i;if(e.sourceFile!==null){this.source=e.sourceFile}};function getLineInfo(e,t){for(var i=1,s=0;;){var n=nextLineBreak(e,s,t);if(n<0){return new No(i,t-s)}++i;s=n}}var $o={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:false,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false};var Oo=false;function getOptions(e){var t={};for(var i in $o){t[i]=e&&Co(e,i)?e[i]:$o[i]}if(t.ecmaVersion==="latest"){t.ecmaVersion=1e8}else if(t.ecmaVersion==null){if(!Oo&&typeof console==="object"&&console.warn){Oo=true;console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")}t.ecmaVersion=11}else if(t.ecmaVersion>=2015){t.ecmaVersion-=2009}if(t.allowReserved==null){t.allowReserved=t.ecmaVersion<5}if(!e||e.allowHashBang==null){t.allowHashBang=t.ecmaVersion>=14}if(_o(t.onToken)){var s=t.onToken;t.onToken=function(e){return s.push(e)}}if(_o(t.onComment)){t.onComment=pushComment(t,t.onComment)}return t}function pushComment(e,t){return function(i,s,n,r,o,l){var c={type:i?"Block":"Line",value:s,start:n,end:r};if(e.locations){c.loc=new Ro(this,o,l)}if(e.ranges){c.range=[n,r]}t.push(c)}}var To=1,Do=2,Mo=4,Lo=8,Bo=16,Fo=32,Vo=64,zo=128,jo=256,Uo=To|Do|jo;function functionFlags(e,t){return Do|(e?Mo:0)|(t?Lo:0)}var Ho=0,Go=1,Wo=2,qo=3,Ko=4,Yo=5;var Qo=function Parser(e,t,i){this.options=e=getOptions(e);this.sourceFile=e.sourceFile;this.keywords=wordsRegexp(uo[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var s="";if(e.allowReserved!==true){s=lo[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3];if(e.sourceType==="module"){s+=" await"}}this.reservedWords=wordsRegexp(s);var n=(s?s+" ":"")+lo.strict;this.reservedWordsStrict=wordsRegexp(n);this.reservedWordsStrictBind=wordsRegexp(n+" "+lo.strictBind);this.input=String(t);this.containsEsc=false;if(i){this.pos=i;this.lineStart=this.input.lastIndexOf("\n",i-1)+1;this.curLine=this.input.slice(0,this.lineStart).split(bo).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=xo.eof;this.value=null;this.start=this.end=this.pos;this.startLoc=this.endLoc=this.curPosition();this.lastTokEndLoc=this.lastTokStartLoc=null;this.lastTokStart=this.lastTokEnd=this.pos;this.context=this.initialContext();this.exprAllowed=true;this.inModule=e.sourceType==="module";this.strict=this.inModule||this.strictDirective(this.pos);this.potentialArrowAt=-1;this.potentialArrowInForAwait=false;this.yieldPos=this.awaitPos=this.awaitIdentPos=0;this.labels=[];this.undefinedExports=Object.create(null);if(this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"){this.skipLineComment(2)}this.scopeStack=[];this.enterScope(To);this.regexpState=null;this.privateNameStack=[]};var Xo={inFunction:{configurable:true},inGenerator:{configurable:true},inAsync:{configurable:true},canAwait:{configurable:true},allowSuper:{configurable:true},allowDirectSuper:{configurable:true},treatFunctionsAsVar:{configurable:true},allowNewDotTarget:{configurable:true},inClassStaticBlock:{configurable:true}};Qo.prototype.parse=function parse(){var e=this.options.program||this.startNode();this.nextToken();return this.parseTopLevel(e)};Xo.inFunction.get=function(){return(this.currentVarScope().flags&Do)>0};Xo.inGenerator.get=function(){return(this.currentVarScope().flags&Lo)>0&&!this.currentVarScope().inClassFieldInit};Xo.inAsync.get=function(){return(this.currentVarScope().flags&Mo)>0&&!this.currentVarScope().inClassFieldInit};Xo.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&jo){return false}if(t.flags&Do){return(t.flags&Mo)>0}}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};Xo.allowSuper.get=function(){var e=this.currentThisScope();var t=e.flags;var i=e.inClassFieldInit;return(t&Vo)>0||i||this.options.allowSuperOutsideMethod};Xo.allowDirectSuper.get=function(){return(this.currentThisScope().flags&zo)>0};Xo.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};Xo.allowNewDotTarget.get=function(){var e=this.currentThisScope();var t=e.flags;var i=e.inClassFieldInit;return(t&(Do|jo))>0||i};Xo.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&jo)>0};Qo.extend=function extend(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i=this;for(var s=0;s<e.length;s++){i=e[s](i)}return i};Qo.parse=function parse(e,t){return new this(t,e).parse()};Qo.parseExpressionAt=function parseExpressionAt(e,t,i){var s=new this(i,e,t);s.nextToken();return s.parseExpression()};Qo.tokenizer=function tokenizer(e,t){return new this(t,e)};Object.defineProperties(Qo.prototype,Xo);var Zo=Qo.prototype;var Jo=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;Zo.strictDirective=function(e){if(this.options.ecmaVersion<5){return false}for(;;){Ao.lastIndex=e;e+=Ao.exec(this.input)[0].length;var t=Jo.exec(this.input.slice(e));if(!t){return false}if((t[1]||t[2])==="use strict"){Ao.lastIndex=e+t[0].length;var i=Ao.exec(this.input),s=i.index+i[0].length;var n=this.input.charAt(s);return n===";"||n==="}"||bo.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length;Ao.lastIndex=e;e+=Ao.exec(this.input)[0].length;if(this.input[e]===";"){e++}}};Zo.eat=function(e){if(this.type===e){this.next();return true}else{return false}};Zo.isContextual=function(e){return this.type===xo.name&&this.value===e&&!this.containsEsc};Zo.eatContextual=function(e){if(!this.isContextual(e)){return false}this.next();return true};Zo.expectContextual=function(e){if(!this.eatContextual(e)){this.unexpected()}};Zo.canInsertSemicolon=function(){return this.type===xo.eof||this.type===xo.braceR||bo.test(this.input.slice(this.lastTokEnd,this.start))};Zo.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon){this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc)}return true}};Zo.semicolon=function(){if(!this.eat(xo.semi)&&!this.insertSemicolon()){this.unexpected()}};Zo.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma){this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc)}if(!t){this.next()}return true}};Zo.expect=function(e){this.eat(e)||this.unexpected()};Zo.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var ea=function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};Zo.checkPatternErrors=function(e,t){if(!e){return}if(e.trailingComma>-1){this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element")}var i=t?e.parenthesizedAssign:e.parenthesizedBind;if(i>-1){this.raiseRecoverable(i,t?"Assigning to rvalue":"Parenthesized pattern")}};Zo.checkExpressionErrors=function(e,t){if(!e){return false}var i=e.shorthandAssign;var s=e.doubleProto;if(!t){return i>=0||s>=0}if(i>=0){this.raise(i,"Shorthand property assignments are valid only in destructuring patterns")}if(s>=0){this.raiseRecoverable(s,"Redefinition of __proto__ property")}};Zo.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)){this.raise(this.yieldPos,"Yield expression cannot be a default value")}if(this.awaitPos){this.raise(this.awaitPos,"Await expression cannot be a default value")}};Zo.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression"){return this.isSimpleAssignTarget(e.expression)}return e.type==="Identifier"||e.type==="MemberExpression"};var ta=Qo.prototype;ta.parseTopLevel=function(e){var t=Object.create(null);if(!e.body){e.body=[]}while(this.type!==xo.eof){var i=this.parseStatement(null,true,t);e.body.push(i)}if(this.inModule){for(var s=0,n=Object.keys(this.undefinedExports);s<n.length;s+=1){var r=n[s];this.raiseRecoverable(this.undefinedExports[r].start,"Export '"+r+"' is not defined")}}this.adaptDirectivePrologue(e.body);this.next();e.sourceType=this.options.sourceType;return this.finishNode(e,"Program")};var ia={kind:"loop"},sa={kind:"switch"};ta.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let")){return false}Ao.lastIndex=this.pos;var t=Ao.exec(this.input);var i=this.pos+t[0].length,s=this.input.charCodeAt(i);if(s===91||s===92){return true}if(e){return false}if(s===123||s>55295&&s<56320){return true}if(isIdentifierStart(s,true)){var n=i+1;while(isIdentifierChar(s=this.input.charCodeAt(n),true)){++n}if(s===92||s>55295&&s<56320){return true}var r=this.input.slice(i,n);if(!ho.test(r)){return true}}return false};ta.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async")){return false}Ao.lastIndex=this.pos;var e=Ao.exec(this.input);var t=this.pos+e[0].length,i;return!bo.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(isIdentifierChar(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};ta.parseStatement=function(e,t,i){var s=this.type,n=this.startNode(),r;if(this.isLet(e)){s=xo._var;r="let"}switch(s){case xo._break:case xo._continue:return this.parseBreakContinueStatement(n,s.keyword);case xo._debugger:return this.parseDebuggerStatement(n);case xo._do:return this.parseDoStatement(n);case xo._for:return this.parseForStatement(n);case xo._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6){this.unexpected()}return this.parseFunctionStatement(n,false,!e);case xo._class:if(e){this.unexpected()}return this.parseClass(n,true);case xo._if:return this.parseIfStatement(n);case xo._return:return this.parseReturnStatement(n);case xo._switch:return this.parseSwitchStatement(n);case xo._throw:return this.parseThrowStatement(n);case xo._try:return this.parseTryStatement(n);case xo._const:case xo._var:r=r||this.value;if(e&&r!=="var"){this.unexpected()}return this.parseVarStatement(n,r);case xo._while:return this.parseWhileStatement(n);case xo._with:return this.parseWithStatement(n);case xo.braceL:return this.parseBlock(true,n);case xo.semi:return this.parseEmptyStatement(n);case xo._export:case xo._import:if(this.options.ecmaVersion>10&&s===xo._import){Ao.lastIndex=this.pos;var o=Ao.exec(this.input);var l=this.pos+o[0].length,c=this.input.charCodeAt(l);if(c===40||c===46){return this.parseExpressionStatement(n,this.parseExpression())}}if(!this.options.allowImportExportEverywhere){if(!t){this.raise(this.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return s===xo._import?this.parseImport(n):this.parseExport(n,i);default:if(this.isAsyncFunction()){if(e){this.unexpected()}this.next();return this.parseFunctionStatement(n,true,!e)}var u=this.value,h=this.parseExpression();if(s===xo.name&&h.type==="Identifier"&&this.eat(xo.colon)){return this.parseLabeledStatement(n,u,h,e)}else{return this.parseExpressionStatement(n,h)}}};ta.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next();if(this.eat(xo.semi)||this.insertSemicolon()){e.label=null}else if(this.type!==xo.name){this.unexpected()}else{e.label=this.parseIdent();this.semicolon()}var s=0;for(;s<this.labels.length;++s){var n=this.labels[s];if(e.label==null||n.name===e.label.name){if(n.kind!=null&&(i||n.kind==="loop")){break}if(e.label&&i){break}}}if(s===this.labels.length){this.raise(e.start,"Unsyntactic "+t)}return this.finishNode(e,i?"BreakStatement":"ContinueStatement")};ta.parseDebuggerStatement=function(e){this.next();this.semicolon();return this.finishNode(e,"DebuggerStatement")};ta.parseDoStatement=function(e){this.next();this.labels.push(ia);e.body=this.parseStatement("do");this.labels.pop();this.expect(xo._while);e.test=this.parseParenExpression();if(this.options.ecmaVersion>=6){this.eat(xo.semi)}else{this.semicolon()}return this.finishNode(e,"DoWhileStatement")};ta.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;this.labels.push(ia);this.enterScope(0);this.expect(xo.parenL);if(this.type===xo.semi){if(t>-1){this.unexpected(t)}return this.parseFor(e,null)}var i=this.isLet();if(this.type===xo._var||this.type===xo._const||i){var s=this.startNode(),n=i?"let":this.value;this.next();this.parseVar(s,true,n);this.finishNode(s,"VariableDeclaration");if((this.type===xo._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1){if(this.options.ecmaVersion>=9){if(this.type===xo._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}return this.parseForIn(e,s)}if(t>-1){this.unexpected(t)}return this.parseFor(e,s)}var r=this.isContextual("let"),o=false;var l=new ea;var c=this.parseExpression(t>-1?"await":true,l);if(this.type===xo._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(this.options.ecmaVersion>=9){if(this.type===xo._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}if(r&&o){this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'.")}this.toAssignable(c,false,l);this.checkLValPattern(c);return this.parseForIn(e,c)}else{this.checkExpressionErrors(l,true)}if(t>-1){this.unexpected(t)}return this.parseFor(e,c)};ta.parseFunctionStatement=function(e,t,i){this.next();return this.parseFunction(e,ra|(i?0:oa),false,t)};ta.parseIfStatement=function(e){this.next();e.test=this.parseParenExpression();e.consequent=this.parseStatement("if");e.alternate=this.eat(xo._else)?this.parseStatement("if"):null;return this.finishNode(e,"IfStatement")};ta.parseReturnStatement=function(e){if(!this.inFunction&&!this.options.allowReturnOutsideFunction){this.raise(this.start,"'return' outside of function")}this.next();if(this.eat(xo.semi)||this.insertSemicolon()){e.argument=null}else{e.argument=this.parseExpression();this.semicolon()}return this.finishNode(e,"ReturnStatement")};ta.parseSwitchStatement=function(e){this.next();e.discriminant=this.parseParenExpression();e.cases=[];this.expect(xo.braceL);this.labels.push(sa);this.enterScope(0);var t;for(var i=false;this.type!==xo.braceR;){if(this.type===xo._case||this.type===xo._default){var s=this.type===xo._case;if(t){this.finishNode(t,"SwitchCase")}e.cases.push(t=this.startNode());t.consequent=[];this.next();if(s){t.test=this.parseExpression()}else{if(i){this.raiseRecoverable(this.lastTokStart,"Multiple default clauses")}i=true;t.test=null}this.expect(xo.colon)}else{if(!t){this.unexpected()}t.consequent.push(this.parseStatement(null))}}this.exitScope();if(t){this.finishNode(t,"SwitchCase")}this.next();this.labels.pop();return this.finishNode(e,"SwitchStatement")};ta.parseThrowStatement=function(e){this.next();if(bo.test(this.input.slice(this.lastTokEnd,this.start))){this.raise(this.lastTokEnd,"Illegal newline after throw")}e.argument=this.parseExpression();this.semicolon();return this.finishNode(e,"ThrowStatement")};var na=[];ta.parseTryStatement=function(e){this.next();e.block=this.parseBlock();e.handler=null;if(this.type===xo._catch){var t=this.startNode();this.next();if(this.eat(xo.parenL)){t.param=this.parseBindingAtom();var i=t.param.type==="Identifier";this.enterScope(i?Fo:0);this.checkLValPattern(t.param,i?Ko:Wo);this.expect(xo.parenR)}else{if(this.options.ecmaVersion<10){this.unexpected()}t.param=null;this.enterScope(0)}t.body=this.parseBlock(false);this.exitScope();e.handler=this.finishNode(t,"CatchClause")}e.finalizer=this.eat(xo._finally)?this.parseBlock():null;if(!e.handler&&!e.finalizer){this.raise(e.start,"Missing catch or finally clause")}return this.finishNode(e,"TryStatement")};ta.parseVarStatement=function(e,t){this.next();this.parseVar(e,false,t);this.semicolon();return this.finishNode(e,"VariableDeclaration")};ta.parseWhileStatement=function(e){this.next();e.test=this.parseParenExpression();this.labels.push(ia);e.body=this.parseStatement("while");this.labels.pop();return this.finishNode(e,"WhileStatement")};ta.parseWithStatement=function(e){if(this.strict){this.raise(this.start,"'with' in strict mode")}this.next();e.object=this.parseParenExpression();e.body=this.parseStatement("with");return this.finishNode(e,"WithStatement")};ta.parseEmptyStatement=function(e){this.next();return this.finishNode(e,"EmptyStatement")};ta.parseLabeledStatement=function(e,t,i,s){for(var n=0,r=this.labels;n<r.length;n+=1){var o=r[n];if(o.name===t){this.raise(i.start,"Label '"+t+"' is already declared")}}var l=this.type.isLoop?"loop":this.type===xo._switch?"switch":null;for(var c=this.labels.length-1;c>=0;c--){var u=this.labels[c];if(u.statementStart===e.start){u.statementStart=this.start;u.kind=l}else{break}}this.labels.push({name:t,kind:l,statementStart:this.start});e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label");this.labels.pop();e.label=i;return this.finishNode(e,"LabeledStatement")};ta.parseExpressionStatement=function(e,t){e.expression=t;this.semicolon();return this.finishNode(e,"ExpressionStatement")};ta.parseBlock=function(e,t,i){if(e===void 0)e=true;if(t===void 0)t=this.startNode();t.body=[];this.expect(xo.braceL);if(e){this.enterScope(0)}while(this.type!==xo.braceR){var s=this.parseStatement(null);t.body.push(s)}if(i){this.strict=false}this.next();if(e){this.exitScope()}return this.finishNode(t,"BlockStatement")};ta.parseFor=function(e,t){e.init=t;this.expect(xo.semi);e.test=this.type===xo.semi?null:this.parseExpression();this.expect(xo.semi);e.update=this.type===xo.parenR?null:this.parseExpression();this.expect(xo.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,"ForStatement")};ta.parseForIn=function(e,t){var i=this.type===xo._in;this.next();if(t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")){this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer")}e.left=t;e.right=i?this.parseExpression():this.parseMaybeAssign();this.expect(xo.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,i?"ForInStatement":"ForOfStatement")};ta.parseVar=function(e,t,i){e.declarations=[];e.kind=i;for(;;){var s=this.startNode();this.parseVarId(s,i);if(this.eat(xo.eq)){s.init=this.parseMaybeAssign(t)}else if(i==="const"&&!(this.type===xo._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(s.id.type!=="Identifier"&&!(t&&(this.type===xo._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{s.init=null}e.declarations.push(this.finishNode(s,"VariableDeclarator"));if(!this.eat(xo.comma)){break}}return e};ta.parseVarId=function(e,t){e.id=this.parseBindingAtom();this.checkLValPattern(e.id,t==="var"?Go:Wo,false)};var ra=1,oa=2,aa=4;ta.parseFunction=function(e,t,i,s,n){this.initFunction(e);if(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s){if(this.type===xo.star&&t&oa){this.unexpected()}e.generator=this.eat(xo.star)}if(this.options.ecmaVersion>=8){e.async=!!s}if(t&ra){e.id=t&aa&&this.type!==xo.name?null:this.parseIdent();if(e.id&&!(t&oa)){this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?Go:Wo:qo)}}var r=this.yieldPos,o=this.awaitPos,l=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(e.async,e.generator));if(!(t&ra)){e.id=this.type===xo.name?this.parseIdent():null}this.parseFunctionParams(e);this.parseFunctionBody(e,i,false,n);this.yieldPos=r;this.awaitPos=o;this.awaitIdentPos=l;return this.finishNode(e,t&ra?"FunctionDeclaration":"FunctionExpression")};ta.parseFunctionParams=function(e){this.expect(xo.parenL);e.params=this.parseBindingList(xo.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams()};ta.parseClass=function(e,t){this.next();var i=this.strict;this.strict=true;this.parseClassId(e,t);this.parseClassSuper(e);var s=this.enterClassBody();var n=this.startNode();var r=false;n.body=[];this.expect(xo.braceL);while(this.type!==xo.braceR){var o=this.parseClassElement(e.superClass!==null);if(o){n.body.push(o);if(o.type==="MethodDefinition"&&o.kind==="constructor"){if(r){this.raise(o.start,"Duplicate constructor in the same class")}r=true}else if(o.key&&o.key.type==="PrivateIdentifier"&&isPrivateNameConflicted(s,o)){this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared")}}}this.strict=i;this.next();e.body=this.finishNode(n,"ClassBody");this.exitClassBody();return this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};ta.parseClassElement=function(e){if(this.eat(xo.semi)){return null}var t=this.options.ecmaVersion;var i=this.startNode();var s="";var n=false;var r=false;var o="method";var l=false;if(this.eatContextual("static")){if(t>=13&&this.eat(xo.braceL)){this.parseClassStaticBlock(i);return i}if(this.isClassElementNameStart()||this.type===xo.star){l=true}else{s="static"}}i.static=l;if(!s&&t>=8&&this.eatContextual("async")){if((this.isClassElementNameStart()||this.type===xo.star)&&!this.canInsertSemicolon()){r=true}else{s="async"}}if(!s&&(t>=9||!r)&&this.eat(xo.star)){n=true}if(!s&&!r&&!n){var c=this.value;if(this.eatContextual("get")||this.eatContextual("set")){if(this.isClassElementNameStart()){o=c}else{s=c}}}if(s){i.computed=false;i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc);i.key.name=s;this.finishNode(i.key,"Identifier")}else{this.parseClassElementName(i)}if(t<13||this.type===xo.parenL||o!=="method"||n||r){var u=!i.static&&checkKeyName(i,"constructor");var h=u&&e;if(u&&o!=="method"){this.raise(i.key.start,"Constructor can't have get/set modifier")}i.kind=u?"constructor":o;this.parseClassMethod(i,n,r,h)}else{this.parseClassField(i)}return i};ta.isClassElementNameStart=function(){return this.type===xo.name||this.type===xo.privateId||this.type===xo.num||this.type===xo.string||this.type===xo.bracketL||this.type.keyword};ta.parseClassElementName=function(e){if(this.type===xo.privateId){if(this.value==="constructor"){this.raise(this.start,"Classes can't have an element named '#constructor'")}e.computed=false;e.key=this.parsePrivateIdent()}else{this.parsePropertyName(e)}};ta.parseClassMethod=function(e,t,i,s){var n=e.key;if(e.kind==="constructor"){if(t){this.raise(n.start,"Constructor can't be a generator")}if(i){this.raise(n.start,"Constructor can't be an async method")}}else if(e.static&&checkKeyName(e,"prototype")){this.raise(n.start,"Classes may not have a static property named prototype")}var r=e.value=this.parseMethod(t,i,s);if(e.kind==="get"&&r.params.length!==0){this.raiseRecoverable(r.start,"getter should have no params")}if(e.kind==="set"&&r.params.length!==1){this.raiseRecoverable(r.start,"setter should have exactly one param")}if(e.kind==="set"&&r.params[0].type==="RestElement"){this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params")}return this.finishNode(e,"MethodDefinition")};ta.parseClassField=function(e){if(checkKeyName(e,"constructor")){this.raise(e.key.start,"Classes can't have a field named 'constructor'")}else if(e.static&&checkKeyName(e,"prototype")){this.raise(e.key.start,"Classes can't have a static field named 'prototype'")}if(this.eat(xo.eq)){var t=this.currentThisScope();var i=t.inClassFieldInit;t.inClassFieldInit=true;e.value=this.parseMaybeAssign();t.inClassFieldInit=i}else{e.value=null}this.semicolon();return this.finishNode(e,"PropertyDefinition")};ta.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[];this.enterScope(jo|Vo);while(this.type!==xo.braceR){var i=this.parseStatement(null);e.body.push(i)}this.next();this.exitScope();this.labels=t;return this.finishNode(e,"StaticBlock")};ta.parseClassId=function(e,t){if(this.type===xo.name){e.id=this.parseIdent();if(t){this.checkLValSimple(e.id,Wo,false)}}else{if(t===true){this.unexpected()}e.id=null}};ta.parseClassSuper=function(e){e.superClass=this.eat(xo._extends)?this.parseExprSubscripts(null,false):null};ta.enterClassBody=function(){var e={declared:Object.create(null),used:[]};this.privateNameStack.push(e);return e.declared};ta.exitClassBody=function(){var e=this.privateNameStack.pop();var t=e.declared;var i=e.used;var s=this.privateNameStack.length;var n=s===0?null:this.privateNameStack[s-1];for(var r=0;r<i.length;++r){var o=i[r];if(!Co(t,o.name)){if(n){n.used.push(o)}else{this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class")}}}};function isPrivateNameConflicted(e,t){var i=t.key.name;var s=e[i];var n="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")){n=(t.static?"s":"i")+t.kind}if(s==="iget"&&n==="iset"||s==="iset"&&n==="iget"||s==="sget"&&n==="sset"||s==="sset"&&n==="sget"){e[i]="true";return false}else if(!s){e[i]=n;return false}else{return true}}function checkKeyName(e,t){var i=e.computed;var s=e.key;return!i&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}ta.parseExport=function(e,t){this.next();if(this.eat(xo.star)){if(this.options.ecmaVersion>=11){if(this.eatContextual("as")){e.exported=this.parseModuleExportName();this.checkExport(t,e.exported,this.lastTokStart)}else{e.exported=null}}this.expectContextual("from");if(this.type!==xo.string){this.unexpected()}e.source=this.parseExprAtom();this.semicolon();return this.finishNode(e,"ExportAllDeclaration")}if(this.eat(xo._default)){this.checkExport(t,"default",this.lastTokStart);var i;if(this.type===xo._function||(i=this.isAsyncFunction())){var s=this.startNode();this.next();if(i){this.next()}e.declaration=this.parseFunction(s,ra|aa,false,i)}else if(this.type===xo._class){var n=this.startNode();e.declaration=this.parseClass(n,"nullableID")}else{e.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){e.declaration=this.parseStatement(null);if(e.declaration.type==="VariableDeclaration"){this.checkVariableExport(t,e.declaration.declarations)}else{this.checkExport(t,e.declaration.id,e.declaration.id.start)}e.specifiers=[];e.source=null}else{e.declaration=null;e.specifiers=this.parseExportSpecifiers(t);if(this.eatContextual("from")){if(this.type!==xo.string){this.unexpected()}e.source=this.parseExprAtom()}else{for(var r=0,o=e.specifiers;r<o.length;r+=1){var l=o[r];this.checkUnreserved(l.local);this.checkLocalExport(l.local);if(l.local.type==="Literal"){this.raise(l.local.start,"A string literal cannot be used as an exported binding without `from`.")}}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};ta.checkExport=function(e,t,i){if(!e){return}if(typeof t!=="string"){t=t.type==="Identifier"?t.name:t.value}if(Co(e,t)){this.raiseRecoverable(i,"Duplicate export '"+t+"'")}e[t]=true};ta.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier"){this.checkExport(e,t,t.start)}else if(i==="ObjectPattern"){for(var s=0,n=t.properties;s<n.length;s+=1){var r=n[s];this.checkPatternExport(e,r)}}else if(i==="ArrayPattern"){for(var o=0,l=t.elements;o<l.length;o+=1){var c=l[o];if(c){this.checkPatternExport(e,c)}}}else if(i==="Property"){this.checkPatternExport(e,t.value)}else if(i==="AssignmentPattern"){this.checkPatternExport(e,t.left)}else if(i==="RestElement"){this.checkPatternExport(e,t.argument)}else if(i==="ParenthesizedExpression"){this.checkPatternExport(e,t.expression)}};ta.checkVariableExport=function(e,t){if(!e){return}for(var i=0,s=t;i<s.length;i+=1){var n=s[i];this.checkPatternExport(e,n.id)}};ta.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};ta.parseExportSpecifiers=function(e){var t=[],i=true;this.expect(xo.braceL);while(!this.eat(xo.braceR)){if(!i){this.expect(xo.comma);if(this.afterTrailingComma(xo.braceR)){break}}else{i=false}var s=this.startNode();s.local=this.parseModuleExportName();s.exported=this.eatContextual("as")?this.parseModuleExportName():s.local;this.checkExport(e,s.exported,s.exported.start);t.push(this.finishNode(s,"ExportSpecifier"))}return t};ta.parseImport=function(e){this.next();if(this.type===xo.string){e.specifiers=na;e.source=this.parseExprAtom()}else{e.specifiers=this.parseImportSpecifiers();this.expectContextual("from");e.source=this.type===xo.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(e,"ImportDeclaration")};ta.parseImportSpecifiers=function(){var e=[],t=true;if(this.type===xo.name){var i=this.startNode();i.local=this.parseIdent();this.checkLValSimple(i.local,Wo);e.push(this.finishNode(i,"ImportDefaultSpecifier"));if(!this.eat(xo.comma)){return e}}if(this.type===xo.star){var s=this.startNode();this.next();this.expectContextual("as");s.local=this.parseIdent();this.checkLValSimple(s.local,Wo);e.push(this.finishNode(s,"ImportNamespaceSpecifier"));return e}this.expect(xo.braceL);while(!this.eat(xo.braceR)){if(!t){this.expect(xo.comma);if(this.afterTrailingComma(xo.braceR)){break}}else{t=false}var n=this.startNode();n.imported=this.parseModuleExportName();if(this.eatContextual("as")){n.local=this.parseIdent()}else{this.checkUnreserved(n.imported);n.local=n.imported}this.checkLValSimple(n.local,Wo);e.push(this.finishNode(n,"ImportSpecifier"))}return e};ta.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===xo.string){var e=this.parseLiteral(this.value);if(Po.test(e.value)){this.raise(e.start,"An export name cannot include a lone surrogate.")}return e}return this.parseIdent(true)};ta.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t){e[t].directive=e[t].expression.raw.slice(1,-1)}};ta.isDirectiveCandidate=function(e){return this.options.ecmaVersion>=5&&e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var la=Qo.prototype;la.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e){switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await"){this.raise(e.start,"Cannot use 'await' as identifier inside an async function")}break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";if(i){this.checkPatternErrors(i,true)}for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];this.toAssignable(r,t);if(r.type==="RestElement"&&(r.argument.type==="ArrayPattern"||r.argument.type==="ObjectPattern")){this.raise(r.argument.start,"Unexpected token")}}break;case"Property":if(e.kind!=="init"){this.raise(e.key.start,"Object pattern can't contain getter or setter")}this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern";if(i){this.checkPatternErrors(i,true)}this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement";this.toAssignable(e.argument,t);if(e.argument.type==="AssignmentPattern"){this.raise(e.argument.start,"Rest elements cannot have a default value")}break;case"AssignmentExpression":if(e.operator!=="="){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.")}e.type="AssignmentPattern";delete e.operator;this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t){break}default:this.raise(e.start,"Assigning to rvalue")}}else if(i){this.checkPatternErrors(i,true)}return e};la.toAssignableList=function(e,t){var i=e.length;for(var s=0;s<i;s++){var n=e[s];if(n){this.toAssignable(n,t)}}if(i){var r=e[i-1];if(this.options.ecmaVersion===6&&t&&r&&r.type==="RestElement"&&r.argument.type!=="Identifier"){this.unexpected(r.argument.start)}}return e};la.parseSpread=function(e){var t=this.startNode();this.next();t.argument=this.parseMaybeAssign(false,e);return this.finishNode(t,"SpreadElement")};la.parseRestBinding=function(){var e=this.startNode();this.next();if(this.options.ecmaVersion===6&&this.type!==xo.name){this.unexpected()}e.argument=this.parseBindingAtom();return this.finishNode(e,"RestElement")};la.parseBindingAtom=function(){if(this.options.ecmaVersion>=6){switch(this.type){case xo.bracketL:var e=this.startNode();this.next();e.elements=this.parseBindingList(xo.bracketR,true,true);return this.finishNode(e,"ArrayPattern");case xo.braceL:return this.parseObj(true)}}return this.parseIdent()};la.parseBindingList=function(e,t,i){var s=[],n=true;while(!this.eat(e)){if(n){n=false}else{this.expect(xo.comma)}if(t&&this.type===xo.comma){s.push(null)}else if(i&&this.afterTrailingComma(e)){break}else if(this.type===xo.ellipsis){var r=this.parseRestBinding();this.parseBindingListItem(r);s.push(r);if(this.type===xo.comma){this.raise(this.start,"Comma is not permitted after the rest element")}this.expect(e);break}else{var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o);s.push(o)}}return s};la.parseBindingListItem=function(e){return e};la.parseMaybeDefault=function(e,t,i){i=i||this.parseBindingAtom();if(this.options.ecmaVersion<6||!this.eat(xo.eq)){return i}var s=this.startNodeAt(e,t);s.left=i;s.right=this.parseMaybeAssign();return this.finishNode(s,"AssignmentPattern")};la.checkLValSimple=function(e,t,i){if(t===void 0)t=Ho;var s=t!==Ho;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name)){this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode")}if(s){if(t===Wo&&e.name==="let"){this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name")}if(i){if(Co(i,e.name)){this.raiseRecoverable(e.start,"Argument name clash")}i[e.name]=true}if(t!==Yo){this.declareName(e.name,t,e.start)}}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(s){this.raiseRecoverable(e.start,"Binding member expression")}break;case"ParenthesizedExpression":if(s){this.raiseRecoverable(e.start,"Binding parenthesized expression")}return this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};la.checkLValPattern=function(e,t,i){if(t===void 0)t=Ho;switch(e.type){case"ObjectPattern":for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];this.checkLValInnerPattern(r,t,i)}break;case"ArrayPattern":for(var o=0,l=e.elements;o<l.length;o+=1){var c=l[o];if(c){this.checkLValInnerPattern(c,t,i)}}break;default:this.checkLValSimple(e,t,i)}};la.checkLValInnerPattern=function(e,t,i){if(t===void 0)t=Ho;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var ca=function TokContext(e,t,i,s,n){this.token=e;this.isExpr=!!t;this.preserveSpace=!!i;this.override=s;this.generator=!!n};var ua={b_stat:new ca("{",false),b_expr:new ca("{",true),b_tmpl:new ca("${",false),p_stat:new ca("(",false),p_expr:new ca("(",true),q_tmpl:new ca("`",true,true,(function(e){return e.tryReadTemplateToken()})),f_stat:new ca("function",false),f_expr:new ca("function",true),f_expr_gen:new ca("function",true,false,null,true),f_gen:new ca("function",false,false,null,true)};var ha=Qo.prototype;ha.initialContext=function(){return[ua.b_stat]};ha.curContext=function(){return this.context[this.context.length-1]};ha.braceIsBlock=function(e){var t=this.curContext();if(t===ua.f_expr||t===ua.f_stat){return true}if(e===xo.colon&&(t===ua.b_stat||t===ua.b_expr)){return!t.isExpr}if(e===xo._return||e===xo.name&&this.exprAllowed){return bo.test(this.input.slice(this.lastTokEnd,this.start))}if(e===xo._else||e===xo.semi||e===xo.eof||e===xo.parenR||e===xo.arrow){return true}if(e===xo.braceL){return t===ua.b_stat}if(e===xo._var||e===xo._const||e===xo.name){return false}return!this.exprAllowed};ha.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function"){return t.generator}}return false};ha.updateContext=function(e){var t,i=this.type;if(i.keyword&&e===xo.dot){this.exprAllowed=false}else if(t=i.updateContext){t.call(this,e)}else{this.exprAllowed=i.beforeExpr}};ha.overrideContext=function(e){if(this.curContext()!==e){this.context[this.context.length-1]=e}};xo.parenR.updateContext=xo.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=true;return}var e=this.context.pop();if(e===ua.b_stat&&this.curContext().token==="function"){e=this.context.pop()}this.exprAllowed=!e.isExpr};xo.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?ua.b_stat:ua.b_expr);this.exprAllowed=true};xo.dollarBraceL.updateContext=function(){this.context.push(ua.b_tmpl);this.exprAllowed=true};xo.parenL.updateContext=function(e){var t=e===xo._if||e===xo._for||e===xo._with||e===xo._while;this.context.push(t?ua.p_stat:ua.p_expr);this.exprAllowed=true};xo.incDec.updateContext=function(){};xo._function.updateContext=xo._class.updateContext=function(e){if(e.beforeExpr&&e!==xo._else&&!(e===xo.semi&&this.curContext()!==ua.p_stat)&&!(e===xo._return&&bo.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===xo.colon||e===xo.braceL)&&this.curContext()===ua.b_stat)){this.context.push(ua.f_expr)}else{this.context.push(ua.f_stat)}this.exprAllowed=false};xo.backQuote.updateContext=function(){if(this.curContext()===ua.q_tmpl){this.context.pop()}else{this.context.push(ua.q_tmpl)}this.exprAllowed=false};xo.star.updateContext=function(e){if(e===xo._function){var t=this.context.length-1;if(this.context[t]===ua.f_expr){this.context[t]=ua.f_expr_gen}else{this.context[t]=ua.f_gen}}this.exprAllowed=true};xo.name.updateContext=function(e){var t=false;if(this.options.ecmaVersion>=6&&e!==xo.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext()){t=true}}this.exprAllowed=t};var da=Qo.prototype;da.checkPropClash=function(e,t,i){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement"){return}if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand)){return}var s=e.key;var n;switch(s.type){case"Identifier":n=s.name;break;case"Literal":n=String(s.value);break;default:return}var r=e.kind;if(this.options.ecmaVersion>=6){if(n==="__proto__"&&r==="init"){if(t.proto){if(i){if(i.doubleProto<0){i.doubleProto=s.start}}else{this.raiseRecoverable(s.start,"Redefinition of __proto__ property")}}t.proto=true}return}n="$"+n;var o=t[n];if(o){var l;if(r==="init"){l=this.strict&&o.init||o.get||o.set}else{l=o.init||o[r]}if(l){this.raiseRecoverable(s.start,"Redefinition of property")}}else{o=t[n]={init:false,get:false,set:false}}o[r]=true};da.parseExpression=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseMaybeAssign(e,t);if(this.type===xo.comma){var r=this.startNodeAt(i,s);r.expressions=[n];while(this.eat(xo.comma)){r.expressions.push(this.parseMaybeAssign(e,t))}return this.finishNode(r,"SequenceExpression")}return n};da.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator){return this.parseYield(e)}else{this.exprAllowed=false}}var s=false,n=-1,r=-1,o=-1;if(t){n=t.parenthesizedAssign;r=t.trailingComma;o=t.doubleProto;t.parenthesizedAssign=t.trailingComma=-1}else{t=new ea;s=true}var l=this.start,c=this.startLoc;if(this.type===xo.parenL||this.type===xo.name){this.potentialArrowAt=this.start;this.potentialArrowInForAwait=e==="await"}var u=this.parseMaybeConditional(e,t);if(i){u=i.call(this,u,l,c)}if(this.type.isAssign){var h=this.startNodeAt(l,c);h.operator=this.value;if(this.type===xo.eq){u=this.toAssignable(u,false,t)}if(!s){t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1}if(t.shorthandAssign>=u.start){t.shorthandAssign=-1}if(this.type===xo.eq){this.checkLValPattern(u)}else{this.checkLValSimple(u)}h.left=u;this.next();h.right=this.parseMaybeAssign(e);if(o>-1){t.doubleProto=o}return this.finishNode(h,"AssignmentExpression")}else{if(s){this.checkExpressionErrors(t,true)}}if(n>-1){t.parenthesizedAssign=n}if(r>-1){t.trailingComma=r}return u};da.parseMaybeConditional=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseExprOps(e,t);if(this.checkExpressionErrors(t)){return n}if(this.eat(xo.question)){var r=this.startNodeAt(i,s);r.test=n;r.consequent=this.parseMaybeAssign();this.expect(xo.colon);r.alternate=this.parseMaybeAssign(e);return this.finishNode(r,"ConditionalExpression")}return n};da.parseExprOps=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseMaybeUnary(t,false,false,e);if(this.checkExpressionErrors(t)){return n}return n.start===i&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,i,s,-1,e)};da.parseExprOp=function(e,t,i,s,n){var r=this.type.binop;if(r!=null&&(!n||this.type!==xo._in)){if(r>s){var o=this.type===xo.logicalOR||this.type===xo.logicalAND;var l=this.type===xo.coalesce;if(l){r=xo.logicalAND.binop}var c=this.value;this.next();var u=this.start,h=this.startLoc;var d=this.parseExprOp(this.parseMaybeUnary(null,false,false,n),u,h,r,n);var p=this.buildBinary(t,i,e,d,c,o||l);if(o&&this.type===xo.coalesce||l&&(this.type===xo.logicalOR||this.type===xo.logicalAND)){this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses")}return this.parseExprOp(p,t,i,s,n)}}return e};da.buildBinary=function(e,t,i,s,n,r){if(s.type==="PrivateIdentifier"){this.raise(s.start,"Private identifier can only be left side of binary expression")}var o=this.startNodeAt(e,t);o.left=i;o.operator=n;o.right=s;return this.finishNode(o,r?"LogicalExpression":"BinaryExpression")};da.parseMaybeUnary=function(e,t,i,s){var n=this.start,r=this.startLoc,o;if(this.isContextual("await")&&this.canAwait){o=this.parseAwait(s);t=true}else if(this.type.prefix){var l=this.startNode(),c=this.type===xo.incDec;l.operator=this.value;l.prefix=true;this.next();l.argument=this.parseMaybeUnary(null,true,c,s);this.checkExpressionErrors(e,true);if(c){this.checkLValSimple(l.argument)}else if(this.strict&&l.operator==="delete"&&l.argument.type==="Identifier"){this.raiseRecoverable(l.start,"Deleting local variable in strict mode")}else if(l.operator==="delete"&&isPrivateFieldAccess(l.argument)){this.raiseRecoverable(l.start,"Private fields can not be deleted")}else{t=true}o=this.finishNode(l,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===xo.privateId){if(s||this.privateNameStack.length===0){this.unexpected()}o=this.parsePrivateIdent();if(this.type!==xo._in){this.unexpected()}}else{o=this.parseExprSubscripts(e,s);if(this.checkExpressionErrors(e)){return o}while(this.type.postfix&&!this.canInsertSemicolon()){var u=this.startNodeAt(n,r);u.operator=this.value;u.prefix=false;u.argument=o;this.checkLValSimple(o);this.next();o=this.finishNode(u,"UpdateExpression")}}if(!i&&this.eat(xo.starstar)){if(t){this.unexpected(this.lastTokStart)}else{return this.buildBinary(n,r,o,this.parseMaybeUnary(null,false,false,s),"**",false)}}else{return o}};function isPrivateFieldAccess(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&isPrivateFieldAccess(e.expression)}da.parseExprSubscripts=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseExprAtom(e,t);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")"){return n}var r=this.parseSubscripts(n,i,s,false,t);if(e&&r.type==="MemberExpression"){if(e.parenthesizedAssign>=r.start){e.parenthesizedAssign=-1}if(e.parenthesizedBind>=r.start){e.parenthesizedBind=-1}if(e.trailingComma>=r.start){e.trailingComma=-1}}return r};da.parseSubscripts=function(e,t,i,s,n){var r=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start;var o=false;while(true){var l=this.parseSubscript(e,t,i,s,r,o,n);if(l.optional){o=true}if(l===e||l.type==="ArrowFunctionExpression"){if(o){var c=this.startNodeAt(t,i);c.expression=l;l=this.finishNode(c,"ChainExpression")}return l}e=l}};da.parseSubscript=function(e,t,i,s,n,r,o){var l=this.options.ecmaVersion>=11;var c=l&&this.eat(xo.questionDot);if(s&&c){this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions")}var u=this.eat(xo.bracketL);if(u||c&&this.type!==xo.parenL&&this.type!==xo.backQuote||this.eat(xo.dot)){var h=this.startNodeAt(t,i);h.object=e;if(u){h.property=this.parseExpression();this.expect(xo.bracketR)}else if(this.type===xo.privateId&&e.type!=="Super"){h.property=this.parsePrivateIdent()}else{h.property=this.parseIdent(this.options.allowReserved!=="never")}h.computed=!!u;if(l){h.optional=c}e=this.finishNode(h,"MemberExpression")}else if(!s&&this.eat(xo.parenL)){var d=new ea,p=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;var g=this.parseExprList(xo.parenR,this.options.ecmaVersion>=8,false,d);if(n&&!c&&!this.canInsertSemicolon()&&this.eat(xo.arrow)){this.checkPatternErrors(d,false);this.checkYieldAwaitInDefaultParams();if(this.awaitIdentPos>0){this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function")}this.yieldPos=p;this.awaitPos=f;this.awaitIdentPos=m;return this.parseArrowExpression(this.startNodeAt(t,i),g,true,o)}this.checkExpressionErrors(d,true);this.yieldPos=p||this.yieldPos;this.awaitPos=f||this.awaitPos;this.awaitIdentPos=m||this.awaitIdentPos;var y=this.startNodeAt(t,i);y.callee=e;y.arguments=g;if(l){y.optional=c}e=this.finishNode(y,"CallExpression")}else if(this.type===xo.backQuote){if(c||r){this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions")}var E=this.startNodeAt(t,i);E.tag=e;E.quasi=this.parseTemplate({isTagged:true});e=this.finishNode(E,"TaggedTemplateExpression")}return e};da.parseExprAtom=function(e,t){if(this.type===xo.slash){this.readRegexp()}var i,s=this.potentialArrowAt===this.start;switch(this.type){case xo._super:if(!this.allowSuper){this.raise(this.start,"'super' keyword outside a method")}i=this.startNode();this.next();if(this.type===xo.parenL&&!this.allowDirectSuper){this.raise(i.start,"super() call outside constructor of a subclass")}if(this.type!==xo.dot&&this.type!==xo.bracketL&&this.type!==xo.parenL){this.unexpected()}return this.finishNode(i,"Super");case xo._this:i=this.startNode();this.next();return this.finishNode(i,"ThisExpression");case xo.name:var n=this.start,r=this.startLoc,o=this.containsEsc;var l=this.parseIdent(false);if(this.options.ecmaVersion>=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(xo._function)){this.overrideContext(ua.f_expr);return this.parseFunction(this.startNodeAt(n,r),0,false,true,t)}if(s&&!this.canInsertSemicolon()){if(this.eat(xo.arrow)){return this.parseArrowExpression(this.startNodeAt(n,r),[l],false,t)}if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===xo.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){l=this.parseIdent(false);if(this.canInsertSemicolon()||!this.eat(xo.arrow)){this.unexpected()}return this.parseArrowExpression(this.startNodeAt(n,r),[l],true,t)}}return l;case xo.regexp:var c=this.value;i=this.parseLiteral(c.value);i.regex={pattern:c.pattern,flags:c.flags};return i;case xo.num:case xo.string:return this.parseLiteral(this.value);case xo._null:case xo._true:case xo._false:i=this.startNode();i.value=this.type===xo._null?null:this.type===xo._true;i.raw=this.type.keyword;this.next();return this.finishNode(i,"Literal");case xo.parenL:var u=this.start,h=this.parseParenAndDistinguishExpression(s,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)){e.parenthesizedAssign=u}if(e.parenthesizedBind<0){e.parenthesizedBind=u}}return h;case xo.bracketL:i=this.startNode();this.next();i.elements=this.parseExprList(xo.bracketR,true,true,e);return this.finishNode(i,"ArrayExpression");case xo.braceL:this.overrideContext(ua.b_expr);return this.parseObj(false,e);case xo._function:i=this.startNode();this.next();return this.parseFunction(i,0);case xo._class:return this.parseClass(this.startNode(),false);case xo._new:return this.parseNew();case xo.backQuote:return this.parseTemplate();case xo._import:if(this.options.ecmaVersion>=11){return this.parseExprImport()}else{return this.unexpected()}default:this.unexpected()}};da.parseExprImport=function(){var e=this.startNode();if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword import")}var t=this.parseIdent(true);switch(this.type){case xo.parenL:return this.parseDynamicImport(e);case xo.dot:e.meta=t;return this.parseImportMeta(e);default:this.unexpected()}};da.parseDynamicImport=function(e){this.next();e.source=this.parseMaybeAssign();if(!this.eat(xo.parenR)){var t=this.start;if(this.eat(xo.comma)&&this.eat(xo.parenR)){this.raiseRecoverable(t,"Trailing comma is not allowed in import()")}else{this.unexpected(t)}}return this.finishNode(e,"ImportExpression")};da.parseImportMeta=function(e){this.next();var t=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="meta"){this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'")}if(t){this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters")}if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere){this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module")}return this.finishNode(e,"MetaProperty")};da.parseLiteral=function(e){var t=this.startNode();t.value=e;t.raw=this.input.slice(this.start,this.end);if(t.raw.charCodeAt(t.raw.length-1)===110){t.bigint=t.raw.slice(0,-1).replace(/_/g,"")}this.next();return this.finishNode(t,"Literal")};da.parseParenExpression=function(){this.expect(xo.parenL);var e=this.parseExpression();this.expect(xo.parenR);return e};da.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,n,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,l=this.startLoc;var c=[],u=true,h=false;var d=new ea,p=this.yieldPos,f=this.awaitPos,m;this.yieldPos=0;this.awaitPos=0;while(this.type!==xo.parenR){u?u=false:this.expect(xo.comma);if(r&&this.afterTrailingComma(xo.parenR,true)){h=true;break}else if(this.type===xo.ellipsis){m=this.start;c.push(this.parseParenItem(this.parseRestBinding()));if(this.type===xo.comma){this.raise(this.start,"Comma is not permitted after the rest element")}break}else{c.push(this.parseMaybeAssign(false,d,this.parseParenItem))}}var g=this.lastTokEnd,y=this.lastTokEndLoc;this.expect(xo.parenR);if(e&&!this.canInsertSemicolon()&&this.eat(xo.arrow)){this.checkPatternErrors(d,false);this.checkYieldAwaitInDefaultParams();this.yieldPos=p;this.awaitPos=f;return this.parseParenArrowList(i,s,c,t)}if(!c.length||h){this.unexpected(this.lastTokStart)}if(m){this.unexpected(m)}this.checkExpressionErrors(d,true);this.yieldPos=p||this.yieldPos;this.awaitPos=f||this.awaitPos;if(c.length>1){n=this.startNodeAt(o,l);n.expressions=c;this.finishNodeAt(n,"SequenceExpression",g,y)}else{n=c[0]}}else{n=this.parseParenExpression()}if(this.options.preserveParens){var E=this.startNodeAt(i,s);E.expression=n;return this.finishNode(E,"ParenthesizedExpression")}else{return n}};da.parseParenItem=function(e){return e};da.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,false,s)};var pa=[];da.parseNew=function(){if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword new")}var e=this.startNode();var t=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(xo.dot)){e.meta=t;var i=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="target"){this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'")}if(i){this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters")}if(!this.allowNewDotTarget){this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block")}return this.finishNode(e,"MetaProperty")}var s=this.start,n=this.startLoc,r=this.type===xo._import;e.callee=this.parseSubscripts(this.parseExprAtom(),s,n,true,false);if(r&&e.callee.type==="ImportExpression"){this.raise(s,"Cannot use new with import()")}if(this.eat(xo.parenL)){e.arguments=this.parseExprList(xo.parenR,this.options.ecmaVersion>=8,false)}else{e.arguments=pa}return this.finishNode(e,"NewExpression")};da.parseTemplateElement=function(e){var t=e.isTagged;var i=this.startNode();if(this.type===xo.invalidTemplate){if(!t){this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal")}i.value={raw:this.value,cooked:null}}else{i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value}}this.next();i.tail=this.type===xo.backQuote;return this.finishNode(i,"TemplateElement")};da.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=false;var i=this.startNode();this.next();i.expressions=[];var s=this.parseTemplateElement({isTagged:t});i.quasis=[s];while(!s.tail){if(this.type===xo.eof){this.raise(this.pos,"Unterminated template literal")}this.expect(xo.dollarBraceL);i.expressions.push(this.parseExpression());this.expect(xo.braceR);i.quasis.push(s=this.parseTemplateElement({isTagged:t}))}this.next();return this.finishNode(i,"TemplateLiteral")};da.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===xo.name||this.type===xo.num||this.type===xo.string||this.type===xo.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===xo.star)&&!bo.test(this.input.slice(this.lastTokEnd,this.start))};da.parseObj=function(e,t){var i=this.startNode(),s=true,n={};i.properties=[];this.next();while(!this.eat(xo.braceR)){if(!s){this.expect(xo.comma);if(this.options.ecmaVersion>=5&&this.afterTrailingComma(xo.braceR)){break}}else{s=false}var r=this.parseProperty(e,t);if(!e){this.checkPropClash(r,n,t)}i.properties.push(r)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};da.parseProperty=function(e,t){var i=this.startNode(),s,n,r,o;if(this.options.ecmaVersion>=9&&this.eat(xo.ellipsis)){if(e){i.argument=this.parseIdent(false);if(this.type===xo.comma){this.raise(this.start,"Comma is not permitted after the rest element")}return this.finishNode(i,"RestElement")}i.argument=this.parseMaybeAssign(false,t);if(this.type===xo.comma&&t&&t.trailingComma<0){t.trailingComma=this.start}return this.finishNode(i,"SpreadElement")}if(this.options.ecmaVersion>=6){i.method=false;i.shorthand=false;if(e||t){r=this.start;o=this.startLoc}if(!e){s=this.eat(xo.star)}}var l=this.containsEsc;this.parsePropertyName(i);if(!e&&!l&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)){n=true;s=this.options.ecmaVersion>=9&&this.eat(xo.star);this.parsePropertyName(i)}else{n=false}this.parsePropertyValue(i,e,s,n,r,o,t,l);return this.finishNode(i,"Property")};da.parsePropertyValue=function(e,t,i,s,n,r,o,l){if((i||s)&&this.type===xo.colon){this.unexpected()}if(this.eat(xo.colon)){e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,o);e.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===xo.parenL){if(t){this.unexpected()}e.kind="init";e.method=true;e.value=this.parseMethod(i,s)}else if(!t&&!l&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==xo.comma&&this.type!==xo.braceR&&this.type!==xo.eq)){if(i||s){this.unexpected()}e.kind=e.key.name;this.parsePropertyName(e);e.value=this.parseMethod(false);var c=e.kind==="get"?0:1;if(e.value.params.length!==c){var u=e.value.start;if(e.kind==="get"){this.raiseRecoverable(u,"getter should have no params")}else{this.raiseRecoverable(u,"setter should have exactly one param")}}else{if(e.kind==="set"&&e.value.params[0].type==="RestElement"){this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}}}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(i||s){this.unexpected()}this.checkUnreserved(e.key);if(e.key.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=n}e.kind="init";if(t){e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))}else if(this.type===xo.eq&&o){if(o.shorthandAssign<0){o.shorthandAssign=this.start}e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))}else{e.value=this.copyNode(e.key)}e.shorthand=true}else{this.unexpected()}};da.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(xo.bracketL)){e.computed=true;e.key=this.parseMaybeAssign();this.expect(xo.bracketR);return e.key}else{e.computed=false}}return e.key=this.type===xo.num||this.type===xo.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};da.initFunction=function(e){e.id=null;if(this.options.ecmaVersion>=6){e.generator=e.expression=false}if(this.options.ecmaVersion>=8){e.async=false}};da.parseMethod=function(e,t,i){var s=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;this.initFunction(s);if(this.options.ecmaVersion>=6){s.generator=e}if(this.options.ecmaVersion>=8){s.async=!!t}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(t,s.generator)|Vo|(i?zo:0));this.expect(xo.parenL);s.params=this.parseBindingList(xo.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams();this.parseFunctionBody(s,false,true,false);this.yieldPos=n;this.awaitPos=r;this.awaitIdentPos=o;return this.finishNode(s,"FunctionExpression")};da.parseArrowExpression=function(e,t,i,s){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;this.enterScope(functionFlags(i,false)|Bo);this.initFunction(e);if(this.options.ecmaVersion>=8){e.async=!!i}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;e.params=this.toAssignableList(t,true);this.parseFunctionBody(e,true,false,s);this.yieldPos=n;this.awaitPos=r;this.awaitIdentPos=o;return this.finishNode(e,"ArrowFunctionExpression")};da.parseFunctionBody=function(e,t,i,s){var n=t&&this.type!==xo.braceL;var r=this.strict,o=false;if(n){e.body=this.parseMaybeAssign(s);e.expression=true;this.checkParams(e,false)}else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!r||l){o=this.strictDirective(this.end);if(o&&l){this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}}var c=this.labels;this.labels=[];if(o){this.strict=true}this.checkParams(e,!r&&!o&&!t&&!i&&this.isSimpleParamList(e.params));if(this.strict&&e.id){this.checkLValSimple(e.id,Yo)}e.body=this.parseBlock(false,undefined,o&&!r);e.expression=false;this.adaptDirectivePrologue(e.body.body);this.labels=c}this.exitScope()};da.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var s=i[t];if(s.type!=="Identifier"){return false}}return true};da.checkParams=function(e,t){var i=Object.create(null);for(var s=0,n=e.params;s<n.length;s+=1){var r=n[s];this.checkLValInnerPattern(r,Go,t?null:i)}};da.parseExprList=function(e,t,i,s){var n=[],r=true;while(!this.eat(e)){if(!r){this.expect(xo.comma);if(t&&this.afterTrailingComma(e)){break}}else{r=false}var o=void 0;if(i&&this.type===xo.comma){o=null}else if(this.type===xo.ellipsis){o=this.parseSpread(s);if(s&&this.type===xo.comma&&s.trailingComma<0){s.trailingComma=this.start}}else{o=this.parseMaybeAssign(false,s)}n.push(o)}return n};da.checkUnreserved=function(e){var t=e.start;var i=e.end;var s=e.name;if(this.inGenerator&&s==="yield"){this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator")}if(this.inAsync&&s==="await"){this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function")}if(this.currentThisScope().inClassFieldInit&&s==="arguments"){this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer")}if(this.inClassStaticBlock&&(s==="arguments"||s==="await")){this.raise(t,"Cannot use "+s+" in class static initialization block")}if(this.keywords.test(s)){this.raise(t,"Unexpected keyword '"+s+"'")}if(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1){return}var n=this.strict?this.reservedWordsStrict:this.reservedWords;if(n.test(s)){if(!this.inAsync&&s==="await"){this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function")}this.raiseRecoverable(t,"The keyword '"+s+"' is reserved")}};da.parseIdent=function(e){var t=this.startNode();if(this.type===xo.name){t.name=this.value}else if(this.type.keyword){t.name=this.type.keyword;if((t.name==="class"||t.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)){this.context.pop()}}else{this.unexpected()}this.next(!!e);this.finishNode(t,"Identifier");if(!e){this.checkUnreserved(t);if(t.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=t.start}}return t};da.parsePrivateIdent=function(){var e=this.startNode();if(this.type===xo.privateId){e.name=this.value}else{this.unexpected()}this.next();this.finishNode(e,"PrivateIdentifier");if(this.privateNameStack.length===0){this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class")}else{this.privateNameStack[this.privateNameStack.length-1].used.push(e)}return e};da.parseYield=function(e){if(!this.yieldPos){this.yieldPos=this.start}var t=this.startNode();this.next();if(this.type===xo.semi||this.canInsertSemicolon()||this.type!==xo.star&&!this.type.startsExpr){t.delegate=false;t.argument=null}else{t.delegate=this.eat(xo.star);t.argument=this.parseMaybeAssign(e)}return this.finishNode(t,"YieldExpression")};da.parseAwait=function(e){if(!this.awaitPos){this.awaitPos=this.start}var t=this.startNode();this.next();t.argument=this.parseMaybeUnary(null,true,false,e);return this.finishNode(t,"AwaitExpression")};var fa=Qo.prototype;fa.raise=function(e,t){var i=getLineInfo(this.input,e);t+=" ("+i.line+":"+i.column+")";var s=new SyntaxError(t);s.pos=e;s.loc=i;s.raisedAt=this.pos;throw s};fa.raiseRecoverable=fa.raise;fa.curPosition=function(){if(this.options.locations){return new No(this.curLine,this.pos-this.lineStart)}};var ma=Qo.prototype;var ga=function Scope(e){this.flags=e;this.var=[];this.lexical=[];this.functions=[];this.inClassFieldInit=false};ma.enterScope=function(e){this.scopeStack.push(new ga(e))};ma.exitScope=function(){this.scopeStack.pop()};ma.treatFunctionsAsVarInScope=function(e){return e.flags&Do||!this.inModule&&e.flags&To};ma.declareName=function(e,t,i){var s=false;if(t===Wo){var n=this.currentScope();s=n.lexical.indexOf(e)>-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1;n.lexical.push(e);if(this.inModule&&n.flags&To){delete this.undefinedExports[e]}}else if(t===Ko){var r=this.currentScope();r.lexical.push(e)}else if(t===qo){var o=this.currentScope();if(this.treatFunctionsAsVar){s=o.lexical.indexOf(e)>-1}else{s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1}o.functions.push(e)}else{for(var l=this.scopeStack.length-1;l>=0;--l){var c=this.scopeStack[l];if(c.lexical.indexOf(e)>-1&&!(c.flags&Fo&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){s=true;break}c.var.push(e);if(this.inModule&&c.flags&To){delete this.undefinedExports[e]}if(c.flags&Uo){break}}}if(s){this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")}};ma.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1){this.undefinedExports[e.name]=e}};ma.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};ma.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Uo){return t}}};ma.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&Uo&&!(t.flags&Bo)){return t}}};var ya=function Node(e,t,i){this.type="";this.start=t;this.end=0;if(e.options.locations){this.loc=new Ro(e,i)}if(e.options.directSourceFile){this.sourceFile=e.options.directSourceFile}if(e.options.ranges){this.range=[t,0]}};var Ea=Qo.prototype;Ea.startNode=function(){return new ya(this,this.start,this.startLoc)};Ea.startNodeAt=function(e,t){return new ya(this,e,t)};function finishNodeAt(e,t,i,s){e.type=t;e.end=i;if(this.options.locations){e.loc.end=s}if(this.options.ranges){e.range[1]=i}return e}Ea.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Ea.finishNodeAt=function(e,t,i,s){return finishNodeAt.call(this,e,t,i,s)};Ea.copyNode=function(e){var t=new ya(this,e.start,this.startLoc);for(var i in e){t[i]=e[i]}return t};var xa="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";var ba=xa+" Extended_Pictographic";var va=ba;var Sa=va+" EBase EComp EMod EPres ExtPict";var Aa=Sa;var wa=Aa;var Ia={9:xa,10:ba,11:va,12:Sa,13:Aa,14:wa};var ka="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";var Ca="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";var _a=Ca+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";var Pa=_a+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";var Na=Pa+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";var Ra=Na+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";var $a=Ra+" Kawi Nag_Mundari Nagm";var Oa={9:Ca,10:_a,11:Pa,12:Na,13:Ra,14:$a};var Ta={};function buildUnicodeData(e){var t=Ta[e]={binary:wordsRegexp(Ia[e]+" "+ka),nonBinary:{General_Category:wordsRegexp(ka),Script:wordsRegexp(Oa[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script;t.nonBinary.gc=t.nonBinary.General_Category;t.nonBinary.sc=t.nonBinary.Script;t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Da=0,Ma=[9,10,11,12,13,14];Da<Ma.length;Da+=1){var La=Ma[Da];buildUnicodeData(La)}var Ba=Qo.prototype;var Fa=function RegExpValidationState(e){this.parser=e;this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"");this.unicodeProperties=Ta[e.options.ecmaVersion>=14?14:e.options.ecmaVersion];this.source="";this.flags="";this.start=0;this.switchU=false;this.switchN=false;this.pos=0;this.lastIntValue=0;this.lastStringValue="";this.lastAssertionIsQuantifiable=false;this.numCapturingParens=0;this.maxBackReference=0;this.groupNames=[];this.backReferenceNames=[]};Fa.prototype.reset=function reset(e,t,i){var s=i.indexOf("u")!==-1;this.start=e|0;this.source=t+"";this.flags=i;this.switchU=s&&this.parser.options.ecmaVersion>=6;this.switchN=s&&this.parser.options.ecmaVersion>=9};Fa.prototype.raise=function raise(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};Fa.prototype.at=function at(e,t){if(t===void 0)t=false;var i=this.source;var s=i.length;if(e>=s){return-1}var n=i.charCodeAt(e);if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=s){return n}var r=i.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n};Fa.prototype.nextIndex=function nextIndex(e,t){if(t===void 0)t=false;var i=this.source;var s=i.length;if(e>=s){return s}var n=i.charCodeAt(e),r;if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=s||(r=i.charCodeAt(e+1))<56320||r>57343){return e+1}return e+2};Fa.prototype.current=function current(e){if(e===void 0)e=false;return this.at(this.pos,e)};Fa.prototype.lookahead=function lookahead(e){if(e===void 0)e=false;return this.at(this.nextIndex(this.pos,e),e)};Fa.prototype.advance=function advance(e){if(e===void 0)e=false;this.pos=this.nextIndex(this.pos,e)};Fa.prototype.eat=function eat(e,t){if(t===void 0)t=false;if(this.current(t)===e){this.advance(t);return true}return false};Ba.validateRegExpFlags=function(e){var t=e.validFlags;var i=e.flags;for(var s=0;s<i.length;s++){var n=i.charAt(s);if(t.indexOf(n)===-1){this.raise(e.start,"Invalid regular expression flag")}if(i.indexOf(n,s+1)>-1){this.raise(e.start,"Duplicate regular expression flag")}}};Ba.validateRegExpPattern=function(e){this.regexp_pattern(e);if(!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0){e.switchN=true;this.regexp_pattern(e)}};Ba.regexp_pattern=function(e){e.pos=0;e.lastIntValue=0;e.lastStringValue="";e.lastAssertionIsQuantifiable=false;e.numCapturingParens=0;e.maxBackReference=0;e.groupNames.length=0;e.backReferenceNames.length=0;this.regexp_disjunction(e);if(e.pos!==e.source.length){if(e.eat(41)){e.raise("Unmatched ')'")}if(e.eat(93)||e.eat(125)){e.raise("Lone quantifier brackets")}}if(e.maxBackReference>e.numCapturingParens){e.raise("Invalid escape")}for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var s=i[t];if(e.groupNames.indexOf(s)===-1){e.raise("Invalid named capture referenced")}}};Ba.regexp_disjunction=function(e){this.regexp_alternative(e);while(e.eat(124)){this.regexp_alternative(e)}if(this.regexp_eatQuantifier(e,true)){e.raise("Nothing to repeat")}if(e.eat(123)){e.raise("Lone quantifier brackets")}};Ba.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e)){}};Ba.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU){e.raise("Invalid quantifier")}}return true}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e)){this.regexp_eatQuantifier(e);return true}return false};Ba.regexp_eatAssertion=function(e){var t=e.pos;e.lastAssertionIsQuantifiable=false;if(e.eat(94)||e.eat(36)){return true}if(e.eat(92)){if(e.eat(66)||e.eat(98)){return true}e.pos=t}if(e.eat(40)&&e.eat(63)){var i=false;if(this.options.ecmaVersion>=9){i=e.eat(60)}if(e.eat(61)||e.eat(33)){this.regexp_disjunction(e);if(!e.eat(41)){e.raise("Unterminated group")}e.lastAssertionIsQuantifiable=!i;return true}}e.pos=t;return false};Ba.regexp_eatQuantifier=function(e,t){if(t===void 0)t=false;if(this.regexp_eatQuantifierPrefix(e,t)){e.eat(63);return true}return false};Ba.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};Ba.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,n=-1;if(this.regexp_eatDecimalDigits(e)){s=e.lastIntValue;if(e.eat(44)&&this.regexp_eatDecimalDigits(e)){n=e.lastIntValue}if(e.eat(125)){if(n!==-1&&n<s&&!t){e.raise("numbers out of order in {} quantifier")}return true}}if(e.switchU&&!t){e.raise("Incomplete quantifier")}e.pos=i}return false};Ba.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};Ba.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e)){return true}e.pos=t}return false};Ba.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){this.regexp_disjunction(e);if(e.eat(41)){return true}e.raise("Unterminated group")}e.pos=t}return false};Ba.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9){this.regexp_groupSpecifier(e)}else if(e.current()===63){e.raise("Invalid group")}this.regexp_disjunction(e);if(e.eat(41)){e.numCapturingParens+=1;return true}e.raise("Unterminated group")}return false};Ba.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};Ba.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,true)){e.raise("Nothing to repeat")}return false};Ba.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(isSyntaxCharacter(t)){e.lastIntValue=t;e.advance();return true}return false};function isSyntaxCharacter(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}Ba.regexp_eatPatternCharacters=function(e){var t=e.pos;var i=0;while((i=e.current())!==-1&&!isSyntaxCharacter(i)){e.advance()}return e.pos!==t};Ba.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124){e.advance();return true}return false};Ba.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){if(e.groupNames.indexOf(e.lastStringValue)!==-1){e.raise("Duplicate capture group name")}e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};Ba.regexp_eatGroupName=function(e){e.lastStringValue="";if(e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62)){return true}e.raise("Invalid capture group name")}return false};Ba.regexp_eatRegExpIdentifierName=function(e){e.lastStringValue="";if(this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=codePointToString(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e)){e.lastStringValue+=codePointToString(e.lastIntValue)}return true}return false};Ba.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos;var i=this.options.ecmaVersion>=11;var s=e.current(i);e.advance(i);if(s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)){s=e.lastIntValue}if(isRegExpIdentifierStart(s)){e.lastIntValue=s;return true}e.pos=t;return false};function isRegExpIdentifierStart(e){return isIdentifierStart(e,true)||e===36||e===95}Ba.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos;var i=this.options.ecmaVersion>=11;var s=e.current(i);e.advance(i);if(s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)){s=e.lastIntValue}if(isRegExpIdentifierPart(s)){e.lastIntValue=s;return true}e.pos=t;return false};function isRegExpIdentifierPart(e){return isIdentifierChar(e,true)||e===36||e===95||e===8204||e===8205}Ba.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)){return true}if(e.switchU){if(e.current()===99){e.raise("Invalid unicode escape")}e.raise("Invalid escape")}return false};Ba.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU){if(i>e.maxBackReference){e.maxBackReference=i}return true}if(i<=e.numCapturingParens){return true}e.pos=t}return false};Ba.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e)){e.backReferenceNames.push(e.lastStringValue);return true}e.raise("Invalid named reference")}return false};Ba.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,false)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};Ba.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e)){return true}e.pos=t}return false};Ba.regexp_eatZero=function(e){if(e.current()===48&&!isDecimalDigit(e.lookahead())){e.lastIntValue=0;e.advance();return true}return false};Ba.regexp_eatControlEscape=function(e){var t=e.current();if(t===116){e.lastIntValue=9;e.advance();return true}if(t===110){e.lastIntValue=10;e.advance();return true}if(t===118){e.lastIntValue=11;e.advance();return true}if(t===102){e.lastIntValue=12;e.advance();return true}if(t===114){e.lastIntValue=13;e.advance();return true}return false};Ba.regexp_eatControlLetter=function(e){var t=e.current();if(isControlLetter(t)){e.lastIntValue=t%32;e.advance();return true}return false};function isControlLetter(e){return e>=65&&e<=90||e>=97&&e<=122}Ba.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=false;var i=e.pos;var s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(s&&n>=55296&&n<=56319){var r=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343){e.lastIntValue=(n-55296)*1024+(o-56320)+65536;return true}}e.pos=r;e.lastIntValue=n}return true}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&isValidUnicode(e.lastIntValue)){return true}if(s){e.raise("Invalid unicode escape")}e.pos=i}return false};function isValidUnicode(e){return e>=0&&e<=1114111}Ba.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e)){return true}if(e.eat(47)){e.lastIntValue=47;return true}return false}var t=e.current();if(t!==99&&(!e.switchN||t!==107)){e.lastIntValue=t;e.advance();return true}return false};Ba.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48);e.advance()}while((t=e.current())>=48&&t<=57);return true}return false};Ba.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(isCharacterClassEscape(t)){e.lastIntValue=-1;e.advance();return true}if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){e.lastIntValue=-1;e.advance();if(e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125)){return true}e.raise("Invalid property name")}return false};function isCharacterClassEscape(e){return e===100||e===68||e===115||e===83||e===119||e===87}Ba.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;this.regexp_validateUnicodePropertyNameAndValue(e,i,s);return true}}e.pos=t;if(this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;this.regexp_validateUnicodePropertyNameOrValue(e,n);return true}return false};Ba.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){if(!Co(e.unicodeProperties.nonBinary,t)){e.raise("Invalid property name")}if(!e.unicodeProperties.nonBinary[t].test(i)){e.raise("Invalid property value")}};Ba.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(!e.unicodeProperties.binary.test(t)){e.raise("Invalid property name")}};Ba.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyNameCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyNameCharacter(e){return isControlLetter(e)||e===95}Ba.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyValueCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyValueCharacter(e){return isUnicodePropertyNameCharacter(e)||isDecimalDigit(e)}Ba.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};Ba.regexp_eatCharacterClass=function(e){if(e.eat(91)){e.eat(94);this.regexp_classRanges(e);if(e.eat(93)){return true}e.raise("Unterminated character class")}return false};Ba.regexp_classRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;if(e.switchU&&(t===-1||i===-1)){e.raise("Invalid character class")}if(t!==-1&&i!==-1&&t>i){e.raise("Range out of order in character class")}}}};Ba.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e)){return true}if(e.switchU){var i=e.current();if(i===99||isOctalDigit(i)){e.raise("Invalid class escape")}e.raise("Invalid escape")}e.pos=t}var s=e.current();if(s!==93){e.lastIntValue=s;e.advance();return true}return false};Ba.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98)){e.lastIntValue=8;return true}if(e.switchU&&e.eat(45)){e.lastIntValue=45;return true}if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e)){return true}e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};Ba.regexp_eatClassControlLetter=function(e){var t=e.current();if(isDecimalDigit(t)||t===95){e.lastIntValue=t%32;e.advance();return true}return false};Ba.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2)){return true}if(e.switchU){e.raise("Invalid escape")}e.pos=t}return false};Ba.regexp_eatDecimalDigits=function(e){var t=e.pos;var i=0;e.lastIntValue=0;while(isDecimalDigit(i=e.current())){e.lastIntValue=10*e.lastIntValue+(i-48);e.advance()}return e.pos!==t};function isDecimalDigit(e){return e>=48&&e<=57}Ba.regexp_eatHexDigits=function(e){var t=e.pos;var i=0;e.lastIntValue=0;while(isHexDigit(i=e.current())){e.lastIntValue=16*e.lastIntValue+hexToInt(i);e.advance()}return e.pos!==t};function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexToInt(e){if(e>=65&&e<=70){return 10+(e-65)}if(e>=97&&e<=102){return 10+(e-97)}return e-48}Ba.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e)){e.lastIntValue=t*64+i*8+e.lastIntValue}else{e.lastIntValue=t*8+i}}else{e.lastIntValue=t}return true}return false};Ba.regexp_eatOctalDigit=function(e){var t=e.current();if(isOctalDigit(t)){e.lastIntValue=t-48;e.advance();return true}e.lastIntValue=0;return false};function isOctalDigit(e){return e>=48&&e<=55}Ba.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var n=e.current();if(!isHexDigit(n)){e.pos=i;return false}e.lastIntValue=16*e.lastIntValue+hexToInt(n);e.advance()}return true};var Va=function Token(e){this.type=e.type;this.value=e.value;this.start=e.start;this.end=e.end;if(e.options.locations){this.loc=new Ro(e,e.startLoc,e.endLoc)}if(e.options.ranges){this.range=[e.start,e.end]}};var za=Qo.prototype;za.next=function(e){if(!e&&this.type.keyword&&this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword)}if(this.options.onToken){this.options.onToken(new Va(this))}this.lastTokEnd=this.end;this.lastTokStart=this.start;this.lastTokEndLoc=this.endLoc;this.lastTokStartLoc=this.startLoc;this.nextToken()};za.getToken=function(){this.next();return new Va(this)};if(typeof Symbol!=="undefined"){za[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===xo.eof,value:t}}}}}za.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace){this.skipSpace()}this.start=this.pos;if(this.options.locations){this.startLoc=this.curPosition()}if(this.pos>=this.input.length){return this.finishToken(xo.eof)}if(e.override){return e.override(this)}else{this.readToken(this.fullCharCodeAtPos())}};za.readToken=function(e){if(isIdentifierStart(e,this.options.ecmaVersion>=6)||e===92){return this.readWord()}return this.getTokenFromCode(e)};za.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320){return e}var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};za.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition();var t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1){this.raise(this.pos-2,"Unterminated comment")}this.pos=i+2;if(this.options.locations){for(var s=void 0,n=t;(s=nextLineBreak(this.input,n,this.pos))>-1;){++this.curLine;n=this.lineStart=s}}if(this.options.onComment){this.options.onComment(true,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())}};za.skipLineComment=function(e){var t=this.pos;var i=this.options.onComment&&this.curPosition();var s=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!isNewLine(s)){s=this.input.charCodeAt(++this.pos)}if(this.options.onComment){this.options.onComment(false,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())}};za.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10){++this.pos}case 10:case 8232:case 8233:++this.pos;if(this.options.locations){++this.curLine;this.lineStart=this.pos}break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&So.test(String.fromCharCode(e))){++this.pos}else{break e}}}};za.finishToken=function(e,t){this.end=this.pos;if(this.options.locations){this.endLoc=this.curPosition()}var i=this.type;this.type=e;this.value=t;this.updateContext(i)};za.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57){return this.readNumber(true)}var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46){this.pos+=3;return this.finishToken(xo.ellipsis)}else{++this.pos;return this.finishToken(xo.dot)}};za.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(e===61){return this.finishOp(xo.assign,2)}return this.finishOp(xo.slash,1)};za.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1);var i=1;var s=e===42?xo.star:xo.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42){++i;s=xo.starstar;t=this.input.charCodeAt(this.pos+2)}if(t===61){return this.finishOp(xo.assign,i+1)}return this.finishOp(s,i)};za.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61){return this.finishOp(xo.assign,3)}}return this.finishOp(e===124?xo.logicalOR:xo.logicalAND,2)}if(t===61){return this.finishOp(xo.assign,2)}return this.finishOp(e===124?xo.bitwiseOR:xo.bitwiseAND,1)};za.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61){return this.finishOp(xo.assign,2)}return this.finishOp(xo.bitwiseXOR,1)};za.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||bo.test(this.input.slice(this.lastTokEnd,this.pos)))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(xo.incDec,2)}if(t===61){return this.finishOp(xo.assign,2)}return this.finishOp(xo.plusMin,1)};za.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1);var i=1;if(t===e){i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+i)===61){return this.finishOp(xo.assign,i+1)}return this.finishOp(xo.bitShift,i)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45){this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(t===61){i=2}return this.finishOp(xo.relational,i)};za.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61){return this.finishOp(xo.equality,this.input.charCodeAt(this.pos+2)===61?3:2)}if(e===61&&t===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(xo.arrow)}return this.finishOp(e===61?xo.eq:xo.prefix,1)};za.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57){return this.finishOp(xo.questionDot,2)}}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61){return this.finishOp(xo.assign,3)}}return this.finishOp(xo.coalesce,2)}}return this.finishOp(xo.question,1)};za.readToken_numberSign=function(){var e=this.options.ecmaVersion;var t=35;if(e>=13){++this.pos;t=this.fullCharCodeAtPos();if(isIdentifierStart(t,true)||t===92){return this.finishToken(xo.privateId,this.readWord1())}}this.raise(this.pos,"Unexpected character '"+codePointToString(t)+"'")};za.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(xo.parenL);case 41:++this.pos;return this.finishToken(xo.parenR);case 59:++this.pos;return this.finishToken(xo.semi);case 44:++this.pos;return this.finishToken(xo.comma);case 91:++this.pos;return this.finishToken(xo.bracketL);case 93:++this.pos;return this.finishToken(xo.bracketR);case 123:++this.pos;return this.finishToken(xo.braceL);case 125:++this.pos;return this.finishToken(xo.braceR);case 58:++this.pos;return this.finishToken(xo.colon);case 96:if(this.options.ecmaVersion<6){break}++this.pos;return this.finishToken(xo.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88){return this.readRadixNumber(16)}if(this.options.ecmaVersion>=6){if(t===111||t===79){return this.readRadixNumber(8)}if(t===98||t===66){return this.readRadixNumber(2)}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(xo.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(e)+"'")};za.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);this.pos+=t;return this.finishToken(e,i)};za.readRegexp=function(){var e,t,i=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(i,"Unterminated regular expression")}var s=this.input.charAt(this.pos);if(bo.test(s)){this.raise(i,"Unterminated regular expression")}if(!e){if(s==="["){t=true}else if(s==="]"&&t){t=false}else if(s==="/"&&!t){break}e=s==="\\"}else{e=false}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var r=this.pos;var o=this.readWord1();if(this.containsEsc){this.unexpected(r)}var l=this.regexpState||(this.regexpState=new Fa(this));l.reset(i,n,o);this.validateRegExpFlags(l);this.validateRegExpPattern(l);var c=null;try{c=new RegExp(n,o)}catch(e){}return this.finishToken(xo.regexp,{pattern:n,flags:o,value:c})};za.readInt=function(e,t,i){var s=this.options.ecmaVersion>=12&&t===undefined;var n=i&&this.input.charCodeAt(this.pos)===48;var r=this.pos,o=0,l=0;for(var c=0,u=t==null?Infinity:t;c<u;++c,++this.pos){var h=this.input.charCodeAt(this.pos),d=void 0;if(s&&h===95){if(n){this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals")}if(l===95){this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore")}if(c===0){this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits")}l=h;continue}if(h>=97){d=h-97+10}else if(h>=65){d=h-65+10}else if(h>=48&&h<=57){d=h-48}else{d=Infinity}if(d>=e){break}l=h;o=o*e+d}if(s&&l===95){this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits")}if(this.pos===r||t!=null&&this.pos-r!==t){return null}return o};function stringToNumber(e,t){if(t){return parseInt(e,8)}return parseFloat(e.replace(/_/g,""))}function stringToBigInt(e){if(typeof BigInt!=="function"){return null}return BigInt(e.replace(/_/g,""))}za.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);if(i==null){this.raise(this.start+2,"Expected number in radix "+e)}if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110){i=stringToBigInt(this.input.slice(t,this.pos));++this.pos}else if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(xo.num,i)};za.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,undefined,true)===null){this.raise(t,"Invalid number")}var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(i&&this.strict){this.raise(t,"Invalid number")}var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var n=stringToBigInt(this.input.slice(t,this.pos));++this.pos;if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(xo.num,n)}if(i&&/[89]/.test(this.input.slice(t,this.pos))){i=false}if(s===46&&!i){++this.pos;this.readInt(10);s=this.input.charCodeAt(this.pos)}if((s===69||s===101)&&!i){s=this.input.charCodeAt(++this.pos);if(s===43||s===45){++this.pos}if(this.readInt(10)===null){this.raise(t,"Invalid number")}}if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}var r=stringToNumber(this.input.slice(t,this.pos),i);return this.finishToken(xo.num,r)};za.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6){this.unexpected()}var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(t>1114111){this.invalidStringToken(i,"Code point out of bounds")}}else{t=this.readHexChar(4)}return t};za.readString=function(e){var t="",i=++this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated string constant")}var s=this.input.charCodeAt(this.pos);if(s===e){break}if(s===92){t+=this.input.slice(i,this.pos);t+=this.readEscapedChar(false);i=this.pos}else if(s===8232||s===8233){if(this.options.ecmaVersion<10){this.raise(this.start,"Unterminated string constant")}++this.pos;if(this.options.locations){this.curLine++;this.lineStart=this.pos}}else{if(isNewLine(s)){this.raise(this.start,"Unterminated string constant")}++this.pos}}t+=this.input.slice(i,this.pos++);return this.finishToken(xo.string,t)};var ja={};za.tryReadTemplateToken=function(){this.inTemplateElement=true;try{this.readTmplToken()}catch(e){if(e===ja){this.readInvalidTemplateToken()}else{throw e}}this.inTemplateElement=false};za.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9){throw ja}else{this.raise(e,t)}};za.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated template")}var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===xo.template||this.type===xo.invalidTemplate)){if(i===36){this.pos+=2;return this.finishToken(xo.dollarBraceL)}else{++this.pos;return this.finishToken(xo.backQuote)}}e+=this.input.slice(t,this.pos);return this.finishToken(xo.template,e)}if(i===92){e+=this.input.slice(t,this.pos);e+=this.readEscapedChar(true);t=this.pos}else if(isNewLine(i)){e+=this.input.slice(t,this.pos);++this.pos;switch(i){case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:e+="\n";break;default:e+=String.fromCharCode(i);break}if(this.options.locations){++this.curLine;this.lineStart=this.pos}t=this.pos}else{++this.pos}}};za.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++){switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{"){break}case"`":return this.finishToken(xo.invalidTemplate,this.input.slice(this.start,this.pos))}}this.raise(this.start,"Unterminated template")};za.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);++this.pos;switch(t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";case 56:case 57:if(this.strict){this.invalidStringToken(this.pos-1,"Invalid escape sequence")}if(e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string")}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0];var n=parseInt(s,8);if(n>255){s=s.slice(0,-1);n=parseInt(s,8)}this.pos+=s.length-1;t=this.input.charCodeAt(this.pos);if((s!=="0"||t===56||t===57)&&(this.strict||e)){this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode")}return String.fromCharCode(n)}if(isNewLine(t)){return""}return String.fromCharCode(t)}};za.readHexChar=function(e){var t=this.pos;var i=this.readInt(16,e);if(i===null){this.invalidStringToken(t,"Bad character escape sequence")}return i};za.readWord1=function(){this.containsEsc=false;var e="",t=true,i=this.pos;var s=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var n=this.fullCharCodeAtPos();if(isIdentifierChar(n,s)){this.pos+=n<=65535?1:2}else if(n===92){this.containsEsc=true;e+=this.input.slice(i,this.pos);var r=this.pos;if(this.input.charCodeAt(++this.pos)!==117){this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX")}++this.pos;var o=this.readCodePoint();if(!(t?isIdentifierStart:isIdentifierChar)(o,s)){this.invalidStringToken(r,"Invalid Unicode escape")}e+=codePointToString(o);i=this.pos}else{break}t=false}return e+this.input.slice(i,this.pos)};za.readWord=function(){var e=this.readWord1();var t=xo.name;if(this.keywords.test(e)){t=Eo[e]}return this.finishToken(t,e)};var Ua="8.8.2";Qo.acorn={Parser:Qo,version:Ua,defaultOptions:$o,Position:No,SourceLocation:Ro,getLineInfo:getLineInfo,Node:ya,TokenType:mo,tokTypes:xo,keywordTypes:Eo,TokContext:ca,tokContexts:ua,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,Token:Va,isNewLine:isNewLine,lineBreak:bo,lineBreakG:vo,nonASCIIwhitespace:So};function parse(e,t){return Qo.parse(e,t)}function parseExpressionAt(e,t,i){return Qo.parseExpressionAt(e,t,i)}function tokenizer(e,t){return Qo.tokenizer(e,t)}const Ha=Object.defineProperty({__proto__:null,Node:ya,Parser:Qo,Position:No,SourceLocation:Ro,TokContext:ca,Token:Va,TokenType:mo,defaultOptions:$o,getLineInfo:getLineInfo,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,isNewLine:isNewLine,keywordTypes:Eo,lineBreak:bo,lineBreakG:vo,nonASCIIwhitespace:So,parse:parse,parseExpressionAt:parseExpressionAt,tokContexts:ua,tokTypes:xo,tokenizer:tokenizer,version:Ua},Symbol.toStringTag,{value:"Module"});function flru(e){var t,i,s;var n=e||1;function keep(e,r){if(++t>n){s=i;reset(1);++t}i[e]=r}function reset(e){t=0;i=Object.create(null);e||(s=Object.create(null))}reset();return{clear:reset,has:function(e){return i[e]!==void 0||s[e]!==void 0},get:function(e){var t=i[e];if(t!==void 0)return t;if((t=s[e])!==void 0){keep(e,t);return t}},set:function(e,t){if(i[e]!==void 0){i[e]=t}else{keep(e,t)}}}}function resolveIdViaPlugins(e,t,i,s,n,r,o,l){let c=null;let u=null;if(n){c=new Set;for(const i of n){if(e===i.source&&t===i.importer){c.add(i.plugin)}}u=(e,t)=>({...e,resolve:(e,i,{assertions:r,custom:o,isEntry:l,skipSelf:c}=q)=>s(e,i,o,l,r||K,c?[...n,{importer:i,plugin:t,source:e}]:n)})}return i.hookFirstAndGetPlugin("resolveId",[e,t,{assertions:l,custom:r,isEntry:o}],u,c)}async function resolveId(e,t,i,s,n,o,l,c,u){const h=await resolveIdViaPlugins(e,t,s,n,o,l,c,u);if(h!=null){const[e,t]=h;if(typeof e==="object"&&!e.resolvedBy){return{...e,resolvedBy:t.name}}if(typeof e==="string"){return{id:e,resolvedBy:t.name}}return e}if(t!==undefined&&!isAbsolute(e)&&e[0]!==".")return null;return addJsExtensionIfNecessary(t?r.resolve(r.dirname(t),e):r.resolve(e),i)}async function addJsExtensionIfNecessary(e,t){return await findFile(e,t)??await findFile(e+".mjs",t)??await findFile(e+".js",t)}async function findFile(e,t){try{const i=await u.lstat(e);if(!t&&i.isSymbolicLink())return await findFile(await u.realpath(e),t);if(t&&i.isSymbolicLink()||i.isFile()){const t=r.basename(e);const i=await u.readdir(r.dirname(e));if(i.includes(t))return e}}catch{}}const Ga="at position ";const Wa="at output position ";function createPluginCache(e){return{delete(t){return delete e[t]},get(t){const i=e[t];if(!i)return;i[0]=0;return i[1]},has(t){const i=e[t];if(!i)return false;i[0]=0;return true},set(t,i){e[t]=[0,i]}}}function getTrackedPluginCache(e,t){return{delete(i){t();return e.delete(i)},get(i){t();return e.get(i)},has(i){t();return e.has(i)},set(i,s){t();return e.set(i,s)}}}const qa={delete(){return false},get(){return undefined},has(){return false},set(){}};function uncacheablePluginError(e){if(e.startsWith(Ga)||e.startsWith(Wa)){return error(errorAnonymousPluginCache())}return error(errorDuplicatePluginName(e))}function getCacheForUncacheablePlugin(e){return{delete(){return uncacheablePluginError(e)},get(){return uncacheablePluginError(e)},has(){return uncacheablePluginError(e)},set(){return uncacheablePluginError(e)}}}async function transform(e,t,i,s){const n=t.id;const r=[];let o=e.map===null?null:decodedSourcemap(e.map);const l=e.code;let c=e.ast;const u=[];const h=[];let d=false;const useCustomTransformCache=()=>d=true;let p="";const f=e.code;function transformReducer(e,i,n){let o;let l;if(typeof i==="string"){o=i}else if(i&&typeof i==="object"){t.updateOptions(i);if(i.code==null){if(i.map||i.ast){s(errorNoTransformMapOrAstWithoutCode(n.name))}return e}({code:o,map:l,ast:c}=i)}else{return e}if(l!==null){r.push(decodedSourcemap(typeof l==="string"?JSON.parse(l):l)||{missing:true,plugin:n.name})}return o}let m;try{m=await i.hookReduceArg0("transform",[f,n],transformReducer,((e,t)=>{p=t.name;return{...e,addWatchFile(t){u.push(t);e.addWatchFile(t)},cache:d?e.cache:getTrackedPluginCache(e.cache,useCustomTransformCache),emitFile(e){h.push(e);return i.emitFile(e)},error(t,i){if(typeof t==="string")t={message:t};if(i)augmentCodeLocation(t,i,f,n);t.id=n;t.hook="transform";return e.error(t)},getCombinedSourcemap(){const e=collapseSourcemap(n,l,o,r,s);if(!e){const e=new MagicString(l);return e.generateMap({hires:true,includeContent:true,source:n})}if(o!==e){o=e;r.length=0}return new SourceMap({...e,file:null,sourcesContent:e.sourcesContent})},setAssetSource(){return this.error(errorInvalidSetAssetSourceCall())},warn(t,i){if(typeof t==="string")t={message:t};if(i)augmentCodeLocation(t,i,f,n);t.id=n;t.hook="transform";e.warn(t)}}}))}catch(e){return error(errorPluginError(e,p,{hook:"transform",id:n}))}if(!d&&h.length>0)t.transformFiles=h;return{ast:c,code:m,customTransformCache:d,originalCode:l,originalSourcemap:o,sourcemapChain:r,transformDependencies:u}}const Ka="resolveDependencies";class ModuleLoader{constructor(e,t,i,s){this.graph=e;this.modulesById=t;this.options=i;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,i,s,n,r=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(this.options.external(e,t,false)?false:await resolveId(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,r,i,typeof s==="boolean"?s:!t,n),t,e),n);this.hasModuleSideEffects=i.treeshake?i.treeshake.moduleSideEffects:()=>true}async addAdditionalModules(e){const t=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,false,undefined,null)))));await this.awaitLoadModulesPromise();return t}async addEntryModules(e,t){const i=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,true,t,null)))).then((n=>{for(const[r,o]of n.entries()){o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t;addChunkNamesToModule(o,e[r],t,s+r);const n=this.indexedEntryModules.find((e=>e.module===o));if(n){n.index=Math.min(n.index,i+r)}else{this.indexedEntryModules.push({index:i+r,module:o})}}this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1));return n})));await this.awaitLoadModulesPromise();return{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:i,name:s,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:i,name:s||null};const l=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],false)).newEntryModules[0];if(r!=null){l.preserveSignature=r}return l}async preloadModule(e){const t=await this.fetchModule(this.getResolvedIdWithDefaults(e,K),undefined,false,e.resolveDependencies?Ka:true);return t.info}addEntryWithImplicitDependants(e,t){const i=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,false,e.importer,null).then((async s=>{addChunkNamesToModule(s,e,false,i);if(!s.info.isEntry){this.implicitEntryModules.add(s);const i=await Promise.all(t.map((t=>this.loadEntryModule(t,false,e.importer,s.id))));for(const e of i){s.implicitlyLoadedAfter.add(e)}for(const e of s.implicitlyLoadedAfter){e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,i){let s;try{s=await this.graph.fileOperationQueue.run((async()=>await this.pluginDriver.hookFirst("load",[e])??await u.readFile(e,"utf8")))}catch(i){let s=`Could not load ${e}`;if(t)s+=` (imported by ${relativeId(t)})`;s+=`: ${i.message}`;i.message=s;throw i}const n=typeof s==="string"?{code:s}:s!=null&&typeof s==="object"&&typeof s.code==="string"?s:error(errorBadLoader(e));const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===n.code&&!await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}])){if(r.transformFiles){for(const e of r.transformFiles)this.pluginDriver.emitFile(e)}i.setSource(r)}else{i.updateOptions(n);i.setSource(await transform(n,i,this.pluginDriver,this.options.onwarn))}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise;await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);this.latestLoadModulesPromise.catch((()=>{}));return e}async fetchDynamicDependencies(e,t){const i=await Promise.all(t.map((t=>t.then((async([t,i])=>{if(i===null)return null;if(typeof i==="string"){t.resolution=i;return null}return t.resolution=await this.fetchResolvedDependency(relativeId(i.id),e.id,i)})))));for(const t of i){if(t){e.dynamicDependencies.add(t);t.dynamicImporters.push(e.id)}}}async fetchModule({assertions:e,id:t,meta:i,moduleSideEffects:s,syntheticNamedExports:n},r,o,l){const c=this.modulesById.get(t);if(c instanceof Module){if(r&&doAssertionsDiffer(e,c.info.assertions)){this.options.onwarn(errorInconsistentImportAssertions(c.info.assertions,e,t,r))}await this.handleExistingModule(c,o,l);return c}const u=new Module(this.graph,t,this.options,o,s,n,i,e);this.modulesById.set(t,u);this.graph.watchFiles[t]=true;const h=this.addModuleSource(t,r,u).then((()=>[this.getResolveStaticDependencyPromises(u),this.getResolveDynamicImportPromises(u),d]));const d=waitForDependencyResolution(h).then((()=>this.pluginDriver.hookParallel("moduleParsed",[u.info])));d.catch((()=>{}));this.moduleLoadPromises.set(u,h);const p=await h;if(!l){await this.fetchModuleDependencies(u,...p)}else if(l===Ka){await d}return u}async fetchModuleDependencies(e,t,i,s){if(this.modulesWithLoadedDependencies.has(e)){return}this.modulesWithLoadedDependencies.add(e);await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,i)]);e.linkImports();await s}fetchResolvedDependency(e,t,i){if(i.external){const{assertions:s,external:n,id:r,moduleSideEffects:o,meta:l}=i;let c=this.modulesById.get(r);if(!c){c=new ExternalModule(this.options,r,o,l,n!=="absolute"&&isAbsolute(r),s);this.modulesById.set(r,c)}else if(!(c instanceof ExternalModule)){return error(errorInternalIdCannotBeExternal(e,t))}else if(doAssertionsDiffer(c.info.assertions,s)){this.options.onwarn(errorInconsistentImportAssertions(c.info.assertions,s,e,t))}return Promise.resolve(c)}return this.fetchModule(i,t,false,false)}async fetchStaticDependencies(e,t){for(const i of await Promise.all(t.map((t=>t.then((([t,i])=>this.fetchResolvedDependency(t,e.id,i))))))){e.dependencies.add(i);i.importers.push(e.id)}if(!this.options.treeshake||e.info.moduleSideEffects==="no-treeshake"){for(const t of e.dependencies){if(t instanceof Module){t.importedFromNotTreeshaken=true}}}}getNormalizedResolvedIdWithoutDefaults(e,t,i){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if(typeof e==="object"){const n=e.external||this.options.external(e.id,t,true);return{...e,external:n&&(n==="relative"||!isAbsolute(e.id)||n===true&&isNotAbsoluteExternal(e.id,i,s)||"absolute")}}const n=this.options.external(e,t,true);return{external:n&&(isNotAbsoluteExternal(e,i,s)||"absolute"),id:n&&s?normalizeRelativeExternalId(e,t):e}}const n=s?normalizeRelativeExternalId(i,t):i;if(e!==false&&!this.options.external(n,t,true)){return null}return{external:isNotAbsoluteExternal(n,i,s)||"absolute",id:n}}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const i=await this.resolveDynamicImport(e,typeof t.argument==="string"?t.argument:t.argument.esTreeNode,e.id,getAssertionsFromImportExpression(t.node));if(i&&typeof i==="object"){t.id=i.id}return[t,i]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sourcesWithAssertions,(async([t,i])=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleInvalidResolvedId(await this.resolveId(t,e.id,K,false,i),t,e.id,i)]))}getResolvedIdWithDefaults(e,t){if(!e){return null}const i=e.external||false;return{assertions:e.assertions||t,external:i,id:e.id,meta:e.meta||{},moduleSideEffects:e.moduleSideEffects??this.hasModuleSideEffects(e.id,!!i),resolvedBy:e.resolvedBy??"rollup",syntheticNamedExports:e.syntheticNamedExports??false}}async handleExistingModule(e,t,i){const s=this.moduleLoadPromises.get(e);if(i){return i===Ka?waitForDependencyResolution(s):s}if(t){e.info.isEntry=true;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,i,s){if(e===null){if(isRelative(t)){return error(errorUnresolvedImport(t,i))}this.options.onwarn(errorUnresolvedImportTreatedAsExternal(t,i));return{assertions:s,external:true,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,true),resolvedBy:"rollup",syntheticNamedExports:false}}else if(e.external&&e.syntheticNamedExports){this.options.onwarn(errorExternalSyntheticExports(t,i))}return e}async loadEntryModule(e,t,i,s){const n=await resolveId(e,i,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,K,true,K);if(n==null){return error(s===null?errorUnresolvedEntry(e):errorUnresolvedImplicitDependant(e,s))}if(n===false||typeof n==="object"&&n.external){return error(s===null?errorEntryCannotBeExternal(e):errorImplicitDependantCannotBeExternal(e,s))}return this.fetchModule(this.getResolvedIdWithDefaults(typeof n==="object"?n:{id:n},K),undefined,t,false)}async resolveDynamicImport(e,t,i,s){const n=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,i,{assertions:s}]);if(typeof t!=="string"){if(typeof n==="string"){return n}if(!n){return null}return this.getResolvedIdWithDefaults(n,s)}if(n==null){const n=e.resolvedIds[t];if(n){if(doAssertionsDiffer(n.assertions,s)){this.options.onwarn(errorInconsistentImportAssertions(n.assertions,s,t,i))}return n}return e.resolvedIds[t]=this.handleInvalidResolvedId(await this.resolveId(t,e.id,K,false,s),t,e.id,s)}return this.handleInvalidResolvedId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(n,i,t),s),t,i,s)}}function normalizeRelativeExternalId(e,t){return isRelative(e)?t?r.resolve(t,"..",e):r.resolve(e):e}function addChunkNamesToModule(e,{fileName:t,name:i},s,n){if(t!==null){e.chunkFileNames.add(t)}else if(i!==null){let t=0;while(e.chunkNames[t]?.priority<n)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:i,priority:n})}}function isNotAbsoluteExternal(e,t,i){return i===true||i==="ifRelativeSource"&&isRelative(t)||!isAbsolute(e)}async function waitForDependencyResolution(e){const[t,i]=await e;return Promise.all([...t,...i])}class GlobalScope extends qn{constructor(){super();this.parent=null;this.variables.set("undefined",new UndefinedVariable)}findVariable(e){let t=this.variables.get(e);if(!t){t=new GlobalVariable(e);this.variables.set(e,t)}return t}}function getSourceHash(e){return createHash().update(e).digest("hex")}function generateAssetFileName(e,t,i,s,n){const o=s.sanitizeFileName(e||"asset");return makeUnique(renderNamePattern(typeof s.assetFileNames==="function"?s.assetFileNames({name:e,source:t,type:"asset"}):s.assetFileNames,"output.assetFileNames",{ext:()=>r.extname(o).slice(1),extname:()=>r.extname(o),hash:e=>i.slice(0,Math.max(0,e||Xr)),name:()=>o.slice(0,Math.max(0,o.length-r.extname(o).length))}),n)}function reserveFileNameInBundle(e,{bundle:t},i){if(t[Jr].has(e.toLowerCase())){i(errorFileNameConflict(e))}else{t[e]=eo}}const Ya=new Set(["chunk","asset","prebuilt-chunk"]);function hasValidType(e){return Boolean(e&&Ya.has(e.type))}function hasValidName(e){const t=e.fileName||e.name;return!t||typeof t==="string"&&!isPathFragment(t)}function getValidSource(e,t,i){if(!(typeof e==="string"||e instanceof Uint8Array)){const e=t.fileName||t.name||i;return error(errorFailedValidation(`Could not set source for ${typeof e==="string"?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function getAssetFileName(e,t){if(typeof e.fileName!=="string"){return error(errorAssetNotFinalisedForFileName(e.name||t))}return e.fileName}function getChunkFileName(e,t){if(e.fileName){return e.fileName}if(t){return t.get(e.module).getFileName()}return error(errorChunkNotGeneratedForFileName(e.fileName||e.name))}class FileEmitter{constructor(e,t,i){this.graph=e;this.options=t;this.facadeChunkByModule=null;this.nextIdBase=1;this.output=null;this.outputFileEmitters=[];this.emitFile=e=>{if(!hasValidType(e)){return error(errorFailedValidation(`Emitted files must be of type "asset", "chunk" or "prebuilt-chunk", received "${e&&e.type}".`))}if(e.type==="prebuilt-chunk"){return this.emitPrebuiltChunk(e)}if(!hasValidName(e)){return error(errorFailedValidation(`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}".`))}if(e.type==="chunk"){return this.emitChunk(e)}return this.emitAsset(e)};this.finaliseAssets=()=>{for(const[e,t]of this.filesByReferenceId){if(t.type==="asset"&&typeof t.fileName!=="string")return error(errorNoAssetSourceSet(t.name||e))}};this.getFileName=e=>{const t=this.filesByReferenceId.get(e);if(!t)return error(errorFileReferenceIdNotFoundForFilename(e));if(t.type==="chunk"){return getChunkFileName(t,this.facadeChunkByModule)}if(t.type==="prebuilt-chunk"){return t.fileName}return getAssetFileName(t,e)};this.setAssetSource=(e,t)=>{const i=this.filesByReferenceId.get(e);if(!i)return error(errorAssetReferenceIdNotFoundForSetSource(e));if(i.type!=="asset"){return error(errorFailedValidation(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`))}if(i.source!==undefined){return error(errorAssetSourceAlreadySet(i.name||e))}const s=getValidSource(t,i,e);if(this.output){this.finalizeAdditionalAsset(i,s,this.output)}else{i.source=s;for(const e of this.outputFileEmitters){e.finalizeAdditionalAsset(i,s,e.output)}}};this.setChunkInformation=e=>{this.facadeChunkByModule=e};this.setOutputBundle=(e,t)=>{const i=this.output={bundle:e,fileNamesBySource:new Map,outputOptions:t};for(const e of this.filesByReferenceId.values()){if(e.fileName){reserveFileNameInBundle(e.fileName,i,this.options.onwarn)}}const s=new Map;for(const e of this.filesByReferenceId.values()){if(e.type==="asset"&&e.source!==undefined){if(e.fileName){this.finalizeAdditionalAsset(e,e.source,i)}else{const t=getSourceHash(e.source);getOrCreate(s,t,(()=>[])).push(e)}}else if(e.type==="prebuilt-chunk"){this.output.bundle[e.fileName]=this.createPrebuiltChunk(e)}}for(const[e,t]of s){this.finalizeAssetsWithSameSource(t,e,i)}};this.filesByReferenceId=i?new Map(i.filesByReferenceId):new Map;i?.addOutputFileEmitter(this)}addOutputFileEmitter(e){this.outputFileEmitters.push(e)}assignReferenceId(e,t){let i=t;do{i=createHash().update(i).digest("hex").slice(0,8)}while(this.filesByReferenceId.has(i)||this.outputFileEmitters.some((({filesByReferenceId:e})=>e.has(i))));e.referenceId=i;this.filesByReferenceId.set(i,e);for(const{filesByReferenceId:t}of this.outputFileEmitters){t.set(i,e)}return i}createPrebuiltChunk(e){return{code:e.code,dynamicImports:[],exports:e.exports||[],facadeModuleId:null,fileName:e.fileName,implicitlyLoadedBefore:[],importedBindings:{},imports:[],isDynamicEntry:false,isEntry:false,isImplicitEntry:false,map:e.map||null,moduleIds:[],modules:{},name:e.fileName,referencedFiles:[],type:"chunk"}}emitAsset(e){const t=e.source===undefined?undefined:getValidSource(e.source,e,null);const i={fileName:e.fileName,name:e.name,needsCodeReference:!!e.needsCodeReference,referenceId:"",source:t,type:"asset"};const s=this.assignReferenceId(i,e.fileName||e.name||String(this.nextIdBase++));if(this.output){this.emitAssetWithReferenceId(i,this.output)}else{for(const e of this.outputFileEmitters){e.emitAssetWithReferenceId(i,e.output)}}return s}emitAssetWithReferenceId(e,t){const{fileName:i,source:s}=e;if(i){reserveFileNameInBundle(i,t,this.options.onwarn)}if(s!==undefined){this.finalizeAdditionalAsset(e,s,t)}}emitChunk(e){if(this.graph.phase>Dr.LOAD_AND_PARSE){return error(errorInvalidRollupPhaseForChunkEmission())}if(typeof e.id!=="string"){return error(errorFailedValidation(`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"};this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{}));return this.assignReferenceId(t,e.id)}emitPrebuiltChunk(e){if(typeof e.code!=="string"){return error(errorFailedValidation(`Emitted prebuilt chunks need to have a valid string code, received "${e.code}".`))}if(typeof e.fileName!=="string"||isPathFragment(e.fileName)){return error(errorFailedValidation(`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"};const i=this.assignReferenceId(t,t.fileName);if(this.output){this.output.bundle[t.fileName]=this.createPrebuiltChunk(t)}return i}finalizeAdditionalAsset(e,t,{bundle:i,fileNamesBySource:s,outputOptions:n}){let{fileName:r,needsCodeReference:o,referenceId:l}=e;if(!r){const o=getSourceHash(t);r=s.get(o);if(!r){r=generateAssetFileName(e.name,t,o,n,i);s.set(o,r)}}const c={...e,fileName:r,source:t};this.filesByReferenceId.set(l,c);const u=i[r];if(u?.type==="asset"){u.needsCodeReference&&(u.needsCodeReference=o)}else{i[r]={fileName:r,name:e.name,needsCodeReference:o,source:t,type:"asset"}}}finalizeAssetsWithSameSource(e,t,{bundle:i,fileNamesBySource:s,outputOptions:n}){let r="";let o;let l=true;for(const s of e){l&&(l=s.needsCodeReference);const e=generateAssetFileName(s.name,s.source,t,n,i);if(!r||e.length<r.length||e.length===r.length&&e<r){r=e;o=s}}s.set(t,r);for(const t of e){const e={...t,fileName:r};this.filesByReferenceId.set(t.referenceId,e)}i[r]={fileName:r,name:o.name,needsCodeReference:l,source:o.source,type:"asset"}}}function getPluginContext(e,t,i,s,n,r){let o=true;if(typeof e.cacheKey!=="string"){if(e.name.startsWith(Ga)||e.name.startsWith(Wa)||r.has(e.name)){o=false}else{r.add(e.name)}}let l;if(!t){l=qa}else if(o){const i=e.cacheKey||e.name;l=createPluginCache(t[i]||(t[i]=Object.create(null)))}else{l=getCacheForUncacheablePlugin(e.name)}return{addWatchFile(e){if(i.phase>=Dr.GENERATE){return this.error(errorInvalidRollupPhaseForAddWatchFile())}i.watchFiles[e]=true},cache:l,emitFile:n.emitFile.bind(n),error(t){return error(errorPluginError(t,e.name))},getFileName:n.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),load(e){return i.moduleLoader.preloadModule(e)},meta:{rollupVersion:d,watchMode:i.watchMode},get moduleIds(){function*wrappedModuleIds(){warnDeprecation(`Accessing "this.moduleIds" on the plugin context by plugin ${e.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,G,true,s,e.name);yield*t}const t=i.modulesById.keys();return wrappedModuleIds()},parse:i.contextParse.bind(i),resolve(t,s,{assertions:n,custom:r,isEntry:o,skipSelf:l}=q){return i.moduleLoader.resolveId(t,s,r,o,n||K,l?[{importer:s,plugin:e,source:t}]:null)},setAssetSource:n.setAssetSource,warn(t){if(typeof t==="string")t={message:t};if(t.code)t.pluginCode=t.code;t.code="PLUGIN_WARNING";t.plugin=e.name;s.onwarn(t)}}}const Qa={buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1};const Xa=Object.keys(Qa);class PluginDriver{constructor(e,t,i,s,n){this.graph=e;this.options=t;this.pluginCache=s;this.sortedPlugins=new Map;this.unfulfilledActions=new Set;this.fileEmitter=new FileEmitter(e,t,n&&n.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=[...n?n.plugins:[],...i];const r=new Set;this.pluginContexts=new Map(this.plugins.map((i=>[i,getPluginContext(i,s,e,t,this.fileEmitter,r)])));if(n){for(const e of i){for(const i of Xa){if(i in e){t.onwarn(errorInputHookInOutputPlugin(e.name,i))}}}}}createOutputPluginDriver(e){return new PluginDriver(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,i,s){return this.hookFirstAndGetPlugin(e,t,i,s).then((e=>e&&e[0]))}async hookFirstAndGetPlugin(e,t,i,s){for(const n of this.getSortedPlugins(e)){if(s?.has(n))continue;const r=await this.runHook(e,t,n,i);if(r!=null)return[r,n]}return null}hookFirstSync(e,t,i){for(const s of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,s,i);if(n!=null)return n}return null}async hookParallel(e,t,i){const s=[];for(const n of this.getSortedPlugins(e)){if(n[e].sequential){await Promise.all(s);s.length=0;await this.runHook(e,t,n,i)}else{s.push(this.runHook(e,t,n,i))}}await Promise.all(s)}hookReduceArg0(e,[t,...i],s,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e)){r=r.then((r=>this.runHook(e,[r,...i],t,n).then((e=>s.call(this.pluginContexts.get(t),r,e,t)))))}return r}hookReduceArg0Sync(e,[t,...i],s,n){for(const r of this.getSortedPlugins(e)){const o=[t,...i];const l=this.runHookSync(e,o,r,n);t=s.call(this.pluginContexts.get(r),t,l,r)}return t}async hookReduceValue(e,t,i,s){const n=[];const r=[];for(const t of this.getSortedPlugins(e,validateAddonPluginHandler)){if(t[e].sequential){n.push(...await Promise.all(r));r.length=0;n.push(await this.runHook(e,i,t))}else{r.push(this.runHook(e,i,t))}}n.push(...await Promise.all(r));return n.reduce(s,await t)}hookReduceValueSync(e,t,i,s,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,i,t,n);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,i){let s=Promise.resolve();for(const n of this.getSortedPlugins(e)){s=s.then((()=>this.runHook(e,t,n,i)))}return s.then(noReturn)}getSortedPlugins(e,t){return getOrCreate(this.sortedPlugins,e,(()=>getSortedValidatedPlugins(e,this.plugins,t)))}runHook(e,t,i,s){const n=i[e];const r=typeof n==="object"?n.handler:n;let o=this.pluginContexts.get(i);if(s){o=s(o,i)}let l=null;return Promise.resolve().then((()=>{if(typeof r!=="function"){return r}const s=r.apply(o,t);if(!s?.then){return s}l=[i.name,e,t];this.unfulfilledActions.add(l);return Promise.resolve(s).then((e=>{this.unfulfilledActions.delete(l);return e}))})).catch((t=>{if(l!==null){this.unfulfilledActions.delete(l)}return error(errorPluginError(t,i.name,{hook:e}))}))}runHookSync(e,t,i,s){const n=i[e];const r=typeof n==="object"?n.handler:n;let o=this.pluginContexts.get(i);if(s){o=s(o,i)}try{return r.apply(o,t)}catch(t){return error(errorPluginError(t,i.name,{hook:e}))}}}function getSortedValidatedPlugins(e,t,i=validateFunctionPluginHandler){const s=[];const n=[];const r=[];for(const o of t){const t=o[e];if(t){if(typeof t==="object"){i(t.handler,e,o);if(t.order==="pre"){s.push(o);continue}if(t.order==="post"){r.push(o);continue}}else{i(t,e,o)}n.push(o)}}return[...s,...n,...r]}function validateFunctionPluginHandler(e,t,i){if(typeof e!=="function"){error(errorInvalidFunctionPluginHook(t,i.name))}}function validateAddonPluginHandler(e,t,i){if(typeof e!=="string"&&typeof e!=="function"){return error(errorInvalidAddonPluginHook(t,i.name))}}function noReturn(){}class Queue{constructor(e){this.maxParallel=e;this.queue=[];this.workerCount=0}run(e){return new Promise(((t,i)=>{this.queue.push({reject:i,resolve:t,task:e});this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;this.workerCount++;let e;while(e=this.queue.shift()){const{reject:t,resolve:i,task:s}=e;try{const e=await s();i(e)}catch(e){t(e)}}this.workerCount--}}function normalizeEntryModules(e){if(Array.isArray(e)){return e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:undefined,name:null})))}return Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:undefined,name:e})))}class Graph{constructor(e,t){this.options=e;this.astLru=flru(5);this.cachedModules=new Map;this.deoptimizationTracker=new PathTracker;this.entryModules=[];this.modulesById=new Map;this.needsTreeshakingPass=false;this.phase=Dr.LOAD_AND_PARSE;this.scope=new GlobalScope;this.watchFiles=Object.create(null);this.watchMode=false;this.externalModules=[];this.implicitEntryModules=[];this.modules=[];this.getModuleInfo=e=>{const t=this.modulesById.get(e);if(!t)return null;return t.info};if(e.cache!==false){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=true;const handleChange=(...e)=>this.pluginDriver.hookParallel("watchChange",e);const handleClose=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentRun("change",handleChange);t.onCurrentRun("close",handleClose)}this.pluginDriver=new PluginDriver(this,e,e.plugins,this.pluginCache);this.acornParser=Qo.extend(...e.acornInjectPlugins);this.moduleLoader=new ModuleLoader(this,this.modulesById,this.options,this.pluginDriver);this.fileOperationQueue=new Queue(e.maxParallelFileOps);this.pureFunctions=getPureFunctions(e)}async build(){Lr("generate module graph",2);await this.generateModuleGraph();Br("generate module graph",2);Lr("sort and bind modules",2);this.phase=Dr.ANALYSE;this.sortModules();Br("sort and bind modules",2);Lr("mark included statements",2);this.includeStatements();Br("mark included statements",2);this.phase=Dr.GENERATE}contextParse(e,t={}){const i=t.onComment;const s=[];t.onComment=i&&typeof i=="function"?(e,n,r,o,...l)=>{s.push({end:o,start:r,type:e?"Block":"Line",value:n});return i.call(t,e,n,r,o,...l)}:s;const n=this.acornParser.parse(e,{...this.options.acorn,...t});if(typeof i=="object"){i.push(...s)}t.onComment=i;addAnnotations(s,n,e);return n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let i=true;for(const[e,s]of Object.entries(t)){if(s[0]>=this.options.experimentalCacheExpiry)delete t[e];else i=false}if(i)delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules(normalizeEntryModules(this.options.input),true));if(this.entryModules.length===0){throw new Error("You must supply options.input to rollup")}for(const e of this.modulesById.values()){if(e instanceof Module){this.modules.push(e)}else{this.externalModules.push(e)}}}includeStatements(){const e=[...this.entryModules,...this.implicitEntryModules];for(const t of e){markModuleAndImpureDependenciesAsExecuted(t)}if(this.options.treeshake){let t=1;do{Lr(`treeshaking pass ${t}`,3);this.needsTreeshakingPass=false;for(const e of this.modules){if(e.isExecuted){if(e.info.moduleSideEffects==="no-treeshake"){e.includeAllInBundle()}else{e.include()}}}if(t===1){for(const t of e){if(t.preserveSignature!==false){t.includeAllExports(false);this.needsTreeshakingPass=true}}}Br(`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){if(!(t.info.isEntry||t.isIncluded())){error(errorImplicitDependantIsNotIncluded(t))}}}}sortModules(){const{orderedModules:e,cyclePaths:t}=analyseModuleExecution(this.entryModules);for(const e of t){this.options.onwarn(errorCircularDependency(e))}this.modules=e;for(const e of this.modules){e.bindReferences()}this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules){for(const t of e.importDescriptions.values()){if(t.name!=="*"&&!t.module.getVariableForExportName(t.name)[0]){e.warn(errorMissingExport(t.name,e.id,t.module.id),t.start)}}}}}function formatAction([e,t,i]){const s=`(${e}) ${t}`;const n=JSON.stringify;switch(t){case"resolveId":{return`${s} ${n(i[0])} ${n(i[1])}`}case"load":{return`${s} ${n(i[0])}`}case"transform":{return`${s} ${n(i[1])}`}case"shouldTransformCachedModule":{return`${s} ${n(i[0].id)}`}case"moduleParsed":{return`${s} ${n(i[0].id)}`}}return s}let Za=null;const Ja=new Map;async function catchUnfinishedHookActions(e,t){const i=new Promise(((t,i)=>{Ja.set(e,i);if(!Za){Za=()=>{for(const[e,t]of Ja){const i=e.getUnfulfilledHookActions();t(new Error(`Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:\n`+[...i].map(formatAction).join("\n")))}};s.once("beforeExit",Za)}}));try{return await Promise.race([t(),i])}finally{Ja.delete(e);if(Ja.size===0){s.off("beforeExit",Za);Za=null}}}const el="{".charCodeAt(0);const tl=" ".charCodeAt(0);const il="assert";const sl=1,nl=4;function importAssertions(e){const t=e.acorn||Ha;const{tokTypes:i,TokenType:s}=t;return class extends e{constructor(...e){super(...e);this.assertToken=new s(il)}_codeAt(e){return this.input.charCodeAt(e)}_eat(e){if(this.type!==e){this.unexpected()}this.next()}readToken(e){let t=0;for(;t<il.length;t++){if(this._codeAt(this.pos+t)!==il.charCodeAt(t)){return super.readToken(e)}}for(;;t++){if(this._codeAt(this.pos+t)===el){break}else if(this._codeAt(this.pos+t)===tl){continue}else{return super.readToken(e)}}if(this.type.label==="{"){return super.readToken(e)}this.pos+=il.length;return this.finishToken(this.assertToken)}parseDynamicImport(e){this.next();e.source=this.parseMaybeAssign();if(this.eat(i.comma)){const t=this.parseObj(false);e.arguments=[t]}this._eat(i.parenR);return this.finishNode(e,"ImportExpression")}parseExport(e,t){this.next();if(this.eat(i.star)){if(this.options.ecmaVersion>=11){if(this.eatContextual("as")){e.exported=this.parseIdent(true);this.checkExport(t,e.exported.name,this.lastTokStart)}else{e.exported=null}}this.expectContextual("from");if(this.type!==i.string){this.unexpected()}e.source=this.parseExprAtom();if(this.type===this.assertToken||this.type===i._with){this.next();const t=this.parseImportAssertions();if(t){e.assertions=t}}this.semicolon();return this.finishNode(e,"ExportAllDeclaration")}if(this.eat(i._default)){this.checkExport(t,"default",this.lastTokStart);var s;if(this.type===i._function||(s=this.isAsyncFunction())){var n=this.startNode();this.next();if(s){this.next()}e.declaration=this.parseFunction(n,sl|nl,false,s)}else if(this.type===i._class){var r=this.startNode();e.declaration=this.parseClass(r,"nullableID")}else{e.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){e.declaration=this.parseStatement(null);if(e.declaration.type==="VariableDeclaration"){this.checkVariableExport(t,e.declaration.declarations)}else{this.checkExport(t,e.declaration.id.name,e.declaration.id.start)}e.specifiers=[];e.source=null}else{e.declaration=null;e.specifiers=this.parseExportSpecifiers(t);if(this.eatContextual("from")){if(this.type!==i.string){this.unexpected()}e.source=this.parseExprAtom();if(this.type===this.assertToken||this.type===i._with){this.next();const t=this.parseImportAssertions();if(t){e.assertions=t}}}else{for(var o=0,l=e.specifiers;o<l.length;o+=1){var c=l[o];this.checkUnreserved(c.local);this.checkLocalExport(c.local)}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")}parseImport(e){this.next();if(this.type===i.string){e.specifiers=[];e.source=this.parseExprAtom()}else{e.specifiers=this.parseImportSpecifiers();this.expectContextual("from");e.source=this.type===i.string?this.parseExprAtom():this.unexpected()}if(this.type===this.assertToken||this.type==i._with){this.next();const t=this.parseImportAssertions();if(t){e.assertions=t}}this.semicolon();return this.finishNode(e,"ImportDeclaration")}parseImportAssertions(){this._eat(i.braceL);const e=this.parseAssertEntries();this._eat(i.braceR);return e}parseAssertEntries(){const e=[];const t=new Set;do{if(this.type===i.braceR){break}const s=this.startNode();let n;if(this.type===i.string){n=this.parseLiteral(this.value)}else{n=this.parseIdent(true)}this.next();s.key=n;if(t.has(s.key.name)){this.raise(this.pos,"Duplicated key in assertions")}t.add(s.key.name);if(this.type!==i.string){this.raise(this.pos,"Only string is supported as an assertion value")}s.value=this.parseLiteral(this.value);e.push(this.finishNode(s,"ImportAttribute"))}while(this.eat(i.comma));return e}}}async function normalizeInputOptions(e){const t=new Set;const i=e.context??"undefined";const s=getOnwarn(e);const n=e.strictDeprecations||false;const r=getmaxParallelFileOps(e,s,n);const o={acorn:getAcorn(e),acornInjectPlugins:getAcornInjectPlugins(e),cache:getCache(e),context:i,experimentalCacheExpiry:e.experimentalCacheExpiry??10,experimentalLogSideEffects:e.experimentalLogSideEffects||false,external:getIdMatcher(e.external),inlineDynamicImports:getInlineDynamicImports$1(e,s,n),input:getInput(e),makeAbsoluteExternalsRelative:e.makeAbsoluteExternalsRelative??"ifRelativeSource",manualChunks:getManualChunks$1(e,s,n),maxParallelFileOps:r,maxParallelFileReads:r,moduleContext:getModuleContext(e,i),onwarn:s,perf:e.perf||false,plugins:await normalizePluginOption(e.plugins),preserveEntrySignatures:e.preserveEntrySignatures??"exports-only",preserveModules:getPreserveModules$1(e,s,n),preserveSymlinks:e.preserveSymlinks||false,shimMissingExports:e.shimMissingExports||false,strictDeprecations:n,treeshake:getTreeshake(e)};warnUnknownOptions(e,[...Object.keys(o),"watch"],"input options",o.onwarn,/^(output)$/);return{options:o,unsetOptions:t}}const getOnwarn=e=>{const{onwarn:t}=e;return t?e=>{e.toString=()=>{let t="";if(e.plugin)t+=`(${e.plugin} plugin) `;if(e.loc)t+=`${relativeId(e.loc.file)} (${e.loc.line}:${e.loc.column}) `;t+=e.message;return t};t(e,defaultOnWarn)}:defaultOnWarn};const getAcorn=e=>({ecmaVersion:"latest",sourceType:"module",...e.acorn});const getAcornInjectPlugins=e=>[importAssertions,...ensureArray$1(e.acornInjectPlugins)];const getCache=e=>e.cache===true?undefined:e.cache?.cache||e.cache;const getIdMatcher=e=>{if(e===true){return()=>true}if(typeof e==="function"){return(t,...i)=>!t.startsWith("\0")&&e(t,...i)||false}if(e){const t=new Set;const i=[];for(const s of ensureArray$1(e)){if(s instanceof RegExp){i.push(s)}else{t.add(s)}}return(e,...s)=>t.has(e)||i.some((t=>t.test(e)))}return()=>false};const getInlineDynamicImports$1=(e,t,i)=>{const s=e.inlineDynamicImports;if(s){warnDeprecationWithOptions('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',R,true,t,i)}return s};const getInput=e=>{const t=e.input;return t==null?[]:typeof t==="string"?[t]:t};const getManualChunks$1=(e,t,i)=>{const s=e.manualChunks;if(s){warnDeprecationWithOptions('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',O,true,t,i)}return s};const getmaxParallelFileOps=(e,t,i)=>{const s=e.maxParallelFileReads;if(typeof s==="number"){warnDeprecationWithOptions('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',E,true,t,i)}const n=e.maxParallelFileOps??s;if(typeof n==="number"){if(n<=0)return Infinity;return n}return 20};const getModuleContext=(e,t)=>{const i=e.moduleContext;if(typeof i==="function"){return e=>i(e)??t}if(i){const e=Object.create(null);for(const[t,s]of Object.entries(i)){e[r.resolve(t)]=s}return i=>e[i]??t}return()=>t};const getPreserveModules$1=(e,t,i)=>{const s=e.preserveModules;if(s){warnDeprecationWithOptions('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',D,true,t,i)}return s};const getTreeshake=e=>{const t=e.treeshake;if(t===false){return false}const i=getOptionWithPreset(e.treeshake,gt,"treeshake",F,"false, true, ");return{annotations:i.annotations!==false,correctVarValueBeforeDeclaration:i.correctVarValueBeforeDeclaration===true,manualPureFunctions:i.manualPureFunctions??Y,moduleSideEffects:getHasModuleSideEffects(i.moduleSideEffects),propertyReadSideEffects:i.propertyReadSideEffects==="always"?"always":i.propertyReadSideEffects!==false,tryCatchDeoptimization:i.tryCatchDeoptimization!==false,unknownGlobalSideEffects:i.unknownGlobalSideEffects!==false}};const getHasModuleSideEffects=e=>{if(typeof e==="boolean"){return()=>e}if(e==="no-external"){return(e,t)=>!t}if(typeof e==="function"){return(t,i)=>t.startsWith("\0")?true:e(t,i)!==false}if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}if(e){error(errorInvalidOption("treeshake.moduleSideEffects",V,'please use one of false, "no-external", a function or an array'))}return()=>true};const rl=/[\u0000-\u001F"#$&*+,:;<=>?[\]^`{|}\u007F]/g;const ol=/^[a-z]:/i;function sanitizeFileName(e){const t=ol.exec(e);const i=t?t[0]:"";return i+e.slice(i.length).replace(rl,"_")}async function normalizeOutputOptions(e,t,i){const s=new Set(i);const n=e.compact||false;const r=getFormat(e);const o=getInlineDynamicImports(e,t);const l=getPreserveModules(e,o,t);const c=getFile(e,l,t);const u=getPreferConst(e,t);const h=getGeneratedCode(e,u);const d={amd:getAmd(e),assetFileNames:e.assetFileNames??"assets/[name]-[hash][extname]",banner:getAddon(e,"banner"),chunkFileNames:e.chunkFileNames??"[name]-[hash].js",compact:n,dir:getDir(e,c),dynamicImportFunction:getDynamicImportFunction(e,t,r),dynamicImportInCjs:e.dynamicImportInCjs??true,entryFileNames:getEntryFileNames(e,s),esModule:e.esModule??"if-default-prop",experimentalDeepDynamicChunkOptimization:getExperimentalDeepDynamicChunkOptimization(e,t),experimentalMinChunkSize:e.experimentalMinChunkSize??1,exports:getExports(e,s),extend:e.extend||false,externalImportAssertions:e.externalImportAssertions??true,externalLiveBindings:e.externalLiveBindings??true,file:c,footer:getAddon(e,"footer"),format:r,freeze:e.freeze??true,generatedCode:h,globals:e.globals||{},hoistTransitiveImports:e.hoistTransitiveImports??true,indent:getIndent(e,n),inlineDynamicImports:o,interop:getInterop(e),intro:getAddon(e,"intro"),manualChunks:getManualChunks(e,o,l,t),minifyInternalExports:getMinifyInternalExports(e,r,n),name:e.name,namespaceToStringTag:getNamespaceToStringTag(e,h,t),noConflict:e.noConflict||false,outro:getAddon(e,"outro"),paths:e.paths||{},plugins:await normalizePluginOption(e.plugins),preferConst:u,preserveModules:l,preserveModulesRoot:getPreserveModulesRoot(e),sanitizeFileName:typeof e.sanitizeFileName==="function"?e.sanitizeFileName:e.sanitizeFileName===false?e=>e:sanitizeFileName,sourcemap:e.sourcemap||false,sourcemapBaseUrl:getSourcemapBaseUrl(e),sourcemapExcludeSources:e.sourcemapExcludeSources||false,sourcemapFile:e.sourcemapFile,sourcemapIgnoreList:typeof e.sourcemapIgnoreList==="function"?e.sourcemapIgnoreList:e.sourcemapIgnoreList===false?()=>false:e=>e.includes("node_modules"),sourcemapPathTransform:e.sourcemapPathTransform,strict:e.strict??true,systemNullSetters:e.systemNullSetters??true,validate:e.validate||false};warnUnknownOptions(e,Object.keys(d),"output options",t.onwarn);return{options:d,unsetOptions:s}}const getFile=(e,t,i)=>{const{file:s}=e;if(typeof s==="string"){if(t){return error(errorInvalidOption("output.file",v,'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'))}if(!Array.isArray(i.input))return error(errorInvalidOption("output.file",v,'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s};const getFormat=e=>{const t=e.format;switch(t){case undefined: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 error(errorInvalidOption("output.format",I,`Valid values are "amd", "cjs", "system", "es", "iife" or "umd"`,t))}}};const getInlineDynamicImports=(e,t)=>{const i=(e.inlineDynamicImports??t.inlineDynamicImports)||false;const{input:s}=t;if(i&&(Array.isArray(s)?s:Object.keys(s)).length>1){return error(errorInvalidOption("output.inlineDynamicImports",R,'multiple inputs are not supported when "output.inlineDynamicImports" is true'))}return i};const getPreserveModules=(e,t,i)=>{const s=(e.preserveModules??i.preserveModules)||false;if(s){if(t){return error(errorInvalidOption("output.inlineDynamicImports",R,`this option is not supported for "output.preserveModules"`))}if(i.preserveEntrySignatures===false){return error(errorInvalidOption("preserveEntrySignatures",B,'setting this option to false is not supported for "output.preserveModules"'))}}return s};const getPreferConst=(e,t)=>{const i=e.preferConst;if(i!=null){warnDeprecation(`The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.`,_,true,t)}return!!i};const getPreserveModulesRoot=e=>{const{preserveModulesRoot:t}=e;if(t===null||t===undefined){return undefined}return r.resolve(t)};const getAmd=e=>{const t={autoId:false,basePath:"",define:"define",forceJsExtensionForImports:false,...e.amd};if((t.autoId||t.basePath)&&t.id){return error(errorInvalidOption("output.amd.id",x,'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"'))}if(t.basePath&&!t.autoId){return error(errorInvalidOption("output.amd.basePath",b,'this option only works with "output.amd.autoId"'))}return t.autoId?{autoId:true,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}:{autoId:false,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}};const getAddon=(e,t)=>{const i=e[t];if(typeof i==="function"){return i}return()=>i||""};const getDir=(e,t)=>{const{dir:i}=e;if(typeof i==="string"&&typeof t==="string"){return error(errorInvalidOption("output.dir",v,'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks'))}return i};const getDynamicImportFunction=(e,t,i)=>{const s=e.dynamicImportFunction;if(s){warnDeprecation(`The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.`,H,true,t);if(i!=="es"){t.onwarn(errorInvalidOption("output.dynamicImportFunction",S,'this option is ignored for formats other than "es"'))}}return s};const getEntryFileNames=(e,t)=>{const i=e.entryFileNames;if(i==null){t.add("entryFileNames")}return i??"[name].js"};function getExperimentalDeepDynamicChunkOptimization(e,t){const i=e.experimentalDeepDynamicChunkOptimization;if(i!=null){warnDeprecation(`The "output.experimentalDeepDynamicChunkOptimization" option is deprecated as Rollup always runs the full chunking algorithm now. The option should be removed.`,C,true,t)}return i||false}function getExports(e,t){const i=e.exports;if(i==null){t.add("exports")}else if(!["default","named","none","auto"].includes(i)){return error(errorInvalidExportOptionValue(i))}return i||"auto"}const getGeneratedCode=(e,t)=>{const i=getOptionWithPreset(e.generatedCode,yt,"output.generatedCode",k,"");return{arrowFunctions:i.arrowFunctions===true,constBindings:i.constBindings===true||t,objectShorthand:i.objectShorthand===true,reservedNamesAsProps:i.reservedNamesAsProps!==false,symbols:i.symbols===true}};const getIndent=(e,t)=>{if(t){return""}const i=e.indent;return i===false?"":i??true};const al=new Set(["compat","auto","esModule","default","defaultOnly"]);const getInterop=e=>{const t=e.interop;if(typeof t==="function"){const e=Object.create(null);let i=null;return s=>s===null?i||validateInterop(i=t(s)):s in e?e[s]:validateInterop(e[s]=t(s))}return t===undefined?()=>"default":()=>validateInterop(t)};const validateInterop=e=>{if(!al.has(e)){return error(errorInvalidOption("output.interop",$,`use one of ${Array.from(al,(e=>JSON.stringify(e))).join(", ")}`,e))}return e};const getManualChunks=(e,t,i,s)=>{const n=e.manualChunks||s.manualChunks;if(n){if(t){return error(errorInvalidOption("output.manualChunks",O,'this option is not supported for "output.inlineDynamicImports"'))}if(i){return error(errorInvalidOption("output.manualChunks",O,'this option is not supported for "output.preserveModules"'))}}return n||{}};const getMinifyInternalExports=(e,t,i)=>e.minifyInternalExports??(i||t==="es"||t==="system");const getNamespaceToStringTag=(e,t,i)=>{const s=e.namespaceToStringTag;if(s!=null){warnDeprecation(`The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.`,P,true,i);return s}return t.symbols||false};const getSourcemapBaseUrl=e=>{const{sourcemapBaseUrl:t}=e;if(t){if(isValidUrl(t)){return t}return error(errorInvalidOption("output.sourcemapBaseUrl",M,`must be a valid URL, received ${JSON.stringify(t)}`))}};function rollup(e){return rollupInternal(e,null)}async function rollupInternal(e,t){const{options:i,unsetOptions:s}=await getInputOptions(e,t!==null);initialiseTimers(i);const n=new Graph(i,t);const r=e.cache!==false;if(e.cache){i.cache=undefined;e.cache=undefined}Lr("BUILD",1);await catchUnfinishedHookActions(n.pluginDriver,(async()=>{try{Lr("initialize",2);await n.pluginDriver.hookParallel("buildStart",[i]);Br("initialize",2);await n.build()}catch(e){const t=Object.keys(n.watchFiles);if(t.length>0){e.watchFiles=t}await n.pluginDriver.hookParallel("buildEnd",[e]);await n.pluginDriver.hookParallel("closeBundle",[]);throw e}await n.pluginDriver.hookParallel("buildEnd",[])}));Br("BUILD",1);const o={cache:r?n.getCache():undefined,async close(){if(o.closed)return;o.closed=true;await n.pluginDriver.hookParallel("closeBundle",[])},closed:false,async generate(e){if(o.closed)return error(errorAlreadyClosed());return handleGenerateWrite(false,i,s,e,n)},watchFiles:Object.keys(n.watchFiles),async write(e){if(o.closed)return error(errorAlreadyClosed());return handleGenerateWrite(true,i,s,e,n)}};if(i.perf)o.getTimings=getTimings;return o}async function getInputOptions(e,t){if(!e){throw new Error("You must supply an options object to rollup")}const i=getSortedValidatedPlugins("options",await normalizePluginOption(e.plugins));const{options:s,unsetOptions:n}=await normalizeInputOptions(await i.reduce(applyOptionHook(t),Promise.resolve(e)));normalizePlugins(s.plugins,Ga);return{options:s,unsetOptions:n}}function applyOptionHook(e){return async(t,i)=>{const s="handler"in i.options?i.options.handler:i.options;return await s.call({meta:{rollupVersion:d,watchMode:e}},await t)||t}}function normalizePlugins(e,t){for(const[i,s]of e.entries()){if(!s.name){s.name=`${t}${i+1}`}}}async function handleGenerateWrite(e,t,i,s,n){const{options:r,outputPluginDriver:o,unsetOptions:l}=await getOutputOptionsAndPluginDriver(s,n.pluginDriver,t,i);return catchUnfinishedHookActions(o,(async()=>{const i=new Bundle(r,l,t,o,n);const s=await i.generate(e);if(e){Lr("WRITE",1);if(!r.dir&&!r.file){return error(errorMissingFileOrDirOption())}await Promise.all(Object.values(s).map((e=>n.fileOperationQueue.run((()=>writeOutputFile(e,r))))));await o.hookParallel("writeBundle",[r,s]);Br("WRITE",1)}return createOutput(s)}))}async function getOutputOptionsAndPluginDriver(e,t,i,s){if(!e){throw new Error("You must supply an options object")}const n=await normalizePluginOption(e.plugins);normalizePlugins(n,Wa);const r=t.createOutputPluginDriver(n);return{...await getOutputOptions(i,s,e,r),outputPluginDriver:r}}function getOutputOptions(e,t,i,s){return normalizeOutputOptions(s.hookReduceArg0Sync("outputOptions",[i],((e,t)=>t||e),(e=>{const emitError=()=>e.error(errorCannotEmitFromOptionsHook());return{...e,emitFile:emitError,setAssetSource:emitError}})),e,t)}function createOutput(e){return{output:Object.values(e).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>getSortingFileType(e)-getSortingFileType(t)))}}var ll;(function(e){e[e["ENTRY_CHUNK"]=0]="ENTRY_CHUNK";e[e["SECONDARY_CHUNK"]=1]="SECONDARY_CHUNK";e[e["ASSET"]=2]="ASSET"})(ll||(ll={}));function getSortingFileType(e){if(e.type==="asset"){return ll.ASSET}if(e.isEntry){return ll.ENTRY_CHUNK}return ll.SECONDARY_CHUNK}async function writeOutputFile(e,t){const i=r.resolve(t.dir||r.dirname(t.file),e.fileName);await u.mkdir(r.dirname(i),{recursive:true});return u.writeFile(i,e.type==="asset"?e.source:e.code)}function defineConfig(e){return e}t.URL_AVOIDING_EVAL=p;t.URL_NAME_IS_NOT_EXPORTED=f;t.URL_OUTPUT_EXPORTS=A;t.URL_OUTPUT_GLOBALS=N;t.URL_SOURCEMAP_IS_LIKELY_TO_BE_INCORRECT=y;t.URL_THIS_IS_UNDEFINED=m;t.URL_TREATING_MODULE_AS_EXTERNAL_DEPENDENCY=g;t.URL_WATCH=z;t.bold=Rt;t.commandAliases=Et;t.createFilter=Ns;t.cyan=$t;t.defineConfig=defineConfig;t.ensureArray=ensureArray$1;t.error=error;t.errorCannotBundleConfigAsEsm=errorCannotBundleConfigAsEsm;t.errorCannotLoadConfigAsCjs=errorCannotLoadConfigAsCjs;t.errorCannotLoadConfigAsEsm=errorCannotLoadConfigAsEsm;t.errorDuplicateImportOptions=errorDuplicateImportOptions;t.errorFailAfterWarnings=errorFailAfterWarnings;t.errorInvalidOption=errorInvalidOption;t.errorMissingConfig=errorMissingConfig;t.errorMissingExternalConfig=errorMissingExternalConfig;t.errorOnlyInlineSourcemapsForStdout=errorOnlyInlineSourcemapsForStdout;t.getAliasName=getAliasName;t.getAugmentedNamespace=getAugmentedNamespace;t.getNewArray=getNewArray;t.getOrCreate=getOrCreate;t.getRollupUrl=getRollupUrl;t.gray=Tt;t.green=Dt;t.handleError=handleError;t.isWatchEnabled=isWatchEnabled;t.mergeOptions=mergeOptions;t.normalizePluginOption=normalizePluginOption;t.picomatch=Is;t.printQuotedStringList=printQuotedStringList;t.relativeId=relativeId;t.rollup=rollup;t.rollupInternal=rollupInternal;t.stderr=stderr;t.underline=Lt;t.version=d;t.yellow=Bt},12:(e,t,i)=>{
65
78
  /*
66
79
  @license
67
- Rollup.js v2.79.0
68
- Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
80
+ Rollup.js v3.23.0
81
+ Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975
69
82
 
70
83
  https://github.com/rollup/rollup
71
84
 
72
85
  Released under the MIT License.
73
- */const s=i(822);const n=i(282);const r=i(74);const o=i(113);const l=i(147);const c=i(361);function _interopNamespaceDefault(e){const t=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(e){for(const i in e){t[i]=e[i]}}t.default=e;return t}var u="2.79.0";function ensureArray$1(e){if(Array.isArray(e)){return e.filter(Boolean)}if(e){return[e]}return[]}function getLocator$1(e,t){if(t===void 0){t={}}var i=t.offsetLine||0;var s=t.offsetColumn||0;var n=e.split("\n");var r=0;var o=n.map((function(e,t){var i=r+e.length+1;var s={start:r,end:i,line:t};r=i;return s}));var l=0;function rangeContains(e,t){return e.start<=t&&t<e.end}function getLocation(e,t){return{line:i+e.line,column:s+t-e.start,character:t}}function locate(t,i){if(typeof t==="string"){t=e.indexOf(t,i||0)}var s=o[l];var n=t>=s.end?1:-1;while(s){if(rangeContains(s,t))return getLocation(s,t);l+=n;s=o[l]}}return locate}function locate(e,t,i){if(typeof i==="number"){throw new Error("locate takes a { startIndex, offsetLine, offsetColumn } object as the third argument")}return getLocator$1(e,i)(t,i&&i.startIndex)}function spaces(e){let t="";while(e--)t+=" ";return t}function tabsToSpaces(e){return e.replace(/^\t+/,(e=>e.split("\t").join(" ")))}function getCodeFrame(e,t,i){let s=e.split("\n");const n=Math.max(0,t-3);let r=Math.min(t+2,s.length);s=s.slice(n,r);while(!/\S/.test(s[s.length-1])){s.pop();r-=1}const o=String(r).length;return s.map(((e,s)=>{const r=n+s+1===t;let l=String(s+n+1);while(l.length<o)l=` ${l}`;if(r){const t=spaces(o+2+tabsToSpaces(e.slice(0,i)).length)+"^";return`${l}: ${tabsToSpaces(e)}\n${t}`}return`${l}: ${tabsToSpaces(e)}`})).join("\n")}function printQuotedStringList(e,t){const i=e.length<=1;const s=e.map((e=>`"${e}"`));let n=i?s[0]:`${s.slice(0,-1).join(", ")} and ${s.slice(-1)[0]}`;if(t){n+=` ${i?t[0]:t[1]}`}return n}const h=/[/\\]/;function relative(e,t){const i=e.split(h).filter(Boolean);const s=t.split(h).filter(Boolean);if(i[0]===".")i.shift();if(s[0]===".")s.shift();while(i[0]&&s[0]&&i[0]===s[0]){i.shift();s.shift()}while(s[0]===".."&&i.length>0){s.shift();i.pop()}while(i.pop()){s.unshift("..")}return s.join("/")}const d=/^(?:\/|(?:[A-Za-z]:)?[\\|/])/;const p=/^\.?\.(\/|$)/;function isAbsolute(e){return d.test(e)}function isRelative(e){return p.test(e)}const f=/\\/g;function normalize(e){return e.replace(f,"/")}function getAliasName(e){const t=s.basename(e);return t.substring(0,t.length-s.extname(e).length)}function relativeId(e){if(!isAbsolute(e))return e;return relative(s.resolve(),e)}function isPathFragment(e){return e[0]==="/"||e[0]==="."&&(e[1]==="/"||e[1]===".")||isAbsolute(e)}const m=/^(\.\.\/)*\.\.$/;function getImportPath(e,t,i,n){let r=normalize(relative(s.dirname(e),t));if(i&&r.endsWith(".js")){r=r.slice(0,-3)}if(n){if(r==="")return"../"+s.basename(t);if(m.test(r)){return r.split("/").concat(["..",s.basename(t)]).join("/")}}return!r?".":r.startsWith("..")?r:"./"+r}function error(e){if(!(e instanceof Error))e=Object.assign(new Error(e.message),e);throw e}function augmentCodeLocation(e,t,i,s){if(typeof t==="object"){const{line:i,column:n}=t;e.loc={column:n,file:s,line:i}}else{e.pos=t;const{line:n,column:r}=locate(i,t,{offsetLine:1});e.loc={column:r,file:s,line:n}}if(e.frame===undefined){const{line:t,column:s}=e.loc;e.frame=getCodeFrame(i,t,s)}}var g;(function(e){e["ALREADY_CLOSED"]="ALREADY_CLOSED";e["ASSET_NOT_FINALISED"]="ASSET_NOT_FINALISED";e["ASSET_NOT_FOUND"]="ASSET_NOT_FOUND";e["ASSET_SOURCE_ALREADY_SET"]="ASSET_SOURCE_ALREADY_SET";e["ASSET_SOURCE_MISSING"]="ASSET_SOURCE_MISSING";e["BAD_LOADER"]="BAD_LOADER";e["CANNOT_EMIT_FROM_OPTIONS_HOOK"]="CANNOT_EMIT_FROM_OPTIONS_HOOK";e["CHUNK_NOT_GENERATED"]="CHUNK_NOT_GENERATED";e["CHUNK_INVALID"]="CHUNK_INVALID";e["CIRCULAR_REEXPORT"]="CIRCULAR_REEXPORT";e["CYCLIC_CROSS_CHUNK_REEXPORT"]="CYCLIC_CROSS_CHUNK_REEXPORT";e["DEPRECATED_FEATURE"]="DEPRECATED_FEATURE";e["EXTERNAL_SYNTHETIC_EXPORTS"]="EXTERNAL_SYNTHETIC_EXPORTS";e["FILE_NAME_CONFLICT"]="FILE_NAME_CONFLICT";e["FILE_NOT_FOUND"]="FILE_NOT_FOUND";e["INPUT_HOOK_IN_OUTPUT_PLUGIN"]="INPUT_HOOK_IN_OUTPUT_PLUGIN";e["INVALID_CHUNK"]="INVALID_CHUNK";e["INVALID_EXPORT_OPTION"]="INVALID_EXPORT_OPTION";e["INVALID_EXTERNAL_ID"]="INVALID_EXTERNAL_ID";e["INVALID_OPTION"]="INVALID_OPTION";e["INVALID_PLUGIN_HOOK"]="INVALID_PLUGIN_HOOK";e["INVALID_ROLLUP_PHASE"]="INVALID_ROLLUP_PHASE";e["MISSING_EXPORT"]="MISSING_EXPORT";e["MISSING_IMPLICIT_DEPENDANT"]="MISSING_IMPLICIT_DEPENDANT";e["MIXED_EXPORTS"]="MIXED_EXPORTS";e["NAMESPACE_CONFLICT"]="NAMESPACE_CONFLICT";e["AMBIGUOUS_EXTERNAL_NAMESPACES"]="AMBIGUOUS_EXTERNAL_NAMESPACES";e["NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE"]="NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE";e["PLUGIN_ERROR"]="PLUGIN_ERROR";e["PREFER_NAMED_EXPORTS"]="PREFER_NAMED_EXPORTS";e["SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT"]="SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT";e["UNEXPECTED_NAMED_IMPORT"]="UNEXPECTED_NAMED_IMPORT";e["UNRESOLVED_ENTRY"]="UNRESOLVED_ENTRY";e["UNRESOLVED_IMPORT"]="UNRESOLVED_IMPORT";e["VALIDATION_ERROR"]="VALIDATION_ERROR"})(g||(g={}));function errAssetNotFinalisedForFileName(e){return{code:g.ASSET_NOT_FINALISED,message:`Plugin error - Unable to get file name for asset "${e}". Ensure that the source is set and that generate is called first.`}}function errCannotEmitFromOptionsHook(){return{code:g.CANNOT_EMIT_FROM_OPTIONS_HOOK,message:`Cannot emit files or set asset sources in the "outputOptions" hook, use the "renderStart" hook instead.`}}function errChunkNotGeneratedForFileName(e){return{code:g.CHUNK_NOT_GENERATED,message:`Plugin error - Unable to get file name for chunk "${e}". Ensure that generate is called first.`}}function errChunkInvalid({fileName:e,code:t},i){const s={code:g.CHUNK_INVALID,message:`Chunk "${e}" is not valid JavaScript: ${i.message}.`};augmentCodeLocation(s,i.loc,t,e);return s}function errCircularReexport(e,t){return{code:g.CIRCULAR_REEXPORT,id:t,message:`"${e}" cannot be exported from ${relativeId(t)} as it is a reexport that references itself.`}}function errCyclicCrossChunkReexport(e,t,i,s){return{code:g.CYCLIC_CROSS_CHUNK_REEXPORT,exporter:t,importer:s,message:`Export "${e}" of module ${relativeId(t)} was reexported through module ${relativeId(i)} 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 ${relativeId(s)} to point directly to the exporting module or do not use "preserveModules" to ensure these modules end up in the same chunk.`,reexporter:i}}function errAssetReferenceIdNotFoundForSetSource(e){return{code:g.ASSET_NOT_FOUND,message:`Plugin error - Unable to set the source for unknown asset "${e}".`}}function errAssetSourceAlreadySet(e){return{code:g.ASSET_SOURCE_ALREADY_SET,message:`Unable to set the source for asset "${e}", source already set.`}}function errNoAssetSourceSet(e){return{code:g.ASSET_SOURCE_MISSING,message:`Plugin error creating asset "${e}" - no asset source set.`}}function errBadLoader(e){return{code:g.BAD_LOADER,message:`Error loading ${relativeId(e)}: plugin load hook should return a string, a { code, map } object, or nothing/null`}}function errDeprecation(e){return{code:g.DEPRECATED_FEATURE,...typeof e==="string"?{message:e}:e}}function errFileReferenceIdNotFoundForFilename(e){return{code:g.FILE_NOT_FOUND,message:`Plugin error - Unable to get file name for unknown file "${e}".`}}function errFileNameConflict(e){return{code:g.FILE_NAME_CONFLICT,message:`The emitted file "${e}" overwrites a previously emitted file of the same name.`}}function errInputHookInOutputPlugin(e,t){return{code:g.INPUT_HOOK_IN_OUTPUT_PLUGIN,message:`The "${t}" hook used by the output plugin ${e} is a build time hook and will not be run for that plugin. Either this plugin cannot be used as an output plugin, or it should have an option to configure it as an output plugin.`}}function errCannotAssignModuleToChunk(e,t,i){return{code:g.INVALID_CHUNK,message:`Cannot assign ${relativeId(e)} to the "${t}" chunk as it is already in the "${i}" chunk.`}}function errInvalidExportOptionValue(e){return{code:g.INVALID_EXPORT_OPTION,message:`"output.exports" must be "default", "named", "none", "auto", or left unspecified (defaults to "auto"), received "${e}"`,url:`https://rollupjs.org/guide/en/#outputexports`}}function errIncompatibleExportOptionValue(e,t,i){return{code:"INVALID_EXPORT_OPTION",message:`"${e}" was specified for "output.exports", but entry module "${relativeId(i)}" has the following exports: ${t.join(", ")}`}}function errInternalIdCannotBeExternal(e,t){return{code:g.INVALID_EXTERNAL_ID,message:`'${e}' is imported as an external by ${relativeId(t)}, but is already an existing non-external module id.`}}function errInvalidOption(e,t,i,s){return{code:g.INVALID_OPTION,message:`Invalid value ${s!==undefined?`${JSON.stringify(s)} `:""}for option "${e}" - ${i}.`,url:`https://rollupjs.org/guide/en/#${t}`}}function errInvalidAddonPluginHook(e,t){return{code:g.INVALID_PLUGIN_HOOK,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}}function errInvalidFunctionPluginHook(e,t){return{code:g.INVALID_PLUGIN_HOOK,hook:e,message:`Error running plugin hook ${e} for plugin ${t}, expected a function hook or an object with a "handler" function.`,plugin:t}}function errInvalidRollupPhaseForAddWatchFile(){return{code:g.INVALID_ROLLUP_PHASE,message:`Cannot call addWatchFile after the build has finished.`}}function errInvalidRollupPhaseForChunkEmission(){return{code:g.INVALID_ROLLUP_PHASE,message:`Cannot emit chunks after module loading has finished.`}}function errMissingExport(e,t,i){return{code:g.MISSING_EXPORT,message:`'${e}' is not exported by ${relativeId(i)}, imported by ${relativeId(t)}`,url:`https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module`}}function errImplicitDependantCannotBeExternal(e,t){return{code:g.MISSING_IMPLICIT_DEPENDANT,message:`Module "${relativeId(e)}" that should be implicitly loaded before "${relativeId(t)}" cannot be external.`}}function errUnresolvedImplicitDependant(e,t){return{code:g.MISSING_IMPLICIT_DEPENDANT,message:`Module "${relativeId(e)}" that should be implicitly loaded before "${relativeId(t)}" could not be resolved.`}}function errImplicitDependantIsNotIncluded(e){const t=Array.from(e.implicitlyLoadedBefore,(e=>relativeId(e.id))).sort();return{code:g.MISSING_IMPLICIT_DEPENDANT,message:`Module "${relativeId(e.id)}" that should be implicitly loaded before ${printQuotedStringList(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 errMixedExport(e,t){return{code:g.MIXED_EXPORTS,id:e,message:`Entry module "${relativeId(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:`https://rollupjs.org/guide/en/#outputexports`}}function errNamespaceConflict(e,t,i){return{code:g.NAMESPACE_CONFLICT,message:`Conflicting namespaces: "${relativeId(t)}" re-exports "${e}" from one of the modules ${printQuotedStringList(i.map((e=>relativeId(e))))} (will be ignored)`,name:e,reexporter:t,sources:i}}function errAmbiguousExternalNamespaces(e,t,i,s){return{code:g.AMBIGUOUS_EXTERNAL_NAMESPACES,message:`Ambiguous external namespace resolution: "${relativeId(t)}" re-exports "${e}" from one of the external modules ${printQuotedStringList(s.map((e=>relativeId(e))))}, guessing "${relativeId(i)}".`,name:e,reexporter:t,sources:s}}function errNoTransformMapOrAstWithoutCode(e){return{code:g.NO_TRANSFORM_MAP_OR_AST_WITHOUT_CODE,message:`The plugin "${e}" returned a "map" or "ast" without returning `+'a "code". This will be ignored.'}}function errPreferNamedExports(e){const t=relativeId(e);return{code:g.PREFER_NAMED_EXPORTS,id:e,message:`Entry module "${t}" is implicitly using "default" export mode, which means for CommonJS output that its default export is assigned to "module.exports". For many tools, such CommonJS output will not be interchangeable with the original ES module. If this is intended, explicitly set "output.exports" to either "auto" or "default", otherwise you might want to consider changing the signature of "${t}" to use named exports only.`,url:`https://rollupjs.org/guide/en/#outputexports`}}function errSyntheticNamedExportsNeedNamespaceExport(e,t){return{code:g.SYNTHETIC_NAMED_EXPORTS_NEED_NAMESPACE_EXPORT,id:e,message:`Module "${relativeId(e)}" that is marked with 'syntheticNamedExports: ${JSON.stringify(t)}' needs ${typeof t==="string"&&t!=="default"?`an explicit export named "${t}"`:"a default export"} that does not reexport an unresolved named export of the same module.`}}function errUnexpectedNamedImport(e,t,i){const s=i?"reexport":"import";return{code:g.UNEXPECTED_NAMED_IMPORT,id:e,message:`The named export "${t}" was ${s}ed from the external module ${relativeId(e)} even though its interop type is "defaultOnly". Either remove or change this ${s} or change the value of the "output.interop" option.`,url:"https://rollupjs.org/guide/en/#outputinterop"}}function errUnexpectedNamespaceReexport(e){return{code:g.UNEXPECTED_NAMED_IMPORT,id:e,message:`There was a namespace "*" reexport from the external module ${relativeId(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:"https://rollupjs.org/guide/en/#outputinterop"}}function errEntryCannotBeExternal(e){return{code:g.UNRESOLVED_ENTRY,message:`Entry module cannot be external (${relativeId(e)}).`}}function errUnresolvedEntry(e){return{code:g.UNRESOLVED_ENTRY,message:`Could not resolve entry module (${relativeId(e)}).`}}function errUnresolvedImport(e,t){return{code:g.UNRESOLVED_IMPORT,message:`Could not resolve '${e}' from ${relativeId(t)}`}}function errUnresolvedImportTreatedAsExternal(e,t){return{code:g.UNRESOLVED_IMPORT,importer:relativeId(t),message:`'${e}' is imported by ${relativeId(t)}, but could not be resolved – treating it as an external dependency`,source:e,url:"https://rollupjs.org/guide/en/#warning-treating-module-as-external-dependency"}}function errExternalSyntheticExports(e,t){return{code:g.EXTERNAL_SYNTHETIC_EXPORTS,importer:relativeId(t),message:`External '${e}' can not have 'syntheticNamedExports' enabled.`,source:e}}function errFailedValidation(e){return{code:g.VALIDATION_ERROR,message:e}}function errAlreadyClosed(){return{code:g.ALREADY_CLOSED,message:'Bundle is already closed, no more calls to "generate" or "write" are allowed.'}}function warnDeprecation(e,t,i){warnDeprecationWithOptions(e,t,i.onwarn,i.strictDeprecations)}function warnDeprecationWithOptions(e,t,i,s){if(t||s){const t=errDeprecation(e);if(s){return error(t)}i(t)}}const defaultOnWarn=e=>console.warn(e.message||e);function warnUnknownOptions(e,t,i,s,n=/$./){const r=new Set(t);const o=Object.keys(e).filter((e=>!(r.has(e)||n.test(e))));if(o.length>0){s({code:"UNKNOWN_OPTION",message:`Unknown ${i}: ${o.join(", ")}. Allowed options: ${[...r].sort().join(", ")}`})}}const y={recommended:{annotations:true,correctVarValueBeforeDeclaration:false,moduleSideEffects:()=>true,propertyReadSideEffects:true,tryCatchDeoptimization:true,unknownGlobalSideEffects:false},safest:{annotations:true,correctVarValueBeforeDeclaration:true,moduleSideEffects:()=>true,propertyReadSideEffects:true,tryCatchDeoptimization:true,unknownGlobalSideEffects:true},smallest:{annotations:true,correctVarValueBeforeDeclaration:false,moduleSideEffects:()=>false,propertyReadSideEffects:false,tryCatchDeoptimization:false,unknownGlobalSideEffects:false}};const E={es2015:{arrowFunctions:true,constBindings:true,objectShorthand:true,reservedNamesAsProps:true,symbols:true},es5:{arrowFunctions:false,constBindings:false,objectShorthand:false,reservedNamesAsProps:true,symbols:false}};const objectifyOption=e=>e&&typeof e==="object"?e:{};const objectifyOptionWithPresets=(e,t,i)=>s=>{if(typeof s==="string"){const n=e[s];if(n){return n}error(errInvalidOption(t,getHashFromObjectOption(t),`valid values are ${i}${printQuotedStringList(Object.keys(e))}. You can also supply an object for more fine-grained control`,s))}return objectifyOption(s)};const getOptionWithPreset=(e,t,i,s)=>{const n=e===null||e===void 0?void 0:e.preset;if(n){const s=t[n];if(s){return{...s,...e}}else{error(errInvalidOption(`${i}.preset`,getHashFromObjectOption(i),`valid values are ${printQuotedStringList(Object.keys(t))}`,n))}}return objectifyOptionWithPresets(t,i,s)(e)};const getHashFromObjectOption=e=>e.split(".").join("").toLowerCase();let x;let v;async function loadFsEvents(){try{({default:x}=await Promise.resolve().then((()=>_interopNamespaceDefault(i(249)))))}catch(e){v=e}}function getFsEvents(){if(v)throw v;return x}const b=Object.defineProperty({__proto__:null,loadFsEvents:loadFsEvents,getFsEvents:getFsEvents},Symbol.toStringTag,{value:"Module"});var S=typeof globalThis!=="undefined"?globalThis:typeof window!=="undefined"?window:typeof global!=="undefined"?global:typeof self!=="undefined"?self:{};function getDefaultExportFromCjs(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e["default"]:e}function getAugmentedNamespace(e){var t=e.default;if(typeof t=="function"){var a=function(){return t.apply(this,arguments)};a.prototype=t.prototype}else a={};Object.defineProperty(a,"__esModule",{value:true});Object.keys(e).forEach((function(t){var i=Object.getOwnPropertyDescriptor(e,t);Object.defineProperty(a,t,i.get?i:{enumerable:true,get:function(){return e[t]}})}));return a}var A={};var w="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=";for(var I=0;I<w.length;I++){A[w.charCodeAt(I)]=I}function decode(e){var t=[];var i=[];var s=[0,0,0,0,0];var n=0;for(var r=0,o=0,l=0;r<e.length;r++){var c=e.charCodeAt(r);if(c===44){segmentify(i,s,n);n=0}else if(c===59){segmentify(i,s,n);n=0;t.push(i);i=[];s[0]=0}else{var u=A[c];if(u===undefined){throw new Error("Invalid character ("+String.fromCharCode(c)+")")}var h=u&32;u&=31;l+=u<<o;if(h){o+=5}else{var d=l&1;l>>>=1;if(d){l=l===0?-2147483648:-l}s[n]+=l;n++;l=o=0}}}segmentify(i,s,n);t.push(i);return t}function segmentify(e,t,i){if(i===4)e.push([t[0],t[1],t[2],t[3]]);else if(i===5)e.push([t[0],t[1],t[2],t[3],t[4]]);else if(i===1)e.push([t[0]])}function encode(e){var t=0;var i=0;var s=0;var n=0;var r="";for(var o=0;o<e.length;o++){var l=e[o];if(o>0)r+=";";if(l.length===0)continue;var c=0;var u=[];for(var h=0,d=l;h<d.length;h++){var p=d[h];var f=encodeInteger(p[0]-c);c=p[0];if(p.length>1){f+=encodeInteger(p[1]-t)+encodeInteger(p[2]-i)+encodeInteger(p[3]-s);t=p[1];i=p[2];s=p[3]}if(p.length===5){f+=encodeInteger(p[4]-n);n=p[4]}u.push(f)}r+=u.join(",")}return r}function encodeInteger(e){var t="";e=e<0?-e<<1|1:e<<1;do{var i=e&31;e>>>=5;if(e>0){i|=32}t+=w[i]}while(e>0);return t}class BitSet{constructor(e){this.bits=e instanceof BitSet?e.bits.slice():[]}add(e){this.bits[e>>5]|=1<<(e&31)}has(e){return!!(this.bits[e>>5]&1<<(e&31))}}class Chunk$1{constructor(e,t,i){this.start=e;this.end=t;this.original=i;this.intro="";this.outro="";this.content=i;this.storeName=false;this.edited=false;Object.defineProperties(this,{previous:{writable:true,value:null},next:{writable:true,value:null}})}appendLeft(e){this.outro+=e}appendRight(e){this.intro=this.intro+e}clone(){const e=new Chunk$1(this.start,this.end,this.original);e.intro=this.intro;e.outro=this.outro;e.content=this.content;e.storeName=this.storeName;e.edited=this.edited;return e}contains(e){return this.start<e&&e<this.end}eachNext(e){let t=this;while(t){e(t);t=t.next}}eachPrevious(e){let t=this;while(t){e(t);t=t.previous}}edit(e,t,i){this.content=e;if(!i){this.intro="";this.outro=""}this.storeName=t;this.edited=true;return this}prependLeft(e){this.outro=e+this.outro}prependRight(e){this.intro=e+this.intro}split(e){const t=e-this.start;const i=this.original.slice(0,t);const s=this.original.slice(t);this.original=i;const n=new Chunk$1(e,this.end,s);n.outro=this.outro;this.outro="";this.end=e;if(this.edited){n.edit("",false);this.content=""}else{this.content=i}n.next=this.next;if(n.next)n.next.previous=n;n.previous=this;this.next=n;return n}toString(){return this.intro+this.content+this.outro}trimEnd(e){this.outro=this.outro.replace(e,"");if(this.outro.length)return true;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){this.split(this.start+t.length).edit("",undefined,true)}return true}else{this.edit("",undefined,true);this.intro=this.intro.replace(e,"");if(this.intro.length)return true}}trimStart(e){this.intro=this.intro.replace(e,"");if(this.intro.length)return true;const t=this.content.replace(e,"");if(t.length){if(t!==this.content){this.split(this.end-t.length);this.edit("",undefined,true)}return true}else{this.edit("",undefined,true);this.outro=this.outro.replace(e,"");if(this.outro.length)return true}}}let btoa=()=>{throw new Error("Unsupported environment: `window.btoa` or `Buffer` should be supported.")};if(typeof window!=="undefined"&&typeof window.btoa==="function"){btoa=e=>window.btoa(unescape(encodeURIComponent(e)))}else if(typeof Buffer==="function"){btoa=e=>Buffer.from(e,"utf-8").toString("base64")}class SourceMap{constructor(e){this.version=3;this.file=e.file;this.sources=e.sources;this.sourcesContent=e.sourcesContent;this.names=e.names;this.mappings=encode(e.mappings)}toString(){return JSON.stringify(this)}toUrl(){return"data:application/json;charset=utf-8;base64,"+btoa(this.toString())}}function guessIndent(e){const t=e.split("\n");const i=t.filter((e=>/^\t+/.test(e)));const s=t.filter((e=>/^ {2,}/.test(e)));if(i.length===0&&s.length===0){return null}if(i.length>=s.length){return"\t"}const n=s.reduce(((e,t)=>{const i=/^ +/.exec(t)[0].length;return Math.min(i,e)}),Infinity);return new Array(n+1).join(" ")}function getRelativePath(e,t){const i=e.split(/[/\\]/);const s=t.split(/[/\\]/);i.pop();while(i[0]===s[0]){i.shift();s.shift()}if(i.length){let e=i.length;while(e--)i[e]=".."}return i.concat(s).join("/")}const C=Object.prototype.toString;function isObject$1(e){return C.call(e)==="[object Object]"}function getLocator(e){const t=e.split("\n");const i=[];for(let e=0,s=0;e<t.length;e++){i.push(s);s+=t[e].length+1}return function locate(e){let t=0;let s=i.length;while(t<s){const n=t+s>>1;if(e<i[n]){s=n}else{t=n+1}}const n=t-1;const r=e-i[n];return{line:n,column:r}}}class Mappings{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,i,s){if(t.length){const t=[this.generatedCodeColumn,e,i.line,i.column];if(s>=0){t.push(s)}this.rawSegments.push(t)}else if(this.pending){this.rawSegments.push(this.pending)}this.advance(t);this.pending=null}addUneditedChunk(e,t,i,s,n){let r=t.start;let o=true;while(r<t.end){if(this.hires||o||n.has(r)){this.rawSegments.push([this.generatedCodeColumn,e,s.line,s.column])}if(i[r]==="\n"){s.line+=1;s.column=0;this.generatedCodeLine+=1;this.raw[this.generatedCodeLine]=this.rawSegments=[];this.generatedCodeColumn=0;o=true}else{s.column+=1;this.generatedCodeColumn+=1;o=false}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 k="\n";const _={insertLeft:false,insertRight:false,storeName:false};class MagicString{constructor(e,t={}){const i=new Chunk$1(0,e.length,e);Object.defineProperties(this,{original:{writable:true,value:e},outro:{writable:true,value:""},intro:{writable:true,value:""},firstChunk:{writable:true,value:i},lastChunk:{writable:true,value:i},lastSearchedChunk:{writable:true,value:i},byStart:{writable:true,value:{}},byEnd:{writable:true,value:{}},filename:{writable:true,value:t.filename},indentExclusionRanges:{writable:true,value:t.indentExclusionRanges},sourcemapLocations:{writable:true,value:new BitSet},storedNames:{writable:true,value:{}},indentStr:{writable:true,value:guessIndent(e)}});this.byStart[0]=i;this.byEnd[e.length]=i}addSourcemapLocation(e){this.sourcemapLocations.add(e)}append(e){if(typeof e!=="string")throw new TypeError("outro content must be a string");this.outro+=e;return this}appendLeft(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];if(i){i.appendLeft(t)}else{this.intro+=t}return this}appendRight(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];if(i){i.appendRight(t)}else{this.outro+=t}return this}clone(){const e=new MagicString(this.original,{filename:this.filename});let t=this.firstChunk;let i=e.firstChunk=e.lastSearchedChunk=t.clone();while(t){e.byStart[i.start]=i;e.byEnd[i.end]=i;const s=t.next;const n=s&&s.clone();if(n){i.next=n;n.previous=i;i=n}t=s}e.lastChunk=i;if(this.indentExclusionRanges){e.indentExclusionRanges=this.indentExclusionRanges.slice()}e.sourcemapLocations=new BitSet(this.sourcemapLocations);e.intro=this.intro;e.outro=this.outro;return e}generateDecodedMap(e){e=e||{};const t=0;const i=Object.keys(this.storedNames);const s=new Mappings(e.hires);const n=getLocator(this.original);if(this.intro){s.advance(this.intro)}this.firstChunk.eachNext((e=>{const r=n(e.start);if(e.intro.length)s.advance(e.intro);if(e.edited){s.addEdit(t,e.content,r,e.storeName?i.indexOf(e.original):-1)}else{s.addUneditedChunk(t,e,this.original,r,this.sourcemapLocations)}if(e.outro.length)s.advance(e.outro)}));return{file:e.file?e.file.split(/[/\\]/).pop():null,sources:[e.source?getRelativePath(e.file||"",e.source):null],sourcesContent:e.includeContent?[this.original]:[null],names:i,mappings:s.raw}}generateMap(e){return new SourceMap(this.generateDecodedMap(e))}getIndentString(){return this.indentStr===null?"\t":this.indentStr}indent(e,t){const i=/^[^\r\n]/gm;if(isObject$1(e)){t=e;e=undefined}e=e!==undefined?e:this.indentStr||"\t";if(e==="")return this;t=t||{};const s={};if(t.exclude){const e=typeof t.exclude[0]==="number"?[t.exclude]:t.exclude;e.forEach((e=>{for(let t=e[0];t<e[1];t+=1){s[t]=true}}))}let n=t.indentStart!==false;const replacer=t=>{if(n)return`${e}${t}`;n=true;return t};this.intro=this.intro.replace(i,replacer);let r=0;let o=this.firstChunk;while(o){const t=o.end;if(o.edited){if(!s[r]){o.content=o.content.replace(i,replacer);if(o.content.length){n=o.content[o.content.length-1]==="\n"}}}else{r=o.start;while(r<t){if(!s[r]){const t=this.original[r];if(t==="\n"){n=true}else if(t!=="\r"&&n){n=false;if(r===o.start){o.prependRight(e)}else{this._splitChunk(o,r);o=o.next;o.prependRight(e)}}}r+=1}}r=o.end;o=o.next}this.outro=this.outro.replace(i,replacer);return this}insert(){throw new Error("magicString.insert(...) is deprecated. Use prependRight(...) or appendLeft(...)")}insertLeft(e,t){if(!_.insertLeft){console.warn("magicString.insertLeft(...) is deprecated. Use magicString.appendLeft(...) instead");_.insertLeft=true}return this.appendLeft(e,t)}insertRight(e,t){if(!_.insertRight){console.warn("magicString.insertRight(...) is deprecated. Use magicString.prependRight(...) instead");_.insertRight=true}return this.prependRight(e,t)}move(e,t,i){if(i>=e&&i<=t)throw new Error("Cannot move a selection inside itself");this._split(e);this._split(t);this._split(i);const s=this.byStart[e];const n=this.byEnd[t];const r=s.previous;const o=n.next;const l=this.byStart[i];if(!l&&n===this.lastChunk)return this;const c=l?l.previous:this.lastChunk;if(r)r.next=o;if(o)o.previous=r;if(c)c.next=s;if(l)l.previous=n;if(!s.previous)this.firstChunk=n.next;if(!n.next){this.lastChunk=s.previous;this.lastChunk.next=null}s.previous=c;n.next=l||null;if(!c)this.firstChunk=s;if(!l)this.lastChunk=n;return this}overwrite(e,t,i,s){if(typeof i!=="string")throw new TypeError("replacement content must be a string");while(e<0)e+=this.original.length;while(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);if(s===true){if(!_.storeName){console.warn("The final argument to magicString.overwrite(...) should be an options object. See https://github.com/rich-harris/magic-string");_.storeName=true}s={storeName:true}}const n=s!==undefined?s.storeName:false;const r=s!==undefined?s.contentOnly:false;if(n){const i=this.original.slice(e,t);Object.defineProperty(this.storedNames,i,{writable:true,value:true,enumerable:true})}const o=this.byStart[e];const l=this.byEnd[t];if(o){let e=o;while(e!==l){if(e.next!==this.byStart[e.end]){throw new Error("Cannot overwrite across a split point")}e=e.next;e.edit("",false)}o.edit(i,n,r)}else{const s=new Chunk$1(e,t,"").edit(i,n);l.next=s;s.previous=l}return this}prepend(e){if(typeof e!=="string")throw new TypeError("outro content must be a string");this.intro=e+this.intro;return this}prependLeft(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byEnd[e];if(i){i.prependLeft(t)}else{this.intro=t+this.intro}return this}prependRight(e,t){if(typeof t!=="string")throw new TypeError("inserted content must be a string");this._split(e);const i=this.byStart[e];if(i){i.prependRight(t)}else{this.outro=t+this.outro}return this}remove(e,t){while(e<0)e+=this.original.length;while(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 i=this.byStart[e];while(i){i.intro="";i.outro="";i.edit("");i=t>i.end?this.byStart[i.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);if(this.intro.length)return this.intro[this.intro.length-1];return""}lastLine(){let e=this.outro.lastIndexOf(k);if(e!==-1)return this.outro.substr(e+1);let t=this.outro;let i=this.lastChunk;do{if(i.outro.length>0){e=i.outro.lastIndexOf(k);if(e!==-1)return i.outro.substr(e+1)+t;t=i.outro+t}if(i.content.length>0){e=i.content.lastIndexOf(k);if(e!==-1)return i.content.substr(e+1)+t;t=i.content+t}if(i.intro.length>0){e=i.intro.lastIndexOf(k);if(e!==-1)return i.intro.substr(e+1)+t;t=i.intro+t}}while(i=i.previous);e=this.intro.lastIndexOf(k);if(e!==-1)return this.intro.substr(e+1)+t;return this.intro+t}slice(e=0,t=this.original.length){while(e<0)e+=this.original.length;while(t<0)t+=this.original.length;let i="";let s=this.firstChunk;while(s&&(s.start>e||s.end<=e)){if(s.start<t&&s.end>=t){return i}s=s.next}if(s&&s.edited&&s.start!==e)throw new Error(`Cannot use replaced character ${e} as slice start anchor.`);const n=s;while(s){if(s.intro&&(n!==s||s.start===e)){i+=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=n===s?e-s.start:0;const l=r?s.content.length+t-s.end:s.content.length;i+=s.content.slice(o,l);if(s.outro&&(!r||s.end===t)){i+=s.outro}if(r){break}s=s.next}return i}snip(e,t){const i=this.clone();i.remove(0,e);i.remove(t,i.original.length);return i}_split(e){if(this.byStart[e]||this.byEnd[e])return;let t=this.lastSearchedChunk;const i=e>t.end;while(t){if(t.contains(e))return this._splitChunk(t,e);t=i?this.byStart[t.end]:this.byEnd[t.start]}}_splitChunk(e,t){if(e.edited&&e.content.length){const i=getLocator(this.original)(t);throw new Error(`Cannot split a chunk that has already been edited (${i.line}:${i.column} – "${e.original}")`)}const i=e.split(t);this.byEnd[t]=e;this.byStart[t]=i;this.byEnd[i.end]=i;if(e===this.lastChunk)this.lastChunk=i;this.lastSearchedChunk=e;return true}toString(){let e=this.intro;let t=this.firstChunk;while(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 false}while(e=e.next);return true}length(){let e=this.firstChunk;let 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")+"+$");this.outro=this.outro.replace(t,"");if(this.outro.length)return true;let i=this.lastChunk;do{const e=i.end;const s=i.trimEnd(t);if(i.end!==e){if(this.lastChunk===i){this.lastChunk=i.next}this.byEnd[i.end]=i;this.byStart[i.next.start]=i.next;this.byEnd[i.next.end]=i.next}if(s)return true;i=i.previous}while(i);return false}trimEnd(e){this.trimEndAborted(e);return this}trimStartAborted(e){const t=new RegExp("^"+(e||"\\s")+"+");this.intro=this.intro.replace(t,"");if(this.intro.length)return true;let i=this.firstChunk;do{const e=i.end;const s=i.trimStart(t);if(i.end!==e){if(i===this.lastChunk)this.lastChunk=i.next;this.byEnd[i.end]=i;this.byStart[i.next.start]=i.next;this.byEnd[i.next.end]=i.next}if(s)return true;i=i.next}while(i);return false}trimStart(e){this.trimStartAborted(e);return this}hasChanged(){return this.original!==this.toString()}replace(e,t){function getReplacement(e,i){if(typeof t==="string"){return t.replace(/\$(\$|&|\d+)/g,((t,i)=>{if(i==="$")return"$";if(i==="&")return e[0];const s=+i;if(s<e.length)return e[+i];return`$${i}`}))}else{return t(...e,e.index,i,e.groups)}}function matchAll(e,t){let i;const s=[];while(i=e.exec(t)){s.push(i)}return s}if(typeof e!=="string"&&e.global){const t=matchAll(e,this.original);t.forEach((e=>{if(e.index!=null)this.overwrite(e.index,e.index+e[0].length,getReplacement(e,this.original))}))}else{const t=this.original.match(e);if(t&&t.index!=null)this.overwrite(t.index,t.index+t[0].length,getReplacement(t,this.original))}return this}}const P=Object.prototype.hasOwnProperty;class Bundle$1{constructor(e={}){this.intro=e.intro||"";this.separator=e.separator!==undefined?e.separator:"\n";this.sources=[];this.uniqueSources=[];this.uniqueSourceIndexByFilename={}}addSource(e){if(e instanceof MagicString){return this.addSource({content:e,filename:e.filename,separator:this.separator})}if(!isObject$1(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`")}["filename","indentExclusionRanges","separator"].forEach((t=>{if(!P.call(e,t))e[t]=e.content[t]}));if(e.separator===undefined){e.separator=this.separator}if(e.filename){if(!P.call(this.uniqueSourceIndexByFilename,e.filename)){this.uniqueSourceIndexByFilename[e.filename]=this.uniqueSources.length;this.uniqueSources.push({filename:e.filename,content:e.content.original})}else{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`)}}}this.sources.push(e);return this}append(e,t){this.addSource({content:new MagicString(e),separator:t&&t.separator||""});return this}clone(){const e=new Bundle$1({intro:this.intro,separator:this.separator});this.sources.forEach((t=>{e.addSource({filename:t.filename,content:t.content.clone(),separator:t.separator})}));return e}generateDecodedMap(e={}){const t=[];this.sources.forEach((e=>{Object.keys(e.content.storedNames).forEach((e=>{if(!~t.indexOf(e))t.push(e)}))}));const i=new Mappings(e.hires);if(this.intro){i.advance(this.intro)}this.sources.forEach(((e,s)=>{if(s>0){i.advance(this.separator)}const n=e.filename?this.uniqueSourceIndexByFilename[e.filename]:-1;const r=e.content;const o=getLocator(r.original);if(r.intro){i.advance(r.intro)}r.firstChunk.eachNext((s=>{const l=o(s.start);if(s.intro.length)i.advance(s.intro);if(e.filename){if(s.edited){i.addEdit(n,s.content,l,s.storeName?t.indexOf(s.original):-1)}else{i.addUneditedChunk(n,s,r.original,l,r.sourcemapLocations)}}else{i.advance(s.content)}if(s.outro.length)i.advance(s.outro)}));if(r.outro){i.advance(r.outro)}}));return{file:e.file?e.file.split(/[/\\]/).pop():null,sources:this.uniqueSources.map((t=>e.file?getRelativePath(e.file,t.filename):t.filename)),sourcesContent:this.uniqueSources.map((t=>e.includeContent?t.content:null)),names:t,mappings:i.raw}}generateMap(e){return new SourceMap(this.generateDecodedMap(e))}getIndentString(){const e={};this.sources.forEach((t=>{const i=t.content.indentStr;if(i===null)return;if(!e[i])e[i]=0;e[i]+=1}));return Object.keys(e).sort(((t,i)=>e[t]-e[i]))[0]||"\t"}indent(e){if(!arguments.length){e=this.getIndentString()}if(e==="")return this;let t=!this.intro||this.intro.slice(-1)==="\n";this.sources.forEach(((i,s)=>{const n=i.separator!==undefined?i.separator:this.separator;const r=t||s>0&&/\r?\n$/.test(n);i.content.indent(e,{exclude:i.indentExclusionRanges,indentStart:r});t=i.content.lastChar()==="\n"}));if(this.intro){this.intro=e+this.intro.replace(/^[^\n]/gm,((t,i)=>i>0?e+t:t))}return this}prepend(e){this.intro=e+this.intro;return this}toString(){const e=this.sources.map(((e,t)=>{const i=e.separator!==undefined?e.separator:this.separator;const s=(t>0?i:"")+e.content.toString();return s})).join("");return this.intro+e}isEmpty(){if(this.intro.length&&this.intro.trim())return false;if(this.sources.some((e=>!e.content.isEmpty())))return false;return true}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")+"+");this.intro=this.intro.replace(t,"");if(!this.intro){let t;let i=0;do{t=this.sources[i++];if(!t){break}}while(!t.content.trimStartAborted(e))}return this}trimEnd(e){const t=new RegExp((e||"\\s")+"+$");let i;let s=this.sources.length-1;do{i=this.sources[s--];if(!i){this.intro=this.intro.replace(t,"");break}}while(!i.content.trimEndAborted(e));return this}}function getOrCreate(e,t,i){const s=e.get(t);if(s){return s}const n=i();e.set(t,n);return n}const N=Symbol("Unknown Key");const R=Symbol("Unknown Non-Accessor Key");const T=Symbol("Unknown Integer");const $=[];const O=[N];const D=[R];const M=[T];const L=Symbol("Entities");class PathTracker{constructor(){this.entityPaths=Object.create(null,{[L]:{value:new Set}})}trackEntityAtPathAndGetIfTracked(e,t){const i=this.getEntities(e);if(i.has(t))return true;i.add(t);return false}withTrackedEntityAtPath(e,t,i,s){const n=this.getEntities(e);if(n.has(t))return s;n.add(t);const r=i();n.delete(t);return r}getEntities(e){let t=this.entityPaths;for(const i of e){t=t[i]=t[i]||Object.create(null,{[L]:{value:new Set}})}return t[L]}}const F=new PathTracker;class DiscriminatedPathTracker{constructor(){this.entityPaths=Object.create(null,{[L]:{value:new Map}})}trackEntityAtPathAndGetIfTracked(e,t,i){let s=this.entityPaths;for(const t of e){s=s[t]=s[t]||Object.create(null,{[L]:{value:new Map}})}const n=getOrCreate(s[L],t,(()=>new Set));if(n.has(i))return true;n.add(i);return false}}const V=Symbol("Unknown Value");const B=Symbol("Unknown Truthy Value");class ExpressionEntity{constructor(){this.included=false}deoptimizePath(e){}deoptimizeThisOnInteractionAtPath({thisArg:e},t,i){e.deoptimizePath(O)}getLiteralValueAtPath(e,t,i){return V}getReturnExpressionWhenCalledAtPath(e,t,i,s){return z}hasEffectsOnInteractionAtPath(e,t,i){return true}include(e,t,i){this.included=true}includeCallArguments(e,t){for(const i of t){i.include(e,false)}}shouldBeIncluded(e){return true}}const z=new class UnknownExpression extends ExpressionEntity{};const U=0;const H=1;const j=2;const G={thisArg:null,type:U};const W=[z];const q={args:W,thisArg:null,type:H};const K=[];const Y={args:K,thisArg:null,type:j,withNew:false};class Variable extends ExpressionEntity{constructor(e){super();this.name=e;this.alwaysRendered=false;this.initReached=false;this.isId=false;this.isReassigned=false;this.kind=null;this.renderBaseName=null;this.renderName=null}addReference(e){}getBaseVariableName(){return this.renderBaseName||this.renderName||this.name}getName(e){const t=this.renderName||this.name;return this.renderBaseName?`${this.renderBaseName}${e(t)}`:t}hasEffectsOnInteractionAtPath(e,{type:t},i){return t!==U||e.length>0}include(){this.included=true}markCalledFromTryStatement(){}setRenderNames(e,t){this.renderBaseName=e;this.renderName=t}}class ExternalVariable extends Variable{constructor(e,t){super(t);this.referenced=false;this.module=e;this.isNamespace=t==="*"}addReference(e){this.referenced=true;if(this.name==="default"||this.name==="*"){this.module.suggestName(e.name)}}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>(this.isNamespace?1:0)}include(){if(!this.included){this.included=true;this.module.used=true}}}const X=Object.freeze(Object.create(null));const Q=Object.freeze({});const Z=Object.freeze([]);const J=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"]);const ee=J;const te=/[^$_a-zA-Z0-9]/g;const startsWithDigit=e=>/\d/.test(e[0]);const needsEscape=e=>startsWithDigit(e)||ee.has(e)||e==="arguments";function isLegal(e){if(needsEscape(e)){return false}return!te.test(e)}function makeLegal(e){e=e.replace(/-(\w)/g,((e,t)=>t.toUpperCase())).replace(te,"_");if(needsEscape(e))e=`_${e}`;return e||"_"}class ExternalModule{constructor(e,t,i,s,n){this.options=e;this.id=t;this.renormalizeRenderPath=n;this.declarations=new Map;this.defaultVariableName="";this.dynamicImporters=[];this.execIndex=Infinity;this.exportedVariables=new Map;this.importers=[];this.mostCommonSuggestion=0;this.nameSuggestions=new Map;this.namespaceVariableName="";this.reexported=false;this.renderPath=undefined;this.used=false;this.variableName="";this.suggestedVariableName=makeLegal(t.split(/[\\/]/).pop());const{importers:r,dynamicImporters:o}=this;const l=this.info={ast:null,code:null,dynamicallyImportedIdResolutions:Z,dynamicallyImportedIds:Z,get dynamicImporters(){return o.sort()},hasDefaultExport:null,get hasModuleSideEffects(){warnDeprecation("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",false,e);return l.moduleSideEffects},id:t,implicitlyLoadedAfterOneOf:Z,implicitlyLoadedBefore:Z,importedIdResolutions:Z,importedIds:Z,get importers(){return r.sort()},isEntry:false,isExternal:true,isIncluded:null,meta:s,moduleSideEffects:i,syntheticNamedExports:false};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:false})}getVariableForExportName(e){const t=this.declarations.get(e);if(t)return[t];const i=new ExternalVariable(this,e);this.declarations.set(e,i);this.exportedVariables.set(i,e);return[i]}setRenderPath(e,t){this.renderPath=typeof e.paths==="function"?e.paths(this.id):e.paths[this.id];if(!this.renderPath){this.renderPath=this.renormalizeRenderPath?normalize(s.relative(t,this.id)):this.id}}suggestName(e){var t;const i=((t=this.nameSuggestions.get(e))!==null&&t!==void 0?t:0)+1;this.nameSuggestions.set(e,i);if(i>this.mostCommonSuggestion){this.mostCommonSuggestion=i;this.suggestedVariableName=e}}warnUnusedImports(){const e=Array.from(this.declarations).filter((([e,t])=>e!=="*"&&!t.included&&!this.reexported&&!t.referenced)).map((([e])=>e));if(e.length===0)return;const t=new Set;for(const i of e){for(const e of this.declarations.get(i).module.importers){t.add(e)}}const i=[...t];this.options.onwarn({code:"UNUSED_EXTERNAL_IMPORT",message:`${printQuotedStringList(e,["is","are"])} imported from external module "${this.id}" but never used in ${printQuotedStringList(i.map((e=>relativeId(e))))}.`,names:e,source:this.id,sources:i})}}var ie={exports:{}};var se={};const ne=s;const re="\\\\/";const ae=`[^${re}]`;const oe="\\.";const le="\\+";const ce="\\?";const ue="\\/";const he="(?=.)";const de="[^/]";const pe=`(?:${ue}|$)`;const fe=`(?:^|${ue})`;const me=`${oe}{1,2}${pe}`;const ge=`(?!${oe})`;const ye=`(?!${fe}${me})`;const Ee=`(?!${oe}{0,1}${pe})`;const xe=`(?!${me})`;const ve=`[^.${ue}]`;const be=`${de}*?`;const Se={DOT_LITERAL:oe,PLUS_LITERAL:le,QMARK_LITERAL:ce,SLASH_LITERAL:ue,ONE_CHAR:he,QMARK:de,END_ANCHOR:pe,DOTS_SLASH:me,NO_DOT:ge,NO_DOTS:ye,NO_DOT_SLASH:Ee,NO_DOTS_SLASH:xe,QMARK_NO_DOT:ve,STAR:be,START_ANCHOR:fe};const Ae={...Se,SLASH_LITERAL:`[${re}]`,QMARK:ae,STAR:`${ae}*?`,DOTS_SLASH:`${oe}{1,2}(?:[${re}]|$)`,NO_DOT:`(?!${oe})`,NO_DOTS:`(?!(?:^|[${re}])${oe}{1,2}(?:[${re}]|$))`,NO_DOT_SLASH:`(?!${oe}{0,1}(?:[${re}]|$))`,NO_DOTS_SLASH:`(?!${oe}{1,2}(?:[${re}]|$))`,QMARK_NO_DOT:`[^.${re}]`,START_ANCHOR:`(?:^|[${re}])`,END_ANCHOR:`(?:[${re}]|$)`};const we={alnum:"a-zA-Z0-9",alpha:"a-zA-Z",ascii:"\\x00-\\x7F",blank:" \\t",cntrl:"\\x00-\\x1F\\x7F",digit:"0-9",graph:"\\x21-\\x7E",lower:"a-z",print:"\\x20-\\x7E ",punct:"\\-!\"#$%&'()\\*+,./:;<=>?@[\\]^_`{|}~",space:" \\t\\r\\n\\v\\f",upper:"A-Z",word:"A-Za-z0-9_",xdigit:"A-Fa-f0-9"};var Ie={MAX_LENGTH:1024*64,POSIX_REGEX_SOURCE:we,REGEX_BACKSLASH:/\\(?![*+?^${}(|)[\]])/g,REGEX_NON_SPECIAL_CHARS:/^[^@![\].,$*+?^{}()|\\/]+/,REGEX_SPECIAL_CHARS:/[-*+?.^${}(|)[\]]/,REGEX_SPECIAL_CHARS_BACKREF:/(\\?)((\W)(\3*))/g,REGEX_SPECIAL_CHARS_GLOBAL:/([-*+?.^${}(|)[\]])/g,REGEX_REMOVE_BACKSLASH:/(?:\[.*?[^\\]\]|\\(?=.))/g,REPLACEMENTS:{"***":"*","**/**":"**","**/**/**":"**"},CHAR_0:48,CHAR_9:57,CHAR_UPPERCASE_A:65,CHAR_LOWERCASE_A:97,CHAR_UPPERCASE_Z:90,CHAR_LOWERCASE_Z:122,CHAR_LEFT_PARENTHESES:40,CHAR_RIGHT_PARENTHESES:41,CHAR_ASTERISK:42,CHAR_AMPERSAND:38,CHAR_AT:64,CHAR_BACKWARD_SLASH:92,CHAR_CARRIAGE_RETURN:13,CHAR_CIRCUMFLEX_ACCENT:94,CHAR_COLON:58,CHAR_COMMA:44,CHAR_DOT:46,CHAR_DOUBLE_QUOTE:34,CHAR_EQUAL:61,CHAR_EXCLAMATION_MARK:33,CHAR_FORM_FEED:12,CHAR_FORWARD_SLASH:47,CHAR_GRAVE_ACCENT:96,CHAR_HASH:35,CHAR_HYPHEN_MINUS:45,CHAR_LEFT_ANGLE_BRACKET:60,CHAR_LEFT_CURLY_BRACE:123,CHAR_LEFT_SQUARE_BRACKET:91,CHAR_LINE_FEED:10,CHAR_NO_BREAK_SPACE:160,CHAR_PERCENT:37,CHAR_PLUS:43,CHAR_QUESTION_MARK:63,CHAR_RIGHT_ANGLE_BRACKET:62,CHAR_RIGHT_CURLY_BRACE:125,CHAR_RIGHT_SQUARE_BRACKET:93,CHAR_SEMICOLON:59,CHAR_SINGLE_QUOTE:39,CHAR_SPACE:32,CHAR_TAB:9,CHAR_UNDERSCORE:95,CHAR_VERTICAL_LINE:124,CHAR_ZERO_WIDTH_NOBREAK_SPACE:65279,SEP:ne.sep,extglobChars(e){return{"!":{type:"negate",open:"(?:(?!(?:",close:`))${e.STAR})`},"?":{type:"qmark",open:"(?:",close:")?"},"+":{type:"plus",open:"(?:",close:")+"},"*":{type:"star",open:"(?:",close:")*"},"@":{type:"at",open:"(?:",close:")"}}},globChars(e){return e===true?Ae:Se}};(function(e){const t=s;const i=process.platform==="win32";const{REGEX_BACKSLASH:n,REGEX_REMOVE_BACKSLASH:r,REGEX_SPECIAL_CHARS:o,REGEX_SPECIAL_CHARS_GLOBAL:l}=Ie;e.isObject=e=>e!==null&&typeof e==="object"&&!Array.isArray(e);e.hasRegexChars=e=>o.test(e);e.isRegexChar=t=>t.length===1&&e.hasRegexChars(t);e.escapeRegex=e=>e.replace(l,"\\$1");e.toPosixSlashes=e=>e.replace(n,"/");e.removeBackslashes=e=>e.replace(r,(e=>e==="\\"?"":e));e.supportsLookbehinds=()=>{const e=process.version.slice(1).split(".").map(Number);if(e.length===3&&e[0]>=9||e[0]===8&&e[1]>=10){return true}return false};e.isWindows=e=>{if(e&&typeof e.windows==="boolean"){return e.windows}return i===true||t.sep==="\\"};e.escapeLast=(t,i,s)=>{const n=t.lastIndexOf(i,s);if(n===-1)return t;if(t[n-1]==="\\")return e.escapeLast(t,i,n-1);return`${t.slice(0,n)}\\${t.slice(n)}`};e.removePrefix=(e,t={})=>{let i=e;if(i.startsWith("./")){i=i.slice(2);t.prefix="./"}return i};e.wrapOutput=(e,t={},i={})=>{const s=i.contains?"":"^";const n=i.contains?"":"$";let r=`${s}(?:${e})${n}`;if(t.negated===true){r=`(?:^(?!${r}).*$)`}return r}})(se);const Ce=se;const{CHAR_ASTERISK:ke,CHAR_AT:_e,CHAR_BACKWARD_SLASH:Pe,CHAR_COMMA:Ne,CHAR_DOT:Re,CHAR_EXCLAMATION_MARK:Te,CHAR_FORWARD_SLASH:$e,CHAR_LEFT_CURLY_BRACE:Oe,CHAR_LEFT_PARENTHESES:De,CHAR_LEFT_SQUARE_BRACKET:Me,CHAR_PLUS:Le,CHAR_QUESTION_MARK:Fe,CHAR_RIGHT_CURLY_BRACE:Ve,CHAR_RIGHT_PARENTHESES:Be,CHAR_RIGHT_SQUARE_BRACKET:ze}=Ie;const isPathSeparator=e=>e===$e||e===Pe;const depth=e=>{if(e.isPrefix!==true){e.depth=e.isGlobstar?Infinity:1}};const scan$1=(e,t)=>{const i=t||{};const s=e.length-1;const n=i.parts===true||i.scanToEnd===true;const r=[];const o=[];const l=[];let c=e;let u=-1;let h=0;let d=0;let p=false;let f=false;let m=false;let g=false;let y=false;let E=false;let x=false;let v=false;let b=false;let S=false;let A=0;let w;let I;let C={value:"",depth:0,isGlob:false};const eos=()=>u>=s;const peek=()=>c.charCodeAt(u+1);const advance=()=>{w=I;return c.charCodeAt(++u)};while(u<s){I=advance();let e;if(I===Pe){x=C.backslashes=true;I=advance();if(I===Oe){E=true}continue}if(E===true||I===Oe){A++;while(eos()!==true&&(I=advance())){if(I===Pe){x=C.backslashes=true;advance();continue}if(I===Oe){A++;continue}if(E!==true&&I===Re&&(I=advance())===Re){p=C.isBrace=true;m=C.isGlob=true;S=true;if(n===true){continue}break}if(E!==true&&I===Ne){p=C.isBrace=true;m=C.isGlob=true;S=true;if(n===true){continue}break}if(I===Ve){A--;if(A===0){E=false;p=C.isBrace=true;S=true;break}}}if(n===true){continue}break}if(I===$e){r.push(u);o.push(C);C={value:"",depth:0,isGlob:false};if(S===true)continue;if(w===Re&&u===h+1){h+=2;continue}d=u+1;continue}if(i.noext!==true){const e=I===Le||I===_e||I===ke||I===Fe||I===Te;if(e===true&&peek()===De){m=C.isGlob=true;g=C.isExtglob=true;S=true;if(I===Te&&u===h){b=true}if(n===true){while(eos()!==true&&(I=advance())){if(I===Pe){x=C.backslashes=true;I=advance();continue}if(I===Be){m=C.isGlob=true;S=true;break}}continue}break}}if(I===ke){if(w===ke)y=C.isGlobstar=true;m=C.isGlob=true;S=true;if(n===true){continue}break}if(I===Fe){m=C.isGlob=true;S=true;if(n===true){continue}break}if(I===Me){while(eos()!==true&&(e=advance())){if(e===Pe){x=C.backslashes=true;advance();continue}if(e===ze){f=C.isBracket=true;m=C.isGlob=true;S=true;break}}if(n===true){continue}break}if(i.nonegate!==true&&I===Te&&u===h){v=C.negated=true;h++;continue}if(i.noparen!==true&&I===De){m=C.isGlob=true;if(n===true){while(eos()!==true&&(I=advance())){if(I===De){x=C.backslashes=true;I=advance();continue}if(I===Be){S=true;break}}continue}break}if(m===true){S=true;if(n===true){continue}break}}if(i.noext===true){g=false;m=false}let k=c;let _="";let P="";if(h>0){_=c.slice(0,h);c=c.slice(h);d-=h}if(k&&m===true&&d>0){k=c.slice(0,d);P=c.slice(d)}else if(m===true){k="";P=c}else{k=c}if(k&&k!==""&&k!=="/"&&k!==c){if(isPathSeparator(k.charCodeAt(k.length-1))){k=k.slice(0,-1)}}if(i.unescape===true){if(P)P=Ce.removeBackslashes(P);if(k&&x===true){k=Ce.removeBackslashes(k)}}const N={prefix:_,input:e,start:h,base:k,glob:P,isBrace:p,isBracket:f,isGlob:m,isExtglob:g,isGlobstar:y,negated:v,negatedExtglob:b};if(i.tokens===true){N.maxDepth=0;if(!isPathSeparator(I)){o.push(C)}N.tokens=o}if(i.parts===true||i.tokens===true){let t;for(let s=0;s<r.length;s++){const n=t?t+1:h;const c=r[s];const u=e.slice(n,c);if(i.tokens){if(s===0&&h!==0){o[s].isPrefix=true;o[s].value=_}else{o[s].value=u}depth(o[s]);N.maxDepth+=o[s].depth}if(s!==0||u!==""){l.push(u)}t=c}if(t&&t+1<e.length){const s=e.slice(t+1);l.push(s);if(i.tokens){o[o.length-1].value=s;depth(o[o.length-1]);N.maxDepth+=o[o.length-1].depth}}N.slashes=r;N.parts=l}return N};var Ue=scan$1;const He=Ie;const je=se;const{MAX_LENGTH:Ge,POSIX_REGEX_SOURCE:We,REGEX_NON_SPECIAL_CHARS:qe,REGEX_SPECIAL_CHARS_BACKREF:Ke,REPLACEMENTS:Ye}=He;const expandRange=(e,t)=>{if(typeof t.expandRange==="function"){return t.expandRange(...e,t)}e.sort();const i=`[${e.join("-")}]`;return i};const syntaxError=(e,t)=>`Missing ${e}: "${t}" - use "\\\\${t}" to match literal characters`;const parse$1=(e,t)=>{if(typeof e!=="string"){throw new TypeError("Expected a string")}e=Ye[e]||e;const i={...t};const s=typeof i.maxLength==="number"?Math.min(Ge,i.maxLength):Ge;let n=e.length;if(n>s){throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`)}const r={type:"bos",value:"",output:i.prepend||""};const o=[r];const l=i.capture?"":"?:";const c=je.isWindows(t);const u=He.globChars(c);const h=He.extglobChars(u);const{DOT_LITERAL:d,PLUS_LITERAL:p,SLASH_LITERAL:f,ONE_CHAR:m,DOTS_SLASH:g,NO_DOT:y,NO_DOT_SLASH:E,NO_DOTS_SLASH:x,QMARK:v,QMARK_NO_DOT:b,STAR:S,START_ANCHOR:A}=u;const globstar=e=>`(${l}(?:(?!${A}${e.dot?g:d}).)*?)`;const w=i.dot?"":y;const I=i.dot?v:b;let C=i.bash===true?globstar(i):S;if(i.capture){C=`(${C})`}if(typeof i.noext==="boolean"){i.noextglob=i.noext}const k={input:e,index:-1,start:0,dot:i.dot===true,consumed:"",output:"",prefix:"",backtrack:false,negated:false,brackets:0,braces:0,parens:0,quotes:0,globstar:false,tokens:o};e=je.removePrefix(e,k);n=e.length;const _=[];const P=[];const N=[];let R=r;let T;const eos=()=>k.index===n-1;const $=k.peek=(t=1)=>e[k.index+t];const O=k.advance=()=>e[++k.index]||"";const remaining=()=>e.slice(k.index+1);const consume=(e="",t=0)=>{k.consumed+=e;k.index+=t};const append=e=>{k.output+=e.output!=null?e.output:e.value;consume(e.value)};const negate=()=>{let e=1;while($()==="!"&&($(2)!=="("||$(3)==="?")){O();k.start++;e++}if(e%2===0){return false}k.negated=true;k.start++;return true};const increment=e=>{k[e]++;N.push(e)};const decrement=e=>{k[e]--;N.pop()};const push=e=>{if(R.type==="globstar"){const t=k.braces>0&&(e.type==="comma"||e.type==="brace");const i=e.extglob===true||_.length&&(e.type==="pipe"||e.type==="paren");if(e.type!=="slash"&&e.type!=="paren"&&!t&&!i){k.output=k.output.slice(0,-R.output.length);R.type="star";R.value="*";R.output=C;k.output+=R.output}}if(_.length&&e.type!=="paren"){_[_.length-1].inner+=e.value}if(e.value||e.output)append(e);if(R&&R.type==="text"&&e.type==="text"){R.value+=e.value;R.output=(R.output||"")+e.value;return}e.prev=R;o.push(e);R=e};const extglobOpen=(e,t)=>{const s={...h[t],conditions:1,inner:""};s.prev=R;s.parens=k.parens;s.output=k.output;const n=(i.capture?"(":"")+s.open;increment("parens");push({type:e,value:t,output:k.output?"":m});push({type:"paren",extglob:true,value:O(),output:n});_.push(s)};const extglobClose=e=>{let s=e.close+(i.capture?")":"");let n;if(e.type==="negate"){let r=C;if(e.inner&&e.inner.length>1&&e.inner.includes("/")){r=globstar(i)}if(r!==C||eos()||/^\)+$/.test(remaining())){s=e.close=`)$))${r}`}if(e.inner.includes("*")&&(n=remaining())&&/^\.[^\\/.]+$/.test(n)){const i=parse$1(n,{...t,fastpaths:false}).output;s=e.close=`)${i})${r})`}if(e.prev.type==="bos"){k.negatedExtglob=true}}push({type:"paren",extglob:true,value:T,output:s});decrement("parens")};if(i.fastpaths!==false&&!/(^[*!]|[/()[\]{}"])/.test(e)){let s=false;let n=e.replace(Ke,((e,t,i,n,r,o)=>{if(n==="\\"){s=true;return e}if(n==="?"){if(t){return t+n+(r?v.repeat(r.length):"")}if(o===0){return I+(r?v.repeat(r.length):"")}return v.repeat(i.length)}if(n==="."){return d.repeat(i.length)}if(n==="*"){if(t){return t+n+(r?C:"")}return C}return t?e:`\\${e}`}));if(s===true){if(i.unescape===true){n=n.replace(/\\/g,"")}else{n=n.replace(/\\+/g,(e=>e.length%2===0?"\\\\":e?"\\":""))}}if(n===e&&i.contains===true){k.output=e;return k}k.output=je.wrapOutput(n,k,t);return k}while(!eos()){T=O();if(T==="\0"){continue}if(T==="\\"){const e=$();if(e==="/"&&i.bash!==true){continue}if(e==="."||e===";"){continue}if(!e){T+="\\";push({type:"text",value:T});continue}const t=/^\\+/.exec(remaining());let s=0;if(t&&t[0].length>2){s=t[0].length;k.index+=s;if(s%2!==0){T+="\\"}}if(i.unescape===true){T=O()}else{T+=O()}if(k.brackets===0){push({type:"text",value:T});continue}}if(k.brackets>0&&(T!=="]"||R.value==="["||R.value==="[^")){if(i.posix!==false&&T===":"){const e=R.value.slice(1);if(e.includes("[")){R.posix=true;if(e.includes(":")){const e=R.value.lastIndexOf("[");const t=R.value.slice(0,e);const i=R.value.slice(e+2);const s=We[i];if(s){R.value=t+s;k.backtrack=true;O();if(!r.output&&o.indexOf(R)===1){r.output=m}continue}}}}if(T==="["&&$()!==":"||T==="-"&&$()==="]"){T=`\\${T}`}if(T==="]"&&(R.value==="["||R.value==="[^")){T=`\\${T}`}if(i.posix===true&&T==="!"&&R.value==="["){T="^"}R.value+=T;append({value:T});continue}if(k.quotes===1&&T!=='"'){T=je.escapeRegex(T);R.value+=T;append({value:T});continue}if(T==='"'){k.quotes=k.quotes===1?0:1;if(i.keepQuotes===true){push({type:"text",value:T})}continue}if(T==="("){increment("parens");push({type:"paren",value:T});continue}if(T===")"){if(k.parens===0&&i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","("))}const e=_[_.length-1];if(e&&k.parens===e.parens+1){extglobClose(_.pop());continue}push({type:"paren",value:T,output:k.parens?")":"\\)"});decrement("parens");continue}if(T==="["){if(i.nobracket===true||!remaining().includes("]")){if(i.nobracket!==true&&i.strictBrackets===true){throw new SyntaxError(syntaxError("closing","]"))}T=`\\${T}`}else{increment("brackets")}push({type:"bracket",value:T});continue}if(T==="]"){if(i.nobracket===true||R&&R.type==="bracket"&&R.value.length===1){push({type:"text",value:T,output:`\\${T}`});continue}if(k.brackets===0){if(i.strictBrackets===true){throw new SyntaxError(syntaxError("opening","["))}push({type:"text",value:T,output:`\\${T}`});continue}decrement("brackets");const e=R.value.slice(1);if(R.posix!==true&&e[0]==="^"&&!e.includes("/")){T=`/${T}`}R.value+=T;append({value:T});if(i.literalBrackets===false||je.hasRegexChars(e)){continue}const t=je.escapeRegex(R.value);k.output=k.output.slice(0,-R.value.length);if(i.literalBrackets===true){k.output+=t;R.value=t;continue}R.value=`(${l}${t}|${R.value})`;k.output+=R.value;continue}if(T==="{"&&i.nobrace!==true){increment("braces");const e={type:"brace",value:T,output:"(",outputIndex:k.output.length,tokensIndex:k.tokens.length};P.push(e);push(e);continue}if(T==="}"){const e=P[P.length-1];if(i.nobrace===true||!e){push({type:"text",value:T,output:T});continue}let t=")";if(e.dots===true){const e=o.slice();const s=[];for(let t=e.length-1;t>=0;t--){o.pop();if(e[t].type==="brace"){break}if(e[t].type!=="dots"){s.unshift(e[t].value)}}t=expandRange(s,i);k.backtrack=true}if(e.comma!==true&&e.dots!==true){const i=k.output.slice(0,e.outputIndex);const s=k.tokens.slice(e.tokensIndex);e.value=e.output="\\{";T=t="\\}";k.output=i;for(const e of s){k.output+=e.output||e.value}}push({type:"brace",value:T,output:t});decrement("braces");P.pop();continue}if(T==="|"){if(_.length>0){_[_.length-1].conditions++}push({type:"text",value:T});continue}if(T===","){let e=T;const t=P[P.length-1];if(t&&N[N.length-1]==="braces"){t.comma=true;e="|"}push({type:"comma",value:T,output:e});continue}if(T==="/"){if(R.type==="dot"&&k.index===k.start+1){k.start=k.index+1;k.consumed="";k.output="";o.pop();R=r;continue}push({type:"slash",value:T,output:f});continue}if(T==="."){if(k.braces>0&&R.type==="dot"){if(R.value===".")R.output=d;const e=P[P.length-1];R.type="dots";R.output+=T;R.value+=T;e.dots=true;continue}if(k.braces+k.parens===0&&R.type!=="bos"&&R.type!=="slash"){push({type:"text",value:T,output:d});continue}push({type:"dot",value:T,output:d});continue}if(T==="?"){const e=R&&R.value==="(";if(!e&&i.noextglob!==true&&$()==="("&&$(2)!=="?"){extglobOpen("qmark",T);continue}if(R&&R.type==="paren"){const e=$();let t=T;if(e==="<"&&!je.supportsLookbehinds()){throw new Error("Node.js v10 or higher is required for regex lookbehinds")}if(R.value==="("&&!/[!=<:]/.test(e)||e==="<"&&!/<([!=]|\w+>)/.test(remaining())){t=`\\${T}`}push({type:"text",value:T,output:t});continue}if(i.dot!==true&&(R.type==="slash"||R.type==="bos")){push({type:"qmark",value:T,output:b});continue}push({type:"qmark",value:T,output:v});continue}if(T==="!"){if(i.noextglob!==true&&$()==="("){if($(2)!=="?"||!/[!=<:]/.test($(3))){extglobOpen("negate",T);continue}}if(i.nonegate!==true&&k.index===0){negate();continue}}if(T==="+"){if(i.noextglob!==true&&$()==="("&&$(2)!=="?"){extglobOpen("plus",T);continue}if(R&&R.value==="("||i.regex===false){push({type:"plus",value:T,output:p});continue}if(R&&(R.type==="bracket"||R.type==="paren"||R.type==="brace")||k.parens>0){push({type:"plus",value:T});continue}push({type:"plus",value:p});continue}if(T==="@"){if(i.noextglob!==true&&$()==="("&&$(2)!=="?"){push({type:"at",extglob:true,value:T,output:""});continue}push({type:"text",value:T});continue}if(T!=="*"){if(T==="$"||T==="^"){T=`\\${T}`}const e=qe.exec(remaining());if(e){T+=e[0];k.index+=e[0].length}push({type:"text",value:T});continue}if(R&&(R.type==="globstar"||R.star===true)){R.type="star";R.star=true;R.value+=T;R.output=C;k.backtrack=true;k.globstar=true;consume(T);continue}let t=remaining();if(i.noextglob!==true&&/^\([^?]/.test(t)){extglobOpen("star",T);continue}if(R.type==="star"){if(i.noglobstar===true){consume(T);continue}const s=R.prev;const n=s.prev;const r=s.type==="slash"||s.type==="bos";const o=n&&(n.type==="star"||n.type==="globstar");if(i.bash===true&&(!r||t[0]&&t[0]!=="/")){push({type:"star",value:T,output:""});continue}const l=k.braces>0&&(s.type==="comma"||s.type==="brace");const c=_.length&&(s.type==="pipe"||s.type==="paren");if(!r&&s.type!=="paren"&&!l&&!c){push({type:"star",value:T,output:""});continue}while(t.slice(0,3)==="/**"){const i=e[k.index+4];if(i&&i!=="/"){break}t=t.slice(3);consume("/**",3)}if(s.type==="bos"&&eos()){R.type="globstar";R.value+=T;R.output=globstar(i);k.output=R.output;k.globstar=true;consume(T);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&!o&&eos()){k.output=k.output.slice(0,-(s.output+R.output).length);s.output=`(?:${s.output}`;R.type="globstar";R.output=globstar(i)+(i.strictSlashes?")":"|$)");R.value+=T;k.globstar=true;k.output+=s.output+R.output;consume(T);continue}if(s.type==="slash"&&s.prev.type!=="bos"&&t[0]==="/"){const e=t[1]!==void 0?"|$":"";k.output=k.output.slice(0,-(s.output+R.output).length);s.output=`(?:${s.output}`;R.type="globstar";R.output=`${globstar(i)}${f}|${f}${e})`;R.value+=T;k.output+=s.output+R.output;k.globstar=true;consume(T+O());push({type:"slash",value:"/",output:""});continue}if(s.type==="bos"&&t[0]==="/"){R.type="globstar";R.value+=T;R.output=`(?:^|${f}|${globstar(i)}${f})`;k.output=R.output;k.globstar=true;consume(T+O());push({type:"slash",value:"/",output:""});continue}k.output=k.output.slice(0,-R.output.length);R.type="globstar";R.output=globstar(i);R.value+=T;k.output+=R.output;k.globstar=true;consume(T);continue}const s={type:"star",value:T,output:C};if(i.bash===true){s.output=".*?";if(R.type==="bos"||R.type==="slash"){s.output=w+s.output}push(s);continue}if(R&&(R.type==="bracket"||R.type==="paren")&&i.regex===true){s.output=T;push(s);continue}if(k.index===k.start||R.type==="slash"||R.type==="dot"){if(R.type==="dot"){k.output+=E;R.output+=E}else if(i.dot===true){k.output+=x;R.output+=x}else{k.output+=w;R.output+=w}if($()!=="*"){k.output+=m;R.output+=m}}push(s)}while(k.brackets>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","]"));k.output=je.escapeLast(k.output,"[");decrement("brackets")}while(k.parens>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing",")"));k.output=je.escapeLast(k.output,"(");decrement("parens")}while(k.braces>0){if(i.strictBrackets===true)throw new SyntaxError(syntaxError("closing","}"));k.output=je.escapeLast(k.output,"{");decrement("braces")}if(i.strictSlashes!==true&&(R.type==="star"||R.type==="bracket")){push({type:"maybe_slash",value:"",output:`${f}?`})}if(k.backtrack===true){k.output="";for(const e of k.tokens){k.output+=e.output!=null?e.output:e.value;if(e.suffix){k.output+=e.suffix}}}return k};parse$1.fastpaths=(e,t)=>{const i={...t};const s=typeof i.maxLength==="number"?Math.min(Ge,i.maxLength):Ge;const n=e.length;if(n>s){throw new SyntaxError(`Input length: ${n}, exceeds maximum allowed length: ${s}`)}e=Ye[e]||e;const r=je.isWindows(t);const{DOT_LITERAL:o,SLASH_LITERAL:l,ONE_CHAR:c,DOTS_SLASH:u,NO_DOT:h,NO_DOTS:d,NO_DOTS_SLASH:p,STAR:f,START_ANCHOR:m}=He.globChars(r);const g=i.dot?d:h;const y=i.dot?p:h;const E=i.capture?"":"?:";const x={negated:false,prefix:""};let v=i.bash===true?".*?":f;if(i.capture){v=`(${v})`}const globstar=e=>{if(e.noglobstar===true)return v;return`(${E}(?:(?!${m}${e.dot?u:o}).)*?)`};const create=e=>{switch(e){case"*":return`${g}${c}${v}`;case".*":return`${o}${c}${v}`;case"*.*":return`${g}${v}${o}${c}${v}`;case"*/*":return`${g}${v}${l}${c}${y}${v}`;case"**":return g+globstar(i);case"**/*":return`(?:${g}${globstar(i)}${l})?${y}${c}${v}`;case"**/*.*":return`(?:${g}${globstar(i)}${l})?${y}${v}${o}${c}${v}`;case"**/.*":return`(?:${g}${globstar(i)}${l})?${o}${c}${v}`;default:{const t=/^(.*?)\.(\w+)$/.exec(e);if(!t)return;const i=create(t[1]);if(!i)return;return i+o+t[2]}}};const b=je.removePrefix(e,x);let S=create(b);if(S&&i.strictSlashes!==true){S+=`${l}?`}return S};var Xe=parse$1;const Qe=s;const Ze=Ue;const Je=Xe;const et=se;const tt=Ie;const isObject=e=>e&&typeof e==="object"&&!Array.isArray(e);const picomatch=(e,t,i=false)=>{if(Array.isArray(e)){const s=e.map((e=>picomatch(e,t,i)));const arrayMatcher=e=>{for(const t of s){const i=t(e);if(i)return i}return false};return arrayMatcher}const s=isObject(e)&&e.tokens&&e.input;if(e===""||typeof e!=="string"&&!s){throw new TypeError("Expected pattern to be a non-empty string")}const n=t||{};const r=et.isWindows(t);const o=s?picomatch.compileRe(e,t):picomatch.makeRe(e,t,false,true);const l=o.state;delete o.state;let isIgnored=()=>false;if(n.ignore){const e={...t,ignore:null,onMatch:null,onResult:null};isIgnored=picomatch(n.ignore,e,i)}const matcher=(i,s=false)=>{const{isMatch:c,match:u,output:h}=picomatch.test(i,o,t,{glob:e,posix:r});const d={glob:e,state:l,regex:o,posix:r,input:i,output:h,match:u,isMatch:c};if(typeof n.onResult==="function"){n.onResult(d)}if(c===false){d.isMatch=false;return s?d:false}if(isIgnored(i)){if(typeof n.onIgnore==="function"){n.onIgnore(d)}d.isMatch=false;return s?d:false}if(typeof n.onMatch==="function"){n.onMatch(d)}return s?d:true};if(i){matcher.state=l}return matcher};picomatch.test=(e,t,i,{glob:s,posix:n}={})=>{if(typeof e!=="string"){throw new TypeError("Expected input to be a string")}if(e===""){return{isMatch:false,output:""}}const r=i||{};const o=r.format||(n?et.toPosixSlashes:null);let l=e===s;let c=l&&o?o(e):e;if(l===false){c=o?o(e):e;l=c===s}if(l===false||r.capture===true){if(r.matchBase===true||r.basename===true){l=picomatch.matchBase(e,t,i,n)}else{l=t.exec(c)}}return{isMatch:Boolean(l),match:l,output:c}};picomatch.matchBase=(e,t,i,s=et.isWindows(i))=>{const n=t instanceof RegExp?t:picomatch.makeRe(t,i);return n.test(Qe.basename(e))};picomatch.isMatch=(e,t,i)=>picomatch(t,i)(e);picomatch.parse=(e,t)=>{if(Array.isArray(e))return e.map((e=>picomatch.parse(e,t)));return Je(e,{...t,fastpaths:false})};picomatch.scan=(e,t)=>Ze(e,t);picomatch.compileRe=(e,t,i=false,s=false)=>{if(i===true){return e.output}const n=t||{};const r=n.contains?"":"^";const o=n.contains?"":"$";let l=`${r}(?:${e.output})${o}`;if(e&&e.negated===true){l=`^(?!${l}).*$`}const c=picomatch.toRegex(l,t);if(s===true){c.state=e}return c};picomatch.makeRe=(e,t={},i=false,s=false)=>{if(!e||typeof e!=="string"){throw new TypeError("Expected a non-empty string")}let n={negated:false,fastpaths:true};if(t.fastpaths!==false&&(e[0]==="."||e[0]==="*")){n.output=Je.fastpaths(e,t)}if(!n.output){n=Je(e,t)}return picomatch.compileRe(n,t,i,s)};picomatch.toRegex=(e,t)=>{try{const i=t||{};return new RegExp(e,i.flags||(i.nocase?"i":""))}catch(e){if(t&&t.debug===true)throw e;return/$^/}};picomatch.constants=tt;var it=picomatch;(function(e){e.exports=it})(ie);const st=getDefaultExportFromCjs(ie.exports);const nt={ArrayPattern(e,t){for(const i of t.elements){if(i)nt[i.type](e,i)}},AssignmentPattern(e,t){nt[t.left.type](e,t.left)},Identifier(e,t){e.push(t.name)},MemberExpression(){},ObjectPattern(e,t){for(const i of t.properties){if(i.type==="RestElement"){nt.RestElement(e,i)}else{nt[i.value.type](e,i.value)}}},RestElement(e,t){nt[t.argument.type](e,t.argument)}};const rt=function extractAssignedNames(e){const t=[];nt[e.type](t,e);return t};function isArray$1(e){return Array.isArray(e)}function ensureArray(e){if(isArray$1(e))return e;if(e==null)return[];return[e]}const ot=function normalizePath(e){return e.split(s.win32.sep).join(s.posix.sep)};function getMatcherString(e,t){if(t===false||s.isAbsolute(e)||e.startsWith("*")){return ot(e)}const i=ot(s.resolve(t||"")).replace(/[-^$*+?.()|[\]{}]/g,"\\$&");return s.posix.join(i,ot(e))}const lt=function createFilter(e,t,i){const s=i&&i.resolve;const getMatcher=e=>e instanceof RegExp?e:{test:t=>{const i=getMatcherString(e,s);const n=st(i,{dot:true});const r=n(t);return r}};const n=ensureArray(e).map(getMatcher);const r=ensureArray(t).map(getMatcher);return function result(e){if(typeof e!=="string")return false;if(/\0/.test(e))return false;const t=ot(e);for(let e=0;e<r.length;++e){const i=r[e];if(i.test(t))return false}for(let e=0;e<n.length;++e){const i=n[e];if(i.test(t))return true}return!n.length}};const ct="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";const ut="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";const ht=new Set(`${ct} ${ut}`.split(" "));ht.add("");const dt=0;const pt=1;const ft=2;function createInclusionContext(){return{brokenFlow:dt,includedCallArguments:new Set,includedLabels:new Set}}function createHasEffectsContext(){return{accessed:new PathTracker,assigned:new PathTracker,brokenFlow:dt,called:new DiscriminatedPathTracker,ignore:{breaks:false,continues:false,labels:new Set,returnYield:false},includedLabels:new Set,instantiated:new DiscriminatedPathTracker,replacedVariableInits:new Map}}function assembleMemberDescriptions(e,t=null){return Object.create(t,e)}const mt=new class UndefinedExpression extends ExpressionEntity{getLiteralValueAtPath(){return undefined}};const gt={value:{hasEffectsWhenCalled:null,returns:z}};const yt=new class UnknownBoolean extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(It,e[0])}return z}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(It,e[0],t,i)}return true}};const Et={value:{hasEffectsWhenCalled:null,returns:yt}};const xt=new class UnknownNumber extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(Ct,e[0])}return z}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(Ct,e[0],t,i)}return true}};const vt={value:{hasEffectsWhenCalled:null,returns:xt}};const bt=new class UnknownString extends ExpressionEntity{getReturnExpressionWhenCalledAtPath(e){if(e.length===1){return getMemberReturnExpressionWhenCalled(kt,e[0])}return z}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(kt,e[0],t,i)}return true}};const St={value:{hasEffectsWhenCalled:null,returns:bt}};const At={value:{hasEffectsWhenCalled({args:e},t){const i=e[1];return e.length<2||typeof i.getLiteralValueAtPath($,F,{deoptimizeCache(){}})==="symbol"&&i.hasEffectsOnInteractionAtPath($,Y,t)},returns:bt}};const wt=assembleMemberDescriptions({hasOwnProperty:Et,isPrototypeOf:Et,propertyIsEnumerable:Et,toLocaleString:St,toString:St,valueOf:gt});const It=assembleMemberDescriptions({valueOf:Et},wt);const Ct=assembleMemberDescriptions({toExponential:St,toFixed:St,toLocaleString:St,toPrecision:St,valueOf:vt},wt);const kt=assembleMemberDescriptions({anchor:St,at:gt,big:St,blink:St,bold:St,charAt:St,charCodeAt:vt,codePointAt:gt,concat:St,endsWith:Et,fixed:St,fontcolor:St,fontsize:St,includes:Et,indexOf:vt,italics:St,lastIndexOf:vt,link:St,localeCompare:vt,match:gt,matchAll:gt,normalize:St,padEnd:St,padStart:St,repeat:St,replace:At,replaceAll:At,search:vt,slice:St,small:St,split:gt,startsWith:Et,strike:St,sub:St,substr:St,substring:St,sup:St,toLocaleLowerCase:St,toLocaleUpperCase:St,toLowerCase:St,toString:St,toUpperCase:St,trim:St,trimEnd:St,trimLeft:St,trimRight:St,trimStart:St,valueOf:St},wt);function getLiteralMembersForValue(e){switch(typeof e){case"boolean":return It;case"number":return Ct;case"string":return kt}return Object.create(null)}function hasMemberEffectWhenCalled(e,t,i,s){var n,r;if(typeof t!=="string"||!e[t]){return true}return((r=(n=e[t]).hasEffectsWhenCalled)===null||r===void 0?void 0:r.call(n,i,s))||false}function getMemberReturnExpressionWhenCalled(e,t){if(typeof t!=="string"||!e[t])return z;return e[t].returns}function skipThrough(e,t,i){i(e,t)}function ignore(e,t,i){}var _t={};_t.Program=_t.BlockStatement=_t.StaticBlock=function(e,t,i){for(var s=0,n=e.body;s<n.length;s+=1){var r=n[s];i(r,t,"Statement")}};_t.Statement=skipThrough;_t.EmptyStatement=ignore;_t.ExpressionStatement=_t.ParenthesizedExpression=_t.ChainExpression=function(e,t,i){return i(e.expression,t,"Expression")};_t.IfStatement=function(e,t,i){i(e.test,t,"Expression");i(e.consequent,t,"Statement");if(e.alternate){i(e.alternate,t,"Statement")}};_t.LabeledStatement=function(e,t,i){return i(e.body,t,"Statement")};_t.BreakStatement=_t.ContinueStatement=ignore;_t.WithStatement=function(e,t,i){i(e.object,t,"Expression");i(e.body,t,"Statement")};_t.SwitchStatement=function(e,t,i){i(e.discriminant,t,"Expression");for(var s=0,n=e.cases;s<n.length;s+=1){var r=n[s];if(r.test){i(r.test,t,"Expression")}for(var o=0,l=r.consequent;o<l.length;o+=1){var c=l[o];i(c,t,"Statement")}}};_t.SwitchCase=function(e,t,i){if(e.test){i(e.test,t,"Expression")}for(var s=0,n=e.consequent;s<n.length;s+=1){var r=n[s];i(r,t,"Statement")}};_t.ReturnStatement=_t.YieldExpression=_t.AwaitExpression=function(e,t,i){if(e.argument){i(e.argument,t,"Expression")}};_t.ThrowStatement=_t.SpreadElement=function(e,t,i){return i(e.argument,t,"Expression")};_t.TryStatement=function(e,t,i){i(e.block,t,"Statement");if(e.handler){i(e.handler,t)}if(e.finalizer){i(e.finalizer,t,"Statement")}};_t.CatchClause=function(e,t,i){if(e.param){i(e.param,t,"Pattern")}i(e.body,t,"Statement")};_t.WhileStatement=_t.DoWhileStatement=function(e,t,i){i(e.test,t,"Expression");i(e.body,t,"Statement")};_t.ForStatement=function(e,t,i){if(e.init){i(e.init,t,"ForInit")}if(e.test){i(e.test,t,"Expression")}if(e.update){i(e.update,t,"Expression")}i(e.body,t,"Statement")};_t.ForInStatement=_t.ForOfStatement=function(e,t,i){i(e.left,t,"ForInit");i(e.right,t,"Expression");i(e.body,t,"Statement")};_t.ForInit=function(e,t,i){if(e.type==="VariableDeclaration"){i(e,t)}else{i(e,t,"Expression")}};_t.DebuggerStatement=ignore;_t.FunctionDeclaration=function(e,t,i){return i(e,t,"Function")};_t.VariableDeclaration=function(e,t,i){for(var s=0,n=e.declarations;s<n.length;s+=1){var r=n[s];i(r,t)}};_t.VariableDeclarator=function(e,t,i){i(e.id,t,"Pattern");if(e.init){i(e.init,t,"Expression")}};_t.Function=function(e,t,i){if(e.id){i(e.id,t,"Pattern")}for(var s=0,n=e.params;s<n.length;s+=1){var r=n[s];i(r,t,"Pattern")}i(e.body,t,e.expression?"Expression":"Statement")};_t.Pattern=function(e,t,i){if(e.type==="Identifier"){i(e,t,"VariablePattern")}else if(e.type==="MemberExpression"){i(e,t,"MemberPattern")}else{i(e,t)}};_t.VariablePattern=ignore;_t.MemberPattern=skipThrough;_t.RestElement=function(e,t,i){return i(e.argument,t,"Pattern")};_t.ArrayPattern=function(e,t,i){for(var s=0,n=e.elements;s<n.length;s+=1){var r=n[s];if(r){i(r,t,"Pattern")}}};_t.ObjectPattern=function(e,t,i){for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];if(r.type==="Property"){if(r.computed){i(r.key,t,"Expression")}i(r.value,t,"Pattern")}else if(r.type==="RestElement"){i(r.argument,t,"Pattern")}}};_t.Expression=skipThrough;_t.ThisExpression=_t.Super=_t.MetaProperty=ignore;_t.ArrayExpression=function(e,t,i){for(var s=0,n=e.elements;s<n.length;s+=1){var r=n[s];if(r){i(r,t,"Expression")}}};_t.ObjectExpression=function(e,t,i){for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];i(r,t)}};_t.FunctionExpression=_t.ArrowFunctionExpression=_t.FunctionDeclaration;_t.SequenceExpression=function(e,t,i){for(var s=0,n=e.expressions;s<n.length;s+=1){var r=n[s];i(r,t,"Expression")}};_t.TemplateLiteral=function(e,t,i){for(var s=0,n=e.quasis;s<n.length;s+=1){var r=n[s];i(r,t)}for(var o=0,l=e.expressions;o<l.length;o+=1){var c=l[o];i(c,t,"Expression")}};_t.TemplateElement=ignore;_t.UnaryExpression=_t.UpdateExpression=function(e,t,i){i(e.argument,t,"Expression")};_t.BinaryExpression=_t.LogicalExpression=function(e,t,i){i(e.left,t,"Expression");i(e.right,t,"Expression")};_t.AssignmentExpression=_t.AssignmentPattern=function(e,t,i){i(e.left,t,"Pattern");i(e.right,t,"Expression")};_t.ConditionalExpression=function(e,t,i){i(e.test,t,"Expression");i(e.consequent,t,"Expression");i(e.alternate,t,"Expression")};_t.NewExpression=_t.CallExpression=function(e,t,i){i(e.callee,t,"Expression");if(e.arguments){for(var s=0,n=e.arguments;s<n.length;s+=1){var r=n[s];i(r,t,"Expression")}}};_t.MemberExpression=function(e,t,i){i(e.object,t,"Expression");if(e.computed){i(e.property,t,"Expression")}};_t.ExportNamedDeclaration=_t.ExportDefaultDeclaration=function(e,t,i){if(e.declaration){i(e.declaration,t,e.type==="ExportNamedDeclaration"||e.declaration.id?"Statement":"Expression")}if(e.source){i(e.source,t,"Expression")}};_t.ExportAllDeclaration=function(e,t,i){if(e.exported){i(e.exported,t)}i(e.source,t,"Expression")};_t.ImportDeclaration=function(e,t,i){for(var s=0,n=e.specifiers;s<n.length;s+=1){var r=n[s];i(r,t)}i(e.source,t,"Expression")};_t.ImportExpression=function(e,t,i){i(e.source,t,"Expression")};_t.ImportSpecifier=_t.ImportDefaultSpecifier=_t.ImportNamespaceSpecifier=_t.Identifier=_t.PrivateIdentifier=_t.Literal=ignore;_t.TaggedTemplateExpression=function(e,t,i){i(e.tag,t,"Expression");i(e.quasi,t,"Expression")};_t.ClassDeclaration=_t.ClassExpression=function(e,t,i){return i(e,t,"Class")};_t.Class=function(e,t,i){if(e.id){i(e.id,t,"Pattern")}if(e.superClass){i(e.superClass,t,"Expression")}i(e.body,t)};_t.ClassBody=function(e,t,i){for(var s=0,n=e.body;s<n.length;s+=1){var r=n[s];i(r,t)}};_t.MethodDefinition=_t.PropertyDefinition=_t.Property=function(e,t,i){if(e.computed){i(e.key,t,"Expression")}if(e.value){i(e.value,t,"Expression")}};const Pt="ArrowFunctionExpression";const Nt="BinaryExpression";const Rt="BlockStatement";const Tt="CallExpression";const $t="ChainExpression";const Ot="ConditionalExpression";const Dt="ExpressionStatement";const Mt="Identifier";const Lt="ImportDefaultSpecifier";const Ft="ImportNamespaceSpecifier";const Vt="LogicalExpression";const Bt="NewExpression";const zt="Program";const Ut="Property";const Ht="ReturnStatement";const jt="SequenceExpression";t.SOURCEMAPPING_URL="sourceMa";t.SOURCEMAPPING_URL+="ppingURL";const Gt="[ \\f\\r\\t\\v\\u00a0\\u1680\\u2000-\\u200a\\u2028\\u2029\\u202f\\u205f\\u3000\\ufeff]";const Wt=new RegExp(`^#${Gt}+${t.SOURCEMAPPING_URL}=.+`);const qt="_rollupAnnotations";const Kt="_rollupRemoved";function handlePureAnnotationsOfNode(e,t,i=e.type){const{annotations:s}=t;let n=s[t.annotationIndex];while(n&&e.start>=n.end){markPureNode(e,n,t.code);n=s[++t.annotationIndex]}if(n&&n.end<=e.end){_t[i](e,t,handlePureAnnotationsOfNode);while((n=s[t.annotationIndex])&&n.end<=e.end){++t.annotationIndex;annotateNode(e,n,false)}}}const Yt=/[^\s(]/g;const Xt=/\S/g;function markPureNode(e,t,i){const s=[];let n;const r=i.slice(t.end,e.start);if(doesNotMatchOutsideComment(r,Yt)){const t=e.start;while(true){s.push(e);switch(e.type){case Dt:case $t:e=e.expression;continue;case jt:if(doesNotMatchOutsideComment(i.slice(t,e.start),Xt)){e=e.expressions[0];continue}n=true;break;case Ot:if(doesNotMatchOutsideComment(i.slice(t,e.start),Xt)){e=e.test;continue}n=true;break;case Vt:case Nt:if(doesNotMatchOutsideComment(i.slice(t,e.start),Xt)){e=e.left;continue}n=true;break;case Tt:case Bt:break;default:n=true}break}}else{n=true}if(n){annotateNode(e,t,false)}else{for(const e of s){annotateNode(e,t,true)}}}function doesNotMatchOutsideComment(e,t){let i;while((i=t.exec(e))!==null){if(i[0]==="/"){const i=e.charCodeAt(t.lastIndex);if(i===42){t.lastIndex=e.indexOf("*/",t.lastIndex+1)+2;continue}else if(i===47){t.lastIndex=e.indexOf("\n",t.lastIndex+1)+1;continue}}t.lastIndex=0;return false}return true}const Qt=/[@#]__PURE__/;function addAnnotations(e,t,i){const s=[];const n=[];for(const t of e){if(Qt.test(t.value)){s.push(t)}else if(Wt.test(t.value)){n.push(t)}}for(const e of n){annotateNode(t,e,false)}handlePureAnnotationsOfNode(t,{annotationIndex:0,annotations:s,code:i})}function annotateNode(e,t,i){const s=i?qt:Kt;const n=e[s];if(n){n.push(t)}else{e[s]=[t]}}const Zt={Literal:[],Program:["body"]};function getAndCreateKeys(e){Zt[e.type]=Object.keys(e).filter((t=>typeof e[t]==="object"&&t.charCodeAt(0)!==95));return Zt[e.type]}const Jt="variables";class NodeBase extends ExpressionEntity{constructor(e,t,i){super();this.deoptimized=false;this.esTreeNode=e;this.keys=Zt[e.type]||getAndCreateKeys(e);this.parent=t;this.context=t.context;this.createScope(i);this.parseNode(e);this.initialise();this.context.magicString.addSourcemapLocation(this.start);this.context.magicString.addSourcemapLocation(this.end)}addExportedVariables(e,t){}bind(){for(const e of this.keys){const t=this[e];if(t===null)continue;if(Array.isArray(t)){for(const e of t){e===null||e===void 0?void 0:e.bind()}}else{t.bind()}}}createScope(e){this.scope=e}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();for(const t of this.keys){const i=this[t];if(i===null)continue;if(Array.isArray(i)){for(const t of i){if(t===null||t===void 0?void 0:t.hasEffects(e))return true}}else if(i.hasEffects(e))return true}return false}hasEffectsAsAssignmentTarget(e,t){return this.hasEffects(e)||this.hasEffectsOnInteractionAtPath($,this.assignmentInteraction,e)}include(e,t,i){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;for(const i of this.keys){const s=this[i];if(s===null)continue;if(Array.isArray(s)){for(const i of s){i===null||i===void 0?void 0:i.include(e,t)}}else{s.include(e,t)}}}includeAsAssignmentTarget(e,t,i){this.include(e,t)}initialise(){}insertSemicolon(e){if(e.original[this.end-1]!==";"){e.appendLeft(this.end,";")}}parseNode(e){for(const[t,i]of Object.entries(e)){if(this.hasOwnProperty(t))continue;if(t.charCodeAt(0)===95){if(t===qt){this.annotations=i}else if(t===Kt){for(const{start:e,end:t}of i)this.context.magicString.remove(e,t)}}else if(typeof i!=="object"||i===null){this[t]=i}else if(Array.isArray(i)){this[t]=[];for(const e of i){this[t].push(e===null?null:new(this.context.getNodeConstructor(e.type))(e,this,this.scope))}}else{this[t]=new(this.context.getNodeConstructor(i.type))(i,this,this.scope)}}}render(e,t){for(const i of this.keys){const s=this[i];if(s===null)continue;if(Array.isArray(s)){for(const i of s){i===null||i===void 0?void 0:i.render(e,t)}}else{s.render(e,t)}}}setAssignedValue(e){this.assignmentInteraction={args:[e],thisArg:null,type:H}}shouldBeIncluded(e){return this.included||!e.brokenFlow&&this.hasEffects(createHasEffectsContext())}applyDeoptimizations(){this.deoptimized=true;for(const e of this.keys){const t=this[e];if(t===null)continue;if(Array.isArray(t)){for(const e of t){e===null||e===void 0?void 0:e.deoptimizePath(O)}}else{t.deoptimizePath(O)}}this.context.requestTreeshakingPass()}}class SpreadElement extends NodeBase{deoptimizeThisOnInteractionAtPath(e,t,i){if(t.length>0){this.argument.deoptimizeThisOnInteractionAtPath(e,[N,...t],i)}}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const{propertyReadSideEffects:t}=this.context.options.treeshake;return this.argument.hasEffects(e)||t&&(t==="always"||this.argument.hasEffectsOnInteractionAtPath(O,G,e))}applyDeoptimizations(){this.deoptimized=true;this.argument.deoptimizePath([N,N]);this.context.requestTreeshakingPass()}}class Method extends ExpressionEntity{constructor(e){super();this.description=e}deoptimizeThisOnInteractionAtPath({type:e,thisArg:t},i){if(e===j&&i.length===0&&this.description.mutatesSelfAsArray){t.deoptimizePath(M)}}getReturnExpressionWhenCalledAtPath(e,{thisArg:t}){if(e.length>0){return z}return this.description.returnsPrimitive||(this.description.returns==="self"?t||z:this.description.returns())}hasEffectsOnInteractionAtPath(e,t,i){var s,n;const{type:r}=t;if(e.length>(r===U?1:0)){return true}if(r===j){if(this.description.mutatesSelfAsArray===true&&((s=t.thisArg)===null||s===void 0?void 0:s.hasEffectsOnInteractionAtPath(M,q,i))){return true}if(this.description.callsArgs){for(const e of this.description.callsArgs){if((n=t.args[e])===null||n===void 0?void 0:n.hasEffectsOnInteractionAtPath($,Y,i)){return true}}}}return false}}const ei=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:yt})];const ti=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:bt})];const ii=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:xt})];const si=[new Method({callsArgs:null,mutatesSelfAsArray:false,returns:null,returnsPrimitive:z})];const ni=/^\d+$/;class ObjectEntity extends ExpressionEntity{constructor(e,t,i=false){super();this.prototypeExpression=t;this.immutable=i;this.allProperties=[];this.deoptimizedPaths=Object.create(null);this.expressionsToBeDeoptimizedByKey=Object.create(null);this.gettersByKey=Object.create(null);this.hasLostTrack=false;this.hasUnknownDeoptimizedInteger=false;this.hasUnknownDeoptimizedProperty=false;this.propertiesAndGettersByKey=Object.create(null);this.propertiesAndSettersByKey=Object.create(null);this.settersByKey=Object.create(null);this.thisParametersToBeDeoptimized=new Set;this.unknownIntegerProps=[];this.unmatchableGetters=[];this.unmatchablePropertiesAndGetters=[];this.unmatchableSetters=[];if(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){var t;const i=this.hasLostTrack||this.hasUnknownDeoptimizedProperty;if(e){this.hasUnknownDeoptimizedProperty=true}else{this.hasLostTrack=true}if(i){return}for(const e of Object.values(this.propertiesAndGettersByKey).concat(Object.values(this.settersByKey))){for(const t of e){t.deoptimizePath(O)}}(t=this.prototypeExpression)===null||t===void 0?void 0:t.deoptimizePath([N,N]);this.deoptimizeCachedEntities()}deoptimizeIntegerProperties(){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||this.hasUnknownDeoptimizedInteger){return}this.hasUnknownDeoptimizedInteger=true;for(const[e,t]of Object.entries(this.propertiesAndGettersByKey)){if(ni.test(e)){for(const e of t){e.deoptimizePath(O)}}}this.deoptimizeCachedIntegerEntities()}deoptimizePath(e){var t;if(this.hasLostTrack||this.immutable){return}const i=e[0];if(e.length===1){if(typeof i!=="string"){if(i===T){return this.deoptimizeIntegerProperties()}return this.deoptimizeAllProperties(i===R)}if(!this.deoptimizedPaths[i]){this.deoptimizedPaths[i]=true;const e=this.expressionsToBeDeoptimizedByKey[i];if(e){for(const t of e){t.deoptimizeCache()}}}}const s=e.length===1?O:e.slice(1);for(const e of typeof i==="string"?(this.propertiesAndGettersByKey[i]||this.unmatchablePropertiesAndGetters).concat(this.settersByKey[i]||this.unmatchableSetters):this.allProperties){e.deoptimizePath(s)}(t=this.prototypeExpression)===null||t===void 0?void 0:t.deoptimizePath(e.length===1?[...e,N]:e)}deoptimizeThisOnInteractionAtPath(e,t,i){var s;const[n,...r]=t;if(this.hasLostTrack||(e.type===j||t.length>1)&&(this.hasUnknownDeoptimizedProperty||typeof n==="string"&&this.deoptimizedPaths[n])){e.thisArg.deoptimizePath(O);return}const[o,l,c]=e.type===j||t.length>1?[this.propertiesAndGettersByKey,this.propertiesAndGettersByKey,this.unmatchablePropertiesAndGetters]:e.type===U?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof n==="string"){if(o[n]){const t=l[n];if(t){for(const s of t){s.deoptimizeThisOnInteractionAtPath(e,r,i)}}if(!this.immutable){this.thisParametersToBeDeoptimized.add(e.thisArg)}return}for(const t of c){t.deoptimizeThisOnInteractionAtPath(e,r,i)}if(ni.test(n)){for(const t of this.unknownIntegerProps){t.deoptimizeThisOnInteractionAtPath(e,r,i)}}}else{for(const t of Object.values(l).concat([c])){for(const s of t){s.deoptimizeThisOnInteractionAtPath(e,r,i)}}for(const t of this.unknownIntegerProps){t.deoptimizeThisOnInteractionAtPath(e,r,i)}}if(!this.immutable){this.thisParametersToBeDeoptimized.add(e.thisArg)}(s=this.prototypeExpression)===null||s===void 0?void 0:s.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){if(e.length===0){return B}const s=e[0];const n=this.getMemberExpressionAndTrackDeopt(s,i);if(n){return n.getLiteralValueAtPath(e.slice(1),t,i)}if(this.prototypeExpression){return this.prototypeExpression.getLiteralValueAtPath(e,t,i)}if(e.length===1){return undefined}return V}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(e.length===0){return z}const[n,...r]=e;const o=this.getMemberExpressionAndTrackDeopt(n,s);if(o){return o.getReturnExpressionWhenCalledAtPath(r,t,i,s)}if(this.prototypeExpression){return this.prototypeExpression.getReturnExpressionWhenCalledAtPath(e,t,i,s)}return z}hasEffectsOnInteractionAtPath(e,t,i){const[s,...n]=e;if(n.length||t.type===j){const r=this.getMemberExpression(s);if(r){return r.hasEffectsOnInteractionAtPath(n,t,i)}if(this.prototypeExpression){return this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,i)}return true}if(s===R)return false;if(this.hasLostTrack)return true;const[r,o,l]=t.type===U?[this.propertiesAndGettersByKey,this.gettersByKey,this.unmatchableGetters]:[this.propertiesAndSettersByKey,this.settersByKey,this.unmatchableSetters];if(typeof s==="string"){if(r[s]){const e=o[s];if(e){for(const s of e){if(s.hasEffectsOnInteractionAtPath(n,t,i))return true}}return false}for(const e of l){if(e.hasEffectsOnInteractionAtPath(n,t,i)){return true}}}else{for(const e of Object.values(o).concat([l])){for(const s of e){if(s.hasEffectsOnInteractionAtPath(n,t,i))return true}}}if(this.prototypeExpression){return this.prototypeExpression.hasEffectsOnInteractionAtPath(e,t,i)}return false}buildPropertyMaps(e){const{allProperties:t,propertiesAndGettersByKey:i,propertiesAndSettersByKey:s,settersByKey:n,gettersByKey:r,unknownIntegerProps:o,unmatchablePropertiesAndGetters:l,unmatchableGetters:c,unmatchableSetters:u}=this;const h=[];for(let d=e.length-1;d>=0;d--){const{key:p,kind:f,property:m}=e[d];t.push(m);if(typeof p!=="string"){if(p===T){o.push(m);continue}if(f==="set")u.push(m);if(f==="get")c.push(m);if(f!=="get")h.push(m);if(f!=="set")l.push(m)}else{if(f==="set"){if(!s[p]){s[p]=[m,...h];n[p]=[m,...u]}}else if(f==="get"){if(!i[p]){i[p]=[m,...l];r[p]=[m,...c]}}else{if(!s[p]){s[p]=[m,...h]}if(!i[p]){i[p]=[m,...l]}}}}}deoptimizeCachedEntities(){for(const e of Object.values(this.expressionsToBeDeoptimizedByKey)){for(const t of e){t.deoptimizeCache()}}for(const e of this.thisParametersToBeDeoptimized){e.deoptimizePath(O)}}deoptimizeCachedIntegerEntities(){for(const[e,t]of Object.entries(this.expressionsToBeDeoptimizedByKey)){if(ni.test(e)){for(const e of t){e.deoptimizeCache()}}}for(const e of this.thisParametersToBeDeoptimized){e.deoptimizePath(M)}}getMemberExpression(e){if(this.hasLostTrack||this.hasUnknownDeoptimizedProperty||typeof e!=="string"||this.hasUnknownDeoptimizedInteger&&ni.test(e)||this.deoptimizedPaths[e]){return z}const t=this.propertiesAndGettersByKey[e];if((t===null||t===void 0?void 0:t.length)===1){return t[0]}if(t||this.unmatchablePropertiesAndGetters.length>0||this.unknownIntegerProps.length&&ni.test(e)){return z}return null}getMemberExpressionAndTrackDeopt(e,t){if(typeof e!=="string"){return z}const i=this.getMemberExpression(e);if(!(i===z||this.immutable)){const i=this.expressionsToBeDeoptimizedByKey[e]=this.expressionsToBeDeoptimizedByKey[e]||[];i.push(t)}return i}}const isInteger=e=>typeof e==="string"&&/^\d+$/.test(e);const ri=new class ObjectPrototypeFallbackExpression extends ExpressionEntity{deoptimizeThisOnInteractionAtPath({type:e,thisArg:t},i){if(e===j&&i.length===1&&!isInteger(i[0])){t.deoptimizePath(O)}}getLiteralValueAtPath(e){return e.length===1&&isInteger(e[0])?undefined:V}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t===j}};const ai=new ObjectEntity({__proto__:null,hasOwnProperty:ei,isPrototypeOf:ei,propertyIsEnumerable:ei,toLocaleString:ti,toString:ti,valueOf:si},ri,true);const oi=[{key:T,kind:"init",property:z},{key:"length",kind:"init",property:xt}];const li=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:yt})];const ci=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:xt})];const ui=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:()=>new ObjectEntity(oi,xi),returnsPrimitive:null})];const hi=[new Method({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:()=>new ObjectEntity(oi,xi),returnsPrimitive:null})];const di=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:()=>new ObjectEntity(oi,xi),returnsPrimitive:null})];const pi=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:null,returnsPrimitive:xt})];const fi=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:null,returnsPrimitive:z})];const mi=[new Method({callsArgs:null,mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:z})];const gi=[new Method({callsArgs:[0],mutatesSelfAsArray:"deopt-only",returns:null,returnsPrimitive:z})];const yi=[new Method({callsArgs:null,mutatesSelfAsArray:true,returns:"self",returnsPrimitive:null})];const Ei=[new Method({callsArgs:[0],mutatesSelfAsArray:true,returns:"self",returnsPrimitive:null})];const xi=new ObjectEntity({__proto__:null,at:mi,concat:hi,copyWithin:yi,entries:hi,every:li,fill:yi,filter:di,find:gi,findIndex:ci,findLast:gi,findLastIndex:ci,flat:hi,flatMap:di,forEach:gi,group:gi,groupToMap:gi,includes:ei,indexOf:ii,join:ti,keys:si,lastIndexOf:ii,map:di,pop:fi,push:pi,reduce:gi,reduceRight:gi,reverse:yi,shift:fi,slice:hi,some:li,sort:Ei,splice:ui,toLocaleString:ti,toString:ti,unshift:pi,values:mi},ai,true);class ArrayExpression extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){this.deoptimized=true;let e=false;for(let t=0;t<this.elements.length;t++){const i=this.elements[t];if(i){if(e||i instanceof SpreadElement){e=true;i.deoptimizePath(O)}}}this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}const e=[{key:"length",kind:"init",property:xt}];let t=false;for(let i=0;i<this.elements.length;i++){const s=this.elements[i];if(t||s instanceof SpreadElement){if(s){t=true;e.unshift({key:T,kind:"init",property:s})}}else if(!s){e.push({key:String(i),kind:"init",property:mt})}else{e.push({key:String(i),kind:"init",property:s})}}return this.objectEntity=new ObjectEntity(e,xi)}}class ArrayPattern extends NodeBase{addExportedVariables(e,t){for(const i of this.elements){i===null||i===void 0?void 0:i.addExportedVariables(e,t)}}declare(e){const t=[];for(const i of this.elements){if(i!==null){t.push(...i.declare(e,z))}}return t}deoptimizePath(){for(const e of this.elements){e===null||e===void 0?void 0:e.deoptimizePath($)}}hasEffectsOnInteractionAtPath(e,t,i){for(const e of this.elements){if(e===null||e===void 0?void 0:e.hasEffectsOnInteractionAtPath($,t,i))return true}return false}markDeclarationReached(){for(const e of this.elements){e===null||e===void 0?void 0:e.markDeclarationReached()}}}class LocalVariable extends Variable{constructor(e,t,i,s){super(e);this.calledFromTryStatement=false;this.additionalInitializers=null;this.expressionsToBeDeoptimized=[];this.declarations=t?[t]:[];this.init=i;this.deoptimizationTracker=s.deoptimizationTracker;this.module=s.module}addDeclaration(e,t){this.declarations.push(e);const i=this.markInitializersForDeoptimization();if(t!==null){i.push(t)}}consolidateInitializers(){if(this.additionalInitializers!==null){for(const e of this.additionalInitializers){e.deoptimizePath(O)}this.additionalInitializers=null}}deoptimizePath(e){var t,i;if(this.isReassigned||this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}if(e.length===0){if(!this.isReassigned){this.isReassigned=true;const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=[];for(const t of e){t.deoptimizeCache()}(t=this.init)===null||t===void 0?void 0:t.deoptimizePath(O)}}else{(i=this.init)===null||i===void 0?void 0:i.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){if(this.isReassigned||!this.init){return e.thisArg.deoptimizePath(O)}i.withTrackedEntityAtPath(t,this.init,(()=>this.init.deoptimizeThisOnInteractionAtPath(e,t,i)),undefined)}getLiteralValueAtPath(e,t,i){if(this.isReassigned||!this.init){return V}return t.withTrackedEntityAtPath(e,this.init,(()=>{this.expressionsToBeDeoptimized.push(i);return this.init.getLiteralValueAtPath(e,t,i)}),V)}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(this.isReassigned||!this.init){return z}return i.withTrackedEntityAtPath(e,this.init,(()=>{this.expressionsToBeDeoptimized.push(s);return this.init.getReturnExpressionWhenCalledAtPath(e,t,i,s)}),z)}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:if(this.isReassigned)return true;return this.init&&!i.accessed.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i);case H:if(this.included)return true;if(e.length===0)return false;if(this.isReassigned)return true;return this.init&&!i.assigned.trackEntityAtPathAndGetIfTracked(e,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i);case j:if(this.isReassigned)return true;return this.init&&!(t.withNew?i.instantiated:i.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)&&this.init.hasEffectsOnInteractionAtPath(e,t,i)}}include(){if(!this.included){this.included=true;for(const e of this.declarations){if(!e.included)e.include(createInclusionContext(),false);let t=e.parent;while(!t.included){t.included=true;if(t.type===zt)break;t=t.parent}}}}includeCallArguments(e,t){if(this.isReassigned||this.init&&e.includedCallArguments.has(this.init)){for(const i of t){i.include(e,false)}}else if(this.init){e.includedCallArguments.add(this.init);this.init.includeCallArguments(e,t);e.includedCallArguments.delete(this.init)}}markCalledFromTryStatement(){this.calledFromTryStatement=true}markInitializersForDeoptimization(){if(this.additionalInitializers===null){this.additionalInitializers=this.init===null?[]:[this.init];this.init=z;this.isReassigned=true}return this.additionalInitializers}}const vi="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ_$";const bi=64;function toBase64(e){let t="";do{const i=e%bi;e=Math.floor(e/bi);t=vi[i]+t}while(e!==0);return t}function getSafeName(e,t){let i=e;let s=1;while(t.has(i)||ee.has(i)){i=`${e}$${toBase64(s++)}`}t.add(i);return i}class Scope$1{constructor(){this.children=[];this.variables=new Map}addDeclaration(e,t,i,s){const n=e.name;let r=this.variables.get(n);if(r){r.addDeclaration(e,i)}else{r=new LocalVariable(e.name,e,i||mt,t);this.variables.set(n,r)}return r}contains(e){return this.variables.has(e)}findVariable(e){throw new Error("Internal Error: findVariable needs to be implemented by a subclass")}}class ChildScope extends Scope$1{constructor(e){super();this.accessedOutsideVariables=new Map;this.parent=e;e.children.push(this)}addAccessedDynamicImport(e){(this.accessedDynamicImports||(this.accessedDynamicImports=new Set)).add(e);if(this.parent instanceof ChildScope){this.parent.addAccessedDynamicImport(e)}}addAccessedGlobals(e,t){const i=t.get(this)||new Set;for(const t of e){i.add(t)}t.set(this,i);if(this.parent instanceof ChildScope){this.parent.addAccessedGlobals(e,t)}}addNamespaceMemberAccess(e,t){this.accessedOutsideVariables.set(e,t);this.parent.addNamespaceMemberAccess(e,t)}addReturnExpression(e){this.parent instanceof ChildScope&&this.parent.addReturnExpression(e)}addUsedOutsideNames(e,t,i,s){for(const s of this.accessedOutsideVariables.values()){if(s.included){e.add(s.getBaseVariableName());if(t==="system"&&i.has(s)){e.add("exports")}}}const n=s.get(this);if(n){for(const t of n){e.add(t)}}}contains(e){return this.variables.has(e)||this.parent.contains(e)}deconflict(e,t,i){const s=new Set;this.addUsedOutsideNames(s,e,t,i);if(this.accessedDynamicImports){for(const e of this.accessedDynamicImports){if(e.inlineNamespace){s.add(e.inlineNamespace.getBaseVariableName())}}}for(const[e,t]of this.variables){if(t.included||t.alwaysRendered){t.setRenderNames(null,getSafeName(e,s))}}for(const s of this.children){s.deconflict(e,t,i)}}findLexicalBoundary(){return this.parent.findLexicalBoundary()}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t){return t}const i=this.parent.findVariable(e);this.accessedOutsideVariables.set(e,i);return i}}class ParameterScope extends ChildScope{constructor(e,t){super(e);this.parameters=[];this.hasRest=false;this.context=t;this.hoistedBodyVarScope=new ChildScope(this)}addParameterDeclaration(e){const t=e.name;let i=this.hoistedBodyVarScope.variables.get(t);if(i){i.addDeclaration(e,null)}else{i=new LocalVariable(t,e,z,this.context)}this.variables.set(t,i);return i}addParameterVariables(e,t){this.parameters=e;for(const t of e){for(const e of t){e.alwaysRendered=true}}this.hasRest=t}includeCallArguments(e,t){let i=false;let s=false;const n=this.hasRest&&this.parameters[this.parameters.length-1];for(const i of t){if(i instanceof SpreadElement){for(const i of t){i.include(e,false)}break}}for(let r=t.length-1;r>=0;r--){const o=this.parameters[r]||n;const l=t[r];if(o){i=false;if(o.length===0){s=true}else{for(const e of o){if(e.included){s=true}if(e.calledFromTryStatement){i=true}}}}if(!s&&l.shouldBeIncluded(e)){s=true}if(s){l.include(e,i)}}}}class ReturnValueScope extends ParameterScope{constructor(){super(...arguments);this.returnExpression=null;this.returnExpressions=[]}addReturnExpression(e){this.returnExpressions.push(e)}getReturnExpression(){if(this.returnExpression===null)this.updateReturnExpression();return this.returnExpression}updateReturnExpression(){if(this.returnExpressions.length===1){this.returnExpression=this.returnExpressions[0]}else{this.returnExpression=z;for(const e of this.returnExpressions){e.deoptimizePath(O)}}}}function is_reference(e,t){if(e.type==="MemberExpression"){return!e.computed&&is_reference(e.object,e)}if(e.type==="Identifier"){if(!t)return true;switch(t.type){case"MemberExpression":return t.computed||e===t.object;case"MethodDefinition":return t.computed;case"PropertyDefinition":return t.computed||e===t.value;case"Property":return t.computed||e===t.value;case"ExportSpecifier":case"ImportSpecifier":return e===t.local;case"LabeledStatement":case"BreakStatement":case"ContinueStatement":return false;default:return true}}return false}const Si=Symbol("Value Properties");const Ai={hasEffectsWhenCalled(){return false}};const wi={hasEffectsWhenCalled(){return true}};const Ii={__proto__:null,[Si]:wi};const Ci={__proto__:null,[Si]:Ai};const ki={__proto__:null,[Si]:{hasEffectsWhenCalled({args:e},t){return!e.length||e[0].hasEffectsOnInteractionAtPath(D,q,t)}}};const _i={__proto__:null,[Si]:wi,prototype:Ii};const Pi={__proto__:null,[Si]:Ai,prototype:Ii};const Ni={__proto__:null,[Si]:Ai,from:Ci,of:Ci,prototype:Ii};const Ri={__proto__:null,[Si]:Ai,supportedLocalesOf:Pi};const Ti={global:Ii,globalThis:Ii,self:Ii,window:Ii,__proto__:null,[Si]:wi,Array:{__proto__:null,[Si]:wi,from:Ii,isArray:Ci,of:Ci,prototype:Ii},ArrayBuffer:{__proto__:null,[Si]:Ai,isView:Ci,prototype:Ii},Atomics:Ii,BigInt:_i,BigInt64Array:_i,BigUint64Array:_i,Boolean:Pi,constructor:_i,DataView:Pi,Date:{__proto__:null,[Si]:Ai,now:Ci,parse:Ci,prototype:Ii,UTC:Ci},decodeURI:Ci,decodeURIComponent:Ci,encodeURI:Ci,encodeURIComponent:Ci,Error:Pi,escape:Ci,eval:Ii,EvalError:Pi,Float32Array:Ni,Float64Array:Ni,Function:_i,hasOwnProperty:Ii,Infinity:Ii,Int16Array:Ni,Int32Array:Ni,Int8Array:Ni,isFinite:Ci,isNaN:Ci,isPrototypeOf:Ii,JSON:Ii,Map:Pi,Math:{__proto__:null,[Si]:wi,abs:Ci,acos:Ci,acosh:Ci,asin:Ci,asinh:Ci,atan:Ci,atan2:Ci,atanh:Ci,cbrt:Ci,ceil:Ci,clz32:Ci,cos:Ci,cosh:Ci,exp:Ci,expm1:Ci,floor:Ci,fround:Ci,hypot:Ci,imul:Ci,log:Ci,log10:Ci,log1p:Ci,log2:Ci,max:Ci,min:Ci,pow:Ci,random:Ci,round:Ci,sign:Ci,sin:Ci,sinh:Ci,sqrt:Ci,tan:Ci,tanh:Ci,trunc:Ci},NaN:Ii,Number:{__proto__:null,[Si]:Ai,isFinite:Ci,isInteger:Ci,isNaN:Ci,isSafeInteger:Ci,parseFloat:Ci,parseInt:Ci,prototype:Ii},Object:{__proto__:null,[Si]:Ai,create:Ci,defineProperty:ki,defineProperties:ki,getOwnPropertyDescriptor:Ci,getOwnPropertyNames:Ci,getOwnPropertySymbols:Ci,getPrototypeOf:Ci,hasOwn:Ci,is:Ci,isExtensible:Ci,isFrozen:Ci,isSealed:Ci,keys:Ci,fromEntries:Ci,entries:Ci,prototype:Ii},parseFloat:Ci,parseInt:Ci,Promise:{__proto__:null,[Si]:wi,all:Ii,prototype:Ii,race:Ii,reject:Ii,resolve:Ii},propertyIsEnumerable:Ii,Proxy:Ii,RangeError:Pi,ReferenceError:Pi,Reflect:Ii,RegExp:Pi,Set:Pi,SharedArrayBuffer:_i,String:{__proto__:null,[Si]:Ai,fromCharCode:Ci,fromCodePoint:Ci,prototype:Ii,raw:Ci},Symbol:{__proto__:null,[Si]:Ai,for:Ci,keyFor:Ci,prototype:Ii},SyntaxError:Pi,toLocaleString:Ii,toString:Ii,TypeError:Pi,Uint16Array:Ni,Uint32Array:Ni,Uint8Array:Ni,Uint8ClampedArray:Ni,unescape:Ci,URIError:Pi,valueOf:Ii,WeakMap:Pi,WeakSet:Pi,clearInterval:_i,clearTimeout:_i,console:Ii,Intl:{__proto__:null,[Si]:wi,Collator:Ri,DateTimeFormat:Ri,ListFormat:Ri,NumberFormat:Ri,PluralRules:Ri,RelativeTimeFormat:Ri},setInterval:_i,setTimeout:_i,TextDecoder:_i,TextEncoder:_i,URL:_i,URLSearchParams:_i,AbortController:_i,AbortSignal:_i,addEventListener:Ii,alert:Ii,AnalyserNode:_i,Animation:_i,AnimationEvent:_i,applicationCache:Ii,ApplicationCache:_i,ApplicationCacheErrorEvent:_i,atob:Ii,Attr:_i,Audio:_i,AudioBuffer:_i,AudioBufferSourceNode:_i,AudioContext:_i,AudioDestinationNode:_i,AudioListener:_i,AudioNode:_i,AudioParam:_i,AudioProcessingEvent:_i,AudioScheduledSourceNode:_i,AudioWorkletNode:_i,BarProp:_i,BaseAudioContext:_i,BatteryManager:_i,BeforeUnloadEvent:_i,BiquadFilterNode:_i,Blob:_i,BlobEvent:_i,blur:Ii,BroadcastChannel:_i,btoa:Ii,ByteLengthQueuingStrategy:_i,Cache:_i,caches:Ii,CacheStorage:_i,cancelAnimationFrame:Ii,cancelIdleCallback:Ii,CanvasCaptureMediaStreamTrack:_i,CanvasGradient:_i,CanvasPattern:_i,CanvasRenderingContext2D:_i,ChannelMergerNode:_i,ChannelSplitterNode:_i,CharacterData:_i,clientInformation:Ii,ClipboardEvent:_i,close:Ii,closed:Ii,CloseEvent:_i,Comment:_i,CompositionEvent:_i,confirm:Ii,ConstantSourceNode:_i,ConvolverNode:_i,CountQueuingStrategy:_i,createImageBitmap:Ii,Credential:_i,CredentialsContainer:_i,crypto:Ii,Crypto:_i,CryptoKey:_i,CSS:_i,CSSConditionRule:_i,CSSFontFaceRule:_i,CSSGroupingRule:_i,CSSImportRule:_i,CSSKeyframeRule:_i,CSSKeyframesRule:_i,CSSMediaRule:_i,CSSNamespaceRule:_i,CSSPageRule:_i,CSSRule:_i,CSSRuleList:_i,CSSStyleDeclaration:_i,CSSStyleRule:_i,CSSStyleSheet:_i,CSSSupportsRule:_i,CustomElementRegistry:_i,customElements:Ii,CustomEvent:_i,DataTransfer:_i,DataTransferItem:_i,DataTransferItemList:_i,defaultstatus:Ii,defaultStatus:Ii,DelayNode:_i,DeviceMotionEvent:_i,DeviceOrientationEvent:_i,devicePixelRatio:Ii,dispatchEvent:Ii,document:Ii,Document:_i,DocumentFragment:_i,DocumentType:_i,DOMError:_i,DOMException:_i,DOMImplementation:_i,DOMMatrix:_i,DOMMatrixReadOnly:_i,DOMParser:_i,DOMPoint:_i,DOMPointReadOnly:_i,DOMQuad:_i,DOMRect:_i,DOMRectReadOnly:_i,DOMStringList:_i,DOMStringMap:_i,DOMTokenList:_i,DragEvent:_i,DynamicsCompressorNode:_i,Element:_i,ErrorEvent:_i,Event:_i,EventSource:_i,EventTarget:_i,external:Ii,fetch:Ii,File:_i,FileList:_i,FileReader:_i,find:Ii,focus:Ii,FocusEvent:_i,FontFace:_i,FontFaceSetLoadEvent:_i,FormData:_i,frames:Ii,GainNode:_i,Gamepad:_i,GamepadButton:_i,GamepadEvent:_i,getComputedStyle:Ii,getSelection:Ii,HashChangeEvent:_i,Headers:_i,history:Ii,History:_i,HTMLAllCollection:_i,HTMLAnchorElement:_i,HTMLAreaElement:_i,HTMLAudioElement:_i,HTMLBaseElement:_i,HTMLBodyElement:_i,HTMLBRElement:_i,HTMLButtonElement:_i,HTMLCanvasElement:_i,HTMLCollection:_i,HTMLContentElement:_i,HTMLDataElement:_i,HTMLDataListElement:_i,HTMLDetailsElement:_i,HTMLDialogElement:_i,HTMLDirectoryElement:_i,HTMLDivElement:_i,HTMLDListElement:_i,HTMLDocument:_i,HTMLElement:_i,HTMLEmbedElement:_i,HTMLFieldSetElement:_i,HTMLFontElement:_i,HTMLFormControlsCollection:_i,HTMLFormElement:_i,HTMLFrameElement:_i,HTMLFrameSetElement:_i,HTMLHeadElement:_i,HTMLHeadingElement:_i,HTMLHRElement:_i,HTMLHtmlElement:_i,HTMLIFrameElement:_i,HTMLImageElement:_i,HTMLInputElement:_i,HTMLLabelElement:_i,HTMLLegendElement:_i,HTMLLIElement:_i,HTMLLinkElement:_i,HTMLMapElement:_i,HTMLMarqueeElement:_i,HTMLMediaElement:_i,HTMLMenuElement:_i,HTMLMetaElement:_i,HTMLMeterElement:_i,HTMLModElement:_i,HTMLObjectElement:_i,HTMLOListElement:_i,HTMLOptGroupElement:_i,HTMLOptionElement:_i,HTMLOptionsCollection:_i,HTMLOutputElement:_i,HTMLParagraphElement:_i,HTMLParamElement:_i,HTMLPictureElement:_i,HTMLPreElement:_i,HTMLProgressElement:_i,HTMLQuoteElement:_i,HTMLScriptElement:_i,HTMLSelectElement:_i,HTMLShadowElement:_i,HTMLSlotElement:_i,HTMLSourceElement:_i,HTMLSpanElement:_i,HTMLStyleElement:_i,HTMLTableCaptionElement:_i,HTMLTableCellElement:_i,HTMLTableColElement:_i,HTMLTableElement:_i,HTMLTableRowElement:_i,HTMLTableSectionElement:_i,HTMLTemplateElement:_i,HTMLTextAreaElement:_i,HTMLTimeElement:_i,HTMLTitleElement:_i,HTMLTrackElement:_i,HTMLUListElement:_i,HTMLUnknownElement:_i,HTMLVideoElement:_i,IDBCursor:_i,IDBCursorWithValue:_i,IDBDatabase:_i,IDBFactory:_i,IDBIndex:_i,IDBKeyRange:_i,IDBObjectStore:_i,IDBOpenDBRequest:_i,IDBRequest:_i,IDBTransaction:_i,IDBVersionChangeEvent:_i,IdleDeadline:_i,IIRFilterNode:_i,Image:_i,ImageBitmap:_i,ImageBitmapRenderingContext:_i,ImageCapture:_i,ImageData:_i,indexedDB:Ii,innerHeight:Ii,innerWidth:Ii,InputEvent:_i,IntersectionObserver:_i,IntersectionObserverEntry:_i,isSecureContext:Ii,KeyboardEvent:_i,KeyframeEffect:_i,length:Ii,localStorage:Ii,location:Ii,Location:_i,locationbar:Ii,matchMedia:Ii,MediaDeviceInfo:_i,MediaDevices:_i,MediaElementAudioSourceNode:_i,MediaEncryptedEvent:_i,MediaError:_i,MediaKeyMessageEvent:_i,MediaKeySession:_i,MediaKeyStatusMap:_i,MediaKeySystemAccess:_i,MediaList:_i,MediaQueryList:_i,MediaQueryListEvent:_i,MediaRecorder:_i,MediaSettingsRange:_i,MediaSource:_i,MediaStream:_i,MediaStreamAudioDestinationNode:_i,MediaStreamAudioSourceNode:_i,MediaStreamEvent:_i,MediaStreamTrack:_i,MediaStreamTrackEvent:_i,menubar:Ii,MessageChannel:_i,MessageEvent:_i,MessagePort:_i,MIDIAccess:_i,MIDIConnectionEvent:_i,MIDIInput:_i,MIDIInputMap:_i,MIDIMessageEvent:_i,MIDIOutput:_i,MIDIOutputMap:_i,MIDIPort:_i,MimeType:_i,MimeTypeArray:_i,MouseEvent:_i,moveBy:Ii,moveTo:Ii,MutationEvent:_i,MutationObserver:_i,MutationRecord:_i,name:Ii,NamedNodeMap:_i,NavigationPreloadManager:_i,navigator:Ii,Navigator:_i,NetworkInformation:_i,Node:_i,NodeFilter:Ii,NodeIterator:_i,NodeList:_i,Notification:_i,OfflineAudioCompletionEvent:_i,OfflineAudioContext:_i,offscreenBuffering:Ii,OffscreenCanvas:_i,open:Ii,openDatabase:Ii,Option:_i,origin:Ii,OscillatorNode:_i,outerHeight:Ii,outerWidth:Ii,PageTransitionEvent:_i,pageXOffset:Ii,pageYOffset:Ii,PannerNode:_i,parent:Ii,Path2D:_i,PaymentAddress:_i,PaymentRequest:_i,PaymentRequestUpdateEvent:_i,PaymentResponse:_i,performance:Ii,Performance:_i,PerformanceEntry:_i,PerformanceLongTaskTiming:_i,PerformanceMark:_i,PerformanceMeasure:_i,PerformanceNavigation:_i,PerformanceNavigationTiming:_i,PerformanceObserver:_i,PerformanceObserverEntryList:_i,PerformancePaintTiming:_i,PerformanceResourceTiming:_i,PerformanceTiming:_i,PeriodicWave:_i,Permissions:_i,PermissionStatus:_i,personalbar:Ii,PhotoCapabilities:_i,Plugin:_i,PluginArray:_i,PointerEvent:_i,PopStateEvent:_i,postMessage:Ii,Presentation:_i,PresentationAvailability:_i,PresentationConnection:_i,PresentationConnectionAvailableEvent:_i,PresentationConnectionCloseEvent:_i,PresentationConnectionList:_i,PresentationReceiver:_i,PresentationRequest:_i,print:Ii,ProcessingInstruction:_i,ProgressEvent:_i,PromiseRejectionEvent:_i,prompt:Ii,PushManager:_i,PushSubscription:_i,PushSubscriptionOptions:_i,queueMicrotask:Ii,RadioNodeList:_i,Range:_i,ReadableStream:_i,RemotePlayback:_i,removeEventListener:Ii,Request:_i,requestAnimationFrame:Ii,requestIdleCallback:Ii,resizeBy:Ii,ResizeObserver:_i,ResizeObserverEntry:_i,resizeTo:Ii,Response:_i,RTCCertificate:_i,RTCDataChannel:_i,RTCDataChannelEvent:_i,RTCDtlsTransport:_i,RTCIceCandidate:_i,RTCIceTransport:_i,RTCPeerConnection:_i,RTCPeerConnectionIceEvent:_i,RTCRtpReceiver:_i,RTCRtpSender:_i,RTCSctpTransport:_i,RTCSessionDescription:_i,RTCStatsReport:_i,RTCTrackEvent:_i,screen:Ii,Screen:_i,screenLeft:Ii,ScreenOrientation:_i,screenTop:Ii,screenX:Ii,screenY:Ii,ScriptProcessorNode:_i,scroll:Ii,scrollbars:Ii,scrollBy:Ii,scrollTo:Ii,scrollX:Ii,scrollY:Ii,SecurityPolicyViolationEvent:_i,Selection:_i,ServiceWorker:_i,ServiceWorkerContainer:_i,ServiceWorkerRegistration:_i,sessionStorage:Ii,ShadowRoot:_i,SharedWorker:_i,SourceBuffer:_i,SourceBufferList:_i,speechSynthesis:Ii,SpeechSynthesisEvent:_i,SpeechSynthesisUtterance:_i,StaticRange:_i,status:Ii,statusbar:Ii,StereoPannerNode:_i,stop:Ii,Storage:_i,StorageEvent:_i,StorageManager:_i,styleMedia:Ii,StyleSheet:_i,StyleSheetList:_i,SubtleCrypto:_i,SVGAElement:_i,SVGAngle:_i,SVGAnimatedAngle:_i,SVGAnimatedBoolean:_i,SVGAnimatedEnumeration:_i,SVGAnimatedInteger:_i,SVGAnimatedLength:_i,SVGAnimatedLengthList:_i,SVGAnimatedNumber:_i,SVGAnimatedNumberList:_i,SVGAnimatedPreserveAspectRatio:_i,SVGAnimatedRect:_i,SVGAnimatedString:_i,SVGAnimatedTransformList:_i,SVGAnimateElement:_i,SVGAnimateMotionElement:_i,SVGAnimateTransformElement:_i,SVGAnimationElement:_i,SVGCircleElement:_i,SVGClipPathElement:_i,SVGComponentTransferFunctionElement:_i,SVGDefsElement:_i,SVGDescElement:_i,SVGDiscardElement:_i,SVGElement:_i,SVGEllipseElement:_i,SVGFEBlendElement:_i,SVGFEColorMatrixElement:_i,SVGFEComponentTransferElement:_i,SVGFECompositeElement:_i,SVGFEConvolveMatrixElement:_i,SVGFEDiffuseLightingElement:_i,SVGFEDisplacementMapElement:_i,SVGFEDistantLightElement:_i,SVGFEDropShadowElement:_i,SVGFEFloodElement:_i,SVGFEFuncAElement:_i,SVGFEFuncBElement:_i,SVGFEFuncGElement:_i,SVGFEFuncRElement:_i,SVGFEGaussianBlurElement:_i,SVGFEImageElement:_i,SVGFEMergeElement:_i,SVGFEMergeNodeElement:_i,SVGFEMorphologyElement:_i,SVGFEOffsetElement:_i,SVGFEPointLightElement:_i,SVGFESpecularLightingElement:_i,SVGFESpotLightElement:_i,SVGFETileElement:_i,SVGFETurbulenceElement:_i,SVGFilterElement:_i,SVGForeignObjectElement:_i,SVGGElement:_i,SVGGeometryElement:_i,SVGGradientElement:_i,SVGGraphicsElement:_i,SVGImageElement:_i,SVGLength:_i,SVGLengthList:_i,SVGLinearGradientElement:_i,SVGLineElement:_i,SVGMarkerElement:_i,SVGMaskElement:_i,SVGMatrix:_i,SVGMetadataElement:_i,SVGMPathElement:_i,SVGNumber:_i,SVGNumberList:_i,SVGPathElement:_i,SVGPatternElement:_i,SVGPoint:_i,SVGPointList:_i,SVGPolygonElement:_i,SVGPolylineElement:_i,SVGPreserveAspectRatio:_i,SVGRadialGradientElement:_i,SVGRect:_i,SVGRectElement:_i,SVGScriptElement:_i,SVGSetElement:_i,SVGStopElement:_i,SVGStringList:_i,SVGStyleElement:_i,SVGSVGElement:_i,SVGSwitchElement:_i,SVGSymbolElement:_i,SVGTextContentElement:_i,SVGTextElement:_i,SVGTextPathElement:_i,SVGTextPositioningElement:_i,SVGTitleElement:_i,SVGTransform:_i,SVGTransformList:_i,SVGTSpanElement:_i,SVGUnitTypes:_i,SVGUseElement:_i,SVGViewElement:_i,TaskAttributionTiming:_i,Text:_i,TextEvent:_i,TextMetrics:_i,TextTrack:_i,TextTrackCue:_i,TextTrackCueList:_i,TextTrackList:_i,TimeRanges:_i,toolbar:Ii,top:Ii,Touch:_i,TouchEvent:_i,TouchList:_i,TrackEvent:_i,TransitionEvent:_i,TreeWalker:_i,UIEvent:_i,ValidityState:_i,visualViewport:Ii,VisualViewport:_i,VTTCue:_i,WaveShaperNode:_i,WebAssembly:Ii,WebGL2RenderingContext:_i,WebGLActiveInfo:_i,WebGLBuffer:_i,WebGLContextEvent:_i,WebGLFramebuffer:_i,WebGLProgram:_i,WebGLQuery:_i,WebGLRenderbuffer:_i,WebGLRenderingContext:_i,WebGLSampler:_i,WebGLShader:_i,WebGLShaderPrecisionFormat:_i,WebGLSync:_i,WebGLTexture:_i,WebGLTransformFeedback:_i,WebGLUniformLocation:_i,WebGLVertexArrayObject:_i,WebSocket:_i,WheelEvent:_i,Window:_i,Worker:_i,WritableStream:_i,XMLDocument:_i,XMLHttpRequest:_i,XMLHttpRequestEventTarget:_i,XMLHttpRequestUpload:_i,XMLSerializer:_i,XPathEvaluator:_i,XPathExpression:_i,XPathResult:_i,XSLTProcessor:_i};for(const e of["window","global","self","globalThis"]){Ti[e]=Ti}function getGlobalAtPath(e){let t=Ti;for(const i of e){if(typeof i!=="string"){return null}t=t[i];if(!t){return null}}return t[Si]}class GlobalVariable extends Variable{constructor(){super(...arguments);this.isReassigned=true}getLiteralValueAtPath(e,t,i){return getGlobalAtPath([this.name,...e])?B:V}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:if(e.length===0){return this.name!=="undefined"&&!getGlobalAtPath([this.name])}return!getGlobalAtPath([this.name,...e].slice(0,-1));case H:return true;case j:{const s=getGlobalAtPath([this.name,...e]);return!s||s.hasEffectsWhenCalled(t,i)}}}}const $i={__proto__:null,class:true,const:true,let:true,var:true};class Identifier extends NodeBase{constructor(){super(...arguments);this.variable=null;this.isTDZAccess=null}addExportedVariables(e,t){if(t.has(this.variable)){e.push(this.variable)}}bind(){if(!this.variable&&is_reference(this,this.parent)){this.variable=this.scope.findVariable(this.name);this.variable.addReference(this)}}declare(e,t){let i;const{treeshake:s}=this.context.options;switch(e){case"var":i=this.scope.addDeclaration(this,this.context,t,true);if(s&&s.correctVarValueBeforeDeclaration){i.markInitializersForDeoptimization()}break;case"function":i=this.scope.addDeclaration(this,this.context,t,false);break;case"let":case"const":case"class":i=this.scope.addDeclaration(this,this.context,t,false);break;case"parameter":i=this.scope.addParameterDeclaration(this);break;default:throw new Error(`Internal Error: Unexpected identifier kind ${e}.`)}i.kind=e;return[this.variable=i]}deoptimizePath(e){var t;if(e.length===0&&!this.scope.contains(this.name)){this.disallowImportReassignment()}(t=this.variable)===null||t===void 0?void 0:t.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.variable.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getVariableRespectingTDZ().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getVariableRespectingTDZ().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();if(this.isPossibleTDZ()&&this.variable.kind!=="var"){return true}return this.context.options.treeshake.unknownGlobalSideEffects&&this.variable instanceof GlobalVariable&&this.variable.hasEffectsOnInteractionAtPath($,G,e)}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:return this.variable!==null&&this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,i);case H:return(e.length>0?this.getVariableRespectingTDZ():this.variable).hasEffectsOnInteractionAtPath(e,t,i);case j:return this.getVariableRespectingTDZ().hasEffectsOnInteractionAtPath(e,t,i)}}include(){if(!this.deoptimized)this.applyDeoptimizations();if(!this.included){this.included=true;if(this.variable!==null){this.context.includeVariableInModule(this.variable)}}}includeCallArguments(e,t){this.variable.includeCallArguments(e,t)}isPossibleTDZ(){if(this.isTDZAccess!==null)return this.isTDZAccess;if(!(this.variable instanceof LocalVariable)||!this.variable.kind||!(this.variable.kind in $i)){return this.isTDZAccess=false}let e;if(this.variable.declarations&&this.variable.declarations.length===1&&(e=this.variable.declarations[0])&&this.start<e.start&&closestParentFunctionOrProgram(this)===closestParentFunctionOrProgram(e)){return this.isTDZAccess=true}if(!this.variable.initReached){return this.isTDZAccess=true}return this.isTDZAccess=false}markDeclarationReached(){this.variable.initReached=true}render(e,{snippets:{getPropertyAccess:t}},{renderedParentType:i,isCalleeOfRenderedParent:s,isShorthandProperty:n}=X){if(this.variable){const r=this.variable.getName(t);if(r!==this.name){e.overwrite(this.start,this.end,r,{contentOnly:true,storeName:true});if(n){e.prependRight(this.start,`${this.name}: `)}}if(r==="eval"&&i===Tt&&s){e.appendRight(this.start,"0, ")}}}applyDeoptimizations(){this.deoptimized=true;if(this.variable instanceof LocalVariable){this.variable.consolidateInitializers();this.context.requestTreeshakingPass()}}disallowImportReassignment(){return this.context.error({code:"ILLEGAL_REASSIGNMENT",message:`Illegal reassignment to import '${this.name}'`},this.start)}getVariableRespectingTDZ(){if(this.isPossibleTDZ()){return z}return this.variable}}function closestParentFunctionOrProgram(e){while(e&&!/^Program|Function/.test(e.type)){e=e.parent}return e}function treeshakeNode(e,t,i,s){t.remove(i,s);if(e.annotations){for(const s of e.annotations){if(s.start<i){t.remove(s.start,s.end)}else{return}}}}function removeAnnotations(e,t){if(!e.annotations&&e.parent.type===Dt){e=e.parent}if(e.annotations){for(const i of e.annotations){t.remove(i.start,i.end)}}}const Oi={isNoStatement:true};function findFirstOccurrenceOutsideComment(e,t,i=0){let s,n;s=e.indexOf(t,i);while(true){i=e.indexOf("/",i);if(i===-1||i>=s)return s;n=e.charCodeAt(++i);++i;i=n===47?e.indexOf("\n",i)+1:e.indexOf("*/",i)+2;if(i>s){s=e.indexOf(t,i)}}}const Di=/\S/g;function findNonWhiteSpace(e,t){Di.lastIndex=t;const i=Di.exec(e);return i.index}function findFirstLineBreakOutsideComment(e){let t,i,s=0;t=e.indexOf("\n",s);while(true){s=e.indexOf("/",s);if(s===-1||s>t)return[t,t+1];i=e.charCodeAt(s+1);if(i===47)return[s,t+1];s=e.indexOf("*/",s+3)+2;if(s>t){t=e.indexOf("\n",s)}}}function renderStatementList(e,t,i,s,n){let r,o,l,c;let u=e[0];let h=!u.included||u.needsBoundaries;if(h){c=i+findFirstLineBreakOutsideComment(t.original.slice(i,u.start))[1]}for(let i=1;i<=e.length;i++){r=u;o=c;l=h;u=e[i];h=u===undefined?false:!u.included||u.needsBoundaries;if(l||h){c=r.end+findFirstLineBreakOutsideComment(t.original.slice(r.end,u===undefined?s:u.start))[1];if(r.included){l?r.render(t,n,{end:c,start:o}):r.render(t,n)}else{treeshakeNode(r,t,o,c)}}else{r.render(t,n)}}}function getCommaSeparatedNodesWithBoundaries(e,t,i,s){const n=[];let r,o,l,c,u;let h=i-1;for(let s=0;s<e.length;s++){o=e[s];if(r!==undefined){h=r.end+findFirstOccurrenceOutsideComment(t.original.slice(r.end,o.start),",")}l=c=h+1+findFirstLineBreakOutsideComment(t.original.slice(h+1,o.start))[1];while(u=t.original.charCodeAt(l),u===32||u===9||u===10||u===13)l++;if(r!==undefined){n.push({contentEnd:c,end:l,node:r,separator:h,start:i})}r=o;i=l}n.push({contentEnd:s,end:s,node:r,separator:null,start:i});return n}function removeLineBreaks(e,t,i){while(true){const[s,n]=findFirstLineBreakOutsideComment(e.original.slice(t,i));if(s===-1){break}e.remove(t+s,t+=n)}}class BlockScope extends ChildScope{addDeclaration(e,t,i,s){if(s){const n=this.parent.addDeclaration(e,t,i,s);n.markInitializersForDeoptimization();return n}else{return super.addDeclaration(e,t,i,false)}}}class ExpressionStatement extends NodeBase{initialise(){if(this.directive&&this.directive!=="use strict"&&this.parent.type===zt){this.context.warn({code:"MODULE_LEVEL_DIRECTIVE",message:`Module level directives cause errors when bundled, '${this.directive}' was ignored.`},this.start)}}render(e,t){super.render(e,t);if(this.included)this.insertSemicolon(e)}shouldBeIncluded(e){if(this.directive&&this.directive!=="use strict")return this.parent.type!==zt;return super.shouldBeIncluded(e)}applyDeoptimizations(){}}class BlockStatement extends NodeBase{constructor(){super(...arguments);this.directlyIncluded=false}addImplicitReturnExpressionToScope(){const e=this.body[this.body.length-1];if(!e||e.type!==Ht){this.scope.addReturnExpression(z)}}createScope(e){this.scope=this.parent.preventChildBlockScope?e:new BlockScope(e)}hasEffects(e){if(this.deoptimizeBody)return true;for(const t of this.body){if(e.brokenFlow)break;if(t.hasEffects(e))return true}return false}include(e,t){if(!(this.deoptimizeBody&&this.directlyIncluded)){this.included=true;this.directlyIncluded=true;if(this.deoptimizeBody)t=true;for(const i of this.body){if(t||i.shouldBeIncluded(e))i.include(e,t)}}}initialise(){const e=this.body[0];this.deoptimizeBody=e instanceof ExpressionStatement&&e.directive==="use asm"}render(e,t){if(this.body.length){renderStatementList(this.body,e,this.start+1,this.end-1,t)}else{super.render(e,t)}}}class RestElement extends NodeBase{constructor(){super(...arguments);this.declarationInit=null}addExportedVariables(e,t){this.argument.addExportedVariables(e,t)}declare(e,t){this.declarationInit=t;return this.argument.declare(e,z)}deoptimizePath(e){e.length===0&&this.argument.deoptimizePath($)}hasEffectsOnInteractionAtPath(e,t,i){return e.length>0||this.argument.hasEffectsOnInteractionAtPath($,t,i)}markDeclarationReached(){this.argument.markDeclarationReached()}applyDeoptimizations(){this.deoptimized=true;if(this.declarationInit!==null){this.declarationInit.deoptimizePath([N,N]);this.context.requestTreeshakingPass()}}}class FunctionBase extends NodeBase{constructor(){super(...arguments);this.objectEntity=null;this.deoptimizedReturn=false}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e);if(e.length===1&&e[0]===N){this.scope.getReturnExpression().deoptimizePath(O)}}deoptimizeThisOnInteractionAtPath(e,t,i){if(t.length>0){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(e.length>0){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}if(this.async){if(!this.deoptimizedReturn){this.deoptimizedReturn=true;this.scope.getReturnExpression().deoptimizePath(O);this.context.requestTreeshakingPass()}return z}return this.scope.getReturnExpression()}hasEffectsOnInteractionAtPath(e,t,i){if(e.length>0||t.type!==j){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}if(this.async){const{propertyReadSideEffects:e}=this.context.options.treeshake;const t=this.scope.getReturnExpression();if(t.hasEffectsOnInteractionAtPath(["then"],Y,i)||e&&(e==="always"||t.hasEffectsOnInteractionAtPath(["then"],G,i))){return true}}for(const e of this.params){if(e.hasEffects(i))return true}return false}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;const{brokenFlow:i}=e;e.brokenFlow=dt;this.body.include(e,t);e.brokenFlow=i}includeCallArguments(e,t){this.scope.includeCallArguments(e,t)}initialise(){this.scope.addParameterVariables(this.params.map((e=>e.declare("parameter",z))),this.params[this.params.length-1]instanceof RestElement);if(this.body instanceof BlockStatement){this.body.addImplicitReturnExpressionToScope()}else{this.scope.addReturnExpression(this.body)}}parseNode(e){if(e.body.type===Rt){this.body=new BlockStatement(e.body,this,this.scope.hoistedBodyVarScope)}super.parseNode(e)}applyDeoptimizations(){}}FunctionBase.prototype.preventChildBlockScope=true;class ArrowFunctionExpression extends FunctionBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new ReturnValueScope(e,this.context)}hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return false}hasEffectsOnInteractionAtPath(e,t,i){if(super.hasEffectsOnInteractionAtPath(e,t,i))return true;if(t.type===j){const{ignore:e,brokenFlow:t}=i;i.ignore={breaks:false,continues:false,labels:new Set,returnYield:true};if(this.body.hasEffects(i))return true;i.ignore=e;i.brokenFlow=t}return false}include(e,t){super.include(e,t);for(const i of this.params){if(!(i instanceof Identifier)){i.include(e,t)}}}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}return this.objectEntity=new ObjectEntity([],ai)}}function getSystemExportStatement(e,{exportNamesByVariable:t,snippets:{_:i,getObject:s,getPropertyAccess:n}},r=""){if(e.length===1&&t.get(e[0]).length===1){const s=e[0];return`exports('${t.get(s)}',${i}${s.getName(n)}${r})`}else{const i=[];for(const s of e){for(const e of t.get(s)){i.push([e,s.getName(n)+r])}}return`exports(${s(i,{lineBreakIndent:null})})`}}function renderSystemExportExpression(e,t,i,s,{exportNamesByVariable:n,snippets:{_:r}}){s.prependRight(t,`exports('${n.get(e)}',${r}`);s.appendLeft(i,")")}function renderSystemExportFunction(e,t,i,s,n,r){const{_:o,getDirectReturnIifeLeft:l}=r.snippets;n.prependRight(t,l(["v"],`${getSystemExportStatement(e,r)},${o}v`,{needsArrowReturnParens:true,needsWrappedFunction:s}));n.appendLeft(i,")")}function renderSystemExportSequenceAfterExpression(e,t,i,s,n,r){const{_:o,getPropertyAccess:l}=r.snippets;n.appendLeft(i,`,${o}${getSystemExportStatement([e],r)},${o}${e.getName(l)}`);if(s){n.prependRight(t,"(");n.appendLeft(i,")")}}function renderSystemExportSequenceBeforeExpression(e,t,i,s,n,r,o){const{_:l}=r.snippets;n.prependRight(t,`${getSystemExportStatement([e],r,o)},${l}`);if(s){n.prependRight(t,"(");n.appendLeft(i,")")}}class ObjectPattern extends NodeBase{addExportedVariables(e,t){for(const i of this.properties){if(i.type===Ut){i.value.addExportedVariables(e,t)}else{i.argument.addExportedVariables(e,t)}}}declare(e,t){const i=[];for(const s of this.properties){i.push(...s.declare(e,t))}return i}deoptimizePath(e){if(e.length===0){for(const t of this.properties){t.deoptimizePath(e)}}}hasEffectsOnInteractionAtPath(e,t,i){for(const e of this.properties){if(e.hasEffectsOnInteractionAtPath($,t,i))return true}return false}markDeclarationReached(){for(const e of this.properties){e.markDeclarationReached()}}}class AssignmentExpression extends NodeBase{hasEffects(e){const{deoptimized:t,left:i,right:s}=this;if(!t)this.applyDeoptimizations();return s.hasEffects(e)||i.hasEffectsAsAssignmentTarget(e,this.operator!=="=")}hasEffectsOnInteractionAtPath(e,t,i){return this.right.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){const{deoptimized:i,left:s,right:n,operator:r}=this;if(!i)this.applyDeoptimizations();this.included=true;if(t||r!=="="||s.included||s.hasEffectsAsAssignmentTarget(createHasEffectsContext(),false)){s.includeAsAssignmentTarget(e,t,r!=="=")}n.include(e,t)}initialise(){this.left.setAssignedValue(this.right)}render(e,t,{preventASI:i,renderedParentType:s,renderedSurroundingElement:n}=X){const{left:r,right:o,start:l,end:c,parent:u}=this;if(r.included){r.render(e,t);o.render(e,t)}else{const c=findNonWhiteSpace(e.original,findFirstOccurrenceOutsideComment(e.original,"=",r.end)+1);e.remove(l,c);if(i){removeLineBreaks(e,c,o.start)}o.render(e,t,{renderedParentType:s||u.type,renderedSurroundingElement:n||u.type})}if(t.format==="system"){if(r instanceof Identifier){const i=r.variable;const s=t.exportNamesByVariable.get(i);if(s){if(s.length===1){renderSystemExportExpression(i,l,c,e,t)}else{renderSystemExportSequenceAfterExpression(i,l,c,u.type!==Dt,e,t)}return}}else{const i=[];r.addExportedVariables(i,t.exportNamesByVariable);if(i.length>0){renderSystemExportFunction(i,l,c,n===Dt,e,t);return}}}if(r.included&&r instanceof ObjectPattern&&(n===Dt||n===Pt)){e.appendRight(l,"(");e.prependLeft(c,")")}}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.right.deoptimizePath(O);this.context.requestTreeshakingPass()}}class AssignmentPattern extends NodeBase{addExportedVariables(e,t){this.left.addExportedVariables(e,t)}declare(e,t){return this.left.declare(e,t)}deoptimizePath(e){e.length===0&&this.left.deoptimizePath(e)}hasEffectsOnInteractionAtPath(e,t,i){return e.length>0||this.left.hasEffectsOnInteractionAtPath($,t,i)}markDeclarationReached(){this.left.markDeclarationReached()}render(e,t,{isShorthandProperty:i}=X){this.left.render(e,t,{isShorthandProperty:i});this.right.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.right.deoptimizePath(O);this.context.requestTreeshakingPass()}}class ArgumentsVariable extends LocalVariable{constructor(e){super("arguments",null,z,e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>1}}class ThisVariable extends LocalVariable{constructor(e){super("this",null,null,e);this.deoptimizedPaths=[];this.entitiesToBeDeoptimized=new Set;this.thisDeoptimizationList=[];this.thisDeoptimizations=new DiscriminatedPathTracker}addEntityToBeDeoptimized(e){for(const t of this.deoptimizedPaths){e.deoptimizePath(t)}for(const{interaction:t,path:i}of this.thisDeoptimizationList){e.deoptimizeThisOnInteractionAtPath(t,i,F)}this.entitiesToBeDeoptimized.add(e)}deoptimizePath(e){if(e.length===0||this.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}this.deoptimizedPaths.push(e);for(const t of this.entitiesToBeDeoptimized){t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t){const i={interaction:e,path:t};if(!this.thisDeoptimizations.trackEntityAtPathAndGetIfTracked(t,e.type,e.thisArg)){for(const i of this.entitiesToBeDeoptimized){i.deoptimizeThisOnInteractionAtPath(e,t,F)}this.thisDeoptimizationList.push(i)}}hasEffectsOnInteractionAtPath(e,t,i){return this.getInit(i).hasEffectsOnInteractionAtPath(e,t,i)||super.hasEffectsOnInteractionAtPath(e,t,i)}getInit(e){return e.replacedVariableInits.get(this)||z}}class FunctionScope extends ReturnValueScope{constructor(e,t){super(e,t);this.variables.set("arguments",this.argumentsVariable=new ArgumentsVariable(t));this.variables.set("this",this.thisVariable=new ThisVariable(t))}findLexicalBoundary(){return this}includeCallArguments(e,t){super.includeCallArguments(e,t);if(this.argumentsVariable.included){for(const i of t){if(!i.included){i.include(e,false)}}}}}class FunctionNode extends FunctionBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new FunctionScope(e,this.context)}deoptimizeThisOnInteractionAtPath(e,t,i){super.deoptimizeThisOnInteractionAtPath(e,t,i);if(e.type===j&&t.length===0){this.scope.thisVariable.addEntityToBeDeoptimized(e.thisArg)}}hasEffects(e){var t;if(!this.deoptimized)this.applyDeoptimizations();return!!((t=this.id)===null||t===void 0?void 0:t.hasEffects(e))}hasEffectsOnInteractionAtPath(e,t,i){if(super.hasEffectsOnInteractionAtPath(e,t,i))return true;if(t.type===j){const e=i.replacedVariableInits.get(this.scope.thisVariable);i.replacedVariableInits.set(this.scope.thisVariable,t.withNew?new ObjectEntity(Object.create(null),ai):z);const{brokenFlow:s,ignore:n}=i;i.ignore={breaks:false,continues:false,labels:new Set,returnYield:true};if(this.body.hasEffects(i))return true;i.brokenFlow=s;if(e){i.replacedVariableInits.set(this.scope.thisVariable,e)}else{i.replacedVariableInits.delete(this.scope.thisVariable)}i.ignore=n}return false}include(e,t){var i;super.include(e,t);(i=this.id)===null||i===void 0?void 0:i.include();const s=this.scope.argumentsVariable.included;for(const i of this.params){if(!(i instanceof Identifier)||s){i.include(e,t)}}}initialise(){var e;super.initialise();(e=this.id)===null||e===void 0?void 0:e.declare("function",this)}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}return this.objectEntity=new ObjectEntity([{key:"prototype",kind:"init",property:new ObjectEntity([],ai)}],ai)}}class AwaitExpression extends NodeBase{hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return true}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(!this.included){this.included=true;e:if(!this.context.usesTopLevelAwait){let e=this.parent;do{if(e instanceof FunctionNode||e instanceof ArrowFunctionExpression)break e}while(e=e.parent);this.context.usesTopLevelAwait=true}}this.argument.include(e,t)}}const Mi={"!=":(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 BinaryExpression extends NodeBase{deoptimizeCache(){}getLiteralValueAtPath(e,t,i){if(e.length>0)return V;const s=this.left.getLiteralValueAtPath($,t,i);if(typeof s==="symbol")return V;const n=this.right.getLiteralValueAtPath($,t,i);if(typeof n==="symbol")return V;const r=Mi[this.operator];if(!r)return V;return r(s,n)}hasEffects(e){if(this.operator==="+"&&this.parent instanceof ExpressionStatement&&this.left.getLiteralValueAtPath($,F,this)===""){return true}return super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>1}render(e,t,{renderedSurroundingElement:i}=X){this.left.render(e,t,{renderedSurroundingElement:i});this.right.render(e,t)}}class BreakStatement extends NodeBase{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return true;e.includedLabels.add(this.label.name);e.brokenFlow=ft}else{if(!e.ignore.breaks)return true;e.brokenFlow=pt}return false}include(e){this.included=true;if(this.label){this.label.include();e.includedLabels.add(this.label.name)}e.brokenFlow=this.label?ft:pt}}function renderCallArguments(e,t,i){if(i.arguments.length>0){if(i.arguments[i.arguments.length-1].included){for(const s of i.arguments){s.render(e,t)}}else{let s=i.arguments.length-2;while(s>=0&&!i.arguments[s].included){s--}if(s>=0){for(let n=0;n<=s;n++){i.arguments[n].render(e,t)}e.remove(findFirstOccurrenceOutsideComment(e.original,",",i.arguments[s].end),i.end-1)}else{e.remove(findFirstOccurrenceOutsideComment(e.original,"(",i.callee.end)+1,i.end-1)}}}}class Literal extends NodeBase{deoptimizeThisOnInteractionAtPath(){}getLiteralValueAtPath(e){if(e.length>0||this.value===null&&this.context.code.charCodeAt(this.start)!==110||typeof this.value==="bigint"||this.context.code.charCodeAt(this.start)===47){return V}return this.value}getReturnExpressionWhenCalledAtPath(e){if(e.length!==1)return z;return getMemberReturnExpressionWhenCalled(this.members,e[0])}hasEffectsOnInteractionAtPath(e,t,i){switch(t.type){case U:return e.length>(this.value===null?0:1);case H:return true;case j:return e.length!==1||hasMemberEffectWhenCalled(this.members,e[0],t,i)}}initialise(){this.members=getLiteralMembersForValue(this.value)}parseNode(e){this.value=e.value;this.regex=e.regex;super.parseNode(e)}render(e){if(typeof this.value==="string"){e.indentExclusionRanges.push([this.start+1,this.end-1])}}}const Li=7;function getResolvablePropertyKey(e){return e.computed?getResolvableComputedPropertyKey(e.property):e.property.name}function getResolvableComputedPropertyKey(e){if(e instanceof Literal){return String(e.value)}return null}function getPathIfNotComputed(e){const t=e.propertyKey;const i=e.object;if(typeof t==="string"){if(i instanceof Identifier){return[{key:i.name,pos:i.start},{key:t,pos:e.property.start}]}if(i instanceof MemberExpression){const s=getPathIfNotComputed(i);return s&&[...s,{key:t,pos:e.property.start}]}}return null}function getStringFromPath(e){let t=e[0].key;for(let i=1;i<e.length;i++){t+="."+e[i].key}return t}class MemberExpression extends NodeBase{constructor(){super(...arguments);this.variable=null;this.assignmentDeoptimized=false;this.bound=false;this.expressionsToBeDeoptimized=[];this.replacement=null}bind(){this.bound=true;const e=getPathIfNotComputed(this);const t=e&&this.scope.findVariable(e[0].key);if(t&&t.isNamespace){const i=resolveNamespaceVariables(t,e.slice(1),this.context);if(!i){super.bind()}else if(typeof i==="string"){this.replacement=i}else{this.variable=i;this.scope.addNamespaceMemberAccess(getStringFromPath(e),i)}}else{super.bind()}}deoptimizeCache(){const e=this.expressionsToBeDeoptimized;this.expressionsToBeDeoptimized=[];this.propertyKey=N;this.object.deoptimizePath(O);for(const t of e){t.deoptimizeCache()}}deoptimizePath(e){if(e.length===0)this.disallowNamespaceReassignment();if(this.variable){this.variable.deoptimizePath(e)}else if(!this.replacement){if(e.length<Li){const t=this.getPropertyKey();this.object.deoptimizePath([t===N?R:t,...e])}}}deoptimizeThisOnInteractionAtPath(e,t,i){if(this.variable){this.variable.deoptimizeThisOnInteractionAtPath(e,t,i)}else if(!this.replacement){if(t.length<Li){this.object.deoptimizeThisOnInteractionAtPath(e,[this.getPropertyKey(),...t],i)}else{e.thisArg.deoptimizePath(O)}}}getLiteralValueAtPath(e,t,i){if(this.variable){return this.variable.getLiteralValueAtPath(e,t,i)}if(this.replacement){return V}this.expressionsToBeDeoptimized.push(i);if(e.length<Li){return this.object.getLiteralValueAtPath([this.getPropertyKey(),...e],t,i)}return V}getReturnExpressionWhenCalledAtPath(e,t,i,s){if(this.variable){return this.variable.getReturnExpressionWhenCalledAtPath(e,t,i,s)}if(this.replacement){return z}this.expressionsToBeDeoptimized.push(s);if(e.length<Li){return this.object.getReturnExpressionWhenCalledAtPath([this.getPropertyKey(),...e],t,i,s)}return z}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return this.property.hasEffects(e)||this.object.hasEffects(e)||this.hasAccessEffect(e)}hasEffectsAsAssignmentTarget(e,t){if(t&&!this.deoptimized)this.applyDeoptimizations();if(!this.assignmentDeoptimized)this.applyAssignmentDeoptimization();return this.property.hasEffects(e)||this.object.hasEffects(e)||t&&this.hasAccessEffect(e)||this.hasEffectsOnInteractionAtPath($,this.assignmentInteraction,e)}hasEffectsOnInteractionAtPath(e,t,i){if(this.variable){return this.variable.hasEffectsOnInteractionAtPath(e,t,i)}if(this.replacement){return true}if(e.length<Li){return this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey(),...e],t,i)}return true}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.includeProperties(e,t)}includeAsAssignmentTarget(e,t,i){if(!this.assignmentDeoptimized)this.applyAssignmentDeoptimization();if(i){this.include(e,t)}else{this.includeProperties(e,t)}}includeCallArguments(e,t){if(this.variable){this.variable.includeCallArguments(e,t)}else{super.includeCallArguments(e,t)}}initialise(){this.propertyKey=getResolvablePropertyKey(this);this.accessInteraction={thisArg:this.object,type:U}}render(e,t,{renderedParentType:i,isCalleeOfRenderedParent:s,renderedSurroundingElement:n}=X){if(this.variable||this.replacement){const{snippets:{getPropertyAccess:n}}=t;let r=this.variable?this.variable.getName(n):this.replacement;if(i&&s)r="0, "+r;e.overwrite(this.start,this.end,r,{contentOnly:true,storeName:true})}else{if(i&&s){e.appendRight(this.start,"0, ")}this.object.render(e,t,{renderedSurroundingElement:n});this.property.render(e,t)}}setAssignedValue(e){this.assignmentInteraction={args:[e],thisArg:this.object,type:H}}applyDeoptimizations(){this.deoptimized=true;const{propertyReadSideEffects:e}=this.context.options.treeshake;if(this.bound&&e&&!(this.variable||this.replacement)){const e=this.getPropertyKey();this.object.deoptimizeThisOnInteractionAtPath(this.accessInteraction,[e],F);this.context.requestTreeshakingPass()}}applyAssignmentDeoptimization(){this.assignmentDeoptimized=true;const{propertyReadSideEffects:e}=this.context.options.treeshake;if(this.bound&&e&&!(this.variable||this.replacement)){this.object.deoptimizeThisOnInteractionAtPath(this.assignmentInteraction,[this.getPropertyKey()],F);this.context.requestTreeshakingPass()}}disallowNamespaceReassignment(){if(this.object instanceof Identifier){const e=this.scope.findVariable(this.object.name);if(e.isNamespace){if(this.variable){this.context.includeVariableInModule(this.variable)}this.context.warn({code:"ILLEGAL_NAMESPACE_REASSIGNMENT",message:`Illegal reassignment to import '${this.object.name}'`},this.start)}}}getPropertyKey(){if(this.propertyKey===null){this.propertyKey=N;const e=this.property.getLiteralValueAtPath($,F,this);return this.propertyKey=typeof e==="symbol"?N:String(e)}return this.propertyKey}hasAccessEffect(e){const{propertyReadSideEffects:t}=this.context.options.treeshake;return!(this.variable||this.replacement)&&t&&(t==="always"||this.object.hasEffectsOnInteractionAtPath([this.getPropertyKey()],this.accessInteraction,e))}includeProperties(e,t){if(!this.included){this.included=true;if(this.variable){this.context.includeVariableInModule(this.variable)}}this.object.include(e,t);this.property.include(e,t)}}function resolveNamespaceVariables(e,t,i){if(t.length===0)return e;if(!e.isNamespace||e instanceof ExternalVariable)return null;const s=t[0].key;const n=e.context.traceExport(s);if(!n){const n=e.context.fileName;i.warn({code:"MISSING_EXPORT",exporter:relativeId(n),importer:relativeId(i.fileName),message:`'${s}' is not exported by '${relativeId(n)}'`,missing:s,url:`https://rollupjs.org/guide/en/#error-name-is-not-exported-by-module`},t[0].pos);return"undefined"}return resolveNamespaceVariables(n,t.slice(1),i)}class CallExpressionBase extends NodeBase{constructor(){super(...arguments);this.returnExpression=null;this.deoptimizableDependentExpressions=[];this.expressionsToBeDeoptimized=new Set}deoptimizeCache(){if(this.returnExpression!==z){this.returnExpression=z;for(const e of this.deoptimizableDependentExpressions){e.deoptimizeCache()}for(const e of this.expressionsToBeDeoptimized){e.deoptimizePath(O)}}}deoptimizePath(e){if(e.length===0||this.context.deoptimizationTracker.trackEntityAtPathAndGetIfTracked(e,this)){return}const t=this.getReturnExpression();if(t!==z){t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){const s=this.getReturnExpression(i);if(s===z){e.thisArg.deoptimizePath(O)}else{i.withTrackedEntityAtPath(t,s,(()=>{this.expressionsToBeDeoptimized.add(e.thisArg);s.deoptimizeThisOnInteractionAtPath(e,t,i)}),undefined)}}getLiteralValueAtPath(e,t,i){const s=this.getReturnExpression(t);if(s===z){return V}return t.withTrackedEntityAtPath(e,s,(()=>{this.deoptimizableDependentExpressions.push(i);return s.getLiteralValueAtPath(e,t,i)}),V)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getReturnExpression(i);if(this.returnExpression===z){return z}return i.withTrackedEntityAtPath(e,n,(()=>{this.deoptimizableDependentExpressions.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}),z)}hasEffectsOnInteractionAtPath(e,t,i){const{type:s}=t;if(s===j){if((t.withNew?i.instantiated:i.called).trackEntityAtPathAndGetIfTracked(e,t.args,this)){return false}}else if((s===H?i.assigned:i.accessed).trackEntityAtPathAndGetIfTracked(e,this)){return false}return this.getReturnExpression().hasEffectsOnInteractionAtPath(e,t,i)}}class CallExpression extends CallExpressionBase{bind(){super.bind();if(this.callee instanceof Identifier){const e=this.scope.findVariable(this.callee.name);if(e.isNamespace){this.context.warn({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${this.callee.name}')`},this.start)}if(this.callee.name==="eval"){this.context.warn({code:"EVAL",message:`Use of eval is strongly discouraged, as it poses security risks and may cause issues with minification`,url:"https://rollupjs.org/guide/en/#avoiding-eval"},this.start)}}this.interaction={args:this.arguments,thisArg:this.callee instanceof MemberExpression&&!this.callee.variable?this.callee.object:null,type:j,withNew:false}}hasEffects(e){try{for(const t of this.arguments){if(t.hasEffects(e))return true}if(this.context.options.treeshake.annotations&&this.annotations)return false;return this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath($,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t);if(t===Jt&&this.callee instanceof Identifier&&this.callee.variable){this.callee.variable.markCalledFromTryStatement()}}else{this.included=true;this.callee.include(e,false)}this.callee.includeCallArguments(e,this.arguments)}render(e,t,{renderedSurroundingElement:i}=X){this.callee.render(e,t,{isCalleeOfRenderedParent:true,renderedSurroundingElement:i});renderCallArguments(e,t,this)}applyDeoptimizations(){this.deoptimized=true;if(this.interaction.thisArg){this.callee.deoptimizeThisOnInteractionAtPath(this.interaction,$,F)}for(const e of this.arguments){e.deoptimizePath(O)}this.context.requestTreeshakingPass()}getReturnExpression(e=F){if(this.returnExpression===null){this.returnExpression=z;return this.returnExpression=this.callee.getReturnExpressionWhenCalledAtPath($,this.interaction,e,this)}return this.returnExpression}}class CatchScope extends ParameterScope{addDeclaration(e,t,i,s){const n=this.variables.get(e.name);if(n){this.parent.addDeclaration(e,t,mt,s);n.addDeclaration(e,i);return n}return this.parent.addDeclaration(e,t,i,s)}}class CatchClause extends NodeBase{createScope(e){this.scope=new CatchScope(e,this.context)}parseNode(e){const{param:t}=e;if(t){this.param=new(this.context.getNodeConstructor(t.type))(t,this,this.scope);this.param.declare("parameter",z)}super.parseNode(e)}}class ChainExpression extends NodeBase{}class ClassBodyScope extends ChildScope{constructor(e,t,i){super(e);this.variables.set("this",this.thisVariable=new LocalVariable("this",null,t,i));this.instanceScope=new ChildScope(this);this.instanceScope.variables.set("this",new ThisVariable(i))}findLexicalBoundary(){return this}}class ClassBody extends NodeBase{createScope(e){this.scope=new ClassBodyScope(e,this.parent,this.context)}include(e,t){this.included=true;this.context.includeVariableInModule(this.scope.thisVariable);for(const i of this.body){i.include(e,t)}}parseNode(e){const t=this.body=[];for(const i of e.body){t.push(new(this.context.getNodeConstructor(i.type))(i,this,i.static?this.scope:this.scope.instanceScope))}super.parseNode(e)}applyDeoptimizations(){}}class MethodBase extends NodeBase{constructor(){super(...arguments);this.accessedValue=null}deoptimizeCache(){}deoptimizePath(e){this.getAccessedValue().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){if(e.type===U&&this.kind==="get"&&t.length===0){return this.value.deoptimizeThisOnInteractionAtPath({args:K,thisArg:e.thisArg,type:j,withNew:false},$,i)}if(e.type===H&&this.kind==="set"&&t.length===0){return this.value.deoptimizeThisOnInteractionAtPath({args:e.args,thisArg:e.thisArg,type:j,withNew:false},$,i)}this.getAccessedValue().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getAccessedValue().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getAccessedValue().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){return this.key.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){if(this.kind==="get"&&t.type===U&&e.length===0){return this.value.hasEffectsOnInteractionAtPath($,{args:K,thisArg:t.thisArg,type:j,withNew:false},i)}if(this.kind==="set"&&t.type===H){return this.value.hasEffectsOnInteractionAtPath($,{args:t.args,thisArg:t.thisArg,type:j,withNew:false},i)}return this.getAccessedValue().hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){}getAccessedValue(){if(this.accessedValue===null){if(this.kind==="get"){this.accessedValue=z;return this.accessedValue=this.value.getReturnExpressionWhenCalledAtPath($,Y,F,this)}else{return this.accessedValue=this.value}}return this.accessedValue}}class MethodDefinition extends MethodBase{applyDeoptimizations(){}}class ObjectMember extends ExpressionEntity{constructor(e,t){super();this.object=e;this.key=t}deoptimizePath(e){this.object.deoptimizePath([this.key,...e])}deoptimizeThisOnInteractionAtPath(e,t,i){this.object.deoptimizeThisOnInteractionAtPath(e,[this.key,...t],i)}getLiteralValueAtPath(e,t,i){return this.object.getLiteralValueAtPath([this.key,...e],t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.object.getReturnExpressionWhenCalledAtPath([this.key,...e],t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.object.hasEffectsOnInteractionAtPath([this.key,...e],t,i)}}class ClassNode extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}createScope(e){this.scope=new ChildScope(e)}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){var t,i;if(!this.deoptimized)this.applyDeoptimizations();const s=((t=this.superClass)===null||t===void 0?void 0:t.hasEffects(e))||this.body.hasEffects(e);(i=this.id)===null||i===void 0?void 0:i.markDeclarationReached();return s||super.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){var s;if(t.type===j&&e.length===0){return!t.withNew||(this.classConstructor!==null?this.classConstructor.hasEffectsOnInteractionAtPath(e,t,i):(s=this.superClass)===null||s===void 0?void 0:s.hasEffectsOnInteractionAtPath(e,t,i))||false}else{return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}}include(e,t){var i;if(!this.deoptimized)this.applyDeoptimizations();this.included=true;(i=this.superClass)===null||i===void 0?void 0:i.include(e,t);this.body.include(e,t);if(this.id){this.id.markDeclarationReached();this.id.include()}}initialise(){var e;(e=this.id)===null||e===void 0?void 0:e.declare("class",this);for(const e of this.body.body){if(e instanceof MethodDefinition&&e.kind==="constructor"){this.classConstructor=e;return}}this.classConstructor=null}applyDeoptimizations(){this.deoptimized=true;for(const e of this.body.body){if(!(e.static||e instanceof MethodDefinition&&e.kind==="constructor")){e.deoptimizePath(O)}}this.context.requestTreeshakingPass()}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}const e=[];const t=[];for(const i of this.body.body){const s=i.static?e:t;const n=i.kind;if(s===t&&!n)continue;const r=n==="set"||n==="get"?n:"init";let o;if(i.computed){const e=i.key.getLiteralValueAtPath($,F,this);if(typeof e==="symbol"){s.push({key:N,kind:r,property:i});continue}else{o=String(e)}}else{o=i.key instanceof Identifier?i.key.name:String(i.key.value)}s.push({key:o,kind:r,property:i})}e.unshift({key:"prototype",kind:"init",property:new ObjectEntity(t,this.superClass?new ObjectMember(this.superClass,"prototype"):ai)});return this.objectEntity=new ObjectEntity(e,this.superClass||ai)}}class ClassDeclaration extends ClassNode{initialise(){super.initialise();if(this.id!==null){this.id.variable.isId=true}}parseNode(e){if(e.id!==null){this.id=new Identifier(e.id,this,this.scope.parent)}super.parseNode(e)}render(e,t){const{exportNamesByVariable:i,format:s,snippets:{_:n}}=t;if(s==="system"&&this.id&&i.has(this.id.variable)){e.appendLeft(this.end,`${n}${getSystemExportStatement([this.id.variable],t)};`)}super.render(e,t)}}class ClassExpression extends ClassNode{render(e,t,{renderedSurroundingElement:i}=X){super.render(e,t);if(i===Dt){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}}class MultiExpression extends ExpressionEntity{constructor(e){super();this.expressions=e;this.included=false}deoptimizePath(e){for(const t of this.expressions){t.deoptimizePath(e)}}getReturnExpressionWhenCalledAtPath(e,t,i,s){return new MultiExpression(this.expressions.map((n=>n.getReturnExpressionWhenCalledAtPath(e,t,i,s))))}hasEffectsOnInteractionAtPath(e,t,i){for(const s of this.expressions){if(s.hasEffectsOnInteractionAtPath(e,t,i))return true}return false}}class ConditionalExpression extends NodeBase{constructor(){super(...arguments);this.expressionsToBeDeoptimized=[];this.isBranchResolutionAnalysed=false;this.usedBranch=null}deoptimizeCache(){if(this.usedBranch!==null){const e=this.usedBranch===this.consequent?this.alternate:this.consequent;this.usedBranch=null;e.deoptimizePath(O);for(const e of this.expressionsToBeDeoptimized){e.deoptimizeCache()}}}deoptimizePath(e){const t=this.getUsedBranch();if(!t){this.consequent.deoptimizePath(e);this.alternate.deoptimizePath(e)}else{t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){this.consequent.deoptimizeThisOnInteractionAtPath(e,t,i);this.alternate.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){const s=this.getUsedBranch();if(!s)return V;this.expressionsToBeDeoptimized.push(i);return s.getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getUsedBranch();if(!n)return new MultiExpression([this.consequent.getReturnExpressionWhenCalledAtPath(e,t,i,s),this.alternate.getReturnExpressionWhenCalledAtPath(e,t,i,s)]);this.expressionsToBeDeoptimized.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(this.test.hasEffects(e))return true;const t=this.getUsedBranch();if(!t){return this.consequent.hasEffects(e)||this.alternate.hasEffects(e)}return t.hasEffects(e)}hasEffectsOnInteractionAtPath(e,t,i){const s=this.getUsedBranch();if(!s){return this.consequent.hasEffectsOnInteractionAtPath(e,t,i)||this.alternate.hasEffectsOnInteractionAtPath(e,t,i)}return s.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.getUsedBranch();if(t||this.test.shouldBeIncluded(e)||i===null){this.test.include(e,t);this.consequent.include(e,t);this.alternate.include(e,t)}else{i.include(e,t)}}includeCallArguments(e,t){const i=this.getUsedBranch();if(!i){this.consequent.includeCallArguments(e,t);this.alternate.includeCallArguments(e,t)}else{i.includeCallArguments(e,t)}}render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n,renderedSurroundingElement:r}=X){const o=this.getUsedBranch();if(!this.test.included){const l=findFirstOccurrenceOutsideComment(e.original,":",this.consequent.end);const c=findNonWhiteSpace(e.original,(this.consequent.included?findFirstOccurrenceOutsideComment(e.original,"?",this.test.end):l)+1);if(s){removeLineBreaks(e,c,o.start)}e.remove(this.start,c);if(this.consequent.included){e.remove(l,this.end)}removeAnnotations(this,e);o.render(e,t,{isCalleeOfRenderedParent:i,preventASI:true,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}else{this.test.render(e,t,{renderedSurroundingElement:r});this.consequent.render(e,t);this.alternate.render(e,t)}}getUsedBranch(){if(this.isBranchResolutionAnalysed){return this.usedBranch}this.isBranchResolutionAnalysed=true;const e=this.test.getLiteralValueAtPath($,F,this);return typeof e==="symbol"?null:this.usedBranch=e?this.consequent:this.alternate}}class ContinueStatement extends NodeBase{hasEffects(e){if(this.label){if(!e.ignore.labels.has(this.label.name))return true;e.includedLabels.add(this.label.name);e.brokenFlow=ft}else{if(!e.ignore.continues)return true;e.brokenFlow=pt}return false}include(e){this.included=true;if(this.label){this.label.include();e.includedLabels.add(this.label.name)}e.brokenFlow=this.label?ft:pt}}class DoWhileStatement extends NodeBase{hasEffects(e){if(this.test.hasEffects(e))return true;const{brokenFlow:t,ignore:{breaks:i,continues:s}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=i;e.ignore.continues=s;e.brokenFlow=t;return false}include(e,t){this.included=true;this.test.include(e,t);const{brokenFlow:i}=e;this.body.include(e,t,{asSingleStatement:true});e.brokenFlow=i}}class EmptyStatement extends NodeBase{hasEffects(){return false}}class ExportAllDeclaration extends NodeBase{hasEffects(){return false}initialise(){this.context.addExport(this)}render(e,t,i){e.remove(i.start,i.end)}applyDeoptimizations(){}}ExportAllDeclaration.prototype.needsBoundaries=true;class FunctionDeclaration extends FunctionNode{initialise(){super.initialise();if(this.id!==null){this.id.variable.isId=true}}parseNode(e){if(e.id!==null){this.id=new Identifier(e.id,this,this.scope.parent)}super.parseNode(e)}}function getDeclarationStart(e,t){return findNonWhiteSpace(e,findFirstOccurrenceOutsideComment(e,"default",t)+7)}function getIdInsertPosition(e,t,i,s){const n=findFirstOccurrenceOutsideComment(e,t,s)+t.length;e=e.slice(n,findFirstOccurrenceOutsideComment(e,i,n));const r=findFirstOccurrenceOutsideComment(e,"*");if(r===-1){return n}return n+r+1}class ExportDefaultDeclaration extends NodeBase{include(e,t){super.include(e,t);if(t){this.context.includeVariableInModule(this.variable)}}initialise(){const e=this.declaration;this.declarationName=e.id&&e.id.name||this.declaration.name;this.variable=this.scope.addExportDefaultDeclaration(this.declarationName||this.context.getModuleName(),this,this.context);this.context.addExport(this)}render(e,t,i){const{start:s,end:n}=i;const r=getDeclarationStart(e.original,this.start);if(this.declaration instanceof FunctionDeclaration){this.renderNamedDeclaration(e,r,"function","(",this.declaration.id===null,t)}else if(this.declaration instanceof ClassDeclaration){this.renderNamedDeclaration(e,r,"class","{",this.declaration.id===null,t)}else if(this.variable.getOriginalVariable()!==this.variable){treeshakeNode(this,e,s,n);return}else if(this.variable.included){this.renderVariableDeclaration(e,r,t)}else{e.remove(this.start,r);this.declaration.render(e,t,{renderedSurroundingElement:Dt});if(e.original[this.end-1]!==";"){e.appendLeft(this.end,";")}return}this.declaration.render(e,t)}applyDeoptimizations(){}renderNamedDeclaration(e,t,i,s,n,r){const{exportNamesByVariable:o,format:l,snippets:{getPropertyAccess:c}}=r;const u=this.variable.getName(c);e.remove(this.start,t);if(n){e.appendLeft(getIdInsertPosition(e.original,i,s,t),` ${u}`)}if(l==="system"&&this.declaration instanceof ClassDeclaration&&o.has(this.variable)){e.appendLeft(this.end,` ${getSystemExportStatement([this.variable],r)};`)}}renderVariableDeclaration(e,t,{format:i,exportNamesByVariable:s,snippets:{cnst:n,getPropertyAccess:r}}){const o=e.original.charCodeAt(this.end-1)===59;const l=i==="system"&&s.get(this.variable);if(l){e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = exports('${l[0]}', `);e.appendRight(o?this.end-1:this.end,")"+(o?"":";"))}else{e.overwrite(this.start,t,`${n} ${this.variable.getName(r)} = `);if(!o){e.appendLeft(this.end,";")}}}}ExportDefaultDeclaration.prototype.needsBoundaries=true;class ExportNamedDeclaration extends NodeBase{bind(){var e;(e=this.declaration)===null||e===void 0?void 0:e.bind()}hasEffects(e){var t;return!!((t=this.declaration)===null||t===void 0?void 0:t.hasEffects(e))}initialise(){this.context.addExport(this)}render(e,t,i){const{start:s,end:n}=i;if(this.declaration===null){e.remove(s,n)}else{e.remove(this.start,this.declaration.start);this.declaration.render(e,t,{end:n,start:s})}}applyDeoptimizations(){}}ExportNamedDeclaration.prototype.needsBoundaries=true;class ExportSpecifier extends NodeBase{applyDeoptimizations(){}}class ForInStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){const{deoptimized:t,left:i,right:s}=this;if(!t)this.applyDeoptimizations();if(i.hasEffectsAsAssignmentTarget(e,false)||s.hasEffects(e))return true;const{brokenFlow:n,ignore:{breaks:r,continues:o}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=r;e.ignore.continues=o;e.brokenFlow=n;return false}include(e,t){const{body:i,deoptimized:s,left:n,right:r}=this;if(!s)this.applyDeoptimizations();this.included=true;n.includeAsAssignmentTarget(e,t||true,false);r.include(e,t);const{brokenFlow:o}=e;i.include(e,t,{asSingleStatement:true});e.brokenFlow=o}initialise(){this.left.setAssignedValue(z)}render(e,t){this.left.render(e,t,Oi);this.right.render(e,t,Oi);if(e.original.charCodeAt(this.right.start-1)===110){e.prependLeft(this.right.start," ")}this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.context.requestTreeshakingPass()}}class ForOfStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(){if(!this.deoptimized)this.applyDeoptimizations();return true}include(e,t){const{body:i,deoptimized:s,left:n,right:r}=this;if(!s)this.applyDeoptimizations();this.included=true;n.includeAsAssignmentTarget(e,t||true,false);r.include(e,t);const{brokenFlow:o}=e;i.include(e,t,{asSingleStatement:true});e.brokenFlow=o}initialise(){this.left.setAssignedValue(z)}render(e,t){this.left.render(e,t,Oi);this.right.render(e,t,Oi);if(e.original.charCodeAt(this.right.start-1)===102){e.prependLeft(this.right.start," ")}this.body.render(e,t)}applyDeoptimizations(){this.deoptimized=true;this.left.deoptimizePath($);this.context.requestTreeshakingPass()}}class ForStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){var t,i,s;if(((t=this.init)===null||t===void 0?void 0:t.hasEffects(e))||((i=this.test)===null||i===void 0?void 0:i.hasEffects(e))||((s=this.update)===null||s===void 0?void 0:s.hasEffects(e)))return true;const{brokenFlow:n,ignore:{breaks:r,continues:o}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=r;e.ignore.continues=o;e.brokenFlow=n;return false}include(e,t){var i,s,n;this.included=true;(i=this.init)===null||i===void 0?void 0:i.include(e,t,{asSingleStatement:true});(s=this.test)===null||s===void 0?void 0:s.include(e,t);const{brokenFlow:r}=e;(n=this.update)===null||n===void 0?void 0:n.include(e,t);this.body.include(e,t,{asSingleStatement:true});e.brokenFlow=r}render(e,t){var i,s,n;(i=this.init)===null||i===void 0?void 0:i.render(e,t,Oi);(s=this.test)===null||s===void 0?void 0:s.render(e,t,Oi);(n=this.update)===null||n===void 0?void 0:n.render(e,t,Oi);this.body.render(e,t)}}class FunctionExpression extends FunctionNode{render(e,t,{renderedSurroundingElement:i}=X){super.render(e,t);if(i===Dt){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}}class TrackingScope extends BlockScope{constructor(){super(...arguments);this.hoistedDeclarations=[]}addDeclaration(e,t,i,s){this.hoistedDeclarations.push(e);return super.addDeclaration(e,t,i,s)}}const Fi=Symbol("unset");class IfStatement extends NodeBase{constructor(){super(...arguments);this.testValue=Fi}deoptimizeCache(){this.testValue=V}hasEffects(e){var t;if(this.test.hasEffects(e)){return true}const i=this.getTestValue();if(typeof i==="symbol"){const{brokenFlow:t}=e;if(this.consequent.hasEffects(e))return true;const i=e.brokenFlow;e.brokenFlow=t;if(this.alternate===null)return false;if(this.alternate.hasEffects(e))return true;e.brokenFlow=e.brokenFlow<i?e.brokenFlow:i;return false}return i?this.consequent.hasEffects(e):!!((t=this.alternate)===null||t===void 0?void 0:t.hasEffects(e))}include(e,t){this.included=true;if(t){this.includeRecursively(t,e)}else{const t=this.getTestValue();if(typeof t==="symbol"){this.includeUnknownTest(e)}else{this.includeKnownTest(e,t)}}}parseNode(e){this.consequentScope=new TrackingScope(this.scope);this.consequent=new(this.context.getNodeConstructor(e.consequent.type))(e.consequent,this,this.consequentScope);if(e.alternate){this.alternateScope=new TrackingScope(this.scope);this.alternate=new(this.context.getNodeConstructor(e.alternate.type))(e.alternate,this,this.alternateScope)}super.parseNode(e)}render(e,t){const{snippets:{getPropertyAccess:i}}=t;const s=this.getTestValue();const n=[];const r=this.test.included;const o=!this.context.options.treeshake;if(r){this.test.render(e,t)}else{e.remove(this.start,this.consequent.start)}if(this.consequent.included&&(o||typeof s==="symbol"||s)){this.consequent.render(e,t)}else{e.overwrite(this.consequent.start,this.consequent.end,r?";":"");n.push(...this.consequentScope.hoistedDeclarations)}if(this.alternate){if(this.alternate.included&&(o||typeof s==="symbol"||!s)){if(r){if(e.original.charCodeAt(this.alternate.start-1)===101){e.prependLeft(this.alternate.start," ")}}else{e.remove(this.consequent.end,this.alternate.start)}this.alternate.render(e,t)}else{if(r&&this.shouldKeepAlternateBranch()){e.overwrite(this.alternate.start,this.end,";")}else{e.remove(this.consequent.end,this.end)}n.push(...this.alternateScope.hoistedDeclarations)}}this.renderHoistedDeclarations(n,e,i)}applyDeoptimizations(){}getTestValue(){if(this.testValue===Fi){return this.testValue=this.test.getLiteralValueAtPath($,F,this)}return this.testValue}includeKnownTest(e,t){var i;if(this.test.shouldBeIncluded(e)){this.test.include(e,false)}if(t&&this.consequent.shouldBeIncluded(e)){this.consequent.include(e,false,{asSingleStatement:true})}if(!t&&((i=this.alternate)===null||i===void 0?void 0:i.shouldBeIncluded(e))){this.alternate.include(e,false,{asSingleStatement:true})}}includeRecursively(e,t){var i;this.test.include(t,e);this.consequent.include(t,e);(i=this.alternate)===null||i===void 0?void 0:i.include(t,e)}includeUnknownTest(e){var t;this.test.include(e,false);const{brokenFlow:i}=e;let s=dt;if(this.consequent.shouldBeIncluded(e)){this.consequent.include(e,false,{asSingleStatement:true});s=e.brokenFlow;e.brokenFlow=i}if((t=this.alternate)===null||t===void 0?void 0:t.shouldBeIncluded(e)){this.alternate.include(e,false,{asSingleStatement:true});e.brokenFlow=e.brokenFlow<s?e.brokenFlow:s}}renderHoistedDeclarations(e,t,i){const s=[...new Set(e.map((e=>{const t=e.variable;return t.included?t.getName(i):""})))].filter(Boolean).join(", ");if(s){const e=this.parent.type;const i=e!==zt&&e!==Rt;t.prependRight(this.start,`${i?"{ ":""}var ${s}; `);if(i){t.appendLeft(this.end,` }`)}}}shouldKeepAlternateBranch(){let e=this.parent;do{if(e instanceof IfStatement&&e.alternate){return true}if(e instanceof BlockStatement){return false}e=e.parent}while(e);return false}}class ImportDeclaration extends NodeBase{bind(){}hasEffects(){return false}initialise(){this.context.addImport(this)}render(e,t,i){e.remove(i.start,i.end)}applyDeoptimizations(){}}ImportDeclaration.prototype.needsBoundaries=true;class ImportDefaultSpecifier extends NodeBase{applyDeoptimizations(){}}const Vi="_interopDefault";const Bi="_interopDefaultLegacy";const zi="_interopNamespace";const Ui="_interopNamespaceDefault";const Hi="_interopNamespaceDefaultOnly";const ji="_mergeNamespaces";const Gi={auto:Vi,default:null,defaultOnly:null,esModule:null,false:null,true:Bi};const isDefaultAProperty=(e,t)=>e==="esModule"||t&&(e==="auto"||e==="true");const Wi={auto:zi,default:Ui,defaultOnly:Hi,esModule:null,false:null,true:zi};const canDefaultBeTakenFromNamespace=(e,t)=>isDefaultAProperty(e,t)&&Gi[e]===Vi;const getHelpersBlock=(e,t,i,s,n,r,o)=>{const l=new Set(e);for(const e of Ki){if(t.has(e)){l.add(e)}}return Ki.map((e=>l.has(e)?qi[e](i,s,n,r,o,l):"")).join("")};const qi={[Bi](e,t,i){const{_:s,getDirectReturnFunction:n,n:r}=t;const[o,l]=n(["e"],{functionReturn:true,lineBreakIndent:null,name:Bi});return`${o}e${s}&&${s}typeof e${s}===${s}'object'${s}&&${s}'default'${s}in e${s}?${s}`+`${i?getDefaultLiveBinding(t):getDefaultStatic(t)}${l}${r}${r}`},[Vi](e,t,i){const{_:s,getDirectReturnFunction:n,n:r}=t;const[o,l]=n(["e"],{functionReturn:true,lineBreakIndent:null,name:Vi});return`${o}e${s}&&${s}e.__esModule${s}?${s}`+`${i?getDefaultLiveBinding(t):getDefaultStatic(t)}${l}${r}${r}`},[Hi](e,t,i,s,n){const{getDirectReturnFunction:r,getObject:o,n:l}=t;const[c,u]=r(["e"],{functionReturn:true,lineBreakIndent:null,name:Hi});return`${c}${getFrozen(s,getWithToStringTag(n,o([["__proto__","null"],["default","e"]],{lineBreakIndent:null}),t))}${u}${l}${l}`},[Ui](e,t,i,s,n){const{_:r,n:o}=t;return`function ${Ui}(e)${r}{${o}`+createNamespaceObject(e,e,t,i,s,n)+`}${o}${o}`},[zi](e,t,i,s,n,r){const{_:o,getDirectReturnFunction:l,n:c}=t;if(r.has(Ui)){const[e,t]=l(["e"],{functionReturn:true,lineBreakIndent:null,name:zi});return`${e}e${o}&&${o}e.__esModule${o}?${o}e${o}:${o}${Ui}(e)${t}${c}${c}`}return`function ${zi}(e)${o}{${c}`+`${e}if${o}(e${o}&&${o}e.__esModule)${o}return e;${c}`+createNamespaceObject(e,e,t,i,s,n)+`}${c}${c}`},[ji](e,t,i,s,n){const{_:r,cnst:o,n:l}=t;const c=o==="var"&&i;return`function ${ji}(n, m)${r}{${l}`+`${e}${loopOverNamespaces(`{${l}`+`${e}${e}${e}if${r}(k${r}!==${r}'default'${r}&&${r}!(k in n))${r}{${l}`+(i?c?copyOwnPropertyLiveBinding:copyPropertyLiveBinding:copyPropertyStatic)(e,e+e+e+e,t)+`${e}${e}${e}}${l}`+`${e}${e}}`,c,e,t)}${l}`+`${e}return ${getFrozen(s,getWithToStringTag(n,"n",t))};${l}`+`}${l}${l}`}};const getDefaultLiveBinding=({_:e,getObject:t})=>`e${e}:${e}${t([["default","e"]],{lineBreakIndent:null})}`;const getDefaultStatic=({_:e,getPropertyAccess:t})=>`e${t("default")}${e}:${e}e`;const createNamespaceObject=(e,t,i,s,n,r)=>{const{_:o,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}=i;const p=`{${h}`+(s?copyNonDefaultOwnPropertyLiveBinding:copyPropertyStatic)(e,t+e+e,i)+`${t}${e}}`;return`${t}${l} n${o}=${o}Object.create(null${r?`,${o}{${o}[Symbol.toStringTag]:${o}${getToStringTagValue(c)}${o}}`:""});${h}`+`${t}if${o}(e)${o}{${h}`+`${t}${e}${loopOverKeys(p,!s,i)}${h}`+`${t}}${h}`+`${t}n${u("default")}${o}=${o}e;${h}`+`${t}return ${getFrozen(n,"n")}${d}${h}`};const loopOverKeys=(e,t,{_:i,cnst:s,getFunctionIntro:n,s:r})=>s!=="var"||t?`for${i}(${s} k in e)${i}${e}`:`Object.keys(e).forEach(${n(["k"],{isAsync:false,name:null})}${e})${r}`;const loopOverNamespaces=(e,t,i,{_:s,cnst:n,getDirectReturnFunction:r,getFunctionIntro:o,n:l})=>{if(t){const[t,n]=r(["e"],{functionReturn:false,lineBreakIndent:{base:i,t:i},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:false,name:null})}${e})${n});`}return`for${s}(var i${s}=${s}0;${s}i${s}<${s}m.length;${s}i++)${s}{${l}`+`${i}${i}${n} e${s}=${s}m[i];${l}`+`${i}${i}if${s}(typeof e${s}!==${s}'string'${s}&&${s}!Array.isArray(e))${s}{${s}for${s}(${n} k in e)${s}${e}${s}}${l}${i}}`};const copyNonDefaultOwnPropertyLiveBinding=(e,t,i)=>{const{_:s,n:n}=i;return`${t}if${s}(k${s}!==${s}'default')${s}{${n}`+copyOwnPropertyLiveBinding(e,t+e,i)+`${t}}${n}`};const copyOwnPropertyLiveBinding=(e,t,{_:i,cnst:s,getDirectReturnFunction:n,n:r})=>{const[o,l]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`${t}${s} d${i}=${i}Object.getOwnPropertyDescriptor(e,${i}k);${r}`+`${t}Object.defineProperty(n,${i}k,${i}d.get${i}?${i}d${i}:${i}{${r}`+`${t}${e}enumerable:${i}true,${r}`+`${t}${e}get:${i}${o}e[k]${l}${r}`+`${t}});${r}`};const copyPropertyLiveBinding=(e,t,{_:i,cnst:s,getDirectReturnFunction:n,n:r})=>{const[o,l]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`${t}${s} d${i}=${i}Object.getOwnPropertyDescriptor(e,${i}k);${r}`+`${t}if${i}(d)${i}{${r}`+`${t}${e}Object.defineProperty(n,${i}k,${i}d.get${i}?${i}d${i}:${i}{${r}`+`${t}${e}${e}enumerable:${i}true,${r}`+`${t}${e}${e}get:${i}${o}e[k]${l}${r}`+`${t}${e}});${r}`+`${t}}${r}`};const copyPropertyStatic=(e,t,{_:i,n:s})=>`${t}n[k]${i}=${i}e[k];${s}`;const getFrozen=(e,t)=>e?`Object.freeze(${t})`:t;const getWithToStringTag=(e,t,{_:i,getObject:s})=>e?`Object.defineProperty(${t},${i}Symbol.toStringTag,${i}${getToStringTagValue(s)})`:t;const Ki=Object.keys(qi);function getToStringTagValue(e){return e([["value","'Module'"]],{lineBreakIndent:null})}class ImportExpression extends NodeBase{constructor(){super(...arguments);this.inlineNamespace=null;this.mechanism=null;this.resolution=null}hasEffects(){return true}include(e,t){if(!this.included){this.included=true;this.context.includeDynamicImport(this);this.scope.addAccessedDynamicImport(this)}this.source.include(e,t)}initialise(){this.context.addDynamicImport(this)}render(e,t){if(this.inlineNamespace){const{snippets:{getDirectReturnFunction:i,getPropertyAccess:s}}=t;const[n,r]=i([],{functionReturn:true,lineBreakIndent:null,name:null});e.overwrite(this.start,this.end,`Promise.resolve().then(${n}${this.inlineNamespace.getName(s)}${r})`,{contentOnly:true});return}if(this.mechanism){e.overwrite(this.start,findFirstOccurrenceOutsideComment(e.original,"(",this.start+6)+1,this.mechanism.left,{contentOnly:true});e.overwrite(this.end-1,this.end,this.mechanism.right,{contentOnly:true})}this.source.render(e,t)}renderFinalResolution(e,t,i,{getDirectReturnFunction:s}){e.overwrite(this.source.start,this.source.end,t);if(i){const[t,n]=s(["n"],{functionReturn:true,lineBreakIndent:null,name:null});e.prependLeft(this.end,`.then(${t}n.${i}${n})`)}}setExternalResolution(e,t,i,s,n,r){const{format:o}=i;this.inlineNamespace=null;this.resolution=t;const l=[...Yi[o]||[]];let c;({helper:c,mechanism:this.mechanism}=this.getDynamicImportMechanismAndHelper(t,e,i,s,n));if(c){l.push(c)}if(l.length>0){this.scope.addAccessedGlobals(l,r)}}setInternalResolution(e){this.inlineNamespace=e}applyDeoptimizations(){}getDynamicImportMechanismAndHelper(e,t,{compact:i,dynamicImportFunction:s,format:n,generatedCode:{arrowFunctions:r},interop:o},{_:l,getDirectReturnFunction:c,getDirectReturnIifeLeft:u},h){const d=h.hookFirstSync("renderDynamicImport",[{customResolution:typeof this.resolution==="string"?this.resolution:null,format:n,moduleId:this.context.module.id,targetModuleId:this.resolution&&typeof this.resolution!=="string"?this.resolution.id:null}]);if(d){return{helper:null,mechanism:d}}const p=!this.resolution||typeof this.resolution==="string";switch(n){case"cjs":{const i=getInteropHelper(e,t,o);let s=`require(`;let n=`)`;if(i){s=`/*#__PURE__*/${i}(${s}`;n+=")"}const[l,h]=c([],{functionReturn:true,lineBreakIndent:null,name:null});s=`Promise.resolve().then(${l}${s}`;n+=`${h})`;if(!r&&p){s=u(["t"],`${s}t${n}`,{needsArrowReturnParens:false,needsWrappedFunction:true});n=")"}return{helper:i,mechanism:{left:s,right:n}}}case"amd":{const s=i?"c":"resolve";const n=i?"e":"reject";const h=getInteropHelper(e,t,o);const[d,f]=c(["m"],{functionReturn:false,lineBreakIndent:null,name:null});const m=h?`${d}${s}(/*#__PURE__*/${h}(m))${f}`:s;const[g,y]=c([s,n],{functionReturn:false,lineBreakIndent:null,name:null});let E=`new Promise(${g}require([`;let x=`],${l}${m},${l}${n})${y})`;if(!r&&p){E=u(["t"],`${E}t${x}`,{needsArrowReturnParens:false,needsWrappedFunction:true});x=")"}return{helper:h,mechanism:{left:E,right:x}}}case"system":return{helper:null,mechanism:{left:"module.import(",right:")"}};case"es":if(s){return{helper:null,mechanism:{left:`${s}(`,right:")"}}}}return{helper:null,mechanism:null}}}function getInteropHelper(e,t,i){return t==="external"?Wi[String(i(e instanceof ExternalModule?e.id:null))]:t==="default"?Hi:null}const Yi={amd:["require"],cjs:["require"],system:["module"]};class ImportNamespaceSpecifier extends NodeBase{applyDeoptimizations(){}}class ImportSpecifier extends NodeBase{applyDeoptimizations(){}}class LabeledStatement extends NodeBase{hasEffects(e){const t=e.brokenFlow;e.ignore.labels.add(this.label.name);if(this.body.hasEffects(e))return true;e.ignore.labels.delete(this.label.name);if(e.includedLabels.has(this.label.name)){e.includedLabels.delete(this.label.name);e.brokenFlow=t}return false}include(e,t){this.included=true;const i=e.brokenFlow;this.body.include(e,t);if(t||e.includedLabels.has(this.label.name)){this.label.include();e.includedLabels.delete(this.label.name);e.brokenFlow=i}}render(e,t){if(this.label.included){this.label.render(e,t)}else{e.remove(this.start,findNonWhiteSpace(e.original,findFirstOccurrenceOutsideComment(e.original,":",this.label.end)+1))}this.body.render(e,t)}}class LogicalExpression extends NodeBase{constructor(){super(...arguments);this.expressionsToBeDeoptimized=[];this.isBranchResolutionAnalysed=false;this.usedBranch=null}deoptimizeCache(){if(this.usedBranch){const e=this.usedBranch===this.left?this.right:this.left;this.usedBranch=null;e.deoptimizePath(O);for(const e of this.expressionsToBeDeoptimized){e.deoptimizeCache()}this.context.requestTreeshakingPass()}}deoptimizePath(e){const t=this.getUsedBranch();if(!t){this.left.deoptimizePath(e);this.right.deoptimizePath(e)}else{t.deoptimizePath(e)}}deoptimizeThisOnInteractionAtPath(e,t,i){this.left.deoptimizeThisOnInteractionAtPath(e,t,i);this.right.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){const s=this.getUsedBranch();if(!s)return V;this.expressionsToBeDeoptimized.push(i);return s.getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){const n=this.getUsedBranch();if(!n)return new MultiExpression([this.left.getReturnExpressionWhenCalledAtPath(e,t,i,s),this.right.getReturnExpressionWhenCalledAtPath(e,t,i,s)]);this.expressionsToBeDeoptimized.push(s);return n.getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffects(e){if(this.left.hasEffects(e)){return true}if(this.getUsedBranch()!==this.left){return this.right.hasEffects(e)}return false}hasEffectsOnInteractionAtPath(e,t,i){const s=this.getUsedBranch();if(!s){return this.left.hasEffectsOnInteractionAtPath(e,t,i)||this.right.hasEffectsOnInteractionAtPath(e,t,i)}return s.hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.getUsedBranch();if(t||i===this.right&&this.left.shouldBeIncluded(e)||!i){this.left.include(e,t);this.right.include(e,t)}else{i.include(e,t)}}render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n,renderedSurroundingElement:r}=X){if(!this.left.included||!this.right.included){const o=findFirstOccurrenceOutsideComment(e.original,this.operator,this.left.end);if(this.right.included){const t=findNonWhiteSpace(e.original,o+2);e.remove(this.start,t);if(s){removeLineBreaks(e,t,this.right.start)}}else{e.remove(o,this.end)}removeAnnotations(this,e);this.getUsedBranch().render(e,t,{isCalleeOfRenderedParent:i,preventASI:s,renderedParentType:n||this.parent.type,renderedSurroundingElement:r||this.parent.type})}else{this.left.render(e,t,{preventASI:s,renderedSurroundingElement:r});this.right.render(e,t)}}getUsedBranch(){if(!this.isBranchResolutionAnalysed){this.isBranchResolutionAnalysed=true;const e=this.left.getLiteralValueAtPath($,F,this);if(typeof e==="symbol"){return null}else{this.usedBranch=this.operator==="||"&&e||this.operator==="&&"&&!e||this.operator==="??"&&e!=null?this.left:this.right}}return this.usedBranch}}const Xi="ROLLUP_ASSET_URL_";const Qi="ROLLUP_CHUNK_URL_";const Zi="ROLLUP_FILE_URL_";class MetaProperty extends NodeBase{addAccessedGlobals(e,t){const i=this.metaProperty;const s=(i&&(i.startsWith(Zi)||i.startsWith(Xi)||i.startsWith(Qi))?ts:Ji)[e];if(s.length>0){this.scope.addAccessedGlobals(s,t)}}getReferencedFileName(e){const t=this.metaProperty;if(t&&t.startsWith(Zi)){return e.getFileName(t.substring(Zi.length))}return null}hasEffects(){return false}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t!==U}include(){if(!this.included){this.included=true;if(this.meta.name==="import"){this.context.addImportMeta(this);const e=this.parent;this.metaProperty=e instanceof MemberExpression&&typeof e.propertyKey==="string"?e.propertyKey:null}}}renderFinalMechanism(e,t,i,n,r){var o;const l=this.parent;const c=this.metaProperty;if(c&&(c.startsWith(Zi)||c.startsWith(Xi)||c.startsWith(Qi))){let n=null;let o=null;let u=null;let h;if(c.startsWith(Zi)){n=c.substring(Zi.length);h=r.getFileName(n)}else if(c.startsWith(Xi)){warnDeprecation(`Using the "${Xi}" prefix to reference files is deprecated. Use the "${Zi}" prefix instead.`,true,this.context.options);o=c.substring(Xi.length);h=r.getFileName(o)}else{warnDeprecation(`Using the "${Qi}" prefix to reference files is deprecated. Use the "${Zi}" prefix instead.`,true,this.context.options);u=c.substring(Qi.length);h=r.getFileName(u)}const d=normalize(s.relative(s.dirname(t),h));let p;if(o!==null){p=r.hookFirstSync("resolveAssetUrl",[{assetFileName:h,chunkId:t,format:i,moduleId:this.context.module.id,relativeAssetPath:d}])}if(!p){p=r.hookFirstSync("resolveFileUrl",[{assetReferenceId:o,chunkId:t,chunkReferenceId:u,fileName:h,format:i,moduleId:this.context.module.id,referenceId:n||o||u,relativePath:d}])||is[i](d)}e.overwrite(l.start,l.end,p,{contentOnly:true});return}const u=r.hookFirstSync("resolveImportMeta",[c,{chunkId:t,format:i,moduleId:this.context.module.id}])||((o=ss[i])===null||o===void 0?void 0:o.call(ss,c,{chunkId:t,snippets:n}));if(typeof u==="string"){if(l instanceof MemberExpression){e.overwrite(l.start,l.end,u,{contentOnly:true})}else{e.overwrite(this.start,this.end,u,{contentOnly:true})}}}}const Ji={amd:["document","module","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module"],umd:["document","require","URL"]};const ts={amd:["document","require","URL"],cjs:["document","require","URL"],es:[],iife:["document","URL"],system:["module","URL"],umd:["document","require","URL"]};const getResolveUrl=(e,t="URL")=>`new ${t}(${e}).href`;const getRelativeUrlFromDocument=(e,t=false)=>getResolveUrl(`'${e}', ${t?`typeof document === 'undefined' ? location.href : `:""}document.currentScript && document.currentScript.src || document.baseURI`);const getGenericImportMetaMechanism=e=>(t,{chunkId:i})=>{const s=e(i);return t===null?`({ url: ${s} })`:t==="url"?s:"undefined"};const getUrlFromDocument=(e,t=false)=>`${t?`typeof document === 'undefined' ? location.href : `:""}(document.currentScript && document.currentScript.src || new URL('${e}', document.baseURI).href)`;const is={amd:e=>{if(e[0]!==".")e="./"+e;return getResolveUrl(`require.toUrl('${e}'), document.baseURI`)},cjs:e=>`(typeof document === 'undefined' ? ${getResolveUrl(`'file:' + __dirname + '/${e}'`,`(require('u' + 'rl').URL)`)} : ${getRelativeUrlFromDocument(e)})`,es:e=>getResolveUrl(`'${e}', import.meta.url`),iife:e=>getRelativeUrlFromDocument(e),system:e=>getResolveUrl(`'${e}', module.meta.url`),umd:e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${getResolveUrl(`'file:' + __dirname + '/${e}'`,`(require('u' + 'rl').URL)`)} : ${getRelativeUrlFromDocument(e,true)})`};const ss={amd:getGenericImportMetaMechanism((()=>getResolveUrl(`module.uri, document.baseURI`))),cjs:getGenericImportMetaMechanism((e=>`(typeof document === 'undefined' ? ${getResolveUrl(`'file:' + __filename`,`(require('u' + 'rl').URL)`)} : ${getUrlFromDocument(e)})`)),iife:getGenericImportMetaMechanism((e=>getUrlFromDocument(e))),system:(e,{snippets:{getPropertyAccess:t}})=>e===null?`module.meta`:`module.meta${t(e)}`,umd:getGenericImportMetaMechanism((e=>`(typeof document === 'undefined' && typeof location === 'undefined' ? ${getResolveUrl(`'file:' + __filename`,`(require('u' + 'rl').URL)`)} : ${getUrlFromDocument(e,true)})`))};class NewExpression extends NodeBase{hasEffects(e){try{for(const t of this.arguments){if(t.hasEffects(e))return true}if(this.context.options.treeshake.annotations&&this.annotations){return false}return this.callee.hasEffects(e)||this.callee.hasEffectsOnInteractionAtPath($,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>0||t!==U}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t)}else{this.included=true;this.callee.include(e,false)}this.callee.includeCallArguments(e,this.arguments)}initialise(){this.interaction={args:this.arguments,thisArg:null,type:j,withNew:true}}render(e,t){this.callee.render(e,t);renderCallArguments(e,t,this)}applyDeoptimizations(){this.deoptimized=true;for(const e of this.arguments){e.deoptimizePath(O)}this.context.requestTreeshakingPass()}}class ObjectExpression extends NodeBase{constructor(){super(...arguments);this.objectEntity=null}deoptimizeCache(){this.getObjectEntity().deoptimizeAllProperties()}deoptimizePath(e){this.getObjectEntity().deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.getObjectEntity().deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.getObjectEntity().getLiteralValueAtPath(e,t,i)}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.getObjectEntity().getReturnExpressionWhenCalledAtPath(e,t,i,s)}hasEffectsOnInteractionAtPath(e,t,i){return this.getObjectEntity().hasEffectsOnInteractionAtPath(e,t,i)}render(e,t,{renderedSurroundingElement:i}=X){super.render(e,t);if(i===Dt||i===Pt){e.appendRight(this.start,"(");e.prependLeft(this.end,")")}}applyDeoptimizations(){}getObjectEntity(){if(this.objectEntity!==null){return this.objectEntity}let e=ai;const t=[];for(const i of this.properties){if(i instanceof SpreadElement){t.push({key:N,kind:"init",property:i});continue}let s;if(i.computed){const e=i.key.getLiteralValueAtPath($,F,this);if(typeof e==="symbol"){t.push({key:N,kind:i.kind,property:i});continue}else{s=String(e)}}else{s=i.key instanceof Identifier?i.key.name:String(i.key.value);if(s==="__proto__"&&i.kind==="init"){e=i.value instanceof Literal&&i.value.value===null?null:i.value;continue}}t.push({key:s,kind:i.kind,property:i})}return this.objectEntity=new ObjectEntity(t,e)}}class PrivateIdentifier extends NodeBase{}class Program extends NodeBase{constructor(){super(...arguments);this.hasCachedEffect=false}hasEffects(e){if(this.hasCachedEffect)return true;for(const t of this.body){if(t.hasEffects(e)){return this.hasCachedEffect=true}}return false}include(e,t){this.included=true;for(const i of this.body){if(t||i.shouldBeIncluded(e)){i.include(e,t)}}}render(e,t){if(this.body.length){renderStatementList(this.body,e,this.start,this.end,t)}else{super.render(e,t)}}applyDeoptimizations(){}}class Property extends MethodBase{constructor(){super(...arguments);this.declarationInit=null}declare(e,t){this.declarationInit=t;return this.value.declare(e,z)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();const t=this.context.options.treeshake.propertyReadSideEffects;return this.parent.type==="ObjectPattern"&&t==="always"||this.key.hasEffects(e)||this.value.hasEffects(e)}markDeclarationReached(){this.value.markDeclarationReached()}render(e,t){if(!this.shorthand){this.key.render(e,t)}this.value.render(e,t,{isShorthandProperty:this.shorthand})}applyDeoptimizations(){this.deoptimized=true;if(this.declarationInit!==null){this.declarationInit.deoptimizePath([N,N]);this.context.requestTreeshakingPass()}}}class PropertyDefinition extends NodeBase{deoptimizePath(e){var t;(t=this.value)===null||t===void 0?void 0:t.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){var s;(s=this.value)===null||s===void 0?void 0:s.deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.value?this.value.getLiteralValueAtPath(e,t,i):V}getReturnExpressionWhenCalledAtPath(e,t,i,s){return this.value?this.value.getReturnExpressionWhenCalledAtPath(e,t,i,s):z}hasEffects(e){var t;return this.key.hasEffects(e)||this.static&&!!((t=this.value)===null||t===void 0?void 0:t.hasEffects(e))}hasEffectsOnInteractionAtPath(e,t,i){return!this.value||this.value.hasEffectsOnInteractionAtPath(e,t,i)}applyDeoptimizations(){}}class ReturnStatement extends NodeBase{hasEffects(e){var t;if(!e.ignore.returnYield||((t=this.argument)===null||t===void 0?void 0:t.hasEffects(e)))return true;e.brokenFlow=ft;return false}include(e,t){var i;this.included=true;(i=this.argument)===null||i===void 0?void 0:i.include(e,t);e.brokenFlow=ft}initialise(){this.scope.addReturnExpression(this.argument||z)}render(e,t){if(this.argument){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+6){e.prependLeft(this.start+6," ")}}}}class SequenceExpression extends NodeBase{deoptimizePath(e){this.expressions[this.expressions.length-1].deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.expressions[this.expressions.length-1].deoptimizeThisOnInteractionAtPath(e,t,i)}getLiteralValueAtPath(e,t,i){return this.expressions[this.expressions.length-1].getLiteralValueAtPath(e,t,i)}hasEffects(e){for(const t of this.expressions){if(t.hasEffects(e))return true}return false}hasEffectsOnInteractionAtPath(e,t,i){return this.expressions[this.expressions.length-1].hasEffectsOnInteractionAtPath(e,t,i)}include(e,t){this.included=true;const i=this.expressions[this.expressions.length-1];for(const s of this.expressions){if(t||s===i&&!(this.parent instanceof ExpressionStatement)||s.shouldBeIncluded(e))s.include(e,t)}}render(e,t,{renderedParentType:i,isCalleeOfRenderedParent:s,preventASI:n}=X){let r=0;let o=null;const l=this.expressions[this.expressions.length-1];for(const{node:c,separator:u,start:h,end:d}of getCommaSeparatedNodesWithBoundaries(this.expressions,e,this.start,this.end)){if(!c.included){treeshakeNode(c,e,h,d);continue}r++;o=u;if(r===1&&n){removeLineBreaks(e,h,c.start)}if(r===1){const n=i||this.parent.type;c.render(e,t,{isCalleeOfRenderedParent:s&&c===l,renderedParentType:n,renderedSurroundingElement:n})}else{c.render(e,t)}}if(o){e.remove(o,this.end)}}}class StaticBlock extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){for(const t of this.body){if(t.hasEffects(e))return true}return false}include(e,t){this.included=true;for(const i of this.body){if(t||i.shouldBeIncluded(e))i.include(e,t)}}render(e,t){if(this.body.length){renderStatementList(this.body,e,this.start+1,this.end-1,t)}else{super.render(e,t)}}}class Super extends NodeBase{bind(){this.variable=this.scope.findVariable("this")}deoptimizePath(e){this.variable.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.variable.deoptimizeThisOnInteractionAtPath(e,t,i)}include(){if(!this.included){this.included=true;this.context.includeVariableInModule(this.variable)}}}class SwitchCase extends NodeBase{hasEffects(e){var t;if((t=this.test)===null||t===void 0?void 0:t.hasEffects(e))return true;for(const t of this.consequent){if(e.brokenFlow)break;if(t.hasEffects(e))return true}return false}include(e,t){var i;this.included=true;(i=this.test)===null||i===void 0?void 0:i.include(e,t);for(const i of this.consequent){if(t||i.shouldBeIncluded(e))i.include(e,t)}}render(e,t,i){if(this.consequent.length){this.test&&this.test.render(e,t);const s=this.test?this.test.end:findFirstOccurrenceOutsideComment(e.original,"default",this.start)+7;const n=findFirstOccurrenceOutsideComment(e.original,":",s)+1;renderStatementList(this.consequent,e,n,i.end,t)}else{super.render(e,t)}}}SwitchCase.prototype.needsBoundaries=true;class SwitchStatement extends NodeBase{createScope(e){this.scope=new BlockScope(e)}hasEffects(e){if(this.discriminant.hasEffects(e))return true;const{brokenFlow:t,ignore:{breaks:i}}=e;let s=Infinity;e.ignore.breaks=true;for(const i of this.cases){if(i.hasEffects(e))return true;s=e.brokenFlow<s?e.brokenFlow:s;e.brokenFlow=t}if(this.defaultCase!==null&&!(s===pt)){e.brokenFlow=s}e.ignore.breaks=i;return false}include(e,t){this.included=true;this.discriminant.include(e,t);const{brokenFlow:i}=e;let s=Infinity;let n=t||this.defaultCase!==null&&this.defaultCase<this.cases.length-1;for(let r=this.cases.length-1;r>=0;r--){const o=this.cases[r];if(o.included){n=true}if(!n){const e=createHasEffectsContext();e.ignore.breaks=true;n=o.hasEffects(e)}if(n){o.include(e,t);s=s<e.brokenFlow?s:e.brokenFlow;e.brokenFlow=i}else{s=i}}if(n&&this.defaultCase!==null&&!(s===pt)){e.brokenFlow=s}}initialise(){for(let e=0;e<this.cases.length;e++){if(this.cases[e].test===null){this.defaultCase=e;return}}this.defaultCase=null}render(e,t){this.discriminant.render(e,t);if(this.cases.length>0){renderStatementList(this.cases,e,this.cases[0].start,this.end-1,t)}}}class TaggedTemplateExpression extends CallExpressionBase{bind(){super.bind();if(this.tag.type===Mt){const e=this.tag.name;const t=this.scope.findVariable(e);if(t.isNamespace){this.context.warn({code:"CANNOT_CALL_NAMESPACE",message:`Cannot call a namespace ('${e}')`},this.start)}}}hasEffects(e){try{for(const t of this.quasi.expressions){if(t.hasEffects(e))return true}return this.tag.hasEffects(e)||this.tag.hasEffectsOnInteractionAtPath($,this.interaction,e)}finally{if(!this.deoptimized)this.applyDeoptimizations()}}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();if(t){super.include(e,t)}else{this.included=true;this.tag.include(e,t);this.quasi.include(e,t)}this.tag.includeCallArguments(e,this.interaction.args);const i=this.getReturnExpression();if(!i.included){i.include(e,false)}}initialise(){this.interaction={args:[z,...this.quasi.expressions],thisArg:this.tag instanceof MemberExpression&&!this.tag.variable?this.tag.object:null,type:j,withNew:false}}render(e,t){this.tag.render(e,t,{isCalleeOfRenderedParent:true});this.quasi.render(e,t)}applyDeoptimizations(){this.deoptimized=true;if(this.interaction.thisArg){this.tag.deoptimizeThisOnInteractionAtPath(this.interaction,$,F)}for(const e of this.quasi.expressions){e.deoptimizePath(O)}this.context.requestTreeshakingPass()}getReturnExpression(e=F){if(this.returnExpression===null){this.returnExpression=z;return this.returnExpression=this.tag.getReturnExpressionWhenCalledAtPath($,this.interaction,e,this)}return this.returnExpression}}class TemplateElement extends NodeBase{bind(){}hasEffects(){return false}include(){this.included=true}parseNode(e){this.value=e.value;super.parseNode(e)}render(){}}class TemplateLiteral extends NodeBase{deoptimizeThisOnInteractionAtPath(){}getLiteralValueAtPath(e){if(e.length>0||this.quasis.length!==1){return V}return this.quasis[0].value.cooked}getReturnExpressionWhenCalledAtPath(e){if(e.length!==1){return z}return getMemberReturnExpressionWhenCalled(kt,e[0])}hasEffectsOnInteractionAtPath(e,t,i){if(t.type===U){return e.length>1}if(t.type===j&&e.length===1){return hasMemberEffectWhenCalled(kt,e[0],t,i)}return true}render(e,t){e.indentExclusionRanges.push([this.start,this.end]);super.render(e,t)}}class UndefinedVariable extends Variable{constructor(){super("undefined")}getLiteralValueAtPath(){return undefined}}class ExportDefaultVariable extends LocalVariable{constructor(e,t,i){super(e,t,t.declaration,i);this.hasId=false;this.originalId=null;this.originalVariable=null;const s=t.declaration;if((s instanceof FunctionDeclaration||s instanceof ClassDeclaration)&&s.id){this.hasId=true;this.originalId=s.id}else if(s instanceof Identifier){this.originalId=s}}addReference(e){if(!this.hasId){this.name=e.name}}getAssignedVariableName(){return this.originalId&&this.originalId.name||null}getBaseVariableName(){const e=this.getOriginalVariable();if(e===this){return super.getBaseVariableName()}else{return e.getBaseVariableName()}}getDirectOriginalVariable(){return this.originalId&&(this.hasId||!(this.originalId.isPossibleTDZ()||this.originalId.variable.isReassigned||this.originalId.variable instanceof UndefinedVariable||"syntheticNamespace"in this.originalId.variable))?this.originalId.variable:null}getName(e){const t=this.getOriginalVariable();if(t===this){return super.getName(e)}else{return t.getName(e)}}getOriginalVariable(){if(this.originalVariable)return this.originalVariable;let e=this;let t;const i=new Set;do{i.add(e);t=e;e=t.getDirectOriginalVariable()}while(e instanceof ExportDefaultVariable&&!i.has(e));return this.originalVariable=e||t}}class ModuleScope extends ChildScope{constructor(e,t){super(e);this.context=t;this.variables.set("this",new LocalVariable("this",null,mt,t))}addExportDefaultDeclaration(e,t,i){const s=new ExportDefaultVariable(e,t,i);this.variables.set("default",s);return s}addNamespaceMemberAccess(){}deconflict(e,t,i){for(const s of this.children)s.deconflict(e,t,i)}findLexicalBoundary(){return this}findVariable(e){const t=this.variables.get(e)||this.accessedOutsideVariables.get(e);if(t){return t}const i=this.context.traceVariable(e)||this.parent.findVariable(e);if(i instanceof GlobalVariable){this.accessedOutsideVariables.set(e,i)}return i}}class ThisExpression extends NodeBase{bind(){this.variable=this.scope.findVariable("this")}deoptimizePath(e){this.variable.deoptimizePath(e)}deoptimizeThisOnInteractionAtPath(e,t,i){this.variable.deoptimizeThisOnInteractionAtPath(e.thisArg===this?{...e,thisArg:this.variable}:e,t,i)}hasEffectsOnInteractionAtPath(e,t,i){if(e.length===0){return t.type!==U}return this.variable.hasEffectsOnInteractionAtPath(e,t,i)}include(){if(!this.included){this.included=true;this.context.includeVariableInModule(this.variable)}}initialise(){this.alias=this.scope.findLexicalBoundary()instanceof ModuleScope?this.context.moduleContext:null;if(this.alias==="undefined"){this.context.warn({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:`https://rollupjs.org/guide/en/#error-this-is-undefined`},this.start)}}render(e){if(this.alias!==null){e.overwrite(this.start,this.end,this.alias,{contentOnly:false,storeName:true})}}}class ThrowStatement extends NodeBase{hasEffects(){return true}include(e,t){this.included=true;this.argument.include(e,t);e.brokenFlow=ft}render(e,t){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+5){e.prependLeft(this.start+5," ")}}}class TryStatement extends NodeBase{constructor(){super(...arguments);this.directlyIncluded=false;this.includedLabelsAfterBlock=null}hasEffects(e){var t;return(this.context.options.treeshake.tryCatchDeoptimization?this.block.body.length>0:this.block.hasEffects(e))||!!((t=this.finalizer)===null||t===void 0?void 0:t.hasEffects(e))}include(e,t){var i,s;const n=(i=this.context.options.treeshake)===null||i===void 0?void 0:i.tryCatchDeoptimization;const{brokenFlow:r}=e;if(!this.directlyIncluded||!n){this.included=true;this.directlyIncluded=true;this.block.include(e,n?Jt:t);if(e.includedLabels.size>0){this.includedLabelsAfterBlock=[...e.includedLabels]}e.brokenFlow=r}else if(this.includedLabelsAfterBlock){for(const t of this.includedLabelsAfterBlock){e.includedLabels.add(t)}}if(this.handler!==null){this.handler.include(e,t);e.brokenFlow=r}(s=this.finalizer)===null||s===void 0?void 0:s.include(e,t)}}const ns={"!":e=>!e,"+":e=>+e,"-":e=>-e,delete:()=>V,typeof:e=>typeof e,void:()=>undefined,"~":e=>~e};class UnaryExpression extends NodeBase{getLiteralValueAtPath(e,t,i){if(e.length>0)return V;const s=this.argument.getLiteralValueAtPath($,t,i);if(typeof s==="symbol")return V;return ns[this.operator](s)}hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();if(this.operator==="typeof"&&this.argument instanceof Identifier)return false;return this.argument.hasEffects(e)||this.operator==="delete"&&this.argument.hasEffectsOnInteractionAtPath($,q,e)}hasEffectsOnInteractionAtPath(e,{type:t}){return t!==U||e.length>(this.operator==="void"?0:1)}applyDeoptimizations(){this.deoptimized=true;if(this.operator==="delete"){this.argument.deoptimizePath($);this.context.requestTreeshakingPass()}}}class UnknownNode extends NodeBase{hasEffects(){return true}include(e){super.include(e,true)}}class UpdateExpression extends NodeBase{hasEffects(e){if(!this.deoptimized)this.applyDeoptimizations();return this.argument.hasEffectsAsAssignmentTarget(e,true)}hasEffectsOnInteractionAtPath(e,{type:t}){return e.length>1||t!==U}include(e,t){if(!this.deoptimized)this.applyDeoptimizations();this.included=true;this.argument.includeAsAssignmentTarget(e,t,true)}initialise(){this.argument.setAssignedValue(z)}render(e,t){const{exportNamesByVariable:i,format:s,snippets:{_:n}}=t;this.argument.render(e,t);if(s==="system"){const s=this.argument.variable;const r=i.get(s);if(r){if(this.prefix){if(r.length===1){renderSystemExportExpression(s,this.start,this.end,e,t)}else{renderSystemExportSequenceAfterExpression(s,this.start,this.end,this.parent.type!==Dt,e,t)}}else{const i=this.operator[0];renderSystemExportSequenceBeforeExpression(s,this.start,this.end,this.parent.type!==Dt,e,t,`${n}${i}${n}1`)}}}}applyDeoptimizations(){this.deoptimized=true;this.argument.deoptimizePath($);if(this.argument instanceof Identifier){const e=this.scope.findVariable(this.argument.name);e.isReassigned=true}this.context.requestTreeshakingPass()}}function isReassignedExportsMember(e,t){return e.renderBaseName!==null&&t.has(e)&&e.isReassigned}function areAllDeclarationsIncludedAndNotExported(e,t){for(const i of e){if(!i.id.included)return false;if(i.id.type===Mt){if(t.has(i.id.variable))return false}else{const e=[];i.id.addExportedVariables(e,t);if(e.length>0)return false}}return true}class VariableDeclaration extends NodeBase{deoptimizePath(){for(const e of this.declarations){e.deoptimizePath($)}}hasEffectsOnInteractionAtPath(){return false}include(e,t,{asSingleStatement:i}=X){this.included=true;for(const s of this.declarations){if(t||s.shouldBeIncluded(e))s.include(e,t);if(i){s.id.include(e,t)}}}initialise(){for(const e of this.declarations){e.declareDeclarator(this.kind)}}render(e,t,i=X){if(areAllDeclarationsIncludedAndNotExported(this.declarations,t.exportNamesByVariable)){for(const i of this.declarations){i.render(e,t)}if(!i.isNoStatement&&e.original.charCodeAt(this.end-1)!==59){e.appendLeft(this.end,";")}}else{this.renderReplacedDeclarations(e,t)}}applyDeoptimizations(){}renderDeclarationEnd(e,t,i,s,n,r,o){if(e.original.charCodeAt(this.end-1)===59){e.remove(this.end-1,this.end)}t+=";";if(i!==null){if(e.original.charCodeAt(s-1)===10&&(e.original.charCodeAt(this.end)===10||e.original.charCodeAt(this.end)===13)){s--;if(e.original.charCodeAt(s)===13){s--}}if(s===i+1){e.overwrite(i,n,t)}else{e.overwrite(i,i+1,t);e.remove(s,n)}}else{e.appendLeft(n,t)}if(r.length>0){e.appendLeft(n,` ${getSystemExportStatement(r,o)};`)}}renderReplacedDeclarations(e,t){const i=getCommaSeparatedNodesWithBoundaries(this.declarations,e,this.start+this.kind.length,this.end-(e.original.charCodeAt(this.end-1)===59?1:0));let s,n;n=findNonWhiteSpace(e.original,this.start+this.kind.length);let r=n-1;e.remove(this.start,r);let o=false;let l=false;let c="",u,h;const d=[];const p=gatherSystemExportsAndGetSingleExport(i,t,d);for(const{node:d,start:f,separator:m,contentEnd:g,end:y}of i){if(!d.included){e.remove(f,y);continue}d.render(e,t);u="";h="";if(!d.id.included||d.id instanceof Identifier&&isReassignedExportsMember(d.id.variable,t.exportNamesByVariable)){if(l){c+=";"}o=false}else{if(p&&p===d.id.variable){const i=findFirstOccurrenceOutsideComment(e.original,"=",d.id.end);renderSystemExportExpression(p,findNonWhiteSpace(e.original,i+1),m===null?g:m,e,t)}if(o){c+=","}else{if(l){c+=";"}u+=`${this.kind} `;o=true}}if(n===r+1){e.overwrite(r,n,c+u)}else{e.overwrite(r,r+1,c);e.appendLeft(n,u)}s=g;n=y;l=true;r=m;c=h}this.renderDeclarationEnd(e,c,r,s,n,d,t)}}function gatherSystemExportsAndGetSingleExport(e,t,i){var s;let n=null;if(t.format==="system"){for(const{node:r}of e){if(r.id instanceof Identifier&&r.init&&i.length===0&&((s=t.exportNamesByVariable.get(r.id.variable))===null||s===void 0?void 0:s.length)===1){n=r.id.variable;i.push(n)}else{r.id.addExportedVariables(i,t.exportNamesByVariable)}}if(i.length>1){n=null}else if(n){i.length=0}}return n}class VariableDeclarator extends NodeBase{declareDeclarator(e){this.id.declare(e,this.init||mt)}deoptimizePath(e){this.id.deoptimizePath(e)}hasEffects(e){var t;const i=(t=this.init)===null||t===void 0?void 0:t.hasEffects(e);this.id.markDeclarationReached();return i||this.id.hasEffects(e)}include(e,t){var i;this.included=true;(i=this.init)===null||i===void 0?void 0:i.include(e,t);this.id.markDeclarationReached();if(t||this.id.shouldBeIncluded(e)){this.id.include(e,t)}}render(e,t){const{exportNamesByVariable:i,snippets:{_:s}}=t;const n=this.id.included;if(n){this.id.render(e,t)}else{const t=findFirstOccurrenceOutsideComment(e.original,"=",this.id.end);e.remove(this.start,findNonWhiteSpace(e.original,t+1))}if(this.init){this.init.render(e,t,n?X:{renderedSurroundingElement:Dt})}else if(this.id instanceof Identifier&&isReassignedExportsMember(this.id.variable,i)){e.appendLeft(this.end,`${s}=${s}void 0`)}}applyDeoptimizations(){}}class WhileStatement extends NodeBase{hasEffects(e){if(this.test.hasEffects(e))return true;const{brokenFlow:t,ignore:{breaks:i,continues:s}}=e;e.ignore.breaks=true;e.ignore.continues=true;if(this.body.hasEffects(e))return true;e.ignore.breaks=i;e.ignore.continues=s;e.brokenFlow=t;return false}include(e,t){this.included=true;this.test.include(e,t);const{brokenFlow:i}=e;this.body.include(e,t,{asSingleStatement:true});e.brokenFlow=i}}class YieldExpression extends NodeBase{hasEffects(e){var t;if(!this.deoptimized)this.applyDeoptimizations();return!(e.ignore.returnYield&&!((t=this.argument)===null||t===void 0?void 0:t.hasEffects(e)))}render(e,t){if(this.argument){this.argument.render(e,t,{preventASI:true});if(this.argument.start===this.start+5){e.prependLeft(this.start+5," ")}}}}const rs={ArrayExpression:ArrayExpression,ArrayPattern:ArrayPattern,ArrowFunctionExpression:ArrowFunctionExpression,AssignmentExpression:AssignmentExpression,AssignmentPattern:AssignmentPattern,AwaitExpression:AwaitExpression,BinaryExpression:BinaryExpression,BlockStatement:BlockStatement,BreakStatement:BreakStatement,CallExpression:CallExpression,CatchClause:CatchClause,ChainExpression:ChainExpression,ClassBody:ClassBody,ClassDeclaration:ClassDeclaration,ClassExpression:ClassExpression,ConditionalExpression:ConditionalExpression,ContinueStatement:ContinueStatement,DoWhileStatement:DoWhileStatement,EmptyStatement:EmptyStatement,ExportAllDeclaration:ExportAllDeclaration,ExportDefaultDeclaration:ExportDefaultDeclaration,ExportNamedDeclaration:ExportNamedDeclaration,ExportSpecifier:ExportSpecifier,ExpressionStatement:ExpressionStatement,ForInStatement:ForInStatement,ForOfStatement:ForOfStatement,ForStatement:ForStatement,FunctionDeclaration:FunctionDeclaration,FunctionExpression:FunctionExpression,Identifier:Identifier,IfStatement:IfStatement,ImportDeclaration:ImportDeclaration,ImportDefaultSpecifier:ImportDefaultSpecifier,ImportExpression:ImportExpression,ImportNamespaceSpecifier:ImportNamespaceSpecifier,ImportSpecifier:ImportSpecifier,LabeledStatement:LabeledStatement,Literal:Literal,LogicalExpression:LogicalExpression,MemberExpression:MemberExpression,MetaProperty:MetaProperty,MethodDefinition:MethodDefinition,NewExpression:NewExpression,ObjectExpression:ObjectExpression,ObjectPattern:ObjectPattern,PrivateIdentifier:PrivateIdentifier,Program:Program,Property:Property,PropertyDefinition:PropertyDefinition,RestElement:RestElement,ReturnStatement:ReturnStatement,SequenceExpression:SequenceExpression,SpreadElement:SpreadElement,StaticBlock:StaticBlock,Super:Super,SwitchCase:SwitchCase,SwitchStatement:SwitchStatement,TaggedTemplateExpression:TaggedTemplateExpression,TemplateElement:TemplateElement,TemplateLiteral:TemplateLiteral,ThisExpression:ThisExpression,ThrowStatement:ThrowStatement,TryStatement:TryStatement,UnaryExpression:UnaryExpression,UnknownNode:UnknownNode,UpdateExpression:UpdateExpression,VariableDeclaration:VariableDeclaration,VariableDeclarator:VariableDeclarator,WhileStatement:WhileStatement,YieldExpression:YieldExpression};const as="_missingExportShim";class ExportShimVariable extends Variable{constructor(e){super(as);this.module=e}include(){super.include();this.module.needsExportShim=true}}class NamespaceVariable extends Variable{constructor(e){super(e.getModuleName());this.memberVariables=null;this.mergedNamespaces=[];this.referencedEarly=false;this.references=[];this.context=e;this.module=e.module}addReference(e){this.references.push(e);this.name=e.name}getMemberVariables(){if(this.memberVariables){return this.memberVariables}const e=Object.create(null);for(const t of this.context.getExports().concat(this.context.getReexports())){if(t[0]!=="*"&&t!==this.module.info.syntheticNamedExports){const i=this.context.traceExport(t);if(i){e[t]=i}}}return this.memberVariables=e}include(){this.included=true;this.context.includeAllExports()}prepare(e){if(this.mergedNamespaces.length>0){this.module.scope.addAccessedGlobals([ji],e)}}renderBlock(e){const{exportNamesByVariable:t,format:i,freeze:s,indent:n,namespaceToStringTag:r,snippets:{_:o,cnst:l,getObject:c,getPropertyAccess:u,n:h,s:d}}=e;const p=this.getMemberVariables();const f=Object.entries(p).map((([e,t])=>{if(this.referencedEarly||t.isReassigned){return[null,`get ${e}${o}()${o}{${o}return ${t.getName(u)}${d}${o}}`]}return[e,t.getName(u)]}));f.unshift([null,`__proto__:${o}null`]);let m=c(f,{lineBreakIndent:{base:"",t:n}});if(this.mergedNamespaces.length>0){const e=this.mergedNamespaces.map((e=>e.getName(u)));m=`/*#__PURE__*/${ji}(${m},${o}[${e.join(`,${o}`)}])`}else{if(r){m=`/*#__PURE__*/Object.defineProperty(${m},${o}Symbol.toStringTag,${o}${getToStringTagValue(c)})`}if(s){m=`/*#__PURE__*/Object.freeze(${m})`}}const g=this.getName(u);m=`${l} ${g}${o}=${o}${m};`;if(i==="system"&&t.has(this)){m+=`${h}${getSystemExportStatement([this],e)};`}return m}renderFirst(){return this.referencedEarly}setMergedNamespaces(e){this.mergedNamespaces=e;const t=this.context.getModuleExecIndex();for(const e of this.references){if(e.context.getModuleExecIndex()<=t){this.referencedEarly=true;break}}}}NamespaceVariable.prototype.isNamespace=true;class SyntheticNamedExportVariable extends Variable{constructor(e,t,i){super(t);this.baseVariable=null;this.context=e;this.module=e.module;this.syntheticNamespace=i}getBaseVariable(){if(this.baseVariable)return this.baseVariable;let e=this.syntheticNamespace;while(e instanceof ExportDefaultVariable||e instanceof SyntheticNamedExportVariable){if(e instanceof ExportDefaultVariable){const t=e.getOriginalVariable();if(t===e)break;e=t}if(e instanceof SyntheticNamedExportVariable){e=e.syntheticNamespace}}return this.baseVariable=e}getBaseVariableName(){return this.syntheticNamespace.getBaseVariableName()}getName(e){return`${this.syntheticNamespace.getName(e)}${e(this.name)}`}include(){this.included=true;this.context.includeVariableInModule(this.syntheticNamespace)}setRenderNames(e,t){super.setRenderNames(e,t)}}var os;(function(e){e[e["LOAD_AND_PARSE"]=0]="LOAD_AND_PARSE";e[e["ANALYSE"]=1]="ANALYSE";e[e["GENERATE"]=2]="GENERATE"})(os||(os={}));function getId(e){return e.id}function getOriginalLocation(e,t){const i=e.filter((e=>!!e.mappings));e:while(i.length>0){const e=i.pop();const s=e.mappings[t.line-1];if(s){const e=s.filter((e=>e.length>1));const i=e[e.length-1];for(const s of e){if(s[0]>=t.column||s===i){t={column:s[3],line:s[2]+1};continue e}}}throw new Error("Can't resolve original location of error.")}return t}const NOOP=()=>{};let ls=new Map;function getPersistedLabel(e,t){switch(t){case 1:return`# ${e}`;case 2:return`## ${e}`;case 3:return e;default:return`${" ".repeat(t-4)}- ${e}`}}function timeStartImpl(e,t=3){e=getPersistedLabel(e,t);const i=n.memoryUsage().heapUsed;const s=r.performance.now();const o=ls.get(e);if(o===undefined){ls.set(e,{memory:0,startMemory:i,startTime:s,time:0,totalMemory:0})}else{o.startMemory=i;o.startTime=s}}function timeEndImpl(e,t=3){e=getPersistedLabel(e,t);const i=ls.get(e);if(i!==undefined){const e=n.memoryUsage().heapUsed;i.memory+=e-i.startMemory;i.time+=r.performance.now()-i.startTime;i.totalMemory=Math.max(i.totalMemory,e)}}function getTimings(){const e={};for(const[t,{memory:i,time:s,totalMemory:n}]of ls){e[t]=[s,i,n]}return e}let cs=NOOP;let us=NOOP;const hs=["load","resolveDynamicImport","resolveId","transform"];function getPluginWithTimers(e,t){for(const i of hs){if(i in e){let s=`plugin ${t}`;if(e.name){s+=` (${e.name})`}s+=` - ${i}`;const n=e[i];e[i]=function(...e){cs(s,4);const t=n.apply(this,e);us(s,4);if(t&&typeof t.then==="function"){cs(`${s} (async)`,4);return t.then((e=>{us(`${s} (async)`,4);return e}))}return t}}}return e}function initialiseTimers(e){if(e.perf){ls=new Map;cs=timeStartImpl;us=timeEndImpl;e.plugins=e.plugins.map(getPluginWithTimers)}else{cs=NOOP;us=NOOP}}function markModuleAndImpureDependenciesAsExecuted(e){e.isExecuted=true;const t=[e];const i=new Set;for(const e of t){for(const s of[...e.dependencies,...e.implicitlyLoadedBefore]){if(!(s instanceof ExternalModule)&&!s.isExecuted&&(s.info.moduleSideEffects||e.implicitlyLoadedBefore.has(s))&&!i.has(s.id)){s.isExecuted=true;i.add(s.id);t.push(s)}}}}const ds={identifier:null,localName:as};function getVariableForExportNameRecursive(e,t,i,s,n=new Map){const r=n.get(t);if(r){if(r.has(e)){return s?[null]:error(errCircularReexport(t,e.id))}r.add(e)}else{n.set(t,new Set([e]))}return e.getVariableForExportName(t,{importerForSideEffects:i,isExportAllSearch:s,searchedNamesAndModules:n})}function getAndExtendSideEffectModules(e,t){const i=getOrCreate(t.sideEffectDependenciesByVariable,e,(()=>new Set));let s=e;const n=new Set([s]);while(true){const e=s.module;s=s instanceof ExportDefaultVariable?s.getDirectOriginalVariable():s instanceof SyntheticNamedExportVariable?s.syntheticNamespace:null;if(!s||n.has(s)){break}n.add(s);i.add(e);const t=e.sideEffectDependenciesByVariable.get(s);if(t){for(const e of t){i.add(e)}}}return i}class Module{constructor(e,t,i,s,n,r,o){this.graph=e;this.id=t;this.options=i;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=Infinity;this.implicitlyLoadedAfter=new Set;this.implicitlyLoadedBefore=new Set;this.importDescriptions=new Map;this.importMetas=[];this.importedFromNotTreeshaken=false;this.importers=[];this.includedDynamicImporters=[];this.includedImports=new Set;this.isExecuted=false;this.isUserDefinedEntryPoint=false;this.needsExportShim=false;this.sideEffectDependenciesByVariable=new Map;this.sources=new Set;this.usesTopLevelAwait=false;this.allExportNames=null;this.ast=null;this.exportAllModules=[];this.exportAllSources=new Set;this.exportNamesByVariable=null;this.exportShimVariable=new ExportShimVariable(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=i.moduleContext(t);this.preserveSignature=this.options.preserveEntrySignatures;const l=this;const{dynamicImports:c,dynamicImporters:u,implicitlyLoadedAfter:h,implicitlyLoadedBefore:d,importers:p,reexportDescriptions:f,sources:m}=this;this.info={ast:null,code:null,get dynamicallyImportedIdResolutions(){return c.map((({argument:e})=>typeof e==="string"&&l.resolvedIds[e])).filter(Boolean)},get dynamicallyImportedIds(){return c.map((({id:e})=>e)).filter((e=>e!=null))},get dynamicImporters(){return u.sort()},get hasDefaultExport(){if(!l.ast){return null}return l.exports.has("default")||f.has("default")},get hasModuleSideEffects(){warnDeprecation("Accessing ModuleInfo.hasModuleSideEffects from plugins is deprecated. Please use ModuleInfo.moduleSideEffects instead.",false,i);return this.moduleSideEffects},id:t,get implicitlyLoadedAfterOneOf(){return Array.from(h,getId).sort()},get implicitlyLoadedBefore(){return Array.from(d,getId).sort()},get importedIdResolutions(){return Array.from(m,(e=>l.resolvedIds[e])).filter(Boolean)},get importedIds(){return Array.from(m,(e=>{var t;return(t=l.resolvedIds[e])===null||t===void 0?void 0:t.id})).filter(Boolean)},get importers(){return p.sort()},isEntry:s,isExternal:false,get isIncluded(){if(e.phase!==os.GENERATE){return null}return l.isIncluded()},meta:{...o},moduleSideEffects:n,syntheticNamedExports:r};Object.defineProperty(this.info,"hasModuleSideEffects",{enumerable:false})}basename(){const e=s.basename(this.id);const t=s.extname(this.id);return makeLegal(t?e.slice(0,-t.length):e)}bindReferences(){this.ast.bind()}error(e,t){this.addLocationToLogProps(e,t);return error(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 ExternalModule){this.allExportNames.add(`*${e.id}`);continue}for(const t of e.getAllExportNames()){if(t!=="default")this.allExportNames.add(t)}}if(typeof this.info.syntheticNamedExports==="string"){this.allExportNames.delete(this.info.syntheticNamedExports)}return this.allExportNames}getDependenciesToBeIncluded(){if(this.relevantDependencies)return this.relevantDependencies;this.relevantDependencies=new Set;const e=new Set;const t=new Set;const i=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);if(t){i.add(t)}}}for(let s of i){const i=this.sideEffectDependenciesByVariable.get(s);if(i){for(const e of i){t.add(e)}}if(s instanceof SyntheticNamedExportVariable){s=s.getBaseVariable()}else if(s instanceof ExportDefaultVariable){s=s.getOriginalVariable()}e.add(s.module)}if(!this.options.treeshake||this.info.moduleSideEffects==="no-treeshake"){for(const e of this.dependencies){this.relevantDependencies.add(e)}}else{this.addRelevantSideEffectDependencies(this.relevantDependencies,e,t)}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[i]=this.getVariableForExportName(t);if(i instanceof ExportDefaultVariable){i=i.getOriginalVariable()}if(!i||!(i.included||i instanceof ExternalVariable)){continue}const s=e.get(i);if(s){s.push(t)}else{e.set(i,[t])}}return this.exportNamesByVariable=e}getExports(){return Array.from(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 ExternalModule){e.add(`*${t.id}`)}else{for(const i of[...t.getReexports(),...t.getExports()]){if(i!=="default")e.add(i)}}}return this.transitiveReexports=[...e]}getRenderedExports(){const e=[];const t=[];for(const i of this.exports.keys()){const[s]=this.getVariableForExportName(i);(s&&s.included?e:t).push(i)}return{removedExports:t,renderedExports:e}}getSyntheticNamespace(){if(this.syntheticNamespace===null){this.syntheticNamespace=undefined;[this.syntheticNamespace]=this.getVariableForExportName(typeof this.info.syntheticNamedExports==="string"?this.info.syntheticNamedExports:"default",{onlyExplicit:true})}if(!this.syntheticNamespace){return error(errSyntheticNamedExportsNeedNamespaceExport(this.id,this.info.syntheticNamedExports))}return this.syntheticNamespace}getVariableForExportName(e,{importerForSideEffects:t,isExportAllSearch:i,onlyExplicit:s,searchedNamesAndModules:n}=Q){var r;if(e[0]==="*"){if(e.length===1){return[this.namespace]}const t=this.graph.modulesById.get(e.slice(1));return t.getVariableForExportName("*")}const o=this.reexportDescriptions.get(e);if(o){const[e]=getVariableForExportNameRecursive(o.module,o.localName,t,false,n);if(!e){return this.error(errMissingExport(o.localName,this.id,o.module.id),o.start)}if(t){setAlternativeExporterIfCyclic(e,t,this)}return[e]}const l=this.exports.get(e);if(l){if(l===ds){return[this.exportShimVariable]}const e=l.localName;const i=this.traceVariable(e,{importerForSideEffects:t,searchedNamesAndModules:n});if(t){getOrCreate(t.sideEffectDependenciesByVariable,i,(()=>new Set)).add(this);setAlternativeExporterIfCyclic(i,t,this)}return[i]}if(s){return[null]}if(e!=="default"){const i=(r=this.namespaceReexportsByName.get(e))!==null&&r!==void 0?r:this.getVariableFromNamespaceReexports(e,t,n);this.namespaceReexportsByName.set(e,i);if(i[0]){return i}}if(this.info.syntheticNamedExports){return[getOrCreate(this.syntheticExports,e,(()=>new SyntheticNamedExportVariable(this.astContext,e,this.getSyntheticNamespace())))]}if(!i){if(this.options.shimMissingExports){this.shimMissingExport(e);return[this.exportShimVariable]}}return[null]}hasEffects(){return this.info.moduleSideEffects==="no-treeshake"||this.ast.included&&this.ast.hasEffects(createHasEffectsContext())}include(){const e=createInclusionContext();if(this.ast.shouldBeIncluded(e))this.ast.include(e,false)}includeAllExports(e){if(!this.isExecuted){markModuleAndImpureDependenciesAsExecuted(this);this.graph.needsTreeshakingPass=true}for(const t of this.exports.keys()){if(e||t!==this.info.syntheticNamedExports){const e=this.getVariableForExportName(t)[0];e.deoptimizePath(O);if(!e.included){this.includeVariable(e)}}}for(const e of this.getReexports()){const[t]=this.getVariableForExportName(e);if(t){t.deoptimizePath(O);if(!t.included){this.includeVariable(t)}if(t instanceof ExternalVariable){t.module.reexported=true}}}if(e){this.namespace.setMergedNamespaces(this.includeAndGetAdditionalMergedNamespaces())}}includeAllInBundle(){this.ast.include(createInclusionContext(),true);this.includeAllExports(false)}isIncluded(){return this.ast.included||this.namespace.included||this.importedFromNotTreeshaken}linkImports(){this.addModulesToImportDescriptions(this.importDescriptions);this.addModulesToImportDescriptions(this.reexportDescriptions);const e=[];for(const t of this.exportAllSources){const i=this.graph.modulesById.get(this.resolvedIds[t].id);if(i instanceof ExternalModule){e.push(i);continue}this.exportAllModules.push(i)}this.exportAllModules.push(...e)}render(e){const t=this.magicString.clone();this.ast.render(t,e);this.usesTopLevelAwait=this.astContext.usesTopLevelAwait;return t}setSource({ast:e,code:t,customTransformCache:i,originalCode:s,originalSourcemap:n,resolvedIds:r,sourcemapChain:o,transformDependencies:l,transformFiles:c,...u}){this.info.code=t;this.originalCode=s;this.originalSourcemap=n;this.sourcemapChain=o;if(c){this.transformFiles=c}this.transformDependencies=l;this.customTransformCache=i;this.updateOptions(u);cs("generate ast",3);if(!e){e=this.tryParse()}us("generate ast",3);this.resolvedIds=r||Object.create(null);const h=this.id;this.magicString=new MagicString(t,{filename:this.excludeFromSourcemap?null:h,indentExclusionRanges:[]});cs("analyse ast",3);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:h,getExports:this.getExports.bind(this),getModuleExecIndex:()=>this.execIndex,getModuleName:this.basename.bind(this),getNodeConstructor:e=>rs[e]||rs.UnknownNode,getReexports:this.getReexports.bind(this),importDescriptions:this.importDescriptions,includeAllExports:()=>this.includeAllExports(true),includeDynamicImport:this.includeDynamicImport.bind(this),includeVariableInModule:this.includeVariableInModule.bind(this),magicString:this.magicString,module:this,moduleContext:this.context,options:this.options,requestTreeshakingPass:()=>this.graph.needsTreeshakingPass=true,traceExport:e=>this.getVariableForExportName(e)[0],traceVariable:this.traceVariable.bind(this),usesTopLevelAwait:false,warn:this.warn.bind(this)};this.scope=new ModuleScope(this.graph.scope,this.astContext);this.namespace=new NamespaceVariable(this.astContext);this.ast=new Program(e,{context:this.astContext,type:"Module"},this.scope);this.info.ast=e;us("analyse ast",3)}toJSON(){return{ast:this.ast.esTreeNode,code:this.info.code,customTransformCache:this.customTransformCache,dependencies:Array.from(this.dependencies,getId),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:i,searchedNamesAndModules:s}=Q){const n=this.scope.variables.get(e);if(n){return n}const r=this.importDescriptions.get(e);if(r){const e=r.module;if(e instanceof Module&&r.name==="*"){return e.namespace}const[n]=getVariableForExportNameRecursive(e,r.name,t||this,i,s);if(!n){return this.error(errMissingExport(r.name,this.id,e.id),r.start)}return n}return null}tryParse(){try{return this.graph.contextParse(this.info.code)}catch(e){let t=e.message.replace(/ \(\d+:\d+\)$/,"");if(this.id.endsWith(".json")){t+=" (Note that you need @rollup/plugin-json to import JSON files)"}else if(!this.id.endsWith(".js")){t+=" (Note that you need plugins to import files that are not JavaScript)"}return this.error({code:"PARSE_ERROR",message:t,parserError:e},e.pos)}}updateOptions({meta:e,moduleSideEffects:t,syntheticNamedExports:i}){if(t!=null){this.info.moduleSideEffects=t}if(i!=null){this.info.syntheticNamedExports=i}if(e!=null){Object.assign(this.info.meta,e)}}warn(e,t){this.addLocationToLogProps(e,t);this.options.onwarn(e)}addDynamicImport(e){let t=e.source;if(t instanceof TemplateLiteral){if(t.quasis.length===1&&t.quasis[0].value.cooked){t=t.quasis[0].value.cooked}}else if(t instanceof Literal&&typeof t.value==="string"){t=t.value}this.dynamicImports.push({argument:t,id:null,node:e,resolution:null})}addExport(e){if(e instanceof ExportDefaultDeclaration){this.exports.set("default",{identifier:e.variable.getAssignedVariableName(),localName:"default"})}else if(e instanceof ExportAllDeclaration){const t=e.source.value;this.sources.add(t);if(e.exported){const i=e.exported.name;this.reexportDescriptions.set(i,{localName:"*",module:null,source:t,start:e.start})}else{this.exportAllSources.add(t)}}else if(e.source instanceof Literal){const t=e.source.value;this.sources.add(t);for(const i of e.specifiers){const e=i.exported.name;this.reexportDescriptions.set(e,{localName:i.local.name,module:null,source:t,start:i.start})}}else if(e.declaration){const t=e.declaration;if(t instanceof VariableDeclaration){for(const e of t.declarations){for(const t of rt(e.id)){this.exports.set(t,{identifier:null,localName:t})}}}else{const e=t.id.name;this.exports.set(e,{identifier:null,localName:e})}}else{for(const t of e.specifiers){const e=t.local.name;const i=t.exported.name;this.exports.set(i,{identifier:null,localName:e})}}}addImport(e){const t=e.source.value;this.sources.add(t);for(const i of e.specifiers){const e=i.type===Lt;const s=i.type===Ft;const n=e?"default":s?"*":i.imported.name;this.importDescriptions.set(i.local.name,{module:null,name:n,source:t,start:i.start})}}addImportMeta(e){this.importMetas.push(e)}addLocationToLogProps(e,t){e.id=this.id;e.pos=t;let i=this.info.code;const s=locate(i,t,{offsetLine:1});if(s){let{column:n,line:r}=s;try{({column:n,line:r}=getOriginalLocation(this.sourcemapChain,{column:n,line:r}));i=this.originalCode}catch(e){this.options.onwarn({code:"SOURCEMAP_ERROR",id:this.id,loc:{column:n,file:this.id,line:r},message:`Error when using sourcemap for reporting an error: ${e.message}`,pos:t})}augmentCodeLocation(e,{column:n,line:r},i,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,i){const s=new Set;const addSideEffectDependencies=n=>{for(const r of n){if(s.has(r)){continue}s.add(r);if(t.has(r)){e.add(r);continue}if(!(r.info.moduleSideEffects||i.has(r))){continue}if(r instanceof ExternalModule||r.hasEffects()){e.add(r);continue}addSideEffectDependencies(r.dependencies)}};addSideEffectDependencies(this.dependencies);addSideEffectDependencies(i)}getVariableFromNamespaceReexports(e,t,i){let s=null;const n=new Map;const r=new Set;for(const o of this.exportAllModules){if(o.info.syntheticNamedExports===e){continue}const[l,c]=getVariableForExportNameRecursive(o,e,t,true,copyNameToModulesMap(i));if(o instanceof ExternalModule||c){r.add(l)}else if(l instanceof SyntheticNamedExportVariable){if(!s){s=l}}else if(l){n.set(l,o)}}if(n.size>0){const t=[...n];const i=t[0][0];if(t.length===1){return[i]}this.options.onwarn(errNamespaceConflict(e,this.id,t.map((([,e])=>e.id))));return[null]}if(r.size>0){const t=[...r];const i=t[0];if(t.length>1){this.options.onwarn(errAmbiguousExternalNamespaces(e,this.id,i.module.id,t.map((e=>e.module.id))))}return[i,true]}if(s){return[s]}return[null]}includeAndGetAdditionalMergedNamespaces(){const e=new Set;const t=new Set;for(const i of[this,...this.exportAllModules]){if(i instanceof ExternalModule){const[t]=i.getVariableForExportName("*");t.include();this.includedImports.add(t);e.add(t)}else if(i.info.syntheticNamedExports){const e=i.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 Module){t.includedDynamicImporters.push(this);t.includeAllExports(true)}}includeVariable(e){if(!e.included){e.include();this.graph.needsTreeshakingPass=true;const t=e.module;if(t instanceof Module){if(!t.isExecuted){markModuleAndImpureDependenciesAsExecuted(t)}if(t!==this){const t=getAndExtendSideEffectModules(e,this);for(const e of t){if(!e.isExecuted){markModuleAndImpureDependenciesAsExecuted(e)}}}}}}includeVariableInModule(e){this.includeVariable(e);const t=e.module;if(t&&t!==this){this.includedImports.add(e)}}shimMissingExport(e){this.options.onwarn({code:"SHIMMED_EXPORT",exporter:relativeId(this.id),exportName:e,message:`Missing export "${e}" has been shimmed in module ${relativeId(this.id)}.`});this.exports.set(e,ds)}}function setAlternativeExporterIfCyclic(e,t,i){if(e.module instanceof Module&&e.module!==i){const s=e.module.cycles;if(s.size>0){const n=i.cycles;for(const r of n){if(s.has(r)){t.alternativeReexportModules.set(e,i);break}}}}}const copyNameToModulesMap=e=>e&&new Map(Array.from(e,(([e,t])=>[e,new Set(t)])));function removeJsExtension(e){return e.endsWith(".js")?e.slice(0,-3):e}function getCompleteAmdId(e,t){if(e.autoId){return`${e.basePath?e.basePath+"/":""}${removeJsExtension(t)}`}return e.id||""}function getExportBlock$1(e,t,i,s,n,r,o,l="return "){const{_:c,cnst:u,getDirectReturnFunction:h,getFunctionIntro:d,getPropertyAccess:p,n:f,s:m}=n;if(!i){return`${f}${f}${l}${getSingleDefaultExport(e,t,s,o,p)};`}let g="";for(const{defaultVariableName:e,id:n,isChunk:l,name:u,namedExportsMode:d,namespaceVariableName:m,reexports:y}of t){if(y&&i){for(const t of y){if(t.reexported!=="*"){const i=getReexportedImportName(u,t.imported,d,l,e,m,s,n,o,p);if(g)g+=f;if(t.imported!=="*"&&t.needsLiveBinding){const[e,s]=h([],{functionReturn:true,lineBreakIndent:null,name:null});g+=`Object.defineProperty(exports,${c}'${t.reexported}',${c}{${f}`+`${r}enumerable:${c}true,${f}`+`${r}get:${c}${e}${i}${s}${f}});`}else{g+=`exports${p(t.reexported)}${c}=${c}${i};`}}}}}for(const{exported:t,local:i}of e){const e=`exports${p(t)}`;const s=i;if(e!==s){if(g)g+=f;g+=`${e}${c}=${c}${s};`}}for(const{name:e,reexports:s}of t){if(s&&i){for(const t of s){if(t.reexported==="*"){if(g)g+=f;const i=`{${f}${r}if${c}(k${c}!==${c}'default'${c}&&${c}!exports.hasOwnProperty(k))${c}${getDefineProperty(e,t.needsLiveBinding,r,n)}${m}${f}}`;g+=u==="var"&&t.needsLiveBinding?`Object.keys(${e}).forEach(${d(["k"],{isAsync:false,name:null})}${i});`:`for${c}(${u} k in ${e})${c}${i}`}}}}if(g){return`${f}${f}${g}`}return""}function getSingleDefaultExport(e,t,i,s,n){if(e.length>0){return e[0].local}else{for(const{defaultVariableName:e,id:r,isChunk:o,name:l,namedExportsMode:c,namespaceVariableName:u,reexports:h}of t){if(h){return getReexportedImportName(l,h[0].imported,c,o,e,u,i,r,s,n)}}}}function getReexportedImportName(e,t,i,s,n,r,o,l,c,u){if(t==="default"){if(!s){const t=String(o(l));const i=Gi[t]?n:e;return isDefaultAProperty(t,c)?`${i}${u("default")}`:i}return i?`${e}${u("default")}`:e}if(t==="*"){return(s?!i:Wi[String(o(l))])?r:e}return`${e}${u(t)}`}function getEsModuleValue(e){return e([["value","true"]],{lineBreakIndent:null})}function getNamespaceMarkers(e,t,i,{_:s,getObject:n}){if(e){if(t){if(i){return`Object.defineProperties(exports,${s}${n([["__esModule",getEsModuleValue(n)],[null,`[Symbol.toStringTag]:${s}${getToStringTagValue(n)}`]],{lineBreakIndent:null})});`}return`Object.defineProperty(exports,${s}'__esModule',${s}${getEsModuleValue(n)});`}if(i){return`Object.defineProperty(exports,${s}Symbol.toStringTag,${s}${getToStringTagValue(n)});`}}return""}const getDefineProperty=(e,t,i,{_:s,getDirectReturnFunction:n,n:r})=>{if(t){const[t,o]=n([],{functionReturn:true,lineBreakIndent:null,name:null});return`Object.defineProperty(exports,${s}k,${s}{${r}`+`${i}${i}enumerable:${s}true,${r}`+`${i}${i}get:${s}${t}${e}[k]${o}${r}${i}})`}return`exports[k]${s}=${s}${e}[k]`};function getInteropBlock(e,t,i,s,n,r,o,l){const{_:c,cnst:u,n:h}=l;const d=new Set;const p=[];const addInteropStatement=(e,t,i)=>{d.add(t);p.push(`${u} ${e}${c}=${c}/*#__PURE__*/${t}(${i});`)};for(const{defaultVariableName:i,imports:s,id:n,isChunk:r,name:o,namedExportsMode:l,namespaceVariableName:c,reexports:u}of e){if(r){for(const{imported:e,reexported:t}of[...s||[],...u||[]]){if(e==="*"&&t!=="*"){if(!l){addInteropStatement(c,Hi,o)}break}}}else{const e=String(t(n));let r=false;let l=false;for(const{imported:t,reexported:n}of[...s||[],...u||[]]){let s;let u;if(t==="default"){if(!r){r=true;if(i!==c){u=i;s=Gi[e]}}}else if(t==="*"&&n!=="*"){if(!l){l=true;s=Wi[e];u=c}}if(s){addInteropStatement(u,s,o)}}}}return`${getHelpersBlock(d,r,o,l,i,s,n)}${p.length>0?`${p.join(h)}${h}${h}`:""}`}function addJsExtension(e){return e.endsWith(".js")?e:e+".js"}function updateExtensionForRelativeAmdId(e,t){if(e[0]!=="."){return e}return t?addJsExtension(e):removeJsExtension(e)}const ps={assert:true,buffer:true,console:true,constants:true,domain:true,events:true,http:true,https:true,os:true,path:true,process:true,punycode:true,querystring:true,stream:true,string_decoder:true,timers:true,tty:true,url:true,util:true,vm:true,zlib:true};function warnOnBuiltins(e,t){const i=t.map((({id:e})=>e)).filter((e=>e in ps));if(!i.length)return;e({code:"MISSING_NODE_BUILTINS",message:`Creating a browser bundle that depends on Node.js built-in modules (${printQuotedStringList(i)}). You might need to include https://github.com/FredKSchott/rollup-plugin-polyfill-node`,modules:i})}function amd(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,id:r,indent:o,intro:l,isEntryFacade:c,isModuleFacade:u,namedExportsMode:h,outro:d,snippets:p,warn:f},{amd:m,esModule:g,externalLiveBindings:y,freeze:E,interop:x,namespaceToStringTag:v,strict:b}){warnOnBuiltins(f,i);const S=i.map((e=>`'${updateExtensionForRelativeAmdId(e.id,m.forceJsExtensionForImports)}'`));const A=i.map((e=>e.name));const{n:w,getNonArrowFunctionIntro:I,_:C}=p;if(h&&n){A.unshift(`exports`);S.unshift(`'exports'`)}if(t.has("require")){A.unshift("require");S.unshift(`'require'`)}if(t.has("module")){A.unshift("module");S.unshift(`'module'`)}const k=getCompleteAmdId(m,r);const _=(k?`'${k}',${C}`:``)+(S.length?`[${S.join(`,${C}`)}],${C}`:``);const P=b?`${C}'use strict';`:"";e.prepend(`${l}${getInteropBlock(i,x,y,E,v,t,o,p)}`);const N=getExportBlock$1(s,i,h,x,p,o,y);let R=getNamespaceMarkers(h&&n,c&&g,u&&v,p);if(R){R=w+w+R}e.append(`${N}${R}${d}`);return e.indent(o).prepend(`${m.define}(${_}(${I(A,{isAsync:false,name:null})}{${P}${w}${w}`).append(`${w}${w}}));`)}function cjs(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,isEntryFacade:l,isModuleFacade:c,namedExportsMode:u,outro:h,snippets:d},{compact:p,esModule:f,externalLiveBindings:m,freeze:g,interop:y,namespaceToStringTag:E,strict:x}){const{_:v,n:b}=d;const S=x?`'use strict';${b}${b}`:"";let A=getNamespaceMarkers(u&&n,l&&f,c&&E,d);if(A){A+=b+b}const w=getImportBlock$1(i,d,p);const I=getInteropBlock(i,y,m,g,E,t,r,d);e.prepend(`${S}${o}${A}${w}${I}`);const C=getExportBlock$1(s,i,u,y,d,r,m,`module.exports${v}=${v}`);return e.append(`${C}${h}`)}function getImportBlock$1(e,{_:t,cnst:i,n:s},n){let r="";let o=false;for(const{id:l,name:c,reexports:u,imports:h}of e){if(!u&&!h){if(r){r+=n&&!o?",":`;${s}`}o=false;r+=`require('${l}')`}else{r+=n&&o?",":`${r?`;${s}`:""}${i} `;o=true;r+=`${c}${t}=${t}require('${l}')`}}if(r){return`${r};${s}${s}`}return""}function es(e,{accessedGlobals:t,indent:i,intro:s,outro:n,dependencies:r,exports:o,snippets:l},{externalLiveBindings:c,freeze:u,namespaceToStringTag:h}){const{_:d,n:p}=l;const f=getImportBlock(r,d);if(f.length>0)s+=f.join(p)+p+p;s+=getHelpersBlock(null,t,i,l,c,u,h);if(s)e.prepend(s);const m=getExportBlock(o,l);if(m.length)e.append(p+p+m.join(p).trim());if(n)e.append(n);return e.trim()}function getImportBlock(e,t){const i=[];for(const{id:s,reexports:n,imports:r,name:o}of e){if(!n&&!r){i.push(`import${t}'${s}';`);continue}if(r){let e=null;let n=null;const o=[];for(const t of r){if(t.imported==="default"){e=t}else if(t.imported==="*"){n=t}else{o.push(t)}}if(n){i.push(`import${t}*${t}as ${n.local} from${t}'${s}';`)}if(e&&o.length===0){i.push(`import ${e.local} from${t}'${s}';`)}else if(o.length>0){i.push(`import ${e?`${e.local},${t}`:""}{${t}${o.map((e=>{if(e.imported===e.local){return e.imported}else{return`${e.imported} as ${e.local}`}})).join(`,${t}`)}${t}}${t}from${t}'${s}';`)}}if(n){let e=null;const l=[];const c=[];for(const t of n){if(t.reexported==="*"){e=t}else if(t.imported==="*"){l.push(t)}else{c.push(t)}}if(e){i.push(`export${t}*${t}from${t}'${s}';`)}if(l.length>0){if(!r||!r.some((e=>e.imported==="*"&&e.local===o))){i.push(`import${t}*${t}as ${o} from${t}'${s}';`)}for(const e of l){i.push(`export${t}{${t}${o===e.reexported?o:`${o} as ${e.reexported}`} };`)}}if(c.length>0){i.push(`export${t}{${t}${c.map((e=>{if(e.imported===e.reexported){return e.imported}else{return`${e.imported} as ${e.reexported}`}})).join(`,${t}`)}${t}}${t}from${t}'${s}';`)}}}return i}function getExportBlock(e,{_:t,cnst:i}){const s=[];const n=[];for(const r of e){if(r.expression){s.push(`${i} ${r.local}${t}=${t}${r.expression};`)}n.push(r.exported===r.local?r.local:`${r.local} as ${r.exported}`)}if(n.length){s.push(`export${t}{${t}${n.join(`,${t}`)}${t}};`)}return s}const keypath=(e,t)=>e.split(".").map(t).join("");function setupNamespace(e,t,i,{_:s,getPropertyAccess:n,s:r},o){const l=e.split(".");l[0]=(typeof i==="function"?i(l[0]):i[l[0]])||l[0];l.pop();let c=t;return l.map((e=>{c+=n(e);return`${c}${s}=${s}${c}${s}||${s}{}${r}`})).join(o?",":"\n")+(o&&l.length?";":"\n")}function assignToDeepVariable(e,t,i,s,{_:n,getPropertyAccess:r}){const o=e.split(".");o[0]=(typeof i==="function"?i(o[0]):i[o[0]])||o[0];const l=o.pop();let c=t;let u=o.map((e=>{c+=r(e);return`${c}${n}=${n}${c}${n}||${n}{}`})).concat(`${c}${r(l)}`).join(`,${n}`)+`${n}=${n}${s}`;if(o.length>0){u=`(${u})`}return u}function trimEmptyImports(e){let t=e.length;while(t--){const{imports:i,reexports:s}=e[t];if(i||s){return e.slice(0,t+1)}}return[]}function iife(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,namedExportsMode:l,outro:c,snippets:u,warn:h},{compact:d,esModule:p,extend:f,freeze:m,externalLiveBindings:g,globals:y,interop:E,name:x,namespaceToStringTag:v,strict:b}){const{_:S,getNonArrowFunctionIntro:A,getPropertyAccess:w,n:I}=u;const C=x&&x.includes(".");const k=!f&&!C;if(x&&k&&!isLegal(x)){return error({code:"ILLEGAL_IDENTIFIER_AS_NAME",message:`Given name "${x}" is not a legal JS identifier. If you need this, you can try "output.extend: true".`})}warnOnBuiltins(h,i);const _=trimEmptyImports(i);const P=_.map((e=>e.globalName||"null"));const N=_.map((e=>e.name));if(n&&!x){h({code:"MISSING_NAME_OPTION_FOR_IIFE_EXPORT",message:`If you do not supply "output.name", you may not be able to access the exports of an IIFE bundle.`})}if(l&&n){if(f){P.unshift(`this${keypath(x,w)}${S}=${S}this${keypath(x,w)}${S}||${S}{}`);N.unshift("exports")}else{P.unshift("{}");N.unshift("exports")}}const R=b?`${r}'use strict';${I}`:"";const T=getInteropBlock(i,E,g,m,v,t,r,u);e.prepend(`${o}${T}`);let $=`(${A(N,{isAsync:false,name:null})}{${I}${R}${I}`;if(n){if(x&&!(f&&l)){$=(k?`var ${x}`:`this${keypath(x,w)}`)+`${S}=${S}${$}`}if(C){$=setupNamespace(x,"this",y,u,d)+$}}let O=`${I}${I}})(${P.join(`,${S}`)});`;if(n&&!f&&l){O=`${I}${I}${r}return exports;${O}`}const D=getExportBlock$1(s,i,l,E,u,r,g);let M=getNamespaceMarkers(l&&n,p,v,u);if(M){M=I+I+M}e.append(`${D}${M}${c}`);return e.indent(r).prepend($).append(O)}function system(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,indent:r,intro:o,snippets:l,outro:c,usesTopLevelAwait:u},{externalLiveBindings:h,freeze:d,name:p,namespaceToStringTag:f,strict:m,systemNullSetters:g}){const{_:y,getFunctionIntro:E,getNonArrowFunctionIntro:x,n:v,s:b}=l;const{importBindings:S,setters:A,starExcludes:w}=analyzeDependencies(i,s,r,l);const I=p?`'${p}',${y}`:"";const C=t.has("module")?["exports","module"]:n?["exports"]:[];let k=`System.register(${I}[`+i.map((({id:e})=>`'${e}'`)).join(`,${y}`)+`],${y}(${x(C,{isAsync:false,name:null})}{${v}${r}${m?"'use strict';":""}`+getStarExcludesBlock(w,r,l)+getImportBindingsBlock(S,r,l)+`${v}${r}return${y}{${A.length?`${v}${r}${r}setters:${y}[${A.map((e=>e?`${E(["module"],{isAsync:false,name:null})}{${v}${r}${r}${r}${e}${v}${r}${r}}`:g?`null`:`${E([],{isAsync:false,name:null})}{}`)).join(`,${y}`)}],`:""}${v}`;k+=`${r}${r}execute:${y}(${x([],{isAsync:u,name:null})}{${v}${v}`;const _=`${r}${r}})${v}${r}}${b}${v}}));`;e.prepend(o+getHelpersBlock(null,t,r,l,h,d,f)+getHoistedExportsBlock(s,r,l));e.append(`${c}${v}${v}`+getSyntheticExportsBlock(s,r,l)+getMissingExportsBlock(s,r,l));return e.indent(`${r}${r}${r}`).append(_).prepend(k)}function analyzeDependencies(e,t,i,{_:s,cnst:n,getObject:r,getPropertyAccess:o,n:l}){const c=[];const u=[];let h=null;for(const{imports:d,reexports:p}of e){const f=[];if(d){for(const e of d){c.push(e.local);if(e.imported==="*"){f.push(`${e.local}${s}=${s}module;`)}else{f.push(`${e.local}${s}=${s}module${o(e.imported)};`)}}}if(p){const l=[];let c=false;for(const{imported:e,reexported:t}of p){if(t==="*"){c=true}else{l.push([t,e==="*"?"module":`module${o(e)}`])}}if(l.length>1||c){const o=r(l,{lineBreakIndent:null});if(c){if(!h){h=getStarExcludes({dependencies:e,exports:t})}f.push(`${n} setter${s}=${s}${o};`,`for${s}(${n} name in module)${s}{`,`${i}if${s}(!_starExcludes[name])${s}setter[name]${s}=${s}module[name];`,"}","exports(setter);")}else{f.push(`exports(${o});`)}}else{const[e,t]=l[0];f.push(`exports('${e}',${s}${t});`)}}u.push(f.join(`${l}${i}${i}${i}`))}return{importBindings:c,setters:u,starExcludes:h}}const getStarExcludes=({dependencies:e,exports:t})=>{const i=new Set(t.map((e=>e.exported)));i.add("default");for(const{reexports:t}of e){if(t){for(const e of t){if(e.reexported!=="*")i.add(e.reexported)}}}return i};const getStarExcludesBlock=(e,t,{_:i,cnst:s,getObject:n,n:r})=>e?`${r}${t}${s} _starExcludes${i}=${i}${n([...e].map((e=>[e,"1"])),{lineBreakIndent:{base:t,t:t}})};`:"";const getImportBindingsBlock=(e,t,{_:i,n:s})=>e.length?`${s}${t}var ${e.join(`,${i}`)};`:"";const getHoistedExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.hoisted)).map((e=>({name:e.exported,value:e.local}))),t,i);function getExportsBlock(e,t,{_:i,n:s}){if(e.length===0){return""}if(e.length===1){return`exports('${e[0].name}',${i}${e[0].value});${s}${s}`}return`exports({${s}`+e.map((({name:e,value:s})=>`${t}${e}:${i}${s}`)).join(`,${s}`)+`${s}});${s}${s}`}const getSyntheticExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.expression)).map((e=>({name:e.exported,value:e.local}))),t,i);const getMissingExportsBlock=(e,t,i)=>getExportsBlock(e.filter((e=>e.local===as)).map((e=>({name:e.exported,value:as}))),t,i);function globalProp(e,t,i){if(!e)return"null";return`${t}${keypath(e,i)}`}function safeAccess(e,t,{_:i,getPropertyAccess:s}){let n=t;return e.split(".").map((e=>n+=s(e))).join(`${i}&&${i}`)}function umd(e,{accessedGlobals:t,dependencies:i,exports:s,hasExports:n,id:r,indent:o,intro:l,namedExportsMode:c,outro:u,snippets:h,warn:d},{amd:p,compact:f,esModule:m,extend:g,externalLiveBindings:y,freeze:E,interop:x,name:v,namespaceToStringTag:b,globals:S,noConflict:A,strict:w}){const{_:I,cnst:C,getFunctionIntro:k,getNonArrowFunctionIntro:_,getPropertyAccess:P,n:N,s:R}=h;const T=f?"f":"factory";const $=f?"g":"global";if(n&&!v){return error({code:"MISSING_NAME_OPTION_FOR_IIFE_EXPORT",message:'You must supply "output.name" for UMD bundles that have exports so that the exports are accessible in environments without a module loader.'})}warnOnBuiltins(d,i);const O=i.map((e=>`'${updateExtensionForRelativeAmdId(e.id,p.forceJsExtensionForImports)}'`));const D=i.map((e=>`require('${e.id}')`));const M=trimEmptyImports(i);const L=M.map((e=>globalProp(e.globalName,$,P)));const F=M.map((e=>e.name));if(c&&(n||A)){O.unshift(`'exports'`);D.unshift(`exports`);L.unshift(assignToDeepVariable(v,$,S,`${g?`${globalProp(v,$,P)}${I}||${I}`:""}{}`,h));F.unshift("exports")}const V=getCompleteAmdId(p,r);const B=(V?`'${V}',${I}`:``)+(O.length?`[${O.join(`,${I}`)}],${I}`:``);const z=p.define;const U=!c&&n?`module.exports${I}=${I}`:``;const H=w?`${I}'use strict';${N}`:``;let j;if(A){const e=f?"e":"exports";let t;if(!c&&n){t=`${C} ${e}${I}=${I}${assignToDeepVariable(v,$,S,`${T}(${L.join(`,${I}`)})`,h)};`}else{const i=L.shift();t=`${C} ${e}${I}=${I}${i};${N}`+`${o}${o}${T}(${[e].concat(L).join(`,${I}`)});`}j=`(${k([],{isAsync:false,name:null})}{${N}`+`${o}${o}${C} current${I}=${I}${safeAccess(v,$,h)};${N}`+`${o}${o}${t}${N}`+`${o}${o}${e}.noConflict${I}=${I}${k([],{isAsync:false,name:null})}{${I}`+`${globalProp(v,$,P)}${I}=${I}current;${I}return ${e}${R}${I}};${N}`+`${o}})()`}else{j=`${T}(${L.join(`,${I}`)})`;if(!c&&n){j=assignToDeepVariable(v,$,S,j,h)}}const G=n||A&&c||L.length>0;const W=[T];if(G){W.unshift($)}const q=G?`this,${I}`:"";const K=G?`(${$}${I}=${I}typeof globalThis${I}!==${I}'undefined'${I}?${I}globalThis${I}:${I}${$}${I}||${I}self,${I}`:"";const Y=G?")":"";const X=G?`${o}typeof exports${I}===${I}'object'${I}&&${I}typeof module${I}!==${I}'undefined'${I}?`+`${I}${U}${T}(${D.join(`,${I}`)})${I}:${N}`:"";const Q=`(${_(W,{isAsync:false,name:null})}{${N}`+X+`${o}typeof ${z}${I}===${I}'function'${I}&&${I}${z}.amd${I}?${I}${z}(${B}${T})${I}:${N}`+`${o}${K}${j}${Y};${N}`+`})(${q}(${_(F,{isAsync:false,name:null})}{${H}${N}`;const Z=N+N+"}));";e.prepend(`${l}${getInteropBlock(i,x,y,E,b,t,o,h)}`);const J=getExportBlock$1(s,i,c,x,h,o,y);let ee=getNamespaceMarkers(c&&n,m,b,h);if(ee){ee=N+N+ee}e.append(`${J}${ee}${u}`);return e.trim().indent(o).append(Z).prepend(Q)}const fs={amd:amd,cjs:cjs,es:es,iife:iife,system:system,umd:umd};class Source{constructor(e,t){this.isOriginal=true;this.filename=e;this.content=t}traceSegment(e,t,i){return{column:t,line:e,name:i,source:this}}}class Link{constructor(e,t){this.sources=t;this.names=e.names;this.mappings=e.mappings}traceMappings(){const e=[];const t=new Map;const i=[];const s=[];const n=new Map;const r=[];for(const o of this.mappings){const l=[];for(const r of o){if(r.length===1)continue;const o=this.sources[r[1]];if(!o)continue;const c=o.traceSegment(r[2],r[3],r.length===5?this.names[r[4]]:"");if(c){const{column:o,line:u,name:h,source:{content:d,filename:p}}=c;let f=t.get(p);if(f===undefined){f=e.length;e.push(p);t.set(p,f);i[f]=d}else if(i[f]==null){i[f]=d}else if(d!=null&&i[f]!==d){return error({message:`Multiple conflicting contents for sourcemap source ${p}`})}const m=[r[0],f,u,o];if(h){let e=n.get(h);if(e===undefined){e=s.length;s.push(h);n.set(h,e)}m[4]=e}l.push(m)}}r.push(l)}return{mappings:r,names:s,sources:e,sourcesContent:i}}traceSegment(e,t,i){const s=this.mappings[e];if(!s)return null;let n=0;let r=s.length-1;while(n<=r){const e=n+r>>1;const o=s[e];if(o[0]===t||n===r){if(o.length==1)return null;const e=this.sources[o[1]];if(!e)return null;return e.traceSegment(o[2],o[3],o.length===5?this.names[o[4]]:i)}if(o[0]>t){r=e-1}else{n=e+1}}return null}}function getLinkMap(e){return function linkMap(t,i){if(i.mappings){return new Link(i,[t])}e({code:"SOURCEMAP_BROKEN",message:`Sourcemap is likely to be incorrect: a plugin (${i.plugin}) was used to transform `+"files, but didn't generate a sourcemap for the transformation. Consult the plugin "+"documentation for help",plugin:i.plugin,url:`https://rollupjs.org/guide/en/#warning-sourcemap-is-likely-to-be-incorrect`});return new Link({mappings:[],names:[]},[t])}}function getCollapsedSourcemap(e,t,i,n,r){let o;if(!i){o=new Source(e,t)}else{const t=i.sources;const n=i.sourcesContent||[];const r=s.dirname(e)||".";const l=i.sourceRoot||".";const c=t.map(((e,t)=>new Source(s.resolve(r,l,e),n[t])));o=new Link(i,c)}return n.reduce(r,o)}function collapseSourcemaps(e,t,i,n,r,o){const l=getLinkMap(o);const c=i.filter((e=>!e.excludeFromSourcemap)).map((e=>getCollapsedSourcemap(e.id,e.originalCode,e.originalSourcemap,e.sourcemapChain,l)));const u=new Link(t,c);const h=n.reduce(l,u);let{sources:d,sourcesContent:p,names:f,mappings:m}=h.traceMappings();if(e){const t=s.dirname(e);d=d.map((e=>s.relative(t,e)));e=s.basename(e)}p=r?null:p;return new SourceMap({file:e,mappings:m,names:f,sources:d,sourcesContent:p})}function collapseSourcemap(e,t,i,s,n){if(!s.length){return i}const r=getCollapsedSourcemap(e,t,i,s,getLinkMap(n));const o=r.traceMappings();return{version:3,...o}}const createHash=()=>o.createHash("sha256");const ms={amd:deconflictImportsOther,cjs:deconflictImportsOther,es:deconflictImportsEsmOrSystem,iife:deconflictImportsOther,system:deconflictImportsEsmOrSystem,umd:deconflictImportsOther};function deconflictChunk(e,t,i,s,n,r,o,l,c,u,h,d,p){const f=e.slice().reverse();for(const e of f){e.scope.addUsedOutsideNames(s,n,h,d)}deconflictTopLevelVariables(s,f,p);ms[n](s,i,t,r,o,l,c,u);for(const e of f){e.scope.deconflict(n,h,d)}}function deconflictImportsEsmOrSystem(e,t,i,s,n,r,o,l){for(const t of i.dependencies){if(n||t instanceof ExternalModule){t.variableName=getSafeName(t.suggestedVariableName,e)}}for(const i of t){const t=i.module;const s=i.name;if(i.isNamespace&&(n||t instanceof ExternalModule)){i.setRenderNames(null,(t instanceof ExternalModule?t:o.get(t)).variableName)}else if(t instanceof ExternalModule&&s==="default"){i.setRenderNames(null,getSafeName([...t.exportedVariables].some((([e,t])=>t==="*"&&e.included))?t.suggestedVariableName+"__default":t.suggestedVariableName,e))}else{i.setRenderNames(null,getSafeName(s,e))}}for(const t of l){t.setRenderNames(null,getSafeName(t.name,e))}}function deconflictImportsOther(e,t,{deconflictedDefault:i,deconflictedNamespace:s,dependencies:n},r,o,l,c){for(const t of n){t.variableName=getSafeName(t.suggestedVariableName,e)}for(const t of s){t.namespaceVariableName=getSafeName(`${t.suggestedVariableName}__namespace`,e)}for(const t of i){if(s.has(t)&&canDefaultBeTakenFromNamespace(String(r(t.id)),l)){t.defaultVariableName=t.namespaceVariableName}else{t.defaultVariableName=getSafeName(`${t.suggestedVariableName}__default`,e)}}for(const e of t){const t=e.module;if(t instanceof ExternalModule){const i=e.name;if(i==="default"){const i=String(r(t.id));const s=Gi[i]?t.defaultVariableName:t.variableName;if(isDefaultAProperty(i,l)){e.setRenderNames(s,"default")}else{e.setRenderNames(null,s)}}else if(i==="*"){e.setRenderNames(null,Wi[String(r(t.id))]?t.namespaceVariableName:t.variableName)}else{e.setRenderNames(t.variableName,null)}}else{const i=c.get(t);if(o&&e.isNamespace){e.setRenderNames(null,i.exportMode==="default"?i.namespaceVariableName:i.variableName)}else if(i.exportMode==="default"){e.setRenderNames(null,i.variableName)}else{e.setRenderNames(i.variableName,i.getVariableExportName(e))}}}}function deconflictTopLevelVariables(e,t,i){for(const s of t){for(const t of s.scope.variables.values()){if(t.included&&!(t.renderBaseName||t instanceof ExportDefaultVariable&&t.getOriginalVariable()!==t)){t.setRenderNames(null,getSafeName(t.name,e))}}if(i.has(s)){const t=s.namespace;t.setRenderNames(null,getSafeName(t.name,e))}}}const gs=/[\\'\r\n\u2028\u2029]/;const ys=/(['\r\n\u2028\u2029])/g;const Es=/\\/g;function escapeId(e){if(!e.match(gs))return e;return e.replace(Es,"\\\\").replace(ys,"\\$1")}function assignExportsToMangledNames(e,t,i){let s=0;for(const n of e){let[e]=n.name;if(t.has(e)){do{e=toBase64(++s);if(e.charCodeAt(0)===49){s+=9*64**(e.length-1);e=toBase64(s)}}while(ee.has(e)||t.has(e))}t.set(e,n);i.set(n,[e])}}function assignExportsToNames(e,t,i){for(const s of e){let e=0;let n=s.name;while(t.has(n)){n=s.name+"$"+ ++e}t.set(n,s);i.set(s,[n])}}function getExportMode(e,{exports:t,name:i,format:s},n,r,o){const l=e.getExportNames();if(t==="default"){if(l.length!==1||l[0]!=="default"){return error(errIncompatibleExportOptionValue("default",l,r))}}else if(t==="none"&&l.length){return error(errIncompatibleExportOptionValue("none",l,r))}if(t==="auto"){if(l.length===0){t="none"}else if(l.length===1&&l[0]==="default"){if(s==="cjs"&&n.has("exports")){o(errPreferNamedExports(r))}t="default"}else{if(s!=="es"&&s!=="system"&&l.includes("default")){o(errMixedExport(r,i))}t="named"}}return t}function guessIndentString(e){const t=e.split("\n");const i=t.filter((e=>/^\t+/.test(e)));const s=t.filter((e=>/^ {2,}/.test(e)));if(i.length===0&&s.length===0){return null}if(i.length>=s.length){return"\t"}const n=s.reduce(((e,t)=>{const i=/^ +/.exec(t)[0].length;return Math.min(i,e)}),Infinity);return new Array(n+1).join(" ")}function getIndentString(e,t){if(t.indent!==true)return t.indent;for(const t of e){const e=guessIndentString(t.originalCode);if(e!==null)return e}return"\t"}function getStaticDependencies(e,t,i){const s=[];const n=new Set;for(let r=t.length-1;r>=0;r--){const o=t[r];if(!n.has(o)){const t=[];addStaticDependencies(o,t,n,e,i);s.unshift(t)}}const r=new Set;for(const e of s){for(const t of e){r.add(t)}}return r}function addStaticDependencies(e,t,i,s,n){const r=e.getDependenciesToBeIncluded();for(const e of r){if(e instanceof ExternalModule){t.push(e);continue}const r=n.get(e);if(r!==s){t.push(r);continue}if(!i.has(e)){i.add(e);addStaticDependencies(e,t,i,s,n)}}}function decodedSourcemap(e){if(!e)return null;if(typeof e==="string"){e=JSON.parse(e)}if(e.mappings===""){return{mappings:[],names:[],sources:[],version:3}}const t=typeof e.mappings==="string"?decode(e.mappings):e.mappings;return{...e,mappings:t}}function renderChunk({code:e,options:t,outputPluginDriver:i,renderChunk:s,sourcemapChain:n}){const renderChunkReducer=(e,t,i)=>{if(t==null)return e;if(typeof t==="string")t={code:t,map:undefined};if(t.map!==null){const e=decodedSourcemap(t.map);n.push(e||{missing:true,plugin:i.name})}return t.code};return i.hookReduceArg0("renderChunk",[e,s,t],renderChunkReducer)}function renderNamePattern(e,t,i){if(isPathFragment(e))return error(errFailedValidation(`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.`));return e.replace(/\[(\w+)\]/g,((e,s)=>{if(!i.hasOwnProperty(s)){return error(errFailedValidation(`"[${s}]" is not a valid placeholder in "${t}" pattern.`))}const n=i[s]();if(isPathFragment(n))return error(errFailedValidation(`Invalid substitution "${n}" for placeholder "[${s}]" in "${t}" pattern, can be neither absolute nor relative path.`));return n}))}function makeUnique(e,t){const i=new Set(Object.keys(t).map((e=>e.toLowerCase())));if(!i.has(e.toLocaleLowerCase()))return e;const n=s.extname(e);e=e.substring(0,e.length-n.length);let r,o=1;while(i.has((r=e+ ++o+n).toLowerCase()));return r}const xs=[".js",".jsx",".ts",".tsx"];function getGlobalName(e,t,i,s){const n=typeof t==="function"?t(e.id):t[e.id];if(n){return n}if(i){s({code:"MISSING_GLOBAL_NAME",guess:e.variableName,message:`No name was provided for external module '${e.id}' in output.globals – guessing '${e.variableName}'`,source:e.id});return e.variableName}}class Chunk{constructor(e,t,i,s,n,r,o,l,c,u){this.orderedModules=e;this.inputOptions=t;this.outputOptions=i;this.unsetOptions=s;this.pluginDriver=n;this.modulesById=r;this.chunkByModule=o;this.facadeChunkByModule=l;this.includedNamespaces=c;this.manualChunkAlias=u;this.entryModules=[];this.exportMode="named";this.facadeModule=null;this.id=null;this.namespaceVariableName="";this.needsExportsShim=false;this.variableName="";this.accessedGlobalsByScope=new Map;this.dependencies=new Set;this.dynamicDependencies=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.includedReexportsByModule=new Map;this.indentString=undefined;this.isEmpty=true;this.name=null;this.renderedDependencies=null;this.renderedExports=null;this.renderedHash=undefined;this.renderedModuleSources=new Map;this.renderedModules=Object.create(null);this.renderedSource=null;this.sortedExportNames=null;this.strictFacade=false;this.usedModules=undefined;this.execIndex=e.length>0?e[0].execIndex:Infinity;const h=new Set(e);for(const t of e){if(t.namespace.included){c.add(t)}if(this.isEmpty&&t.isIncluded()){this.isEmpty=false}if(t.info.isEntry||i.preserveModules){this.entryModules.push(t)}for(const e of t.includedDynamicImporters){if(!h.has(e)){this.dynamicEntryModules.push(t);if(t.info.syntheticNamedExports&&!i.preserveModules){c.add(t);this.exports.add(t.namespace)}}}if(t.implicitlyLoadedAfter.size>0){this.implicitEntryModules.push(t)}}this.suggestedVariableName=makeLegal(this.generateVariableName())}static generateFacade(e,t,i,s,n,r,o,l,c,u){const h=new Chunk([],e,t,i,s,n,r,o,l,null);h.assignFacadeName(u,c);if(!o.has(c)){o.set(c,h)}for(const e of c.getDependenciesToBeIncluded()){h.dependencies.add(e instanceof Module?r.get(e):e)}if(!h.dependencies.has(r.get(c))&&c.info.moduleSideEffects&&c.hasEffects()){h.dependencies.add(r.get(c))}h.ensureReexportsAreAvailableForModule(c);h.facadeModule=c;h.strictFacade=true;return h}canModuleBeFacade(e,t){const i=e.getExportNamesByVariable();for(const t of this.exports){if(!i.has(t)){if(i.size===0&&e.isUserDefinedEntryPoint&&e.preserveSignature==="strict"&&this.unsetOptions.has("preserveEntrySignatures")){this.inputOptions.onwarn({code:"EMPTY_FACADE",id:e.id,message:`To preserve the export signature of the entry module "${relativeId(e.id)}", an empty facade chunk was created. This often happens when creating a bundle for a web app where chunks are placed in script tags and exports are ignored. In this case it is recommended to set "preserveEntrySignatures: false" to avoid this and reduce the number of chunks. Otherwise if this is intentional, set "preserveEntrySignatures: 'strict'" explicitly to silence this warning.`,url:"https://rollupjs.org/guide/en/#preserveentrysignatures"})}return false}}for(const s of t){if(!(i.has(s)||s.module===e)){return false}}return true}generateExports(){this.sortedExportNames=null;const e=new Set(this.exports);if(this.facadeModule!==null&&(this.facadeModule.preserveSignature!==false||this.strictFacade)){const t=this.facadeModule.getExportNamesByVariable();for(const[i,s]of t){this.exportNamesByVariable.set(i,[...s]);for(const e of s){this.exportsByName.set(e,i)}e.delete(i)}}if(this.outputOptions.minifyInternalExports){assignExportsToMangledNames(e,this.exportsByName,this.exportNamesByVariable)}else{assignExportsToNames(e,this.exportsByName,this.exportNamesByVariable)}if(this.outputOptions.preserveModules||this.facadeModule&&this.facadeModule.info.isEntry)this.exportMode=getExportMode(this,this.outputOptions,this.unsetOptions,this.facadeModule.id,this.inputOptions.onwarn)}generateFacades(){var e;const t=[];const i=new Set([...this.entryModules,...this.implicitEntryModules]);const s=new Set(this.dynamicEntryModules.map((({namespace:e})=>e)));for(const e of i){if(e.preserveSignature){for(const t of e.getExportNamesByVariable().keys()){s.add(t)}}}for(const e of i){const i=Array.from(new Set(e.chunkNames.filter((({isUserDefined:e})=>e)).map((({name:e})=>e))),(e=>({name:e})));if(i.length===0&&e.isUserDefinedEntryPoint){i.push({})}i.push(...Array.from(e.chunkFileNames,(e=>({fileName:e}))));if(i.length===0){i.push({})}if(!this.facadeModule){const t=e.preserveSignature==="strict"||e.preserveSignature==="exports-only"&&e.getExportNamesByVariable().size!==0;if(!t||this.outputOptions.preserveModules||this.canModuleBeFacade(e,s)){this.facadeModule=e;this.facadeChunkByModule.set(e,this);if(e.preserveSignature){this.strictFacade=t}this.assignFacadeName(i.shift(),e)}}for(const s of i){t.push(Chunk.generateFacade(this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.modulesById,this.chunkByModule,this.facadeChunkByModule,this.includedNamespaces,e,s))}}for(const t of this.dynamicEntryModules){if(t.info.syntheticNamedExports)continue;if(!this.facadeModule&&this.canModuleBeFacade(t,s)){this.facadeModule=t;this.facadeChunkByModule.set(t,this);this.strictFacade=true;this.dynamicName=getChunkNameFromModule(t)}else if(this.facadeModule===t&&!this.strictFacade&&this.canModuleBeFacade(t,s)){this.strictFacade=true}else if(!((e=this.facadeChunkByModule.get(t))===null||e===void 0?void 0:e.strictFacade)){this.includedNamespaces.add(t);this.exports.add(t.namespace)}}if(!this.outputOptions.preserveModules){this.addNecessaryImportsForFacades()}return t}generateId(e,t,i,s){if(this.fileName!==null){return this.fileName}const[n,r]=this.facadeModule&&this.facadeModule.isUserDefinedEntryPoint?[t.entryFileNames,"output.entryFileNames"]:[t.chunkFileNames,"output.chunkFileNames"];return makeUnique(renderNamePattern(typeof n==="function"?n(this.getChunkInfo()):n,r,{format:()=>t.format,hash:()=>s?this.computeContentHashWithDependencies(e,t,i):"[hash]",name:()=>this.getChunkName()}),i)}generateIdPreserveModules(e,t,i,n){const[{id:r}]=this.orderedModules;const o=this.outputOptions.sanitizeFileName(r.split(vs,1)[0]);let l;const c=n.has("entryFileNames")?"[name][assetExtname].js":t.entryFileNames;const u=typeof c==="function"?c(this.getChunkInfo()):c;if(isAbsolute(o)){const i=s.dirname(o);const n=s.extname(o);const r=renderNamePattern(u,"output.entryFileNames",{assetExtname:()=>xs.includes(n)?"":n,ext:()=>n.substring(1),extname:()=>n,format:()=>t.format,name:()=>this.getChunkName()});const c=`${i}/${r}`;const{preserveModulesRoot:h}=t;if(h&&s.resolve(c).startsWith(h)){l=c.slice(h.length).replace(/^[\\/]/,"")}else{l=relative(e,c)}}else{const e=s.extname(o);const i=renderNamePattern(u,"output.entryFileNames",{assetExtname:()=>xs.includes(e)?"":e,ext:()=>e.substring(1),extname:()=>e,format:()=>t.format,name:()=>getAliasName(o)});l=`_virtual/${i}`}return makeUnique(normalize(l),i)}getChunkInfo(){const e=this.facadeModule;const t=this.getChunkName.bind(this);return{exports:this.getExportNames(),facadeModuleId:e&&e.id,isDynamicEntry:this.dynamicEntryModules.length>0,isEntry:e!==null&&e.info.isEntry,isImplicitEntry:this.implicitEntryModules.length>0,modules:this.renderedModules,get name(){return t()},type:"chunk"}}getChunkInfoWithFileNames(){return Object.assign(this.getChunkInfo(),{code:undefined,dynamicImports:Array.from(this.dynamicDependencies,getId),fileName:this.id,implicitlyLoadedBefore:Array.from(this.implicitlyLoadedBefore,getId),importedBindings:this.getImportedBindingsPerDependency(),imports:Array.from(this.dependencies,getId),map:undefined,referencedFiles:this.getReferencedFiles()})}getChunkName(){var e;return(e=this.name)!==null&&e!==void 0?e:this.name=this.outputOptions.sanitizeFileName(this.getFallbackChunkName())}getExportNames(){var e;return(e=this.sortedExportNames)!==null&&e!==void 0?e:this.sortedExportNames=Array.from(this.exportsByName.keys()).sort()}getRenderedHash(){if(this.renderedHash)return this.renderedHash;const e=createHash();const t=this.pluginDriver.hookReduceValueSync("augmentChunkHash","",[this.getChunkInfo()],((e,t)=>{if(t){e+=t}return e}));e.update(t);e.update(this.renderedSource.toString());e.update(this.getExportNames().map((e=>{const t=this.exportsByName.get(e);return`${relativeId(t.module.id).replace(/\\/g,"/")}:${t.name}:${e}`})).join(","));return this.renderedHash=e.digest("hex")}getVariableExportName(e){if(this.outputOptions.preserveModules&&e instanceof NamespaceVariable){return"*"}return this.exportNamesByVariable.get(e)[0]}link(){this.dependencies=getStaticDependencies(this,this.orderedModules,this.chunkByModule);for(const e of this.orderedModules){this.addDependenciesToChunk(e.dynamicDependencies,this.dynamicDependencies);this.addDependenciesToChunk(e.implicitlyLoadedBefore,this.implicitlyLoadedBefore);this.setUpChunkImportsAndExportsForModule(e)}}preRender(e,t,i){const{_:s,getPropertyAccess:n,n:r}=i;const o=new Bundle$1({separator:`${r}${r}`});this.usedModules=[];this.indentString=getIndentString(this.orderedModules,e);const l={dynamicImportFunction:e.dynamicImportFunction,exportNamesByVariable:this.exportNamesByVariable,format:e.format,freeze:e.freeze,indent:this.indentString,namespaceToStringTag:e.namespaceToStringTag,outputPluginDriver:this.pluginDriver,snippets:i};if(e.hoistTransitiveImports&&!this.outputOptions.preserveModules&&this.facadeModule!==null){for(const e of this.dependencies){if(e instanceof Chunk)this.inlineChunkDependencies(e)}}this.prepareModulesForRendering(i);this.setIdentifierRenderResolutions(e);let c="";const u=this.renderedModules;for(const t of this.orderedModules){let i=0;if(t.isIncluded()||this.includedNamespaces.has(t)){const s=t.render(l).trim();i=s.length();if(i){if(e.compact&&s.lastLine().includes("//"))s.append("\n");this.renderedModuleSources.set(t,s);o.addSource(s);this.usedModules.push(t)}const n=t.namespace;if(this.includedNamespaces.has(t)&&!this.outputOptions.preserveModules){const e=n.renderBlock(l);if(n.renderFirst())c+=r+e;else o.addSource(new MagicString(e))}}const{renderedExports:s,removedExports:n}=t.getRenderedExports();const{renderedModuleSources:h}=this;u[t.id]={get code(){var e,i;return(i=(e=h.get(t))===null||e===void 0?void 0:e.toString())!==null&&i!==void 0?i:null},originalLength:t.originalCode.length,removedExports:n,renderedExports:s,renderedLength:i}}if(c)o.prepend(c+r+r);if(this.needsExportsShim){o.prepend(`${r}${i.cnst} ${as}${s}=${s}void 0;${r}${r}`)}if(e.compact){this.renderedSource=o}else{this.renderedSource=o.trim()}this.renderedHash=undefined;if(this.isEmpty&&this.getExportNames().length===0&&this.dependencies.size===0){const e=this.getChunkName();this.inputOptions.onwarn({chunkName:e,code:"EMPTY_BUNDLE",message:`Generated an empty chunk: "${e}"`})}this.setExternalRenderPaths(e,t);this.renderedDependencies=this.getChunkDependencyDeclarations(e,n);this.renderedExports=this.exportMode==="none"?[]:this.getChunkExportDeclarations(e.format,n)}async render(e,t,i,n){cs("render format",2);const r=e.format;const o=fs[r];if(e.dynamicImportFunction&&r!=="es"){this.inputOptions.onwarn(errInvalidOption("output.dynamicImportFunction","outputdynamicImportFunction",'this option is ignored for formats other than "es"'))}for(const e of this.dependencies){const t=this.renderedDependencies.get(e);if(e instanceof ExternalModule){const i=e.renderPath;t.id=escapeId(e.renormalizeRenderPath?getImportPath(this.id,i,false,false):i)}else{t.namedExportsMode=e.exportMode!=="default";t.id=escapeId(getImportPath(this.id,e.id,false,true))}}this.finaliseDynamicImports(e,n);this.finaliseImportMetas(r,n);const l=this.renderedExports.length!==0||[...this.renderedDependencies.values()].some((e=>e.reexports&&e.reexports.length!==0));let c=null;const u=new Set;for(const e of this.orderedModules){if(e.usesTopLevelAwait){c=e.id}const t=this.accessedGlobalsByScope.get(e.scope);if(t){for(const e of t){u.add(e)}}}if(c!==null&&r!=="es"&&r!=="system"){return error({code:"INVALID_TLA_FORMAT",id:c,message:`Module format ${r} does not support top-level await. Use the "es" or "system" output formats rather.`})}if(!this.id){throw new Error("Internal Error: expecting chunk id")}const h=o(this.renderedSource,{accessedGlobals:u,dependencies:[...this.renderedDependencies.values()],exports:this.renderedExports,hasExports:l,id:this.id,indent:this.indentString,intro:t.intro,isEntryFacade:this.outputOptions.preserveModules||this.facadeModule!==null&&this.facadeModule.info.isEntry,isModuleFacade:this.facadeModule!==null,namedExportsMode:this.exportMode!=="default",outro:t.outro,snippets:n,usesTopLevelAwait:c!==null,warn:this.inputOptions.onwarn},e);if(t.banner)h.prepend(t.banner);if(t.footer)h.append(t.footer);const d=h.toString();us("render format",2);let p=null;const f=[];let m=await renderChunk({code:d,options:e,outputPluginDriver:this.pluginDriver,renderChunk:i,sourcemapChain:f});if(e.sourcemap){cs("sourcemap",2);let t;if(e.file)t=s.resolve(e.sourcemapFile||e.file);else if(e.dir)t=s.resolve(e.dir,this.id);else t=s.resolve(this.id);const i=h.generateDecodedMap({});p=collapseSourcemaps(t,i,this.usedModules,f,e.sourcemapExcludeSources,this.inputOptions.onwarn);p.sources=p.sources.map((i=>{const{sourcemapPathTransform:s}=e;if(s){const e=s(i,`${t}.map`);if(typeof e!=="string"){error(errFailedValidation(`sourcemapPathTransform function must return a string.`))}return e}return i})).map(normalize);us("sourcemap",2)}if(!e.compact&&m[m.length-1]!=="\n")m+="\n";return{code:m,map:p}}addDependenciesToChunk(e,t){for(const i of e){if(i instanceof Module){const e=this.chunkByModule.get(i);if(e&&e!==this){t.add(e)}}else{t.add(i)}}}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},i){if(e){this.fileName=e}else{this.name=this.outputOptions.sanitizeFileName(t||getChunkNameFromModule(i))}}checkCircularDependencyImport(e,t){const i=e.module;if(i instanceof Module){const s=this.chunkByModule.get(i);let n;do{n=t.alternativeReexportModules.get(e);if(n){const r=this.chunkByModule.get(n);if(r&&r!==s){this.inputOptions.onwarn(errCyclicCrossChunkReexport(i.getExportNamesByVariable().get(e)[0],i.id,n.id,t.id))}t=n}}while(n)}}computeContentHashWithDependencies(e,t,i){const s=createHash();s.update([e.intro,e.outro,e.banner,e.footer].join(":"));s.update(t.format);const n=new Set([this]);for(const r of n){if(r instanceof ExternalModule){s.update(`:${r.renderPath}`)}else{s.update(r.getRenderedHash());s.update(r.generateId(e,t,i,false))}if(r instanceof ExternalModule)continue;for(const e of[...r.dependencies,...r.dynamicDependencies]){n.add(e)}}return s.digest("hex").substr(0,8)}ensureReexportsAreAvailableForModule(e){const t=[];const i=e.getExportNamesByVariable();for(const s of i.keys()){const i=s instanceof SyntheticNamedExportVariable;const n=i?s.getBaseVariable():s;if(!(n instanceof NamespaceVariable&&this.outputOptions.preserveModules)){this.checkCircularDependencyImport(n,e);const s=n.module;if(s instanceof Module){const e=this.chunkByModule.get(s);if(e&&e!==this){e.exports.add(n);t.push(n);if(i){this.imports.add(n)}}}}}if(t.length){this.includedReexportsByModule.set(e,t)}}finaliseDynamicImports(e,t){const i=e.format==="amd"&&!e.amd.forceJsExtensionForImports;for(const[e,s]of this.renderedModuleSources){for(const{node:n,resolution:r}of e.dynamicImports){const e=this.chunkByModule.get(r);const o=this.facadeChunkByModule.get(r);if(!r||!n.included||e===this){continue}const l=r instanceof Module?`'${escapeId(getImportPath(this.id,(o||e).id,i,true))}'`:r instanceof ExternalModule?`'${escapeId(r.renormalizeRenderPath?getImportPath(this.id,r.renderPath,i,false):r.renderPath)}'`:r;n.renderFinalResolution(s,l,r instanceof Module&&!(o===null||o===void 0?void 0:o.strictFacade)&&e.exportNamesByVariable.get(r.namespace)[0],t)}}}finaliseImportMetas(e,t){for(const[i,s]of this.renderedModuleSources){for(const n of i.importMetas){n.renderFinalMechanism(s,this.id,e,t,this.pluginDriver)}}}generateVariableName(){if(this.manualChunkAlias){return this.manualChunkAlias}const e=this.entryModules[0]||this.implicitEntryModules[0]||this.dynamicEntryModules[0]||this.orderedModules[this.orderedModules.length-1];if(e){return getChunkNameFromModule(e)}return"chunk"}getChunkDependencyDeclarations(e,t){const i=this.getImportSpecifiers(t);const s=this.getReexportSpecifiers();const n=new Map;for(const t of this.dependencies){const r=i.get(t)||null;const o=s.get(t)||null;const l=t instanceof ExternalModule||t.exportMode!=="default";n.set(t,{defaultVariableName:t.defaultVariableName,globalName:t instanceof ExternalModule&&(e.format==="umd"||e.format==="iife")&&getGlobalName(t,e.globals,(r||o)!==null,this.inputOptions.onwarn),id:undefined,imports:r,isChunk:t instanceof Chunk,name:t.variableName,namedExportsMode:l,namespaceVariableName:t.namespaceVariableName,reexports:o})}return n}getChunkExportDeclarations(e,t){const i=[];for(const s of this.getExportNames()){if(s[0]==="*")continue;const n=this.exportsByName.get(s);if(!(n instanceof SyntheticNamedExportVariable)){const e=n.module;if(e&&this.chunkByModule.get(e)!==this)continue}let r=null;let o=false;let l=n.getName(t);if(n instanceof LocalVariable){for(const e of n.declarations){if(e.parent instanceof FunctionDeclaration||e instanceof ExportDefaultDeclaration&&e.declaration instanceof FunctionDeclaration){o=true;break}}}else if(n instanceof SyntheticNamedExportVariable){r=l;if(e==="es"){l=n.renderName}}i.push({exported:s,expression:r,hoisted:o,local:l})}return i}getDependenciesToBeDeconflicted(e,t,i){const s=new Set;const n=new Set;const r=new Set;for(const t of[...this.exportNamesByVariable.keys(),...this.imports]){if(e||t.isNamespace){const o=t.module;if(o instanceof ExternalModule){s.add(o);if(e){if(t.name==="default"){if(Gi[String(i(o.id))]){n.add(o)}}else if(t.name==="*"){if(Wi[String(i(o.id))]){r.add(o)}}}}else{const i=this.chunkByModule.get(o);if(i!==this){s.add(i);if(e&&i.exportMode==="default"&&t.isNamespace){r.add(i)}}}}}if(t){for(const e of this.dependencies){s.add(e)}}return{deconflictedDefault:n,deconflictedNamespace:r,dependencies:s}}getFallbackChunkName(){if(this.manualChunkAlias){return this.manualChunkAlias}if(this.dynamicName){return this.dynamicName}if(this.fileName){return getAliasName(this.fileName)}return getAliasName(this.orderedModules[this.orderedModules.length-1].id)}getImportSpecifiers(e){const{interop:t}=this.outputOptions;const i=new Map;for(const s of this.imports){const n=s.module;let r;let o;if(n instanceof ExternalModule){r=n;o=s.name;if(o!=="default"&&o!=="*"&&t(n.id)==="defaultOnly"){return error(errUnexpectedNamedImport(n.id,o,false))}}else{r=this.chunkByModule.get(n);o=r.getVariableExportName(s)}getOrCreate(i,r,(()=>[])).push({imported:o,local:s.getName(e)})}return i}getImportedBindingsPerDependency(){const e={};for(const[t,i]of this.renderedDependencies){const s=new Set;if(i.imports){for(const{imported:e}of i.imports){s.add(e)}}if(i.reexports){for(const{imported:e}of i.reexports){s.add(e)}}e[t.id]=[...s]}return e}getReexportSpecifiers(){const{externalLiveBindings:e,interop:t}=this.outputOptions;const i=new Map;for(let s of this.getExportNames()){let n;let r;let o=false;if(s[0]==="*"){const i=s.substring(1);if(t(i)==="defaultOnly"){this.inputOptions.onwarn(errUnexpectedNamespaceReexport(i))}o=e;n=this.modulesById.get(i);r=s="*"}else{const i=this.exportsByName.get(s);if(i instanceof SyntheticNamedExportVariable)continue;const l=i.module;if(l instanceof Module){n=this.chunkByModule.get(l);if(n===this)continue;r=n.getVariableExportName(i);o=i.isReassigned}else{n=l;r=i.name;if(r!=="default"&&r!=="*"&&t(l.id)==="defaultOnly"){return error(errUnexpectedNamedImport(l.id,r,true))}o=e&&(r!=="default"||isDefaultAProperty(String(t(l.id)),true))}}getOrCreate(i,n,(()=>[])).push({imported:r,needsLiveBinding:o,reexported:s})}return i}getReferencedFiles(){const e=[];for(const t of this.orderedModules){for(const i of t.importMetas){const t=i.getReferencedFileName(this.pluginDriver);if(t){e.push(t)}}}return e}inlineChunkDependencies(e){for(const t of e.dependencies){if(this.dependencies.has(t))continue;this.dependencies.add(t);if(t instanceof Chunk){this.inlineChunkDependencies(t)}}}prepareModulesForRendering(e){var t;const i=this.accessedGlobalsByScope;for(const s of this.orderedModules){for(const{node:n,resolution:r}of s.dynamicImports){if(n.included){if(r instanceof Module){const s=this.chunkByModule.get(r);if(s===this){n.setInternalResolution(r.namespace)}else{n.setExternalResolution(((t=this.facadeChunkByModule.get(r))===null||t===void 0?void 0:t.exportMode)||s.exportMode,r,this.outputOptions,e,this.pluginDriver,i)}}else{n.setExternalResolution("external",r,this.outputOptions,e,this.pluginDriver,i)}}}for(const e of s.importMetas){e.addAccessedGlobals(this.outputOptions.format,i)}if(this.includedNamespaces.has(s)&&!this.outputOptions.preserveModules){s.namespace.prepare(i)}}}setExternalRenderPaths(e,t){for(const i of[...this.dependencies,...this.dynamicDependencies]){if(i instanceof ExternalModule){i.setRenderPath(e,t)}}}setIdentifierRenderResolutions({format:e,interop:t,namespaceToStringTag:i}){const s=new Set;for(const t of this.getExportNames()){const i=this.exportsByName.get(t);if(e!=="es"&&e!=="system"&&i.isReassigned&&!i.isId){i.setRenderNames("exports",t)}else if(i instanceof SyntheticNamedExportVariable){s.add(i)}else{i.setRenderNames(null,null)}}for(const e of this.orderedModules){if(e.needsExportShim){this.needsExportsShim=true;break}}const n=new Set(["Object","Promise"]);if(this.needsExportsShim){n.add(as)}if(i){n.add("Symbol")}switch(e){case"system":n.add("module").add("exports");break;case"es":break;case"cjs":n.add("module").add("require").add("__filename").add("__dirname");default:n.add("exports");for(const e of Ki){n.add(e)}}deconflictChunk(this.orderedModules,this.getDependenciesToBeDeconflicted(e!=="es"&&e!=="system",e==="amd"||e==="umd"||e==="iife",t),this.imports,n,e,t,this.outputOptions.preserveModules,this.outputOptions.externalLiveBindings,this.chunkByModule,s,this.exportNamesByVariable,this.accessedGlobalsByScope,this.includedNamespaces)}setUpChunkImportsAndExportsForModule(e){const t=new Set(e.includedImports);if(!this.outputOptions.preserveModules){if(this.includedNamespaces.has(e)){const i=e.namespace.getMemberVariables();for(const e of Object.values(i)){t.add(e)}}}for(let i of t){if(i instanceof ExportDefaultVariable){i=i.getOriginalVariable()}if(i instanceof SyntheticNamedExportVariable){i=i.getBaseVariable()}const t=this.chunkByModule.get(i.module);if(t!==this){this.imports.add(i);if(!(i instanceof NamespaceVariable&&this.outputOptions.preserveModules)&&i.module instanceof Module){t.exports.add(i);this.checkCircularDependencyImport(i,e)}}}if(this.includedNamespaces.has(e)||e.info.isEntry&&e.preserveSignature!==false||e.includedDynamicImporters.some((e=>this.chunkByModule.get(e)!==this))){this.ensureReexportsAreAvailableForModule(e)}for(const{node:t,resolution:i}of e.dynamicImports){if(t.included&&i instanceof Module&&this.chunkByModule.get(i)===this&&!this.includedNamespaces.has(i)){this.includedNamespaces.add(i);this.ensureReexportsAreAvailableForModule(i)}}}}function getChunkNameFromModule(e){var t,i,s,n;return(n=(i=(t=e.chunkNames.find((({isUserDefined:e})=>e)))===null||t===void 0?void 0:t.name)!==null&&i!==void 0?i:(s=e.chunkNames[0])===null||s===void 0?void 0:s.name)!==null&&n!==void 0?n:getAliasName(e.id)}const vs=/[?#]/;function generateAssetFileName(e,t,i,n){const r=i.sanitizeFileName(e||"asset");return makeUnique(renderNamePattern(typeof i.assetFileNames==="function"?i.assetFileNames({name:e,source:t,type:"asset"}):i.assetFileNames,"output.assetFileNames",{ext:()=>s.extname(r).substring(1),extname:()=>s.extname(r),hash(){return createHash().update(r).update(":").update(t).digest("hex").substring(0,8)},name:()=>r.substring(0,r.length-s.extname(r).length)}),n)}function reserveFileNameInBundle(e,t,i){if(e in t){i(errFileNameConflict(e))}t[e]=bs}const bs={type:"placeholder"};function hasValidType(e){return Boolean(e&&(e.type==="asset"||e.type==="chunk"))}function hasValidName(e){const t=e.fileName||e.name;return!t||typeof t==="string"&&!isPathFragment(t)}function getValidSource(e,t,i){if(!(typeof e==="string"||e instanceof Uint8Array)){const e=t.fileName||t.name||i;return error(errFailedValidation(`Could not set source for ${typeof e==="string"?`asset "${e}"`:"unnamed asset"}, asset source needs to be a string, Uint8Array or Buffer.`))}return e}function getAssetFileName(e,t){if(typeof e.fileName!=="string"){return error(errAssetNotFinalisedForFileName(e.name||t))}return e.fileName}function getChunkFileName(e,t){var i;const s=e.fileName||e.module&&((i=t===null||t===void 0?void 0:t.get(e.module))===null||i===void 0?void 0:i.id);if(!s)return error(errChunkNotGeneratedForFileName(e.fileName||e.name));return s}class FileEmitter{constructor(e,t,i){this.graph=e;this.options=t;this.bundle=null;this.facadeChunkByModule=null;this.outputOptions=null;this.assertAssetsFinalized=()=>{for(const[e,t]of this.filesByReferenceId){if(t.type==="asset"&&typeof t.fileName!=="string")return error(errNoAssetSourceSet(t.name||e))}};this.emitFile=e=>{if(!hasValidType(e)){return error(errFailedValidation(`Emitted files must be of type "asset" or "chunk", received "${e&&e.type}".`))}if(!hasValidName(e)){return error(errFailedValidation(`The "fileName" or "name" properties of emitted files must be strings that are neither absolute nor relative paths, received "${e.fileName||e.name}".`))}if(e.type==="chunk"){return this.emitChunk(e)}return this.emitAsset(e)};this.getFileName=e=>{const t=this.filesByReferenceId.get(e);if(!t)return error(errFileReferenceIdNotFoundForFilename(e));if(t.type==="chunk"){return getChunkFileName(t,this.facadeChunkByModule)}return getAssetFileName(t,e)};this.setAssetSource=(e,t)=>{const i=this.filesByReferenceId.get(e);if(!i)return error(errAssetReferenceIdNotFoundForSetSource(e));if(i.type!=="asset"){return error(errFailedValidation(`Asset sources can only be set for emitted assets but "${e}" is an emitted chunk.`))}if(i.source!==undefined){return error(errAssetSourceAlreadySet(i.name||e))}const s=getValidSource(t,i,e);if(this.bundle){this.finalizeAsset(i,s,e,this.bundle)}else{i.source=s}};this.setOutputBundle=(e,t,i)=>{this.outputOptions=t;this.bundle=e;this.facadeChunkByModule=i;for(const e of this.filesByReferenceId.values()){if(e.fileName){reserveFileNameInBundle(e.fileName,this.bundle,this.options.onwarn)}}for(const[e,t]of this.filesByReferenceId){if(t.type==="asset"&&t.source!==undefined){this.finalizeAsset(t,t.source,e,this.bundle)}}};this.filesByReferenceId=i?new Map(i.filesByReferenceId):new Map}assignReferenceId(e,t){let i;do{i=createHash().update(i||t).digest("hex").substring(0,8)}while(this.filesByReferenceId.has(i));this.filesByReferenceId.set(i,e);return i}emitAsset(e){const t=typeof e.source!=="undefined"?getValidSource(e.source,e,null):undefined;const i={fileName:e.fileName,name:e.name,source:t,type:"asset"};const s=this.assignReferenceId(i,e.fileName||e.name||e.type);if(this.bundle){if(e.fileName){reserveFileNameInBundle(e.fileName,this.bundle,this.options.onwarn)}if(t!==undefined){this.finalizeAsset(i,t,s,this.bundle)}}return s}emitChunk(e){if(this.graph.phase>os.LOAD_AND_PARSE){return error(errInvalidRollupPhaseForChunkEmission())}if(typeof e.id!=="string"){return error(errFailedValidation(`Emitted chunks need to have a valid string id, received "${e.id}"`))}const t={fileName:e.fileName,module:null,name:e.name||e.id,type:"chunk"};this.graph.moduleLoader.emitChunk(e).then((e=>t.module=e)).catch((()=>{}));return this.assignReferenceId(t,e.id)}finalizeAsset(e,t,i,s){const n=e.fileName||findExistingAssetFileNameWithSource(s,t)||generateAssetFileName(e.name,t,this.outputOptions,s);const r={...e,fileName:n,source:t};this.filesByReferenceId.set(i,r);const{options:o}=this;s[n]={fileName:n,get isAsset(){warnDeprecation('Accessing "isAsset" on files in the bundle is deprecated, please use "type === \'asset\'" instead',true,o);return true},name:e.name,source:t,type:"asset"}}}function findExistingAssetFileNameWithSource(e,t){for(const[i,s]of Object.entries(e)){if(s.type==="asset"&&areSourcesEqual(t,s.source))return i}return null}function areSourcesEqual(e,t){if(typeof e==="string"){return e===t}if(typeof t==="string"){return false}if("equals"in e){return e.equals(t)}if(e.length!==t.length){return false}for(let i=0;i<e.length;i++){if(e[i]!==t[i]){return false}}return true}const concatSep=(e,t)=>t?`${e}\n${t}`:e;const concatDblSep=(e,t)=>t?`${e}\n\n${t}`:e;async function createAddons(e,t){try{let[i,s,n,r]=await Promise.all([t.hookReduceValue("banner",e.banner(),[],concatSep),t.hookReduceValue("footer",e.footer(),[],concatSep),t.hookReduceValue("intro",e.intro(),[],concatDblSep),t.hookReduceValue("outro",e.outro(),[],concatDblSep)]);if(n)n+="\n\n";if(r)r=`\n\n${r}`;if(i.length)i+="\n";if(s.length)s="\n"+s;return{banner:i,footer:s,intro:n,outro:r}}catch(e){return error({code:"ADDON_ERROR",message:`Could not retrieve ${e.hook}. Check configuration of plugin ${e.plugin}.\n\tError Message: ${e.message}`})}}function getChunkAssignments(e,t){const i=[];const s=new Set(t.keys());const n=Object.create(null);for(const[e,i]of t){const t=n[i]=n[i]||[];addStaticDependenciesToManualChunk(e,t,s)}for(const[e,t]of Object.entries(n)){i.push({alias:e,modules:t})}const r=new Map;const{dependentEntryPointsByModule:o,dynamicEntryModules:l}=analyzeModuleGraph(e);const c=getDynamicDependentEntryPoints(o,l);const u=new Set(e);function assignEntryToStaticDependencies(e,t){const i=new Set([e]);for(const n of i){const l=getOrCreate(r,n,(()=>new Set));if(t&&areEntryPointsContainedOrDynamicallyDependent(t,o.get(n))){continue}else{l.add(e)}for(const e of n.getDependenciesToBeIncluded()){if(!(e instanceof ExternalModule||s.has(e))){i.add(e)}}}}function areEntryPointsContainedOrDynamicallyDependent(e,t){const i=new Set(e);for(const e of i){if(!t.has(e)){if(u.has(e))return false;const t=c.get(e);for(const e of t){i.add(e)}}}return true}for(const t of e){if(!s.has(t)){assignEntryToStaticDependencies(t,null)}}for(const e of l){if(!s.has(e)){assignEntryToStaticDependencies(e,c.get(e))}}i.push(...createChunks([...e,...l],r));return i}function addStaticDependenciesToManualChunk(e,t,i){const s=new Set([e]);for(const e of s){i.add(e);t.push(e);for(const t of e.dependencies){if(!(t instanceof ExternalModule||i.has(t))){s.add(t)}}}}function analyzeModuleGraph(e){const t=new Set;const i=new Map;const s=new Set(e);for(const e of s){const n=new Set([e]);for(const r of n){getOrCreate(i,r,(()=>new Set)).add(e);for(const e of r.getDependenciesToBeIncluded()){if(!(e instanceof ExternalModule)){n.add(e)}}for(const{resolution:e}of r.dynamicImports){if(e instanceof Module&&e.includedDynamicImporters.length>0){t.add(e);s.add(e)}}for(const e of r.implicitlyLoadedBefore){t.add(e);s.add(e)}}}return{dependentEntryPointsByModule:i,dynamicEntryModules:t}}function getDynamicDependentEntryPoints(e,t){const i=new Map;for(const s of t){const t=getOrCreate(i,s,(()=>new Set));for(const i of[...s.includedDynamicImporters,...s.implicitlyLoadedAfter]){for(const s of e.get(i)){t.add(s)}}}return i}function createChunks(e,t){const i=Object.create(null);for(const[s,n]of t){let t="";for(const i of e){t+=n.has(i)?"X":"_"}const r=i[t];if(r){r.push(s)}else{i[t]=[s]}}return Object.values(i).map((e=>({alias:null,modules:e})))}function commondir(e){if(e.length===0)return"/";if(e.length===1)return s.dirname(e[0]);const t=e.slice(1).reduce(((e,t)=>{const i=t.split(/\/+|\\+/);let s;for(s=0;e[s]===i[s]&&s<Math.min(e.length,i.length);s++);return e.slice(0,s)}),e[0].split(/\/+|\\+/));return t.length>1?t.join("/"):"/"}const compareExecIndex=(e,t)=>e.execIndex>t.execIndex?1:-1;function sortByExecutionOrder(e){e.sort(compareExecIndex)}function analyseModuleExecution(e){let t=0;const i=[];const s=new Set;const n=new Set;const r=new Map;const o=[];const analyseModule=e=>{if(e instanceof Module){for(const t of e.dependencies){if(r.has(t)){if(!s.has(t)){i.push(getCyclePath(t,e,r))}continue}r.set(t,e);analyseModule(t)}for(const t of e.implicitlyLoadedBefore){n.add(t)}for(const{resolution:t}of e.dynamicImports){if(t instanceof Module){n.add(t)}}o.push(e)}e.execIndex=t++;s.add(e)};for(const t of e){if(!r.has(t)){r.set(t,null);analyseModule(t)}}for(const e of n){if(!r.has(e)){r.set(e,null);analyseModule(e)}}return{cyclePaths:i,orderedModules:o}}function getCyclePath(e,t,i){const s=Symbol(e.id);const n=[relativeId(e.id)];let r=t;e.cycles.add(s);while(r!==e){r.cycles.add(s);n.push(relativeId(r.id));r=i.get(r)}n.push(n[0]);n.reverse();return n}function getGenerateCodeSnippets({compact:e,generatedCode:{arrowFunctions:t,constBindings:i,objectShorthand:s,reservedNamesAsProps:n}}){const{_:r,n:o,s:l}=e?{_:"",n:"",s:""}:{_:" ",n:"\n",s:";"};const c=i?"const":"var";const getNonArrowFunctionIntro=(e,{isAsync:t,name:i})=>`${t?`async `:""}function${i?` ${i}`:""}${r}(${e.join(`,${r}`)})${r}`;const u=t?(e,{isAsync:t,name:i})=>{const s=e.length===1;const n=t?`async${s?" ":r}`:"";return`${i?`${c} ${i}${r}=${r}`:""}${n}${s?e[0]:`(${e.join(`,${r}`)})`}${r}=>${r}`}:getNonArrowFunctionIntro;const getDirectReturnFunction=(e,{functionReturn:i,lineBreakIndent:s,name:n})=>[`${u(e,{isAsync:false,name:n})}${t?s?`${o}${s.base}${s.t}`:"":`{${s?`${o}${s.base}${s.t}`:r}${i?"return ":""}`}`,t?`${n?";":""}${s?`${o}${s.base}`:""}`:`${l}${s?`${o}${s.base}`:r}}`];const h=n?e=>Ss.test(e):e=>!ee.has(e)&&Ss.test(e);return{_:r,cnst:c,getDirectReturnFunction:getDirectReturnFunction,getDirectReturnIifeLeft:(e,i,{needsArrowReturnParens:s,needsWrappedFunction:n})=>{const[r,o]=getDirectReturnFunction(e,{functionReturn:true,lineBreakIndent:null,name:null});return`${wrapIfNeeded(`${r}${wrapIfNeeded(i,t&&s)}${o}`,t||n)}(`},getFunctionIntro:u,getNonArrowFunctionIntro:getNonArrowFunctionIntro,getObject(e,{lineBreakIndent:t}){const i=t?`${o}${t.base}${t.t}`:r;return`{${e.map((([e,t])=>{if(e===null)return`${i}${t}`;const n=!h(e);return e===t&&s&&!n?i+e:`${i}${n?`'${e}'`:e}:${r}${t}`})).join(`,`)}${e.length===0?"":t?`${o}${t.base}`:r}}`},getPropertyAccess:e=>h(e)?`.${e}`:`[${JSON.stringify(e)}]`,n:o,s:l}}const wrapIfNeeded=(e,t)=>t?`(${e})`:e;const Ss=/^(?!\d)[\w$]+$/;class Bundle{constructor(e,t,i,s,n){this.outputOptions=e;this.unsetOptions=t;this.inputOptions=i;this.pluginDriver=s;this.graph=n;this.facadeChunkByModule=new Map;this.includedNamespaces=new Set}async generate(e){cs("GENERATE",1);const t=Object.create(null);this.pluginDriver.setOutputBundle(t,this.outputOptions,this.facadeChunkByModule);try{await this.pluginDriver.hookParallel("renderStart",[this.outputOptions,this.inputOptions]);cs("generate chunks",2);const e=await this.generateChunks();if(e.length>1){validateOptionsForMultiChunkOutput(this.outputOptions,this.inputOptions.onwarn)}const i=commondir(getAbsoluteEntryModulePaths(e));us("generate chunks",2);cs("render modules",2);const s=await createAddons(this.outputOptions,this.pluginDriver);const n=getGenerateCodeSnippets(this.outputOptions);this.prerenderChunks(e,i,n);us("render modules",2);await this.addFinalizedChunksToBundle(e,i,s,t,n)}catch(e){await this.pluginDriver.hookParallel("renderError",[e]);throw e}await this.pluginDriver.hookSeq("generateBundle",[this.outputOptions,t,e]);this.finaliseAssets(t);us("GENERATE",1);return t}async addFinalizedChunksToBundle(e,t,i,s,n){this.assignChunkIds(e,t,i,s);for(const t of e){s[t.id]=t.getChunkInfoWithFileNames()}await Promise.all(e.map((async e=>{const t=s[e.id];Object.assign(t,await e.render(this.outputOptions,i,t,n))})))}async addManualChunks(e){const t=new Map;const i=await Promise.all(Object.entries(e).map((async([e,t])=>({alias:e,entries:await this.graph.moduleLoader.addAdditionalModules(t)}))));for(const{alias:e,entries:s}of i){for(const i of s){addModuleToManualChunk(e,i,t)}}return t}assignChunkIds(e,t,i,n){const r=[];const o=[];for(const t of e){(t.facadeModule&&t.facadeModule.isUserDefinedEntryPoint?r:o).push(t)}const l=r.concat(o);for(const e of l){if(this.outputOptions.file){e.id=s.basename(this.outputOptions.file)}else if(this.outputOptions.preserveModules){e.id=e.generateIdPreserveModules(t,this.outputOptions,n,this.unsetOptions)}else{e.id=e.generateId(i,this.outputOptions,n,true)}n[e.id]=bs}}assignManualChunks(e){const t=[];const i={getModuleIds:()=>this.graph.modulesById.keys(),getModuleInfo:this.graph.getModuleInfo};for(const s of this.graph.modulesById.values()){if(s instanceof Module){const n=e(s.id,i);if(typeof n==="string"){t.push([n,s])}}}t.sort((([e],[t])=>e>t?1:e<t?-1:0));const s=new Map;for(const[e,i]of t){addModuleToManualChunk(e,i,s)}return s}finaliseAssets(e){for(const t of Object.values(e)){if(!t.type){warnDeprecation('A plugin is directly adding properties to the bundle object in the "generateBundle" hook. This is deprecated and will be removed in a future Rollup version, please use "this.emitFile" instead.',true,this.inputOptions);t.type="asset"}if(this.outputOptions.validate&&"code"in t){try{this.graph.contextParse(t.code,{allowHashBang:true,ecmaVersion:"latest"})}catch(e){this.inputOptions.onwarn(errChunkInvalid(t,e))}}}this.pluginDriver.finaliseAssets()}async generateChunks(){const{manualChunks:e}=this.outputOptions;const t=typeof e==="object"?await this.addManualChunks(e):this.assignManualChunks(e);const i=[];const s=new Map;for(const{alias:e,modules:n}of this.outputOptions.inlineDynamicImports?[{alias:null,modules:getIncludedModules(this.graph.modulesById)}]:this.outputOptions.preserveModules?getIncludedModules(this.graph.modulesById).map((e=>({alias:null,modules:[e]}))):getChunkAssignments(this.graph.entryModules,t)){sortByExecutionOrder(n);const t=new Chunk(n,this.inputOptions,this.outputOptions,this.unsetOptions,this.pluginDriver,this.graph.modulesById,s,this.facadeChunkByModule,this.includedNamespaces,e);i.push(t);for(const e of n){s.set(e,t)}}for(const e of i){e.link()}const n=[];for(const e of i){n.push(...e.generateFacades())}return[...i,...n]}prerenderChunks(e,t,i){for(const t of e){t.generateExports()}for(const s of e){s.preRender(this.outputOptions,t,i)}}}function getAbsoluteEntryModulePaths(e){const t=[];for(const i of e){for(const e of i.entryModules){if(isAbsolute(e.id)){t.push(e.id)}}}return t}function validateOptionsForMultiChunkOutput(e,t){if(e.format==="umd"||e.format==="iife")return error(errInvalidOption("output.format","outputformat","UMD and IIFE output formats are not supported for code-splitting builds",e.format));if(typeof e.file==="string")return error(errInvalidOption("output.file","outputdir",'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 error(errInvalidOption("output.sourcemapFile","outputsourcemapfile",'"output.sourcemapFile" is only supported for single-file builds'));if(!e.amd.autoId&&e.amd.id)t(errInvalidOption("output.amd.id","outputamd",'this option is only properly supported for single-file builds. Use "output.amd.autoId" and "output.amd.basePath" instead'))}function getIncludedModules(e){return[...e.values()].filter((e=>e instanceof Module&&(e.isIncluded()||e.info.isEntry||e.includedDynamicImporters.length>0)))}function addModuleToManualChunk(e,t,i){const s=i.get(t);if(typeof s==="string"&&s!==e){return error(errCannotAssignModuleToChunk(t.id,e,s))}i.set(t,e)}var As=[509,0,227,0,150,4,294,9,1368,2,2,1,6,3,41,2,5,0,166,1,574,3,9,9,370,1,154,10,50,3,123,2,54,14,32,10,3,1,11,3,46,10,8,0,46,9,7,2,37,13,2,9,6,1,45,0,13,2,49,13,9,3,2,11,83,11,7,0,161,11,6,9,7,3,56,1,2,6,3,1,3,2,10,0,11,1,3,6,4,4,193,17,10,9,5,0,82,19,13,9,214,6,3,8,28,1,83,16,16,9,82,12,9,9,84,14,5,9,243,14,166,9,71,5,2,1,3,3,2,0,2,1,13,9,120,6,3,6,4,0,29,9,41,6,2,3,9,0,10,10,47,15,406,7,2,7,17,9,57,21,2,13,123,5,4,0,2,1,2,6,2,0,9,9,49,4,2,1,2,4,9,9,330,3,19306,9,87,9,39,4,60,6,26,9,1014,0,2,54,8,3,82,0,12,1,19628,1,4706,45,3,22,543,4,4,5,9,7,3,6,31,3,149,2,1418,49,513,54,5,49,9,0,15,0,23,4,2,14,1361,6,2,16,3,6,2,1,2,4,262,6,10,9,357,0,62,13,1495,6,110,6,6,9,4759,9,787719,239];var ws=[0,11,2,25,2,18,2,1,2,14,3,13,35,122,70,52,268,28,4,48,48,31,14,29,6,37,11,29,3,35,5,7,2,4,43,157,19,35,5,35,5,39,9,51,13,10,2,14,2,6,2,1,2,10,2,14,2,6,2,1,68,310,10,21,11,7,25,5,2,41,2,8,70,5,3,0,2,43,2,1,4,0,3,22,11,22,10,30,66,18,2,1,11,21,11,25,71,55,7,1,65,0,16,3,2,2,2,28,43,28,4,28,36,7,2,27,28,53,11,21,11,18,14,17,111,72,56,50,14,50,14,35,349,41,7,1,79,28,11,0,9,21,43,17,47,20,28,22,13,52,58,1,3,0,14,44,33,24,27,35,30,0,3,0,9,34,4,0,13,47,15,3,22,0,2,0,36,17,2,24,85,6,2,0,2,3,2,14,2,9,8,46,39,7,3,1,3,21,2,6,2,1,2,4,4,0,19,0,13,4,159,52,19,3,21,2,31,47,21,1,2,0,185,46,42,3,37,47,21,0,60,42,14,0,72,26,38,6,186,43,117,63,32,7,3,0,3,7,2,1,2,23,16,0,2,0,95,7,3,38,17,0,2,0,29,0,11,39,8,0,22,0,12,45,20,0,19,72,264,8,2,36,18,0,50,29,113,6,2,1,2,37,22,0,26,5,2,1,2,31,15,0,328,18,190,0,80,921,103,110,18,195,2637,96,16,1070,4050,582,8634,568,8,30,18,78,18,29,19,47,17,3,32,20,6,18,689,63,129,74,6,0,67,12,65,1,2,0,29,6135,9,1237,43,8,8936,3,2,6,2,1,2,290,46,2,18,3,9,395,2309,106,6,12,4,8,8,9,5991,84,2,70,2,1,3,0,3,1,3,3,2,11,2,0,2,6,2,64,2,3,3,7,2,6,2,27,2,3,2,4,2,0,4,6,2,339,3,24,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,30,2,24,2,7,1845,30,482,44,11,6,17,0,322,29,19,43,1269,6,2,3,2,1,2,14,2,196,60,67,8,0,1205,3,2,26,2,1,2,0,3,0,2,9,2,3,2,0,2,0,7,0,5,0,2,0,2,0,2,2,2,1,2,0,3,0,2,0,2,0,2,0,2,0,2,1,2,0,3,3,2,6,2,3,2,3,2,0,2,9,2,16,6,2,2,4,2,16,4421,42719,33,4152,8,221,3,5761,15,7472,3104,541,1507,4938];var Is="‌‍·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-ໍ໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_";var Cs="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ";var ks={3:"abstract boolean byte char class double enum export extends final float goto implements import int interface long native package private protected public short static super synchronized throws transient volatile",5:"class enum extends super const export import",6:"enum",strict:"implements interface let package private protected public static yield",strictBind:"eval arguments"};var _s="break case catch continue debugger default do else finally for function if return switch throw try var while with null true false instanceof typeof void delete new in this";var Ps={5:_s,"5module":_s+" export import",6:_s+" const class extends export import super"};var Ns=/^in(stanceof)?$/;var Rs=new RegExp("["+Cs+"]");var Ts=new RegExp("["+Cs+Is+"]");function isInAstralSet(e,t){var i=65536;for(var s=0;s<t.length;s+=2){i+=t[s];if(i>e){return false}i+=t[s+1];if(i>=e){return true}}}function isIdentifierStart(e,t){if(e<65){return e===36}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&Rs.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,ws)}function isIdentifierChar(e,t){if(e<48){return e===36}if(e<58){return true}if(e<65){return false}if(e<91){return true}if(e<97){return e===95}if(e<123){return true}if(e<=65535){return e>=170&&Ts.test(String.fromCharCode(e))}if(t===false){return false}return isInAstralSet(e,ws)||isInAstralSet(e,As)}var $s=function TokenType(e,t){if(t===void 0)t={};this.label=e;this.keyword=t.keyword;this.beforeExpr=!!t.beforeExpr;this.startsExpr=!!t.startsExpr;this.isLoop=!!t.isLoop;this.isAssign=!!t.isAssign;this.prefix=!!t.prefix;this.postfix=!!t.postfix;this.binop=t.binop||null;this.updateContext=null};function binop(e,t){return new $s(e,{beforeExpr:true,binop:t})}var Os={beforeExpr:true},Ds={startsExpr:true};var Ms={};function kw(e,t){if(t===void 0)t={};t.keyword=e;return Ms[e]=new $s(e,t)}var Ls={num:new $s("num",Ds),regexp:new $s("regexp",Ds),string:new $s("string",Ds),name:new $s("name",Ds),privateId:new $s("privateId",Ds),eof:new $s("eof"),bracketL:new $s("[",{beforeExpr:true,startsExpr:true}),bracketR:new $s("]"),braceL:new $s("{",{beforeExpr:true,startsExpr:true}),braceR:new $s("}"),parenL:new $s("(",{beforeExpr:true,startsExpr:true}),parenR:new $s(")"),comma:new $s(",",Os),semi:new $s(";",Os),colon:new $s(":",Os),dot:new $s("."),question:new $s("?",Os),questionDot:new $s("?."),arrow:new $s("=>",Os),template:new $s("template"),invalidTemplate:new $s("invalidTemplate"),ellipsis:new $s("...",Os),backQuote:new $s("`",Ds),dollarBraceL:new $s("${",{beforeExpr:true,startsExpr:true}),eq:new $s("=",{beforeExpr:true,isAssign:true}),assign:new $s("_=",{beforeExpr:true,isAssign:true}),incDec:new $s("++/--",{prefix:true,postfix:true,startsExpr:true}),prefix:new $s("!/~",{beforeExpr:true,prefix:true,startsExpr:true}),logicalOR:binop("||",1),logicalAND:binop("&&",2),bitwiseOR:binop("|",3),bitwiseXOR:binop("^",4),bitwiseAND:binop("&",5),equality:binop("==/!=/===/!==",6),relational:binop("</>/<=/>=",7),bitShift:binop("<</>>/>>>",8),plusMin:new $s("+/-",{beforeExpr:true,binop:9,prefix:true,startsExpr:true}),modulo:binop("%",10),star:binop("*",10),slash:binop("/",10),starstar:new $s("**",{beforeExpr:true}),coalesce:binop("??",1),_break:kw("break"),_case:kw("case",Os),_catch:kw("catch"),_continue:kw("continue"),_debugger:kw("debugger"),_default:kw("default",Os),_do:kw("do",{isLoop:true,beforeExpr:true}),_else:kw("else",Os),_finally:kw("finally"),_for:kw("for",{isLoop:true}),_function:kw("function",Ds),_if:kw("if"),_return:kw("return",Os),_switch:kw("switch"),_throw:kw("throw",Os),_try:kw("try"),_var:kw("var"),_const:kw("const"),_while:kw("while",{isLoop:true}),_with:kw("with"),_new:kw("new",{beforeExpr:true,startsExpr:true}),_this:kw("this",Ds),_super:kw("super",Ds),_class:kw("class",Ds),_extends:kw("extends",Os),_export:kw("export"),_import:kw("import",Ds),_null:kw("null",Ds),_true:kw("true",Ds),_false:kw("false",Ds),_in:kw("in",{beforeExpr:true,binop:7}),_instanceof:kw("instanceof",{beforeExpr:true,binop:7}),_typeof:kw("typeof",{beforeExpr:true,prefix:true,startsExpr:true}),_void:kw("void",{beforeExpr:true,prefix:true,startsExpr:true}),_delete:kw("delete",{beforeExpr:true,prefix:true,startsExpr:true})};var Fs=/\r\n?|\n|\u2028|\u2029/;var Vs=new RegExp(Fs.source,"g");function isNewLine(e){return e===10||e===13||e===8232||e===8233}function nextLineBreak(e,t,i){if(i===void 0)i=e.length;for(var s=t;s<i;s++){var n=e.charCodeAt(s);if(isNewLine(n)){return s<i-1&&n===13&&e.charCodeAt(s+1)===10?s+2:s+1}}return-1}var Bs=/[\u1680\u2000-\u200a\u202f\u205f\u3000\ufeff]/;var zs=/(?:\s|\/\/.*|\/\*[^]*?\*\/)*/g;var Us=Object.prototype;var Hs=Us.hasOwnProperty;var js=Us.toString;var Gs=Object.hasOwn||function(e,t){return Hs.call(e,t)};var Ws=Array.isArray||function(e){return js.call(e)==="[object Array]"};function wordsRegexp(e){return new RegExp("^(?:"+e.replace(/ /g,"|")+")$")}function codePointToString(e){if(e<=65535){return String.fromCharCode(e)}e-=65536;return String.fromCharCode((e>>10)+55296,(e&1023)+56320)}var qs=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/;var Ks=function Position(e,t){this.line=e;this.column=t};Ks.prototype.offset=function offset(e){return new Ks(this.line,this.column+e)};var Ys=function SourceLocation(e,t,i){this.start=t;this.end=i;if(e.sourceFile!==null){this.source=e.sourceFile}};function getLineInfo(e,t){for(var i=1,s=0;;){var n=nextLineBreak(e,s,t);if(n<0){return new Ks(i,t-s)}++i;s=n}}var Xs={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:false,allowImportExportEverywhere:false,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:false,locations:false,onToken:null,onComment:null,ranges:false,program:null,sourceFile:null,directSourceFile:null,preserveParens:false};var Qs=false;function getOptions(e){var t={};for(var i in Xs){t[i]=e&&Gs(e,i)?e[i]:Xs[i]}if(t.ecmaVersion==="latest"){t.ecmaVersion=1e8}else if(t.ecmaVersion==null){if(!Qs&&typeof console==="object"&&console.warn){Qs=true;console.warn("Since Acorn 8.0.0, options.ecmaVersion is required.\nDefaulting to 2020, but this will stop working in the future.")}t.ecmaVersion=11}else if(t.ecmaVersion>=2015){t.ecmaVersion-=2009}if(t.allowReserved==null){t.allowReserved=t.ecmaVersion<5}if(Ws(t.onToken)){var s=t.onToken;t.onToken=function(e){return s.push(e)}}if(Ws(t.onComment)){t.onComment=pushComment(t,t.onComment)}return t}function pushComment(e,t){return function(i,s,n,r,o,l){var c={type:i?"Block":"Line",value:s,start:n,end:r};if(e.locations){c.loc=new Ys(this,o,l)}if(e.ranges){c.range=[n,r]}t.push(c)}}var Zs=1,Js=2,en=4,tn=8,sn=16,nn=32,rn=64,an=128,on=256,ln=Zs|Js|on;function functionFlags(e,t){return Js|(e?en:0)|(t?tn:0)}var cn=0,un=1,hn=2,dn=3,pn=4,fn=5;var mn=function Parser(e,t,i){this.options=e=getOptions(e);this.sourceFile=e.sourceFile;this.keywords=wordsRegexp(Ps[e.ecmaVersion>=6?6:e.sourceType==="module"?"5module":5]);var s="";if(e.allowReserved!==true){s=ks[e.ecmaVersion>=6?6:e.ecmaVersion===5?5:3];if(e.sourceType==="module"){s+=" await"}}this.reservedWords=wordsRegexp(s);var n=(s?s+" ":"")+ks.strict;this.reservedWordsStrict=wordsRegexp(n);this.reservedWordsStrictBind=wordsRegexp(n+" "+ks.strictBind);this.input=String(t);this.containsEsc=false;if(i){this.pos=i;this.lineStart=this.input.lastIndexOf("\n",i-1)+1;this.curLine=this.input.slice(0,this.lineStart).split(Fs).length}else{this.pos=this.lineStart=0;this.curLine=1}this.type=Ls.eof;this.value=null;this.start=this.end=this.pos;this.startLoc=this.endLoc=this.curPosition();this.lastTokEndLoc=this.lastTokStartLoc=null;this.lastTokStart=this.lastTokEnd=this.pos;this.context=this.initialContext();this.exprAllowed=true;this.inModule=e.sourceType==="module";this.strict=this.inModule||this.strictDirective(this.pos);this.potentialArrowAt=-1;this.potentialArrowInForAwait=false;this.yieldPos=this.awaitPos=this.awaitIdentPos=0;this.labels=[];this.undefinedExports=Object.create(null);if(this.pos===0&&e.allowHashBang&&this.input.slice(0,2)==="#!"){this.skipLineComment(2)}this.scopeStack=[];this.enterScope(Zs);this.regexpState=null;this.privateNameStack=[]};var gn={inFunction:{configurable:true},inGenerator:{configurable:true},inAsync:{configurable:true},canAwait:{configurable:true},allowSuper:{configurable:true},allowDirectSuper:{configurable:true},treatFunctionsAsVar:{configurable:true},allowNewDotTarget:{configurable:true},inClassStaticBlock:{configurable:true}};mn.prototype.parse=function parse(){var e=this.options.program||this.startNode();this.nextToken();return this.parseTopLevel(e)};gn.inFunction.get=function(){return(this.currentVarScope().flags&Js)>0};gn.inGenerator.get=function(){return(this.currentVarScope().flags&tn)>0&&!this.currentVarScope().inClassFieldInit};gn.inAsync.get=function(){return(this.currentVarScope().flags&en)>0&&!this.currentVarScope().inClassFieldInit};gn.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&on){return false}if(t.flags&Js){return(t.flags&en)>0}}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction};gn.allowSuper.get=function(){var e=this.currentThisScope();var t=e.flags;var i=e.inClassFieldInit;return(t&rn)>0||i||this.options.allowSuperOutsideMethod};gn.allowDirectSuper.get=function(){return(this.currentThisScope().flags&an)>0};gn.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())};gn.allowNewDotTarget.get=function(){var e=this.currentThisScope();var t=e.flags;var i=e.inClassFieldInit;return(t&(Js|on))>0||i};gn.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&on)>0};mn.extend=function extend(){var e=[],t=arguments.length;while(t--)e[t]=arguments[t];var i=this;for(var s=0;s<e.length;s++){i=e[s](i)}return i};mn.parse=function parse(e,t){return new this(t,e).parse()};mn.parseExpressionAt=function parseExpressionAt(e,t,i){var s=new this(i,e,t);s.nextToken();return s.parseExpression()};mn.tokenizer=function tokenizer(e,t){return new this(t,e)};Object.defineProperties(mn.prototype,gn);var yn=mn.prototype;var En=/^(?:'((?:\\.|[^'\\])*?)'|"((?:\\.|[^"\\])*?)")/;yn.strictDirective=function(e){if(this.options.ecmaVersion<5){return false}for(;;){zs.lastIndex=e;e+=zs.exec(this.input)[0].length;var t=En.exec(this.input.slice(e));if(!t){return false}if((t[1]||t[2])==="use strict"){zs.lastIndex=e+t[0].length;var i=zs.exec(this.input),s=i.index+i[0].length;var n=this.input.charAt(s);return n===";"||n==="}"||Fs.test(i[0])&&!(/[(`.[+\-/*%<>=,?^&]/.test(n)||n==="!"&&this.input.charAt(s+1)==="=")}e+=t[0].length;zs.lastIndex=e;e+=zs.exec(this.input)[0].length;if(this.input[e]===";"){e++}}};yn.eat=function(e){if(this.type===e){this.next();return true}else{return false}};yn.isContextual=function(e){return this.type===Ls.name&&this.value===e&&!this.containsEsc};yn.eatContextual=function(e){if(!this.isContextual(e)){return false}this.next();return true};yn.expectContextual=function(e){if(!this.eatContextual(e)){this.unexpected()}};yn.canInsertSemicolon=function(){return this.type===Ls.eof||this.type===Ls.braceR||Fs.test(this.input.slice(this.lastTokEnd,this.start))};yn.insertSemicolon=function(){if(this.canInsertSemicolon()){if(this.options.onInsertedSemicolon){this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc)}return true}};yn.semicolon=function(){if(!this.eat(Ls.semi)&&!this.insertSemicolon()){this.unexpected()}};yn.afterTrailingComma=function(e,t){if(this.type===e){if(this.options.onTrailingComma){this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc)}if(!t){this.next()}return true}};yn.expect=function(e){this.eat(e)||this.unexpected()};yn.unexpected=function(e){this.raise(e!=null?e:this.start,"Unexpected token")};var xn=function DestructuringErrors(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};yn.checkPatternErrors=function(e,t){if(!e){return}if(e.trailingComma>-1){this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element")}var i=t?e.parenthesizedAssign:e.parenthesizedBind;if(i>-1){this.raiseRecoverable(i,"Parenthesized pattern")}};yn.checkExpressionErrors=function(e,t){if(!e){return false}var i=e.shorthandAssign;var s=e.doubleProto;if(!t){return i>=0||s>=0}if(i>=0){this.raise(i,"Shorthand property assignments are valid only in destructuring patterns")}if(s>=0){this.raiseRecoverable(s,"Redefinition of __proto__ property")}};yn.checkYieldAwaitInDefaultParams=function(){if(this.yieldPos&&(!this.awaitPos||this.yieldPos<this.awaitPos)){this.raise(this.yieldPos,"Yield expression cannot be a default value")}if(this.awaitPos){this.raise(this.awaitPos,"Await expression cannot be a default value")}};yn.isSimpleAssignTarget=function(e){if(e.type==="ParenthesizedExpression"){return this.isSimpleAssignTarget(e.expression)}return e.type==="Identifier"||e.type==="MemberExpression"};var vn=mn.prototype;vn.parseTopLevel=function(e){var t=Object.create(null);if(!e.body){e.body=[]}while(this.type!==Ls.eof){var i=this.parseStatement(null,true,t);e.body.push(i)}if(this.inModule){for(var s=0,n=Object.keys(this.undefinedExports);s<n.length;s+=1){var r=n[s];this.raiseRecoverable(this.undefinedExports[r].start,"Export '"+r+"' is not defined")}}this.adaptDirectivePrologue(e.body);this.next();e.sourceType=this.options.sourceType;return this.finishNode(e,"Program")};var bn={kind:"loop"},Sn={kind:"switch"};vn.isLet=function(e){if(this.options.ecmaVersion<6||!this.isContextual("let")){return false}zs.lastIndex=this.pos;var t=zs.exec(this.input);var i=this.pos+t[0].length,s=this.input.charCodeAt(i);if(s===91||s===92||s>55295&&s<56320){return true}if(e){return false}if(s===123){return true}if(isIdentifierStart(s,true)){var n=i+1;while(isIdentifierChar(s=this.input.charCodeAt(n),true)){++n}if(s===92||s>55295&&s<56320){return true}var r=this.input.slice(i,n);if(!Ns.test(r)){return true}}return false};vn.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async")){return false}zs.lastIndex=this.pos;var e=zs.exec(this.input);var t=this.pos+e[0].length,i;return!Fs.test(this.input.slice(this.pos,t))&&this.input.slice(t,t+8)==="function"&&(t+8===this.input.length||!(isIdentifierChar(i=this.input.charCodeAt(t+8))||i>55295&&i<56320))};vn.parseStatement=function(e,t,i){var s=this.type,n=this.startNode(),r;if(this.isLet(e)){s=Ls._var;r="let"}switch(s){case Ls._break:case Ls._continue:return this.parseBreakContinueStatement(n,s.keyword);case Ls._debugger:return this.parseDebuggerStatement(n);case Ls._do:return this.parseDoStatement(n);case Ls._for:return this.parseForStatement(n);case Ls._function:if(e&&(this.strict||e!=="if"&&e!=="label")&&this.options.ecmaVersion>=6){this.unexpected()}return this.parseFunctionStatement(n,false,!e);case Ls._class:if(e){this.unexpected()}return this.parseClass(n,true);case Ls._if:return this.parseIfStatement(n);case Ls._return:return this.parseReturnStatement(n);case Ls._switch:return this.parseSwitchStatement(n);case Ls._throw:return this.parseThrowStatement(n);case Ls._try:return this.parseTryStatement(n);case Ls._const:case Ls._var:r=r||this.value;if(e&&r!=="var"){this.unexpected()}return this.parseVarStatement(n,r);case Ls._while:return this.parseWhileStatement(n);case Ls._with:return this.parseWithStatement(n);case Ls.braceL:return this.parseBlock(true,n);case Ls.semi:return this.parseEmptyStatement(n);case Ls._export:case Ls._import:if(this.options.ecmaVersion>10&&s===Ls._import){zs.lastIndex=this.pos;var o=zs.exec(this.input);var l=this.pos+o[0].length,c=this.input.charCodeAt(l);if(c===40||c===46){return this.parseExpressionStatement(n,this.parseExpression())}}if(!this.options.allowImportExportEverywhere){if(!t){this.raise(this.start,"'import' and 'export' may only appear at the top level")}if(!this.inModule){this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")}}return s===Ls._import?this.parseImport(n):this.parseExport(n,i);default:if(this.isAsyncFunction()){if(e){this.unexpected()}this.next();return this.parseFunctionStatement(n,true,!e)}var u=this.value,h=this.parseExpression();if(s===Ls.name&&h.type==="Identifier"&&this.eat(Ls.colon)){return this.parseLabeledStatement(n,u,h,e)}else{return this.parseExpressionStatement(n,h)}}};vn.parseBreakContinueStatement=function(e,t){var i=t==="break";this.next();if(this.eat(Ls.semi)||this.insertSemicolon()){e.label=null}else if(this.type!==Ls.name){this.unexpected()}else{e.label=this.parseIdent();this.semicolon()}var s=0;for(;s<this.labels.length;++s){var n=this.labels[s];if(e.label==null||n.name===e.label.name){if(n.kind!=null&&(i||n.kind==="loop")){break}if(e.label&&i){break}}}if(s===this.labels.length){this.raise(e.start,"Unsyntactic "+t)}return this.finishNode(e,i?"BreakStatement":"ContinueStatement")};vn.parseDebuggerStatement=function(e){this.next();this.semicolon();return this.finishNode(e,"DebuggerStatement")};vn.parseDoStatement=function(e){this.next();this.labels.push(bn);e.body=this.parseStatement("do");this.labels.pop();this.expect(Ls._while);e.test=this.parseParenExpression();if(this.options.ecmaVersion>=6){this.eat(Ls.semi)}else{this.semicolon()}return this.finishNode(e,"DoWhileStatement")};vn.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;this.labels.push(bn);this.enterScope(0);this.expect(Ls.parenL);if(this.type===Ls.semi){if(t>-1){this.unexpected(t)}return this.parseFor(e,null)}var i=this.isLet();if(this.type===Ls._var||this.type===Ls._const||i){var s=this.startNode(),n=i?"let":this.value;this.next();this.parseVar(s,true,n);this.finishNode(s,"VariableDeclaration");if((this.type===Ls._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&s.declarations.length===1){if(this.options.ecmaVersion>=9){if(this.type===Ls._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}return this.parseForIn(e,s)}if(t>-1){this.unexpected(t)}return this.parseFor(e,s)}var r=this.isContextual("let"),o=false;var l=new xn;var c=this.parseExpression(t>-1?"await":true,l);if(this.type===Ls._in||(o=this.options.ecmaVersion>=6&&this.isContextual("of"))){if(this.options.ecmaVersion>=9){if(this.type===Ls._in){if(t>-1){this.unexpected(t)}}else{e.await=t>-1}}if(r&&o){this.raise(c.start,"The left-hand side of a for-of loop may not start with 'let'.")}this.toAssignable(c,false,l);this.checkLValPattern(c);return this.parseForIn(e,c)}else{this.checkExpressionErrors(l,true)}if(t>-1){this.unexpected(t)}return this.parseFor(e,c)};vn.parseFunctionStatement=function(e,t,i){this.next();return this.parseFunction(e,wn|(i?0:In),false,t)};vn.parseIfStatement=function(e){this.next();e.test=this.parseParenExpression();e.consequent=this.parseStatement("if");e.alternate=this.eat(Ls._else)?this.parseStatement("if"):null;return this.finishNode(e,"IfStatement")};vn.parseReturnStatement=function(e){if(!this.inFunction&&!this.options.allowReturnOutsideFunction){this.raise(this.start,"'return' outside of function")}this.next();if(this.eat(Ls.semi)||this.insertSemicolon()){e.argument=null}else{e.argument=this.parseExpression();this.semicolon()}return this.finishNode(e,"ReturnStatement")};vn.parseSwitchStatement=function(e){this.next();e.discriminant=this.parseParenExpression();e.cases=[];this.expect(Ls.braceL);this.labels.push(Sn);this.enterScope(0);var t;for(var i=false;this.type!==Ls.braceR;){if(this.type===Ls._case||this.type===Ls._default){var s=this.type===Ls._case;if(t){this.finishNode(t,"SwitchCase")}e.cases.push(t=this.startNode());t.consequent=[];this.next();if(s){t.test=this.parseExpression()}else{if(i){this.raiseRecoverable(this.lastTokStart,"Multiple default clauses")}i=true;t.test=null}this.expect(Ls.colon)}else{if(!t){this.unexpected()}t.consequent.push(this.parseStatement(null))}}this.exitScope();if(t){this.finishNode(t,"SwitchCase")}this.next();this.labels.pop();return this.finishNode(e,"SwitchStatement")};vn.parseThrowStatement=function(e){this.next();if(Fs.test(this.input.slice(this.lastTokEnd,this.start))){this.raise(this.lastTokEnd,"Illegal newline after throw")}e.argument=this.parseExpression();this.semicolon();return this.finishNode(e,"ThrowStatement")};var An=[];vn.parseTryStatement=function(e){this.next();e.block=this.parseBlock();e.handler=null;if(this.type===Ls._catch){var t=this.startNode();this.next();if(this.eat(Ls.parenL)){t.param=this.parseBindingAtom();var i=t.param.type==="Identifier";this.enterScope(i?nn:0);this.checkLValPattern(t.param,i?pn:hn);this.expect(Ls.parenR)}else{if(this.options.ecmaVersion<10){this.unexpected()}t.param=null;this.enterScope(0)}t.body=this.parseBlock(false);this.exitScope();e.handler=this.finishNode(t,"CatchClause")}e.finalizer=this.eat(Ls._finally)?this.parseBlock():null;if(!e.handler&&!e.finalizer){this.raise(e.start,"Missing catch or finally clause")}return this.finishNode(e,"TryStatement")};vn.parseVarStatement=function(e,t){this.next();this.parseVar(e,false,t);this.semicolon();return this.finishNode(e,"VariableDeclaration")};vn.parseWhileStatement=function(e){this.next();e.test=this.parseParenExpression();this.labels.push(bn);e.body=this.parseStatement("while");this.labels.pop();return this.finishNode(e,"WhileStatement")};vn.parseWithStatement=function(e){if(this.strict){this.raise(this.start,"'with' in strict mode")}this.next();e.object=this.parseParenExpression();e.body=this.parseStatement("with");return this.finishNode(e,"WithStatement")};vn.parseEmptyStatement=function(e){this.next();return this.finishNode(e,"EmptyStatement")};vn.parseLabeledStatement=function(e,t,i,s){for(var n=0,r=this.labels;n<r.length;n+=1){var o=r[n];if(o.name===t){this.raise(i.start,"Label '"+t+"' is already declared")}}var l=this.type.isLoop?"loop":this.type===Ls._switch?"switch":null;for(var c=this.labels.length-1;c>=0;c--){var u=this.labels[c];if(u.statementStart===e.start){u.statementStart=this.start;u.kind=l}else{break}}this.labels.push({name:t,kind:l,statementStart:this.start});e.body=this.parseStatement(s?s.indexOf("label")===-1?s+"label":s:"label");this.labels.pop();e.label=i;return this.finishNode(e,"LabeledStatement")};vn.parseExpressionStatement=function(e,t){e.expression=t;this.semicolon();return this.finishNode(e,"ExpressionStatement")};vn.parseBlock=function(e,t,i){if(e===void 0)e=true;if(t===void 0)t=this.startNode();t.body=[];this.expect(Ls.braceL);if(e){this.enterScope(0)}while(this.type!==Ls.braceR){var s=this.parseStatement(null);t.body.push(s)}if(i){this.strict=false}this.next();if(e){this.exitScope()}return this.finishNode(t,"BlockStatement")};vn.parseFor=function(e,t){e.init=t;this.expect(Ls.semi);e.test=this.type===Ls.semi?null:this.parseExpression();this.expect(Ls.semi);e.update=this.type===Ls.parenR?null:this.parseExpression();this.expect(Ls.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,"ForStatement")};vn.parseForIn=function(e,t){var i=this.type===Ls._in;this.next();if(t.type==="VariableDeclaration"&&t.declarations[0].init!=null&&(!i||this.options.ecmaVersion<8||this.strict||t.kind!=="var"||t.declarations[0].id.type!=="Identifier")){this.raise(t.start,(i?"for-in":"for-of")+" loop variable declaration may not have an initializer")}e.left=t;e.right=i?this.parseExpression():this.parseMaybeAssign();this.expect(Ls.parenR);e.body=this.parseStatement("for");this.exitScope();this.labels.pop();return this.finishNode(e,i?"ForInStatement":"ForOfStatement")};vn.parseVar=function(e,t,i){e.declarations=[];e.kind=i;for(;;){var s=this.startNode();this.parseVarId(s,i);if(this.eat(Ls.eq)){s.init=this.parseMaybeAssign(t)}else if(i==="const"&&!(this.type===Ls._in||this.options.ecmaVersion>=6&&this.isContextual("of"))){this.unexpected()}else if(s.id.type!=="Identifier"&&!(t&&(this.type===Ls._in||this.isContextual("of")))){this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value")}else{s.init=null}e.declarations.push(this.finishNode(s,"VariableDeclarator"));if(!this.eat(Ls.comma)){break}}return e};vn.parseVarId=function(e,t){e.id=this.parseBindingAtom();this.checkLValPattern(e.id,t==="var"?un:hn,false)};var wn=1,In=2,Cn=4;vn.parseFunction=function(e,t,i,s,n){this.initFunction(e);if(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!s){if(this.type===Ls.star&&t&In){this.unexpected()}e.generator=this.eat(Ls.star)}if(this.options.ecmaVersion>=8){e.async=!!s}if(t&wn){e.id=t&Cn&&this.type!==Ls.name?null:this.parseIdent();if(e.id&&!(t&In)){this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?un:hn:dn)}}var r=this.yieldPos,o=this.awaitPos,l=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(e.async,e.generator));if(!(t&wn)){e.id=this.type===Ls.name?this.parseIdent():null}this.parseFunctionParams(e);this.parseFunctionBody(e,i,false,n);this.yieldPos=r;this.awaitPos=o;this.awaitIdentPos=l;return this.finishNode(e,t&wn?"FunctionDeclaration":"FunctionExpression")};vn.parseFunctionParams=function(e){this.expect(Ls.parenL);e.params=this.parseBindingList(Ls.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams()};vn.parseClass=function(e,t){this.next();var i=this.strict;this.strict=true;this.parseClassId(e,t);this.parseClassSuper(e);var s=this.enterClassBody();var n=this.startNode();var r=false;n.body=[];this.expect(Ls.braceL);while(this.type!==Ls.braceR){var o=this.parseClassElement(e.superClass!==null);if(o){n.body.push(o);if(o.type==="MethodDefinition"&&o.kind==="constructor"){if(r){this.raise(o.start,"Duplicate constructor in the same class")}r=true}else if(o.key&&o.key.type==="PrivateIdentifier"&&isPrivateNameConflicted(s,o)){this.raiseRecoverable(o.key.start,"Identifier '#"+o.key.name+"' has already been declared")}}}this.strict=i;this.next();e.body=this.finishNode(n,"ClassBody");this.exitClassBody();return this.finishNode(e,t?"ClassDeclaration":"ClassExpression")};vn.parseClassElement=function(e){if(this.eat(Ls.semi)){return null}var t=this.options.ecmaVersion;var i=this.startNode();var s="";var n=false;var r=false;var o="method";var l=false;if(this.eatContextual("static")){if(t>=13&&this.eat(Ls.braceL)){this.parseClassStaticBlock(i);return i}if(this.isClassElementNameStart()||this.type===Ls.star){l=true}else{s="static"}}i.static=l;if(!s&&t>=8&&this.eatContextual("async")){if((this.isClassElementNameStart()||this.type===Ls.star)&&!this.canInsertSemicolon()){r=true}else{s="async"}}if(!s&&(t>=9||!r)&&this.eat(Ls.star)){n=true}if(!s&&!r&&!n){var c=this.value;if(this.eatContextual("get")||this.eatContextual("set")){if(this.isClassElementNameStart()){o=c}else{s=c}}}if(s){i.computed=false;i.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc);i.key.name=s;this.finishNode(i.key,"Identifier")}else{this.parseClassElementName(i)}if(t<13||this.type===Ls.parenL||o!=="method"||n||r){var u=!i.static&&checkKeyName(i,"constructor");var h=u&&e;if(u&&o!=="method"){this.raise(i.key.start,"Constructor can't have get/set modifier")}i.kind=u?"constructor":o;this.parseClassMethod(i,n,r,h)}else{this.parseClassField(i)}return i};vn.isClassElementNameStart=function(){return this.type===Ls.name||this.type===Ls.privateId||this.type===Ls.num||this.type===Ls.string||this.type===Ls.bracketL||this.type.keyword};vn.parseClassElementName=function(e){if(this.type===Ls.privateId){if(this.value==="constructor"){this.raise(this.start,"Classes can't have an element named '#constructor'")}e.computed=false;e.key=this.parsePrivateIdent()}else{this.parsePropertyName(e)}};vn.parseClassMethod=function(e,t,i,s){var n=e.key;if(e.kind==="constructor"){if(t){this.raise(n.start,"Constructor can't be a generator")}if(i){this.raise(n.start,"Constructor can't be an async method")}}else if(e.static&&checkKeyName(e,"prototype")){this.raise(n.start,"Classes may not have a static property named prototype")}var r=e.value=this.parseMethod(t,i,s);if(e.kind==="get"&&r.params.length!==0){this.raiseRecoverable(r.start,"getter should have no params")}if(e.kind==="set"&&r.params.length!==1){this.raiseRecoverable(r.start,"setter should have exactly one param")}if(e.kind==="set"&&r.params[0].type==="RestElement"){this.raiseRecoverable(r.params[0].start,"Setter cannot use rest params")}return this.finishNode(e,"MethodDefinition")};vn.parseClassField=function(e){if(checkKeyName(e,"constructor")){this.raise(e.key.start,"Classes can't have a field named 'constructor'")}else if(e.static&&checkKeyName(e,"prototype")){this.raise(e.key.start,"Classes can't have a static field named 'prototype'")}if(this.eat(Ls.eq)){var t=this.currentThisScope();var i=t.inClassFieldInit;t.inClassFieldInit=true;e.value=this.parseMaybeAssign();t.inClassFieldInit=i}else{e.value=null}this.semicolon();return this.finishNode(e,"PropertyDefinition")};vn.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;this.labels=[];this.enterScope(on|rn);while(this.type!==Ls.braceR){var i=this.parseStatement(null);e.body.push(i)}this.next();this.exitScope();this.labels=t;return this.finishNode(e,"StaticBlock")};vn.parseClassId=function(e,t){if(this.type===Ls.name){e.id=this.parseIdent();if(t){this.checkLValSimple(e.id,hn,false)}}else{if(t===true){this.unexpected()}e.id=null}};vn.parseClassSuper=function(e){e.superClass=this.eat(Ls._extends)?this.parseExprSubscripts(false):null};vn.enterClassBody=function(){var e={declared:Object.create(null),used:[]};this.privateNameStack.push(e);return e.declared};vn.exitClassBody=function(){var e=this.privateNameStack.pop();var t=e.declared;var i=e.used;var s=this.privateNameStack.length;var n=s===0?null:this.privateNameStack[s-1];for(var r=0;r<i.length;++r){var o=i[r];if(!Gs(t,o.name)){if(n){n.used.push(o)}else{this.raiseRecoverable(o.start,"Private field '#"+o.name+"' must be declared in an enclosing class")}}}};function isPrivateNameConflicted(e,t){var i=t.key.name;var s=e[i];var n="true";if(t.type==="MethodDefinition"&&(t.kind==="get"||t.kind==="set")){n=(t.static?"s":"i")+t.kind}if(s==="iget"&&n==="iset"||s==="iset"&&n==="iget"||s==="sget"&&n==="sset"||s==="sset"&&n==="sget"){e[i]="true";return false}else if(!s){e[i]=n;return false}else{return true}}function checkKeyName(e,t){var i=e.computed;var s=e.key;return!i&&(s.type==="Identifier"&&s.name===t||s.type==="Literal"&&s.value===t)}vn.parseExport=function(e,t){this.next();if(this.eat(Ls.star)){if(this.options.ecmaVersion>=11){if(this.eatContextual("as")){e.exported=this.parseModuleExportName();this.checkExport(t,e.exported,this.lastTokStart)}else{e.exported=null}}this.expectContextual("from");if(this.type!==Ls.string){this.unexpected()}e.source=this.parseExprAtom();this.semicolon();return this.finishNode(e,"ExportAllDeclaration")}if(this.eat(Ls._default)){this.checkExport(t,"default",this.lastTokStart);var i;if(this.type===Ls._function||(i=this.isAsyncFunction())){var s=this.startNode();this.next();if(i){this.next()}e.declaration=this.parseFunction(s,wn|Cn,false,i)}else if(this.type===Ls._class){var n=this.startNode();e.declaration=this.parseClass(n,"nullableID")}else{e.declaration=this.parseMaybeAssign();this.semicolon()}return this.finishNode(e,"ExportDefaultDeclaration")}if(this.shouldParseExportStatement()){e.declaration=this.parseStatement(null);if(e.declaration.type==="VariableDeclaration"){this.checkVariableExport(t,e.declaration.declarations)}else{this.checkExport(t,e.declaration.id,e.declaration.id.start)}e.specifiers=[];e.source=null}else{e.declaration=null;e.specifiers=this.parseExportSpecifiers(t);if(this.eatContextual("from")){if(this.type!==Ls.string){this.unexpected()}e.source=this.parseExprAtom()}else{for(var r=0,o=e.specifiers;r<o.length;r+=1){var l=o[r];this.checkUnreserved(l.local);this.checkLocalExport(l.local);if(l.local.type==="Literal"){this.raise(l.local.start,"A string literal cannot be used as an exported binding without `from`.")}}e.source=null}this.semicolon()}return this.finishNode(e,"ExportNamedDeclaration")};vn.checkExport=function(e,t,i){if(!e){return}if(typeof t!=="string"){t=t.type==="Identifier"?t.name:t.value}if(Gs(e,t)){this.raiseRecoverable(i,"Duplicate export '"+t+"'")}e[t]=true};vn.checkPatternExport=function(e,t){var i=t.type;if(i==="Identifier"){this.checkExport(e,t,t.start)}else if(i==="ObjectPattern"){for(var s=0,n=t.properties;s<n.length;s+=1){var r=n[s];this.checkPatternExport(e,r)}}else if(i==="ArrayPattern"){for(var o=0,l=t.elements;o<l.length;o+=1){var c=l[o];if(c){this.checkPatternExport(e,c)}}}else if(i==="Property"){this.checkPatternExport(e,t.value)}else if(i==="AssignmentPattern"){this.checkPatternExport(e,t.left)}else if(i==="RestElement"){this.checkPatternExport(e,t.argument)}else if(i==="ParenthesizedExpression"){this.checkPatternExport(e,t.expression)}};vn.checkVariableExport=function(e,t){if(!e){return}for(var i=0,s=t;i<s.length;i+=1){var n=s[i];this.checkPatternExport(e,n.id)}};vn.shouldParseExportStatement=function(){return this.type.keyword==="var"||this.type.keyword==="const"||this.type.keyword==="class"||this.type.keyword==="function"||this.isLet()||this.isAsyncFunction()};vn.parseExportSpecifiers=function(e){var t=[],i=true;this.expect(Ls.braceL);while(!this.eat(Ls.braceR)){if(!i){this.expect(Ls.comma);if(this.afterTrailingComma(Ls.braceR)){break}}else{i=false}var s=this.startNode();s.local=this.parseModuleExportName();s.exported=this.eatContextual("as")?this.parseModuleExportName():s.local;this.checkExport(e,s.exported,s.exported.start);t.push(this.finishNode(s,"ExportSpecifier"))}return t};vn.parseImport=function(e){this.next();if(this.type===Ls.string){e.specifiers=An;e.source=this.parseExprAtom()}else{e.specifiers=this.parseImportSpecifiers();this.expectContextual("from");e.source=this.type===Ls.string?this.parseExprAtom():this.unexpected()}this.semicolon();return this.finishNode(e,"ImportDeclaration")};vn.parseImportSpecifiers=function(){var e=[],t=true;if(this.type===Ls.name){var i=this.startNode();i.local=this.parseIdent();this.checkLValSimple(i.local,hn);e.push(this.finishNode(i,"ImportDefaultSpecifier"));if(!this.eat(Ls.comma)){return e}}if(this.type===Ls.star){var s=this.startNode();this.next();this.expectContextual("as");s.local=this.parseIdent();this.checkLValSimple(s.local,hn);e.push(this.finishNode(s,"ImportNamespaceSpecifier"));return e}this.expect(Ls.braceL);while(!this.eat(Ls.braceR)){if(!t){this.expect(Ls.comma);if(this.afterTrailingComma(Ls.braceR)){break}}else{t=false}var n=this.startNode();n.imported=this.parseModuleExportName();if(this.eatContextual("as")){n.local=this.parseIdent()}else{this.checkUnreserved(n.imported);n.local=n.imported}this.checkLValSimple(n.local,hn);e.push(this.finishNode(n,"ImportSpecifier"))}return e};vn.parseModuleExportName=function(){if(this.options.ecmaVersion>=13&&this.type===Ls.string){var e=this.parseLiteral(this.value);if(qs.test(e.value)){this.raise(e.start,"An export name cannot include a lone surrogate.")}return e}return this.parseIdent(true)};vn.adaptDirectivePrologue=function(e){for(var t=0;t<e.length&&this.isDirectiveCandidate(e[t]);++t){e[t].directive=e[t].expression.raw.slice(1,-1)}};vn.isDirectiveCandidate=function(e){return e.type==="ExpressionStatement"&&e.expression.type==="Literal"&&typeof e.expression.value==="string"&&(this.input[e.start]==='"'||this.input[e.start]==="'")};var kn=mn.prototype;kn.toAssignable=function(e,t,i){if(this.options.ecmaVersion>=6&&e){switch(e.type){case"Identifier":if(this.inAsync&&e.name==="await"){this.raise(e.start,"Cannot use 'await' as identifier inside an async function")}break;case"ObjectPattern":case"ArrayPattern":case"AssignmentPattern":case"RestElement":break;case"ObjectExpression":e.type="ObjectPattern";if(i){this.checkPatternErrors(i,true)}for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];this.toAssignable(r,t);if(r.type==="RestElement"&&(r.argument.type==="ArrayPattern"||r.argument.type==="ObjectPattern")){this.raise(r.argument.start,"Unexpected token")}}break;case"Property":if(e.kind!=="init"){this.raise(e.key.start,"Object pattern can't contain getter or setter")}this.toAssignable(e.value,t);break;case"ArrayExpression":e.type="ArrayPattern";if(i){this.checkPatternErrors(i,true)}this.toAssignableList(e.elements,t);break;case"SpreadElement":e.type="RestElement";this.toAssignable(e.argument,t);if(e.argument.type==="AssignmentPattern"){this.raise(e.argument.start,"Rest elements cannot have a default value")}break;case"AssignmentExpression":if(e.operator!=="="){this.raise(e.left.end,"Only '=' operator can be used for specifying default value.")}e.type="AssignmentPattern";delete e.operator;this.toAssignable(e.left,t);break;case"ParenthesizedExpression":this.toAssignable(e.expression,t,i);break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(!t){break}default:this.raise(e.start,"Assigning to rvalue")}}else if(i){this.checkPatternErrors(i,true)}return e};kn.toAssignableList=function(e,t){var i=e.length;for(var s=0;s<i;s++){var n=e[s];if(n){this.toAssignable(n,t)}}if(i){var r=e[i-1];if(this.options.ecmaVersion===6&&t&&r&&r.type==="RestElement"&&r.argument.type!=="Identifier"){this.unexpected(r.argument.start)}}return e};kn.parseSpread=function(e){var t=this.startNode();this.next();t.argument=this.parseMaybeAssign(false,e);return this.finishNode(t,"SpreadElement")};kn.parseRestBinding=function(){var e=this.startNode();this.next();if(this.options.ecmaVersion===6&&this.type!==Ls.name){this.unexpected()}e.argument=this.parseBindingAtom();return this.finishNode(e,"RestElement")};kn.parseBindingAtom=function(){if(this.options.ecmaVersion>=6){switch(this.type){case Ls.bracketL:var e=this.startNode();this.next();e.elements=this.parseBindingList(Ls.bracketR,true,true);return this.finishNode(e,"ArrayPattern");case Ls.braceL:return this.parseObj(true)}}return this.parseIdent()};kn.parseBindingList=function(e,t,i){var s=[],n=true;while(!this.eat(e)){if(n){n=false}else{this.expect(Ls.comma)}if(t&&this.type===Ls.comma){s.push(null)}else if(i&&this.afterTrailingComma(e)){break}else if(this.type===Ls.ellipsis){var r=this.parseRestBinding();this.parseBindingListItem(r);s.push(r);if(this.type===Ls.comma){this.raise(this.start,"Comma is not permitted after the rest element")}this.expect(e);break}else{var o=this.parseMaybeDefault(this.start,this.startLoc);this.parseBindingListItem(o);s.push(o)}}return s};kn.parseBindingListItem=function(e){return e};kn.parseMaybeDefault=function(e,t,i){i=i||this.parseBindingAtom();if(this.options.ecmaVersion<6||!this.eat(Ls.eq)){return i}var s=this.startNodeAt(e,t);s.left=i;s.right=this.parseMaybeAssign();return this.finishNode(s,"AssignmentPattern")};kn.checkLValSimple=function(e,t,i){if(t===void 0)t=cn;var s=t!==cn;switch(e.type){case"Identifier":if(this.strict&&this.reservedWordsStrictBind.test(e.name)){this.raiseRecoverable(e.start,(s?"Binding ":"Assigning to ")+e.name+" in strict mode")}if(s){if(t===hn&&e.name==="let"){this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name")}if(i){if(Gs(i,e.name)){this.raiseRecoverable(e.start,"Argument name clash")}i[e.name]=true}if(t!==fn){this.declareName(e.name,t,e.start)}}break;case"ChainExpression":this.raiseRecoverable(e.start,"Optional chaining cannot appear in left-hand side");break;case"MemberExpression":if(s){this.raiseRecoverable(e.start,"Binding member expression")}break;case"ParenthesizedExpression":if(s){this.raiseRecoverable(e.start,"Binding parenthesized expression")}return this.checkLValSimple(e.expression,t,i);default:this.raise(e.start,(s?"Binding":"Assigning to")+" rvalue")}};kn.checkLValPattern=function(e,t,i){if(t===void 0)t=cn;switch(e.type){case"ObjectPattern":for(var s=0,n=e.properties;s<n.length;s+=1){var r=n[s];this.checkLValInnerPattern(r,t,i)}break;case"ArrayPattern":for(var o=0,l=e.elements;o<l.length;o+=1){var c=l[o];if(c){this.checkLValInnerPattern(c,t,i)}}break;default:this.checkLValSimple(e,t,i)}};kn.checkLValInnerPattern=function(e,t,i){if(t===void 0)t=cn;switch(e.type){case"Property":this.checkLValInnerPattern(e.value,t,i);break;case"AssignmentPattern":this.checkLValPattern(e.left,t,i);break;case"RestElement":this.checkLValPattern(e.argument,t,i);break;default:this.checkLValPattern(e,t,i)}};var _n=function TokContext(e,t,i,s,n){this.token=e;this.isExpr=!!t;this.preserveSpace=!!i;this.override=s;this.generator=!!n};var Pn={b_stat:new _n("{",false),b_expr:new _n("{",true),b_tmpl:new _n("${",false),p_stat:new _n("(",false),p_expr:new _n("(",true),q_tmpl:new _n("`",true,true,(function(e){return e.tryReadTemplateToken()})),f_stat:new _n("function",false),f_expr:new _n("function",true),f_expr_gen:new _n("function",true,false,null,true),f_gen:new _n("function",false,false,null,true)};var Nn=mn.prototype;Nn.initialContext=function(){return[Pn.b_stat]};Nn.curContext=function(){return this.context[this.context.length-1]};Nn.braceIsBlock=function(e){var t=this.curContext();if(t===Pn.f_expr||t===Pn.f_stat){return true}if(e===Ls.colon&&(t===Pn.b_stat||t===Pn.b_expr)){return!t.isExpr}if(e===Ls._return||e===Ls.name&&this.exprAllowed){return Fs.test(this.input.slice(this.lastTokEnd,this.start))}if(e===Ls._else||e===Ls.semi||e===Ls.eof||e===Ls.parenR||e===Ls.arrow){return true}if(e===Ls.braceL){return t===Pn.b_stat}if(e===Ls._var||e===Ls._const||e===Ls.name){return false}return!this.exprAllowed};Nn.inGeneratorContext=function(){for(var e=this.context.length-1;e>=1;e--){var t=this.context[e];if(t.token==="function"){return t.generator}}return false};Nn.updateContext=function(e){var t,i=this.type;if(i.keyword&&e===Ls.dot){this.exprAllowed=false}else if(t=i.updateContext){t.call(this,e)}else{this.exprAllowed=i.beforeExpr}};Nn.overrideContext=function(e){if(this.curContext()!==e){this.context[this.context.length-1]=e}};Ls.parenR.updateContext=Ls.braceR.updateContext=function(){if(this.context.length===1){this.exprAllowed=true;return}var e=this.context.pop();if(e===Pn.b_stat&&this.curContext().token==="function"){e=this.context.pop()}this.exprAllowed=!e.isExpr};Ls.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?Pn.b_stat:Pn.b_expr);this.exprAllowed=true};Ls.dollarBraceL.updateContext=function(){this.context.push(Pn.b_tmpl);this.exprAllowed=true};Ls.parenL.updateContext=function(e){var t=e===Ls._if||e===Ls._for||e===Ls._with||e===Ls._while;this.context.push(t?Pn.p_stat:Pn.p_expr);this.exprAllowed=true};Ls.incDec.updateContext=function(){};Ls._function.updateContext=Ls._class.updateContext=function(e){if(e.beforeExpr&&e!==Ls._else&&!(e===Ls.semi&&this.curContext()!==Pn.p_stat)&&!(e===Ls._return&&Fs.test(this.input.slice(this.lastTokEnd,this.start)))&&!((e===Ls.colon||e===Ls.braceL)&&this.curContext()===Pn.b_stat)){this.context.push(Pn.f_expr)}else{this.context.push(Pn.f_stat)}this.exprAllowed=false};Ls.backQuote.updateContext=function(){if(this.curContext()===Pn.q_tmpl){this.context.pop()}else{this.context.push(Pn.q_tmpl)}this.exprAllowed=false};Ls.star.updateContext=function(e){if(e===Ls._function){var t=this.context.length-1;if(this.context[t]===Pn.f_expr){this.context[t]=Pn.f_expr_gen}else{this.context[t]=Pn.f_gen}}this.exprAllowed=true};Ls.name.updateContext=function(e){var t=false;if(this.options.ecmaVersion>=6&&e!==Ls.dot){if(this.value==="of"&&!this.exprAllowed||this.value==="yield"&&this.inGeneratorContext()){t=true}}this.exprAllowed=t};var Rn=mn.prototype;Rn.checkPropClash=function(e,t,i){if(this.options.ecmaVersion>=9&&e.type==="SpreadElement"){return}if(this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand)){return}var s=e.key;var n;switch(s.type){case"Identifier":n=s.name;break;case"Literal":n=String(s.value);break;default:return}var r=e.kind;if(this.options.ecmaVersion>=6){if(n==="__proto__"&&r==="init"){if(t.proto){if(i){if(i.doubleProto<0){i.doubleProto=s.start}}else{this.raiseRecoverable(s.start,"Redefinition of __proto__ property")}}t.proto=true}return}n="$"+n;var o=t[n];if(o){var l;if(r==="init"){l=this.strict&&o.init||o.get||o.set}else{l=o.init||o[r]}if(l){this.raiseRecoverable(s.start,"Redefinition of property")}}else{o=t[n]={init:false,get:false,set:false}}o[r]=true};Rn.parseExpression=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseMaybeAssign(e,t);if(this.type===Ls.comma){var r=this.startNodeAt(i,s);r.expressions=[n];while(this.eat(Ls.comma)){r.expressions.push(this.parseMaybeAssign(e,t))}return this.finishNode(r,"SequenceExpression")}return n};Rn.parseMaybeAssign=function(e,t,i){if(this.isContextual("yield")){if(this.inGenerator){return this.parseYield(e)}else{this.exprAllowed=false}}var s=false,n=-1,r=-1,o=-1;if(t){n=t.parenthesizedAssign;r=t.trailingComma;o=t.doubleProto;t.parenthesizedAssign=t.trailingComma=-1}else{t=new xn;s=true}var l=this.start,c=this.startLoc;if(this.type===Ls.parenL||this.type===Ls.name){this.potentialArrowAt=this.start;this.potentialArrowInForAwait=e==="await"}var u=this.parseMaybeConditional(e,t);if(i){u=i.call(this,u,l,c)}if(this.type.isAssign){var h=this.startNodeAt(l,c);h.operator=this.value;if(this.type===Ls.eq){u=this.toAssignable(u,false,t)}if(!s){t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1}if(t.shorthandAssign>=u.start){t.shorthandAssign=-1}if(this.type===Ls.eq){this.checkLValPattern(u)}else{this.checkLValSimple(u)}h.left=u;this.next();h.right=this.parseMaybeAssign(e);if(o>-1){t.doubleProto=o}return this.finishNode(h,"AssignmentExpression")}else{if(s){this.checkExpressionErrors(t,true)}}if(n>-1){t.parenthesizedAssign=n}if(r>-1){t.trailingComma=r}return u};Rn.parseMaybeConditional=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseExprOps(e,t);if(this.checkExpressionErrors(t)){return n}if(this.eat(Ls.question)){var r=this.startNodeAt(i,s);r.test=n;r.consequent=this.parseMaybeAssign();this.expect(Ls.colon);r.alternate=this.parseMaybeAssign(e);return this.finishNode(r,"ConditionalExpression")}return n};Rn.parseExprOps=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseMaybeUnary(t,false,false,e);if(this.checkExpressionErrors(t)){return n}return n.start===i&&n.type==="ArrowFunctionExpression"?n:this.parseExprOp(n,i,s,-1,e)};Rn.parseExprOp=function(e,t,i,s,n){var r=this.type.binop;if(r!=null&&(!n||this.type!==Ls._in)){if(r>s){var o=this.type===Ls.logicalOR||this.type===Ls.logicalAND;var l=this.type===Ls.coalesce;if(l){r=Ls.logicalAND.binop}var c=this.value;this.next();var u=this.start,h=this.startLoc;var d=this.parseExprOp(this.parseMaybeUnary(null,false,false,n),u,h,r,n);var p=this.buildBinary(t,i,e,d,c,o||l);if(o&&this.type===Ls.coalesce||l&&(this.type===Ls.logicalOR||this.type===Ls.logicalAND)){this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses")}return this.parseExprOp(p,t,i,s,n)}}return e};Rn.buildBinary=function(e,t,i,s,n,r){if(s.type==="PrivateIdentifier"){this.raise(s.start,"Private identifier can only be left side of binary expression")}var o=this.startNodeAt(e,t);o.left=i;o.operator=n;o.right=s;return this.finishNode(o,r?"LogicalExpression":"BinaryExpression")};Rn.parseMaybeUnary=function(e,t,i,s){var n=this.start,r=this.startLoc,o;if(this.isContextual("await")&&this.canAwait){o=this.parseAwait(s);t=true}else if(this.type.prefix){var l=this.startNode(),c=this.type===Ls.incDec;l.operator=this.value;l.prefix=true;this.next();l.argument=this.parseMaybeUnary(null,true,c,s);this.checkExpressionErrors(e,true);if(c){this.checkLValSimple(l.argument)}else if(this.strict&&l.operator==="delete"&&l.argument.type==="Identifier"){this.raiseRecoverable(l.start,"Deleting local variable in strict mode")}else if(l.operator==="delete"&&isPrivateFieldAccess(l.argument)){this.raiseRecoverable(l.start,"Private fields can not be deleted")}else{t=true}o=this.finishNode(l,c?"UpdateExpression":"UnaryExpression")}else if(!t&&this.type===Ls.privateId){if(s||this.privateNameStack.length===0){this.unexpected()}o=this.parsePrivateIdent();if(this.type!==Ls._in){this.unexpected()}}else{o=this.parseExprSubscripts(e,s);if(this.checkExpressionErrors(e)){return o}while(this.type.postfix&&!this.canInsertSemicolon()){var u=this.startNodeAt(n,r);u.operator=this.value;u.prefix=false;u.argument=o;this.checkLValSimple(o);this.next();o=this.finishNode(u,"UpdateExpression")}}if(!i&&this.eat(Ls.starstar)){if(t){this.unexpected(this.lastTokStart)}else{return this.buildBinary(n,r,o,this.parseMaybeUnary(null,false,false,s),"**",false)}}else{return o}};function isPrivateFieldAccess(e){return e.type==="MemberExpression"&&e.property.type==="PrivateIdentifier"||e.type==="ChainExpression"&&isPrivateFieldAccess(e.expression)}Rn.parseExprSubscripts=function(e,t){var i=this.start,s=this.startLoc;var n=this.parseExprAtom(e,t);if(n.type==="ArrowFunctionExpression"&&this.input.slice(this.lastTokStart,this.lastTokEnd)!==")"){return n}var r=this.parseSubscripts(n,i,s,false,t);if(e&&r.type==="MemberExpression"){if(e.parenthesizedAssign>=r.start){e.parenthesizedAssign=-1}if(e.parenthesizedBind>=r.start){e.parenthesizedBind=-1}if(e.trailingComma>=r.start){e.trailingComma=-1}}return r};Rn.parseSubscripts=function(e,t,i,s,n){var r=this.options.ecmaVersion>=8&&e.type==="Identifier"&&e.name==="async"&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start===5&&this.potentialArrowAt===e.start;var o=false;while(true){var l=this.parseSubscript(e,t,i,s,r,o,n);if(l.optional){o=true}if(l===e||l.type==="ArrowFunctionExpression"){if(o){var c=this.startNodeAt(t,i);c.expression=l;l=this.finishNode(c,"ChainExpression")}return l}e=l}};Rn.parseSubscript=function(e,t,i,s,n,r,o){var l=this.options.ecmaVersion>=11;var c=l&&this.eat(Ls.questionDot);if(s&&c){this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions")}var u=this.eat(Ls.bracketL);if(u||c&&this.type!==Ls.parenL&&this.type!==Ls.backQuote||this.eat(Ls.dot)){var h=this.startNodeAt(t,i);h.object=e;if(u){h.property=this.parseExpression();this.expect(Ls.bracketR)}else if(this.type===Ls.privateId&&e.type!=="Super"){h.property=this.parsePrivateIdent()}else{h.property=this.parseIdent(this.options.allowReserved!=="never")}h.computed=!!u;if(l){h.optional=c}e=this.finishNode(h,"MemberExpression")}else if(!s&&this.eat(Ls.parenL)){var d=new xn,p=this.yieldPos,f=this.awaitPos,m=this.awaitIdentPos;this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;var g=this.parseExprList(Ls.parenR,this.options.ecmaVersion>=8,false,d);if(n&&!c&&!this.canInsertSemicolon()&&this.eat(Ls.arrow)){this.checkPatternErrors(d,false);this.checkYieldAwaitInDefaultParams();if(this.awaitIdentPos>0){this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function")}this.yieldPos=p;this.awaitPos=f;this.awaitIdentPos=m;return this.parseArrowExpression(this.startNodeAt(t,i),g,true,o)}this.checkExpressionErrors(d,true);this.yieldPos=p||this.yieldPos;this.awaitPos=f||this.awaitPos;this.awaitIdentPos=m||this.awaitIdentPos;var y=this.startNodeAt(t,i);y.callee=e;y.arguments=g;if(l){y.optional=c}e=this.finishNode(y,"CallExpression")}else if(this.type===Ls.backQuote){if(c||r){this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions")}var E=this.startNodeAt(t,i);E.tag=e;E.quasi=this.parseTemplate({isTagged:true});e=this.finishNode(E,"TaggedTemplateExpression")}return e};Rn.parseExprAtom=function(e,t){if(this.type===Ls.slash){this.readRegexp()}var i,s=this.potentialArrowAt===this.start;switch(this.type){case Ls._super:if(!this.allowSuper){this.raise(this.start,"'super' keyword outside a method")}i=this.startNode();this.next();if(this.type===Ls.parenL&&!this.allowDirectSuper){this.raise(i.start,"super() call outside constructor of a subclass")}if(this.type!==Ls.dot&&this.type!==Ls.bracketL&&this.type!==Ls.parenL){this.unexpected()}return this.finishNode(i,"Super");case Ls._this:i=this.startNode();this.next();return this.finishNode(i,"ThisExpression");case Ls.name:var n=this.start,r=this.startLoc,o=this.containsEsc;var l=this.parseIdent(false);if(this.options.ecmaVersion>=8&&!o&&l.name==="async"&&!this.canInsertSemicolon()&&this.eat(Ls._function)){this.overrideContext(Pn.f_expr);return this.parseFunction(this.startNodeAt(n,r),0,false,true,t)}if(s&&!this.canInsertSemicolon()){if(this.eat(Ls.arrow)){return this.parseArrowExpression(this.startNodeAt(n,r),[l],false,t)}if(this.options.ecmaVersion>=8&&l.name==="async"&&this.type===Ls.name&&!o&&(!this.potentialArrowInForAwait||this.value!=="of"||this.containsEsc)){l=this.parseIdent(false);if(this.canInsertSemicolon()||!this.eat(Ls.arrow)){this.unexpected()}return this.parseArrowExpression(this.startNodeAt(n,r),[l],true,t)}}return l;case Ls.regexp:var c=this.value;i=this.parseLiteral(c.value);i.regex={pattern:c.pattern,flags:c.flags};return i;case Ls.num:case Ls.string:return this.parseLiteral(this.value);case Ls._null:case Ls._true:case Ls._false:i=this.startNode();i.value=this.type===Ls._null?null:this.type===Ls._true;i.raw=this.type.keyword;this.next();return this.finishNode(i,"Literal");case Ls.parenL:var u=this.start,h=this.parseParenAndDistinguishExpression(s,t);if(e){if(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(h)){e.parenthesizedAssign=u}if(e.parenthesizedBind<0){e.parenthesizedBind=u}}return h;case Ls.bracketL:i=this.startNode();this.next();i.elements=this.parseExprList(Ls.bracketR,true,true,e);return this.finishNode(i,"ArrayExpression");case Ls.braceL:this.overrideContext(Pn.b_expr);return this.parseObj(false,e);case Ls._function:i=this.startNode();this.next();return this.parseFunction(i,0);case Ls._class:return this.parseClass(this.startNode(),false);case Ls._new:return this.parseNew();case Ls.backQuote:return this.parseTemplate();case Ls._import:if(this.options.ecmaVersion>=11){return this.parseExprImport()}else{return this.unexpected()}default:this.unexpected()}};Rn.parseExprImport=function(){var e=this.startNode();if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword import")}var t=this.parseIdent(true);switch(this.type){case Ls.parenL:return this.parseDynamicImport(e);case Ls.dot:e.meta=t;return this.parseImportMeta(e);default:this.unexpected()}};Rn.parseDynamicImport=function(e){this.next();e.source=this.parseMaybeAssign();if(!this.eat(Ls.parenR)){var t=this.start;if(this.eat(Ls.comma)&&this.eat(Ls.parenR)){this.raiseRecoverable(t,"Trailing comma is not allowed in import()")}else{this.unexpected(t)}}return this.finishNode(e,"ImportExpression")};Rn.parseImportMeta=function(e){this.next();var t=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="meta"){this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'")}if(t){this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters")}if(this.options.sourceType!=="module"&&!this.options.allowImportExportEverywhere){this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module")}return this.finishNode(e,"MetaProperty")};Rn.parseLiteral=function(e){var t=this.startNode();t.value=e;t.raw=this.input.slice(this.start,this.end);if(t.raw.charCodeAt(t.raw.length-1)===110){t.bigint=t.raw.slice(0,-1).replace(/_/g,"")}this.next();return this.finishNode(t,"Literal")};Rn.parseParenExpression=function(){this.expect(Ls.parenL);var e=this.parseExpression();this.expect(Ls.parenR);return e};Rn.parseParenAndDistinguishExpression=function(e,t){var i=this.start,s=this.startLoc,n,r=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var o=this.start,l=this.startLoc;var c=[],u=true,h=false;var d=new xn,p=this.yieldPos,f=this.awaitPos,m;this.yieldPos=0;this.awaitPos=0;while(this.type!==Ls.parenR){u?u=false:this.expect(Ls.comma);if(r&&this.afterTrailingComma(Ls.parenR,true)){h=true;break}else if(this.type===Ls.ellipsis){m=this.start;c.push(this.parseParenItem(this.parseRestBinding()));if(this.type===Ls.comma){this.raise(this.start,"Comma is not permitted after the rest element")}break}else{c.push(this.parseMaybeAssign(false,d,this.parseParenItem))}}var g=this.lastTokEnd,y=this.lastTokEndLoc;this.expect(Ls.parenR);if(e&&!this.canInsertSemicolon()&&this.eat(Ls.arrow)){this.checkPatternErrors(d,false);this.checkYieldAwaitInDefaultParams();this.yieldPos=p;this.awaitPos=f;return this.parseParenArrowList(i,s,c,t)}if(!c.length||h){this.unexpected(this.lastTokStart)}if(m){this.unexpected(m)}this.checkExpressionErrors(d,true);this.yieldPos=p||this.yieldPos;this.awaitPos=f||this.awaitPos;if(c.length>1){n=this.startNodeAt(o,l);n.expressions=c;this.finishNodeAt(n,"SequenceExpression",g,y)}else{n=c[0]}}else{n=this.parseParenExpression()}if(this.options.preserveParens){var E=this.startNodeAt(i,s);E.expression=n;return this.finishNode(E,"ParenthesizedExpression")}else{return n}};Rn.parseParenItem=function(e){return e};Rn.parseParenArrowList=function(e,t,i,s){return this.parseArrowExpression(this.startNodeAt(e,t),i,false,s)};var Tn=[];Rn.parseNew=function(){if(this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword new")}var e=this.startNode();var t=this.parseIdent(true);if(this.options.ecmaVersion>=6&&this.eat(Ls.dot)){e.meta=t;var i=this.containsEsc;e.property=this.parseIdent(true);if(e.property.name!=="target"){this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'")}if(i){this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters")}if(!this.allowNewDotTarget){this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block")}return this.finishNode(e,"MetaProperty")}var s=this.start,n=this.startLoc,r=this.type===Ls._import;e.callee=this.parseSubscripts(this.parseExprAtom(),s,n,true,false);if(r&&e.callee.type==="ImportExpression"){this.raise(s,"Cannot use new with import()")}if(this.eat(Ls.parenL)){e.arguments=this.parseExprList(Ls.parenR,this.options.ecmaVersion>=8,false)}else{e.arguments=Tn}return this.finishNode(e,"NewExpression")};Rn.parseTemplateElement=function(e){var t=e.isTagged;var i=this.startNode();if(this.type===Ls.invalidTemplate){if(!t){this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal")}i.value={raw:this.value,cooked:null}}else{i.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value}}this.next();i.tail=this.type===Ls.backQuote;return this.finishNode(i,"TemplateElement")};Rn.parseTemplate=function(e){if(e===void 0)e={};var t=e.isTagged;if(t===void 0)t=false;var i=this.startNode();this.next();i.expressions=[];var s=this.parseTemplateElement({isTagged:t});i.quasis=[s];while(!s.tail){if(this.type===Ls.eof){this.raise(this.pos,"Unterminated template literal")}this.expect(Ls.dollarBraceL);i.expressions.push(this.parseExpression());this.expect(Ls.braceR);i.quasis.push(s=this.parseTemplateElement({isTagged:t}))}this.next();return this.finishNode(i,"TemplateLiteral")};Rn.isAsyncProp=function(e){return!e.computed&&e.key.type==="Identifier"&&e.key.name==="async"&&(this.type===Ls.name||this.type===Ls.num||this.type===Ls.string||this.type===Ls.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===Ls.star)&&!Fs.test(this.input.slice(this.lastTokEnd,this.start))};Rn.parseObj=function(e,t){var i=this.startNode(),s=true,n={};i.properties=[];this.next();while(!this.eat(Ls.braceR)){if(!s){this.expect(Ls.comma);if(this.options.ecmaVersion>=5&&this.afterTrailingComma(Ls.braceR)){break}}else{s=false}var r=this.parseProperty(e,t);if(!e){this.checkPropClash(r,n,t)}i.properties.push(r)}return this.finishNode(i,e?"ObjectPattern":"ObjectExpression")};Rn.parseProperty=function(e,t){var i=this.startNode(),s,n,r,o;if(this.options.ecmaVersion>=9&&this.eat(Ls.ellipsis)){if(e){i.argument=this.parseIdent(false);if(this.type===Ls.comma){this.raise(this.start,"Comma is not permitted after the rest element")}return this.finishNode(i,"RestElement")}if(this.type===Ls.parenL&&t){if(t.parenthesizedAssign<0){t.parenthesizedAssign=this.start}if(t.parenthesizedBind<0){t.parenthesizedBind=this.start}}i.argument=this.parseMaybeAssign(false,t);if(this.type===Ls.comma&&t&&t.trailingComma<0){t.trailingComma=this.start}return this.finishNode(i,"SpreadElement")}if(this.options.ecmaVersion>=6){i.method=false;i.shorthand=false;if(e||t){r=this.start;o=this.startLoc}if(!e){s=this.eat(Ls.star)}}var l=this.containsEsc;this.parsePropertyName(i);if(!e&&!l&&this.options.ecmaVersion>=8&&!s&&this.isAsyncProp(i)){n=true;s=this.options.ecmaVersion>=9&&this.eat(Ls.star);this.parsePropertyName(i,t)}else{n=false}this.parsePropertyValue(i,e,s,n,r,o,t,l);return this.finishNode(i,"Property")};Rn.parsePropertyValue=function(e,t,i,s,n,r,o,l){if((i||s)&&this.type===Ls.colon){this.unexpected()}if(this.eat(Ls.colon)){e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(false,o);e.kind="init"}else if(this.options.ecmaVersion>=6&&this.type===Ls.parenL){if(t){this.unexpected()}e.kind="init";e.method=true;e.value=this.parseMethod(i,s)}else if(!t&&!l&&this.options.ecmaVersion>=5&&!e.computed&&e.key.type==="Identifier"&&(e.key.name==="get"||e.key.name==="set")&&(this.type!==Ls.comma&&this.type!==Ls.braceR&&this.type!==Ls.eq)){if(i||s){this.unexpected()}e.kind=e.key.name;this.parsePropertyName(e);e.value=this.parseMethod(false);var c=e.kind==="get"?0:1;if(e.value.params.length!==c){var u=e.value.start;if(e.kind==="get"){this.raiseRecoverable(u,"getter should have no params")}else{this.raiseRecoverable(u,"setter should have exactly one param")}}else{if(e.kind==="set"&&e.value.params[0].type==="RestElement"){this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")}}}else if(this.options.ecmaVersion>=6&&!e.computed&&e.key.type==="Identifier"){if(i||s){this.unexpected()}this.checkUnreserved(e.key);if(e.key.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=n}e.kind="init";if(t){e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))}else if(this.type===Ls.eq&&o){if(o.shorthandAssign<0){o.shorthandAssign=this.start}e.value=this.parseMaybeDefault(n,r,this.copyNode(e.key))}else{e.value=this.copyNode(e.key)}e.shorthand=true}else{this.unexpected()}};Rn.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(Ls.bracketL)){e.computed=true;e.key=this.parseMaybeAssign();this.expect(Ls.bracketR);return e.key}else{e.computed=false}}return e.key=this.type===Ls.num||this.type===Ls.string?this.parseExprAtom():this.parseIdent(this.options.allowReserved!=="never")};Rn.initFunction=function(e){e.id=null;if(this.options.ecmaVersion>=6){e.generator=e.expression=false}if(this.options.ecmaVersion>=8){e.async=false}};Rn.parseMethod=function(e,t,i){var s=this.startNode(),n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;this.initFunction(s);if(this.options.ecmaVersion>=6){s.generator=e}if(this.options.ecmaVersion>=8){s.async=!!t}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;this.enterScope(functionFlags(t,s.generator)|rn|(i?an:0));this.expect(Ls.parenL);s.params=this.parseBindingList(Ls.parenR,false,this.options.ecmaVersion>=8);this.checkYieldAwaitInDefaultParams();this.parseFunctionBody(s,false,true,false);this.yieldPos=n;this.awaitPos=r;this.awaitIdentPos=o;return this.finishNode(s,"FunctionExpression")};Rn.parseArrowExpression=function(e,t,i,s){var n=this.yieldPos,r=this.awaitPos,o=this.awaitIdentPos;this.enterScope(functionFlags(i,false)|sn);this.initFunction(e);if(this.options.ecmaVersion>=8){e.async=!!i}this.yieldPos=0;this.awaitPos=0;this.awaitIdentPos=0;e.params=this.toAssignableList(t,true);this.parseFunctionBody(e,true,false,s);this.yieldPos=n;this.awaitPos=r;this.awaitIdentPos=o;return this.finishNode(e,"ArrowFunctionExpression")};Rn.parseFunctionBody=function(e,t,i,s){var n=t&&this.type!==Ls.braceL;var r=this.strict,o=false;if(n){e.body=this.parseMaybeAssign(s);e.expression=true;this.checkParams(e,false)}else{var l=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);if(!r||l){o=this.strictDirective(this.end);if(o&&l){this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list")}}var c=this.labels;this.labels=[];if(o){this.strict=true}this.checkParams(e,!r&&!o&&!t&&!i&&this.isSimpleParamList(e.params));if(this.strict&&e.id){this.checkLValSimple(e.id,fn)}e.body=this.parseBlock(false,undefined,o&&!r);e.expression=false;this.adaptDirectivePrologue(e.body.body);this.labels=c}this.exitScope()};Rn.isSimpleParamList=function(e){for(var t=0,i=e;t<i.length;t+=1){var s=i[t];if(s.type!=="Identifier"){return false}}return true};Rn.checkParams=function(e,t){var i=Object.create(null);for(var s=0,n=e.params;s<n.length;s+=1){var r=n[s];this.checkLValInnerPattern(r,un,t?null:i)}};Rn.parseExprList=function(e,t,i,s){var n=[],r=true;while(!this.eat(e)){if(!r){this.expect(Ls.comma);if(t&&this.afterTrailingComma(e)){break}}else{r=false}var o=void 0;if(i&&this.type===Ls.comma){o=null}else if(this.type===Ls.ellipsis){o=this.parseSpread(s);if(s&&this.type===Ls.comma&&s.trailingComma<0){s.trailingComma=this.start}}else{o=this.parseMaybeAssign(false,s)}n.push(o)}return n};Rn.checkUnreserved=function(e){var t=e.start;var i=e.end;var s=e.name;if(this.inGenerator&&s==="yield"){this.raiseRecoverable(t,"Cannot use 'yield' as identifier inside a generator")}if(this.inAsync&&s==="await"){this.raiseRecoverable(t,"Cannot use 'await' as identifier inside an async function")}if(this.currentThisScope().inClassFieldInit&&s==="arguments"){this.raiseRecoverable(t,"Cannot use 'arguments' in class field initializer")}if(this.inClassStaticBlock&&(s==="arguments"||s==="await")){this.raise(t,"Cannot use "+s+" in class static initialization block")}if(this.keywords.test(s)){this.raise(t,"Unexpected keyword '"+s+"'")}if(this.options.ecmaVersion<6&&this.input.slice(t,i).indexOf("\\")!==-1){return}var n=this.strict?this.reservedWordsStrict:this.reservedWords;if(n.test(s)){if(!this.inAsync&&s==="await"){this.raiseRecoverable(t,"Cannot use keyword 'await' outside an async function")}this.raiseRecoverable(t,"The keyword '"+s+"' is reserved")}};Rn.parseIdent=function(e,t){var i=this.startNode();if(this.type===Ls.name){i.name=this.value}else if(this.type.keyword){i.name=this.type.keyword;if((i.name==="class"||i.name==="function")&&(this.lastTokEnd!==this.lastTokStart+1||this.input.charCodeAt(this.lastTokStart)!==46)){this.context.pop()}}else{this.unexpected()}this.next(!!e);this.finishNode(i,"Identifier");if(!e){this.checkUnreserved(i);if(i.name==="await"&&!this.awaitIdentPos){this.awaitIdentPos=i.start}}return i};Rn.parsePrivateIdent=function(){var e=this.startNode();if(this.type===Ls.privateId){e.name=this.value}else{this.unexpected()}this.next();this.finishNode(e,"PrivateIdentifier");if(this.privateNameStack.length===0){this.raise(e.start,"Private field '#"+e.name+"' must be declared in an enclosing class")}else{this.privateNameStack[this.privateNameStack.length-1].used.push(e)}return e};Rn.parseYield=function(e){if(!this.yieldPos){this.yieldPos=this.start}var t=this.startNode();this.next();if(this.type===Ls.semi||this.canInsertSemicolon()||this.type!==Ls.star&&!this.type.startsExpr){t.delegate=false;t.argument=null}else{t.delegate=this.eat(Ls.star);t.argument=this.parseMaybeAssign(e)}return this.finishNode(t,"YieldExpression")};Rn.parseAwait=function(e){if(!this.awaitPos){this.awaitPos=this.start}var t=this.startNode();this.next();t.argument=this.parseMaybeUnary(null,true,false,e);return this.finishNode(t,"AwaitExpression")};var $n=mn.prototype;$n.raise=function(e,t){var i=getLineInfo(this.input,e);t+=" ("+i.line+":"+i.column+")";var s=new SyntaxError(t);s.pos=e;s.loc=i;s.raisedAt=this.pos;throw s};$n.raiseRecoverable=$n.raise;$n.curPosition=function(){if(this.options.locations){return new Ks(this.curLine,this.pos-this.lineStart)}};var On=mn.prototype;var Dn=function Scope(e){this.flags=e;this.var=[];this.lexical=[];this.functions=[];this.inClassFieldInit=false};On.enterScope=function(e){this.scopeStack.push(new Dn(e))};On.exitScope=function(){this.scopeStack.pop()};On.treatFunctionsAsVarInScope=function(e){return e.flags&Js||!this.inModule&&e.flags&Zs};On.declareName=function(e,t,i){var s=false;if(t===hn){var n=this.currentScope();s=n.lexical.indexOf(e)>-1||n.functions.indexOf(e)>-1||n.var.indexOf(e)>-1;n.lexical.push(e);if(this.inModule&&n.flags&Zs){delete this.undefinedExports[e]}}else if(t===pn){var r=this.currentScope();r.lexical.push(e)}else if(t===dn){var o=this.currentScope();if(this.treatFunctionsAsVar){s=o.lexical.indexOf(e)>-1}else{s=o.lexical.indexOf(e)>-1||o.var.indexOf(e)>-1}o.functions.push(e)}else{for(var l=this.scopeStack.length-1;l>=0;--l){var c=this.scopeStack[l];if(c.lexical.indexOf(e)>-1&&!(c.flags&nn&&c.lexical[0]===e)||!this.treatFunctionsAsVarInScope(c)&&c.functions.indexOf(e)>-1){s=true;break}c.var.push(e);if(this.inModule&&c.flags&Zs){delete this.undefinedExports[e]}if(c.flags&ln){break}}}if(s){this.raiseRecoverable(i,"Identifier '"+e+"' has already been declared")}};On.checkLocalExport=function(e){if(this.scopeStack[0].lexical.indexOf(e.name)===-1&&this.scopeStack[0].var.indexOf(e.name)===-1){this.undefinedExports[e.name]=e}};On.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]};On.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&ln){return t}}};On.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(t.flags&ln&&!(t.flags&sn)){return t}}};var Mn=function Node(e,t,i){this.type="";this.start=t;this.end=0;if(e.options.locations){this.loc=new Ys(e,i)}if(e.options.directSourceFile){this.sourceFile=e.options.directSourceFile}if(e.options.ranges){this.range=[t,0]}};var Ln=mn.prototype;Ln.startNode=function(){return new Mn(this,this.start,this.startLoc)};Ln.startNodeAt=function(e,t){return new Mn(this,e,t)};function finishNodeAt(e,t,i,s){e.type=t;e.end=i;if(this.options.locations){e.loc.end=s}if(this.options.ranges){e.range[1]=i}return e}Ln.finishNode=function(e,t){return finishNodeAt.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)};Ln.finishNodeAt=function(e,t,i,s){return finishNodeAt.call(this,e,t,i,s)};Ln.copyNode=function(e){var t=new Mn(this,e.start,this.startLoc);for(var i in e){t[i]=e[i]}return t};var Fn="ASCII ASCII_Hex_Digit AHex Alphabetic Alpha Any Assigned Bidi_Control Bidi_C Bidi_Mirrored Bidi_M Case_Ignorable CI Cased Changes_When_Casefolded CWCF Changes_When_Casemapped CWCM Changes_When_Lowercased CWL Changes_When_NFKC_Casefolded CWKCF Changes_When_Titlecased CWT Changes_When_Uppercased CWU Dash Default_Ignorable_Code_Point DI Deprecated Dep Diacritic Dia Emoji Emoji_Component Emoji_Modifier Emoji_Modifier_Base Emoji_Presentation Extender Ext Grapheme_Base Gr_Base Grapheme_Extend Gr_Ext Hex_Digit Hex IDS_Binary_Operator IDSB IDS_Trinary_Operator IDST ID_Continue IDC ID_Start IDS Ideographic Ideo Join_Control Join_C Logical_Order_Exception LOE Lowercase Lower Math Noncharacter_Code_Point NChar Pattern_Syntax Pat_Syn Pattern_White_Space Pat_WS Quotation_Mark QMark Radical Regional_Indicator RI Sentence_Terminal STerm Soft_Dotted SD Terminal_Punctuation Term Unified_Ideograph UIdeo Uppercase Upper Variation_Selector VS White_Space space XID_Continue XIDC XID_Start XIDS";var Vn=Fn+" Extended_Pictographic";var Bn=Vn;var zn=Bn+" EBase EComp EMod EPres ExtPict";var Un=zn;var Hn={9:Fn,10:Vn,11:Bn,12:zn,13:Un};var jn="Cased_Letter LC Close_Punctuation Pe Connector_Punctuation Pc Control Cc cntrl Currency_Symbol Sc Dash_Punctuation Pd Decimal_Number Nd digit Enclosing_Mark Me Final_Punctuation Pf Format Cf Initial_Punctuation Pi Letter L Letter_Number Nl Line_Separator Zl Lowercase_Letter Ll Mark M Combining_Mark Math_Symbol Sm Modifier_Letter Lm Modifier_Symbol Sk Nonspacing_Mark Mn Number N Open_Punctuation Ps Other C Other_Letter Lo Other_Number No Other_Punctuation Po Other_Symbol So Paragraph_Separator Zp Private_Use Co Punctuation P punct Separator Z Space_Separator Zs Spacing_Mark Mc Surrogate Cs Symbol S Titlecase_Letter Lt Unassigned Cn Uppercase_Letter Lu";var Gn="Adlam Adlm Ahom Anatolian_Hieroglyphs Hluw Arabic Arab Armenian Armn Avestan Avst Balinese Bali Bamum Bamu Bassa_Vah Bass Batak Batk Bengali Beng Bhaiksuki Bhks Bopomofo Bopo Brahmi Brah Braille Brai Buginese Bugi Buhid Buhd Canadian_Aboriginal Cans Carian Cari Caucasian_Albanian Aghb Chakma Cakm Cham Cham Cherokee Cher Common Zyyy Coptic Copt Qaac Cuneiform Xsux Cypriot Cprt Cyrillic Cyrl Deseret Dsrt Devanagari Deva Duployan Dupl Egyptian_Hieroglyphs Egyp Elbasan Elba Ethiopic Ethi Georgian Geor Glagolitic Glag Gothic Goth Grantha Gran Greek Grek Gujarati Gujr Gurmukhi Guru Han Hani Hangul Hang Hanunoo Hano Hatran Hatr Hebrew Hebr Hiragana Hira Imperial_Aramaic Armi Inherited Zinh Qaai Inscriptional_Pahlavi Phli Inscriptional_Parthian Prti Javanese Java Kaithi Kthi Kannada Knda Katakana Kana Kayah_Li Kali Kharoshthi Khar Khmer Khmr Khojki Khoj Khudawadi Sind Lao Laoo Latin Latn Lepcha Lepc Limbu Limb Linear_A Lina Linear_B Linb Lisu Lisu Lycian Lyci Lydian Lydi Mahajani Mahj Malayalam Mlym Mandaic Mand Manichaean Mani Marchen Marc Masaram_Gondi Gonm Meetei_Mayek Mtei Mende_Kikakui Mend Meroitic_Cursive Merc Meroitic_Hieroglyphs Mero Miao Plrd Modi Mongolian Mong Mro Mroo Multani Mult Myanmar Mymr Nabataean Nbat New_Tai_Lue Talu Newa Newa Nko Nkoo Nushu Nshu Ogham Ogam Ol_Chiki Olck Old_Hungarian Hung Old_Italic Ital Old_North_Arabian Narb Old_Permic Perm Old_Persian Xpeo Old_South_Arabian Sarb Old_Turkic Orkh Oriya Orya Osage Osge Osmanya Osma Pahawh_Hmong Hmng Palmyrene Palm Pau_Cin_Hau Pauc Phags_Pa Phag Phoenician Phnx Psalter_Pahlavi Phlp Rejang Rjng Runic Runr Samaritan Samr Saurashtra Saur Sharada Shrd Shavian Shaw Siddham Sidd SignWriting Sgnw Sinhala Sinh Sora_Sompeng Sora Soyombo Soyo Sundanese Sund Syloti_Nagri Sylo Syriac Syrc Tagalog Tglg Tagbanwa Tagb Tai_Le Tale Tai_Tham Lana Tai_Viet Tavt Takri Takr Tamil Taml Tangut Tang Telugu Telu Thaana Thaa Thai Thai Tibetan Tibt Tifinagh Tfng Tirhuta Tirh Ugaritic Ugar Vai Vaii Warang_Citi Wara Yi Yiii Zanabazar_Square Zanb";var Wn=Gn+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd";var qn=Wn+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho";var Kn=qn+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi";var Yn=Kn+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith";var Xn={9:Gn,10:Wn,11:qn,12:Kn,13:Yn};var Qn={};function buildUnicodeData(e){var t=Qn[e]={binary:wordsRegexp(Hn[e]+" "+jn),nonBinary:{General_Category:wordsRegexp(jn),Script:wordsRegexp(Xn[e])}};t.nonBinary.Script_Extensions=t.nonBinary.Script;t.nonBinary.gc=t.nonBinary.General_Category;t.nonBinary.sc=t.nonBinary.Script;t.nonBinary.scx=t.nonBinary.Script_Extensions}for(var Zn=0,Jn=[9,10,11,12,13];Zn<Jn.length;Zn+=1){var er=Jn[Zn];buildUnicodeData(er)}var tr=mn.prototype;var ir=function RegExpValidationState(e){this.parser=e;this.validFlags="gim"+(e.options.ecmaVersion>=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"");this.unicodeProperties=Qn[e.options.ecmaVersion>=13?13:e.options.ecmaVersion];this.source="";this.flags="";this.start=0;this.switchU=false;this.switchN=false;this.pos=0;this.lastIntValue=0;this.lastStringValue="";this.lastAssertionIsQuantifiable=false;this.numCapturingParens=0;this.maxBackReference=0;this.groupNames=[];this.backReferenceNames=[]};ir.prototype.reset=function reset(e,t,i){var s=i.indexOf("u")!==-1;this.start=e|0;this.source=t+"";this.flags=i;this.switchU=s&&this.parser.options.ecmaVersion>=6;this.switchN=s&&this.parser.options.ecmaVersion>=9};ir.prototype.raise=function raise(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)};ir.prototype.at=function at(e,t){if(t===void 0)t=false;var i=this.source;var s=i.length;if(e>=s){return-1}var n=i.charCodeAt(e);if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=s){return n}var r=i.charCodeAt(e+1);return r>=56320&&r<=57343?(n<<10)+r-56613888:n};ir.prototype.nextIndex=function nextIndex(e,t){if(t===void 0)t=false;var i=this.source;var s=i.length;if(e>=s){return s}var n=i.charCodeAt(e),r;if(!(t||this.switchU)||n<=55295||n>=57344||e+1>=s||(r=i.charCodeAt(e+1))<56320||r>57343){return e+1}return e+2};ir.prototype.current=function current(e){if(e===void 0)e=false;return this.at(this.pos,e)};ir.prototype.lookahead=function lookahead(e){if(e===void 0)e=false;return this.at(this.nextIndex(this.pos,e),e)};ir.prototype.advance=function advance(e){if(e===void 0)e=false;this.pos=this.nextIndex(this.pos,e)};ir.prototype.eat=function eat(e,t){if(t===void 0)t=false;if(this.current(t)===e){this.advance(t);return true}return false};tr.validateRegExpFlags=function(e){var t=e.validFlags;var i=e.flags;for(var s=0;s<i.length;s++){var n=i.charAt(s);if(t.indexOf(n)===-1){this.raise(e.start,"Invalid regular expression flag")}if(i.indexOf(n,s+1)>-1){this.raise(e.start,"Duplicate regular expression flag")}}};tr.validateRegExpPattern=function(e){this.regexp_pattern(e);if(!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0){e.switchN=true;this.regexp_pattern(e)}};tr.regexp_pattern=function(e){e.pos=0;e.lastIntValue=0;e.lastStringValue="";e.lastAssertionIsQuantifiable=false;e.numCapturingParens=0;e.maxBackReference=0;e.groupNames.length=0;e.backReferenceNames.length=0;this.regexp_disjunction(e);if(e.pos!==e.source.length){if(e.eat(41)){e.raise("Unmatched ')'")}if(e.eat(93)||e.eat(125)){e.raise("Lone quantifier brackets")}}if(e.maxBackReference>e.numCapturingParens){e.raise("Invalid escape")}for(var t=0,i=e.backReferenceNames;t<i.length;t+=1){var s=i[t];if(e.groupNames.indexOf(s)===-1){e.raise("Invalid named capture referenced")}}};tr.regexp_disjunction=function(e){this.regexp_alternative(e);while(e.eat(124)){this.regexp_alternative(e)}if(this.regexp_eatQuantifier(e,true)){e.raise("Nothing to repeat")}if(e.eat(123)){e.raise("Lone quantifier brackets")}};tr.regexp_alternative=function(e){while(e.pos<e.source.length&&this.regexp_eatTerm(e)){}};tr.regexp_eatTerm=function(e){if(this.regexp_eatAssertion(e)){if(e.lastAssertionIsQuantifiable&&this.regexp_eatQuantifier(e)){if(e.switchU){e.raise("Invalid quantifier")}}return true}if(e.switchU?this.regexp_eatAtom(e):this.regexp_eatExtendedAtom(e)){this.regexp_eatQuantifier(e);return true}return false};tr.regexp_eatAssertion=function(e){var t=e.pos;e.lastAssertionIsQuantifiable=false;if(e.eat(94)||e.eat(36)){return true}if(e.eat(92)){if(e.eat(66)||e.eat(98)){return true}e.pos=t}if(e.eat(40)&&e.eat(63)){var i=false;if(this.options.ecmaVersion>=9){i=e.eat(60)}if(e.eat(61)||e.eat(33)){this.regexp_disjunction(e);if(!e.eat(41)){e.raise("Unterminated group")}e.lastAssertionIsQuantifiable=!i;return true}}e.pos=t;return false};tr.regexp_eatQuantifier=function(e,t){if(t===void 0)t=false;if(this.regexp_eatQuantifierPrefix(e,t)){e.eat(63);return true}return false};tr.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)};tr.regexp_eatBracedQuantifier=function(e,t){var i=e.pos;if(e.eat(123)){var s=0,n=-1;if(this.regexp_eatDecimalDigits(e)){s=e.lastIntValue;if(e.eat(44)&&this.regexp_eatDecimalDigits(e)){n=e.lastIntValue}if(e.eat(125)){if(n!==-1&&n<s&&!t){e.raise("numbers out of order in {} quantifier")}return true}}if(e.switchU&&!t){e.raise("Incomplete quantifier")}e.pos=i}return false};tr.regexp_eatAtom=function(e){return this.regexp_eatPatternCharacters(e)||e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)};tr.regexp_eatReverseSolidusAtomEscape=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatAtomEscape(e)){return true}e.pos=t}return false};tr.regexp_eatUncapturingGroup=function(e){var t=e.pos;if(e.eat(40)){if(e.eat(63)&&e.eat(58)){this.regexp_disjunction(e);if(e.eat(41)){return true}e.raise("Unterminated group")}e.pos=t}return false};tr.regexp_eatCapturingGroup=function(e){if(e.eat(40)){if(this.options.ecmaVersion>=9){this.regexp_groupSpecifier(e)}else if(e.current()===63){e.raise("Invalid group")}this.regexp_disjunction(e);if(e.eat(41)){e.numCapturingParens+=1;return true}e.raise("Unterminated group")}return false};tr.regexp_eatExtendedAtom=function(e){return e.eat(46)||this.regexp_eatReverseSolidusAtomEscape(e)||this.regexp_eatCharacterClass(e)||this.regexp_eatUncapturingGroup(e)||this.regexp_eatCapturingGroup(e)||this.regexp_eatInvalidBracedQuantifier(e)||this.regexp_eatExtendedPatternCharacter(e)};tr.regexp_eatInvalidBracedQuantifier=function(e){if(this.regexp_eatBracedQuantifier(e,true)){e.raise("Nothing to repeat")}return false};tr.regexp_eatSyntaxCharacter=function(e){var t=e.current();if(isSyntaxCharacter(t)){e.lastIntValue=t;e.advance();return true}return false};function isSyntaxCharacter(e){return e===36||e>=40&&e<=43||e===46||e===63||e>=91&&e<=94||e>=123&&e<=125}tr.regexp_eatPatternCharacters=function(e){var t=e.pos;var i=0;while((i=e.current())!==-1&&!isSyntaxCharacter(i)){e.advance()}return e.pos!==t};tr.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();if(t!==-1&&t!==36&&!(t>=40&&t<=43)&&t!==46&&t!==63&&t!==91&&t!==94&&t!==124){e.advance();return true}return false};tr.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e)){if(e.groupNames.indexOf(e.lastStringValue)!==-1){e.raise("Duplicate capture group name")}e.groupNames.push(e.lastStringValue);return}e.raise("Invalid group")}};tr.regexp_eatGroupName=function(e){e.lastStringValue="";if(e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62)){return true}e.raise("Invalid capture group name")}return false};tr.regexp_eatRegExpIdentifierName=function(e){e.lastStringValue="";if(this.regexp_eatRegExpIdentifierStart(e)){e.lastStringValue+=codePointToString(e.lastIntValue);while(this.regexp_eatRegExpIdentifierPart(e)){e.lastStringValue+=codePointToString(e.lastIntValue)}return true}return false};tr.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos;var i=this.options.ecmaVersion>=11;var s=e.current(i);e.advance(i);if(s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)){s=e.lastIntValue}if(isRegExpIdentifierStart(s)){e.lastIntValue=s;return true}e.pos=t;return false};function isRegExpIdentifierStart(e){return isIdentifierStart(e,true)||e===36||e===95}tr.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos;var i=this.options.ecmaVersion>=11;var s=e.current(i);e.advance(i);if(s===92&&this.regexp_eatRegExpUnicodeEscapeSequence(e,i)){s=e.lastIntValue}if(isRegExpIdentifierPart(s)){e.lastIntValue=s;return true}e.pos=t;return false};function isRegExpIdentifierPart(e){return isIdentifierChar(e,true)||e===36||e===95||e===8204||e===8205}tr.regexp_eatAtomEscape=function(e){if(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e)){return true}if(e.switchU){if(e.current()===99){e.raise("Invalid unicode escape")}e.raise("Invalid escape")}return false};tr.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var i=e.lastIntValue;if(e.switchU){if(i>e.maxBackReference){e.maxBackReference=i}return true}if(i<=e.numCapturingParens){return true}e.pos=t}return false};tr.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e)){e.backReferenceNames.push(e.lastStringValue);return true}e.raise("Invalid named reference")}return false};tr.regexp_eatCharacterEscape=function(e){return this.regexp_eatControlEscape(e)||this.regexp_eatCControlLetter(e)||this.regexp_eatZero(e)||this.regexp_eatHexEscapeSequence(e)||this.regexp_eatRegExpUnicodeEscapeSequence(e,false)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)};tr.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e)){return true}e.pos=t}return false};tr.regexp_eatZero=function(e){if(e.current()===48&&!isDecimalDigit(e.lookahead())){e.lastIntValue=0;e.advance();return true}return false};tr.regexp_eatControlEscape=function(e){var t=e.current();if(t===116){e.lastIntValue=9;e.advance();return true}if(t===110){e.lastIntValue=10;e.advance();return true}if(t===118){e.lastIntValue=11;e.advance();return true}if(t===102){e.lastIntValue=12;e.advance();return true}if(t===114){e.lastIntValue=13;e.advance();return true}return false};tr.regexp_eatControlLetter=function(e){var t=e.current();if(isControlLetter(t)){e.lastIntValue=t%32;e.advance();return true}return false};function isControlLetter(e){return e>=65&&e<=90||e>=97&&e<=122}tr.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){if(t===void 0)t=false;var i=e.pos;var s=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var n=e.lastIntValue;if(s&&n>=55296&&n<=56319){var r=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var o=e.lastIntValue;if(o>=56320&&o<=57343){e.lastIntValue=(n-55296)*1024+(o-56320)+65536;return true}}e.pos=r;e.lastIntValue=n}return true}if(s&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&isValidUnicode(e.lastIntValue)){return true}if(s){e.raise("Invalid unicode escape")}e.pos=i}return false};function isValidUnicode(e){return e>=0&&e<=1114111}tr.regexp_eatIdentityEscape=function(e){if(e.switchU){if(this.regexp_eatSyntaxCharacter(e)){return true}if(e.eat(47)){e.lastIntValue=47;return true}return false}var t=e.current();if(t!==99&&(!e.switchN||t!==107)){e.lastIntValue=t;e.advance();return true}return false};tr.regexp_eatDecimalEscape=function(e){e.lastIntValue=0;var t=e.current();if(t>=49&&t<=57){do{e.lastIntValue=10*e.lastIntValue+(t-48);e.advance()}while((t=e.current())>=48&&t<=57);return true}return false};tr.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(isCharacterClassEscape(t)){e.lastIntValue=-1;e.advance();return true}if(e.switchU&&this.options.ecmaVersion>=9&&(t===80||t===112)){e.lastIntValue=-1;e.advance();if(e.eat(123)&&this.regexp_eatUnicodePropertyValueExpression(e)&&e.eat(125)){return true}e.raise("Invalid property name")}return false};function isCharacterClassEscape(e){return e===100||e===68||e===115||e===83||e===119||e===87}tr.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var i=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var s=e.lastStringValue;this.regexp_validateUnicodePropertyNameAndValue(e,i,s);return true}}e.pos=t;if(this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var n=e.lastStringValue;this.regexp_validateUnicodePropertyNameOrValue(e,n);return true}return false};tr.regexp_validateUnicodePropertyNameAndValue=function(e,t,i){if(!Gs(e.unicodeProperties.nonBinary,t)){e.raise("Invalid property name")}if(!e.unicodeProperties.nonBinary[t].test(i)){e.raise("Invalid property value")}};tr.regexp_validateUnicodePropertyNameOrValue=function(e,t){if(!e.unicodeProperties.binary.test(t)){e.raise("Invalid property name")}};tr.regexp_eatUnicodePropertyName=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyNameCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyNameCharacter(e){return isControlLetter(e)||e===95}tr.regexp_eatUnicodePropertyValue=function(e){var t=0;e.lastStringValue="";while(isUnicodePropertyValueCharacter(t=e.current())){e.lastStringValue+=codePointToString(t);e.advance()}return e.lastStringValue!==""};function isUnicodePropertyValueCharacter(e){return isUnicodePropertyNameCharacter(e)||isDecimalDigit(e)}tr.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)};tr.regexp_eatCharacterClass=function(e){if(e.eat(91)){e.eat(94);this.regexp_classRanges(e);if(e.eat(93)){return true}e.raise("Unterminated character class")}return false};tr.regexp_classRanges=function(e){while(this.regexp_eatClassAtom(e)){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var i=e.lastIntValue;if(e.switchU&&(t===-1||i===-1)){e.raise("Invalid character class")}if(t!==-1&&i!==-1&&t>i){e.raise("Range out of order in character class")}}}};tr.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e)){return true}if(e.switchU){var i=e.current();if(i===99||isOctalDigit(i)){e.raise("Invalid class escape")}e.raise("Invalid escape")}e.pos=t}var s=e.current();if(s!==93){e.lastIntValue=s;e.advance();return true}return false};tr.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98)){e.lastIntValue=8;return true}if(e.switchU&&e.eat(45)){e.lastIntValue=45;return true}if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e)){return true}e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)};tr.regexp_eatClassControlLetter=function(e){var t=e.current();if(isDecimalDigit(t)||t===95){e.lastIntValue=t%32;e.advance();return true}return false};tr.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2)){return true}if(e.switchU){e.raise("Invalid escape")}e.pos=t}return false};tr.regexp_eatDecimalDigits=function(e){var t=e.pos;var i=0;e.lastIntValue=0;while(isDecimalDigit(i=e.current())){e.lastIntValue=10*e.lastIntValue+(i-48);e.advance()}return e.pos!==t};function isDecimalDigit(e){return e>=48&&e<=57}tr.regexp_eatHexDigits=function(e){var t=e.pos;var i=0;e.lastIntValue=0;while(isHexDigit(i=e.current())){e.lastIntValue=16*e.lastIntValue+hexToInt(i);e.advance()}return e.pos!==t};function isHexDigit(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function hexToInt(e){if(e>=65&&e<=70){return 10+(e-65)}if(e>=97&&e<=102){return 10+(e-97)}return e-48}tr.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var i=e.lastIntValue;if(t<=3&&this.regexp_eatOctalDigit(e)){e.lastIntValue=t*64+i*8+e.lastIntValue}else{e.lastIntValue=t*8+i}}else{e.lastIntValue=t}return true}return false};tr.regexp_eatOctalDigit=function(e){var t=e.current();if(isOctalDigit(t)){e.lastIntValue=t-48;e.advance();return true}e.lastIntValue=0;return false};function isOctalDigit(e){return e>=48&&e<=55}tr.regexp_eatFixedHexDigits=function(e,t){var i=e.pos;e.lastIntValue=0;for(var s=0;s<t;++s){var n=e.current();if(!isHexDigit(n)){e.pos=i;return false}e.lastIntValue=16*e.lastIntValue+hexToInt(n);e.advance()}return true};var sr=function Token(e){this.type=e.type;this.value=e.value;this.start=e.start;this.end=e.end;if(e.options.locations){this.loc=new Ys(e,e.startLoc,e.endLoc)}if(e.options.ranges){this.range=[e.start,e.end]}};var nr=mn.prototype;nr.next=function(e){if(!e&&this.type.keyword&&this.containsEsc){this.raiseRecoverable(this.start,"Escape sequence in keyword "+this.type.keyword)}if(this.options.onToken){this.options.onToken(new sr(this))}this.lastTokEnd=this.end;this.lastTokStart=this.start;this.lastTokEndLoc=this.endLoc;this.lastTokStartLoc=this.startLoc;this.nextToken()};nr.getToken=function(){this.next();return new sr(this)};if(typeof Symbol!=="undefined"){nr[Symbol.iterator]=function(){var e=this;return{next:function(){var t=e.getToken();return{done:t.type===Ls.eof,value:t}}}}}nr.nextToken=function(){var e=this.curContext();if(!e||!e.preserveSpace){this.skipSpace()}this.start=this.pos;if(this.options.locations){this.startLoc=this.curPosition()}if(this.pos>=this.input.length){return this.finishToken(Ls.eof)}if(e.override){return e.override(this)}else{this.readToken(this.fullCharCodeAtPos())}};nr.readToken=function(e){if(isIdentifierStart(e,this.options.ecmaVersion>=6)||e===92){return this.readWord()}return this.getTokenFromCode(e)};nr.fullCharCodeAtPos=function(){var e=this.input.charCodeAt(this.pos);if(e<=55295||e>=56320){return e}var t=this.input.charCodeAt(this.pos+1);return t<=56319||t>=57344?e:(e<<10)+t-56613888};nr.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition();var t=this.pos,i=this.input.indexOf("*/",this.pos+=2);if(i===-1){this.raise(this.pos-2,"Unterminated comment")}this.pos=i+2;if(this.options.locations){for(var s=void 0,n=t;(s=nextLineBreak(this.input,n,this.pos))>-1;){++this.curLine;n=this.lineStart=s}}if(this.options.onComment){this.options.onComment(true,this.input.slice(t+2,i),t,this.pos,e,this.curPosition())}};nr.skipLineComment=function(e){var t=this.pos;var i=this.options.onComment&&this.curPosition();var s=this.input.charCodeAt(this.pos+=e);while(this.pos<this.input.length&&!isNewLine(s)){s=this.input.charCodeAt(++this.pos)}if(this.options.onComment){this.options.onComment(false,this.input.slice(t+e,this.pos),t,this.pos,i,this.curPosition())}};nr.skipSpace=function(){e:while(this.pos<this.input.length){var e=this.input.charCodeAt(this.pos);switch(e){case 32:case 160:++this.pos;break;case 13:if(this.input.charCodeAt(this.pos+1)===10){++this.pos}case 10:case 8232:case 8233:++this.pos;if(this.options.locations){++this.curLine;this.lineStart=this.pos}break;case 47:switch(this.input.charCodeAt(this.pos+1)){case 42:this.skipBlockComment();break;case 47:this.skipLineComment(2);break;default:break e}break;default:if(e>8&&e<14||e>=5760&&Bs.test(String.fromCharCode(e))){++this.pos}else{break e}}}};nr.finishToken=function(e,t){this.end=this.pos;if(this.options.locations){this.endLoc=this.curPosition()}var i=this.type;this.type=e;this.value=t;this.updateContext(i)};nr.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57){return this.readNumber(true)}var t=this.input.charCodeAt(this.pos+2);if(this.options.ecmaVersion>=6&&e===46&&t===46){this.pos+=3;return this.finishToken(Ls.ellipsis)}else{++this.pos;return this.finishToken(Ls.dot)}};nr.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);if(this.exprAllowed){++this.pos;return this.readRegexp()}if(e===61){return this.finishOp(Ls.assign,2)}return this.finishOp(Ls.slash,1)};nr.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1);var i=1;var s=e===42?Ls.star:Ls.modulo;if(this.options.ecmaVersion>=7&&e===42&&t===42){++i;s=Ls.starstar;t=this.input.charCodeAt(this.pos+2)}if(t===61){return this.finishOp(Ls.assign,i+1)}return this.finishOp(s,i)};nr.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(this.options.ecmaVersion>=12){var i=this.input.charCodeAt(this.pos+2);if(i===61){return this.finishOp(Ls.assign,3)}}return this.finishOp(e===124?Ls.logicalOR:Ls.logicalAND,2)}if(t===61){return this.finishOp(Ls.assign,2)}return this.finishOp(e===124?Ls.bitwiseOR:Ls.bitwiseAND,1)};nr.readToken_caret=function(){var e=this.input.charCodeAt(this.pos+1);if(e===61){return this.finishOp(Ls.assign,2)}return this.finishOp(Ls.bitwiseXOR,1)};nr.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===e){if(t===45&&!this.inModule&&this.input.charCodeAt(this.pos+2)===62&&(this.lastTokEnd===0||Fs.test(this.input.slice(this.lastTokEnd,this.pos)))){this.skipLineComment(3);this.skipSpace();return this.nextToken()}return this.finishOp(Ls.incDec,2)}if(t===61){return this.finishOp(Ls.assign,2)}return this.finishOp(Ls.plusMin,1)};nr.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1);var i=1;if(t===e){i=e===62&&this.input.charCodeAt(this.pos+2)===62?3:2;if(this.input.charCodeAt(this.pos+i)===61){return this.finishOp(Ls.assign,i+1)}return this.finishOp(Ls.bitShift,i)}if(t===33&&e===60&&!this.inModule&&this.input.charCodeAt(this.pos+2)===45&&this.input.charCodeAt(this.pos+3)===45){this.skipLineComment(4);this.skipSpace();return this.nextToken()}if(t===61){i=2}return this.finishOp(Ls.relational,i)};nr.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);if(t===61){return this.finishOp(Ls.equality,this.input.charCodeAt(this.pos+2)===61?3:2)}if(e===61&&t===62&&this.options.ecmaVersion>=6){this.pos+=2;return this.finishToken(Ls.arrow)}return this.finishOp(e===61?Ls.eq:Ls.prefix,1)};nr.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(t===46){var i=this.input.charCodeAt(this.pos+2);if(i<48||i>57){return this.finishOp(Ls.questionDot,2)}}if(t===63){if(e>=12){var s=this.input.charCodeAt(this.pos+2);if(s===61){return this.finishOp(Ls.assign,3)}}return this.finishOp(Ls.coalesce,2)}}return this.finishOp(Ls.question,1)};nr.readToken_numberSign=function(){var e=this.options.ecmaVersion;var t=35;if(e>=13){++this.pos;t=this.fullCharCodeAtPos();if(isIdentifierStart(t,true)||t===92){return this.finishToken(Ls.privateId,this.readWord1())}}this.raise(this.pos,"Unexpected character '"+codePointToString(t)+"'")};nr.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:++this.pos;return this.finishToken(Ls.parenL);case 41:++this.pos;return this.finishToken(Ls.parenR);case 59:++this.pos;return this.finishToken(Ls.semi);case 44:++this.pos;return this.finishToken(Ls.comma);case 91:++this.pos;return this.finishToken(Ls.bracketL);case 93:++this.pos;return this.finishToken(Ls.bracketR);case 123:++this.pos;return this.finishToken(Ls.braceL);case 125:++this.pos;return this.finishToken(Ls.braceR);case 58:++this.pos;return this.finishToken(Ls.colon);case 96:if(this.options.ecmaVersion<6){break}++this.pos;return this.finishToken(Ls.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(t===120||t===88){return this.readRadixNumber(16)}if(this.options.ecmaVersion>=6){if(t===111||t===79){return this.readRadixNumber(8)}if(t===98||t===66){return this.readRadixNumber(2)}}case 49:case 50:case 51:case 52:case 53:case 54:case 55:case 56:case 57:return this.readNumber(false);case 34:case 39:return this.readString(e);case 47:return this.readToken_slash();case 37:case 42:return this.readToken_mult_modulo_exp(e);case 124:case 38:return this.readToken_pipe_amp(e);case 94:return this.readToken_caret();case 43:case 45:return this.readToken_plus_min(e);case 60:case 62:return this.readToken_lt_gt(e);case 61:case 33:return this.readToken_eq_excl(e);case 63:return this.readToken_question();case 126:return this.finishOp(Ls.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+codePointToString(e)+"'")};nr.finishOp=function(e,t){var i=this.input.slice(this.pos,this.pos+t);this.pos+=t;return this.finishToken(e,i)};nr.readRegexp=function(){var e,t,i=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(i,"Unterminated regular expression")}var s=this.input.charAt(this.pos);if(Fs.test(s)){this.raise(i,"Unterminated regular expression")}if(!e){if(s==="["){t=true}else if(s==="]"&&t){t=false}else if(s==="/"&&!t){break}e=s==="\\"}else{e=false}++this.pos}var n=this.input.slice(i,this.pos);++this.pos;var r=this.pos;var o=this.readWord1();if(this.containsEsc){this.unexpected(r)}var l=this.regexpState||(this.regexpState=new ir(this));l.reset(i,n,o);this.validateRegExpFlags(l);this.validateRegExpPattern(l);var c=null;try{c=new RegExp(n,o)}catch(e){}return this.finishToken(Ls.regexp,{pattern:n,flags:o,value:c})};nr.readInt=function(e,t,i){var s=this.options.ecmaVersion>=12&&t===undefined;var n=i&&this.input.charCodeAt(this.pos)===48;var r=this.pos,o=0,l=0;for(var c=0,u=t==null?Infinity:t;c<u;++c,++this.pos){var h=this.input.charCodeAt(this.pos),d=void 0;if(s&&h===95){if(n){this.raiseRecoverable(this.pos,"Numeric separator is not allowed in legacy octal numeric literals")}if(l===95){this.raiseRecoverable(this.pos,"Numeric separator must be exactly one underscore")}if(c===0){this.raiseRecoverable(this.pos,"Numeric separator is not allowed at the first of digits")}l=h;continue}if(h>=97){d=h-97+10}else if(h>=65){d=h-65+10}else if(h>=48&&h<=57){d=h-48}else{d=Infinity}if(d>=e){break}l=h;o=o*e+d}if(s&&l===95){this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits")}if(this.pos===r||t!=null&&this.pos-r!==t){return null}return o};function stringToNumber(e,t){if(t){return parseInt(e,8)}return parseFloat(e.replace(/_/g,""))}function stringToBigInt(e){if(typeof BigInt!=="function"){return null}return BigInt(e.replace(/_/g,""))}nr.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var i=this.readInt(e);if(i==null){this.raise(this.start+2,"Expected number in radix "+e)}if(this.options.ecmaVersion>=11&&this.input.charCodeAt(this.pos)===110){i=stringToBigInt(this.input.slice(t,this.pos));++this.pos}else if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(Ls.num,i)};nr.readNumber=function(e){var t=this.pos;if(!e&&this.readInt(10,undefined,true)===null){this.raise(t,"Invalid number")}var i=this.pos-t>=2&&this.input.charCodeAt(t)===48;if(i&&this.strict){this.raise(t,"Invalid number")}var s=this.input.charCodeAt(this.pos);if(!i&&!e&&this.options.ecmaVersion>=11&&s===110){var n=stringToBigInt(this.input.slice(t,this.pos));++this.pos;if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}return this.finishToken(Ls.num,n)}if(i&&/[89]/.test(this.input.slice(t,this.pos))){i=false}if(s===46&&!i){++this.pos;this.readInt(10);s=this.input.charCodeAt(this.pos)}if((s===69||s===101)&&!i){s=this.input.charCodeAt(++this.pos);if(s===43||s===45){++this.pos}if(this.readInt(10)===null){this.raise(t,"Invalid number")}}if(isIdentifierStart(this.fullCharCodeAtPos())){this.raise(this.pos,"Identifier directly after number")}var r=stringToNumber(this.input.slice(t,this.pos),i);return this.finishToken(Ls.num,r)};nr.readCodePoint=function(){var e=this.input.charCodeAt(this.pos),t;if(e===123){if(this.options.ecmaVersion<6){this.unexpected()}var i=++this.pos;t=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos);++this.pos;if(t>1114111){this.invalidStringToken(i,"Code point out of bounds")}}else{t=this.readHexChar(4)}return t};nr.readString=function(e){var t="",i=++this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated string constant")}var s=this.input.charCodeAt(this.pos);if(s===e){break}if(s===92){t+=this.input.slice(i,this.pos);t+=this.readEscapedChar(false);i=this.pos}else if(s===8232||s===8233){if(this.options.ecmaVersion<10){this.raise(this.start,"Unterminated string constant")}++this.pos;if(this.options.locations){this.curLine++;this.lineStart=this.pos}}else{if(isNewLine(s)){this.raise(this.start,"Unterminated string constant")}++this.pos}}t+=this.input.slice(i,this.pos++);return this.finishToken(Ls.string,t)};var rr={};nr.tryReadTemplateToken=function(){this.inTemplateElement=true;try{this.readTmplToken()}catch(e){if(e===rr){this.readInvalidTemplateToken()}else{throw e}}this.inTemplateElement=false};nr.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9){throw rr}else{this.raise(e,t)}};nr.readTmplToken=function(){var e="",t=this.pos;for(;;){if(this.pos>=this.input.length){this.raise(this.start,"Unterminated template")}var i=this.input.charCodeAt(this.pos);if(i===96||i===36&&this.input.charCodeAt(this.pos+1)===123){if(this.pos===this.start&&(this.type===Ls.template||this.type===Ls.invalidTemplate)){if(i===36){this.pos+=2;return this.finishToken(Ls.dollarBraceL)}else{++this.pos;return this.finishToken(Ls.backQuote)}}e+=this.input.slice(t,this.pos);return this.finishToken(Ls.template,e)}if(i===92){e+=this.input.slice(t,this.pos);e+=this.readEscapedChar(true);t=this.pos}else if(isNewLine(i)){e+=this.input.slice(t,this.pos);++this.pos;switch(i){case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:e+="\n";break;default:e+=String.fromCharCode(i);break}if(this.options.locations){++this.curLine;this.lineStart=this.pos}t=this.pos}else{++this.pos}}};nr.readInvalidTemplateToken=function(){for(;this.pos<this.input.length;this.pos++){switch(this.input[this.pos]){case"\\":++this.pos;break;case"$":if(this.input[this.pos+1]!=="{"){break}case"`":return this.finishToken(Ls.invalidTemplate,this.input.slice(this.start,this.pos))}}this.raise(this.start,"Unterminated template")};nr.readEscapedChar=function(e){var t=this.input.charCodeAt(++this.pos);++this.pos;switch(t){case 110:return"\n";case 114:return"\r";case 120:return String.fromCharCode(this.readHexChar(2));case 117:return codePointToString(this.readCodePoint());case 116:return"\t";case 98:return"\b";case 118:return"\v";case 102:return"\f";case 13:if(this.input.charCodeAt(this.pos)===10){++this.pos}case 10:if(this.options.locations){this.lineStart=this.pos;++this.curLine}return"";case 56:case 57:if(this.strict){this.invalidStringToken(this.pos-1,"Invalid escape sequence")}if(e){var i=this.pos-1;this.invalidStringToken(i,"Invalid escape sequence in template string");return null}default:if(t>=48&&t<=55){var s=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0];var n=parseInt(s,8);if(n>255){s=s.slice(0,-1);n=parseInt(s,8)}this.pos+=s.length-1;t=this.input.charCodeAt(this.pos);if((s!=="0"||t===56||t===57)&&(this.strict||e)){this.invalidStringToken(this.pos-1-s.length,e?"Octal literal in template string":"Octal literal in strict mode")}return String.fromCharCode(n)}if(isNewLine(t)){return""}return String.fromCharCode(t)}};nr.readHexChar=function(e){var t=this.pos;var i=this.readInt(16,e);if(i===null){this.invalidStringToken(t,"Bad character escape sequence")}return i};nr.readWord1=function(){this.containsEsc=false;var e="",t=true,i=this.pos;var s=this.options.ecmaVersion>=6;while(this.pos<this.input.length){var n=this.fullCharCodeAtPos();if(isIdentifierChar(n,s)){this.pos+=n<=65535?1:2}else if(n===92){this.containsEsc=true;e+=this.input.slice(i,this.pos);var r=this.pos;if(this.input.charCodeAt(++this.pos)!==117){this.invalidStringToken(this.pos,"Expecting Unicode escape sequence \\uXXXX")}++this.pos;var o=this.readCodePoint();if(!(t?isIdentifierStart:isIdentifierChar)(o,s)){this.invalidStringToken(r,"Invalid Unicode escape")}e+=codePointToString(o);i=this.pos}else{break}t=false}return e+this.input.slice(i,this.pos)};nr.readWord=function(){var e=this.readWord1();var t=Ls.name;if(this.keywords.test(e)){t=Ms[e]}return this.finishToken(t,e)};var ar="8.7.1";mn.acorn={Parser:mn,version:ar,defaultOptions:Xs,Position:Ks,SourceLocation:Ys,getLineInfo:getLineInfo,Node:Mn,TokenType:$s,tokTypes:Ls,keywordTypes:Ms,TokContext:_n,tokContexts:Pn,isIdentifierChar:isIdentifierChar,isIdentifierStart:isIdentifierStart,Token:sr,isNewLine:isNewLine,lineBreak:Fs,lineBreakG:Vs,nonASCIIwhitespace:Bs};function resolveIdViaPlugins(e,t,i,s,n,r,o){let l=null;let c=null;if(n){l=new Set;for(const i of n){if(e===i.source&&t===i.importer){l.add(i.plugin)}}c=(e,t)=>({...e,resolve:(e,i,{custom:r,isEntry:o,skipSelf:l}=X)=>s(e,i,r,o,l?[...n,{importer:i,plugin:t,source:e}]:n)})}return i.hookFirst("resolveId",[e,t,{custom:r,isEntry:o}],c,l)}async function resolveId(e,t,i,n,r,o,l,c){const u=await resolveIdViaPlugins(e,t,n,r,o,l,c);if(u!=null)return u;if(t!==undefined&&!isAbsolute(e)&&e[0]!==".")return null;return addJsExtensionIfNecessary(t?s.resolve(s.dirname(t),e):s.resolve(e),i)}async function addJsExtensionIfNecessary(e,t){var i,s;return(s=(i=await findFile(e,t))!==null&&i!==void 0?i:await findFile(e+".mjs",t))!==null&&s!==void 0?s:await findFile(e+".js",t)}async function findFile(e,t){try{const i=await l.promises.lstat(e);if(!t&&i.isSymbolicLink())return await findFile(await l.promises.realpath(e),t);if(t&&i.isSymbolicLink()||i.isFile()){const t=s.basename(e);const i=await l.promises.readdir(s.dirname(e));if(i.includes(t))return e}}catch(e){}}const or="at position ";const lr="at output position ";function throwPluginError(e,t,{hook:i,id:s}={}){if(typeof e==="string")e={message:e};if(e.code&&e.code!==g.PLUGIN_ERROR){e.pluginCode=e.code}e.code=g.PLUGIN_ERROR;e.plugin=t;if(i){e.hook=i}if(s){e.id=s}return error(e)}const cr=[{active:true,deprecated:"resolveAssetUrl",replacement:"resolveFileUrl"}];function warnDeprecatedHooks(e,t){for(const{active:i,deprecated:s,replacement:n}of cr){for(const r of e){if(s in r){warnDeprecation({message:`The "${s}" hook used by plugin ${r.name} is deprecated. The "${n}" hook should be used instead.`,plugin:r.name},i,t)}}}}function createPluginCache(e){return{delete(t){return delete e[t]},get(t){const i=e[t];if(!i)return undefined;i[0]=0;return i[1]},has(t){const i=e[t];if(!i)return false;i[0]=0;return true},set(t,i){e[t]=[0,i]}}}function getTrackedPluginCache(e,t){return{delete(i){t();return e.delete(i)},get(i){t();return e.get(i)},has(i){t();return e.has(i)},set(i,s){t();return e.set(i,s)}}}const ur={delete(){return false},get(){return undefined},has(){return false},set(){}};function uncacheablePluginError(e){if(e.startsWith(or)||e.startsWith(lr)){return error({code:"ANONYMOUS_PLUGIN_CACHE",message:"A plugin is trying to use the Rollup cache but is not declaring a plugin name or cacheKey."})}return error({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).`})}function getCacheForUncacheablePlugin(e){return{delete(){return uncacheablePluginError(e)},get(){return uncacheablePluginError(e)},has(){return uncacheablePluginError(e)},set(){return uncacheablePluginError(e)}}}async function transform(e,t,i,s){const n=t.id;const r=[];let o=e.map===null?null:decodedSourcemap(e.map);const l=e.code;let c=e.ast;const u=[];const h=[];let d=false;const useCustomTransformCache=()=>d=true;let p="";const f=e.code;function transformReducer(e,i,n){let o;let l;if(typeof i==="string"){o=i}else if(i&&typeof i==="object"){t.updateOptions(i);if(i.code==null){if(i.map||i.ast){s(errNoTransformMapOrAstWithoutCode(n.name))}return e}({code:o,map:l,ast:c}=i)}else{return e}if(l!==null){r.push(decodedSourcemap(typeof l==="string"?JSON.parse(l):l)||{missing:true,plugin:n.name})}return o}let m;try{m=await i.hookReduceArg0("transform",[f,n],transformReducer,((e,t)=>{p=t.name;return{...e,addWatchFile(t){u.push(t);e.addWatchFile(t)},cache:d?e.cache:getTrackedPluginCache(e.cache,useCustomTransformCache),emitAsset(t,i){h.push({name:t,source:i,type:"asset"});return e.emitAsset(t,i)},emitChunk(t,i){h.push({id:t,name:i&&i.name,type:"chunk"});return e.emitChunk(t,i)},emitFile(e){h.push(e);return i.emitFile(e)},error(t,i){if(typeof t==="string")t={message:t};if(i)augmentCodeLocation(t,i,f,n);t.id=n;t.hook="transform";return e.error(t)},getCombinedSourcemap(){const e=collapseSourcemap(n,l,o,r,s);if(!e){const e=new MagicString(l);return e.generateMap({hires:true,includeContent:true,source:n})}if(o!==e){o=e;r.length=0}return new SourceMap({...e,file:null,sourcesContent:e.sourcesContent})},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(t,i){if(typeof t==="string")t={message:t};if(i)augmentCodeLocation(t,i,f,n);t.id=n;t.hook="transform";e.warn(t)}}}))}catch(e){throwPluginError(e,p,{hook:"transform",id:n})}if(!d){if(h.length)t.transformFiles=h}return{ast:c,code:m,customTransformCache:d,originalCode:l,originalSourcemap:o,sourcemapChain:r,transformDependencies:u}}const hr="resolveDependencies";class ModuleLoader{constructor(e,t,i,s){this.graph=e;this.modulesById=t;this.options=i;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,i,s,n=null)=>this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(this.options.external(e,t,false)?false:await resolveId(e,t,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,n,i,typeof s==="boolean"?s:!t),t,e));this.hasModuleSideEffects=i.treeshake?i.treeshake.moduleSideEffects:()=>true}async addAdditionalModules(e){const t=this.extendLoadModulesPromise(Promise.all(e.map((e=>this.loadEntryModule(e,false,undefined,null)))));await this.awaitLoadModulesPromise();return t}async addEntryModules(e,t){const i=this.nextEntryModuleIndex;this.nextEntryModuleIndex+=e.length;const s=this.nextChunkNamePriority;this.nextChunkNamePriority+=e.length;const n=await this.extendLoadModulesPromise(Promise.all(e.map((({id:e,importer:t})=>this.loadEntryModule(e,true,t,null)))).then((n=>{for(let r=0;r<n.length;r++){const o=n[r];o.isUserDefinedEntryPoint=o.isUserDefinedEntryPoint||t;addChunkNamesToModule(o,e[r],t,s+r);const l=this.indexedEntryModules.find((e=>e.module===o));if(!l){this.indexedEntryModules.push({index:i+r,module:o})}else{l.index=Math.min(l.index,i+r)}}this.indexedEntryModules.sort((({index:e},{index:t})=>e>t?1:-1));return n})));await this.awaitLoadModulesPromise();return{entryModules:this.indexedEntryModules.map((({module:e})=>e)),implicitEntryModules:[...this.implicitEntryModules],newEntryModules:n}}async emitChunk({fileName:e,id:t,importer:i,name:s,implicitlyLoadedAfterOneOf:n,preserveSignature:r}){const o={fileName:e||null,id:t,importer:i,name:s||null};const l=n?await this.addEntryWithImplicitDependants(o,n):(await this.addEntryModules([o],false)).newEntryModules[0];if(r!=null){l.preserveSignature=r}return l}async preloadModule(e){const t=await this.fetchModule(this.getResolvedIdWithDefaults(e),undefined,false,e.resolveDependencies?hr:true);return t.info}addEntryWithImplicitDependants(e,t){const i=this.nextChunkNamePriority++;return this.extendLoadModulesPromise(this.loadEntryModule(e.id,false,e.importer,null).then((async s=>{addChunkNamesToModule(s,e,false,i);if(!s.info.isEntry){this.implicitEntryModules.add(s);const i=await Promise.all(t.map((t=>this.loadEntryModule(t,false,e.importer,s.id))));for(const e of i){s.implicitlyLoadedAfter.add(e)}for(const e of s.implicitlyLoadedAfter){e.implicitlyLoadedBefore.add(s)}}return s})))}async addModuleSource(e,t,i){cs("load modules",3);let s;try{s=await this.graph.fileOperationQueue.run((async()=>{var t;return(t=await this.pluginDriver.hookFirst("load",[e]))!==null&&t!==void 0?t:await l.promises.readFile(e,"utf8")}))}catch(i){us("load modules",3);let s=`Could not load ${e}`;if(t)s+=` (imported by ${relativeId(t)})`;s+=`: ${i.message}`;i.message=s;throw i}us("load modules",3);const n=typeof s==="string"?{code:s}:s!=null&&typeof s==="object"&&typeof s.code==="string"?s:error(errBadLoader(e));const r=this.graph.cachedModules.get(e);if(r&&!r.customTransformCache&&r.originalCode===n.code&&!await this.pluginDriver.hookFirst("shouldTransformCachedModule",[{ast:r.ast,code:r.code,id:r.id,meta:r.meta,moduleSideEffects:r.moduleSideEffects,resolvedSources:r.resolvedIds,syntheticNamedExports:r.syntheticNamedExports}])){if(r.transformFiles){for(const e of r.transformFiles)this.pluginDriver.emitFile(e)}i.setSource(r)}else{i.updateOptions(n);i.setSource(await transform(n,i,this.pluginDriver,this.options.onwarn))}}async awaitLoadModulesPromise(){let e;do{e=this.latestLoadModulesPromise;await e}while(e!==this.latestLoadModulesPromise)}extendLoadModulesPromise(e){this.latestLoadModulesPromise=Promise.all([e,this.latestLoadModulesPromise]);this.latestLoadModulesPromise.catch((()=>{}));return e}async fetchDynamicDependencies(e,t){const i=await Promise.all(t.map((t=>t.then((async([t,i])=>{if(i===null)return null;if(typeof i==="string"){t.resolution=i;return null}return t.resolution=await this.fetchResolvedDependency(relativeId(i.id),e.id,i)})))));for(const t of i){if(t){e.dynamicDependencies.add(t);t.dynamicImporters.push(e.id)}}}async fetchModule({id:e,meta:t,moduleSideEffects:i,syntheticNamedExports:s},n,r,o){const l=this.modulesById.get(e);if(l instanceof Module){await this.handleExistingModule(l,r,o);return l}const c=new Module(this.graph,e,this.options,r,i,s,t);this.modulesById.set(e,c);this.graph.watchFiles[e]=true;const u=this.addModuleSource(e,n,c).then((()=>[this.getResolveStaticDependencyPromises(c),this.getResolveDynamicImportPromises(c),h]));const h=waitForDependencyResolution(u).then((()=>this.pluginDriver.hookParallel("moduleParsed",[c.info])));h.catch((()=>{}));this.moduleLoadPromises.set(c,u);const d=await u;if(!o){await this.fetchModuleDependencies(c,...d)}else if(o===hr){await h}return c}async fetchModuleDependencies(e,t,i,s){if(this.modulesWithLoadedDependencies.has(e)){return}this.modulesWithLoadedDependencies.add(e);await Promise.all([this.fetchStaticDependencies(e,t),this.fetchDynamicDependencies(e,i)]);e.linkImports();await s}fetchResolvedDependency(e,t,i){if(i.external){const{external:s,id:n,moduleSideEffects:r,meta:o}=i;if(!this.modulesById.has(n)){this.modulesById.set(n,new ExternalModule(this.options,n,r,o,s!=="absolute"&&isAbsolute(n)))}const l=this.modulesById.get(n);if(!(l instanceof ExternalModule)){return error(errInternalIdCannotBeExternal(e,t))}return Promise.resolve(l)}return this.fetchModule(i,t,false,false)}async fetchStaticDependencies(e,t){for(const i of await Promise.all(t.map((t=>t.then((([t,i])=>this.fetchResolvedDependency(t,e.id,i))))))){e.dependencies.add(i);i.importers.push(e.id)}if(!this.options.treeshake||e.info.moduleSideEffects==="no-treeshake"){for(const t of e.dependencies){if(t instanceof Module){t.importedFromNotTreeshaken=true}}}}getNormalizedResolvedIdWithoutDefaults(e,t,i){const{makeAbsoluteExternalsRelative:s}=this.options;if(e){if(typeof e==="object"){const n=e.external||this.options.external(e.id,t,true);return{...e,external:n&&(n==="relative"||!isAbsolute(e.id)||n===true&&isNotAbsoluteExternal(e.id,i,s)||"absolute")}}const n=this.options.external(e,t,true);return{external:n&&(isNotAbsoluteExternal(e,i,s)||"absolute"),id:n&&s?normalizeRelativeExternalId(e,t):e}}const n=s?normalizeRelativeExternalId(i,t):i;if(e!==false&&!this.options.external(n,t,true)){return null}return{external:isNotAbsoluteExternal(n,i,s)||"absolute",id:n}}getResolveDynamicImportPromises(e){return e.dynamicImports.map((async t=>{const i=await this.resolveDynamicImport(e,typeof t.argument==="string"?t.argument:t.argument.esTreeNode,e.id);if(i&&typeof i==="object"){t.id=i.id}return[t,i]}))}getResolveStaticDependencyPromises(e){return Array.from(e.sources,(async t=>[t,e.resolvedIds[t]=e.resolvedIds[t]||this.handleResolveId(await this.resolveId(t,e.id,Q,false),t,e.id)]))}getResolvedIdWithDefaults(e){var t,i;if(!e){return null}const s=e.external||false;return{external:s,id:e.id,meta:e.meta||{},moduleSideEffects:(t=e.moduleSideEffects)!==null&&t!==void 0?t:this.hasModuleSideEffects(e.id,!!s),syntheticNamedExports:(i=e.syntheticNamedExports)!==null&&i!==void 0?i:false}}async handleExistingModule(e,t,i){const s=this.moduleLoadPromises.get(e);if(i){return i===hr?waitForDependencyResolution(s):s}if(t){e.info.isEntry=true;this.implicitEntryModules.delete(e);for(const t of e.implicitlyLoadedAfter){t.implicitlyLoadedBefore.delete(e)}e.implicitlyLoadedAfter.clear()}return this.fetchModuleDependencies(e,...await s)}handleResolveId(e,t,i){if(e===null){if(isRelative(t)){return error(errUnresolvedImport(t,i))}this.options.onwarn(errUnresolvedImportTreatedAsExternal(t,i));return{external:true,id:t,meta:{},moduleSideEffects:this.hasModuleSideEffects(t,true),syntheticNamedExports:false}}else if(e.external&&e.syntheticNamedExports){this.options.onwarn(errExternalSyntheticExports(t,i))}return e}async loadEntryModule(e,t,i,s){const n=await resolveId(e,i,this.options.preserveSymlinks,this.pluginDriver,this.resolveId,null,Q,true);if(n==null){return error(s===null?errUnresolvedEntry(e):errUnresolvedImplicitDependant(e,s))}if(n===false||typeof n==="object"&&n.external){return error(s===null?errEntryCannotBeExternal(e):errImplicitDependantCannotBeExternal(e,s))}return this.fetchModule(this.getResolvedIdWithDefaults(typeof n==="object"?n:{id:n}),undefined,t,false)}async resolveDynamicImport(e,t,i){var s;var n;const r=await this.pluginDriver.hookFirst("resolveDynamicImport",[t,i]);if(typeof t!=="string"){if(typeof r==="string"){return r}if(!r){return null}return{external:false,moduleSideEffects:true,...r}}if(r==null){return(s=(n=e.resolvedIds)[t])!==null&&s!==void 0?s:n[t]=this.handleResolveId(await this.resolveId(t,e.id,Q,false),t,e.id)}return this.handleResolveId(this.getResolvedIdWithDefaults(this.getNormalizedResolvedIdWithoutDefaults(r,i,t)),t,i)}}function normalizeRelativeExternalId(e,t){return isRelative(e)?t?s.resolve(t,"..",e):s.resolve(e):e}function addChunkNamesToModule(e,{fileName:t,name:i},s,n){var r;if(t!==null){e.chunkFileNames.add(t)}else if(i!==null){let t=0;while(((r=e.chunkNames[t])===null||r===void 0?void 0:r.priority)<n)t++;e.chunkNames.splice(t,0,{isUserDefined:s,name:i,priority:n})}}function isNotAbsoluteExternal(e,t,i){return i===true||i==="ifRelativeSource"&&isRelative(t)||!isAbsolute(e)}async function waitForDependencyResolution(e){const[t,i]=await e;return Promise.all([...t,...i])}class GlobalScope extends Scope$1{constructor(){super();this.parent=null;this.variables.set("undefined",new UndefinedVariable)}findVariable(e){let t=this.variables.get(e);if(!t){t=new GlobalVariable(e);this.variables.set(e,t)}return t}}function getDeprecatedContextHandler(e,t,i,s,n,r){let o=false;return(...l)=>{if(!o){o=true;warnDeprecation({message:`The "this.${t}" plugin context function used by plugin ${s} is deprecated. The "this.${i}" plugin context function should be used instead.`,plugin:s},n,r)}return e(...l)}}function getPluginContext(e,t,i,s,n,r){let o=true;if(typeof e.cacheKey!=="string"){if(e.name.startsWith(or)||e.name.startsWith(lr)||r.has(e.name)){o=false}else{r.add(e.name)}}let l;if(!t){l=ur}else if(o){const i=e.cacheKey||e.name;l=createPluginCache(t[i]||(t[i]=Object.create(null)))}else{l=getCacheForUncacheablePlugin(e.name)}return{addWatchFile(e){if(i.phase>=os.GENERATE){return this.error(errInvalidRollupPhaseForAddWatchFile())}i.watchFiles[e]=true},cache:l,emitAsset:getDeprecatedContextHandler(((e,t)=>n.emitFile({name:e,source:t,type:"asset"})),"emitAsset","emitFile",e.name,true,s),emitChunk:getDeprecatedContextHandler(((e,t)=>n.emitFile({id:e,name:t&&t.name,type:"chunk"})),"emitChunk","emitFile",e.name,true,s),emitFile:n.emitFile.bind(n),error(t){return throwPluginError(t,e.name)},getAssetFileName:getDeprecatedContextHandler(n.getFileName,"getAssetFileName","getFileName",e.name,true,s),getChunkFileName:getDeprecatedContextHandler(n.getFileName,"getChunkFileName","getFileName",e.name,true,s),getFileName:n.getFileName,getModuleIds:()=>i.modulesById.keys(),getModuleInfo:i.getModuleInfo,getWatchFiles:()=>Object.keys(i.watchFiles),isExternal:getDeprecatedContextHandler(((e,t,i=false)=>s.external(e,t,i)),"isExternal","resolve",e.name,true,s),load(e){return i.moduleLoader.preloadModule(e)},meta:{rollupVersion:u,watchMode:i.watchMode},get moduleIds(){function*wrappedModuleIds(){warnDeprecation({message:`Accessing "this.moduleIds" on the plugin context by plugin ${e.name} is deprecated. The "this.getModuleIds" plugin context function should be used instead.`,plugin:e.name},false,s);yield*t}const t=i.modulesById.keys();return wrappedModuleIds()},parse:i.contextParse.bind(i),resolve(t,s,{custom:n,isEntry:r,skipSelf:o}=X){return i.moduleLoader.resolveId(t,s,n,r,o?[{importer:s,plugin:e,source:t}]:null)},resolveId:getDeprecatedContextHandler(((e,t)=>i.moduleLoader.resolveId(e,t,X,undefined).then((e=>e&&e.id))),"resolveId","resolve",e.name,true,s),setAssetSource:n.setAssetSource,warn(t){if(typeof t==="string")t={message:t};if(t.code)t.pluginCode=t.code;t.code="PLUGIN_WARNING";t.plugin=e.name;s.onwarn(t)}}}const dr={buildEnd:1,buildStart:1,closeBundle:1,closeWatcher:1,load:1,moduleParsed:1,options:1,resolveDynamicImport:1,resolveId:1,shouldTransformCachedModule:1,transform:1,watchChange:1};const pr=Object.keys(dr);class PluginDriver{constructor(e,t,i,s,n){this.graph=e;this.options=t;this.pluginCache=s;this.sortedPlugins=new Map;this.unfulfilledActions=new Set;warnDeprecatedHooks(i,t);this.fileEmitter=new FileEmitter(e,t,n&&n.fileEmitter);this.emitFile=this.fileEmitter.emitFile.bind(this.fileEmitter);this.getFileName=this.fileEmitter.getFileName.bind(this.fileEmitter);this.finaliseAssets=this.fileEmitter.assertAssetsFinalized.bind(this.fileEmitter);this.setOutputBundle=this.fileEmitter.setOutputBundle.bind(this.fileEmitter);this.plugins=i.concat(n?n.plugins:[]);const r=new Set;this.pluginContexts=new Map(this.plugins.map((i=>[i,getPluginContext(i,s,e,t,this.fileEmitter,r)])));if(n){for(const e of i){for(const i of pr){if(i in e){t.onwarn(errInputHookInOutputPlugin(e.name,i))}}}}}createOutputPluginDriver(e){return new PluginDriver(this.graph,this.options,e,this.pluginCache,this)}getUnfulfilledHookActions(){return this.unfulfilledActions}hookFirst(e,t,i,s){let n=Promise.resolve(null);for(const r of this.getSortedPlugins(e)){if(s&&s.has(r))continue;n=n.then((s=>{if(s!=null)return s;return this.runHook(e,t,r,i)}))}return n}hookFirstSync(e,t,i){for(const s of this.getSortedPlugins(e)){const n=this.runHookSync(e,t,s,i);if(n!=null)return n}return null}async hookParallel(e,t,i){const s=[];for(const n of this.getSortedPlugins(e)){if(n[e].sequential){await Promise.all(s);s.length=0;await this.runHook(e,t,n,i)}else{s.push(this.runHook(e,t,n,i))}}await Promise.all(s)}hookReduceArg0(e,[t,...i],s,n){let r=Promise.resolve(t);for(const t of this.getSortedPlugins(e)){r=r.then((r=>this.runHook(e,[r,...i],t,n).then((e=>s.call(this.pluginContexts.get(t),r,e,t)))))}return r}hookReduceArg0Sync(e,[t,...i],s,n){for(const r of this.getSortedPlugins(e)){const o=[t,...i];const l=this.runHookSync(e,o,r,n);t=s.call(this.pluginContexts.get(r),t,l,r)}return t}async hookReduceValue(e,t,i,s){const n=[];const r=[];for(const t of this.getSortedPlugins(e,validateAddonPluginHandler)){if(t[e].sequential){n.push(...await Promise.all(r));r.length=0;n.push(await this.runHook(e,i,t))}else{r.push(this.runHook(e,i,t))}}n.push(...await Promise.all(r));return n.reduce(s,await t)}hookReduceValueSync(e,t,i,s,n){let r=t;for(const t of this.getSortedPlugins(e)){const o=this.runHookSync(e,i,t,n);r=s.call(this.pluginContexts.get(t),r,o,t)}return r}hookSeq(e,t,i){let s=Promise.resolve();for(const n of this.getSortedPlugins(e)){s=s.then((()=>this.runHook(e,t,n,i)))}return s.then(noReturn)}getSortedPlugins(e,t){return getOrCreate(this.sortedPlugins,e,(()=>getSortedValidatedPlugins(e,this.plugins,t)))}runHook(e,t,i,s){const n=i[e];const r=typeof n==="object"?n.handler:n;let o=this.pluginContexts.get(i);if(s){o=s(o,i)}let l=null;return Promise.resolve().then((()=>{if(typeof r!=="function"){return r}const s=r.apply(o,t);if(!(s===null||s===void 0?void 0:s.then)){return s}l=[i.name,e,t];this.unfulfilledActions.add(l);return Promise.resolve(s).then((e=>{this.unfulfilledActions.delete(l);return e}))})).catch((t=>{if(l!==null){this.unfulfilledActions.delete(l)}return throwPluginError(t,i.name,{hook:e})}))}runHookSync(e,t,i,s){const n=i[e];const r=typeof n==="object"?n.handler:n;let o=this.pluginContexts.get(i);if(s){o=s(o,i)}try{return r.apply(o,t)}catch(t){return throwPluginError(t,i.name,{hook:e})}}}function getSortedValidatedPlugins(e,t,i=validateFunctionPluginHandler){const s=[];const n=[];const r=[];for(const o of t){const t=o[e];if(t){if(typeof t==="object"){i(t.handler,e,o);if(t.order==="pre"){s.push(o);continue}if(t.order==="post"){r.push(o);continue}}else{i(t,e,o)}n.push(o)}}return[...s,...n,...r]}function validateFunctionPluginHandler(e,t,i){if(typeof e!=="function"){error(errInvalidFunctionPluginHook(t,i.name))}}function validateAddonPluginHandler(e,t,i){if(typeof e!=="string"&&typeof e!=="function"){return error(errInvalidAddonPluginHook(t,i.name))}}function noReturn(){}class Queue{constructor(e){this.maxParallel=e;this.queue=[];this.workerCount=0}run(e){return new Promise(((t,i)=>{this.queue.push({reject:i,resolve:t,task:e});this.work()}))}async work(){if(this.workerCount>=this.maxParallel)return;this.workerCount++;let e;while(e=this.queue.shift()){const{reject:t,resolve:i,task:s}=e;try{const e=await s();i(e)}catch(e){t(e)}}this.workerCount--}}function normalizeEntryModules(e){if(Array.isArray(e)){return e.map((e=>({fileName:null,id:e,implicitlyLoadedAfter:[],importer:undefined,name:null})))}return Object.entries(e).map((([e,t])=>({fileName:null,id:t,implicitlyLoadedAfter:[],importer:undefined,name:e})))}class Graph{constructor(e,t){var i,s;this.options=e;this.cachedModules=new Map;this.deoptimizationTracker=new PathTracker;this.entryModules=[];this.modulesById=new Map;this.needsTreeshakingPass=false;this.phase=os.LOAD_AND_PARSE;this.scope=new GlobalScope;this.watchFiles=Object.create(null);this.watchMode=false;this.externalModules=[];this.implicitEntryModules=[];this.modules=[];this.getModuleInfo=e=>{const t=this.modulesById.get(e);if(!t)return null;return t.info};if(e.cache!==false){if((i=e.cache)===null||i===void 0?void 0:i.modules){for(const t of e.cache.modules)this.cachedModules.set(t.id,t)}this.pluginCache=((s=e.cache)===null||s===void 0?void 0:s.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=true;const handleChange=(...e)=>this.pluginDriver.hookParallel("watchChange",e);const handleClose=()=>this.pluginDriver.hookParallel("closeWatcher",[]);t.onCurrentAwaited("change",handleChange);t.onCurrentAwaited("close",handleClose)}this.pluginDriver=new PluginDriver(this,e,e.plugins,this.pluginCache);this.acornParser=mn.extend(...e.acornInjectPlugins);this.moduleLoader=new ModuleLoader(this,this.modulesById,this.options,this.pluginDriver);this.fileOperationQueue=new Queue(e.maxParallelFileOps)}async build(){cs("generate module graph",2);await this.generateModuleGraph();us("generate module graph",2);cs("sort modules",2);this.phase=os.ANALYSE;this.sortModules();us("sort modules",2);cs("mark included statements",2);this.includeStatements();us("mark included statements",2);this.phase=os.GENERATE}contextParse(e,t={}){const i=t.onComment;const s=[];if(i&&typeof i=="function"){t.onComment=(e,n,r,o,...l)=>{s.push({end:o,start:r,type:e?"Block":"Line",value:n});return i.call(t,e,n,r,o,...l)}}else{t.onComment=s}const n=this.acornParser.parse(e,{...this.options.acorn,...t});if(typeof i=="object"){i.push(...s)}t.onComment=i;addAnnotations(s,n,e);return n}getCache(){for(const e in this.pluginCache){const t=this.pluginCache[e];let i=true;for(const[e,s]of Object.entries(t)){if(s[0]>=this.options.experimentalCacheExpiry)delete t[e];else i=false}if(i)delete this.pluginCache[e]}return{modules:this.modules.map((e=>e.toJSON())),plugins:this.pluginCache}}async generateModuleGraph(){({entryModules:this.entryModules,implicitEntryModules:this.implicitEntryModules}=await this.moduleLoader.addEntryModules(normalizeEntryModules(this.options.input),true));if(this.entryModules.length===0){throw new Error("You must supply options.input to rollup")}for(const e of this.modulesById.values()){if(e instanceof Module){this.modules.push(e)}else{this.externalModules.push(e)}}}includeStatements(){for(const e of[...this.entryModules,...this.implicitEntryModules]){markModuleAndImpureDependenciesAsExecuted(e)}if(this.options.treeshake){let e=1;do{cs(`treeshaking pass ${e}`,3);this.needsTreeshakingPass=false;for(const e of this.modules){if(e.isExecuted){if(e.info.moduleSideEffects==="no-treeshake"){e.includeAllInBundle()}else{e.include()}}}if(e===1){for(const e of[...this.entryModules,...this.implicitEntryModules]){if(e.preserveSignature!==false){e.includeAllExports(false);this.needsTreeshakingPass=true}}}us(`treeshaking pass ${e++}`,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){if(!(t.info.isEntry||t.isIncluded())){error(errImplicitDependantIsNotIncluded(t))}}}}sortModules(){const{orderedModules:e,cyclePaths:t}=analyseModuleExecution(this.entryModules);for(const e of t){this.options.onwarn({code:"CIRCULAR_DEPENDENCY",cycle:e,importer:e[0],message:`Circular dependency: ${e.join(" -> ")}`})}this.modules=e;for(const e of this.modules){e.bindReferences()}this.warnForMissingExports()}warnForMissingExports(){for(const e of this.modules){for(const t of e.importDescriptions.values()){if(t.name!=="*"&&!t.module.getVariableForExportName(t.name)[0]){e.warn({code:"NON_EXISTENT_EXPORT",message:`Non-existent export '${t.name}' is imported from ${relativeId(t.module.id)}`,name:t.name,source:t.module.id},t.start)}}}}}function formatAction([e,t,i]){const s=`(${e}) ${t}`;const n=JSON.stringify;switch(t){case"resolveId":return`${s} ${n(i[0])} ${n(i[1])}`;case"load":return`${s} ${n(i[0])}`;case"transform":return`${s} ${n(i[1])}`;case"shouldTransformCachedModule":return`${s} ${n(i[0].id)}`;case"moduleParsed":return`${s} ${n(i[0].id)}`}return s}const fr="beforeExit";const mr=new c.EventEmitter;mr.setMaxListeners(0);n.on(fr,(()=>mr.emit(fr)));async function catchUnfinishedHookActions(e,t){let i;const s=new Promise(((t,s)=>{i=()=>{const t=e.getUnfulfilledHookActions();s(new Error(`Unexpected early exit. This happens when Promises returned by plugins cannot resolve. Unfinished hook action(s) on exit:\n`+[...t].map(formatAction).join("\n")))};mr.once(fr,i)}));const n=await Promise.race([t(),s]);mr.off(fr,i);return n}function normalizeInputOptions(e){var t,i,s;const n=new Set;const r=(t=e.context)!==null&&t!==void 0?t:"undefined";const o=getOnwarn(e);const l=e.strictDeprecations||false;const c=getmaxParallelFileOps(e,o,l);const u={acorn:getAcorn(e),acornInjectPlugins:getAcornInjectPlugins(e),cache:getCache(e),context:r,experimentalCacheExpiry:(i=e.experimentalCacheExpiry)!==null&&i!==void 0?i:10,external:getIdMatcher(e.external),inlineDynamicImports:getInlineDynamicImports$1(e,o,l),input:getInput(e),makeAbsoluteExternalsRelative:(s=e.makeAbsoluteExternalsRelative)!==null&&s!==void 0?s:true,manualChunks:getManualChunks$1(e,o,l),maxParallelFileOps:c,maxParallelFileReads:c,moduleContext:getModuleContext(e,r),onwarn:o,perf:e.perf||false,plugins:ensureArray$1(e.plugins),preserveEntrySignatures:getPreserveEntrySignatures(e,n),preserveModules:getPreserveModules$1(e,o,l),preserveSymlinks:e.preserveSymlinks||false,shimMissingExports:e.shimMissingExports||false,strictDeprecations:l,treeshake:getTreeshake(e,o,l)};warnUnknownOptions(e,[...Object.keys(u),"watch"],"input options",u.onwarn,/^(output)$/);return{options:u,unsetOptions:n}}const getOnwarn=e=>{const{onwarn:t}=e;return t?e=>{e.toString=()=>{let t="";if(e.plugin)t+=`(${e.plugin} plugin) `;if(e.loc)t+=`${relativeId(e.loc.file)} (${e.loc.line}:${e.loc.column}) `;t+=e.message;return t};t(e,defaultOnWarn)}:defaultOnWarn};const getAcorn=e=>({allowAwaitOutsideFunction:true,ecmaVersion:"latest",preserveParens:false,sourceType:"module",...e.acorn});const getAcornInjectPlugins=e=>ensureArray$1(e.acornInjectPlugins);const getCache=e=>{var t;return((t=e.cache)===null||t===void 0?void 0:t.cache)||e.cache};const getIdMatcher=e=>{if(e===true){return()=>true}if(typeof e==="function"){return(t,...i)=>!t.startsWith("\0")&&e(t,...i)||false}if(e){const t=new Set;const i=[];for(const s of ensureArray$1(e)){if(s instanceof RegExp){i.push(s)}else{t.add(s)}}return(e,...s)=>t.has(e)||i.some((t=>t.test(e)))}return()=>false};const getInlineDynamicImports$1=(e,t,i)=>{const s=e.inlineDynamicImports;if(s){warnDeprecationWithOptions('The "inlineDynamicImports" option is deprecated. Use the "output.inlineDynamicImports" option instead.',false,t,i)}return s};const getInput=e=>{const t=e.input;return t==null?[]:typeof t==="string"?[t]:t};const getManualChunks$1=(e,t,i)=>{const s=e.manualChunks;if(s){warnDeprecationWithOptions('The "manualChunks" option is deprecated. Use the "output.manualChunks" option instead.',false,t,i)}return s};const getmaxParallelFileOps=(e,t,i)=>{var s;const n=e.maxParallelFileReads;if(typeof n==="number"){warnDeprecationWithOptions('The "maxParallelFileReads" option is deprecated. Use the "maxParallelFileOps" option instead.',false,t,i)}const r=(s=e.maxParallelFileOps)!==null&&s!==void 0?s:n;if(typeof r==="number"){if(r<=0)return Infinity;return r}return 20};const getModuleContext=(e,t)=>{const i=e.moduleContext;if(typeof i==="function"){return e=>{var s;return(s=i(e))!==null&&s!==void 0?s:t}}if(i){const e=Object.create(null);for(const[t,n]of Object.entries(i)){e[s.resolve(t)]=n}return i=>e[i]||t}return()=>t};const getPreserveEntrySignatures=(e,t)=>{const i=e.preserveEntrySignatures;if(i==null){t.add("preserveEntrySignatures")}return i!==null&&i!==void 0?i:"strict"};const getPreserveModules$1=(e,t,i)=>{const s=e.preserveModules;if(s){warnDeprecationWithOptions('The "preserveModules" option is deprecated. Use the "output.preserveModules" option instead.',false,t,i)}return s};const getTreeshake=(e,t,i)=>{const s=e.treeshake;if(s===false){return false}const n=getOptionWithPreset(e.treeshake,y,"treeshake","false, true, ");if(typeof n.pureExternalModules!=="undefined"){warnDeprecationWithOptions(`The "treeshake.pureExternalModules" option is deprecated. The "treeshake.moduleSideEffects" option should be used instead. "treeshake.pureExternalModules: true" is equivalent to "treeshake.moduleSideEffects: 'no-external'"`,true,t,i)}return{annotations:n.annotations!==false,correctVarValueBeforeDeclaration:n.correctVarValueBeforeDeclaration===true,moduleSideEffects:typeof s==="object"&&s.pureExternalModules?getHasModuleSideEffects(s.moduleSideEffects,s.pureExternalModules):getHasModuleSideEffects(n.moduleSideEffects,undefined),propertyReadSideEffects:n.propertyReadSideEffects==="always"?"always":n.propertyReadSideEffects!==false,tryCatchDeoptimization:n.tryCatchDeoptimization!==false,unknownGlobalSideEffects:n.unknownGlobalSideEffects!==false}};const getHasModuleSideEffects=(e,t)=>{if(typeof e==="boolean"){return()=>e}if(e==="no-external"){return(e,t)=>!t}if(typeof e==="function"){return(t,i)=>!t.startsWith("\0")?e(t,i)!==false:true}if(Array.isArray(e)){const t=new Set(e);return e=>t.has(e)}if(e){error(errInvalidOption("treeshake.moduleSideEffects","treeshake",'please use one of false, "no-external", a function or an array'))}const i=getIdMatcher(t);return(e,t)=>!(t&&i(e))};const gr=/[\x00-\x1F\x7F<>*#"{}|^[\]`;?:&=+$,]/g;const yr=/^[a-z]:/i;function sanitizeFileName(e){const t=yr.exec(e);const i=t?t[0]:"";return i+e.substr(i.length).replace(gr,"_")}function isValidUrl(e){try{new URL(e)}catch(e){return false}return true}function normalizeOutputOptions(e,t,i){var s,n,r,o,l,c,u;const h=new Set(i);const d=e.compact||false;const p=getFormat(e);const f=getInlineDynamicImports(e,t);const m=getPreserveModules(e,f,t);const g=getFile(e,m,t);const y=getPreferConst(e,t);const E=getGeneratedCode(e,y);const x={amd:getAmd(e),assetFileNames:(s=e.assetFileNames)!==null&&s!==void 0?s:"assets/[name]-[hash][extname]",banner:getAddon(e,"banner"),chunkFileNames:(n=e.chunkFileNames)!==null&&n!==void 0?n:"[name]-[hash].js",compact:d,dir:getDir(e,g),dynamicImportFunction:getDynamicImportFunction(e,t),entryFileNames:getEntryFileNames(e,h),esModule:(r=e.esModule)!==null&&r!==void 0?r:true,exports:getExports(e,h),extend:e.extend||false,externalLiveBindings:(o=e.externalLiveBindings)!==null&&o!==void 0?o:true,file:g,footer:getAddon(e,"footer"),format:p,freeze:(l=e.freeze)!==null&&l!==void 0?l:true,generatedCode:E,globals:e.globals||{},hoistTransitiveImports:(c=e.hoistTransitiveImports)!==null&&c!==void 0?c:true,indent:getIndent(e,d),inlineDynamicImports:f,interop:getInterop(e,t),intro:getAddon(e,"intro"),manualChunks:getManualChunks(e,f,m,t),minifyInternalExports:getMinifyInternalExports(e,p,d),name:e.name,namespaceToStringTag:getNamespaceToStringTag(e,E,t),noConflict:e.noConflict||false,outro:getAddon(e,"outro"),paths:e.paths||{},plugins:ensureArray$1(e.plugins),preferConst:y,preserveModules:m,preserveModulesRoot:getPreserveModulesRoot(e),sanitizeFileName:typeof e.sanitizeFileName==="function"?e.sanitizeFileName:e.sanitizeFileName===false?e=>e:sanitizeFileName,sourcemap:e.sourcemap||false,sourcemapBaseUrl:getSourcemapBaseUrl(e),sourcemapExcludeSources:e.sourcemapExcludeSources||false,sourcemapFile:e.sourcemapFile,sourcemapPathTransform:e.sourcemapPathTransform,strict:(u=e.strict)!==null&&u!==void 0?u:true,systemNullSetters:e.systemNullSetters||false,validate:e.validate||false};warnUnknownOptions(e,Object.keys(x),"output options",t.onwarn);return{options:x,unsetOptions:h}}const getFile=(e,t,i)=>{const{file:s}=e;if(typeof s==="string"){if(t){return error(errInvalidOption("output.file","outputdir",'you must set "output.dir" instead of "output.file" when using the "output.preserveModules" option'))}if(!Array.isArray(i.input))return error(errInvalidOption("output.file","outputdir",'you must set "output.dir" instead of "output.file" when providing named inputs'))}return s};const getFormat=e=>{const t=e.format;switch(t){case undefined: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 error({message:`You must specify "output.format", which can be one of "amd", "cjs", "system", "es", "iife" or "umd".`,url:`https://rollupjs.org/guide/en/#outputformat`})}};const getInlineDynamicImports=(e,t)=>{var i;const s=((i=e.inlineDynamicImports)!==null&&i!==void 0?i:t.inlineDynamicImports)||false;const{input:n}=t;if(s&&(Array.isArray(n)?n:Object.keys(n)).length>1){return error(errInvalidOption("output.inlineDynamicImports","outputinlinedynamicimports",'multiple inputs are not supported when "output.inlineDynamicImports" is true'))}return s};const getPreserveModules=(e,t,i)=>{var s;const n=((s=e.preserveModules)!==null&&s!==void 0?s:i.preserveModules)||false;if(n){if(t){return error(errInvalidOption("output.inlineDynamicImports","outputinlinedynamicimports",`this option is not supported for "output.preserveModules"`))}if(i.preserveEntrySignatures===false){return error(errInvalidOption("preserveEntrySignatures","preserveentrysignatures",'setting this option to false is not supported for "output.preserveModules"'))}}return n};const getPreferConst=(e,t)=>{const i=e.preferConst;if(i!=null){warnDeprecation(`The "output.preferConst" option is deprecated. Use the "output.generatedCode.constBindings" option instead.`,false,t)}return!!i};const getPreserveModulesRoot=e=>{const{preserveModulesRoot:t}=e;if(t===null||t===undefined){return undefined}return s.resolve(t)};const getAmd=e=>{const t={autoId:false,basePath:"",define:"define",forceJsExtensionForImports:false,...e.amd};if((t.autoId||t.basePath)&&t.id){return error(errInvalidOption("output.amd.id","outputamd",'this option cannot be used together with "output.amd.autoId"/"output.amd.basePath"'))}if(t.basePath&&!t.autoId){return error(errInvalidOption("output.amd.basePath","outputamd",'this option only works with "output.amd.autoId"'))}let i;if(t.autoId){i={autoId:true,basePath:t.basePath,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports}}else{i={autoId:false,define:t.define,forceJsExtensionForImports:t.forceJsExtensionForImports,id:t.id}}return i};const getAddon=(e,t)=>{const i=e[t];if(typeof i==="function"){return i}return()=>i||""};const getDir=(e,t)=>{const{dir:i}=e;if(typeof i==="string"&&typeof t==="string"){return error(errInvalidOption("output.dir","outputdir",'you must set either "output.file" for a single-file build or "output.dir" when generating multiple chunks'))}return i};const getDynamicImportFunction=(e,t)=>{const i=e.dynamicImportFunction;if(i){warnDeprecation(`The "output.dynamicImportFunction" option is deprecated. Use the "renderDynamicImport" plugin hook instead.`,false,t)}return i};const getEntryFileNames=(e,t)=>{const i=e.entryFileNames;if(i==null){t.add("entryFileNames")}return i!==null&&i!==void 0?i:"[name].js"};function getExports(e,t){const i=e.exports;if(i==null){t.add("exports")}else if(!["default","named","none","auto"].includes(i)){return error(errInvalidExportOptionValue(i))}return i||"auto"}const getGeneratedCode=(e,t)=>{const i=getOptionWithPreset(e.generatedCode,E,"output.generatedCode","");return{arrowFunctions:i.arrowFunctions===true,constBindings:i.constBindings===true||t,objectShorthand:i.objectShorthand===true,reservedNamesAsProps:i.reservedNamesAsProps===true,symbols:i.symbols===true}};const getIndent=(e,t)=>{if(t){return""}const i=e.indent;return i===false?"":i!==null&&i!==void 0?i:true};const Er=new Set(["auto","esModule","default","defaultOnly",true,false]);const getInterop=(e,t)=>{const i=e.interop;const s=new Set;const validateInterop=e=>{if(!s.has(e)){s.add(e);if(!Er.has(e)){return error(errInvalidOption("output.interop","outputinterop",`use one of ${Array.from(Er,(e=>JSON.stringify(e))).join(", ")}`,e))}if(typeof e==="boolean"){warnDeprecation({message:`The boolean value "${e}" for the "output.interop" option is deprecated. Use ${e?'"auto"':'"esModule", "default" or "defaultOnly"'} instead.`,url:"https://rollupjs.org/guide/en/#outputinterop"},false,t)}}return e};if(typeof i==="function"){const e=Object.create(null);let t=null;return s=>s===null?t||validateInterop(t=i(s)):s in e?e[s]:validateInterop(e[s]=i(s))}return i===undefined?()=>true:()=>validateInterop(i)};const getManualChunks=(e,t,i,s)=>{const n=e.manualChunks||s.manualChunks;if(n){if(t){return error(errInvalidOption("output.manualChunks","outputmanualchunks",'this option is not supported for "output.inlineDynamicImports"'))}if(i){return error(errInvalidOption("output.manualChunks","outputmanualchunks",'this option is not supported for "output.preserveModules"'))}}return n||{}};const getMinifyInternalExports=(e,t,i)=>{var s;return(s=e.minifyInternalExports)!==null&&s!==void 0?s:i||t==="es"||t==="system"};const getNamespaceToStringTag=(e,t,i)=>{const s=e.namespaceToStringTag;if(s!=null){warnDeprecation(`The "output.namespaceToStringTag" option is deprecated. Use the "output.generatedCode.symbols" option instead.`,false,i);return s}return t.symbols||false};const getSourcemapBaseUrl=e=>{const{sourcemapBaseUrl:t}=e;if(t){if(isValidUrl(t)){return t}return error(errInvalidOption("output.sourcemapBaseUrl","outputsourcemapbaseurl",`must be a valid URL, received ${JSON.stringify(t)}`))}};function rollup(e){return rollupInternal(e,null)}async function rollupInternal(e,t){const{options:i,unsetOptions:s}=await getInputOptions(e,t!==null);initialiseTimers(i);const n=new Graph(i,t);const r=e.cache!==false;delete i.cache;delete e.cache;cs("BUILD",1);await catchUnfinishedHookActions(n.pluginDriver,(async()=>{try{await n.pluginDriver.hookParallel("buildStart",[i]);await n.build()}catch(e){const t=Object.keys(n.watchFiles);if(t.length>0){e.watchFiles=t}await n.pluginDriver.hookParallel("buildEnd",[e]);await n.pluginDriver.hookParallel("closeBundle",[]);throw e}await n.pluginDriver.hookParallel("buildEnd",[])}));us("BUILD",1);const o={cache:r?n.getCache():undefined,async close(){if(o.closed)return;o.closed=true;await n.pluginDriver.hookParallel("closeBundle",[])},closed:false,async generate(e){if(o.closed)return error(errAlreadyClosed());return handleGenerateWrite(false,i,s,e,n)},watchFiles:Object.keys(n.watchFiles),async write(e){if(o.closed)return error(errAlreadyClosed());return handleGenerateWrite(true,i,s,e,n)}};if(i.perf)o.getTimings=getTimings;return o}async function getInputOptions(e,t){if(!e){throw new Error("You must supply an options object to rollup")}const i=getSortedValidatedPlugins("options",ensureArray$1(e.plugins));const{options:s,unsetOptions:n}=normalizeInputOptions(await i.reduce(applyOptionHook(t),Promise.resolve(e)));normalizePlugins(s.plugins,or);return{options:s,unsetOptions:n}}function applyOptionHook(e){return async(t,i)=>{const s="handler"in i.options?i.options.handler:i.options;return await s.call({meta:{rollupVersion:u,watchMode:e}},await t)||t}}function normalizePlugins(e,t){e.forEach(((e,i)=>{if(!e.name){e.name=`${t}${i+1}`}}))}function handleGenerateWrite(e,t,i,s,n){const{options:r,outputPluginDriver:o,unsetOptions:l}=getOutputOptionsAndPluginDriver(s,n.pluginDriver,t,i);return catchUnfinishedHookActions(o,(async()=>{const i=new Bundle(r,l,t,o,n);const s=await i.generate(e);if(e){if(!r.dir&&!r.file){return error({code:"MISSING_OPTION",message:'You must specify "output.file" or "output.dir" for the build.'})}await Promise.all(Object.values(s).map((e=>n.fileOperationQueue.run((()=>writeOutputFile(e,r))))));await o.hookParallel("writeBundle",[r,s])}return createOutput(s)}))}function getOutputOptionsAndPluginDriver(e,t,i,s){if(!e){throw new Error("You must supply an options object")}const n=ensureArray$1(e.plugins);normalizePlugins(n,lr);const r=t.createOutputPluginDriver(n);return{...getOutputOptions(i,s,e,r),outputPluginDriver:r}}function getOutputOptions(e,t,i,s){return normalizeOutputOptions(s.hookReduceArg0Sync("outputOptions",[i.output||i],((e,t)=>t||e),(e=>{const emitError=()=>e.error(errCannotEmitFromOptionsHook());return{...e,emitFile:emitError,setAssetSource:emitError}})),e,t)}function createOutput(e){return{output:Object.values(e).filter((e=>Object.keys(e).length>0)).sort(((e,t)=>{const i=getSortingFileType(e);const s=getSortingFileType(t);if(i===s)return 0;return i<s?-1:1}))}}var xr;(function(e){e[e["ENTRY_CHUNK"]=0]="ENTRY_CHUNK";e[e["SECONDARY_CHUNK"]=1]="SECONDARY_CHUNK";e[e["ASSET"]=2]="ASSET"})(xr||(xr={}));function getSortingFileType(e){if(e.type==="asset"){return xr.ASSET}if(e.isEntry){return xr.ENTRY_CHUNK}return xr.SECONDARY_CHUNK}async function writeOutputFile(e,i){const n=s.resolve(i.dir||s.dirname(i.file),e.fileName);await l.promises.mkdir(s.dirname(n),{recursive:true});let r;let o;if(e.type==="asset"){o=e.source}else{o=e.code;if(i.sourcemap&&e.map){let c;if(i.sourcemap==="inline"){c=e.map.toUrl()}else{const{sourcemapBaseUrl:t}=i;const o=`${s.basename(e.fileName)}.map`;c=t?new URL(o,t).toString():o;r=l.promises.writeFile(`${n}.map`,e.map.toString())}if(i.sourcemap!=="hidden"){o+=`//# ${t.SOURCEMAPPING_URL}=${c}\n`}}}return Promise.all([l.promises.writeFile(n,o),r])}function defineConfig(e){return e}class WatchEmitter extends c.EventEmitter{constructor(){super();this.awaitedHandlers=Object.create(null);this.setMaxListeners(Infinity)}async close(){}emitAndAwait(e,...t){this.emit(e,...t);return Promise.all(this.getHandlers(e).map((e=>e(...t))))}onCurrentAwaited(e,t){this.getHandlers(e).push(t);return this}removeAwaited(){this.awaitedHandlers={};return this}getHandlers(e){return this.awaitedHandlers[e]||(this.awaitedHandlers[e]=[])}}function watch(e){const t=new WatchEmitter;const s=ensureArray$1(e);const n=s.filter((e=>e.watch!==false));if(n.length===0){return error(errInvalidOption("watch","watch",'there must be at least one config where "watch" is not set to "false"'))}loadFsEvents().then((()=>Promise.resolve().then((()=>i(652))))).then((({Watcher:e})=>new e(n,t)));return t}t.commonjsGlobal=S;t.createFilter=lt;t.defaultOnWarn=defaultOnWarn;t.defineConfig=defineConfig;t.ensureArray=ensureArray$1;t.error=error;t.fseventsImporter=b;t.generatedCodePresets=E;t.getAliasName=getAliasName;t.getAugmentedNamespace=getAugmentedNamespace;t.getOrCreate=getOrCreate;t.loadFsEvents=loadFsEvents;t.objectifyOption=objectifyOption;t.objectifyOptionWithPresets=objectifyOptionWithPresets;t.picomatch=ie;t.printQuotedStringList=printQuotedStringList;t.relativeId=relativeId;t.rollup=rollup;t.rollupInternal=rollupInternal;t.treeshakePresets=y;t.version=u;t.warnUnknownOptions=warnUnknownOptions;t.watch=watch},652:(e,t,i)=>{"use strict";
86
+ */
87
+ const s=i(194);const n=i(882);class WatchEmitter{constructor(){this.currentHandlers=Object.create(null);this.persistentHandlers=Object.create(null)}async close(){}emit(e,...t){return Promise.all([...this.getCurrentHandlers(e),...this.getPersistentHandlers(e)].map((e=>e(...t))))}off(e,t){const i=this.persistentHandlers[e];if(i){i.splice(i.indexOf(t)>>>0,1)}return this}on(e,t){this.getPersistentHandlers(e).push(t);return this}onCurrentRun(e,t){this.getCurrentHandlers(e).push(t);return this}once(e,t){const selfRemovingListener=(...i)=>{this.off(e,selfRemovingListener);return t(...i)};this.on(e,selfRemovingListener);return this}removeAllListeners(){this.removeListenersForCurrentRun();this.persistentHandlers=Object.create(null);return this}removeListenersForCurrentRun(){this.currentHandlers=Object.create(null);return this}getCurrentHandlers(e){return this.currentHandlers[e]||(this.currentHandlers[e]=[])}getPersistentHandlers(e){return this.persistentHandlers[e]||(this.persistentHandlers[e]=[])}}function watch(e){const t=new WatchEmitter;watchInternal(e,t).catch((e=>{s.handleError(e)}));return t}async function watchInternal(e,t){const r=await Promise.all(s.ensureArray(e).map((e=>s.mergeOptions(e))));const o=r.filter((e=>e.watch!==false));if(o.length===0){return s.error(s.errorInvalidOption("watch",s.URL_WATCH,'there must be at least one config where "watch" is not set to "false"'))}await n.loadFsEvents();const{Watcher:l}=await Promise.resolve().then((()=>i(359)));new l(o,t)}t.watch=watch},359:(e,t,i)=>{
74
88
  /*
75
89
  @license
76
- Rollup.js v2.79.0
77
- Wed, 31 Aug 2022 04:52:13 GMT - commit 8477f8ff1fe80086556021542b22942ad27a0a69
90
+ Rollup.js v3.23.0
91
+ Mon, 22 May 2023 05:28:38 GMT - commit 5ea36552c447d2903050d2622f2dcae3dd2df975
78
92
 
79
93
  https://github.com/rollup/rollup
80
94
 
81
95
  Released under the MIT License.
82
- */Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=i(822);const n=i(282);const r=i(17);const o=i(173);const l=i(37);const c=i(227);i(74);i(113);i(147);i(361);i(837);i(781);class FileWatcher{constructor(e,t){this.transformWatchers=new Map;this.chokidarOptions=t;this.task=e;this.watcher=this.createWatcher(null)}close(){this.watcher.close();for(const e of this.transformWatchers.values()){e.close()}}unwatch(e){this.watcher.unwatch(e);const t=this.transformWatchers.get(e);if(t){this.transformWatchers.delete(e);t.close()}}watch(e,t){var i;if(t){const t=(i=this.transformWatchers.get(e))!==null&&i!==void 0?i:this.createWatcher(e);t.add(e);this.transformWatchers.set(e,t)}else{this.watcher.add(e)}}createWatcher(e){const t=this.task;const i=l.platform()==="linux";const s=e!==null;const handleChange=(r,o)=>{const l=e||r;if(i){n.unwatch(l);n.add(l)}t.invalidate(l,{event:o,isTransformDependency:s})};const n=c.chokidar.watch([],this.chokidarOptions).on("add",(e=>handleChange(e,"create"))).on("change",(e=>handleChange(e,"update"))).on("unlink",(e=>handleChange(e,"delete")));return n}}const u={create:{create:"buggy",delete:null,update:"create"},delete:{create:"update",delete:"buggy",update:"buggy"},update:{create:"buggy",delete:"delete",update:"update"}};class Watcher{constructor(e,t){this.buildDelay=0;this.buildTimeout=null;this.invalidatedIds=new Map;this.rerun=false;this.running=true;this.emitter=t;t.close=this.close.bind(this);this.tasks=e.map((e=>new Task(this,e)));this.buildDelay=e.reduce(((e,{watch:t})=>t&&typeof t.buildDelay==="number"?Math.max(e,t.buildDelay):e),this.buildDelay);n.nextTick((()=>this.run()))}async close(){if(this.buildTimeout)clearTimeout(this.buildTimeout);for(const e of this.tasks){e.close()}await this.emitter.emitAndAwait("close");this.emitter.removeAllListeners()}invalidate(e){if(e){const t=this.invalidatedIds.get(e.id);const i=t?u[t][e.event]:e.event;if(i==="buggy"){this.invalidatedIds.set(e.id,e.event)}else if(i===null){this.invalidatedIds.delete(e.id)}else{this.invalidatedIds.set(e.id,i)}}if(this.running){this.rerun=true;return}if(this.buildTimeout)clearTimeout(this.buildTimeout);this.buildTimeout=setTimeout((async()=>{this.buildTimeout=null;try{await Promise.all([...this.invalidatedIds].map((([e,t])=>this.emitter.emitAndAwait("change",e,{event:t}))));this.invalidatedIds.clear();this.emitter.emit("restart");this.emitter.removeAwaited();this.run()}catch(e){this.invalidatedIds.clear();this.emitter.emit("event",{code:"ERROR",error:e,result:null});this.emitter.emit("event",{code:"END"})}}),this.buildDelay)}async run(){this.running=true;this.emitter.emit("event",{code:"START"});for(const e of this.tasks){await e.run()}this.running=false;this.emitter.emit("event",{code:"END"});if(this.rerun){this.rerun=false;this.invalidate()}}}class Task{constructor(e,t){this.cache={modules:[]};this.watchFiles=[];this.closed=false;this.invalidated=true;this.watched=new Set;this.watcher=e;this.skipWrite=Boolean(t.watch&&t.watch.skipWrite);this.options=o.mergeOptions(t);this.outputs=this.options.output;this.outputFiles=this.outputs.map((e=>{if(e.file||e.dir)return s.resolve(e.file||e.dir);return undefined}));const i=this.options.watch||{};this.filter=r.createFilter(i.include,i.exclude);this.fileWatcher=new FileWatcher(this,{...i.chokidar,disableGlobbing:true,ignoreInitial:true})}close(){this.closed=true;this.fileWatcher.close()}invalidate(e,t){this.invalidated=true;if(t.isTransformDependency){for(const t of this.cache.modules){if(!t.transformDependencies.includes(e))continue;t.originalCode=null}}this.watcher.invalidate({event:t.event,id:e})}async run(){if(!this.invalidated)return;this.invalidated=false;const e={...this.options,cache:this.cache};const t=Date.now();this.watcher.emitter.emit("event",{code:"BUNDLE_START",input:this.options.input,output:this.outputFiles});let i=null;try{i=await r.rollupInternal(e,this.watcher.emitter);if(this.closed){return}this.updateWatchedFiles(i);this.skipWrite||await Promise.all(this.outputs.map((e=>i.write(e))));this.watcher.emitter.emit("event",{code:"BUNDLE_END",duration:Date.now()-t,input:this.options.input,output:this.outputFiles,result:i})}catch(e){if(!this.closed){if(Array.isArray(e.watchFiles)){for(const t of e.watchFiles){this.watchFile(t)}}if(e.id){this.cache.modules=this.cache.modules.filter((t=>t.id!==e.id))}}this.watcher.emitter.emit("event",{code:"ERROR",error:e,result:i})}}updateWatchedFiles(e){const t=this.watched;this.watched=new Set;this.watchFiles=e.watchFiles;this.cache=e.cache;for(const e of this.watchFiles){this.watchFile(e)}for(const e of this.cache.modules){for(const t of e.transformDependencies){this.watchFile(t,true)}}for(const e of t){if(!this.watched.has(e)){this.fileWatcher.unwatch(e)}}}watchFile(e,t=false){if(!this.filter(e))return;this.watched.add(e);if(this.outputFiles.some((t=>t===e))){throw new Error("Cannot import the generated bundle")}this.fileWatcher.watch(e,t)}}t.Task=Task;t.Watcher=Watcher},653:(e,t,i)=>{e.exports=require(i.ab+"fsevents.node")},113:e=>{"use strict";e.exports=require("crypto")},361:e=>{"use strict";e.exports=require("events")},147:e=>{"use strict";e.exports=require("fs")},37:e=>{"use strict";e.exports=require("os")},822:e=>{"use strict";e.exports=require("path")},74:e=>{"use strict";e.exports=require("perf_hooks")},282:e=>{"use strict";e.exports=require("process")},781:e=>{"use strict";e.exports=require("stream")},837:e=>{"use strict";e.exports=require("util")}};var t={};function __nccwpck_require__(i){var s=t[i];if(s!==undefined){return s.exports}var n=t[i]={exports:{}};var r=true;try{e[i](n,n.exports,__nccwpck_require__);r=false}finally{if(r)delete t[i]}return n.exports}if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";var i=__nccwpck_require__(695);module.exports=i})();
96
+ */
97
+ Object.defineProperty(t,Symbol.toStringTag,{value:"Module"});const s=i(411);const n=i(742);const r=i(194);const o=i(612);const l=i(844);i(224);i(17);i(846);i(5);i(977);i(147);i(837);i(781);i(37);i(882);i(361);class FileWatcher{constructor(e,t){this.transformWatchers=new Map;this.chokidarOptions=t;this.task=e;this.watcher=this.createWatcher(null)}close(){this.watcher.close();for(const e of this.transformWatchers.values()){e.close()}}unwatch(e){this.watcher.unwatch(e);const t=this.transformWatchers.get(e);if(t){this.transformWatchers.delete(e);t.close()}}watch(e,t){if(t){const t=this.transformWatchers.get(e)??this.createWatcher(e);t.add(e);this.transformWatchers.set(e,t)}else{this.watcher.add(e)}}createWatcher(e){const t=this.task;const i=o.platform()==="linux";const s=e!==null;const handleChange=(r,o)=>{const l=e||r;if(i){n.unwatch(l);n.add(l)}t.invalidate(l,{event:o,isTransformDependency:s})};const n=l.chokidar.watch([],this.chokidarOptions).on("add",(e=>handleChange(e,"create"))).on("change",(e=>handleChange(e,"update"))).on("unlink",(e=>handleChange(e,"delete")));return n}}const c={create:{create:"buggy",delete:null,update:"create"},delete:{create:"update",delete:"buggy",update:"buggy"},update:{create:"buggy",delete:"delete",update:"update"}};class Watcher{constructor(e,t){this.buildDelay=0;this.buildTimeout=null;this.closed=false;this.invalidatedIds=new Map;this.rerun=false;this.running=true;this.emitter=t;t.close=this.close.bind(this);this.tasks=e.map((e=>new Task(this,e)));for(const{watch:t}of e){if(t&&typeof t.buildDelay==="number"){this.buildDelay=Math.max(this.buildDelay,t.buildDelay)}}n.nextTick((()=>this.run()))}async close(){if(this.closed)return;this.closed=true;if(this.buildTimeout)clearTimeout(this.buildTimeout);for(const e of this.tasks){e.close()}await this.emitter.emit("close");this.emitter.removeAllListeners()}invalidate(e){if(e){const t=this.invalidatedIds.get(e.id);const i=t?c[t][e.event]:e.event;if(i==="buggy"){this.invalidatedIds.set(e.id,e.event)}else if(i===null){this.invalidatedIds.delete(e.id)}else{this.invalidatedIds.set(e.id,i)}}if(this.running){this.rerun=true;return}if(this.buildTimeout)clearTimeout(this.buildTimeout);this.buildTimeout=setTimeout((async()=>{this.buildTimeout=null;try{await Promise.all([...this.invalidatedIds].map((([e,t])=>this.emitter.emit("change",e,{event:t}))));this.invalidatedIds.clear();await this.emitter.emit("restart");this.emitter.removeListenersForCurrentRun();this.run()}catch(e){this.invalidatedIds.clear();await this.emitter.emit("event",{code:"ERROR",error:e,result:null});await this.emitter.emit("event",{code:"END"})}}),this.buildDelay)}async run(){this.running=true;await this.emitter.emit("event",{code:"START"});for(const e of this.tasks){await e.run()}this.running=false;await this.emitter.emit("event",{code:"END"});if(this.rerun){this.rerun=false;this.invalidate()}}}class Task{constructor(e,t){this.cache={modules:[]};this.watchFiles=[];this.closed=false;this.invalidated=true;this.watched=new Set;this.watcher=e;this.options=t;this.skipWrite=Boolean(t.watch&&t.watch.skipWrite);this.outputs=this.options.output;this.outputFiles=this.outputs.map((e=>{if(e.file||e.dir)return s.resolve(e.file||e.dir);return undefined}));const i=this.options.watch||{};this.filter=r.createFilter(i.include,i.exclude);this.fileWatcher=new FileWatcher(this,{...i.chokidar,disableGlobbing:true,ignoreInitial:true})}close(){this.closed=true;this.fileWatcher.close()}invalidate(e,t){this.invalidated=true;if(t.isTransformDependency){for(const t of this.cache.modules){if(!t.transformDependencies.includes(e))continue;t.originalCode=null}}this.watcher.invalidate({event:t.event,id:e})}async run(){if(!this.invalidated)return;this.invalidated=false;const e={...this.options,cache:this.cache};const t=Date.now();await this.watcher.emitter.emit("event",{code:"BUNDLE_START",input:this.options.input,output:this.outputFiles});let i=null;try{i=await r.rollupInternal(e,this.watcher.emitter);if(this.closed){return}this.updateWatchedFiles(i);this.skipWrite||await Promise.all(this.outputs.map((e=>i.write(e))));await this.watcher.emitter.emit("event",{code:"BUNDLE_END",duration:Date.now()-t,input:this.options.input,output:this.outputFiles,result:i})}catch(e){if(!this.closed){if(Array.isArray(e.watchFiles)){for(const t of e.watchFiles){this.watchFile(t)}}if(e.id){this.cache.modules=this.cache.modules.filter((t=>t.id!==e.id))}}await this.watcher.emitter.emit("event",{code:"ERROR",error:e,result:i})}}updateWatchedFiles(e){const t=this.watched;this.watched=new Set;this.watchFiles=e.watchFiles;this.cache=e.cache;for(const e of this.watchFiles){this.watchFile(e)}for(const e of this.cache.modules){for(const t of e.transformDependencies){this.watchFile(t,true)}}for(const e of t){if(!this.watched.has(e)){this.fileWatcher.unwatch(e)}}}watchFile(e,t=false){if(!this.filter(e))return;this.watched.add(e);if(this.outputFiles.includes(e)){throw new Error("Cannot import the generated bundle")}this.fileWatcher.watch(e,t)}}t.Task=Task;t.Watcher=Watcher},361:e=>{e.exports=require("events")},147:e=>{e.exports=require("fs")},5:e=>{e.exports=require("node:crypto")},977:e=>{e.exports=require("node:fs/promises")},612:e=>{e.exports=require("node:os")},411:e=>{e.exports=require("node:path")},846:e=>{e.exports=require("node:perf_hooks")},742:e=>{e.exports=require("node:process")},37:e=>{e.exports=require("os")},17:e=>{e.exports=require("path")},781:e=>{e.exports=require("stream")},224:e=>{e.exports=require("tty")},837:e=>{e.exports=require("util")}};var t={};function __nccwpck_require__(i){var s=t[i];if(s!==undefined){return s.exports}var n=t[i]={exports:{}};var r=true;try{e[i](n,n.exports,__nccwpck_require__);r=false}finally{if(r)delete t[i]}return n.exports}__nccwpck_require__.m=e;(()=>{var e=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__;var t;__nccwpck_require__.t=function(i,s){if(s&1)i=this(i);if(s&8)return i;if(typeof i==="object"&&i){if(s&4&&i.__esModule)return i;if(s&16&&typeof i.then==="function")return i}var n=Object.create(null);__nccwpck_require__.r(n);var r={};t=t||[null,e({}),e([]),e(e)];for(var o=s&2&&i;typeof o=="object"&&!~t.indexOf(o);o=e(o)){Object.getOwnPropertyNames(o).forEach((e=>r[e]=()=>i[e]))}r["default"]=()=>i;__nccwpck_require__.d(n,r);return n}})();(()=>{__nccwpck_require__.d=(e,t)=>{for(var i in t){if(__nccwpck_require__.o(t,i)&&!__nccwpck_require__.o(e,i)){Object.defineProperty(e,i,{enumerable:true,get:t[i]})}}}})();(()=>{__nccwpck_require__.f={};__nccwpck_require__.e=e=>Promise.all(Object.keys(__nccwpck_require__.f).reduce(((t,i)=>{__nccwpck_require__.f[i](e,t);return t}),[]))})();(()=>{__nccwpck_require__.u=e=>""+e+".index.js"})();(()=>{__nccwpck_require__.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t)})();(()=>{__nccwpck_require__.r=e=>{if(typeof Symbol!=="undefined"&&Symbol.toStringTag){Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}Object.defineProperty(e,"__esModule",{value:true})}})();if(typeof __nccwpck_require__!=="undefined")__nccwpck_require__.ab=__dirname+"/";(()=>{var e={179:1};var installChunk=t=>{var i=t.modules,s=t.ids,n=t.runtime;for(var r in i){if(__nccwpck_require__.o(i,r)){__nccwpck_require__.m[r]=i[r]}}if(n)n(__nccwpck_require__);for(var o=0;o<s.length;o++)e[s[o]]=1};__nccwpck_require__.f.require=(t,i)=>{if(!e[t]){if(true){installChunk(require("./"+__nccwpck_require__.u(t)))}else e[t]=1}}})();var i=__nccwpck_require__(10);module.exports=i})();