vite-plugin-cdn-next 1.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +218 -0
- package/dist/chunk-44E5HB7F.mjs +2 -0
- package/dist/chunk-44E5HB7F.mjs.map +1 -0
- package/dist/chunk-D44BBBSZ.mjs +2 -0
- package/dist/chunk-D44BBBSZ.mjs.map +1 -0
- package/dist/chunk-EKMT5YZN.mjs +5 -0
- package/dist/chunk-EKMT5YZN.mjs.map +1 -0
- package/dist/chunk-ULCZGLAT.mjs +2 -0
- package/dist/chunk-ULCZGLAT.mjs.map +1 -0
- package/dist/index.d.mts +22 -0
- package/dist/index.d.ts +22 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/index.mjs +2 -0
- package/dist/index.mjs.map +1 -0
- package/dist/interface-PoOSHBDD.d.mts +68 -0
- package/dist/interface-PoOSHBDD.d.ts +68 -0
- package/dist/resolve.d.mts +3 -0
- package/dist/resolve.d.ts +3 -0
- package/dist/resolve.js +2 -0
- package/dist/resolve.js.map +1 -0
- package/dist/resolve.mjs +2 -0
- package/dist/resolve.mjs.map +1 -0
- package/dist/resolver/bootcdn.d.mts +7 -0
- package/dist/resolver/bootcdn.d.ts +7 -0
- package/dist/resolver/bootcdn.js +2 -0
- package/dist/resolver/bootcdn.js.map +1 -0
- package/dist/resolver/bootcdn.mjs +2 -0
- package/dist/resolver/bootcdn.mjs.map +1 -0
- package/dist/resolver/cdnjs.d.mts +7 -0
- package/dist/resolver/cdnjs.d.ts +7 -0
- package/dist/resolver/cdnjs.js +2 -0
- package/dist/resolver/cdnjs.js.map +1 -0
- package/dist/resolver/cdnjs.mjs +2 -0
- package/dist/resolver/cdnjs.mjs.map +1 -0
- package/dist/resolver/jsdelivr.d.mts +7 -0
- package/dist/resolver/jsdelivr.d.ts +7 -0
- package/dist/resolver/jsdelivr.js +2 -0
- package/dist/resolver/jsdelivr.js.map +1 -0
- package/dist/resolver/jsdelivr.mjs +2 -0
- package/dist/resolver/jsdelivr.mjs.map +1 -0
- package/dist/resolver/unpkg.d.mts +7 -0
- package/dist/resolver/unpkg.d.ts +7 -0
- package/dist/resolver/unpkg.js +2 -0
- package/dist/resolver/unpkg.js.map +1 -0
- package/dist/resolver/unpkg.mjs +2 -0
- package/dist/resolver/unpkg.mjs.map +1 -0
- package/dist/scanner.d.mts +20 -0
- package/dist/scanner.d.ts +20 -0
- package/dist/scanner.js +5 -0
- package/dist/scanner.js.map +1 -0
- package/dist/scanner.mjs +2 -0
- package/dist/scanner.mjs.map +1 -0
- package/package.json +102 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 [Brian <admin@wayearn.com>]
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,218 @@
|
|
|
1
|
+
<h1 align="center">
|
|
2
|
+
<img src="https://socialify.git.ci/toimc/vite-plugin-cdn-next/image?description=1&font=Source+Code+Pro&issues=1&language=1&name=1&owner=1&pattern=Circuit+Board&pulls=1&stargazers=1&theme=Auto" alt="vite-plugin-cdn-next" width="640" height="320" />
|
|
3
|
+
</h1>
|
|
4
|
+
|
|
5
|
+
# Vite Plugin CDN Next
|
|
6
|
+
|
|
7
|
+
[中文文档](README_CN.md)
|
|
8
|
+
|
|
9
|
+
## Table of Contents
|
|
10
|
+
|
|
11
|
+
[toc]
|
|
12
|
+
|
|
13
|
+
## Introduction
|
|
14
|
+
|
|
15
|
+
`vite-plugin-cdn-next` is a Vite plugin that allows you to replace modules with CDN links, optimizing your build process by reducing bundle size and improving load times.
|
|
16
|
+
|
|
17
|
+
## Installation
|
|
18
|
+
|
|
19
|
+
```bash
|
|
20
|
+
pnpm add vite-plugin-cdn-next -D
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
### Basic Setup
|
|
26
|
+
|
|
27
|
+
```typescript
|
|
28
|
+
// vite.config.ts
|
|
29
|
+
|
|
30
|
+
import { defineConfig } from 'vite'
|
|
31
|
+
import { cdn } from 'vite-plugin-cdn-next'
|
|
32
|
+
|
|
33
|
+
export default defineConfig({
|
|
34
|
+
plugins: [cdn({ modules: ['vue'] })]
|
|
35
|
+
})
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Options
|
|
39
|
+
|
|
40
|
+
| params | type | default | description |
|
|
41
|
+
| ---------- | --------------------------- | ------------------------------------------- | ---------------------------------------------------- |
|
|
42
|
+
| `include` | `FilterPattern` | `/\.(mjs\|js\|ts\|vue\|jsx\|tsx)(\?.*\|)$/` | Include all assets matching any of these conditions. |
|
|
43
|
+
| `exclude` | `FilterPattern` | `-` | Exclude all assets matching any of these conditions. |
|
|
44
|
+
| `modules` | `Array<IModule \| string> ` | `[]` | Should convert module. |
|
|
45
|
+
| `logLevel` | `silent\|warn` | `warn` | Adjust console output verbosity. |
|
|
46
|
+
| `resolve` | `ResolveOptions` | `jsdelivr plugin` | URL parser injected into the page. |
|
|
47
|
+
| `apply` | `string` | `build` | Same as vite apply. |
|
|
48
|
+
|
|
49
|
+
### IModule Interface
|
|
50
|
+
|
|
51
|
+
The `IModule` interface allows you to specify how modules should be handled by the CDN plugin. Here are the properties you can define:
|
|
52
|
+
|
|
53
|
+
- **name**: The name of the module.
|
|
54
|
+
- **global**: (Optional) The global variable name that the module exports. This is useful when the module is expected to be available as a global variable in the browser environment.
|
|
55
|
+
- **spare**: (Optional) An array of script or link spares, or a string. This can be used to specify additional resources that should be loaded alongside the module.
|
|
56
|
+
- **relativeModule**: (Optional) The relative path to the module file.
|
|
57
|
+
- **aliases**: (Optional) An array of alternative names for the module.
|
|
58
|
+
|
|
59
|
+
#### Examples
|
|
60
|
+
|
|
61
|
+
1. **Basic Module Configuration**
|
|
62
|
+
|
|
63
|
+
```typescript
|
|
64
|
+
const modules: IModule[] = [
|
|
65
|
+
{ name: 'react', global: 'React' },
|
|
66
|
+
{ name: 'react-dom', global: 'ReactDOM' }
|
|
67
|
+
]
|
|
68
|
+
```
|
|
69
|
+
|
|
70
|
+
2. **Using Aliases**
|
|
71
|
+
|
|
72
|
+
```typescript
|
|
73
|
+
const modules: IModule[] = [
|
|
74
|
+
{
|
|
75
|
+
name: 'lodash',
|
|
76
|
+
global: '_',
|
|
77
|
+
aliases: ['lodash-es']
|
|
78
|
+
}
|
|
79
|
+
]
|
|
80
|
+
```
|
|
81
|
+
|
|
82
|
+
3. **Specifying a Relative Module Path**
|
|
83
|
+
|
|
84
|
+
```typescript
|
|
85
|
+
const modules: IModule[] = [
|
|
86
|
+
{
|
|
87
|
+
name: 'moment',
|
|
88
|
+
relativeModule: './min/moment.min.js'
|
|
89
|
+
}
|
|
90
|
+
]
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
4. **Using Spare Resources**
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
const modules: IModule[] = [
|
|
97
|
+
{
|
|
98
|
+
name: 'jquery',
|
|
99
|
+
global: '$',
|
|
100
|
+
spare: [{ url: 'https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.0/jquery.min.js' }]
|
|
101
|
+
}
|
|
102
|
+
]
|
|
103
|
+
```
|
|
104
|
+
|
|
105
|
+
5. **Global Variable Usage**
|
|
106
|
+
|
|
107
|
+
```typescript
|
|
108
|
+
const modules: IModule[] = [
|
|
109
|
+
{
|
|
110
|
+
name: 'd3',
|
|
111
|
+
global: 'd3',
|
|
112
|
+
spare: [{ url: 'https://d3js.org/d3.v6.min.js' }]
|
|
113
|
+
}
|
|
114
|
+
]
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+
These examples demonstrate how to configure the `IModule` interface to customize how modules are loaded from a CDN, including the use of global variables and spare resources.
|
|
118
|
+
|
|
119
|
+
### Resolve
|
|
120
|
+
|
|
121
|
+
You can define custom resolve logic if the default behavior doesn't meet your needs:
|
|
122
|
+
|
|
123
|
+
```typescript
|
|
124
|
+
import { defineResolve } from 'vite-plugin-cdn-next/resolve'
|
|
125
|
+
|
|
126
|
+
export const myResolve = defineResolve({
|
|
127
|
+
name: 'resolve:custom',
|
|
128
|
+
setup({ extra }) {
|
|
129
|
+
const baseURL = 'https://cdnjs.cloudflare.com/ajax/libs/'
|
|
130
|
+
const { version, name, relativeModule } = extra
|
|
131
|
+
const url = new URL(`${name}/${version}/${relativeModule}`, baseURL)
|
|
132
|
+
return {
|
|
133
|
+
url: url.href,
|
|
134
|
+
injectTo: 'head-prepend',
|
|
135
|
+
attrs: {}
|
|
136
|
+
}
|
|
137
|
+
}
|
|
138
|
+
})
|
|
139
|
+
```
|
|
140
|
+
|
|
141
|
+
## Examples
|
|
142
|
+
|
|
143
|
+
React Example
|
|
144
|
+
|
|
145
|
+
```javascript
|
|
146
|
+
// examples/react/vite.config.js
|
|
147
|
+
|
|
148
|
+
import { defineConfig } from 'vite'
|
|
149
|
+
import React from '@vitejs/plugin-react'
|
|
150
|
+
import { cdn } from 'vite-plugin-cdn-next'
|
|
151
|
+
|
|
152
|
+
export default defineConfig({
|
|
153
|
+
plugins: [
|
|
154
|
+
React(),
|
|
155
|
+
cdn({
|
|
156
|
+
modules: [
|
|
157
|
+
{ name: 'react', relativeModule: './umd/react.production.min.js' },
|
|
158
|
+
{
|
|
159
|
+
name: 'react-dom',
|
|
160
|
+
relativeModule: './umd/react-dom.production.min.js',
|
|
161
|
+
aliases: ['client']
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
apply: 'build'
|
|
165
|
+
})
|
|
166
|
+
]
|
|
167
|
+
})
|
|
168
|
+
```
|
|
169
|
+
|
|
170
|
+
Vue 3 Example
|
|
171
|
+
|
|
172
|
+
```typescript
|
|
173
|
+
// examples/vue3/vite.config.ts
|
|
174
|
+
|
|
175
|
+
import { defineConfig } from 'vite'
|
|
176
|
+
import vue from '@vitejs/plugin-vue'
|
|
177
|
+
import { cdn } from 'vite-plugin-cdn-next'
|
|
178
|
+
|
|
179
|
+
export default defineConfig({
|
|
180
|
+
plugins: [
|
|
181
|
+
vue(),
|
|
182
|
+
cdn({
|
|
183
|
+
modules: ['vue'],
|
|
184
|
+
apply: 'build'
|
|
185
|
+
})
|
|
186
|
+
]
|
|
187
|
+
})
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
## Debugging
|
|
191
|
+
|
|
192
|
+
To debug the project, follow these steps:
|
|
193
|
+
|
|
194
|
+
1. Run the `dev` command in the root directory:
|
|
195
|
+
```bash
|
|
196
|
+
pnpm run dev
|
|
197
|
+
```
|
|
198
|
+
2. Open Visual Studio Code and use the debugging feature to start the `Build Vite-Vue3` [task](./.vscode/launch.json).
|
|
199
|
+
|
|
200
|
+
## Contributing
|
|
201
|
+
|
|
202
|
+
Contributions are welcome! If you have suggestions or improvements, please fork the repository and submit a pull request. Ensure your code adheres to the project's coding standards and includes appropriate tests.
|
|
203
|
+
|
|
204
|
+
## Reporting Issues
|
|
205
|
+
|
|
206
|
+
If you encounter any issues, please report them on our [GitHub Issues](https://github.com/toimc/vite-plugin-cdn-next/issues) page. When submitting an issue, please include the following:
|
|
207
|
+
|
|
208
|
+
1. **Minimal Reproduction**: Provide a link to a repository or a code snippet that reproduces the issue. This helps us understand the problem quickly and work on a fix.
|
|
209
|
+
2. **Error Description**: Clearly describe the error, including any error messages, stack traces, and the expected versus actual behavior.
|
|
210
|
+
3. **Environment Details**: Include details about your development environment, such as operating system, Node.js version, and any relevant configurations.
|
|
211
|
+
|
|
212
|
+
## License
|
|
213
|
+
|
|
214
|
+
[MIT](./LICENSE)
|
|
215
|
+
|
|
216
|
+
## Author
|
|
217
|
+
|
|
218
|
+
Brian <admin@wayearn.com>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resolve.ts"],"sourcesContent":["import type { HtmlTagDescriptor } from 'vite'\nimport type { IIFEModuleInfo, LinkSpare, ScriptAttributes, ScriptSpare } from './interface'\n\nexport type HTMLTagDescriptor = Pick<HtmlTagDescriptor, 'injectTo' | 'attrs'> & {\n attrs?: ScriptAttributes\n}\n\ninterface SetupContext {\n extra: IIFEModuleInfo\n}\n\nexport type SetupResult = { url: string } & HTMLTagDescriptor\n\nexport interface ResolveOptions {\n name: string\n setup(ctx: SetupContext): SetupResult\n}\n\nexport function defineResolve(opts: ResolveOptions) {\n return opts\n}\n\nexport function defineScript(opts: ScriptSpare) {\n return opts\n}\n\nexport function defineLink(opts: LinkSpare) {\n return opts\n}\n"],"mappings":"yCAAAA,IAkBO,SAASC,EAAcC,EAAsB,CAClD,OAAOA,CACT,CAEO,SAASC,EAAaD,EAAmB,CAC9C,OAAOA,CACT,CAEO,SAASE,EAAWF,EAAiB,CAC1C,OAAOA,CACT","names":["init_esm_shims","defineResolve","opts","defineScript","defineLink"]}
|
|
@@ -0,0 +1,2 @@
|
|
|
1
|
+
import{d as e}from"./chunk-ULCZGLAT.mjs";e();function m(r={}){let{injectTo:t="head-prepend",attrs:n={}}=r,o="https://cdn.jsdelivr.net/npm/";return{name:"resolve:jsdelivr",setup({extra:s}){let{version:i,name:l,relativeModule:p}=s;return{url:new URL(`${l}@${i}/${p}`,o).href,injectTo:t,attrs:{...n}}}}}export{m as a};
|
|
2
|
+
//# sourceMappingURL=chunk-D44BBBSZ.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../src/resolver/jsdelivr.ts"],"sourcesContent":["import { defineResolve } from '../resolve'\nimport type { HTMLTagDescriptor } from '../resolve'\n\nexport function jsdelivr(options: HTMLTagDescriptor = {}) {\n const { injectTo = 'head-prepend', attrs = {} } = options\n const baseURL = 'https://cdn.jsdelivr.net/npm/'\n return defineResolve({\n name: 'resolve:jsdelivr',\n setup({ extra }) {\n const { version, name, relativeModule } = extra\n const url = new URL(`${name}@${version}/${relativeModule}`, baseURL)\n return {\n url: url.href,\n injectTo,\n attrs: { ...attrs }\n }\n }\n })\n}\n"],"mappings":"yCAAAA,IAGO,SAASC,EAASC,EAA6B,CAAC,EAAG,CACxD,GAAM,CAAE,SAAAC,EAAW,eAAgB,MAAAC,EAAQ,CAAC,CAAE,EAAIF,EAC5CG,EAAU,gCAChB,MAAqB,CACnB,KAAM,mBACN,MAAM,CAAE,MAAAC,CAAM,EAAG,CACf,GAAM,CAAE,QAAAC,EAAS,KAAAC,EAAM,eAAAC,CAAe,EAAIH,EAE1C,MAAO,CACL,IAFU,IAAI,IAAI,GAAGE,CAAI,IAAID,CAAO,IAAIE,CAAc,GAAIJ,CAAO,EAExD,KACT,SAAAF,EACA,MAAO,CAAE,GAAGC,CAAM,CACpB,CACF,CACF,CACF","names":["init_esm_shims","jsdelivr","options","injectTo","attrs","baseURL","extra","version","name","relativeModule"]}
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
import{a as Tu,b as f,c as Cu,d as i}from"./chunk-ULCZGLAT.mjs";var Dt=f((Ld,Rt)=>{"use strict";i();var Nu="Function.prototype.bind called on incompatible ",Fu=Object.prototype.toString,Ru=Math.max,Du="[object Function]",Ft=function(e,t){for(var n=[],o=0;o<e.length;o+=1)n[o]=e[o];for(var a=0;a<t.length;a+=1)n[a+e.length]=t[a];return n},_u=function(e,t){for(var n=[],o=t||0,a=0;o<e.length;o+=1,a+=1)n[a]=e[o];return n},Wu=function(r,e){for(var t="",n=0;n<r.length;n+=1)t+=r[n],n+1<r.length&&(t+=e);return t};Rt.exports=function(e){var t=this;if(typeof t!="function"||Fu.apply(t)!==Du)throw new TypeError(Nu+t);for(var n=_u(arguments,1),o,a=function(){if(this instanceof o){var g=t.apply(this,Ft(n,arguments));return Object(g)===g?g:this}return t.apply(e,Ft(n,arguments))},c=Ru(0,t.length-n.length),y=[],v=0;v<c;v++)y[v]="$"+v;if(o=Function("binder","return function ("+Wu(y,",")+"){ return binder.apply(this,arguments); }")(a),t.prototype){var l=function(){};l.prototype=t.prototype,o.prototype=new l,l.prototype=null}return o}});var te=f((zd,_t)=>{"use strict";i();var ju=Dt();_t.exports=Function.prototype.bind||ju});var gr=f((Jd,jt)=>{"use strict";i();var Wt=Object.prototype.toString;jt.exports=function(e){var t=Wt.call(e),n=t==="[object Arguments]";return n||(n=t!=="[object Array]"&&e!==null&&typeof e=="object"&&typeof e.length=="number"&&e.length>=0&&Wt.call(e.callee)==="[object Function]"),n}});var Kt=f((Xd,zt)=>{"use strict";i();var Ht;Object.keys||(Se=Object.prototype.hasOwnProperty,mr=Object.prototype.toString,kt=gr(),hr=Object.prototype.propertyIsEnumerable,Gt=!hr.call({toString:null},"toString"),Bt=hr.call(function(){},"prototype"),qe=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],Ve=function(r){var e=r.constructor;return e&&e.prototype===r},Ut={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},Vt=function(){if(typeof window>"u")return!1;for(var r in window)try{if(!Ut["$"+r]&&Se.call(window,r)&&window[r]!==null&&typeof window[r]=="object")try{Ve(window[r])}catch{return!0}}catch{return!0}return!1}(),Lt=function(r){if(typeof window>"u"||!Vt)return Ve(r);try{return Ve(r)}catch{return!1}},Ht=function(e){var t=e!==null&&typeof e=="object",n=mr.call(e)==="[object Function]",o=kt(e),a=t&&mr.call(e)==="[object String]",c=[];if(!t&&!n&&!o)throw new TypeError("Object.keys called on a non-object");var y=Bt&&n;if(a&&e.length>0&&!Se.call(e,0))for(var v=0;v<e.length;++v)c.push(String(v));if(o&&e.length>0)for(var l=0;l<e.length;++l)c.push(String(l));else for(var g in e)!(y&&g==="prototype")&&Se.call(e,g)&&c.push(String(g));if(Gt)for(var h=Lt(e),d=0;d<qe.length;++d)!(h&&qe[d]==="constructor")&&Se.call(e,qe[d])&&c.push(qe[d]);return c});var Se,mr,kt,hr,Gt,Bt,qe,Ve,Ut,Vt,Lt;zt.exports=Ht});var Qt=f((Zd,Xt)=>{"use strict";i();var ku=Array.prototype.slice,Gu=gr(),Jt=Object.keys,Le=Jt?function(e){return Jt(e)}:Kt(),Yt=Object.keys;Le.shim=function(){if(Object.keys){var e=function(){var t=Object.keys(arguments);return t&&t.length===arguments.length}(1,2);e||(Object.keys=function(n){return Gu(n)?Yt(ku.call(n)):Yt(n)})}else Object.keys=Le;return Object.keys||Le};Xt.exports=Le});var ue=f((rv,Zt)=>{"use strict";i();var He=Object.defineProperty||!1;if(He)try{He({},"a",{value:1})}catch{He=!1}Zt.exports=He});var Y=f((nv,en)=>{"use strict";i();en.exports=SyntaxError});var m=f((iv,rn)=>{"use strict";i();rn.exports=TypeError});var nn=f((sv,tn)=>{"use strict";i();tn.exports=Object.getOwnPropertyDescriptor});var X=f((fv,on)=>{"use strict";i();var ze=nn();if(ze)try{ze([],"length")}catch{ze=null}on.exports=ze});var Pe=f((cv,un)=>{"use strict";i();var an=ue(),Bu=Y(),fe=m(),sn=X();un.exports=function(e,t,n){if(!e||typeof e!="object"&&typeof e!="function")throw new fe("`obj` must be an object or a function`");if(typeof t!="string"&&typeof t!="symbol")throw new fe("`property` must be a string or a symbol`");if(arguments.length>3&&typeof arguments[3]!="boolean"&&arguments[3]!==null)throw new fe("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&typeof arguments[4]!="boolean"&&arguments[4]!==null)throw new fe("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&typeof arguments[5]!="boolean"&&arguments[5]!==null)throw new fe("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&typeof arguments[6]!="boolean")throw new fe("`loose`, if provided, must be a boolean");var o=arguments.length>3?arguments[3]:null,a=arguments.length>4?arguments[4]:null,c=arguments.length>5?arguments[5]:null,y=arguments.length>6?arguments[6]:!1,v=!!sn&&sn(e,t);if(an)an(e,t,{configurable:c===null&&v?v.configurable:!c,enumerable:o===null&&v?v.enumerable:!o,value:n,writable:a===null&&v?v.writable:!a});else if(y||!o&&!a&&!c)e[t]=n;else throw new Bu("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.")}});var le=f((yv,ln)=>{"use strict";i();var br=ue(),fn=function(){return!!br};fn.hasArrayLengthDefineBug=function(){if(!br)return null;try{return br([],"length",{value:1}).length!==1}catch{return!0}};ln.exports=fn});var Ae=f((vv,dn)=>{"use strict";i();var Uu=Qt(),Vu=typeof Symbol=="function"&&typeof Symbol("foo")=="symbol",Lu=Object.prototype.toString,Hu=Array.prototype.concat,cn=Pe(),zu=function(r){return typeof r=="function"&&Lu.call(r)==="[object Function]"},pn=le()(),Ku=function(r,e,t,n){if(e in r){if(n===!0){if(r[e]===t)return}else if(!zu(n)||!n())return}pn?cn(r,e,t,!0):cn(r,e,t)},yn=function(r,e){var t=arguments.length>2?arguments[2]:{},n=Uu(e);Vu&&(n=Hu.call(n,Object.getOwnPropertySymbols(e)));for(var o=0;o<n.length;o+=1)Ku(r,n[o],e[n[o]],t[n[o]])};yn.supportsDescriptors=!!pn;dn.exports=yn});var gn=f((mv,vn)=>{"use strict";i();var Ee=function(){return typeof function(){}.name=="string"},xe=Object.getOwnPropertyDescriptor;if(xe)try{xe([],"length")}catch{xe=null}Ee.functionsHaveConfigurableNames=function(){if(!Ee()||!xe)return!1;var e=xe(function(){},"name");return!!e&&!!e.configurable};var Ju=Function.prototype.bind;Ee.boundFunctionsHaveNames=function(){return Ee()&&typeof Ju=="function"&&function(){}.bind().name!==""};vn.exports=Ee});var bn=f((bv,hn)=>{"use strict";i();var mn=Pe(),Yu=le()(),Xu=gn().functionsHaveConfigurableNames(),Qu=m();hn.exports=function(e,t){if(typeof e!="function")throw new Qu("`fn` is not a function");var n=arguments.length>2&&!!arguments[2];return(!n||Xu)&&(Yu?mn(e,"name",t,!0,!0):mn(e,"name",t)),e}});var V=f((Sv,wn)=>{"use strict";i();wn.exports=function(e){return typeof e=="string"||typeof e=="symbol"}});var L=f((Pv,Sn)=>{"use strict";i();var Zu=Function.prototype.call,ef=Object.prototype.hasOwnProperty,rf=te();Sn.exports=rf.call(Zu,ef)});var k=f((xv,qn)=>{"use strict";i();var tf=m(),Ie=L(),nf={__proto__:null,"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Get]]":!0,"[[Set]]":!0,"[[Value]]":!0,"[[Writable]]":!0};qn.exports=function(e){if(!e||typeof e!="object")return!1;for(var t in e)if(Ie(e,t)&&!nf[t])return!1;var n=Ie(e,"[[Value]]")||Ie(e,"[[Writable]]"),o=Ie(e,"[[Get]]")||Ie(e,"[[Set]]");if(n&&o)throw new tf("Property Descriptors may not be both accessor and data descriptors");return!0}});var Ke=f((Iv,An)=>{"use strict";i();var of=m(),Pn=L(),af=k();An.exports=function(e){if(typeof e>"u")return!1;if(!af(e))throw new of("Assertion failed: `Desc` must be a Property Descriptor");return!(!Pn(e,"[[Get]]")&&!Pn(e,"[[Set]]"))}});var Je=f(($v,xn)=>{"use strict";i();xn.exports=Object});var wr=f((Tv,En)=>{"use strict";i();En.exports=Error});var On=f((Nv,In)=>{"use strict";i();In.exports=EvalError});var Mn=f((Rv,$n)=>{"use strict";i();$n.exports=RangeError});var Cn=f((_v,Tn)=>{"use strict";i();Tn.exports=ReferenceError});var Fn=f((jv,Nn)=>{"use strict";i();Nn.exports=URIError});var Sr=f((Gv,Rn)=>{"use strict";i();Rn.exports=Math.abs});var qr=f((Uv,Dn)=>{"use strict";i();Dn.exports=Math.floor});var Wn=f((Lv,_n)=>{"use strict";i();_n.exports=Math.max});var kn=f((zv,jn)=>{"use strict";i();jn.exports=Math.min});var Bn=f((Jv,Gn)=>{"use strict";i();Gn.exports=Math.pow});var Vn=f((Xv,Un)=>{"use strict";i();Un.exports=Math.round});var ce=f((Zv,Ln)=>{"use strict";i();Ln.exports=Number.isNaN||function(e){return e!==e}});var zn=f((rg,Hn)=>{"use strict";i();var sf=ce();Hn.exports=function(e){return sf(e)||e===0?e:e<0?-1:1}});var Pr=f((ng,Kn)=>{"use strict";i();Kn.exports=function(){if(typeof Symbol!="function"||typeof Object.getOwnPropertySymbols!="function")return!1;if(typeof Symbol.iterator=="symbol")return!0;var e={},t=Symbol("test"),n=Object(t);if(typeof t=="string"||Object.prototype.toString.call(t)!=="[object Symbol]"||Object.prototype.toString.call(n)!=="[object Symbol]")return!1;var o=42;e[t]=o;for(var a in e)return!1;if(typeof Object.keys=="function"&&Object.keys(e).length!==0||typeof Object.getOwnPropertyNames=="function"&&Object.getOwnPropertyNames(e).length!==0)return!1;var c=Object.getOwnPropertySymbols(e);if(c.length!==1||c[0]!==t||!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if(typeof Object.getOwnPropertyDescriptor=="function"){var y=Object.getOwnPropertyDescriptor(e,t);if(y.value!==o||y.enumerable!==!0)return!1}return!0}});var Ye=f((ig,Yn)=>{"use strict";i();var Jn=typeof Symbol<"u"&&Symbol,uf=Pr();Yn.exports=function(){return typeof Jn!="function"||typeof Symbol!="function"||typeof Jn("foo")!="symbol"||typeof Symbol("bar")!="symbol"?!1:uf()}});var Ar=f((sg,Xn)=>{"use strict";i();Xn.exports=typeof Reflect<"u"&&Reflect.getPrototypeOf||null});var xr=f((fg,Qn)=>{"use strict";i();var ff=Je();Qn.exports=ff.getPrototypeOf||null});var Xe=f((cg,Zn)=>{"use strict";i();Zn.exports=Function.prototype.call});var Qe=f((yg,eo)=>{"use strict";i();eo.exports=Function.prototype.apply});var to=f((vg,ro)=>{"use strict";i();ro.exports=typeof Reflect<"u"&&Reflect&&Reflect.apply});var Er=f((mg,no)=>{"use strict";i();var lf=te(),cf=Qe(),pf=Xe(),yf=to();no.exports=yf||lf.call(pf,cf)});var Oe=f((bg,oo)=>{"use strict";i();var df=te(),vf=m(),gf=Xe(),mf=Er();oo.exports=function(e){if(e.length<1||typeof e[0]!="function")throw new vf("a function is required");return mf(df,gf,e)}});var lo=f((Sg,fo)=>{"use strict";i();var hf=Oe(),io=X(),so;try{so=[].__proto__===Array.prototype}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var Ir=!!so&&io&&io(Object.prototype,"__proto__"),uo=Object,ao=uo.getPrototypeOf;fo.exports=Ir&&typeof Ir.get=="function"?hf([Ir.get]):typeof ao=="function"?function(e){return ao(e==null?e:uo(e))}:!1});var Or=f((Pg,vo)=>{"use strict";i();var co=Ar(),po=xr(),yo=lo();vo.exports=co?function(e){return co(e)}:po?function(e){if(!e||typeof e!="object"&&typeof e!="function")throw new TypeError("getProto: not an object");return po(e)}:yo?function(e){return yo(e)}:null});var C=f((xg,So)=>{"use strict";i();var S,bf=Je(),wf=wr(),Sf=On(),qf=Mn(),Pf=Cn(),ve=Y(),de=m(),Af=Fn(),xf=Sr(),Ef=qr(),If=Wn(),Of=kn(),$f=Bn(),Mf=Vn(),Tf=zn(),bo=Function,$r=function(r){try{return bo('"use strict"; return ('+r+").constructor;")()}catch{}},$e=X(),Cf=ue(),Mr=function(){throw new de},Nf=$e?function(){try{return arguments.callee,Mr}catch{try{return $e(arguments,"callee").get}catch{return Mr}}}():Mr,pe=Ye()(),I=Or(),Ff=xr(),Rf=Ar(),wo=Qe(),Me=Xe(),ye={},Df=typeof Uint8Array>"u"||!I?S:I(Uint8Array),ne={__proto__:null,"%AggregateError%":typeof AggregateError>"u"?S:AggregateError,"%Array%":Array,"%ArrayBuffer%":typeof ArrayBuffer>"u"?S:ArrayBuffer,"%ArrayIteratorPrototype%":pe&&I?I([][Symbol.iterator]()):S,"%AsyncFromSyncIteratorPrototype%":S,"%AsyncFunction%":ye,"%AsyncGenerator%":ye,"%AsyncGeneratorFunction%":ye,"%AsyncIteratorPrototype%":ye,"%Atomics%":typeof Atomics>"u"?S:Atomics,"%BigInt%":typeof BigInt>"u"?S:BigInt,"%BigInt64Array%":typeof BigInt64Array>"u"?S:BigInt64Array,"%BigUint64Array%":typeof BigUint64Array>"u"?S:BigUint64Array,"%Boolean%":Boolean,"%DataView%":typeof DataView>"u"?S:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":wf,"%eval%":eval,"%EvalError%":Sf,"%Float32Array%":typeof Float32Array>"u"?S:Float32Array,"%Float64Array%":typeof Float64Array>"u"?S:Float64Array,"%FinalizationRegistry%":typeof FinalizationRegistry>"u"?S:FinalizationRegistry,"%Function%":bo,"%GeneratorFunction%":ye,"%Int8Array%":typeof Int8Array>"u"?S:Int8Array,"%Int16Array%":typeof Int16Array>"u"?S:Int16Array,"%Int32Array%":typeof Int32Array>"u"?S:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":pe&&I?I(I([][Symbol.iterator]())):S,"%JSON%":typeof JSON=="object"?JSON:S,"%Map%":typeof Map>"u"?S:Map,"%MapIteratorPrototype%":typeof Map>"u"||!pe||!I?S:I(new Map()[Symbol.iterator]()),"%Math%":Math,"%Number%":Number,"%Object%":bf,"%Object.getOwnPropertyDescriptor%":$e,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":typeof Promise>"u"?S:Promise,"%Proxy%":typeof Proxy>"u"?S:Proxy,"%RangeError%":qf,"%ReferenceError%":Pf,"%Reflect%":typeof Reflect>"u"?S:Reflect,"%RegExp%":RegExp,"%Set%":typeof Set>"u"?S:Set,"%SetIteratorPrototype%":typeof Set>"u"||!pe||!I?S:I(new Set()[Symbol.iterator]()),"%SharedArrayBuffer%":typeof SharedArrayBuffer>"u"?S:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":pe&&I?I(""[Symbol.iterator]()):S,"%Symbol%":pe?Symbol:S,"%SyntaxError%":ve,"%ThrowTypeError%":Nf,"%TypedArray%":Df,"%TypeError%":de,"%Uint8Array%":typeof Uint8Array>"u"?S:Uint8Array,"%Uint8ClampedArray%":typeof Uint8ClampedArray>"u"?S:Uint8ClampedArray,"%Uint16Array%":typeof Uint16Array>"u"?S:Uint16Array,"%Uint32Array%":typeof Uint32Array>"u"?S:Uint32Array,"%URIError%":Af,"%WeakMap%":typeof WeakMap>"u"?S:WeakMap,"%WeakRef%":typeof WeakRef>"u"?S:WeakRef,"%WeakSet%":typeof WeakSet>"u"?S:WeakSet,"%Function.prototype.call%":Me,"%Function.prototype.apply%":wo,"%Object.defineProperty%":Cf,"%Object.getPrototypeOf%":Ff,"%Math.abs%":xf,"%Math.floor%":Ef,"%Math.max%":If,"%Math.min%":Of,"%Math.pow%":$f,"%Math.round%":Mf,"%Math.sign%":Tf,"%Reflect.getPrototypeOf%":Rf};if(I)try{null.error}catch(r){go=I(I(r)),ne["%Error.prototype%"]=go}var go,_f=function r(e){var t;if(e==="%AsyncFunction%")t=$r("async function () {}");else if(e==="%GeneratorFunction%")t=$r("function* () {}");else if(e==="%AsyncGeneratorFunction%")t=$r("async function* () {}");else if(e==="%AsyncGenerator%"){var n=r("%AsyncGeneratorFunction%");n&&(t=n.prototype)}else if(e==="%AsyncIteratorPrototype%"){var o=r("%AsyncGenerator%");o&&I&&(t=I(o.prototype))}return ne[e]=t,t},mo={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},Te=te(),Ze=L(),Wf=Te.call(Me,Array.prototype.concat),jf=Te.call(wo,Array.prototype.splice),ho=Te.call(Me,String.prototype.replace),er=Te.call(Me,String.prototype.slice),kf=Te.call(Me,RegExp.prototype.exec),Gf=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,Bf=/\\(\\)?/g,Uf=function(e){var t=er(e,0,1),n=er(e,-1);if(t==="%"&&n!=="%")throw new ve("invalid intrinsic syntax, expected closing `%`");if(n==="%"&&t!=="%")throw new ve("invalid intrinsic syntax, expected opening `%`");var o=[];return ho(e,Gf,function(a,c,y,v){o[o.length]=y?ho(v,Bf,"$1"):c||a}),o},Vf=function(e,t){var n=e,o;if(Ze(mo,n)&&(o=mo[n],n="%"+o[0]+"%"),Ze(ne,n)){var a=ne[n];if(a===ye&&(a=_f(n)),typeof a>"u"&&!t)throw new de("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:o,name:n,value:a}}throw new ve("intrinsic "+e+" does not exist!")};So.exports=function(e,t){if(typeof e!="string"||e.length===0)throw new de("intrinsic name must be a non-empty string");if(arguments.length>1&&typeof t!="boolean")throw new de('"allowMissing" argument must be a boolean');if(kf(/^%?[^%]*%?$/,e)===null)throw new ve("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var n=Uf(e),o=n.length>0?n[0]:"",a=Vf("%"+o+"%",t),c=a.name,y=a.value,v=!1,l=a.alias;l&&(o=l[0],jf(n,Wf([0,1],l)));for(var g=1,h=!0;g<n.length;g+=1){var d=n[g],b=er(d,0,1),q=er(d,-1);if((b==='"'||b==="'"||b==="`"||q==='"'||q==="'"||q==="`")&&b!==q)throw new ve("property names with quotes must have matching quotes");if((d==="constructor"||!h)&&(v=!0),o+="."+d,c="%"+o+"%",Ze(ne,c))y=ne[c];else if(y!=null){if(!(d in y)){if(!t)throw new de("base intrinsic for "+e+" exists, but the property is not available.");return}if($e&&g+1>=n.length){var P=$e(y,d);h=!!P,h&&"get"in P&&!("originalValue"in P.get)?y=P.get:y=y[d]}else h=Ze(y,d),y=y[d];h&&!v&&(ne[c]=y)}}return y}});var Po=f((Ig,qo)=>{"use strict";i();qo.exports=function(e){return e===null||typeof e!="function"&&typeof e!="object"}});var Io=f(($g,Eo)=>{"use strict";i();var xo=C(),Lf=xo("%Object.preventExtensions%",!0),Hf=xo("%Object.isExtensible%",!0),Ao=Po();Eo.exports=Lf?function(e){return!Ao(e)&&Hf(e)}:function(e){return!Ao(e)}});var To=f((Tg,Mo)=>{"use strict";i();var $o=Function.prototype.toString,ge=typeof Reflect=="object"&&Reflect!==null&&Reflect.apply,Cr,rr;if(typeof ge=="function"&&typeof Object.defineProperty=="function")try{Cr=Object.defineProperty({},"length",{get:function(){throw rr}}),rr={},ge(function(){throw 42},null,Cr)}catch(r){r!==rr&&(ge=null)}else ge=null;var zf=/^\s*class\b/,Nr=function(e){try{var t=$o.call(e);return zf.test(t)}catch{return!1}},Tr=function(e){try{return Nr(e)?!1:($o.call(e),!0)}catch{return!1}},tr=Object.prototype.toString,Kf="[object Object]",Jf="[object Function]",Yf="[object GeneratorFunction]",Xf="[object HTMLAllCollection]",Qf="[object HTML document.all class]",Zf="[object HTMLCollection]",el=typeof Symbol=="function"&&!!Symbol.toStringTag,rl=!(0 in[,]),Fr=function(){return!1};typeof document=="object"&&(Oo=document.all,tr.call(Oo)===tr.call(document.all)&&(Fr=function(e){if((rl||!e)&&(typeof e>"u"||typeof e=="object"))try{var t=tr.call(e);return(t===Xf||t===Qf||t===Zf||t===Kf)&&e("")==null}catch{}return!1}));var Oo;Mo.exports=ge?function(e){if(Fr(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;try{ge(e,null,Cr)}catch(t){if(t!==rr)return!1}return!Nr(e)&&Tr(e)}:function(e){if(Fr(e))return!0;if(!e||typeof e!="function"&&typeof e!="object")return!1;if(el)return Tr(e);if(Nr(e))return!1;var t=tr.call(e);return t!==Jf&&t!==Yf&&!/^\[object HTML/.test(t)?!1:Tr(e)}});var nr=f((Ng,Co)=>{"use strict";i();Co.exports=To()});var Rr=f((Rg,No)=>{"use strict";i();No.exports=function(e){return!!e}});var O=f((_g,Fo)=>{"use strict";i();Fo.exports=function(e){return!!e&&(typeof e=="function"||typeof e=="object")}});var _o=f((jg,Do)=>{"use strict";i();var G=L(),or=m(),Ro=nr(),Dr=Rr(),tl=O();Do.exports=function(e){if(!tl(e))throw new or("ToPropertyDescriptor requires an object");var t={};if(G(e,"enumerable")&&(t["[[Enumerable]]"]=Dr(e.enumerable)),G(e,"configurable")&&(t["[[Configurable]]"]=Dr(e.configurable)),G(e,"value")&&(t["[[Value]]"]=e.value),G(e,"writable")&&(t["[[Writable]]"]=Dr(e.writable)),G(e,"get")){var n=e.get;if(typeof n<"u"&&!Ro(n))throw new or("getter must be a function");t["[[Get]]"]=n}if(G(e,"set")){var o=e.set;if(typeof o<"u"&&!Ro(o))throw new or("setter must be a function");t["[[Set]]"]=o}if((G(t,"[[Get]]")||G(t,"[[Set]]"))&&(G(t,"[[Value]]")||G(t,"[[Writable]]")))throw new or("Invalid property descriptor. Cannot both specify accessors and a value or writable attribute");return t}});var _r=f((Gg,jo)=>{"use strict";i();var Wo=ce();jo.exports=function(e,t){return e===t?e===0?1/e===1/t:!0:Wo(e)&&Wo(t)}});var D=f((Ug,Bo)=>{"use strict";i();var ko=C(),Go=Oe(),nl=Go([ko("%String.prototype.indexOf%")]);Bo.exports=function(e,t){var n=ko(e,!!t);return typeof n=="function"&&nl(e,".prototype.")>-1?Go([n]):n}});var Wr=f((Lg,Vo)=>{"use strict";i();var ol=C(),Uo=ol("%Array%"),il=!Uo.isArray&&D()("Object.prototype.toString");Vo.exports=Uo.isArray||function(e){return il(e)==="[object Array]"}});var jr=f((zg,zo)=>{"use strict";i();var al=le(),Lo=ue(),Ho=al.hasArrayLengthDefineBug(),sl=Ho&&Wr(),ul=D(),fl=ul("Object.prototype.propertyIsEnumerable");zo.exports=function(e,t,n,o,a,c){if(!Lo){if(!e(c)||!c["[[Configurable]]"]||!c["[[Writable]]"]||a in o&&fl(o,a)!==!!c["[[Enumerable]]"])return!1;var y=c["[[Value]]"];return o[a]=y,t(o[a],y)}return Ho&&a==="length"&&"[[Value]]"in c&&sl(o)&&o.length!==c["[[Value]]"]?(o.length=c["[[Value]]"],o.length===c["[[Value]]"]):(Lo(o,a,n(c)),!0)}});var Jo=f((Jg,Ko)=>{"use strict";i();var ll=k();Ko.exports=function(e,t){return ll(t)&&"[[Enumerable]]"in t&&"[[Configurable]]"in t&&(e.IsAccessorDescriptor(t)||e.IsDataDescriptor(t))}});var kr=f((Xg,Yo)=>{"use strict";i();Yo.exports=function(e){if(typeof e>"u")return e;var t={};return"[[Value]]"in e&&(t.value=e["[[Value]]"]),"[[Writable]]"in e&&(t.writable=!!e["[[Writable]]"]),"[[Get]]"in e&&(t.get=e["[[Get]]"]),"[[Set]]"in e&&(t.set=e["[[Set]]"]),"[[Enumerable]]"in e&&(t.enumerable=!!e["[[Enumerable]]"]),"[[Configurable]]"in e&&(t.configurable=!!e["[[Configurable]]"]),t}});var Qo=f((Zg,Xo)=>{"use strict";i();var cl=m(),pl=k(),yl=kr();Xo.exports=function(e){if(typeof e<"u"&&!pl(e))throw new cl("Assertion failed: `Desc` must be a Property Descriptor");return yl(e)}});var Gr=f((rm,ei)=>{"use strict";i();var dl=m(),Zo=L(),vl=k();ei.exports=function(e){if(typeof e>"u")return!1;if(!vl(e))throw new dl("Assertion failed: `Desc` must be a Property Descriptor");return!(!Zo(e,"[[Value]]")&&!Zo(e,"[[Writable]]"))}});var ti=f((nm,ri)=>{"use strict";i();var gl=m(),ml=Ke(),hl=Gr(),bl=k();ri.exports=function(e){if(typeof e>"u")return!1;if(!bl(e))throw new gl("Assertion failed: `Desc` must be a Property Descriptor");return!ml(e)&&!hl(e)}});var oi=f((im,ni)=>{"use strict";i();var wl=O();ni.exports=function(e){if(e===null)return"Null";if(typeof e>"u")return"Undefined";if(wl(e))return"Object";if(typeof e=="number")return"Number";if(typeof e=="boolean")return"Boolean";if(typeof e=="string")return"String"}});var ai=f((sm,ii)=>{"use strict";i();var Sl=oi();ii.exports=function(e){return typeof e=="symbol"?"Symbol":typeof e=="bigint"?"BigInt":Sl(e)}});var fi=f((fm,ui)=>{"use strict";i();var me=m(),Ce=jr(),ql=Jo(),si=k(),Ne=Qo(),oe=Ke(),Q=Gr(),Pl=ti(),Al=V(),B=_r(),xl=ai(),El=O();ui.exports=function(e,t,n,o,a){var c=xl(e);if(typeof e<"u"&&!El(e))throw new me("Assertion failed: O must be undefined or an Object");if(!Al(t))throw new me("Assertion failed: P must be a Property Key");if(typeof n!="boolean")throw new me("Assertion failed: extensible must be a Boolean");if(!si(o))throw new me("Assertion failed: Desc must be a Property Descriptor");if(typeof a<"u"&&!si(a))throw new me("Assertion failed: current must be a Property Descriptor, or undefined");if(typeof a>"u")return n?c==="Undefined"?!0:oe(o)?Ce(Q,B,Ne,e,t,o):Ce(Q,B,Ne,e,t,{"[[Configurable]]":!!o["[[Configurable]]"],"[[Enumerable]]":!!o["[[Enumerable]]"],"[[Value]]":o["[[Value]]"],"[[Writable]]":!!o["[[Writable]]"]}):!1;if(!ql({IsAccessorDescriptor:oe,IsDataDescriptor:Q},a))throw new me("`current`, when present, must be a fully populated and valid Property Descriptor");if(!a["[[Configurable]]"]){if("[[Configurable]]"in o&&o["[[Configurable]]"]||"[[Enumerable]]"in o&&!B(o["[[Enumerable]]"],a["[[Enumerable]]"])||!Pl(o)&&!B(oe(o),oe(a)))return!1;if(oe(a)){if("[[Get]]"in o&&!B(o["[[Get]]"],a["[[Get]]"])||"[[Set]]"in o&&!B(o["[[Set]]"],a["[[Set]]"]))return!1}else if(!a["[[Writable]]"]&&("[[Writable]]"in o&&o["[[Writable]]"]||"[[Value]]"in o&&!B(o["[[Value]]"],a["[[Value]]"])))return!1}if(c!=="Undefined"){var y,v;return Q(a)&&oe(o)?(y=("[[Configurable]]"in o?o:a)["[[Configurable]]"],v=("[[Enumerable]]"in o?o:a)["[[Enumerable]]"],Ce(Q,B,Ne,e,t,{"[[Configurable]]":!!y,"[[Enumerable]]":!!v,"[[Get]]":("[[Get]]"in o?o:a)["[[Get]]"],"[[Set]]":("[[Set]]"in o?o:a)["[[Set]]"]})):oe(a)&&Q(o)?(y=("[[Configurable]]"in o?o:a)["[[Configurable]]"],v=("[[Enumerable]]"in o?o:a)["[[Enumerable]]"],Ce(Q,B,Ne,e,t,{"[[Configurable]]":!!y,"[[Enumerable]]":!!v,"[[Value]]":("[[Value]]"in o?o:a)["[[Value]]"],"[[Writable]]":!!("[[Writable]]"in o?o:a)["[[Writable]]"]})):Ce(Q,B,Ne,e,t,o)}return!0}});var yi=f((cm,pi)=>{"use strict";i();var li=X(),ci=Y(),Br=m(),Il=k(),Ol=Ke(),$l=Io(),Ml=V(),Tl=_o(),Cl=_r(),Nl=fi(),Fl=O();pi.exports=function(e,t,n){if(!Fl(e))throw new Br("Assertion failed: O must be an Object");if(!Ml(t))throw new Br("Assertion failed: P must be a Property Key");if(!Il(n))throw new Br("Assertion failed: Desc must be a Property Descriptor");if(!li){if(Ol(n))throw new ci("This environment does not support accessor property descriptors.");var o=!(t in e)&&n["[[Writable]]"]&&n["[[Enumerable]]"]&&n["[[Configurable]]"]&&"[[Value]]"in n,a=t in e&&(!("[[Configurable]]"in n)||n["[[Configurable]]"])&&(!("[[Enumerable]]"in n)||n["[[Enumerable]]"])&&(!("[[Writable]]"in n)||n["[[Writable]]"])&&"[[Value]]"in n;if(o||a)return e[t]=n["[[Value]]"],Cl(e[t],n["[[Value]]"]);throw new ci("This environment does not support defining non-writable, non-enumerable, or non-configurable properties")}var c=li(e,t),y=c&&Tl(c),v=$l(e);return Nl(e,t,v,n,y)}});var gi=f((ym,vi)=>{"use strict";i();var di=m(),Rl=V(),Dl=yi(),_l=O();vi.exports=function(e,t,n){if(!_l(e))throw new di("Assertion failed: Type(O) is not Object");if(!Rl(t))throw new di("Assertion failed: P is not a Property Key");var o={"[[Configurable]]":!0,"[[Enumerable]]":!0,"[[Value]]":n,"[[Writable]]":!0};return Dl(e,t,o)}});var hi=f((vm,mi)=>{"use strict";i();var Ur=m(),Wl=gi(),jl=O(),kl=V();mi.exports=function(e,t,n){if(!jl(e))throw new Ur("Assertion failed: Type(O) is not Object");if(!kl(t))throw new Ur("Assertion failed: P is not a Property Key");var o=Wl(e,t,n);if(!o)throw new Ur("unable to create data property")}});var wi=f((mm,bi)=>{"use strict";i();var Gl=m(),Bl=k(),Ul=kr();bi.exports=function(e){if(typeof e<"u"&&!Bl(e))throw new Gl("Assertion failed: `Desc` must be a Property Descriptor");return Ul(e)}});var Pi=f((bm,qi)=>{"use strict";i();var Vl=m(),Si=L(),Ll=k();qi.exports=function(e){if(typeof e>"u")return!1;if(!Ll(e))throw new Vl("Assertion failed: `Desc` must be a Property Descriptor");return!(!Si(e,"[[Value]]")&&!Si(e,"[[Writable]]"))}});var Ei=f((Sm,xi)=>{"use strict";i();var Ai=ce();xi.exports=function(e,t){return e===t?e===0?1/e===1/t:!0:Ai(e)&&Ai(t)}});var $i=f((Pm,Oi)=>{"use strict";i();var Ii=m(),Hl=jr(),zl=wi(),Kl=Pi(),Jl=V(),Yl=Ei(),Xl=O();Oi.exports=function(e,t,n){if(!Xl(e))throw new Ii("Assertion failed: Type(O) is not Object");if(!Jl(t))throw new Ii("Assertion failed: P is not a Property Key");var o={"[[Configurable]]":!0,"[[Enumerable]]":!1,"[[Value]]":n,"[[Writable]]":!0};return Hl(Kl,Yl,zl,e,t,o)}});var Ti=f((xm,Mi)=>{i();Mi.exports=Tu("util").inspect});var z=f((Im,Xi)=>{i();var Zr=typeof Map=="function"&&Map.prototype,Vr=Object.getOwnPropertyDescriptor&&Zr?Object.getOwnPropertyDescriptor(Map.prototype,"size"):null,ar=Zr&&Vr&&typeof Vr.get=="function"?Vr.get:null,Ci=Zr&&Map.prototype.forEach,et=typeof Set=="function"&&Set.prototype,Lr=Object.getOwnPropertyDescriptor&&et?Object.getOwnPropertyDescriptor(Set.prototype,"size"):null,sr=et&&Lr&&typeof Lr.get=="function"?Lr.get:null,Ni=et&&Set.prototype.forEach,Ql=typeof WeakMap=="function"&&WeakMap.prototype,Re=Ql?WeakMap.prototype.has:null,Zl=typeof WeakSet=="function"&&WeakSet.prototype,De=Zl?WeakSet.prototype.has:null,ec=typeof WeakRef=="function"&&WeakRef.prototype,Fi=ec?WeakRef.prototype.deref:null,rc=Boolean.prototype.valueOf,tc=Object.prototype.toString,nc=Function.prototype.toString,oc=String.prototype.match,rt=String.prototype.slice,Z=String.prototype.replace,ic=String.prototype.toUpperCase,Ri=String.prototype.toLowerCase,Vi=RegExp.prototype.test,Di=Array.prototype.concat,U=Array.prototype.join,ac=Array.prototype.slice,_i=Math.floor,Kr=typeof BigInt=="function"?BigInt.prototype.valueOf:null,Hr=Object.getOwnPropertySymbols,Jr=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?Symbol.prototype.toString:null,he=typeof Symbol=="function"&&typeof Symbol.iterator=="object",$=typeof Symbol=="function"&&Symbol.toStringTag&&(typeof Symbol.toStringTag===he||!0)?Symbol.toStringTag:null,Li=Object.prototype.propertyIsEnumerable,Wi=(typeof Reflect=="function"?Reflect.getPrototypeOf:Object.getPrototypeOf)||([].__proto__===Array.prototype?function(r){return r.__proto__}:null);function ji(r,e){if(r===1/0||r===-1/0||r!==r||r&&r>-1e3&&r<1e3||Vi.call(/e/,e))return e;var t=/[0-9](?=(?:[0-9]{3})+(?![0-9]))/g;if(typeof r=="number"){var n=r<0?-_i(-r):_i(r);if(n!==r){var o=String(n),a=rt.call(e,o.length+1);return Z.call(o,t,"$&_")+"."+Z.call(Z.call(a,/([0-9]{3})/g,"$&_"),/_$/,"")}}return Z.call(e,t,"$&_")}var Yr=Ti(),ki=Yr.custom,Gi=Ki(ki)?ki:null,Hi={__proto__:null,double:'"',single:"'"},sc={__proto__:null,double:/(["\\])/g,single:/(['\\])/g};Xi.exports=function r(e,t,n,o){var a=t||{};if(H(a,"quoteStyle")&&!H(Hi,a.quoteStyle))throw new TypeError('option "quoteStyle" must be "single" or "double"');if(H(a,"maxStringLength")&&(typeof a.maxStringLength=="number"?a.maxStringLength<0&&a.maxStringLength!==1/0:a.maxStringLength!==null))throw new TypeError('option "maxStringLength", if provided, must be a positive integer, Infinity, or `null`');var c=H(a,"customInspect")?a.customInspect:!0;if(typeof c!="boolean"&&c!=="symbol")throw new TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");if(H(a,"indent")&&a.indent!==null&&a.indent!==" "&&!(parseInt(a.indent,10)===a.indent&&a.indent>0))throw new TypeError('option "indent" must be "\\t", an integer > 0, or `null`');if(H(a,"numericSeparator")&&typeof a.numericSeparator!="boolean")throw new TypeError('option "numericSeparator", if provided, must be `true` or `false`');var y=a.numericSeparator;if(typeof e>"u")return"undefined";if(e===null)return"null";if(typeof e=="boolean")return e?"true":"false";if(typeof e=="string")return Yi(e,a);if(typeof e=="number"){if(e===0)return 1/0/e>0?"0":"-0";var v=String(e);return y?ji(e,v):v}if(typeof e=="bigint"){var l=String(e)+"n";return y?ji(e,l):l}var g=typeof a.depth>"u"?5:a.depth;if(typeof n>"u"&&(n=0),n>=g&&g>0&&typeof e=="object")return Xr(e)?"[Array]":"[Object]";var h=xc(a,n);if(typeof o>"u")o=[];else if(Ji(o,e)>=0)return"[Circular]";function d(se,Ue,Mu){if(Ue&&(o=ac.call(o),o.push(Ue)),Mu){var Nt={depth:a.depth};return H(a,"quoteStyle")&&(Nt.quoteStyle=a.quoteStyle),r(se,Nt,n+1,o)}return r(se,a,n+1,o)}if(typeof e=="function"&&!Bi(e)){var b=gc(e),q=ir(e,d);return"[Function"+(b?": "+b:" (anonymous)")+"]"+(q.length>0?" { "+U.call(q,", ")+" }":"")}if(Ki(e)){var P=he?Z.call(String(e),/^(Symbol\(.*\))_[^)]*$/,"$1"):Jr.call(e);return typeof e=="object"&&!he?Fe(P):P}if(qc(e)){for(var N="<"+Ri.call(String(e.nodeName)),_=e.attributes||[],W=0;W<_.length;W++)N+=" "+_[W].name+"="+zi(uc(_[W].value),"double",a);return N+=">",e.childNodes&&e.childNodes.length&&(N+="..."),N+="</"+Ri.call(String(e.nodeName))+">",N}if(Xr(e)){if(e.length===0)return"[]";var j=ir(e,d);return h&&!Ac(j)?"["+Qr(j,h)+"]":"[ "+U.call(j,", ")+" ]"}if(lc(e)){var w=ir(e,d);return!("cause"in Error.prototype)&&"cause"in e&&!Li.call(e,"cause")?"{ ["+String(e)+"] "+U.call(Di.call("[cause]: "+d(e.cause),w),", ")+" }":w.length===0?"["+String(e)+"]":"{ ["+String(e)+"] "+U.call(w,", ")+" }"}if(typeof e=="object"&&c){if(Gi&&typeof e[Gi]=="function"&&Yr)return Yr(e,{depth:g-n});if(c!=="symbol"&&typeof e.inspect=="function")return e.inspect()}if(mc(e)){var A=[];return Ci&&Ci.call(e,function(se,Ue){A.push(d(Ue,e,!0)+" => "+d(se,e))}),Ui("Map",ar.call(e),A,h)}if(wc(e)){var F=[];return Ni&&Ni.call(e,function(se){F.push(d(se,e))}),Ui("Set",sr.call(e),F,h)}if(hc(e))return zr("WeakMap");if(Sc(e))return zr("WeakSet");if(bc(e))return zr("WeakRef");if(pc(e))return Fe(d(Number(e)));if(dc(e))return Fe(d(Kr.call(e)));if(yc(e))return Fe(rc.call(e));if(cc(e))return Fe(d(String(e)));if(typeof window<"u"&&e===window)return"{ [object Window] }";if(typeof globalThis<"u"&&e===globalThis||typeof global<"u"&&e===global)return"{ [object globalThis] }";if(!fc(e)&&!Bi(e)){var E=ir(e,d),M=Wi?Wi(e)===Object.prototype:e instanceof Object||e.constructor===Object,x=e instanceof Object?"":"null prototype",T=!M&&$&&Object(e)===e&&$ in e?rt.call(ee(e),8,-1):x?"Object":"",vr=M||typeof e.constructor!="function"?"":e.constructor.name?e.constructor.name+" ":"",J=vr+(T||x?"["+U.call(Di.call([],T||[],x||[]),": ")+"] ":"");return E.length===0?J+"{}":h?J+"{"+Qr(E,h)+"}":J+"{ "+U.call(E,", ")+" }"}return String(e)};function zi(r,e,t){var n=t.quoteStyle||e,o=Hi[n];return o+r+o}function uc(r){return Z.call(String(r),/"/g,""")}function Xr(r){return ee(r)==="[object Array]"&&(!$||!(typeof r=="object"&&$ in r))}function fc(r){return ee(r)==="[object Date]"&&(!$||!(typeof r=="object"&&$ in r))}function Bi(r){return ee(r)==="[object RegExp]"&&(!$||!(typeof r=="object"&&$ in r))}function lc(r){return ee(r)==="[object Error]"&&(!$||!(typeof r=="object"&&$ in r))}function cc(r){return ee(r)==="[object String]"&&(!$||!(typeof r=="object"&&$ in r))}function pc(r){return ee(r)==="[object Number]"&&(!$||!(typeof r=="object"&&$ in r))}function yc(r){return ee(r)==="[object Boolean]"&&(!$||!(typeof r=="object"&&$ in r))}function Ki(r){if(he)return r&&typeof r=="object"&&r instanceof Symbol;if(typeof r=="symbol")return!0;if(!r||typeof r!="object"||!Jr)return!1;try{return Jr.call(r),!0}catch{}return!1}function dc(r){if(!r||typeof r!="object"||!Kr)return!1;try{return Kr.call(r),!0}catch{}return!1}var vc=Object.prototype.hasOwnProperty||function(r){return r in this};function H(r,e){return vc.call(r,e)}function ee(r){return tc.call(r)}function gc(r){if(r.name)return r.name;var e=oc.call(nc.call(r),/^function\s*([\w$]+)/);return e?e[1]:null}function Ji(r,e){if(r.indexOf)return r.indexOf(e);for(var t=0,n=r.length;t<n;t++)if(r[t]===e)return t;return-1}function mc(r){if(!ar||!r||typeof r!="object")return!1;try{ar.call(r);try{sr.call(r)}catch{return!0}return r instanceof Map}catch{}return!1}function hc(r){if(!Re||!r||typeof r!="object")return!1;try{Re.call(r,Re);try{De.call(r,De)}catch{return!0}return r instanceof WeakMap}catch{}return!1}function bc(r){if(!Fi||!r||typeof r!="object")return!1;try{return Fi.call(r),!0}catch{}return!1}function wc(r){if(!sr||!r||typeof r!="object")return!1;try{sr.call(r);try{ar.call(r)}catch{return!0}return r instanceof Set}catch{}return!1}function Sc(r){if(!De||!r||typeof r!="object")return!1;try{De.call(r,De);try{Re.call(r,Re)}catch{return!0}return r instanceof WeakSet}catch{}return!1}function qc(r){return!r||typeof r!="object"?!1:typeof HTMLElement<"u"&&r instanceof HTMLElement?!0:typeof r.nodeName=="string"&&typeof r.getAttribute=="function"}function Yi(r,e){if(r.length>e.maxStringLength){var t=r.length-e.maxStringLength,n="... "+t+" more character"+(t>1?"s":"");return Yi(rt.call(r,0,e.maxStringLength),e)+n}var o=sc[e.quoteStyle||"single"];o.lastIndex=0;var a=Z.call(Z.call(r,o,"\\$1"),/[\x00-\x1f]/g,Pc);return zi(a,"single",e)}function Pc(r){var e=r.charCodeAt(0),t={8:"b",9:"t",10:"n",12:"f",13:"r"}[e];return t?"\\"+t:"\\x"+(e<16?"0":"")+ic.call(e.toString(16))}function Fe(r){return"Object("+r+")"}function zr(r){return r+" { ? }"}function Ui(r,e,t,n){var o=n?Qr(t,n):U.call(t,", ");return r+" ("+e+") {"+o+"}"}function Ac(r){for(var e=0;e<r.length;e++)if(Ji(r[e],`
|
|
2
|
+
`)>=0)return!1;return!0}function xc(r,e){var t;if(r.indent===" ")t=" ";else if(typeof r.indent=="number"&&r.indent>0)t=U.call(Array(r.indent+1)," ");else return null;return{base:t,prev:U.call(Array(e+1),t)}}function Qr(r,e){if(r.length===0)return"";var t=`
|
|
3
|
+
`+e.prev+e.base;return t+U.call(r,","+t)+`
|
|
4
|
+
`+e.prev}function ir(r,e){var t=Xr(r),n=[];if(t){n.length=r.length;for(var o=0;o<r.length;o++)n[o]=H(r,o)?e(r[o],r):""}var a=typeof Hr=="function"?Hr(r):[],c;if(he){c={};for(var y=0;y<a.length;y++)c["$"+a[y]]=a[y]}for(var v in r)H(r,v)&&(t&&String(Number(v))===v&&v<r.length||he&&c["$"+v]instanceof Symbol||(Vi.call(/[^\w$]/,v)?n.push(e(v,r)+": "+e(r[v],r)):n.push(v+": "+e(r[v],r))));if(typeof Hr=="function")for(var l=0;l<a.length;l++)Li.call(r,a[l])&&n.push("["+e(a[l])+"]: "+e(r[a[l]],r));return n}});var tt=f(($m,Qi)=>{"use strict";i();Qi.exports=function(e){return typeof e=="number"&&e>=55296&&e<=56319}});var nt=f((Tm,Zi)=>{"use strict";i();Zi.exports=function(e){return typeof e=="number"&&e>=56320&&e<=57343}});var ta=f((Nm,ra)=>{"use strict";i();var Ec=C(),Ic=m(),ea=Ec("%String.fromCharCode%"),Oc=tt(),$c=nt();ra.exports=function(e,t){if(!Oc(e)||!$c(t))throw new Ic("Assertion failed: `lead` must be a leading surrogate char code, and `trail` must be a trailing surrogate char code");return ea(e)+ea(t)}});var ua=f((Rm,sa)=>{"use strict";i();var na=m(),aa=D(),Mc=tt(),oa=nt(),Tc=ta(),Cc=aa("String.prototype.charAt"),ia=aa("String.prototype.charCodeAt");sa.exports=function(e,t){if(typeof e!="string")throw new na("Assertion failed: `string` must be a String");var n=e.length;if(t<0||t>=n)throw new na("Assertion failed: `position` must be >= 0, and < the length of `string`");var o=ia(e,t),a=Cc(e,t),c=Mc(o),y=oa(o);if(!c&&!y)return{"[[CodePoint]]":a,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!1};if(y||t+1===n)return{"[[CodePoint]]":a,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0};var v=ia(e,t+1);return oa(v)?{"[[CodePoint]]":Tc(o,v),"[[CodeUnitCount]]":2,"[[IsUnpairedSurrogate]]":!1}:{"[[CodePoint]]":a,"[[CodeUnitCount]]":1,"[[IsUnpairedSurrogate]]":!0}}});var la=f((_m,fa)=>{"use strict";i();var Nc=ce();fa.exports=function(e){return(typeof e=="number"||typeof e=="bigint")&&!Nc(e)&&e!==1/0&&e!==-1/0}});var pa=f((jm,ca)=>{"use strict";i();var Fc=Sr(),Rc=qr(),Dc=ce(),_c=la();ca.exports=function(e){if(typeof e!="number"||Dc(e)||!_c(e))return!1;var t=Fc(e);return Rc(t)===t}});var da=f((Gm,ya)=>{"use strict";i();ya.exports=Number.MAX_SAFE_INTEGER||9007199254740991});var ga=f((Um,va)=>{"use strict";i();var Wc=ua(),ot=m(),jc=pa(),kc=da();va.exports=function(e,t,n){if(typeof e!="string")throw new ot("Assertion failed: `S` must be a String");if(!jc(t)||t<0||t>kc)throw new ot("Assertion failed: `length` must be an integer >= 0 and <= 2**53");if(typeof n!="boolean")throw new ot("Assertion failed: `unicode` must be a Boolean");if(!n)return t+1;var o=e.length;if(t+1>=o)return t+1;var a=Wc(e,t);return t+a["[[CodeUnitCount]]"]}});var it=f((Lm,ma)=>{"use strict";i();var Gc=m();ma.exports=function(e,t){if(typeof t!="boolean")throw new Gc("Assertion failed: Type(done) is not Boolean");return{value:e,done:t}}});var _e=f((zm,ba)=>{"use strict";i();var ha=m(),Bc=z(),Uc=O(),Vc=V();ba.exports=function(e,t){if(!Uc(e))throw new ha("Assertion failed: Type(O) is not Object");if(!Vc(t))throw new ha("Assertion failed: P is not a Property Key, got "+Bc(t));return e[t]}});var at=f((Jm,wa)=>{"use strict";i();var Lc=m(),Hc=_e(),zc=Rr(),Kc=O();wa.exports=function(e){if(!Kc(e))throw new Lc("Assertion failed: Type(iterResult) is not Object");return zc(Hc(e,"done"))}});var st=f((Xm,Sa)=>{"use strict";i();var Jc=m(),Yc=_e(),Xc=O();Sa.exports=function(e){if(!Xc(e))throw new Jc("Assertion failed: Type(iterResult) is not Object");return Yc(e,"value")}});var Ea=f((Zm,xa)=>{"use strict";i();var Qc=C(),qa=Pe(),Zc=le()(),Pa=X(),Aa=m(),ep=Qc("%Math.floor%");xa.exports=function(e,t){if(typeof e!="function")throw new Aa("`fn` is not a function");if(typeof t!="number"||t<0||t>4294967295||ep(t)!==t)throw new Aa("`length` must be a positive 32-bit integer");var n=arguments.length>2&&!!arguments[2],o=!0,a=!0;if("length"in e&&Pa){var c=Pa(e,"length");c&&!c.configurable&&(o=!1),c&&!c.writable&&(a=!1)}return(o||a||!n)&&(Zc?qa(e,"length",t,!0,!0):qa(e,"length",t)),e}});var Oa=f((rh,Ia)=>{"use strict";i();var rp=te(),tp=Qe(),np=Er();Ia.exports=function(){return np(rp,tp,arguments)}});var Ta=f((nh,ur)=>{"use strict";i();var op=Ea(),$a=ue(),ip=Oe(),Ma=Oa();ur.exports=function(e){var t=ip(arguments),n=e.length-(arguments.length-1);return op(t,1+(n>0?n:0),!0)};$a?$a(ur.exports,"apply",{value:Ma}):ur.exports.apply=Ma});var Ra=f((ih,Fa)=>{"use strict";i();var ap=C(),sp=Ta(),up=Y(),Ca=ap("%Promise.resolve%",!0),Na=Ca&&sp(Ca);Fa.exports=function(e,t){if(!Na)throw new up("This environment does not support Promises.");return Na(e,t)}});var Wa=f((sh,_a)=>{"use strict";i();var fp=C(),Da=Y(),lp=m(),ut=fp("%Promise%",!0),cp=D(),pp=it(),yp=at(),dp=st(),vp=Ra(),gp=O(),mp=cp("Promise.prototype.then",!0);_a.exports=function(e){if(!gp(e))throw new lp("Assertion failed: Type(O) is not Object");if(arguments.length>1)throw new Da("although AsyncFromSyncIteratorContinuation should take a second argument, it is not used in this implementation");if(!ut)throw new Da("This environment does not support Promises.");return new ut(function(t){var n=yp(e),o=dp(e),a=vp(ut,o),c=function(y){return pp(y,n)};t(mp(a,c))})}});var fr=f((fh,ja)=>{"use strict";i();ja.exports=Wr()});var lr=f((ch,ka)=>{"use strict";i();var hp=C(),bp=D(),wp=m(),Sp=fr(),qp=hp("%Reflect.apply%",!0)||bp("Function.prototype.apply");ka.exports=function(e,t){var n=arguments.length>2?arguments[2]:[];if(!Sp(n))throw new wp("Assertion failed: optional `argumentsList`, if provided, must be a List");return qp(e,t,n)}});var Ba=f((yh,Ga)=>{"use strict";i();var Pp=m(),Ap=z(),xp=V();Ga.exports=function(e,t){if(!xp(t))throw new Pp("Assertion failed: P is not a Property Key, got "+Ap(t));return e[t]}});var ft=f((vh,La)=>{"use strict";i();var Ua=m(),Ep=Ba(),Ip=nr(),Op=V(),Va=z();La.exports=function(e,t){if(!Op(t))throw new Ua("Assertion failed: P is not a Property Key");var n=Ep(e,t);if(n!=null){if(!Ip(n))throw new Ua(Va(t)+" is not a function: "+Va(n));return n}}});var We=f((mh,Ha)=>{"use strict";i();var lt=L();Ha.exports=function(e){return!!e&&typeof e=="object"&<(e,"[[Iterator]]")&<(e,"[[NextMethod]]")&<(e,"[[Done]]")&&typeof e["[[Done]]"]=="boolean"}});var ct=f((bh,Ja)=>{"use strict";i();var za=m(),Ka=lr(),$p=O(),Mp=We();Ja.exports=function(e){if(!Mp(e))throw new za("Assertion failed: `iteratorRecord` must be an Iterator Record");var t;if(arguments.length<2?t=Ka(e["[[NextMethod]]"],e["[[Iterator]]"]):t=Ka(e["[[NextMethod]]"],e["[[Iterator]]"],[arguments[1]]),!$p(t))throw new za("iterator next must return an object");return t}});var Xa=f((Sh,Ya)=>{"use strict";i();Ya.exports=function(e,t){for(var n=0;n<e.length;n+=1)t(e[n],n,e)}});var Za=f((Ph,Qa)=>{"use strict";i();var Tp=z(),Cp=m(),cr=function(r,e,t){for(var n=r,o;(o=n.next)!=null;n=o)if(o.key===e)return n.next=o.next,t||(o.next=r.next,r.next=o),o},Np=function(r,e){if(r){var t=cr(r,e);return t&&t.value}},Fp=function(r,e,t){var n=cr(r,e);n?n.value=t:r.next={key:e,next:r.next,value:t}},Rp=function(r,e){return r?!!cr(r,e):!1},Dp=function(r,e){if(r)return cr(r,e,!0)};Qa.exports=function(){var e,t={assert:function(n){if(!t.has(n))throw new Cp("Side channel does not contain "+Tp(n))},delete:function(n){var o=e&&e.next,a=Dp(e,n);return a&&o&&o===a&&(e=void 0),!!a},get:function(n){return Np(e,n)},has:function(n){return Rp(e,n)},set:function(n,o){e||(e={next:void 0}),Fp(e,n,o)}};return t}});var pt=f((xh,rs)=>{"use strict";i();var _p=C(),je=D(),Wp=z(),jp=m(),es=_p("%Map%",!0),kp=je("Map.prototype.get",!0),Gp=je("Map.prototype.set",!0),Bp=je("Map.prototype.has",!0),Up=je("Map.prototype.delete",!0),Vp=je("Map.prototype.size",!0);rs.exports=!!es&&function(){var e,t={assert:function(n){if(!t.has(n))throw new jp("Side channel does not contain "+Wp(n))},delete:function(n){if(e){var o=Up(e,n);return Vp(e)===0&&(e=void 0),o}return!1},get:function(n){if(e)return kp(e,n)},has:function(n){return e?Bp(e,n):!1},set:function(n,o){e||(e=new es),Gp(e,n,o)}};return t}});var ns=f((Ih,ts)=>{"use strict";i();var Lp=C(),yr=D(),Hp=z(),pr=pt(),zp=m(),be=Lp("%WeakMap%",!0),Kp=yr("WeakMap.prototype.get",!0),Jp=yr("WeakMap.prototype.set",!0),Yp=yr("WeakMap.prototype.has",!0),Xp=yr("WeakMap.prototype.delete",!0);ts.exports=be?function(){var e,t,n={assert:function(o){if(!n.has(o))throw new zp("Side channel does not contain "+Hp(o))},delete:function(o){if(be&&o&&(typeof o=="object"||typeof o=="function")){if(e)return Xp(e,o)}else if(pr&&t)return t.delete(o);return!1},get:function(o){return be&&o&&(typeof o=="object"||typeof o=="function")&&e?Kp(e,o):t&&t.get(o)},has:function(o){return be&&o&&(typeof o=="object"||typeof o=="function")&&e?Yp(e,o):!!t&&t.has(o)},set:function(o,a){be&&o&&(typeof o=="object"||typeof o=="function")?(e||(e=new be),Jp(e,o,a)):pr&&(t||(t=pr()),t.set(o,a))}};return n}:pr});var is=f(($h,os)=>{"use strict";i();var Qp=m(),Zp=z(),ey=Za(),ry=pt(),ty=ns(),ny=ty||ry||ey;os.exports=function(){var e,t={assert:function(n){if(!t.has(n))throw new Qp("Side channel does not contain "+Zp(n))},delete:function(n){return!!e&&e.delete(n)},get:function(n){return e&&e.get(n)},has:function(n){return!!e&&e.has(n)},set:function(n,o){e||(e=ny()),e.set(n,o)}};return t}});var dt=f((Th,as)=>{"use strict";i();var oy=L(),ke=is()(),K=m(),yt={assert:function(r,e){if(!r||typeof r!="object"&&typeof r!="function")throw new K("`O` is not an object");if(typeof e!="string")throw new K("`slot` must be a string");if(ke.assert(r),!yt.has(r,e))throw new K("`"+e+"` is not present on `O`")},get:function(r,e){if(!r||typeof r!="object"&&typeof r!="function")throw new K("`O` is not an object");if(typeof e!="string")throw new K("`slot` must be a string");var t=ke.get(r);return t&&t["$"+e]},has:function(r,e){if(!r||typeof r!="object"&&typeof r!="function")throw new K("`O` is not an object");if(typeof e!="string")throw new K("`slot` must be a string");var t=ke.get(r);return!!t&&oy(t,"$"+e)},set:function(r,e,t){if(!r||typeof r!="object"&&typeof r!="function")throw new K("`O` is not an object");if(typeof e!="string")throw new K("`slot` must be a string");var n=ke.get(r);n||(n={},ke.set(r,n)),n["$"+e]=t}};Object.freeze&&Object.freeze(yt);as.exports=yt});var us=f((Nh,ss)=>{"use strict";i();var vt={__proto__:null,foo:{}},iy={__proto__:vt}.foo===vt.foo&&!(vt instanceof Object);ss.exports=function(){return iy}});var ps=f((Rh,cs)=>{"use strict";i();var ay=C(),fs=ay("%Object.create%",!0),ls=m(),sy=Y(),uy=fr(),fy=Xa(),ly=O(),cy=dt(),py=us()();cs.exports=function(e){if(e!==null&&!ly(e))throw new ls("Assertion failed: `proto` must be null or an object");var t=arguments.length<2?[]:arguments[1];if(!uy(t))throw new ls("Assertion failed: `additionalInternalSlotsList` must be an Array");var n;if(fs)n=fs(e);else if(py)n={__proto__:e};else{if(e===null)throw new sy("native Object.create support is required to create null objects");var o=function(){};o.prototype=e,n=new o}return t.length>0&&fy(t,function(a){cy.set(n,a,void 0)}),n}});var hs=f((_h,ms)=>{"use strict";i();var gs=C(),gt=Y(),ht=m(),we=gs("%Promise%",!0),mt=Wa(),re=lr(),yy=it(),dy=_e(),ys=ft(),ds=ct(),vy=ps(),vs=O(),gy=We(),ie=dt(),my=gs("%AsyncFromSyncIteratorPrototype%",!0)||{next:function(e){if(!we)throw new gt("This environment does not support Promises.");var t=this;ie.assert(t,"[[SyncIteratorRecord]]");var n=arguments.length;return new we(function(o){var a=ie.get(t,"[[SyncIteratorRecord]]"),c;n>0?c=ds(a,e):c=ds(a),o(mt(c))})},return:function(){if(!we)throw new gt("This environment does not support Promises.");var r=this;ie.assert(r,"[[SyncIteratorRecord]]");var e=arguments.length>0,t=e?arguments[0]:void 0;return new we(function(n,o){var a=ie.get(r,"[[SyncIteratorRecord]]")["[[Iterator]]"],c=ys(a,"return");if(typeof c>"u"){var y=yy(t,!0);re(n,void 0,[y]);return}var v;if(e?v=re(c,a,[t]):v=re(c,a),!vs(v)){re(o,void 0,[new ht("Iterator `return` method returned a non-object value.")]);return}n(mt(v))})},throw:function(){if(!we)throw new gt("This environment does not support Promises.");var r=this;ie.assert(r,"[[SyncIteratorRecord]]");var e=arguments.length>0,t=e?arguments[0]:void 0;return new we(function(n,o){var a=ie.get(r,"[[SyncIteratorRecord]]")["[[Iterator]]"],c=ys(a,"throw");if(typeof c>"u"){re(o,void 0,[t]);return}var y;if(e?y=re(c,a,[t]):y=re(c,a),!vs(y)){re(o,void 0,[new ht("Iterator `throw` method returned a non-object value.")]);return}n(mt(y))})}};ms.exports=function(e){if(!gy(e))throw new ht("Assertion failed: `syncIteratorRecord` must be an Iterator Record");var t=vy(my);ie.set(t,"[[SyncIteratorRecord]]",e);var n=dy(t,"next");return{"[[Iterator]]":t,"[[NextMethod]]":n,"[[Done]]":!1}}});var Ss=f((jh,ws)=>{"use strict";i();var bs=m(),hy=lr(),by=_e(),wy=nr(),Sy=O();ws.exports=function(e,t){if(!wy(t))throw new bs("method must be a function");var n=hy(t,e);if(!Sy(n))throw new bs("iterator must return an object");var o=by(n,"next");return{"[[Iterator]]":n,"[[NextMethod]]":o,"[[Done]]":!1}}});var Ps=f((Gh,qs)=>{"use strict";i();var qy=Pr();qs.exports=function(){return qy()&&!!Symbol.toStringTag}});var Es=f((Uh,xs)=>{"use strict";i();var As=D(),Py=As("String.prototype.valueOf"),Ay=function(e){try{return Py(e),!0}catch{return!1}},xy=As("Object.prototype.toString"),Ey="[object String]",Iy=Ps()();xs.exports=function(e){return typeof e=="string"?!0:!e||typeof e!="object"?!1:Iy?Ay(e):xy(e)===Ey}});var $s=f((Lh,Os)=>{"use strict";i();var Oy=Ye()(),Is=C(),$y=D(),My=Es(),Ty=Is("%Symbol.iterator%",!0),Cy=$y("String.prototype.slice"),Ny=Is("%String%");Os.exports=function(e,t){var n;return Oy?n=e.GetMethod(t,Ty):e.IsArray(t)?n=function(){var o=-1,a=this;return{next:function(){return o+=1,{done:o>=a.length,value:a[o]}}}}:My(t)&&(n=function(){var o=0;return{next:function(){var a=e.AdvanceStringIndex(Ny(t),o,!0),c=Cy(t,o,a);return o=a,{done:a>t.length,value:c}}}}),n}});var Fs=f((zh,Ns)=>{"use strict";i();var Fy=C(),bt=m(),Ms=Fy("%Symbol.asyncIterator%",!0),Ry=z(),Dy=Ye()(),_y=ga(),Wy=hs(),Ts=Ss(),Cs=ft(),jy=fr(),ky={AdvanceStringIndex:_y,GetMethod:Cs,IsArray:jy},Gy=$s();Ns.exports=function(e,t){if(t!=="SYNC"&&t!=="ASYNC")throw new bt("Assertion failed: `kind` must be one of 'sync' or 'async', got "+Ry(t));var n;if(t==="ASYNC"&&Dy&&Ms&&(n=Cs(e,Ms)),typeof n>"u"){var o=Gy(ky,e);if(t==="ASYNC"){if(typeof o>"u")throw new bt("iterator method is `undefined`");var a=Ts(e,o);return Wy(a)}n=o}if(typeof n>"u")throw new bt("iterator method is `undefined`");return Ts(e,n)}});var Ds=f((Jh,Rs)=>{"use strict";i();var By=m(),Uy=at(),Vy=ct(),Ly=We();Rs.exports=function(e){if(!Ly(e))throw new By("Assertion failed: `iteratorRecord` must be an Iterator Record");var t=Vy(e),n=Uy(t);return n===!0?!1:t}});var Ws=f((Xh,_s)=>{"use strict";i();var Hy=m(),zy=D(),Ky=zy("Array.prototype.push"),Jy=Ds(),Yy=st(),Xy=We();_s.exports=function(e){if(!Xy(e))throw new Hy("Assertion failed: `iteratorRecord` must be an Iterator Record");for(var t=[],n=!0;n;)if(n=Jy(e),n){var o=Yy(n);Ky(t,o)}return t}});var ks=f((Zh,js)=>{"use strict";i();js.exports=typeof Reflect<"u"&&Reflect.setPrototypeOf||null});var Bs=f((rb,Gs)=>{"use strict";i();var Qy=Je();Gs.exports=Qy.setPrototypeOf||null});var Hs=f((nb,Ls)=>{"use strict";i();var Zy=Oe(),Us=X(),ed=m(),Vs={};try{Vs.__proto__=null}catch(r){if(!r||typeof r!="object"||!("code"in r)||r.code!=="ERR_PROTO_ACCESS")throw r}var rd=!("toString"in Vs),wt=Us&&Us(Object.prototype,"__proto__");Ls.exports=rd&&(!!wt&&typeof wt.set=="function"&&Zy([wt.set])||function(e,t){if(e==null)throw new ed("set Object.prototype.__proto__ called on null or undefined");return e.__proto__=t,t})});var Ys=f((ib,Js)=>{"use strict";i();var zs=ks(),td=Bs(),Ks=Hs(),nd=m();Js.exports=zs?function(e,t){if(zs(e,t))return e;throw new nd("Reflect.setPrototypeOf: failed to set [[Prototype]]")}:td||(Ks?function(e,t){return Ks(e,t),e}:null)});var eu=f((sb,Zs)=>{"use strict";i();var Xs=m(),Qs=Or(),od=O();Zs.exports=function(e){if(!od(e))throw new Xs("Assertion failed: O must be an Object");if(!Qs)throw new Xs("This environment does not support fetching prototypes.");return Qs(e)}});var tu=f((fb,ru)=>{"use strict";i();var id=m(),ad=Ys(),sd=eu(),ud=O();ru.exports=function(e,t){if(t!==null&&!ud(t))throw new id("Assertion failed: V must be Object or Null");try{ad(e,t)}catch{return!1}return sd(e)===t}});var qt=f((cb,iu)=>{"use strict";i();var fd=hi(),St=$i(),ld=Fs(),cd=le()(),pd=Ws(),nu=tu(),ou=wr();function Ge(r,e){var t=new ou(e);nu(t,dr),delete t.constructor;var n=pd(ld(r,"SYNC"));return fd(t,"errors",n),t}cd&&Object.defineProperty(Ge,"prototype",{writable:!1});var dr=Ge.prototype;if(!St(dr,"constructor",Ge)||!St(dr,"message","")||!St(dr,"name","AggregateError"))throw new ou("unable to install AggregateError.prototype properties; please report this!");nu(Ge.prototype,Error.prototype);iu.exports=Ge});var Pt=f((yb,au)=>{"use strict";i();var yd=qt();au.exports=function(){return typeof AggregateError=="function"?AggregateError:yd}});var At=f((vb,su)=>{"use strict";i();su.exports=global});var xt=f((mb,uu)=>{"use strict";i();var dd=At();uu.exports=function(){return typeof global!="object"||!global||global.Math!==Math||global.Array!==Array?dd:global}});var lu=f((bb,fu)=>{"use strict";i();var vd=Ae(),gd=X(),md=xt();fu.exports=function(){var e=md();if(vd.supportsDescriptors){var t=gd(e,"globalThis");(!t||t.configurable&&(t.enumerable||!t.writable||globalThis!==e))&&Object.defineProperty(e,"globalThis",{configurable:!0,enumerable:!1,value:e,writable:!0})}else(typeof globalThis!="object"||globalThis!==e)&&(e.globalThis=e);return e}});var du=f((Sb,yu)=>{"use strict";i();var hd=Ae(),bd=At(),cu=xt(),wd=lu(),Sd=cu(),pu=function(){return Sd};hd(pu,{getPolyfill:cu,implementation:bd,shim:wd});yu.exports=pu});var mu=f((Pb,gu)=>{"use strict";i();var qd=Ae(),vu=du()(),Pd=Pt();gu.exports=function(){var e=Pd();return qd(vu,{AggregateError:e},{AggregateError:function(){return vu.AggregateError!==e}}),e}});var wu=f((xb,bu)=>{"use strict";i();var Ad=te(),xd=Ae(),Ed=bn(),Id=Pe(),Od=qt(),hu=Pt(),$d=mu(),Et=hu(),It=Ed(Ad.call(Et),Et.name,!0);Id(It,"prototype",Et.prototype,!0,!0,!0,!0);xd(It,{getPolyfill:hu,implementation:Od,shim:$d});bu.exports=It});i();import Mt from"fs/promises";import Tt from"url";import jd from"module";import Ou from"path";import ae from"worker_threads";i();import{parse as Fd,transform as Rd,types as p,traverse as Dd}from"@babel/core";i();var qu=Cu(wu());import Su from"path";import Md from"fs";import Td from"os";import Cd from"process";import Nd from"magic-string";function Be(r,e){let t=Su.dirname(r),n=Su.join(t,e);return Md.existsSync(n)?n:Be(t,e)}function R(r){return r.length}function Cb(){let[r,e]=Cd.versions.node.split(".");return+r<12||+r==12&&+e<17||+r==13&&+e<13?[!1,`${r}.${e}`]:[!0,`${r}.${e}`]}function Pu(r,e){if(!r)throw new Error(e)}var $t=new Function("specifier","return import(specifier)");function Nb(r,e){let t=new Nd(r);for(let n in e){let o=new RegExp(`require\\((["'\`])\\s*${n}\\s*(\\1)\\)`,"g");t.replace(o,e[n].global)}return{code:t.toString(),map:t.generateMap()}}var Au=(()=>{let r=Td.cpus()||{length:1};return Math.max(1,r.length-1)})(),Ot=class{maxConcurrent;queue;running;errors;constructor(e){this.maxConcurrent=e,this.queue=[],this.running=0,this.errors=[]}enqueue(e){this.queue.push(e),this.run()}async run(){for(;this.running<this.maxConcurrent&&this.queue.length;){let e=this.queue.shift();this.running++;try{await e?.()}catch(t){this.errors.push(t)}finally{this.running--,this.run()}}}async wait(){for(;this.running;)await new Promise(e=>setTimeout(e,0));if(R(this.errors))throw new qu.default(this.errors,"failed")}};function xu(r){return new Ot(r)}function _d(r){return p.isProgram(r.parent)||p.isExportDefaultDeclaration(r.parent)||p.isExportNamedDeclaration(r.parent)}function Wd(r){return function(){let{dependency:e,dependencyWithAlias:t}=r,n=new Map,o=new Map,a=l=>{let g=t[l.node.source.value],{global:h}=e[g];for(let d of l.node.specifiers)switch(d.type){case"ImportDefaultSpecifier":case"ImportNamespaceSpecifier":n.set(d.local.name,`${h}.${d.type}.${g}`);break;case"ImportSpecifier":d.imported.type==="Identifier"&&n.set(d.local.name,`${h}.${d.imported.name}.${g}`)}},c=l=>{let g=[],h=[],d=l.node.source,b=d?t[l.node.source.value]:"",q=d&&b?e[b].global:"",P=d&&b?e[b].bindings:new Set,N=(w,A,F)=>{if(P.size){if(w.name==="default"&&w.name!==A.name){let E=T=>p.memberExpression(p.identifier(q),p.identifier(T)),M=[...P.keys()].map(T=>p.objectProperty(p.identifier(T),E(T))),x=p.variableDeclarator(p.identifier(A.name),p.objectExpression(M));g.push(x);return}if(A.name==="default"&&w.name!==A.name){let E=p.memberExpression(p.identifier(q),p.identifier(w.name));g.push(E);return}if(w.name===A.name){if(w.name==="default"){let E=T=>p.memberExpression(p.identifier(q),p.identifier(T)),M=[...P.keys()].map(T=>p.objectProperty(p.identifier(T),E(T))),x=p.objectExpression(M);g.push(x);return}if(P.has(w.name)){let E=p.memberExpression(p.identifier(q),p.identifier(w.name)),M=p.variableDeclarator(p.identifier(w.name),E);g.push(M);return}}h.push(F)}},_=(w,A,F)=>{if(n.has(w.name)){let[E,M,x]=n.get(w.name).split("."),T=(()=>{if(M==="ImportNamespaceSpecifier"){let vr=J=>p.memberExpression(p.identifier(E),p.identifier(J));return p.objectExpression([...e[x].bindings.keys()].map(J=>p.objectProperty(p.identifier(J),vr(J))))}return p.memberExpression(p.identifier(E),p.identifier(M))})();A.name==="default"?g.push(T):g.push(p.variableDeclarator(p.identifier(w.name),T));return}h.push(F)};for(let w of l.node.specifiers){if(w.type==="ExportSpecifier"){let{local:A,exported:F}=w;if(F.type!=="Identifier")continue;d?N(A,F,w):_(A,F,w)}if(w.type==="ExportNamespaceSpecifier"){let A=w.exported;if(A.name==="default"){let F=x=>p.memberExpression(p.identifier(q),p.identifier(x)),E=[...P.keys()].map(x=>p.objectProperty(p.identifier(x),F(x))),M=p.objectExpression(E);g.push(M)}else{let F=x=>p.memberExpression(p.identifier(q),p.identifier(x)),E=[...P.keys()].map(x=>p.objectProperty(p.identifier(x),F(x))),M=p.variableDeclarator(p.identifier(A.name),p.objectExpression(E));g.push(M)}}}let W=g.filter(w=>w.type==="VariableDeclarator"),j=g.filter(w=>w.type!=="VariableDeclarator");if(R(j)){let w=p.exportDefaultDeclaration(j[0]);R(W)||R(h)?l.insertAfter(w):l.replaceWith(w)}if(R(W)){let w=p.variableDeclaration("var",W);if(R(h)){let A=p.exportNamedDeclaration(null,h);l.replaceWith(A),l.insertAfter(p.exportNamedDeclaration(w,[]))}else l.replaceWith(p.exportNamedDeclaration(w,[]))}},y=l=>{let g=[],h=t[l.node.source.value],{bindings:d}=e[h];if(d.forEach(b=>{let q=p.identifier(b),P=p.exportSpecifier(q,q);g.push(P)}),R(g)){let b=p.exportNamedDeclaration(null,g,p.stringLiteral(l.node.source.value));l.replaceWith(b)}},v=(l,g)=>{if(!Array.isArray(l))return;let h=d=>{if(!Array.isArray(d)){if(p.isVariableDeclarator(d.node)&&((p.isObjectPattern(d.node.id)||p.isArrayPattern(d.node.id))&&h(d.get("id")),p.isRestElement(d.node.id)&&h(d.get("id.argument")),p.isIdentifier(d.node.id))){let b=d.node.id.name;g.has(b)&&g.get(b).remove(),g.set(b,d);return}if(p.isObjectPattern(d.node))for(let b of d.get("properties"))h(b);if(p.isArrayPattern(d.node))for(let b of d.get("elements"))h(b)}};for(let d of l)h(d)};return{visitor:{ImportDeclaration:{enter:l=>{t[l.node.source.value]&&a(l)},exit:l=>{t[l.node.source.value]&&(l.remove(),l.skip())}},ExportDeclaration:{enter:l=>{switch(l.node.type){case"ExportDefaultDeclaration":if(p.isIdentifier(l.node.declaration)&&n.has(l.node.declaration.name)){let[g,h,d]=n.get(l.node.declaration.name).split("."),{global:b}=e[d],q=`__external__${b}__`,P=p.variableDeclaration("var",[p.variableDeclarator(p.identifier(q),p.identifier(b))]);l.insertBefore(P),l.replaceWith(p.exportDefaultDeclaration(p.identifier(q)))}break;case"ExportNamedDeclaration":(t[l.node.source?.value]||!l.node.declaration)&&c(l);break;case"ExportAllDeclaration":t[l.node.source.value]&&y(l)}}},Declaration:l=>{if(_d(l)){if(p.isClassDeclaration(l.node)||p.isFunctionDeclaration(l.node)){let g=l.node.id?.name;if(!g)return;o.has(g)&&o.get(g).remove(),o.set(g,l)}p.isVariableDeclaration(l.node)&&v(l.get("declarations"),o)}},Identifier:l=>{if(p.isReferenced(l.node,l.parent)&&n.has(l.node.name)&&!l.scope.hasBinding(l.node.name)){let[g,h]=n.get(l.node.name).split(".");h==="ImportNamespaceSpecifier"||h==="ImportDefaultSpecifier"?l.node.name=g:l.node.name=[g,h].join("."),l.skip()}}}}}}async function Wb(r,e){let t=await Rd(r,{babelrc:!1,configFile:!1,sourceMaps:!0,plugins:[[Wd(e)]]});return{code:t.code,map:t.map}}async function Eu(r){let e=await Fd(r,{babelrc:!1,configFile:!1}),{body:t}=e.program;if(!R(t))return;let n=t[0];if(p.isVariableDeclaration(n)){let c=n.declarations[0].id;if(p.isIdentifier(c))return c.name}let o="",a="";return Dd(e,{ExpressionStatement:c=>{if(p.isCallExpression(c.node.expression)&&p.isFunctionExpression(c.node.expression.callee)){let y=c.node.expression.callee.params;R(y)&&y[0].type==="Identifier"&&!a&&(a=y[0].name)}},AssignmentExpression:c=>{if(o)return c.skip();let y=c.get("left");if(y.node.type==="MemberExpression"){let{start:v,end:l}=y.node.object;new RegExp(a||"global","i").test(r.slice(v,l))&&p.isIdentifier(y.node.property)&&(o||(o=y.node.property.name))}}}),o}var $u=jd.createRequire(import.meta.url),kd=Tt.fileURLToPath(import.meta.url);function Gd(r,e){let{port1:t,port2:n}=new ae.MessageChannel,o=new ae.Worker(kd,{workerData:{workerPort:n,internalThread:!0,scannerModule:r.modules,defaultWd:e},transferList:[n],execArgv:[]}),a=0;return o.unref(),(()=>{let y=new SharedArrayBuffer(4),v=new Int32Array(y);o.postMessage({sharedBuffer:y,id:a});let l=Atomics.wait(v,0,0);if(l!=="ok"&&l!=="not-equal")throw new Error("Internal error: Atomics.wait() failed: "+l);let{message:g}=ae.receiveMessageOnPort(t);if(g.id!==a)throw new Error(`Internal error: Expected id ${a} but got id ${g.id}`);if(g.error)throw g.error;let{bindings:h,failedModules:d}=g;return{dependencies:h,failedModules:d}})()}function Iu(r,e=[]){return e.filter(t=>t!==".").map(t=>Ou.posix.join(r,t))}async function Bd(...r){let e;switch(R(r)){case 1:{let o=r[0];if(typeof o!="string")throw new Error("Invalid type");e=await $t(Tt.pathToFileURL(o));break}case 2:{let[o,a]=r;if(typeof o!="object")throw new Error("Invalid type");let c=$u.resolve(o.name,{paths:[a]});e=await $t(Tt.pathToFileURL(c));break}}let t=Object.keys(e);if(t.includes("default")&&R(t)!==1){let o=t.findIndex(a=>a==="default");t.splice(o,1),t.push(...Object.keys(e.default))}return new Set(t.filter(o=>o!=="__esModule"))}async function Ud(r,e,t,n){let{name:o,relativeModule:a,aliases:c,...y}=r;try{let v=$u.resolve(o,{paths:[n]}),l=Be(v,"package.json"),g=await Mt.readFile(l,"utf8"),h=JSON.parse(g),{version:d,name:b,unpkg:q,jsdelivr:P}=h;if(!d||!b){let j=Be(Ou.dirname(l),"package.json"),w=await Mt.readFile(j,"utf8"),A=JSON.parse(w);d=d||A.version,b=b||A.name,q=q||A.unpkg,P=P||A.jsdelivr}let N=Object.create(null),_=a||P||q;if(!_)throw new Error("try resolve file failed.");if(y.global)Object.assign(N,{name:b,version:d,relativeModule:_,aliases:Iu(b,c),...y});else{let j=Be(l,_),w=await Mt.readFile(j,"utf8");Object.assign(N,{name:b,version:d,code:w,relativeModule:_,aliases:Iu(b,c),...y})}let W=await Bd(v);e.set(b,{...N,bindings:W})}catch(v){let l=v instanceof Error?"code"in v&&v.code==="MODULE_NOT_FOUND"?"can't find module.":v.message:v;t.set(o,l)}}function Vd(){if(!ae.workerData.internalThread)return;let{workerPort:r,scannerModule:e,defaultWd:t}=ae.workerData,{parentPort:n}=ae,o=new Map,a=new Map;n?.on("message",c=>{(async()=>{let{id:y,sharedBuffer:v}=c,l=new Int32Array(v);try{let g=new Map,h=xu(Au);for(let d of e)h.enqueue(()=>Ud(d,o,a,t));await h.wait();for(let d of e){let{name:b}=d;if(o.has(b)){let{code:q,...P}=o.get(b);if(!q){g.set(b,P);continue}let N=await Eu(q);N?g.set(b,{...P,global:N}):a.set(b,"try resolve global name failed.")}}o.clear(),r.postMessage({bindings:g,id:y,failedModules:a})}catch(g){r.postMessage({error:g,id:y})}Atomics.add(l,0,1),Atomics.notify(l,0,1/0)})()})}ae.workerData?.internalThread&&Vd();var Ct=class{modules;dependencies;failedModules;defaultWd;constructor(e){this.modules=e,this.dependencies=new Map,this.failedModules=new Map,this.defaultWd=process.cwd()}setDefaultWd(e){this.defaultWd=e}scanAllDependencies(){let e=Gd(this.serialization(this.modules),this.defaultWd);this.dependencies=e.dependencies,this.failedModules=e.failedModules}serialization(e){Pu(Array.isArray(e),"vite-plugin-cdn2: option module must be array");let t=[],n=new Set;for(let o of e){if(typeof o=="string"){if(n.has(o)||!o)continue;t.push({name:o}),n.add(o);continue}!o.name||n.has(o.name)||(t.push(o),n.add(o.name))}return{modules:t}}};function Kb(r){return new Ct(r)}export{R as a,Cb as b,Pu as c,Nb as d,Wb as e,Iu as f,Bd as g,Kb as h};
|
|
5
|
+
//# sourceMappingURL=chunk-EKMT5YZN.mjs.map
|