diff --git a/.gitignore b/.gitignore
index 9348b61..2e22dd1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -24,4 +24,7 @@ dist/**/*
/examples/**/build/
# tests
-__app_example_1/
\ No newline at end of file
+__app_example_1/
+
+*/temp/**/*
+**/data.json
\ No newline at end of file
diff --git a/README.md b/README.md
index a7f0b74..093ef81 100644
--- a/README.md
+++ b/README.md
@@ -8,23 +8,34 @@
-`bos-workspace` is a comprehensive toolset designed to simplify the development and deployment of [NEAR components](https://docs.near.org/bos/tutorial/quickstart) and applications. With support for hot reload, TypeScript, and multiple app management, it caters to developers looking for an efficient and scalable developer environment.
+`bos-workspace` is a comprehensive toolset designed to simplify the development and deployment of [NEAR components](https://docs.near.org/bos/tutorial/quickstart) and applications. With support for hot reload, TypeScript, and multi-app management, it caters to developers looking for an efficient and scalable developer environment.
## Quickstart
-To begin, either [use this template repository](https://github.com/new?template_name=quickstart&template_owner=NEARBuilders) or install `bos-workspace` within an existing project:
+To begin, either:
+
+* [Use the template repository](https://github.com/new?template_name=quickstart&template_owner=NEARBuilders) with quickstart app, preconfigured git workflows, and playwright test suite
+
+* Use the init command for an empty workspace:
```cmd
-yarn add -D bos-workspace
+npx bos-workspace init
```
-Then, you can clone widgets from an existing [account](https://near.social/mob.near/widget/Everyone) via:
+* Clone widgets from an existing [account](https://near.social/mob.near/widget/Everyone):
-```bash
-yarn run bos-workspace clone [accountId] [dest]
+```cmd
+npx bos-workspace clone [accountId] [dest]
+npx bos-workspace dev [dest | accountId]
+```
+
+* Or install `bos-workspace` within an existing project:
+
+```cmd
+yarn add -D bos-workspace
```
-Or ensure the proper workspace [structure and usage](#usage).
+and ensure the proper workspace [structure and usage](#usage).
## Usage
@@ -39,7 +50,7 @@ app.near/
└── bos.config.json
```
-where the content of `bos.config.json` is:
+where the content of `bos.config.json` is (at least):
```json
{
@@ -72,6 +83,168 @@ where the content of `bos.workspace.json` is:
**Note:** The "app name" is not required to end in `.near`, and apps don't necessarily have to be stored in a directory named `/apps`. What's important is that the `bos.config.json` is located at the same level as directories such as `/widget`, and that `bos.workspace.json` specifies the directory it resides in.
+## Configuration
+
+The `bos.config.json` file serves as the configuration file for managing various settings and options related to the workspace.
+
+A fully featured config may look like this:
+
+```json
+{
+ "account": "quickstart.near",
+ "aliases": ["./aliases.mainnet.json"],
+ "index": "quickstart.near/widget/home",
+ "overrides": {
+ "testnet": {
+ "account": "quickstart.testnet",
+ "aliases": ["./aliases.testnet.json"],
+ "index": "quickstart.testnet/widget/home"
+ }
+ },
+ "accounts": {
+ "deploy": "quickstart.near",
+ "signer": "devs.near",
+ },
+ "format": true,
+ "ipfs": {
+ "gateway": "https://ipfs.near.social/ipfs",
+ "uploadApi": "https://ipfs.near.social/add",
+ "uploadApiHeaders": {},
+ },
+}
+```
+
+---
+
+### Base Configuration
+
+The `bos.config.json` file consists of a base configuration that defines default values and settings for the BOS environment.
+
+* `account`: (Optional) Specifies the default account to serve widgets from. If not provided, the default value is set to `"bos.workspace"`.
+* `accounts`: (Optional) Defines account configuration options for the `deploy` command.
+ * `deploy`: Specifies the account to deploy widgets to.
+ * `signer`: Specifies the account to sign the transaction.
+* `ipfs`: (Optional) Configures IPFS settings for uploading and using local assets.
+ * `gateway`: IPFS gateway to use for accessing files. Default value is `"https://ipfs.near.social/ipfs"`.
+ * `uploadApi`: IPFS API endpoint to upload to. Default value is `"https://ipfs.near.social/add"`.
+ * `uploadApiHeaders`: Any additional headers to send with IPFS upload API requests.
+* `format`: (Optional) Indicates whether to format code on build. Default value is `true`.
+* `aliases`: (Optional) Provides a list of alias files to use for replacing network-specific values with correct overrides.
+* `index`: (Optional) Default widget src to use when using a custom gateway dist.
+
+---
+
+### Network Overrides
+
+The `bos.config.json` file supports network configuration overrides of this base configuration, allowing developers to specify different settings for specific networks (e.g., mainnet, testnet).
+
+* `overrides`: (Optional) Defines overrides for network-specific configurations. These values are used via the `-n` flag in commands, respectivly:
+ * `mainnet`
+ * `testnet`
+
+---
+
+### Aliases
+
+When working with values that differ accross different networks, developers can define aliases in separate JSON files according to environment. These aliases are replaced during build.
+
+* **Account**: Defines the "owner" of the widgets in the workspace, according to network.
+ * Pattern: `{config_account}`
+* **Aliases**: Defines patterns for replacing other account and contract references. These are particularly useful for widget sources accross environments, such as using mob.near for mainnet, and mike.testnet for testnet.
+ * Pattern: `${alias_key}` ( note that you may also have other prefixes than `alias_` by configuring the `aliasPrefix` property )
+ * Example:
+
+ ```json
+ {
+ "account": "[MAINNET_ACCOUNT_ID]",
+ "aliases": ["./aliases.mainnet.json"],
+ "overrides": {
+ "testnet": {
+ "account": "[TESTNET_ACCOUNT_ID]",
+ "aliases": ["./aliases.testnet.json"]
+ }
+ }
+ }
+ ```
+
+ with accompaning jsons:
+
+ `aliases.mainnet.json`
+
+ ```json
+ {
+ "devs": "devs.near",
+ "mob": "mob.near",
+ }
+ ```
+
+ `aliases.testnet.json`
+
+ ```json
+ {
+ "devs": "neardevs.testnet",
+ "mob": "mike.testnet"
+ }
+ ```
+
+#### Custom alias prefix
+
+If your aliases are prefixed with another keyword than `alias`, you may configure this using the `aliasPrefix` property. You may also include the prefix in the keys of your alias json file. Here is an example:
+
+ ```json
+ {
+ "account": "[MAINNET_ACCOUNT_ID]",
+ "aliases": ["./aliases.mainnet.json"],
+ "aliasPrefix": "REPL",
+ "aliasesContainsPrefix": true,
+ }
+```
+
+and then with your `aliases.mainnet.json` like this:
+
+
+```json
+{
+ "REPL_NAME": "world"
+}
+```
+
+If your widget file looks like this:
+
+```tsx
+export default
Hello ${REPL_NAME}! ;
+```
+
+Then the alias will be replaced like this:
+
+```tsx
+export default Hello world! ;
+```
+
+## Customizing the Gateway
+
+Running the bos-workspace dev server will start a local gateway with a standard [near-social-vm](https://github.com/NearSocial/VM) installed unless the `--no-gateway` flag is provided in your dev command:
+
+```cmd
+bw dev --no-gateway
+```
+
+However, there is an option to override this default gateway with a custom `/dist`. This is helpful when building widgets that utilize [custom VM elements](https://github.com/NEARBuilders/near-bos-webcomponent?tab=readme-ov-file#configuring-vm-custom-elements). To use this feature, use the `-g` flag with a path to the local custom distribution or link to package published on [nearfs](https://github.com/vgrichina/nearfs) or via cdn:
+
+```cmd
+bw dev -g path/to/dist
+```
+
+```cmd
+bw dev -g https://ipfs.web4.near.page/ipfs/bafybeiancp5im5nfkdki3cfvo7ownl2knjovqh7bseegk4zvzsl4buryoi
+```
+
+This will automatically start the local gateway serving your widgets through the provided dist.
+
+It is easy to build and distribute a custom gateway using the [near-bos-webcomponent](https://github.com/nearbuilders/near-bos-webcomponent), see ["Configuring VM Custom Elements"](https://github.com/NEARBuilders/near-bos-webcomponent?tab=readme-ov-file#configuring-vm-custom-elements).
+
+The bos-workspace dev server is specially configured with the near-bos-webcomponent to automatically set the `rpc` attribute with the [proxy-rpc](#proxy-rpc).
+
## Commands
You can run `bw` or `bos-workspace` to see the list of commands.
@@ -86,12 +259,11 @@ Options:
-h, --help display help for command
Commands:
- dev [options] [src] Run the development server
+ dev [options] [src] [dest] Run the development server
build [options] [src] [dest] Build the project
workspace|ws [options] [command] [src] [dest] Work with multiple apps
init [options] [path] Initialize a new project
clone [account] [dest] Clone a SocialDB repository
- pull [account] Pull updates from a SocialDB repository
deploy [options] [appName] Deploy the project
upload [string] Upload data to SocialDB (not implemented)
help [command] display help for command
@@ -100,6 +272,85 @@ Commands:
> If the gateway can't fetch local components, try disabling brave shields or your adblock.
> If the commands don't work, try again using Node >=16
+## Deployment
+
+### Usage (CLI)
+
+**Command:** `deploy`
+
+Deploys an app in the workspace via a convenient wrapper to [bos-cli-rs](https://github.com/bos-cli-rs/bos-cli-rs).
+
+```cmd
+bw deploy [app name] --deploy-account-id [deployAccountId] --signer-account-id [signerAccountId] --signer-public-key [signerPublicKey] --signer-private-key [signerPrivateKey]
+```
+
+* `[app name]`: Name of the app to be deployed. Assumed to be the current app in App structure (bos.config.json), but is required when using the Workspace structure (bos.workspace.json); this should match the name of the App's directory.
+* `--deploy-account-id ` (Optional): Account under which component code should be deployed. Defaults to `config.account`, or will use `config.accounts.deploy` if specified.
+
+* `--signer-account-id ` (Optional): Account which will be used for signing deploy transactions, frequently the same as deploy-account-id. Defaults to `config.account`, or will use `config.accounts.deploy` if specified.
+
+* `--signer-public-key ` (Optional): Public key for signing transactions in the format: `ed25519:`. Will default to interactive [near-cli-rs](https://github.com/near/near-cli-rs) if not provided.
+
+* `--signer-private-key ` (Optional): Private key in `ed25519:` format for signing transactions. Will default to interactive [near-cli-rs](https://github.com/near/near-cli-rs) if not provided.
+
+* `-n, --network ` (Optional): Network to deploy for (default: "mainnet").
+
+### Usage (Git Workflow)
+
+#### Prerequisites
+
+1. Must be upgraded to bos-workspace v1, see the [migration guide](./MIGRATION_GUIDE.md)
+2. Specify testnet [overrides + aliases](#aliases) in bos.config.json.
+
+#### Mainnet
+
+1. Create `.github/workflow/release-mainnet.yml`
+
+```yml
+name: Deploy Components to Mainnet
+on:
+ push:
+ branches: [main]
+jobs:
+ deploy-mainnet:
+ uses: NEARBuilders/bos-workspace/.github/workflows/deploy.yml@main
+ with:
+ bw-legacy: false
+ deploy-env: "mainnet"
+ app-name: "[APP_NAME]"
+ deploy-account-address: "[DEPLOY_ACCOUNT]"
+ signer-account-address: "[SIGNER_ACCOUNT]"
+ signer-public-key: [PUBLIC_KEY]
+ secrets:
+ SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }} // then configure this in your Github/Settings/Actions
+```
+
+#### Testnet
+
+1. Create `.github/workflow/release-testnet.yml`
+
+```yml
+name: Deploy Components to Testnet
+on:
+ push:
+ branches: [develop]
+jobs:
+ deploy-mainnet:
+ uses: NEARBuilders/bos-workspace/.github/workflows/deploy.yml@main
+ with:
+ bw-legacy: false
+ build-env: "testnet"
+ deploy-env: "testnet"
+ app-name: "[APP_NAME]"
+ deploy-account-address: "[DEPLOY_ACCOUNT]" // testnet account
+ signer-account-address: "[SIGNER_ACCOUNT]"
+ signer-public-key: [PUBLIC_KEY]
+ secrets:
+ SIGNER_PRIVATE_KEY: ${{ secrets.SIGNER_PRIVATE_KEY }} // then configure this in your Github/Settings/Actions
+```
+
+Reference: [quickstart](https://github.com/nearbuilders/quickstart)
+
## API Endpoints
A running `bos-workspace` server exposes several endpoints for interacting with local data:
@@ -132,4 +383,4 @@ A running `bos-workspace` server exposes several endpoints for interacting with
## Contributing
-Read [CONTRIBUTING](./CONTRIBUTING.md)
\ No newline at end of file
+Read [CONTRIBUTING](./CONTRIBUTING.md)
diff --git a/examples/multi/apps/GoodbyeNothing/data.json b/examples/multi/apps/GoodbyeNothing/data.json
deleted file mode 100644
index 0de83ad..0000000
--- a/examples/multi/apps/GoodbyeNothing/data.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "goodbyenothing.near": {}
-}
diff --git a/examples/multi/apps/HelloWorld/data.json b/examples/multi/apps/HelloWorld/data.json
deleted file mode 100644
index 09024c2..0000000
--- a/examples/multi/apps/HelloWorld/data.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "helloworld.near": {}
-}
diff --git a/examples/single/bos.config.json b/examples/single/bos.config.json
index ad26b61..273c159 100644
--- a/examples/single/bos.config.json
+++ b/examples/single/bos.config.json
@@ -1,10 +1,12 @@
{
"account": "quickstart.near",
"aliases": ["./aliases.mainnet.json"],
+ "index": "quickstart.near/widget/home",
"overrides": {
"testnet": {
"account": "quickstart.testnet",
- "aliases": ["./aliases.testnet.json"]
+ "aliases": ["./aliases.testnet.json"],
+ "index": "quickstart.testnet/widget/home"
}
}
}
diff --git a/examples/single/data.json b/examples/single/data.json
deleted file mode 100644
index 6d1607e..0000000
--- a/examples/single/data.json
+++ /dev/null
@@ -1,3 +0,0 @@
-{
- "quickstart.near": {}
-}
diff --git a/gateway/dist/2720.7b0337e34ef532f1f418.bundle.js b/gateway/dist/2720.f4edb04151cbcbb909a7.bundle.js
similarity index 99%
rename from gateway/dist/2720.7b0337e34ef532f1f418.bundle.js
rename to gateway/dist/2720.f4edb04151cbcbb909a7.bundle.js
index 13376dd..f7a4e32 100644
--- a/gateway/dist/2720.7b0337e34ef532f1f418.bundle.js
+++ b/gateway/dist/2720.f4edb04151cbcbb909a7.bundle.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkbos_workspace_gateway=self.webpackChunkbos_workspace_gateway||[]).push([[2720],{52720:(t,n,e)=>{e.r(n),e.d(n,{default:()=>Q});var o=e(40136),i=e(88812),r=e(29050),a=e(12115),s=e(38828);function l(t,{from:n,to:e},i={}){const r=getComputedStyle(t),a="none"===r.transform?"":r.transform,[s,l]=r.transformOrigin.split(" ").map(parseFloat),c=n.left+n.width*s/e.width-(e.left+s),d=n.top+n.height*l/e.height-(e.top+l),{delay:f=0,duration:p=(t=>120*Math.sqrt(t)),easing:v=o.an}=i;return{delay:f,duration:(0,o.Z)(p)?p(Math.sqrt(c*c+d*d)):p,easing:v,css:(t,o)=>{const i=o*c,r=o*d,s=t+o*n.width/e.width,l=t+o*n.height/e.height;return`transform: ${a} translate(${i}px, ${r}px) scale(${s}, ${l});`}}}function c(t){(0,o.a)(t,"svelte-13cuwwo","div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}")}function d(t){let n,e;return{c(){n=(0,o.j)("div"),(0,o.k)(n,"class","border svelte-13cuwwo"),(0,o.k)(n,"style",e=`\n width: ${t[2]-2*t[3]}px; \n height: ${t[2]-2*t[3]}px; \n border-color: var(${t[1]}); \n padding: ${t[3]}px; \n background-color: ${t[4]};\n border-radius: 50%;\n display: flex;\n justify-content: center;\n `)},m(e,i){(0,o.b)(e,n,i),n.innerHTML=t[0]},p(t,[i]){1&i&&(n.innerHTML=t[0]),30&i&&e!==(e=`\n width: ${t[2]-2*t[3]}px; \n height: ${t[2]-2*t[3]}px; \n border-color: var(${t[1]}); \n padding: ${t[3]}px; \n background-color: ${t[4]};\n border-radius: 50%;\n display: flex;\n justify-content: center;\n `)&&(0,o.k)(n,"style",e)},i:o.n,o:o.n,d(t){t&&(0,o.d)(n)}}}function f(t,n,e){let{icon:o}=n,{borderColorVar:i}=n,{size:r}=n,{padding:a=0}=n,{background:s="transparent"}=n;return t.$$set=t=>{"icon"in t&&e(0,o=t.icon),"borderColorVar"in t&&e(1,i=t.borderColorVar),"size"in t&&e(2,r=t.size),"padding"in t&&e(3,a=t.padding),"background"in t&&e(4,s=t.background)},[o,i,r,a,s]}e(46880),e(16075),e(54213),e(60346),e(12926),e(63064),e(70182),e(30228);class p extends o.S{constructor(t){super(),(0,o.i)(this,t,f,d,o.s,{icon:0,borderColorVar:1,size:2,padding:3,background:4},c)}}function v(t){(0,o.a)(t,"svelte-jvic9v","div.notification-icons-wrapper.svelte-jvic9v{height:32px;width:32px}.border.svelte-jvic9v{border-radius:8px}div.notification-icon.svelte-jvic9v{padding:6px}div.pending-icon.svelte-jvic9v{animation:svelte-jvic9v-blink 2s ease-in infinite;height:100%;width:100%;padding:7px}@keyframes svelte-jvic9v-blink{from,to{opacity:1}50%{opacity:0.2}}div.border-action.svelte-jvic9v{height:32px;min-width:32px;border-radius:8px;overflow:hidden;will-change:transform}div.border-action.svelte-jvic9v:before{content:'';background-image:conic-gradient(#b1b7f2 20deg, #6370e5 120deg);height:140%;width:140%;position:absolute;left:-25%;top:-25%;animation:svelte-jvic9v-rotate 2s infinite linear}div.chain-icon-container.svelte-jvic9v{left:18px;top:18px}@keyframes svelte-jvic9v-rotate{100%{transform:rotate(-360deg)}}")}function u(t){let n,e,i,r,a,s,l,c,d=o.ao[t[1].type].eventIcon+"",f=!t[1].id.includes("customNotification")&&!t[1].id.includes("preflight"),p="pending"===t[1].type&&y(),v=f&&m(t);return{c(){n=(0,o.j)("div"),p&&p.c(),e=(0,o.G)(),i=(0,o.j)("div"),r=(0,o.j)("div"),l=(0,o.G)(),v&&v.c(),(0,o.k)(r,"class",a=(0,o.l)("notification-icon flex items-center justify-center "+("pending"===t[1].type?"pending-icon":""))+" svelte-jvic9v"),(0,o.k)(i,"class","flex items-center justify-center border relative notification-icons-wrapper svelte-jvic9v"),(0,o.k)(i,"style",s=`background:${o.ao[t[1].type].backgroundColor}; color: ${o.ao[t[1].type].iconColor||""}; ${"pending"===t[1].type?"height: 28px; width: 28px; margin: 2px;":`border: 2px solid ${o.ao[t[1].type].borderColor}`}; `),(0,o.k)(n,"class","relative")},m(t,a){(0,o.b)(t,n,a),p&&p.m(n,null),(0,o.m)(n,e),(0,o.m)(n,i),(0,o.m)(i,r),r.innerHTML=d,(0,o.m)(n,l),v&&v.m(n,null),c=!0},p(t,l){"pending"===t[1].type?p||(p=y(),p.c(),p.m(n,e)):p&&(p.d(1),p=null),(!c||2&l)&&d!==(d=o.ao[t[1].type].eventIcon+"")&&(r.innerHTML=d),(!c||2&l&&a!==(a=(0,o.l)("notification-icon flex items-center justify-center "+("pending"===t[1].type?"pending-icon":""))+" svelte-jvic9v"))&&(0,o.k)(r,"class",a),(!c||2&l&&s!==(s=`background:${o.ao[t[1].type].backgroundColor}; color: ${o.ao[t[1].type].iconColor||""}; ${"pending"===t[1].type?"height: 28px; width: 28px; margin: 2px;":`border: 2px solid ${o.ao[t[1].type].borderColor}`}; `))&&(0,o.k)(i,"style",s),2&l&&(f=!t[1].id.includes("customNotification")&&!t[1].id.includes("preflight")),f?v?(v.p(t,l),2&l&&(0,o.x)(v,1)):(v=m(t),v.c(),(0,o.x)(v,1),v.m(n,null)):v&&((0,o.y)(),(0,o.A)(v,1,1,(()=>{v=null})),(0,o.z)())},i(t){c||((0,o.x)(v),c=!0)},o(t){(0,o.A)(v),c=!1},d(t){t&&(0,o.d)(n),p&&p.d(),v&&v.d()}}}function y(t){let n;return{c(){n=(0,o.j)("div"),(0,o.k)(n,"class","border-action absolute svelte-jvic9v")},m(t,e){(0,o.b)(t,n,e)},d(t){t&&(0,o.d)(n)}}}function m(t){let n,e,i;return e=new p({props:{icon:t[0].icon,size:16,background:t[0].color,borderColorVar:"--notify-onboard-background, var(--onboard-gray-600, var(--gray-600))",padding:3}}),{c(){n=(0,o.j)("div"),(0,o.F)(e.$$.fragment),(0,o.k)(n,"class","absolute chain-icon-container svelte-jvic9v")},m(t,r){(0,o.b)(t,n,r),(0,o.I)(e,n,null),i=!0},p(t,n){const o={};1&n&&(o.icon=t[0].icon),1&n&&(o.background=t[0].color),e.$set(o)},i(t){i||((0,o.x)(e.$$.fragment,t),i=!0)},o(t){(0,o.A)(e.$$.fragment,t),i=!1},d(t){t&&(0,o.d)(n),(0,o.K)(e)}}}function b(t){let n,e,i=t[1].type&&u(t);return{c(){i&&i.c(),n=(0,o.e)()},m(t,r){i&&i.m(t,r),(0,o.b)(t,n,r),e=!0},p(t,[e]){t[1].type?i?(i.p(t,e),2&e&&(0,o.x)(i,1)):(i=u(t),i.c(),(0,o.x)(i,1),i.m(n.parentNode,n)):i&&((0,o.y)(),(0,o.A)(i,1,1,(()=>{i=null})),(0,o.z)())},i(t){e||((0,o.x)(i),e=!0)},o(t){(0,o.A)(i),e=!1},d(t){i&&i.d(t),t&&(0,o.d)(n)}}}function h(t,n,e){let{chainStyles:i=o.a6}=n,{notification:r}=n;return t.$$set=t=>{"chainStyles"in t&&e(0,i=t.chainStyles),"notification"in t&&e(1,r=t.notification)},[i,r]}class g extends o.S{constructor(t){super(),(0,o.i)(this,t,h,b,o.s,{chainStyles:0,notification:1},v)}}function k(t){(0,o.a)(t,"svelte-pm7idu","div.svelte-pm7idu{display:flex;justify-content:center;font-size:inherit;font-family:inherit;margin:0 1.5rem 0 0.75rem}span.svelte-pm7idu{font-family:inherit;display:flex;align-items:center;margin:0 2px}.time.svelte-pm7idu{color:var(\n --notify-onboard-timer-color,\n var(--onboard-gray-300, var(--gray-300))\n );margin-left:4px}")}function x(t){let n,e,i,r,a=t[2](t[1]-t[0])+"";return{c(){n=(0,o.t)("-\n "),e=(0,o.j)("span"),i=(0,o.t)(a),r=(0,o.t)("\n ago"),(0,o.k)(e,"class","svelte-pm7idu")},m(t,a){(0,o.b)(t,n,a),(0,o.b)(t,e,a),(0,o.m)(e,i),(0,o.b)(t,r,a)},p(t,n){3&n&&a!==(a=t[2](t[1]-t[0])+"")&&(0,o.v)(i,a)},d(t){t&&(0,o.d)(n),t&&(0,o.d)(e),t&&(0,o.d)(r)}}}function w(t){let n,e=t[0]&&x(t);return{c(){n=(0,o.j)("div"),e&&e.c(),(0,o.k)(n,"class","time svelte-pm7idu")},m(t,i){(0,o.b)(t,n,i),e&&e.m(n,null)},p(t,[o]){t[0]?e?e.p(t,o):(e=x(t),e.c(),e.m(n,null)):e&&(e.d(1),e=null)},i:o.n,o:o.n,d(t){t&&(0,o.d)(n),e&&e.d()}}}function $(t,n,e){let r,a;(0,o.c)(t,i._,(t=>e(3,r=t))),(0,o.c)(t,i.Hg,(t=>e(4,a=t)));let{startTime:s}=n,l=Date.now();const c=setInterval((()=>{e(1,l=Date.now())}),1e3);return(0,o.al)((()=>{clearInterval(c)})),t.$$set=t=>{"startTime"in t&&e(0,s=t.startTime)},[s,l,function(t){const n=Math.floor(t/1e3),e=n<0?0:n;return e>=60?`${Math.floor(e/60).toLocaleString(a)} ${r("notify.time.minutes")}`:`${e.toLocaleString(a)} ${r("notify.time.seconds")}`}]}class j extends o.S{constructor(t){super(),(0,o.i)(this,t,$,w,o.s,{startTime:0},k)}}function z(t){(0,o.a)(t,"svelte-1otz6tt","div.notify-transaction-data.svelte-1otz6tt{font-size:var(\n --notify-onboard-transaction-font-size,\n var(--onboard-font-size-6, var(--font-size-6))\n );font-family:inherit;margin:0px 20px 0px 8px;justify-content:center}.hash-time.svelte-1otz6tt{display:inline-flex;margin-top:4px;font-size:var(\n --notify-onboard-hash-time-font-size,\n var(--onboard-font-size-7, var(--font-size-7))\n );line-height:var(\n --notify-onboard-hash-time-font-line-height,\n var(--onboard-font-line-height-4, var(--font-line-height-4))\n )}.address-hash.svelte-1otz6tt{color:var(\n --notify-onboard-address-hash-color,\n var(--onboard-primary-200, var(--primary-200))\n )}a.address-hash.svelte-1otz6tt{color:var(\n --notify-onboard-anchor-color,\n var(--onboard-primary-400, var(--primary-400))\n )}a.svelte-1otz6tt{display:flex;text-decoration:none;color:inherit}.transaction-status.svelte-1otz6tt{color:var(--notify-onboard-transaction-status, inherit);line-height:var(\n --notify-onboard-font-size-5,\n var(--onboard-font-size-5, var(--font-size-5))\n );font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}")}function C(t){let n,e,i,r;function a(t,n){return t[0].link?P:L}let s=a(t),l=s(t);return i=new j({props:{startTime:t[0].startTime}}),{c(){n=(0,o.j)("span"),l.c(),e=(0,o.G)(),(0,o.F)(i.$$.fragment),(0,o.k)(n,"class","hash-time svelte-1otz6tt")},m(t,a){(0,o.b)(t,n,a),l.m(n,null),(0,o.m)(n,e),(0,o.I)(i,n,null),r=!0},p(t,o){s===(s=a(t))&&l?l.p(t,o):(l.d(1),l=s(t),l&&(l.c(),l.m(n,e)));const r={};1&o&&(r.startTime=t[0].startTime),i.$set(r)},i(t){r||((0,o.x)(i.$$.fragment,t),r=!0)},o(t){(0,o.A)(i.$$.fragment,t),r=!1},d(t){t&&(0,o.d)(n),l.d(),(0,o.K)(i)}}}function L(t){let n,e,i=(0,o.E)(t[0].id)+"";return{c(){n=(0,o.j)("div"),e=(0,o.t)(i),(0,o.k)(n,"class","address-hash svelte-1otz6tt")},m(t,i){(0,o.b)(t,n,i),(0,o.m)(n,e)},p(t,n){1&n&&i!==(i=(0,o.E)(t[0].id)+"")&&(0,o.v)(e,i)},d(t){t&&(0,o.d)(n)}}}function P(t){let n,e,i,r=(0,o.E)(t[0].id)+"";return{c(){n=(0,o.j)("a"),e=(0,o.t)(r),(0,o.k)(n,"class","address-hash svelte-1otz6tt"),(0,o.k)(n,"href",i=t[0].link),(0,o.k)(n,"target","_blank"),(0,o.k)(n,"rel","noreferrer noopener")},m(t,i){(0,o.b)(t,n,i),(0,o.m)(n,e)},p(t,a){1&a&&r!==(r=(0,o.E)(t[0].id)+"")&&(0,o.v)(e,r),1&a&&i!==(i=t[0].link)&&(0,o.k)(n,"href",i)},d(t){t&&(0,o.d)(n)}}}function T(t){let n,e,i,r,a,s=t[0].message+"",l=t[0].id&&!t[0].id.includes("customNotification")&&!t[0].id.includes("preflight"),c=l&&C(t);return{c(){n=(0,o.j)("div"),e=(0,o.j)("span"),i=(0,o.t)(s),r=(0,o.G)(),c&&c.c(),(0,o.k)(e,"class","transaction-status svelte-1otz6tt"),(0,o.k)(n,"class","flex flex-column notify-transaction-data svelte-1otz6tt")},m(t,s){(0,o.b)(t,n,s),(0,o.m)(n,e),(0,o.m)(e,i),(0,o.m)(n,r),c&&c.m(n,null),a=!0},p(t,[e]){(!a||1&e)&&s!==(s=t[0].message+"")&&(0,o.v)(i,s),1&e&&(l=t[0].id&&!t[0].id.includes("customNotification")&&!t[0].id.includes("preflight")),l?c?(c.p(t,e),1&e&&(0,o.x)(c,1)):(c=C(t),c.c(),(0,o.x)(c,1),c.m(n,null)):c&&((0,o.y)(),(0,o.A)(c,1,1,(()=>{c=null})),(0,o.z)())},i(t){a||((0,o.x)(c),a=!0)},o(t){(0,o.A)(c),a=!1},d(t){t&&(0,o.d)(n),c&&c.d()}}}function S(t,n,e){let{notification:o}=n;return t.$$set=t=>{"notification"in t&&e(0,o=t.notification)},[o]}class A extends o.S{constructor(t){super(),(0,o.i)(this,t,S,T,o.s,{notification:0},z)}}const M=["txPool"],F=["main","matic-main"],G=["Ledger","Trezor","Keystone","KeepKey","D'CENT"],H=t=>M.includes(t),I=t=>F.includes(t),E=t=>t&&G.includes(t.label);async function R({type:t,wallet:n,transaction:e}){const{from:i,input:r,value:a,to:l,nonce:c,gas:d,network:f}=e,p=o.ap[f],{gasPriceProbability:v}=o.a3.get().notify.replacement,{gas:u,apiKey:y}=o.af,[m]=await u.get({chains:[o.ap[f]],endpoint:"blockPrices",apiKey:y}),{maxFeePerGas:b,maxPriorityFeePerGas:h}=m.blockPrices[0].estimatedPrices.find((({confidence:n})=>n===("speedup"===t?v.speedup:v.cancel))),g=(0,o.aq)(b),k=(0,o.aq)(h),x="0x"===r?{}:{data:r};return n.provider.request({method:"eth_sendTransaction",params:[{type:"0x2",from:i,to:"cancel"===t?i:l,chainId:parseInt(p),value:`${s.gH.from(a).toHexString()}`,nonce:(0,o.ar)(c),gasLimit:(0,o.ar)(d),maxFeePerGas:g,maxPriorityFeePerGas:k,...x}]})}function K(t){(0,o.a)(t,"svelte-ftkynd",".bn-notify-notification.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{--backround-color:var(--notify-onboard-background, var(--w3o-backround-color, var(--gray-700)));--foreground-color:var(--w3o-foreground-color, var(--gray-600));--text-color:var(--w3o-text-color, #FFF);--border-color:var(--w3o-border-color);font-family:inherit;transition:background 300ms ease-in-out, color 300ms ease-in-out;pointer-events:all;backdrop-filter:blur(5px);width:100%;min-height:56px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid transparent;border-radius:var(\n --notify-onboard-border-radius,\n var(--onboard-border-radius-4, var(--border-radius-4))\n );background:var(--foreground-color);color:var(--text-color)}.bn-notify-notification-inner.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{padding:0.75rem}.bn-notify-notification.svelte-ftkynd:hover>div.bn-notify-notification-inner.svelte-ftkynd>div.notify-close-btn-desktop.svelte-ftkynd{visibility:visible;opacity:1}div.notify-close-btn.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{margin-left:auto;margin-bottom:auto;height:24px;width:24px;position:absolute;top:8px;right:8px;justify-content:center;align-items:center}div.notify-close-btn-desktop.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{visibility:hidden;transition:visibility 0.15s linear, opacity 0.15s linear;opacity:0}.notify-close-btn.svelte-ftkynd .close-icon.svelte-ftkynd.svelte-ftkynd{width:20px;margin:auto;color:var(--text-color)}.notify-close-btn.svelte-ftkynd>.close-icon.svelte-ftkynd.svelte-ftkynd{color:var(--notify-onboard-close-icon-color)}.notify-close-btn.svelte-ftkynd:hover>.close-icon.svelte-ftkynd.svelte-ftkynd{color:var(--notify-onboard-close-icon-hover)}.transaction-status.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{color:var(\n --notify-onboard-transaction-status-color,\n var(--onboard-primary-100, var(--primary-100))\n );line-height:14px}.dropdown.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{height:0px;overflow:hidden;transition:height 150ms ease-in-out}.dropdown-visible.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{height:48px}.dropdown-buttons.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{background-color:var(\n --notify-onboard-dropdown-background,\n var(--onboard-gray-700, var(--gray-700))\n );width:100%;padding:8px}.dropdown-button.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{padding:4px 12px;border-radius:var(\n --notify-onboard-dropdown-border-radius,\n var(--onboard-border-radius-5, var(--border-radius-5))\n );background-color:transparent;font-size:var(\n --notify-onboard-dropdown-font-size,\n var(--onboard-font-size-6, var(--font-size-6))\n );color:var(\n --notify-onboard-dropdown-text-color,\n var(--onboard-primary-400, var(--primary-400))\n );transition:all 150ms ease-in-out;cursor:pointer}.dropdown-button.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd:hover{background:var(\n --notify-onboard-dropdown-btn-hover-background,\n rgba(146, 155, 237, 0.2)\n )}")}function _(t){let n,e,i,r,a,s;return{c(){n=(0,o.j)("div"),e=(0,o.j)("button"),e.textContent="Cancel",i=(0,o.G)(),r=(0,o.j)("button"),r.textContent="Speed-up",(0,o.k)(e,"class","dropdown-button svelte-ftkynd"),(0,o.k)(r,"class","dropdown-button svelte-ftkynd"),(0,o.k)(n,"class","dropdown-buttons flex items-center justify-end svelte-ftkynd")},m(l,c){(0,o.b)(l,n,c),(0,o.m)(n,e),(0,o.m)(n,i),(0,o.m)(n,r),a||(s=[(0,o.p)(e,"click",t[9]),(0,o.p)(r,"click",t[10])],a=!0)},p:o.n,d(t){t&&(0,o.d)(n),a=!1,(0,o.L)(s)}}}function D(t){let n,e,i,r,a,s,l,c,d,f,p,v,u,y;i=new g({props:{notification:t[0],chainStyles:o.as[o.ap[t[0].network]]}}),a=new A({props:{notification:t[0]}});let m="txPool"===t[0].eventCode&&_(t);return{c(){n=(0,o.j)("div"),e=(0,o.j)("div"),(0,o.F)(i.$$.fragment),r=(0,o.G)(),(0,o.F)(a.$$.fragment),s=(0,o.G)(),l=(0,o.j)("div"),c=(0,o.j)("div"),d=(0,o.G)(),f=(0,o.j)("div"),m&&m.c(),(0,o.k)(c,"class","flex items-center close-icon svelte-ftkynd"),(0,o.k)(l,"class","notify-close-btn notify-close-btn-"+t[4].type+" pointer flex svelte-ftkynd"),(0,o.k)(e,"class","flex bn-notify-notification-inner svelte-ftkynd"),(0,o.k)(f,"class","dropdown svelte-ftkynd"),(0,o.H)(f,"dropdown-visible",t[2]&&t[5]&&H(t[0].eventCode)&&I(t[0].network)&&E(t[7])),(0,o.k)(n,"class",p="bn-notify-notification bn-notify-notification-"+t[0].type+"} svelte-ftkynd"),(0,o.H)(n,"bn-notify-clickable",t[0].onClick)},m(p,b){(0,o.b)(p,n,b),(0,o.m)(n,e),(0,o.I)(i,e,null),(0,o.m)(e,r),(0,o.I)(a,e,null),(0,o.m)(e,s),(0,o.m)(e,l),(0,o.m)(l,c),c.innerHTML='\n\n \n \n',(0,o.m)(n,d),(0,o.m)(n,f),m&&m.m(f,null),v=!0,u||(y=[(0,o.p)(l,"click",(0,o.J)(t[8])),(0,o.p)(n,"mouseenter",t[11]),(0,o.p)(n,"mouseleave",t[12]),(0,o.p)(n,"click",t[13])],u=!0)},p(t,[e]){const r={};1&e&&(r.notification=t[0]),1&e&&(r.chainStyles=o.as[o.ap[t[0].network]]),i.$set(r);const s={};1&e&&(s.notification=t[0]),a.$set(s),"txPool"===t[0].eventCode?m?m.p(t,e):(m=_(t),m.c(),m.m(f,null)):m&&(m.d(1),m=null),(!v||165&e)&&(0,o.H)(f,"dropdown-visible",t[2]&&t[5]&&H(t[0].eventCode)&&I(t[0].network)&&E(t[7])),(!v||1&e&&p!==(p="bn-notify-notification bn-notify-notification-"+t[0].type+"} svelte-ftkynd"))&&(0,o.k)(n,"class",p),(!v||1&e)&&(0,o.H)(n,"bn-notify-clickable",t[0].onClick)},i(t){v||((0,o.x)(i.$$.fragment,t),(0,o.x)(a.$$.fragment,t),v=!0)},o(t){(0,o.A)(i.$$.fragment,t),(0,o.A)(a.$$.fragment,t),v=!1},d(t){t&&(0,o.d)(n),(0,o.K)(i),(0,o.K)(a),m&&m.d(),u=!1,(0,o.L)(y)}}}function N(t,n,e){let r,a;(0,o.c)(t,o.w,(t=>e(15,r=t))),(0,o.c)(t,i._,(t=>e(3,a=t)));const{device:s,gas:l}=o.af;let c,{notification:d}=n,{updateParentOnRemove:f}=n,p=!1;const v=o.at.getValue().find((({hash:t})=>t===d.id)),u=v&&r.find((({accounts:t})=>!!t.find((({address:t})=>t.toLowerCase()===v.from.toLowerCase()))));return(0,o.al)((()=>{clearTimeout(c)})),t.$$set=t=>{"notification"in t&&e(0,d=t.notification),"updateParentOnRemove"in t&&e(1,f=t.updateParentOnRemove)},t.$$.update=()=>{1&t.$$.dirty&&d.autoDismiss&&(c=setTimeout((()=>{(0,o.au)(d.id),(0,o.av)(d.id)}),d.autoDismiss))},[d,f,p,a,s,l,v,u,()=>{(0,o.au)(d.id),(0,o.av)(d.id),f()},async()=>{try{await R({type:"cancel",wallet:u,transaction:v})}catch(t){const n=`${v.hash.slice(0,9)}:txReplaceError${v.hash.slice(-5)}`;(0,o.aw)({id:n,type:"hint",eventCode:"txError",message:a("notify.transaction.txReplaceError"),key:n,autoDismiss:4e3})}},async()=>{try{await R({type:"speedup",wallet:u,transaction:v})}catch(t){const n=`${v.hash.slice(0,9)}:txReplaceError${v.hash.slice(-5)}`;(0,o.aw)({id:n,type:"hint",eventCode:"txError",message:a("notify.transaction.txReplaceError"),key:n,autoDismiss:4e3})}},()=>e(2,p=!0),()=>e(2,p=!1),t=>d.onClick&&d.onClick(t)]}class V extends o.S{constructor(t){super(),(0,o.i)(this,t,N,D,o.s,{notification:0,updateParentOnRemove:1},K)}}function O(t){(0,o.a)(t,"svelte-1h8mmo3","ul.svelte-1h8mmo3{padding-left:0;display:flex;flex-flow:column nowrap;font-size:var(\n --notify-onboard-font-size,\n var(--onboard-font-size-5, var(--font-size-5))\n );list-style-type:none;overflow:visible;scrollbar-width:none;box-sizing:border-box;z-index:var(--notify-onboard-z-index, 300);font-family:var(\n --notify-onboard-font-family,\n var(--onboard-font-family-normal, inherit)\n );margin:8px 0;pointer-events:all}.y-scroll.svelte-1h8mmo3{overflow-y:scroll}.y-visible.svelte-1h8mmo3{overflow-y:visible}li.notification-list-top.svelte-1h8mmo3:not(:first-child){margin-top:8px}li.notification-list-bottom.svelte-1h8mmo3:not(:first-child){margin-bottom:8px}ul.bn-notify-bottomLeft.svelte-1h8mmo3,ul.bn-notify-bottomRight.svelte-1h8mmo3{flex-direction:column-reverse}@media only screen and (max-width: 450px){ul.svelte-1h8mmo3{width:100%}}.bn-notify-clickable:hover{cursor:pointer}.svelte-1h8mmo3::-webkit-scrollbar{display:none}")}function q(t,n,e){const o=t.slice();return o[12]=n[e],o}function Z(t){let n,e,i,r,a=[],s=new Map,l=t[2];const c=t=>t[12].key;for(let n=0;n{f&&(c&&c.end(1),s=(0,o.V)(e,o.ab,{duration:1200,delay:300,x:n[3],y:n[4],easing:U}),s.start())})),f=!0)},o(t){(0,o.A)(i.$$.fragment,t),s&&s.invalidate(),c=(0,o.ak)(e,o.X,{duration:300,easing:o.an}),f=!1},d(t){t&&(0,o.d)(e),(0,o.K)(i),t&&c&&c.end(),p=!1,v()}}}function J(t){let n,e,i=t[2].length&&Z(t);return{c(){i&&i.c(),n=(0,o.e)()},m(t,r){i&&i.m(t,r),(0,o.b)(t,n,r),e=!0},p(t,[e]){t[2].length?i?(i.p(t,e),4&e&&(0,o.x)(i,1)):(i=Z(t),i.c(),(0,o.x)(i,1),i.m(n.parentNode,n)):i&&((0,o.y)(),(0,o.A)(i,1,1,(()=>{i=null})),(0,o.z)())},i(t){e||((0,o.x)(i),e=!0)},o(t){(0,o.A)(i),e=!1},d(t){i&&i.d(t),t&&(0,o.d)(n)}}}function U(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-35*t)+1}function X(t,n,e){let i;const{device:s}=o.af,l=o.a3.select("accountCenter").pipe((0,r.Z)(o.a3.get().accountCenter),(0,a.t)(1));(0,o.c)(t,l,(t=>e(6,i=t)));let c,d,{position:f}=n,{sharedContainer:p}=n,{notifications:v}=n;c=0,d=0;let u="y-scroll";const y=function(){let t=null;return(n,e)=>{clearTimeout(t),t=setTimeout(n,e)}}();return t.$$set=t=>{"position"in t&&e(0,f=t.position),"sharedContainer"in t&&e(1,p=t.sharedContainer),"notifications"in t&&e(2,v=t.notifications)},t.$$.update=()=>{1&t.$$.dirty&&(f.includes("top")?e(4,d=-50):e(4,d=50))},[f,p,v,0,d,u,i,s,l,()=>{"y-visible"!==u&&e(5,u="y-visible"),y((function(){e(5,u="y-scroll")}),1e3)},function(n){o.ai.call(this,t,n)}]}class Q extends o.S{constructor(t){super(),(0,o.i)(this,t,X,J,o.s,{position:0,sharedContainer:1,notifications:2},O)}}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkbos_workspace_gateway=self.webpackChunkbos_workspace_gateway||[]).push([[2720],{52720:(t,n,e)=>{e.r(n),e.d(n,{default:()=>Q});var o=e(59444),i=e(88812),r=e(29050),a=e(12115),s=e(38828);function l(t,{from:n,to:e},i={}){const r=getComputedStyle(t),a="none"===r.transform?"":r.transform,[s,l]=r.transformOrigin.split(" ").map(parseFloat),c=n.left+n.width*s/e.width-(e.left+s),d=n.top+n.height*l/e.height-(e.top+l),{delay:f=0,duration:p=(t=>120*Math.sqrt(t)),easing:v=o.an}=i;return{delay:f,duration:(0,o.Z)(p)?p(Math.sqrt(c*c+d*d)):p,easing:v,css:(t,o)=>{const i=o*c,r=o*d,s=t+o*n.width/e.width,l=t+o*n.height/e.height;return`transform: ${a} translate(${i}px, ${r}px) scale(${s}, ${l});`}}}function c(t){(0,o.a)(t,"svelte-13cuwwo","div.svelte-13cuwwo{box-sizing:content-box}.border.svelte-13cuwwo{border:2px solid;border-radius:120px;overflow:hidden}")}function d(t){let n,e;return{c(){n=(0,o.j)("div"),(0,o.k)(n,"class","border svelte-13cuwwo"),(0,o.k)(n,"style",e=`\n width: ${t[2]-2*t[3]}px; \n height: ${t[2]-2*t[3]}px; \n border-color: var(${t[1]}); \n padding: ${t[3]}px; \n background-color: ${t[4]};\n border-radius: 50%;\n display: flex;\n justify-content: center;\n `)},m(e,i){(0,o.b)(e,n,i),n.innerHTML=t[0]},p(t,[i]){1&i&&(n.innerHTML=t[0]),30&i&&e!==(e=`\n width: ${t[2]-2*t[3]}px; \n height: ${t[2]-2*t[3]}px; \n border-color: var(${t[1]}); \n padding: ${t[3]}px; \n background-color: ${t[4]};\n border-radius: 50%;\n display: flex;\n justify-content: center;\n `)&&(0,o.k)(n,"style",e)},i:o.n,o:o.n,d(t){t&&(0,o.d)(n)}}}function f(t,n,e){let{icon:o}=n,{borderColorVar:i}=n,{size:r}=n,{padding:a=0}=n,{background:s="transparent"}=n;return t.$$set=t=>{"icon"in t&&e(0,o=t.icon),"borderColorVar"in t&&e(1,i=t.borderColorVar),"size"in t&&e(2,r=t.size),"padding"in t&&e(3,a=t.padding),"background"in t&&e(4,s=t.background)},[o,i,r,a,s]}e(46880),e(16075),e(54213),e(60346),e(12926),e(63064),e(70182),e(30228);class p extends o.S{constructor(t){super(),(0,o.i)(this,t,f,d,o.s,{icon:0,borderColorVar:1,size:2,padding:3,background:4},c)}}function v(t){(0,o.a)(t,"svelte-jvic9v","div.notification-icons-wrapper.svelte-jvic9v{height:32px;width:32px}.border.svelte-jvic9v{border-radius:8px}div.notification-icon.svelte-jvic9v{padding:6px}div.pending-icon.svelte-jvic9v{animation:svelte-jvic9v-blink 2s ease-in infinite;height:100%;width:100%;padding:7px}@keyframes svelte-jvic9v-blink{from,to{opacity:1}50%{opacity:0.2}}div.border-action.svelte-jvic9v{height:32px;min-width:32px;border-radius:8px;overflow:hidden;will-change:transform}div.border-action.svelte-jvic9v:before{content:'';background-image:conic-gradient(#b1b7f2 20deg, #6370e5 120deg);height:140%;width:140%;position:absolute;left:-25%;top:-25%;animation:svelte-jvic9v-rotate 2s infinite linear}div.chain-icon-container.svelte-jvic9v{left:18px;top:18px}@keyframes svelte-jvic9v-rotate{100%{transform:rotate(-360deg)}}")}function u(t){let n,e,i,r,a,s,l,c,d=o.ao[t[1].type].eventIcon+"",f=!t[1].id.includes("customNotification")&&!t[1].id.includes("preflight"),p="pending"===t[1].type&&y(),v=f&&m(t);return{c(){n=(0,o.j)("div"),p&&p.c(),e=(0,o.G)(),i=(0,o.j)("div"),r=(0,o.j)("div"),l=(0,o.G)(),v&&v.c(),(0,o.k)(r,"class",a=(0,o.l)("notification-icon flex items-center justify-center "+("pending"===t[1].type?"pending-icon":""))+" svelte-jvic9v"),(0,o.k)(i,"class","flex items-center justify-center border relative notification-icons-wrapper svelte-jvic9v"),(0,o.k)(i,"style",s=`background:${o.ao[t[1].type].backgroundColor}; color: ${o.ao[t[1].type].iconColor||""}; ${"pending"===t[1].type?"height: 28px; width: 28px; margin: 2px;":`border: 2px solid ${o.ao[t[1].type].borderColor}`}; `),(0,o.k)(n,"class","relative")},m(t,a){(0,o.b)(t,n,a),p&&p.m(n,null),(0,o.m)(n,e),(0,o.m)(n,i),(0,o.m)(i,r),r.innerHTML=d,(0,o.m)(n,l),v&&v.m(n,null),c=!0},p(t,l){"pending"===t[1].type?p||(p=y(),p.c(),p.m(n,e)):p&&(p.d(1),p=null),(!c||2&l)&&d!==(d=o.ao[t[1].type].eventIcon+"")&&(r.innerHTML=d),(!c||2&l&&a!==(a=(0,o.l)("notification-icon flex items-center justify-center "+("pending"===t[1].type?"pending-icon":""))+" svelte-jvic9v"))&&(0,o.k)(r,"class",a),(!c||2&l&&s!==(s=`background:${o.ao[t[1].type].backgroundColor}; color: ${o.ao[t[1].type].iconColor||""}; ${"pending"===t[1].type?"height: 28px; width: 28px; margin: 2px;":`border: 2px solid ${o.ao[t[1].type].borderColor}`}; `))&&(0,o.k)(i,"style",s),2&l&&(f=!t[1].id.includes("customNotification")&&!t[1].id.includes("preflight")),f?v?(v.p(t,l),2&l&&(0,o.x)(v,1)):(v=m(t),v.c(),(0,o.x)(v,1),v.m(n,null)):v&&((0,o.y)(),(0,o.A)(v,1,1,(()=>{v=null})),(0,o.z)())},i(t){c||((0,o.x)(v),c=!0)},o(t){(0,o.A)(v),c=!1},d(t){t&&(0,o.d)(n),p&&p.d(),v&&v.d()}}}function y(t){let n;return{c(){n=(0,o.j)("div"),(0,o.k)(n,"class","border-action absolute svelte-jvic9v")},m(t,e){(0,o.b)(t,n,e)},d(t){t&&(0,o.d)(n)}}}function m(t){let n,e,i;return e=new p({props:{icon:t[0].icon,size:16,background:t[0].color,borderColorVar:"--notify-onboard-background, var(--onboard-gray-600, var(--gray-600))",padding:3}}),{c(){n=(0,o.j)("div"),(0,o.F)(e.$$.fragment),(0,o.k)(n,"class","absolute chain-icon-container svelte-jvic9v")},m(t,r){(0,o.b)(t,n,r),(0,o.I)(e,n,null),i=!0},p(t,n){const o={};1&n&&(o.icon=t[0].icon),1&n&&(o.background=t[0].color),e.$set(o)},i(t){i||((0,o.x)(e.$$.fragment,t),i=!0)},o(t){(0,o.A)(e.$$.fragment,t),i=!1},d(t){t&&(0,o.d)(n),(0,o.K)(e)}}}function b(t){let n,e,i=t[1].type&&u(t);return{c(){i&&i.c(),n=(0,o.e)()},m(t,r){i&&i.m(t,r),(0,o.b)(t,n,r),e=!0},p(t,[e]){t[1].type?i?(i.p(t,e),2&e&&(0,o.x)(i,1)):(i=u(t),i.c(),(0,o.x)(i,1),i.m(n.parentNode,n)):i&&((0,o.y)(),(0,o.A)(i,1,1,(()=>{i=null})),(0,o.z)())},i(t){e||((0,o.x)(i),e=!0)},o(t){(0,o.A)(i),e=!1},d(t){i&&i.d(t),t&&(0,o.d)(n)}}}function h(t,n,e){let{chainStyles:i=o.a6}=n,{notification:r}=n;return t.$$set=t=>{"chainStyles"in t&&e(0,i=t.chainStyles),"notification"in t&&e(1,r=t.notification)},[i,r]}class g extends o.S{constructor(t){super(),(0,o.i)(this,t,h,b,o.s,{chainStyles:0,notification:1},v)}}function k(t){(0,o.a)(t,"svelte-pm7idu","div.svelte-pm7idu{display:flex;justify-content:center;font-size:inherit;font-family:inherit;margin:0 1.5rem 0 0.75rem}span.svelte-pm7idu{font-family:inherit;display:flex;align-items:center;margin:0 2px}.time.svelte-pm7idu{color:var(\n --notify-onboard-timer-color,\n var(--onboard-gray-300, var(--gray-300))\n );margin-left:4px}")}function x(t){let n,e,i,r,a=t[2](t[1]-t[0])+"";return{c(){n=(0,o.t)("-\n "),e=(0,o.j)("span"),i=(0,o.t)(a),r=(0,o.t)("\n ago"),(0,o.k)(e,"class","svelte-pm7idu")},m(t,a){(0,o.b)(t,n,a),(0,o.b)(t,e,a),(0,o.m)(e,i),(0,o.b)(t,r,a)},p(t,n){3&n&&a!==(a=t[2](t[1]-t[0])+"")&&(0,o.v)(i,a)},d(t){t&&(0,o.d)(n),t&&(0,o.d)(e),t&&(0,o.d)(r)}}}function w(t){let n,e=t[0]&&x(t);return{c(){n=(0,o.j)("div"),e&&e.c(),(0,o.k)(n,"class","time svelte-pm7idu")},m(t,i){(0,o.b)(t,n,i),e&&e.m(n,null)},p(t,[o]){t[0]?e?e.p(t,o):(e=x(t),e.c(),e.m(n,null)):e&&(e.d(1),e=null)},i:o.n,o:o.n,d(t){t&&(0,o.d)(n),e&&e.d()}}}function $(t,n,e){let r,a;(0,o.c)(t,i._,(t=>e(3,r=t))),(0,o.c)(t,i.Hg,(t=>e(4,a=t)));let{startTime:s}=n,l=Date.now();const c=setInterval((()=>{e(1,l=Date.now())}),1e3);return(0,o.al)((()=>{clearInterval(c)})),t.$$set=t=>{"startTime"in t&&e(0,s=t.startTime)},[s,l,function(t){const n=Math.floor(t/1e3),e=n<0?0:n;return e>=60?`${Math.floor(e/60).toLocaleString(a)} ${r("notify.time.minutes")}`:`${e.toLocaleString(a)} ${r("notify.time.seconds")}`}]}class j extends o.S{constructor(t){super(),(0,o.i)(this,t,$,w,o.s,{startTime:0},k)}}function z(t){(0,o.a)(t,"svelte-1otz6tt","div.notify-transaction-data.svelte-1otz6tt{font-size:var(\n --notify-onboard-transaction-font-size,\n var(--onboard-font-size-6, var(--font-size-6))\n );font-family:inherit;margin:0px 20px 0px 8px;justify-content:center}.hash-time.svelte-1otz6tt{display:inline-flex;margin-top:4px;font-size:var(\n --notify-onboard-hash-time-font-size,\n var(--onboard-font-size-7, var(--font-size-7))\n );line-height:var(\n --notify-onboard-hash-time-font-line-height,\n var(--onboard-font-line-height-4, var(--font-line-height-4))\n )}.address-hash.svelte-1otz6tt{color:var(\n --notify-onboard-address-hash-color,\n var(--onboard-primary-200, var(--primary-200))\n )}a.address-hash.svelte-1otz6tt{color:var(\n --notify-onboard-anchor-color,\n var(--onboard-primary-400, var(--primary-400))\n )}a.svelte-1otz6tt{display:flex;text-decoration:none;color:inherit}.transaction-status.svelte-1otz6tt{color:var(--notify-onboard-transaction-status, inherit);line-height:var(\n --notify-onboard-font-size-5,\n var(--onboard-font-size-5, var(--font-size-5))\n );font-weight:400;overflow:hidden;text-overflow:ellipsis;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}")}function C(t){let n,e,i,r;function a(t,n){return t[0].link?P:L}let s=a(t),l=s(t);return i=new j({props:{startTime:t[0].startTime}}),{c(){n=(0,o.j)("span"),l.c(),e=(0,o.G)(),(0,o.F)(i.$$.fragment),(0,o.k)(n,"class","hash-time svelte-1otz6tt")},m(t,a){(0,o.b)(t,n,a),l.m(n,null),(0,o.m)(n,e),(0,o.I)(i,n,null),r=!0},p(t,o){s===(s=a(t))&&l?l.p(t,o):(l.d(1),l=s(t),l&&(l.c(),l.m(n,e)));const r={};1&o&&(r.startTime=t[0].startTime),i.$set(r)},i(t){r||((0,o.x)(i.$$.fragment,t),r=!0)},o(t){(0,o.A)(i.$$.fragment,t),r=!1},d(t){t&&(0,o.d)(n),l.d(),(0,o.K)(i)}}}function L(t){let n,e,i=(0,o.E)(t[0].id)+"";return{c(){n=(0,o.j)("div"),e=(0,o.t)(i),(0,o.k)(n,"class","address-hash svelte-1otz6tt")},m(t,i){(0,o.b)(t,n,i),(0,o.m)(n,e)},p(t,n){1&n&&i!==(i=(0,o.E)(t[0].id)+"")&&(0,o.v)(e,i)},d(t){t&&(0,o.d)(n)}}}function P(t){let n,e,i,r=(0,o.E)(t[0].id)+"";return{c(){n=(0,o.j)("a"),e=(0,o.t)(r),(0,o.k)(n,"class","address-hash svelte-1otz6tt"),(0,o.k)(n,"href",i=t[0].link),(0,o.k)(n,"target","_blank"),(0,o.k)(n,"rel","noreferrer noopener")},m(t,i){(0,o.b)(t,n,i),(0,o.m)(n,e)},p(t,a){1&a&&r!==(r=(0,o.E)(t[0].id)+"")&&(0,o.v)(e,r),1&a&&i!==(i=t[0].link)&&(0,o.k)(n,"href",i)},d(t){t&&(0,o.d)(n)}}}function T(t){let n,e,i,r,a,s=t[0].message+"",l=t[0].id&&!t[0].id.includes("customNotification")&&!t[0].id.includes("preflight"),c=l&&C(t);return{c(){n=(0,o.j)("div"),e=(0,o.j)("span"),i=(0,o.t)(s),r=(0,o.G)(),c&&c.c(),(0,o.k)(e,"class","transaction-status svelte-1otz6tt"),(0,o.k)(n,"class","flex flex-column notify-transaction-data svelte-1otz6tt")},m(t,s){(0,o.b)(t,n,s),(0,o.m)(n,e),(0,o.m)(e,i),(0,o.m)(n,r),c&&c.m(n,null),a=!0},p(t,[e]){(!a||1&e)&&s!==(s=t[0].message+"")&&(0,o.v)(i,s),1&e&&(l=t[0].id&&!t[0].id.includes("customNotification")&&!t[0].id.includes("preflight")),l?c?(c.p(t,e),1&e&&(0,o.x)(c,1)):(c=C(t),c.c(),(0,o.x)(c,1),c.m(n,null)):c&&((0,o.y)(),(0,o.A)(c,1,1,(()=>{c=null})),(0,o.z)())},i(t){a||((0,o.x)(c),a=!0)},o(t){(0,o.A)(c),a=!1},d(t){t&&(0,o.d)(n),c&&c.d()}}}function S(t,n,e){let{notification:o}=n;return t.$$set=t=>{"notification"in t&&e(0,o=t.notification)},[o]}class A extends o.S{constructor(t){super(),(0,o.i)(this,t,S,T,o.s,{notification:0},z)}}const M=["txPool"],F=["main","matic-main"],G=["Ledger","Trezor","Keystone","KeepKey","D'CENT"],H=t=>M.includes(t),I=t=>F.includes(t),E=t=>t&&G.includes(t.label);async function R({type:t,wallet:n,transaction:e}){const{from:i,input:r,value:a,to:l,nonce:c,gas:d,network:f}=e,p=o.ap[f],{gasPriceProbability:v}=o.a3.get().notify.replacement,{gas:u,apiKey:y}=o.af,[m]=await u.get({chains:[o.ap[f]],endpoint:"blockPrices",apiKey:y}),{maxFeePerGas:b,maxPriorityFeePerGas:h}=m.blockPrices[0].estimatedPrices.find((({confidence:n})=>n===("speedup"===t?v.speedup:v.cancel))),g=(0,o.aq)(b),k=(0,o.aq)(h),x="0x"===r?{}:{data:r};return n.provider.request({method:"eth_sendTransaction",params:[{type:"0x2",from:i,to:"cancel"===t?i:l,chainId:parseInt(p),value:`${s.gH.from(a).toHexString()}`,nonce:(0,o.ar)(c),gasLimit:(0,o.ar)(d),maxFeePerGas:g,maxPriorityFeePerGas:k,...x}]})}function K(t){(0,o.a)(t,"svelte-ftkynd",".bn-notify-notification.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{--backround-color:var(--notify-onboard-background, var(--w3o-backround-color, var(--gray-700)));--foreground-color:var(--w3o-foreground-color, var(--gray-600));--text-color:var(--w3o-text-color, #FFF);--border-color:var(--w3o-border-color);font-family:inherit;transition:background 300ms ease-in-out, color 300ms ease-in-out;pointer-events:all;backdrop-filter:blur(5px);width:100%;min-height:56px;display:flex;flex-direction:column;position:relative;overflow:hidden;border:1px solid transparent;border-radius:var(\n --notify-onboard-border-radius,\n var(--onboard-border-radius-4, var(--border-radius-4))\n );background:var(--foreground-color);color:var(--text-color)}.bn-notify-notification-inner.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{padding:0.75rem}.bn-notify-notification.svelte-ftkynd:hover>div.bn-notify-notification-inner.svelte-ftkynd>div.notify-close-btn-desktop.svelte-ftkynd{visibility:visible;opacity:1}div.notify-close-btn.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{margin-left:auto;margin-bottom:auto;height:24px;width:24px;position:absolute;top:8px;right:8px;justify-content:center;align-items:center}div.notify-close-btn-desktop.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{visibility:hidden;transition:visibility 0.15s linear, opacity 0.15s linear;opacity:0}.notify-close-btn.svelte-ftkynd .close-icon.svelte-ftkynd.svelte-ftkynd{width:20px;margin:auto;color:var(--text-color)}.notify-close-btn.svelte-ftkynd>.close-icon.svelte-ftkynd.svelte-ftkynd{color:var(--notify-onboard-close-icon-color)}.notify-close-btn.svelte-ftkynd:hover>.close-icon.svelte-ftkynd.svelte-ftkynd{color:var(--notify-onboard-close-icon-hover)}.transaction-status.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{color:var(\n --notify-onboard-transaction-status-color,\n var(--onboard-primary-100, var(--primary-100))\n );line-height:14px}.dropdown.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{height:0px;overflow:hidden;transition:height 150ms ease-in-out}.dropdown-visible.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{height:48px}.dropdown-buttons.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{background-color:var(\n --notify-onboard-dropdown-background,\n var(--onboard-gray-700, var(--gray-700))\n );width:100%;padding:8px}.dropdown-button.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd{padding:4px 12px;border-radius:var(\n --notify-onboard-dropdown-border-radius,\n var(--onboard-border-radius-5, var(--border-radius-5))\n );background-color:transparent;font-size:var(\n --notify-onboard-dropdown-font-size,\n var(--onboard-font-size-6, var(--font-size-6))\n );color:var(\n --notify-onboard-dropdown-text-color,\n var(--onboard-primary-400, var(--primary-400))\n );transition:all 150ms ease-in-out;cursor:pointer}.dropdown-button.svelte-ftkynd.svelte-ftkynd.svelte-ftkynd:hover{background:var(\n --notify-onboard-dropdown-btn-hover-background,\n rgba(146, 155, 237, 0.2)\n )}")}function _(t){let n,e,i,r,a,s;return{c(){n=(0,o.j)("div"),e=(0,o.j)("button"),e.textContent="Cancel",i=(0,o.G)(),r=(0,o.j)("button"),r.textContent="Speed-up",(0,o.k)(e,"class","dropdown-button svelte-ftkynd"),(0,o.k)(r,"class","dropdown-button svelte-ftkynd"),(0,o.k)(n,"class","dropdown-buttons flex items-center justify-end svelte-ftkynd")},m(l,c){(0,o.b)(l,n,c),(0,o.m)(n,e),(0,o.m)(n,i),(0,o.m)(n,r),a||(s=[(0,o.p)(e,"click",t[9]),(0,o.p)(r,"click",t[10])],a=!0)},p:o.n,d(t){t&&(0,o.d)(n),a=!1,(0,o.L)(s)}}}function D(t){let n,e,i,r,a,s,l,c,d,f,p,v,u,y;i=new g({props:{notification:t[0],chainStyles:o.as[o.ap[t[0].network]]}}),a=new A({props:{notification:t[0]}});let m="txPool"===t[0].eventCode&&_(t);return{c(){n=(0,o.j)("div"),e=(0,o.j)("div"),(0,o.F)(i.$$.fragment),r=(0,o.G)(),(0,o.F)(a.$$.fragment),s=(0,o.G)(),l=(0,o.j)("div"),c=(0,o.j)("div"),d=(0,o.G)(),f=(0,o.j)("div"),m&&m.c(),(0,o.k)(c,"class","flex items-center close-icon svelte-ftkynd"),(0,o.k)(l,"class","notify-close-btn notify-close-btn-"+t[4].type+" pointer flex svelte-ftkynd"),(0,o.k)(e,"class","flex bn-notify-notification-inner svelte-ftkynd"),(0,o.k)(f,"class","dropdown svelte-ftkynd"),(0,o.H)(f,"dropdown-visible",t[2]&&t[5]&&H(t[0].eventCode)&&I(t[0].network)&&E(t[7])),(0,o.k)(n,"class",p="bn-notify-notification bn-notify-notification-"+t[0].type+"} svelte-ftkynd"),(0,o.H)(n,"bn-notify-clickable",t[0].onClick)},m(p,b){(0,o.b)(p,n,b),(0,o.m)(n,e),(0,o.I)(i,e,null),(0,o.m)(e,r),(0,o.I)(a,e,null),(0,o.m)(e,s),(0,o.m)(e,l),(0,o.m)(l,c),c.innerHTML='\n\n \n \n',(0,o.m)(n,d),(0,o.m)(n,f),m&&m.m(f,null),v=!0,u||(y=[(0,o.p)(l,"click",(0,o.J)(t[8])),(0,o.p)(n,"mouseenter",t[11]),(0,o.p)(n,"mouseleave",t[12]),(0,o.p)(n,"click",t[13])],u=!0)},p(t,[e]){const r={};1&e&&(r.notification=t[0]),1&e&&(r.chainStyles=o.as[o.ap[t[0].network]]),i.$set(r);const s={};1&e&&(s.notification=t[0]),a.$set(s),"txPool"===t[0].eventCode?m?m.p(t,e):(m=_(t),m.c(),m.m(f,null)):m&&(m.d(1),m=null),(!v||165&e)&&(0,o.H)(f,"dropdown-visible",t[2]&&t[5]&&H(t[0].eventCode)&&I(t[0].network)&&E(t[7])),(!v||1&e&&p!==(p="bn-notify-notification bn-notify-notification-"+t[0].type+"} svelte-ftkynd"))&&(0,o.k)(n,"class",p),(!v||1&e)&&(0,o.H)(n,"bn-notify-clickable",t[0].onClick)},i(t){v||((0,o.x)(i.$$.fragment,t),(0,o.x)(a.$$.fragment,t),v=!0)},o(t){(0,o.A)(i.$$.fragment,t),(0,o.A)(a.$$.fragment,t),v=!1},d(t){t&&(0,o.d)(n),(0,o.K)(i),(0,o.K)(a),m&&m.d(),u=!1,(0,o.L)(y)}}}function N(t,n,e){let r,a;(0,o.c)(t,o.w,(t=>e(15,r=t))),(0,o.c)(t,i._,(t=>e(3,a=t)));const{device:s,gas:l}=o.af;let c,{notification:d}=n,{updateParentOnRemove:f}=n,p=!1;const v=o.at.getValue().find((({hash:t})=>t===d.id)),u=v&&r.find((({accounts:t})=>!!t.find((({address:t})=>t.toLowerCase()===v.from.toLowerCase()))));return(0,o.al)((()=>{clearTimeout(c)})),t.$$set=t=>{"notification"in t&&e(0,d=t.notification),"updateParentOnRemove"in t&&e(1,f=t.updateParentOnRemove)},t.$$.update=()=>{1&t.$$.dirty&&d.autoDismiss&&(c=setTimeout((()=>{(0,o.au)(d.id),(0,o.av)(d.id)}),d.autoDismiss))},[d,f,p,a,s,l,v,u,()=>{(0,o.au)(d.id),(0,o.av)(d.id),f()},async()=>{try{await R({type:"cancel",wallet:u,transaction:v})}catch(t){const n=`${v.hash.slice(0,9)}:txReplaceError${v.hash.slice(-5)}`;(0,o.aw)({id:n,type:"hint",eventCode:"txError",message:a("notify.transaction.txReplaceError"),key:n,autoDismiss:4e3})}},async()=>{try{await R({type:"speedup",wallet:u,transaction:v})}catch(t){const n=`${v.hash.slice(0,9)}:txReplaceError${v.hash.slice(-5)}`;(0,o.aw)({id:n,type:"hint",eventCode:"txError",message:a("notify.transaction.txReplaceError"),key:n,autoDismiss:4e3})}},()=>e(2,p=!0),()=>e(2,p=!1),t=>d.onClick&&d.onClick(t)]}class V extends o.S{constructor(t){super(),(0,o.i)(this,t,N,D,o.s,{notification:0,updateParentOnRemove:1},K)}}function O(t){(0,o.a)(t,"svelte-1h8mmo3","ul.svelte-1h8mmo3{padding-left:0;display:flex;flex-flow:column nowrap;font-size:var(\n --notify-onboard-font-size,\n var(--onboard-font-size-5, var(--font-size-5))\n );list-style-type:none;overflow:visible;scrollbar-width:none;box-sizing:border-box;z-index:var(--notify-onboard-z-index, 300);font-family:var(\n --notify-onboard-font-family,\n var(--onboard-font-family-normal, inherit)\n );margin:8px 0;pointer-events:all}.y-scroll.svelte-1h8mmo3{overflow-y:scroll}.y-visible.svelte-1h8mmo3{overflow-y:visible}li.notification-list-top.svelte-1h8mmo3:not(:first-child){margin-top:8px}li.notification-list-bottom.svelte-1h8mmo3:not(:first-child){margin-bottom:8px}ul.bn-notify-bottomLeft.svelte-1h8mmo3,ul.bn-notify-bottomRight.svelte-1h8mmo3{flex-direction:column-reverse}@media only screen and (max-width: 450px){ul.svelte-1h8mmo3{width:100%}}.bn-notify-clickable:hover{cursor:pointer}.svelte-1h8mmo3::-webkit-scrollbar{display:none}")}function q(t,n,e){const o=t.slice();return o[12]=n[e],o}function Z(t){let n,e,i,r,a=[],s=new Map,l=t[2];const c=t=>t[12].key;for(let n=0;n{f&&(c&&c.end(1),s=(0,o.V)(e,o.ab,{duration:1200,delay:300,x:n[3],y:n[4],easing:U}),s.start())})),f=!0)},o(t){(0,o.A)(i.$$.fragment,t),s&&s.invalidate(),c=(0,o.ak)(e,o.X,{duration:300,easing:o.an}),f=!1},d(t){t&&(0,o.d)(e),(0,o.K)(i),t&&c&&c.end(),p=!1,v()}}}function J(t){let n,e,i=t[2].length&&Z(t);return{c(){i&&i.c(),n=(0,o.e)()},m(t,r){i&&i.m(t,r),(0,o.b)(t,n,r),e=!0},p(t,[e]){t[2].length?i?(i.p(t,e),4&e&&(0,o.x)(i,1)):(i=Z(t),i.c(),(0,o.x)(i,1),i.m(n.parentNode,n)):i&&((0,o.y)(),(0,o.A)(i,1,1,(()=>{i=null})),(0,o.z)())},i(t){e||((0,o.x)(i),e=!0)},o(t){(0,o.A)(i),e=!1},d(t){i&&i.d(t),t&&(0,o.d)(n)}}}function U(t){return Math.sin(-13*(t+1)*Math.PI/2)*Math.pow(2,-35*t)+1}function X(t,n,e){let i;const{device:s}=o.af,l=o.a3.select("accountCenter").pipe((0,r.Z)(o.a3.get().accountCenter),(0,a.t)(1));(0,o.c)(t,l,(t=>e(6,i=t)));let c,d,{position:f}=n,{sharedContainer:p}=n,{notifications:v}=n;c=0,d=0;let u="y-scroll";const y=function(){let t=null;return(n,e)=>{clearTimeout(t),t=setTimeout(n,e)}}();return t.$$set=t=>{"position"in t&&e(0,f=t.position),"sharedContainer"in t&&e(1,p=t.sharedContainer),"notifications"in t&&e(2,v=t.notifications)},t.$$.update=()=>{1&t.$$.dirty&&(f.includes("top")?e(4,d=-50):e(4,d=50))},[f,p,v,0,d,u,i,s,l,()=>{"y-visible"!==u&&e(5,u="y-visible"),y((function(){e(5,u="y-scroll")}),1e3)},function(n){o.ai.call(this,t,n)}]}class Q extends o.S{constructor(t){super(),(0,o.i)(this,t,X,J,o.s,{position:0,sharedContainer:1,notifications:2},O)}}}}]);
\ No newline at end of file
diff --git a/gateway/dist/404.html b/gateway/dist/404.html
index a428de8..2694ffa 100644
--- a/gateway/dist/404.html
+++ b/gateway/dist/404.html
@@ -7,7 +7,7 @@
-
+
diff --git a/gateway/dist/8503.caf328a3572db61fc5aa.bundle.js b/gateway/dist/8503.cfceef23eab5d5bff474.bundle.js
similarity index 99%
rename from gateway/dist/8503.caf328a3572db61fc5aa.bundle.js
rename to gateway/dist/8503.cfceef23eab5d5bff474.bundle.js
index 61ae3b8..bf79620 100644
--- a/gateway/dist/8503.caf328a3572db61fc5aa.bundle.js
+++ b/gateway/dist/8503.cfceef23eab5d5bff474.bundle.js
@@ -1 +1 @@
-"use strict";(self.webpackChunkbos_workspace_gateway=self.webpackChunkbos_workspace_gateway||[]).push([[8503],{38503:(e,n,t)=>{t.r(n),t.d(n,{default:()=>tn});var o=t(40136),r=t(16126),a=t(31635),i=function(e){function n(n,t){return e.call(this)||this}return(0,a.C6)(n,e),n.prototype.schedule=function(e,n){return void 0===n&&(n=0),this},n}(t(52616).yU),c={setInterval:function(e,n){for(var t=[],o=2;o '),A='\n \n \n \n';function G(e){(0,o.a)(e,"svelte-1uqued6","select.svelte-1uqued6{border:none;background-image:none;background-color:transparent;-webkit-appearance:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;appearance:none;font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));transition:width 250ms ease-in-out;background-repeat:no-repeat, repeat;background-position:right 0px top 0px, 0 0;scrollbar-width:none;-ms-overflow-style:none;padding:0 14px 0 0;white-space:nowrap;text-overflow:ellipsis}select.minimized_ac.svelte-1uqued6{min-width:80px;max-width:80px}select.maximized_ac.svelte-1uqued6{width:auto !important}select.svelte-1uqued6:focus{outline:none}span.switching-placeholder.svelte-1uqued6{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));min-width:80px;max-width:80px;padding:0 8px 0 4px}")}function I(e,n,t){const o=e.slice();return o[15]=n[t],o}function T(e){let n;function t(e,n){return e[7]?H:F}let r=t(e),a=r(e);return{c(){a.c(),n=(0,o.e)()},m(e,t){a.m(e,t),(0,o.b)(e,n,t)},p(e,o){r===(r=t(e))&&a?a.p(e,o):(a.d(1),a=r(e),a&&(a.c(),a.m(n.parentNode,n)))},d(e){a.d(e),e&&(0,o.d)(n)}}}function F(e){let n,t,r,a,i,c,l,s=!(0,o.h)(e[6].chains[0],e[2]),d=[],u=new Map,m=s&&_(e),p=e[2];const v=e=>e[15].id;for(let n=0;nt(12,c=e)));let{selectIcon:s=z}=n,{colorVar:d}=n,{chains:u}=n,{bold:g=!1}=n,{parentCSSId:h=""}=n;const b=new x.t(!1);let j;(0,o.c)(e,b,(e=>t(7,l=e)));const A=function(){for(var e=[],n=0;n"boolean"!=typeof e&&"boolean"!=typeof n&&e[0]&&n[0]&&e[0].chains[0].id===n[0].chains[0].id)));var G;return(0,o.c)(e,A,(e=>t(11,i=e))),e.$$set=e=>{"selectIcon"in e&&t(0,s=e.selectIcon),"colorVar"in e&&t(1,d=e.colorVar),"chains"in e&&t(2,u=e.chains),"bold"in e&&t(3,g=e.bold),"parentCSSId"in e&&t(4,h=e.parentCSSId)},e.$$.update=()=>{4096&e.$$.dirty&&t(6,[a]=c,a),2048&e.$$.dirty&&i&&function(){if(!j)return;let e=document.createElement("option");e.textContent=j.selectedOptions[0].textContent;let n=document.createElement("select");n.style.visibility="hidden",n.style.position="fixed",n.appendChild(e),j.after(n),t(5,j.style.width=n.clientWidth-22+"px",j),n.remove()}()},[s,d,u,g,h,j,a,l,b,A,async function(){const e=j.selectedOptions[0].value;e!==a.chains[0].id&&(b.next(!0),await(0,o.f)({chainId:e,chainNamespace:"evm",wallet:a.label}),b.next(!1))},i,c,function(e){o.g[e?"unshift":"push"]((()=>{j=e,t(5,j),t(2,u),t(6,a),t(12,c)}))}]}class S extends o.S{constructor(e){super(),(0,o.i)(this,e,P,M,o.s,{selectIcon:0,colorVar:1,chains:2,bold:3,parentCSSId:4},G)}}var V='\n \n \n \n';function q(e){(0,o.a)(e,"svelte-hb2n95",".container.svelte-hb2n95.svelte-hb2n95{display:flex;align-items:center;gap:0.5rem;cursor:pointer;position:relative;z-index:0;width:100%;padding:0.25rem;margin-bottom:0.25rem;border-radius:12px;transition:background-color 150ms ease-in-out}.container.svelte-hb2n95.svelte-hb2n95::before{content:'';display:block;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;background:var(--action-color);border-radius:12px;z-index:-1;opacity:0}.container.svelte-hb2n95.svelte-hb2n95:hover::before{opacity:0.2}.container.svelte-hb2n95:hover .balance.svelte-hb2n95,.container.svelte-hb2n95:hover .elipsis-container.svelte-hb2n95{opacity:1}.container.svelte-hb2n95:hover .balance.svelte-hb2n95{color:var(--account-center-maximized-balance-color, inherit)}.container.primary.svelte-hb2n95.svelte-hb2n95:hover{background-color:var(\n --account-center-maximized-account-section-background-hover\n )}.account-details.svelte-hb2n95.svelte-hb2n95{flex:1 1;display:flex;gap:inherit;overflow:hidden}.address-domain.svelte-hb2n95.svelte-hb2n95{flex:1 0 auto;max-width:70%;white-space:nowrap;font-weight:600;color:var(--account-center-maximized-address-color, inherit);overflow:scroll;scrollbar-width:none;-ms-overflow-style:none}.address-domain.svelte-hb2n95.svelte-hb2n95::-webkit-scrollbar{display:none}.balance.svelte-hb2n95.svelte-hb2n95{flex:1 1 auto;max-width:70%;white-space:nowrap;text-align:end;opacity:0.4;transition:color 150ms ease-in-out, background-color 150ms ease-in-out;overflow:scroll;scrollbar-width:none;-ms-overflow-style:none}.balance.svelte-hb2n95.svelte-hb2n95::-webkit-scrollbar{display:none}.elipsis-container.svelte-hb2n95.svelte-hb2n95{flex:0;padding:0.25rem;border-radius:24px;transition:color 150ms ease-in-out, background-color 150ms ease-in-out;background-color:transparent;opacity:0.4}.elipsis-container.svelte-hb2n95.svelte-hb2n95:hover{color:var(--text-color)}.elipsis-container.active.svelte-hb2n95.svelte-hb2n95{color:var(--text-color)}.elipsis.svelte-hb2n95.svelte-hb2n95{width:24px}.menu.svelte-hb2n95.svelte-hb2n95{background:var(--onboard-white, var(--white));border:1px solid var(--onboard-gray-100, var(--gray-100));border-radius:8px;list-style-type:none;right:0.25rem;top:2.25rem;margin:0;padding:0;border:none;overflow:hidden;z-index:1}.menu.svelte-hb2n95 li.svelte-hb2n95{color:var(--onboard-primary-500, var(--primary-500));font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));padding:12px 16px;background:var(--onboard-white, var(--white));transition:background-color 150ms ease-in-out;cursor:pointer}.menu.svelte-hb2n95 li.svelte-hb2n95:hover{background:var(--onboard-primary-200, var(--primary-200))}")}function D(e,n,t){const o=e.slice();return o[14]=n[t].address,o[15]=n[t].ens,o[16]=n[t].uns,o[17]=n[t].balance,o[19]=t,o}function Z(e){let n,t,r;return t=new o.R({props:{size:14}}),{c(){n=(0,o.j)("div"),(0,o.F)(t.$$.fragment),(0,o.T)(n,"right","-5px"),(0,o.T)(n,"bottom","-5px"),(0,o.k)(n,"class","drop-shadow absolute")},m(e,a){(0,o.b)(e,n,a),(0,o.I)(t,n,null),r=!0},i(e){r||((0,o.x)(t.$$.fragment,e),r=!0)},o(e){(0,o.A)(t.$$.fragment,e),r=!1},d(e){e&&(0,o.d)(n),(0,o.K)(t)}}}function E(e){let n,t,r,a=U(e[17])+"";return{c(){n=(0,o.j)("div"),t=(0,o.t)(a),(0,o.k)(n,"class","balance svelte-hb2n95")},m(e,r){(0,o.b)(e,n,r),(0,o.m)(n,t)},p(e,n){1&n&&a!==(a=U(e[17])+"")&&(0,o.v)(t,a)},i(e){e&&(r||(0,o.U)((()=>{r=(0,o.V)(n,o.X,{}),r.start()})))},o:o.n,d(e){e&&(0,o.d)(n)}}}function K(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f=e[4]("accountCenter.addAccount",{default:e[2].accountCenter.addAccount})+"",g=e[4]("accountCenter.disconnectWallet",{default:e[2].accountCenter.disconnectWallet})+"",h=e[2].accountCenter.copyAddress+"",b=!(e[1]&&0===e[19])&&B(e);function x(){return e[13](e[15],e[16],e[14])}return{c(){n=(0,o.j)("ul"),t=(0,o.j)("li"),r=(0,o.t)(f),a=(0,o.G)(),b&&b.c(),i=(0,o.G)(),c=(0,o.j)("li"),l=(0,o.t)(g),s=(0,o.G)(),d=(0,o.j)("li"),u=(0,o.t)(h),(0,o.k)(t,"class","svelte-hb2n95"),(0,o.k)(c,"class","svelte-hb2n95"),(0,o.k)(d,"class","svelte-hb2n95"),(0,o.k)(n,"class","menu absolute svelte-hb2n95")},m(m,f){(0,o.b)(m,n,f),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),b&&b.m(n,null),(0,o.m)(n,i),(0,o.m)(n,c),(0,o.m)(c,l),(0,o.m)(n,s),(0,o.m)(n,d),(0,o.m)(d,u),p||(v=[(0,o.p)(t,"click",(0,o.J)(e[10])),(0,o.p)(c,"click",(0,o.J)(e[12])),(0,o.p)(d,"click",(0,o.J)(x))],p=!0)},p(t,a){e=t,20&a&&f!==(f=e[4]("accountCenter.addAccount",{default:e[2].accountCenter.addAccount})+"")&&(0,o.v)(r,f),e[1]&&0===e[19]?b&&(b.d(1),b=null):b?b.p(e,a):(b=B(e),b.c(),b.m(n,i)),20&a&&g!==(g=e[4]("accountCenter.disconnectWallet",{default:e[2].accountCenter.disconnectWallet})+"")&&(0,o.v)(l,g),4&a&&h!==(h=e[2].accountCenter.copyAddress+"")&&(0,o.v)(u,h)},i(e){e&&(m||(0,o.U)((()=>{m=(0,o.V)(n,o.X,{}),m.start()})))},o:o.n,d(e){e&&(0,o.d)(n),b&&b.d(),p=!1,(0,o.L)(v)}}}function B(e){let n,t,r,a,i=e[4]("accountCenter.setPrimaryAccount",{default:e[2].accountCenter.setPrimaryAccount})+"";function c(){return e[11](e[14])}return{c(){n=(0,o.j)("li"),t=(0,o.t)(i),(0,o.k)(n,"class","svelte-hb2n95")},m(e,i){(0,o.b)(e,n,i),(0,o.m)(n,t),r||(a=(0,o.p)(n,"click",(0,o.J)(c)),r=!0)},p(n,r){e=n,20&r&&i!==(i=e[4]("accountCenter.setPrimaryAccount",{default:e[2].accountCenter.setPrimaryAccount})+"")&&(0,o.v)(t,i)},d(e){e&&(0,o.d)(n),r=!1,a()}}}function W(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w=(e[15]?(0,o.D)(e[15].name):e[16]?(0,o.D)(e[16].name):(0,o.E)(e[14]))+"";a=new o.W({props:{size:32,padding:4,background:"custom",color:"#EFF1FC",customBackgroundColor:e[1]&&0===e[19]?"rgba(24, 206, 102, 0.2)":"rgba(235, 235, 237, 0.1)",border:e[1]&&0===e[19]?"green":"gray",radius:8,icon:e[0].icon}});let y=e[1]&&0===e[19]&&Z(),k=e[17]&&E(e);function $(){return e[8](e[14])}function C(){return e[9](e[14])}let j=e[3]===e[14]&&K(e);return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.j)("div"),(0,o.F)(a.$$.fragment),i=(0,o.G)(),y&&y.c(),c=(0,o.G)(),l=(0,o.j)("div"),s=(0,o.j)("div"),d=(0,o.t)(w),u=(0,o.G)(),k&&k.c(),m=(0,o.G)(),p=(0,o.j)("div"),v=(0,o.j)("div"),f=(0,o.G)(),j&&j.c(),g=(0,o.G)(),(0,o.k)(r,"class","flex items-center relative"),(0,o.k)(s,"class","address-domain svelte-hb2n95"),(0,o.k)(l,"class","account-details svelte-hb2n95"),(0,o.k)(v,"class","elipsis pointer flex items-center justify-center relative svelte-hb2n95"),(0,o.k)(p,"class","elipsis-container svelte-hb2n95"),(0,o.H)(p,"active",e[3]===e[14]),(0,o.k)(t,"class","container svelte-hb2n95"),(0,o.H)(t,"primary",e[1]&&0===e[19]),(0,o.k)(n,"class","relative")},m(e,w){(0,o.b)(e,n,w),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.I)(a,r,null),(0,o.m)(r,i),y&&y.m(r,null),(0,o.m)(t,c),(0,o.m)(t,l),(0,o.m)(l,s),(0,o.m)(s,d),(0,o.m)(l,u),k&&k.m(l,null),(0,o.m)(t,m),(0,o.m)(t,p),(0,o.m)(p,v),v.innerHTML=V,(0,o.m)(n,f),j&&j.m(n,null),(0,o.m)(n,g),h=!0,b||(x=[(0,o.p)(v,"click",(0,o.J)($)),(0,o.p)(t,"click",C)],b=!0)},p(i,c){e=i;const s={};2&c&&(s.customBackgroundColor=e[1]&&0===e[19]?"rgba(24, 206, 102, 0.2)":"rgba(235, 235, 237, 0.1)"),2&c&&(s.border=e[1]&&0===e[19]?"green":"gray"),1&c&&(s.icon=e[0].icon),a.$set(s),e[1]&&0===e[19]?y?2&c&&(0,o.x)(y,1):(y=Z(),y.c(),(0,o.x)(y,1),y.m(r,null)):y&&((0,o.y)(),(0,o.A)(y,1,1,(()=>{y=null})),(0,o.z)()),(!h||1&c)&&w!==(w=(e[15]?(0,o.D)(e[15].name):e[16]?(0,o.D)(e[16].name):(0,o.E)(e[14]))+"")&&(0,o.v)(d,w),e[17]?k?(k.p(e,c),1&c&&(0,o.x)(k,1)):(k=E(e),k.c(),(0,o.x)(k,1),k.m(l,null)):k&&(k.d(1),k=null),(!h||9&c)&&(0,o.H)(p,"active",e[3]===e[14]),(!h||2&c)&&(0,o.H)(t,"primary",e[1]&&0===e[19]),e[3]===e[14]?j?(j.p(e,c),9&c&&(0,o.x)(j,1)):(j=K(e),j.c(),(0,o.x)(j,1),j.m(n,g)):j&&(j.d(1),j=null)},i(e){h||((0,o.x)(a.$$.fragment,e),(0,o.x)(y),(0,o.x)(k),(0,o.x)(j),h=!0)},o(e){(0,o.A)(a.$$.fragment,e),(0,o.A)(y),h=!1},d(e){e&&(0,o.d)(n),(0,o.K)(a),y&&y.d(),k&&k.d(),j&&j.d(),b=!1,(0,o.L)(x)}}}function N(e){let n,t,r=e[0].accounts,a=[];for(let n=0;n(0,o.A)(a[e],1,1,(()=>{a[e]=null}));return{c(){for(let e=0;e7?e[n].slice(0,7):e[n]} ${n}`}function R(e,n,t){let r;(0,o.c)(e,b._,(e=>t(4,r=e)));let{wallet:a}=n,{primary:i}=n;function c(){t(3,l="")}let l="";async function s(e){try{await(0,o.M)(e.provider)}catch(n){const{code:t}=n;t!==j.ProviderRpcErrorCode.UNSUPPORTED_METHOD&&t!==j.ProviderRpcErrorCode.DOES_NOT_EXIST||o.N.next({inProgress:!1,actionRequired:e.label})}}function d(){t(2,o.C.accountCenter.copyAddress="Copied Successfully",o.C),setTimeout(c,500),setTimeout((()=>{t(2,o.C.accountCenter.copyAddress="Copy Wallet address",o.C)}),700)}return e.$$set=e=>{"wallet"in e&&t(0,a=e.wallet),"primary"in e&&t(1,i=e.primary)},[a,i,o.C,l,r,s,d,c,e=>t(3,l=l===e?"":e),e=>(0,o.O)(a,e),()=>{t(3,l=""),s(a)},e=>{t(3,l=""),(0,o.O)(a,e)},()=>{t(3,l=""),(0,o.P)({label:a.label})},(e,n,t)=>{(0,o.Q)(e?e.name:n?n.name:t).then((()=>{d()}))}]}class O extends o.S{constructor(e){super(),(0,o.i)(this,e,R,N,o.s,{wallet:0,primary:1,hideMenu:7},q)}get hideMenu(){return this.$$.ctx[7]}}var J='\n \n \n \n',X='\n \n \n \n',Y=' ',Q='\n \n \n';function ee(e){(0,o.a)(e,"svelte-1ubxcdp",".content.svelte-1ubxcdp{padding:1rem;width:300px;font-family:var(--onboard-font-family-normal, var(--font-family-normal));font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:24px}.icon-container.svelte-1ubxcdp{width:3rem;height:3rem;background:var(--onboard-warning-100, var(--warning-100));border-radius:24px;padding:12px;color:var(--onboard-warning-500, var(--warning-500))}h4.svelte-1ubxcdp{margin:1.5rem 0 0.5rem 0;font-weight:600}p.svelte-1ubxcdp{margin:0;font-weight:400}button.svelte-1ubxcdp{margin-top:1.5rem;width:50%;font-weight:600}.right.svelte-1ubxcdp{margin-left:0.5rem;width:60%}")}function ne(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x=e[2]("modals.confirmDisconnectAll.heading",{default:o.C.modals.confirmDisconnectAll.heading})+"",w=e[2]("modals.confirmDisconnectAll.description")+"",y=e[2]("modals.confirmDisconnectAll.cancel",{default:o.C.modals.confirmDisconnectAll.cancel})+"",k=e[2]("modals.confirmDisconnectAll.confirm",{default:o.C.modals.confirmDisconnectAll.confirm})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.G)(),a=(0,o.j)("h4"),i=(0,o.t)(x),c=(0,o.G)(),l=(0,o.j)("p"),s=(0,o.t)(w),d=(0,o.G)(),u=(0,o.j)("div"),m=(0,o.j)("button"),p=(0,o.t)(y),v=(0,o.G)(),f=(0,o.j)("button"),g=(0,o.t)(k),(0,o.k)(t,"class","icon-container flex justify-center items-center svelte-1ubxcdp"),(0,o.k)(a,"class","svelte-1ubxcdp"),(0,o.k)(l,"class","svelte-1ubxcdp"),(0,o.k)(m,"class","button-neutral-solid-b rounded svelte-1ubxcdp"),(0,o.k)(f,"class","right button-neutral-solid rounded svelte-1ubxcdp"),(0,o.k)(u,"class","flex justify-between items-center w-100"),(0,o.k)(n,"class","content svelte-1ubxcdp")},m(x,w){(0,o.b)(x,n,w),(0,o.m)(n,t),t.innerHTML=A,(0,o.m)(n,r),(0,o.m)(n,a),(0,o.m)(a,i),(0,o.m)(n,c),(0,o.m)(n,l),(0,o.m)(l,s),(0,o.m)(n,d),(0,o.m)(n,u),(0,o.m)(u,m),(0,o.m)(m,p),(0,o.m)(u,v),(0,o.m)(u,f),(0,o.m)(f,g),h||(b=[(0,o.p)(m,"click",(function(){(0,o.Z)(e[1])&&e[1].apply(this,arguments)})),(0,o.p)(f,"click",(function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)}))],h=!0)},p(n,t){e=n,4&t&&x!==(x=e[2]("modals.confirmDisconnectAll.heading",{default:o.C.modals.confirmDisconnectAll.heading})+"")&&(0,o.v)(i,x),4&t&&w!==(w=e[2]("modals.confirmDisconnectAll.description")+"")&&(0,o.v)(s,w),4&t&&y!==(y=e[2]("modals.confirmDisconnectAll.cancel",{default:o.C.modals.confirmDisconnectAll.cancel})+"")&&(0,o.v)(p,y),4&t&&k!==(k=e[2]("modals.confirmDisconnectAll.confirm",{default:o.C.modals.confirmDisconnectAll.confirm})+"")&&(0,o.v)(g,k)},d(e){e&&(0,o.d)(n),h=!1,(0,o.L)(b)}}}function te(e){let n,t;return n=new o.Y({props:{close:e[1],$$slots:{default:[ne]},$$scope:{ctx:e}}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,[t]){const o={};2&t&&(o.close=e[1]),15&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function oe(e,n,t){let r;(0,o.c)(e,b._,(e=>t(2,r=e)));let{onConfirm:a}=n,{onClose:i}=n;return e.$$set=e=>{"onConfirm"in e&&t(0,a=e.onConfirm),"onClose"in e&&t(1,i=e.onClose)},[a,i,r]}class re extends o.S{constructor(e){super(),(0,o.i)(this,e,oe,te,o.s,{onConfirm:0,onClose:1},ee)}}function ae(e){(0,o.a)(e,"svelte-ruodf3",".content.svelte-ruodf3{--background-color:var(--w3o-background-color);--text-color:var(--w3o-text-color);--action-color:var(--w3o-action-color, var(--primary-500));font-size:1rem;line-height:1.5rem;display:flex;flex-flow:column;gap:1.5rem;padding:1rem;max-width:320px;background:var(--background-color);color:var(--text-color)}.icon-container.svelte-ruodf3{position:relative;overflow:hidden;width:3rem;height:3rem;border-radius:24px;padding:0.75rem;background:none}.icon-container.svelte-ruodf3::before{content:'';position:absolute;height:100%;width:100%;opacity:0.2;background:var(--action-color)}.text-container.svelte-ruodf3{display:flex;flex-flow:column;gap:0.5rem;padding:0 0.5rem}.actions-container.svelte-ruodf3{display:flex;flex-flow:row nowrap;gap:1rem}.heading.svelte-ruodf3{font-weight:600}button.svelte-ruodf3{font-weight:600}button.primary.svelte-ruodf3{background:var(--action-color)}")}function ie(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w,y,k,$=e[3]("modals.confirmTransactionProtection.heading",{default:o.C.modals.confirmTransactionProtection.heading})+"",C=e[3]("modals.confirmTransactionProtection.description")+"",j=e[3]("modals.confirmTransactionProtection.link",{default:o.C.modals.confirmTransactionProtection.link})+"",z=e[3]("modals.confirmTransactionProtection.dismiss",{default:o.C.modals.confirmTransactionProtection.dismiss})+"",A=e[3]("modals.confirmTransactionProtection.enable",{default:o.C.modals.confirmTransactionProtection.enable})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.G)(),a=(0,o.j)("div"),i=(0,o.j)("div"),c=(0,o.t)($),l=(0,o.G)(),s=(0,o.j)("div"),d=(0,o.t)(C),u=(0,o.G)(),m=(0,o.j)("a"),p=(0,o.t)(j),v=(0,o.G)(),f=(0,o.j)("div"),g=(0,o.j)("button"),h=(0,o.t)(z),b=(0,o.G)(),x=(0,o.j)("button"),w=(0,o.t)(A),(0,o.k)(t,"class","icon-container flex justify-center items-center svelte-ruodf3"),(0,o.k)(i,"class","heading svelte-ruodf3"),(0,o.k)(m,"href",e[2]),(0,o.k)(m,"target","_blank"),(0,o.k)(m,"rel","noreferrer noopener"),(0,o.k)(m,"class","no-link"),(0,o.k)(a,"class","text-container svelte-ruodf3"),(0,o.k)(g,"class","button-neutral-solid-b svelte-ruodf3"),(0,o.k)(x,"class","button-neutral-solid rounded primary svelte-ruodf3"),(0,o.k)(f,"class","actions-container svelte-ruodf3"),(0,o.k)(n,"class","content svelte-ruodf3")},m($,C){(0,o.b)($,n,C),(0,o.m)(n,t),t.innerHTML=Q,(0,o.m)(n,r),(0,o.m)(n,a),(0,o.m)(a,i),(0,o.m)(i,c),(0,o.m)(a,l),(0,o.m)(a,s),(0,o.m)(s,d),(0,o.m)(a,u),(0,o.m)(a,m),(0,o.m)(m,p),(0,o.m)(n,v),(0,o.m)(n,f),(0,o.m)(f,g),(0,o.m)(g,h),(0,o.m)(f,b),(0,o.m)(f,x),(0,o.m)(x,w),y||(k=[(0,o.p)(g,"click",(function(){(0,o.Z)(e[1])&&e[1].apply(this,arguments)})),(0,o.p)(x,"click",(function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)}))],y=!0)},p(n,t){e=n,8&t&&$!==($=e[3]("modals.confirmTransactionProtection.heading",{default:o.C.modals.confirmTransactionProtection.heading})+"")&&(0,o.v)(c,$),8&t&&C!==(C=e[3]("modals.confirmTransactionProtection.description")+"")&&(0,o.v)(d,C),8&t&&j!==(j=e[3]("modals.confirmTransactionProtection.link",{default:o.C.modals.confirmTransactionProtection.link})+"")&&(0,o.v)(p,j),4&t&&(0,o.k)(m,"href",e[2]),8&t&&z!==(z=e[3]("modals.confirmTransactionProtection.dismiss",{default:o.C.modals.confirmTransactionProtection.dismiss})+"")&&(0,o.v)(h,z),8&t&&A!==(A=e[3]("modals.confirmTransactionProtection.enable",{default:o.C.modals.confirmTransactionProtection.enable})+"")&&(0,o.v)(w,A)},d(e){e&&(0,o.d)(n),y=!1,(0,o.L)(k)}}}function ce(e){let n,t;return n=new o.Y({props:{close:e[1],$$slots:{default:[ie]},$$scope:{ctx:e}}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,[t]){const o={};2&t&&(o.close=e[1]),31&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function le(e,n,t){let r;(0,o.c)(e,b._,(e=>t(3,r=e)));let{onEnable:a}=n,{onDismiss:i}=n,{infoLink:c}=n;return e.$$set=e=>{"onEnable"in e&&t(0,a=e.onEnable),"onDismiss"in e&&t(1,i=e.onDismiss),"infoLink"in e&&t(2,c=e.infoLink)},[a,i,c,r]}class se extends o.S{constructor(e){super(),(0,o.i)(this,e,le,ce,o.s,{onEnable:0,onDismiss:1,infoLink:2},ae)}}function de(e){(0,o.a)(e,"svelte-b848yl",".secondary-token-container.svelte-b848yl.svelte-b848yl{width:100%}table.svelte-b848yl.svelte-b848yl{width:100%}tr.svelte-b848yl.svelte-b848yl{padding:0.25rem 1rem;line-height:1rem;border-bottom:1px solid var(--border-color);display:flex;flex-direction:row;align-items:flex-start;gap:1rem}thead.svelte-b848yl .secondary-token-table-header.svelte-b848yl{text-align:inherit;font-size:var(--onboard-font-size-7, var(--font-size-7))}.token-icon.svelte-b848yl.svelte-b848yl{width:30%;font-weight:700;font-size:var(--onboard-font-size-6, var(--font-size-6));color:var(--text-color)}.icon-name-container.svelte-b848yl.svelte-b848yl{display:flex;flex-direction:row;align-items:flex-start;padding:0px;gap:0.5rem}.icon.svelte-b848yl.svelte-b848yl{width:1rem;height:1rem}img.svelte-b848yl.svelte-b848yl{height:100%;width:100%}.token-balance.svelte-b848yl.svelte-b848yl{width:70%;font-weight:200;font-size:var(--onboard-font-size-6, var(--font-size-6));color:var(--text-color)}")}function ue(e,n,t){const o=e.slice();return o[1]=n[t],o}function me(e){let n,t,r,a,i,c,l,s,d,u=e[1].name.toUpperCase()+"",m=(e[1].balance.length>7?e[1].balance.slice(0,7):e[1].balance)+"";function p(e,n){return e[1].icon?ve:pe}let v=p(e),f=v(e);return{c(){n=(0,o.j)("tr"),t=(0,o.j)("td"),r=(0,o.j)("div"),f.c(),a=(0,o.G)(),i=(0,o.t)(u),c=(0,o.G)(),l=(0,o.j)("td"),s=(0,o.t)(m),d=(0,o.G)(),(0,o.k)(r,"class","icon-name-container svelte-b848yl"),(0,o.k)(t,"class","token-icon svelte-b848yl"),(0,o.k)(l,"class","token-balance svelte-b848yl"),(0,o.k)(n,"class","token-row svelte-b848yl")},m(e,u){(0,o.b)(e,n,u),(0,o.m)(n,t),(0,o.m)(t,r),f.m(r,null),(0,o.m)(r,a),(0,o.m)(r,i),(0,o.m)(n,c),(0,o.m)(n,l),(0,o.m)(l,s),(0,o.m)(n,d)},p(e,n){v===(v=p(e))&&f?f.p(e,n):(f.d(1),f=v(e),f&&(f.c(),f.m(r,a))),1&n&&u!==(u=e[1].name.toUpperCase()+"")&&(0,o.v)(i,u),1&n&&m!==(m=(e[1].balance.length>7?e[1].balance.slice(0,7):e[1].balance)+"")&&(0,o.v)(s,m)},d(e){e&&(0,o.d)(n),f.d()}}}function pe(e){let n;return{c(){n=(0,o.j)("div"),(0,o.k)(n,"class","icon svelte-b848yl")},m(e,t){(0,o.b)(e,n,t)},p:o.n,d(e){e&&(0,o.d)(n)}}}function ve(e){let n,t,r={ctx:e,current:null,token:null,hasCatch:!1,pending:xe,then:ge,catch:fe,value:4};return(0,o._)(t=e[1].icon,r),{c(){n=(0,o.e)(),r.block.c()},m(e,t){(0,o.b)(e,n,t),r.block.m(e,r.anchor=t),r.mount=()=>n.parentNode,r.anchor=n},p(n,a){e=n,r.ctx=e,1&a&&t!==(t=e[1].icon)&&(0,o._)(t,r)||(0,o.$)(r,e,a)},d(e){e&&(0,o.d)(n),r.block.d(e),r.token=null,r=null}}}function fe(e){return{c:o.n,m:o.n,p:o.n,i:o.n,o:o.n,d:o.n}}function ge(e){let n,t,r;function a(e,n){return 1&n&&(t=null),null==t&&(t=!!(0,o.a0)(e[4])),t?be:he}let i=a(e,-1),c=i(e);return{c(){n=(0,o.j)("div"),c.c(),(0,o.k)(n,"class","icon svelte-b848yl")},m(e,t){(0,o.b)(e,n,t),c.m(n,null)},p(e,t){i===(i=a(e,t))&&c?c.p(e,t):(c.d(1),c=i(e),c&&(c.c(),c.m(n,null)))},i(e){e&&(r||(0,o.U)((()=>{r=(0,o.V)(n,o.X,{}),r.start()})))},o:o.n,d(e){e&&(0,o.d)(n),c.d()}}}function he(e){let n,t;return{c(){n=(0,o.j)("img"),(0,o.a1)(n.src,t=e[4])||(0,o.k)(n,"src",t),(0,o.k)(n,"alt","logo"),(0,o.k)(n,"class","svelte-b848yl")},m(e,t){(0,o.b)(e,n,t)},p(e,r){1&r&&!(0,o.a1)(n.src,t=e[4])&&(0,o.k)(n,"src",t)},d(e){e&&(0,o.d)(n)}}}function be(e){let n,t,r=e[4]+"";return{c(){n=new o.a2(!1),t=(0,o.e)(),n.a=t},m(e,a){n.m(r,e,a),(0,o.b)(e,t,a)},p(e,t){1&t&&r!==(r=e[4]+"")&&n.p(r)},d(e){e&&(0,o.d)(t),e&&n.d()}}}function xe(e){return{c:o.n,m:o.n,p:o.n,i:o.n,o:o.n,d:o.n}}function we(e){let n,t=e[1]&&e[1].name&&e[1].balance&&me(e);return{c(){t&&t.c(),n=(0,o.e)()},m(e,r){t&&t.m(e,r),(0,o.b)(e,n,r)},p(e,o){e[1]&&e[1].name&&e[1].balance?t?t.p(e,o):(t=me(e),t.c(),t.m(n.parentNode,n)):t&&(t.d(1),t=null)},d(e){t&&t.d(e),e&&(0,o.d)(n)}}}function ye(e){let n,t,r,a,i,c=e[0],l=[];for(let n=0;n',a=(0,o.G)(),i=(0,o.j)("tbody");for(let e=0;e{"secondaryTokens"in e&&t(0,o=e.secondaryTokens)},[o]}class $e extends o.S{constructor(e){super(),(0,o.i)(this,e,ke,ye,o.s,{secondaryTokens:0},de)}}function Ce(e){(0,o.a)(e,"svelte-177u10y",".outer-container.svelte-177u10y{--background-color:var(--w3o-background-color);--text-color:var(--w3o-text-color);--border-color:var(--w3o-border-color, var(--gray-500));--action-color:var(--w3o-action-color, var(--primary-500));--border-radius:var(--w3o-border-radius, 1rem);--account-center-network-selector-color:var(--text-color, white);width:100%;overflow:hidden;pointer-events:auto;border:1px solid transparent;background:var(\n --account-center-maximized-upper-background,\n var(--background-color)\n );border-color:var(--border-color);border-radius:var(--account-center-border-radius, var(--border-radius))}.wallets-section.svelte-177u10y{width:100%;color:var(--text-color, var(--gray-100));background:var(--background-color, var(--gray-700))}.p5.svelte-177u10y{padding:var(--onboard-spacing-5, var(--spacing-5))}.wallets.svelte-177u10y{width:100%;margin-bottom:0.5rem}.actions.svelte-177u10y{color:var(\n --account-center-maximized-upper-action-color,\n var(--action-color)\n );padding-left:2px}.action-container.svelte-177u10y{padding:0.25rem 12px 0.25rem 0.5rem;border-radius:0.5rem;transition:background-color 150ms ease-in-out}.action-container.svelte-177u10y:hover{background-color:var(\n --account-center-maximized-upper-action-background-hover,\n rgba(146, 155, 237, 0.2)\n )}.plus-icon.svelte-177u10y{width:20px}.arrow-forward.svelte-177u10y{width:20px}.mt.svelte-177u10y{margin-top:0.25rem}.action-text.svelte-177u10y{font-size:var(--onboard-font-size-6, var(--font-size-6));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));margin-left:0.5rem}.background-blue.svelte-177u10y{background:var(\n --account-center-maximized-network-section-background,\n var(--onboard-primary-100, var(--primary-100))\n )}.background-gray.svelte-177u10y{background:var(--onboard-gray-100, var(--gray-100))}.background-yellow.svelte-177u10y{background:var(--onboard-warning-100, var(--warning-100))}.network-container.svelte-177u10y{background:var(--background-color);border-top:1px solid var(--border-color);width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:0.75rem;gap:0.5rem;border-radius:var(\n --account-center-border-radius,\n var(--onboard-border-radius-3, var(--border-radius-3))\n );color:var(\n --account-center-maximized-network-text-color,\n var(--account-center-maximized-network-section, inherit)\n )}.network-section.svelte-177u10y{flex-direction:row;align-items:flex-start;padding:0px;gap:16px}.network-selector-container.svelte-177u10y{width:100%}.protect.svelte-177u10y{flex-direction:row;padding:0.25rem 0.375rem 0;gap:0.375rem;width:100%}.shield.svelte-177u10y{width:20px;height:20px;display:flex;justify-content:center}.protect-text.svelte-177u10y{font-size:var(--onboard-font-size-6, var(--font-size-6));color:var(\n --account-center-maximized-upper-action-color,\n var(--action-color)\n );line-height:1.75rem;display:flex;align-items:center}.network-selector-container.svelte-177u10y{margin-left:1rem;width:100%}.network-selector-label.svelte-177u10y{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3))}.app-info-container.svelte-177u10y{color:var(--text-color, var(--gray-700));background:var(\n --account-center-maximized-info-section-background-color,\n var(\n --account-center-maximized-info-section,\n var(--background-color, #fff)\n )\n );border-top:1px solid var(--border-color);border-radius:var(--account-center-border-radius, inherit);display:flex;flex-direction:column;align-items:flex-start;padding:0px}.app-info-header.svelte-177u10y{width:100%;flex-direction:column;align-items:flex-start;padding:0.75rem;gap:0.5rem;border-bottom:1px solid var(--border-color)}.app-icon-name.svelte-177u10y{display:flex;align-items:center;flex-direction:row;gap:0.75rem}.app-name.svelte-177u10y{font-size:1rem;font-weight:600;line-height:1rem;margin-bottom:0.25rem;color:var(--account-center-maximized-app-name-color, inherit)}.app-description.svelte-177u10y{margin:0;font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));color:var(--account-center-maximized-app-info-color, inherit);display:flex;flex-direction:row;align-items:flex-start;padding:0px 0.25rem;gap:1rem}.app-info.svelte-177u10y{width:100%;font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));color:var(--account-center-maximized-app-info-color, inherit);border-bottom:1px solid var(--border-color);display:flex;flex-direction:column;align-items:flex-start;padding:0.5rem 1rem;gap:0.25rem}.app-info-heading.svelte-177u10y{font-weight:700;color:var(--account-center-maximized-app-info-color, inherit)}.w100.svelte-177u10y{width:100%}a.svelte-177u10y{font-weight:700}.powered-by-container.svelte-177u10y{color:var(--text-color);padding:0.75rem}")}function je(e,n,t){const o=e.slice();return o[29]=n[t],o[31]=t,o}function ze(e){let n,t;return n=new re({props:{onClose:e[22],onConfirm:e[13]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};4&t[0]&&(o.onClose=e[22]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Ae(e){let n,t;return n=new se({props:{onDismiss:e[23],onEnable:e[24],infoLink:e[9].transactionProtectionInfoLink||o.a5}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const r={};16&t[0]&&(r.onDismiss=e[23]),512&t[0]&&(r.infoLink=e[9].transactionProtectionInfoLink||o.a5),n.$set(r)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Ge(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w,y,k,$,C,j,z,G,I,T,F,H,_=[],L=new Map,M=e[10]("accountCenter.currentNetwork",{default:o.C.accountCenter.currentNetwork})+"",P=e[1];const V=e=>e[29].label;for(let n=0;n{D=null})),(0,o.z)()),(!T||1024&t[0])&&M!==(M=e[10]("accountCenter.currentNetwork",{default:o.C.accountCenter.currentNetwork})+"")&&(0,o.v)(h,M),e[9].hideTransactionProtectionBtn||!e[6]&&!e[5]?.protectedRpcUrl?Z&&(Z.d(1),Z=null):Z?Z.p(e,t):(Z=Fe(e),Z.c(),Z.m(s,null)),(!T||160&t[0])&&(0,o.H)(s,"background-blue",e[5]&&e[5].icon||e[7]),(!T||32&t[0])&&(0,o.H)(s,"background-yellow",!e[5]),(!T||160&t[0])&&(0,o.H)(s,"background-gray",e[5]&&!e[7]),e[11]?E?(E.p(e,t),2048&t[0]&&(0,o.x)(E,1)):(E=He(e),E.c(),(0,o.x)(E,1),E.m($,C)):E&&((0,o.y)(),(0,o.A)(E,1,1,(()=>{E=null})),(0,o.z)()),e[8]&&e[8].length?K?(K.p(e,t),256&t[0]&&(0,o.x)(K,1)):(K=Pe(e),K.c(),(0,o.x)(K,1),K.m($,j)):K&&((0,o.y)(),(0,o.A)(K,1,1,(()=>{K=null})),(0,o.z)())},i(t){if(!T){for(let e=0;e{T&&(I||(I=(0,o.a9)(n,o.ab,{duration:600,y:e[16].includes("bottom")?56:-76,easing:o.aa,opacity:0},!0)),I.run(1))})),T=!0}},o(t){for(let e=0;e<_.length;e+=1)(0,o.A)(_[e]);(0,o.A)(m.$$.fragment,t),(0,o.A)(D),(0,o.A)(w.$$.fragment,t),(0,o.A)(E),(0,o.A)(K),t&&(I||(I=(0,o.a9)(n,o.ab,{duration:600,y:e[16].includes("bottom")?56:-76,easing:o.aa,opacity:0},!1)),I.run(0)),T=!1},d(e){e&&(0,o.d)(n);for(let e=0;e<_.length;e+=1)_[e].d();q&&q.d(),(0,o.K)(m),D&&D.d(),(0,o.K)(w),Z&&Z.d(),E&&E.d(),K&&K.d(),e&&I&&I.end(),F=!1,(0,o.L)(H)}}}function Ie(e,n){let t,r,a,i;function c(e){n[25](e)}let l={wallet:n[29],primary:0===n[31]};return void 0!==n[3]&&(l.hideMenu=n[3]),r=new O({props:l}),o.g.push((()=>(0,o.ac)(r,"hideMenu",c))),{key:e,first:null,c(){t=(0,o.e)(),(0,o.F)(r.$$.fragment),this.first=t},m(e,n){(0,o.b)(e,t,n),(0,o.I)(r,e,n),i=!0},p(e,t){n=e;const i={};2&t[0]&&(i.wallet=n[29]),2&t[0]&&(i.primary=0===n[31]),!a&&8&t[0]&&(a=!0,i.hideMenu=n[3],(0,o.ad)((()=>a=!1))),r.$set(i)},i(e){i||((0,o.x)(r.$$.fragment,e),i=!0)},o(e){(0,o.A)(r.$$.fragment,e),i=!1},d(e){e&&(0,o.d)(t),(0,o.K)(r,e)}}}function Te(e){let n,t,r;return t=new o.R({props:{size:14}}),{c(){n=(0,o.j)("div"),(0,o.F)(t.$$.fragment),(0,o.T)(n,"right","-5px"),(0,o.T)(n,"bottom","-5px"),(0,o.k)(n,"class","drop-shadow absolute")},m(e,a){(0,o.b)(e,n,a),(0,o.I)(t,n,null),r=!0},i(e){r||((0,o.x)(t.$$.fragment,e),r=!0)},o(e){(0,o.A)(t.$$.fragment,e),r=!1},d(e){e&&(0,o.d)(n),(0,o.K)(t)}}}function Fe(e){let n,t,r,a,i,c,l,s=e[10]("accountCenter.enableTransactionProtection",{default:o.C.accountCenter.enableTransactionProtection})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.G)(),a=(0,o.j)("span"),i=(0,o.t)(s),(0,o.k)(t,"class","shield svelte-177u10y"),(0,o.k)(a,"class","protect-text svelte-177u10y"),(0,o.k)(n,"class","protect action-container flex items-center pointer svelte-177u10y")},m(s,d){(0,o.b)(s,n,d),(0,o.m)(n,t),t.innerHTML=Q,(0,o.m)(n,r),(0,o.m)(n,a),(0,o.m)(a,i),c||(l=(0,o.p)(n,"click",e[28]),c=!0)},p(e,n){1024&n[0]&&s!==(s=e[10]("accountCenter.enableTransactionProtection",{default:o.C.accountCenter.enableTransactionProtection})+"")&&(0,o.v)(i,s)},d(e){e&&(0,o.d)(n),c=!1,l()}}}function He(e){let n,t,r,a,i,c,l,s,d,u,m,p,v=(e[11]&&e[11].name||"App Name")+"",f=(e[11]&&e[11].description||"This app has not added a description.")+"";r=new o.W({props:{size:32,padding:4,background:"white",border:"black",radius:8,icon:e[11]&&e[11].icon||o.ae}});let g=(e[11].gettingStartedGuide||e[11].explore)&&_e(e);return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),(0,o.F)(r.$$.fragment),a=(0,o.G)(),i=(0,o.j)("div"),c=(0,o.t)(v),l=(0,o.G)(),s=(0,o.j)("div"),d=(0,o.t)(f),u=(0,o.G)(),g&&g.c(),m=(0,o.e)(),(0,o.k)(i,"class","app-name svelte-177u10y"),(0,o.k)(t,"class","relative flex app-icon-name svelte-177u10y"),(0,o.k)(s,"class","app-description svelte-177u10y"),(0,o.k)(n,"class","flex items-start app-info-header svelte-177u10y")},m(e,v){(0,o.b)(e,n,v),(0,o.m)(n,t),(0,o.I)(r,t,null),(0,o.m)(t,a),(0,o.m)(t,i),(0,o.m)(i,c),(0,o.m)(n,l),(0,o.m)(n,s),(0,o.m)(s,d),(0,o.b)(e,u,v),g&&g.m(e,v),(0,o.b)(e,m,v),p=!0},p(e,n){const t={};2048&n[0]&&(t.icon=e[11]&&e[11].icon||o.ae),r.$set(t),(!p||2048&n[0])&&v!==(v=(e[11]&&e[11].name||"App Name")+"")&&(0,o.v)(c,v),(!p||2048&n[0])&&f!==(f=(e[11]&&e[11].description||"This app has not added a description.")+"")&&(0,o.v)(d,f),e[11].gettingStartedGuide||e[11].explore?g?g.p(e,n):(g=_e(e),g.c(),g.m(m.parentNode,m)):g&&(g.d(1),g=null)},i(e){p||((0,o.x)(r.$$.fragment,e),p=!0)},o(e){(0,o.A)(r.$$.fragment,e),p=!1},d(e){e&&(0,o.d)(n),(0,o.K)(r),e&&(0,o.d)(u),g&&g.d(e),e&&(0,o.d)(m)}}}function _e(e){let n,t,r,a,i,c=e[10]("accountCenter.appInfo",{default:o.C.accountCenter.appInfo})+"",l=e[11].gettingStartedGuide&&Le(e),s=e[11].explore&&Me(e);return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.t)(c),a=(0,o.G)(),l&&l.c(),i=(0,o.G)(),s&&s.c(),(0,o.k)(t,"class","app-info-heading svelte-177u10y"),(0,o.k)(n,"class","app-info svelte-177u10y")},m(e,c){(0,o.b)(e,n,c),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),l&&l.m(n,null),(0,o.m)(n,i),s&&s.m(n,null)},p(e,t){1024&t[0]&&c!==(c=e[10]("accountCenter.appInfo",{default:o.C.accountCenter.appInfo})+"")&&(0,o.v)(r,c),e[11].gettingStartedGuide?l?l.p(e,t):(l=Le(e),l.c(),l.m(n,i)):l&&(l.d(1),l=null),e[11].explore?s?s.p(e,t):(s=Me(e),s.c(),s.m(n,null)):s&&(s.d(1),s=null)},d(e){e&&(0,o.d)(n),l&&l.d(),s&&s.d()}}}function Le(e){let n,t,r,a,i,c,l,s=e[10]("accountCenter.learnMore",{default:o.C.accountCenter.learnMore})+"",d=e[10]("accountCenter.gettingStartedGuide",{default:o.C.accountCenter.gettingStartedGuide})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.t)(s),a=(0,o.G)(),i=(0,o.j)("a"),c=(0,o.t)(d),(0,o.k)(i,"href",l=e[11].gettingStartedGuide),(0,o.k)(i,"target","_blank"),(0,o.k)(i,"rel","noreferrer noopener"),(0,o.k)(i,"class","svelte-177u10y"),(0,o.k)(n,"class","flex justify-between items-center w100 svelte-177u10y")},m(e,l){(0,o.b)(e,n,l),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),(0,o.m)(n,i),(0,o.m)(i,c)},p(e,n){1024&n[0]&&s!==(s=e[10]("accountCenter.learnMore",{default:o.C.accountCenter.learnMore})+"")&&(0,o.v)(r,s),1024&n[0]&&d!==(d=e[10]("accountCenter.gettingStartedGuide",{default:o.C.accountCenter.gettingStartedGuide})+"")&&(0,o.v)(c,d),2048&n[0]&&l!==(l=e[11].gettingStartedGuide)&&(0,o.k)(i,"href",l)},d(e){e&&(0,o.d)(n)}}}function Me(e){let n,t,r,a,i,c,l,s=e[10]("accountCenter.smartContracts",{default:o.C.accountCenter.smartContracts})+"",d=e[10]("accountCenter.explore",{default:o.C.accountCenter.explore})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.t)(s),a=(0,o.G)(),i=(0,o.j)("a"),c=(0,o.t)(d),(0,o.k)(i,"href",l=e[11].explore),(0,o.k)(i,"target","_blank"),(0,o.k)(i,"rel","noreferrer noopener"),(0,o.k)(i,"class","svelte-177u10y"),(0,o.k)(n,"class","flex justify-between items-center w100 svelte-177u10y")},m(e,l){(0,o.b)(e,n,l),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),(0,o.m)(n,i),(0,o.m)(i,c)},p(e,n){1024&n[0]&&s!==(s=e[10]("accountCenter.smartContracts",{default:o.C.accountCenter.smartContracts})+"")&&(0,o.v)(r,s),1024&n[0]&&d!==(d=e[10]("accountCenter.explore",{default:o.C.accountCenter.explore})+"")&&(0,o.v)(c,d),2048&n[0]&&l!==(l=e[11].explore)&&(0,o.k)(i,"href",l)},d(e){e&&(0,o.d)(n)}}}function Pe(e){let n,t;return n=new $e({props:{secondaryTokens:e[8]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};256&t[0]&&(o.secondaryTokens=e[8]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Se(e){let n,t,r,a,i=e[2]&&ze(e),c=e[4]&&Ae(e),l=e[0]&&Ge(e);return{c(){i&&i.c(),n=(0,o.G)(),c&&c.c(),t=(0,o.G)(),l&&l.c(),r=(0,o.e)()},m(e,s){i&&i.m(e,s),(0,o.b)(e,n,s),c&&c.m(e,s),(0,o.b)(e,t,s),l&&l.m(e,s),(0,o.b)(e,r,s),a=!0},p(e,a){e[2]?i?(i.p(e,a),4&a[0]&&(0,o.x)(i,1)):(i=ze(e),i.c(),(0,o.x)(i,1),i.m(n.parentNode,n)):i&&((0,o.y)(),(0,o.A)(i,1,1,(()=>{i=null})),(0,o.z)()),e[4]?c?(c.p(e,a),16&a[0]&&(0,o.x)(c,1)):(c=Ae(e),c.c(),(0,o.x)(c,1),c.m(t.parentNode,t)):c&&((0,o.y)(),(0,o.A)(c,1,1,(()=>{c=null})),(0,o.z)()),e[0]?l?(l.p(e,a),1&a[0]&&(0,o.x)(l,1)):(l=Ge(e),l.c(),(0,o.x)(l,1),l.m(r.parentNode,r)):l&&((0,o.y)(),(0,o.A)(l,1,1,(()=>{l=null})),(0,o.z)())},i(e){a||((0,o.x)(i),(0,o.x)(c),(0,o.x)(l),a=!0)},o(e){(0,o.A)(i),(0,o.A)(c),(0,o.A)(l),a=!1},d(e){i&&i.d(e),e&&(0,o.d)(n),c&&c.d(e),e&&(0,o.d)(t),l&&l.d(e),e&&(0,o.d)(r)}}}function Ve(e,n,t){let r,a,i,c,l,s,d,u,m,p;(0,o.c)(e,o.w,(e=>t(1,d=e))),(0,o.c)(e,b._,(e=>t(10,m=e)));let{expanded:v}=n;const f=o.a3.select("accountCenter").pipe((0,g.Z)(o.a3.get().accountCenter),(0,h.t)(1));(0,o.c)(e,f,(e=>t(9,u=e)));const{chains:x}=o.a3.get();let w,y=!1,k=!1;const $=o.a3.select("appMetadata").pipe((0,g.Z)(o.a3.get().appMetadata),(0,h.t)(1));(0,o.c)(e,$,(e=>t(11,p=e)));const{position:C}=o.a3.get().accountCenter,{device:j}=o.af,z=async()=>{try{await(0,o.ag)(r.provider,c,c?.protectedRpcUrl||o.ah),t(4,k=!1)}catch(e){const{code:n}=e;console.log(e,n)}};return e.$$set=e=>{"expanded"in e&&t(0,v=e.expanded)},e.$$.update=()=>{2&e.$$.dirty[0]&&t(19,[r]=d,r),524288&e.$$.dirty[0]&&t(20,[a]=r?r.chains:[],a),524288&e.$$.dirty[0]&&t(8,i=r&&r.accounts.length&&r.accounts[0].secondaryTokens),1048576&e.$$.dirty[0]&&t(5,c=x.find((({id:e,namespace:n})=>!!a&&e===a.id&&n===a.namespace))),1048576&e.$$.dirty[0]&&t(7,l=(0,o.a4)(a&&a.id)),1048576&e.$$.dirty[0]&&t(6,s=a&&"0x1"===a.id)},[v,d,y,w,k,c,s,l,i,u,m,p,f,function(){d.forEach((({label:e})=>(0,o.P)({label:e})))},x,$,C,j,z,r,a,function(n){o.ai.call(this,e,n)},()=>t(2,y=!1),()=>t(4,k=!1),()=>z(),function(e){w=e,t(3,w)},()=>(0,o.aj)(),()=>t(2,y=!0),()=>t(4,k=!0)]}class qe extends o.S{constructor(e){super(),(0,o.i)(this,e,Ve,Se,o.s,{expanded:0},Ce,[-1,-1])}}function De(e){(0,o.a)(e,"svelte-1xsvwqj",".ac-trigger.svelte-1xsvwqj{--background-color:var(\n --account-center-minimized-background,\n var(--w3o-background-color, white)\n );--text-color:var(--w3o-text-color, var(--gray-700));--border-color:var(\n --account-center-border,\n var(--w3o-border-color, var(--onboard-gray-200, var(--gray-200)))\n );--border-radius:var(\n --account-center-border-radius,\n var(--w3o-border-radius, 1rem)\n );cursor:pointer;pointer-events:auto;width:100%;padding:0.5rem;border:1px solid;background:var(--background-color);color:var(--text-color);border-color:var(--border-color);border-radius:var(--border-radius);box-shadow:var(\n --account-center-box-shadow,\n var(--onboard-shadow-3, var(--shadow-3))\n );z-index:var(--account-center-z-index, 1)}.inner-row.svelte-1xsvwqj{display:flex;flex-flow:row nowrap;align-items:center;gap:0.5rem;padding:0 0.25rem}.wallet-info.svelte-1xsvwqj{display:flex;flex:1;flex-flow:column;height:2.5rem;overflow:hidden}.address.svelte-1xsvwqj{font-weight:600;line-height:1.25rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--account-center-minimized-address-color, inherit)}.balance.svelte-1xsvwqj{font-weight:400;line-height:1.25rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0.6;color:var(--account-center-minimized-balance-color, inherit)}.chain-icon-container.svelte-1xsvwqj{margin-right:4px}.container.svelte-1xsvwqj{border:1px solid transparent;border-radius:16px;padding:1px;transition:border-color 250ms ease-in-out, backround 250ms ease-in-out;max-width:128px;cursor:default}.drop-shadow.svelte-1xsvwqj{filter:drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.2))}")}function Ze(e){let n,t,r,a,i,c=(e[5].length>7?e[5].slice(0,7):e[5])+"";return{c(){n=(0,o.j)("div"),t=(0,o.t)(c),r=(0,o.G)(),a=(0,o.t)(e[2]),(0,o.k)(n,"class","balance svelte-1xsvwqj")},m(e,i){(0,o.b)(e,n,i),(0,o.m)(n,t),(0,o.m)(n,r),(0,o.m)(n,a)},p(e,n){32&n&&c!==(c=(e[5].length>7?e[5].slice(0,7):e[5])+"")&&(0,o.v)(t,c),4&n&&(0,o.v)(a,e[2])},i(e){e&&(i||(0,o.U)((()=>{i=(0,o.V)(n,o.X,{}),i.start()})))},o:o.n,d(e){e&&(0,o.d)(n)}}}function Ee(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w,y,k,$,C,j,G,I,T,F,H,_,L=(e[8]?(0,o.D)(e[8]):e[7]?(0,o.D)(e[7]):e[6])+"";i=new o.W({props:{size:32,padding:4,background:"white",border:"darkGreen",radius:8,icon:e[9]&&e[9].icon||o.ae}}),s=new o.W({props:{size:32,padding:4,background:"green",border:"darkGreen",radius:8,icon:e[1]?e[1].icon:""}}),m=new o.R({props:{size:14}});let M=e[5]&&Ze(e);return $=new o.W({props:{size:22,padding:4,background:"custom",color:e[4]?e[4].icon?void 0:"var(--onboard-primary-100, var(--primary-100))":"var(\n --account-center-chain-warning,\n var(--onboard-warning-500, var(--warning-500))\n )",customBackgroundColor:e[4]?e[4].color||e[3]&&e[3].color||o.a6.color:"var(--onboard-warning-200, var(--warning-200))",border:"transparent",radius:25,icon:e[4]?e[4].icon||e[3]&&e[3].icon||o.a6.icon:A}}),j=new S({props:{chains:e[11],colorVar:"--account-center-minimized-network-selector-color",selectIcon:z,parentCSSId:"minimized_ac"}}),{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.j)("div"),a=(0,o.j)("div"),(0,o.F)(i.$$.fragment),c=(0,o.G)(),l=(0,o.j)("div"),(0,o.F)(s.$$.fragment),d=(0,o.G)(),u=(0,o.j)("div"),(0,o.F)(m.$$.fragment),p=(0,o.G)(),v=(0,o.j)("div"),f=(0,o.j)("div"),g=(0,o.t)(L),h=(0,o.G)(),M&&M.c(),b=(0,o.G)(),x=(0,o.j)("div"),w=(0,o.j)("div"),y=(0,o.j)("div"),k=(0,o.j)("div"),(0,o.F)($.$$.fragment),C=(0,o.G)(),(0,o.F)(j.$$.fragment),(0,o.k)(a,"class","drop-shadow svelte-1xsvwqj"),(0,o.T)(l,"margin-left","-0.5rem"),(0,o.k)(l,"class","drop-shadow svelte-1xsvwqj"),(0,o.T)(u,"right","-4px"),(0,o.T)(u,"bottom","-4px"),(0,o.k)(u,"class","drop-shadow absolute svelte-1xsvwqj"),(0,o.k)(r,"class","flex relative"),(0,o.k)(f,"class","address svelte-1xsvwqj"),(0,o.k)(v,"class","wallet-info svelte-1xsvwqj"),(0,o.k)(k,"class","chain-icon-container svelte-1xsvwqj"),(0,o.k)(y,"class","flex items-center"),(0,o.k)(w,"class","container shadow-1 flex items-center svelte-1xsvwqj"),(0,o.k)(w,"style",G=`border-color: var(${e[4]?"--onboard-primary-200, var(--primary-200)":"--onboard-warning-500, var(--warning-500)"}); background-color: var(${e[4]?"--account-center-minimized-chain-select-background, var(--primary-100)":"--account-center-minimized-chain-select-background-warning, var(--warning-100)"})`),(0,o.k)(x,"class","network"),(0,o.k)(t,"class","inner-row svelte-1xsvwqj"),(0,o.k)(n,"class","ac-trigger svelte-1xsvwqj")},m(z,A){(0,o.b)(z,n,A),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(r,a),(0,o.I)(i,a,null),(0,o.m)(r,c),(0,o.m)(r,l),(0,o.I)(s,l,null),(0,o.m)(r,d),(0,o.m)(r,u),(0,o.I)(m,u,null),(0,o.m)(t,p),(0,o.m)(t,v),(0,o.m)(v,f),(0,o.m)(f,g),(0,o.m)(v,h),M&&M.m(v,null),(0,o.m)(t,b),(0,o.m)(t,x),(0,o.m)(x,w),(0,o.m)(w,y),(0,o.m)(y,k),(0,o.I)($,k,null),(0,o.m)(y,C),(0,o.I)(j,y,null),F=!0,H||(_=[(0,o.p)(w,"click",(0,o.J)(e[15])),(0,o.p)(n,"click",(0,o.J)((function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)})))],H=!0)},p(n,[t]){e=n;const r={};512&t&&(r.icon=e[9]&&e[9].icon||o.ae),i.$set(r);const a={};2&t&&(a.icon=e[1]?e[1].icon:""),s.$set(a),(!F||448&t)&&L!==(L=(e[8]?(0,o.D)(e[8]):e[7]?(0,o.D)(e[7]):e[6])+"")&&(0,o.v)(g,L),e[5]?M?(M.p(e,t),32&t&&(0,o.x)(M,1)):(M=Ze(e),M.c(),(0,o.x)(M,1),M.m(v,null)):M&&(M.d(1),M=null);const c={};16&t&&(c.color=e[4]?e[4].icon?void 0:"var(--onboard-primary-100, var(--primary-100))":"var(\n --account-center-chain-warning,\n var(--onboard-warning-500, var(--warning-500))\n )"),24&t&&(c.customBackgroundColor=e[4]?e[4].color||e[3]&&e[3].color||o.a6.color:"var(--onboard-warning-200, var(--warning-200))"),24&t&&(c.icon=e[4]?e[4].icon||e[3]&&e[3].icon||o.a6.icon:A),$.$set(c),(!F||16&t&&G!==(G=`border-color: var(${e[4]?"--onboard-primary-200, var(--primary-200)":"--onboard-warning-500, var(--warning-500)"}); background-color: var(${e[4]?"--account-center-minimized-chain-select-background, var(--primary-100)":"--account-center-minimized-chain-select-background-warning, var(--warning-100)"})`))&&(0,o.k)(w,"style",G)},i(e){F||((0,o.x)(i.$$.fragment,e),(0,o.x)(s.$$.fragment,e),(0,o.x)(m.$$.fragment,e),(0,o.x)(M),(0,o.x)($.$$.fragment,e),(0,o.x)(j.$$.fragment,e),e&&(0,o.U)((()=>{F&&(T&&T.end(1),I=(0,o.V)(n,o.X,{duration:250}),I.start())})),F=!0)},o(e){(0,o.A)(i.$$.fragment,e),(0,o.A)(s.$$.fragment,e),(0,o.A)(m.$$.fragment,e),(0,o.A)($.$$.fragment,e),(0,o.A)(j.$$.fragment,e),I&&I.invalidate(),T=(0,o.ak)(n,o.X,{duration:100}),F=!1},d(e){e&&(0,o.d)(n),(0,o.K)(i),(0,o.K)(s),(0,o.K)(m),M&&M.d(),(0,o.K)($),(0,o.K)(j),e&&T&&T.end(),H=!1,(0,o.L)(_)}}}function Ke(e,n,t){let r,a,i,c,l,s,d,u,m,p,v,f;(0,o.c)(e,o.w,(e=>t(14,v=e)));let{toggle:b}=n;const x=o.a3.select("appMetadata").pipe((0,g.Z)(o.a3.get().appMetadata),(0,h.t)(1));(0,o.c)(e,x,(e=>t(9,f=e)));const w=o.a3.get().chains;return e.$$set=e=>{"toggle"in e&&t(0,b=e.toggle)},e.$$.update=()=>{16384&e.$$.dirty&&t(1,[r]=v,r),2&e.$$.dirty&&t(13,[a]=r?r.accounts:[],a),8192&e.$$.dirty&&t(8,i=a&&a.ens&&(0,o.D)(a.ens.name)),8192&e.$$.dirty&&t(7,c=a&&a.uns&&(0,o.D)(a.uns.name)),8192&e.$$.dirty&&t(6,l=a?(0,o.E)(a.address):""),8192&e.$$.dirty&&t(2,[s]=a&&a.balance?Object.keys(a.balance):[],s),8196&e.$$.dirty&&t(5,d=a&&a.balance?a.balance[s]:null),2&e.$$.dirty&&t(12,u=r&&r.chains[0]),4096&e.$$.dirty&&t(4,m=w.find((({id:e,namespace:n})=>!!u&&e===u.id&&n===u.namespace))),4096&e.$$.dirty&&t(3,p=(0,o.a4)(u&&u.id))},[b,r,s,p,m,d,l,c,i,f,x,w,u,a,v,function(n){o.ai.call(this,e,n)}]}class Be extends o.S{constructor(e){super(),(0,o.i)(this,e,Ke,Ee,o.s,{toggle:0},De)}}function We(e){(0,o.a)(e,"svelte-1o9vinu",".ac-trigger.svelte-1o9vinu{--background-color:var(\n --account-center-minimized-background,\n var(--w3o-background-color, white)\n );--text-color:var(--w3o-text-color, var(--gray-700));--border-color:var(\n --account-center-border,\n var(--w3o-border-color, var(--onboard-gray-200, var(--gray-200)))\n );--border-radius:var(\n --account-center-border-radius,\n var(--w3o-border-radius, 1rem)\n );position:relative;cursor:pointer;pointer-events:auto;min-width:80px;background:var(--background-color);color:var(--text-color);border:1px solid var(--border-color);border-radius:var(--border-radius);box-shadow:var(\n --account-center-box-shadow,\n var(--onboard-shadow-3, var(--shadow-3))\n );z-index:var(--account-center-z-index, 1)}.wallet-square-wrapper.svelte-1o9vinu{position:relative;margin-left:-8px}.check-icon-wrapper.svelte-1o9vinu{position:absolute;right:-4px;bottom:-4px}.inner-row.svelte-1o9vinu{display:flex;flex-flow:row nowrap;width:80px;padding:0.75rem}.drop-shadow.svelte-1o9vinu{filter:drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.2))}")}function Ne(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g;return a=new o.W({props:{size:32,padding:4,background:"white",border:"darkGreen",radius:8,icon:e[3]&&e[3].icon||o.ae}}),s=new o.W({props:{size:32,padding:4,background:"green",border:"darkGreen",radius:8,icon:e[1]?e[1].icon:""}}),m=new o.R({props:{size:14}}),{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.j)("div"),(0,o.F)(a.$$.fragment),i=(0,o.G)(),c=(0,o.j)("div"),l=(0,o.j)("div"),(0,o.F)(s.$$.fragment),d=(0,o.G)(),u=(0,o.j)("div"),(0,o.F)(m.$$.fragment),(0,o.k)(r,"class","drop-shadow svelte-1o9vinu"),(0,o.k)(l,"class","drop-shadow svelte-1o9vinu"),(0,o.k)(u,"class","check-icon-wrapper drop-shadow svelte-1o9vinu"),(0,o.k)(c,"class","wallet-square-wrapper svelte-1o9vinu"),(0,o.k)(t,"class","inner-row svelte-1o9vinu"),(0,o.k)(n,"class","ac-trigger svelte-1o9vinu"),(0,o.k)(n,"style",p=e[2].position.includes("Left")?"align-self: flex-start":null)},m(p,h){(0,o.b)(p,n,h),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.I)(a,r,null),(0,o.m)(t,i),(0,o.m)(t,c),(0,o.m)(c,l),(0,o.I)(s,l,null),(0,o.m)(c,d),(0,o.m)(c,u),(0,o.I)(m,u,null),v=!0,f||(g=(0,o.p)(n,"click",(0,o.J)((function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)}))),f=!0)},p(t,[r]){e=t;const i={};8&r&&(i.icon=e[3]&&e[3].icon||o.ae),a.$set(i);const c={};2&r&&(c.icon=e[1]?e[1].icon:""),s.$set(c),(!v||4&r&&p!==(p=e[2].position.includes("Left")?"align-self: flex-start":null))&&(0,o.k)(n,"style",p)},i(e){v||((0,o.x)(a.$$.fragment,e),(0,o.x)(s.$$.fragment,e),(0,o.x)(m.$$.fragment,e),v=!0)},o(e){(0,o.A)(a.$$.fragment,e),(0,o.A)(s.$$.fragment,e),(0,o.A)(m.$$.fragment,e),v=!1},d(e){e&&(0,o.d)(n),(0,o.K)(a),(0,o.K)(s),(0,o.K)(m),f=!1,g()}}}function Ue(e,n,t){let r,a,i,c;(0,o.c)(e,o.w,(e=>t(6,a=e)));let{toggle:l}=n;const s=o.a3.select("appMetadata").pipe((0,g.Z)(o.a3.get().appMetadata),(0,h.t)(1));(0,o.c)(e,s,(e=>t(3,c=e)));const d=o.a3.select("accountCenter").pipe((0,g.Z)(o.a3.get().accountCenter),(0,h.t)(1));return(0,o.c)(e,d,(e=>t(2,i=e))),e.$$set=e=>{"toggle"in e&&t(0,l=e.toggle)},e.$$.update=()=>{64&e.$$.dirty&&t(1,[r]=a,r)},[l,r,i,c,s,d,a]}class Re extends o.S{constructor(e){super(),(0,o.i)(this,e,Ue,Ne,o.s,{toggle:0},We)}}function Oe(e){(0,o.a)(e,"svelte-1nua59o",".ac-container.svelte-1nua59o{display:flex;flex-flow:column;align-items:flex-end;gap:0.5rem}")}function Je(e){let n,t;return n=new qe({props:{expanded:e[0]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};1&t&&(o.expanded=e[0]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Xe(e){let n,t;return n=new Be({props:{toggle:e[4]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p:o.n,i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Ye(e){let n,t;return n=new Re({props:{toggle:e[4]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p:o.n,i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Qe(e){let n,t;return n=new qe({props:{expanded:e[0]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};1&t&&(o.expanded=e[0]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function en(e){let n,t,r,a,i,c,l,s,d=e[1].position.includes("bottom"),u=e[1].position.includes("top"),m=d&&Je(e);const p=[Ye,Xe],v=[];function f(e,n){return e[1].minimal?0:1}r=f(e),a=v[r]=p[r](e);let g=u&&Qe(e);return{c(){n=(0,o.j)("div"),m&&m.c(),t=(0,o.G)(),a.c(),i=(0,o.G)(),g&&g.c(),(0,o.k)(n,"class","ac-container svelte-1nua59o")},m(a,d){(0,o.b)(a,n,d),m&&m.m(n,null),(0,o.m)(n,t),v[r].m(n,null),(0,o.m)(n,i),g&&g.m(n,null),c=!0,l||(s=(0,o.p)(window,"click",e[3]),l=!0)},p(e,[c]){2&c&&(d=e[1].position.includes("bottom")),d?m?(m.p(e,c),2&c&&(0,o.x)(m,1)):(m=Je(e),m.c(),(0,o.x)(m,1),m.m(n,t)):m&&((0,o.y)(),(0,o.A)(m,1,1,(()=>{m=null})),(0,o.z)());let l=r;r=f(e),r===l?v[r].p(e,c):((0,o.y)(),(0,o.A)(v[l],1,1,(()=>{v[l]=null})),(0,o.z)(),a=v[r],a?a.p(e,c):(a=v[r]=p[r](e),a.c()),(0,o.x)(a,1),a.m(n,i)),2&c&&(u=e[1].position.includes("top")),u?g?(g.p(e,c),2&c&&(0,o.x)(g,1)):(g=Qe(e),g.c(),(0,o.x)(g,1),g.m(n,null)):g&&((0,o.y)(),(0,o.A)(g,1,1,(()=>{g=null})),(0,o.z)())},i(e){c||((0,o.x)(m),(0,o.x)(a),(0,o.x)(g),c=!0)},o(e){(0,o.A)(m),(0,o.A)(a),(0,o.A)(g),c=!1},d(e){e&&(0,o.d)(n),m&&m.d(),v[r].d(),g&&g.d(),l=!1,s()}}}function nn(e,n,t){let r,a=!1;const i=o.a3.select("accountCenter").pipe((0,g.Z)(o.a3.get().accountCenter),(0,h.t)(1));function c(){r.expanded&&((0,o.am)({expanded:!1}),t(0,a=!1))}return(0,o.c)(e,i,(e=>t(1,r=e))),(0,o.al)(c),[a,r,i,c,function(){(0,o.am)({expanded:!r.expanded}),t(0,a=!a)}]}class tn extends o.S{constructor(e){super(),(0,o.i)(this,e,nn,en,o.s,{},Oe)}}}}]);
\ No newline at end of file
+"use strict";(self.webpackChunkbos_workspace_gateway=self.webpackChunkbos_workspace_gateway||[]).push([[8503],{38503:(e,n,t)=>{t.r(n),t.d(n,{default:()=>tn});var o=t(59444),r=t(16126),a=t(31635),i=function(e){function n(n,t){return e.call(this)||this}return(0,a.C6)(n,e),n.prototype.schedule=function(e,n){return void 0===n&&(n=0),this},n}(t(52616).yU),c={setInterval:function(e,n){for(var t=[],o=2;o '),A='\n \n \n \n';function G(e){(0,o.a)(e,"svelte-1uqued6","select.svelte-1uqued6{border:none;background-image:none;background-color:transparent;-webkit-appearance:none;-webkit-box-shadow:none;-moz-box-shadow:none;box-shadow:none;appearance:none;font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));transition:width 250ms ease-in-out;background-repeat:no-repeat, repeat;background-position:right 0px top 0px, 0 0;scrollbar-width:none;-ms-overflow-style:none;padding:0 14px 0 0;white-space:nowrap;text-overflow:ellipsis}select.minimized_ac.svelte-1uqued6{min-width:80px;max-width:80px}select.maximized_ac.svelte-1uqued6{width:auto !important}select.svelte-1uqued6:focus{outline:none}span.switching-placeholder.svelte-1uqued6{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));min-width:80px;max-width:80px;padding:0 8px 0 4px}")}function I(e,n,t){const o=e.slice();return o[15]=n[t],o}function T(e){let n;function t(e,n){return e[7]?H:F}let r=t(e),a=r(e);return{c(){a.c(),n=(0,o.e)()},m(e,t){a.m(e,t),(0,o.b)(e,n,t)},p(e,o){r===(r=t(e))&&a?a.p(e,o):(a.d(1),a=r(e),a&&(a.c(),a.m(n.parentNode,n)))},d(e){a.d(e),e&&(0,o.d)(n)}}}function F(e){let n,t,r,a,i,c,l,s=!(0,o.h)(e[6].chains[0],e[2]),d=[],u=new Map,m=s&&_(e),p=e[2];const v=e=>e[15].id;for(let n=0;nt(12,c=e)));let{selectIcon:s=z}=n,{colorVar:d}=n,{chains:u}=n,{bold:g=!1}=n,{parentCSSId:h=""}=n;const b=new x.t(!1);let j;(0,o.c)(e,b,(e=>t(7,l=e)));const A=function(){for(var e=[],n=0;n"boolean"!=typeof e&&"boolean"!=typeof n&&e[0]&&n[0]&&e[0].chains[0].id===n[0].chains[0].id)));var G;return(0,o.c)(e,A,(e=>t(11,i=e))),e.$$set=e=>{"selectIcon"in e&&t(0,s=e.selectIcon),"colorVar"in e&&t(1,d=e.colorVar),"chains"in e&&t(2,u=e.chains),"bold"in e&&t(3,g=e.bold),"parentCSSId"in e&&t(4,h=e.parentCSSId)},e.$$.update=()=>{4096&e.$$.dirty&&t(6,[a]=c,a),2048&e.$$.dirty&&i&&function(){if(!j)return;let e=document.createElement("option");e.textContent=j.selectedOptions[0].textContent;let n=document.createElement("select");n.style.visibility="hidden",n.style.position="fixed",n.appendChild(e),j.after(n),t(5,j.style.width=n.clientWidth-22+"px",j),n.remove()}()},[s,d,u,g,h,j,a,l,b,A,async function(){const e=j.selectedOptions[0].value;e!==a.chains[0].id&&(b.next(!0),await(0,o.f)({chainId:e,chainNamespace:"evm",wallet:a.label}),b.next(!1))},i,c,function(e){o.g[e?"unshift":"push"]((()=>{j=e,t(5,j),t(2,u),t(6,a),t(12,c)}))}]}class S extends o.S{constructor(e){super(),(0,o.i)(this,e,P,M,o.s,{selectIcon:0,colorVar:1,chains:2,bold:3,parentCSSId:4},G)}}var V='\n \n \n \n';function q(e){(0,o.a)(e,"svelte-hb2n95",".container.svelte-hb2n95.svelte-hb2n95{display:flex;align-items:center;gap:0.5rem;cursor:pointer;position:relative;z-index:0;width:100%;padding:0.25rem;margin-bottom:0.25rem;border-radius:12px;transition:background-color 150ms ease-in-out}.container.svelte-hb2n95.svelte-hb2n95::before{content:'';display:block;position:absolute;top:0;bottom:0;left:0;right:0;height:100%;width:100%;background:var(--action-color);border-radius:12px;z-index:-1;opacity:0}.container.svelte-hb2n95.svelte-hb2n95:hover::before{opacity:0.2}.container.svelte-hb2n95:hover .balance.svelte-hb2n95,.container.svelte-hb2n95:hover .elipsis-container.svelte-hb2n95{opacity:1}.container.svelte-hb2n95:hover .balance.svelte-hb2n95{color:var(--account-center-maximized-balance-color, inherit)}.container.primary.svelte-hb2n95.svelte-hb2n95:hover{background-color:var(\n --account-center-maximized-account-section-background-hover\n )}.account-details.svelte-hb2n95.svelte-hb2n95{flex:1 1;display:flex;gap:inherit;overflow:hidden}.address-domain.svelte-hb2n95.svelte-hb2n95{flex:1 0 auto;max-width:70%;white-space:nowrap;font-weight:600;color:var(--account-center-maximized-address-color, inherit);overflow:scroll;scrollbar-width:none;-ms-overflow-style:none}.address-domain.svelte-hb2n95.svelte-hb2n95::-webkit-scrollbar{display:none}.balance.svelte-hb2n95.svelte-hb2n95{flex:1 1 auto;max-width:70%;white-space:nowrap;text-align:end;opacity:0.4;transition:color 150ms ease-in-out, background-color 150ms ease-in-out;overflow:scroll;scrollbar-width:none;-ms-overflow-style:none}.balance.svelte-hb2n95.svelte-hb2n95::-webkit-scrollbar{display:none}.elipsis-container.svelte-hb2n95.svelte-hb2n95{flex:0;padding:0.25rem;border-radius:24px;transition:color 150ms ease-in-out, background-color 150ms ease-in-out;background-color:transparent;opacity:0.4}.elipsis-container.svelte-hb2n95.svelte-hb2n95:hover{color:var(--text-color)}.elipsis-container.active.svelte-hb2n95.svelte-hb2n95{color:var(--text-color)}.elipsis.svelte-hb2n95.svelte-hb2n95{width:24px}.menu.svelte-hb2n95.svelte-hb2n95{background:var(--onboard-white, var(--white));border:1px solid var(--onboard-gray-100, var(--gray-100));border-radius:8px;list-style-type:none;right:0.25rem;top:2.25rem;margin:0;padding:0;border:none;overflow:hidden;z-index:1}.menu.svelte-hb2n95 li.svelte-hb2n95{color:var(--onboard-primary-500, var(--primary-500));font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));padding:12px 16px;background:var(--onboard-white, var(--white));transition:background-color 150ms ease-in-out;cursor:pointer}.menu.svelte-hb2n95 li.svelte-hb2n95:hover{background:var(--onboard-primary-200, var(--primary-200))}")}function D(e,n,t){const o=e.slice();return o[14]=n[t].address,o[15]=n[t].ens,o[16]=n[t].uns,o[17]=n[t].balance,o[19]=t,o}function Z(e){let n,t,r;return t=new o.R({props:{size:14}}),{c(){n=(0,o.j)("div"),(0,o.F)(t.$$.fragment),(0,o.T)(n,"right","-5px"),(0,o.T)(n,"bottom","-5px"),(0,o.k)(n,"class","drop-shadow absolute")},m(e,a){(0,o.b)(e,n,a),(0,o.I)(t,n,null),r=!0},i(e){r||((0,o.x)(t.$$.fragment,e),r=!0)},o(e){(0,o.A)(t.$$.fragment,e),r=!1},d(e){e&&(0,o.d)(n),(0,o.K)(t)}}}function E(e){let n,t,r,a=U(e[17])+"";return{c(){n=(0,o.j)("div"),t=(0,o.t)(a),(0,o.k)(n,"class","balance svelte-hb2n95")},m(e,r){(0,o.b)(e,n,r),(0,o.m)(n,t)},p(e,n){1&n&&a!==(a=U(e[17])+"")&&(0,o.v)(t,a)},i(e){e&&(r||(0,o.U)((()=>{r=(0,o.V)(n,o.X,{}),r.start()})))},o:o.n,d(e){e&&(0,o.d)(n)}}}function K(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f=e[4]("accountCenter.addAccount",{default:e[2].accountCenter.addAccount})+"",g=e[4]("accountCenter.disconnectWallet",{default:e[2].accountCenter.disconnectWallet})+"",h=e[2].accountCenter.copyAddress+"",b=!(e[1]&&0===e[19])&&B(e);function x(){return e[13](e[15],e[16],e[14])}return{c(){n=(0,o.j)("ul"),t=(0,o.j)("li"),r=(0,o.t)(f),a=(0,o.G)(),b&&b.c(),i=(0,o.G)(),c=(0,o.j)("li"),l=(0,o.t)(g),s=(0,o.G)(),d=(0,o.j)("li"),u=(0,o.t)(h),(0,o.k)(t,"class","svelte-hb2n95"),(0,o.k)(c,"class","svelte-hb2n95"),(0,o.k)(d,"class","svelte-hb2n95"),(0,o.k)(n,"class","menu absolute svelte-hb2n95")},m(m,f){(0,o.b)(m,n,f),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),b&&b.m(n,null),(0,o.m)(n,i),(0,o.m)(n,c),(0,o.m)(c,l),(0,o.m)(n,s),(0,o.m)(n,d),(0,o.m)(d,u),p||(v=[(0,o.p)(t,"click",(0,o.J)(e[10])),(0,o.p)(c,"click",(0,o.J)(e[12])),(0,o.p)(d,"click",(0,o.J)(x))],p=!0)},p(t,a){e=t,20&a&&f!==(f=e[4]("accountCenter.addAccount",{default:e[2].accountCenter.addAccount})+"")&&(0,o.v)(r,f),e[1]&&0===e[19]?b&&(b.d(1),b=null):b?b.p(e,a):(b=B(e),b.c(),b.m(n,i)),20&a&&g!==(g=e[4]("accountCenter.disconnectWallet",{default:e[2].accountCenter.disconnectWallet})+"")&&(0,o.v)(l,g),4&a&&h!==(h=e[2].accountCenter.copyAddress+"")&&(0,o.v)(u,h)},i(e){e&&(m||(0,o.U)((()=>{m=(0,o.V)(n,o.X,{}),m.start()})))},o:o.n,d(e){e&&(0,o.d)(n),b&&b.d(),p=!1,(0,o.L)(v)}}}function B(e){let n,t,r,a,i=e[4]("accountCenter.setPrimaryAccount",{default:e[2].accountCenter.setPrimaryAccount})+"";function c(){return e[11](e[14])}return{c(){n=(0,o.j)("li"),t=(0,o.t)(i),(0,o.k)(n,"class","svelte-hb2n95")},m(e,i){(0,o.b)(e,n,i),(0,o.m)(n,t),r||(a=(0,o.p)(n,"click",(0,o.J)(c)),r=!0)},p(n,r){e=n,20&r&&i!==(i=e[4]("accountCenter.setPrimaryAccount",{default:e[2].accountCenter.setPrimaryAccount})+"")&&(0,o.v)(t,i)},d(e){e&&(0,o.d)(n),r=!1,a()}}}function W(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w=(e[15]?(0,o.D)(e[15].name):e[16]?(0,o.D)(e[16].name):(0,o.E)(e[14]))+"";a=new o.W({props:{size:32,padding:4,background:"custom",color:"#EFF1FC",customBackgroundColor:e[1]&&0===e[19]?"rgba(24, 206, 102, 0.2)":"rgba(235, 235, 237, 0.1)",border:e[1]&&0===e[19]?"green":"gray",radius:8,icon:e[0].icon}});let y=e[1]&&0===e[19]&&Z(),k=e[17]&&E(e);function $(){return e[8](e[14])}function C(){return e[9](e[14])}let j=e[3]===e[14]&&K(e);return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.j)("div"),(0,o.F)(a.$$.fragment),i=(0,o.G)(),y&&y.c(),c=(0,o.G)(),l=(0,o.j)("div"),s=(0,o.j)("div"),d=(0,o.t)(w),u=(0,o.G)(),k&&k.c(),m=(0,o.G)(),p=(0,o.j)("div"),v=(0,o.j)("div"),f=(0,o.G)(),j&&j.c(),g=(0,o.G)(),(0,o.k)(r,"class","flex items-center relative"),(0,o.k)(s,"class","address-domain svelte-hb2n95"),(0,o.k)(l,"class","account-details svelte-hb2n95"),(0,o.k)(v,"class","elipsis pointer flex items-center justify-center relative svelte-hb2n95"),(0,o.k)(p,"class","elipsis-container svelte-hb2n95"),(0,o.H)(p,"active",e[3]===e[14]),(0,o.k)(t,"class","container svelte-hb2n95"),(0,o.H)(t,"primary",e[1]&&0===e[19]),(0,o.k)(n,"class","relative")},m(e,w){(0,o.b)(e,n,w),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.I)(a,r,null),(0,o.m)(r,i),y&&y.m(r,null),(0,o.m)(t,c),(0,o.m)(t,l),(0,o.m)(l,s),(0,o.m)(s,d),(0,o.m)(l,u),k&&k.m(l,null),(0,o.m)(t,m),(0,o.m)(t,p),(0,o.m)(p,v),v.innerHTML=V,(0,o.m)(n,f),j&&j.m(n,null),(0,o.m)(n,g),h=!0,b||(x=[(0,o.p)(v,"click",(0,o.J)($)),(0,o.p)(t,"click",C)],b=!0)},p(i,c){e=i;const s={};2&c&&(s.customBackgroundColor=e[1]&&0===e[19]?"rgba(24, 206, 102, 0.2)":"rgba(235, 235, 237, 0.1)"),2&c&&(s.border=e[1]&&0===e[19]?"green":"gray"),1&c&&(s.icon=e[0].icon),a.$set(s),e[1]&&0===e[19]?y?2&c&&(0,o.x)(y,1):(y=Z(),y.c(),(0,o.x)(y,1),y.m(r,null)):y&&((0,o.y)(),(0,o.A)(y,1,1,(()=>{y=null})),(0,o.z)()),(!h||1&c)&&w!==(w=(e[15]?(0,o.D)(e[15].name):e[16]?(0,o.D)(e[16].name):(0,o.E)(e[14]))+"")&&(0,o.v)(d,w),e[17]?k?(k.p(e,c),1&c&&(0,o.x)(k,1)):(k=E(e),k.c(),(0,o.x)(k,1),k.m(l,null)):k&&(k.d(1),k=null),(!h||9&c)&&(0,o.H)(p,"active",e[3]===e[14]),(!h||2&c)&&(0,o.H)(t,"primary",e[1]&&0===e[19]),e[3]===e[14]?j?(j.p(e,c),9&c&&(0,o.x)(j,1)):(j=K(e),j.c(),(0,o.x)(j,1),j.m(n,g)):j&&(j.d(1),j=null)},i(e){h||((0,o.x)(a.$$.fragment,e),(0,o.x)(y),(0,o.x)(k),(0,o.x)(j),h=!0)},o(e){(0,o.A)(a.$$.fragment,e),(0,o.A)(y),h=!1},d(e){e&&(0,o.d)(n),(0,o.K)(a),y&&y.d(),k&&k.d(),j&&j.d(),b=!1,(0,o.L)(x)}}}function N(e){let n,t,r=e[0].accounts,a=[];for(let n=0;n(0,o.A)(a[e],1,1,(()=>{a[e]=null}));return{c(){for(let e=0;e7?e[n].slice(0,7):e[n]} ${n}`}function R(e,n,t){let r;(0,o.c)(e,b._,(e=>t(4,r=e)));let{wallet:a}=n,{primary:i}=n;function c(){t(3,l="")}let l="";async function s(e){try{await(0,o.M)(e.provider)}catch(n){const{code:t}=n;t!==j.ProviderRpcErrorCode.UNSUPPORTED_METHOD&&t!==j.ProviderRpcErrorCode.DOES_NOT_EXIST||o.N.next({inProgress:!1,actionRequired:e.label})}}function d(){t(2,o.C.accountCenter.copyAddress="Copied Successfully",o.C),setTimeout(c,500),setTimeout((()=>{t(2,o.C.accountCenter.copyAddress="Copy Wallet address",o.C)}),700)}return e.$$set=e=>{"wallet"in e&&t(0,a=e.wallet),"primary"in e&&t(1,i=e.primary)},[a,i,o.C,l,r,s,d,c,e=>t(3,l=l===e?"":e),e=>(0,o.O)(a,e),()=>{t(3,l=""),s(a)},e=>{t(3,l=""),(0,o.O)(a,e)},()=>{t(3,l=""),(0,o.P)({label:a.label})},(e,n,t)=>{(0,o.Q)(e?e.name:n?n.name:t).then((()=>{d()}))}]}class O extends o.S{constructor(e){super(),(0,o.i)(this,e,R,N,o.s,{wallet:0,primary:1,hideMenu:7},q)}get hideMenu(){return this.$$.ctx[7]}}var J='\n \n \n \n',X='\n \n \n \n',Y=' ',Q='\n \n \n';function ee(e){(0,o.a)(e,"svelte-1ubxcdp",".content.svelte-1ubxcdp{padding:1rem;width:300px;font-family:var(--onboard-font-family-normal, var(--font-family-normal));font-size:var(--onboard-font-size-5, var(--font-size-5));line-height:24px}.icon-container.svelte-1ubxcdp{width:3rem;height:3rem;background:var(--onboard-warning-100, var(--warning-100));border-radius:24px;padding:12px;color:var(--onboard-warning-500, var(--warning-500))}h4.svelte-1ubxcdp{margin:1.5rem 0 0.5rem 0;font-weight:600}p.svelte-1ubxcdp{margin:0;font-weight:400}button.svelte-1ubxcdp{margin-top:1.5rem;width:50%;font-weight:600}.right.svelte-1ubxcdp{margin-left:0.5rem;width:60%}")}function ne(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x=e[2]("modals.confirmDisconnectAll.heading",{default:o.C.modals.confirmDisconnectAll.heading})+"",w=e[2]("modals.confirmDisconnectAll.description")+"",y=e[2]("modals.confirmDisconnectAll.cancel",{default:o.C.modals.confirmDisconnectAll.cancel})+"",k=e[2]("modals.confirmDisconnectAll.confirm",{default:o.C.modals.confirmDisconnectAll.confirm})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.G)(),a=(0,o.j)("h4"),i=(0,o.t)(x),c=(0,o.G)(),l=(0,o.j)("p"),s=(0,o.t)(w),d=(0,o.G)(),u=(0,o.j)("div"),m=(0,o.j)("button"),p=(0,o.t)(y),v=(0,o.G)(),f=(0,o.j)("button"),g=(0,o.t)(k),(0,o.k)(t,"class","icon-container flex justify-center items-center svelte-1ubxcdp"),(0,o.k)(a,"class","svelte-1ubxcdp"),(0,o.k)(l,"class","svelte-1ubxcdp"),(0,o.k)(m,"class","button-neutral-solid-b rounded svelte-1ubxcdp"),(0,o.k)(f,"class","right button-neutral-solid rounded svelte-1ubxcdp"),(0,o.k)(u,"class","flex justify-between items-center w-100"),(0,o.k)(n,"class","content svelte-1ubxcdp")},m(x,w){(0,o.b)(x,n,w),(0,o.m)(n,t),t.innerHTML=A,(0,o.m)(n,r),(0,o.m)(n,a),(0,o.m)(a,i),(0,o.m)(n,c),(0,o.m)(n,l),(0,o.m)(l,s),(0,o.m)(n,d),(0,o.m)(n,u),(0,o.m)(u,m),(0,o.m)(m,p),(0,o.m)(u,v),(0,o.m)(u,f),(0,o.m)(f,g),h||(b=[(0,o.p)(m,"click",(function(){(0,o.Z)(e[1])&&e[1].apply(this,arguments)})),(0,o.p)(f,"click",(function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)}))],h=!0)},p(n,t){e=n,4&t&&x!==(x=e[2]("modals.confirmDisconnectAll.heading",{default:o.C.modals.confirmDisconnectAll.heading})+"")&&(0,o.v)(i,x),4&t&&w!==(w=e[2]("modals.confirmDisconnectAll.description")+"")&&(0,o.v)(s,w),4&t&&y!==(y=e[2]("modals.confirmDisconnectAll.cancel",{default:o.C.modals.confirmDisconnectAll.cancel})+"")&&(0,o.v)(p,y),4&t&&k!==(k=e[2]("modals.confirmDisconnectAll.confirm",{default:o.C.modals.confirmDisconnectAll.confirm})+"")&&(0,o.v)(g,k)},d(e){e&&(0,o.d)(n),h=!1,(0,o.L)(b)}}}function te(e){let n,t;return n=new o.Y({props:{close:e[1],$$slots:{default:[ne]},$$scope:{ctx:e}}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,[t]){const o={};2&t&&(o.close=e[1]),15&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function oe(e,n,t){let r;(0,o.c)(e,b._,(e=>t(2,r=e)));let{onConfirm:a}=n,{onClose:i}=n;return e.$$set=e=>{"onConfirm"in e&&t(0,a=e.onConfirm),"onClose"in e&&t(1,i=e.onClose)},[a,i,r]}class re extends o.S{constructor(e){super(),(0,o.i)(this,e,oe,te,o.s,{onConfirm:0,onClose:1},ee)}}function ae(e){(0,o.a)(e,"svelte-ruodf3",".content.svelte-ruodf3{--background-color:var(--w3o-background-color);--text-color:var(--w3o-text-color);--action-color:var(--w3o-action-color, var(--primary-500));font-size:1rem;line-height:1.5rem;display:flex;flex-flow:column;gap:1.5rem;padding:1rem;max-width:320px;background:var(--background-color);color:var(--text-color)}.icon-container.svelte-ruodf3{position:relative;overflow:hidden;width:3rem;height:3rem;border-radius:24px;padding:0.75rem;background:none}.icon-container.svelte-ruodf3::before{content:'';position:absolute;height:100%;width:100%;opacity:0.2;background:var(--action-color)}.text-container.svelte-ruodf3{display:flex;flex-flow:column;gap:0.5rem;padding:0 0.5rem}.actions-container.svelte-ruodf3{display:flex;flex-flow:row nowrap;gap:1rem}.heading.svelte-ruodf3{font-weight:600}button.svelte-ruodf3{font-weight:600}button.primary.svelte-ruodf3{background:var(--action-color)}")}function ie(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w,y,k,$=e[3]("modals.confirmTransactionProtection.heading",{default:o.C.modals.confirmTransactionProtection.heading})+"",C=e[3]("modals.confirmTransactionProtection.description")+"",j=e[3]("modals.confirmTransactionProtection.link",{default:o.C.modals.confirmTransactionProtection.link})+"",z=e[3]("modals.confirmTransactionProtection.dismiss",{default:o.C.modals.confirmTransactionProtection.dismiss})+"",A=e[3]("modals.confirmTransactionProtection.enable",{default:o.C.modals.confirmTransactionProtection.enable})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.G)(),a=(0,o.j)("div"),i=(0,o.j)("div"),c=(0,o.t)($),l=(0,o.G)(),s=(0,o.j)("div"),d=(0,o.t)(C),u=(0,o.G)(),m=(0,o.j)("a"),p=(0,o.t)(j),v=(0,o.G)(),f=(0,o.j)("div"),g=(0,o.j)("button"),h=(0,o.t)(z),b=(0,o.G)(),x=(0,o.j)("button"),w=(0,o.t)(A),(0,o.k)(t,"class","icon-container flex justify-center items-center svelte-ruodf3"),(0,o.k)(i,"class","heading svelte-ruodf3"),(0,o.k)(m,"href",e[2]),(0,o.k)(m,"target","_blank"),(0,o.k)(m,"rel","noreferrer noopener"),(0,o.k)(m,"class","no-link"),(0,o.k)(a,"class","text-container svelte-ruodf3"),(0,o.k)(g,"class","button-neutral-solid-b svelte-ruodf3"),(0,o.k)(x,"class","button-neutral-solid rounded primary svelte-ruodf3"),(0,o.k)(f,"class","actions-container svelte-ruodf3"),(0,o.k)(n,"class","content svelte-ruodf3")},m($,C){(0,o.b)($,n,C),(0,o.m)(n,t),t.innerHTML=Q,(0,o.m)(n,r),(0,o.m)(n,a),(0,o.m)(a,i),(0,o.m)(i,c),(0,o.m)(a,l),(0,o.m)(a,s),(0,o.m)(s,d),(0,o.m)(a,u),(0,o.m)(a,m),(0,o.m)(m,p),(0,o.m)(n,v),(0,o.m)(n,f),(0,o.m)(f,g),(0,o.m)(g,h),(0,o.m)(f,b),(0,o.m)(f,x),(0,o.m)(x,w),y||(k=[(0,o.p)(g,"click",(function(){(0,o.Z)(e[1])&&e[1].apply(this,arguments)})),(0,o.p)(x,"click",(function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)}))],y=!0)},p(n,t){e=n,8&t&&$!==($=e[3]("modals.confirmTransactionProtection.heading",{default:o.C.modals.confirmTransactionProtection.heading})+"")&&(0,o.v)(c,$),8&t&&C!==(C=e[3]("modals.confirmTransactionProtection.description")+"")&&(0,o.v)(d,C),8&t&&j!==(j=e[3]("modals.confirmTransactionProtection.link",{default:o.C.modals.confirmTransactionProtection.link})+"")&&(0,o.v)(p,j),4&t&&(0,o.k)(m,"href",e[2]),8&t&&z!==(z=e[3]("modals.confirmTransactionProtection.dismiss",{default:o.C.modals.confirmTransactionProtection.dismiss})+"")&&(0,o.v)(h,z),8&t&&A!==(A=e[3]("modals.confirmTransactionProtection.enable",{default:o.C.modals.confirmTransactionProtection.enable})+"")&&(0,o.v)(w,A)},d(e){e&&(0,o.d)(n),y=!1,(0,o.L)(k)}}}function ce(e){let n,t;return n=new o.Y({props:{close:e[1],$$slots:{default:[ie]},$$scope:{ctx:e}}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,[t]){const o={};2&t&&(o.close=e[1]),31&t&&(o.$$scope={dirty:t,ctx:e}),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function le(e,n,t){let r;(0,o.c)(e,b._,(e=>t(3,r=e)));let{onEnable:a}=n,{onDismiss:i}=n,{infoLink:c}=n;return e.$$set=e=>{"onEnable"in e&&t(0,a=e.onEnable),"onDismiss"in e&&t(1,i=e.onDismiss),"infoLink"in e&&t(2,c=e.infoLink)},[a,i,c,r]}class se extends o.S{constructor(e){super(),(0,o.i)(this,e,le,ce,o.s,{onEnable:0,onDismiss:1,infoLink:2},ae)}}function de(e){(0,o.a)(e,"svelte-b848yl",".secondary-token-container.svelte-b848yl.svelte-b848yl{width:100%}table.svelte-b848yl.svelte-b848yl{width:100%}tr.svelte-b848yl.svelte-b848yl{padding:0.25rem 1rem;line-height:1rem;border-bottom:1px solid var(--border-color);display:flex;flex-direction:row;align-items:flex-start;gap:1rem}thead.svelte-b848yl .secondary-token-table-header.svelte-b848yl{text-align:inherit;font-size:var(--onboard-font-size-7, var(--font-size-7))}.token-icon.svelte-b848yl.svelte-b848yl{width:30%;font-weight:700;font-size:var(--onboard-font-size-6, var(--font-size-6));color:var(--text-color)}.icon-name-container.svelte-b848yl.svelte-b848yl{display:flex;flex-direction:row;align-items:flex-start;padding:0px;gap:0.5rem}.icon.svelte-b848yl.svelte-b848yl{width:1rem;height:1rem}img.svelte-b848yl.svelte-b848yl{height:100%;width:100%}.token-balance.svelte-b848yl.svelte-b848yl{width:70%;font-weight:200;font-size:var(--onboard-font-size-6, var(--font-size-6));color:var(--text-color)}")}function ue(e,n,t){const o=e.slice();return o[1]=n[t],o}function me(e){let n,t,r,a,i,c,l,s,d,u=e[1].name.toUpperCase()+"",m=(e[1].balance.length>7?e[1].balance.slice(0,7):e[1].balance)+"";function p(e,n){return e[1].icon?ve:pe}let v=p(e),f=v(e);return{c(){n=(0,o.j)("tr"),t=(0,o.j)("td"),r=(0,o.j)("div"),f.c(),a=(0,o.G)(),i=(0,o.t)(u),c=(0,o.G)(),l=(0,o.j)("td"),s=(0,o.t)(m),d=(0,o.G)(),(0,o.k)(r,"class","icon-name-container svelte-b848yl"),(0,o.k)(t,"class","token-icon svelte-b848yl"),(0,o.k)(l,"class","token-balance svelte-b848yl"),(0,o.k)(n,"class","token-row svelte-b848yl")},m(e,u){(0,o.b)(e,n,u),(0,o.m)(n,t),(0,o.m)(t,r),f.m(r,null),(0,o.m)(r,a),(0,o.m)(r,i),(0,o.m)(n,c),(0,o.m)(n,l),(0,o.m)(l,s),(0,o.m)(n,d)},p(e,n){v===(v=p(e))&&f?f.p(e,n):(f.d(1),f=v(e),f&&(f.c(),f.m(r,a))),1&n&&u!==(u=e[1].name.toUpperCase()+"")&&(0,o.v)(i,u),1&n&&m!==(m=(e[1].balance.length>7?e[1].balance.slice(0,7):e[1].balance)+"")&&(0,o.v)(s,m)},d(e){e&&(0,o.d)(n),f.d()}}}function pe(e){let n;return{c(){n=(0,o.j)("div"),(0,o.k)(n,"class","icon svelte-b848yl")},m(e,t){(0,o.b)(e,n,t)},p:o.n,d(e){e&&(0,o.d)(n)}}}function ve(e){let n,t,r={ctx:e,current:null,token:null,hasCatch:!1,pending:xe,then:ge,catch:fe,value:4};return(0,o._)(t=e[1].icon,r),{c(){n=(0,o.e)(),r.block.c()},m(e,t){(0,o.b)(e,n,t),r.block.m(e,r.anchor=t),r.mount=()=>n.parentNode,r.anchor=n},p(n,a){e=n,r.ctx=e,1&a&&t!==(t=e[1].icon)&&(0,o._)(t,r)||(0,o.$)(r,e,a)},d(e){e&&(0,o.d)(n),r.block.d(e),r.token=null,r=null}}}function fe(e){return{c:o.n,m:o.n,p:o.n,i:o.n,o:o.n,d:o.n}}function ge(e){let n,t,r;function a(e,n){return 1&n&&(t=null),null==t&&(t=!!(0,o.a0)(e[4])),t?be:he}let i=a(e,-1),c=i(e);return{c(){n=(0,o.j)("div"),c.c(),(0,o.k)(n,"class","icon svelte-b848yl")},m(e,t){(0,o.b)(e,n,t),c.m(n,null)},p(e,t){i===(i=a(e,t))&&c?c.p(e,t):(c.d(1),c=i(e),c&&(c.c(),c.m(n,null)))},i(e){e&&(r||(0,o.U)((()=>{r=(0,o.V)(n,o.X,{}),r.start()})))},o:o.n,d(e){e&&(0,o.d)(n),c.d()}}}function he(e){let n,t;return{c(){n=(0,o.j)("img"),(0,o.a1)(n.src,t=e[4])||(0,o.k)(n,"src",t),(0,o.k)(n,"alt","logo"),(0,o.k)(n,"class","svelte-b848yl")},m(e,t){(0,o.b)(e,n,t)},p(e,r){1&r&&!(0,o.a1)(n.src,t=e[4])&&(0,o.k)(n,"src",t)},d(e){e&&(0,o.d)(n)}}}function be(e){let n,t,r=e[4]+"";return{c(){n=new o.a2(!1),t=(0,o.e)(),n.a=t},m(e,a){n.m(r,e,a),(0,o.b)(e,t,a)},p(e,t){1&t&&r!==(r=e[4]+"")&&n.p(r)},d(e){e&&(0,o.d)(t),e&&n.d()}}}function xe(e){return{c:o.n,m:o.n,p:o.n,i:o.n,o:o.n,d:o.n}}function we(e){let n,t=e[1]&&e[1].name&&e[1].balance&&me(e);return{c(){t&&t.c(),n=(0,o.e)()},m(e,r){t&&t.m(e,r),(0,o.b)(e,n,r)},p(e,o){e[1]&&e[1].name&&e[1].balance?t?t.p(e,o):(t=me(e),t.c(),t.m(n.parentNode,n)):t&&(t.d(1),t=null)},d(e){t&&t.d(e),e&&(0,o.d)(n)}}}function ye(e){let n,t,r,a,i,c=e[0],l=[];for(let n=0;n',a=(0,o.G)(),i=(0,o.j)("tbody");for(let e=0;e{"secondaryTokens"in e&&t(0,o=e.secondaryTokens)},[o]}class $e extends o.S{constructor(e){super(),(0,o.i)(this,e,ke,ye,o.s,{secondaryTokens:0},de)}}function Ce(e){(0,o.a)(e,"svelte-177u10y",".outer-container.svelte-177u10y{--background-color:var(--w3o-background-color);--text-color:var(--w3o-text-color);--border-color:var(--w3o-border-color, var(--gray-500));--action-color:var(--w3o-action-color, var(--primary-500));--border-radius:var(--w3o-border-radius, 1rem);--account-center-network-selector-color:var(--text-color, white);width:100%;overflow:hidden;pointer-events:auto;border:1px solid transparent;background:var(\n --account-center-maximized-upper-background,\n var(--background-color)\n );border-color:var(--border-color);border-radius:var(--account-center-border-radius, var(--border-radius))}.wallets-section.svelte-177u10y{width:100%;color:var(--text-color, var(--gray-100));background:var(--background-color, var(--gray-700))}.p5.svelte-177u10y{padding:var(--onboard-spacing-5, var(--spacing-5))}.wallets.svelte-177u10y{width:100%;margin-bottom:0.5rem}.actions.svelte-177u10y{color:var(\n --account-center-maximized-upper-action-color,\n var(--action-color)\n );padding-left:2px}.action-container.svelte-177u10y{padding:0.25rem 12px 0.25rem 0.5rem;border-radius:0.5rem;transition:background-color 150ms ease-in-out}.action-container.svelte-177u10y:hover{background-color:var(\n --account-center-maximized-upper-action-background-hover,\n rgba(146, 155, 237, 0.2)\n )}.plus-icon.svelte-177u10y{width:20px}.arrow-forward.svelte-177u10y{width:20px}.mt.svelte-177u10y{margin-top:0.25rem}.action-text.svelte-177u10y{font-size:var(--onboard-font-size-6, var(--font-size-6));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));margin-left:0.5rem}.background-blue.svelte-177u10y{background:var(\n --account-center-maximized-network-section-background,\n var(--onboard-primary-100, var(--primary-100))\n )}.background-gray.svelte-177u10y{background:var(--onboard-gray-100, var(--gray-100))}.background-yellow.svelte-177u10y{background:var(--onboard-warning-100, var(--warning-100))}.network-container.svelte-177u10y{background:var(--background-color);border-top:1px solid var(--border-color);width:100%;display:flex;flex-direction:column;align-items:flex-start;padding:0.75rem;gap:0.5rem;border-radius:var(\n --account-center-border-radius,\n var(--onboard-border-radius-3, var(--border-radius-3))\n );color:var(\n --account-center-maximized-network-text-color,\n var(--account-center-maximized-network-section, inherit)\n )}.network-section.svelte-177u10y{flex-direction:row;align-items:flex-start;padding:0px;gap:16px}.network-selector-container.svelte-177u10y{width:100%}.protect.svelte-177u10y{flex-direction:row;padding:0.25rem 0.375rem 0;gap:0.375rem;width:100%}.shield.svelte-177u10y{width:20px;height:20px;display:flex;justify-content:center}.protect-text.svelte-177u10y{font-size:var(--onboard-font-size-6, var(--font-size-6));color:var(\n --account-center-maximized-upper-action-color,\n var(--action-color)\n );line-height:1.75rem;display:flex;align-items:center}.network-selector-container.svelte-177u10y{margin-left:1rem;width:100%}.network-selector-label.svelte-177u10y{font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3))}.app-info-container.svelte-177u10y{color:var(--text-color, var(--gray-700));background:var(\n --account-center-maximized-info-section-background-color,\n var(\n --account-center-maximized-info-section,\n var(--background-color, #fff)\n )\n );border-top:1px solid var(--border-color);border-radius:var(--account-center-border-radius, inherit);display:flex;flex-direction:column;align-items:flex-start;padding:0px}.app-info-header.svelte-177u10y{width:100%;flex-direction:column;align-items:flex-start;padding:0.75rem;gap:0.5rem;border-bottom:1px solid var(--border-color)}.app-icon-name.svelte-177u10y{display:flex;align-items:center;flex-direction:row;gap:0.75rem}.app-name.svelte-177u10y{font-size:1rem;font-weight:600;line-height:1rem;margin-bottom:0.25rem;color:var(--account-center-maximized-app-name-color, inherit)}.app-description.svelte-177u10y{margin:0;font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));color:var(--account-center-maximized-app-info-color, inherit);display:flex;flex-direction:row;align-items:flex-start;padding:0px 0.25rem;gap:1rem}.app-info.svelte-177u10y{width:100%;font-size:var(--onboard-font-size-7, var(--font-size-7));line-height:var(--onboard-font-line-height-3, var(--font-line-height-3));color:var(--account-center-maximized-app-info-color, inherit);border-bottom:1px solid var(--border-color);display:flex;flex-direction:column;align-items:flex-start;padding:0.5rem 1rem;gap:0.25rem}.app-info-heading.svelte-177u10y{font-weight:700;color:var(--account-center-maximized-app-info-color, inherit)}.w100.svelte-177u10y{width:100%}a.svelte-177u10y{font-weight:700}.powered-by-container.svelte-177u10y{color:var(--text-color);padding:0.75rem}")}function je(e,n,t){const o=e.slice();return o[29]=n[t],o[31]=t,o}function ze(e){let n,t;return n=new re({props:{onClose:e[22],onConfirm:e[13]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};4&t[0]&&(o.onClose=e[22]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Ae(e){let n,t;return n=new se({props:{onDismiss:e[23],onEnable:e[24],infoLink:e[9].transactionProtectionInfoLink||o.a5}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const r={};16&t[0]&&(r.onDismiss=e[23]),512&t[0]&&(r.infoLink=e[9].transactionProtectionInfoLink||o.a5),n.$set(r)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Ge(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w,y,k,$,C,j,z,G,I,T,F,H,_=[],L=new Map,M=e[10]("accountCenter.currentNetwork",{default:o.C.accountCenter.currentNetwork})+"",P=e[1];const V=e=>e[29].label;for(let n=0;n{D=null})),(0,o.z)()),(!T||1024&t[0])&&M!==(M=e[10]("accountCenter.currentNetwork",{default:o.C.accountCenter.currentNetwork})+"")&&(0,o.v)(h,M),e[9].hideTransactionProtectionBtn||!e[6]&&!e[5]?.protectedRpcUrl?Z&&(Z.d(1),Z=null):Z?Z.p(e,t):(Z=Fe(e),Z.c(),Z.m(s,null)),(!T||160&t[0])&&(0,o.H)(s,"background-blue",e[5]&&e[5].icon||e[7]),(!T||32&t[0])&&(0,o.H)(s,"background-yellow",!e[5]),(!T||160&t[0])&&(0,o.H)(s,"background-gray",e[5]&&!e[7]),e[11]?E?(E.p(e,t),2048&t[0]&&(0,o.x)(E,1)):(E=He(e),E.c(),(0,o.x)(E,1),E.m($,C)):E&&((0,o.y)(),(0,o.A)(E,1,1,(()=>{E=null})),(0,o.z)()),e[8]&&e[8].length?K?(K.p(e,t),256&t[0]&&(0,o.x)(K,1)):(K=Pe(e),K.c(),(0,o.x)(K,1),K.m($,j)):K&&((0,o.y)(),(0,o.A)(K,1,1,(()=>{K=null})),(0,o.z)())},i(t){if(!T){for(let e=0;e{T&&(I||(I=(0,o.a9)(n,o.ab,{duration:600,y:e[16].includes("bottom")?56:-76,easing:o.aa,opacity:0},!0)),I.run(1))})),T=!0}},o(t){for(let e=0;e<_.length;e+=1)(0,o.A)(_[e]);(0,o.A)(m.$$.fragment,t),(0,o.A)(D),(0,o.A)(w.$$.fragment,t),(0,o.A)(E),(0,o.A)(K),t&&(I||(I=(0,o.a9)(n,o.ab,{duration:600,y:e[16].includes("bottom")?56:-76,easing:o.aa,opacity:0},!1)),I.run(0)),T=!1},d(e){e&&(0,o.d)(n);for(let e=0;e<_.length;e+=1)_[e].d();q&&q.d(),(0,o.K)(m),D&&D.d(),(0,o.K)(w),Z&&Z.d(),E&&E.d(),K&&K.d(),e&&I&&I.end(),F=!1,(0,o.L)(H)}}}function Ie(e,n){let t,r,a,i;function c(e){n[25](e)}let l={wallet:n[29],primary:0===n[31]};return void 0!==n[3]&&(l.hideMenu=n[3]),r=new O({props:l}),o.g.push((()=>(0,o.ac)(r,"hideMenu",c))),{key:e,first:null,c(){t=(0,o.e)(),(0,o.F)(r.$$.fragment),this.first=t},m(e,n){(0,o.b)(e,t,n),(0,o.I)(r,e,n),i=!0},p(e,t){n=e;const i={};2&t[0]&&(i.wallet=n[29]),2&t[0]&&(i.primary=0===n[31]),!a&&8&t[0]&&(a=!0,i.hideMenu=n[3],(0,o.ad)((()=>a=!1))),r.$set(i)},i(e){i||((0,o.x)(r.$$.fragment,e),i=!0)},o(e){(0,o.A)(r.$$.fragment,e),i=!1},d(e){e&&(0,o.d)(t),(0,o.K)(r,e)}}}function Te(e){let n,t,r;return t=new o.R({props:{size:14}}),{c(){n=(0,o.j)("div"),(0,o.F)(t.$$.fragment),(0,o.T)(n,"right","-5px"),(0,o.T)(n,"bottom","-5px"),(0,o.k)(n,"class","drop-shadow absolute")},m(e,a){(0,o.b)(e,n,a),(0,o.I)(t,n,null),r=!0},i(e){r||((0,o.x)(t.$$.fragment,e),r=!0)},o(e){(0,o.A)(t.$$.fragment,e),r=!1},d(e){e&&(0,o.d)(n),(0,o.K)(t)}}}function Fe(e){let n,t,r,a,i,c,l,s=e[10]("accountCenter.enableTransactionProtection",{default:o.C.accountCenter.enableTransactionProtection})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.G)(),a=(0,o.j)("span"),i=(0,o.t)(s),(0,o.k)(t,"class","shield svelte-177u10y"),(0,o.k)(a,"class","protect-text svelte-177u10y"),(0,o.k)(n,"class","protect action-container flex items-center pointer svelte-177u10y")},m(s,d){(0,o.b)(s,n,d),(0,o.m)(n,t),t.innerHTML=Q,(0,o.m)(n,r),(0,o.m)(n,a),(0,o.m)(a,i),c||(l=(0,o.p)(n,"click",e[28]),c=!0)},p(e,n){1024&n[0]&&s!==(s=e[10]("accountCenter.enableTransactionProtection",{default:o.C.accountCenter.enableTransactionProtection})+"")&&(0,o.v)(i,s)},d(e){e&&(0,o.d)(n),c=!1,l()}}}function He(e){let n,t,r,a,i,c,l,s,d,u,m,p,v=(e[11]&&e[11].name||"App Name")+"",f=(e[11]&&e[11].description||"This app has not added a description.")+"";r=new o.W({props:{size:32,padding:4,background:"white",border:"black",radius:8,icon:e[11]&&e[11].icon||o.ae}});let g=(e[11].gettingStartedGuide||e[11].explore)&&_e(e);return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),(0,o.F)(r.$$.fragment),a=(0,o.G)(),i=(0,o.j)("div"),c=(0,o.t)(v),l=(0,o.G)(),s=(0,o.j)("div"),d=(0,o.t)(f),u=(0,o.G)(),g&&g.c(),m=(0,o.e)(),(0,o.k)(i,"class","app-name svelte-177u10y"),(0,o.k)(t,"class","relative flex app-icon-name svelte-177u10y"),(0,o.k)(s,"class","app-description svelte-177u10y"),(0,o.k)(n,"class","flex items-start app-info-header svelte-177u10y")},m(e,v){(0,o.b)(e,n,v),(0,o.m)(n,t),(0,o.I)(r,t,null),(0,o.m)(t,a),(0,o.m)(t,i),(0,o.m)(i,c),(0,o.m)(n,l),(0,o.m)(n,s),(0,o.m)(s,d),(0,o.b)(e,u,v),g&&g.m(e,v),(0,o.b)(e,m,v),p=!0},p(e,n){const t={};2048&n[0]&&(t.icon=e[11]&&e[11].icon||o.ae),r.$set(t),(!p||2048&n[0])&&v!==(v=(e[11]&&e[11].name||"App Name")+"")&&(0,o.v)(c,v),(!p||2048&n[0])&&f!==(f=(e[11]&&e[11].description||"This app has not added a description.")+"")&&(0,o.v)(d,f),e[11].gettingStartedGuide||e[11].explore?g?g.p(e,n):(g=_e(e),g.c(),g.m(m.parentNode,m)):g&&(g.d(1),g=null)},i(e){p||((0,o.x)(r.$$.fragment,e),p=!0)},o(e){(0,o.A)(r.$$.fragment,e),p=!1},d(e){e&&(0,o.d)(n),(0,o.K)(r),e&&(0,o.d)(u),g&&g.d(e),e&&(0,o.d)(m)}}}function _e(e){let n,t,r,a,i,c=e[10]("accountCenter.appInfo",{default:o.C.accountCenter.appInfo})+"",l=e[11].gettingStartedGuide&&Le(e),s=e[11].explore&&Me(e);return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.t)(c),a=(0,o.G)(),l&&l.c(),i=(0,o.G)(),s&&s.c(),(0,o.k)(t,"class","app-info-heading svelte-177u10y"),(0,o.k)(n,"class","app-info svelte-177u10y")},m(e,c){(0,o.b)(e,n,c),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),l&&l.m(n,null),(0,o.m)(n,i),s&&s.m(n,null)},p(e,t){1024&t[0]&&c!==(c=e[10]("accountCenter.appInfo",{default:o.C.accountCenter.appInfo})+"")&&(0,o.v)(r,c),e[11].gettingStartedGuide?l?l.p(e,t):(l=Le(e),l.c(),l.m(n,i)):l&&(l.d(1),l=null),e[11].explore?s?s.p(e,t):(s=Me(e),s.c(),s.m(n,null)):s&&(s.d(1),s=null)},d(e){e&&(0,o.d)(n),l&&l.d(),s&&s.d()}}}function Le(e){let n,t,r,a,i,c,l,s=e[10]("accountCenter.learnMore",{default:o.C.accountCenter.learnMore})+"",d=e[10]("accountCenter.gettingStartedGuide",{default:o.C.accountCenter.gettingStartedGuide})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.t)(s),a=(0,o.G)(),i=(0,o.j)("a"),c=(0,o.t)(d),(0,o.k)(i,"href",l=e[11].gettingStartedGuide),(0,o.k)(i,"target","_blank"),(0,o.k)(i,"rel","noreferrer noopener"),(0,o.k)(i,"class","svelte-177u10y"),(0,o.k)(n,"class","flex justify-between items-center w100 svelte-177u10y")},m(e,l){(0,o.b)(e,n,l),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),(0,o.m)(n,i),(0,o.m)(i,c)},p(e,n){1024&n[0]&&s!==(s=e[10]("accountCenter.learnMore",{default:o.C.accountCenter.learnMore})+"")&&(0,o.v)(r,s),1024&n[0]&&d!==(d=e[10]("accountCenter.gettingStartedGuide",{default:o.C.accountCenter.gettingStartedGuide})+"")&&(0,o.v)(c,d),2048&n[0]&&l!==(l=e[11].gettingStartedGuide)&&(0,o.k)(i,"href",l)},d(e){e&&(0,o.d)(n)}}}function Me(e){let n,t,r,a,i,c,l,s=e[10]("accountCenter.smartContracts",{default:o.C.accountCenter.smartContracts})+"",d=e[10]("accountCenter.explore",{default:o.C.accountCenter.explore})+"";return{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.t)(s),a=(0,o.G)(),i=(0,o.j)("a"),c=(0,o.t)(d),(0,o.k)(i,"href",l=e[11].explore),(0,o.k)(i,"target","_blank"),(0,o.k)(i,"rel","noreferrer noopener"),(0,o.k)(i,"class","svelte-177u10y"),(0,o.k)(n,"class","flex justify-between items-center w100 svelte-177u10y")},m(e,l){(0,o.b)(e,n,l),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(n,a),(0,o.m)(n,i),(0,o.m)(i,c)},p(e,n){1024&n[0]&&s!==(s=e[10]("accountCenter.smartContracts",{default:o.C.accountCenter.smartContracts})+"")&&(0,o.v)(r,s),1024&n[0]&&d!==(d=e[10]("accountCenter.explore",{default:o.C.accountCenter.explore})+"")&&(0,o.v)(c,d),2048&n[0]&&l!==(l=e[11].explore)&&(0,o.k)(i,"href",l)},d(e){e&&(0,o.d)(n)}}}function Pe(e){let n,t;return n=new $e({props:{secondaryTokens:e[8]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};256&t[0]&&(o.secondaryTokens=e[8]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Se(e){let n,t,r,a,i=e[2]&&ze(e),c=e[4]&&Ae(e),l=e[0]&&Ge(e);return{c(){i&&i.c(),n=(0,o.G)(),c&&c.c(),t=(0,o.G)(),l&&l.c(),r=(0,o.e)()},m(e,s){i&&i.m(e,s),(0,o.b)(e,n,s),c&&c.m(e,s),(0,o.b)(e,t,s),l&&l.m(e,s),(0,o.b)(e,r,s),a=!0},p(e,a){e[2]?i?(i.p(e,a),4&a[0]&&(0,o.x)(i,1)):(i=ze(e),i.c(),(0,o.x)(i,1),i.m(n.parentNode,n)):i&&((0,o.y)(),(0,o.A)(i,1,1,(()=>{i=null})),(0,o.z)()),e[4]?c?(c.p(e,a),16&a[0]&&(0,o.x)(c,1)):(c=Ae(e),c.c(),(0,o.x)(c,1),c.m(t.parentNode,t)):c&&((0,o.y)(),(0,o.A)(c,1,1,(()=>{c=null})),(0,o.z)()),e[0]?l?(l.p(e,a),1&a[0]&&(0,o.x)(l,1)):(l=Ge(e),l.c(),(0,o.x)(l,1),l.m(r.parentNode,r)):l&&((0,o.y)(),(0,o.A)(l,1,1,(()=>{l=null})),(0,o.z)())},i(e){a||((0,o.x)(i),(0,o.x)(c),(0,o.x)(l),a=!0)},o(e){(0,o.A)(i),(0,o.A)(c),(0,o.A)(l),a=!1},d(e){i&&i.d(e),e&&(0,o.d)(n),c&&c.d(e),e&&(0,o.d)(t),l&&l.d(e),e&&(0,o.d)(r)}}}function Ve(e,n,t){let r,a,i,c,l,s,d,u,m,p;(0,o.c)(e,o.w,(e=>t(1,d=e))),(0,o.c)(e,b._,(e=>t(10,m=e)));let{expanded:v}=n;const f=o.a3.select("accountCenter").pipe((0,g.Z)(o.a3.get().accountCenter),(0,h.t)(1));(0,o.c)(e,f,(e=>t(9,u=e)));const{chains:x}=o.a3.get();let w,y=!1,k=!1;const $=o.a3.select("appMetadata").pipe((0,g.Z)(o.a3.get().appMetadata),(0,h.t)(1));(0,o.c)(e,$,(e=>t(11,p=e)));const{position:C}=o.a3.get().accountCenter,{device:j}=o.af,z=async()=>{try{await(0,o.ag)(r.provider,c,c?.protectedRpcUrl||o.ah),t(4,k=!1)}catch(e){const{code:n}=e;console.log(e,n)}};return e.$$set=e=>{"expanded"in e&&t(0,v=e.expanded)},e.$$.update=()=>{2&e.$$.dirty[0]&&t(19,[r]=d,r),524288&e.$$.dirty[0]&&t(20,[a]=r?r.chains:[],a),524288&e.$$.dirty[0]&&t(8,i=r&&r.accounts.length&&r.accounts[0].secondaryTokens),1048576&e.$$.dirty[0]&&t(5,c=x.find((({id:e,namespace:n})=>!!a&&e===a.id&&n===a.namespace))),1048576&e.$$.dirty[0]&&t(7,l=(0,o.a4)(a&&a.id)),1048576&e.$$.dirty[0]&&t(6,s=a&&"0x1"===a.id)},[v,d,y,w,k,c,s,l,i,u,m,p,f,function(){d.forEach((({label:e})=>(0,o.P)({label:e})))},x,$,C,j,z,r,a,function(n){o.ai.call(this,e,n)},()=>t(2,y=!1),()=>t(4,k=!1),()=>z(),function(e){w=e,t(3,w)},()=>(0,o.aj)(),()=>t(2,y=!0),()=>t(4,k=!0)]}class qe extends o.S{constructor(e){super(),(0,o.i)(this,e,Ve,Se,o.s,{expanded:0},Ce,[-1,-1])}}function De(e){(0,o.a)(e,"svelte-1xsvwqj",".ac-trigger.svelte-1xsvwqj{--background-color:var(\n --account-center-minimized-background,\n var(--w3o-background-color, white)\n );--text-color:var(--w3o-text-color, var(--gray-700));--border-color:var(\n --account-center-border,\n var(--w3o-border-color, var(--onboard-gray-200, var(--gray-200)))\n );--border-radius:var(\n --account-center-border-radius,\n var(--w3o-border-radius, 1rem)\n );cursor:pointer;pointer-events:auto;width:100%;padding:0.5rem;border:1px solid;background:var(--background-color);color:var(--text-color);border-color:var(--border-color);border-radius:var(--border-radius);box-shadow:var(\n --account-center-box-shadow,\n var(--onboard-shadow-3, var(--shadow-3))\n );z-index:var(--account-center-z-index, 1)}.inner-row.svelte-1xsvwqj{display:flex;flex-flow:row nowrap;align-items:center;gap:0.5rem;padding:0 0.25rem}.wallet-info.svelte-1xsvwqj{display:flex;flex:1;flex-flow:column;height:2.5rem;overflow:hidden}.address.svelte-1xsvwqj{font-weight:600;line-height:1.25rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:var(--account-center-minimized-address-color, inherit)}.balance.svelte-1xsvwqj{font-weight:400;line-height:1.25rem;overflow:hidden;white-space:nowrap;text-overflow:ellipsis;opacity:0.6;color:var(--account-center-minimized-balance-color, inherit)}.chain-icon-container.svelte-1xsvwqj{margin-right:4px}.container.svelte-1xsvwqj{border:1px solid transparent;border-radius:16px;padding:1px;transition:border-color 250ms ease-in-out, backround 250ms ease-in-out;max-width:128px;cursor:default}.drop-shadow.svelte-1xsvwqj{filter:drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.2))}")}function Ze(e){let n,t,r,a,i,c=(e[5].length>7?e[5].slice(0,7):e[5])+"";return{c(){n=(0,o.j)("div"),t=(0,o.t)(c),r=(0,o.G)(),a=(0,o.t)(e[2]),(0,o.k)(n,"class","balance svelte-1xsvwqj")},m(e,i){(0,o.b)(e,n,i),(0,o.m)(n,t),(0,o.m)(n,r),(0,o.m)(n,a)},p(e,n){32&n&&c!==(c=(e[5].length>7?e[5].slice(0,7):e[5])+"")&&(0,o.v)(t,c),4&n&&(0,o.v)(a,e[2])},i(e){e&&(i||(0,o.U)((()=>{i=(0,o.V)(n,o.X,{}),i.start()})))},o:o.n,d(e){e&&(0,o.d)(n)}}}function Ee(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g,h,b,x,w,y,k,$,C,j,G,I,T,F,H,_,L=(e[8]?(0,o.D)(e[8]):e[7]?(0,o.D)(e[7]):e[6])+"";i=new o.W({props:{size:32,padding:4,background:"white",border:"darkGreen",radius:8,icon:e[9]&&e[9].icon||o.ae}}),s=new o.W({props:{size:32,padding:4,background:"green",border:"darkGreen",radius:8,icon:e[1]?e[1].icon:""}}),m=new o.R({props:{size:14}});let M=e[5]&&Ze(e);return $=new o.W({props:{size:22,padding:4,background:"custom",color:e[4]?e[4].icon?void 0:"var(--onboard-primary-100, var(--primary-100))":"var(\n --account-center-chain-warning,\n var(--onboard-warning-500, var(--warning-500))\n )",customBackgroundColor:e[4]?e[4].color||e[3]&&e[3].color||o.a6.color:"var(--onboard-warning-200, var(--warning-200))",border:"transparent",radius:25,icon:e[4]?e[4].icon||e[3]&&e[3].icon||o.a6.icon:A}}),j=new S({props:{chains:e[11],colorVar:"--account-center-minimized-network-selector-color",selectIcon:z,parentCSSId:"minimized_ac"}}),{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.j)("div"),a=(0,o.j)("div"),(0,o.F)(i.$$.fragment),c=(0,o.G)(),l=(0,o.j)("div"),(0,o.F)(s.$$.fragment),d=(0,o.G)(),u=(0,o.j)("div"),(0,o.F)(m.$$.fragment),p=(0,o.G)(),v=(0,o.j)("div"),f=(0,o.j)("div"),g=(0,o.t)(L),h=(0,o.G)(),M&&M.c(),b=(0,o.G)(),x=(0,o.j)("div"),w=(0,o.j)("div"),y=(0,o.j)("div"),k=(0,o.j)("div"),(0,o.F)($.$$.fragment),C=(0,o.G)(),(0,o.F)(j.$$.fragment),(0,o.k)(a,"class","drop-shadow svelte-1xsvwqj"),(0,o.T)(l,"margin-left","-0.5rem"),(0,o.k)(l,"class","drop-shadow svelte-1xsvwqj"),(0,o.T)(u,"right","-4px"),(0,o.T)(u,"bottom","-4px"),(0,o.k)(u,"class","drop-shadow absolute svelte-1xsvwqj"),(0,o.k)(r,"class","flex relative"),(0,o.k)(f,"class","address svelte-1xsvwqj"),(0,o.k)(v,"class","wallet-info svelte-1xsvwqj"),(0,o.k)(k,"class","chain-icon-container svelte-1xsvwqj"),(0,o.k)(y,"class","flex items-center"),(0,o.k)(w,"class","container shadow-1 flex items-center svelte-1xsvwqj"),(0,o.k)(w,"style",G=`border-color: var(${e[4]?"--onboard-primary-200, var(--primary-200)":"--onboard-warning-500, var(--warning-500)"}); background-color: var(${e[4]?"--account-center-minimized-chain-select-background, var(--primary-100)":"--account-center-minimized-chain-select-background-warning, var(--warning-100)"})`),(0,o.k)(x,"class","network"),(0,o.k)(t,"class","inner-row svelte-1xsvwqj"),(0,o.k)(n,"class","ac-trigger svelte-1xsvwqj")},m(z,A){(0,o.b)(z,n,A),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.m)(r,a),(0,o.I)(i,a,null),(0,o.m)(r,c),(0,o.m)(r,l),(0,o.I)(s,l,null),(0,o.m)(r,d),(0,o.m)(r,u),(0,o.I)(m,u,null),(0,o.m)(t,p),(0,o.m)(t,v),(0,o.m)(v,f),(0,o.m)(f,g),(0,o.m)(v,h),M&&M.m(v,null),(0,o.m)(t,b),(0,o.m)(t,x),(0,o.m)(x,w),(0,o.m)(w,y),(0,o.m)(y,k),(0,o.I)($,k,null),(0,o.m)(y,C),(0,o.I)(j,y,null),F=!0,H||(_=[(0,o.p)(w,"click",(0,o.J)(e[15])),(0,o.p)(n,"click",(0,o.J)((function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)})))],H=!0)},p(n,[t]){e=n;const r={};512&t&&(r.icon=e[9]&&e[9].icon||o.ae),i.$set(r);const a={};2&t&&(a.icon=e[1]?e[1].icon:""),s.$set(a),(!F||448&t)&&L!==(L=(e[8]?(0,o.D)(e[8]):e[7]?(0,o.D)(e[7]):e[6])+"")&&(0,o.v)(g,L),e[5]?M?(M.p(e,t),32&t&&(0,o.x)(M,1)):(M=Ze(e),M.c(),(0,o.x)(M,1),M.m(v,null)):M&&(M.d(1),M=null);const c={};16&t&&(c.color=e[4]?e[4].icon?void 0:"var(--onboard-primary-100, var(--primary-100))":"var(\n --account-center-chain-warning,\n var(--onboard-warning-500, var(--warning-500))\n )"),24&t&&(c.customBackgroundColor=e[4]?e[4].color||e[3]&&e[3].color||o.a6.color:"var(--onboard-warning-200, var(--warning-200))"),24&t&&(c.icon=e[4]?e[4].icon||e[3]&&e[3].icon||o.a6.icon:A),$.$set(c),(!F||16&t&&G!==(G=`border-color: var(${e[4]?"--onboard-primary-200, var(--primary-200)":"--onboard-warning-500, var(--warning-500)"}); background-color: var(${e[4]?"--account-center-minimized-chain-select-background, var(--primary-100)":"--account-center-minimized-chain-select-background-warning, var(--warning-100)"})`))&&(0,o.k)(w,"style",G)},i(e){F||((0,o.x)(i.$$.fragment,e),(0,o.x)(s.$$.fragment,e),(0,o.x)(m.$$.fragment,e),(0,o.x)(M),(0,o.x)($.$$.fragment,e),(0,o.x)(j.$$.fragment,e),e&&(0,o.U)((()=>{F&&(T&&T.end(1),I=(0,o.V)(n,o.X,{duration:250}),I.start())})),F=!0)},o(e){(0,o.A)(i.$$.fragment,e),(0,o.A)(s.$$.fragment,e),(0,o.A)(m.$$.fragment,e),(0,o.A)($.$$.fragment,e),(0,o.A)(j.$$.fragment,e),I&&I.invalidate(),T=(0,o.ak)(n,o.X,{duration:100}),F=!1},d(e){e&&(0,o.d)(n),(0,o.K)(i),(0,o.K)(s),(0,o.K)(m),M&&M.d(),(0,o.K)($),(0,o.K)(j),e&&T&&T.end(),H=!1,(0,o.L)(_)}}}function Ke(e,n,t){let r,a,i,c,l,s,d,u,m,p,v,f;(0,o.c)(e,o.w,(e=>t(14,v=e)));let{toggle:b}=n;const x=o.a3.select("appMetadata").pipe((0,g.Z)(o.a3.get().appMetadata),(0,h.t)(1));(0,o.c)(e,x,(e=>t(9,f=e)));const w=o.a3.get().chains;return e.$$set=e=>{"toggle"in e&&t(0,b=e.toggle)},e.$$.update=()=>{16384&e.$$.dirty&&t(1,[r]=v,r),2&e.$$.dirty&&t(13,[a]=r?r.accounts:[],a),8192&e.$$.dirty&&t(8,i=a&&a.ens&&(0,o.D)(a.ens.name)),8192&e.$$.dirty&&t(7,c=a&&a.uns&&(0,o.D)(a.uns.name)),8192&e.$$.dirty&&t(6,l=a?(0,o.E)(a.address):""),8192&e.$$.dirty&&t(2,[s]=a&&a.balance?Object.keys(a.balance):[],s),8196&e.$$.dirty&&t(5,d=a&&a.balance?a.balance[s]:null),2&e.$$.dirty&&t(12,u=r&&r.chains[0]),4096&e.$$.dirty&&t(4,m=w.find((({id:e,namespace:n})=>!!u&&e===u.id&&n===u.namespace))),4096&e.$$.dirty&&t(3,p=(0,o.a4)(u&&u.id))},[b,r,s,p,m,d,l,c,i,f,x,w,u,a,v,function(n){o.ai.call(this,e,n)}]}class Be extends o.S{constructor(e){super(),(0,o.i)(this,e,Ke,Ee,o.s,{toggle:0},De)}}function We(e){(0,o.a)(e,"svelte-1o9vinu",".ac-trigger.svelte-1o9vinu{--background-color:var(\n --account-center-minimized-background,\n var(--w3o-background-color, white)\n );--text-color:var(--w3o-text-color, var(--gray-700));--border-color:var(\n --account-center-border,\n var(--w3o-border-color, var(--onboard-gray-200, var(--gray-200)))\n );--border-radius:var(\n --account-center-border-radius,\n var(--w3o-border-radius, 1rem)\n );position:relative;cursor:pointer;pointer-events:auto;min-width:80px;background:var(--background-color);color:var(--text-color);border:1px solid var(--border-color);border-radius:var(--border-radius);box-shadow:var(\n --account-center-box-shadow,\n var(--onboard-shadow-3, var(--shadow-3))\n );z-index:var(--account-center-z-index, 1)}.wallet-square-wrapper.svelte-1o9vinu{position:relative;margin-left:-8px}.check-icon-wrapper.svelte-1o9vinu{position:absolute;right:-4px;bottom:-4px}.inner-row.svelte-1o9vinu{display:flex;flex-flow:row nowrap;width:80px;padding:0.75rem}.drop-shadow.svelte-1o9vinu{filter:drop-shadow(0px 1px 4px rgba(0, 0, 0, 0.2))}")}function Ne(e){let n,t,r,a,i,c,l,s,d,u,m,p,v,f,g;return a=new o.W({props:{size:32,padding:4,background:"white",border:"darkGreen",radius:8,icon:e[3]&&e[3].icon||o.ae}}),s=new o.W({props:{size:32,padding:4,background:"green",border:"darkGreen",radius:8,icon:e[1]?e[1].icon:""}}),m=new o.R({props:{size:14}}),{c(){n=(0,o.j)("div"),t=(0,o.j)("div"),r=(0,o.j)("div"),(0,o.F)(a.$$.fragment),i=(0,o.G)(),c=(0,o.j)("div"),l=(0,o.j)("div"),(0,o.F)(s.$$.fragment),d=(0,o.G)(),u=(0,o.j)("div"),(0,o.F)(m.$$.fragment),(0,o.k)(r,"class","drop-shadow svelte-1o9vinu"),(0,o.k)(l,"class","drop-shadow svelte-1o9vinu"),(0,o.k)(u,"class","check-icon-wrapper drop-shadow svelte-1o9vinu"),(0,o.k)(c,"class","wallet-square-wrapper svelte-1o9vinu"),(0,o.k)(t,"class","inner-row svelte-1o9vinu"),(0,o.k)(n,"class","ac-trigger svelte-1o9vinu"),(0,o.k)(n,"style",p=e[2].position.includes("Left")?"align-self: flex-start":null)},m(p,h){(0,o.b)(p,n,h),(0,o.m)(n,t),(0,o.m)(t,r),(0,o.I)(a,r,null),(0,o.m)(t,i),(0,o.m)(t,c),(0,o.m)(c,l),(0,o.I)(s,l,null),(0,o.m)(c,d),(0,o.m)(c,u),(0,o.I)(m,u,null),v=!0,f||(g=(0,o.p)(n,"click",(0,o.J)((function(){(0,o.Z)(e[0])&&e[0].apply(this,arguments)}))),f=!0)},p(t,[r]){e=t;const i={};8&r&&(i.icon=e[3]&&e[3].icon||o.ae),a.$set(i);const c={};2&r&&(c.icon=e[1]?e[1].icon:""),s.$set(c),(!v||4&r&&p!==(p=e[2].position.includes("Left")?"align-self: flex-start":null))&&(0,o.k)(n,"style",p)},i(e){v||((0,o.x)(a.$$.fragment,e),(0,o.x)(s.$$.fragment,e),(0,o.x)(m.$$.fragment,e),v=!0)},o(e){(0,o.A)(a.$$.fragment,e),(0,o.A)(s.$$.fragment,e),(0,o.A)(m.$$.fragment,e),v=!1},d(e){e&&(0,o.d)(n),(0,o.K)(a),(0,o.K)(s),(0,o.K)(m),f=!1,g()}}}function Ue(e,n,t){let r,a,i,c;(0,o.c)(e,o.w,(e=>t(6,a=e)));let{toggle:l}=n;const s=o.a3.select("appMetadata").pipe((0,g.Z)(o.a3.get().appMetadata),(0,h.t)(1));(0,o.c)(e,s,(e=>t(3,c=e)));const d=o.a3.select("accountCenter").pipe((0,g.Z)(o.a3.get().accountCenter),(0,h.t)(1));return(0,o.c)(e,d,(e=>t(2,i=e))),e.$$set=e=>{"toggle"in e&&t(0,l=e.toggle)},e.$$.update=()=>{64&e.$$.dirty&&t(1,[r]=a,r)},[l,r,i,c,s,d,a]}class Re extends o.S{constructor(e){super(),(0,o.i)(this,e,Ue,Ne,o.s,{toggle:0},We)}}function Oe(e){(0,o.a)(e,"svelte-1nua59o",".ac-container.svelte-1nua59o{display:flex;flex-flow:column;align-items:flex-end;gap:0.5rem}")}function Je(e){let n,t;return n=new qe({props:{expanded:e[0]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};1&t&&(o.expanded=e[0]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Xe(e){let n,t;return n=new Be({props:{toggle:e[4]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p:o.n,i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Ye(e){let n,t;return n=new Re({props:{toggle:e[4]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p:o.n,i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function Qe(e){let n,t;return n=new qe({props:{expanded:e[0]}}),{c(){(0,o.F)(n.$$.fragment)},m(e,r){(0,o.I)(n,e,r),t=!0},p(e,t){const o={};1&t&&(o.expanded=e[0]),n.$set(o)},i(e){t||((0,o.x)(n.$$.fragment,e),t=!0)},o(e){(0,o.A)(n.$$.fragment,e),t=!1},d(e){(0,o.K)(n,e)}}}function en(e){let n,t,r,a,i,c,l,s,d=e[1].position.includes("bottom"),u=e[1].position.includes("top"),m=d&&Je(e);const p=[Ye,Xe],v=[];function f(e,n){return e[1].minimal?0:1}r=f(e),a=v[r]=p[r](e);let g=u&&Qe(e);return{c(){n=(0,o.j)("div"),m&&m.c(),t=(0,o.G)(),a.c(),i=(0,o.G)(),g&&g.c(),(0,o.k)(n,"class","ac-container svelte-1nua59o")},m(a,d){(0,o.b)(a,n,d),m&&m.m(n,null),(0,o.m)(n,t),v[r].m(n,null),(0,o.m)(n,i),g&&g.m(n,null),c=!0,l||(s=(0,o.p)(window,"click",e[3]),l=!0)},p(e,[c]){2&c&&(d=e[1].position.includes("bottom")),d?m?(m.p(e,c),2&c&&(0,o.x)(m,1)):(m=Je(e),m.c(),(0,o.x)(m,1),m.m(n,t)):m&&((0,o.y)(),(0,o.A)(m,1,1,(()=>{m=null})),(0,o.z)());let l=r;r=f(e),r===l?v[r].p(e,c):((0,o.y)(),(0,o.A)(v[l],1,1,(()=>{v[l]=null})),(0,o.z)(),a=v[r],a?a.p(e,c):(a=v[r]=p[r](e),a.c()),(0,o.x)(a,1),a.m(n,i)),2&c&&(u=e[1].position.includes("top")),u?g?(g.p(e,c),2&c&&(0,o.x)(g,1)):(g=Qe(e),g.c(),(0,o.x)(g,1),g.m(n,null)):g&&((0,o.y)(),(0,o.A)(g,1,1,(()=>{g=null})),(0,o.z)())},i(e){c||((0,o.x)(m),(0,o.x)(a),(0,o.x)(g),c=!0)},o(e){(0,o.A)(m),(0,o.A)(a),(0,o.A)(g),c=!1},d(e){e&&(0,o.d)(n),m&&m.d(),v[r].d(),g&&g.d(),l=!1,s()}}}function nn(e,n,t){let r,a=!1;const i=o.a3.select("accountCenter").pipe((0,g.Z)(o.a3.get().accountCenter),(0,h.t)(1));function c(){r.expanded&&((0,o.am)({expanded:!1}),t(0,a=!1))}return(0,o.c)(e,i,(e=>t(1,r=e))),(0,o.al)(c),[a,r,i,c,function(){(0,o.am)({expanded:!r.expanded}),t(0,a=!a)}]}class tn extends o.S{constructor(e){super(),(0,o.i)(this,e,nn,en,o.s,{},Oe)}}}}]);
\ No newline at end of file
diff --git a/gateway/dist/index.html b/gateway/dist/index.html
index a428de8..2694ffa 100644
--- a/gateway/dist/index.html
+++ b/gateway/dist/index.html
@@ -7,7 +7,7 @@
-
+
diff --git a/gateway/dist/main.9a8feb49fef53c955bcf.bundle.js b/gateway/dist/main.9a8feb49fef53c955bcf.bundle.js
new file mode 100644
index 0000000..1c6c9f9
--- /dev/null
+++ b/gateway/dist/main.9a8feb49fef53c955bcf.bundle.js
@@ -0,0 +1,8 @@
+/*! For license information please see main.9a8feb49fef53c955bcf.bundle.js.LICENSE.txt */
+(self.webpackChunkbos_workspace_gateway=self.webpackChunkbos_workspace_gateway||[]).push([[8792],{63280:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n="abi/5.7.0"},84861:(e,t,r)=>{"use strict";r.d(t,{y:()=>R,D:()=>N});var n=r(38905),o=r(88943),i=r(7720),a=r(63280),s=r(55242),l=r(58908);class c extends s.Ue{constructor(e){super("address","address",e,!1)}defaultValue(){return"0x0000000000000000000000000000000000000000"}encode(e,t){try{t=(0,l.bv)(t)}catch(e){this._throwError(e.message,t)}return e.writeValue(t)}decode(e){return(0,l.bv)((0,n.bj)(e.readValue().toHexString(),20))}}class u extends s.Ue{constructor(e){super(e.name,e.type,void 0,e.dynamic),this.coder=e}defaultValue(){return this.coder.defaultValue()}encode(e,t){return this.coder.encode(e,t)}decode(e){return this.coder.decode(e)}}const d=new i.Vy(a.r);function f(e,t,r){let n=null;if(Array.isArray(r))n=r;else if(r&&"object"==typeof r){let e={};n=t.map((t=>{const n=t.localName;return n||d.throwError("cannot encode object for signature with missing names",i.Vy.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]&&d.throwError("cannot encode object for signature with duplicate names",i.Vy.errors.INVALID_ARGUMENT,{argument:"values",coder:t,value:r}),e[n]=!0,r[n]}))}else d.throwArgumentError("invalid tuple value","tuple",r);t.length!==n.length&&d.throwArgumentError("types/value length mismatch","tuple",r);let o=new s.AU(e.wordSize),a=new s.AU(e.wordSize),l=[];t.forEach(((e,t)=>{let r=n[t];if(e.dynamic){let t=a.length;e.encode(a,r);let n=o.writeUpdatableValue();l.push((e=>{n(e+t)}))}else e.encode(o,r)})),l.forEach((e=>{e(o.length)}));let c=e.appendWriter(o);return c+=e.appendWriter(a),c}function p(e,t){let r=[],n=e.subReader(0);t.forEach((t=>{let o=null;if(t.dynamic){let r=e.readValue(),a=n.subReader(r.toNumber());try{o=t.decode(a)}catch(e){if(e.code===i.Vy.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}}else try{o=t.decode(e)}catch(e){if(e.code===i.Vy.errors.BUFFER_OVERRUN)throw e;o=e,o.baseType=t.name,o.name=t.localName,o.type=t.type}null!=o&&r.push(o)}));const o=t.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});t.forEach(((e,t)=>{let n=e.localName;if(!n||1!==o[n])return;if("length"===n&&(n="_length"),null!=r[n])return;const i=r[t];i instanceof Error?Object.defineProperty(r,n,{enumerable:!0,get:()=>{throw i}}):r[n]=i}));for(let e=0;e{throw t}})}return Object.freeze(r)}class h extends s.Ue{constructor(e,t,r){super("array",e.type+"["+(t>=0?t:"")+"]",r,-1===t||e.dynamic),this.coder=e,this.length=t}defaultValue(){const e=this.coder.defaultValue(),t=[];for(let r=0;re._data.length&&d.throwError("insufficient data length",i.Vy.errors.BUFFER_OVERRUN,{length:e._data.length,count:t}));let r=[];for(let e=0;e{e.dynamic&&(r=!0),n.push(e.type)})),super("tuple","tuple("+n.join(",")+")",t,r),this.coders=e}defaultValue(){const e=[];this.coders.forEach((t=>{e.push(t.defaultValue())}));const t=this.coders.reduce(((e,t)=>{const r=t.localName;return r&&(e[r]||(e[r]=0),e[r]++),e}),{});return this.coders.forEach(((r,n)=>{let o=r.localName;o&&1===t[o]&&("length"===o&&(o="_length"),null==e[o]&&(e[o]=e[n]))})),Object.freeze(e)}encode(e,t){return f(e,this.coders,t)}decode(e){return e.coerce(this.name,p(e,this.coders))}}var T=r(27814);const C=new i.Vy(a.r),k=new RegExp(/^bytes([0-9]*)$/),O=new RegExp(/^(u?int)([0-9]*)$/);class R{constructor(e){(0,o.yY)(this,"coerceFunc",e||null)}_getCoder(e){switch(e.baseType){case"address":return new c(e.name);case"bool":return new m(e.name);case"string":return new x(e.name);case"bytes":return new b(e.name);case"array":return new h(this._getCoder(e.arrayChildren),e.arrayLength,e.name);case"tuple":return new A((e.components||[]).map((e=>this._getCoder(e))),e.name);case"":return new y(e.name)}let t=e.type.match(O);if(t){let r=parseInt(t[2]||"256");return(0===r||r>256||r%8!=0)&&C.throwArgumentError("invalid "+t[1]+" bit length","param",e),new _(r/8,"int"===t[1],e.name)}if(t=e.type.match(k),t){let r=parseInt(t[1]);return(0===r||r>32)&&C.throwArgumentError("invalid bytes length","param",e),new v(r,e.name)}return C.throwArgumentError("invalid type","type",e.type)}_getWordSize(){return 32}_getReader(e,t){return new s.mP(e,this._getWordSize(),this.coerceFunc,t)}_getWriter(){return new s.AU(this._getWordSize())}getDefaultValue(e){const t=e.map((e=>this._getCoder(T.aX.from(e))));return new A(t,"_").defaultValue()}encode(e,t){e.length!==t.length&&C.throwError("types/values length mismatch",i.Vy.errors.INVALID_ARGUMENT,{count:{types:e.length,values:t.length},value:{types:e,values:t}});const r=e.map((e=>this._getCoder(T.aX.from(e)))),n=new A(r,"_"),o=this._getWriter();return n.encode(o,t),o.data}decode(e,t,r){const o=e.map((e=>this._getCoder(T.aX.from(e))));return new A(o,"_").decode(this._getReader((0,n.k9)(t),r))}}const N=new R},55242:(e,t,r)=>{"use strict";r.d(t,{$v:()=>c,AU:()=>d,Ue:()=>u,mP:()=>f});var n=r(38905),o=r(37457),i=r(88943),a=r(7720),s=r(63280);const l=new a.Vy(s.r);function c(e){const t=[],r=function(e,n){if(Array.isArray(n))for(let o in n){const i=e.slice();i.push(o);try{r(i,n[o])}catch(e){t.push({path:i,error:e})}}};return r([],e),t}class u{constructor(e,t,r,n){this.name=e,this.type=t,this.localName=r,this.dynamic=n}_throwError(e,t){l.throwArgumentError(e,this.localName,t)}}class d{constructor(e){(0,i.yY)(this,"wordSize",e||32),this._data=[],this._dataLength=0,this._padding=new Uint8Array(e)}get data(){return(0,n.qn)(this._data)}get length(){return this._dataLength}_writeData(e){return this._data.push(e),this._dataLength+=e.length,e.length}appendWriter(e){return this._writeData((0,n.xW)(e._data))}writeBytes(e){let t=(0,n.k9)(e);const r=t.length%this.wordSize;return r&&(t=(0,n.xW)([t,this._padding.slice(r)])),this._writeData(t)}_getValue(e){let t=(0,n.k9)(o.gH.from(e));return t.length>this.wordSize&&l.throwError("value out-of-bounds",a.Vy.errors.BUFFER_OVERRUN,{length:this.wordSize,offset:t.length}),t.length%this.wordSize&&(t=(0,n.xW)([this._padding.slice(t.length%this.wordSize),t])),t}writeValue(e){return this._writeData(this._getValue(e))}writeUpdatableValue(){const e=this._data.length;return this._data.push(this._padding),this._dataLength+=this.wordSize,t=>{this._data[e]=this._getValue(t)}}}class f{constructor(e,t,r,o){(0,i.yY)(this,"_data",(0,n.k9)(e)),(0,i.yY)(this,"wordSize",t||32),(0,i.yY)(this,"_coerceFunc",r),(0,i.yY)(this,"allowLoose",o),this._offset=0}get data(){return(0,n.c$)(this._data)}get consumed(){return this._offset}static coerce(e,t){let r=e.match("^u?int([0-9]+)$");return r&&parseInt(r[1])<=48&&(t=t.toNumber()),t}coerce(e,t){return this._coerceFunc?this._coerceFunc(e,t):f.coerce(e,t)}_peekBytes(e,t,r){let n=Math.ceil(t/this.wordSize)*this.wordSize;return this._offset+n>this._data.length&&(this.allowLoose&&r&&this._offset+t<=this._data.length?n=t:l.throwError("data out-of-bounds",a.Vy.errors.BUFFER_OVERRUN,{length:this._data.length,offset:this._offset+n})),this._data.slice(this._offset,this._offset+n)}subReader(e){return new f(this._data.slice(this._offset+e),this.wordSize,this._coerceFunc,this.allowLoose)}readBytes(e,t){let r=this._peekBytes(0,e,!!t);return this._offset+=r.length,r.slice(0,e)}readValue(){return o.gH.from(this.readBytes(this.wordSize))}}},27814:(e,t,r)=>{"use strict";r.d(t,{$o:()=>p,FK:()=>b,Pw:()=>_,Zp:()=>v,aX:()=>m,bp:()=>A,hc:()=>S});var n=r(37457),o=r(88943),i=r(7720),a=r(63280);const s=new i.Vy(a.r),l={};let c={calldata:!0,memory:!0,storage:!0},u={calldata:!0,memory:!0};function d(e,t){if("bytes"===e||"string"===e){if(c[t])return!0}else if("address"===e){if("payable"===t)return!0}else if((e.indexOf("[")>=0||"tuple"===e)&&u[t])return!0;return(c[t]||"payable"===t)&&s.throwArgumentError("invalid modifier","name",t),!1}function f(e,t){for(let r in t)(0,o.yY)(e,r,t[r])}const p=Object.freeze({sighash:"sighash",minimal:"minimal",full:"full",json:"json"}),h=new RegExp(/^(.*)\[([0-9]*)\]$/);class m{constructor(e,t){e!==l&&s.throwError("use fromString",i.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new ParamType()"}),f(this,t);let r=this.type.match(h);f(this,r?{arrayLength:parseInt(r[2]||"-1"),arrayChildren:m.fromObject({type:r[1],components:this.components}),baseType:"array"}:{arrayLength:null,arrayChildren:null,baseType:null!=this.components?"tuple":this.type}),this._isParamType=!0,Object.freeze(this)}format(e){if(e||(e=p.sighash),p[e]||s.throwArgumentError("invalid format type","format",e),e===p.json){let t={type:"tuple"===this.baseType?"tuple":this.type,name:this.name||void 0};return"boolean"==typeof this.indexed&&(t.indexed=this.indexed),this.components&&(t.components=this.components.map((t=>JSON.parse(t.format(e))))),JSON.stringify(t)}let t="";return"array"===this.baseType?(t+=this.arrayChildren.format(e),t+="["+(this.arrayLength<0?"":String(this.arrayLength))+"]"):"tuple"===this.baseType?(e!==p.sighash&&(t+=this.type),t+="("+this.components.map((t=>t.format(e))).join(e===p.full?", ":",")+")"):t+=this.type,e!==p.sighash&&(!0===this.indexed&&(t+=" indexed"),e===p.full&&this.name&&(t+=" "+this.name)),t}static from(e,t){return"string"==typeof e?m.fromString(e,t):m.fromObject(e)}static fromObject(e){return m.isParamType(e)?e:new m(l,{name:e.name||null,type:T(e.type),indexed:null==e.indexed?null:!!e.indexed,components:e.components?e.components.map(m.fromObject):null})}static fromString(e,t){return r=function(e,t){let r=e;function n(t){s.throwArgumentError(`unexpected character at position ${t}`,"param",e)}function o(e){let r={type:"",name:"",parent:e,state:{allowType:!0}};return t&&(r.indexed=!1),r}e=e.replace(/\s/g," ");let i={type:"",name:"",state:{allowType:!0}},a=i;for(let r=0;rm.fromString(e,t)))}class b{constructor(e,t){e!==l&&s.throwError("use a static from method",i.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new Fragment()"}),f(this,t),this._isFragment=!0,Object.freeze(this)}static from(e){return b.isFragment(e)?e:"string"==typeof e?b.fromString(e):b.fromObject(e)}static fromObject(e){if(b.isFragment(e))return e;switch(e.type){case"function":return S.fromObject(e);case"event":return v.fromObject(e);case"constructor":return _.fromObject(e);case"error":return A.fromObject(e);case"fallback":case"receive":return null}return s.throwArgumentError("invalid fragment object","value",e)}static fromString(e){return"event"===(e=(e=(e=e.replace(/\s/g," ")).replace(/\(/g," (").replace(/\)/g,") ").replace(/\s+/g," ")).trim()).split(" ")[0]?v.fromString(e.substring(5).trim()):"function"===e.split(" ")[0]?S.fromString(e.substring(8).trim()):"constructor"===e.split("(")[0].trim()?_.fromString(e.trim()):"error"===e.split(" ")[0]?A.fromString(e.substring(5).trim()):s.throwArgumentError("unsupported fragment","value",e)}static isFragment(e){return!(!e||!e._isFragment)}}class v extends b{format(e){if(e||(e=p.sighash),p[e]||s.throwArgumentError("invalid format type","format",e),e===p.json)return JSON.stringify({type:"event",anonymous:this.anonymous,name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==p.sighash&&(t+="event "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===p.full?", ":",")+") ",e!==p.sighash&&this.anonymous&&(t+="anonymous "),t.trim()}static from(e){return"string"==typeof e?v.fromString(e):v.fromObject(e)}static fromObject(e){if(v.isEventFragment(e))return e;"event"!==e.type&&s.throwArgumentError("invalid event object","value",e);const t={name:k(e.name),anonymous:e.anonymous,inputs:e.inputs?e.inputs.map(m.fromObject):[],type:"event"};return new v(l,t)}static fromString(e){let t=e.match(O);t||s.throwArgumentError("invalid event string","value",e);let r=!1;return t[3].split(" ").forEach((e=>{switch(e.trim()){case"anonymous":r=!0;break;case"":break;default:s.warn("unknown modifier: "+e)}})),v.fromObject({name:t[1].trim(),anonymous:r,inputs:g(t[2],!0),type:"event"})}static isEventFragment(e){return e&&e._isFragment&&"event"===e.type}}function y(e,t){t.gas=null;let r=e.split("@");return 1!==r.length?(r.length>2&&s.throwArgumentError("invalid human-readable ABI signature","value",e),r[1].match(/^[0-9]+$/)||s.throwArgumentError("invalid human-readable ABI signature gas","value",e),t.gas=n.gH.from(r[1]),r[0]):e}function w(e,t){t.constant=!1,t.payable=!1,t.stateMutability="nonpayable",e.split(" ").forEach((e=>{switch(e.trim()){case"constant":t.constant=!0;break;case"payable":t.payable=!0,t.stateMutability="payable";break;case"nonpayable":t.payable=!1,t.stateMutability="nonpayable";break;case"pure":t.constant=!0,t.stateMutability="pure";break;case"view":t.constant=!0,t.stateMutability="view";break;case"external":case"public":case"":break;default:console.log("unknown modifier: "+e)}}))}function E(e){let t={constant:!1,payable:!0,stateMutability:"payable"};return null!=e.stateMutability?(t.stateMutability=e.stateMutability,t.constant="view"===t.stateMutability||"pure"===t.stateMutability,null!=e.constant&&!!e.constant!==t.constant&&s.throwArgumentError("cannot have constant function with mutability "+t.stateMutability,"value",e),t.payable="payable"===t.stateMutability,null!=e.payable&&!!e.payable!==t.payable&&s.throwArgumentError("cannot have payable function with mutability "+t.stateMutability,"value",e)):null!=e.payable?(t.payable=!!e.payable,null!=e.constant||t.payable||"constructor"===e.type||s.throwArgumentError("unable to determine stateMutability","value",e),t.constant=!!e.constant,t.constant?t.stateMutability="view":t.stateMutability=t.payable?"payable":"nonpayable",t.payable&&t.constant&&s.throwArgumentError("cannot have constant payable function","value",e)):null!=e.constant?(t.constant=!!e.constant,t.payable=!t.constant,t.stateMutability=t.constant?"view":"payable"):"constructor"!==e.type&&s.throwArgumentError("unable to determine stateMutability","value",e),t}class _ extends b{format(e){if(e||(e=p.sighash),p[e]||s.throwArgumentError("invalid format type","format",e),e===p.json)return JSON.stringify({type:"constructor",stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});e===p.sighash&&s.throwError("cannot format a constructor for sighash",i.Vy.errors.UNSUPPORTED_OPERATION,{operation:"format(sighash)"});let t="constructor("+this.inputs.map((t=>t.format(e))).join(e===p.full?", ":",")+") ";return this.stateMutability&&"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "),t.trim()}static from(e){return"string"==typeof e?_.fromString(e):_.fromObject(e)}static fromObject(e){if(_.isConstructorFragment(e))return e;"constructor"!==e.type&&s.throwArgumentError("invalid constructor object","value",e);let t=E(e);t.constant&&s.throwArgumentError("constructor cannot be constant","value",e);const r={name:null,type:e.type,inputs:e.inputs?e.inputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.gH.from(e.gas):null};return new _(l,r)}static fromString(e){let t={type:"constructor"},r=(e=y(e,t)).match(O);return r&&"constructor"===r[1].trim()||s.throwArgumentError("invalid constructor string","value",e),t.inputs=g(r[2].trim(),!1),w(r[3].trim(),t),_.fromObject(t)}static isConstructorFragment(e){return e&&e._isFragment&&"constructor"===e.type}}class S extends _{format(e){if(e||(e=p.sighash),p[e]||s.throwArgumentError("invalid format type","format",e),e===p.json)return JSON.stringify({type:"function",name:this.name,constant:this.constant,stateMutability:"nonpayable"!==this.stateMutability?this.stateMutability:void 0,payable:this.payable,gas:this.gas?this.gas.toNumber():void 0,inputs:this.inputs.map((t=>JSON.parse(t.format(e)))),outputs:this.outputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==p.sighash&&(t+="function "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===p.full?", ":",")+") ",e!==p.sighash&&(this.stateMutability?"nonpayable"!==this.stateMutability&&(t+=this.stateMutability+" "):this.constant&&(t+="view "),this.outputs&&this.outputs.length&&(t+="returns ("+this.outputs.map((t=>t.format(e))).join(", ")+") "),null!=this.gas&&(t+="@"+this.gas.toString()+" ")),t.trim()}static from(e){return"string"==typeof e?S.fromString(e):S.fromObject(e)}static fromObject(e){if(S.isFunctionFragment(e))return e;"function"!==e.type&&s.throwArgumentError("invalid function object","value",e);let t=E(e);const r={type:e.type,name:k(e.name),constant:t.constant,inputs:e.inputs?e.inputs.map(m.fromObject):[],outputs:e.outputs?e.outputs.map(m.fromObject):[],payable:t.payable,stateMutability:t.stateMutability,gas:e.gas?n.gH.from(e.gas):null};return new S(l,r)}static fromString(e){let t={type:"function"},r=(e=y(e,t)).split(" returns ");r.length>2&&s.throwArgumentError("invalid function string","value",e);let n=r[0].match(O);if(n||s.throwArgumentError("invalid function signature","value",e),t.name=n[1].trim(),t.name&&k(t.name),t.inputs=g(n[2],!1),w(n[3].trim(),t),r.length>1){let n=r[1].match(O);""==n[1].trim()&&""==n[3].trim()||s.throwArgumentError("unexpected tokens","value",e),t.outputs=g(n[2],!1)}else t.outputs=[];return S.fromObject(t)}static isFunctionFragment(e){return e&&e._isFragment&&"function"===e.type}}function x(e){const t=e.format();return"Error(string)"!==t&&"Panic(uint256)"!==t||s.throwArgumentError(`cannot specify user defined ${t} error`,"fragment",e),e}class A extends b{format(e){if(e||(e=p.sighash),p[e]||s.throwArgumentError("invalid format type","format",e),e===p.json)return JSON.stringify({type:"error",name:this.name,inputs:this.inputs.map((t=>JSON.parse(t.format(e))))});let t="";return e!==p.sighash&&(t+="error "),t+=this.name+"("+this.inputs.map((t=>t.format(e))).join(e===p.full?", ":",")+") ",t.trim()}static from(e){return"string"==typeof e?A.fromString(e):A.fromObject(e)}static fromObject(e){if(A.isErrorFragment(e))return e;"error"!==e.type&&s.throwArgumentError("invalid error object","value",e);const t={type:e.type,name:k(e.name),inputs:e.inputs?e.inputs.map(m.fromObject):[]};return x(new A(l,t))}static fromString(e){let t={type:"error"},r=e.match(O);return r||s.throwArgumentError("invalid error signature","value",e),t.name=r[1].trim(),t.name&&k(t.name),t.inputs=g(r[2],!1),x(A.fromObject(t))}static isErrorFragment(e){return e&&e._isFragment&&"error"===e.type}}function T(e){return e.match(/^uint($|[^1-9])/)?e="uint256"+e.substring(4):e.match(/^int($|[^1-9])/)&&(e="int256"+e.substring(3)),e}const C=new RegExp("^[a-zA-Z$_][a-zA-Z0-9$_]*$");function k(e){return e&&e.match(C)||s.throwArgumentError(`invalid identifier "${e}"`,"value",e),e}const O=new RegExp("^([^)(]*)\\((.*)\\)([^)(]*)$")},33020:(e,t,r)=>{"use strict";r.d(t,{FW:()=>h,KA:()=>w,dJ:()=>m,wu:()=>b});var n=r(58908),o=r(37457),i=r(38905),a=r(8392),s=r(50234),l=r(88943),c=r(84861),u=r(27814),d=r(7720),f=r(63280);const p=new d.Vy(f.r);class h extends l.VY{}class m extends l.VY{}class g extends l.VY{}class b extends l.VY{static isIndexed(e){return!(!e||!e._isIndexed)}}const v={"0x08c379a0":{signature:"Error(string)",name:"Error",inputs:["string"],reason:!0},"0x4e487b71":{signature:"Panic(uint256)",name:"Panic",inputs:["uint256"]}};function y(e,t){const r=new Error(`deferred error during ABI decoding triggered accessing ${e}`);return r.error=t,r}class w{constructor(e){let t=[];t="string"==typeof e?JSON.parse(e):e,(0,l.yY)(this,"fragments",t.map((e=>u.FK.from(e))).filter((e=>null!=e))),(0,l.yY)(this,"_abiCoder",(0,l.$J)(new.target,"getAbiCoder")()),(0,l.yY)(this,"functions",{}),(0,l.yY)(this,"errors",{}),(0,l.yY)(this,"events",{}),(0,l.yY)(this,"structs",{}),this.fragments.forEach((e=>{let t=null;switch(e.type){case"constructor":return this.deploy?void p.warn("duplicate definition - constructor"):void(0,l.yY)(this,"deploy",e);case"function":t=this.functions;break;case"event":t=this.events;break;case"error":t=this.errors;break;default:return}let r=e.format();t[r]?p.warn("duplicate definition - "+r):t[r]=e})),this.deploy||(0,l.yY)(this,"deploy",u.Pw.from({payable:!1,type:"constructor"})),(0,l.yY)(this,"_isInterface",!0)}format(e){e||(e=u.$o.full),e===u.$o.sighash&&p.throwArgumentError("interface does not support formatting sighash","format",e);const t=this.fragments.map((t=>t.format(e)));return e===u.$o.json?JSON.stringify(t.map((e=>JSON.parse(e)))):t}static getAbiCoder(){return c.D}static getAddress(e){return(0,n.bv)(e)}static getSighash(e){return(0,i.Ab)((0,a.id)(e.format()),0,4)}static getEventTopic(e){return(0,a.id)(e.format())}getFunction(e){if((0,i.Lo)(e)){for(const t in this.functions)if(e===this.getSighash(t))return this.functions[t];p.throwArgumentError("no matching function","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.functions).filter((e=>e.split("(")[0]===t));return 0===r.length?p.throwArgumentError("no matching function","name",t):r.length>1&&p.throwArgumentError("multiple matching functions","name",t),this.functions[r[0]]}const t=this.functions[u.hc.fromString(e).format()];return t||p.throwArgumentError("no matching function","signature",e),t}getEvent(e){if((0,i.Lo)(e)){const t=e.toLowerCase();for(const e in this.events)if(t===this.getEventTopic(e))return this.events[e];p.throwArgumentError("no matching event","topichash",t)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.events).filter((e=>e.split("(")[0]===t));return 0===r.length?p.throwArgumentError("no matching event","name",t):r.length>1&&p.throwArgumentError("multiple matching events","name",t),this.events[r[0]]}const t=this.events[u.Zp.fromString(e).format()];return t||p.throwArgumentError("no matching event","signature",e),t}getError(e){if((0,i.Lo)(e)){const t=(0,l.$J)(this.constructor,"getSighash");for(const r in this.errors)if(e===t(this.errors[r]))return this.errors[r];p.throwArgumentError("no matching error","sighash",e)}if(-1===e.indexOf("(")){const t=e.trim(),r=Object.keys(this.errors).filter((e=>e.split("(")[0]===t));return 0===r.length?p.throwArgumentError("no matching error","name",t):r.length>1&&p.throwArgumentError("multiple matching errors","name",t),this.errors[r[0]]}const t=this.errors[u.hc.fromString(e).format()];return t||p.throwArgumentError("no matching error","signature",e),t}getSighash(e){if("string"==typeof e)try{e=this.getFunction(e)}catch(t){try{e=this.getError(e)}catch(e){throw t}}return(0,l.$J)(this.constructor,"getSighash")(e)}getEventTopic(e){return"string"==typeof e&&(e=this.getEvent(e)),(0,l.$J)(this.constructor,"getEventTopic")(e)}_decodeParams(e,t){return this._abiCoder.decode(e,t)}_encodeParams(e,t){return this._abiCoder.encode(e,t)}encodeDeploy(e){return this._encodeParams(this.deploy.inputs,e||[])}decodeErrorResult(e,t){"string"==typeof e&&(e=this.getError(e));const r=(0,i.k9)(t);return(0,i.c$)(r.slice(0,4))!==this.getSighash(e)&&p.throwArgumentError(`data signature does not match error ${e.name}.`,"data",(0,i.c$)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeErrorResult(e,t){return"string"==typeof e&&(e=this.getError(e)),(0,i.c$)((0,i.xW)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionData(e,t){"string"==typeof e&&(e=this.getFunction(e));const r=(0,i.k9)(t);return(0,i.c$)(r.slice(0,4))!==this.getSighash(e)&&p.throwArgumentError(`data signature does not match function ${e.name}.`,"data",(0,i.c$)(r)),this._decodeParams(e.inputs,r.slice(4))}encodeFunctionData(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,i.c$)((0,i.xW)([this.getSighash(e),this._encodeParams(e.inputs,t||[])]))}decodeFunctionResult(e,t){"string"==typeof e&&(e=this.getFunction(e));let r=(0,i.k9)(t),n=null,o="",a=null,s=null,l=null;switch(r.length%this._abiCoder._getWordSize()){case 0:try{return this._abiCoder.decode(e.outputs,r)}catch(e){}break;case 4:{const e=(0,i.c$)(r.slice(0,4)),t=v[e];if(t)a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,l=t.signature,t.reason&&(n=a[0]),"Error"===s?o=`; VM Exception while processing transaction: reverted with reason string ${JSON.stringify(a[0])}`:"Panic"===s&&(o=`; VM Exception while processing transaction: reverted with panic code ${a[0]}`);else try{const t=this.getError(e);a=this._abiCoder.decode(t.inputs,r.slice(4)),s=t.name,l=t.format()}catch(e){}break}}return p.throwError("call revert exception"+o,d.Vy.errors.CALL_EXCEPTION,{method:e.format(),data:(0,i.c$)(t),errorArgs:a,errorName:s,errorSignature:l,reason:n})}encodeFunctionResult(e,t){return"string"==typeof e&&(e=this.getFunction(e)),(0,i.c$)(this._abiCoder.encode(e.outputs,t||[]))}encodeFilterTopics(e,t){"string"==typeof e&&(e=this.getEvent(e)),t.length>e.inputs.length&&p.throwError("too many arguments for "+e.format(),d.Vy.errors.UNEXPECTED_ARGUMENT,{argument:"values",value:t});let r=[];e.anonymous||r.push(this.getEventTopic(e));const n=(e,t)=>"string"===e.type?(0,a.id)(t):"bytes"===e.type?(0,s.S)((0,i.c$)(t)):("bool"===e.type&&"boolean"==typeof t&&(t=t?"0x01":"0x00"),e.type.match(/^u?int/)&&(t=o.gH.from(t).toHexString()),"address"===e.type&&this._abiCoder.encode(["address"],[t]),(0,i.bj)((0,i.c$)(t),32));for(t.forEach(((t,o)=>{let i=e.inputs[o];i.indexed?null==t?r.push(null):"array"===i.baseType||"tuple"===i.baseType?p.throwArgumentError("filtering with tuples or arrays not supported","contract."+i.name,t):Array.isArray(t)?r.push(t.map((e=>n(i,e)))):r.push(n(i,t)):null!=t&&p.throwArgumentError("cannot filter non-indexed parameters; must be null","contract."+i.name,t)}));r.length&&null===r[r.length-1];)r.pop();return r}encodeEventLog(e,t){"string"==typeof e&&(e=this.getEvent(e));const r=[],n=[],o=[];return e.anonymous||r.push(this.getEventTopic(e)),t.length!==e.inputs.length&&p.throwArgumentError("event arguments/values mismatch","values",t),e.inputs.forEach(((e,i)=>{const l=t[i];if(e.indexed)if("string"===e.type)r.push((0,a.id)(l));else if("bytes"===e.type)r.push((0,s.S)(l));else{if("tuple"===e.baseType||"array"===e.baseType)throw new Error("not implemented");r.push(this._abiCoder.encode([e.type],[l]))}else n.push(e),o.push(l)})),{data:this._abiCoder.encode(n,o),topics:r}}decodeEventLog(e,t,r){if("string"==typeof e&&(e=this.getEvent(e)),null!=r&&!e.anonymous){let t=this.getEventTopic(e);(0,i.Lo)(r[0],32)&&r[0].toLowerCase()===t||p.throwError("fragment/topic mismatch",d.Vy.errors.INVALID_ARGUMENT,{argument:"topics[0]",expected:t,value:r[0]}),r=r.slice(1)}let n=[],o=[],a=[];e.inputs.forEach(((e,t)=>{e.indexed?"string"===e.type||"bytes"===e.type||"tuple"===e.baseType||"array"===e.baseType?(n.push(u.aX.fromObject({type:"bytes32",name:e.name})),a.push(!0)):(n.push(e),a.push(!1)):(o.push(e),a.push(!1))}));let s=null!=r?this._abiCoder.decode(n,(0,i.xW)(r)):null,l=this._abiCoder.decode(o,t,!0),c=[],f=0,h=0;e.inputs.forEach(((e,t)=>{if(e.indexed)if(null==s)c[t]=new b({_isIndexed:!0,hash:null});else if(a[t])c[t]=new b({_isIndexed:!0,hash:s[h++]});else try{c[t]=s[h++]}catch(e){c[t]=e}else try{c[t]=l[f++]}catch(e){c[t]=e}if(e.name&&null==c[e.name]){const r=c[t];r instanceof Error?Object.defineProperty(c,e.name,{enumerable:!0,get:()=>{throw y(`property ${JSON.stringify(e.name)}`,r)}}):c[e.name]=r}}));for(let e=0;e{throw y(`index ${e}`,t)}})}return Object.freeze(c)}parseTransaction(e){let t=this.getFunction(e.data.substring(0,10).toLowerCase());return t?new m({args:this._abiCoder.decode(t.inputs,"0x"+e.data.substring(10)),functionFragment:t,name:t.name,signature:t.format(),sighash:this.getSighash(t),value:o.gH.from(e.value||"0")}):null}parseLog(e){let t=this.getEvent(e.topics[0]);return!t||t.anonymous?null:new h({eventFragment:t,name:t.name,signature:t.format(),topic:this.getEventTopic(t),args:this.decodeEventLog(t,e.data,e.topics)})}parseError(e){const t=(0,i.c$)(e);let r=this.getError(t.substring(0,10).toLowerCase());return r?new g({args:this._abiCoder.decode(r.inputs,"0x"+t.substring(10)),errorFragment:r,name:r.name,signature:r.format(),sighash:this.getSighash(r)}):null}static isInterface(e){return!(!e||!e._isInterface)}}},48532:(e,t,r)=>{"use strict";r.d(t,{Rj:()=>s,Kq:()=>l});var n=r(37457),o=(r(38905),r(88943)),i=r(7720);const a=new i.Vy("abstract-provider/5.7.0");class s extends o.VY{static isForkEvent(e){return!(!e||!e._isForkEvent)}}class l{constructor(){a.checkAbstract(new.target,l),(0,o.yY)(this,"_isProvider",!0)}getFeeData(){return e=this,t=void 0,i=function*(){const{block:e,gasPrice:t}=yield(0,o.k_)({block:this.getBlock("latest"),gasPrice:this.getGasPrice().catch((e=>null))});let r=null,i=null,a=null;return e&&e.baseFeePerGas&&(r=e.baseFeePerGas,a=n.gH.from("1500000000"),i=e.baseFeePerGas.mul(2).add(a)),{lastBaseFeePerGas:r,maxFeePerGas:i,maxPriorityFeePerGas:a,gasPrice:t}},new((r=void 0)||(r=Promise))((function(n,o){function a(e){try{l(i.next(e))}catch(e){o(e)}}function s(e){try{l(i.throw(e))}catch(e){o(e)}}function l(e){var t;e.done?n(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((i=i.apply(e,t||[])).next())}));var e,t,r,i}addListener(e,t){return this.on(e,t)}removeListener(e,t){return this.off(e,t)}static isProvider(e){return!(!e||!e._isProvider)}}},10077:(e,t,r)=>{"use strict";r.d(t,{l:()=>c,J:()=>u});var n=r(88943),o=r(7720),i=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};const a=new o.Vy("abstract-signer/5.7.0"),s=["accessList","ccipReadEnabled","chainId","customData","data","from","gasLimit","gasPrice","maxFeePerGas","maxPriorityFeePerGas","nonce","to","type","value"],l=[o.Vy.errors.INSUFFICIENT_FUNDS,o.Vy.errors.NONCE_EXPIRED,o.Vy.errors.REPLACEMENT_UNDERPRICED];class c{constructor(){a.checkAbstract(new.target,c),(0,n.yY)(this,"_isSigner",!0)}getBalance(e){return i(this,void 0,void 0,(function*(){return this._checkProvider("getBalance"),yield this.provider.getBalance(this.getAddress(),e)}))}getTransactionCount(e){return i(this,void 0,void 0,(function*(){return this._checkProvider("getTransactionCount"),yield this.provider.getTransactionCount(this.getAddress(),e)}))}estimateGas(e){return i(this,void 0,void 0,(function*(){this._checkProvider("estimateGas");const t=yield(0,n.k_)(this.checkTransaction(e));return yield this.provider.estimateGas(t)}))}call(e,t){return i(this,void 0,void 0,(function*(){this._checkProvider("call");const r=yield(0,n.k_)(this.checkTransaction(e));return yield this.provider.call(r,t)}))}sendTransaction(e){return i(this,void 0,void 0,(function*(){this._checkProvider("sendTransaction");const t=yield this.populateTransaction(e),r=yield this.signTransaction(t);return yield this.provider.sendTransaction(r)}))}getChainId(){return i(this,void 0,void 0,(function*(){return this._checkProvider("getChainId"),(yield this.provider.getNetwork()).chainId}))}getGasPrice(){return i(this,void 0,void 0,(function*(){return this._checkProvider("getGasPrice"),yield this.provider.getGasPrice()}))}getFeeData(){return i(this,void 0,void 0,(function*(){return this._checkProvider("getFeeData"),yield this.provider.getFeeData()}))}resolveName(e){return i(this,void 0,void 0,(function*(){return this._checkProvider("resolveName"),yield this.provider.resolveName(e)}))}checkTransaction(e){for(const t in e)-1===s.indexOf(t)&&a.throwArgumentError("invalid transaction key: "+t,"transaction",e);const t=(0,n.Ic)(e);return null==t.from?t.from=this.getAddress():t.from=Promise.all([Promise.resolve(t.from),this.getAddress()]).then((t=>(t[0].toLowerCase()!==t[1].toLowerCase()&&a.throwArgumentError("from address mismatch","transaction",e),t[0]))),t}populateTransaction(e){return i(this,void 0,void 0,(function*(){const t=yield(0,n.k_)(this.checkTransaction(e));null!=t.to&&(t.to=Promise.resolve(t.to).then((e=>i(this,void 0,void 0,(function*(){if(null==e)return null;const t=yield this.resolveName(e);return null==t&&a.throwArgumentError("provided ENS name resolves to null","tx.to",e),t})))),t.to.catch((e=>{})));const r=null!=t.maxFeePerGas||null!=t.maxPriorityFeePerGas;if(null==t.gasPrice||2!==t.type&&!r?0!==t.type&&1!==t.type||!r||a.throwArgumentError("pre-eip-1559 transaction do not support maxFeePerGas/maxPriorityFeePerGas","transaction",e):a.throwArgumentError("eip-1559 transaction do not support gasPrice","transaction",e),2!==t.type&&null!=t.type||null==t.maxFeePerGas||null==t.maxPriorityFeePerGas)if(0===t.type||1===t.type)null==t.gasPrice&&(t.gasPrice=this.getGasPrice());else{const e=yield this.getFeeData();if(null==t.type)if(null!=e.maxFeePerGas&&null!=e.maxPriorityFeePerGas)if(t.type=2,null!=t.gasPrice){const e=t.gasPrice;delete t.gasPrice,t.maxFeePerGas=e,t.maxPriorityFeePerGas=e}else null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas);else null!=e.gasPrice?(r&&a.throwError("network does not support EIP-1559",o.Vy.errors.UNSUPPORTED_OPERATION,{operation:"populateTransaction"}),null==t.gasPrice&&(t.gasPrice=e.gasPrice),t.type=0):a.throwError("failed to get consistent fee data",o.Vy.errors.UNSUPPORTED_OPERATION,{operation:"signer.getFeeData"});else 2===t.type&&(null==t.maxFeePerGas&&(t.maxFeePerGas=e.maxFeePerGas),null==t.maxPriorityFeePerGas&&(t.maxPriorityFeePerGas=e.maxPriorityFeePerGas))}else t.type=2;return null==t.nonce&&(t.nonce=this.getTransactionCount("pending")),null==t.gasLimit&&(t.gasLimit=this.estimateGas(t).catch((e=>{if(l.indexOf(e.code)>=0)throw e;return a.throwError("cannot estimate gas; transaction may fail or may require manual gas limit",o.Vy.errors.UNPREDICTABLE_GAS_LIMIT,{error:e,tx:t})}))),null==t.chainId?t.chainId=this.getChainId():t.chainId=Promise.all([Promise.resolve(t.chainId),this.getChainId()]).then((t=>(0!==t[1]&&t[0]!==t[1]&&a.throwArgumentError("chainId address mismatch","transaction",e),t[0]))),yield(0,n.k_)(t)}))}_checkProvider(e){this.provider||a.throwError("missing provider",o.Vy.errors.UNSUPPORTED_OPERATION,{operation:e||"_checkProvider"})}static isSigner(e){return!(!e||!e._isSigner)}}class u extends c{constructor(e,t){super(),(0,n.yY)(this,"address",e),(0,n.yY)(this,"provider",t||null)}getAddress(){return Promise.resolve(this.address)}_fail(e,t){return Promise.resolve().then((()=>{a.throwError(e,o.Vy.errors.UNSUPPORTED_OPERATION,{operation:t})}))}signMessage(e){return this._fail("VoidSigner cannot sign messages","signMessage")}signTransaction(e){return this._fail("VoidSigner cannot sign transactions","signTransaction")}_signTypedData(e,t,r){return this._fail("VoidSigner cannot sign typed data","signTypedData")}connect(e){return new u(this.address,e)}}},58908:(e,t,r)=>{"use strict";r.d(t,{bv:()=>p,RZ:()=>g,Nm:()=>b,OD:()=>m,PW:()=>h});var n=r(38905),o=r(37457),i=r(50234),a=r(42546);const s=new(r(7720).Vy)("address/5.7.0");function l(e){(0,n.Lo)(e,20)||s.throwArgumentError("invalid address","address",e);const t=(e=e.toLowerCase()).substring(2).split(""),r=new Uint8Array(40);for(let e=0;e<40;e++)r[e]=t[e].charCodeAt(0);const o=(0,n.k9)((0,i.S)(r));for(let e=0;e<40;e+=2)o[e>>1]>>4>=8&&(t[e]=t[e].toUpperCase()),(15&o[e>>1])>=8&&(t[e+1]=t[e+1].toUpperCase());return"0x"+t.join("")}const c={};for(let e=0;e<10;e++)c[String(e)]=String(e);for(let e=0;e<26;e++)c[String.fromCharCode(65+e)]=String(10+e);const u=Math.floor((d=9007199254740991,Math.log10?Math.log10(d):Math.log(d)/Math.LN10));var d;function f(e){let t=(e=(e=e.toUpperCase()).substring(4)+e.substring(0,2)+"00").split("").map((e=>c[e])).join("");for(;t.length>=u;){let e=t.substring(0,u);t=parseInt(e,10)%97+t.substring(e.length)}let r=String(98-parseInt(t,10)%97);for(;r.length<2;)r="0"+r;return r}function p(e){let t=null;if("string"!=typeof e&&s.throwArgumentError("invalid address","address",e),e.match(/^(0x)?[0-9a-fA-F]{40}$/))"0x"!==e.substring(0,2)&&(e="0x"+e),t=l(e),e.match(/([A-F].*[a-f])|([a-f].*[A-F])/)&&t!==e&&s.throwArgumentError("bad address checksum","address",e);else if(e.match(/^XE[0-9]{2}[0-9A-Za-z]{30,31}$/)){for(e.substring(2,4)!==f(e)&&s.throwArgumentError("bad icap checksum","address",e),t=(0,o.Os)(e.substring(4));t.length<40;)t="0"+t;t=l("0x"+t)}else s.throwArgumentError("invalid address","address",e);return t}function h(e){try{return p(e),!0}catch(e){}return!1}function m(e){let t=(0,o.ii)(p(e).substring(2)).toUpperCase();for(;t.length<30;)t="0"+t;return"XE"+f("XE00"+t)+t}function g(e){let t=null;try{t=p(e.from)}catch(t){s.throwArgumentError("missing from address","transaction",e)}const r=(0,n.gr)((0,n.k9)(o.gH.from(e.nonce).toHexString()));return p((0,n.Ab)((0,i.S)((0,a.encode)([t,r])),12))}function b(e,t,r){return 32!==(0,n.cm)(t)&&s.throwArgumentError("salt must be 32 bytes","salt",t),32!==(0,n.cm)(r)&&s.throwArgumentError("initCodeHash must be 32 bytes","initCodeHash",r),p((0,n.Ab)((0,i.S)((0,n.xW)(["0xff",p(e),t,r])),12))}},90531:(e,t,r)=>{"use strict";r.d(t,{D:()=>o,l:()=>i});var n=r(38905);function o(e){e=atob(e);const t=[];for(let r=0;r{"use strict";r.d(t,{zn:()=>a});var n=r(38905),o=r(88943);class i{constructor(e){(0,o.yY)(this,"alphabet",e),(0,o.yY)(this,"base",e.length),(0,o.yY)(this,"_alphabetMap",{}),(0,o.yY)(this,"_leader",e.charAt(0));for(let t=0;t0;)r.push(n%this.base),n=n/this.base|0}let o="";for(let e=0;0===t[e]&&e=0;--e)o+=this.alphabet[r[e]];return o}decode(e){if("string"!=typeof e)throw new TypeError("Expected String");let t=[];if(0===e.length)return new Uint8Array(t);t.push(0);for(let r=0;r>=8;for(;o>0;)t.push(255&o),o>>=8}for(let r=0;e[r]===this._leader&&r{"use strict";r.d(t,{r:()=>n});const n="bignumber/5.7.0"},37457:(e,t,r)=>{"use strict";r.d(t,{Os:()=>y,YR:()=>f,gH:()=>h,ii:()=>w});var n=r(39404),o=r.n(n),i=r(38905),a=r(7720),s=r(56667),l=o().BN;const c=new a.Vy(s.r),u={},d=9007199254740991;function f(e){return null!=e&&(h.isBigNumber(e)||"number"==typeof e&&e%1==0||"string"==typeof e&&!!e.match(/^-?[0-9]+$/)||(0,i.Lo)(e)||"bigint"==typeof e||(0,i.aY)(e))}let p=!1;class h{constructor(e,t){e!==u&&c.throwError("cannot call constructor directly; use BigNumber.from",a.Vy.errors.UNSUPPORTED_OPERATION,{operation:"new (BigNumber)"}),this._hex=t,this._isBigNumber=!0,Object.freeze(this)}fromTwos(e){return g(b(this).fromTwos(e))}toTwos(e){return g(b(this).toTwos(e))}abs(){return"-"===this._hex[0]?h.from(this._hex.substring(1)):this}add(e){return g(b(this).add(b(e)))}sub(e){return g(b(this).sub(b(e)))}div(e){return h.from(e).isZero()&&v("division-by-zero","div"),g(b(this).div(b(e)))}mul(e){return g(b(this).mul(b(e)))}mod(e){const t=b(e);return t.isNeg()&&v("division-by-zero","mod"),g(b(this).umod(t))}pow(e){const t=b(e);return t.isNeg()&&v("negative-power","pow"),g(b(this).pow(t))}and(e){const t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","and"),g(b(this).and(t))}or(e){const t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","or"),g(b(this).or(t))}xor(e){const t=b(e);return(this.isNegative()||t.isNeg())&&v("unbound-bitwise-result","xor"),g(b(this).xor(t))}mask(e){return(this.isNegative()||e<0)&&v("negative-width","mask"),g(b(this).maskn(e))}shl(e){return(this.isNegative()||e<0)&&v("negative-width","shl"),g(b(this).shln(e))}shr(e){return(this.isNegative()||e<0)&&v("negative-width","shr"),g(b(this).shrn(e))}eq(e){return b(this).eq(b(e))}lt(e){return b(this).lt(b(e))}lte(e){return b(this).lte(b(e))}gt(e){return b(this).gt(b(e))}gte(e){return b(this).gte(b(e))}isNegative(){return"-"===this._hex[0]}isZero(){return b(this).isZero()}toNumber(){try{return b(this).toNumber()}catch(e){v("overflow","toNumber",this.toString())}return null}toBigInt(){try{return BigInt(this.toString())}catch(e){}return c.throwError("this platform does not support BigInt",a.Vy.errors.UNSUPPORTED_OPERATION,{value:this.toString()})}toString(){return arguments.length>0&&(10===arguments[0]?p||(p=!0,c.warn("BigNumber.toString does not accept any parameters; base-10 is assumed")):16===arguments[0]?c.throwError("BigNumber.toString does not accept any parameters; use bigNumber.toHexString()",a.Vy.errors.UNEXPECTED_ARGUMENT,{}):c.throwError("BigNumber.toString does not accept parameters",a.Vy.errors.UNEXPECTED_ARGUMENT,{})),b(this).toString(10)}toHexString(){return this._hex}toJSON(e){return{type:"BigNumber",hex:this.toHexString()}}static from(e){if(e instanceof h)return e;if("string"==typeof e)return e.match(/^-?0x[0-9a-f]+$/i)?new h(u,m(e)):e.match(/^-?[0-9]+$/)?new h(u,m(new l(e))):c.throwArgumentError("invalid BigNumber string","value",e);if("number"==typeof e)return e%1&&v("underflow","BigNumber.from",e),(e>=d||e<=-d)&&v("overflow","BigNumber.from",e),h.from(String(e));const t=e;if("bigint"==typeof t)return h.from(t.toString());if((0,i.aY)(t))return h.from((0,i.c$)(t));if(t)if(t.toHexString){const e=t.toHexString();if("string"==typeof e)return h.from(e)}else{let e=t._hex;if(null==e&&"BigNumber"===t.type&&(e=t.hex),"string"==typeof e&&((0,i.Lo)(e)||"-"===e[0]&&(0,i.Lo)(e.substring(1))))return h.from(e)}return c.throwArgumentError("invalid BigNumber value","value",e)}static isBigNumber(e){return!(!e||!e._isBigNumber)}}function m(e){if("string"!=typeof e)return m(e.toString(16));if("-"===e[0])return"-"===(e=e.substring(1))[0]&&c.throwArgumentError("invalid hex","value",e),"0x00"===(e=m(e))?e:"-"+e;if("0x"!==e.substring(0,2)&&(e="0x"+e),"0x"===e)return"0x00";for(e.length%2&&(e="0x0"+e.substring(2));e.length>4&&"0x00"===e.substring(0,4);)e="0x"+e.substring(4);return e}function g(e){return h.from(m(e))}function b(e){const t=h.from(e).toHexString();return"-"===t[0]?new l("-"+t.substring(3),16):new l(t.substring(2),16)}function v(e,t,r){const n={fault:e,operation:t};return null!=r&&(n.value=r),c.throwError(e,a.Vy.errors.NUMERIC_FAULT,n)}function y(e){return new l(e,36).toString(16)}function w(e){return new l(e,16).toString(36)}},38905:(e,t,r)=>{"use strict";r.d(t,{k9:()=>c,xW:()=>u,qn:()=>v,cm:()=>g,Ab:()=>b,hP:()=>w,Fh:()=>y,bj:()=>E,c$:()=>m,aY:()=>l,f:()=>a,Lo:()=>p,FU:()=>S,Pc:()=>_,gr:()=>d,e8:()=>f});const n=new(r(7720).Vy)("bytes/5.7.0");function o(e){return!!e.toHexString}function i(e){return e.slice||(e.slice=function(){const t=Array.prototype.slice.call(arguments);return i(new Uint8Array(Array.prototype.slice.apply(e,t)))}),e}function a(e){return p(e)&&!(e.length%2)||l(e)}function s(e){return"number"==typeof e&&e==e&&e%1==0}function l(e){if(null==e)return!1;if(e.constructor===Uint8Array)return!0;if("string"==typeof e)return!1;if(!s(e.length)||e.length<0)return!1;for(let t=0;t=256)return!1}return!0}function c(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid arrayify value");const t=[];for(;e;)t.unshift(255&e),e=parseInt(String(e/256));return 0===t.length&&t.push(0),i(new Uint8Array(t))}if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e)&&(e=e.toHexString()),p(e)){let r=e.substring(2);r.length%2&&("left"===t.hexPad?r="0"+r:"right"===t.hexPad?r+="0":n.throwArgumentError("hex data is odd-length","value",e));const o=[];for(let e=0;ec(e))),r=t.reduce(((e,t)=>e+t.length),0),n=new Uint8Array(r);return t.reduce(((e,t)=>(n.set(t,e),e+t.length)),0),i(n)}function d(e){let t=c(e);if(0===t.length)return t;let r=0;for(;rt&&n.throwArgumentError("value out of range","value",arguments[0]);const r=new Uint8Array(t);return r.set(e,t-e.length),i(r)}function p(e,t){return!("string"!=typeof e||!e.match(/^0x[0-9A-Fa-f]*$/)||t&&e.length!==2+2*t)}const h="0123456789abcdef";function m(e,t){if(t||(t={}),"number"==typeof e){n.checkSafeUint53(e,"invalid hexlify value");let t="";for(;e;)t=h[15&e]+t,e=Math.floor(e/16);return t.length?(t.length%2&&(t="0"+t),"0x"+t):"0x00"}if("bigint"==typeof e)return(e=e.toString(16)).length%2?"0x0"+e:"0x"+e;if(t.allowMissingPrefix&&"string"==typeof e&&"0x"!==e.substring(0,2)&&(e="0x"+e),o(e))return e.toHexString();if(p(e))return e.length%2&&("left"===t.hexPad?e="0x0"+e.substring(2):"right"===t.hexPad?e+="0":n.throwArgumentError("hex data is odd-length","value",e)),e.toLowerCase();if(l(e)){let t="0x";for(let r=0;r>4]+h[15&n]}return t}return n.throwArgumentError("invalid hexlify value","value",e)}function g(e){if("string"!=typeof e)e=m(e);else if(!p(e)||e.length%2)return null;return(e.length-2)/2}function b(e,t,r){return"string"!=typeof e?e=m(e):(!p(e)||e.length%2)&&n.throwArgumentError("invalid hexData","value",e),t=2+2*t,null!=r?"0x"+e.substring(t,2+2*r):"0x"+e.substring(t)}function v(e){let t="0x";return e.forEach((e=>{t+=m(e).substring(2)})),t}function y(e){const t=w(m(e,{hexPad:"left"}));return"0x"===t?"0x0":t}function w(e){"string"!=typeof e&&(e=m(e)),p(e)||n.throwArgumentError("invalid hex string","value",e),e=e.substring(2);let t=0;for(;t2*t+2&&n.throwArgumentError("value out of range","value",arguments[1]);e.length<2*t+2;)e="0x0"+e.substring(2);return e}function _(e){const t={r:"0x",s:"0x",_vs:"0x",recoveryParam:0,v:0,yParityAndS:"0x",compact:"0x"};if(a(e)){let r=c(e);64===r.length?(t.v=27+(r[32]>>7),r[32]&=127,t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64))):65===r.length?(t.r=m(r.slice(0,32)),t.s=m(r.slice(32,64)),t.v=r[64]):n.throwArgumentError("invalid signature string","signature",e),t.v<27&&(0===t.v||1===t.v?t.v+=27:n.throwArgumentError("signature invalid v byte","signature",e)),t.recoveryParam=1-t.v%2,t.recoveryParam&&(r[32]|=128),t._vs=m(r.slice(32,64))}else{if(t.r=e.r,t.s=e.s,t.v=e.v,t.recoveryParam=e.recoveryParam,t._vs=e._vs,null!=t._vs){const r=f(c(t._vs),32);t._vs=m(r);const o=r[0]>=128?1:0;null==t.recoveryParam?t.recoveryParam=o:t.recoveryParam!==o&&n.throwArgumentError("signature recoveryParam mismatch _vs","signature",e),r[0]&=127;const i=m(r);null==t.s?t.s=i:t.s!==i&&n.throwArgumentError("signature v mismatch _vs","signature",e)}if(null==t.recoveryParam)null==t.v?n.throwArgumentError("signature missing v and recoveryParam","signature",e):0===t.v||1===t.v?t.recoveryParam=t.v:t.recoveryParam=1-t.v%2;else if(null==t.v)t.v=27+t.recoveryParam;else{const r=0===t.v||1===t.v?t.v:1-t.v%2;t.recoveryParam!==r&&n.throwArgumentError("signature recoveryParam mismatch v","signature",e)}null!=t.r&&p(t.r)?t.r=E(t.r,32):n.throwArgumentError("signature missing or invalid r","signature",e),null!=t.s&&p(t.s)?t.s=E(t.s,32):n.throwArgumentError("signature missing or invalid s","signature",e);const r=c(t.s);r[0]>=128&&n.throwArgumentError("signature s out of range","signature",e),t.recoveryParam&&(r[0]|=128);const o=m(r);t._vs&&(p(t._vs)||n.throwArgumentError("signature invalid _vs","signature",e),t._vs=E(t._vs,32)),null==t._vs?t._vs=o:t._vs!==o&&n.throwArgumentError("signature _vs mismatch v and s","signature",e)}return t.yParityAndS=t._vs,t.compact=t.r+t.yParityAndS.substring(2),t}function S(e){return m(u([(e=_(e)).r,e.s,e.recoveryParam?"0x1c":"0x1b"]))}},48892:(e,t,r)=>{"use strict";r.d(t,{L:()=>n});const n="0x0000000000000000000000000000000000000000"},43514:(e,t,r)=>{"use strict";r.d(t,{Is:()=>c,LV:()=>u,XK:()=>i,d0:()=>s,eR:()=>o,fw:()=>d,lQ:()=>l,pD:()=>a});var n=r(37457);const o=n.gH.from(-1),i=n.gH.from(0),a=n.gH.from(1),s=n.gH.from(2),l=n.gH.from("1000000000000000000"),c=n.gH.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),u=n.gH.from("-0x8000000000000000000000000000000000000000000000000000000000000000"),d=n.gH.from("0x7fffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff")},18930:(e,t,r)=>{"use strict";r.d(t,{j:()=>n});const n="0x0000000000000000000000000000000000000000000000000000000000000000"},85182:(e,t,r)=>{"use strict";r.d(t,{r:()=>n});const n="hash/5.7.0"},8392:(e,t,r)=>{"use strict";r.d(t,{id:()=>i});var n=r(50234),o=r(97664);function i(e){return(0,n.S)((0,o.YW)(e))}},773:(e,t,r)=>{"use strict";r.d(t,{Wh:()=>M,uV:()=>N,kM:()=>I});var n=r(38905),o=r(97664),i=r(50234),a=r(7720),s=r(85182);function l(e,t){null==t&&(t=1);const r=[],n=r.forEach,o=function(e,t){n.call(e,(function(e){t>0&&Array.isArray(e)?o(e,t-1):r.push(e)}))};return o(e,t),r}function c(e){return 1&e?~e>>1:e>>1}function u(e,t){let r=Array(e);for(let n=0,o=-1;nt[e])):r}function p(e,t,r){let n=Array(e).fill(void 0).map((()=>[]));for(let o=0;on[t].push(e)));return n}function h(e,t){let r=1+t(),n=t(),o=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(r)}return t}(t);return l(p(o.length,1+e,t).map(((e,t)=>{const i=e[0],a=e.slice(1);return Array(o[t]).fill(void 0).map(((e,t)=>{let o=t*n;return[i+t*r,a.map((e=>e+o))]}))})))}function m(e,t){return p(1+t(),1+e,t).map((e=>[e[0],e.slice(1)]))}const g=function(e){let t=0;return()=>e[t++]}(function(e){let t=0;function r(){return e[t++]<<8|e[t++]}let n=r(),o=1,i=[0,1];for(let e=1;e>--l&1}const d=Math.pow(2,31),f=d>>>1,p=f>>1,h=d-1;let m=0;for(let e=0;e<31;e++)m=m<<1|u();let g=[],b=0,v=d;for(;;){let e=Math.floor(((m-b+1)*o-1)/v),t=0,r=n;for(;r-t>1;){let n=t+r>>>1;e>>1|u(),a=a<<1^f,s=(s^f)<<1|f|1;b=a,v=1+s-a}let y=n-4;return g.map((t=>{switch(t-y){case 3:return y+65792+(e[s++]<<16|e[s++]<<8|e[s++]);case 2:return y+256+(e[s++]<<8|e[s++]);case 1:return y+e[s++];default:return t-1}}))}((0,r(90531).D)("AEQF2AO2DEsA2wIrAGsBRABxAN8AZwCcAEwAqgA0AGwAUgByADcATAAVAFYAIQAyACEAKAAYAFgAGwAjABQAMAAmADIAFAAfABQAKwATACoADgAbAA8AHQAYABoAGQAxADgALAAoADwAEwA9ABMAGgARAA4ADwAWABMAFgAIAA8AHgQXBYMA5BHJAS8JtAYoAe4AExozi0UAH21tAaMnBT8CrnIyhrMDhRgDygIBUAEHcoFHUPe8AXBjAewCjgDQR8IICIcEcQLwATXCDgzvHwBmBoHNAqsBdBcUAykgDhAMShskMgo8AY8jqAQfAUAfHw8BDw87MioGlCIPBwZCa4ELatMAAMspJVgsDl8AIhckSg8XAHdvTwBcIQEiDT4OPhUqbyECAEoAS34Aej8Ybx83JgT/Xw8gHxZ/7w8RICxPHA9vBw+Pfw8PHwAPFv+fAsAvCc8vEr8ivwD/EQ8Bol8OEBa/A78hrwAPCU8vESNvvwWfHwNfAVoDHr+ZAAED34YaAdJPAK7PLwSEgDLHAGo1Pz8Pvx9fUwMrpb8O/58VTzAPIBoXIyQJNF8hpwIVAT8YGAUADDNBaX3RAMomJCg9EhUeA29MABsZBTMNJipjOhc19gcIDR8bBwQHEggCWi6DIgLuAQYA+BAFCha3A5XiAEsqM7UFFgFLhAMjFTMYE1Klnw74nRVBG/ASCm0BYRN/BrsU3VoWy+S0vV8LQx+vN8gF2AC2AK5EAWwApgYDKmAAroQ0NDQ0AT+OCg7wAAIHRAbpNgVcBV0APTA5BfbPFgMLzcYL/QqqA82eBALKCjQCjqYCht0/k2+OAsXQAoP3ASTKDgDw6ACKAUYCMpIKJpRaAE4A5womABzZvs0REEKiACIQAd5QdAECAj4Ywg/wGqY2AVgAYADYvAoCGAEubA0gvAY2ALAAbpbvqpyEAGAEpgQAJgAG7gAgAEACmghUFwCqAMpAINQIwC4DthRAAPcycKgApoIdABwBfCisABoATwBqASIAvhnSBP8aH/ECeAKXAq40NjgDBTwFYQU6AXs3oABgAD4XNgmcCY1eCl5tIFZeUqGgyoNHABgAEQAaABNwWQAmABMATPMa3T34ADldyprmM1M2XociUQgLzvwAXT3xABgAEQAaABNwIGFAnADD8AAgAD4BBJWzaCcIAIEBFMAWwKoAAdq9BWAF5wLQpALEtQAKUSGkahR4GnJM+gsAwCgeFAiUAECQ0BQuL8AAIAAAADKeIheclvFqQAAETr4iAMxIARMgAMIoHhQIAn0E0pDQFC4HhznoAAAAIAI2C0/4lvFqQAAETgBJJwYCAy4ABgYAFAA8MBKYEH4eRhTkAjYeFcgACAYAeABsOqyQ5gRwDayqugEgaIIAtgoACgDmEABmBAWGme5OBJJA2m4cDeoAmITWAXwrMgOgAGwBCh6CBXYF1Tzg1wKAAFdiuABRAFwAXQBsAG8AdgBrAHYAbwCEAHEwfxQBVE5TEQADVFhTBwBDANILAqcCzgLTApQCrQL6vAAMAL8APLhNBKkE6glGKTAU4Dr4N2EYEwBCkABKk8rHAbYBmwIoAiU4Ajf/Aq4CowCAANIChzgaNBsCsTgeODcFXrgClQKdAqQBiQGYAqsCsjTsNHsfNPA0ixsAWTWiOAMFPDQSNCk2BDZHNow2TTZUNhk28Jk9VzI3QkEoAoICoQKwAqcAQAAxBV4FXbS9BW47YkIXP1ciUqs05DS/FwABUwJW11e6nHuYZmSh/RAYA8oMKvZ8KASoUAJYWAJ6ILAsAZSoqjpgA0ocBIhmDgDWAAawRDQoAAcuAj5iAHABZiR2AIgiHgCaAU68ACxuHAG0ygM8MiZIAlgBdF4GagJqAPZOHAMuBgoATkYAsABiAHgAMLoGDPj0HpKEBAAOJgAuALggTAHWAeAMEDbd20Uege0ADwAWADkAQgA9OHd+2MUQZBBhBgNNDkxxPxUQArEPqwvqERoM1irQ090ANK4H8ANYB/ADWANYB/AH8ANYB/ADWANYA1gDWBwP8B/YxRBkD00EcgWTBZAE2wiIJk4RhgctCNdUEnQjHEwDSgEBIypJITuYMxAlR0wRTQgIATZHbKx9PQNMMbBU+pCnA9AyVDlxBgMedhKlAC8PeCE1uk6DekxxpQpQT7NX9wBFBgASqwAS5gBJDSgAUCwGPQBI4zTYABNGAE2bAE3KAExdGABKaAbgAFBXAFCOAFBJABI2SWdObALDOq0//QomCZhvwHdTBkIQHCemEPgMNAG2ATwN7kvZBPIGPATKH34ZGg/OlZ0Ipi3eDO4m5C6igFsj9iqEBe5L9TzeC05RaQ9aC2YJ5DpkgU8DIgEOIowK3g06CG4Q9ArKbA3mEUYHOgPWSZsApgcCCxIdNhW2JhFirQsKOXgG/Br3C5AmsBMqev0F1BoiBk4BKhsAANAu6IWxWjJcHU9gBgQLJiPIFKlQIQ0mQLh4SRocBxYlqgKSQ3FKiFE3HpQh9zw+DWcuFFF9B/Y8BhlQC4I8n0asRQ8R0z6OPUkiSkwtBDaALDAnjAnQD4YMunxzAVoJIgmyDHITMhEYN8YIOgcaLpclJxYIIkaWYJsE+KAD9BPSAwwFQAlCBxQDthwuEy8VKgUOgSXYAvQ21i60ApBWgQEYBcwPJh/gEFFH4Q7qCJwCZgOEJewALhUiABginAhEZABgj9lTBi7MCMhqbSN1A2gU6GIRdAeSDlgHqBw0FcAc4nDJXgyGCSiksAlcAXYJmgFgBOQICjVcjKEgQmdUi1kYnCBiQUBd/QIyDGYVoES+h3kCjA9sEhwBNgF0BzoNAgJ4Ee4RbBCWCOyGBTW2M/k6JgRQIYQgEgooA1BszwsoJvoM+WoBpBJjAw00PnfvZ6xgtyUX/gcaMsZBYSHyC5NPzgydGsIYQ1QvGeUHwAP0GvQn60FYBgADpAQUOk4z7wS+C2oIjAlAAEoOpBgH2BhrCnKM0QEyjAG4mgNYkoQCcJAGOAcMAGgMiAV65gAeAqgIpAAGANADWAA6Aq4HngAaAIZCAT4DKDABIuYCkAOUCDLMAZYwAfQqBBzEDBYA+DhuSwLDsgKAa2ajBd5ZAo8CSjYBTiYEBk9IUgOwcuIA3ABMBhTgSAEWrEvMG+REAeBwLADIAPwABjYHBkIBzgH0bgC4AWALMgmjtLYBTuoqAIQAFmwB2AKKAN4ANgCA8gFUAE4FWvoF1AJQSgESMhksWGIBvAMgATQBDgB6BsyOpsoIIARuB9QCEBwV4gLvLwe2AgMi4BPOQsYCvd9WADIXUu5eZwqoCqdeaAC0YTQHMnM9UQAPH6k+yAdy/BZIiQImSwBQ5gBQQzSaNTFWSTYBpwGqKQK38AFtqwBI/wK37gK3rQK3sAK6280C0gK33AK3zxAAUEIAUD9SklKDArekArw5AEQAzAHCO147WTteO1k7XjtZO147WTteO1kDmChYI03AVU0oJqkKbV9GYewMpw3VRMk6ShPcYFJgMxPJLbgUwhXPJVcZPhq9JwYl5VUKDwUt1GYxCC00dhe9AEApaYNCY4ceMQpMHOhTklT5LRwAskujM7ANrRsWREEFSHXuYisWDwojAmSCAmJDXE6wXDchAqH4AmiZAmYKAp+FOBwMAmY8AmYnBG8EgAN/FAN+kzkHOXgYOYM6JCQCbB4CMjc4CwJtyAJtr/CLADRoRiwBaADfAOIASwYHmQyOAP8MwwAOtgJ3MAJ2o0ACeUxEAni7Hl3cRa9G9AJ8QAJ6yQJ9CgJ88UgBSH5kJQAsFklZSlwWGErNAtECAtDNSygDiFADh+dExpEzAvKiXQQDA69Lz0wuJgTQTU1NsAKLQAKK2cIcCB5EaAa4Ao44Ao5dQZiCAo7aAo5deVG1UzYLUtVUhgKT/AKTDQDqAB1VH1WwVdEHLBwplocy4nhnRTw6ApegAu+zWCKpAFomApaQApZ9nQCqWa1aCoJOADwClrYClk9cRVzSApnMApllXMtdCBoCnJw5wzqeApwXAp+cAp65iwAeEDIrEAKd8gKekwC2PmE1YfACntQCoG8BqgKeoCACnk+mY8lkKCYsAiewAiZ/AqD8AqBN2AKmMAKlzwKoAAB+AqfzaH1osgAESmodatICrOQCrK8CrWgCrQMCVx4CVd0CseLYAx9PbJgCsr4OArLpGGzhbWRtSWADJc4Ctl08QG6RAylGArhfArlIFgK5K3hwN3DiAr0aAy2zAzISAr6JcgMDM3ICvhtzI3NQAsPMAsMFc4N0TDZGdOEDPKgDPJsDPcACxX0CxkgCxhGKAshqUgLIRQLJUALJLwJkngLd03h6YniveSZL0QMYpGcDAmH1GfSVJXsMXpNevBICz2wCz20wTFTT9BSgAMeuAs90ASrrA04TfkwGAtwoAtuLAtJQA1JdA1NgAQIDVY2AikABzBfuYUZ2AILPg44C2sgC2d+EEYRKpz0DhqYAMANkD4ZyWvoAVgLfZgLeuXR4AuIw7RUB8zEoAfScAfLTiALr9ALpcXoAAur6AurlAPpIAboC7ooC652Wq5cEAu5AA4XhmHpw4XGiAvMEAGoDjheZlAL3FAORbwOSiAL3mQL52gL4Z5odmqy8OJsfA52EAv77ARwAOp8dn7QDBY4DpmsDptoA0sYDBmuhiaIGCgMMSgFgASACtgNGAJwEgLpoBgC8BGzAEowcggCEDC6kdjoAJAM0C5IKRoABZCgiAIzw3AYBLACkfng9ogigkgNmWAN6AEQCvrkEVqTGAwCsBRbAA+4iQkMCHR072jI2PTbUNsk2RjY5NvA23TZKNiU3EDcZN5I+RTxDRTBCJkK5VBYKFhZfwQCWygU3AJBRHpu+OytgNxa61A40GMsYjsn7BVwFXQVcBV0FaAVdBVwFXQVcBV0FXAVdBVwFXUsaCNyKAK4AAQUHBwKU7oICoW1e7jAEzgPxA+YDwgCkBFDAwADABKzAAOxFLhitA1UFTDeyPkM+bj51QkRCuwTQWWQ8X+0AWBYzsACNA8xwzAGm7EZ/QisoCTAbLDs6fnLfb8H2GccsbgFw13M1HAVkBW/Jxsm9CNRO8E8FDD0FBQw9FkcClOYCoMFegpDfADgcMiA2AJQACB8AsigKAIzIEAJKeBIApY5yPZQIAKQiHb4fvj5BKSRPQrZCOz0oXyxgOywfKAnGbgMClQaCAkILXgdeCD9IIGUgQj5fPoY+dT52Ao5CM0dAX9BTVG9SDzFwWTQAbxBzJF/lOEIQQglCCkKJIAls5AcClQICoKPMODEFxhi6KSAbiyfIRrMjtCgdWCAkPlFBIitCsEJRzAbMAV/OEyQzDg0OAQQEJ36i328/Mk9AybDJsQlq3tDRApUKAkFzXf1d/j9uALYP6hCoFgCTGD8kPsFKQiobrm0+zj0KSD8kPnVCRBwMDyJRTHFgMTJa5rwXQiQ2YfI/JD7BMEJEHGINTw4TOFlIRzwJO0icMQpyPyQ+wzJCRBv6DVgnKB01NgUKj2bwYzMqCoBkznBgEF+zYDIocwRIX+NgHj4HICNfh2C4CwdwFWpTG/lgUhYGAwRfv2Ts8mAaXzVgml/XYIJfuWC4HI1gUF9pYJZgMR6ilQHMAOwLAlDRefC0in4AXAEJA6PjCwc0IamOANMMCAECRQDFNRTZBgd+CwQlRA+r6+gLBDEFBnwUBXgKATIArwAGRAAHA3cDdAN2A3kDdwN9A3oDdQN7A30DfAN4A3oDfQAYEAAlAtYASwMAUAFsAHcKAHcAmgB3AHUAdQB2AHVu8UgAygDAAHcAdQB1AHYAdQALCgB3AAsAmgB3AAsCOwB3AAtu8UgAygDAAHgKAJoAdwB3AHUAdQB2AHUAeAB1AHUAdgB1bvFIAMoAwAALCgCaAHcACwB3AAsCOwB3AAtu8UgAygDAAH4ACwGgALcBpwC6AahdAu0COwLtbvFIAMoAwAALCgCaAu0ACwLtAAsCOwLtAAtu8UgAygDAA24ACwNvAAu0VsQAAzsAABCkjUIpAAsAUIusOggWcgMeBxVsGwL67U/2HlzmWOEeOgALASvuAAseAfpKUpnpGgYJDCIZM6YyARUE9ThqAD5iXQgnAJYJPnOzw0ZAEZxEKsIAkA4DhAHnTAIDxxUDK0lxCQlPYgIvIQVYJQBVqE1GakUAKGYiDToSBA1EtAYAXQJYAIF8GgMHRyAAIAjOe9YncekRAA0KACUrjwE7Ayc6AAYWAqaiKG4McEcqANoN3+Mg9TwCBhIkuCny+JwUQ29L008JluRxu3K+oAdqiHOqFH0AG5SUIfUJ5SxCGfxdipRzqTmT4V5Zb+r1Uo4Vm+NqSSEl2mNvR2JhIa8SpYO6ntdwFXHCWTCK8f2+Hxo7uiG3drDycAuKIMP5bhi06ACnqArH1rz4Rqg//lm6SgJGEVbF9xJHISaR6HxqxSnkw6shDnelHKNEfGUXSJRJ1GcsmtJw25xrZMDK9gXSm1/YMkdX4/6NKYOdtk/NQ3/NnDASjTc3fPjIjW/5sVfVObX2oTDWkr1dF9f3kxBsD3/3aQO8hPfRz+e0uEiJqt1161griu7gz8hDDwtpy+F+BWtefnKHZPAxcZoWbnznhJpy0e842j36bcNzGnIEusgGX0a8ZxsnjcSsPDZ09yZ36fCQbriHeQ72JRMILNl6ePPf2HWoVwgWAm1fb3V2sAY0+B6rAXqSwPBgseVmoqsBTSrm91+XasMYYySI8eeRxH3ZvHkMz3BQ5aJ3iUVbYPNM3/7emRtjlsMgv/9VyTsyt/mK+8fgWeT6SoFaclXqn42dAIsvAarF5vNNWHzKSkKQ/8Hfk5ZWK7r9yliOsooyBjRhfkHP4Q2DkWXQi6FG/9r/IwbmkV5T7JSopHKn1pJwm9tb5Ot0oyN1Z2mPpKXHTxx2nlK08fKk1hEYA8WgVVWL5lgx0iTv+KdojJeU23ZDjmiubXOxVXJKKi2Wjuh2HLZOFLiSC7Tls5SMh4f+Pj6xUSrNjFqLGehRNB8lC0QSLNmkJJx/wSG3MnjE9T1CkPwJI0wH2lfzwETIiVqUxg0dfu5q39Gt+hwdcxkhhNvQ4TyrBceof3Mhs/IxFci1HmHr4FMZgXEEczPiGCx0HRwzAqDq2j9AVm1kwN0mRVLWLylgtoPNapF5cY4Y1wJh/e0BBwZj44YgZrDNqvD/9Hv7GFYdUQeDJuQ3EWI4HaKqavU1XjC/n41kT4L79kqGq0kLhdTZvgP3TA3fS0ozVz+5piZsoOtIvBUFoMKbNcmBL6YxxaUAusHB38XrS8dQMnQwJfUUkpRoGr5AUeWicvBTzyK9g77+yCkf5PAysL7r/JjcZgrbvRpMW9iyaxZvKO6ceZN2EwIxKwVFPuvFuiEPGCoagbMo+SpydLrXqBzNCDGFCrO/rkcwa2xhokQZ5CdZ0AsU3JfSqJ6n5I14YA+P/uAgfhPU84Tlw7cEFfp7AEE8ey4sP12PTt4Cods1GRgDOB5xvyiR5m+Bx8O5nBCNctU8BevfV5A08x6RHd5jcwPTMDSZJOedIZ1cGQ704lxbAzqZOP05ZxaOghzSdvFBHYqomATARyAADK4elP8Ly3IrUZKfWh23Xy20uBUmLS4Pfagu9+oyVa2iPgqRP3F2CTUsvJ7+RYnN8fFZbU/HVvxvcFFDKkiTqV5UBZ3Gz54JAKByi9hkKMZJvuGgcSYXFmw08UyoQyVdfTD1/dMkCHXcTGAKeROgArsvmRrQTLUOXioOHGK2QkjHuoYFgXciZoTJd6Fs5q1QX1G+p/e26hYsEf7QZD1nnIyl/SFkNtYYmmBhpBrxl9WbY0YpHWRuw2Ll/tj9mD8P4snVzJl4F9J+1arVeTb9E5r2ILH04qStjxQNwn3m4YNqxmaNbLAqW2TN6LidwuJRqS+NXbtqxoeDXpxeGWmxzSkWxjkyCkX4NQRme6q5SAcC+M7+9ETfA/EwrzQajKakCwYyeunP6ZFlxU2oMEn1Pz31zeStW74G406ZJFCl1wAXIoUKkWotYEpOuXB1uVNxJ63dpJEqfxBeptwIHNrPz8BllZoIcBoXwgfJ+8VAUnVPvRvexnw0Ma/WiGYuJO5y8QTvEYBigFmhUxY5RqzE8OcywN/8m4UYrlaniJO75XQ6KSo9+tWHlu+hMi0UVdiKQp7NelnoZUzNaIyBPVeOwK6GNp+FfHuPOoyhaWuNvTYFkvxscMQWDh+zeFCFkgwbXftiV23ywJ4+uwRqmg9k3KzwIQpzppt8DBBOMbrqwQM5Gb05sEwdKzMiAqOloaA/lr0KA+1pr0/+HiWoiIjHA/wir2nIuS3PeU/ji3O6ZwoxcR1SZ9FhtLC5S0FIzFhbBWcGVP/KpxOPSiUoAdWUpqKH++6Scz507iCcxYI6rdMBICPJZea7OcmeFw5mObJSiqpjg2UoWNIs+cFhyDSt6geV5qgi3FunmwwDoGSMgerFOZGX1m0dMCYo5XOruxO063dwENK9DbnVM9wYFREzh4vyU1WYYJ/LRRp6oxgjqP/X5a8/4Af6p6NWkQferzBmXme0zY/4nwMJm/wd1tIqSwGz+E3xPEAOoZlJit3XddD7/BT1pllzOx+8bmQtANQ/S6fZexc6qi3W+Q2xcmXTUhuS5mpHQRvcxZUN0S5+PL9lXWUAaRZhEH8hTdAcuNMMCuVNKTEGtSUKNi3O6KhSaTzck8csZ2vWRZ+d7mW8c4IKwXIYd25S/zIftPkwPzufjEvOHWVD1m+FjpDVUTV0DGDuHj6QnaEwLu/dEgdLQOg9E1Sro9XHJ8ykLAwtPu+pxqKDuFexqON1sKQm7rwbE1E68UCfA/erovrTCG+DBSNg0l4goDQvZN6uNlbyLpcZAwj2UclycvLpIZMgv4yRlpb3YuMftozorbcGVHt/VeDV3+Fdf1TP0iuaCsPi2G4XeGhsyF1ubVDxkoJhmniQ0/jSg/eYML9KLfnCFgISWkp91eauR3IQvED0nAPXK+6hPCYs+n3+hCZbiskmVMG2da+0EsZPonUeIY8EbfusQXjsK/eFDaosbPjEfQS0RKG7yj5GG69M7MeO1HmiUYocgygJHL6M1qzUDDwUSmr99V7Sdr2F3JjQAJY+F0yH33Iv3+C9M38eML7gTgmNu/r2bUMiPvpYbZ6v1/IaESirBHNa7mPKn4dEmYg7v/+HQgPN1G79jBQ1+soydfDC2r+h2Bl/KIc5KjMK7OH6nb1jLsNf0EHVe2KBiE51ox636uyG6Lho0t3J34L5QY/ilE3mikaF4HKXG1mG1rCevT1Vv6GavltxoQe/bMrpZvRggnBxSEPEeEzkEdOxTnPXHVjUYdw8JYvjB/o7Eegc3Ma+NUxLLnsK0kJlinPmUHzHGtrk5+CAbVzFOBqpyy3QVUnzTDfC/0XD94/okH+OB+i7g9lolhWIjSnfIb+Eq43ZXOWmwvjyV/qqD+t0e+7mTEM74qP/Ozt8nmC7mRpyu63OB4KnUzFc074SqoyPUAgM+/TJGFo6T44EHnQU4X4z6qannVqgw/U7zCpwcmXV1AubIrvOmkKHazJAR55ePjp5tLBsN8vAqs3NAHdcEHOR2xQ0lsNAFzSUuxFQCFYvXLZJdOj9p4fNq6p0HBGUik2YzaI4xySy91KzhQ0+q1hjxvImRwPRf76tChlRkhRCi74NXZ9qUNeIwP+s5p+3m5nwPdNOHgSLD79n7O9m1n1uDHiMntq4nkYwV5OZ1ENbXxFd4PgrlvavZsyUO4MqYlqqn1O8W/I1dEZq5dXhrbETLaZIbC2Kj/Aa/QM+fqUOHdf0tXAQ1huZ3cmWECWSXy/43j35+Mvq9xws7JKseriZ1pEWKc8qlzNrGPUGcVgOa9cPJYIJsGnJTAUsEcDOEVULO5x0rXBijc1lgXEzQQKhROf8zIV82w8eswc78YX11KYLWQRcgHNJElBxfXr72lS2RBSl07qTKorO2uUDZr3sFhYsvnhLZn0A94KRzJ/7DEGIAhW5ZWFpL8gEwu1aLA9MuWZzNwl8Oze9Y+bX+v9gywRVnoB5I/8kXTXU3141yRLYrIOOz6SOnyHNy4SieqzkBXharjfjqq1q6tklaEbA8Qfm2DaIPs7OTq/nvJBjKfO2H9bH2cCMh1+5gspfycu8f/cuuRmtDjyqZ7uCIMyjdV3a+p3fqmXsRx4C8lujezIFHnQiVTXLXuI1XrwN3+siYYj2HHTvESUx8DlOTXpak9qFRK+L3mgJ1WsD7F4cu1aJoFoYQnu+wGDMOjJM3kiBQWHCcvhJ/HRdxodOQp45YZaOTA22Nb4XKCVxqkbwMYFhzYQYIAnCW8FW14uf98jhUG2zrKhQQ0q0CEq0t5nXyvUyvR8DvD69LU+g3i+HFWQMQ8PqZuHD+sNKAV0+M6EJC0szq7rEr7B5bQ8BcNHzvDMc9eqB5ZCQdTf80Obn4uzjwpYU7SISdtV0QGa9D3Wrh2BDQtpBKxaNFV+/Cy2P/Sv+8s7Ud0Fd74X4+o/TNztWgETUapy+majNQ68Lq3ee0ZO48VEbTZYiH1Co4OlfWef82RWeyUXo7woM03PyapGfikTnQinoNq5z5veLpeMV3HCAMTaZmA1oGLAn7XS3XYsz+XK7VMQsc4XKrmDXOLU/pSXVNUq8dIqTba///3x6LiLS6xs1xuCAYSfcQ3+rQgmu7uvf3THKt5Ooo97TqcbRqxx7EASizaQCBQllG/rYxVapMLgtLbZS64w1MDBMXX+PQpBKNwqUKOf2DDRDUXQf9EhOS0Qj4nTmlA8dzSLz/G1d+Ud8MTy/6ghhdiLpeerGY/UlDOfiuqFsMUU5/UYlP+BAmgRLuNpvrUaLlVkrqDievNVEAwF+4CoM1MZTmjxjJMsKJq+u8Zd7tNCUFy6LiyYXRJQ4VyvEQFFaCGKsxIwQkk7EzZ6LTJq2hUuPhvAW+gQnSG6J+MszC+7QCRHcnqDdyNRJ6T9xyS87A6MDutbzKGvGktpbXqtzWtXb9HsfK2cBMomjN9a4y+TaJLnXxAeX/HWzmf4cR4vALt/P4w4qgKY04ml4ZdLOinFYS6cup3G/1ie4+t1eOnpBNlqGqs75ilzkT4+DsZQxNvaSKJ//6zIbbk/M7LOhFmRc/1R+kBtz7JFGdZm/COotIdvQoXpTqP/1uqEUmCb/QWoGLMwO5ANcHzxdY48IGP5+J+zKOTBFZ4Pid+GTM+Wq12MV/H86xEJptBa6T+p3kgpwLedManBHC2GgNrFpoN2xnrMz9WFWX/8/ygSBkavq2Uv7FdCsLEYLu9LLIvAU0bNRDtzYl+/vXmjpIvuJFYjmI0im6QEYqnIeMsNjXG4vIutIGHijeAG/9EDBozKV5cldkHbLxHh25vT+ZEzbhXlqvpzKJwcEgfNwLAKFeo0/pvEE10XDB+EXRTXtSzJozQKFFAJhMxYkVaCW+E9AL7tMeU8acxidHqzb6lX4691UsDpy/LLRmT+epgW56+5Cw8tB4kMUv6s9lh3eRKbyGs+H/4mQMaYzPTf2OOdokEn+zzgvoD3FqNKk8QqGAXVsqcGdXrT62fSPkR2vROFi68A6se86UxRUk4cajfPyCC4G5wDhD+zNq4jodQ4u4n/m37Lr36n4LIAAsVr02dFi9AiwA81MYs2rm4eDlDNmdMRvEKRHfBwW5DdMNp0jPFZMeARqF/wL4XBfd+EMLBfMzpH5GH6NaW+1vrvMdg+VxDzatk3MXgO3ro3P/DpcC6+Mo4MySJhKJhSR01SGGGp5hPWmrrUgrv3lDnP+HhcI3nt3YqBoVAVTBAQT5iuhTg8nvPtd8ZeYj6w1x6RqGUBrSku7+N1+BaasZvjTk64RoIDlL8brpEcJx3OmY7jLoZsswdtmhfC/G21llXhITOwmvRDDeTTPbyASOa16cF5/A1fZAidJpqju3wYAy9avPR1ya6eNp9K8XYrrtuxlqi+bDKwlfrYdR0RRiKRVTLOH85+ZY7XSmzRpfZBJjaTa81VDcJHpZnZnSQLASGYW9l51ZV/h7eVzTi3Hv6hUsgc/51AqJRTkpbFVLXXszoBL8nBX0u/0jBLT8nH+fJePbrwURT58OY+UieRjd1vs04w0VG5VN2U6MoGZkQzKN/ptz0Q366dxoTGmj7i1NQGHi9GgnquXFYdrCfZBmeb7s0T6yrdlZH5cZuwHFyIJ/kAtGsTg0xH5taAAq44BAk1CPk9KVVbqQzrCUiFdF/6gtlPQ8bHHc1G1W92MXGZ5HEHftyLYs8mbD/9xYRUWkHmlM0zC2ilJlnNgV4bfALpQghxOUoZL7VTqtCHIaQSXm+YUMnpkXybnV+A6xlm2CVy8fn0Xlm2XRa0+zzOa21JWWmixfiPMSCZ7qA4rS93VN3pkpF1s5TonQjisHf7iU9ZGvUPOAKZcR1pbeVf/Ul7OhepGCaId9wOtqo7pJ7yLcBZ0pFkOF28y4zEI/kcUNmutBHaQpBdNM8vjCS6HZRokkeo88TBAjGyG7SR+6vUgTcyK9Imalj0kuxz0wmK+byQU11AiJFk/ya5dNduRClcnU64yGu/ieWSeOos1t3ep+RPIWQ2pyTYVbZltTbsb7NiwSi3AV+8KLWk7LxCnfZUetEM8ThnsSoGH38/nyAwFguJp8FjvlHtcWZuU4hPva0rHfr0UhOOJ/F6vS62FW7KzkmRll2HEc7oUq4fyi5T70Vl7YVIfsPHUCdHesf9Lk7WNVWO75JDkYbMI8TOW8JKVtLY9d6UJRITO8oKo0xS+o99Yy04iniGHAaGj88kEWgwv0OrHdY/nr76DOGNS59hXCGXzTKUvDl9iKpLSWYN1lxIeyywdNpTkhay74w2jFT6NS8qkjo5CxA1yfSYwp6AJIZNKIeEK5PJAW7ORgWgwp0VgzYpqovMrWxbu+DGZ6Lhie1RAqpzm8VUzKJOH3mCzWuTOLsN3VT/dv2eeYe9UjbR8YTBsLz7q60VN1sU51k+um1f8JxD5pPhbhSC8rRaB454tmh6YUWrJI3+GWY0qeWioj/tbkYITOkJaeuGt4JrJvHA+l0Gu7kY7XOaa05alMnRWVCXqFgLIwSY4uF59Ue5SU4QKuc/HamDxbr0x6csCetXGoP7Qn1Bk/J9DsynO/UD6iZ1Hyrz+jit0hDCwi/E9OjgKTbB3ZQKQ/0ZOvevfNHG0NK4Aj3Cp7NpRk07RT1i/S0EL93Ag8GRgKI9CfpajKyK6+Jj/PI1KO5/85VAwz2AwzP8FTBb075IxCXv6T9RVvWT2tUaqxDS92zrGUbWzUYk9mSs82pECH+fkqsDt93VW++4YsR/dHCYcQSYTO/KaBMDj9LSD/J/+z20Kq8XvZUAIHtm9hRPP3ItbuAu2Hm5lkPs92pd7kCxgRs0xOVBnZ13ccdA0aunrwv9SdqElJRC3g+oCu+nXyCgmXUs9yMjTMAIHfxZV+aPKcZeUBWt057Xo85Ks1Ir5gzEHCWqZEhrLZMuF11ziGtFQUds/EESajhagzcKsxamcSZxGth4UII+adPhQkUnx2WyN+4YWR+r3f8MnkyGFuR4zjzxJS8WsQYR5PTyRaD9ixa6Mh741nBHbzfjXHskGDq179xaRNrCIB1z1xRfWfjqw2pHc1zk9xlPpL8sQWAIuETZZhbnmL54rceXVNRvUiKrrqIkeogsl0XXb17ylNb0f4GA9Wd44vffEG8FSZGHEL2fbaTGRcSiCeA8PmA/f6Hz8HCS76fXUHwgwkzSwlI71ekZ7Fapmlk/KC+Hs8hUcw3N2LN5LhkVYyizYFl/uPeVP5lsoJHhhfWvvSWruCUW1ZcJOeuTbrDgywJ/qG07gZJplnTvLcYdNaH0KMYOYMGX+rB4NGPFmQsNaIwlWrfCezxre8zXBrsMT+edVLbLqN1BqB76JH4BvZTqUIMfGwPGEn+EnmTV86fPBaYbFL3DFEhjB45CewkXEAtJxk4/Ms2pPXnaRqdky0HOYdcUcE2zcXq4vaIvW2/v0nHFJH2XXe22ueDmq/18XGtELSq85j9X8q0tcNSSKJIX8FTuJF/Pf8j5PhqG2u+osvsLxYrvvfeVJL+4tkcXcr9JV7v0ERmj/X6fM3NC4j6dS1+9Umr2oPavqiAydTZPLMNRGY23LO9zAVDly7jD+70G5TPPLdhRIl4WxcYjLnM+SNcJ26FOrkrISUtPObIz5Zb3AG612krnpy15RMW+1cQjlnWFI6538qky9axd2oJmHIHP08KyP0ubGO+TQNOYuv2uh17yCIvR8VcStw7o1g0NM60sk+8Tq7YfIBJrtp53GkvzXH7OA0p8/n/u1satf/VJhtR1l8Wa6Gmaug7haSpaCaYQax6ta0mkutlb+eAOSG1aobM81D9A4iS1RRlzBBoVX6tU1S6WE2N9ORY6DfeLRC4l9Rvr5h95XDWB2mR1d4WFudpsgVYwiTwT31ljskD8ZyDOlm5DkGh9N/UB/0AI5Xvb8ZBmai2hQ4BWMqFwYnzxwB26YHSOv9WgY3JXnvoN+2R4rqGVh/LLDMtpFP+SpMGJNWvbIl5SOodbCczW2RKleksPoUeGEzrjtKHVdtZA+kfqO+rVx/iclCqwoopepvJpSTDjT+b9GWylGRF8EDbGlw6eUzmJM95Ovoz+kwLX3c2fTjFeYEsE7vUZm3mqdGJuKh2w9/QGSaqRHs99aScGOdDqkFcACoqdbBoQqqjamhH6Q9ng39JCg3lrGJwd50Qk9ovnqBTr8MME7Ps2wiVfygUmPoUBJJfJWX5Nda0nuncbFkA=="))),b=new Set(f(g)),v=new Set(f(g)),y=function(e){let t=[];for(;;){let r=e();if(0==r)break;t.push(h(r,e))}for(;;){let r=e()-1;if(r<0)break;t.push(m(r,e))}return function(e){const t={};for(let r=0;re-t));return function r(){let n=[];for(;;){let o=f(e,t);if(0==o.length)break;n.push({set:new Set(o),node:r()})}n.sort(((e,t)=>t.set.size-e.set.size));let o=e(),i=o%3;o=o/3|0;let a=!!(1&o);return o>>=1,{branches:n,valid:i,fe0f:a,save:1==o,check:2==o}}()}(g),E=45,_=95;function S(e){return(0,o.dg)(e)}function x(e){return e.filter((e=>65039!=e))}function A(e){for(let t of e.split(".")){let e=S(t);try{for(let t=e.lastIndexOf(_)-1;t>=0;t--)if(e[t]!==_)throw new Error("underscore only allowed at start");if(e.length>=4&&e.every((e=>e<128))&&e[2]===E&&e[3]===E)throw new Error("invalid label extension")}catch(e){throw new Error(`Invalid label "${t}": ${e.message}`)}}return e}function T(e,t){var r;let n,o,i=w,a=[],s=e.length;for(t&&(t.length=0);s;){let l=e[--s];if(i=null===(r=i.branches.find((e=>e.set.has(l))))||void 0===r?void 0:r.node,!i)break;if(i.save)o=l;else if(i.check&&l===o)break;a.push(l),i.fe0f&&(a.push(65039),s>0&&65039==e[s-1]&&s--),i.valid&&(n=a.slice(),2==i.valid&&n.splice(1,1),t&&t.push(...e.slice(s).reverse()),e.length=s)}return n}const C=new a.Vy(s.r),k=new Uint8Array(32);function O(e){if(0===e.length)throw new Error("invalid ENS name; empty component");return e}function R(e){const t=(0,o.YW)(function(e){return A(function(e,t){let r=S(e).reverse(),n=[];for(;r.length;){let e=T(r);if(e){n.push(...t(e));continue}let o=r.pop();if(b.has(o)){n.push(o);continue}if(v.has(o))continue;let i=y[o];if(!i)throw new Error(`Disallowed codepoint: 0x${o.toString(16).toUpperCase()}`);n.push(...i)}return A(String.fromCodePoint(...n).normalize("NFC"))}(e,x))}(e)),r=[];if(0===e.length)return r;let n=0;for(let e=0;e=t.length)throw new Error("invalid ENS name; empty component");return r.push(O(t.slice(n))),r}function N(e){try{return 0!==R(e).length}catch(e){}return!1}function I(e){"string"!=typeof e&&C.throwArgumentError("invalid ENS name; not a string","name",e);let t=k;const r=R(e);for(;r.length;)t=(0,i.S)((0,n.xW)([t,(0,i.S)(r.pop())]));return(0,n.c$)(t)}function M(e){return(0,n.c$)((0,n.xW)(R(e).map((e=>{if(e.length>63)throw new Error("invalid DNS encoded entry; length exceeds 63 bytes");const t=new Uint8Array(e.length+1);return t.set(e,1),t[0]=t.length-1,t}))))+"00"}k.fill(0)},72218:(e,t,r)=>{"use strict";r.d(t,{z:()=>A});var n=r(58908),o=r(37457),i=r(38905),a=r(50234),s=r(88943),l=r(7720),c=r(85182),u=r(8392);const d=new l.Vy(c.r),f=new Uint8Array(32);f.fill(0);const p=o.gH.from(-1),h=o.gH.from(0),m=o.gH.from(1),g=o.gH.from("0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff"),b=(0,i.bj)(m.toHexString(),32),v=(0,i.bj)(h.toHexString(),32),y={name:"string",version:"string",chainId:"uint256",verifyingContract:"address",salt:"bytes32"},w=["name","version","chainId","verifyingContract","salt"];function E(e){return function(t){return"string"!=typeof t&&d.throwArgumentError(`invalid domain value for ${JSON.stringify(e)}`,`domain.${e}`,t),t}}const _={name:E("name"),version:E("version"),chainId:function(e){try{return o.gH.from(e).toString()}catch(e){}return d.throwArgumentError('invalid domain value for "chainId"',"domain.chainId",e)},verifyingContract:function(e){try{return(0,n.bv)(e).toLowerCase()}catch(e){}return d.throwArgumentError('invalid domain value "verifyingContract"',"domain.verifyingContract",e)},salt:function(e){try{const t=(0,i.k9)(e);if(32!==t.length)throw new Error("bad length");return(0,i.c$)(t)}catch(e){}return d.throwArgumentError('invalid domain value "salt"',"domain.salt",e)}};function S(e){{const t=e.match(/^(u?)int(\d*)$/);if(t){const r=""===t[1],n=parseInt(t[2]||"256");(n%8!=0||n>256||t[2]&&t[2]!==String(n))&&d.throwArgumentError("invalid numeric width","type",e);const a=g.mask(r?n-1:n),s=r?a.add(m).mul(p):h;return function(t){const r=o.gH.from(t);return(r.lt(s)||r.gt(a))&&d.throwArgumentError(`value out-of-bounds for ${e}`,"value",t),(0,i.bj)(r.toTwos(256).toHexString(),32)}}}{const t=e.match(/^bytes(\d+)$/);if(t){const r=parseInt(t[1]);return(0===r||r>32||t[1]!==String(r))&&d.throwArgumentError("invalid bytes width","type",e),function(t){return(0,i.k9)(t).length!==r&&d.throwArgumentError(`invalid length for ${e}`,"value",t),function(e){const t=(0,i.k9)(e),r=t.length%32;return r?(0,i.qn)([t,f.slice(r)]):(0,i.c$)(t)}(t)}}}switch(e){case"address":return function(e){return(0,i.bj)((0,n.bv)(e),32)};case"bool":return function(e){return e?b:v};case"bytes":return function(e){return(0,a.S)(e)};case"string":return function(e){return(0,u.id)(e)}}return null}function x(e,t){return`${e}(${t.map((({name:e,type:t})=>t+" "+e)).join(",")})`}class A{constructor(e){(0,s.yY)(this,"types",Object.freeze((0,s.A4)(e))),(0,s.yY)(this,"_encoderCache",{}),(0,s.yY)(this,"_types",{});const t={},r={},n={};Object.keys(e).forEach((e=>{t[e]={},r[e]=[],n[e]={}}));for(const n in e){const o={};e[n].forEach((i=>{o[i.name]&&d.throwArgumentError(`duplicate variable name ${JSON.stringify(i.name)} in ${JSON.stringify(n)}`,"types",e),o[i.name]=!0;const a=i.type.match(/^([^\x5b]*)(\x5b|$)/)[1];a===n&&d.throwArgumentError(`circular type reference to ${JSON.stringify(a)}`,"types",e),S(a)||(r[a]||d.throwArgumentError(`unknown type ${JSON.stringify(a)}`,"types",e),r[a].push(n),t[n][a]=!0)}))}const o=Object.keys(r).filter((e=>0===r[e].length));0===o.length?d.throwArgumentError("missing primary type","types",e):o.length>1&&d.throwArgumentError(`ambiguous primary types or unused types: ${o.map((e=>JSON.stringify(e))).join(", ")}`,"types",e),(0,s.yY)(this,"primaryType",o[0]),function o(i,a){a[i]&&d.throwArgumentError(`circular type reference to ${JSON.stringify(i)}`,"types",e),a[i]=!0,Object.keys(t[i]).forEach((e=>{r[e]&&(o(e,a),Object.keys(a).forEach((t=>{n[t][e]=!0})))})),delete a[i]}(this.primaryType,{});for(const t in n){const r=Object.keys(n[t]);r.sort(),this._types[t]=x(t,e[t])+r.map((t=>x(t,e[t]))).join("")}}getEncoder(e){let t=this._encoderCache[e];return t||(t=this._encoderCache[e]=this._getEncoder(e)),t}_getEncoder(e){{const t=S(e);if(t)return t}const t=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(t){const e=t[1],r=this.getEncoder(e),n=parseInt(t[3]);return t=>{n>=0&&t.length!==n&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t);let o=t.map(r);return this._types[e]&&(o=o.map(a.S)),(0,a.S)((0,i.qn)(o))}}const r=this.types[e];if(r){const t=(0,u.id)(this._types[e]);return e=>{const n=r.map((({name:t,type:r})=>{const n=this.getEncoder(r)(e[t]);return this._types[r]?(0,a.S)(n):n}));return n.unshift(t),(0,i.qn)(n)}}return d.throwArgumentError(`unknown type: ${e}`,"type",e)}encodeType(e){const t=this._types[e];return t||d.throwArgumentError(`unknown type: ${JSON.stringify(e)}`,"name",e),t}encodeData(e,t){return this.getEncoder(e)(t)}hashStruct(e,t){return(0,a.S)(this.encodeData(e,t))}encode(e){return this.encodeData(this.primaryType,e)}hash(e){return this.hashStruct(this.primaryType,e)}_visit(e,t,r){if(S(e))return r(e,t);const n=e.match(/^(.*)(\x5b(\d*)\x5d)$/);if(n){const e=n[1],o=parseInt(n[3]);return o>=0&&t.length!==o&&d.throwArgumentError("array length mismatch; expected length ${ arrayLength }","value",t),t.map((t=>this._visit(e,t,r)))}const o=this.types[e];return o?o.reduce(((e,{name:n,type:o})=>(e[n]=this._visit(o,t[n],r),e)),{}):d.throwArgumentError(`unknown type: ${e}`,"type",e)}visit(e,t){return this._visit(this.primaryType,e,t)}static from(e){return new A(e)}static getPrimaryType(e){return A.from(e).primaryType}static hashStruct(e,t,r){return A.from(t).hashStruct(e,r)}static hashDomain(e){const t=[];for(const r in e){const n=y[r];n||d.throwArgumentError(`invalid typed-data domain key: ${JSON.stringify(r)}`,"domain",e),t.push({name:r,type:n})}return t.sort(((e,t)=>w.indexOf(e.name)-w.indexOf(t.name))),A.hashStruct("EIP712Domain",{EIP712Domain:t},e)}static encode(e,t,r){return(0,i.qn)(["0x1901",A.hashDomain(e),A.from(t).hash(r)])}static hash(e,t,r){return(0,a.S)(A.encode(e,t,r))}static resolveNames(e,t,r,n){return o=this,a=void 0,c=function*(){e=(0,s.Ic)(e);const o={};e.verifyingContract&&!(0,i.Lo)(e.verifyingContract,20)&&(o[e.verifyingContract]="0x");const a=A.from(t);a.visit(r,((e,t)=>("address"!==e||(0,i.Lo)(t,20)||(o[t]="0x"),t)));for(const e in o)o[e]=yield n(e);return e.verifyingContract&&o[e.verifyingContract]&&(e.verifyingContract=o[e.verifyingContract]),r=a.visit(r,((e,t)=>"address"===e&&o[t]?o[t]:t)),{domain:e,value:r}},new((l=void 0)||(l=Promise))((function(e,t){function r(e){try{i(c.next(e))}catch(e){t(e)}}function n(e){try{i(c.throw(e))}catch(e){t(e)}}function i(t){var o;t.done?e(t.value):(o=t.value,o instanceof l?o:new l((function(e){e(o)}))).then(r,n)}i((c=c.apply(o,a||[])).next())}));var o,a,l,c}static getPayload(e,t,r){A.hashDomain(e);const n={},a=[];w.forEach((t=>{const r=e[t];null!=r&&(n[t]=_[t](r),a.push({name:t,type:y[t]}))}));const l=A.from(t),c=(0,s.Ic)(t);return c.EIP712Domain?d.throwArgumentError("types must not contain EIP712Domain type","types.EIP712Domain",t):c.EIP712Domain=a,l.encode(r),{types:c,domain:n,primaryType:l.primaryType,message:l.visit(r,((e,t)=>{if(e.match(/^bytes(\d*)/))return(0,i.c$)((0,i.k9)(t));if(e.match(/^u?int/))return o.gH.from(t).toString();switch(e){case"address":return t.toLowerCase();case"bool":return!!t;case"string":return"string"!=typeof t&&d.throwArgumentError("invalid string","value",t),t}return d.throwArgumentError("unsupported type","type",e)}))}}}},50234:(e,t,r)=>{"use strict";r.d(t,{S:()=>a});var n=r(31176),o=r.n(n),i=r(38905);function a(e){return"0x"+o().keccak_256((0,i.k9)(e))}},7720:(e,t,r)=>{"use strict";r.d(t,{O4:()=>u,Vy:()=>f});let n=!1,o=!1;const i={debug:1,default:2,info:2,warning:3,error:4,off:5};let a=i.default,s=null;const l=function(){try{const e=[];if(["NFD","NFC","NFKD","NFKC"].forEach((t=>{try{if("test"!=="test".normalize(t))throw new Error("bad normalize")}catch(r){e.push(t)}})),e.length)throw new Error("missing "+e.join(", "));if(String.fromCharCode(233).normalize("NFD")!==String.fromCharCode(101,769))throw new Error("broken implementation")}catch(e){return e.message}return null}();var c,u;!function(e){e.DEBUG="DEBUG",e.INFO="INFO",e.WARNING="WARNING",e.ERROR="ERROR",e.OFF="OFF"}(c||(c={})),function(e){e.UNKNOWN_ERROR="UNKNOWN_ERROR",e.NOT_IMPLEMENTED="NOT_IMPLEMENTED",e.UNSUPPORTED_OPERATION="UNSUPPORTED_OPERATION",e.NETWORK_ERROR="NETWORK_ERROR",e.SERVER_ERROR="SERVER_ERROR",e.TIMEOUT="TIMEOUT",e.BUFFER_OVERRUN="BUFFER_OVERRUN",e.NUMERIC_FAULT="NUMERIC_FAULT",e.MISSING_NEW="MISSING_NEW",e.INVALID_ARGUMENT="INVALID_ARGUMENT",e.MISSING_ARGUMENT="MISSING_ARGUMENT",e.UNEXPECTED_ARGUMENT="UNEXPECTED_ARGUMENT",e.CALL_EXCEPTION="CALL_EXCEPTION",e.INSUFFICIENT_FUNDS="INSUFFICIENT_FUNDS",e.NONCE_EXPIRED="NONCE_EXPIRED",e.REPLACEMENT_UNDERPRICED="REPLACEMENT_UNDERPRICED",e.UNPREDICTABLE_GAS_LIMIT="UNPREDICTABLE_GAS_LIMIT",e.TRANSACTION_REPLACED="TRANSACTION_REPLACED",e.ACTION_REJECTED="ACTION_REJECTED"}(u||(u={}));const d="0123456789abcdef";class f{constructor(e){Object.defineProperty(this,"version",{enumerable:!0,value:e,writable:!1})}_log(e,t){const r=e.toLowerCase();null==i[r]&&this.throwArgumentError("invalid log level name","logLevel",e),a>i[r]||console.log.apply(console,t)}debug(...e){this._log(f.levels.DEBUG,e)}info(...e){this._log(f.levels.INFO,e)}warn(...e){this._log(f.levels.WARNING,e)}makeError(e,t,r){if(o)return this.makeError("censored error",t,{});t||(t=f.errors.UNKNOWN_ERROR),r||(r={});const n=[];Object.keys(r).forEach((e=>{const t=r[e];try{if(t instanceof Uint8Array){let r="";for(let e=0;e>4],r+=d[15&t[e]];n.push(e+"=Uint8Array(0x"+r+")")}else n.push(e+"="+JSON.stringify(t))}catch(t){n.push(e+"="+JSON.stringify(r[e].toString()))}})),n.push(`code=${t}`),n.push(`version=${this.version}`);const i=e;let a="";switch(t){case u.NUMERIC_FAULT:{a="NUMERIC_FAULT";const t=e;switch(t){case"overflow":case"underflow":case"division-by-zero":a+="-"+t;break;case"negative-power":case"negative-width":a+="-unsupported";break;case"unbound-bitwise-result":a+="-unbound-result"}break}case u.CALL_EXCEPTION:case u.INSUFFICIENT_FUNDS:case u.MISSING_NEW:case u.NONCE_EXPIRED:case u.REPLACEMENT_UNDERPRICED:case u.TRANSACTION_REPLACED:case u.UNPREDICTABLE_GAS_LIMIT:a=t}a&&(e+=" [ See: https://links.ethers.org/v5-errors-"+a+" ]"),n.length&&(e+=" ("+n.join(", ")+")");const s=new Error(e);return s.reason=i,s.code=t,Object.keys(r).forEach((function(e){s[e]=r[e]})),s}throwError(e,t,r){throw this.makeError(e,t,r)}throwArgumentError(e,t,r){return this.throwError(e,f.errors.INVALID_ARGUMENT,{argument:t,value:r})}assert(e,t,r,n){e||this.throwError(t,r,n)}assertArgument(e,t,r,n){e||this.throwArgumentError(t,r,n)}checkNormalize(e){null==e&&(e="platform missing String.prototype.normalize"),l&&this.throwError("platform missing String.prototype.normalize",f.errors.UNSUPPORTED_OPERATION,{operation:"String.prototype.normalize",form:l})}checkSafeUint53(e,t){"number"==typeof e&&(null==t&&(t="value not safe"),(e<0||e>=9007199254740991)&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"out-of-safe-range",value:e}),e%1&&this.throwError(t,f.errors.NUMERIC_FAULT,{operation:"checkSafeInteger",fault:"non-integer",value:e}))}checkArgumentCount(e,t,r){r=r?": "+r:"",et&&this.throwError("too many arguments"+r,f.errors.UNEXPECTED_ARGUMENT,{count:e,expectedCount:t})}checkNew(e,t){e!==Object&&null!=e||this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}checkAbstract(e,t){e===t?this.throwError("cannot instantiate abstract class "+JSON.stringify(t.name)+" directly; use a sub-class",f.errors.UNSUPPORTED_OPERATION,{name:e.name,operation:"new"}):e!==Object&&null!=e||this.throwError("missing new",f.errors.MISSING_NEW,{name:t.name})}static globalLogger(){return s||(s=new f("logger/5.7.0")),s}static setCensorship(e,t){if(!e&&t&&this.globalLogger().throwError("cannot permanently disable censorship",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"}),n){if(!e)return;this.globalLogger().throwError("error censorship permanent",f.errors.UNSUPPORTED_OPERATION,{operation:"setCensorship"})}o=!!e,n=!!t}static setLogLevel(e){const t=i[e.toLowerCase()];null!=t?a=t:f.globalLogger().warn("invalid log level - "+e)}static from(e){return new f(e)}}f.errors=u,f.levels=c},93525:(e,t,r)=>{"use strict";r.d(t,{N:()=>u});const n=new(r(7720).Vy)("networks/5.7.1");function o(e){const t=function(t,r){null==r&&(r={});const n=[];if(t.InfuraProvider&&"-"!==r.infura)try{n.push(new t.InfuraProvider(e,r.infura))}catch(e){}if(t.EtherscanProvider&&"-"!==r.etherscan)try{n.push(new t.EtherscanProvider(e,r.etherscan))}catch(e){}if(t.AlchemyProvider&&"-"!==r.alchemy)try{n.push(new t.AlchemyProvider(e,r.alchemy))}catch(e){}if(t.PocketProvider&&"-"!==r.pocket){const o=["goerli","ropsten","rinkeby","sepolia"];try{const i=new t.PocketProvider(e,r.pocket);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}}if(t.CloudflareProvider&&"-"!==r.cloudflare)try{n.push(new t.CloudflareProvider(e))}catch(e){}if(t.AnkrProvider&&"-"!==r.ankr)try{const o=["ropsten"],i=new t.AnkrProvider(e,r.ankr);i.network&&-1===o.indexOf(i.network.name)&&n.push(i)}catch(e){}if(0===n.length)return null;if(t.FallbackProvider){let o=1;return null!=r.quorum?o=r.quorum:"homestead"===e&&(o=2),new t.FallbackProvider(n,o)}return n[0]};return t.renetwork=function(e){return o(e)},t}function i(e,t){const r=function(r,n){return r.JsonRpcProvider?new r.JsonRpcProvider(e,t):null};return r.renetwork=function(t){return i(e,t)},r}const a={chainId:1,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"homestead",_defaultProvider:o("homestead")},s={chainId:3,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"ropsten",_defaultProvider:o("ropsten")},l={chainId:63,name:"classicMordor",_defaultProvider:i("https://www.ethercluster.com/mordor","classicMordor")},c={unspecified:{chainId:0,name:"unspecified"},homestead:a,mainnet:a,morden:{chainId:2,name:"morden"},ropsten:s,testnet:s,rinkeby:{chainId:4,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"rinkeby",_defaultProvider:o("rinkeby")},kovan:{chainId:42,name:"kovan",_defaultProvider:o("kovan")},goerli:{chainId:5,ensAddress:"0x00000000000C2E074eC69A0dFb2997BA6C7d2e1e",name:"goerli",_defaultProvider:o("goerli")},kintsugi:{chainId:1337702,name:"kintsugi"},sepolia:{chainId:11155111,name:"sepolia",_defaultProvider:o("sepolia")},classic:{chainId:61,name:"classic",_defaultProvider:i("https://www.ethercluster.com/etc","classic")},classicMorden:{chainId:62,name:"classicMorden"},classicMordor:l,classicTestnet:l,classicKotti:{chainId:6,name:"classicKotti",_defaultProvider:i("https://www.ethercluster.com/kotti","classicKotti")},xdai:{chainId:100,name:"xdai"},matic:{chainId:137,name:"matic",_defaultProvider:o("matic")},maticmum:{chainId:80001,name:"maticmum"},optimism:{chainId:10,name:"optimism",_defaultProvider:o("optimism")},"optimism-kovan":{chainId:69,name:"optimism-kovan"},"optimism-goerli":{chainId:420,name:"optimism-goerli"},arbitrum:{chainId:42161,name:"arbitrum"},"arbitrum-rinkeby":{chainId:421611,name:"arbitrum-rinkeby"},"arbitrum-goerli":{chainId:421613,name:"arbitrum-goerli"},bnb:{chainId:56,name:"bnb"},bnbt:{chainId:97,name:"bnbt"}};function u(e){if(null==e)return null;if("number"==typeof e){for(const t in c){const r=c[t];if(r.chainId===e)return{name:r.name,chainId:r.chainId,ensAddress:r.ensAddress||null,_defaultProvider:r._defaultProvider||null}}return{chainId:e,name:"unknown"}}if("string"==typeof e){const t=c[e];return null==t?null:{name:t.name,chainId:t.chainId,ensAddress:t.ensAddress,_defaultProvider:t._defaultProvider||null}}const t=c[e.name];if(!t)return"number"!=typeof e.chainId&&n.throwArgumentError("invalid network chainId","network",e),e;0!==e.chainId&&e.chainId!==t.chainId&&n.throwArgumentError("network chainId mismatch","network",e);let r=e._defaultProvider||null;var o;return null==r&&t._defaultProvider&&(r=(o=t._defaultProvider)&&"function"==typeof o.renetwork?t._defaultProvider.renetwork(e):t._defaultProvider),{name:e.name,chainId:t.chainId,ensAddress:e.ensAddress||t.ensAddress||null,_defaultProvider:r}}},88943:(e,t,r)=>{"use strict";r.d(t,{VY:()=>m,qN:()=>c,A4:()=>h,yY:()=>a,$J:()=>s,k_:()=>l,Ic:()=>u});var n=r(7720),o=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};const i=new n.Vy("properties/5.7.0");function a(e,t,r){Object.defineProperty(e,t,{enumerable:!0,value:r,writable:!1})}function s(e,t){for(let r=0;r<32;r++){if(e[t])return e[t];if(!e.prototype||"object"!=typeof e.prototype)break;e=Object.getPrototypeOf(e.prototype).constructor}return null}function l(e){return o(this,void 0,void 0,(function*(){const t=Object.keys(e).map((t=>{const r=e[t];return Promise.resolve(r).then((e=>({key:t,value:e})))}));return(yield Promise.all(t)).reduce(((e,t)=>(e[t.key]=t.value,e)),{})}))}function c(e,t){e&&"object"==typeof e||i.throwArgumentError("invalid object","object",e),Object.keys(e).forEach((r=>{t[r]||i.throwArgumentError("invalid object key - "+r,"transaction:"+r,e)}))}function u(e){const t={};for(const r in e)t[r]=e[r];return t}const d={bigint:!0,boolean:!0,function:!0,number:!0,string:!0};function f(e){if(null==e||d[typeof e])return!0;if(Array.isArray(e)||"object"==typeof e){if(!Object.isFrozen(e))return!1;const t=Object.keys(e);for(let r=0;rh(e))));if("object"==typeof e){const t={};for(const r in e){const n=e[r];void 0!==n&&a(t,r,h(n))}return t}return i.throwArgumentError("Cannot deepCopy "+typeof e,"object",e)}function h(e){return p(e)}class m{constructor(e){for(const t in e)this[t]=h(e[t])}}},42546:(e,t,r)=>{"use strict";r.r(t),r.d(t,{decode:()=>f,encode:()=>c});var n=r(38905),o=r(7720);const i=new o.Vy("rlp/5.7.0");function a(e){const t=[];for(;e;)t.unshift(255&e),e>>=8;return t}function s(e,t,r){let n=0;for(let o=0;ot+1+n&&i.throwError("child data too short",o.Vy.errors.BUFFER_OVERRUN,{})}return{consumed:1+n,result:a}}function d(e,t){if(0===e.length&&i.throwError("data too short",o.Vy.errors.BUFFER_OVERRUN,{}),e[t]>=248){const r=e[t]-247;t+1+r>e.length&&i.throwError("data short segment too short",o.Vy.errors.BUFFER_OVERRUN,{});const n=s(e,t+1,r);return t+1+r+n>e.length&&i.throwError("data long segment too short",o.Vy.errors.BUFFER_OVERRUN,{}),u(e,t,t+1+r,r+n)}if(e[t]>=192){const r=e[t]-192;return t+1+r>e.length&&i.throwError("data array too short",o.Vy.errors.BUFFER_OVERRUN,{}),u(e,t,t+1,r)}if(e[t]>=184){const r=e[t]-183;t+1+r>e.length&&i.throwError("data array too short",o.Vy.errors.BUFFER_OVERRUN,{});const a=s(e,t+1,r);return t+1+r+a>e.length&&i.throwError("data array too short",o.Vy.errors.BUFFER_OVERRUN,{}),{consumed:1+r+a,result:(0,n.c$)(e.slice(t+1+r,t+1+r+a))}}if(e[t]>=128){const r=e[t]-128;return t+1+r>e.length&&i.throwError("data too short",o.Vy.errors.BUFFER_OVERRUN,{}),{consumed:1+r,result:(0,n.c$)(e.slice(t+1,t+1+r))}}return{consumed:1,result:(0,n.c$)(e[t])}}function f(e){const t=(0,n.k9)(e),r=d(t,0);return r.consumed!==t.length&&i.throwArgumentError("invalid rlp data","data",e),r.result}},63632:(e,t,r)=>{"use strict";r.d(t,{L5:()=>f,HE:()=>c,sc:()=>u,Zf:()=>d});var n=r(77952),o=r.n(n),i=r(38905),a=r(30760),s=r(7720);const l=new s.Vy("sha2/5.7.0");function c(e){return"0x"+o().ripemd160().update((0,i.k9)(e)).digest("hex")}function u(e){return"0x"+o().sha256().update((0,i.k9)(e)).digest("hex")}function d(e){return"0x"+o().sha512().update((0,i.k9)(e)).digest("hex")}function f(e,t,r){return a.q[e]||l.throwError("unsupported algorithm "+e,s.Vy.errors.UNSUPPORTED_OPERATION,{operation:"hmac",algorithm:e}),"0x"+o().hmac(o()[e],(0,i.k9)(t)).update((0,i.k9)(r)).digest("hex")}},30760:(e,t,r)=>{"use strict";var n;r.d(t,{q:()=>n}),function(e){e.sha256="sha256",e.sha512="sha512"}(n||(n={}))},11566:(e,t,r)=>{"use strict";r.d(t,{hR:()=>K,uN:()=>Z,jL:()=>X});var n=r(39404),o=r.n(n),i=r(77952),a=r.n(i);function s(e,t,r){return r={path:t,exports:{},require:function(e,t){return function(){throw new Error("Dynamic requires are not currently supported by @rollup/plugin-commonjs")}(null==t&&r.path)}},e(r,r.exports),r.exports}"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==r.g?r.g:"undefined"!=typeof self&&self;var l=c;function c(e,t){if(!e)throw new Error(t||"Assertion failed")}c.equal=function(e,t,r){if(e!=t)throw new Error(r||"Assertion failed: "+e+" != "+t)};var u=s((function(e,t){var r=t;function n(e){return 1===e.length?"0"+e:e}function o(e){for(var t="",r=0;r>8,a=255&o;i?r.push(i,a):r.push(a)}return r},r.zero2=n,r.toHex=o,r.encode=function(e,t){return"hex"===t?o(e):e}})),d=s((function(e,t){var r=t;r.assert=l,r.toArray=u.toArray,r.zero2=u.zero2,r.toHex=u.toHex,r.encode=u.encode,r.getNAF=function(e,t,r){var n=new Array(Math.max(e.bitLength(),r)+1);n.fill(0);for(var o=1<(o>>1)-1?(o>>1)-l:l,i.isubn(s)):s=0,n[a]=s,i.iushrn(1)}return n},r.getJSF=function(e,t){var r=[[],[]];e=e.clone(),t=t.clone();for(var n,o=0,i=0;e.cmpn(-o)>0||t.cmpn(-i)>0;){var a,s,l=e.andln(3)+o&3,c=t.andln(3)+i&3;3===l&&(l=-1),3===c&&(c=-1),a=1&l?3!=(n=e.andln(7)+o&7)&&5!==n||2!==c?l:-l:0,r[0].push(a),s=1&c?3!=(n=t.andln(7)+i&7)&&5!==n||2!==l?c:-c:0,r[1].push(s),2*o===a+1&&(o=1-o),2*i===s+1&&(i=1-i),e.iushrn(1),t.iushrn(1)}return r},r.cachedProperty=function(e,t,r){var n="_"+t;e.prototype[t]=function(){return void 0!==this[n]?this[n]:this[n]=r.call(this)}},r.parseBytes=function(e){return"string"==typeof e?r.toArray(e,"hex"):e},r.intFromLE=function(e){return new(o())(e,"hex","le")}})),f=d.getNAF,p=d.getJSF,h=d.assert;function m(e,t){this.type=e,this.p=new(o())(t.p,16),this.red=t.prime?o().red(t.prime):o().mont(this.p),this.zero=new(o())(0).toRed(this.red),this.one=new(o())(1).toRed(this.red),this.two=new(o())(2).toRed(this.red),this.n=t.n&&new(o())(t.n,16),this.g=t.g&&this.pointFromJSON(t.g,t.gRed),this._wnafT1=new Array(4),this._wnafT2=new Array(4),this._wnafT3=new Array(4),this._wnafT4=new Array(4),this._bitLength=this.n?this.n.bitLength():0;var r=this.n&&this.p.div(this.n);!r||r.cmpn(100)>0?this.redN=null:(this._maxwellTrick=!0,this.redN=this.n.toRed(this.red))}var g=m;function b(e,t){this.curve=e,this.type=t,this.precomputed=null}m.prototype.point=function(){throw new Error("Not implemented")},m.prototype.validate=function(){throw new Error("Not implemented")},m.prototype._fixedNafMul=function(e,t){h(e.precomputed);var r=e._getDoubles(),n=f(t,1,this._bitLength),o=(1<=i;l--)a=(a<<1)+n[l];s.push(a)}for(var c=this.jpoint(null,null,null),u=this.jpoint(null,null,null),d=o;d>0;d--){for(i=0;i=0;s--){for(var l=0;s>=0&&0===i[s];s--)l++;if(s>=0&&l++,a=a.dblp(l),s<0)break;var c=i[s];h(0!==c),a="affine"===e.type?c>0?a.mixedAdd(o[c-1>>1]):a.mixedAdd(o[-c-1>>1].neg()):c>0?a.add(o[c-1>>1]):a.add(o[-c-1>>1].neg())}return"affine"===e.type?a.toP():a},m.prototype._wnafMulAdd=function(e,t,r,n,o){var i,a,s,l=this._wnafT1,c=this._wnafT2,u=this._wnafT3,d=0;for(i=0;i=1;i-=2){var m=i-1,g=i;if(1===l[m]&&1===l[g]){var b=[t[m],null,null,t[g]];0===t[m].y.cmp(t[g].y)?(b[1]=t[m].add(t[g]),b[2]=t[m].toJ().mixedAdd(t[g].neg())):0===t[m].y.cmp(t[g].y.redNeg())?(b[1]=t[m].toJ().mixedAdd(t[g]),b[2]=t[m].add(t[g].neg())):(b[1]=t[m].toJ().mixedAdd(t[g]),b[2]=t[m].toJ().mixedAdd(t[g].neg()));var v=[-3,-1,-5,-7,0,7,5,1,3],y=p(r[m],r[g]);for(d=Math.max(y[0].length,d),u[m]=new Array(d),u[g]=new Array(d),a=0;a=0;i--){for(var x=0;i>=0;){var A=!0;for(a=0;a=0&&x++,_=_.dblp(x),i<0)break;for(a=0;a0?s=c[a][T-1>>1]:T<0&&(s=c[a][-T-1>>1].neg()),_="affine"===s.type?_.mixedAdd(s):_.add(s))}}for(i=0;i=Math.ceil((e.bitLength()+1)/t.step)},b.prototype._getDoubles=function(e,t){if(this.precomputed&&this.precomputed.doubles)return this.precomputed.doubles;for(var r=[this],n=this,o=0;o=0&&(a=t,s=r),n.negative&&(n=n.neg(),i=i.neg()),a.negative&&(a=a.neg(),s=s.neg()),[{a:n,b:i},{a,b:s}]},w.prototype._endoSplit=function(e){var t=this.endo.basis,r=t[0],n=t[1],o=n.b.mul(e).divRound(this.n),i=r.b.neg().mul(e).divRound(this.n),a=o.mul(r.a),s=i.mul(n.a),l=o.mul(r.b),c=i.mul(n.b);return{k1:e.sub(a).sub(s),k2:l.add(c).neg()}},w.prototype.pointFromX=function(e,t){(e=new(o())(e,16)).red||(e=e.toRed(this.red));var r=e.redSqr().redMul(e).redIAdd(e.redMul(this.a)).redIAdd(this.b),n=r.redSqrt();if(0!==n.redSqr().redSub(r).cmp(this.zero))throw new Error("invalid point");var i=n.fromRed().isOdd();return(t&&!i||!t&&i)&&(n=n.redNeg()),this.point(e,n)},w.prototype.validate=function(e){if(e.inf)return!0;var t=e.x,r=e.y,n=this.a.redMul(t),o=t.redSqr().redMul(t).redIAdd(n).redIAdd(this.b);return 0===r.redSqr().redISub(o).cmpn(0)},w.prototype._endoWnafMulAdd=function(e,t,r){for(var n=this._endoWnafT1,o=this._endoWnafT2,i=0;i":""},_.prototype.isInfinity=function(){return this.inf},_.prototype.add=function(e){if(this.inf)return e;if(e.inf)return this;if(this.eq(e))return this.dbl();if(this.neg().eq(e))return this.curve.point(null,null);if(0===this.x.cmp(e.x))return this.curve.point(null,null);var t=this.y.redSub(e.y);0!==t.cmpn(0)&&(t=t.redMul(this.x.redSub(e.x).redInvm()));var r=t.redSqr().redISub(this.x).redISub(e.x),n=t.redMul(this.x.redSub(r)).redISub(this.y);return this.curve.point(r,n)},_.prototype.dbl=function(){if(this.inf)return this;var e=this.y.redAdd(this.y);if(0===e.cmpn(0))return this.curve.point(null,null);var t=this.curve.a,r=this.x.redSqr(),n=e.redInvm(),o=r.redAdd(r).redIAdd(r).redIAdd(t).redMul(n),i=o.redSqr().redISub(this.x.redAdd(this.x)),a=o.redMul(this.x.redSub(i)).redISub(this.y);return this.curve.point(i,a)},_.prototype.getX=function(){return this.x.fromRed()},_.prototype.getY=function(){return this.y.fromRed()},_.prototype.mul=function(e){return e=new(o())(e,16),this.isInfinity()?this:this._hasDoubles(e)?this.curve._fixedNafMul(this,e):this.curve.endo?this.curve._endoWnafMulAdd([this],[e]):this.curve._wnafMul(this,e)},_.prototype.mulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o):this.curve._wnafMulAdd(1,n,o,2)},_.prototype.jmulAdd=function(e,t,r){var n=[this,t],o=[e,r];return this.curve.endo?this.curve._endoWnafMulAdd(n,o,!0):this.curve._wnafMulAdd(1,n,o,2,!0)},_.prototype.eq=function(e){return this===e||this.inf===e.inf&&(this.inf||0===this.x.cmp(e.x)&&0===this.y.cmp(e.y))},_.prototype.neg=function(e){if(this.inf)return this;var t=this.curve.point(this.x,this.y.redNeg());if(e&&this.precomputed){var r=this.precomputed,n=function(e){return e.neg()};t.precomputed={naf:r.naf&&{wnd:r.naf.wnd,points:r.naf.points.map(n)},doubles:r.doubles&&{step:r.doubles.step,points:r.doubles.points.map(n)}}}return t},_.prototype.toJ=function(){return this.inf?this.curve.jpoint(null,null,null):this.curve.jpoint(this.x,this.y,this.curve.one)},v(S,g.BasePoint),w.prototype.jpoint=function(e,t,r){return new S(this,e,t,r)},S.prototype.toP=function(){if(this.isInfinity())return this.curve.point(null,null);var e=this.z.redInvm(),t=e.redSqr(),r=this.x.redMul(t),n=this.y.redMul(t).redMul(e);return this.curve.point(r,n)},S.prototype.neg=function(){return this.curve.jpoint(this.x,this.y.redNeg(),this.z)},S.prototype.add=function(e){if(this.isInfinity())return e;if(e.isInfinity())return this;var t=e.z.redSqr(),r=this.z.redSqr(),n=this.x.redMul(t),o=e.x.redMul(r),i=this.y.redMul(t.redMul(e.z)),a=e.y.redMul(r.redMul(this.z)),s=n.redSub(o),l=i.redSub(a);if(0===s.cmpn(0))return 0!==l.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var c=s.redSqr(),u=c.redMul(s),d=n.redMul(c),f=l.redSqr().redIAdd(u).redISub(d).redISub(d),p=l.redMul(d.redISub(f)).redISub(i.redMul(u)),h=this.z.redMul(e.z).redMul(s);return this.curve.jpoint(f,p,h)},S.prototype.mixedAdd=function(e){if(this.isInfinity())return e.toJ();if(e.isInfinity())return this;var t=this.z.redSqr(),r=this.x,n=e.x.redMul(t),o=this.y,i=e.y.redMul(t).redMul(this.z),a=r.redSub(n),s=o.redSub(i);if(0===a.cmpn(0))return 0!==s.cmpn(0)?this.curve.jpoint(null,null,null):this.dbl();var l=a.redSqr(),c=l.redMul(a),u=r.redMul(l),d=s.redSqr().redIAdd(c).redISub(u).redISub(u),f=s.redMul(u.redISub(d)).redISub(o.redMul(c)),p=this.z.redMul(a);return this.curve.jpoint(d,f,p)},S.prototype.dblp=function(e){if(0===e)return this;if(this.isInfinity())return this;if(!e)return this.dbl();var t;if(this.curve.zeroA||this.curve.threeA){var r=this;for(t=0;t=0)return!1;if(r.redIAdd(o),0===this.x.cmp(r))return!0}},S.prototype.inspect=function(){return this.isInfinity()?"":""},S.prototype.isInfinity=function(){return 0===this.z.cmpn(0)};var x=s((function(e,t){var r=t;r.base=g,r.short=E,r.mont=null,r.edwards=null})),A=s((function(e,t){var r,n=t,o=d.assert;function i(e){"short"===e.type?this.curve=new x.short(e):"edwards"===e.type?this.curve=new x.edwards(e):this.curve=new x.mont(e),this.g=this.curve.g,this.n=this.curve.n,this.hash=e.hash,o(this.g.validate(),"Invalid curve"),o(this.g.mul(this.n).isInfinity(),"Invalid curve, G*N != O")}function s(e,t){Object.defineProperty(n,e,{configurable:!0,enumerable:!0,get:function(){var r=new i(t);return Object.defineProperty(n,e,{configurable:!0,enumerable:!0,value:r}),r}})}n.PresetCurve=i,s("p192",{type:"short",prime:"p192",p:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff",a:"ffffffff ffffffff ffffffff fffffffe ffffffff fffffffc",b:"64210519 e59c80e7 0fa7e9ab 72243049 feb8deec c146b9b1",n:"ffffffff ffffffff ffffffff 99def836 146bc9b1 b4d22831",hash:a().sha256,gRed:!1,g:["188da80e b03090f6 7cbf20eb 43a18800 f4ff0afd 82ff1012","07192b95 ffc8da78 631011ed 6b24cdd5 73f977a1 1e794811"]}),s("p224",{type:"short",prime:"p224",p:"ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001",a:"ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff fffffffe",b:"b4050a85 0c04b3ab f5413256 5044b0b7 d7bfd8ba 270b3943 2355ffb4",n:"ffffffff ffffffff ffffffff ffff16a2 e0b8f03e 13dd2945 5c5c2a3d",hash:a().sha256,gRed:!1,g:["b70e0cbd 6bb4bf7f 321390b9 4a03c1d3 56c21122 343280d6 115c1d21","bd376388 b5f723fb 4c22dfe6 cd4375a0 5a074764 44d58199 85007e34"]}),s("p256",{type:"short",prime:null,p:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff ffffffff",a:"ffffffff 00000001 00000000 00000000 00000000 ffffffff ffffffff fffffffc",b:"5ac635d8 aa3a93e7 b3ebbd55 769886bc 651d06b0 cc53b0f6 3bce3c3e 27d2604b",n:"ffffffff 00000000 ffffffff ffffffff bce6faad a7179e84 f3b9cac2 fc632551",hash:a().sha256,gRed:!1,g:["6b17d1f2 e12c4247 f8bce6e5 63a440f2 77037d81 2deb33a0 f4a13945 d898c296","4fe342e2 fe1a7f9b 8ee7eb4a 7c0f9e16 2bce3357 6b315ece cbb64068 37bf51f5"]}),s("p384",{type:"short",prime:null,p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 ffffffff",a:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe ffffffff 00000000 00000000 fffffffc",b:"b3312fa7 e23ee7e4 988e056b e3f82d19 181d9c6e fe814112 0314088f 5013875a c656398d 8a2ed19d 2a85c8ed d3ec2aef",n:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff c7634d81 f4372ddf 581a0db2 48b0a77a ecec196a ccc52973",hash:a().sha384,gRed:!1,g:["aa87ca22 be8b0537 8eb1c71e f320ad74 6e1d3b62 8ba79b98 59f741e0 82542a38 5502f25d bf55296c 3a545e38 72760ab7","3617de4a 96262c6f 5d9e98bf 9292dc29 f8f41dbd 289a147c e9da3113 b5f0b8c0 0a60b1ce 1d7e819d 7a431d7c 90ea0e5f"]}),s("p521",{type:"short",prime:null,p:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff",a:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffc",b:"00000051 953eb961 8e1c9a1f 929a21a0 b68540ee a2da725b 99b315f3 b8b48991 8ef109e1 56193951 ec7e937b 1652c0bd 3bb1bf07 3573df88 3d2c34f1 ef451fd4 6b503f00",n:"000001ff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffa 51868783 bf2f966b 7fcc0148 f709a5d0 3bb5c9b8 899c47ae bb6fb71e 91386409",hash:a().sha512,gRed:!1,g:["000000c6 858e06b7 0404e9cd 9e3ecb66 2395b442 9c648139 053fb521 f828af60 6b4d3dba a14b5e77 efe75928 fe1dc127 a2ffa8de 3348b3c1 856a429b f97e7e31 c2e5bd66","00000118 39296a78 9a3bc004 5c8a5fb4 2c7d1bd9 98f54449 579b4468 17afbd17 273e662c 97ee7299 5ef42640 c550b901 3fad0761 353c7086 a272c240 88be9476 9fd16650"]}),s("curve25519",{type:"mont",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"76d06",b:"1",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a().sha256,gRed:!1,g:["9"]}),s("ed25519",{type:"edwards",prime:"p25519",p:"7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed",a:"-1",c:"1",d:"52036cee2b6ffe73 8cc740797779e898 00700a4d4141d8ab 75eb4dca135978a3",n:"1000000000000000 0000000000000000 14def9dea2f79cd6 5812631a5cf5d3ed",hash:a().sha256,gRed:!1,g:["216936d3cd6e53fec0a4e231fdd6dc5c692cc7609525a7b2c9562d608f25d51a","6666666666666666666666666666666666666666666666666666666666666658"]});try{r=null.crash()}catch(e){r=void 0}s("secp256k1",{type:"short",prime:"k256",p:"ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f",a:"0",b:"7",n:"ffffffff ffffffff ffffffff fffffffe baaedce6 af48a03b bfd25e8c d0364141",h:"1",hash:a().sha256,beta:"7ae96a2b657c07106e64479eac3434e99cf0497512f58995c1396c28719501ee",lambda:"5363ad4cc05c30e0a5261c028812645a122e22ea20816678df02967c1b23bd72",basis:[{a:"3086d221a7d46bcde86c90e49284eb15",b:"-e4437ed6010e88286f547fa90abfe4c3"},{a:"114ca50f7a8e2f3f657c1108d9d44cfd8",b:"3086d221a7d46bcde86c90e49284eb15"}],gRed:!1,g:["79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798","483ada7726a3c4655da4fbfc0e1108a8fd17b448a68554199c47d08ffb10d4b8",r]})}));function T(e){if(!(this instanceof T))return new T(e);this.hash=e.hash,this.predResist=!!e.predResist,this.outLen=this.hash.outSize,this.minEntropy=e.minEntropy||this.hash.hmacStrength,this._reseed=null,this.reseedInterval=null,this.K=null,this.V=null;var t=u.toArray(e.entropy,e.entropyEnc||"hex"),r=u.toArray(e.nonce,e.nonceEnc||"hex"),n=u.toArray(e.pers,e.persEnc||"hex");l(t.length>=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._init(t,r,n)}var C=T;T.prototype._init=function(e,t,r){var n=e.concat(t).concat(r);this.K=new Array(this.outLen/8),this.V=new Array(this.outLen/8);for(var o=0;o=this.minEntropy/8,"Not enough entropy. Minimum is: "+this.minEntropy+" bits"),this._update(e.concat(r||[])),this._reseed=1},T.prototype.generate=function(e,t,r,n){if(this._reseed>this.reseedInterval)throw new Error("Reseed is required");"string"!=typeof t&&(n=r,r=t,t=null),r&&(r=u.toArray(r,n||"hex"),this._update(r));for(var o=[];o.length"};var N=d.assert;function I(e,t){if(e instanceof I)return e;this._importDER(e,t)||(N(e.r&&e.s,"Signature without r or s"),this.r=new(o())(e.r,16),this.s=new(o())(e.s,16),void 0===e.recoveryParam?this.recoveryParam=null:this.recoveryParam=e.recoveryParam)}var M=I;function P(){this.place=0}function D(e,t){var r=e[t.place++];if(!(128&r))return r;var n=15&r;if(0===n||n>4)return!1;for(var o=0,i=0,a=t.place;i>>=0;return!(o<=127)&&(t.place=a,o)}function L(e){for(var t=0,r=e.length-1;!e[t]&&!(128&e[t+1])&&t>>3);for(e.push(128|r);--r;)e.push(t>>>(r<<3)&255);e.push(t)}}I.prototype._importDER=function(e,t){e=d.toArray(e,t);var r=new P;if(48!==e[r.place++])return!1;var n=D(e,r);if(!1===n)return!1;if(n+r.place!==e.length)return!1;if(2!==e[r.place++])return!1;var i=D(e,r);if(!1===i)return!1;var a=e.slice(r.place,i+r.place);if(r.place+=i,2!==e[r.place++])return!1;var s=D(e,r);if(!1===s)return!1;if(e.length!==s+r.place)return!1;var l=e.slice(r.place,s+r.place);if(0===a[0]){if(!(128&a[1]))return!1;a=a.slice(1)}if(0===l[0]){if(!(128&l[1]))return!1;l=l.slice(1)}return this.r=new(o())(a),this.s=new(o())(l),this.recoveryParam=null,!0},I.prototype.toDER=function(e){var t=this.r.toArray(),r=this.s.toArray();for(128&t[0]&&(t=[0].concat(t)),128&r[0]&&(r=[0].concat(r)),t=L(t),r=L(r);!(r[0]||128&r[1]);)r=r.slice(1);var n=[2];F(n,t.length),(n=n.concat(t)).push(2),F(n,r.length);var o=n.concat(r),i=[48];return F(i,o.length),i=i.concat(o),d.encode(i,e)};var B=function(){throw new Error("unsupported")},U=d.assert;function j(e){if(!(this instanceof j))return new j(e);"string"==typeof e&&(U(Object.prototype.hasOwnProperty.call(A,e),"Unknown curve "+e),e=A[e]),e instanceof A.PresetCurve&&(e={curve:e}),this.curve=e.curve.curve,this.n=this.curve.n,this.nh=this.n.ushrn(1),this.g=this.curve.g,this.g=e.curve.g,this.g.precompute(e.curve.n.bitLength()+1),this.hash=e.hash||e.curve.hash}var z=j;j.prototype.keyPair=function(e){return new R(this,e)},j.prototype.keyFromPrivate=function(e,t){return R.fromPrivate(this,e,t)},j.prototype.keyFromPublic=function(e,t){return R.fromPublic(this,e,t)},j.prototype.genKeyPair=function(e){e||(e={});for(var t=new C({hash:this.hash,pers:e.pers,persEnc:e.persEnc||"utf8",entropy:e.entropy||B(this.hash.hmacStrength),entropyEnc:e.entropy&&e.entropyEnc||"utf8",nonce:this.n.toArray()}),r=this.n.byteLength(),n=this.n.sub(new(o())(2));;){var i=new(o())(t.generate(r));if(!(i.cmp(n)>0))return i.iaddn(1),this.keyFromPrivate(i)}},j.prototype._truncateToN=function(e,t){var r=8*e.byteLength()-this.n.bitLength();return r>0&&(e=e.ushrn(r)),!t&&e.cmp(this.n)>=0?e.sub(this.n):e},j.prototype.sign=function(e,t,r,n){"object"==typeof r&&(n=r,r=null),n||(n={}),t=this.keyFromPrivate(t,r),e=this._truncateToN(new(o())(e,16));for(var i=this.n.byteLength(),a=t.getPrivate().toArray("be",i),s=e.toArray("be",i),l=new C({hash:this.hash,entropy:a,nonce:s,pers:n.pers,persEnc:n.persEnc||"utf8"}),c=this.n.sub(new(o())(1)),u=0;;u++){var d=n.k?n.k(u):new(o())(l.generate(this.n.byteLength()));if(!((d=this._truncateToN(d,!0)).cmpn(1)<=0||d.cmp(c)>=0)){var f=this.g.mul(d);if(!f.isInfinity()){var p=f.getX(),h=p.umod(this.n);if(0!==h.cmpn(0)){var m=d.invm(this.n).mul(h.mul(t.getPrivate()).iadd(e));if(0!==(m=m.umod(this.n)).cmpn(0)){var g=(f.getY().isOdd()?1:0)|(0!==p.cmp(h)?2:0);return n.canonical&&m.cmp(this.nh)>0&&(m=this.n.sub(m),g^=1),new M({r:h,s:m,recoveryParam:g})}}}}}},j.prototype.verify=function(e,t,r,n){e=this._truncateToN(new(o())(e,16)),r=this.keyFromPublic(r,n);var i=(t=new M(t,"hex")).r,a=t.s;if(i.cmpn(1)<0||i.cmp(this.n)>=0)return!1;if(a.cmpn(1)<0||a.cmp(this.n)>=0)return!1;var s,l=a.invm(this.n),c=l.mul(e).umod(this.n),u=l.mul(i).umod(this.n);return this.curve._maxwellTrick?!(s=this.g.jmulAdd(c,r.getPublic(),u)).isInfinity()&&s.eqXToP(i):!(s=this.g.mulAdd(c,r.getPublic(),u)).isInfinity()&&0===s.getX().umod(this.n).cmp(i)},j.prototype.recoverPubKey=function(e,t,r,n){U((3&r)===r,"The recovery param is more than two bits"),t=new M(t,n);var i=this.n,a=new(o())(e),s=t.r,l=t.s,c=1&r,u=r>>1;if(s.cmp(this.curve.p.umod(this.curve.n))>=0&&u)throw new Error("Unable to find sencond key candinate");s=u?this.curve.pointFromX(s.add(this.curve.n),c):this.curve.pointFromX(s,c);var d=t.r.invm(i),f=i.sub(a).mul(d).umod(i),p=l.mul(d).umod(i);return this.g.mulAdd(f,s,p)},j.prototype.getKeyRecoveryParam=function(e,t,r,n){if(null!==(t=new M(t,n)).recoveryParam)return t.recoveryParam;for(var o=0;o<4;o++){var i;try{i=this.recoverPubKey(e,t,o)}catch(e){continue}if(i.eq(r))return o}throw new Error("Unable to find valid recovery factor")};var H=s((function(e,t){var r=t;r.version="6.5.4",r.utils=d,r.rand=function(){throw new Error("unsupported")},r.curve=x,r.curves=A,r.ec=z,r.eddsa=null})).ec,G=r(38905),W=r(88943);const q=new(r(7720).Vy)("signing-key/5.7.0");let V=null;function Y(){return V||(V=new H("secp256k1")),V}class K{constructor(e){(0,W.yY)(this,"curve","secp256k1"),(0,W.yY)(this,"privateKey",(0,G.c$)(e)),32!==(0,G.cm)(this.privateKey)&&q.throwArgumentError("invalid private key","privateKey","[[ REDACTED ]]");const t=Y().keyFromPrivate((0,G.k9)(this.privateKey));(0,W.yY)(this,"publicKey","0x"+t.getPublic(!1,"hex")),(0,W.yY)(this,"compressedPublicKey","0x"+t.getPublic(!0,"hex")),(0,W.yY)(this,"_isSigningKey",!0)}_addPoint(e){const t=Y().keyFromPublic((0,G.k9)(this.publicKey)),r=Y().keyFromPublic((0,G.k9)(e));return"0x"+t.pub.add(r.pub).encodeCompressed("hex")}signDigest(e){const t=Y().keyFromPrivate((0,G.k9)(this.privateKey)),r=(0,G.k9)(e);32!==r.length&&q.throwArgumentError("bad digest length","digest",e);const n=t.sign(r,{canonical:!0});return(0,G.Pc)({recoveryParam:n.recoveryParam,r:(0,G.bj)("0x"+n.r.toString(16),32),s:(0,G.bj)("0x"+n.s.toString(16),32)})}computeSharedSecret(e){const t=Y().keyFromPrivate((0,G.k9)(this.privateKey)),r=Y().keyFromPublic((0,G.k9)(Z(e)));return(0,G.bj)("0x"+t.derive(r.getPublic()).toString(16),32)}static isSigningKey(e){return!(!e||!e._isSigningKey)}}function X(e,t){const r=(0,G.Pc)(t),n={r:(0,G.k9)(r.r),s:(0,G.k9)(r.s)};return"0x"+Y().recoverPubKey((0,G.k9)(e),n,r.recoveryParam).encode("hex",!1)}function Z(e,t){const r=(0,G.k9)(e);if(32===r.length){const e=new K(r);return t?"0x"+Y().keyFromPrivate(r).getPublic(!0,"hex"):e.publicKey}return 33===r.length?t?(0,G.c$)(r):"0x"+Y().keyFromPublic(r).getPublic(!1,"hex"):65===r.length?t?"0x"+Y().keyFromPublic(r).getPublic(!0,"hex"):(0,G.c$)(r):q.throwArgumentError("invalid public or private key","key","[REDACTED]")}},97664:(e,t,r)=>{"use strict";r.d(t,{dz:()=>i,d5:()=>l,_E:()=>a,Wj:()=>f,H5:()=>p,YW:()=>u,dg:()=>m,_v:()=>h});var n=r(38905);const o=new(r(7720).Vy)("strings/5.7.0");var i,a;function s(e,t,r,n,o){if(e===a.BAD_PREFIX||e===a.UNEXPECTED_CONTINUE){let e=0;for(let n=t+1;n>6==2;n++)e++;return e}return e===a.OVERRUN?r.length-t-1:0}!function(e){e.current="",e.NFC="NFC",e.NFD="NFD",e.NFKC="NFKC",e.NFKD="NFKD"}(i||(i={})),function(e){e.UNEXPECTED_CONTINUE="unexpected continuation byte",e.BAD_PREFIX="bad codepoint prefix",e.OVERRUN="string overrun",e.MISSING_CONTINUE="missing continuation byte",e.OUT_OF_RANGE="out of UTF-8 range",e.UTF16_SURROGATE="UTF-16 surrogate",e.OVERLONG="overlong representation"}(a||(a={}));const l=Object.freeze({error:function(e,t,r,n,i){return o.throwArgumentError(`invalid codepoint at offset ${t}; ${e}`,"bytes",r)},ignore:s,replace:function(e,t,r,n,o){return e===a.OVERLONG?(n.push(o),0):(n.push(65533),s(e,t,r))}});function c(e,t){null==t&&(t=l.error),e=(0,n.k9)(e);const r=[];let o=0;for(;o>7)){r.push(n);continue}let i=null,s=null;if(192==(224&n))i=1,s=127;else if(224==(240&n))i=2,s=2047;else{if(240!=(248&n)){o+=t(128==(192&n)?a.UNEXPECTED_CONTINUE:a.BAD_PREFIX,o-1,e,r);continue}i=3,s=65535}if(o-1+i>=e.length){o+=t(a.OVERRUN,o-1,e,r);continue}let l=n&(1<<8-i-1)-1;for(let n=0;n1114111?o+=t(a.OUT_OF_RANGE,o-1-i,e,r,l):l>=55296&&l<=57343?o+=t(a.UTF16_SURROGATE,o-1-i,e,r,l):l<=s?o+=t(a.OVERLONG,o-1-i,e,r,l):r.push(l))}return r}function u(e,t=i.current){t!=i.current&&(o.checkNormalize(),e=e.normalize(t));let r=[];for(let t=0;t>6|192),r.push(63&n|128);else if(55296==(64512&n)){t++;const o=e.charCodeAt(t);if(t>=e.length||56320!=(64512&o))throw new Error("invalid utf-8 string");const i=65536+((1023&n)<<10)+(1023&o);r.push(i>>18|240),r.push(i>>12&63|128),r.push(i>>6&63|128),r.push(63&i|128)}else r.push(n>>12|224),r.push(n>>6&63|128),r.push(63&n|128)}return(0,n.k9)(r)}function d(e){const t="0000"+e.toString(16);return"\\u"+t.substring(t.length-4)}function f(e,t){return'"'+c(e,t).map((e=>{if(e<256){switch(e){case 8:return"\\b";case 9:return"\\t";case 10:return"\\n";case 13:return"\\r";case 34:return'\\"';case 92:return"\\\\"}if(e>=32&&e<127)return String.fromCharCode(e)}return e<=65535?d(e):d(55296+((e-=65536)>>10&1023))+d(56320+(1023&e))})).join("")+'"'}function p(e){return e.map((e=>e<=65535?String.fromCharCode(e):(e-=65536,String.fromCharCode(55296+(e>>10&1023),56320+(1023&e))))).join("")}function h(e,t){return p(c(e,t))}function m(e,t=i.current){return c(u(e,t))}},55523:(e,t,r)=>{"use strict";r.d(t,{Eh:()=>p,$2:()=>_,Kt:()=>v,qg:()=>k,x_:()=>y,lK:()=>T});var n=r(58908),o=r(37457),i=r(38905),a=r(43514),s=r(50234),l=r(88943),c=r(42546),u=r(11566),d=r(7720);const f=new d.Vy("transactions/5.7.0");var p;function h(e){return"0x"===e?null:(0,n.bv)(e)}function m(e){return"0x"===e?a.XK:o.gH.from(e)}!function(e){e[e.legacy=0]="legacy",e[e.eip2930=1]="eip2930",e[e.eip1559=2]="eip1559"}(p||(p={}));const g=[{name:"nonce",maxLength:32,numeric:!0},{name:"gasPrice",maxLength:32,numeric:!0},{name:"gasLimit",maxLength:32,numeric:!0},{name:"to",length:20},{name:"value",maxLength:32,numeric:!0},{name:"data"}],b={chainId:!0,data:!0,gasLimit:!0,gasPrice:!0,nonce:!0,to:!0,type:!0,value:!0};function v(e){const t=(0,u.uN)(e);return(0,n.bv)((0,i.Ab)((0,s.S)((0,i.Ab)(t,1)),12))}function y(e,t){return v((0,u.jL)((0,i.k9)(e),t))}function w(e,t){const r=(0,i.gr)(o.gH.from(e).toHexString());return r.length>32&&f.throwArgumentError("invalid length for "+t,"transaction:"+t,e),r}function E(e,t){return{address:(0,n.bv)(e),storageKeys:(t||[]).map(((t,r)=>(32!==(0,i.cm)(t)&&f.throwArgumentError("invalid access list storageKey",`accessList[${e}:${r}]`,t),t.toLowerCase())))}}function _(e){if(Array.isArray(e))return e.map(((e,t)=>Array.isArray(e)?(e.length>2&&f.throwArgumentError("access list expected to be [ address, storageKeys[] ]",`value[${t}]`,e),E(e[0],e[1])):E(e.address,e.storageKeys)));const t=Object.keys(e).map((t=>{const r=e[t].reduce(((e,t)=>(e[t]=!0,e)),{});return E(t,Object.keys(r).sort())}));return t.sort(((e,t)=>e.address.localeCompare(t.address))),t}function S(e){return _(e).map((e=>[e.address,e.storageKeys]))}function x(e,t){if(null!=e.gasPrice){const t=o.gH.from(e.gasPrice),r=o.gH.from(e.maxFeePerGas||0);t.eq(r)||f.throwArgumentError("mismatch EIP-1559 gasPrice != maxFeePerGas","tx",{gasPrice:t,maxFeePerGas:r})}const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.maxPriorityFeePerGas||0,"maxPriorityFeePerGas"),w(e.maxFeePerGas||0,"maxFeePerGas"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.bv)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",S(e.accessList||[])];if(t){const e=(0,i.Pc)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,i.gr)(e.r)),r.push((0,i.gr)(e.s))}return(0,i.qn)(["0x02",c.encode(r)])}function A(e,t){const r=[w(e.chainId||0,"chainId"),w(e.nonce||0,"nonce"),w(e.gasPrice||0,"gasPrice"),w(e.gasLimit||0,"gasLimit"),null!=e.to?(0,n.bv)(e.to):"0x",w(e.value||0,"value"),e.data||"0x",S(e.accessList||[])];if(t){const e=(0,i.Pc)(t);r.push(w(e.recoveryParam,"recoveryParam")),r.push((0,i.gr)(e.r)),r.push((0,i.gr)(e.s))}return(0,i.qn)(["0x01",c.encode(r)])}function T(e,t){if(null==e.type||0===e.type)return null!=e.accessList&&f.throwArgumentError("untyped transactions do not support accessList; include type: 1","transaction",e),function(e,t){(0,l.qN)(e,b);const r=[];g.forEach((function(t){let n=e[t.name]||[];const o={};t.numeric&&(o.hexPad="left"),n=(0,i.k9)((0,i.c$)(n,o)),t.length&&n.length!==t.length&&n.length>0&&f.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n),t.maxLength&&(n=(0,i.gr)(n),n.length>t.maxLength&&f.throwArgumentError("invalid length for "+t.name,"transaction:"+t.name,n)),r.push((0,i.c$)(n))}));let n=0;if(null!=e.chainId?(n=e.chainId,"number"!=typeof n&&f.throwArgumentError("invalid transaction.chainId","transaction",e)):t&&!(0,i.f)(t)&&t.v>28&&(n=Math.floor((t.v-35)/2)),0!==n&&(r.push((0,i.c$)(n)),r.push("0x"),r.push("0x")),!t)return c.encode(r);const o=(0,i.Pc)(t);let a=27+o.recoveryParam;return 0!==n?(r.pop(),r.pop(),r.pop(),a+=2*n+8,o.v>28&&o.v!==a&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t)):o.v!==a&&f.throwArgumentError("transaction.chainId/signature.v mismatch","signature",t),r.push((0,i.c$)(a)),r.push((0,i.gr)((0,i.k9)(o.r))),r.push((0,i.gr)((0,i.k9)(o.s))),c.encode(r)}(e,t);switch(e.type){case 1:return A(e,t);case 2:return x(e,t)}return f.throwError(`unsupported transaction type: ${e.type}`,d.Vy.errors.UNSUPPORTED_OPERATION,{operation:"serializeTransaction",transactionType:e.type})}function C(e,t,r){try{const r=m(t[0]).toNumber();if(0!==r&&1!==r)throw new Error("bad recid");e.v=r}catch(e){f.throwArgumentError("invalid v for transaction type: 1","v",t[0])}e.r=(0,i.bj)(t[1],32),e.s=(0,i.bj)(t[2],32);try{const t=(0,s.S)(r(e));e.from=y(t,{r:e.r,s:e.s,recoveryParam:e.v})}catch(e){}}function k(e){const t=(0,i.k9)(e);if(t[0]>127)return function(e){const t=c.decode(e);9!==t.length&&6!==t.length&&f.throwArgumentError("invalid raw transaction","rawTransaction",e);const r={nonce:m(t[0]).toNumber(),gasPrice:m(t[1]),gasLimit:m(t[2]),to:h(t[3]),value:m(t[4]),data:t[5],chainId:0};if(6===t.length)return r;try{r.v=o.gH.from(t[6]).toNumber()}catch(e){return r}if(r.r=(0,i.bj)(t[7],32),r.s=(0,i.bj)(t[8],32),o.gH.from(r.r).isZero()&&o.gH.from(r.s).isZero())r.chainId=r.v,r.v=0;else{r.chainId=Math.floor((r.v-35)/2),r.chainId<0&&(r.chainId=0);let n=r.v-27;const o=t.slice(0,6);0!==r.chainId&&(o.push((0,i.c$)(r.chainId)),o.push("0x"),o.push("0x"),n-=2*r.chainId+8);const a=(0,s.S)(c.encode(o));try{r.from=y(a,{r:(0,i.c$)(r.r),s:(0,i.c$)(r.s),recoveryParam:n})}catch(e){}r.hash=(0,s.S)(e)}return r.type=null,r}(t);switch(t[0]){case 1:return function(e){const t=c.decode(e.slice(1));8!==t.length&&11!==t.length&&f.throwArgumentError("invalid component count for transaction type: 1","payload",(0,i.c$)(e));const r={type:1,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),gasPrice:m(t[2]),gasLimit:m(t[3]),to:h(t[4]),value:m(t[5]),data:t[6],accessList:_(t[7])};return 8===t.length||(r.hash=(0,s.S)(e),C(r,t.slice(8),A)),r}(t);case 2:return function(e){const t=c.decode(e.slice(1));9!==t.length&&12!==t.length&&f.throwArgumentError("invalid component count for transaction type: 2","payload",(0,i.c$)(e));const r=m(t[2]),n=m(t[3]),o={type:2,chainId:m(t[0]).toNumber(),nonce:m(t[1]).toNumber(),maxPriorityFeePerGas:r,maxFeePerGas:n,gasPrice:null,gasLimit:m(t[4]),to:h(t[5]),value:m(t[6]),data:t[7],accessList:_(t[8])};return 9===t.length||(o.hash=(0,s.S)(e),C(o,t.slice(9),x)),o}(t)}return f.throwError(`unsupported transaction type: ${t[0]}`,d.Vy.errors.UNSUPPORTED_OPERATION,{operation:"parseTransaction",transactionType:t[0]})}},6639:(e,t,r)=>{"use strict";r.d(t,{Em:()=>h,x6:()=>m,wt:()=>g});var n=r(90531),o=r(38905),i=r(88943),a=r(97664),s=r(7720),l=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};function c(e,t){return l(this,void 0,void 0,(function*(){null==t&&(t={});const r={method:t.method||"GET",headers:t.headers||{},body:t.body||void 0};if(!0!==t.skipFetchSetup&&(r.mode="cors",r.cache="no-cache",r.credentials="same-origin",r.redirect="follow",r.referrer="client"),null!=t.fetchOptions){const e=t.fetchOptions;e.mode&&(r.mode=e.mode),e.cache&&(r.cache=e.cache),e.credentials&&(r.credentials=e.credentials),e.redirect&&(r.redirect=e.redirect),e.referrer&&(r.referrer=e.referrer)}const n=yield fetch(e,r),i=yield n.arrayBuffer(),a={};return n.headers.forEach?n.headers.forEach(((e,t)=>{a[t.toLowerCase()]=e})):n.headers.keys().forEach((e=>{a[e.toLowerCase()]=n.headers.get(e)})),{headers:a,statusCode:n.status,statusMessage:n.statusText,body:(0,o.k9)(new Uint8Array(i))}}))}var u=function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};const d=new s.Vy("web/5.7.1");function f(e){return new Promise((t=>{setTimeout(t,e)}))}function p(e,t){if(null==e)return null;if("string"==typeof e)return e;if((0,o.f)(e)){if(t&&("text"===t.split("/")[0]||"application/json"===t.split(";")[0].trim()))try{return(0,a._v)(e)}catch(e){}return(0,o.c$)(e)}return e}function h(e,t,r){const o="object"==typeof e&&null!=e.throttleLimit?e.throttleLimit:12;d.assertArgument(o>0&&o%1==0,"invalid connection throttle limit","connection.throttleLimit",o);const l="object"==typeof e?e.throttleCallback:null,h="object"==typeof e&&"number"==typeof e.throttleSlotInterval?e.throttleSlotInterval:100;d.assertArgument(h>0&&h%1==0,"invalid connection throttle slot interval","connection.throttleSlotInterval",h);const m="object"==typeof e&&!!e.errorPassThrough,g={};let b=null;const v={method:"GET"};let y=!1,w=12e4;if("string"==typeof e)b=e;else if("object"==typeof e){if(null!=e&&null!=e.url||d.throwArgumentError("missing URL","connection.url",e),b=e.url,"number"==typeof e.timeout&&e.timeout>0&&(w=e.timeout),e.headers)for(const t in e.headers)g[t.toLowerCase()]={key:t,value:String(e.headers[t])},["if-none-match","if-modified-since"].indexOf(t.toLowerCase())>=0&&(y=!0);if(v.allowGzip=!!e.allowGzip,null!=e.user&&null!=e.password){"https:"!==b.substring(0,6)&&!0!==e.allowInsecureAuthentication&&d.throwError("basic authentication requires a secure https url",s.Vy.errors.INVALID_ARGUMENT,{argument:"url",url:b,user:e.user,password:"[REDACTED]"});const t=e.user+":"+e.password;g.authorization={key:"Authorization",value:"Basic "+(0,n.l)((0,a.YW)(t))}}null!=e.skipFetchSetup&&(v.skipFetchSetup=!!e.skipFetchSetup),null!=e.fetchOptions&&(v.fetchOptions=(0,i.Ic)(e.fetchOptions))}const E=new RegExp("^data:([^;:]*)?(;base64)?,(.*)$","i"),_=b?b.match(E):null;if(_)try{const e={statusCode:200,statusMessage:"OK",headers:{"content-type":_[1]||"text/plain"},body:_[2]?(0,n.D)(_[3]):(S=_[3],(0,a.YW)(S.replace(/%([0-9a-f][0-9a-f])/gi,((e,t)=>String.fromCharCode(parseInt(t,16))))))};let t=e.body;return r&&(t=r(e.body,e)),Promise.resolve(t)}catch(e){d.throwError("processing response error",s.Vy.errors.SERVER_ERROR,{body:p(_[1],_[2]),error:e,requestBody:null,requestMethod:"GET",url:b})}var S;t&&(v.method="POST",v.body=t,null==g["content-type"]&&(g["content-type"]={key:"Content-Type",value:"application/octet-stream"}),null==g["content-length"]&&(g["content-length"]={key:"Content-Length",value:String(t.length)}));const x={};Object.keys(g).forEach((e=>{const t=g[e];x[t.key]=t.value})),v.headers=x;const A=function(){let e=null;return{promise:new Promise((function(t,r){w&&(e=setTimeout((()=>{null!=e&&(e=null,r(d.makeError("timeout",s.Vy.errors.TIMEOUT,{requestBody:p(v.body,x["content-type"]),requestMethod:v.method,timeout:w,url:b})))}),w))})),cancel:function(){null!=e&&(clearTimeout(e),e=null)}}}(),T=function(){return u(this,void 0,void 0,(function*(){for(let e=0;e=300)&&(A.cancel(),d.throwError("bad response",s.Vy.errors.SERVER_ERROR,{status:t.statusCode,headers:t.headers,body:p(n,t.headers?t.headers["content-type"]:null),requestBody:p(v.body,x["content-type"]),requestMethod:v.method,url:b})),r)try{const e=yield r(n,t);return A.cancel(),e}catch(r){if(r.throttleRetry&&e"content-type"===e.toLowerCase())).length||(r.headers=(0,i.Ic)(r.headers),r.headers["content-type"]="application/json"):r.headers={"content-type":"application/json"},e=r}return h(e,n,((e,t)=>{let n=null;if(null!=e)try{n=JSON.parse((0,a._v)(e))}catch(t){d.throwError("invalid JSON",s.Vy.errors.SERVER_ERROR,{body:e,error:t})}return r&&(n=r(n,t)),n}))}function g(e,t){return t||(t={}),null==(t=(0,i.Ic)(t)).floor&&(t.floor=0),null==t.ceiling&&(t.ceiling=1e4),null==t.interval&&(t.interval=250),new Promise((function(r,n){let o=null,i=!1;const a=()=>!i&&(i=!0,o&&clearTimeout(o),!0);t.timeout&&(o=setTimeout((()=>{a()&&n(new Error("timeout"))}),t.timeout));const s=t.retryLimit;let l=0;!function o(){return e().then((function(e){if(void 0!==e)a()&&r(e);else if(t.oncePoll)t.oncePoll.once("poll",o);else if(t.onceBlock)t.onceBlock.once("block",o);else if(!i){if(l++,l>s)return void(a()&&n(new Error("retry limit reached")));let e=t.interval*parseInt(String(Math.random()*Math.pow(2,l)));et.ceiling&&(e=t.ceiling),setTimeout(o,e)}return null}),(function(e){a()&&n(e)}))}()}))}},82535:(e,t,r)=>{"use strict";r.r(t),r.d(t,{arrow:()=>_e,autoPlacement:()=>de,autoUpdate:()=>ue,computePosition:()=>ye,detectOverflow:()=>C,flip:()=>pe,getOverflowAncestors:()=>K,hide:()=>me,inline:()=>be,limitShift:()=>ve,offset:()=>N,platform:()=>ce,shift:()=>fe,size:()=>he,useFloating:()=>ke});const n=["top","right","bottom","left"],o=["start","end"],i=n.reduce(((e,t)=>e.concat(t,t+"-"+o[0],t+"-"+o[1])),[]),a=Math.min,s=Math.max,l=Math.round,c=Math.floor,u=e=>({x:e,y:e}),d={left:"right",right:"left",bottom:"top",top:"bottom"},f={start:"end",end:"start"};function p(e,t,r){return s(e,a(t,r))}function h(e,t){return"function"==typeof e?e(t):e}function m(e){return e.split("-")[0]}function g(e){return e.split("-")[1]}function b(e){return"x"===e?"y":"x"}function v(e){return"y"===e?"height":"width"}function y(e){return["top","bottom"].includes(m(e))?"y":"x"}function w(e){return b(y(e))}function E(e,t,r){void 0===r&&(r=!1);const n=g(e),o=w(e),i=v(o);let a="x"===o?n===(r?"end":"start")?"right":"left":"start"===n?"bottom":"top";return t.reference[i]>t.floating[i]&&(a=S(a)),[a,S(a)]}function _(e){return e.replace(/start|end/g,(e=>f[e]))}function S(e){return e.replace(/left|right|bottom|top/g,(e=>d[e]))}function x(e){return"number"!=typeof e?function(e){return{top:0,right:0,bottom:0,left:0,...e}}(e):{top:e,right:e,bottom:e,left:e}}function A(e){return{...e,top:e.y,left:e.x,right:e.x+e.width,bottom:e.y+e.height}}function T(e,t,r){let{reference:n,floating:o}=e;const i=y(t),a=w(t),s=v(a),l=m(t),c="y"===i,u=n.x+n.width/2-o.width/2,d=n.y+n.height/2-o.height/2,f=n[s]/2-o[s]/2;let p;switch(l){case"top":p={x:u,y:n.y-o.height};break;case"bottom":p={x:u,y:n.y+n.height};break;case"right":p={x:n.x+n.width,y:d};break;case"left":p={x:n.x-o.width,y:d};break;default:p={x:n.x,y:n.y}}switch(g(t)){case"start":p[a]-=f*(r&&c?-1:1);break;case"end":p[a]+=f*(r&&c?-1:1)}return p}async function C(e,t){var r;void 0===t&&(t={});const{x:n,y:o,platform:i,rects:a,elements:s,strategy:l}=e,{boundary:c="clippingAncestors",rootBoundary:u="viewport",elementContext:d="floating",altBoundary:f=!1,padding:p=0}=h(t,e),m=x(p),g=s[f?"floating"===d?"reference":"floating":d],b=A(await i.getClippingRect({element:null==(r=await(null==i.isElement?void 0:i.isElement(g)))||r?g:g.contextElement||await(null==i.getDocumentElement?void 0:i.getDocumentElement(s.floating)),boundary:c,rootBoundary:u,strategy:l})),v="floating"===d?{...a.floating,x:n,y:o}:a.reference,y=await(null==i.getOffsetParent?void 0:i.getOffsetParent(s.floating)),w=await(null==i.isElement?void 0:i.isElement(y))&&await(null==i.getScale?void 0:i.getScale(y))||{x:1,y:1},E=A(i.convertOffsetParentRelativeRectToViewportRelativeRect?await i.convertOffsetParentRelativeRectToViewportRelativeRect({elements:s,rect:v,offsetParent:y,strategy:l}):v);return{top:(b.top-E.top+m.top)/w.y,bottom:(E.bottom-b.bottom+m.bottom)/w.y,left:(b.left-E.left+m.left)/w.x,right:(E.right-b.right+m.right)/w.x}}function k(e,t){return{top:e.top-t.height,right:e.right-t.width,bottom:e.bottom-t.height,left:e.left-t.width}}function O(e){return n.some((t=>e[t]>=0))}function R(e){const t=a(...e.map((e=>e.left))),r=a(...e.map((e=>e.top)));return{x:t,y:r,width:s(...e.map((e=>e.right)))-t,height:s(...e.map((e=>e.bottom)))-r}}const N=function(e){return void 0===e&&(e=0),{name:"offset",options:e,async fn(t){var r,n;const{x:o,y:i,placement:a,middlewareData:s}=t,l=await async function(e,t){const{placement:r,platform:n,elements:o}=e,i=await(null==n.isRTL?void 0:n.isRTL(o.floating)),a=m(r),s=g(r),l="y"===y(r),c=["left","top"].includes(a)?-1:1,u=i&&l?-1:1,d=h(t,e);let{mainAxis:f,crossAxis:p,alignmentAxis:b}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:0,crossAxis:0,alignmentAxis:null,...d};return s&&"number"==typeof b&&(p="end"===s?-1*b:b),l?{x:p*u,y:f*c}:{x:f*c,y:p*u}}(t,e);return a===(null==(r=s.offset)?void 0:r.placement)&&null!=(n=s.arrow)&&n.alignmentOffset?{}:{x:o+l.x,y:i+l.y,data:{...l,placement:a}}}}};function I(e){return D(e)?(e.nodeName||"").toLowerCase():"#document"}function M(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function P(e){var t;return null==(t=(D(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function D(e){return e instanceof Node||e instanceof M(e).Node}function L(e){return e instanceof Element||e instanceof M(e).Element}function F(e){return e instanceof HTMLElement||e instanceof M(e).HTMLElement}function B(e){return"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof M(e).ShadowRoot)}function U(e){const{overflow:t,overflowX:r,overflowY:n,display:o}=W(e);return/auto|scroll|overlay|hidden|clip/.test(t+n+r)&&!["inline","contents"].includes(o)}function j(e){return["table","td","th"].includes(I(e))}function z(e){const t=H(),r=W(e);return"none"!==r.transform||"none"!==r.perspective||!!r.containerType&&"normal"!==r.containerType||!t&&!!r.backdropFilter&&"none"!==r.backdropFilter||!t&&!!r.filter&&"none"!==r.filter||["transform","perspective","filter"].some((e=>(r.willChange||"").includes(e)))||["paint","layout","strict","content"].some((e=>(r.contain||"").includes(e)))}function H(){return!("undefined"==typeof CSS||!CSS.supports)&&CSS.supports("-webkit-backdrop-filter","none")}function G(e){return["html","body","#document"].includes(I(e))}function W(e){return M(e).getComputedStyle(e)}function q(e){return L(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.pageXOffset,scrollTop:e.pageYOffset}}function V(e){if("html"===I(e))return e;const t=e.assignedSlot||e.parentNode||B(e)&&e.host||P(e);return B(t)?t.host:t}function Y(e){const t=V(e);return G(t)?e.ownerDocument?e.ownerDocument.body:e.body:F(t)&&U(t)?t:Y(t)}function K(e,t,r){var n;void 0===t&&(t=[]),void 0===r&&(r=!0);const o=Y(e),i=o===(null==(n=e.ownerDocument)?void 0:n.body),a=M(o);return i?t.concat(a,a.visualViewport||[],U(o)?o:[],a.frameElement&&r?K(a.frameElement):[]):t.concat(o,K(o,[],r))}function X(e){const t=W(e);let r=parseFloat(t.width)||0,n=parseFloat(t.height)||0;const o=F(e),i=o?e.offsetWidth:r,a=o?e.offsetHeight:n,s=l(r)!==i||l(n)!==a;return s&&(r=i,n=a),{width:r,height:n,$:s}}function Z(e){return L(e)?e:e.contextElement}function Q(e){const t=Z(e);if(!F(t))return u(1);const r=t.getBoundingClientRect(),{width:n,height:o,$:i}=X(t);let a=(i?l(r.width):r.width)/n,s=(i?l(r.height):r.height)/o;return a&&Number.isFinite(a)||(a=1),s&&Number.isFinite(s)||(s=1),{x:a,y:s}}const J=u(0);function $(e){const t=M(e);return H()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:J}function ee(e,t,r,n){void 0===t&&(t=!1),void 0===r&&(r=!1);const o=e.getBoundingClientRect(),i=Z(e);let a=u(1);t&&(n?L(n)&&(a=Q(n)):a=Q(e));const s=function(e,t,r){return void 0===t&&(t=!1),!(!r||t&&r!==M(e))&&t}(i,r,n)?$(i):u(0);let l=(o.left+s.x)/a.x,c=(o.top+s.y)/a.y,d=o.width/a.x,f=o.height/a.y;if(i){const e=M(i),t=n&&L(n)?M(n):n;let r=e,o=r.frameElement;for(;o&&n&&t!==r;){const e=Q(o),t=o.getBoundingClientRect(),n=W(o),i=t.left+(o.clientLeft+parseFloat(n.paddingLeft))*e.x,a=t.top+(o.clientTop+parseFloat(n.paddingTop))*e.y;l*=e.x,c*=e.y,d*=e.x,f*=e.y,l+=i,c+=a,r=M(o),o=r.frameElement}}return A({width:d,height:f,x:l,y:c})}const te=[":popover-open",":modal"];function re(e){return te.some((t=>{try{return e.matches(t)}catch(e){return!1}}))}function ne(e){return ee(P(e)).left+q(e).scrollLeft}function oe(e,t,r){let n;if("viewport"===t)n=function(e,t){const r=M(e),n=P(e),o=r.visualViewport;let i=n.clientWidth,a=n.clientHeight,s=0,l=0;if(o){i=o.width,a=o.height;const e=H();(!e||e&&"fixed"===t)&&(s=o.offsetLeft,l=o.offsetTop)}return{width:i,height:a,x:s,y:l}}(e,r);else if("document"===t)n=function(e){const t=P(e),r=q(e),n=e.ownerDocument.body,o=s(t.scrollWidth,t.clientWidth,n.scrollWidth,n.clientWidth),i=s(t.scrollHeight,t.clientHeight,n.scrollHeight,n.clientHeight);let a=-r.scrollLeft+ne(e);const l=-r.scrollTop;return"rtl"===W(n).direction&&(a+=s(t.clientWidth,n.clientWidth)-o),{width:o,height:i,x:a,y:l}}(P(e));else if(L(t))n=function(e,t){const r=ee(e,!0,"fixed"===t),n=r.top+e.clientTop,o=r.left+e.clientLeft,i=F(e)?Q(e):u(1);return{width:e.clientWidth*i.x,height:e.clientHeight*i.y,x:o*i.x,y:n*i.y}}(t,r);else{const r=$(e);n={...t,x:t.x-r.x,y:t.y-r.y}}return A(n)}function ie(e,t){const r=V(e);return!(r===t||!L(r)||G(r))&&("fixed"===W(r).position||ie(r,t))}function ae(e,t,r){const n=F(t),o=P(t),i="fixed"===r,a=ee(e,!0,i,t);let s={scrollLeft:0,scrollTop:0};const l=u(0);if(n||!n&&!i)if(("body"!==I(t)||U(o))&&(s=q(t)),n){const e=ee(t,!0,i,t);l.x=e.x+t.clientLeft,l.y=e.y+t.clientTop}else o&&(l.x=ne(o));return{x:a.left+s.scrollLeft-l.x,y:a.top+s.scrollTop-l.y,width:a.width,height:a.height}}function se(e,t){return F(e)&&"fixed"!==W(e).position?t?t(e):e.offsetParent:null}function le(e,t){const r=M(e);if(!F(e)||re(e))return r;let n=se(e,t);for(;n&&j(n)&&"static"===W(n).position;)n=se(n,t);return n&&("html"===I(n)||"body"===I(n)&&"static"===W(n).position&&!z(n))?r:n||function(e){let t=V(e);for(;F(t)&&!G(t);){if(z(t))return t;t=V(t)}return null}(e)||r}const ce={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:r,offsetParent:n,strategy:o}=e;const i="fixed"===o,a=P(n),s=!!t&&re(t.floating);if(n===a||s&&i)return r;let l={scrollLeft:0,scrollTop:0},c=u(1);const d=u(0),f=F(n);if((f||!f&&!i)&&(("body"!==I(n)||U(a))&&(l=q(n)),F(n))){const e=ee(n);c=Q(n),d.x=e.x+n.clientLeft,d.y=e.y+n.clientTop}return{width:r.width*c.x,height:r.height*c.y,x:r.x*c.x-l.scrollLeft*c.x+d.x,y:r.y*c.y-l.scrollTop*c.y+d.y}},getDocumentElement:P,getClippingRect:function(e){let{element:t,boundary:r,rootBoundary:n,strategy:o}=e;const i=[..."clippingAncestors"===r?function(e,t){const r=t.get(e);if(r)return r;let n=K(e,[],!1).filter((e=>L(e)&&"body"!==I(e))),o=null;const i="fixed"===W(e).position;let a=i?V(e):e;for(;L(a)&&!G(a);){const t=W(a),r=z(a);r||"fixed"!==t.position||(o=null),(i?!r&&!o:!r&&"static"===t.position&&o&&["absolute","fixed"].includes(o.position)||U(a)&&!r&&ie(e,a))?n=n.filter((e=>e!==a)):o=t,a=V(a)}return t.set(e,n),n}(t,this._c):[].concat(r),n],l=i[0],c=i.reduce(((e,r)=>{const n=oe(t,r,o);return e.top=s(n.top,e.top),e.right=a(n.right,e.right),e.bottom=a(n.bottom,e.bottom),e.left=s(n.left,e.left),e}),oe(t,l,o));return{width:c.right-c.left,height:c.bottom-c.top,x:c.left,y:c.top}},getOffsetParent:le,getElementRects:async function(e){const t=this.getOffsetParent||le,r=this.getDimensions;return{reference:ae(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,...await r(e.floating)}}},getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){const{width:t,height:r}=X(e);return{width:t,height:r}},getScale:Q,isElement:L,isRTL:function(e){return"rtl"===W(e).direction}};function ue(e,t,r,n){void 0===n&&(n={});const{ancestorScroll:o=!0,ancestorResize:i=!0,elementResize:l="function"==typeof ResizeObserver,layoutShift:u="function"==typeof IntersectionObserver,animationFrame:d=!1}=n,f=Z(e),p=o||i?[...f?K(f):[],...K(t)]:[];p.forEach((e=>{o&&e.addEventListener("scroll",r,{passive:!0}),i&&e.addEventListener("resize",r)}));const h=f&&u?function(e,t){let r,n=null;const o=P(e);function i(){var e;clearTimeout(r),null==(e=n)||e.disconnect(),n=null}return function l(u,d){void 0===u&&(u=!1),void 0===d&&(d=1),i();const{left:f,top:p,width:h,height:m}=e.getBoundingClientRect();if(u||t(),!h||!m)return;const g={rootMargin:-c(p)+"px "+-c(o.clientWidth-(f+h))+"px "+-c(o.clientHeight-(p+m))+"px "+-c(f)+"px",threshold:s(0,a(1,d))||1};let b=!0;function v(e){const t=e[0].intersectionRatio;if(t!==d){if(!b)return l();t?l(!1,t):r=setTimeout((()=>{l(!1,1e-7)}),100)}b=!1}try{n=new IntersectionObserver(v,{...g,root:o.ownerDocument})}catch(e){n=new IntersectionObserver(v,g)}n.observe(e)}(!0),i}(f,r):null;let m,g=-1,b=null;l&&(b=new ResizeObserver((e=>{let[n]=e;n&&n.target===f&&b&&(b.unobserve(t),cancelAnimationFrame(g),g=requestAnimationFrame((()=>{var e;null==(e=b)||e.observe(t)}))),r()})),f&&!d&&b.observe(f),b.observe(t));let v=d?ee(e):null;return d&&function t(){const n=ee(e);!v||n.x===v.x&&n.y===v.y&&n.width===v.width&&n.height===v.height||r(),v=n,m=requestAnimationFrame(t)}(),r(),()=>{var e;p.forEach((e=>{o&&e.removeEventListener("scroll",r),i&&e.removeEventListener("resize",r)})),null==h||h(),null==(e=b)||e.disconnect(),b=null,d&&cancelAnimationFrame(m)}}const de=function(e){return void 0===e&&(e={}),{name:"autoPlacement",options:e,async fn(t){var r,n,o;const{rects:a,middlewareData:s,placement:l,platform:c,elements:u}=t,{crossAxis:d=!1,alignment:f,allowedPlacements:p=i,autoAlignment:b=!0,...v}=h(e,t),y=void 0!==f||p===i?function(e,t,r){return(e?[...r.filter((t=>g(t)===e)),...r.filter((t=>g(t)!==e))]:r.filter((e=>m(e)===e))).filter((r=>!e||g(r)===e||!!t&&_(r)!==r))}(f||null,b,p):p,w=await C(t,v),S=(null==(r=s.autoPlacement)?void 0:r.index)||0,x=y[S];if(null==x)return{};const A=E(x,a,await(null==c.isRTL?void 0:c.isRTL(u.floating)));if(l!==x)return{reset:{placement:y[0]}};const T=[w[m(x)],w[A[0]],w[A[1]]],k=[...(null==(n=s.autoPlacement)?void 0:n.overflows)||[],{placement:x,overflows:T}],O=y[S+1];if(O)return{data:{index:S+1,overflows:k},reset:{placement:O}};const R=k.map((e=>{const t=g(e.placement);return[e.placement,t&&d?e.overflows.slice(0,2).reduce(((e,t)=>e+t),0):e.overflows[0],e.overflows]})).sort(((e,t)=>e[1]-t[1])),N=(null==(o=R.filter((e=>e[2].slice(0,g(e[0])?2:3).every((e=>e<=0))))[0])?void 0:o[0])||R[0][0];return N!==l?{data:{index:S+1,overflows:k},reset:{placement:N}}:{}}}},fe=function(e){return void 0===e&&(e={}),{name:"shift",options:e,async fn(t){const{x:r,y:n,placement:o}=t,{mainAxis:i=!0,crossAxis:a=!1,limiter:s={fn:e=>{let{x:t,y:r}=e;return{x:t,y:r}}},...l}=h(e,t),c={x:r,y:n},u=await C(t,l),d=y(m(o)),f=b(d);let g=c[f],v=c[d];if(i){const e="y"===f?"bottom":"right";g=p(g+u["y"===f?"top":"left"],g,g-u[e])}if(a){const e="y"===d?"bottom":"right";v=p(v+u["y"===d?"top":"left"],v,v-u[e])}const w=s.fn({...t,[f]:g,[d]:v});return{...w,data:{x:w.x-r,y:w.y-n}}}}},pe=function(e){return void 0===e&&(e={}),{name:"flip",options:e,async fn(t){var r,n;const{placement:o,middlewareData:i,rects:a,initialPlacement:s,platform:l,elements:c}=t,{mainAxis:u=!0,crossAxis:d=!0,fallbackPlacements:f,fallbackStrategy:p="bestFit",fallbackAxisSideDirection:b="none",flipAlignment:v=!0,...y}=h(e,t);if(null!=(r=i.arrow)&&r.alignmentOffset)return{};const w=m(o),x=m(s)===s,A=await(null==l.isRTL?void 0:l.isRTL(c.floating)),T=f||(x||!v?[S(s)]:function(e){const t=S(e);return[_(e),t,_(t)]}(s));f||"none"===b||T.push(...function(e,t,r,n){const o=g(e);let i=function(e,t,r){const n=["left","right"],o=["right","left"],i=["top","bottom"],a=["bottom","top"];switch(e){case"top":case"bottom":return r?t?o:n:t?n:o;case"left":case"right":return t?i:a;default:return[]}}(m(e),"start"===r,n);return o&&(i=i.map((e=>e+"-"+o)),t&&(i=i.concat(i.map(_)))),i}(s,v,b,A));const k=[s,...T],O=await C(t,y),R=[];let N=(null==(n=i.flip)?void 0:n.overflows)||[];if(u&&R.push(O[w]),d){const e=E(o,a,A);R.push(O[e[0]],O[e[1]])}if(N=[...N,{placement:o,overflows:R}],!R.every((e=>e<=0))){var I,M;const e=((null==(I=i.flip)?void 0:I.index)||0)+1,t=k[e];if(t)return{data:{index:e,overflows:N},reset:{placement:t}};let r=null==(M=N.filter((e=>e.overflows[0]<=0)).sort(((e,t)=>e.overflows[1]-t.overflows[1]))[0])?void 0:M.placement;if(!r)switch(p){case"bestFit":{var P;const e=null==(P=N.map((e=>[e.placement,e.overflows.filter((e=>e>0)).reduce(((e,t)=>e+t),0)])).sort(((e,t)=>e[1]-t[1]))[0])?void 0:P[0];e&&(r=e);break}case"initialPlacement":r=s}if(o!==r)return{reset:{placement:r}}}return{}}}},he=function(e){return void 0===e&&(e={}),{name:"size",options:e,async fn(t){const{placement:r,rects:n,platform:o,elements:i}=t,{apply:l=(()=>{}),...c}=h(e,t),u=await C(t,c),d=m(r),f=g(r),p="y"===y(r),{width:b,height:v}=n.floating;let w,E;"top"===d||"bottom"===d?(w=d,E=f===(await(null==o.isRTL?void 0:o.isRTL(i.floating))?"start":"end")?"left":"right"):(E=d,w="end"===f?"top":"bottom");const _=v-u[w],S=b-u[E],x=!t.middlewareData.shift;let A=_,T=S;if(p){const e=b-u.left-u.right;T=f||x?a(S,e):e}else{const e=v-u.top-u.bottom;A=f||x?a(_,e):e}if(x&&!f){const e=s(u.left,0),t=s(u.right,0),r=s(u.top,0),n=s(u.bottom,0);p?T=b-2*(0!==e||0!==t?e+t:s(u.left,u.right)):A=v-2*(0!==r||0!==n?r+n:s(u.top,u.bottom))}await l({...t,availableWidth:T,availableHeight:A});const k=await o.getDimensions(i.floating);return b!==k.width||v!==k.height?{reset:{rects:!0}}:{}}}},me=function(e){return void 0===e&&(e={}),{name:"hide",options:e,async fn(t){const{rects:r}=t,{strategy:n="referenceHidden",...o}=h(e,t);switch(n){case"referenceHidden":{const e=k(await C(t,{...o,elementContext:"reference"}),r.reference);return{data:{referenceHiddenOffsets:e,referenceHidden:O(e)}}}case"escaped":{const e=k(await C(t,{...o,altBoundary:!0}),r.floating);return{data:{escapedOffsets:e,escaped:O(e)}}}default:return{}}}}},ge=e=>({name:"arrow",options:e,async fn(t){const{x:r,y:n,placement:o,rects:i,platform:s,elements:l,middlewareData:c}=t,{element:u,padding:d=0}=h(e,t)||{};if(null==u)return{};const f=x(d),m={x:r,y:n},b=w(o),y=v(b),E=await s.getDimensions(u),_="y"===b,S=_?"top":"left",A=_?"bottom":"right",T=_?"clientHeight":"clientWidth",C=i.reference[y]+i.reference[b]-m[b]-i.floating[y],k=m[b]-i.reference[b],O=await(null==s.getOffsetParent?void 0:s.getOffsetParent(u));let R=O?O[T]:0;R&&await(null==s.isElement?void 0:s.isElement(O))||(R=l.floating[T]||i.floating[y]);const N=C/2-k/2,I=R/2-E[y]/2-1,M=a(f[S],I),P=a(f[A],I),D=M,L=R-E[y]-P,F=R/2-E[y]/2+N,B=p(D,F,L),U=!c.arrow&&null!=g(o)&&F!==B&&i.reference[y]/2-(Fe.y-t.y)),r=[];let n=null;for(let e=0;en.height/2?r.push([o]):r[r.length-1].push(o),n=o}return r.map((e=>A(R(e))))}(f),g=A(R(f)),b=x(c),v=await i.getElementRects({reference:{getBoundingClientRect:function(){if(2===p.length&&p[0].left>p[1].right&&null!=u&&null!=d)return p.find((e=>u>e.left-b.left&&ue.top-b.top&&d=2){if("y"===y(r)){const e=p[0],t=p[p.length-1],n="top"===m(r),o=e.top,i=t.bottom,a=n?e.left:t.left,s=n?e.right:t.right;return{top:o,bottom:i,left:a,right:s,width:s-a,height:i-o,x:a,y:o}}const e="left"===m(r),t=s(...p.map((e=>e.right))),n=a(...p.map((e=>e.left))),o=p.filter((r=>e?r.left===n:r.right===t)),i=o[0].top,l=o[o.length-1].bottom;return{top:i,bottom:l,left:n,right:t,width:t-n,height:l-i,x:n,y:i}}return g}},floating:n.floating,strategy:l});return o.reference.x!==v.reference.x||o.reference.y!==v.reference.y||o.reference.width!==v.reference.width||o.reference.height!==v.reference.height?{reset:{rects:v}}:{}}}},ve=function(e){return void 0===e&&(e={}),{options:e,fn(t){const{x:r,y:n,placement:o,rects:i,middlewareData:a}=t,{offset:s=0,mainAxis:l=!0,crossAxis:c=!0}=h(e,t),u={x:r,y:n},d=y(o),f=b(d);let p=u[f],g=u[d];const v=h(s,t),w="number"==typeof v?{mainAxis:v,crossAxis:0}:{mainAxis:0,crossAxis:0,...v};if(l){const e="y"===f?"height":"width",t=i.reference[f]-i.floating[e]+w.mainAxis,r=i.reference[f]+i.reference[e]-w.mainAxis;pr&&(p=r)}if(c){var E,_;const e="y"===f?"width":"height",t=["top","left"].includes(m(o)),r=i.reference[d]-i.floating[e]+(t&&(null==(E=a.offset)?void 0:E[d])||0)+(t?0:w.crossAxis),n=i.reference[d]+i.reference[e]+(t?0:(null==(_=a.offset)?void 0:_[d])||0)-(t?w.crossAxis:0);gn&&(g=n)}return{[f]:p,[d]:g}}}},ye=(e,t,r)=>{const n=new Map,o={platform:ce,...r},i={...o.platform,_c:n};return(async(e,t,r)=>{const{placement:n="bottom",strategy:o="absolute",middleware:i=[],platform:a}=r,s=i.filter(Boolean),l=await(null==a.isRTL?void 0:a.isRTL(t));let c=await a.getElementRects({reference:e,floating:t,strategy:o}),{x:u,y:d}=T(c,n,l),f=n,p={},h=0;for(let r=0;r({name:"arrow",options:e,fn(t){const{element:r,padding:n}="function"==typeof e?e(t):e;return r&&(o=r,{}.hasOwnProperty.call(o,"current"))?null!=r.current?ge({element:r.current,padding:n}).fn(t):{}:r?ge({element:r,padding:n}).fn(t):{};var o}});var Se="undefined"!=typeof document?we.useLayoutEffect:we.useEffect;function xe(e,t){if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;let r,n,o;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if(r=e.length,r!==t.length)return!1;for(n=r;0!=n--;)if(!xe(e[n],t[n]))return!1;return!0}if(o=Object.keys(e),r=o.length,r!==Object.keys(t).length)return!1;for(n=r;0!=n--;)if(!{}.hasOwnProperty.call(t,o[n]))return!1;for(n=r;0!=n--;){const r=o[n];if(!("_owner"===r&&e.$$typeof||xe(e[r],t[r])))return!1}return!0}return e!=e&&t!=t}function Ae(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function Te(e,t){const r=Ae(e);return Math.round(t*r)/r}function Ce(e){const t=we.useRef(e);return Se((()=>{t.current=e})),t}function ke(e){void 0===e&&(e={});const{placement:t="bottom",strategy:r="absolute",middleware:n=[],platform:o,elements:{reference:i,floating:a}={},transform:s=!0,whileElementsMounted:l,open:c}=e,[u,d]=we.useState({x:0,y:0,strategy:r,placement:t,middlewareData:{},isPositioned:!1}),[f,p]=we.useState(n);xe(f,n)||p(n);const[h,m]=we.useState(null),[g,b]=we.useState(null),v=we.useCallback((e=>{e!==_.current&&(_.current=e,m(e))}),[]),y=we.useCallback((e=>{e!==S.current&&(S.current=e,b(e))}),[]),w=i||h,E=a||g,_=we.useRef(null),S=we.useRef(null),x=we.useRef(u),A=null!=l,T=Ce(l),C=Ce(o),k=we.useCallback((()=>{if(!_.current||!S.current)return;const e={placement:t,strategy:r,middleware:f};C.current&&(e.platform=C.current),ye(_.current,S.current,e).then((e=>{const t={...e,isPositioned:!0};O.current&&!xe(x.current,t)&&(x.current=t,Ee.flushSync((()=>{d(t)})))}))}),[f,t,r,C]);Se((()=>{!1===c&&x.current.isPositioned&&(x.current.isPositioned=!1,d((e=>({...e,isPositioned:!1}))))}),[c]);const O=we.useRef(!1);Se((()=>(O.current=!0,()=>{O.current=!1})),[]),Se((()=>{if(w&&(_.current=w),E&&(S.current=E),w&&E){if(T.current)return T.current(w,E,k);k()}}),[w,E,k,T,A]);const R=we.useMemo((()=>({reference:_,floating:S,setReference:v,setFloating:y})),[v,y]),N=we.useMemo((()=>({reference:w,floating:E})),[w,E]),I=we.useMemo((()=>{const e={position:r,left:0,top:0};if(!N.floating)return e;const t=Te(N.floating,u.x),n=Te(N.floating,u.y);return s?{...e,transform:"translate("+t+"px, "+n+"px)",...Ae(N.floating)>=1.5&&{willChange:"transform"}}:{position:r,left:t,top:n}}),[r,s,N.floating,u.x,u.y]);return we.useMemo((()=>({...u,update:k,refs:R,elements:N,floatingStyles:I})),[u,k,R,N,I])}},76311:function(e,t,r){"use strict";var n=r(48287).Buffer,o=r(65606),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},a=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Account=void 0;const s=r(33573),l=r(10142),c=r(33797),u=r(10421),d=r(46569),f=a(r(39404)),p=r(92755),{addKey:h,createAccount:m,deleteAccount:g,deleteKey:b,deployContract:v,fullAccessKey:y,functionCall:w,functionCallAccessKey:E,stake:_,transfer:S}=c.actionCreators;function x(e){return JSON.parse(n.from(e).toString())}function A(e){return n.from(JSON.stringify(e))}class T{constructor(e,t){this.accessKeyByPublicKeyCache={},this.connection=e,this.accountId=t}state(){return i(this,void 0,void 0,(function*(){return this.connection.provider.query({request_type:"view_account",account_id:this.accountId,finality:"optimistic"})}))}signTransaction(e,t){return i(this,void 0,void 0,(function*(){const r=yield this.findAccessKey(e,t);if(!r)throw new u.TypedError(`Can not sign transactions for account ${this.accountId} on network ${this.connection.networkId}, no matching key pair exists for this account`,"KeyNotFound");const{accessKey:n}=r,o=(yield this.connection.provider.block({finality:"final"})).header.hash,i=n.nonce.add(new f.default(1));return yield(0,c.signTransaction)(e,i,t,(0,p.baseDecode)(o),this.connection.signer,this.accountId,this.connection.networkId)}))}signAndSendTransaction({receiverId:e,actions:t,returnError:r}){return i(this,void 0,void 0,(function*(){let n,o;const a=yield(0,l.exponentialBackoff)(500,12,1.5,(()=>i(this,void 0,void 0,(function*(){[n,o]=yield this.signTransaction(e,t);const r=o.transaction.publicKey;try{return yield this.connection.provider.sendTransaction(o)}catch(t){if("InvalidNonce"===t.type)return(0,d.logWarning)(`Retrying transaction ${e}:${(0,p.baseEncode)(n)} with new nonce.`),delete this.accessKeyByPublicKeyCache[r.toString()],null;if("Expired"===t.type)return(0,d.logWarning)(`Retrying transaction ${e}:${(0,p.baseEncode)(n)} due to expired block hash`),null;throw t.context=new u.ErrorContext((0,p.baseEncode)(n)),t}}))));if(!a)throw new u.TypedError("nonce retries exceeded for transaction. This usually means there are too many parallel requests with the same access key.","RetriesExceeded");if((0,d.printTxOutcomeLogsAndFailures)({contractId:o.transaction.receiverId,outcome:a}),!r&&"object"==typeof a.status&&"object"==typeof a.status.Failure&&null!==a.status.Failure)throw a.status.Failure.error_message&&a.status.Failure.error_type?new u.TypedError(`Transaction ${a.transaction_outcome.id} failed. ${a.status.Failure.error_message}`,a.status.Failure.error_type):(0,d.parseResultError)(a);return a}))}findAccessKey(e,t){return i(this,void 0,void 0,(function*(){const e=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);if(!e)throw new u.TypedError(`no matching key pair found in ${this.connection.signer}`,"PublicKeyNotFound");const t=this.accessKeyByPublicKeyCache[e.toString()];if(void 0!==t)return{publicKey:e,accessKey:t};try{const t=yield this.connection.provider.query({request_type:"view_access_key",account_id:this.accountId,public_key:e.toString(),finality:"optimistic"}),r=Object.assign(Object.assign({},t),{nonce:new f.default(t.nonce)});return this.accessKeyByPublicKeyCache[e.toString()]?{publicKey:e,accessKey:this.accessKeyByPublicKeyCache[e.toString()]}:(this.accessKeyByPublicKeyCache[e.toString()]=r,{publicKey:e,accessKey:r})}catch(e){if("AccessKeyDoesNotExist"==e.type)return null;throw e}}))}createAndDeployContract(e,t,r,n){return i(this,void 0,void 0,(function*(){const o=y();return yield this.signAndSendTransaction({receiverId:e,actions:[m(),S(n),h(s.PublicKey.from(t),o),v(r)]}),new T(this.connection,e)}))}sendMoney(e,t){return i(this,void 0,void 0,(function*(){return this.signAndSendTransaction({receiverId:e,actions:[S(t)]})}))}createAccount(e,t,r){return i(this,void 0,void 0,(function*(){const n=y();return this.signAndSendTransaction({receiverId:e,actions:[m(),S(r),h(s.PublicKey.from(t),n)]})}))}deleteAccount(e){return i(this,void 0,void 0,(function*(){return o.env.NEAR_NO_LOGS||console.log("Deleting an account does not automatically transfer NFTs and FTs to the beneficiary address. Ensure to transfer assets before deleting."),this.signAndSendTransaction({receiverId:this.accountId,actions:[g(e)]})}))}deployContract(e){return i(this,void 0,void 0,(function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[v(e)]})}))}encodeJSContractArgs(e,t,r){return n.concat([n.from(e),n.from([0]),n.from(t),n.from([0]),n.from(r)])}functionCall({contractId:e,methodName:t,args:r={},gas:n=d.DEFAULT_FUNCTION_CALL_GAS,attachedDeposit:o,walletMeta:a,walletCallbackUrl:s,stringify:l,jsContract:u}){return i(this,void 0,void 0,(function*(){let i;if(this.validateArgs(r),u)i=["call_js_contract",this.encodeJSContractArgs(e,t,JSON.stringify(r)),n,o,null,!0];else{const e=void 0===l?c.stringifyJsonOrBytes:l;i=[t,r,n,o,e,!1]}return this.signAndSendTransaction({receiverId:u?this.connection.jsvmAccountId:e,actions:[w.apply(void 0,i)],walletMeta:a,walletCallbackUrl:s})}))}addKey(e,t,r,n){return i(this,void 0,void 0,(function*(){let o;return r||(r=[]),Array.isArray(r)||(r=[r]),o=t?E(t,r,n):y(),this.signAndSendTransaction({receiverId:this.accountId,actions:[h(s.PublicKey.from(e),o)]})}))}deleteKey(e){return i(this,void 0,void 0,(function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[b(s.PublicKey.from(e))]})}))}stake(e,t){return i(this,void 0,void 0,(function*(){return this.signAndSendTransaction({receiverId:this.accountId,actions:[_(t,s.PublicKey.from(e))]})}))}signedDelegate({actions:e,blockHeightTtl:t,receiverId:r}){return i(this,void 0,void 0,(function*(){const{provider:n,signer:o}=this.connection,{header:a}=yield n.block({finality:"final"}),{accessKey:s,publicKey:l}=yield this.findAccessKey(null,null),u=(0,c.buildDelegateAction)({actions:e,maxBlockHeight:new f.default(a.height).add(new f.default(t)),nonce:new f.default(s.nonce).add(new f.default(1)),publicKey:l,receiverId:r,senderId:this.accountId}),{signedDelegateAction:d}=yield(0,c.signDelegateAction)({delegateAction:u,signer:{sign:e=>i(this,void 0,void 0,(function*(){const{signature:t}=yield o.signMessage(e,u.senderId,this.connection.networkId);return t}))}});return d}))}validateArgs(e){if((void 0===e.byteLength||e.byteLength!==e.length)&&(Array.isArray(e)||"object"!=typeof e))throw new u.PositionalArgsError}viewFunction({contractId:e,methodName:t,args:r={},parse:o=x,stringify:a=A,jsContract:s=!1,blockQuery:l={finality:"optimistic"}}){return i(this,void 0,void 0,(function*(){let i;this.validateArgs(r),i=s?this.encodeJSContractArgs(e,t,Object.keys(r).length>0?JSON.stringify(r):""):a(r);const c=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"call_function"},l),{account_id:s?this.connection.jsvmAccountId:e,method_name:s?"view_js_contract":t,args_base64:i.toString("base64")}));return c.logs&&(0,d.printTxOutcomeLogs)({contractId:e,logs:c.logs}),c.result&&c.result.length>0&&o(n.from(c.result))}))}viewState(e,t={finality:"optimistic"}){return i(this,void 0,void 0,(function*(){const{values:r}=yield this.connection.provider.query(Object.assign(Object.assign({request_type:"view_state"},t),{account_id:this.accountId,prefix_base64:n.from(e).toString("base64")}));return r.map((({key:e,value:t})=>({key:n.from(e,"base64"),value:n.from(t,"base64")})))}))}getAccessKeys(){var e;return i(this,void 0,void 0,(function*(){const t=yield this.connection.provider.query({request_type:"view_access_key_list",account_id:this.accountId,finality:"optimistic"});return null===(e=null==t?void 0:t.keys)||void 0===e?void 0:e.map((e=>Object.assign(Object.assign({},e),{access_key:Object.assign(Object.assign({},e.access_key),{nonce:new f.default(e.access_key.nonce)})})))}))}getAccountDetails(){return i(this,void 0,void 0,(function*(){return{authorizedApps:(yield this.getAccessKeys()).filter((e=>"FullAccess"!==e.access_key.permission)).map((e=>{const t=e.access_key.permission;return{contractId:t.FunctionCall.receiver_id,amount:t.FunctionCall.allowance,publicKey:e.public_key}}))}}))}getAccountBalance(){return i(this,void 0,void 0,(function*(){const e=yield this.connection.provider.experimental_protocolConfig({finality:"final"}),t=yield this.state(),r=new f.default(e.runtime_config.storage_amount_per_byte),n=new f.default(t.storage_usage).mul(r),o=new f.default(t.locked),i=new f.default(t.amount).add(o),a=i.sub(f.default.max(o,n));return{total:i.toString(),stateStaked:n.toString(),staked:o.toString(),available:a.toString()}}))}getActiveDelegatedStakeBalance(){return i(this,void 0,void 0,(function*(){const e=yield this.connection.provider.block({finality:"final"}),t=e.header.hash,r=e.header.epoch_id,{current_validators:n,next_validators:o,current_proposals:i}=yield this.connection.provider.validators(r),a=new Set;[...n,...o,...i].forEach((e=>a.add(e.account_id)));const s=[...a],l=s.map((e=>this.viewFunction({contractId:e,methodName:"get_account_total_balance",args:{account_id:this.accountId},blockQuery:{blockId:t}}))),c=yield Promise.allSettled(l);if(c.some((e=>"rejected"===e.status&&"TimeoutError"===e.reason.type)))throw new Error("Failed to get delegated stake balance");const u=c.reduce(((e,t,r)=>{const n=s[r];if("fulfilled"===t.status){const r=new f.default(t.value);if(!r.isZero())return Object.assign(Object.assign({},e),{stakedValidators:[...e.stakedValidators,{validatorId:n,amount:r.toString()}],total:e.total.add(r)})}return"rejected"===t.status?Object.assign(Object.assign({},e),{failedValidators:[...e.failedValidators,{validatorId:n,error:t.reason}]}):e}),{stakedValidators:[],failedValidators:[],total:new f.default(0)});return Object.assign(Object.assign({},u),{total:u.total.toString()})}))}}t.Account=T},68711:function(e,t,r){"use strict";var n=r(48287).Buffer,o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Account2FA=void 0;const a=r(33573),s=r(10421),l=r(10142),c=r(33797),u=i(r(39404)),d=r(9016),f=r(77417),p=r(5313),{addKey:h,deleteKey:m,deployContract:g,fullAccessKey:b,functionCall:v,functionCallAccessKey:y}=c.actionCreators;class w extends d.AccountMultisig{constructor(e,t,r){super(e,t,r),this.helperUrl="https://helper.testnet.near.org",this.helperUrl=r.helperUrl||this.helperUrl,this.storage=r.storage,this.sendCode=r.sendCode||this.sendCodeDefault,this.getCode=r.getCode||this.getCodeDefault,this.verifyCode=r.verifyCode||this.verifyCodeDefault,this.onConfirmResult=r.onConfirmResult}signAndSendTransaction({receiverId:e,actions:t}){const r=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return o(this,void 0,void 0,(function*(){yield r.signAndSendTransaction.call(this,{receiverId:e,actions:t}),yield this.sendCode();const n=yield this.promptAndVerify();return this.onConfirmResult&&(yield this.onConfirmResult(n)),n}))}deployMultisig(e){const t=Object.create(null,{signAndSendTransactionWithAccount:{get:()=>super.signAndSendTransactionWithAccount}});return o(this,void 0,void 0,(function*(){const{accountId:r}=this,o=(yield this.getRecoveryMethods()).data.filter((({kind:e,publicKey:t})=>("phrase"===e||"ledger"===e)&&null!==t)).map((e=>e.publicKey)),i=(yield this.getAccessKeys()).filter((({public_key:e,access_key:{permission:t}})=>"FullAccess"===t&&!o.includes(e))).map((e=>e.public_key)).map(E),a=E((yield this.postSignedJson("/2fa/getAccessKey",{accountId:r})).publicKey),l=n.from(JSON.stringify({num_confirmations:2})),c=[...i.map((e=>m(e))),...i.map((e=>h(e,y(r,f.MULTISIG_CHANGE_METHODS,null)))),h(a,y(r,f.MULTISIG_CONFIRM_METHODS,null)),g(e)],u=c.concat(v("new",l,f.MULTISIG_GAS,f.MULTISIG_DEPOSIT));console.log("deploying multisig contract for",r);const{stateStatus:d}=yield this.checkMultisigCodeAndStateStatus(e);switch(d){case p.MultisigStateStatus.STATE_NOT_INITIALIZED:return yield t.signAndSendTransactionWithAccount.call(this,r,u);case p.MultisigStateStatus.VALID_STATE:return yield t.signAndSendTransactionWithAccount.call(this,r,c);case p.MultisigStateStatus.INVALID_STATE:throw new s.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState");default:throw new s.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown")}}))}disableWithFAK({contractBytes:e,cleanupContractBytes:t}){return o(this,void 0,void 0,(function*(){let r=[];t&&(yield this.deleteAllRequests().catch((e=>e)),r=yield this.get2faDisableCleanupActions(t));const n=yield this.get2faDisableKeyConversionActions(),o=[...r,...n,g(e)],i=yield this.findAccessKey(this.accountId,o);if(i&&i.accessKey&&"FullAccess"!==i.accessKey.permission)throw new s.TypedError("No full access key found in keystore. Unable to bypass multisig","NoFAKFound");return this.signAndSendTransactionWithAccount(this.accountId,o)}))}get2faDisableCleanupActions(e){return o(this,void 0,void 0,(function*(){const t=yield this.viewState("").catch((e=>{const t=e.cause&&e.cause.name;if("NO_CONTRACT_CODE"==t)return[];throw"TOO_LARGE_CONTRACT_STATE"==t?new s.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account has existing state.`,"ContractHasExistingState"):e})),r=t.map((({key:e})=>e.toString("base64")));return t.length?[g(e),v("clean",{keys:r},f.MULTISIG_GAS,new u.default("0"))]:[]}))}get2faDisableKeyConversionActions(){return o(this,void 0,void 0,(function*(){const{accountId:e}=this,t=(yield this.getAccessKeys()).filter((({access_key:e})=>"FullAccess"!==e.permission)).filter((({access_key:t})=>{const r=t.permission.FunctionCall;return r.receiver_id===e&&4===r.method_names.length&&r.method_names.includes("add_request_and_confirm")})),r=a.PublicKey.from((yield this.postSignedJson("/2fa/getAccessKey",{accountId:e})).publicKey);return[m(r),...t.map((({public_key:e})=>m(a.PublicKey.from(e)))),...t.map((({public_key:e})=>h(a.PublicKey.from(e),b())))]}))}disable(e,t){return o(this,void 0,void 0,(function*(){const{stateStatus:r}=yield this.checkMultisigCodeAndStateStatus();if(r!==p.MultisigStateStatus.VALID_STATE&&r!==p.MultisigStateStatus.STATE_NOT_INITIALIZED)throw new s.TypedError(`Can not deploy a contract to account ${this.accountId} on network ${this.connection.networkId}, the account state could not be verified.`,"ContractStateUnknown");let n;yield this.deleteAllRequests().catch((e=>n=e));const o=[...yield this.get2faDisableCleanupActions(t).catch((e=>{if("ContractHasExistingState"===e.type)throw n||e;throw e})),...yield this.get2faDisableKeyConversionActions(),g(e)];return console.log("disabling 2fa for",this.accountId),yield this.signAndSendTransaction({receiverId:this.accountId,actions:o})}))}sendCodeDefault(){return o(this,void 0,void 0,(function*(){const{accountId:e}=this,{requestId:t}=this.getRequest(),r=yield this.get2faMethod();return yield this.postSignedJson("/2fa/send",{accountId:e,method:r,requestId:t}),t}))}getCodeDefault(){return o(this,void 0,void 0,(function*(){throw new Error('There is no getCode callback provided. Please provide your own in AccountMultisig constructor options. It has a parameter method where method.kind is "email" or "phone".')}))}promptAndVerify(){return o(this,void 0,void 0,(function*(){const e=yield this.get2faMethod(),t=yield this.getCode(e);try{return yield this.verifyCode(t)}catch(e){if(console.warn("Error validating security code:",e),e.toString().includes("invalid 2fa code provided")||e.toString().includes("2fa code not valid"))return yield this.promptAndVerify();throw e}}))}verifyCodeDefault(e){return o(this,void 0,void 0,(function*(){const{accountId:t}=this,r=this.getRequest();if(!r)throw new Error("no request pending");const{requestId:n}=r;return yield this.postSignedJson("/2fa/verify",{accountId:t,securityCode:e,requestId:n})}))}getRecoveryMethods(){return o(this,void 0,void 0,(function*(){const{accountId:e}=this;return{accountId:e,data:yield this.postSignedJson("/account/recoveryMethods",{accountId:e})}}))}get2faMethod(){return o(this,void 0,void 0,(function*(){let{data:e}=yield this.getRecoveryMethods();if(e&&e.length&&(e=e.find((e=>0===e.kind.indexOf("2fa-")))),!e)return null;const{kind:t,detail:r}=e;return{kind:t,detail:r}}))}signatureFor(){return o(this,void 0,void 0,(function*(){const{accountId:e}=this,t=(yield this.connection.provider.block({finality:"final"})).header.height.toString(),r=yield this.connection.signer.signMessage(n.from(t),e,this.connection.networkId);return{blockNumber:t,blockNumberSignature:n.from(r.signature).toString("base64")}}))}postSignedJson(e,t){return o(this,void 0,void 0,(function*(){return yield(0,l.fetchJson)(this.helperUrl+e,JSON.stringify(Object.assign(Object.assign({},t),yield this.signatureFor())))}))}}t.Account2FA=w;const E=e=>a.PublicKey.from(e)},5972:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.UrlAccountCreator=t.LocalAccountCreator=t.AccountCreator=void 0;const o=r(10142);class i{}t.AccountCreator=i,t.LocalAccountCreator=class extends i{constructor(e,t){super(),this.masterAccount=e,this.initialBalance=t}createAccount(e,t){return n(this,void 0,void 0,(function*(){yield this.masterAccount.createAccount(e,t,this.initialBalance)}))}},t.UrlAccountCreator=class extends i{constructor(e,t){super(),this.connection=e,this.helperUrl=t}createAccount(e,t){return n(this,void 0,void 0,(function*(){yield(0,o.fetchJson)(`${this.helperUrl}/account`,JSON.stringify({newAccountId:e,newAccountPublicKey:t.toString()}))}))}}},9016:function(e,t,r){"use strict";var n=r(48287).Buffer,o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.AccountMultisig=void 0;const i=r(33797),a=r(76311),s=r(77417),l=r(5313),{deployContract:c,functionCall:u}=i.actionCreators;var d;!function(e){e[e.INVALID_CODE=0]="INVALID_CODE",e[e.VALID_CODE=1]="VALID_CODE",e[e.UNKNOWN_CODE=2]="UNKNOWN_CODE"}(d||(d={}));const f={[s.MULTISIG_STORAGE_KEY]:null};class p extends a.Account{constructor(e,t,r){super(e,t),this.storage=r.storage,this.onAddRequestResult=r.onAddRequestResult}signAndSendTransactionWithAccount(e,t){const r=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return o(this,void 0,void 0,(function*(){return r.signAndSendTransaction.call(this,{receiverId:e,actions:t})}))}signAndSendTransaction({receiverId:e,actions:t}){const r=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return o(this,void 0,void 0,(function*(){const{accountId:o}=this,i=n.from(JSON.stringify({request:{receiver_id:e,actions:h(t,o,e)}}));let a;try{a=yield r.signAndSendTransaction.call(this,{receiverId:o,actions:[u("add_request_and_confirm",i,s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch(r){if(r.toString().includes("Account has too many active requests. Confirm or delete some"))return yield this.deleteUnconfirmedRequests(),yield this.signAndSendTransaction({receiverId:e,actions:t});throw r}if(!a.status)throw new Error("Request failed");const l=Object.assign({},a.status);if(!l.SuccessValue||"string"!=typeof l.SuccessValue)throw new Error("Request failed");return this.setRequest({accountId:o,actions:t,requestId:parseInt(n.from(l.SuccessValue,"base64").toString("ascii"),10)}),this.onAddRequestResult&&(yield this.onAddRequestResult(a)),this.deleteUnconfirmedRequests(),a}))}checkMultisigCodeAndStateStatus(e){const t=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return o(this,void 0,void 0,(function*(){const r=4294967295,n=e?d.UNKNOWN_CODE:d.VALID_CODE;try{return e?yield t.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[c(e),u("delete_request",{request_id:r},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]}):yield this.deleteRequest(r),{codeStatus:d.VALID_CODE,stateStatus:l.MultisigStateStatus.VALID_STATE}}catch(e){if(new RegExp(l.MultisigDeleteRequestRejectionError.CANNOT_DESERIALIZE_STATE).test(e&&e.kind&&e.kind.ExecutionError))return{codeStatus:n,stateStatus:l.MultisigStateStatus.INVALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.MULTISIG_NOT_INITIALIZED).test(e&&e.kind&&e.kind.ExecutionError))return{codeStatus:n,stateStatus:l.MultisigStateStatus.STATE_NOT_INITIALIZED};if(new RegExp(l.MultisigDeleteRequestRejectionError.NO_SUCH_REQUEST).test(e&&e.kind&&e.kind.ExecutionError))return{codeStatus:n,stateStatus:l.MultisigStateStatus.VALID_STATE};if(new RegExp(l.MultisigDeleteRequestRejectionError.METHOD_NOT_FOUND).test(e&&e.message))return{codeStatus:d.INVALID_CODE,stateStatus:l.MultisigStateStatus.UNKNOWN_STATE};throw e}}))}deleteRequest(e){return super.signAndSendTransaction({receiverId:this.accountId,actions:[u("delete_request",{request_id:e},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}deleteAllRequests(){return o(this,void 0,void 0,(function*(){const e=yield this.getRequestIds();e.length&&(yield Promise.all(e.map((e=>this.deleteRequest(e)))))}))}deleteUnconfirmedRequests(){const e=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return o(this,void 0,void 0,(function*(){const t=yield this.getRequestIds(),{requestId:r}=this.getRequest();for(const n of t)if(n!=r)try{yield e.signAndSendTransaction.call(this,{receiverId:this.accountId,actions:[u("delete_request",{request_id:n},s.MULTISIG_GAS,s.MULTISIG_DEPOSIT)]})}catch(e){console.warn("Attempt to delete an earlier request before 15 minutes failed. Will try again.")}}))}getRequestIds(){return o(this,void 0,void 0,(function*(){return this.viewFunction({contractId:this.accountId,methodName:"list_request_ids"})}))}getRequest(){return this.storage?JSON.parse(this.storage.getItem(s.MULTISIG_STORAGE_KEY)||"{}"):f[s.MULTISIG_STORAGE_KEY]}setRequest(e){if(this.storage)return this.storage.setItem(s.MULTISIG_STORAGE_KEY,JSON.stringify(e));f[s.MULTISIG_STORAGE_KEY]=e}}t.AccountMultisig=p;const h=(e,t,r)=>e.map((e=>{const o=e.enum,{gas:i,publicKey:a,methodName:l,args:c,deposit:u,accessKey:d,code:f}=e[o],p={type:o[0].toUpperCase()+o.substr(1),gas:i&&i.toString()||void 0,public_key:a&&(h=a,h.toString().replace("ed25519:",""))||void 0,method_name:l,args:c&&n.from(c).toString("base64")||void 0,code:f&&n.from(f).toString("base64")||void 0,amount:u&&u.toString()||void 0,deposit:u&&u.toString()||"0",permission:void 0};var h;if(d&&(r===t&&"fullAccess"!==d.permission.enum&&(p.permission={receiver_id:t,allowance:s.MULTISIG_ALLOWANCE.toString(),method_names:s.MULTISIG_CHANGE_METHODS}),"functionCall"===d.permission.enum)){const{receiverId:e,methodNames:t,allowance:r}=d.permission.functionCall;p.permission={receiver_id:e,allowance:r&&r.toString()||void 0,method_names:t}}return p}))},84438:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Connection=void 0;const n=r(37547),o=r(10142);class i{constructor(e,t,r,n){this.networkId=e,this.provider=t,this.signer=r,this.jsvmAccountId=n}static fromConfig(e){const t=function(e){switch(e.type){case void 0:return e;case"JsonRpcProvider":return new o.JsonRpcProvider(Object.assign({},e.args));default:throw new Error(`Unknown provider type ${e.type}`)}}(e.provider),r=function(e){switch(e.type){case void 0:return e;case"InMemorySigner":return new n.InMemorySigner(e.keyStore);default:throw new Error(`Unknown signer type ${e.type}`)}}(e.signer);return new i(e.networkId,t,r,e.jsvmAccountId)}}t.Connection=i},77417:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.MULTISIG_CONFIRM_METHODS=t.MULTISIG_CHANGE_METHODS=t.MULTISIG_DEPOSIT=t.MULTISIG_GAS=t.MULTISIG_ALLOWANCE=t.MULTISIG_STORAGE_KEY=void 0;const o=r(46569),i=n(r(39404));t.MULTISIG_STORAGE_KEY="__multisigRequest",t.MULTISIG_ALLOWANCE=new i.default((0,o.parseNearAmount)("1")),t.MULTISIG_GAS=new i.default("100000000000000"),t.MULTISIG_DEPOSIT=new i.default("0"),t.MULTISIG_CHANGE_METHODS=["add_request","add_request_and_confirm","delete_request","confirm"],t.MULTISIG_CONFIRM_METHODS=["confirm"]},16604:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Contract=void 0;const i=r(46569),a=r(10421),s=o(r(63282)),l=o(r(68182)),c=o(r(39404)),u=o(r(67725)),d=r(65712),f=r(5061);function p(e,t){return{[e]:(...e)=>t(...e)}[e]}function h(e,t,r,n){var o;if(!g(e))return;if(t.params&&t.params.serialization_type!==d.AbiSerializationType.Json)throw new f.UnsupportedSerializationError(t.name,t.params.serialization_type);if(t.result&&t.result.serialization_type!==d.AbiSerializationType.Json)throw new f.UnsupportedSerializationError(t.name,t.result.serialization_type);const i=(null===(o=t.params)||void 0===o?void 0:o.args)||[];for(const t of i){const o=e[t.name],i=t.type_schema;i.definitions=n.body.root_schema.definitions;const a=r.compile(i);if(!a(o))throw new f.ArgumentSchemaError(t.name,a.errors)}for(const t of Object.keys(e))if(!i.find((e=>e.name===t)))throw new f.UnknownArgumentError(t,i.map((e=>e.name)))}const m=e=>e&&void 0!==e.byteLength&&e.byteLength===e.length,g=e=>"[object Object]"===Object.prototype.toString.call(e);t.Contract=class{constructor(e,t,r){this.account=e,this.contractId=t;const{viewMethods:o=[],changeMethods:i=[],abi:c}=r;let b=o.map((e=>({name:e,abi:null}))),v=i.map((e=>({name:e,abi:null})));if(c){if(b.length>0||v.length>0)throw new f.ConflictingOptions;b=c.body.functions.filter((e=>e.kind===d.AbiFunctionKind.View)).map((e=>({name:e.name,abi:e}))),v=c.body.functions.filter((e=>e.kind===d.AbiFunctionKind.Call)).map((e=>({name:e.name,abi:e})))}const y=function(){const e=new s.default({strictSchema:!1,formats:{uint32:!0,uint64:!0}});return(0,l.default)(e),e}();b.forEach((({name:e,abi:t})=>{Object.defineProperty(this,e,{writable:!1,enumerable:!0,value:p(e,((r={},o={},...i)=>n(this,void 0,void 0,(function*(){if(i.length||!g(r)&&!m(r)||!g(o))throw new a.PositionalArgsError;return t&&h(r,t,y,c),this.account.viewFunction(Object.assign({contractId:this.contractId,methodName:e,args:r},o))}))))})})),v.forEach((({name:e,abi:t})=>{Object.defineProperty(this,e,{writable:!1,enumerable:!0,value:p(e,((...r)=>n(this,void 0,void 0,(function*(){if(r.length&&(r.length>3||!g(r[0])&&!m(r[0])))throw new a.PositionalArgsError;return(r.length>1||!r[0]||!r[0].args)&&((0,u.default)("contract.methodName(args, gas, amount)")("use `contract.methodName({ args, gas?, amount?, callbackUrl?, meta? })` instead"),r[0]={args:r[0],gas:r[1],amount:r[2]}),t&&h(r[0].args,t,y,c),this._changeMethod(Object.assign({methodName:e},r[0]))}))))})}))}_changeMethod({args:e,methodName:t,gas:r,amount:o,meta:s,callbackUrl:l}){return n(this,void 0,void 0,(function*(){!function(e){for(const t of Object.keys(e)){const r=e[t];if(r&&!c.default.isBN(r)&&isNaN(r))throw new a.ArgumentTypeError(t,"number, decimal string or BN",r)}}({gas:r,amount:o});const n=yield this.account.functionCall({contractId:this.contractId,methodName:t,args:e,gas:r,attachedDeposit:o,walletMeta:s,walletCallbackUrl:l});return(0,i.getTransactionLastResult)(n)}))}}},5061:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ConflictingOptions=t.ArgumentSchemaError=t.UnknownArgumentError=t.UnsupportedSerializationError=void 0;class r extends Error{constructor(e,t){super(`Contract method '${e}' is using an unsupported serialization type ${t}`)}}t.UnsupportedSerializationError=r;class n extends Error{constructor(e,t){super(`Unrecognized argument '${e}', expected '${JSON.stringify(t)}'`)}}t.UnknownArgumentError=n;class o extends Error{constructor(e,t){super(`Argument '${e}' does not conform to the specified ABI schema: '${JSON.stringify(t)}'`)}}t.ArgumentSchemaError=o;class i extends Error{constructor(){super("Conflicting contract method options have been passed. You can either specify ABI or a list of view/call methods.")}}t.ConflictingOptions=i},6692:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MultisigStateStatus=t.MultisigDeleteRequestRejectionError=t.UnsupportedSerializationError=t.UnknownArgumentError=t.ConflictingOptions=t.ArgumentSchemaError=t.Contract=t.MULTISIG_CONFIRM_METHODS=t.MULTISIG_CHANGE_METHODS=t.MULTISIG_DEPOSIT=t.MULTISIG_GAS=t.MULTISIG_ALLOWANCE=t.MULTISIG_STORAGE_KEY=t.Connection=t.AccountMultisig=t.UrlAccountCreator=t.LocalAccountCreator=t.AccountCreator=t.Account2FA=t.Account=void 0;var n=r(76311);Object.defineProperty(t,"Account",{enumerable:!0,get:function(){return n.Account}});var o=r(68711);Object.defineProperty(t,"Account2FA",{enumerable:!0,get:function(){return o.Account2FA}});var i=r(5972);Object.defineProperty(t,"AccountCreator",{enumerable:!0,get:function(){return i.AccountCreator}}),Object.defineProperty(t,"LocalAccountCreator",{enumerable:!0,get:function(){return i.LocalAccountCreator}}),Object.defineProperty(t,"UrlAccountCreator",{enumerable:!0,get:function(){return i.UrlAccountCreator}});var a=r(9016);Object.defineProperty(t,"AccountMultisig",{enumerable:!0,get:function(){return a.AccountMultisig}});var s=r(84438);Object.defineProperty(t,"Connection",{enumerable:!0,get:function(){return s.Connection}});var l=r(77417);Object.defineProperty(t,"MULTISIG_STORAGE_KEY",{enumerable:!0,get:function(){return l.MULTISIG_STORAGE_KEY}}),Object.defineProperty(t,"MULTISIG_ALLOWANCE",{enumerable:!0,get:function(){return l.MULTISIG_ALLOWANCE}}),Object.defineProperty(t,"MULTISIG_GAS",{enumerable:!0,get:function(){return l.MULTISIG_GAS}}),Object.defineProperty(t,"MULTISIG_DEPOSIT",{enumerable:!0,get:function(){return l.MULTISIG_DEPOSIT}}),Object.defineProperty(t,"MULTISIG_CHANGE_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CHANGE_METHODS}}),Object.defineProperty(t,"MULTISIG_CONFIRM_METHODS",{enumerable:!0,get:function(){return l.MULTISIG_CONFIRM_METHODS}});var c=r(16604);Object.defineProperty(t,"Contract",{enumerable:!0,get:function(){return c.Contract}});var u=r(5061);Object.defineProperty(t,"ArgumentSchemaError",{enumerable:!0,get:function(){return u.ArgumentSchemaError}}),Object.defineProperty(t,"ConflictingOptions",{enumerable:!0,get:function(){return u.ConflictingOptions}}),Object.defineProperty(t,"UnknownArgumentError",{enumerable:!0,get:function(){return u.UnknownArgumentError}}),Object.defineProperty(t,"UnsupportedSerializationError",{enumerable:!0,get:function(){return u.UnsupportedSerializationError}});var d=r(5313);Object.defineProperty(t,"MultisigDeleteRequestRejectionError",{enumerable:!0,get:function(){return d.MultisigDeleteRequestRejectionError}}),Object.defineProperty(t,"MultisigStateStatus",{enumerable:!0,get:function(){return d.MultisigStateStatus}})},5313:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.MultisigStateStatus=t.MultisigDeleteRequestRejectionError=void 0,(n=t.MultisigDeleteRequestRejectionError||(t.MultisigDeleteRequestRejectionError={})).CANNOT_DESERIALIZE_STATE="Cannot deserialize the contract state",n.MULTISIG_NOT_INITIALIZED="Smart contract panicked: Multisig contract should be initialized before usage",n.NO_SUCH_REQUEST="Smart contract panicked: panicked at 'No such request: either wrong number or already confirmed'",n.REQUEST_COOLDOWN_ERROR="Request cannot be deleted immediately after creation.",n.METHOD_NOT_FOUND="Contract method is not found",(r=t.MultisigStateStatus||(t.MultisigStateStatus={}))[r.INVALID_STATE=0]="INVALID_STATE",r[r.STATE_NOT_INITIALIZED=1]="STATE_NOT_INITIALIZED",r[r.VALID_STATE=2]="VALID_STATE",r[r.UNKNOWN_STATE=3]="UNKNOWN_STATE"},59388:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.KeyType=void 0,(r=t.KeyType||(t.KeyType={}))[r.ED25519=0]="ED25519"},33573:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=t.KeyPairEd25519=t.KeyPair=t.KeyType=void 0;var n=r(59388);Object.defineProperty(t,"KeyType",{enumerable:!0,get:function(){return n.KeyType}});var o=r(97753);Object.defineProperty(t,"KeyPair",{enumerable:!0,get:function(){return o.KeyPair}});var i=r(55131);Object.defineProperty(t,"KeyPairEd25519",{enumerable:!0,get:function(){return i.KeyPairEd25519}});var a=r(66212);Object.defineProperty(t,"PublicKey",{enumerable:!0,get:function(){return a.PublicKey}})},97753:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyPair=void 0;const n=r(16609),o=r(55131);class i extends n.KeyPairBase{static fromRandom(e){if("ED25519"===e.toUpperCase())return o.KeyPairEd25519.fromRandom();throw new Error(`Unknown curve ${e}`)}static fromString(e){const t=e.split(":");if(1===t.length)return new o.KeyPairEd25519(t[0]);if(2===t.length){if("ED25519"===t[0].toUpperCase())return new o.KeyPairEd25519(t[1]);throw new Error(`Unknown curve: ${t[0]}`)}throw new Error("Invalid encoded key format, must be :")}}t.KeyPair=i},16609:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyPairBase=void 0,t.KeyPairBase=class{}},55131:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.KeyPairEd25519=void 0;const o=r(92755),i=n(r(88947)),a=r(59388),s=r(16609),l=r(66212);class c extends s.KeyPairBase{constructor(e){super();const t=i.default.sign.keyPair.fromSecretKey((0,o.baseDecode)(e));this.publicKey=new l.PublicKey({keyType:a.KeyType.ED25519,data:t.publicKey}),this.secretKey=e}static fromRandom(){const e=i.default.sign.keyPair();return new c((0,o.baseEncode)(e.secretKey))}sign(e){return{signature:i.default.sign.detached(e,(0,o.baseDecode)(this.secretKey)),publicKey:this.publicKey}}verify(e,t){return this.publicKey.verify(e,t)}toString(){return`ed25519:${this.secretKey}`}getPublicKey(){return this.publicKey}}t.KeyPairEd25519=c},66212:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.PublicKey=void 0;const o=r(10421),i=r(92755),a=n(r(88947)),s=r(59388);class l extends o.Assignable{static from(e){return"string"==typeof e?l.fromString(e):e}static fromString(e){const t=e.split(":");let r,n=s.KeyType.ED25519;if(1===t.length)r=t[0];else{if(2!==t.length)throw new Error("Invalid encoded key format, must be :");r=t[1],n=function(e){if("ed25519"===e.toLowerCase())return s.KeyType.ED25519;throw new Error(`Unknown key type ${e}`)}(t[0])}const o=(0,i.baseDecode)(r);if(o.length!==a.default.box.publicKeyLength)throw new Error(`Invalid public key size (${o.length}), must be ${a.default.box.publicKeyLength}`);return new l({keyType:n,data:o})}toString(){return`${function(e){if(e===s.KeyType.ED25519)return"ed25519";throw new Error(`Unknown key type ${e}`)}(this.keyType)}:${(0,i.baseEncode)(this.data)}`}verify(e,t){if(this.keyType===s.KeyType.ED25519)return a.default.sign.detached.verify(e,t,this.data);throw new Error(`Unknown key type ${this.keyType}`)}}t.PublicKey=l},71304:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserLocalStorageKeyStore=void 0;const o=r(33573),i=r(63877);class a extends i.KeyStore{constructor(e=window.localStorage,t="near-api-js:keystore:"){super(),this.localStorage=e,this.prefix=t}setKey(e,t,r){return n(this,void 0,void 0,(function*(){this.localStorage.setItem(this.storageKeyForSecretKey(e,t),r.toString())}))}getKey(e,t){return n(this,void 0,void 0,(function*(){const r=this.localStorage.getItem(this.storageKeyForSecretKey(e,t));return r?o.KeyPair.fromString(r):null}))}removeKey(e,t){return n(this,void 0,void 0,(function*(){this.localStorage.removeItem(this.storageKeyForSecretKey(e,t))}))}clear(){return n(this,void 0,void 0,(function*(){for(const e of this.storageKeys())e.startsWith(this.prefix)&&this.localStorage.removeItem(e)}))}getNetworks(){return n(this,void 0,void 0,(function*(){const e=new Set;for(const t of this.storageKeys())if(t.startsWith(this.prefix)){const r=t.substring(this.prefix.length).split(":");e.add(r[1])}return Array.from(e.values())}))}getAccounts(e){return n(this,void 0,void 0,(function*(){const t=new Array;for(const r of this.storageKeys())if(r.startsWith(this.prefix)){const n=r.substring(this.prefix.length).split(":");n[1]===e&&t.push(n[0])}return t}))}storageKeyForSecretKey(e,t){return`${this.prefix}${t}:${e}`}*storageKeys(){for(let e=0;e{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.BrowserLocalStorageKeyStore=void 0;var n=r(71304);Object.defineProperty(t,"BrowserLocalStorageKeyStore",{enumerable:!0,get:function(){return n.BrowserLocalStorageKeyStore}})},30660:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.InMemoryKeyStore=void 0;const o=r(33573),i=r(74969);class a extends i.KeyStore{constructor(){super(),this.keys={}}setKey(e,t,r){return n(this,void 0,void 0,(function*(){this.keys[`${t}:${e}`]=r.toString()}))}getKey(e,t){return n(this,void 0,void 0,(function*(){const r=this.keys[`${t}:${e}`];return r?o.KeyPair.fromString(r):null}))}removeKey(e,t){return n(this,void 0,void 0,(function*(){delete this.keys[`${t}:${e}`]}))}clear(){return n(this,void 0,void 0,(function*(){this.keys={}}))}getNetworks(){return n(this,void 0,void 0,(function*(){const e=new Set;return Object.keys(this.keys).forEach((t=>{const r=t.split(":");e.add(r[1])})),Array.from(e.values())}))}getAccounts(e){return n(this,void 0,void 0,(function*(){const t=new Array;return Object.keys(this.keys).forEach((r=>{const n=r.split(":");n[n.length-1]===e&&t.push(n.slice(0,n.length-1).join(":"))})),t}))}toString(){return"InMemoryKeyStore"}}t.InMemoryKeyStore=a},63877:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MergeKeyStore=t.KeyStore=t.InMemoryKeyStore=void 0;var n=r(30660);Object.defineProperty(t,"InMemoryKeyStore",{enumerable:!0,get:function(){return n.InMemoryKeyStore}});var o=r(74969);Object.defineProperty(t,"KeyStore",{enumerable:!0,get:function(){return o.KeyStore}});var i=r(62047);Object.defineProperty(t,"MergeKeyStore",{enumerable:!0,get:function(){return i.MergeKeyStore}})},74969:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.KeyStore=void 0,t.KeyStore=class{}},62047:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};Object.defineProperty(t,"__esModule",{value:!0}),t.MergeKeyStore=void 0;const o=r(74969);class i extends o.KeyStore{constructor(e,t={writeKeyStoreIndex:0}){super(),this.options=t,this.keyStores=e}setKey(e,t,r){return n(this,void 0,void 0,(function*(){yield this.keyStores[this.options.writeKeyStoreIndex].setKey(e,t,r)}))}getKey(e,t){return n(this,void 0,void 0,(function*(){for(const r of this.keyStores){const n=yield r.getKey(e,t);if(n)return n}return null}))}removeKey(e,t){return n(this,void 0,void 0,(function*(){for(const r of this.keyStores)yield r.removeKey(e,t)}))}clear(){return n(this,void 0,void 0,(function*(){for(const e of this.keyStores)yield e.clear()}))}getNetworks(){return n(this,void 0,void 0,(function*(){const e=new Set;for(const t of this.keyStores)for(const r of yield t.getNetworks())e.add(r);return Array.from(e)}))}getAccounts(e){return n(this,void 0,void 0,(function*(){const t=new Set;for(const r of this.keyStores)for(const n of yield r.getAccounts(e))t.add(n);return Array.from(t)}))}toString(){return`MergeKeyStore(${this.keyStores.join(", ")})`}}t.MergeKeyStore=i},64300:function(e,t){"use strict";var r=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))};function n(e){return new Promise((t=>setTimeout(t,e)))}Object.defineProperty(t,"__esModule",{value:!0}),t.exponentialBackoff=void 0,t.exponentialBackoff=function(e,t,o,i){return r(this,void 0,void 0,(function*(){let r=e;for(let e=0;e!n.env.NEAR_NO_LOGS&&console.warn(...e);t.fetchJson=function(e,t){return s(this,void 0,void 0,(function*(){let n={url:null};"string"==typeof e?n.url=e:n=e;const o=yield(0,d.exponentialBackoff)(1e3,10,1.5,(()=>s(this,void 0,void 0,(function*(){try{r.g.fetch||(r.g.fetch=(yield Promise.resolve().then((()=>a(r(2522))))).default);const e=yield r.g.fetch(n.url,{method:t?"POST":"GET",body:t||void 0,headers:Object.assign(Object.assign({},n.headers),{"Content-Type":"application/json"})});if(!e.ok){if(503===e.status)return f(`Retrying HTTP request for ${n.url} as it's not available now`),null;throw(0,u.default)(e.status,yield e.text())}return e}catch(e){if(e.toString().includes("FetchError")||e.toString().includes("Failed to fetch"))return f(`Retrying HTTP request for ${n.url} because of error: ${e}`),null;throw e}}))));if(!o)throw new c.TypedError(`Exceeded 10 attempts for ${n.url}.`,"RetriesExceeded");return yield o.json()}))}},10142:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.fetchJson=t.Provider=t.JsonRpcProvider=t.exponentialBackoff=void 0;var n=r(64300);Object.defineProperty(t,"exponentialBackoff",{enumerable:!0,get:function(){return n.exponentialBackoff}});var o=r(29172);Object.defineProperty(t,"JsonRpcProvider",{enumerable:!0,get:function(){return o.JsonRpcProvider}});var i=r(15105);Object.defineProperty(t,"Provider",{enumerable:!0,get:function(){return i.Provider}});var a=r(23147);Object.defineProperty(t,"fetchJson",{enumerable:!0,get:function(){return a.fetchJson}})},29172:function(e,t,r){"use strict";var n=r(48287).Buffer,o=r(65606),i=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},a=this&&this.__rest||function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var o=0;for(n=Object.getOwnPropertySymbols(e);oi(this,void 0,void 0,(function*(){try{const r={method:e,params:t,id:h++,jsonrpc:"2.0"},n=yield(0,p.fetchJson)(this.connection,JSON.stringify(r));if(n.error){if("object"==typeof n.error.data){if("string"==typeof n.error.data.error_message&&"string"==typeof n.error.data.error_type)throw new l.TypedError(n.error.data.error_message,n.error.data.error_type);throw(0,s.parseRpcError)(n.error.data)}{const e=`[${n.error.code}] ${n.error.message}: ${n.error.data}`;if("Timeout"===n.error.data||e.includes("Timeout error")||e.includes("query has timed out"))throw new l.TypedError(e,"TimeoutError");throw new l.TypedError(e,(0,s.getErrorTypeFromErrorMessage)(n.error.data,n.error.name))}}return n}catch(r){if("TimeoutError"===r.type)return o.env.NEAR_NO_LOGS||console.warn(`Retrying request to ${e} as it has timed out`,t),null;throw r}})))),{result:n}=r;if(void 0===n)throw new l.TypedError(`Exceeded 12 attempts for request to ${e}.`,"RetriesExceeded");return n}))}}t.JsonRpcProvider=m},15105:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Provider=void 0,t.Provider=class{}},66838:e=>{"use strict";function t(e,t){if("function"!=typeof e)throw new TypeError("argument fn must be a function");return e}function r(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new TypeError("argument obj must be object");var n=Object.getOwnPropertyDescriptor(e,t);if(!n)throw new TypeError("must call property on owner object");if(!n.configurable)throw new TypeError("property must be configurable")}e.exports=function(e){if(!e)throw new TypeError("argument namespace is required");function n(e){}return n._file=void 0,n._ignored=!0,n._namespace=e,n._traced=!1,n._warned=Object.create(null),n.function=t,n.property=r,n}},32182:(e,t,r)=>{"use strict";var n,o=r(66838)("http-errors"),i=r(97270),a=r(9596),s=r(56698),l=r(16963);function c(e){return Number(String(e).charAt(0)+"00")}function u(e,t){var r=Object.getOwnPropertyDescriptor(e,"name");r&&r.configurable&&(r.value=t,Object.defineProperty(e,"name",r))}function d(e){return"Error"!==e.substr(-5)?e+"Error":e}e.exports=function e(){for(var t,r,n=500,i={},s=0;s=600)&&o("non-error status code; use only 4xx or 5xx status codes"),("number"!=typeof n||!a[n]&&(n<400||n>=600))&&(n=500);var u=e[n]||e[c(n)];for(var d in t||(t=u?new u(r):new Error(r||a[n]),Error.captureStackTrace(t,e)),u&&t instanceof u&&t.status===n||(t.expose=n<500,t.status=t.statusCode=n),i)"status"!==d&&"statusCode"!==d&&(t[d]=i[d]);return t},e.exports.HttpError=function(){function e(){throw new TypeError("cannot construct abstract class")}return s(e,Error),e}(),e.exports.isHttpError=(n=e.exports.HttpError,function(e){return!(!e||"object"!=typeof e)&&(e instanceof n||e instanceof Error&&"boolean"==typeof e.expose&&"number"==typeof e.statusCode&&e.status===e.statusCode)}),function(e,t,r){t.forEach((function(t){var n,o=l(a[t]);switch(c(t)){case 400:n=function(e,t,r){var n=d(t);function o(e){var t=null!=e?e:a[r],s=new Error(t);return Error.captureStackTrace(s,o),i(s,o.prototype),Object.defineProperty(s,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(s,"name",{enumerable:!1,configurable:!0,value:n,writable:!0}),s}return s(o,e),u(o,n),o.prototype.status=r,o.prototype.statusCode=r,o.prototype.expose=!0,o}(r,o,t);break;case 500:n=function(e,t,r){var n=d(t);function o(e){var t=null!=e?e:a[r],s=new Error(t);return Error.captureStackTrace(s,o),i(s,o.prototype),Object.defineProperty(s,"message",{enumerable:!0,configurable:!0,value:t,writable:!0}),Object.defineProperty(s,"name",{enumerable:!1,configurable:!0,value:n,writable:!0}),s}return s(o,e),u(o,n),o.prototype.status=r,o.prototype.statusCode=r,o.prototype.expose=!1,o}(r,o,t)}n&&(e[t]=n,e[o]=n)})),e["I'mateapot"]=o.function(e.ImATeapot,'"I\'mateapot"; use "ImATeapot" instead')}(e.exports,a.codes,e.exports.HttpError)},9596:(e,t,r)=>{"use strict";var n=r(44645);function o(e){if("number"==typeof e){if(!o[e])throw new Error("invalid status code: "+e);return e}if("string"!=typeof e)throw new TypeError("code must be a number or string");var t=parseInt(e,10);if(!isNaN(t)){if(!o[t])throw new Error("invalid status code: "+t);return t}if(!(t=o[e.toLowerCase()]))throw new Error('invalid status message: "'+e+'"');return t}e.exports=o,o.STATUS_CODES=n,o.codes=function(e,t){var r=[];return Object.keys(t).forEach((function(n){var o=t[n],i=Number(n);e[i]=o,e[o]=i,e[o.toLowerCase()]=i,r.push(i)})),r}(o,n),o.redirect={300:!0,301:!0,302:!0,303:!0,305:!0,307:!0,308:!0},o.empty={204:!0,205:!0,304:!0},o.retry={502:!0,503:!0,504:!0}},25529:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.InMemorySigner=void 0;const i=r(33573),a=r(63877),s=o(r(71312)),l=r(46397);class c extends l.Signer{constructor(e){super(),this.keyStore=e}static fromKeyPair(e,t,r){return n(this,void 0,void 0,(function*(){const n=new a.InMemoryKeyStore;return yield n.setKey(e,t,r),new c(n)}))}createKey(e,t){return n(this,void 0,void 0,(function*(){const r=i.KeyPair.fromRandom("ed25519");return yield this.keyStore.setKey(t,e,r),r.getPublicKey()}))}getPublicKey(e,t){return n(this,void 0,void 0,(function*(){const r=yield this.keyStore.getKey(t,e);return null===r?null:r.getPublicKey()}))}signMessage(e,t,r){return n(this,void 0,void 0,(function*(){const n=new Uint8Array(s.default.sha256.array(e));if(!t)throw new Error("InMemorySigner requires provided account id");const o=yield this.keyStore.getKey(r,t);if(null===o)throw new Error(`Key for ${t} not found in ${r}`);return o.sign(n)}))}toString(){return`InMemorySigner(${this.keyStore})`}}t.InMemorySigner=c},37547:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signer=t.InMemorySigner=void 0;var n=r(25529);Object.defineProperty(t,"InMemorySigner",{enumerable:!0,get:function(){return n.InMemorySigner}});var o=r(46397);Object.defineProperty(t,"Signer",{enumerable:!0,get:function(){return o.Signer}})},46397:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signer=void 0,t.Signer=class{}},90591:(e,t,r)=>{"use strict";var n=r(48287).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.actionCreators=t.stringifyJsonOrBytes=void 0;const o=r(73910);function i(e){return void 0!==e.byteLength&&e.byteLength===e.length?e:n.from(JSON.stringify(e))}t.stringifyJsonOrBytes=i,t.actionCreators={addKey:function(e,t){return new o.Action({addKey:new o.AddKey({publicKey:e,accessKey:t})})},createAccount:function(){return new o.Action({createAccount:new o.CreateAccount({})})},deleteAccount:function(e){return new o.Action({deleteAccount:new o.DeleteAccount({beneficiaryId:e})})},deleteKey:function(e){return new o.Action({deleteKey:new o.DeleteKey({publicKey:e})})},deployContract:function(e){return new o.Action({deployContract:new o.DeployContract({code:e})})},fullAccessKey:function(){return new o.AccessKey({permission:new o.AccessKeyPermission({fullAccess:new o.FullAccessPermission({})})})},functionCall:function(e,t,r,n,a=i,s=!1){return s?new o.Action({functionCall:new o.FunctionCall({methodName:e,args:t,gas:r,deposit:n})}):new o.Action({functionCall:new o.FunctionCall({methodName:e,args:a(t),gas:r,deposit:n})})},functionCallAccessKey:function(e,t,r){return new o.AccessKey({permission:new o.AccessKeyPermission({functionCall:new o.FunctionCallPermission({receiverId:e,allowance:r,methodNames:t})})})},signedDelegate:function({delegateAction:e,signature:t}){return new o.Action({signedDelegate:new o.SignedDelegate({delegateAction:e,signature:t})})},stake:function(e,t){return new o.Action({stake:new o.Stake({stake:e,publicKey:t})})},transfer:function(e){return new o.Action({transfer:new o.Transfer({deposit:e})})}}},73910:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Action=t.SignedDelegate=t.DeleteAccount=t.DeleteKey=t.AddKey=t.Stake=t.Transfer=t.FunctionCall=t.DeployContract=t.CreateAccount=t.IAction=t.AccessKey=t.AccessKeyPermission=t.FullAccessPermission=t.FunctionCallPermission=void 0;const n=r(10421);class o{constructor(e){if(1!==Object.keys(e).length)throw new Error("Enum can only take single value");Object.keys(e).map((t=>{this[t]=e[t],this.enum=t}))}}class i extends n.Assignable{}t.FunctionCallPermission=i;class a extends n.Assignable{}t.FullAccessPermission=a,t.AccessKeyPermission=class extends o{};class s extends n.Assignable{}t.AccessKey=s;class l extends n.Assignable{}t.IAction=l,t.CreateAccount=class extends l{},t.DeployContract=class extends l{},t.FunctionCall=class extends l{},t.Transfer=class extends l{},t.Stake=class extends l{},t.AddKey=class extends l{},t.DeleteKey=class extends l{},t.DeleteAccount=class extends l{},t.SignedDelegate=class extends l{},t.Action=class extends o{}},98786:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createTransaction=void 0;const n=r(81266);t.createTransaction=function(e,t,r,o,i,a){return new n.Transaction({signerId:e,publicKey:t,nonce:o,receiverId:r,actions:i,blockHash:a})}},89098:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.buildDelegateAction=t.DelegateAction=void 0;const n=r(10421),o=r(90591),{addKey:i,createAccount:a,deleteAccount:s,deleteKey:l,deployContract:c,functionCall:u,stake:d,transfer:f}=o.actionCreators;class p extends n.Assignable{}t.DelegateAction=p,t.buildDelegateAction=function({actions:e,maxBlockHeight:t,nonce:r,publicKey:n,receiverId:o,senderId:h}){return new p({senderId:h,receiverId:o,actions:e.map((e=>{if(!e.type&&!e.params)return e;switch(e.type){case"AddKey":{const{publicKey:t,accessKey:r}=e.params;return i(t,r)}case"CreateAccount":return a(e.params.createAccount);case"DeleteAccount":return s(e.params.deleteAccount);case"DeleteKey":return l(e.params.publicKey);case"DeployContract":return c(e.params.code);case"FunctionCall":{const{methodName:t,args:r,gas:n,deposit:o}=e.params;return u(t,r,n,o)}case"Stake":return d(e.params.stake,e.params.publicKey);case"Transfer":{const{deposit:t}=e.params;return f(t)}}throw new Error("Unrecognized action")})),nonce:r,maxBlockHeight:t,publicKey:n})}},33797:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(90591),t),o(r(73910),t),o(r(98786),t),o(r(89098),t),o(r(81266),t),o(r(1584),t),o(r(6507),t)},66165:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.DelegateActionPrefix=void 0;const n=r(10421),o=Math.pow(2,30);class i extends n.Assignable{}class a extends i{constructor(e){super({prefix:o+e})}}t.DelegateActionPrefix=class extends a{constructor(){super(366)}}},81266:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.SCHEMA=t.SignedTransaction=t.Transaction=t.decodeSignedTransaction=t.decodeTransaction=t.encodeTransaction=t.encodeSignedDelegate=t.encodeDelegateAction=void 0;const n=r(33573),o=r(10421),i=r(92755),a=r(73910),s=r(89098),l=r(66165),c=r(6507);function u(e){return(0,i.serialize)(t.SCHEMA,e)}function d(e){return(0,i.deserialize)(t.SCHEMA,p,e)}function f(e){return(0,i.deserialize)(t.SCHEMA,h,e)}t.encodeDelegateAction=function(e){return new Uint8Array([...(0,i.serialize)(t.SCHEMA,new l.DelegateActionPrefix),...(0,i.serialize)(t.SCHEMA,e)])},t.encodeSignedDelegate=function(e){return(0,i.serialize)(t.SCHEMA,e)},t.encodeTransaction=u,t.decodeTransaction=d,t.decodeSignedTransaction=f;class p extends o.Assignable{encode(){return u(this)}static decode(e){return d(e)}}t.Transaction=p;class h extends o.Assignable{encode(){return u(this)}static decode(e){return f(e)}}t.SignedTransaction=h,t.SCHEMA=new Map([[c.Signature,{kind:"struct",fields:[["keyType","u8"],["data",[64]]]}],[h,{kind:"struct",fields:[["transaction",p],["signature",c.Signature]]}],[p,{kind:"struct",fields:[["signerId","string"],["publicKey",n.PublicKey],["nonce","u64"],["receiverId","string"],["blockHash",[32]],["actions",[a.Action]]]}],[n.PublicKey,{kind:"struct",fields:[["keyType","u8"],["data",[32]]]}],[a.AccessKey,{kind:"struct",fields:[["nonce","u64"],["permission",a.AccessKeyPermission]]}],[a.AccessKeyPermission,{kind:"enum",field:"enum",values:[["functionCall",a.FunctionCallPermission],["fullAccess",a.FullAccessPermission]]}],[a.FunctionCallPermission,{kind:"struct",fields:[["allowance",{kind:"option",type:"u128"}],["receiverId","string"],["methodNames",["string"]]]}],[a.FullAccessPermission,{kind:"struct",fields:[]}],[a.Action,{kind:"enum",field:"enum",values:[["createAccount",a.CreateAccount],["deployContract",a.DeployContract],["functionCall",a.FunctionCall],["transfer",a.Transfer],["stake",a.Stake],["addKey",a.AddKey],["deleteKey",a.DeleteKey],["deleteAccount",a.DeleteAccount],["signedDelegate",a.SignedDelegate]]}],[a.CreateAccount,{kind:"struct",fields:[]}],[a.DeployContract,{kind:"struct",fields:[["code",["u8"]]]}],[a.FunctionCall,{kind:"struct",fields:[["methodName","string"],["args",["u8"]],["gas","u64"],["deposit","u128"]]}],[a.Transfer,{kind:"struct",fields:[["deposit","u128"]]}],[a.Stake,{kind:"struct",fields:[["stake","u128"],["publicKey",n.PublicKey]]}],[a.AddKey,{kind:"struct",fields:[["publicKey",n.PublicKey],["accessKey",a.AccessKey]]}],[a.DeleteKey,{kind:"struct",fields:[["publicKey",n.PublicKey]]}],[a.DeleteAccount,{kind:"struct",fields:[["beneficiaryId","string"]]}],[s.DelegateAction,{kind:"struct",fields:[["senderId","string"],["receiverId","string"],["actions",[a.Action]],["nonce","u64"],["maxBlockHeight","u64"],["publicKey",n.PublicKey]]}],[l.DelegateActionPrefix,{kind:"struct",fields:[["prefix","u32"]]}],[a.SignedDelegate,{kind:"struct",fields:[["delegateAction",s.DelegateAction],["signature",c.Signature]]}]])},1584:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.signDelegateAction=t.signTransaction=void 0;const i=o(r(71312)),a=r(73910),s=r(98786),l=r(81266),c=r(6507);function u(e,t,r,o){return n(this,void 0,void 0,(function*(){const n=(0,l.encodeTransaction)(e),a=new Uint8Array(i.default.sha256.array(n)),s=yield t.signMessage(n,r,o);return[a,new l.SignedTransaction({transaction:e,signature:new c.Signature({keyType:e.publicKey.keyType,data:s.signature})})]}))}t.signTransaction=function(...e){return n(this,void 0,void 0,(function*(){if(e[0].constructor===l.Transaction){const[t,r,n,o]=e;return u(t,r,n,o)}{const[t,r,n,o,i,a,l]=e,c=yield i.getPublicKey(a,l);return u((0,s.createTransaction)(a,c,t,r,n,o),i,a,l)}}))},t.signDelegateAction=function({delegateAction:e,signer:t}){return n(this,void 0,void 0,(function*(){const r=(0,l.encodeDelegateAction)(e),n=yield t.sign(r),o=new a.SignedDelegate({delegateAction:e,signature:new c.Signature({keyType:e.publicKey.keyType,data:n})});return{hash:new Uint8Array(i.default.sha256.array(r)),signedDelegateAction:o}}))}},6507:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Signature=void 0;const n=r(10421);class o extends n.Assignable{}t.Signature=o},46968:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.Assignable=void 0,t.Assignable=class{constructor(e){Object.keys(e).map((t=>{this[t]=e[t]}))}}},3770:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ErrorContext=t.TypedError=t.ArgumentTypeError=t.PositionalArgsError=void 0;class r extends Error{constructor(){super("Contract method calls expect named arguments wrapped in object, e.g. { argName1: argValue1, argName2: argValue2 }")}}t.PositionalArgsError=r;class n extends Error{constructor(e,t,r){super(`Expected ${t} for '${e}' argument, but got '${JSON.stringify(r)}'`)}}t.ArgumentTypeError=n;class o extends Error{constructor(e,t,r){super(e),this.type=t||"UntypedError",this.context=r}}t.TypedError=o,t.ErrorContext=class{constructor(e){this.transactionHash=e}}},10421:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(46968),t),o(r(3770),t),o(r(17031),t)},17031:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.FinalExecutionStatusBasic=t.ExecutionStatusBasic=t.IdType=void 0;var n=r(6673);Object.defineProperty(t,"IdType",{enumerable:!0,get:function(){return n.IdType}});var o=r(60640);Object.defineProperty(t,"ExecutionStatusBasic",{enumerable:!0,get:function(){return o.ExecutionStatusBasic}}),Object.defineProperty(t,"FinalExecutionStatusBasic",{enumerable:!0,get:function(){return o.FinalExecutionStatusBasic}})},6673:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.IdType=void 0,(r=t.IdType||(t.IdType={})).Transaction="transaction",r.Receipt="receipt"},60640:(e,t)=>{"use strict";var r,n;Object.defineProperty(t,"__esModule",{value:!0}),t.FinalExecutionStatusBasic=t.ExecutionStatusBasic=void 0,(n=t.ExecutionStatusBasic||(t.ExecutionStatusBasic={})).Unknown="Unknown",n.Pending="Pending",n.Failure="Failure",(r=t.FinalExecutionStatusBasic||(t.FinalExecutionStatusBasic={})).NotStarted="NotStarted",r.Started="Started",r.Failure="Failure"},14672:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.DEFAULT_FUNCTION_CALL_GAS=void 0;const o=n(r(39404));t.DEFAULT_FUNCTION_CALL_GAS=new o.default("30000000000000")},56434:(e,t,r)=>{"use strict";var n=r(65606);Object.defineProperty(t,"__esModule",{value:!0}),t.logWarning=void 0,t.logWarning=function(...e){n.env.NEAR_NO_LOGS||console.warn(...e)}},97789:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.parseRpcError=t.parseResultError=t.getErrorTypeFromErrorMessage=t.formatError=t.ServerError=t.logWarning=void 0;var n=r(56434);Object.defineProperty(t,"logWarning",{enumerable:!0,get:function(){return n.logWarning}});var o=r(93122);Object.defineProperty(t,"ServerError",{enumerable:!0,get:function(){return o.ServerError}}),Object.defineProperty(t,"formatError",{enumerable:!0,get:function(){return o.formatError}}),Object.defineProperty(t,"getErrorTypeFromErrorMessage",{enumerable:!0,get:function(){return o.getErrorTypeFromErrorMessage}}),Object.defineProperty(t,"parseResultError",{enumerable:!0,get:function(){return o.parseResultError}}),Object.defineProperty(t,"parseRpcError",{enumerable:!0,get:function(){return o.parseRpcError}})},93122:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.getErrorTypeFromErrorMessage=t.formatError=t.parseResultError=t.parseRpcError=t.ServerError=void 0;const o=r(10421),i=n(r(57965)),a=r(17842),s=n(r(47609)),l=n(r(32842)),c={formatNear:()=>(e,t)=>(0,a.formatNearAmount)(t(e))};class u extends o.TypedError{}t.ServerError=u;class d extends u{}function f(e){const t={},r=h(e,l.default.schema,t,""),n=new u(p(r,t),r);return Object.assign(n,t),n}function p(e,t){return"string"==typeof s.default[e]?i.default.render(s.default[e],Object.assign(Object.assign({},t),c)):JSON.stringify(t)}function h(e,t,r,n){let o,i,a;for(const r in t){if(s=e[r],"[object String]"===Object.prototype.toString.call(s))return e[r];if(m(e[r]))o=e[r],i=t[r],a=r;else{if(!m(e.kind)||!m(e.kind[r]))continue;o=e.kind[r],i=t[r],a=r}}var s;if(o&&i){for(const e of Object.keys(i.props))r[e]=o[e];return h(o,t,r,a)}return r.kind=e,n}function m(e){return"[object Object]"===Object.prototype.toString.call(e)}t.parseRpcError=f,t.parseResultError=function(e){const t=f(e.status.Failure),r=new d;return Object.assign(r,t),r.type=t.type,r.message=t.message,r.transaction_outcome=e.transaction_outcome,r},t.formatError=p,t.getErrorTypeFromErrorMessage=function(e,t){switch(!0){case/^account .*? does not exist while viewing$/.test(e):case/^Account .*? doesn't exist$/.test(e):return"AccountDoesNotExist";case/^access key .*? does not exist while viewing$/.test(e):return"AccessKeyDoesNotExist";case/wasm execution failed with error: FunctionCallError\(CompilationError\(CodeDoesNotExist/.test(e):return"CodeDoesNotExist";case/Transaction nonce \d+ must be larger than nonce of the used access key \d+/.test(e):return"InvalidNonce";default:return t}}},17842:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.parseNearAmount=t.formatNearAmount=t.NEAR_NOMINATION=t.NEAR_NOMINATION_EXP=void 0;const o=n(r(39404));t.NEAR_NOMINATION_EXP=24,t.NEAR_NOMINATION=new o.default("10",10).pow(new o.default(t.NEAR_NOMINATION_EXP,10));const i=[],a=new o.default(10);for(let e=0,r=new o.default(5);e0&&n.iadd(i[e])}const a=(e=n.toString()).substring(0,e.length-t.NEAR_NOMINATION_EXP)||"0",s=e.substring(e.length-t.NEAR_NOMINATION_EXP).padStart(t.NEAR_NOMINATION_EXP,"0").substring(0,r);return`${function(e){const t=/(-?\d+)(\d{3})/;for(;t.test(e);)e=e.replace(t,"$1,$2");return e}(a)}.${s}`.replace(/\.?0*$/,"")},t.parseNearAmount=function(e){if(!e)return null;const r=(e=e.replace(/,/g,"").trim()).split("."),n=r[0],o=r[1]||"";if(r.length>2||o.length>t.NEAR_NOMINATION_EXP)throw new Error(`Cannot parse '${e}' as NEAR amount`);return""===(i=(i=n+o.padEnd(t.NEAR_NOMINATION_EXP,"0")).replace(/^0+/,""))?"0":i;var i}},46569:function(e,t,r){"use strict";var n=this&&this.__createBinding||(Object.create?function(e,t,r,n){void 0===n&&(n=r);var o=Object.getOwnPropertyDescriptor(t,r);o&&!("get"in o?!t.__esModule:o.writable||o.configurable)||(o={enumerable:!0,get:function(){return t[r]}}),Object.defineProperty(e,n,o)}:function(e,t,r,n){void 0===n&&(n=r),e[n]=t[r]}),o=this&&this.__exportStar||function(e,t){for(var r in e)"default"===r||Object.prototype.hasOwnProperty.call(t,r)||n(t,e,r)};Object.defineProperty(t,"__esModule",{value:!0}),o(r(14672),t),o(r(97789),t),o(r(17842),t),o(r(57064),t),o(r(63828),t),o(r(61722),t)},57064:(e,t,r)=>{"use strict";var n=r(65606);Object.defineProperty(t,"__esModule",{value:!0}),t.printTxOutcomeLogs=t.printTxOutcomeLogsAndFailures=void 0;const o=r(97789),i=!!n.env.NEAR_NO_LOGS;function a({contractId:e,logs:t,prefix:r=""}){if(!i)for(const n of t)console.log(`${r}Log [${e}]: ${n}`)}t.printTxOutcomeLogsAndFailures=function({contractId:e,outcome:t}){if(i)return;const r=[t.transaction_outcome,...t.receipts_outcome].reduce(((e,t)=>{const r="object"==typeof t.outcome.status&&"object"==typeof t.outcome.status.Failure;return t.outcome.logs.length||r?e.concat({receiptIds:t.outcome.receipt_ids,logs:t.outcome.logs,failure:"object"==typeof t.outcome.status&&void 0!==t.outcome.status.Failure?(0,o.parseRpcError)(t.outcome.status.Failure):null}):e}),[]);for(const t of r)console.log(`Receipt${t.receiptIds.length>1?"s":""}: ${t.receiptIds.join(", ")}`),a({contractId:e,logs:t.logs,prefix:"\t"}),t.failure&&console.warn(`\tFailure [${e}]: ${t.failure}`)},t.printTxOutcomeLogs=a},63828:(e,t,r)=>{"use strict";var n=r(48287).Buffer;Object.defineProperty(t,"__esModule",{value:!0}),t.getTransactionLastResult=void 0,t.getTransactionLastResult=function(e){if("object"==typeof e.status&&"string"==typeof e.status.SuccessValue){const t=n.from(e.status.SuccessValue,"base64").toString();try{return JSON.parse(t)}catch(e){return t}}return null}},61722:function(e,t,r){"use strict";var n=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.diffEpochValidators=t.findSeatPrice=void 0;const o=n(r(39404)),i=n(r(67725));t.findSeatPrice=function(e,t,r,n){return n&&n<49?function(e,t){const r=e.map((e=>new o.default(e.stake,10))).sort(((e,t)=>e.cmp(t))),n=new o.default(t),i=r.reduce(((e,t)=>e.add(t)));if(i.lt(n))throw new Error("Stakes are below seats");let a=new o.default(1),s=i.add(new o.default(1));for(;!a.eq(s.sub(new o.default(1)));){const e=a.add(s).div(new o.default(2));let t=!1,i=new o.default(0);for(let o=0;onew o.default(e.stake,10))).sort(((e,t)=>e.cmp(t))),i=n.reduce(((e,t)=>e.add(t)));return e.lengthr.set(e.account_id,e)));const n=new Set(t.map((e=>e.account_id)));return{newValidators:t.filter((e=>!r.has(e.account_id))),removedValidators:e.filter((e=>!n.has(e.account_id))),changedValidators:t.filter((e=>r.has(e.account_id)&&r.get(e.account_id).stake!=e.stake)).map((e=>({current:r.get(e.account_id),next:e})))}}},37503:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.WalletConnection=t.ConnectedWalletAccount=t.Near=void 0;var n=r(42481);Object.defineProperty(t,"Near",{enumerable:!0,get:function(){return n.Near}});var o=r(4758);Object.defineProperty(t,"ConnectedWalletAccount",{enumerable:!0,get:function(){return o.ConnectedWalletAccount}}),Object.defineProperty(t,"WalletConnection",{enumerable:!0,get:function(){return o.WalletConnection}})},42481:function(e,t,r){"use strict";var n=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},o=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.Near=void 0;const i=r(6692),a=o(r(39404));t.Near=class{constructor(e){var t;if(this.config=e,this.connection=i.Connection.fromConfig({networkId:e.networkId,provider:{type:"JsonRpcProvider",args:{url:e.nodeUrl,headers:e.headers}},signer:e.signer||{type:"InMemorySigner",keyStore:e.keyStore||(null===(t=e.deps)||void 0===t?void 0:t.keyStore)},jsvmAccountId:e.jsvmAccountId||`jsvm.${e.networkId}`}),e.masterAccount){const t=e.initialBalance?new a.default(e.initialBalance):new a.default("500000000000000000000000000");this.accountCreator=new i.LocalAccountCreator(new i.Account(this.connection,e.masterAccount),t)}else e.helperUrl?this.accountCreator=new i.UrlAccountCreator(this.connection,e.helperUrl):this.accountCreator=null}account(e){return n(this,void 0,void 0,(function*(){return new i.Account(this.connection,e)}))}createAccount(e,t){return n(this,void 0,void 0,(function*(){if(!this.accountCreator)throw new Error("Must specify account creator, either via masterAccount or helperUrl configuration settings.");return yield this.accountCreator.createAccount(e,t),new i.Account(this.connection,e)}))}}},4758:function(e,t,r){"use strict";var n=r(48287).Buffer,o=this&&this.__awaiter||function(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){var t;e.done?o(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}l((n=n.apply(e,t||[])).next())}))},i=this&&this.__importDefault||function(e){return e&&e.__esModule?e:{default:e}};Object.defineProperty(t,"__esModule",{value:!0}),t.ConnectedWalletAccount=t.WalletConnection=void 0;const a=r(6692),s=r(33573),l=r(33797),c=i(r(39404)),u=r(92755),d="pending_key";t.WalletConnection=class{constructor(e,t){if("string"!=typeof t)throw new Error("Please define a clear appKeyPrefix for this WalletConnection instance as the second argument to the constructor");if("undefined"==typeof window)return new Proxy(this,{get:(e,t)=>"isSignedIn"===t?()=>!1:"getAccountId"===t?()=>"":e[t]&&"function"==typeof e[t]?()=>{throw new Error("No window found in context, please ensure you are using WalletConnection on the browser")}:e[t]});this._near=e;const r=t+"_wallet_auth_key",n=JSON.parse(window.localStorage.getItem(r));this._networkId=e.config.networkId,this._walletBaseUrl=e.config.walletUrl,t=t||e.config.contractName||"default",this._keyStore=e.connection.signer.keyStore,this._authData=n||{allKeys:[]},this._authDataKey=r,this.isSignedIn()||(this._completeSignInPromise=this._completeSignInWithAccessKey())}isSignedIn(){return!!this._authData.accountId}isSignedInAsync(){return o(this,void 0,void 0,(function*(){return this._completeSignInPromise?(yield this._completeSignInPromise,this.isSignedIn()):this.isSignedIn()}))}getAccountId(){return this._authData.accountId||""}requestSignIn({contractId:e,methodNames:t,successUrl:r,failureUrl:n}){return o(this,void 0,void 0,(function*(){const o=new URL(window.location.href),i=new URL(this._walletBaseUrl+"/login/");if(i.searchParams.set("success_url",r||o.href),i.searchParams.set("failure_url",n||o.href),e){const t=yield this._near.account(e);yield t.state(),i.searchParams.set("contract_id",e);const r=s.KeyPair.fromRandom("ed25519");i.searchParams.set("public_key",r.getPublicKey().toString()),yield this._keyStore.setKey(this._networkId,d+r.getPublicKey(),r)}t&&t.forEach((e=>{i.searchParams.append("methodNames",e)})),window.location.assign(i.toString())}))}requestSignTransactions({transactions:e,meta:t,callbackUrl:r}){return o(this,void 0,void 0,(function*(){const o=new URL(window.location.href),i=new URL("sign",this._walletBaseUrl);i.searchParams.set("transactions",e.map((e=>(0,u.serialize)(l.SCHEMA,e))).map((e=>n.from(e).toString("base64"))).join(",")),i.searchParams.set("callbackUrl",r||o.href),t&&i.searchParams.set("meta",t),window.location.assign(i.toString())}))}_completeSignInWithAccessKey(){return o(this,void 0,void 0,(function*(){const e=new URL(window.location.href),t=e.searchParams.get("public_key")||"",r=(e.searchParams.get("all_keys")||"").split(","),n=e.searchParams.get("account_id")||"";if(n){const e={accountId:n,allKeys:r};window.localStorage.setItem(this._authDataKey,JSON.stringify(e)),t&&(yield this._moveKeyFromTempToPermanent(n,t)),this._authData=e}e.searchParams.delete("public_key"),e.searchParams.delete("all_keys"),e.searchParams.delete("account_id"),e.searchParams.delete("meta"),e.searchParams.delete("transactionHashes"),window.history.replaceState({},document.title,e.toString())}))}_moveKeyFromTempToPermanent(e,t){return o(this,void 0,void 0,(function*(){const r=yield this._keyStore.getKey(this._networkId,d+t);yield this._keyStore.setKey(this._networkId,e,r),yield this._keyStore.removeKey(this._networkId,d+t)}))}signOut(){this._authData={},window.localStorage.removeItem(this._authDataKey)}account(){return this._connectedAccount||(this._connectedAccount=new f(this,this._near.connection,this._authData.accountId)),this._connectedAccount}};class f extends a.Account{constructor(e,t,r){super(t,r),this.walletConnection=e}signAndSendTransaction({receiverId:e,actions:t,walletMeta:r,walletCallbackUrl:n=window.location.href}){const i=Object.create(null,{signAndSendTransaction:{get:()=>super.signAndSendTransaction}});return o(this,void 0,void 0,(function*(){const o=yield this.connection.signer.getPublicKey(this.accountId,this.connection.networkId);let a=yield this.accessKeyForTransaction(e,t,o);if(!a)throw new Error(`Cannot find matching key for transaction sent to ${e}`);if(o&&o.toString()===a.public_key)try{return yield i.signAndSendTransaction.call(this,{receiverId:e,actions:t})}catch(r){if("NotEnoughAllowance"!==r.type)throw r;a=yield this.accessKeyForTransaction(e,t)}const d=yield this.connection.provider.block({finality:"final"}),f=(0,u.baseDecode)(d.header.hash),p=s.PublicKey.from(a.public_key),h=a.access_key.nonce.add(new c.default(1)),m=(0,l.createTransaction)(this.accountId,p,e,h,t,f);return yield this.walletConnection.requestSignTransactions({transactions:[m],meta:r,callbackUrl:n}),new Promise(((e,t)=>{setTimeout((()=>{t(new Error("Failed to redirect to sign transaction"))}),1e3)}))}))}accessKeyMatchesTransaction(e,t,r){return o(this,void 0,void 0,(function*(){const{access_key:{permission:n}}=e;if("FullAccess"===n)return!0;if(n.FunctionCall){const{receiver_id:e,method_names:o}=n.FunctionCall;if(e===this.accountId&&o.includes("add_request_and_confirm"))return!0;if(e===t){if(1!==r.length)return!1;const[{functionCall:e}]=r;return e&&(!e.deposit||"0"===e.deposit.toString())&&(0===o.length||o.includes(e.methodName))}}return!1}))}accessKeyForTransaction(e,t,r){return o(this,void 0,void 0,(function*(){const n=yield this.getAccessKeys();if(r){const o=n.find((e=>e.public_key.toString()===r.toString()));if(o&&(yield this.accessKeyMatchesTransaction(o,e,t)))return o}const o=this.walletConnection._authData.allKeys;for(const r of n)if(-1!==o.indexOf(r.public_key)&&(yield this.accessKeyMatchesTransaction(r,e,t)))return r;return null}))}}t.ConnectedWalletAccount=f},90711:(e,t,r)=>{"use strict";r.d(t,{UD:()=>w});var n=r(86354),o=r(30222),i=r(58979),a=r(5581),s=r(45223),l=r(50793),c=r(19760),u=r(10134),d=r(36906);function f(e,t,r){void 0===r&&(r=!1);var f,p,h=(0,a.sb)(t),m=(0,a.sb)(t)&&function(e){var t=e.getBoundingClientRect(),r=(0,d.LI)(t.width)/e.offsetWidth||1,n=(0,d.LI)(t.height)/e.offsetHeight||1;return 1!==r||1!==n}(t),g=(0,c.A)(t),b=(0,n.A)(e,m,r),v={scrollLeft:0,scrollTop:0},y={x:0,y:0};return(h||!h&&!r)&&(("body"!==(0,s.A)(t)||(0,u.A)(g))&&(v=(f=t)!==(0,i.A)(f)&&(0,a.sb)(f)?{scrollLeft:(p=f).scrollLeft,scrollTop:p.scrollTop}:(0,o.A)(f)),(0,a.sb)(t)?((y=(0,n.A)(t,!0)).x+=t.clientLeft,y.y+=t.clientTop):g&&(y.x=(0,l.A)(g))),{x:b.left+v.scrollLeft-y.x,y:b.top+v.scrollTop-y.y,width:b.width,height:b.height}}var p=r(6979),h=r(75867),m=r(88579),g=r(14278);function b(e){var t=new Map,r=new Set,n=[];function o(e){r.add(e.name),[].concat(e.requires||[],e.requiresIfExists||[]).forEach((function(e){if(!r.has(e)){var n=t.get(e);n&&o(n)}})),n.push(e)}return e.forEach((function(e){t.set(e.name,e)})),e.forEach((function(e){r.has(e.name)||o(e)})),n}var v={placement:"bottom",modifiers:[],strategy:"absolute"};function y(){for(var e=arguments.length,t=new Array(e),r=0;r{"use strict";r.d(t,{A:()=>o});var n=r(5581);function o(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&(0,n.Ng)(r)){var o=t;do{if(o&&e.isSameNode(o))return!0;o=o.parentNode||o.host}while(o)}return!1}},86354:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(5581),o=r(36906),i=r(58979),a=r(22283);function s(e,t,r){void 0===t&&(t=!1),void 0===r&&(r=!1);var s=e.getBoundingClientRect(),l=1,c=1;t&&(0,n.sb)(e)&&(l=e.offsetWidth>0&&(0,o.LI)(s.width)/e.offsetWidth||1,c=e.offsetHeight>0&&(0,o.LI)(s.height)/e.offsetHeight||1);var u=((0,n.vq)(e)?(0,i.A)(e):window).visualViewport,d=!(0,a.A)()&&r,f=(s.left+(d&&u?u.offsetLeft:0))/l,p=(s.top+(d&&u?u.offsetTop:0))/c,h=s.width/l,m=s.height/c;return{width:h,height:m,top:p,right:f+h,bottom:p+m,left:f,x:f,y:p}}},40271:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(58979);function o(e){return(0,n.A)(e).getComputedStyle(e)}},19760:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(5581);function o(e){return(((0,n.vq)(e)?e.ownerDocument:e.document)||window.document).documentElement}},6979:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(86354);function o(e){var t=(0,n.A)(e),r=e.offsetWidth,o=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-o)<=1&&(o=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:o}}},45223:(e,t,r)=>{"use strict";function n(e){return e?(e.nodeName||"").toLowerCase():null}r.d(t,{A:()=>n})},88579:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n=r(58979),o=r(45223),i=r(40271),a=r(5581);function s(e){return["table","td","th"].indexOf((0,o.A)(e))>=0}var l=r(52083),c=r(72398);function u(e){return(0,a.sb)(e)&&"fixed"!==(0,i.A)(e).position?e.offsetParent:null}function d(e){for(var t=(0,n.A)(e),r=u(e);r&&s(r)&&"static"===(0,i.A)(r).position;)r=u(r);return r&&("html"===(0,o.A)(r)||"body"===(0,o.A)(r)&&"static"===(0,i.A)(r).position)?t:r||function(e){var t=/firefox/i.test((0,c.A)());if(/Trident/i.test((0,c.A)())&&(0,a.sb)(e)&&"fixed"===(0,i.A)(e).position)return null;var r=(0,l.A)(e);for((0,a.Ng)(r)&&(r=r.host);(0,a.sb)(r)&&["html","body"].indexOf((0,o.A)(r))<0;){var n=(0,i.A)(r);if("none"!==n.transform||"none"!==n.perspective||"paint"===n.contain||-1!==["transform","perspective"].indexOf(n.willChange)||t&&"filter"===n.willChange||t&&n.filter&&"none"!==n.filter)return r;r=r.parentNode}return null}(e)||t}},52083:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(45223),o=r(19760),i=r(5581);function a(e){return"html"===(0,n.A)(e)?e:e.assignedSlot||e.parentNode||((0,i.Ng)(e)?e.host:null)||(0,o.A)(e)}},58979:(e,t,r)=>{"use strict";function n(e){if(null==e)return window;if("[object Window]"!==e.toString()){var t=e.ownerDocument;return t&&t.defaultView||window}return e}r.d(t,{A:()=>n})},30222:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(58979);function o(e){var t=(0,n.A)(e);return{scrollLeft:t.pageXOffset,scrollTop:t.pageYOffset}}},50793:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(86354),o=r(19760),i=r(30222);function a(e){return(0,n.A)((0,o.A)(e)).left+(0,i.A)(e).scrollLeft}},5581:(e,t,r)=>{"use strict";r.d(t,{Ng:()=>a,sb:()=>i,vq:()=>o});var n=r(58979);function o(e){return e instanceof(0,n.A)(e).Element||e instanceof Element}function i(e){return e instanceof(0,n.A)(e).HTMLElement||e instanceof HTMLElement}function a(e){return"undefined"!=typeof ShadowRoot&&(e instanceof(0,n.A)(e).ShadowRoot||e instanceof ShadowRoot)}},22283:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(72398);function o(){return!/^((?!chrome|android).)*safari/i.test((0,n.A)())}},10134:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(40271);function o(e){var t=(0,n.A)(e),r=t.overflow,o=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+o)}},75867:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(52083),o=r(10134),i=r(45223),a=r(5581);function s(e){return["html","body","#document"].indexOf((0,i.A)(e))>=0?e.ownerDocument.body:(0,a.sb)(e)&&(0,o.A)(e)?e:s((0,n.A)(e))}var l=r(58979);function c(e,t){var r;void 0===t&&(t=[]);var i=s(e),a=i===(null==(r=e.ownerDocument)?void 0:r.body),u=(0,l.A)(i),d=a?[u].concat(u.visualViewport||[],(0,o.A)(i)?i:[]):i,f=t.concat(d);return a?f:f.concat(c((0,n.A)(d)))}},14278:(e,t,r)=>{"use strict";r.d(t,{DD:()=>g,GM:()=>b,Mn:()=>n,OM:()=>l,Ol:()=>m,R9:()=>f,WY:()=>d,_N:()=>u,ir:()=>h,kb:()=>a,ni:()=>c,pG:()=>i,qZ:()=>s,sQ:()=>o,xf:()=>p});var n="top",o="bottom",i="right",a="left",s="auto",l=[n,o,i,a],c="start",u="end",d="clippingParents",f="viewport",p="popper",h="reference",m=l.reduce((function(e,t){return e.concat([t+"-"+c,t+"-"+u])}),[]),g=[].concat(l,[s]).reduce((function(e,t){return e.concat([t,t+"-"+c,t+"-"+u])}),[]),b=["beforeRead","read","afterRead","beforeMain","main","afterMain","beforeWrite","write","afterWrite"]},78256:(e,t,r)=>{"use strict";r.d(t,{A:()=>f});var n=r(32632),o=r(6979),i=r(85446),a=r(88579),s=r(39703),l=r(86523),c=r(54318),u=r(71007),d=r(14278);const f={name:"arrow",enabled:!0,phase:"main",fn:function(e){var t,r=e.state,i=e.name,f=e.options,p=r.elements.arrow,h=r.modifiersData.popperOffsets,m=(0,n.A)(r.placement),g=(0,s.A)(m),b=[d.kb,d.pG].indexOf(m)>=0?"height":"width";if(p&&h){var v=function(e,t){return e="function"==typeof e?e(Object.assign({},t.rects,{placement:t.placement})):e,(0,c.A)("number"!=typeof e?e:(0,u.A)(e,d.OM))}(f.padding,r),y=(0,o.A)(p),w="y"===g?d.Mn:d.kb,E="y"===g?d.sQ:d.pG,_=r.rects.reference[b]+r.rects.reference[g]-h[g]-r.rects.popper[b],S=h[g]-r.rects.reference[g],x=(0,a.A)(p),A=x?"y"===g?x.clientHeight||0:x.clientWidth||0:0,T=_/2-S/2,C=v[w],k=A-y[b]-v[E],O=A/2-y[b]/2+T,R=(0,l.u)(C,O,k),N=g;r.modifiersData[i]=((t={})[N]=R,t.centerOffset=R-O,t)}},effect:function(e){var t=e.state,r=e.options.element,n=void 0===r?"[data-popper-arrow]":r;null!=n&&("string"!=typeof n||(n=t.elements.popper.querySelector(n)))&&(0,i.A)(t.elements.popper,n)&&(t.elements.arrow=n)},requires:["popperOffsets"],requiresIfExists:["preventOverflow"]}},1262:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(14278),o=r(88579),i=r(58979),a=r(19760),s=r(40271),l=r(32632),c=r(98101),u=r(36906),d={top:"auto",right:"auto",bottom:"auto",left:"auto"};function f(e){var t,r=e.popper,l=e.popperRect,c=e.placement,f=e.variation,p=e.offsets,h=e.position,m=e.gpuAcceleration,g=e.adaptive,b=e.roundOffsets,v=e.isFixed,y=p.x,w=void 0===y?0:y,E=p.y,_=void 0===E?0:E,S="function"==typeof b?b({x:w,y:_}):{x:w,y:_};w=S.x,_=S.y;var x=p.hasOwnProperty("x"),A=p.hasOwnProperty("y"),T=n.kb,C=n.Mn,k=window;if(g){var O=(0,o.A)(r),R="clientHeight",N="clientWidth";O===(0,i.A)(r)&&(O=(0,a.A)(r),"static"!==(0,s.A)(O).position&&"absolute"===h&&(R="scrollHeight",N="scrollWidth")),(c===n.Mn||(c===n.kb||c===n.pG)&&f===n._N)&&(C=n.sQ,_-=(v&&O===k&&k.visualViewport?k.visualViewport.height:O[R])-l.height,_*=m?1:-1),c!==n.kb&&(c!==n.Mn&&c!==n.sQ||f!==n._N)||(T=n.pG,w-=(v&&O===k&&k.visualViewport?k.visualViewport.width:O[N])-l.width,w*=m?1:-1)}var I,M=Object.assign({position:h},g&&d),P=!0===b?function(e,t){var r=e.x,n=e.y,o=t.devicePixelRatio||1;return{x:(0,u.LI)(r*o)/o||0,y:(0,u.LI)(n*o)/o||0}}({x:w,y:_},(0,i.A)(r)):{x:w,y:_};return w=P.x,_=P.y,m?Object.assign({},M,((I={})[C]=A?"0":"",I[T]=x?"0":"",I.transform=(k.devicePixelRatio||1)<=1?"translate("+w+"px, "+_+"px)":"translate3d("+w+"px, "+_+"px, 0)",I)):Object.assign({},M,((t={})[C]=A?_+"px":"",t[T]=x?w+"px":"",t.transform="",t))}const p={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:function(e){var t=e.state,r=e.options,n=r.gpuAcceleration,o=void 0===n||n,i=r.adaptive,a=void 0===i||i,s=r.roundOffsets,u=void 0===s||s,d={placement:(0,l.A)(t.placement),variation:(0,c.A)(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:o,isFixed:"fixed"===t.options.strategy};null!=t.modifiersData.popperOffsets&&(t.styles.popper=Object.assign({},t.styles.popper,f(Object.assign({},d,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:a,roundOffsets:u})))),null!=t.modifiersData.arrow&&(t.styles.arrow=Object.assign({},t.styles.arrow,f(Object.assign({},d,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:u})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})},data:{}}},59068:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(58979),o={passive:!0};const i={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:function(e){var t=e.state,r=e.instance,i=e.options,a=i.scroll,s=void 0===a||a,l=i.resize,c=void 0===l||l,u=(0,n.A)(t.elements.popper),d=[].concat(t.scrollParents.reference,t.scrollParents.popper);return s&&d.forEach((function(e){e.addEventListener("scroll",r.update,o)})),c&&u.addEventListener("resize",r.update,o),function(){s&&d.forEach((function(e){e.removeEventListener("scroll",r.update,o)})),c&&u.removeEventListener("resize",r.update,o)}},data:{}}},80644:(e,t,r)=>{"use strict";r.d(t,{A:()=>d});var n={left:"right",right:"left",bottom:"top",top:"bottom"};function o(e){return e.replace(/left|right|bottom|top/g,(function(e){return n[e]}))}var i=r(32632),a={start:"end",end:"start"};function s(e){return e.replace(/start|end/g,(function(e){return a[e]}))}var l=r(68778),c=r(98101),u=r(14278);const d={name:"flip",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var a=r.mainAxis,d=void 0===a||a,f=r.altAxis,p=void 0===f||f,h=r.fallbackPlacements,m=r.padding,g=r.boundary,b=r.rootBoundary,v=r.altBoundary,y=r.flipVariations,w=void 0===y||y,E=r.allowedAutoPlacements,_=t.options.placement,S=(0,i.A)(_),x=h||(S!==_&&w?function(e){if((0,i.A)(e)===u.qZ)return[];var t=o(e);return[s(e),t,s(t)]}(_):[o(_)]),A=[_].concat(x).reduce((function(e,r){return e.concat((0,i.A)(r)===u.qZ?function(e,t){void 0===t&&(t={});var r=t,n=r.placement,o=r.boundary,a=r.rootBoundary,s=r.padding,d=r.flipVariations,f=r.allowedAutoPlacements,p=void 0===f?u.DD:f,h=(0,c.A)(n),m=h?d?u.Ol:u.Ol.filter((function(e){return(0,c.A)(e)===h})):u.OM,g=m.filter((function(e){return p.indexOf(e)>=0}));0===g.length&&(g=m);var b=g.reduce((function(t,r){return t[r]=(0,l.A)(e,{placement:r,boundary:o,rootBoundary:a,padding:s})[(0,i.A)(r)],t}),{});return Object.keys(b).sort((function(e,t){return b[e]-b[t]}))}(t,{placement:r,boundary:g,rootBoundary:b,padding:m,flipVariations:w,allowedAutoPlacements:E}):r)}),[]),T=t.rects.reference,C=t.rects.popper,k=new Map,O=!0,R=A[0],N=0;N=0,L=D?"width":"height",F=(0,l.A)(t,{placement:I,boundary:g,rootBoundary:b,altBoundary:v,padding:m}),B=D?P?u.pG:u.kb:P?u.sQ:u.Mn;T[L]>C[L]&&(B=o(B));var U=o(B),j=[];if(d&&j.push(F[M]<=0),p&&j.push(F[B]<=0,F[U]<=0),j.every((function(e){return e}))){R=I,O=!1;break}k.set(I,j)}if(O)for(var z=function(e){var t=A.find((function(t){var r=k.get(t);if(r)return r.slice(0,e).every((function(e){return e}))}));if(t)return R=t,"break"},H=w?3:1;H>0&&"break"!==z(H);H--);t.placement!==R&&(t.modifiersData[n]._skip=!0,t.placement=R,t.reset=!0)}},requiresIfExists:["offset"],data:{_skip:!1}}},89081:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(14278),o=r(68778);function i(e,t,r){return void 0===r&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function a(e){return[n.Mn,n.pG,n.sQ,n.kb].some((function(t){return e[t]>=0}))}const s={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:function(e){var t=e.state,r=e.name,n=t.rects.reference,s=t.rects.popper,l=t.modifiersData.preventOverflow,c=(0,o.A)(t,{elementContext:"reference"}),u=(0,o.A)(t,{altBoundary:!0}),d=i(c,n),f=i(u,s,l),p=a(d),h=a(f);t.modifiersData[r]={referenceClippingOffsets:d,popperEscapeOffsets:f,isReferenceHidden:p,hasPopperEscaped:h},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":p,"data-popper-escaped":h})}}},18490:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(32632),o=r(14278);const i={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:function(e){var t=e.state,r=e.options,i=e.name,a=r.offset,s=void 0===a?[0,0]:a,l=o.DD.reduce((function(e,r){return e[r]=function(e,t,r){var i=(0,n.A)(e),a=[o.kb,o.Mn].indexOf(i)>=0?-1:1,s="function"==typeof r?r(Object.assign({},t,{placement:e})):r,l=s[0],c=s[1];return l=l||0,c=(c||0)*a,[o.kb,o.pG].indexOf(i)>=0?{x:c,y:l}:{x:l,y:c}}(r,t.rects,s),e}),{}),c=l[t.placement],u=c.x,d=c.y;null!=t.modifiersData.popperOffsets&&(t.modifiersData.popperOffsets.x+=u,t.modifiersData.popperOffsets.y+=d),t.modifiersData[i]=l}}},85059:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(1815);const o={name:"popperOffsets",enabled:!0,phase:"read",fn:function(e){var t=e.state,r=e.name;t.modifiersData[r]=(0,n.A)({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})},data:{}}},10192:(e,t,r)=>{"use strict";r.d(t,{A:()=>p});var n=r(14278),o=r(32632),i=r(39703),a=r(86523),s=r(6979),l=r(88579),c=r(68778),u=r(98101),d=r(67364),f=r(36906);const p={name:"preventOverflow",enabled:!0,phase:"main",fn:function(e){var t=e.state,r=e.options,p=e.name,h=r.mainAxis,m=void 0===h||h,g=r.altAxis,b=void 0!==g&&g,v=r.boundary,y=r.rootBoundary,w=r.altBoundary,E=r.padding,_=r.tether,S=void 0===_||_,x=r.tetherOffset,A=void 0===x?0:x,T=(0,c.A)(t,{boundary:v,rootBoundary:y,padding:E,altBoundary:w}),C=(0,o.A)(t.placement),k=(0,u.A)(t.placement),O=!k,R=(0,i.A)(C),N="x"===R?"y":"x",I=t.modifiersData.popperOffsets,M=t.rects.reference,P=t.rects.popper,D="function"==typeof A?A(Object.assign({},t.rects,{placement:t.placement})):A,L="number"==typeof D?{mainAxis:D,altAxis:D}:Object.assign({mainAxis:0,altAxis:0},D),F=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(I){if(m){var U,j="y"===R?n.Mn:n.kb,z="y"===R?n.sQ:n.pG,H="y"===R?"height":"width",G=I[R],W=G+T[j],q=G-T[z],V=S?-P[H]/2:0,Y=k===n.ni?M[H]:P[H],K=k===n.ni?-P[H]:-M[H],X=t.elements.arrow,Z=S&&X?(0,s.A)(X):{width:0,height:0},Q=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:(0,d.A)(),J=Q[j],$=Q[z],ee=(0,a.u)(0,M[H],Z[H]),te=O?M[H]/2-V-ee-J-L.mainAxis:Y-ee-J-L.mainAxis,re=O?-M[H]/2+V+ee+$+L.mainAxis:K+ee+$+L.mainAxis,ne=t.elements.arrow&&(0,l.A)(t.elements.arrow),oe=ne?"y"===R?ne.clientTop||0:ne.clientLeft||0:0,ie=null!=(U=null==F?void 0:F[R])?U:0,ae=G+te-ie-oe,se=G+re-ie,le=(0,a.u)(S?(0,f.jk)(W,ae):W,G,S?(0,f.T9)(q,se):q);I[R]=le,B[R]=le-G}if(b){var ce,ue="x"===R?n.Mn:n.kb,de="x"===R?n.sQ:n.pG,fe=I[N],pe="y"===N?"height":"width",he=fe+T[ue],me=fe-T[de],ge=-1!==[n.Mn,n.kb].indexOf(C),be=null!=(ce=null==F?void 0:F[N])?ce:0,ve=ge?he:fe-M[pe]-P[pe]-be+L.altAxis,ye=ge?fe+M[pe]+P[pe]-be-L.altAxis:me,we=S&&ge?(0,a.P)(ve,fe,ye):(0,a.u)(S?ve:he,fe,S?ye:me);I[N]=we,B[N]=we-fe}t.modifiersData[p]=B}},requiresIfExists:["offset"]}},1815:(e,t,r)=>{"use strict";r.d(t,{A:()=>s});var n=r(32632),o=r(98101),i=r(39703),a=r(14278);function s(e){var t,r=e.reference,s=e.element,l=e.placement,c=l?(0,n.A)(l):null,u=l?(0,o.A)(l):null,d=r.x+r.width/2-s.width/2,f=r.y+r.height/2-s.height/2;switch(c){case a.Mn:t={x:d,y:r.y-s.height};break;case a.sQ:t={x:d,y:r.y+r.height};break;case a.pG:t={x:r.x+r.width,y:f};break;case a.kb:t={x:r.x-s.width,y:f};break;default:t={x:r.x,y:r.y}}var p=c?(0,i.A)(c):null;if(null!=p){var h="y"===p?"height":"width";switch(u){case a.ni:t[p]=t[p]-(r[h]/2-s[h]/2);break;case a._N:t[p]=t[p]+(r[h]/2-s[h]/2)}}return t}},68778:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r(14278),o=r(58979),i=r(19760),a=r(50793),s=r(22283),l=r(40271),c=r(30222),u=r(36906),d=r(75867),f=r(88579),p=r(5581),h=r(86354),m=r(52083),g=r(85446),b=r(45223);function v(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function y(e,t,r){return t===n.R9?v(function(e,t){var r=(0,o.A)(e),n=(0,i.A)(e),l=r.visualViewport,c=n.clientWidth,u=n.clientHeight,d=0,f=0;if(l){c=l.width,u=l.height;var p=(0,s.A)();(p||!p&&"fixed"===t)&&(d=l.offsetLeft,f=l.offsetTop)}return{width:c,height:u,x:d+(0,a.A)(e),y:f}}(e,r)):(0,p.vq)(t)?function(e,t){var r=(0,h.A)(e,!1,"fixed"===t);return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}(t,r):v(function(e){var t,r=(0,i.A)(e),n=(0,c.A)(e),o=null==(t=e.ownerDocument)?void 0:t.body,s=(0,u.T9)(r.scrollWidth,r.clientWidth,o?o.scrollWidth:0,o?o.clientWidth:0),d=(0,u.T9)(r.scrollHeight,r.clientHeight,o?o.scrollHeight:0,o?o.clientHeight:0),f=-n.scrollLeft+(0,a.A)(e),p=-n.scrollTop;return"rtl"===(0,l.A)(o||r).direction&&(f+=(0,u.T9)(r.clientWidth,o?o.clientWidth:0)-s),{width:s,height:d,x:f,y:p}}((0,i.A)(e)))}var w=r(1815),E=r(54318),_=r(71007);function S(e,t){void 0===t&&(t={});var r=t,o=r.placement,a=void 0===o?e.placement:o,s=r.strategy,c=void 0===s?e.strategy:s,S=r.boundary,x=void 0===S?n.WY:S,A=r.rootBoundary,T=void 0===A?n.R9:A,C=r.elementContext,k=void 0===C?n.xf:C,O=r.altBoundary,R=void 0!==O&&O,N=r.padding,I=void 0===N?0:N,M=(0,E.A)("number"!=typeof I?I:(0,_.A)(I,n.OM)),P=k===n.xf?n.ir:n.xf,D=e.rects.popper,L=e.elements[R?P:k],F=function(e,t,r,n){var o="clippingParents"===t?function(e){var t=(0,d.A)((0,m.A)(e)),r=["absolute","fixed"].indexOf((0,l.A)(e).position)>=0&&(0,p.sb)(e)?(0,f.A)(e):e;return(0,p.vq)(r)?t.filter((function(e){return(0,p.vq)(e)&&(0,g.A)(e,r)&&"body"!==(0,b.A)(e)})):[]}(e):[].concat(t),i=[].concat(o,[r]),a=i[0],s=i.reduce((function(t,r){var o=y(e,r,n);return t.top=(0,u.T9)(o.top,t.top),t.right=(0,u.jk)(o.right,t.right),t.bottom=(0,u.jk)(o.bottom,t.bottom),t.left=(0,u.T9)(o.left,t.left),t}),y(e,a,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}((0,p.vq)(L)?L:L.contextElement||(0,i.A)(e.elements.popper),x,T,c),B=(0,h.A)(e.elements.reference),U=(0,w.A)({reference:B,element:D,strategy:"absolute",placement:a}),j=v(Object.assign({},D,U)),z=k===n.xf?j:B,H={top:F.top-z.top+M.top,bottom:z.bottom-F.bottom+M.bottom,left:F.left-z.left+M.left,right:z.right-F.right+M.right},G=e.modifiersData.offset;if(k===n.xf&&G){var W=G[a];Object.keys(H).forEach((function(e){var t=[n.pG,n.sQ].indexOf(e)>=0?1:-1,r=[n.Mn,n.sQ].indexOf(e)>=0?"y":"x";H[e]+=W[r]*t}))}return H}},71007:(e,t,r)=>{"use strict";function n(e,t){return t.reduce((function(t,r){return t[r]=e,t}),{})}r.d(t,{A:()=>n})},32632:(e,t,r)=>{"use strict";function n(e){return e.split("-")[0]}r.d(t,{A:()=>n})},67364:(e,t,r)=>{"use strict";function n(){return{top:0,right:0,bottom:0,left:0}}r.d(t,{A:()=>n})},39703:(e,t,r)=>{"use strict";function n(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}r.d(t,{A:()=>n})},98101:(e,t,r)=>{"use strict";function n(e){return e.split("-")[1]}r.d(t,{A:()=>n})},36906:(e,t,r)=>{"use strict";r.d(t,{LI:()=>i,T9:()=>n,jk:()=>o});var n=Math.max,o=Math.min,i=Math.round},54318:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(67364);function o(e){return Object.assign({},(0,n.A)(),e)}},72398:(e,t,r)=>{"use strict";function n(){var e=navigator.userAgentData;return null!=e&&e.brands&&Array.isArray(e.brands)?e.brands.map((function(e){return e.brand+"/"+e.version})).join(" "):navigator.userAgent}r.d(t,{A:()=>n})},86523:(e,t,r)=>{"use strict";r.d(t,{P:()=>i,u:()=>o});var n=r(36906);function o(e,t,r){return(0,n.T9)(e,(0,n.jk)(t,r))}function i(e,t,r){var n=o(e,t,r);return n>r?r:n}},81109:e=>{var t,r;function n(e,[t,r]){return Math.min(r,Math.max(t,e))}t=e.exports,r=()=>n,Object.defineProperty(t,"clamp",{get:r,set:undefined,enumerable:!0,configurable:!0})},80739:e=>{var t,r;function n(e,t,{checkForDefaultPrevented:r=!0}={}){return function(n){if(null==e||e(n),!1===r||!n.defaultPrevented)return null==t?void 0:t(n)}}t=e.exports,r=()=>n,Object.defineProperty(t,"composeEventHandlers",{get:r,set:undefined,enumerable:!0,configurable:!0})},11328:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(95791),a=r(89656),s=r(10207),l=r(80739),c=r(22971),u=r(62053),d=r(67146),f=r(6411),p=r(62585);function h(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function m(e){return e&&e.__esModule?e.default:e}h(e.exports,"createAccordionScope",(()=>_)),h(e.exports,"Accordion",(()=>x)),h(e.exports,"AccordionItem",(()=>F)),h(e.exports,"AccordionHeader",(()=>B)),h(e.exports,"AccordionTrigger",(()=>j)),h(e.exports,"AccordionContent",(()=>z)),h(e.exports,"Root",(()=>G)),h(e.exports,"Item",(()=>W)),h(e.exports,"Header",(()=>q)),h(e.exports,"Trigger",(()=>V)),h(e.exports,"Content",(()=>Y));const g="Accordion",b=["Home","End","ArrowDown","ArrowUp","ArrowLeft","ArrowRight"],[v,y,w]=a.createCollection(g),[E,_]=i.createContextScope(g,[w,d.createCollapsibleScope]),S=d.createCollapsibleScope(),x=m(o).forwardRef(((e,t)=>{const{type:r,...i}=e,a=i,s=i;return m(o).createElement(v.Provider,{scope:e.__scopeAccordion},"multiple"===r?m(o).createElement(R,m(n)({},s,{ref:t})):m(o).createElement(O,m(n)({},a,{ref:t})))}));x.propTypes={type(e){const t=e.value||e.defaultValue;return e.type&&!["single","multiple"].includes(e.type)?new Error("Invalid prop `type` supplied to `Accordion`. Expected one of `single | multiple`."):"multiple"===e.type&&"string"==typeof t?new Error("Invalid prop `type` supplied to `Accordion`. Expected `single` when `defaultValue` or `value` is type `string`."):"single"===e.type&&Array.isArray(t)?new Error("Invalid prop `type` supplied to `Accordion`. Expected `multiple` when `defaultValue` or `value` is type `string[]`."):null}};const[A,T]=E(g),[C,k]=E(g,{collapsible:!1}),O=m(o).forwardRef(((e,t)=>{const{value:r,defaultValue:i,onValueChange:a=(()=>{}),collapsible:s=!1,...l}=e,[u,d]=c.useControllableState({prop:r,defaultProp:i,onChange:a});return m(o).createElement(A,{scope:e.__scopeAccordion,value:u?[u]:[],onItemOpen:d,onItemClose:m(o).useCallback((()=>s&&d("")),[s,d])},m(o).createElement(C,{scope:e.__scopeAccordion,collapsible:s},m(o).createElement(M,m(n)({},l,{ref:t}))))})),R=m(o).forwardRef(((e,t)=>{const{value:r,defaultValue:i,onValueChange:a=(()=>{}),...s}=e,[l=[],u]=c.useControllableState({prop:r,defaultProp:i,onChange:a}),d=m(o).useCallback((e=>u(((t=[])=>[...t,e]))),[u]),f=m(o).useCallback((e=>u(((t=[])=>t.filter((t=>t!==e))))),[u]);return m(o).createElement(A,{scope:e.__scopeAccordion,value:l,onItemOpen:d,onItemClose:f},m(o).createElement(C,{scope:e.__scopeAccordion,collapsible:!0},m(o).createElement(M,m(n)({},s,{ref:t}))))})),[N,I]=E(g),M=m(o).forwardRef(((e,t)=>{const{__scopeAccordion:r,disabled:i,dir:a,orientation:c="vertical",...d}=e,f=m(o).useRef(null),h=s.useComposedRefs(f,t),g=y(r),w="ltr"===p.useDirection(a),E=l.composeEventHandlers(e.onKeyDown,(e=>{var t;if(!b.includes(e.key))return;const r=e.target,n=g().filter((e=>{var t;return!(null!==(t=e.ref.current)&&void 0!==t&&t.disabled)})),o=n.findIndex((e=>e.ref.current===r)),i=n.length;if(-1===o)return;e.preventDefault();let a=o;const s=i-1,l=()=>{a=o+1,a>s&&(a=0)},u=()=>{a=o-1,a<0&&(a=s)};switch(e.key){case"Home":a=0;break;case"End":a=s;break;case"ArrowRight":"horizontal"===c&&(w?l():u());break;case"ArrowDown":"vertical"===c&&l();break;case"ArrowLeft":"horizontal"===c&&(w?u():l());break;case"ArrowUp":"vertical"===c&&u()}null===(t=n[a%i].ref.current)||void 0===t||t.focus()}));return m(o).createElement(N,{scope:r,disabled:i,direction:a,orientation:c},m(o).createElement(v.Slot,{scope:r},m(o).createElement(u.Primitive.div,m(n)({},d,{"data-orientation":c,ref:h,onKeyDown:i?void 0:E}))))})),P="AccordionItem",[D,L]=E(P),F=m(o).forwardRef(((e,t)=>{const{__scopeAccordion:r,value:i,...a}=e,s=I(P,r),l=T(P,r),c=S(r),u=f.useId(),p=i&&l.value.includes(i)||!1,h=s.disabled||e.disabled;return m(o).createElement(D,{scope:r,open:p,disabled:h,triggerId:u},m(o).createElement(d.Root,m(n)({"data-orientation":s.orientation,"data-state":H(p)},c,a,{ref:t,disabled:h,open:p,onOpenChange:e=>{e?l.onItemOpen(i):l.onItemClose(i)}})))})),B=m(o).forwardRef(((e,t)=>{const{__scopeAccordion:r,...i}=e,a=I(g,r),s=L("AccordionHeader",r);return m(o).createElement(u.Primitive.h3,m(n)({"data-orientation":a.orientation,"data-state":H(s.open),"data-disabled":s.disabled?"":void 0},i,{ref:t}))})),U="AccordionTrigger",j=m(o).forwardRef(((e,t)=>{const{__scopeAccordion:r,...i}=e,a=I(g,r),s=L(U,r),l=k(U,r),c=S(r);return m(o).createElement(v.ItemSlot,{scope:r},m(o).createElement(d.Trigger,m(n)({"aria-disabled":s.open&&!l.collapsible||void 0,"data-orientation":a.orientation,id:s.triggerId},c,i,{ref:t})))})),z=m(o).forwardRef(((e,t)=>{const{__scopeAccordion:r,...i}=e,a=I(g,r),s=L("AccordionContent",r),l=S(r);return m(o).createElement(d.Content,m(n)({role:"region","aria-labelledby":s.triggerId,"data-orientation":a.orientation},l,i,{ref:t,style:{"--radix-accordion-content-height":"var(--radix-collapsible-content-height)","--radix-accordion-content-width":"var(--radix-collapsible-content-width)",...e.style}}))}));function H(e){return e?"open":"closed"}const G=x,W=F,q=B,V=j,Y=z},75947:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(95791),a=r(10207),s=r(57828),l=r(80739),c=r(56612);function u(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function d(e){return e&&e.__esModule?e.default:e}u(e.exports,"createAlertDialogScope",(()=>p)),u(e.exports,"AlertDialog",(()=>m)),u(e.exports,"AlertDialogTrigger",(()=>g)),u(e.exports,"AlertDialogPortal",(()=>b)),u(e.exports,"AlertDialogOverlay",(()=>v)),u(e.exports,"AlertDialogContent",(()=>_)),u(e.exports,"AlertDialogAction",(()=>T)),u(e.exports,"AlertDialogCancel",(()=>C)),u(e.exports,"AlertDialogTitle",(()=>x)),u(e.exports,"AlertDialogDescription",(()=>A)),u(e.exports,"Root",(()=>k)),u(e.exports,"Trigger",(()=>O)),u(e.exports,"Portal",(()=>R)),u(e.exports,"Overlay",(()=>N)),u(e.exports,"Content",(()=>I)),u(e.exports,"Action",(()=>M)),u(e.exports,"Cancel",(()=>P)),u(e.exports,"Title",(()=>D)),u(e.exports,"Description",(()=>L));const[f,p]=i.createContextScope("AlertDialog",[s.createDialogScope]),h=s.createDialogScope(),m=e=>{const{__scopeAlertDialog:t,...r}=e,i=h(t);return o.createElement(s.Root,d(n)({},i,r,{modal:!0}))},g=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...i}=e,a=h(r);return o.createElement(s.Trigger,d(n)({},a,i,{ref:t}))})),b=e=>{const{__scopeAlertDialog:t,...r}=e,i=h(t);return o.createElement(s.Portal,d(n)({},i,r))},v=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...i}=e,a=h(r);return o.createElement(s.Overlay,d(n)({},a,i,{ref:t}))})),y="AlertDialogContent",[w,E]=f(y),_=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,children:i,...u}=e,f=h(r),p=o.useRef(null),m=a.useComposedRefs(t,p),g=o.useRef(null);return o.createElement(s.WarningProvider,{contentName:y,titleName:S,docsSlug:"alert-dialog"},o.createElement(w,{scope:r,cancelRef:g},o.createElement(s.Content,d(n)({role:"alertdialog"},f,u,{ref:m,onOpenAutoFocus:l.composeEventHandlers(u.onOpenAutoFocus,(e=>{var t;e.preventDefault(),null===(t=g.current)||void 0===t||t.focus({preventScroll:!0})})),onPointerDownOutside:e=>e.preventDefault(),onInteractOutside:e=>e.preventDefault()}),o.createElement(c.Slottable,null,i),!1)))})),S="AlertDialogTitle",x=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...i}=e,a=h(r);return o.createElement(s.Title,d(n)({},a,i,{ref:t}))})),A=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...i}=e,a=h(r);return o.createElement(s.Description,d(n)({},a,i,{ref:t}))})),T=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...i}=e,a=h(r);return o.createElement(s.Close,d(n)({},a,i,{ref:t}))})),C=o.forwardRef(((e,t)=>{const{__scopeAlertDialog:r,...i}=e,{cancelRef:l}=E("AlertDialogCancel",r),c=h(r),u=a.useComposedRefs(t,l);return o.createElement(s.Close,d(n)({},c,i,{ref:u}))})),k=m,O=g,R=b,N=v,I=_,M=T,P=C,D=x,L=A},74205:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(62053);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}a(e.exports,"Arrow",(()=>s)),a(e.exports,"Root",(()=>l));const s=o.forwardRef(((e,t)=>{const{children:r,width:a=10,height:s=5,...l}=e;return o.createElement(i.Primitive.svg,((c=n)&&c.__esModule?c.default:c)({},l,{ref:t,width:a,height:s,viewBox:"0 0 30 10",preserveAspectRatio:"none"}),e.asChild?r:o.createElement("polygon",{points:"0,0 30,0 15,10"}));var c})),l=s},1890:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(62053);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}a(e.exports,"AspectRatio",(()=>s)),a(e.exports,"Root",(()=>l));const s=o.forwardRef(((e,t)=>{const{ratio:r=1,style:a,...s}=e;return o.createElement("div",{style:{position:"relative",width:"100%",paddingBottom:100/r+"%"},"data-radix-aspect-ratio-wrapper":""},o.createElement(i.Primitive.div,((l=n)&&l.__esModule?l.default:l)({},s,{ref:t,style:{...a,position:"absolute",top:0,right:0,bottom:0,left:0}})));var l})),l=s},21487:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(95791),a=r(80283),s=r(95696),l=r(62053);function c(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function u(e){return e&&e.__esModule?e.default:e}c(e.exports,"createAvatarScope",(()=>p)),c(e.exports,"Avatar",(()=>g)),c(e.exports,"AvatarImage",(()=>b)),c(e.exports,"AvatarFallback",(()=>v)),c(e.exports,"Root",(()=>y)),c(e.exports,"Image",(()=>w)),c(e.exports,"Fallback",(()=>E));const d="Avatar",[f,p]=i.createContextScope(d),[h,m]=f(d),g=o.forwardRef(((e,t)=>{const{__scopeAvatar:r,...i}=e,[a,s]=o.useState("idle");return o.createElement(h,{scope:r,imageLoadingStatus:a,onImageLoadingStatusChange:s},o.createElement(l.Primitive.span,u(n)({},i,{ref:t})))})),b=o.forwardRef(((e,t)=>{const{__scopeAvatar:r,src:i,onLoadingStatusChange:c=(()=>{}),...d}=e,f=m("AvatarImage",r),p=function(e){const[t,r]=o.useState("idle");return s.useLayoutEffect((()=>{if(!e)return void r("error");let t=!0;const n=new window.Image,o=e=>()=>{t&&r(e)};return r("loading"),n.onload=o("loaded"),n.onerror=o("error"),n.src=e,()=>{t=!1}}),[e]),t}(i),h=a.useCallbackRef((e=>{c(e),f.onImageLoadingStatusChange(e)}));return s.useLayoutEffect((()=>{"idle"!==p&&h(p)}),[p,h]),"loaded"===p?o.createElement(l.Primitive.img,u(n)({},d,{ref:t,src:i})):null})),v=o.forwardRef(((e,t)=>{const{__scopeAvatar:r,delayMs:i,...a}=e,s=m("AvatarFallback",r),[c,d]=o.useState(void 0===i);return o.useEffect((()=>{if(void 0!==i){const e=window.setTimeout((()=>d(!0)),i);return()=>window.clearTimeout(e)}}),[i]),c&&"loaded"!==s.imageLoadingStatus?o.createElement(l.Primitive.span,u(n)({},a,{ref:t})):null})),y=g,w=b,E=v},99943:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(10207),a=r(95791),s=r(80739),l=r(22971),c=r(88165),u=r(55745),d=r(55575),f=r(62053);function p(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}p(e.exports,"createCheckboxScope",(()=>b)),p(e.exports,"Checkbox",(()=>w)),p(e.exports,"CheckboxIndicator",(()=>E)),p(e.exports,"Root",(()=>A)),p(e.exports,"Indicator",(()=>T));const m="Checkbox",[g,b]=a.createContextScope(m),[v,y]=g(m),w=o.forwardRef(((e,t)=>{const{__scopeCheckbox:r,name:a,checked:c,defaultChecked:u,required:d,disabled:p,value:m="on",onCheckedChange:g,...b}=e,[y,w]=o.useState(null),E=i.useComposedRefs(t,(e=>w(e))),A=o.useRef(!1),T=!y||Boolean(y.closest("form")),[C=!1,k]=l.useControllableState({prop:c,defaultProp:u,onChange:g}),O=o.useRef(C);return o.useEffect((()=>{const e=null==y?void 0:y.form;if(e){const t=()=>k(O.current);return e.addEventListener("reset",t),()=>e.removeEventListener("reset",t)}}),[y,k]),o.createElement(v,{scope:r,state:C,disabled:p},o.createElement(f.Primitive.button,h(n)({type:"button",role:"checkbox","aria-checked":S(C)?"mixed":C,"aria-required":d,"data-state":x(C),"data-disabled":p?"":void 0,disabled:p,value:m},b,{ref:E,onKeyDown:s.composeEventHandlers(e.onKeyDown,(e=>{"Enter"===e.key&&e.preventDefault()})),onClick:s.composeEventHandlers(e.onClick,(e=>{k((e=>!!S(e)||!e)),T&&(A.current=e.isPropagationStopped(),A.current||e.stopPropagation())}))})),T&&o.createElement(_,{control:y,bubbles:!A.current,name:a,value:m,checked:C,required:d,disabled:p,style:{transform:"translateX(-100%)"}}))})),E=o.forwardRef(((e,t)=>{const{__scopeCheckbox:r,forceMount:i,...a}=e,s=y("CheckboxIndicator",r);return o.createElement(d.Presence,{present:i||S(s.state)||!0===s.state},o.createElement(f.Primitive.span,h(n)({"data-state":x(s.state),"data-disabled":s.disabled?"":void 0},a,{ref:t,style:{pointerEvents:"none",...e.style}})))})),_=e=>{const{control:t,checked:r,bubbles:i=!0,...a}=e,s=o.useRef(null),l=c.usePrevious(r),d=u.useSize(t);return o.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==r&&n){const t=new Event("click",{bubbles:i});e.indeterminate=S(r),n.call(e,!S(r)&&r),e.dispatchEvent(t)}}),[l,r,i]),o.createElement("input",h(n)({type:"checkbox","aria-hidden":!0,defaultChecked:!S(r)&&r},a,{tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function S(e){return"indeterminate"===e}function x(e){return S(e)?"indeterminate":e?"checked":"unchecked"}const A=w,T=E},67146:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(95791),s=r(22971),l=r(95696),c=r(10207),u=r(62053),d=r(55575),f=r(6411);function p(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}p(e.exports,"createCollapsibleScope",(()=>b)),p(e.exports,"Collapsible",(()=>w)),p(e.exports,"CollapsibleTrigger",(()=>E)),p(e.exports,"CollapsibleContent",(()=>S)),p(e.exports,"Root",(()=>T)),p(e.exports,"Trigger",(()=>C)),p(e.exports,"Content",(()=>k));const m="Collapsible",[g,b]=a.createContextScope(m),[v,y]=g(m),w=o.forwardRef(((e,t)=>{const{__scopeCollapsible:r,open:i,defaultOpen:a,disabled:l,onOpenChange:c,...d}=e,[p=!1,m]=s.useControllableState({prop:i,defaultProp:a,onChange:c});return o.createElement(v,{scope:r,disabled:l,contentId:f.useId(),open:p,onOpenToggle:o.useCallback((()=>m((e=>!e))),[m])},o.createElement(u.Primitive.div,h(n)({"data-state":A(p),"data-disabled":l?"":void 0},d,{ref:t})))})),E=o.forwardRef(((e,t)=>{const{__scopeCollapsible:r,...a}=e,s=y("CollapsibleTrigger",r);return o.createElement(u.Primitive.button,h(n)({type:"button","aria-controls":s.contentId,"aria-expanded":s.open||!1,"data-state":A(s.open),"data-disabled":s.disabled?"":void 0,disabled:s.disabled},a,{ref:t,onClick:i.composeEventHandlers(e.onClick,s.onOpenToggle)}))})),_="CollapsibleContent",S=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,a=y(_,e.__scopeCollapsible);return o.createElement(d.Presence,{present:r||a.open},(({present:e})=>o.createElement(x,h(n)({},i,{ref:t,present:e}))))})),x=o.forwardRef(((e,t)=>{const{__scopeCollapsible:r,present:i,children:a,...s}=e,d=y(_,r),[f,p]=o.useState(i),m=o.useRef(null),g=c.useComposedRefs(t,m),b=o.useRef(0),v=b.current,w=o.useRef(0),E=w.current,S=d.open||f,x=o.useRef(S),T=o.useRef();return o.useEffect((()=>{const e=requestAnimationFrame((()=>x.current=!1));return()=>cancelAnimationFrame(e)}),[]),l.useLayoutEffect((()=>{const e=m.current;if(e){T.current=T.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration="0s",e.style.animationName="none";const t=e.getBoundingClientRect();b.current=t.height,w.current=t.width,x.current||(e.style.transitionDuration=T.current.transitionDuration,e.style.animationName=T.current.animationName),p(i)}}),[d.open,i]),o.createElement(u.Primitive.div,h(n)({"data-state":A(d.open),"data-disabled":d.disabled?"":void 0,id:d.contentId,hidden:!S},s,{ref:g,style:{"--radix-collapsible-content-height":v?`${v}px`:void 0,"--radix-collapsible-content-width":E?`${E}px`:void 0,...e.style}}),S&&a)}));function A(e){return e?"open":"closed"}const T=w,C=E,k=S},89656:(e,t,r)=>{var n,o,i=r(96540),a=r(95791),s=r(10207),l=r(56612);function c(e){return e&&e.__esModule?e.default:e}function u(e){const t=e+"CollectionProvider",[r,n]=a.createContextScope(t),[o,u]=r(t,{collectionRef:{current:null},itemMap:new Map}),d=e+"CollectionSlot",f=e+"CollectionItemSlot",p="data-radix-collection-item";return[{Provider:e=>{const{scope:t,children:r}=e,n=c(i).useRef(null),a=c(i).useRef(new Map).current;return c(i).createElement(o,{scope:t,itemMap:a,collectionRef:n},r)},Slot:c(i).forwardRef(((e,t)=>{const{scope:r,children:n}=e,o=u(d,r),a=s.useComposedRefs(t,o.collectionRef);return c(i).createElement(l.Slot,{ref:a},n)})),ItemSlot:c(i).forwardRef(((e,t)=>{const{scope:r,children:n,...o}=e,a=c(i).useRef(null),d=s.useComposedRefs(t,a),h=u(f,r);return c(i).useEffect((()=>(h.itemMap.set(a,{ref:a,...o}),()=>{h.itemMap.delete(a)}))),c(i).createElement(l.Slot,{[p]:"",ref:d},n)}))},function(t){const r=u(e+"CollectionConsumer",t);return c(i).useCallback((()=>{const e=r.collectionRef.current;if(!e)return[];const t=Array.from(e.querySelectorAll(`[${p}]`));return Array.from(r.itemMap.values()).sort(((e,r)=>t.indexOf(e.ref.current)-t.indexOf(r.ref.current)))}),[r.collectionRef,r.itemMap])},n]}n=e.exports,o=()=>u,Object.defineProperty(n,"createCollection",{get:o,set:undefined,enumerable:!0,configurable:!0})},10207:(e,t,r)=>{var n=r(96540);function o(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function i(...e){return t=>e.forEach((e=>function(e,t){"function"==typeof e?e(t):null!=e&&(e.current=t)}(e,t)))}function a(...e){return n.useCallback(i(...e),e)}o(e.exports,"composeRefs",(()=>i)),o(e.exports,"useComposedRefs",(()=>a))},61823:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(95791),s=r(62053),l=r(91025),c=r(80283),u=r(22971);function d(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function f(e){return e&&e.__esModule?e.default:e}d(e.exports,"createContextMenuScope",(()=>m)),d(e.exports,"ContextMenu",(()=>y)),d(e.exports,"ContextMenuTrigger",(()=>w)),d(e.exports,"ContextMenuPortal",(()=>E)),d(e.exports,"ContextMenuContent",(()=>_)),d(e.exports,"ContextMenuGroup",(()=>S)),d(e.exports,"ContextMenuLabel",(()=>x)),d(e.exports,"ContextMenuItem",(()=>A)),d(e.exports,"ContextMenuCheckboxItem",(()=>T)),d(e.exports,"ContextMenuRadioGroup",(()=>C)),d(e.exports,"ContextMenuRadioItem",(()=>k)),d(e.exports,"ContextMenuItemIndicator",(()=>O)),d(e.exports,"ContextMenuSeparator",(()=>R)),d(e.exports,"ContextMenuArrow",(()=>N)),d(e.exports,"ContextMenuSub",(()=>I)),d(e.exports,"ContextMenuSubTrigger",(()=>M)),d(e.exports,"ContextMenuSubContent",(()=>P)),d(e.exports,"Root",(()=>L)),d(e.exports,"Trigger",(()=>F)),d(e.exports,"Portal",(()=>B)),d(e.exports,"Content",(()=>U)),d(e.exports,"Group",(()=>j)),d(e.exports,"Label",(()=>z)),d(e.exports,"Item",(()=>H)),d(e.exports,"CheckboxItem",(()=>G)),d(e.exports,"RadioGroup",(()=>W)),d(e.exports,"RadioItem",(()=>q)),d(e.exports,"ItemIndicator",(()=>V)),d(e.exports,"Separator",(()=>Y)),d(e.exports,"Arrow",(()=>K)),d(e.exports,"Sub",(()=>X)),d(e.exports,"SubTrigger",(()=>Z)),d(e.exports,"SubContent",(()=>Q));const p="ContextMenu",[h,m]=a.createContextScope(p,[l.createMenuScope]),g=l.createMenuScope(),[b,v]=h(p),y=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:i,dir:a,modal:s=!0}=e,[u,d]=o.useState(!1),p=g(t),h=c.useCallbackRef(i),m=o.useCallback((e=>{d(e),h(e)}),[h]);return o.createElement(b,{scope:t,open:u,onOpenChange:m,modal:s},o.createElement(l.Root,f(n)({},p,{dir:a,open:u,onOpenChange:m,modal:s}),r))},w=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,disabled:a=!1,...c}=e,u=v("ContextMenuTrigger",r),d=g(r),p=o.useRef({x:0,y:0}),h=o.useRef({getBoundingClientRect:()=>DOMRect.fromRect({width:0,height:0,...p.current})}),m=o.useRef(0),b=o.useCallback((()=>window.clearTimeout(m.current)),[]),y=e=>{p.current={x:e.clientX,y:e.clientY},u.onOpenChange(!0)};return o.useEffect((()=>b),[b]),o.useEffect((()=>{a&&b()}),[a,b]),o.createElement(o.Fragment,null,o.createElement(l.Anchor,f(n)({},d,{virtualRef:h})),o.createElement(s.Primitive.span,f(n)({"data-state":u.open?"open":"closed","data-disabled":a?"":void 0},c,{ref:t,style:{WebkitTouchCallout:"none",...e.style},onContextMenu:a?e.onContextMenu:i.composeEventHandlers(e.onContextMenu,(e=>{b(),y(e),e.preventDefault()})),onPointerDown:a?e.onPointerDown:i.composeEventHandlers(e.onPointerDown,D((e=>{b(),m.current=window.setTimeout((()=>y(e)),700)}))),onPointerMove:a?e.onPointerMove:i.composeEventHandlers(e.onPointerMove,D(b)),onPointerCancel:a?e.onPointerCancel:i.composeEventHandlers(e.onPointerCancel,D(b)),onPointerUp:a?e.onPointerUp:i.composeEventHandlers(e.onPointerUp,D(b))})))})),E=e=>{const{__scopeContextMenu:t,...r}=e,i=g(t);return o.createElement(l.Portal,f(n)({},i,r))},_=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=v("ContextMenuContent",r),s=g(r),c=o.useRef(!1);return o.createElement(l.Content,f(n)({},s,i,{ref:t,side:"right",sideOffset:2,align:"start",onCloseAutoFocus:t=>{var r;null===(r=e.onCloseAutoFocus)||void 0===r||r.call(e,t),!t.defaultPrevented&&c.current&&t.preventDefault(),c.current=!1},onInteractOutside:t=>{var r;null===(r=e.onInteractOutside)||void 0===r||r.call(e,t),t.defaultPrevented||a.modal||(c.current=!0)},style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),S=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.Group,f(n)({},a,i,{ref:t}))})),x=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.Label,f(n)({},a,i,{ref:t}))})),A=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.Item,f(n)({},a,i,{ref:t}))})),T=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.CheckboxItem,f(n)({},a,i,{ref:t}))})),C=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.RadioGroup,f(n)({},a,i,{ref:t}))})),k=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.RadioItem,f(n)({},a,i,{ref:t}))})),O=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.ItemIndicator,f(n)({},a,i,{ref:t}))})),R=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.Separator,f(n)({},a,i,{ref:t}))})),N=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.Arrow,f(n)({},a,i,{ref:t}))})),I=e=>{const{__scopeContextMenu:t,children:r,onOpenChange:i,open:a,defaultOpen:s}=e,c=g(t),[d,p]=u.useControllableState({prop:a,defaultProp:s,onChange:i});return o.createElement(l.Sub,f(n)({},c,{open:d,onOpenChange:p}),r)},M=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.SubTrigger,f(n)({},a,i,{ref:t}))})),P=o.forwardRef(((e,t)=>{const{__scopeContextMenu:r,...i}=e,a=g(r);return o.createElement(l.SubContent,f(n)({},a,i,{ref:t,style:{...e.style,"--radix-context-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-context-menu-content-available-width":"var(--radix-popper-available-width)","--radix-context-menu-content-available-height":"var(--radix-popper-available-height)","--radix-context-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-context-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))}));function D(e){return t=>"mouse"!==t.pointerType?e(t):void 0}const L=y,F=w,B=E,U=_,j=S,z=x,H=A,G=T,W=C,q=k,V=O,Y=R,K=N,X=I,Z=M,Q=P},95791:(e,t,r)=>{var n=r(96540);function o(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function i(e,t){const r=n.createContext(t);function o(e){const{children:t,...o}=e,i=n.useMemo((()=>o),Object.values(o));return n.createElement(r.Provider,{value:i},t)}return o.displayName=e+"Provider",[o,function(o){const i=n.useContext(r);if(i)return i;if(void 0!==t)return t;throw new Error(`\`${o}\` must be used within \`${e}\``)}]}function a(e,t=[]){let r=[];const o=()=>{const t=r.map((e=>n.createContext(e)));return function(r){const o=(null==r?void 0:r[e])||t;return n.useMemo((()=>({[`__scope${e}`]:{...r,[e]:o}})),[r,o])}};return o.scopeName=e,[function(t,o){const i=n.createContext(o),a=r.length;function s(t){const{scope:r,children:o,...s}=t,l=(null==r?void 0:r[e][a])||i,c=n.useMemo((()=>s),Object.values(s));return n.createElement(l.Provider,{value:c},o)}return r=[...r,o],s.displayName=t+"Provider",[s,function(r,s){const l=(null==s?void 0:s[e][a])||i,c=n.useContext(l);if(c)return c;if(void 0!==o)return o;throw new Error(`\`${r}\` must be used within \`${t}\``)}]},s(o,...t)]}function s(...e){const t=e[0];if(1===e.length)return t;const r=()=>{const r=e.map((e=>({useScope:e(),scopeName:e.scopeName})));return function(e){const o=r.reduce(((t,{useScope:r,scopeName:n})=>({...t,...r(e)[`__scope${n}`]})),{});return n.useMemo((()=>({[`__scope${t.scopeName}`]:o})),[o])}};return r.scopeName=t.scopeName,r}o(e.exports,"createContext",(()=>i)),o(e.exports,"createContextScope",(()=>a))},57828:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(10207),s=r(95791),l=r(6411),c=r(22971),u=r(14614),d=r(6345),f=r(93086),p=r(55575),h=r(62053),m=r(21983),g=r(25816),b=r(58241),v=r(56612);function y(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function w(e){return e&&e.__esModule?e.default:e}y(e.exports,"createDialogScope",(()=>S)),y(e.exports,"Dialog",(()=>T)),y(e.exports,"DialogTrigger",(()=>C)),y(e.exports,"DialogPortal",(()=>N)),y(e.exports,"DialogOverlay",(()=>M)),y(e.exports,"DialogContent",(()=>L)),y(e.exports,"DialogTitle",(()=>z)),y(e.exports,"DialogDescription",(()=>H)),y(e.exports,"DialogClose",(()=>G)),y(e.exports,"Root",(()=>Y)),y(e.exports,"Trigger",(()=>K)),y(e.exports,"Portal",(()=>X)),y(e.exports,"Overlay",(()=>Z)),y(e.exports,"Content",(()=>Q)),y(e.exports,"Title",(()=>J)),y(e.exports,"Description",(()=>$)),y(e.exports,"Close",(()=>ee)),y(e.exports,"WarningProvider",(()=>q));const E="Dialog",[_,S]=s.createContextScope(E),[x,A]=_(E),T=e=>{const{__scopeDialog:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!0}=e,u=o.useRef(null),d=o.useRef(null),[f=!1,p]=c.useControllableState({prop:n,defaultProp:i,onChange:a});return o.createElement(x,{scope:t,triggerRef:u,contentRef:d,contentId:l.useId(),titleId:l.useId(),descriptionId:l.useId(),open:f,onOpenChange:p,onOpenToggle:o.useCallback((()=>p((e=>!e))),[p]),modal:s},r)},C=o.forwardRef(((e,t)=>{const{__scopeDialog:r,...s}=e,l=A("DialogTrigger",r),c=a.useComposedRefs(t,l.triggerRef);return o.createElement(h.Primitive.button,w(n)({type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":W(l.open)},s,{ref:c,onClick:i.composeEventHandlers(e.onClick,l.onOpenToggle)}))})),k="DialogPortal",[O,R]=_(k,{forceMount:void 0}),N=e=>{const{__scopeDialog:t,forceMount:r,children:n,container:i}=e,a=A(k,t);return o.createElement(O,{scope:t,forceMount:r},o.Children.map(n,(e=>o.createElement(p.Presence,{present:r||a.open},o.createElement(f.Portal,{asChild:!0,container:i},e)))))},I="DialogOverlay",M=o.forwardRef(((e,t)=>{const r=R(I,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,s=A(I,e.__scopeDialog);return s.modal?o.createElement(p.Presence,{present:i||s.open},o.createElement(P,w(n)({},a,{ref:t}))):null})),P=o.forwardRef(((e,t)=>{const{__scopeDialog:r,...i}=e,a=A(I,r);return o.createElement(g.RemoveScroll,{as:v.Slot,allowPinchZoom:!0,shards:[a.contentRef]},o.createElement(h.Primitive.div,w(n)({"data-state":W(a.open)},i,{ref:t,style:{pointerEvents:"auto",...i.style}})))})),D="DialogContent",L=o.forwardRef(((e,t)=>{const r=R(D,e.__scopeDialog),{forceMount:i=r.forceMount,...a}=e,s=A(D,e.__scopeDialog);return o.createElement(p.Presence,{present:i||s.open},s.modal?o.createElement(F,w(n)({},a,{ref:t})):o.createElement(B,w(n)({},a,{ref:t})))})),F=o.forwardRef(((e,t)=>{const r=A(D,e.__scopeDialog),s=o.useRef(null),l=a.useComposedRefs(t,r.contentRef,s);return o.useEffect((()=>{const e=s.current;if(e)return b.hideOthers(e)}),[]),o.createElement(U,w(n)({},e,{ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:i.composeEventHandlers(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:i.composeEventHandlers(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey;(2===t.button||r)&&e.preventDefault()})),onFocusOutside:i.composeEventHandlers(e.onFocusOutside,(e=>e.preventDefault()))}))})),B=o.forwardRef(((e,t)=>{const r=A(D,e.__scopeDialog),i=o.useRef(!1),a=o.useRef(!1);return o.createElement(U,w(n)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,o;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current||null===(o=r.triggerRef.current)||void 0===o||o.focus(),t.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null===(o=r.triggerRef.current)||void 0===o?void 0:o.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}}))})),U=o.forwardRef(((e,t)=>{const{__scopeDialog:r,trapFocus:i,onOpenAutoFocus:s,onCloseAutoFocus:l,...c}=e,f=A(D,r),p=o.useRef(null),h=a.useComposedRefs(t,p);return m.useFocusGuards(),o.createElement(o.Fragment,null,o.createElement(d.FocusScope,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:s,onUnmountAutoFocus:l},o.createElement(u.DismissableLayer,w(n)({role:"dialog",id:f.contentId,"aria-describedby":f.descriptionId,"aria-labelledby":f.titleId,"data-state":W(f.open)},c,{ref:h,onDismiss:()=>f.onOpenChange(!1)}))),!1)})),j="DialogTitle",z=o.forwardRef(((e,t)=>{const{__scopeDialog:r,...i}=e,a=A(j,r);return o.createElement(h.Primitive.h2,w(n)({id:a.titleId},i,{ref:t}))})),H=o.forwardRef(((e,t)=>{const{__scopeDialog:r,...i}=e,a=A("DialogDescription",r);return o.createElement(h.Primitive.p,w(n)({id:a.descriptionId},i,{ref:t}))})),G=o.forwardRef(((e,t)=>{const{__scopeDialog:r,...a}=e,s=A("DialogClose",r);return o.createElement(h.Primitive.button,w(n)({type:"button"},a,{ref:t,onClick:i.composeEventHandlers(e.onClick,(()=>s.onOpenChange(!1)))}))}));function W(e){return e?"open":"closed"}const[q,V]=s.createContext("DialogTitleWarning",{contentName:D,titleName:j,docsSlug:"dialog"}),Y=T,K=C,X=N,Z=M,Q=L,J=z,$=H,ee=G},62585:(e,t,r)=>{var n=r(96540);function o(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}o(e.exports,"useDirection",(()=>s)),o(e.exports,"Provider",(()=>l)),o(e.exports,"DirectionProvider",(()=>a));const i=n.createContext(void 0),a=e=>{const{dir:t,children:r}=e;return n.createElement(i.Provider,{value:t},r)};function s(e){const t=n.useContext(i);return e||t||"ltr"}const l=a},14614:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(62053),s=r(10207),l=r(80283),c=r(32905);function u(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function d(e){return e&&e.__esModule?e.default:e}u(e.exports,"DismissableLayer",(()=>m)),u(e.exports,"DismissableLayerBranch",(()=>g)),u(e.exports,"Root",(()=>y)),u(e.exports,"Branch",(()=>w));const f="dismissableLayer.update";let p;const h=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=o.forwardRef(((e,t)=>{var r;const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:y,onInteractOutside:w,onDismiss:E,..._}=e,S=o.useContext(h),[x,A]=o.useState(null),T=null!==(r=null==x?void 0:x.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,C]=o.useState({}),k=s.useComposedRefs(t,(e=>A(e))),O=Array.from(S.layers),[R]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),N=O.indexOf(R),I=x?O.indexOf(x):-1,M=S.layersWithOutsidePointerEventsDisabled.size>0,P=I>=N,D=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=l.useCallbackRef(e),n=o.useRef(!1),i=o.useRef((()=>{}));return o.useEffect((()=>{const e=e=>{if(e.target&&!n.current){const a={originalEvent:e};function o(){v("dismissableLayer.pointerDownOutside",r,a,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}else t.removeEventListener("click",i.current);n.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,r=[...S.branches].some((e=>e.contains(t)));P&&!r&&(null==g||g(e),null==w||w(e),e.defaultPrevented||null==E||E())}),T),L=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=l.useCallbackRef(e),n=o.useRef(!1);return o.useEffect((()=>{const e=e=>{e.target&&!n.current&&v("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...S.branches].some((e=>e.contains(t)))||(null==y||y(e),null==w||w(e),e.defaultPrevented||null==E||E())}),T);return c.useEscapeKeydown((e=>{I===S.layers.size-1&&(null==m||m(e),!e.defaultPrevented&&E&&(e.preventDefault(),E()))}),T),o.useEffect((()=>{if(x)return u&&(0===S.layersWithOutsidePointerEventsDisabled.size&&(p=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(x)),S.layers.add(x),b(),()=>{u&&1===S.layersWithOutsidePointerEventsDisabled.size&&(T.body.style.pointerEvents=p)}}),[x,T,u,S]),o.useEffect((()=>()=>{x&&(S.layers.delete(x),S.layersWithOutsidePointerEventsDisabled.delete(x),b())}),[x,S]),o.useEffect((()=>{const e=()=>C({});return document.addEventListener(f,e),()=>document.removeEventListener(f,e)}),[]),o.createElement(a.Primitive.div,d(n)({},_,{ref:k,style:{pointerEvents:M?P?"auto":"none":void 0,...e.style},onFocusCapture:i.composeEventHandlers(e.onFocusCapture,L.onFocusCapture),onBlurCapture:i.composeEventHandlers(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:i.composeEventHandlers(e.onPointerDownCapture,D.onPointerDownCapture)}))})),g=o.forwardRef(((e,t)=>{const r=o.useContext(h),i=o.useRef(null),l=s.useComposedRefs(t,i);return o.useEffect((()=>{const e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),o.createElement(a.Primitive.div,d(n)({},e,{ref:l}))}));function b(){const e=new CustomEvent(f);document.dispatchEvent(e)}function v(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?a.dispatchDiscreteCustomEvent(o,i):o.dispatchEvent(i)}const y=m,w=g},45399:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(10207),s=r(95791),l=r(22971),c=r(62053),u=r(91025),d=r(6411);function f(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function p(e){return e&&e.__esModule?e.default:e}f(e.exports,"createDropdownMenuScope",(()=>g)),f(e.exports,"DropdownMenu",(()=>w)),f(e.exports,"DropdownMenuTrigger",(()=>E)),f(e.exports,"DropdownMenuPortal",(()=>_)),f(e.exports,"DropdownMenuContent",(()=>S)),f(e.exports,"DropdownMenuGroup",(()=>x)),f(e.exports,"DropdownMenuLabel",(()=>A)),f(e.exports,"DropdownMenuItem",(()=>T)),f(e.exports,"DropdownMenuCheckboxItem",(()=>C)),f(e.exports,"DropdownMenuRadioGroup",(()=>k)),f(e.exports,"DropdownMenuRadioItem",(()=>O)),f(e.exports,"DropdownMenuItemIndicator",(()=>R)),f(e.exports,"DropdownMenuSeparator",(()=>N)),f(e.exports,"DropdownMenuArrow",(()=>I)),f(e.exports,"DropdownMenuSub",(()=>M)),f(e.exports,"DropdownMenuSubTrigger",(()=>P)),f(e.exports,"DropdownMenuSubContent",(()=>D)),f(e.exports,"Root",(()=>L)),f(e.exports,"Trigger",(()=>F)),f(e.exports,"Portal",(()=>B)),f(e.exports,"Content",(()=>U)),f(e.exports,"Group",(()=>j)),f(e.exports,"Label",(()=>z)),f(e.exports,"Item",(()=>H)),f(e.exports,"CheckboxItem",(()=>G)),f(e.exports,"RadioGroup",(()=>W)),f(e.exports,"RadioItem",(()=>q)),f(e.exports,"ItemIndicator",(()=>V)),f(e.exports,"Separator",(()=>Y)),f(e.exports,"Arrow",(()=>K)),f(e.exports,"Sub",(()=>X)),f(e.exports,"SubTrigger",(()=>Z)),f(e.exports,"SubContent",(()=>Q));const h="DropdownMenu",[m,g]=s.createContextScope(h,[u.createMenuScope]),b=u.createMenuScope(),[v,y]=m(h),w=e=>{const{__scopeDropdownMenu:t,children:r,dir:i,open:a,defaultOpen:s,onOpenChange:c,modal:f=!0}=e,h=b(t),m=o.useRef(null),[g=!1,y]=l.useControllableState({prop:a,defaultProp:s,onChange:c});return o.createElement(v,{scope:t,triggerId:d.useId(),triggerRef:m,contentId:d.useId(),open:g,onOpenChange:y,onOpenToggle:o.useCallback((()=>y((e=>!e))),[y]),modal:f},o.createElement(u.Root,p(n)({},h,{open:g,onOpenChange:y,dir:i,modal:f}),r))},E=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,disabled:s=!1,...l}=e,d=y("DropdownMenuTrigger",r),f=b(r);return o.createElement(u.Anchor,p(n)({asChild:!0},f),o.createElement(c.Primitive.button,p(n)({type:"button",id:d.triggerId,"aria-haspopup":"menu","aria-expanded":d.open,"aria-controls":d.open?d.contentId:void 0,"data-state":d.open?"open":"closed","data-disabled":s?"":void 0,disabled:s},l,{ref:a.composeRefs(t,d.triggerRef),onPointerDown:i.composeEventHandlers(e.onPointerDown,(e=>{s||0!==e.button||!1!==e.ctrlKey||(d.onOpenToggle(),d.open||e.preventDefault())})),onKeyDown:i.composeEventHandlers(e.onKeyDown,(e=>{s||(["Enter"," "].includes(e.key)&&d.onOpenToggle(),"ArrowDown"===e.key&&d.onOpenChange(!0),["Enter"," ","ArrowDown"].includes(e.key)&&e.preventDefault())}))})))})),_=e=>{const{__scopeDropdownMenu:t,...r}=e,i=b(t);return o.createElement(u.Portal,p(n)({},i,r))},S=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...a}=e,s=y("DropdownMenuContent",r),l=b(r),c=o.useRef(!1);return o.createElement(u.Content,p(n)({id:s.contentId,"aria-labelledby":s.triggerId},l,a,{ref:t,onCloseAutoFocus:i.composeEventHandlers(e.onCloseAutoFocus,(e=>{var t;c.current||null===(t=s.triggerRef.current)||void 0===t||t.focus(),c.current=!1,e.preventDefault()})),onInteractOutside:i.composeEventHandlers(e.onInteractOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;s.modal&&!n||(c.current=!0)})),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),x=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.Group,p(n)({},a,i,{ref:t}))})),A=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.Label,p(n)({},a,i,{ref:t}))})),T=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.Item,p(n)({},a,i,{ref:t}))})),C=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.CheckboxItem,p(n)({},a,i,{ref:t}))})),k=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.RadioGroup,p(n)({},a,i,{ref:t}))})),O=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.RadioItem,p(n)({},a,i,{ref:t}))})),R=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.ItemIndicator,p(n)({},a,i,{ref:t}))})),N=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.Separator,p(n)({},a,i,{ref:t}))})),I=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.Arrow,p(n)({},a,i,{ref:t}))})),M=e=>{const{__scopeDropdownMenu:t,children:r,open:i,onOpenChange:a,defaultOpen:s}=e,c=b(t),[d=!1,f]=l.useControllableState({prop:i,defaultProp:s,onChange:a});return o.createElement(u.Sub,p(n)({},c,{open:d,onOpenChange:f}),r)},P=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.SubTrigger,p(n)({},a,i,{ref:t}))})),D=o.forwardRef(((e,t)=>{const{__scopeDropdownMenu:r,...i}=e,a=b(r);return o.createElement(u.SubContent,p(n)({},a,i,{ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-dropdown-menu-content-available-width":"var(--radix-popper-available-width)","--radix-dropdown-menu-content-available-height":"var(--radix-popper-available-height)","--radix-dropdown-menu-trigger-width":"var(--radix-popper-anchor-width)","--radix-dropdown-menu-trigger-height":"var(--radix-popper-anchor-height)"}}))})),L=w,F=E,B=_,U=S,j=x,z=A,H=T,G=C,W=k,q=O,V=R,Y=N,K=I,X=M,Z=P,Q=D},21983:(e,t,r)=>{var n=r(96540);function o(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}o(e.exports,"FocusGuards",(()=>a)),o(e.exports,"Root",(()=>c)),o(e.exports,"useFocusGuards",(()=>s));let i=0;function a(e){return s(),e.children}function s(){n.useEffect((()=>{var e,t;const r=document.querySelectorAll("[data-radix-focus-guard]");return document.body.insertAdjacentElement("afterbegin",null!==(e=r[0])&&void 0!==e?e:l()),document.body.insertAdjacentElement("beforeend",null!==(t=r[1])&&void 0!==t?t:l()),i++,()=>{1===i&&document.querySelectorAll("[data-radix-focus-guard]").forEach((e=>e.remove())),i--}}),[])}function l(){const e=document.createElement("span");return e.setAttribute("data-radix-focus-guard",""),e.tabIndex=0,e.style.cssText="outline: none; opacity: 0; position: fixed; pointer-events: none",e}const c=a},6345:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(10207),a=r(62053),s=r(80283);function l(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}l(e.exports,"FocusScope",(()=>f)),l(e.exports,"Root",(()=>y));const c="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",d={bubbles:!1,cancelable:!0},f=o.forwardRef(((e,t)=>{const{loop:r=!1,trapped:l=!1,onMountAutoFocus:f,onUnmountAutoFocus:m,...v}=e,[y,w]=o.useState(null),E=s.useCallbackRef(f),_=s.useCallbackRef(m),S=o.useRef(null),x=i.useComposedRefs(t,(e=>w(e))),A=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect((()=>{if(l){function e(e){if(A.paused||!y)return;const t=e.target;y.contains(t)?S.current=t:g(S.current,{select:!0})}function t(e){if(A.paused||!y)return;const t=e.relatedTarget;null!==t&&(y.contains(t)||g(S.current,{select:!0}))}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver((function(e){if(document.activeElement===document.body)for(const t of e)t.removedNodes.length>0&&g(y)}));return y&&r.observe(y,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[l,y,A.paused]),o.useEffect((()=>{if(y){b.add(A);const e=document.activeElement;if(!y.contains(e)){const t=new CustomEvent(c,d);y.addEventListener(c,E),y.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(g(n,{select:t}),document.activeElement!==r)return}(p(y).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&g(y))}return()=>{y.removeEventListener(c,E),setTimeout((()=>{const t=new CustomEvent(u,d);y.addEventListener(u,_),y.dispatchEvent(t),t.defaultPrevented||g(null!=e?e:document.body,{select:!0}),y.removeEventListener(u,_),b.remove(A)}),0)}}}),[y,E,_,A]);const T=o.useCallback((e=>{if(!r&&!l)return;if(A.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=p(e);return[h(t,e),h(t.reverse(),e)]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&g(i,{select:!0})):(e.preventDefault(),r&&g(o,{select:!0})):n===t&&e.preventDefault()}}),[r,l,A.paused]);return o.createElement(a.Primitive.div,((C=n)&&C.__esModule?C.default:C)({tabIndex:-1},v,{ref:x,onKeyDown:T}));var C}));function p(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function h(e,t){for(const r of e)if(!m(r,{upTo:t}))return r}function m(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function g(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const b=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=v(e,t),e.unshift(t)},remove(t){var r;e=v(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function v(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const y=f},77509:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(95791),s=r(22971),l=r(10207),c=r(21738),u=r(93086),d=r(55575),f=r(62053),p=r(14614);function h(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function m(e){return e&&e.__esModule?e.default:e}let g;h(e.exports,"createHoverCardScope",(()=>y)),h(e.exports,"HoverCard",(()=>S)),h(e.exports,"HoverCardTrigger",(()=>x)),h(e.exports,"HoverCardPortal",(()=>k)),h(e.exports,"HoverCardContent",(()=>R)),h(e.exports,"HoverCardArrow",(()=>I)),h(e.exports,"Root",(()=>P)),h(e.exports,"Trigger",(()=>D)),h(e.exports,"Portal",(()=>L)),h(e.exports,"Content",(()=>F)),h(e.exports,"Arrow",(()=>B));const b="HoverCard",[v,y]=a.createContextScope(b,[c.createPopperScope]),w=c.createPopperScope(),[E,_]=v(b),S=e=>{const{__scopeHoverCard:t,children:r,open:n,defaultOpen:i,onOpenChange:a,openDelay:l=700,closeDelay:u=300}=e,d=w(t),f=o.useRef(0),p=o.useRef(0),h=o.useRef(!1),m=o.useRef(!1),[g=!1,b]=s.useControllableState({prop:n,defaultProp:i,onChange:a}),v=o.useCallback((()=>{clearTimeout(p.current),f.current=window.setTimeout((()=>b(!0)),l)}),[l,b]),y=o.useCallback((()=>{clearTimeout(f.current),h.current||m.current||(p.current=window.setTimeout((()=>b(!1)),u))}),[u,b]),_=o.useCallback((()=>b(!1)),[b]);return o.useEffect((()=>()=>{clearTimeout(f.current),clearTimeout(p.current)}),[]),o.createElement(E,{scope:t,open:g,onOpenChange:b,onOpen:v,onClose:y,onDismiss:_,hasSelectionRef:h,isPointerDownOnContentRef:m},o.createElement(c.Root,d,r))},x=o.forwardRef(((e,t)=>{const{__scopeHoverCard:r,...a}=e,s=_("HoverCardTrigger",r),l=w(r);return o.createElement(c.Anchor,m(n)({asChild:!0},l),o.createElement(f.Primitive.a,m(n)({"data-state":s.open?"open":"closed"},a,{ref:t,onPointerEnter:i.composeEventHandlers(e.onPointerEnter,M(s.onOpen)),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,M(s.onClose)),onFocus:i.composeEventHandlers(e.onFocus,s.onOpen),onBlur:i.composeEventHandlers(e.onBlur,s.onClose),onTouchStart:i.composeEventHandlers(e.onTouchStart,(e=>e.preventDefault()))})))})),A="HoverCardPortal",[T,C]=v(A,{forceMount:void 0}),k=e=>{const{__scopeHoverCard:t,forceMount:r,children:n,container:i}=e,a=_(A,t);return o.createElement(T,{scope:t,forceMount:r},o.createElement(d.Presence,{present:r||a.open},o.createElement(u.Portal,{asChild:!0,container:i},n)))},O="HoverCardContent",R=o.forwardRef(((e,t)=>{const r=C(O,e.__scopeHoverCard),{forceMount:a=r.forceMount,...s}=e,l=_(O,e.__scopeHoverCard);return o.createElement(d.Presence,{present:a||l.open},o.createElement(N,m(n)({"data-state":l.open?"open":"closed"},s,{onPointerEnter:i.composeEventHandlers(e.onPointerEnter,M(l.onOpen)),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,M(l.onClose)),ref:t})))})),N=o.forwardRef(((e,t)=>{const{__scopeHoverCard:r,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:u,onInteractOutside:d,...f}=e,h=_(O,r),b=w(r),v=o.useRef(null),y=l.useComposedRefs(t,v),[E,S]=o.useState(!1);return o.useEffect((()=>{if(E){const e=document.body;return g=e.style.userSelect||e.style.webkitUserSelect,e.style.userSelect="none",e.style.webkitUserSelect="none",()=>{e.style.userSelect=g,e.style.webkitUserSelect=g}}}),[E]),o.useEffect((()=>{if(v.current){const e=()=>{S(!1),h.isPointerDownOnContentRef.current=!1,setTimeout((()=>{var e;""!==(null===(e=document.getSelection())||void 0===e?void 0:e.toString())&&(h.hasSelectionRef.current=!0)}))};return document.addEventListener("pointerup",e),()=>{document.removeEventListener("pointerup",e),h.hasSelectionRef.current=!1,h.isPointerDownOnContentRef.current=!1}}}),[h.isPointerDownOnContentRef,h.hasSelectionRef]),o.useEffect((()=>{v.current&&function(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP});for(;r.nextNode();)t.push(r.currentNode);return t}(v.current).forEach((e=>e.setAttribute("tabindex","-1")))})),o.createElement(p.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onInteractOutside:d,onEscapeKeyDown:a,onPointerDownOutside:s,onFocusOutside:i.composeEventHandlers(u,(e=>{e.preventDefault()})),onDismiss:h.onDismiss},o.createElement(c.Content,m(n)({},b,f,{onPointerDown:i.composeEventHandlers(f.onPointerDown,(e=>{e.currentTarget.contains(e.target)&&S(!0),h.hasSelectionRef.current=!1,h.isPointerDownOnContentRef.current=!0})),ref:y,style:{...f.style,userSelect:E?"text":void 0,WebkitUserSelect:E?"text":void 0,"--radix-hover-card-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-hover-card-content-available-width":"var(--radix-popper-available-width)","--radix-hover-card-content-available-height":"var(--radix-popper-available-height)","--radix-hover-card-trigger-width":"var(--radix-popper-anchor-width)","--radix-hover-card-trigger-height":"var(--radix-popper-anchor-height)"}})))})),I=o.forwardRef(((e,t)=>{const{__scopeHoverCard:r,...i}=e,a=w(r);return o.createElement(c.Arrow,m(n)({},a,i,{ref:t}))}));function M(e){return t=>"touch"===t.pointerType?void 0:e()}const P=S,D=x,L=k,F=R,B=I},6411:(e,t,r)=>{var n,o,i=r(96540),a=r(95696);n=e.exports,o=()=>c,Object.defineProperty(n,"useId",{get:o,set:undefined,enumerable:!0,configurable:!0});const s=i["useId".toString()]||(()=>{});let l=0;function c(e){const[t,r]=i.useState(s());return a.useLayoutEffect((()=>{e||r((e=>null!=e?e:String(l++)))}),[e]),e||(t?`radix-${t}`:"")}},75400:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(62053);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}a(e.exports,"Label",(()=>s)),a(e.exports,"Root",(()=>l));const s=o.forwardRef(((e,t)=>{return o.createElement(i.Primitive.label,((r=n)&&r.__esModule?r.default:r)({},e,{ref:t,onMouseDown:t=>{var r;null===(r=e.onMouseDown)||void 0===r||r.call(e,t),!t.defaultPrevented&&t.detail>1&&t.preventDefault()}}));var r})),l=s},91025:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(89656),s=r(10207),l=r(95791),c=r(62585),u=r(14614),d=r(21983),f=r(6345),p=r(6411),h=r(21738),m=r(93086),g=r(55575),b=r(62053),v=r(56016),y=r(56612),w=r(80283),E=r(58241),_=r(25816);function S(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function x(e){return e&&e.__esModule?e.default:e}S(e.exports,"createMenuScope",(()=>D)),S(e.exports,"Menu",(()=>H)),S(e.exports,"MenuAnchor",(()=>G)),S(e.exports,"MenuPortal",(()=>Y)),S(e.exports,"MenuContent",(()=>Q)),S(e.exports,"MenuGroup",(()=>te)),S(e.exports,"MenuLabel",(()=>re)),S(e.exports,"MenuItem",(()=>ie)),S(e.exports,"MenuCheckboxItem",(()=>se)),S(e.exports,"MenuRadioGroup",(()=>ue)),S(e.exports,"MenuRadioItem",(()=>de)),S(e.exports,"MenuItemIndicator",(()=>me)),S(e.exports,"MenuSeparator",(()=>ge)),S(e.exports,"MenuArrow",(()=>be)),S(e.exports,"MenuSub",(()=>Ee)),S(e.exports,"MenuSubTrigger",(()=>Se)),S(e.exports,"MenuSubContent",(()=>xe)),S(e.exports,"Root",(()=>Oe)),S(e.exports,"Anchor",(()=>Re)),S(e.exports,"Portal",(()=>Ne)),S(e.exports,"Content",(()=>Ie)),S(e.exports,"Group",(()=>Me)),S(e.exports,"Label",(()=>Pe)),S(e.exports,"Item",(()=>De)),S(e.exports,"CheckboxItem",(()=>Le)),S(e.exports,"RadioGroup",(()=>Fe)),S(e.exports,"RadioItem",(()=>Be)),S(e.exports,"ItemIndicator",(()=>Ue)),S(e.exports,"Separator",(()=>je)),S(e.exports,"Arrow",(()=>ze)),S(e.exports,"Sub",(()=>He)),S(e.exports,"SubTrigger",(()=>Ge)),S(e.exports,"SubContent",(()=>We));const A=["Enter"," "],T=["ArrowUp","PageDown","End"],C=["ArrowDown","PageUp","Home",...T],k={ltr:[...A,"ArrowRight"],rtl:[...A,"ArrowLeft"]},O={ltr:["ArrowLeft"],rtl:["ArrowRight"]},R="Menu",[N,I,M]=a.createCollection(R),[P,D]=l.createContextScope(R,[M,h.createPopperScope,v.createRovingFocusGroupScope]),L=h.createPopperScope(),F=v.createRovingFocusGroupScope(),[B,U]=P(R),[j,z]=P(R),H=e=>{const{__scopeMenu:t,open:r=!1,children:n,dir:i,onOpenChange:a,modal:s=!0}=e,l=L(t),[u,d]=o.useState(null),f=o.useRef(!1),p=w.useCallbackRef(a),m=c.useDirection(i);return o.useEffect((()=>{const e=()=>{f.current=!0,document.addEventListener("pointerdown",t,{capture:!0,once:!0}),document.addEventListener("pointermove",t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener("keydown",e,{capture:!0}),()=>{document.removeEventListener("keydown",e,{capture:!0}),document.removeEventListener("pointerdown",t,{capture:!0}),document.removeEventListener("pointermove",t,{capture:!0})}}),[]),o.createElement(h.Root,l,o.createElement(B,{scope:t,open:r,onOpenChange:p,content:u,onContentChange:d},o.createElement(j,{scope:t,onClose:o.useCallback((()=>p(!1)),[p]),isUsingKeyboardRef:f,dir:m,modal:s},n)))},G=o.forwardRef(((e,t)=>{const{__scopeMenu:r,...i}=e,a=L(r);return o.createElement(h.Anchor,x(n)({},a,i,{ref:t}))})),W="MenuPortal",[q,V]=P(W,{forceMount:void 0}),Y=e=>{const{__scopeMenu:t,forceMount:r,children:n,container:i}=e,a=U(W,t);return o.createElement(q,{scope:t,forceMount:r},o.createElement(g.Presence,{present:r||a.open},o.createElement(m.Portal,{asChild:!0,container:i},n)))},K="MenuContent",[X,Z]=P(K),Q=o.forwardRef(((e,t)=>{const r=V(K,e.__scopeMenu),{forceMount:i=r.forceMount,...a}=e,s=U(K,e.__scopeMenu),l=z(K,e.__scopeMenu);return o.createElement(N.Provider,{scope:e.__scopeMenu},o.createElement(g.Presence,{present:i||s.open},o.createElement(N.Slot,{scope:e.__scopeMenu},l.modal?o.createElement(J,x(n)({},a,{ref:t})):o.createElement($,x(n)({},a,{ref:t})))))})),J=o.forwardRef(((e,t)=>{const r=U(K,e.__scopeMenu),a=o.useRef(null),l=s.useComposedRefs(t,a);return o.useEffect((()=>{const e=a.current;if(e)return E.hideOthers(e)}),[]),o.createElement(ee,x(n)({},e,{ref:l,trapFocus:r.open,disableOutsidePointerEvents:r.open,disableOutsideScroll:!0,onFocusOutside:i.composeEventHandlers(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1}),onDismiss:()=>r.onOpenChange(!1)}))})),$=o.forwardRef(((e,t)=>{const r=U(K,e.__scopeMenu);return o.createElement(ee,x(n)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>r.onOpenChange(!1)}))})),ee=o.forwardRef(((e,t)=>{const{__scopeMenu:r,loop:a=!1,trapFocus:l,onOpenAutoFocus:c,onCloseAutoFocus:p,disableOutsidePointerEvents:m,onEntryFocus:g,onEscapeKeyDown:b,onPointerDownOutside:w,onFocusOutside:E,onInteractOutside:S,onDismiss:A,disableOutsideScroll:k,...O}=e,R=U(K,r),N=z(K,r),M=L(r),P=F(r),D=I(r),[B,j]=o.useState(null),H=o.useRef(null),G=s.useComposedRefs(t,H,R.onContentChange),W=o.useRef(0),q=o.useRef(""),V=o.useRef(0),Y=o.useRef(null),Z=o.useRef("right"),Q=o.useRef(0),J=k?_.RemoveScroll:o.Fragment,$=k?{as:y.Slot,allowPinchZoom:!0}:void 0;o.useEffect((()=>()=>window.clearTimeout(W.current)),[]),d.useFocusGuards();const ee=o.useCallback((e=>{var t,r;return Z.current===(null===(t=Y.current)||void 0===t?void 0:t.side)&&function(e,t){if(!t)return!1;return function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;en!=c>n&&r<(l-a)*(n-s)/(c-s)+a&&(o=!o)}return o}({x:e.clientX,y:e.clientY},t)}(e,null===(r=Y.current)||void 0===r?void 0:r.area)}),[]);return o.createElement(X,{scope:r,searchRef:q,onItemEnter:o.useCallback((e=>{ee(e)&&e.preventDefault()}),[ee]),onItemLeave:o.useCallback((e=>{var t;ee(e)||(null===(t=H.current)||void 0===t||t.focus(),j(null))}),[ee]),onTriggerLeave:o.useCallback((e=>{ee(e)&&e.preventDefault()}),[ee]),pointerGraceTimerRef:V,onPointerGraceIntentChange:o.useCallback((e=>{Y.current=e}),[])},o.createElement(J,$,o.createElement(f.FocusScope,{asChild:!0,trapped:l,onMountAutoFocus:i.composeEventHandlers(c,(e=>{var t;e.preventDefault(),null===(t=H.current)||void 0===t||t.focus()})),onUnmountAutoFocus:p},o.createElement(u.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:m,onEscapeKeyDown:b,onPointerDownOutside:w,onFocusOutside:E,onInteractOutside:S,onDismiss:A},o.createElement(v.Root,x(n)({asChild:!0},P,{dir:N.dir,orientation:"vertical",loop:a,currentTabStopId:B,onCurrentTabStopIdChange:j,onEntryFocus:i.composeEventHandlers(g,(e=>{N.isUsingKeyboardRef.current||e.preventDefault()}))}),o.createElement(h.Content,x(n)({role:"menu","aria-orientation":"vertical","data-state":Ae(R.open),"data-radix-menu-content":"",dir:N.dir},M,O,{ref:G,style:{outline:"none",...O.style},onKeyDown:i.composeEventHandlers(O.onKeyDown,(e=>{const t=e.target.closest("[data-radix-menu-content]")===e.currentTarget,r=e.ctrlKey||e.altKey||e.metaKey,n=1===e.key.length;t&&("Tab"===e.key&&e.preventDefault(),!r&&n&&(e=>{var t,r;const n=q.current+e,o=D().filter((e=>!e.disabled)),i=document.activeElement,a=null===(t=o.find((e=>e.ref.current===i)))||void 0===t?void 0:t.textValue,s=function(e,t,r){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===n.length&&(i=i.filter((e=>e!==r)));const l=i.find((e=>e.toLowerCase().startsWith(n.toLowerCase())));return l!==r?l:void 0}(o.map((e=>e.textValue)),n,a),l=null===(r=o.find((e=>e.textValue===s)))||void 0===r?void 0:r.ref.current;!function e(t){q.current=t,window.clearTimeout(W.current),""!==t&&(W.current=window.setTimeout((()=>e("")),1e3))}(n),l&&setTimeout((()=>l.focus()))})(e.key));const o=H.current;if(e.target!==o)return;if(!C.includes(e.key))return;e.preventDefault();const i=D().filter((e=>!e.disabled)).map((e=>e.ref.current));T.includes(e.key)&&i.reverse(),function(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}(i)})),onBlur:i.composeEventHandlers(e.onBlur,(e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(W.current),q.current="")})),onPointerMove:i.composeEventHandlers(e.onPointerMove,ke((e=>{const t=e.target,r=Q.current!==e.clientX;if(e.currentTarget.contains(t)&&r){const t=e.clientX>Q.current?"right":"left";Z.current=t,Q.current=e.clientX}})))})))))))})),te=o.forwardRef(((e,t)=>{const{__scopeMenu:r,...i}=e;return o.createElement(b.Primitive.div,x(n)({role:"group"},i,{ref:t}))})),re=o.forwardRef(((e,t)=>{const{__scopeMenu:r,...i}=e;return o.createElement(b.Primitive.div,x(n)({},i,{ref:t}))})),ne="MenuItem",oe="menu.itemSelect",ie=o.forwardRef(((e,t)=>{const{disabled:r=!1,onSelect:a,...l}=e,c=o.useRef(null),u=z(ne,e.__scopeMenu),d=Z(ne,e.__scopeMenu),f=s.useComposedRefs(t,c),p=o.useRef(!1);return o.createElement(ae,x(n)({},l,{ref:f,disabled:r,onClick:i.composeEventHandlers(e.onClick,(()=>{const e=c.current;if(!r&&e){const t=new CustomEvent(oe,{bubbles:!0,cancelable:!0});e.addEventListener(oe,(e=>null==a?void 0:a(e)),{once:!0}),b.dispatchDiscreteCustomEvent(e,t),t.defaultPrevented?p.current=!1:u.onClose()}})),onPointerDown:t=>{var r;null===(r=e.onPointerDown)||void 0===r||r.call(e,t),p.current=!0},onPointerUp:i.composeEventHandlers(e.onPointerUp,(e=>{var t;p.current||null===(t=e.currentTarget)||void 0===t||t.click()})),onKeyDown:i.composeEventHandlers(e.onKeyDown,(e=>{const t=""!==d.searchRef.current;r||t&&" "===e.key||A.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())}))}))})),ae=o.forwardRef(((e,t)=>{const{__scopeMenu:r,disabled:a=!1,textValue:l,...c}=e,u=Z(ne,r),d=F(r),f=o.useRef(null),p=s.useComposedRefs(t,f),[h,m]=o.useState(!1),[g,y]=o.useState("");return o.useEffect((()=>{const e=f.current;var t;e&&y((null!==(t=e.textContent)&&void 0!==t?t:"").trim())}),[c.children]),o.createElement(N.ItemSlot,{scope:r,disabled:a,textValue:null!=l?l:g},o.createElement(v.Item,x(n)({asChild:!0},d,{focusable:!a}),o.createElement(b.Primitive.div,x(n)({role:"menuitem","data-highlighted":h?"":void 0,"aria-disabled":a||void 0,"data-disabled":a?"":void 0},c,{ref:p,onPointerMove:i.composeEventHandlers(e.onPointerMove,ke((e=>{a?u.onItemLeave(e):(u.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus())}))),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,ke((e=>u.onItemLeave(e)))),onFocus:i.composeEventHandlers(e.onFocus,(()=>m(!0))),onBlur:i.composeEventHandlers(e.onBlur,(()=>m(!1)))}))))})),se=o.forwardRef(((e,t)=>{const{checked:r=!1,onCheckedChange:a,...s}=e;return o.createElement(pe,{scope:e.__scopeMenu,checked:r},o.createElement(ie,x(n)({role:"menuitemcheckbox","aria-checked":Te(r)?"mixed":r},s,{ref:t,"data-state":Ce(r),onSelect:i.composeEventHandlers(s.onSelect,(()=>null==a?void 0:a(!!Te(r)||!r)),{checkForDefaultPrevented:!1})})))})),[le,ce]=P("MenuRadioGroup",{value:void 0,onValueChange:()=>{}}),ue=o.forwardRef(((e,t)=>{const{value:r,onValueChange:i,...a}=e,s=w.useCallbackRef(i);return o.createElement(le,{scope:e.__scopeMenu,value:r,onValueChange:s},o.createElement(te,x(n)({},a,{ref:t})))})),de=o.forwardRef(((e,t)=>{const{value:r,...a}=e,s=ce("MenuRadioItem",e.__scopeMenu),l=r===s.value;return o.createElement(pe,{scope:e.__scopeMenu,checked:l},o.createElement(ie,x(n)({role:"menuitemradio","aria-checked":l},a,{ref:t,"data-state":Ce(l),onSelect:i.composeEventHandlers(a.onSelect,(()=>{var e;return null===(e=s.onValueChange)||void 0===e?void 0:e.call(s,r)}),{checkForDefaultPrevented:!1})})))})),fe="MenuItemIndicator",[pe,he]=P(fe,{checked:!1}),me=o.forwardRef(((e,t)=>{const{__scopeMenu:r,forceMount:i,...a}=e,s=he(fe,r);return o.createElement(g.Presence,{present:i||Te(s.checked)||!0===s.checked},o.createElement(b.Primitive.span,x(n)({},a,{ref:t,"data-state":Ce(s.checked)})))})),ge=o.forwardRef(((e,t)=>{const{__scopeMenu:r,...i}=e;return o.createElement(b.Primitive.div,x(n)({role:"separator","aria-orientation":"horizontal"},i,{ref:t}))})),be=o.forwardRef(((e,t)=>{const{__scopeMenu:r,...i}=e,a=L(r);return o.createElement(h.Arrow,x(n)({},a,i,{ref:t}))})),ve="MenuSub",[ye,we]=P(ve),Ee=e=>{const{__scopeMenu:t,children:r,open:n=!1,onOpenChange:i}=e,a=U(ve,t),s=L(t),[l,c]=o.useState(null),[u,d]=o.useState(null),f=w.useCallbackRef(i);return o.useEffect((()=>(!1===a.open&&f(!1),()=>f(!1))),[a.open,f]),o.createElement(h.Root,s,o.createElement(B,{scope:t,open:n,onOpenChange:f,content:u,onContentChange:d},o.createElement(ye,{scope:t,contentId:p.useId(),triggerId:p.useId(),trigger:l,onTriggerChange:c},r)))},_e="MenuSubTrigger",Se=o.forwardRef(((e,t)=>{const r=U(_e,e.__scopeMenu),a=z(_e,e.__scopeMenu),l=we(_e,e.__scopeMenu),c=Z(_e,e.__scopeMenu),u=o.useRef(null),{pointerGraceTimerRef:d,onPointerGraceIntentChange:f}=c,p={__scopeMenu:e.__scopeMenu},h=o.useCallback((()=>{u.current&&window.clearTimeout(u.current),u.current=null}),[]);return o.useEffect((()=>h),[h]),o.useEffect((()=>{const e=d.current;return()=>{window.clearTimeout(e),f(null)}}),[d,f]),o.createElement(G,x(n)({asChild:!0},p),o.createElement(ae,x(n)({id:l.triggerId,"aria-haspopup":"menu","aria-expanded":r.open,"aria-controls":l.contentId,"data-state":Ae(r.open)},e,{ref:s.composeRefs(t,l.onTriggerChange),onClick:t=>{var n;null===(n=e.onClick)||void 0===n||n.call(e,t),e.disabled||t.defaultPrevented||(t.currentTarget.focus(),r.open||r.onOpenChange(!0))},onPointerMove:i.composeEventHandlers(e.onPointerMove,ke((t=>{c.onItemEnter(t),t.defaultPrevented||e.disabled||r.open||u.current||(c.onPointerGraceIntentChange(null),u.current=window.setTimeout((()=>{r.onOpenChange(!0),h()}),100))}))),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,ke((e=>{var t;h();const n=null===(t=r.content)||void 0===t?void 0:t.getBoundingClientRect();if(n){var o;const t=null===(o=r.content)||void 0===o?void 0:o.dataset.side,i="right"===t,a=i?-5:5,s=n[i?"left":"right"],l=n[i?"right":"left"];c.onPointerGraceIntentChange({area:[{x:e.clientX+a,y:e.clientY},{x:s,y:n.top},{x:l,y:n.top},{x:l,y:n.bottom},{x:s,y:n.bottom}],side:t}),window.clearTimeout(d.current),d.current=window.setTimeout((()=>c.onPointerGraceIntentChange(null)),300)}else{if(c.onTriggerLeave(e),e.defaultPrevented)return;c.onPointerGraceIntentChange(null)}}))),onKeyDown:i.composeEventHandlers(e.onKeyDown,(t=>{const n=""!==c.searchRef.current;var o;e.disabled||n&&" "===t.key||k[a.dir].includes(t.key)&&(r.onOpenChange(!0),null===(o=r.content)||void 0===o||o.focus(),t.preventDefault())}))})))})),xe=o.forwardRef(((e,t)=>{const r=V(K,e.__scopeMenu),{forceMount:a=r.forceMount,...l}=e,c=U(K,e.__scopeMenu),u=z(K,e.__scopeMenu),d=we("MenuSubContent",e.__scopeMenu),f=o.useRef(null),p=s.useComposedRefs(t,f);return o.createElement(N.Provider,{scope:e.__scopeMenu},o.createElement(g.Presence,{present:a||c.open},o.createElement(N.Slot,{scope:e.__scopeMenu},o.createElement(ee,x(n)({id:d.contentId,"aria-labelledby":d.triggerId},l,{ref:p,align:"start",side:"rtl"===u.dir?"left":"right",disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{var t;u.isUsingKeyboardRef.current&&(null===(t=f.current)||void 0===t||t.focus()),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:i.composeEventHandlers(e.onFocusOutside,(e=>{e.target!==d.trigger&&c.onOpenChange(!1)})),onEscapeKeyDown:i.composeEventHandlers(e.onEscapeKeyDown,(e=>{u.onClose(),e.preventDefault()})),onKeyDown:i.composeEventHandlers(e.onKeyDown,(e=>{const t=e.currentTarget.contains(e.target),r=O[u.dir].includes(e.key);var n;t&&r&&(c.onOpenChange(!1),null===(n=d.trigger)||void 0===n||n.focus(),e.preventDefault())}))})))))}));function Ae(e){return e?"open":"closed"}function Te(e){return"indeterminate"===e}function Ce(e){return Te(e)?"indeterminate":e?"checked":"unchecked"}function ke(e){return t=>"mouse"===t.pointerType?e(t):void 0}const Oe=H,Re=G,Ne=Y,Ie=Q,Me=te,Pe=re,De=ie,Le=se,Fe=ue,Be=de,Ue=me,je=ge,ze=be,He=Ee,Ge=Se,We=xe},1278:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(89656),a=r(62585),s=r(80739),l=r(10207),c=r(95791),u=r(6411),d=r(91025),f=r(56016),p=r(62053),h=r(22971);function m(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function g(e){return e&&e.__esModule?e.default:e}m(e.exports,"createMenubarScope",(()=>_)),m(e.exports,"Menubar",(()=>C)),m(e.exports,"MenubarMenu",(()=>N)),m(e.exports,"MenubarTrigger",(()=>M)),m(e.exports,"MenubarPortal",(()=>P)),m(e.exports,"MenubarContent",(()=>L)),m(e.exports,"MenubarGroup",(()=>F)),m(e.exports,"MenubarLabel",(()=>B)),m(e.exports,"MenubarItem",(()=>U)),m(e.exports,"MenubarCheckboxItem",(()=>j)),m(e.exports,"MenubarRadioGroup",(()=>z)),m(e.exports,"MenubarRadioItem",(()=>H)),m(e.exports,"MenubarItemIndicator",(()=>G)),m(e.exports,"MenubarSeparator",(()=>W)),m(e.exports,"MenubarArrow",(()=>q)),m(e.exports,"MenubarSub",(()=>V)),m(e.exports,"MenubarSubTrigger",(()=>Y)),m(e.exports,"MenubarSubContent",(()=>K)),m(e.exports,"Root",(()=>X)),m(e.exports,"Menu",(()=>Z)),m(e.exports,"Trigger",(()=>Q)),m(e.exports,"Portal",(()=>J)),m(e.exports,"Content",(()=>$)),m(e.exports,"Group",(()=>ee)),m(e.exports,"Label",(()=>te)),m(e.exports,"Item",(()=>re)),m(e.exports,"CheckboxItem",(()=>ne)),m(e.exports,"RadioGroup",(()=>oe)),m(e.exports,"RadioItem",(()=>ie)),m(e.exports,"ItemIndicator",(()=>ae)),m(e.exports,"Separator",(()=>se)),m(e.exports,"Arrow",(()=>le)),m(e.exports,"Sub",(()=>ce)),m(e.exports,"SubTrigger",(()=>ue)),m(e.exports,"SubContent",(()=>de));const b="Menubar",[v,y,w]=i.createCollection(b),[E,_]=c.createContextScope(b,[w,f.createRovingFocusGroupScope]),S=d.createMenuScope(),x=f.createRovingFocusGroupScope(),[A,T]=E(b),C=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,value:i,onValueChange:s,defaultValue:l,loop:c=!0,dir:u,...d}=e,m=a.useDirection(u),b=x(r),[y="",w]=h.useControllableState({prop:i,onChange:s,defaultProp:l}),[E,_]=o.useState(null);return o.createElement(A,{scope:r,value:y,onMenuOpen:o.useCallback((e=>{w(e),_(e)}),[w]),onMenuClose:o.useCallback((()=>w("")),[w]),onMenuToggle:o.useCallback((e=>{w((t=>Boolean(t)?"":e)),_(e)}),[w]),dir:m,loop:c},o.createElement(v.Provider,{scope:r},o.createElement(v.Slot,{scope:r},o.createElement(f.Root,g(n)({asChild:!0},b,{orientation:"horizontal",loop:c,dir:m,currentTabStopId:E,onCurrentTabStopIdChange:_}),o.createElement(p.Primitive.div,g(n)({role:"menubar"},d,{ref:t}))))))})),k="MenubarMenu",[O,R]=E(k),N=e=>{const{__scopeMenubar:t,value:r,...i}=e,a=u.useId(),s=r||a||"LEGACY_REACT_AUTO_VALUE",l=T(k,t),c=S(t),f=o.useRef(null),p=o.useRef(!1),h=l.value===s;return o.useEffect((()=>{h||(p.current=!1)}),[h]),o.createElement(O,{scope:t,value:s,triggerId:u.useId(),triggerRef:f,contentId:u.useId(),wasKeyboardTriggerOpenRef:p},o.createElement(d.Root,g(n)({},c,{open:h,onOpenChange:e=>{e||l.onMenuClose()},modal:!1,dir:l.dir},i)))},I="MenubarTrigger",M=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,disabled:i=!1,...a}=e,c=x(r),u=S(r),h=T(I,r),m=R(I,r),b=o.useRef(null),y=l.useComposedRefs(t,b,m.triggerRef),[w,E]=o.useState(!1),_=h.value===m.value;return o.createElement(v.ItemSlot,{scope:r,value:m.value,disabled:i},o.createElement(f.Item,g(n)({asChild:!0},c,{focusable:!i,tabStopId:m.value}),o.createElement(d.Anchor,g(n)({asChild:!0},u),o.createElement(p.Primitive.button,g(n)({type:"button",role:"menuitem",id:m.triggerId,"aria-haspopup":"menu","aria-expanded":_,"aria-controls":_?m.contentId:void 0,"data-highlighted":w?"":void 0,"data-state":_?"open":"closed","data-disabled":i?"":void 0,disabled:i},a,{ref:y,onPointerDown:s.composeEventHandlers(e.onPointerDown,(e=>{i||0!==e.button||!1!==e.ctrlKey||(h.onMenuOpen(m.value),_||e.preventDefault())})),onPointerEnter:s.composeEventHandlers(e.onPointerEnter,(()=>{var e;Boolean(h.value)&&!_&&(h.onMenuOpen(m.value),null===(e=b.current)||void 0===e||e.focus())})),onKeyDown:s.composeEventHandlers(e.onKeyDown,(e=>{i||(["Enter"," "].includes(e.key)&&h.onMenuToggle(m.value),"ArrowDown"===e.key&&h.onMenuOpen(m.value),["Enter"," ","ArrowDown"].includes(e.key)&&(m.wasKeyboardTriggerOpenRef.current=!0,e.preventDefault()))})),onFocus:s.composeEventHandlers(e.onFocus,(()=>E(!0))),onBlur:s.composeEventHandlers(e.onBlur,(()=>E(!1)))})))))})),P=e=>{const{__scopeMenubar:t,...r}=e,i=S(t);return o.createElement(d.Portal,g(n)({},i,r))},D="MenubarContent",L=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,align:i="start",...a}=e,l=S(r),c=T(D,r),u=R(D,r),f=y(r),p=o.useRef(!1);return o.createElement(d.Content,g(n)({id:u.contentId,"aria-labelledby":u.triggerId,"data-radix-menubar-content":""},l,a,{ref:t,align:i,onCloseAutoFocus:s.composeEventHandlers(e.onCloseAutoFocus,(e=>{var t;Boolean(c.value)||p.current||null===(t=u.triggerRef.current)||void 0===t||t.focus(),p.current=!1,e.preventDefault()})),onFocusOutside:s.composeEventHandlers(e.onFocusOutside,(e=>{const t=e.target;f().some((e=>{var r;return null===(r=e.ref.current)||void 0===r?void 0:r.contains(t)}))&&e.preventDefault()})),onInteractOutside:s.composeEventHandlers(e.onInteractOutside,(()=>{p.current=!0})),onEntryFocus:e=>{u.wasKeyboardTriggerOpenRef.current||e.preventDefault()},onKeyDown:s.composeEventHandlers(e.onKeyDown,(e=>{if(["ArrowRight","ArrowLeft"].includes(e.key)){const n=e.target,o=n.hasAttribute("data-radix-menubar-subtrigger"),i=n.closest("[data-radix-menubar-content]")!==e.currentTarget,a=("rtl"===c.dir?"ArrowRight":"ArrowLeft")===e.key;if(!a&&o)return;if(i&&a)return;let s=f().filter((e=>!e.disabled)).map((e=>e.value));a&&s.reverse();const l=s.indexOf(u.value);s=c.loop?(r=l+1,(t=s).map(((e,n)=>t[(r+n)%t.length]))):s.slice(l+1);const[d]=s;d&&c.onMenuOpen(d)}var t,r}),{checkForDefaultPrevented:!1}),style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))})),F=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.Group,g(n)({},a,i,{ref:t}))})),B=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.Label,g(n)({},a,i,{ref:t}))})),U=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.Item,g(n)({},a,i,{ref:t}))})),j=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.CheckboxItem,g(n)({},a,i,{ref:t}))})),z=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.RadioGroup,g(n)({},a,i,{ref:t}))})),H=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.RadioItem,g(n)({},a,i,{ref:t}))})),G=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.ItemIndicator,g(n)({},a,i,{ref:t}))})),W=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.Separator,g(n)({},a,i,{ref:t}))})),q=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.Arrow,g(n)({},a,i,{ref:t}))})),V=e=>{const{__scopeMenubar:t,children:r,open:i,onOpenChange:a,defaultOpen:s}=e,l=S(t),[c=!1,u]=h.useControllableState({prop:i,defaultProp:s,onChange:a});return o.createElement(d.Sub,g(n)({},l,{open:c,onOpenChange:u}),r)},Y=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.SubTrigger,g(n)({"data-radix-menubar-subtrigger":""},a,i,{ref:t}))})),K=o.forwardRef(((e,t)=>{const{__scopeMenubar:r,...i}=e,a=S(r);return o.createElement(d.SubContent,g(n)({},a,{"data-radix-menubar-content":""},i,{ref:t,style:{...e.style,"--radix-menubar-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-menubar-content-available-width":"var(--radix-popper-available-width)","--radix-menubar-content-available-height":"var(--radix-popper-available-height)","--radix-menubar-trigger-width":"var(--radix-popper-anchor-width)","--radix-menubar-trigger-height":"var(--radix-popper-anchor-height)"}}))})),X=C,Z=N,Q=M,J=P,$=L,ee=F,te=B,re=U,ne=j,oe=z,ie=H,ae=G,se=W,le=q,ce=V,ue=Y,de=K},53332:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(40961),a=r(95791),s=r(80739),l=r(62053),c=r(22971),u=r(10207),d=r(62585),f=r(55575),p=r(6411),h=r(89656),m=r(14614),g=r(88165),b=r(95696),v=r(80283),y=r(41068);function w(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function E(e){return e&&e.__esModule?e.default:e}w(e.exports,"createNavigationMenuScope",(()=>R)),w(e.exports,"NavigationMenu",(()=>D)),w(e.exports,"NavigationMenuSub",(()=>L)),w(e.exports,"NavigationMenuList",(()=>B)),w(e.exports,"NavigationMenuItem",(()=>z)),w(e.exports,"NavigationMenuTrigger",(()=>G)),w(e.exports,"NavigationMenuLink",(()=>q)),w(e.exports,"NavigationMenuIndicator",(()=>Y)),w(e.exports,"NavigationMenuContent",(()=>Z)),w(e.exports,"NavigationMenuViewport",(()=>te)),w(e.exports,"Root",(()=>pe)),w(e.exports,"Sub",(()=>he)),w(e.exports,"List",(()=>me)),w(e.exports,"Item",(()=>ge)),w(e.exports,"Trigger",(()=>be)),w(e.exports,"Link",(()=>ve)),w(e.exports,"Indicator",(()=>ye)),w(e.exports,"Content",(()=>we)),w(e.exports,"Viewport",(()=>Ee));const _="NavigationMenu",[S,x,A]=h.createCollection(_),[T,C,k]=h.createCollection(_),[O,R]=a.createContextScope(_,[A,k]),[N,I]=O(_),[M,P]=O(_),D=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,value:i,onValueChange:a,defaultValue:s,delayDuration:f=200,skipDelayDuration:p=300,orientation:h="horizontal",dir:m,...g}=e,[b,v]=o.useState(null),y=u.useComposedRefs(t,(e=>v(e))),w=d.useDirection(m),_=o.useRef(0),S=o.useRef(0),x=o.useRef(0),[A,T]=o.useState(!0),[C="",k]=c.useControllableState({prop:i,onChange:e=>{const t=p>0;""!==e?(window.clearTimeout(x.current),t&&T(!1)):(window.clearTimeout(x.current),x.current=window.setTimeout((()=>T(!0)),p)),null==a||a(e)},defaultProp:s}),O=o.useCallback((()=>{window.clearTimeout(S.current),S.current=window.setTimeout((()=>k("")),150)}),[k]),R=o.useCallback((e=>{window.clearTimeout(S.current),k(e)}),[k]),N=o.useCallback((e=>{C===e?window.clearTimeout(S.current):_.current=window.setTimeout((()=>{window.clearTimeout(S.current),k(e)}),f)}),[C,k,f]);return o.useEffect((()=>()=>{window.clearTimeout(_.current),window.clearTimeout(S.current),window.clearTimeout(x.current)}),[]),o.createElement(F,{scope:r,isRootMenu:!0,value:C,dir:w,orientation:h,rootNavigationMenu:b,onTriggerEnter:e=>{window.clearTimeout(_.current),A?N(e):R(e)},onTriggerLeave:()=>{window.clearTimeout(_.current),O()},onContentEnter:()=>window.clearTimeout(S.current),onContentLeave:O,onItemSelect:e=>{k((t=>t===e?"":e))},onItemDismiss:()=>k("")},o.createElement(l.Primitive.nav,E(n)({"aria-label":"Main","data-orientation":h,dir:w},g,{ref:y})))})),L=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,value:i,onValueChange:a,defaultValue:s,orientation:u="horizontal",...d}=e,f=I("NavigationMenuSub",r),[p="",h]=c.useControllableState({prop:i,onChange:a,defaultProp:s});return o.createElement(F,{scope:r,isRootMenu:!1,value:p,dir:f.dir,orientation:u,rootNavigationMenu:f.rootNavigationMenu,onTriggerEnter:e=>h(e),onItemSelect:e=>h(e),onItemDismiss:()=>h("")},o.createElement(l.Primitive.div,E(n)({"data-orientation":u},d,{ref:t})))})),F=e=>{const{scope:t,isRootMenu:r,rootNavigationMenu:n,dir:i,orientation:a,children:s,value:l,onItemSelect:c,onItemDismiss:u,onTriggerEnter:d,onTriggerLeave:f,onContentEnter:h,onContentLeave:m}=e,[b,y]=o.useState(null),[w,E]=o.useState(new Map),[_,x]=o.useState(null);return o.createElement(N,{scope:t,isRootMenu:r,rootNavigationMenu:n,value:l,previousValue:g.usePrevious(l),baseId:p.useId(),dir:i,orientation:a,viewport:b,onViewportChange:y,indicatorTrack:_,onIndicatorTrackChange:x,onTriggerEnter:v.useCallbackRef(d),onTriggerLeave:v.useCallbackRef(f),onContentEnter:v.useCallbackRef(h),onContentLeave:v.useCallbackRef(m),onItemSelect:v.useCallbackRef(c),onItemDismiss:v.useCallbackRef(u),onViewportContentChange:o.useCallback(((e,t)=>{E((r=>(r.set(e,t),new Map(r))))}),[]),onViewportContentRemove:o.useCallback((e=>{E((t=>t.has(e)?(t.delete(e),new Map(t)):t))}),[])},o.createElement(S.Provider,{scope:t},o.createElement(M,{scope:t,items:w},s)))},B=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,...i}=e,a=I("NavigationMenuList",r),s=o.createElement(l.Primitive.ul,E(n)({"data-orientation":a.orientation},i,{ref:t}));return o.createElement(l.Primitive.div,{style:{position:"relative"},ref:a.onIndicatorTrackChange},o.createElement(S.Slot,{scope:r},a.isRootMenu?o.createElement(ne,{asChild:!0},s):s))})),[U,j]=O("NavigationMenuItem"),z=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,value:i,...a}=e,s=p.useId(),c=i||s||"LEGACY_REACT_AUTO_VALUE",u=o.useRef(null),d=o.useRef(null),f=o.useRef(null),h=o.useRef((()=>{})),m=o.useRef(!1),g=o.useCallback(((e="start")=>{if(u.current){h.current();const t=ae(u.current);t.length&&se("start"===e?t:t.reverse())}}),[]),b=o.useCallback((()=>{if(u.current){const e=ae(u.current);e.length&&(h.current=function(e){return e.forEach((e=>{e.dataset.tabindex=e.getAttribute("tabindex")||"",e.setAttribute("tabindex","-1")})),()=>{e.forEach((e=>{const t=e.dataset.tabindex;e.setAttribute("tabindex",t)}))}}(e))}}),[]);return o.createElement(U,{scope:r,value:c,triggerRef:d,contentRef:u,focusProxyRef:f,wasEscapeCloseRef:m,onEntryKeyDown:g,onFocusProxyEnter:g,onRootContentClose:b,onContentFocusOutside:b},o.createElement(l.Primitive.li,E(n)({},a,{ref:t})))})),H="NavigationMenuTrigger",G=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,disabled:i,...a}=e,c=I(H,e.__scopeNavigationMenu),d=j(H,e.__scopeNavigationMenu),f=o.useRef(null),p=u.useComposedRefs(f,d.triggerRef,t),h=ue(c.baseId,d.value),m=de(c.baseId,d.value),g=o.useRef(!1),b=o.useRef(!1),v=d.value===c.value;return o.createElement(o.Fragment,null,o.createElement(S.ItemSlot,{scope:r,value:d.value},o.createElement(ie,{asChild:!0},o.createElement(l.Primitive.button,E(n)({id:h,disabled:i,"data-disabled":i?"":void 0,"data-state":ce(v),"aria-expanded":v,"aria-controls":m},a,{ref:p,onPointerEnter:s.composeEventHandlers(e.onPointerEnter,(()=>{b.current=!1,d.wasEscapeCloseRef.current=!1})),onPointerMove:s.composeEventHandlers(e.onPointerMove,fe((()=>{i||b.current||d.wasEscapeCloseRef.current||g.current||(c.onTriggerEnter(d.value),g.current=!0)}))),onPointerLeave:s.composeEventHandlers(e.onPointerLeave,fe((()=>{i||(c.onTriggerLeave(),g.current=!1)}))),onClick:s.composeEventHandlers(e.onClick,(()=>{c.onItemSelect(d.value),b.current=v})),onKeyDown:s.composeEventHandlers(e.onKeyDown,(e=>{const t={horizontal:"ArrowDown",vertical:"rtl"===c.dir?"ArrowLeft":"ArrowRight"}[c.orientation];v&&e.key===t&&(d.onEntryKeyDown(),e.preventDefault())}))})))),v&&o.createElement(o.Fragment,null,o.createElement(y.Root,{"aria-hidden":!0,tabIndex:0,ref:d.focusProxyRef,onFocus:e=>{const t=d.contentRef.current,r=e.relatedTarget,n=r===f.current,o=null==t?void 0:t.contains(r);!n&&o||d.onFocusProxyEnter(n?"start":"end")}}),c.viewport&&o.createElement("span",{"aria-owns":m})))})),W="navigationMenu.linkSelect",q=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,active:i,onSelect:a,...c}=e;return o.createElement(ie,{asChild:!0},o.createElement(l.Primitive.a,E(n)({"data-active":i?"":void 0,"aria-current":i?"page":void 0},c,{ref:t,onClick:s.composeEventHandlers(e.onClick,(e=>{const t=e.target,r=new CustomEvent(W,{bubbles:!0,cancelable:!0});if(t.addEventListener(W,(e=>null==a?void 0:a(e)),{once:!0}),l.dispatchDiscreteCustomEvent(t,r),!r.defaultPrevented&&!e.metaKey){const e=new CustomEvent(J,{bubbles:!0,cancelable:!0});l.dispatchDiscreteCustomEvent(t,e)}}),{checkForDefaultPrevented:!1})})))})),V="NavigationMenuIndicator",Y=o.forwardRef(((e,t)=>{const{forceMount:r,...a}=e,s=I(V,e.__scopeNavigationMenu),l=Boolean(s.value);return s.indicatorTrack?E(i).createPortal(o.createElement(f.Presence,{present:r||l},o.createElement(K,E(n)({},a,{ref:t}))),s.indicatorTrack):null})),K=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,...i}=e,a=I(V,r),s=x(r),[c,u]=o.useState(null),[d,f]=o.useState(null),p="horizontal"===a.orientation,h=Boolean(a.value);o.useEffect((()=>{var e;const t=null===(e=s().find((e=>e.value===a.value)))||void 0===e?void 0:e.ref.current;t&&u(t)}),[s,a.value]);const m=()=>{c&&f({size:p?c.offsetWidth:c.offsetHeight,offset:p?c.offsetLeft:c.offsetTop})};return le(c,m),le(a.indicatorTrack,m),d?o.createElement(l.Primitive.div,E(n)({"aria-hidden":!0,"data-state":h?"visible":"hidden","data-orientation":a.orientation},i,{ref:t,style:{position:"absolute",...p?{left:0,width:d.size+"px",transform:`translateX(${d.offset}px)`}:{top:0,height:d.size+"px",transform:`translateY(${d.offset}px)`},...i.style}})):null})),X="NavigationMenuContent",Z=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,a=I(X,e.__scopeNavigationMenu),l=j(X,e.__scopeNavigationMenu),c=u.useComposedRefs(l.contentRef,t),d=l.value===a.value,p={value:l.value,triggerRef:l.triggerRef,focusProxyRef:l.focusProxyRef,wasEscapeCloseRef:l.wasEscapeCloseRef,onContentFocusOutside:l.onContentFocusOutside,onRootContentClose:l.onRootContentClose,...i};return a.viewport?o.createElement(Q,E(n)({forceMount:r},p,{ref:c})):o.createElement(f.Presence,{present:r||d},o.createElement($,E(n)({"data-state":ce(d)},p,{ref:c,onPointerEnter:s.composeEventHandlers(e.onPointerEnter,a.onContentEnter),onPointerLeave:s.composeEventHandlers(e.onPointerLeave,fe(a.onContentLeave)),style:{pointerEvents:!d&&a.isRootMenu?"none":void 0,...p.style}})))})),Q=o.forwardRef(((e,t)=>{const r=I(X,e.__scopeNavigationMenu),{onViewportContentChange:n,onViewportContentRemove:o}=r;return b.useLayoutEffect((()=>{n(e.value,{ref:t,...e})}),[e,t,n]),b.useLayoutEffect((()=>()=>o(e.value)),[e.value,o]),null})),J="navigationMenu.rootContentDismiss",$=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,value:i,triggerRef:a,focusProxyRef:l,wasEscapeCloseRef:c,onRootContentClose:d,onContentFocusOutside:f,...p}=e,h=I(X,r),g=o.useRef(null),b=u.useComposedRefs(g,t),v=ue(h.baseId,i),y=de(h.baseId,i),w=x(r),_=o.useRef(null),{onItemDismiss:S}=h;o.useEffect((()=>{const e=g.current;if(h.isRootMenu&&e){const t=()=>{var t;S(),d(),e.contains(document.activeElement)&&(null===(t=a.current)||void 0===t||t.focus())};return e.addEventListener(J,t),()=>e.removeEventListener(J,t)}}),[h.isRootMenu,e.value,a,S,d]);const A=o.useMemo((()=>{const e=w().map((e=>e.value));"rtl"===h.dir&&e.reverse();const t=e.indexOf(h.value),r=e.indexOf(h.previousValue),n=i===h.value,o=r===e.indexOf(i);if(!n&&!o)return _.current;const a=(()=>{if(t!==r){if(n&&-1!==r)return t>r?"from-end":"from-start";if(o&&-1!==t)return t>r?"to-start":"to-end"}return null})();return _.current=a,a}),[h.previousValue,h.value,h.dir,w,i]);return o.createElement(ne,{asChild:!0},o.createElement(m.DismissableLayer,E(n)({id:y,"aria-labelledby":v,"data-motion":A,"data-orientation":h.orientation},p,{ref:b,onDismiss:()=>{var e;const t=new Event(J,{bubbles:!0,cancelable:!0});null===(e=g.current)||void 0===e||e.dispatchEvent(t)},onFocusOutside:s.composeEventHandlers(e.onFocusOutside,(e=>{var t;f();const r=e.target;null!==(t=h.rootNavigationMenu)&&void 0!==t&&t.contains(r)&&e.preventDefault()})),onPointerDownOutside:s.composeEventHandlers(e.onPointerDownOutside,(e=>{var t;const r=e.target,n=w().some((e=>{var t;return null===(t=e.ref.current)||void 0===t?void 0:t.contains(r)})),o=h.isRootMenu&&(null===(t=h.viewport)||void 0===t?void 0:t.contains(r));(n||o||!h.isRootMenu)&&e.preventDefault()})),onKeyDown:s.composeEventHandlers(e.onKeyDown,(e=>{const t=e.altKey||e.ctrlKey||e.metaKey;if("Tab"===e.key&&!t){const t=ae(e.currentTarget),n=document.activeElement,o=t.findIndex((e=>e===n));var r;se(e.shiftKey?t.slice(0,o).reverse():t.slice(o+1,t.length))?e.preventDefault():null===(r=l.current)||void 0===r||r.focus()}})),onEscapeKeyDown:s.composeEventHandlers(e.onEscapeKeyDown,(e=>{c.current=!0}))})))})),ee="NavigationMenuViewport",te=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,a=I(ee,e.__scopeNavigationMenu),s=Boolean(a.value);return o.createElement(f.Presence,{present:r||s},o.createElement(re,E(n)({},i,{ref:t})))})),re=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,children:i,...a}=e,c=I(ee,r),d=u.useComposedRefs(t,c.onViewportChange),p=P(X,e.__scopeNavigationMenu),[h,m]=o.useState(null),[g,b]=o.useState(null),v=h?(null==h?void 0:h.width)+"px":void 0,y=h?(null==h?void 0:h.height)+"px":void 0,w=Boolean(c.value),_=w?c.value:c.previousValue;return le(g,(()=>{g&&m({width:g.offsetWidth,height:g.offsetHeight})})),o.createElement(l.Primitive.div,E(n)({"data-state":ce(w),"data-orientation":c.orientation},a,{ref:d,style:{pointerEvents:!w&&c.isRootMenu?"none":void 0,"--radix-navigation-menu-viewport-width":v,"--radix-navigation-menu-viewport-height":y,...a.style},onPointerEnter:s.composeEventHandlers(e.onPointerEnter,c.onContentEnter),onPointerLeave:s.composeEventHandlers(e.onPointerLeave,fe(c.onContentLeave))}),Array.from(p.items).map((([e,{ref:t,forceMount:r,...i}])=>{const a=_===e;return o.createElement(f.Presence,{key:e,present:r||a},o.createElement($,E(n)({},i,{ref:u.composeRefs(t,(e=>{a&&e&&b(e)}))})))})))})),ne=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,...i}=e,a=I("FocusGroup",r);return o.createElement(T.Provider,{scope:r},o.createElement(T.Slot,{scope:r},o.createElement(l.Primitive.div,E(n)({dir:a.dir},i,{ref:t}))))})),oe=["ArrowRight","ArrowLeft","ArrowUp","ArrowDown"],ie=o.forwardRef(((e,t)=>{const{__scopeNavigationMenu:r,...i}=e,a=C(r),c=I("FocusGroupItem",r);return o.createElement(T.ItemSlot,{scope:r},o.createElement(l.Primitive.button,E(n)({},i,{ref:t,onKeyDown:s.composeEventHandlers(e.onKeyDown,(e=>{if(["Home","End",...oe].includes(e.key)){let t=a().map((e=>e.ref.current));if(["rtl"===c.dir?"ArrowRight":"ArrowLeft","ArrowUp","End"].includes(e.key)&&t.reverse(),oe.includes(e.key)){const r=t.indexOf(e.currentTarget);t=t.slice(r+1)}setTimeout((()=>se(t))),e.preventDefault()}}))})))}));function ae(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function se(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}function le(e,t){const r=v.useCallbackRef(t);b.useLayoutEffect((()=>{let t=0;if(e){const n=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)}));return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}}),[e,r])}function ce(e){return e?"open":"closed"}function ue(e,t){return`${e}-trigger-${t}`}function de(e,t){return`${e}-content-${t}`}function fe(e){return t=>"mouse"===t.pointerType?e(t):void 0}const pe=D,he=L,me=B,ge=z,be=G,ve=q,ye=Y,we=Z,Ee=te},20009:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(10207),s=r(95791),l=r(14614),c=r(21983),u=r(6345),d=r(6411),f=r(21738),p=r(93086),h=r(55575),m=r(62053),g=r(56612),b=r(22971),v=r(58241),y=r(25816);function w(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function E(e){return e&&e.__esModule?e.default:e}w(e.exports,"createPopoverScope",(()=>x)),w(e.exports,"Popover",(()=>k)),w(e.exports,"PopoverAnchor",(()=>O)),w(e.exports,"PopoverTrigger",(()=>R)),w(e.exports,"PopoverPortal",(()=>P)),w(e.exports,"PopoverContent",(()=>L)),w(e.exports,"PopoverClose",(()=>j)),w(e.exports,"PopoverArrow",(()=>z)),w(e.exports,"Root",(()=>G)),w(e.exports,"Anchor",(()=>W)),w(e.exports,"Trigger",(()=>q)),w(e.exports,"Portal",(()=>V)),w(e.exports,"Content",(()=>Y)),w(e.exports,"Close",(()=>K)),w(e.exports,"Arrow",(()=>X));const _="Popover",[S,x]=s.createContextScope(_,[f.createPopperScope]),A=f.createPopperScope(),[T,C]=S(_),k=e=>{const{__scopePopover:t,children:r,open:n,defaultOpen:i,onOpenChange:a,modal:s=!1}=e,l=A(t),c=o.useRef(null),[u,p]=o.useState(!1),[h=!1,m]=b.useControllableState({prop:n,defaultProp:i,onChange:a});return o.createElement(f.Root,l,o.createElement(T,{scope:t,contentId:d.useId(),triggerRef:c,open:h,onOpenChange:m,onOpenToggle:o.useCallback((()=>m((e=>!e))),[m]),hasCustomAnchor:u,onCustomAnchorAdd:o.useCallback((()=>p(!0)),[]),onCustomAnchorRemove:o.useCallback((()=>p(!1)),[]),modal:s},r))},O=o.forwardRef(((e,t)=>{const{__scopePopover:r,...i}=e,a=C("PopoverAnchor",r),s=A(r),{onCustomAnchorAdd:l,onCustomAnchorRemove:c}=a;return o.useEffect((()=>(l(),()=>c())),[l,c]),o.createElement(f.Anchor,E(n)({},s,i,{ref:t}))})),R=o.forwardRef(((e,t)=>{const{__scopePopover:r,...s}=e,l=C("PopoverTrigger",r),c=A(r),u=a.useComposedRefs(t,l.triggerRef),d=o.createElement(m.Primitive.button,E(n)({type:"button","aria-haspopup":"dialog","aria-expanded":l.open,"aria-controls":l.contentId,"data-state":H(l.open)},s,{ref:u,onClick:i.composeEventHandlers(e.onClick,l.onOpenToggle)}));return l.hasCustomAnchor?d:o.createElement(f.Anchor,E(n)({asChild:!0},c),d)})),N="PopoverPortal",[I,M]=S(N,{forceMount:void 0}),P=e=>{const{__scopePopover:t,forceMount:r,children:n,container:i}=e,a=C(N,t);return o.createElement(I,{scope:t,forceMount:r},o.createElement(h.Presence,{present:r||a.open},o.createElement(p.Portal,{asChild:!0,container:i},n)))},D="PopoverContent",L=o.forwardRef(((e,t)=>{const r=M(D,e.__scopePopover),{forceMount:i=r.forceMount,...a}=e,s=C(D,e.__scopePopover);return o.createElement(h.Presence,{present:i||s.open},s.modal?o.createElement(F,E(n)({},a,{ref:t})):o.createElement(B,E(n)({},a,{ref:t})))})),F=o.forwardRef(((e,t)=>{const r=C(D,e.__scopePopover),s=o.useRef(null),l=a.useComposedRefs(t,s),c=o.useRef(!1);return o.useEffect((()=>{const e=s.current;if(e)return v.hideOthers(e)}),[]),o.createElement(y.RemoveScroll,{as:g.Slot,allowPinchZoom:!0},o.createElement(U,E(n)({},e,{ref:l,trapFocus:r.open,disableOutsidePointerEvents:!0,onCloseAutoFocus:i.composeEventHandlers(e.onCloseAutoFocus,(e=>{var t;e.preventDefault(),c.current||null===(t=r.triggerRef.current)||void 0===t||t.focus()})),onPointerDownOutside:i.composeEventHandlers(e.onPointerDownOutside,(e=>{const t=e.detail.originalEvent,r=0===t.button&&!0===t.ctrlKey,n=2===t.button||r;c.current=n}),{checkForDefaultPrevented:!1}),onFocusOutside:i.composeEventHandlers(e.onFocusOutside,(e=>e.preventDefault()),{checkForDefaultPrevented:!1})})))})),B=o.forwardRef(((e,t)=>{const r=C(D,e.__scopePopover),i=o.useRef(!1),a=o.useRef(!1);return o.createElement(U,E(n)({},e,{ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,onCloseAutoFocus:t=>{var n,o;null===(n=e.onCloseAutoFocus)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current||null===(o=r.triggerRef.current)||void 0===o||o.focus(),t.preventDefault()),i.current=!1,a.current=!1},onInteractOutside:t=>{var n,o;null===(n=e.onInteractOutside)||void 0===n||n.call(e,t),t.defaultPrevented||(i.current=!0,"pointerdown"===t.detail.originalEvent.type&&(a.current=!0));const s=t.target;(null===(o=r.triggerRef.current)||void 0===o?void 0:o.contains(s))&&t.preventDefault(),"focusin"===t.detail.originalEvent.type&&a.current&&t.preventDefault()}}))})),U=o.forwardRef(((e,t)=>{const{__scopePopover:r,trapFocus:i,onOpenAutoFocus:a,onCloseAutoFocus:s,disableOutsidePointerEvents:d,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:m,onInteractOutside:g,...b}=e,v=C(D,r),y=A(r);return c.useFocusGuards(),o.createElement(u.FocusScope,{asChild:!0,loop:!0,trapped:i,onMountAutoFocus:a,onUnmountAutoFocus:s},o.createElement(l.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:d,onInteractOutside:g,onEscapeKeyDown:p,onPointerDownOutside:h,onFocusOutside:m,onDismiss:()=>v.onOpenChange(!1)},o.createElement(f.Content,E(n)({"data-state":H(v.open),role:"dialog",id:v.contentId},y,b,{ref:t,style:{...b.style,"--radix-popover-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-popover-content-available-width":"var(--radix-popper-available-width)","--radix-popover-content-available-height":"var(--radix-popper-available-height)","--radix-popover-trigger-width":"var(--radix-popper-anchor-width)","--radix-popover-trigger-height":"var(--radix-popper-anchor-height)"}}))))})),j=o.forwardRef(((e,t)=>{const{__scopePopover:r,...a}=e,s=C("PopoverClose",r);return o.createElement(m.Primitive.button,E(n)({type:"button"},a,{ref:t,onClick:i.composeEventHandlers(e.onClick,(()=>s.onOpenChange(!1)))}))})),z=o.forwardRef(((e,t)=>{const{__scopePopover:r,...i}=e,a=A(r);return o.createElement(f.Arrow,E(n)({},a,i,{ref:t}))}));function H(e){return e?"open":"closed"}const G=k,W=O,q=R,V=P,Y=L,K=j,X=z},21738:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(82535),a=r(74205),s=r(10207),l=r(95791),c=r(62053),u=r(80283),d=r(95696),f=r(55745);function p(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}p(e.exports,"createPopperScope",(()=>y)),p(e.exports,"Popper",(()=>_)),p(e.exports,"PopperAnchor",(()=>S)),p(e.exports,"PopperContent",(()=>C)),p(e.exports,"PopperArrow",(()=>O)),p(e.exports,"Root",(()=>M)),p(e.exports,"Anchor",(()=>P)),p(e.exports,"Content",(()=>D)),p(e.exports,"Arrow",(()=>L)),p(e.exports,"SIDE_OPTIONS",(()=>m)),p(e.exports,"ALIGN_OPTIONS",(()=>g));const m=["top","right","bottom","left"],g=["start","center","end"],b="Popper",[v,y]=l.createContextScope(b),[w,E]=v(b),_=e=>{const{__scopePopper:t,children:r}=e,[n,i]=o.useState(null);return o.createElement(w,{scope:t,anchor:n,onAnchorChange:i},r)},S=o.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:i,...a}=e,l=E("PopperAnchor",r),u=o.useRef(null),d=s.useComposedRefs(t,u);return o.useEffect((()=>{l.onAnchorChange((null==i?void 0:i.current)||u.current)})),i?null:o.createElement(c.Primitive.div,h(n)({},a,{ref:d}))})),x="PopperContent",[A,T]=v(x),C=o.forwardRef(((e,t)=>{var r,a,l,p,m,g,b,v;const{__scopePopper:y,side:w="bottom",sideOffset:_=0,align:S="center",alignOffset:T=0,arrowPadding:C=0,avoidCollisions:k=!0,collisionBoundary:O=[],collisionPadding:M=0,sticky:P="partial",hideWhenDetached:D=!1,updatePositionStrategy:L="optimized",onPlaced:F,...B}=e,U=E(x,y),[j,z]=o.useState(null),H=s.useComposedRefs(t,(e=>z(e))),[G,W]=o.useState(null),q=f.useSize(G),V=null!==(r=null==q?void 0:q.width)&&void 0!==r?r:0,Y=null!==(a=null==q?void 0:q.height)&&void 0!==a?a:0,K=w+("center"!==S?"-"+S:""),X="number"==typeof M?M:{top:0,right:0,bottom:0,left:0,...M},Z=Array.isArray(O)?O:[O],Q=Z.length>0,J={padding:X,boundary:Z.filter(R),altBoundary:Q},{refs:$,floatingStyles:ee,placement:te,isPositioned:re,middlewareData:ne}=i.useFloating({strategy:"fixed",placement:K,whileElementsMounted:(...e)=>i.autoUpdate(...e,{animationFrame:"always"===L}),elements:{reference:U.anchor},middleware:[i.offset({mainAxis:_+Y,alignmentAxis:T}),k&&i.shift({mainAxis:!0,crossAxis:!1,limiter:"partial"===P?i.limitShift():void 0,...J}),k&&i.flip({...J}),i.size({...J,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),G&&i.arrow({element:G,padding:C}),N({arrowWidth:V,arrowHeight:Y}),D&&i.hide({strategy:"referenceHidden",...J})]}),[oe,ie]=I(te),ae=u.useCallbackRef(F);d.useLayoutEffect((()=>{re&&(null==ae||ae())}),[re,ae]);const se=null===(l=ne.arrow)||void 0===l?void 0:l.x,le=null===(p=ne.arrow)||void 0===p?void 0:p.y,ce=0!==(null===(m=ne.arrow)||void 0===m?void 0:m.centerOffset),[ue,de]=o.useState();return d.useLayoutEffect((()=>{j&&de(window.getComputedStyle(j).zIndex)}),[j]),o.createElement("div",{ref:$.setFloating,"data-radix-popper-content-wrapper":"",style:{...ee,transform:re?ee.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ue,"--radix-popper-transform-origin":[null===(g=ne.transformOrigin)||void 0===g?void 0:g.x,null===(b=ne.transformOrigin)||void 0===b?void 0:b.y].join(" ")},dir:e.dir},o.createElement(A,{scope:y,placedSide:oe,onArrowChange:W,arrowX:se,arrowY:le,shouldHideArrow:ce},o.createElement(c.Primitive.div,h(n)({"data-side":oe,"data-align":ie},B,{ref:H,style:{...B.style,animation:re?void 0:"none",opacity:null!==(v=ne.hide)&&void 0!==v&&v.referenceHidden?0:void 0}}))))})),k={top:"bottom",right:"left",bottom:"top",left:"right"},O=o.forwardRef((function(e,t){const{__scopePopper:r,...i}=e,s=T("PopperArrow",r),l=k[s.placedSide];return o.createElement("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0}},o.createElement(a.Root,h(n)({},i,{ref:t,style:{...i.style,display:"block"}})))}));function R(e){return null!==e}const N=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,u=0!==(null===(r=c.arrow)||void 0===r?void 0:r.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=I(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(n=null===(o=c.arrow)||void 0===o?void 0:o.x)&&void 0!==n?n:0)+d/2,b=(null!==(i=null===(a=c.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let v="",y="";return"bottom"===p?(v=u?m:`${g}px`,y=-f+"px"):"top"===p?(v=u?m:`${g}px`,y=`${l.floating.height+f}px`):"right"===p?(v=-f+"px",y=u?m:`${b}px`):"left"===p&&(v=`${l.floating.width+f}px`,y=u?m:`${b}px`),{data:{x:v,y}}}});function I(e){const[t,r="center"]=e.split("-");return[t,r]}const M=_,P=S,D=C,L=O},93086:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(40961),a=r(62053);function s(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function l(e){return e&&e.__esModule?e.default:e}s(e.exports,"Portal",(()=>c)),s(e.exports,"Root",(()=>u));const c=o.forwardRef(((e,t)=>{var r;const{container:s=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...c}=e;return s?l(i).createPortal(o.createElement(a.Primitive.div,l(n)({},c,{ref:t})),s):null})),u=c},55575:(e,t,r)=>{var n,o,i=r(96540),a=r(40961),s=r(10207),l=r(95696);n=e.exports,o=()=>c,Object.defineProperty(n,"Presence",{get:o,set:undefined,enumerable:!0,configurable:!0});const c=e=>{const{present:t,children:r}=e,n=function(e){const[t,r]=i.useState(),n=i.useRef({}),o=i.useRef(e),s=i.useRef("none"),c=e?"mounted":"unmounted",[d,f]=function(e,t){return i.useReducer(((e,r)=>{const n=t[e][r];return null!=n?n:e}),e)}(c,{mounted:{UNMOUNT:"unmounted",ANIMATION_OUT:"unmountSuspended"},unmountSuspended:{MOUNT:"mounted",ANIMATION_END:"unmounted"},unmounted:{MOUNT:"mounted"}});return i.useEffect((()=>{const e=u(n.current);s.current="mounted"===d?e:"none"}),[d]),l.useLayoutEffect((()=>{const t=n.current,r=o.current;if(r!==e){const n=s.current,i=u(t);e?f("MOUNT"):"none"===i||"none"===(null==t?void 0:t.display)?f("UNMOUNT"):f(r&&n!==i?"ANIMATION_OUT":"UNMOUNT"),o.current=e}}),[e,f]),l.useLayoutEffect((()=>{if(t){const e=e=>{const r=u(n.current).includes(e.animationName);e.target===t&&r&&a.flushSync((()=>f("ANIMATION_END")))},r=e=>{e.target===t&&(s.current=u(n.current))};return t.addEventListener("animationstart",r),t.addEventListener("animationcancel",e),t.addEventListener("animationend",e),()=>{t.removeEventListener("animationstart",r),t.removeEventListener("animationcancel",e),t.removeEventListener("animationend",e)}}f("ANIMATION_END")}),[t,f]),{isPresent:["mounted","unmountSuspended"].includes(d),ref:i.useCallback((e=>{e&&(n.current=getComputedStyle(e)),r(e)}),[])}}(t),o="function"==typeof r?r({present:n.isPresent}):i.Children.only(r),c=s.useComposedRefs(n.ref,o.ref);return"function"==typeof r||n.isPresent?i.cloneElement(o,{ref:c}):null};function u(e){return(null==e?void 0:e.animationName)||"none"}c.displayName="Presence"},62053:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(40961),a=r(56612);function s(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}s(e.exports,"Primitive",(()=>l)),s(e.exports,"Root",(()=>u)),s(e.exports,"dispatchDiscreteCustomEvent",(()=>c));const l=["a","button","div","form","h2","h3","img","input","label","li","nav","ol","p","span","svg","ul"].reduce(((e,t)=>{const r=o.forwardRef(((e,r)=>{const{asChild:i,...s}=e,l=i?a.Slot:t;return o.useEffect((()=>{window[Symbol.for("radix-ui")]=!0}),[]),o.createElement(l,((c=n)&&c.__esModule?c.default:c)({},s,{ref:r}));var c}));return r.displayName=`Primitive.${t}`,{...e,[t]:r}}),{});function c(e,t){e&&i.flushSync((()=>e.dispatchEvent(t)))}const u=l},62153:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(95791),a=r(62053);function s(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function l(e){return e&&e.__esModule?e.default:e}s(e.exports,"createProgressScope",(()=>d)),s(e.exports,"Progress",(()=>h)),s(e.exports,"ProgressIndicator",(()=>m)),s(e.exports,"Root",(()=>E)),s(e.exports,"Indicator",(()=>_));const c="Progress",[u,d]=i.createContextScope(c),[f,p]=u(c),h=o.forwardRef(((e,t)=>{const{__scopeProgress:r,value:i,max:s,getValueLabel:c=g,...u}=e,d=y(s)?s:100,p=w(i,d)?i:null,h=v(p)?c(p,d):void 0;return o.createElement(f,{scope:r,value:p,max:d},o.createElement(a.Primitive.div,l(n)({"aria-valuemax":d,"aria-valuemin":0,"aria-valuenow":v(p)?p:void 0,"aria-valuetext":h,role:"progressbar","data-state":b(p,d),"data-value":null!=p?p:void 0,"data-max":d},u,{ref:t})))}));h.propTypes={max(e,t,r){const n=e[t],o=String(n);return n&&!y(n)?new Error(function(e,t){return`Invalid prop \`max\` of value \`${e}\` supplied to \`${t}\`. Only numbers greater than 0 are valid max values. Defaulting to \`100\`.`}(o,r)):null},value(e,t,r){const n=e[t],o=String(n),i=y(e.max)?e.max:100;return null==n||w(n,i)?null:new Error(function(e,t){return`Invalid prop \`value\` of value \`${e}\` supplied to \`${t}\`. The \`value\` prop must be:\n - a positive number\n - less than the value passed to \`max\` (or 100 if no \`max\` prop is set)\n - \`null\` if the progress is indeterminate.\n\nDefaulting to \`null\`.`}(o,r))}};const m=o.forwardRef(((e,t)=>{var r;const{__scopeProgress:i,...s}=e,c=p("ProgressIndicator",i);return o.createElement(a.Primitive.div,l(n)({"data-state":b(c.value,c.max),"data-value":null!==(r=c.value)&&void 0!==r?r:void 0,"data-max":c.max},s,{ref:t}))}));function g(e,t){return`${Math.round(e/t*100)}%`}function b(e,t){return null==e?"indeterminate":e===t?"complete":"loading"}function v(e){return"number"==typeof e}function y(e){return v(e)&&!isNaN(e)&&e>0}function w(e,t){return v(e)&&!isNaN(e)&&e<=t&&e>=0}const E=h,_=m},43517:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(10207),s=r(95791),l=r(62053),c=r(56016),u=r(22971),d=r(62585),f=r(55745),p=r(88165),h=r(55575);function m(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function g(e){return e&&e.__esModule?e.default:e}m(e.exports,"createRadioGroupScope",(()=>O)),m(e.exports,"RadioGroup",(()=>P)),m(e.exports,"RadioGroupItem",(()=>D)),m(e.exports,"RadioGroupIndicator",(()=>L)),m(e.exports,"Root",(()=>F)),m(e.exports,"Item",(()=>B)),m(e.exports,"Indicator",(()=>U));const b="Radio",[v,y]=s.createContextScope(b),[w,E]=v(b),_=o.forwardRef(((e,t)=>{const{__scopeRadio:r,name:s,checked:c=!1,required:u,disabled:d,value:f="on",onCheck:p,...h}=e,[m,b]=o.useState(null),v=a.useComposedRefs(t,(e=>b(e))),y=o.useRef(!1),E=!m||Boolean(m.closest("form"));return o.createElement(w,{scope:r,checked:c,disabled:d},o.createElement(l.Primitive.button,g(n)({type:"button",role:"radio","aria-checked":c,"data-state":A(c),"data-disabled":d?"":void 0,disabled:d,value:f},h,{ref:v,onClick:i.composeEventHandlers(e.onClick,(e=>{c||null==p||p(),E&&(y.current=e.isPropagationStopped(),y.current||e.stopPropagation())}))})),E&&o.createElement(x,{control:m,bubbles:!y.current,name:s,value:f,checked:c,required:u,disabled:d,style:{transform:"translateX(-100%)"}}))})),S=o.forwardRef(((e,t)=>{const{__scopeRadio:r,forceMount:i,...a}=e,s=E("RadioIndicator",r);return o.createElement(h.Presence,{present:i||s.checked},o.createElement(l.Primitive.span,g(n)({"data-state":A(s.checked),"data-disabled":s.disabled?"":void 0},a,{ref:t})))})),x=e=>{const{control:t,checked:r,bubbles:i=!0,...a}=e,s=o.useRef(null),l=p.usePrevious(r),c=f.useSize(t);return o.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==r&&n){const t=new Event("click",{bubbles:i});n.call(e,r),e.dispatchEvent(t)}}),[l,r,i]),o.createElement("input",g(n)({type:"radio","aria-hidden":!0,defaultChecked:r},a,{tabIndex:-1,ref:s,style:{...e.style,...c,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function A(e){return e?"checked":"unchecked"}const T=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],C="RadioGroup",[k,O]=s.createContextScope(C,[c.createRovingFocusGroupScope,y]),R=c.createRovingFocusGroupScope(),N=y(),[I,M]=k(C),P=o.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,name:i,defaultValue:a,value:s,required:f=!1,disabled:p=!1,orientation:h,dir:m,loop:b=!0,onValueChange:v,...y}=e,w=R(r),E=d.useDirection(m),[_,S]=u.useControllableState({prop:s,defaultProp:a,onChange:v});return o.createElement(I,{scope:r,name:i,required:f,disabled:p,value:_,onValueChange:S},o.createElement(c.Root,g(n)({asChild:!0},w,{orientation:h,dir:E,loop:b}),o.createElement(l.Primitive.div,g(n)({role:"radiogroup","aria-required":f,"aria-orientation":h,"data-disabled":p?"":void 0,dir:E},y,{ref:t}))))})),D=o.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,disabled:s,...l}=e,u=M("RadioGroupItem",r),d=u.disabled||s,f=R(r),p=N(r),h=o.useRef(null),m=a.useComposedRefs(t,h),b=u.value===l.value,v=o.useRef(!1);return o.useEffect((()=>{const e=e=>{T.includes(e.key)&&(v.current=!0)},t=()=>v.current=!1;return document.addEventListener("keydown",e),document.addEventListener("keyup",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t)}}),[]),o.createElement(c.Item,g(n)({asChild:!0},f,{focusable:!d,active:b}),o.createElement(_,g(n)({disabled:d,required:u.required,checked:b},p,l,{name:u.name,ref:m,onCheck:()=>u.onValueChange(l.value),onKeyDown:i.composeEventHandlers((e=>{"Enter"===e.key&&e.preventDefault()})),onFocus:i.composeEventHandlers(l.onFocus,(()=>{var e;v.current&&(null===(e=h.current)||void 0===e||e.click())}))})))})),L=o.forwardRef(((e,t)=>{const{__scopeRadioGroup:r,...i}=e,a=N(r);return o.createElement(S,g(n)({},a,i,{ref:t}))})),F=P,B=D,U=L},56016:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(89656),s=r(10207),l=r(95791),c=r(6411),u=r(62053),d=r(80283),f=r(22971),p=r(62585);function h(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function m(e){return e&&e.__esModule?e.default:e}h(e.exports,"createRovingFocusGroupScope",(()=>S)),h(e.exports,"RovingFocusGroup",(()=>T)),h(e.exports,"RovingFocusGroupItem",(()=>k)),h(e.exports,"Root",(()=>N)),h(e.exports,"Item",(()=>I));const g="rovingFocusGroup.onEntryFocus",b={bubbles:!1,cancelable:!0},v="RovingFocusGroup",[y,w,E]=a.createCollection(v),[_,S]=l.createContextScope(v,[E]),[x,A]=_(v),T=o.forwardRef(((e,t)=>o.createElement(y.Provider,{scope:e.__scopeRovingFocusGroup},o.createElement(y.Slot,{scope:e.__scopeRovingFocusGroup},o.createElement(C,m(n)({},e,{ref:t})))))),C=o.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:r,orientation:a,loop:l=!1,dir:c,currentTabStopId:h,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:y,onEntryFocus:E,..._}=e,S=o.useRef(null),A=s.useComposedRefs(t,S),T=p.useDirection(c),[C=null,k]=f.useControllableState({prop:h,defaultProp:v,onChange:y}),[O,N]=o.useState(!1),I=d.useCallbackRef(E),M=w(r),P=o.useRef(!1),[D,L]=o.useState(0);return o.useEffect((()=>{const e=S.current;if(e)return e.addEventListener(g,I),()=>e.removeEventListener(g,I)}),[I]),o.createElement(x,{scope:r,orientation:a,dir:T,loop:l,currentTabStopId:C,onItemFocus:o.useCallback((e=>k(e)),[k]),onItemShiftTab:o.useCallback((()=>N(!0)),[]),onFocusableItemAdd:o.useCallback((()=>L((e=>e+1))),[]),onFocusableItemRemove:o.useCallback((()=>L((e=>e-1))),[])},o.createElement(u.Primitive.div,m(n)({tabIndex:O||0===D?-1:0,"data-orientation":a},_,{ref:A,style:{outline:"none",...e.style},onMouseDown:i.composeEventHandlers(e.onMouseDown,(()=>{P.current=!0})),onFocus:i.composeEventHandlers(e.onFocus,(e=>{const t=!P.current;if(e.target===e.currentTarget&&t&&!O){const t=new CustomEvent(g,b);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){const e=M().filter((e=>e.focusable));R([e.find((e=>e.active)),e.find((e=>e.id===C)),...e].filter(Boolean).map((e=>e.ref.current)))}}P.current=!1})),onBlur:i.composeEventHandlers(e.onBlur,(()=>N(!1)))})))})),k=o.forwardRef(((e,t)=>{const{__scopeRovingFocusGroup:r,focusable:a=!0,active:s=!1,tabStopId:l,...d}=e,f=c.useId(),p=l||f,h=A("RovingFocusGroupItem",r),g=h.currentTabStopId===p,b=w(r),{onFocusableItemAdd:v,onFocusableItemRemove:E}=h;return o.useEffect((()=>{if(a)return v(),()=>E()}),[a,v,E]),o.createElement(y.ItemSlot,{scope:r,id:p,focusable:a,active:s},o.createElement(u.Primitive.span,m(n)({tabIndex:g?0:-1,"data-orientation":h.orientation},d,{ref:t,onMouseDown:i.composeEventHandlers(e.onMouseDown,(e=>{a?h.onItemFocus(p):e.preventDefault()})),onFocus:i.composeEventHandlers(e.onFocus,(()=>h.onItemFocus(p))),onKeyDown:i.composeEventHandlers(e.onKeyDown,(e=>{if("Tab"===e.key&&e.shiftKey)return void h.onItemShiftTab();if(e.target!==e.currentTarget)return;const t=function(e,t,r){const n=function(e,t){return"rtl"!==t?e:"ArrowLeft"===e?"ArrowRight":"ArrowRight"===e?"ArrowLeft":e}(e.key,r);return"vertical"===t&&["ArrowLeft","ArrowRight"].includes(n)||"horizontal"===t&&["ArrowUp","ArrowDown"].includes(n)?void 0:O[n]}(e,h.orientation,h.dir);if(void 0!==t){e.preventDefault();let o=b().filter((e=>e.focusable)).map((e=>e.ref.current));if("last"===t)o.reverse();else if("prev"===t||"next"===t){"prev"===t&&o.reverse();const i=o.indexOf(e.currentTarget);o=h.loop?(n=i+1,(r=o).map(((e,t)=>r[(n+t)%r.length]))):o.slice(i+1)}setTimeout((()=>R(o)))}var r,n}))})))})),O={ArrowLeft:"prev",ArrowUp:"prev",ArrowRight:"next",ArrowDown:"next",PageUp:"first",Home:"first",PageDown:"last",End:"last"};function R(e){const t=document.activeElement;for(const r of e){if(r===t)return;if(r.focus(),document.activeElement!==t)return}}const N=T,I=k},8337:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(62053),a=r(55575),s=r(95791),l=r(10207),c=r(80283),u=r(62585),d=r(95696),f=r(81109),p=r(80739);function h(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function m(e){return e&&e.__esModule?e.default:e}h(e.exports,"createScrollAreaScope",(()=>v)),h(e.exports,"ScrollArea",(()=>E)),h(e.exports,"ScrollAreaViewport",(()=>_)),h(e.exports,"ScrollAreaScrollbar",(()=>x)),h(e.exports,"ScrollAreaThumb",(()=>D)),h(e.exports,"ScrollAreaCorner",(()=>B)),h(e.exports,"Root",(()=>X)),h(e.exports,"Viewport",(()=>Z)),h(e.exports,"Scrollbar",(()=>Q)),h(e.exports,"Thumb",(()=>J)),h(e.exports,"Corner",(()=>$));const g="ScrollArea",[b,v]=s.createContextScope(g),[y,w]=b(g),E=o.forwardRef(((e,t)=>{const{__scopeScrollArea:r,type:a="hover",dir:s,scrollHideDelay:c=600,...d}=e,[f,p]=o.useState(null),[h,g]=o.useState(null),[b,v]=o.useState(null),[w,E]=o.useState(null),[_,S]=o.useState(null),[x,A]=o.useState(0),[T,C]=o.useState(0),[k,O]=o.useState(!1),[R,N]=o.useState(!1),I=l.useComposedRefs(t,(e=>p(e))),M=u.useDirection(s);return o.createElement(y,{scope:r,type:a,dir:M,scrollHideDelay:c,scrollArea:f,viewport:h,onViewportChange:g,content:b,onContentChange:v,scrollbarX:w,onScrollbarXChange:E,scrollbarXEnabled:k,onScrollbarXEnabledChange:O,scrollbarY:_,onScrollbarYChange:S,scrollbarYEnabled:R,onScrollbarYEnabledChange:N,onCornerWidthChange:A,onCornerHeightChange:C},o.createElement(i.Primitive.div,m(n)({dir:M},d,{ref:I,style:{position:"relative","--radix-scroll-area-corner-width":x+"px","--radix-scroll-area-corner-height":T+"px",...e.style}})))})),_=o.forwardRef(((e,t)=>{const{__scopeScrollArea:r,children:a,...s}=e,c=w("ScrollAreaViewport",r),u=o.useRef(null),d=l.useComposedRefs(t,u,c.onViewportChange);return o.createElement(o.Fragment,null,o.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-scroll-area-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-scroll-area-viewport]::-webkit-scrollbar{display:none}"}}),o.createElement(i.Primitive.div,m(n)({"data-radix-scroll-area-viewport":""},s,{ref:d,style:{overflowX:c.scrollbarXEnabled?"scroll":"hidden",overflowY:c.scrollbarYEnabled?"scroll":"hidden",...e.style}}),o.createElement("div",{ref:c.onContentChange,style:{minWidth:"100%",display:"table"}},a)))})),S="ScrollAreaScrollbar",x=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,a=w(S,e.__scopeScrollArea),{onScrollbarXEnabledChange:s,onScrollbarYEnabledChange:l}=a,c="horizontal"===e.orientation;return o.useEffect((()=>(c?s(!0):l(!0),()=>{c?s(!1):l(!1)})),[c,s,l]),"hover"===a.type?o.createElement(A,m(n)({},i,{ref:t,forceMount:r})):"scroll"===a.type?o.createElement(T,m(n)({},i,{ref:t,forceMount:r})):"auto"===a.type?o.createElement(C,m(n)({},i,{ref:t,forceMount:r})):"always"===a.type?o.createElement(k,m(n)({},i,{ref:t})):null})),A=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=w(S,e.__scopeScrollArea),[l,c]=o.useState(!1);return o.useEffect((()=>{const e=s.scrollArea;let t=0;if(e){const r=()=>{window.clearTimeout(t),c(!0)},n=()=>{t=window.setTimeout((()=>c(!1)),s.scrollHideDelay)};return e.addEventListener("pointerenter",r),e.addEventListener("pointerleave",n),()=>{window.clearTimeout(t),e.removeEventListener("pointerenter",r),e.removeEventListener("pointerleave",n)}}}),[s.scrollArea,s.scrollHideDelay]),o.createElement(a.Presence,{present:r||l},o.createElement(C,m(n)({"data-state":l?"visible":"hidden"},i,{ref:t})))})),T=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=w(S,e.__scopeScrollArea),l="horizontal"===e.orientation,c=Y((()=>d("SCROLL_END")),100),[u,d]=("hidden",f={hidden:{SCROLL:"scrolling"},scrolling:{SCROLL_END:"idle",POINTER_ENTER:"interacting"},interacting:{SCROLL:"interacting",POINTER_LEAVE:"idle"},idle:{HIDE:"hidden",SCROLL:"scrolling",POINTER_ENTER:"interacting"}},o.useReducer(((e,t)=>{const r=f[e][t];return null!=r?r:e}),"hidden"));var f;return o.useEffect((()=>{if("idle"===u){const e=window.setTimeout((()=>d("HIDE")),s.scrollHideDelay);return()=>window.clearTimeout(e)}}),[u,s.scrollHideDelay,d]),o.useEffect((()=>{const e=s.viewport,t=l?"scrollLeft":"scrollTop";if(e){let r=e[t];const n=()=>{const n=e[t];r!==n&&(d("SCROLL"),c()),r=n};return e.addEventListener("scroll",n),()=>e.removeEventListener("scroll",n)}}),[s.viewport,l,d,c]),o.createElement(a.Presence,{present:r||"hidden"!==u},o.createElement(k,m(n)({"data-state":"hidden"===u?"hidden":"visible"},i,{ref:t,onPointerEnter:p.composeEventHandlers(e.onPointerEnter,(()=>d("POINTER_ENTER"))),onPointerLeave:p.composeEventHandlers(e.onPointerLeave,(()=>d("POINTER_LEAVE")))})))})),C=o.forwardRef(((e,t)=>{const r=w(S,e.__scopeScrollArea),{forceMount:i,...s}=e,[l,c]=o.useState(!1),u="horizontal"===e.orientation,d=Y((()=>{if(r.viewport){const e=r.viewport.offsetWidth{const{orientation:r="vertical",...i}=e,a=w(S,e.__scopeScrollArea),s=o.useRef(null),l=o.useRef(0),[c,u]=o.useState({content:0,viewport:0,scrollbar:{size:0,paddingStart:0,paddingEnd:0}}),d=z(c.viewport,c.content),f={...i,sizes:c,onSizesChange:u,hasThumb:Boolean(d>0&&d<1),onThumbChange:e=>s.current=e,onThumbPointerUp:()=>l.current=0,onThumbPointerDown:e=>l.current=e};function p(e,t){return function(e,t,r,n="ltr"){const o=H(r),i=t||o/2,a=o-i,s=r.scrollbar.paddingStart+i,l=r.scrollbar.size-r.scrollbar.paddingEnd-a,c=r.content-r.viewport;return W([s,l],"ltr"===n?[0,c]:[-1*c,0])(e)}(e,l.current,c,t)}return"horizontal"===r?o.createElement(O,m(n)({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=G(a.viewport.scrollLeft,c,a.dir);s.current.style.transform=`translate3d(${e}px, 0, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollLeft=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollLeft=p(e,a.dir))}})):"vertical"===r?o.createElement(R,m(n)({},f,{ref:t,onThumbPositionChange:()=>{if(a.viewport&&s.current){const e=G(a.viewport.scrollTop,c);s.current.style.transform=`translate3d(0, ${e}px, 0)`}},onWheelScroll:e=>{a.viewport&&(a.viewport.scrollTop=e)},onDragScroll:e=>{a.viewport&&(a.viewport.scrollTop=p(e))}})):null})),O=o.forwardRef(((e,t)=>{const{sizes:r,onSizesChange:i,...a}=e,s=w(S,e.__scopeScrollArea),[c,u]=o.useState(),d=o.useRef(null),f=l.useComposedRefs(t,d,s.onScrollbarXChange);return o.useEffect((()=>{d.current&&u(getComputedStyle(d.current))}),[d]),o.createElement(M,m(n)({"data-orientation":"horizontal"},a,{ref:f,sizes:r,style:{bottom:0,left:"rtl"===s.dir?"var(--radix-scroll-area-corner-width)":0,right:"ltr"===s.dir?"var(--radix-scroll-area-corner-width)":0,"--radix-scroll-area-thumb-width":H(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.x),onDragScroll:t=>e.onDragScroll(t.x),onWheelScroll:(t,r)=>{if(s.viewport){const n=s.viewport.scrollLeft+t.deltaX;e.onWheelScroll(n),q(n,r)&&t.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&i({content:s.viewport.scrollWidth,viewport:s.viewport.offsetWidth,scrollbar:{size:d.current.clientWidth,paddingStart:j(c.paddingLeft),paddingEnd:j(c.paddingRight)}})}}))})),R=o.forwardRef(((e,t)=>{const{sizes:r,onSizesChange:i,...a}=e,s=w(S,e.__scopeScrollArea),[c,u]=o.useState(),d=o.useRef(null),f=l.useComposedRefs(t,d,s.onScrollbarYChange);return o.useEffect((()=>{d.current&&u(getComputedStyle(d.current))}),[d]),o.createElement(M,m(n)({"data-orientation":"vertical"},a,{ref:f,sizes:r,style:{top:0,right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:"var(--radix-scroll-area-corner-height)","--radix-scroll-area-thumb-height":H(r)+"px",...e.style},onThumbPointerDown:t=>e.onThumbPointerDown(t.y),onDragScroll:t=>e.onDragScroll(t.y),onWheelScroll:(t,r)=>{if(s.viewport){const n=s.viewport.scrollTop+t.deltaY;e.onWheelScroll(n),q(n,r)&&t.preventDefault()}},onResize:()=>{d.current&&s.viewport&&c&&i({content:s.viewport.scrollHeight,viewport:s.viewport.offsetHeight,scrollbar:{size:d.current.clientHeight,paddingStart:j(c.paddingTop),paddingEnd:j(c.paddingBottom)}})}}))})),[N,I]=b(S),M=o.forwardRef(((e,t)=>{const{__scopeScrollArea:r,sizes:a,hasThumb:s,onThumbChange:u,onThumbPointerUp:d,onThumbPointerDown:f,onThumbPositionChange:h,onDragScroll:g,onWheelScroll:b,onResize:v,...y}=e,E=w(S,r),[_,x]=o.useState(null),A=l.useComposedRefs(t,(e=>x(e))),T=o.useRef(null),C=o.useRef(""),k=E.viewport,O=a.content-a.viewport,R=c.useCallbackRef(b),I=c.useCallbackRef(h),M=Y(v,10);function P(e){if(T.current){const t=e.clientX-T.current.left,r=e.clientY-T.current.top;g({x:t,y:r})}}return o.useEffect((()=>{const e=e=>{const t=e.target;(null==_?void 0:_.contains(t))&&R(e,O)};return document.addEventListener("wheel",e,{passive:!1}),()=>document.removeEventListener("wheel",e,{passive:!1})}),[k,_,O,R]),o.useEffect(I,[a,I]),K(_,M),K(E.content,M),o.createElement(N,{scope:r,scrollbar:_,hasThumb:s,onThumbChange:c.useCallbackRef(u),onThumbPointerUp:c.useCallbackRef(d),onThumbPositionChange:I,onThumbPointerDown:c.useCallbackRef(f)},o.createElement(i.Primitive.div,m(n)({},y,{ref:A,style:{position:"absolute",...y.style},onPointerDown:p.composeEventHandlers(e.onPointerDown,(e=>{0===e.button&&(e.target.setPointerCapture(e.pointerId),T.current=_.getBoundingClientRect(),C.current=document.body.style.webkitUserSelect,document.body.style.webkitUserSelect="none",E.viewport&&(E.viewport.style.scrollBehavior="auto"),P(e))})),onPointerMove:p.composeEventHandlers(e.onPointerMove,P),onPointerUp:p.composeEventHandlers(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),document.body.style.webkitUserSelect=C.current,E.viewport&&(E.viewport.style.scrollBehavior=""),T.current=null}))})))})),P="ScrollAreaThumb",D=o.forwardRef(((e,t)=>{const{forceMount:r,...i}=e,s=I(P,e.__scopeScrollArea);return o.createElement(a.Presence,{present:r||s.hasThumb},o.createElement(L,m(n)({ref:t},i)))})),L=o.forwardRef(((e,t)=>{const{__scopeScrollArea:r,style:a,...s}=e,c=w(P,r),u=I(P,r),{onThumbPositionChange:d}=u,f=l.useComposedRefs(t,(e=>u.onThumbChange(e))),h=o.useRef(),g=Y((()=>{h.current&&(h.current(),h.current=void 0)}),100);return o.useEffect((()=>{const e=c.viewport;if(e){const t=()=>{if(g(),!h.current){const t=V(e,d);h.current=t,d()}};return d(),e.addEventListener("scroll",t),()=>e.removeEventListener("scroll",t)}}),[c.viewport,g,d]),o.createElement(i.Primitive.div,m(n)({"data-state":u.hasThumb?"visible":"hidden"},s,{ref:f,style:{width:"var(--radix-scroll-area-thumb-width)",height:"var(--radix-scroll-area-thumb-height)",...a},onPointerDownCapture:p.composeEventHandlers(e.onPointerDownCapture,(e=>{const t=e.target.getBoundingClientRect(),r=e.clientX-t.left,n=e.clientY-t.top;u.onThumbPointerDown({x:r,y:n})})),onPointerUp:p.composeEventHandlers(e.onPointerUp,u.onThumbPointerUp)}))})),F="ScrollAreaCorner",B=o.forwardRef(((e,t)=>{const r=w(F,e.__scopeScrollArea),i=Boolean(r.scrollbarX&&r.scrollbarY);return"scroll"!==r.type&&i?o.createElement(U,m(n)({},e,{ref:t})):null})),U=o.forwardRef(((e,t)=>{const{__scopeScrollArea:r,...a}=e,s=w(F,r),[l,c]=o.useState(0),[u,d]=o.useState(0),f=Boolean(l&&u);return K(s.scrollbarX,(()=>{var e;const t=(null===(e=s.scrollbarX)||void 0===e?void 0:e.offsetHeight)||0;s.onCornerHeightChange(t),d(t)})),K(s.scrollbarY,(()=>{var e;const t=(null===(e=s.scrollbarY)||void 0===e?void 0:e.offsetWidth)||0;s.onCornerWidthChange(t),c(t)})),f?o.createElement(i.Primitive.div,m(n)({},a,{ref:t,style:{width:l,height:u,position:"absolute",right:"ltr"===s.dir?0:void 0,left:"rtl"===s.dir?0:void 0,bottom:0,...e.style}})):null}));function j(e){return e?parseInt(e,10):0}function z(e,t){const r=e/t;return isNaN(r)?0:r}function H(e){const t=z(e.viewport,e.content),r=e.scrollbar.paddingStart+e.scrollbar.paddingEnd,n=(e.scrollbar.size-r)*t;return Math.max(n,18)}function G(e,t,r="ltr"){const n=H(t),o=t.scrollbar.paddingStart+t.scrollbar.paddingEnd,i=t.scrollbar.size-o,a=t.content-t.viewport,s=i-n,l="ltr"===r?[0,a]:[-1*a,0],c=f.clamp(e,l);return W([0,a],[0,s])(c)}function W(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}function q(e,t){return e>0&&e{}))=>{let r={left:e.scrollLeft,top:e.scrollTop},n=0;return function o(){const i={left:e.scrollLeft,top:e.scrollTop},a=r.left!==i.left,s=r.top!==i.top;(a||s)&&t(),r=i,n=window.requestAnimationFrame(o)}(),()=>window.cancelAnimationFrame(n)};function Y(e,t){const r=c.useCallbackRef(e),n=o.useRef(0);return o.useEffect((()=>()=>window.clearTimeout(n.current)),[]),o.useCallback((()=>{window.clearTimeout(n.current),n.current=window.setTimeout(r,t)}),[r,t])}function K(e,t){const r=c.useCallbackRef(t);d.useLayoutEffect((()=>{let t=0;if(e){const n=new ResizeObserver((()=>{cancelAnimationFrame(t),t=window.requestAnimationFrame(r)}));return n.observe(e),()=>{window.cancelAnimationFrame(t),n.unobserve(e)}}}),[e,r])}const X=E,Z=_,Q=x,J=D,$=B},96960:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(40961),a=r(81109),s=r(80739),l=r(89656),c=r(10207),u=r(95791),d=r(62585),f=r(71572),p=r(21983),h=r(33567),m=r(6411),g=r(92264),b=r(50172),v=r(62053),y=r(56612),w=r(80283),E=r(22971),_=r(95696),S=r(88165),x=r(41068),A=r(58241),T=r(25816);function C(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function k(e){return e&&e.__esModule?e.default:e}C(e.exports,"createSelectScope",(()=>L)),C(e.exports,"Select",(()=>H)),C(e.exports,"SelectTrigger",(()=>G)),C(e.exports,"SelectValue",(()=>W)),C(e.exports,"SelectIcon",(()=>q)),C(e.exports,"SelectPortal",(()=>V)),C(e.exports,"SelectContent",(()=>K)),C(e.exports,"SelectViewport",(()=>oe)),C(e.exports,"SelectGroup",(()=>se)),C(e.exports,"SelectLabel",(()=>le)),C(e.exports,"SelectItem",(()=>fe)),C(e.exports,"SelectItemText",(()=>he)),C(e.exports,"SelectItemIndicator",(()=>me)),C(e.exports,"SelectScrollUpButton",(()=>be)),C(e.exports,"SelectScrollDownButton",(()=>ye)),C(e.exports,"SelectSeparator",(()=>Ee)),C(e.exports,"SelectArrow",(()=>Se)),C(e.exports,"Root",(()=>Ce)),C(e.exports,"Trigger",(()=>ke)),C(e.exports,"Value",(()=>Oe)),C(e.exports,"Icon",(()=>Re)),C(e.exports,"Portal",(()=>Ne)),C(e.exports,"Content",(()=>Ie)),C(e.exports,"Viewport",(()=>Me)),C(e.exports,"Group",(()=>Pe)),C(e.exports,"Label",(()=>De)),C(e.exports,"Item",(()=>Le)),C(e.exports,"ItemText",(()=>Fe)),C(e.exports,"ItemIndicator",(()=>Be)),C(e.exports,"ScrollUpButton",(()=>Ue)),C(e.exports,"ScrollDownButton",(()=>je)),C(e.exports,"Separator",(()=>ze)),C(e.exports,"Arrow",(()=>He));const O=[" ","Enter","ArrowUp","ArrowDown"],R=[" ","Enter"],N="Select",[I,M,P]=l.createCollection(N),[D,L]=u.createContextScope(N,[P,g.createPopperScope]),F=g.createPopperScope(),[B,U]=D(N),[j,z]=D(N),H=e=>{const{__scopeSelect:t,children:r,open:n,defaultOpen:i,onOpenChange:a,value:s,defaultValue:l,onValueChange:c,dir:u,name:f,autoComplete:p,disabled:h,required:b}=e,v=F(t),[y,w]=o.useState(null),[_,S]=o.useState(null),[x,A]=o.useState(!1),T=d.useDirection(u),[C=!1,k]=E.useControllableState({prop:n,defaultProp:i,onChange:a}),[O,R]=E.useControllableState({prop:s,defaultProp:l,onChange:c}),N=o.useRef(null),M=!y||Boolean(y.closest("form")),[P,D]=o.useState(new Set),L=Array.from(P).map((e=>e.props.value)).join(";");return o.createElement(g.Root,v,o.createElement(B,{required:b,scope:t,trigger:y,onTriggerChange:w,valueNode:_,onValueNodeChange:S,valueNodeHasChildren:x,onValueNodeHasChildrenChange:A,contentId:m.useId(),value:O,onValueChange:R,open:C,onOpenChange:k,dir:T,triggerPointerDownPosRef:N,disabled:h},o.createElement(I.Provider,{scope:t},o.createElement(j,{scope:e.__scopeSelect,onNativeOptionAdd:o.useCallback((e=>{D((t=>new Set(t).add(e)))}),[]),onNativeOptionRemove:o.useCallback((e=>{D((t=>{const r=new Set(t);return r.delete(e),r}))}),[])},r)),M?o.createElement(xe,{key:L,"aria-hidden":!0,required:b,tabIndex:-1,name:f,autoComplete:p,value:O,onChange:e=>R(e.target.value),disabled:h},void 0===O?o.createElement("option",{value:""}):null,Array.from(P)):null))},G=o.forwardRef(((e,t)=>{const{__scopeSelect:r,disabled:i=!1,...a}=e,l=F(r),u=U("SelectTrigger",r),d=u.disabled||i,f=c.useComposedRefs(t,u.onTriggerChange),p=M(r),[h,m,b]=Ae((e=>{const t=p().filter((e=>!e.disabled)),r=t.find((e=>e.value===u.value)),n=Te(t,e,r);void 0!==n&&u.onValueChange(n.value)})),y=()=>{d||(u.onOpenChange(!0),b())};return o.createElement(g.Anchor,k(n)({asChild:!0},l),o.createElement(v.Primitive.button,k(n)({type:"button",role:"combobox","aria-controls":u.contentId,"aria-expanded":u.open,"aria-required":u.required,"aria-autocomplete":"none",dir:u.dir,"data-state":u.open?"open":"closed",disabled:d,"data-disabled":d?"":void 0,"data-placeholder":void 0===u.value?"":void 0},a,{ref:f,onClick:s.composeEventHandlers(a.onClick,(e=>{e.currentTarget.focus()})),onPointerDown:s.composeEventHandlers(a.onPointerDown,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&t.releasePointerCapture(e.pointerId),0===e.button&&!1===e.ctrlKey&&(y(),u.triggerPointerDownPosRef.current={x:Math.round(e.pageX),y:Math.round(e.pageY)},e.preventDefault())})),onKeyDown:s.composeEventHandlers(a.onKeyDown,(e=>{const t=""!==h.current;e.ctrlKey||e.altKey||e.metaKey||1!==e.key.length||m(e.key),t&&" "===e.key||O.includes(e.key)&&(y(),e.preventDefault())}))})))})),W=o.forwardRef(((e,t)=>{const{__scopeSelect:r,className:i,style:a,children:s,placeholder:l,...u}=e,d=U("SelectValue",r),{onValueNodeHasChildrenChange:f}=d,p=void 0!==s,h=c.useComposedRefs(t,d.onValueNodeChange);return _.useLayoutEffect((()=>{f(p)}),[f,p]),o.createElement(v.Primitive.span,k(n)({},u,{ref:h,style:{pointerEvents:"none"}}),void 0===d.value&&void 0!==l?l:s)})),q=o.forwardRef(((e,t)=>{const{__scopeSelect:r,children:i,...a}=e;return o.createElement(v.Primitive.span,k(n)({"aria-hidden":!0},a,{ref:t}),i||"▼")})),V=e=>o.createElement(b.Portal,k(n)({asChild:!0},e)),Y="SelectContent",K=o.forwardRef(((e,t)=>{const r=U(Y,e.__scopeSelect),[a,s]=o.useState();if(_.useLayoutEffect((()=>{s(new DocumentFragment)}),[]),!r.open){const t=a;return t?i.createPortal(o.createElement(Z,{scope:e.__scopeSelect},o.createElement(I.Slot,{scope:e.__scopeSelect},o.createElement("div",null,e.children))),t):null}return o.createElement(J,k(n)({},e,{ref:t}))})),X=10,[Z,Q]=D(Y),J=o.forwardRef(((e,t)=>{const{__scopeSelect:r,position:i="item-aligned",onCloseAutoFocus:a,onEscapeKeyDown:l,onPointerDownOutside:u,side:d,sideOffset:m,align:g,alignOffset:b,arrowPadding:v,collisionBoundary:w,collisionPadding:E,sticky:_,hideWhenDetached:S,avoidCollisions:x,...C}=e,O=U(Y,r),[R,N]=o.useState(null),[I,P]=o.useState(null),D=c.useComposedRefs(t,(e=>N(e))),[L,F]=o.useState(null),[B,j]=o.useState(null),z=M(r),[H,G]=o.useState(!1),W=o.useRef(!1);o.useEffect((()=>{if(R)return A.hideOthers(R)}),[R]),p.useFocusGuards();const q=o.useCallback((e=>{const[t,...r]=z().map((e=>e.ref.current)),[n]=r.slice(-1),o=document.activeElement;for(const r of e){if(r===o)return;if(null==r||r.scrollIntoView({block:"nearest"}),r===t&&I&&(I.scrollTop=0),r===n&&I&&(I.scrollTop=I.scrollHeight),null==r||r.focus(),document.activeElement!==o)return}}),[z,I]),V=o.useCallback((()=>q([L,R])),[q,L,R]);o.useEffect((()=>{H&&V()}),[H,V]);const{onOpenChange:K,triggerPointerDownPosRef:X}=O;o.useEffect((()=>{if(R){let e={x:0,y:0};const t=t=>{var r,n,o,i;e={x:Math.abs(Math.round(t.pageX)-(null!==(r=null===(n=X.current)||void 0===n?void 0:n.x)&&void 0!==r?r:0)),y:Math.abs(Math.round(t.pageY)-(null!==(o=null===(i=X.current)||void 0===i?void 0:i.y)&&void 0!==o?o:0))}},r=r=>{e.x<=10&&e.y<=10?r.preventDefault():R.contains(r.target)||K(!1),document.removeEventListener("pointermove",t),X.current=null};return null!==X.current&&(document.addEventListener("pointermove",t),document.addEventListener("pointerup",r,{capture:!0,once:!0})),()=>{document.removeEventListener("pointermove",t),document.removeEventListener("pointerup",r,{capture:!0})}}}),[R,K,X]),o.useEffect((()=>{const e=()=>K(!1);return window.addEventListener("blur",e),window.addEventListener("resize",e),()=>{window.removeEventListener("blur",e),window.removeEventListener("resize",e)}}),[K]);const[Q,J]=Ae((e=>{const t=z().filter((e=>!e.disabled)),r=t.find((e=>e.ref.current===document.activeElement)),n=Te(t,e,r);n&&setTimeout((()=>n.ref.current.focus()))})),te=o.useCallback(((e,t,r)=>{const n=!W.current&&!r;(void 0!==O.value&&O.value===t||n)&&(F(e),n&&(W.current=!0))}),[O.value]),re=o.useCallback((()=>null==R?void 0:R.focus()),[R]),ne=o.useCallback(((e,t,r)=>{const n=!W.current&&!r;(void 0!==O.value&&O.value===t||n)&&j(e)}),[O.value]),oe="popper"===i?ee:$,ie=oe===ee?{side:d,sideOffset:m,align:g,alignOffset:b,arrowPadding:v,collisionBoundary:w,collisionPadding:E,sticky:_,hideWhenDetached:S,avoidCollisions:x}:{};return o.createElement(Z,{scope:r,content:R,viewport:I,onViewportChange:P,itemRefCallback:te,selectedItem:L,onItemLeave:re,itemTextRefCallback:ne,focusSelectedItem:V,selectedItemText:B,position:i,isPositioned:H,searchRef:Q},o.createElement(T.RemoveScroll,{as:y.Slot,allowPinchZoom:!0},o.createElement(h.FocusScope,{asChild:!0,trapped:O.open,onMountAutoFocus:e=>{e.preventDefault()},onUnmountAutoFocus:s.composeEventHandlers(a,(e=>{var t;null===(t=O.trigger)||void 0===t||t.focus({preventScroll:!0}),e.preventDefault()}))},o.createElement(f.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!0,onEscapeKeyDown:l,onPointerDownOutside:u,onFocusOutside:e=>e.preventDefault(),onDismiss:()=>O.onOpenChange(!1)},o.createElement(oe,k(n)({role:"listbox",id:O.contentId,"data-state":O.open?"open":"closed",dir:O.dir,onContextMenu:e=>e.preventDefault()},C,ie,{onPlaced:()=>G(!0),ref:D,style:{display:"flex",flexDirection:"column",outline:"none",...C.style},onKeyDown:s.composeEventHandlers(C.onKeyDown,(e=>{const t=e.ctrlKey||e.altKey||e.metaKey;if("Tab"===e.key&&e.preventDefault(),t||1!==e.key.length||J(e.key),["ArrowUp","ArrowDown","Home","End"].includes(e.key)){let t=z().filter((e=>!e.disabled)).map((e=>e.ref.current));if(["ArrowUp","End"].includes(e.key)&&(t=t.slice().reverse()),["ArrowUp","ArrowDown"].includes(e.key)){const r=e.target,n=t.indexOf(r);t=t.slice(n+1)}setTimeout((()=>q(t))),e.preventDefault()}}))}))))))})),$=o.forwardRef(((e,t)=>{const{__scopeSelect:r,onPlaced:i,...s}=e,l=U(Y,r),u=Q(Y,r),[d,f]=o.useState(null),[p,h]=o.useState(null),m=c.useComposedRefs(t,(e=>h(e))),g=M(r),b=o.useRef(!1),y=o.useRef(!0),{viewport:w,selectedItem:E,selectedItemText:S,focusSelectedItem:x}=u,A=o.useCallback((()=>{if(l.trigger&&l.valueNode&&d&&p&&w&&E&&S){const e=l.trigger.getBoundingClientRect(),t=p.getBoundingClientRect(),r=l.valueNode.getBoundingClientRect(),n=S.getBoundingClientRect();if("rtl"!==l.dir){const o=n.left-t.left,i=r.left-o,s=e.left-i,l=e.width+s,c=Math.max(l,t.width),u=window.innerWidth-X,f=a.clamp(i,[X,u-c]);d.style.minWidth=l+"px",d.style.left=f+"px"}else{const o=t.right-n.right,i=window.innerWidth-r.right-o,s=window.innerWidth-e.right-i,l=e.width+s,c=Math.max(l,t.width),u=window.innerWidth-X,f=a.clamp(i,[X,u-c]);d.style.minWidth=l+"px",d.style.right=f+"px"}const o=g(),s=window.innerHeight-2*X,c=w.scrollHeight,u=window.getComputedStyle(p),f=parseInt(u.borderTopWidth,10),h=parseInt(u.paddingTop,10),m=parseInt(u.borderBottomWidth,10),v=f+h+c+parseInt(u.paddingBottom,10)+m,y=Math.min(5*E.offsetHeight,v),_=window.getComputedStyle(w),x=parseInt(_.paddingTop,10),A=parseInt(_.paddingBottom,10),T=e.top+e.height/2-X,C=s-T,k=E.offsetHeight/2,O=f+h+(E.offsetTop+k),R=v-O;if(O<=T){const e=E===o[o.length-1].ref.current;d.style.bottom="0px";const t=p.clientHeight-w.offsetTop-w.offsetHeight,r=O+Math.max(C,k+(e?A:0)+t+m);d.style.height=r+"px"}else{const e=E===o[0].ref.current;d.style.top="0px";const t=Math.max(T,f+w.offsetTop+(e?x:0)+k)+R;d.style.height=t+"px",w.scrollTop=O-T+w.offsetTop}d.style.margin=`${X}px 0`,d.style.minHeight=y+"px",d.style.maxHeight=s+"px",null==i||i(),requestAnimationFrame((()=>b.current=!0))}}),[g,l.trigger,l.valueNode,d,p,w,E,S,l.dir,i]);_.useLayoutEffect((()=>A()),[A]);const[T,C]=o.useState();_.useLayoutEffect((()=>{p&&C(window.getComputedStyle(p).zIndex)}),[p]);const O=o.useCallback((e=>{e&&!0===y.current&&(A(),null==x||x(),y.current=!1)}),[A,x]);return o.createElement(te,{scope:r,contentWrapper:d,shouldExpandOnScrollRef:b,onScrollButtonChange:O},o.createElement("div",{ref:f,style:{display:"flex",flexDirection:"column",position:"fixed",zIndex:T}},o.createElement(v.Primitive.div,k(n)({},s,{ref:m,style:{boxSizing:"border-box",maxHeight:"100%",...s.style}}))))})),ee=o.forwardRef(((e,t)=>{const{__scopeSelect:r,align:i="start",collisionPadding:a=X,...s}=e,l=F(r);return o.createElement(g.Content,k(n)({},l,s,{ref:t,align:i,collisionPadding:a,style:{boxSizing:"border-box",...s.style,"--radix-select-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-select-content-available-width":"var(--radix-popper-available-width)","--radix-select-content-available-height":"var(--radix-popper-available-height)","--radix-select-trigger-width":"var(--radix-popper-anchor-width)","--radix-select-trigger-height":"var(--radix-popper-anchor-height)"}}))})),[te,re]=D(Y,{}),ne="SelectViewport",oe=o.forwardRef(((e,t)=>{const{__scopeSelect:r,...i}=e,a=Q(ne,r),l=re(ne,r),u=c.useComposedRefs(t,a.onViewportChange),d=o.useRef(0);return o.createElement(o.Fragment,null,o.createElement("style",{dangerouslySetInnerHTML:{__html:"[data-radix-select-viewport]{scrollbar-width:none;-ms-overflow-style:none;-webkit-overflow-scrolling:touch;}[data-radix-select-viewport]::-webkit-scrollbar{display:none}"}}),o.createElement(I.Slot,{scope:r},o.createElement(v.Primitive.div,k(n)({"data-radix-select-viewport":"",role:"presentation"},i,{ref:u,style:{position:"relative",flex:1,overflow:"auto",...i.style},onScroll:s.composeEventHandlers(i.onScroll,(e=>{const t=e.currentTarget,{contentWrapper:r,shouldExpandOnScrollRef:n}=l;if(null!=n&&n.current&&r){const e=Math.abs(d.current-t.scrollTop);if(e>0){const n=window.innerHeight-2*X,o=parseFloat(r.style.minHeight),i=parseFloat(r.style.height),a=Math.max(o,i);if(a0?s:0,r.style.justifyContent="flex-end")}}}d.current=t.scrollTop}))}))))})),[ie,ae]=D("SelectGroup"),se=o.forwardRef(((e,t)=>{const{__scopeSelect:r,...i}=e,a=m.useId();return o.createElement(ie,{scope:r,id:a},o.createElement(v.Primitive.div,k(n)({role:"group","aria-labelledby":a},i,{ref:t})))})),le=o.forwardRef(((e,t)=>{const{__scopeSelect:r,...i}=e,a=ae("SelectLabel",r);return o.createElement(v.Primitive.div,k(n)({id:a.id},i,{ref:t}))})),ce="SelectItem",[ue,de]=D(ce),fe=o.forwardRef(((e,t)=>{const{__scopeSelect:r,value:i,disabled:a=!1,textValue:l,...u}=e,d=U(ce,r),f=Q(ce,r),p=d.value===i,[h,g]=o.useState(null!=l?l:""),[b,y]=o.useState(!1),w=c.useComposedRefs(t,(e=>{var t;return null===(t=f.itemRefCallback)||void 0===t?void 0:t.call(f,e,i,a)})),E=m.useId(),_=()=>{a||(d.onValueChange(i),d.onOpenChange(!1))};return o.createElement(ue,{scope:r,value:i,disabled:a,textId:E,isSelected:p,onItemTextChange:o.useCallback((e=>{g((t=>{var r;return t||(null!==(r=null==e?void 0:e.textContent)&&void 0!==r?r:"").trim()}))}),[])},o.createElement(I.ItemSlot,{scope:r,value:i,disabled:a,textValue:h},o.createElement(v.Primitive.div,k(n)({role:"option","aria-labelledby":E,"data-highlighted":b?"":void 0,"aria-selected":p&&b,"data-state":p?"checked":"unchecked","aria-disabled":a||void 0,"data-disabled":a?"":void 0,tabIndex:a?void 0:-1},u,{ref:w,onFocus:s.composeEventHandlers(u.onFocus,(()=>y(!0))),onBlur:s.composeEventHandlers(u.onBlur,(()=>y(!1))),onPointerUp:s.composeEventHandlers(u.onPointerUp,_),onPointerMove:s.composeEventHandlers(u.onPointerMove,(e=>{var t;a?null===(t=f.onItemLeave)||void 0===t||t.call(f):e.currentTarget.focus({preventScroll:!0})})),onPointerLeave:s.composeEventHandlers(u.onPointerLeave,(e=>{var t;e.currentTarget===document.activeElement&&(null===(t=f.onItemLeave)||void 0===t||t.call(f))})),onKeyDown:s.composeEventHandlers(u.onKeyDown,(e=>{var t;""!==(null===(t=f.searchRef)||void 0===t?void 0:t.current)&&" "===e.key||(R.includes(e.key)&&_()," "===e.key&&e.preventDefault())}))}))))})),pe="SelectItemText",he=o.forwardRef(((e,t)=>{const{__scopeSelect:r,className:a,style:s,...l}=e,u=U(pe,r),d=Q(pe,r),f=de(pe,r),p=z(pe,r),[h,m]=o.useState(null),g=c.useComposedRefs(t,(e=>m(e)),f.onItemTextChange,(e=>{var t;return null===(t=d.itemTextRefCallback)||void 0===t?void 0:t.call(d,e,f.value,f.disabled)})),b=null==h?void 0:h.textContent,y=o.useMemo((()=>o.createElement("option",{key:f.value,value:f.value,disabled:f.disabled},b)),[f.disabled,f.value,b]),{onNativeOptionAdd:w,onNativeOptionRemove:E}=p;return _.useLayoutEffect((()=>(w(y),()=>E(y))),[w,E,y]),o.createElement(o.Fragment,null,o.createElement(v.Primitive.span,k(n)({id:f.textId},l,{ref:g})),f.isSelected&&u.valueNode&&!u.valueNodeHasChildren?i.createPortal(l.children,u.valueNode):null)})),me=o.forwardRef(((e,t)=>{const{__scopeSelect:r,...i}=e;return de("SelectItemIndicator",r).isSelected?o.createElement(v.Primitive.span,k(n)({"aria-hidden":!0},i,{ref:t})):null})),ge="SelectScrollUpButton",be=o.forwardRef(((e,t)=>{const r=Q(ge,e.__scopeSelect),i=re(ge,e.__scopeSelect),[a,s]=o.useState(!1),l=c.useComposedRefs(t,i.onScrollButtonChange);return _.useLayoutEffect((()=>{if(r.viewport&&r.isPositioned){const t=r.viewport;function e(){const e=t.scrollTop>0;s(e)}return e(),t.addEventListener("scroll",e),()=>t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?o.createElement(we,k(n)({},e,{ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop-t.offsetHeight)}})):null})),ve="SelectScrollDownButton",ye=o.forwardRef(((e,t)=>{const r=Q(ve,e.__scopeSelect),i=re(ve,e.__scopeSelect),[a,s]=o.useState(!1),l=c.useComposedRefs(t,i.onScrollButtonChange);return _.useLayoutEffect((()=>{if(r.viewport&&r.isPositioned){const t=r.viewport;function e(){const e=t.scrollHeight-t.clientHeight,r=Math.ceil(t.scrollTop)t.removeEventListener("scroll",e)}}),[r.viewport,r.isPositioned]),a?o.createElement(we,k(n)({},e,{ref:l,onAutoScroll:()=>{const{viewport:e,selectedItem:t}=r;e&&t&&(e.scrollTop=e.scrollTop+t.offsetHeight)}})):null})),we=o.forwardRef(((e,t)=>{const{__scopeSelect:r,onAutoScroll:i,...a}=e,l=Q("SelectScrollButton",r),c=o.useRef(null),u=M(r),d=o.useCallback((()=>{null!==c.current&&(window.clearInterval(c.current),c.current=null)}),[]);return o.useEffect((()=>()=>d()),[d]),_.useLayoutEffect((()=>{var e;const t=u().find((e=>e.ref.current===document.activeElement));null==t||null===(e=t.ref.current)||void 0===e||e.scrollIntoView({block:"nearest"})}),[u]),o.createElement(v.Primitive.div,k(n)({"aria-hidden":!0},a,{ref:t,style:{flexShrink:0,...a.style},onPointerDown:s.composeEventHandlers(a.onPointerDown,(()=>{null===c.current&&(c.current=window.setInterval(i,50))})),onPointerMove:s.composeEventHandlers(a.onPointerMove,(()=>{var e;null===(e=l.onItemLeave)||void 0===e||e.call(l),null===c.current&&(c.current=window.setInterval(i,50))})),onPointerLeave:s.composeEventHandlers(a.onPointerLeave,(()=>{d()}))}))})),Ee=o.forwardRef(((e,t)=>{const{__scopeSelect:r,...i}=e;return o.createElement(v.Primitive.div,k(n)({"aria-hidden":!0},i,{ref:t}))})),_e="SelectArrow",Se=o.forwardRef(((e,t)=>{const{__scopeSelect:r,...i}=e,a=F(r),s=U(_e,r),l=Q(_e,r);return s.open&&"popper"===l.position?o.createElement(g.Arrow,k(n)({},a,i,{ref:t})):null})),xe=o.forwardRef(((e,t)=>{const{value:r,...i}=e,a=o.useRef(null),s=c.useComposedRefs(t,a),l=S.usePrevious(r);return o.useEffect((()=>{const e=a.current,t=window.HTMLSelectElement.prototype,n=Object.getOwnPropertyDescriptor(t,"value").set;if(l!==r&&n){const t=new Event("change",{bubbles:!0});n.call(e,r),e.dispatchEvent(t)}}),[l,r]),o.createElement(x.VisuallyHidden,{asChild:!0},o.createElement("select",k(n)({},i,{ref:s,defaultValue:r})))}));function Ae(e){const t=w.useCallbackRef(e),r=o.useRef(""),n=o.useRef(0),i=o.useCallback((e=>{const o=r.current+e;t(o),function e(t){r.current=t,window.clearTimeout(n.current),""!==t&&(n.current=window.setTimeout((()=>e("")),1e3))}(o)}),[t]),a=o.useCallback((()=>{r.current="",window.clearTimeout(n.current)}),[]);return o.useEffect((()=>()=>window.clearTimeout(n.current)),[]),[r,i,a]}function Te(e,t,r){const n=t.length>1&&Array.from(t).every((e=>e===t[0]))?t[0]:t,o=r?e.indexOf(r):-1;let i=(a=e,s=Math.max(o,0),a.map(((e,t)=>a[(s+t)%a.length])));var a,s;1===n.length&&(i=i.filter((e=>e!==r)));const l=i.find((e=>e.textValue.toLowerCase().startsWith(n.toLowerCase())));return l!==r?l:void 0}xe.displayName="BubbleSelect";const Ce=H,ke=G,Oe=W,Re=q,Ne=V,Ie=K,Me=oe,Pe=se,De=le,Le=fe,Fe=he,Be=me,Ue=be,je=ye,ze=Ee,He=Se},71572:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(62053),s=r(10207),l=r(80283),c=r(32905);function u(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function d(e){return e&&e.__esModule?e.default:e}u(e.exports,"DismissableLayer",(()=>m)),u(e.exports,"DismissableLayerBranch",(()=>g)),u(e.exports,"Root",(()=>y)),u(e.exports,"Branch",(()=>w));const f="dismissableLayer.update";let p;const h=o.createContext({layers:new Set,layersWithOutsidePointerEventsDisabled:new Set,branches:new Set}),m=o.forwardRef(((e,t)=>{var r;const{disableOutsidePointerEvents:u=!1,onEscapeKeyDown:m,onPointerDownOutside:g,onFocusOutside:y,onInteractOutside:w,onDismiss:E,..._}=e,S=o.useContext(h),[x,A]=o.useState(null),T=null!==(r=null==x?void 0:x.ownerDocument)&&void 0!==r?r:null===globalThis||void 0===globalThis?void 0:globalThis.document,[,C]=o.useState({}),k=s.useComposedRefs(t,(e=>A(e))),O=Array.from(S.layers),[R]=[...S.layersWithOutsidePointerEventsDisabled].slice(-1),N=O.indexOf(R),I=x?O.indexOf(x):-1,M=S.layersWithOutsidePointerEventsDisabled.size>0,P=I>=N,D=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=l.useCallbackRef(e),n=o.useRef(!1),i=o.useRef((()=>{}));return o.useEffect((()=>{const e=e=>{if(e.target&&!n.current){const a={originalEvent:e};function o(){v("dismissableLayer.pointerDownOutside",r,a,{discrete:!0})}"touch"===e.pointerType?(t.removeEventListener("click",i.current),i.current=o,t.addEventListener("click",i.current,{once:!0})):o()}n.current=!1},o=window.setTimeout((()=>{t.addEventListener("pointerdown",e)}),0);return()=>{window.clearTimeout(o),t.removeEventListener("pointerdown",e),t.removeEventListener("click",i.current)}}),[t,r]),{onPointerDownCapture:()=>n.current=!0}}((e=>{const t=e.target,r=[...S.branches].some((e=>e.contains(t)));P&&!r&&(null==g||g(e),null==w||w(e),e.defaultPrevented||null==E||E())}),T),L=function(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=l.useCallbackRef(e),n=o.useRef(!1);return o.useEffect((()=>{const e=e=>{e.target&&!n.current&&v("dismissableLayer.focusOutside",r,{originalEvent:e},{discrete:!1})};return t.addEventListener("focusin",e),()=>t.removeEventListener("focusin",e)}),[t,r]),{onFocusCapture:()=>n.current=!0,onBlurCapture:()=>n.current=!1}}((e=>{const t=e.target;[...S.branches].some((e=>e.contains(t)))||(null==y||y(e),null==w||w(e),e.defaultPrevented||null==E||E())}),T);return c.useEscapeKeydown((e=>{I===S.layers.size-1&&(null==m||m(e),!e.defaultPrevented&&E&&(e.preventDefault(),E()))}),T),o.useEffect((()=>{if(x)return u&&(0===S.layersWithOutsidePointerEventsDisabled.size&&(p=T.body.style.pointerEvents,T.body.style.pointerEvents="none"),S.layersWithOutsidePointerEventsDisabled.add(x)),S.layers.add(x),b(),()=>{u&&1===S.layersWithOutsidePointerEventsDisabled.size&&(T.body.style.pointerEvents=p)}}),[x,T,u,S]),o.useEffect((()=>()=>{x&&(S.layers.delete(x),S.layersWithOutsidePointerEventsDisabled.delete(x),b())}),[x,S]),o.useEffect((()=>{const e=()=>C({});return document.addEventListener(f,e),()=>document.removeEventListener(f,e)}),[]),o.createElement(a.Primitive.div,d(n)({},_,{ref:k,style:{pointerEvents:M?P?"auto":"none":void 0,...e.style},onFocusCapture:i.composeEventHandlers(e.onFocusCapture,L.onFocusCapture),onBlurCapture:i.composeEventHandlers(e.onBlurCapture,L.onBlurCapture),onPointerDownCapture:i.composeEventHandlers(e.onPointerDownCapture,D.onPointerDownCapture)}))})),g=o.forwardRef(((e,t)=>{const r=o.useContext(h),i=o.useRef(null),l=s.useComposedRefs(t,i);return o.useEffect((()=>{const e=i.current;if(e)return r.branches.add(e),()=>{r.branches.delete(e)}}),[r.branches]),o.createElement(a.Primitive.div,d(n)({},e,{ref:l}))}));function b(){const e=new CustomEvent(f);document.dispatchEvent(e)}function v(e,t,r,{discrete:n}){const o=r.originalEvent.target,i=new CustomEvent(e,{bubbles:!1,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?a.dispatchDiscreteCustomEvent(o,i):o.dispatchEvent(i)}const y=m,w=g},33567:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(10207),a=r(62053),s=r(80283);function l(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}l(e.exports,"FocusScope",(()=>f)),l(e.exports,"Root",(()=>y));const c="focusScope.autoFocusOnMount",u="focusScope.autoFocusOnUnmount",d={bubbles:!1,cancelable:!0},f=o.forwardRef(((e,t)=>{const{loop:r=!1,trapped:l=!1,onMountAutoFocus:f,onUnmountAutoFocus:m,...v}=e,[y,w]=o.useState(null),E=s.useCallbackRef(f),_=s.useCallbackRef(m),S=o.useRef(null),x=i.useComposedRefs(t,(e=>w(e))),A=o.useRef({paused:!1,pause(){this.paused=!0},resume(){this.paused=!1}}).current;o.useEffect((()=>{if(l){function e(e){if(A.paused||!y)return;const t=e.target;y.contains(t)?S.current=t:g(S.current,{select:!0})}function t(e){if(A.paused||!y)return;const t=e.relatedTarget;null!==t&&(y.contains(t)||g(S.current,{select:!0}))}document.addEventListener("focusin",e),document.addEventListener("focusout",t);const r=new MutationObserver((function(e){const t=document.activeElement;for(const r of e)r.removedNodes.length>0&&(null!=y&&y.contains(t)||g(y))}));return y&&r.observe(y,{childList:!0,subtree:!0}),()=>{document.removeEventListener("focusin",e),document.removeEventListener("focusout",t),r.disconnect()}}}),[l,y,A.paused]),o.useEffect((()=>{if(y){b.add(A);const e=document.activeElement;if(!y.contains(e)){const t=new CustomEvent(c,d);y.addEventListener(c,E),y.dispatchEvent(t),t.defaultPrevented||(function(e,{select:t=!1}={}){const r=document.activeElement;for(const n of e)if(g(n,{select:t}),document.activeElement!==r)return}(p(y).filter((e=>"A"!==e.tagName)),{select:!0}),document.activeElement===e&&g(y))}return()=>{y.removeEventListener(c,E),setTimeout((()=>{const t=new CustomEvent(u,d);y.addEventListener(u,_),y.dispatchEvent(t),t.defaultPrevented||g(null!=e?e:document.body,{select:!0}),y.removeEventListener(u,_),b.remove(A)}),0)}}}),[y,E,_,A]);const T=o.useCallback((e=>{if(!r&&!l)return;if(A.paused)return;const t="Tab"===e.key&&!e.altKey&&!e.ctrlKey&&!e.metaKey,n=document.activeElement;if(t&&n){const t=e.currentTarget,[o,i]=function(e){const t=p(e);return[h(t,e),h(t.reverse(),e)]}(t);o&&i?e.shiftKey||n!==i?e.shiftKey&&n===o&&(e.preventDefault(),r&&g(i,{select:!0})):(e.preventDefault(),r&&g(o,{select:!0})):n===t&&e.preventDefault()}}),[r,l,A.paused]);return o.createElement(a.Primitive.div,((C=n)&&C.__esModule?C.default:C)({tabIndex:-1},v,{ref:x,onKeyDown:T}));var C}));function p(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function h(e,t){for(const r of e)if(!m(r,{upTo:t}))return r}function m(e,{upTo:t}){if("hidden"===getComputedStyle(e).visibility)return!0;for(;e;){if(void 0!==t&&e===t)return!1;if("none"===getComputedStyle(e).display)return!0;e=e.parentElement}return!1}function g(e,{select:t=!1}={}){if(e&&e.focus){const r=document.activeElement;e.focus({preventScroll:!0}),e!==r&&function(e){return e instanceof HTMLInputElement&&"select"in e}(e)&&t&&e.select()}}const b=function(){let e=[];return{add(t){const r=e[0];t!==r&&(null==r||r.pause()),e=v(e,t),e.unshift(t)},remove(t){var r;e=v(e,t),null===(r=e[0])||void 0===r||r.resume()}}}();function v(e,t){const r=[...e],n=r.indexOf(t);return-1!==n&&r.splice(n,1),r}const y=f},92264:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(82535),a=r(74205),s=r(10207),l=r(95791),c=r(62053),u=r(80283),d=r(95696),f=r(55745);function p(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}p(e.exports,"createPopperScope",(()=>y)),p(e.exports,"Popper",(()=>_)),p(e.exports,"PopperAnchor",(()=>S)),p(e.exports,"PopperContent",(()=>C)),p(e.exports,"PopperArrow",(()=>O)),p(e.exports,"Root",(()=>M)),p(e.exports,"Anchor",(()=>P)),p(e.exports,"Content",(()=>D)),p(e.exports,"Arrow",(()=>L)),p(e.exports,"SIDE_OPTIONS",(()=>m)),p(e.exports,"ALIGN_OPTIONS",(()=>g));const m=["top","right","bottom","left"],g=["start","center","end"],b="Popper",[v,y]=l.createContextScope(b),[w,E]=v(b),_=e=>{const{__scopePopper:t,children:r}=e,[n,i]=o.useState(null);return o.createElement(w,{scope:t,anchor:n,onAnchorChange:i},r)},S=o.forwardRef(((e,t)=>{const{__scopePopper:r,virtualRef:i,...a}=e,l=E("PopperAnchor",r),u=o.useRef(null),d=s.useComposedRefs(t,u);return o.useEffect((()=>{l.onAnchorChange((null==i?void 0:i.current)||u.current)})),i?null:o.createElement(c.Primitive.div,h(n)({},a,{ref:d}))})),x="PopperContent",[A,T]=v(x),C=o.forwardRef(((e,t)=>{var r,a,l,p,m,g,b,v;const{__scopePopper:y,side:w="bottom",sideOffset:_=0,align:S="center",alignOffset:T=0,arrowPadding:C=0,collisionBoundary:k=[],collisionPadding:O=0,sticky:M="partial",hideWhenDetached:P=!1,avoidCollisions:D=!0,onPlaced:L,...F}=e,B=E(x,y),[U,j]=o.useState(null),z=s.useComposedRefs(t,(e=>j(e))),[H,G]=o.useState(null),W=f.useSize(H),q=null!==(r=null==W?void 0:W.width)&&void 0!==r?r:0,V=null!==(a=null==W?void 0:W.height)&&void 0!==a?a:0,Y=w+("center"!==S?"-"+S:""),K="number"==typeof O?O:{top:0,right:0,bottom:0,left:0,...O},X=Array.isArray(k)?k:[k],Z=X.length>0,Q={padding:K,boundary:X.filter(R),altBoundary:Z},{refs:J,floatingStyles:$,placement:ee,isPositioned:te,middlewareData:re}=i.useFloating({strategy:"fixed",placement:Y,whileElementsMounted:i.autoUpdate,elements:{reference:B.anchor},middleware:[i.offset({mainAxis:_+V,alignmentAxis:T}),D&&i.shift({mainAxis:!0,crossAxis:!1,limiter:"partial"===M?i.limitShift():void 0,...Q}),D&&i.flip({...Q}),i.size({...Q,apply:({elements:e,rects:t,availableWidth:r,availableHeight:n})=>{const{width:o,height:i}=t.reference,a=e.floating.style;a.setProperty("--radix-popper-available-width",`${r}px`),a.setProperty("--radix-popper-available-height",`${n}px`),a.setProperty("--radix-popper-anchor-width",`${o}px`),a.setProperty("--radix-popper-anchor-height",`${i}px`)}}),H&&i.arrow({element:H,padding:C}),N({arrowWidth:q,arrowHeight:V}),P&&i.hide({strategy:"referenceHidden"})]}),[ne,oe]=I(ee),ie=u.useCallbackRef(L);d.useLayoutEffect((()=>{te&&(null==ie||ie())}),[te,ie]);const ae=null===(l=re.arrow)||void 0===l?void 0:l.x,se=null===(p=re.arrow)||void 0===p?void 0:p.y,le=0!==(null===(m=re.arrow)||void 0===m?void 0:m.centerOffset),[ce,ue]=o.useState();return d.useLayoutEffect((()=>{U&&ue(window.getComputedStyle(U).zIndex)}),[U]),o.createElement("div",{ref:J.setFloating,"data-radix-popper-content-wrapper":"",style:{...$,transform:te?$.transform:"translate(0, -200%)",minWidth:"max-content",zIndex:ce,"--radix-popper-transform-origin":[null===(g=re.transformOrigin)||void 0===g?void 0:g.x,null===(b=re.transformOrigin)||void 0===b?void 0:b.y].join(" ")},dir:e.dir},o.createElement(A,{scope:y,placedSide:ne,onArrowChange:G,arrowX:ae,arrowY:se,shouldHideArrow:le},o.createElement(c.Primitive.div,h(n)({"data-side":ne,"data-align":oe},F,{ref:z,style:{...F.style,animation:te?void 0:"none",opacity:null!==(v=re.hide)&&void 0!==v&&v.referenceHidden?0:void 0}}))))})),k={top:"bottom",right:"left",bottom:"top",left:"right"},O=o.forwardRef((function(e,t){const{__scopePopper:r,...i}=e,s=T("PopperArrow",r),l=k[s.placedSide];return o.createElement("span",{ref:s.onArrowChange,style:{position:"absolute",left:s.arrowX,top:s.arrowY,[l]:0,transformOrigin:{top:"",right:"0 0",bottom:"center 0",left:"100% 0"}[s.placedSide],transform:{top:"translateY(100%)",right:"translateY(50%) rotate(90deg) translateX(-50%)",bottom:"rotate(180deg)",left:"translateY(50%) rotate(-90deg) translateX(50%)"}[s.placedSide],visibility:s.shouldHideArrow?"hidden":void 0}},o.createElement(a.Root,h(n)({},i,{ref:t,style:{...i.style,display:"block"}})))}));function R(e){return null!==e}const N=e=>({name:"transformOrigin",options:e,fn(t){var r,n,o,i,a;const{placement:s,rects:l,middlewareData:c}=t,u=0!==(null===(r=c.arrow)||void 0===r?void 0:r.centerOffset),d=u?0:e.arrowWidth,f=u?0:e.arrowHeight,[p,h]=I(s),m={start:"0%",center:"50%",end:"100%"}[h],g=(null!==(n=null===(o=c.arrow)||void 0===o?void 0:o.x)&&void 0!==n?n:0)+d/2,b=(null!==(i=null===(a=c.arrow)||void 0===a?void 0:a.y)&&void 0!==i?i:0)+f/2;let v="",y="";return"bottom"===p?(v=u?m:`${g}px`,y=-f+"px"):"top"===p?(v=u?m:`${g}px`,y=`${l.floating.height+f}px`):"right"===p?(v=-f+"px",y=u?m:`${b}px`):"left"===p&&(v=`${l.floating.width+f}px`,y=u?m:`${b}px`),{data:{x:v,y}}}});function I(e){const[t,r="center"]=e.split("-");return[t,r]}const M=_,P=S,D=C,L=O},50172:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(40961),a=r(62053);function s(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function l(e){return e&&e.__esModule?e.default:e}s(e.exports,"Portal",(()=>c)),s(e.exports,"Root",(()=>u));const c=o.forwardRef(((e,t)=>{var r;const{container:s=(null===globalThis||void 0===globalThis||null===(r=globalThis.document)||void 0===r?void 0:r.body),...c}=e;return s?l(i).createPortal(o.createElement(a.Primitive.div,l(n)({},c,{ref:t})),s):null})),u=c},59083:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(62053);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}a(e.exports,"Separator",(()=>c)),a(e.exports,"Root",(()=>d));const s="horizontal",l=["horizontal","vertical"],c=o.forwardRef(((e,t)=>{const{decorative:r,orientation:a=s,...l}=e,c=u(a)?a:s,d=r?{role:"none"}:{"aria-orientation":"vertical"===c?c:void 0,role:"separator"};return o.createElement(i.Primitive.div,((f=n)&&f.__esModule?f.default:f)({"data-orientation":c},d,l,{ref:t}));var f}));function u(e){return l.includes(e)}c.propTypes={orientation(e,t,r){const n=e[t],o=String(n);return n&&!u(n)?new Error(function(e,t){return`Invalid prop \`orientation\` of value \`${e}\` supplied to \`${t}\`, expected one of:\n - horizontal\n - vertical\n\nDefaulting to \`${s}\`.`}(o,r)):null}};const d=c},37319:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(81109),a=r(80739),s=r(10207),l=r(95791),c=r(22971),u=r(62585),d=r(88165),f=r(55745),p=r(62053),h=r(89656);function m(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function g(e){return e&&e.__esModule?e.default:e}m(e.exports,"createSliderScope",(()=>A)),m(e.exports,"Slider",(()=>k)),m(e.exports,"SliderTrack",(()=>P)),m(e.exports,"SliderRange",(()=>L)),m(e.exports,"SliderThumb",(()=>B)),m(e.exports,"Root",(()=>G)),m(e.exports,"Track",(()=>W)),m(e.exports,"Range",(()=>q)),m(e.exports,"Thumb",(()=>V));const b=["PageUp","PageDown"],v=["ArrowUp","ArrowDown","ArrowLeft","ArrowRight"],y={"from-left":["Home","PageDown","ArrowDown","ArrowLeft"],"from-right":["Home","PageDown","ArrowDown","ArrowRight"],"from-bottom":["Home","PageDown","ArrowDown","ArrowLeft"],"from-top":["Home","PageDown","ArrowUp","ArrowLeft"]},w="Slider",[E,_,S]=h.createCollection(w),[x,A]=l.createContextScope(w,[S]),[T,C]=x(w),k=o.forwardRef(((e,t)=>{const{name:r,min:l=0,max:u=100,step:d=1,orientation:f="horizontal",disabled:p=!1,minStepsBetweenThumbs:h=0,defaultValue:m=[l],value:y,onValueChange:w=(()=>{}),onValueCommit:_=(()=>{}),inverted:S=!1,...x}=e,[A,C]=o.useState(null),k=s.useComposedRefs(t,(e=>C(e))),O=o.useRef(new Set),R=o.useRef(0),M="horizontal"===f,P=!A||Boolean(A.closest("form")),D=M?N:I,[L=[],F]=c.useControllableState({prop:y,defaultProp:m,onChange:e=>{var t;null===(t=[...O.current][R.current])||void 0===t||t.focus(),w(e)}}),B=o.useRef(L);function U(e,t,{commit:r}={commit:!1}){const n=function(e){return(String(e).split(".")[1]||"").length}(d),o=function(e,t){const r=Math.pow(10,t);return Math.round(e*r)/r}(Math.round((e-l)/d)*d+l,n),a=i.clamp(o,[l,u]);F(((e=[])=>{const n=function(e=[],t,r){const n=[...e];return n[r]=t,n.sort(((e,t)=>e-t))}(e,a,t);if(function(e,t){if(t>0){const r=function(e){return e.slice(0,-1).map(((t,r)=>e[r+1]-t))}(e);return Math.min(...r)>=t}return!0}(n,h*d)){R.current=n.indexOf(a);const t=String(n)!==String(e);return t&&r&&_(n),t?n:e}return e}))}return o.createElement(T,{scope:e.__scopeSlider,disabled:p,min:l,max:u,valueIndexToChangeRef:R,thumbs:O.current,values:L,orientation:f},o.createElement(E.Provider,{scope:e.__scopeSlider},o.createElement(E.Slot,{scope:e.__scopeSlider},o.createElement(D,g(n)({"aria-disabled":p,"data-disabled":p?"":void 0},x,{ref:k,onPointerDown:a.composeEventHandlers(x.onPointerDown,(()=>{p||(B.current=L)})),min:l,max:u,inverted:S,onSlideStart:p?void 0:function(e){const t=function(e,t){if(1===e.length)return 0;const r=e.map((e=>Math.abs(e-t))),n=Math.min(...r);return r.indexOf(n)}(L,e);U(e,t)},onSlideMove:p?void 0:function(e){U(e,R.current)},onSlideEnd:p?void 0:function(){const e=B.current[R.current];L[R.current]!==e&&_(L)},onHomeKeyDown:()=>!p&&U(l,0,{commit:!0}),onEndKeyDown:()=>!p&&U(u,L.length-1,{commit:!0}),onStepKeyDown:({event:e,direction:t})=>{if(!p){const r=b.includes(e.key)||e.shiftKey&&v.includes(e.key)?10:1,n=R.current;U(L[n]+d*r*t,n,{commit:!0})}}})))),P&&L.map(((e,t)=>o.createElement(j,{key:t,name:r?r+(L.length>1?"[]":""):void 0,value:e}))))})),[O,R]=x(w,{startEdge:"left",endEdge:"right",size:"width",direction:1}),N=o.forwardRef(((e,t)=>{const{min:r,max:i,dir:a,inverted:l,onSlideStart:c,onSlideMove:d,onSlideEnd:f,onStepKeyDown:p,...h}=e,[m,b]=o.useState(null),v=s.useComposedRefs(t,(e=>b(e))),w=o.useRef(),E=u.useDirection(a),_="ltr"===E,S=_&&!l||!_&&l;function x(e){const t=w.current||m.getBoundingClientRect(),n=H([0,t.width],S?[r,i]:[i,r]);return w.current=t,n(e-t.left)}return o.createElement(O,{scope:e.__scopeSlider,startEdge:S?"left":"right",endEdge:S?"right":"left",direction:S?1:-1,size:"width"},o.createElement(M,g(n)({dir:E,"data-orientation":"horizontal"},h,{ref:v,style:{...h.style,"--radix-slider-thumb-transform":"translateX(-50%)"},onSlideStart:e=>{const t=x(e.clientX);null==c||c(t)},onSlideMove:e=>{const t=x(e.clientX);null==d||d(t)},onSlideEnd:()=>{w.current=void 0,null==f||f()},onStepKeyDown:e=>{const t=y[S?"from-left":"from-right"].includes(e.key);null==p||p({event:e,direction:t?-1:1})}})))})),I=o.forwardRef(((e,t)=>{const{min:r,max:i,inverted:a,onSlideStart:l,onSlideMove:c,onSlideEnd:u,onStepKeyDown:d,...f}=e,p=o.useRef(null),h=s.useComposedRefs(t,p),m=o.useRef(),b=!a;function v(e){const t=m.current||p.current.getBoundingClientRect(),n=H([0,t.height],b?[i,r]:[r,i]);return m.current=t,n(e-t.top)}return o.createElement(O,{scope:e.__scopeSlider,startEdge:b?"bottom":"top",endEdge:b?"top":"bottom",size:"height",direction:b?1:-1},o.createElement(M,g(n)({"data-orientation":"vertical"},f,{ref:h,style:{...f.style,"--radix-slider-thumb-transform":"translateY(50%)"},onSlideStart:e=>{const t=v(e.clientY);null==l||l(t)},onSlideMove:e=>{const t=v(e.clientY);null==c||c(t)},onSlideEnd:()=>{m.current=void 0,null==u||u()},onStepKeyDown:e=>{const t=y[b?"from-bottom":"from-top"].includes(e.key);null==d||d({event:e,direction:t?-1:1})}})))})),M=o.forwardRef(((e,t)=>{const{__scopeSlider:r,onSlideStart:i,onSlideMove:s,onSlideEnd:l,onHomeKeyDown:c,onEndKeyDown:u,onStepKeyDown:d,...f}=e,h=C(w,r);return o.createElement(p.Primitive.span,g(n)({},f,{ref:t,onKeyDown:a.composeEventHandlers(e.onKeyDown,(e=>{"Home"===e.key?(c(e),e.preventDefault()):"End"===e.key?(u(e),e.preventDefault()):b.concat(v).includes(e.key)&&(d(e),e.preventDefault())})),onPointerDown:a.composeEventHandlers(e.onPointerDown,(e=>{const t=e.target;t.setPointerCapture(e.pointerId),e.preventDefault(),h.thumbs.has(t)?t.focus():i(e)})),onPointerMove:a.composeEventHandlers(e.onPointerMove,(e=>{e.target.hasPointerCapture(e.pointerId)&&s(e)})),onPointerUp:a.composeEventHandlers(e.onPointerUp,(e=>{const t=e.target;t.hasPointerCapture(e.pointerId)&&(t.releasePointerCapture(e.pointerId),l(e))}))}))})),P=o.forwardRef(((e,t)=>{const{__scopeSlider:r,...i}=e,a=C("SliderTrack",r);return o.createElement(p.Primitive.span,g(n)({"data-disabled":a.disabled?"":void 0,"data-orientation":a.orientation},i,{ref:t}))})),D="SliderRange",L=o.forwardRef(((e,t)=>{const{__scopeSlider:r,...i}=e,a=C(D,r),l=R(D,r),c=o.useRef(null),u=s.useComposedRefs(t,c),d=a.values.length,f=a.values.map((e=>z(e,a.min,a.max))),h=d>1?Math.min(...f):0,m=100-Math.max(...f);return o.createElement(p.Primitive.span,g(n)({"data-orientation":a.orientation,"data-disabled":a.disabled?"":void 0},i,{ref:u,style:{...e.style,[l.startEdge]:h+"%",[l.endEdge]:m+"%"}}))})),F="SliderThumb",B=o.forwardRef(((e,t)=>{const r=_(e.__scopeSlider),[i,a]=o.useState(null),l=s.useComposedRefs(t,(e=>a(e))),c=o.useMemo((()=>i?r().findIndex((e=>e.ref.current===i)):-1),[r,i]);return o.createElement(U,g(n)({},e,{ref:l,index:c}))})),U=o.forwardRef(((e,t)=>{const{__scopeSlider:r,index:i,...l}=e,c=C(F,r),u=R(F,r),[d,h]=o.useState(null),m=s.useComposedRefs(t,(e=>h(e))),b=f.useSize(d),v=c.values[i],y=void 0===v?0:z(v,c.min,c.max),w=function(e,t){return t>2?`Value ${e+1} of ${t}`:2===t?["Minimum","Maximum"][e]:void 0}(i,c.values.length),_=null==b?void 0:b[u.size],S=_?function(e,t,r){const n=e/2;return(n-H([0,50],[0,n])(t)*r)*r}(_,y,u.direction):0;return o.useEffect((()=>{if(d)return c.thumbs.add(d),()=>{c.thumbs.delete(d)}}),[d,c.thumbs]),o.createElement("span",{style:{transform:"var(--radix-slider-thumb-transform)",position:"absolute",[u.startEdge]:`calc(${y}% + ${S}px)`}},o.createElement(E.ItemSlot,{scope:e.__scopeSlider},o.createElement(p.Primitive.span,g(n)({role:"slider","aria-label":e["aria-label"]||w,"aria-valuemin":c.min,"aria-valuenow":v,"aria-valuemax":c.max,"aria-orientation":c.orientation,"data-orientation":c.orientation,"data-disabled":c.disabled?"":void 0,tabIndex:c.disabled?void 0:0},l,{ref:m,style:void 0===v?{display:"none"}:e.style,onFocus:a.composeEventHandlers(e.onFocus,(()=>{c.valueIndexToChangeRef.current=i}))}))))})),j=e=>{const{value:t,...r}=e,i=o.useRef(null),a=d.usePrevious(t);return o.useEffect((()=>{const e=i.current,r=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(r,"value").set;if(a!==t&&n){const r=new Event("input",{bubbles:!0});n.call(e,t),e.dispatchEvent(r)}}),[a,t]),o.createElement("input",g(n)({style:{display:"none"}},r,{ref:i,defaultValue:t}))};function z(e,t,r){const n=100/(r-t)*(e-t);return i.clamp(n,[0,100])}function H(e,t){return r=>{if(e[0]===e[1]||t[0]===t[1])return t[0];const n=(t[1]-t[0])/(e[1]-e[0]);return t[0]+n*(r-e[0])}}const G=k,W=P,q=L,V=B},56612:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(10207);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function s(e){return e&&e.__esModule?e.default:e}a(e.exports,"Slot",(()=>l)),a(e.exports,"Slottable",(()=>u)),a(e.exports,"Root",(()=>p));const l=o.forwardRef(((e,t)=>{const{children:r,...i}=e,a=o.Children.toArray(r),l=a.find(d);if(l){const e=l.props.children,r=a.map((t=>t===l?o.Children.count(e)>1?o.Children.only(null):o.isValidElement(e)?e.props.children:null:t));return o.createElement(c,s(n)({},i,{ref:t}),o.isValidElement(e)?o.cloneElement(e,void 0,r):null)}return o.createElement(c,s(n)({},i,{ref:t}),r)}));l.displayName="Slot";const c=o.forwardRef(((e,t)=>{const{children:r,...n}=e;return o.isValidElement(r)?o.cloneElement(r,{...f(n,r.props),ref:t?i.composeRefs(t,r.ref):r.ref}):o.Children.count(r)>1?o.Children.only(null):null}));c.displayName="SlotClone";const u=({children:e})=>o.createElement(o.Fragment,null,e);function d(e){return o.isValidElement(e)&&e.type===u}function f(e,t){const r={...t};for(const n in t){const o=e[n],i=t[n];/^on[A-Z]/.test(n)?o&&i?r[n]=(...e)=>{i(...e),o(...e)}:o&&(r[n]=o):"style"===n?r[n]={...o,...i}:"className"===n&&(r[n]=[o,i].filter(Boolean).join(" "))}return{...e,...r}}const p=l},47776:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(10207),s=r(95791),l=r(22971),c=r(88165),u=r(55745),d=r(62053);function f(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function p(e){return e&&e.__esModule?e.default:e}f(e.exports,"createSwitchScope",(()=>g)),f(e.exports,"Switch",(()=>y)),f(e.exports,"SwitchThumb",(()=>w)),f(e.exports,"Root",(()=>S)),f(e.exports,"Thumb",(()=>x));const h="Switch",[m,g]=s.createContextScope(h),[b,v]=m(h),y=o.forwardRef(((e,t)=>{const{__scopeSwitch:r,name:s,checked:c,defaultChecked:u,required:f,disabled:h,value:m="on",onCheckedChange:g,...v}=e,[y,w]=o.useState(null),S=a.useComposedRefs(t,(e=>w(e))),x=o.useRef(!1),A=!y||Boolean(y.closest("form")),[T=!1,C]=l.useControllableState({prop:c,defaultProp:u,onChange:g});return o.createElement(b,{scope:r,checked:T,disabled:h},o.createElement(d.Primitive.button,p(n)({type:"button",role:"switch","aria-checked":T,"aria-required":f,"data-state":_(T),"data-disabled":h?"":void 0,disabled:h,value:m},v,{ref:S,onClick:i.composeEventHandlers(e.onClick,(e=>{C((e=>!e)),A&&(x.current=e.isPropagationStopped(),x.current||e.stopPropagation())}))})),A&&o.createElement(E,{control:y,bubbles:!x.current,name:s,value:m,checked:T,required:f,disabled:h,style:{transform:"translateX(-100%)"}}))})),w=o.forwardRef(((e,t)=>{const{__scopeSwitch:r,...i}=e,a=v("SwitchThumb",r);return o.createElement(d.Primitive.span,p(n)({"data-state":_(a.checked),"data-disabled":a.disabled?"":void 0},i,{ref:t}))})),E=e=>{const{control:t,checked:r,bubbles:i=!0,...a}=e,s=o.useRef(null),l=c.usePrevious(r),d=u.useSize(t);return o.useEffect((()=>{const e=s.current,t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,"checked").set;if(l!==r&&n){const t=new Event("click",{bubbles:i});n.call(e,r),e.dispatchEvent(t)}}),[l,r,i]),o.createElement("input",p(n)({type:"checkbox","aria-hidden":!0,defaultChecked:r},a,{tabIndex:-1,ref:s,style:{...e.style,...d,position:"absolute",pointerEvents:"none",opacity:0,margin:0}}))};function _(e){return e?"checked":"unchecked"}const S=y,x=w},22952:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(95791),s=r(56016),l=r(55575),c=r(62053),u=r(62585),d=r(22971),f=r(6411);function p(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function h(e){return e&&e.__esModule?e.default:e}p(e.exports,"createTabsScope",(()=>b)),p(e.exports,"Tabs",(()=>E)),p(e.exports,"TabsList",(()=>_)),p(e.exports,"TabsTrigger",(()=>S)),p(e.exports,"TabsContent",(()=>x)),p(e.exports,"Root",(()=>C)),p(e.exports,"List",(()=>k)),p(e.exports,"Trigger",(()=>O)),p(e.exports,"Content",(()=>R));const m="Tabs",[g,b]=a.createContextScope(m,[s.createRovingFocusGroupScope]),v=s.createRovingFocusGroupScope(),[y,w]=g(m),E=o.forwardRef(((e,t)=>{const{__scopeTabs:r,value:i,onValueChange:a,defaultValue:s,orientation:l="horizontal",dir:p,activationMode:m="automatic",...g}=e,b=u.useDirection(p),[v,w]=d.useControllableState({prop:i,onChange:a,defaultProp:s});return o.createElement(y,{scope:r,baseId:f.useId(),value:v,onValueChange:w,orientation:l,dir:b,activationMode:m},o.createElement(c.Primitive.div,h(n)({dir:b,"data-orientation":l},g,{ref:t})))})),_=o.forwardRef(((e,t)=>{const{__scopeTabs:r,loop:i=!0,...a}=e,l=w("TabsList",r),u=v(r);return o.createElement(s.Root,h(n)({asChild:!0},u,{orientation:l.orientation,dir:l.dir,loop:i}),o.createElement(c.Primitive.div,h(n)({role:"tablist","aria-orientation":l.orientation},a,{ref:t})))})),S=o.forwardRef(((e,t)=>{const{__scopeTabs:r,value:a,disabled:l=!1,...u}=e,d=w("TabsTrigger",r),f=v(r),p=A(d.baseId,a),m=T(d.baseId,a),g=a===d.value;return o.createElement(s.Item,h(n)({asChild:!0},f,{focusable:!l,active:g}),o.createElement(c.Primitive.button,h(n)({type:"button",role:"tab","aria-selected":g,"aria-controls":m,"data-state":g?"active":"inactive","data-disabled":l?"":void 0,disabled:l,id:p},u,{ref:t,onMouseDown:i.composeEventHandlers(e.onMouseDown,(e=>{l||0!==e.button||!1!==e.ctrlKey?e.preventDefault():d.onValueChange(a)})),onKeyDown:i.composeEventHandlers(e.onKeyDown,(e=>{[" ","Enter"].includes(e.key)&&d.onValueChange(a)})),onFocus:i.composeEventHandlers(e.onFocus,(()=>{const e="manual"!==d.activationMode;g||l||!e||d.onValueChange(a)}))})))})),x=o.forwardRef(((e,t)=>{const{__scopeTabs:r,value:i,forceMount:a,children:s,...u}=e,d=w("TabsContent",r),f=A(d.baseId,i),p=T(d.baseId,i),m=i===d.value,g=o.useRef(m);return o.useEffect((()=>{const e=requestAnimationFrame((()=>g.current=!1));return()=>cancelAnimationFrame(e)}),[]),o.createElement(l.Presence,{present:a||m},(({present:r})=>o.createElement(c.Primitive.div,h(n)({"data-state":m?"active":"inactive","data-orientation":d.orientation,role:"tabpanel","aria-labelledby":f,hidden:!r,id:p,tabIndex:0},u,{ref:t,style:{...e.style,animationDuration:g.current?"0s":void 0}}),r&&s)))}));function A(e,t){return`${e}-trigger-${t}`}function T(e,t){return`${e}-content-${t}`}const C=E,k=_,O=S,R=x},63327:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(40961),a=r(80739),s=r(10207),l=r(89656),c=r(95791),u=r(14614),d=r(93086),f=r(55575),p=r(62053),h=r(80283),m=r(22971),g=r(95696),b=r(41068);function v(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function y(e){return e&&e.__esModule?e.default:e}v(e.exports,"createToastScope",(()=>A)),v(e.exports,"ToastProvider",(()=>k)),v(e.exports,"ToastViewport",(()=>I)),v(e.exports,"Toast",(()=>D)),v(e.exports,"ToastTitle",(()=>j)),v(e.exports,"ToastDescription",(()=>z)),v(e.exports,"ToastAction",(()=>H)),v(e.exports,"ToastClose",(()=>G)),v(e.exports,"Provider",(()=>Z)),v(e.exports,"Viewport",(()=>Q)),v(e.exports,"Root",(()=>J)),v(e.exports,"Title",(()=>$)),v(e.exports,"Description",(()=>ee)),v(e.exports,"Action",(()=>te)),v(e.exports,"Close",(()=>re));const w="ToastProvider",[E,_,S]=l.createCollection("Toast"),[x,A]=c.createContextScope("Toast",[S]),[T,C]=x(w),k=e=>{const{__scopeToast:t,label:r="Notification",duration:n=5e3,swipeDirection:i="right",swipeThreshold:a=50,children:s}=e,[l,c]=o.useState(null),[u,d]=o.useState(0),f=o.useRef(!1),p=o.useRef(!1);return o.createElement(E.Provider,{scope:t},o.createElement(T,{scope:t,label:r,duration:n,swipeDirection:i,swipeThreshold:a,toastCount:u,viewport:l,onViewportChange:c,onToastAdd:o.useCallback((()=>d((e=>e+1))),[]),onToastRemove:o.useCallback((()=>d((e=>e-1))),[]),isFocusedToastEscapeKeyDownRef:f,isClosePausedRef:p},s))};k.propTypes={label:e=>e.label&&"string"==typeof e.label&&!e.label.trim()?new Error(`Invalid prop \`label\` supplied to \`${w}\`. Expected non-empty \`string\`.`):null};const O=["F8"],R="toast.viewportPause",N="toast.viewportResume",I=o.forwardRef(((e,t)=>{const{__scopeToast:r,hotkey:i=O,label:a="Notifications ({hotkey})",...l}=e,c=C("ToastViewport",r),d=_(r),f=o.useRef(null),h=o.useRef(null),m=o.useRef(null),g=o.useRef(null),b=s.useComposedRefs(t,g,c.onViewportChange),v=i.join("+").replace(/Key/g,"").replace(/Digit/g,""),w=c.toastCount>0;o.useEffect((()=>{const e=e=>{var t;i.every((t=>e[t]||e.code===t))&&(null===(t=g.current)||void 0===t||t.focus())};return document.addEventListener("keydown",e),()=>document.removeEventListener("keydown",e)}),[i]),o.useEffect((()=>{const e=f.current,t=g.current;if(w&&e&&t){const r=()=>{if(!c.isClosePausedRef.current){const e=new CustomEvent(R);t.dispatchEvent(e),c.isClosePausedRef.current=!0}},n=()=>{if(c.isClosePausedRef.current){const e=new CustomEvent(N);t.dispatchEvent(e),c.isClosePausedRef.current=!1}},o=t=>{!e.contains(t.relatedTarget)&&n()},i=()=>{e.contains(document.activeElement)||n()};return e.addEventListener("focusin",r),e.addEventListener("focusout",o),e.addEventListener("pointermove",r),e.addEventListener("pointerleave",i),window.addEventListener("blur",r),window.addEventListener("focus",n),()=>{e.removeEventListener("focusin",r),e.removeEventListener("focusout",o),e.removeEventListener("pointermove",r),e.removeEventListener("pointerleave",i),window.removeEventListener("blur",r),window.removeEventListener("focus",n)}}}),[w,c.isClosePausedRef]);const S=o.useCallback((({tabbingDirection:e})=>{const t=d().map((t=>{const r=t.ref.current,n=[r,...K(r)];return"forwards"===e?n:n.reverse()}));return("forwards"===e?t.reverse():t).flat()}),[d]);return o.useEffect((()=>{const e=g.current;if(e){const t=t=>{const r=t.altKey||t.ctrlKey||t.metaKey;if("Tab"===t.key&&!r){const r=document.activeElement,a=t.shiftKey;var n;if(t.target===e&&a)return void(null===(n=h.current)||void 0===n||n.focus());const s=S({tabbingDirection:a?"backwards":"forwards"}),l=s.findIndex((e=>e===r));var o,i;X(s.slice(l+1))?t.preventDefault():a?null===(o=h.current)||void 0===o||o.focus():null===(i=m.current)||void 0===i||i.focus()}};return e.addEventListener("keydown",t),()=>e.removeEventListener("keydown",t)}}),[d,S]),o.createElement(u.Branch,{ref:f,role:"region","aria-label":a.replace("{hotkey}",v),tabIndex:-1,style:{pointerEvents:w?void 0:"none"}},w&&o.createElement(M,{ref:h,onFocusFromOutsideViewport:()=>{X(S({tabbingDirection:"forwards"}))}}),o.createElement(E.Slot,{scope:r},o.createElement(p.Primitive.ol,y(n)({tabIndex:-1},l,{ref:b}))),w&&o.createElement(M,{ref:m,onFocusFromOutsideViewport:()=>{X(S({tabbingDirection:"backwards"}))}}))})),M=o.forwardRef(((e,t)=>{const{__scopeToast:r,onFocusFromOutsideViewport:i,...a}=e,s=C("ToastFocusProxy",r);return o.createElement(b.VisuallyHidden,y(n)({"aria-hidden":!0,tabIndex:0},a,{ref:t,style:{position:"fixed"},onFocus:e=>{var t;const r=e.relatedTarget;(null===(t=s.viewport)||void 0===t||!t.contains(r))&&i()}}))})),P="Toast",D=o.forwardRef(((e,t)=>{const{forceMount:r,open:i,defaultOpen:s,onOpenChange:l,...c}=e,[u=!0,d]=m.useControllableState({prop:i,defaultProp:s,onChange:l});return o.createElement(f.Presence,{present:r||u},o.createElement(B,y(n)({open:u},c,{ref:t,onClose:()=>d(!1),onPause:h.useCallbackRef(e.onPause),onResume:h.useCallbackRef(e.onResume),onSwipeStart:a.composeEventHandlers(e.onSwipeStart,(e=>{e.currentTarget.setAttribute("data-swipe","start")})),onSwipeMove:a.composeEventHandlers(e.onSwipeMove,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","move"),e.currentTarget.style.setProperty("--radix-toast-swipe-move-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-move-y",`${r}px`)})),onSwipeCancel:a.composeEventHandlers(e.onSwipeCancel,(e=>{e.currentTarget.setAttribute("data-swipe","cancel"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-end-y")})),onSwipeEnd:a.composeEventHandlers(e.onSwipeEnd,(e=>{const{x:t,y:r}=e.detail.delta;e.currentTarget.setAttribute("data-swipe","end"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-x"),e.currentTarget.style.removeProperty("--radix-toast-swipe-move-y"),e.currentTarget.style.setProperty("--radix-toast-swipe-end-x",`${t}px`),e.currentTarget.style.setProperty("--radix-toast-swipe-end-y",`${r}px`),d(!1)}))})))})),[L,F]=x(P,{onClose(){}}),B=o.forwardRef(((e,t)=>{const{__scopeToast:r,type:l="foreground",duration:c,open:d,onClose:f,onEscapeKeyDown:m,onPause:g,onResume:b,onSwipeStart:v,onSwipeMove:w,onSwipeCancel:_,onSwipeEnd:S,...x}=e,A=C(P,r),[T,k]=o.useState(null),O=s.useComposedRefs(t,(e=>k(e))),I=o.useRef(null),M=o.useRef(null),D=c||A.duration,F=o.useRef(0),B=o.useRef(D),j=o.useRef(0),{onToastAdd:z,onToastRemove:H}=A,G=h.useCallbackRef((()=>{var e;(null==T?void 0:T.contains(document.activeElement))&&(null===(e=A.viewport)||void 0===e||e.focus()),f()})),W=o.useCallback((e=>{e&&e!==1/0&&(window.clearTimeout(j.current),F.current=(new Date).getTime(),j.current=window.setTimeout(G,e))}),[G]);o.useEffect((()=>{const e=A.viewport;if(e){const t=()=>{W(B.current),null==b||b()},r=()=>{const e=(new Date).getTime()-F.current;B.current=B.current-e,window.clearTimeout(j.current),null==g||g()};return e.addEventListener(R,r),e.addEventListener(N,t),()=>{e.removeEventListener(R,r),e.removeEventListener(N,t)}}}),[A.viewport,D,g,b,W]),o.useEffect((()=>{d&&!A.isClosePausedRef.current&&W(D)}),[d,D,A.isClosePausedRef,W]),o.useEffect((()=>(z(),()=>H())),[z,H]);const K=o.useMemo((()=>T?q(T):null),[T]);return A.viewport?o.createElement(o.Fragment,null,K&&o.createElement(U,{__scopeToast:r,role:"status","aria-live":"foreground"===l?"assertive":"polite","aria-atomic":!0},K),o.createElement(L,{scope:r,onClose:G},i.createPortal(o.createElement(E.ItemSlot,{scope:r},o.createElement(u.Root,{asChild:!0,onEscapeKeyDown:a.composeEventHandlers(m,(()=>{A.isFocusedToastEscapeKeyDownRef.current||G(),A.isFocusedToastEscapeKeyDownRef.current=!1}))},o.createElement(p.Primitive.li,y(n)({role:"status","aria-live":"off","aria-atomic":!0,tabIndex:0,"data-state":d?"open":"closed","data-swipe-direction":A.swipeDirection},x,{ref:O,style:{userSelect:"none",touchAction:"none",...e.style},onKeyDown:a.composeEventHandlers(e.onKeyDown,(e=>{"Escape"===e.key&&(null==m||m(e.nativeEvent),e.nativeEvent.defaultPrevented||(A.isFocusedToastEscapeKeyDownRef.current=!0,G()))})),onPointerDown:a.composeEventHandlers(e.onPointerDown,(e=>{0===e.button&&(I.current={x:e.clientX,y:e.clientY})})),onPointerMove:a.composeEventHandlers(e.onPointerMove,(e=>{if(!I.current)return;const t=e.clientX-I.current.x,r=e.clientY-I.current.y,n=Boolean(M.current),o=["left","right"].includes(A.swipeDirection),i=["left","up"].includes(A.swipeDirection)?Math.min:Math.max,a=o?i(0,t):0,s=o?0:i(0,r),l="touch"===e.pointerType?10:2,c={x:a,y:s},u={originalEvent:e,delta:c};n?(M.current=c,V("toast.swipeMove",w,u,{discrete:!1})):Y(c,A.swipeDirection,l)?(M.current=c,V("toast.swipeStart",v,u,{discrete:!1}),e.target.setPointerCapture(e.pointerId)):(Math.abs(t)>l||Math.abs(r)>l)&&(I.current=null)})),onPointerUp:a.composeEventHandlers(e.onPointerUp,(e=>{const t=M.current,r=e.target;if(r.hasPointerCapture(e.pointerId)&&r.releasePointerCapture(e.pointerId),M.current=null,I.current=null,t){const r=e.currentTarget,n={originalEvent:e,delta:t};Y(t,A.swipeDirection,A.swipeThreshold)?V("toast.swipeEnd",S,n,{discrete:!0}):V("toast.swipeCancel",_,n,{discrete:!0}),r.addEventListener("click",(e=>e.preventDefault()),{once:!0})}}))})))),A.viewport))):null}));B.propTypes={type:e=>e.type&&!["foreground","background"].includes(e.type)?new Error(`Invalid prop \`type\` supplied to \`${P}\`. Expected \`foreground | background\`.`):null};const U=e=>{const{__scopeToast:t,children:r,...n}=e,i=C(P,t),[a,s]=o.useState(!1),[l,c]=o.useState(!1);return function(e=(()=>{})){const t=h.useCallbackRef(e);g.useLayoutEffect((()=>{let e=0,r=0;return e=window.requestAnimationFrame((()=>r=window.requestAnimationFrame(t))),()=>{window.cancelAnimationFrame(e),window.cancelAnimationFrame(r)}}),[t])}((()=>s(!0))),o.useEffect((()=>{const e=window.setTimeout((()=>c(!0)),1e3);return()=>window.clearTimeout(e)}),[]),l?null:o.createElement(d.Portal,{asChild:!0},o.createElement(b.VisuallyHidden,n,a&&o.createElement(o.Fragment,null,i.label," ",r)))},j=o.forwardRef(((e,t)=>{const{__scopeToast:r,...i}=e;return o.createElement(p.Primitive.div,y(n)({},i,{ref:t}))})),z=o.forwardRef(((e,t)=>{const{__scopeToast:r,...i}=e;return o.createElement(p.Primitive.div,y(n)({},i,{ref:t}))})),H=o.forwardRef(((e,t)=>{const{altText:r,...i}=e;return r?o.createElement(W,{altText:r,asChild:!0},o.createElement(G,y(n)({},i,{ref:t}))):null}));H.propTypes={altText:e=>e.altText?null:new Error("Missing prop `altText` expected on `ToastAction`")};const G=o.forwardRef(((e,t)=>{const{__scopeToast:r,...i}=e,s=F("ToastClose",r);return o.createElement(W,{asChild:!0},o.createElement(p.Primitive.button,y(n)({type:"button"},i,{ref:t,onClick:a.composeEventHandlers(e.onClick,s.onClose)})))})),W=o.forwardRef(((e,t)=>{const{__scopeToast:r,altText:i,...a}=e;return o.createElement(p.Primitive.div,y(n)({"data-radix-toast-announce-exclude":"","data-radix-toast-announce-alt":i||void 0},a,{ref:t}))}));function q(e){const t=[];return Array.from(e.childNodes).forEach((e=>{if(e.nodeType===e.TEXT_NODE&&e.textContent&&t.push(e.textContent),function(e){return e.nodeType===e.ELEMENT_NODE}(e)){const r=e.ariaHidden||e.hidden||"none"===e.style.display,n=""===e.dataset.radixToastAnnounceExclude;if(!r)if(n){const r=e.dataset.radixToastAnnounceAlt;r&&t.push(r)}else t.push(...q(e))}})),t}function V(e,t,r,{discrete:n}){const o=r.originalEvent.currentTarget,i=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:r});t&&o.addEventListener(e,t,{once:!0}),n?p.dispatchDiscreteCustomEvent(o,i):o.dispatchEvent(i)}const Y=(e,t,r=0)=>{const n=Math.abs(e.x),o=Math.abs(e.y),i=n>o;return"left"===t||"right"===t?i&&n>r:!i&&o>r};function K(e){const t=[],r=document.createTreeWalker(e,NodeFilter.SHOW_ELEMENT,{acceptNode:e=>{const t="INPUT"===e.tagName&&"hidden"===e.type;return e.disabled||e.hidden||t?NodeFilter.FILTER_SKIP:e.tabIndex>=0?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});for(;r.nextNode();)t.push(r.currentNode);return t}function X(e){const t=document.activeElement;return e.some((e=>e===t||(e.focus(),document.activeElement!==t)))}const Z=k,Q=I,J=D,$=j,ee=z,te=H,re=G},4798:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(95791),a=r(62053),s=r(56016),l=r(90892),c=r(22971),u=r(62585);function d(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function f(e){return e&&e.__esModule?e.default:e}d(e.exports,"createToggleGroupScope",(()=>m)),d(e.exports,"ToggleGroup",(()=>b)),d(e.exports,"ToggleGroupItem",(()=>T)),d(e.exports,"Root",(()=>k)),d(e.exports,"Item",(()=>O));const p="ToggleGroup",[h,m]=i.createContextScope(p,[s.createRovingFocusGroupScope]),g=s.createRovingFocusGroupScope(),b=f(o).forwardRef(((e,t)=>{const{type:r,...i}=e;if("single"===r){const e=i;return f(o).createElement(w,f(n)({},e,{ref:t}))}if("multiple"===r){const e=i;return f(o).createElement(E,f(n)({},e,{ref:t}))}throw new Error(`Missing prop \`type\` expected on \`${p}\``)})),[v,y]=h(p),w=f(o).forwardRef(((e,t)=>{const{value:r,defaultValue:i,onValueChange:a=(()=>{}),...s}=e,[l,u]=c.useControllableState({prop:r,defaultProp:i,onChange:a});return f(o).createElement(v,{scope:e.__scopeToggleGroup,type:"single",value:l?[l]:[],onItemActivate:u,onItemDeactivate:f(o).useCallback((()=>u("")),[u])},f(o).createElement(x,f(n)({},s,{ref:t})))})),E=f(o).forwardRef(((e,t)=>{const{value:r,defaultValue:i,onValueChange:a=(()=>{}),...s}=e,[l=[],u]=c.useControllableState({prop:r,defaultProp:i,onChange:a}),d=f(o).useCallback((e=>u(((t=[])=>[...t,e]))),[u]),p=f(o).useCallback((e=>u(((t=[])=>t.filter((t=>t!==e))))),[u]);return f(o).createElement(v,{scope:e.__scopeToggleGroup,type:"multiple",value:l,onItemActivate:d,onItemDeactivate:p},f(o).createElement(x,f(n)({},s,{ref:t})))})),[_,S]=h(p),x=f(o).forwardRef(((e,t)=>{const{__scopeToggleGroup:r,disabled:i=!1,rovingFocus:l=!0,orientation:c,dir:d,loop:p=!0,...h}=e,m=g(r),b=u.useDirection(d),v={role:"group",dir:b,...h};return f(o).createElement(_,{scope:r,rovingFocus:l,disabled:i},l?f(o).createElement(s.Root,f(n)({asChild:!0},m,{orientation:c,dir:b,loop:p}),f(o).createElement(a.Primitive.div,f(n)({},v,{ref:t}))):f(o).createElement(a.Primitive.div,f(n)({},v,{ref:t})))})),A="ToggleGroupItem",T=f(o).forwardRef(((e,t)=>{const r=y(A,e.__scopeToggleGroup),i=S(A,e.__scopeToggleGroup),a=g(e.__scopeToggleGroup),l=r.value.includes(e.value),c=i.disabled||e.disabled,u={...e,pressed:l,disabled:c},d=f(o).useRef(null);return i.rovingFocus?f(o).createElement(s.Item,f(n)({asChild:!0},a,{focusable:!c,active:l,ref:d}),f(o).createElement(C,f(n)({},u,{ref:t}))):f(o).createElement(C,f(n)({},u,{ref:t}))})),C=f(o).forwardRef(((e,t)=>{const{__scopeToggleGroup:r,value:i,...a}=e,s=y(A,r),c={role:"radio","aria-checked":e.pressed,"aria-pressed":void 0},u="single"===s.type?c:void 0;return f(o).createElement(l.Toggle,f(n)({},u,a,{ref:t,onPressedChange:e=>{e?s.onItemActivate(i):s.onItemDeactivate(i)}}))})),k=b,O=T},90892:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(22971),s=r(62053);function l(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}l(e.exports,"Toggle",(()=>c)),l(e.exports,"Root",(()=>u));const c=o.forwardRef(((e,t)=>{const{pressed:r,defaultPressed:l=!1,onPressedChange:c,...u}=e,[d=!1,f]=a.useControllableState({prop:r,onChange:c,defaultProp:l});return o.createElement(s.Primitive.button,((p=n)&&p.__esModule?p.default:p)({type:"button","aria-pressed":d,"data-state":d?"on":"off","data-disabled":e.disabled?"":void 0},u,{ref:t,onClick:i.composeEventHandlers(e.onClick,(()=>{e.disabled||f(!d)}))}));var p})),u=c},52295:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(95791),s=r(56016),l=r(62053),c=r(59083),u=r(4798),d=r(62585);function f(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function p(e){return e&&e.__esModule?e.default:e}f(e.exports,"createToolbarScope",(()=>g)),f(e.exports,"Toolbar",(()=>E)),f(e.exports,"ToolbarSeparator",(()=>_)),f(e.exports,"ToolbarButton",(()=>S)),f(e.exports,"ToolbarLink",(()=>x)),f(e.exports,"ToolbarToggleGroup",(()=>A)),f(e.exports,"ToolbarToggleItem",(()=>T)),f(e.exports,"Root",(()=>C)),f(e.exports,"Separator",(()=>k)),f(e.exports,"Button",(()=>O)),f(e.exports,"Link",(()=>R)),f(e.exports,"ToggleGroup",(()=>N)),f(e.exports,"ToggleItem",(()=>I));const h="Toolbar",[m,g]=a.createContextScope(h,[s.createRovingFocusGroupScope,u.createToggleGroupScope]),b=s.createRovingFocusGroupScope(),v=u.createToggleGroupScope(),[y,w]=m(h),E=o.forwardRef(((e,t)=>{const{__scopeToolbar:r,orientation:i="horizontal",dir:a,loop:c=!0,...u}=e,f=b(r),h=d.useDirection(a);return o.createElement(y,{scope:r,orientation:i,dir:h},o.createElement(s.Root,p(n)({asChild:!0},f,{orientation:i,dir:h,loop:c}),o.createElement(l.Primitive.div,p(n)({role:"toolbar","aria-orientation":i,dir:h},u,{ref:t}))))})),_=o.forwardRef(((e,t)=>{const{__scopeToolbar:r,...i}=e,a=w("ToolbarSeparator",r);return o.createElement(c.Root,p(n)({orientation:"horizontal"===a.orientation?"vertical":"horizontal"},i,{ref:t}))})),S=o.forwardRef(((e,t)=>{const{__scopeToolbar:r,...i}=e,a=b(r);return o.createElement(s.Item,p(n)({asChild:!0},a,{focusable:!e.disabled}),o.createElement(l.Primitive.button,p(n)({type:"button"},i,{ref:t})))})),x=o.forwardRef(((e,t)=>{const{__scopeToolbar:r,...a}=e,c=b(r);return o.createElement(s.Item,p(n)({asChild:!0},c,{focusable:!0}),o.createElement(l.Primitive.a,p(n)({},a,{ref:t,onKeyDown:i.composeEventHandlers(e.onKeyDown,(e=>{" "===e.key&&e.currentTarget.click()}))})))})),A=o.forwardRef(((e,t)=>{const{__scopeToolbar:r,...i}=e,a=w("ToolbarToggleGroup",r),s=v(r);return o.createElement(u.Root,p(n)({"data-orientation":a.orientation,dir:a.dir},s,i,{ref:t,rovingFocus:!1}))})),T=o.forwardRef(((e,t)=>{const{__scopeToolbar:r,...i}=e,a=v(r),s={__scopeToolbar:e.__scopeToolbar};return o.createElement(S,p(n)({asChild:!0},s),o.createElement(u.Item,p(n)({},a,i,{ref:t})))})),C=E,k=_,O=S,R=x,N=A,I=T},45447:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(80739),a=r(10207),s=r(95791),l=r(14614),c=r(6411),u=r(21738),d=r(93086),f=r(55575),p=r(62053),h=r(56612),m=r(22971),g=r(41068);function b(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}function v(e){return e&&e.__esModule?e.default:e}b(e.exports,"createTooltipScope",(()=>w)),b(e.exports,"TooltipProvider",(()=>T)),b(e.exports,"Tooltip",(()=>R)),b(e.exports,"TooltipTrigger",(()=>I)),b(e.exports,"TooltipPortal",(()=>L)),b(e.exports,"TooltipContent",(()=>B)),b(e.exports,"TooltipArrow",(()=>G)),b(e.exports,"Provider",(()=>W)),b(e.exports,"Root",(()=>q)),b(e.exports,"Trigger",(()=>V)),b(e.exports,"Portal",(()=>Y)),b(e.exports,"Content",(()=>K)),b(e.exports,"Arrow",(()=>X));const[y,w]=s.createContextScope("Tooltip",[u.createPopperScope]),E=u.createPopperScope(),_=700,S="tooltip.open",[x,A]=y("TooltipProvider"),T=e=>{const{__scopeTooltip:t,delayDuration:r=_,skipDelayDuration:n=300,disableHoverableContent:i=!1,children:a}=e,[s,l]=o.useState(!0),c=o.useRef(!1),u=o.useRef(0);return o.useEffect((()=>{const e=u.current;return()=>window.clearTimeout(e)}),[]),o.createElement(x,{scope:t,isOpenDelayed:s,delayDuration:r,onOpen:o.useCallback((()=>{window.clearTimeout(u.current),l(!1)}),[]),onClose:o.useCallback((()=>{window.clearTimeout(u.current),u.current=window.setTimeout((()=>l(!0)),n)}),[n]),isPointerInTransitRef:c,onPointerInTransitChange:o.useCallback((e=>{c.current=e}),[]),disableHoverableContent:i},a)},C="Tooltip",[k,O]=y(C),R=e=>{const{__scopeTooltip:t,children:r,open:n,defaultOpen:i=!1,onOpenChange:a,disableHoverableContent:s,delayDuration:l}=e,d=A(C,e.__scopeTooltip),f=E(t),[p,h]=o.useState(null),g=c.useId(),b=o.useRef(0),v=null!=s?s:d.disableHoverableContent,y=null!=l?l:d.delayDuration,w=o.useRef(!1),[_=!1,x]=m.useControllableState({prop:n,defaultProp:i,onChange:e=>{e?(d.onOpen(),document.dispatchEvent(new CustomEvent(S))):d.onClose(),null==a||a(e)}}),T=o.useMemo((()=>_?w.current?"delayed-open":"instant-open":"closed"),[_]),O=o.useCallback((()=>{window.clearTimeout(b.current),w.current=!1,x(!0)}),[x]),R=o.useCallback((()=>{window.clearTimeout(b.current),x(!1)}),[x]),N=o.useCallback((()=>{window.clearTimeout(b.current),b.current=window.setTimeout((()=>{w.current=!0,x(!0)}),y)}),[y,x]);return o.useEffect((()=>()=>window.clearTimeout(b.current)),[]),o.createElement(u.Root,f,o.createElement(k,{scope:t,contentId:g,open:_,stateAttribute:T,trigger:p,onTriggerChange:h,onTriggerEnter:o.useCallback((()=>{d.isOpenDelayed?N():O()}),[d.isOpenDelayed,N,O]),onTriggerLeave:o.useCallback((()=>{v?R():window.clearTimeout(b.current)}),[R,v]),onOpen:O,onClose:R,disableHoverableContent:v},r))},N="TooltipTrigger",I=o.forwardRef(((e,t)=>{const{__scopeTooltip:r,...s}=e,l=O(N,r),c=A(N,r),d=E(r),f=o.useRef(null),h=a.useComposedRefs(t,f,l.onTriggerChange),m=o.useRef(!1),g=o.useRef(!1),b=o.useCallback((()=>m.current=!1),[]);return o.useEffect((()=>()=>document.removeEventListener("pointerup",b)),[b]),o.createElement(u.Anchor,v(n)({asChild:!0},d),o.createElement(p.Primitive.button,v(n)({"aria-describedby":l.open?l.contentId:void 0,"data-state":l.stateAttribute},s,{ref:h,onPointerMove:i.composeEventHandlers(e.onPointerMove,(e=>{"touch"!==e.pointerType&&(g.current||c.isPointerInTransitRef.current||(l.onTriggerEnter(),g.current=!0))})),onPointerLeave:i.composeEventHandlers(e.onPointerLeave,(()=>{l.onTriggerLeave(),g.current=!1})),onPointerDown:i.composeEventHandlers(e.onPointerDown,(()=>{m.current=!0,document.addEventListener("pointerup",b,{once:!0})})),onFocus:i.composeEventHandlers(e.onFocus,(()=>{m.current||l.onOpen()})),onBlur:i.composeEventHandlers(e.onBlur,l.onClose),onClick:i.composeEventHandlers(e.onClick,l.onClose)})))})),M="TooltipPortal",[P,D]=y(M,{forceMount:void 0}),L=e=>{const{__scopeTooltip:t,forceMount:r,children:n,container:i}=e,a=O(M,t);return o.createElement(P,{scope:t,forceMount:r},o.createElement(f.Presence,{present:r||a.open},o.createElement(d.Portal,{asChild:!0,container:i},n)))},F="TooltipContent",B=o.forwardRef(((e,t)=>{const r=D(F,e.__scopeTooltip),{forceMount:i=r.forceMount,side:a="top",...s}=e,l=O(F,e.__scopeTooltip);return o.createElement(f.Presence,{present:i||l.open},l.disableHoverableContent?o.createElement(H,v(n)({side:a},s,{ref:t})):o.createElement(U,v(n)({side:a},s,{ref:t})))})),U=o.forwardRef(((e,t)=>{const r=O(F,e.__scopeTooltip),i=A(F,e.__scopeTooltip),s=o.useRef(null),l=a.useComposedRefs(t,s),[c,u]=o.useState(null),{trigger:d,onClose:f}=r,p=s.current,{onPointerInTransitChange:h}=i,m=o.useCallback((()=>{u(null),h(!1)}),[h]),g=o.useCallback(((e,t)=>{const r=e.currentTarget,n={x:e.clientX,y:e.clientY},o=function(e,t,r=5){const n=[];switch(t){case"top":n.push({x:e.x-r,y:e.y+r},{x:e.x+r,y:e.y+r});break;case"bottom":n.push({x:e.x-r,y:e.y-r},{x:e.x+r,y:e.y-r});break;case"left":n.push({x:e.x+r,y:e.y-r},{x:e.x+r,y:e.y+r});break;case"right":n.push({x:e.x-r,y:e.y-r},{x:e.x-r,y:e.y+r})}return n}(n,function(e,t){const r=Math.abs(t.top-e.y),n=Math.abs(t.bottom-e.y),o=Math.abs(t.right-e.x),i=Math.abs(t.left-e.x);switch(Math.min(r,n,o,i)){case i:return"left";case o:return"right";case r:return"top";case n:return"bottom";default:throw new Error("unreachable")}}(n,r.getBoundingClientRect())),i=function(e){const t=e.slice();return t.sort(((e,t)=>e.xt.x?1:e.yt.y?1:0)),function(e){if(e.length<=1)return e.slice();const t=[];for(let r=0;r=2;){const e=t[t.length-1],r=t[t.length-2];if(!((e.x-r.x)*(n.y-r.y)>=(e.y-r.y)*(n.x-r.x)))break;t.pop()}t.push(n)}t.pop();const r=[];for(let t=e.length-1;t>=0;t--){const n=e[t];for(;r.length>=2;){const e=r[r.length-1],t=r[r.length-2];if(!((e.x-t.x)*(n.y-t.y)>=(e.y-t.y)*(n.x-t.x)))break;r.pop()}r.push(n)}return r.pop(),1===t.length&&1===r.length&&t[0].x===r[0].x&&t[0].y===r[0].y?t:t.concat(r)}(t)}([...o,...function(e){const{top:t,right:r,bottom:n,left:o}=e;return[{x:o,y:t},{x:r,y:t},{x:r,y:n},{x:o,y:n}]}(t.getBoundingClientRect())]);u(i),h(!0)}),[h]);return o.useEffect((()=>()=>m()),[m]),o.useEffect((()=>{if(d&&p){const e=e=>g(e,p),t=e=>g(e,d);return d.addEventListener("pointerleave",e),p.addEventListener("pointerleave",t),()=>{d.removeEventListener("pointerleave",e),p.removeEventListener("pointerleave",t)}}}),[d,p,g,m]),o.useEffect((()=>{if(c){const e=e=>{const t=e.target,r={x:e.clientX,y:e.clientY},n=(null==d?void 0:d.contains(t))||(null==p?void 0:p.contains(t)),o=!function(e,t){const{x:r,y:n}=e;let o=!1;for(let e=0,i=t.length-1;en!=c>n&&r<(l-a)*(n-s)/(c-s)+a&&(o=!o)}return o}(r,c);n?m():o&&(m(),f())};return document.addEventListener("pointermove",e),()=>document.removeEventListener("pointermove",e)}}),[d,p,c,f,m]),o.createElement(H,v(n)({},e,{ref:l}))})),[j,z]=y(C,{isInside:!1}),H=o.forwardRef(((e,t)=>{const{__scopeTooltip:r,children:i,"aria-label":a,onEscapeKeyDown:s,onPointerDownOutside:c,...d}=e,f=O(F,r),p=E(r),{onClose:m}=f;return o.useEffect((()=>(document.addEventListener(S,m),()=>document.removeEventListener(S,m))),[m]),o.useEffect((()=>{if(f.trigger){const e=e=>{const t=e.target;null!=t&&t.contains(f.trigger)&&m()};return window.addEventListener("scroll",e,{capture:!0}),()=>window.removeEventListener("scroll",e,{capture:!0})}}),[f.trigger,m]),o.createElement(l.DismissableLayer,{asChild:!0,disableOutsidePointerEvents:!1,onEscapeKeyDown:s,onPointerDownOutside:c,onFocusOutside:e=>e.preventDefault(),onDismiss:m},o.createElement(u.Content,v(n)({"data-state":f.stateAttribute},p,d,{ref:t,style:{...d.style,"--radix-tooltip-content-transform-origin":"var(--radix-popper-transform-origin)","--radix-tooltip-content-available-width":"var(--radix-popper-available-width)","--radix-tooltip-content-available-height":"var(--radix-popper-available-height)","--radix-tooltip-trigger-width":"var(--radix-popper-anchor-width)","--radix-tooltip-trigger-height":"var(--radix-popper-anchor-height)"}}),o.createElement(h.Slottable,null,i),o.createElement(j,{scope:r,isInside:!0},o.createElement(g.Root,{id:f.contentId,role:"tooltip"},a||i))))})),G=o.forwardRef(((e,t)=>{const{__scopeTooltip:r,...i}=e,a=E(r);return z("TooltipArrow",r).isInside?null:o.createElement(u.Arrow,v(n)({},a,i,{ref:t}))})),W=T,q=R,V=I,Y=L,K=B,X=G},80283:(e,t,r)=>{var n,o,i=r(96540);function a(e){const t=i.useRef(e);return i.useEffect((()=>{t.current=e})),i.useMemo((()=>(...e)=>{var r;return null===(r=t.current)||void 0===r?void 0:r.call(t,...e)}),[])}n=e.exports,o=()=>a,Object.defineProperty(n,"useCallbackRef",{get:o,set:undefined,enumerable:!0,configurable:!0})},22971:(e,t,r)=>{var n,o,i=r(96540),a=r(80283);function s({prop:e,defaultProp:t,onChange:r=(()=>{})}){const[n,o]=function({defaultProp:e,onChange:t}){const r=i.useState(e),[n]=r,o=i.useRef(n),s=a.useCallbackRef(t);return i.useEffect((()=>{o.current!==n&&(s(n),o.current=n)}),[n,o,s]),r}({defaultProp:t,onChange:r}),s=void 0!==e,l=s?e:n,c=a.useCallbackRef(r);return[l,i.useCallback((t=>{if(s){const r="function"==typeof t?t(e):t;r!==e&&c(r)}else o(t)}),[s,e,o,c])]}n=e.exports,o=()=>s,Object.defineProperty(n,"useControllableState",{get:o,set:undefined,enumerable:!0,configurable:!0})},32905:(e,t,r)=>{var n,o,i=r(96540),a=r(80283);function s(e,t=(null===globalThis||void 0===globalThis?void 0:globalThis.document)){const r=a.useCallbackRef(e);i.useEffect((()=>{const e=e=>{"Escape"===e.key&&r(e)};return t.addEventListener("keydown",e),()=>t.removeEventListener("keydown",e)}),[r,t])}n=e.exports,o=()=>s,Object.defineProperty(n,"useEscapeKeydown",{get:o,set:undefined,enumerable:!0,configurable:!0})},95696:(e,t,r)=>{var n,o,i=r(96540);n=e.exports,o=()=>a,Object.defineProperty(n,"useLayoutEffect",{get:o,set:undefined,enumerable:!0,configurable:!0});const a=Boolean(null===globalThis||void 0===globalThis?void 0:globalThis.document)?i.useLayoutEffect:()=>{}},88165:(e,t,r)=>{var n,o,i=r(96540);function a(e){const t=i.useRef({value:e,previous:e});return i.useMemo((()=>(t.current.value!==e&&(t.current.previous=t.current.value,t.current.value=e),t.current.previous)),[e])}n=e.exports,o=()=>a,Object.defineProperty(n,"usePrevious",{get:o,set:undefined,enumerable:!0,configurable:!0})},55745:(e,t,r)=>{var n,o,i=r(96540),a=r(95696);function s(e){const[t,r]=i.useState(void 0);return a.useLayoutEffect((()=>{if(e){r({width:e.offsetWidth,height:e.offsetHeight});const t=new ResizeObserver((t=>{if(!Array.isArray(t))return;if(!t.length)return;const n=t[0];let o,i;if("borderBoxSize"in n){const e=n.borderBoxSize,t=Array.isArray(e)?e[0]:e;o=t.inlineSize,i=t.blockSize}else o=e.offsetWidth,i=e.offsetHeight;r({width:o,height:i})}));return t.observe(e,{box:"border-box"}),()=>t.unobserve(e)}r(void 0)}),[e]),t}n=e.exports,o=()=>s,Object.defineProperty(n,"useSize",{get:o,set:undefined,enumerable:!0,configurable:!0})},41068:(e,t,r)=>{var n=r(94634),o=r(96540),i=r(62053);function a(e,t,r,n){Object.defineProperty(e,t,{get:r,set:n,enumerable:!0,configurable:!0})}a(e.exports,"VisuallyHidden",(()=>s)),a(e.exports,"Root",(()=>l));const s=o.forwardRef(((e,t)=>{return o.createElement(i.Primitive.span,((r=n)&&r.__esModule?r.default:r)({},e,{ref:t,style:{position:"absolute",border:0,width:1,height:1,padding:0,margin:-1,overflow:"hidden",clip:"rect(0, 0, 0, 0)",whiteSpace:"nowrap",wordWrap:"normal",...e.style}}));var r})),l=s},61244:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);function o(){return(0,n.useState)(null)}},23713:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);const o=function(e){const t=(0,n.useRef)(e);return(0,n.useEffect)((()=>{t.current=e}),[e]),t}},17895:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96540),o=r(23713);function i(e){const t=(0,o.A)(e);return(0,n.useCallback)((function(...e){return t.current&&t.current(...e)}),[t])}},97876:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96540),o=r(17895);function i(e,t,r,i=!1){const a=(0,o.A)(r);(0,n.useEffect)((()=>{const r="function"==typeof e?e():e;return r.addEventListener(t,a,i),()=>r.removeEventListener(t,a,i)}),[e])}},28342:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);function o(){const[,e]=(0,n.useReducer)((e=>!e),!1);return e}},11706:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96540);const o=void 0!==r.g&&r.g.navigator&&"ReactNative"===r.g.navigator.product,i="undefined"!=typeof document||o?n.useLayoutEffect:n.useEffect},43804:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(96540);const o=e=>e&&"function"!=typeof e?t=>{e.current=t}:e,i=function(e,t){return(0,n.useMemo)((()=>function(e,t){const r=o(e),n=o(t);return e=>{r&&r(e),n&&n(e)}}(e,t)),[e,t])}},48880:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);function o(){const e=(0,n.useRef)(!0),t=(0,n.useRef)((()=>e.current));return(0,n.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),t.current}},4103:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);function o(e){const t=(0,n.useRef)(null);return(0,n.useEffect)((()=>{t.current=e})),t.current}},89567:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(96540),o=r(48880),i=r(91577);const a=2**31-1;function s(e,t,r){const n=r-Date.now();e.current=n<=a?setTimeout(t,n):setTimeout((()=>s(e,t,r)),a)}function l(){const e=(0,o.A)(),t=(0,n.useRef)();return(0,i.A)((()=>clearTimeout(t.current))),(0,n.useMemo)((()=>{const r=()=>clearTimeout(t.current);return{set:function(n,o=0){e()&&(r(),o<=a?t.current=setTimeout(n,o):s(t,n,Date.now()+o))},clear:r,handleRef:t}}),[])}},91577:(e,t,r)=>{"use strict";r.d(t,{A:()=>o});var n=r(96540);function o(e){const t=function(e){const t=(0,n.useRef)(e);return t.current=e,t}(e);(0,n.useEffect)((()=>()=>t.current()),[])}},2571:(e,t,r)=>{"use strict";r.d(t,{A:()=>c});var n=r(96540),o=(r(61244),r(23713),r(17895));r(97876),r(48880),r(4103),r(11706),new WeakMap;var i=r(65753),a=r(74848);const s=["onKeyDown"],l=n.forwardRef(((e,t)=>{let{onKeyDown:r}=e,n=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,s);const[l]=(0,i.Am)(Object.assign({tagName:"a"},n)),c=(0,o.A)((e=>{l.onKeyDown(e),null==r||r(e)}));return(u=n.href)&&"#"!==u.trim()&&"button"!==n.role?(0,a.jsx)("a",Object.assign({ref:t},n,{onKeyDown:r})):(0,a.jsx)("a",Object.assign({ref:t},n,l,{onKeyDown:c}));var u}));l.displayName="Anchor";const c=l},65753:(e,t,r)=>{"use strict";r.d(t,{Am:()=>a,Ay:()=>l});var n=r(96540),o=r(74848);const i=["as","disabled"];function a({tagName:e,disabled:t,href:r,target:n,rel:o,role:i,onClick:a,tabIndex:s=0,type:l}){e||(e=null!=r||null!=n||null!=o?"a":"button");const c={tagName:e};if("button"===e)return[{type:l||"button",disabled:t},c];const u=n=>{(t||"a"===e&&function(e){return!e||"#"===e.trim()}(r))&&n.preventDefault(),t?n.stopPropagation():null==a||a(n)};return"a"===e&&(r||(r="#"),t&&(r=void 0)),[{role:null!=i?i:"button",disabled:void 0,tabIndex:t?void 0:s,href:r,target:"a"===e?n:void 0,"aria-disabled":t||void 0,rel:"a"===e?o:void 0,onClick:u,onKeyDown:e=>{" "===e.key&&(e.preventDefault(),u(e))}},c]}const s=n.forwardRef(((e,t)=>{let{as:r,disabled:n}=e,s=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,i);const[l,{tagName:c}]=a(Object.assign({tagName:r,disabled:n},s));return(0,o.jsx)(c,Object.assign({},s,l,{ref:t}))}));s.displayName="Button";const l=s},5182:(e,t,r)=>{"use strict";r.d(t,{sE:()=>i,y:()=>a});const n="data-rr-ui-",o="rrUi";function i(e){return`${n}${e}`}function a(e){return`${o}${e}`}},46500:(e,t,r)=>{"use strict";r.d(t,{Yc:()=>p});var n=r(43804),o=r(17895),i=r(11706),a=r(96540),s=r(88978);const l=["onEnter","onEntering","onEntered","onExit","onExiting","onExited","addEndListener","children"];var c=r(74848);const u=["component"],d=a.forwardRef(((e,t)=>{let{component:r}=e;const o=function(e){let{onEnter:t,onEntering:r,onEntered:o,onExit:i,onExiting:s,onExited:c,addEndListener:u,children:d}=e,f=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,l);const p=(0,a.useRef)(null),h=(0,n.A)(p,"function"==typeof d?null:d.ref),m=e=>t=>{e&&p.current&&e(p.current,t)},g=(0,a.useCallback)(m(t),[t]),b=(0,a.useCallback)(m(r),[r]),v=(0,a.useCallback)(m(o),[o]),y=(0,a.useCallback)(m(i),[i]),w=(0,a.useCallback)(m(s),[s]),E=(0,a.useCallback)(m(c),[c]),_=(0,a.useCallback)(m(u),[u]);return Object.assign({},f,{nodeRef:p},t&&{onEnter:g},r&&{onEntering:b},o&&{onEntered:v},i&&{onExit:y},s&&{onExiting:w},c&&{onExited:E},u&&{addEndListener:_},{children:"function"==typeof d?(e,t)=>d(e,Object.assign({},t,{ref:h})):(0,a.cloneElement)(d,{ref:h})})}(function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,u));return(0,c.jsx)(r,Object.assign({ref:t},o))}));function f({children:e,in:t,onExited:r,onEntered:s,transition:l}){const[c,u]=(0,a.useState)(!t);t&&c&&u(!1);const d=function({in:e,onTransition:t}){const r=(0,a.useRef)(null),n=(0,a.useRef)(!0),s=(0,o.A)(t);return(0,i.A)((()=>{if(!r.current)return;let t=!1;return s({in:e,element:r.current,initial:n.current,isStale:()=>t}),()=>{t=!0}}),[e,s]),(0,i.A)((()=>(n.current=!1,()=>{n.current=!0})),[]),r}({in:!!t,onTransition:e=>{Promise.resolve(l(e)).then((()=>{e.isStale()||(e.in?null==s||s(e.element,e.initial):(u(!0),null==r||r(e.element)))}),(t=>{throw e.in||u(!0),t}))}}),f=(0,n.A)(d,e.ref);return c&&!t?null:(0,a.cloneElement)(e,{ref:f})}function p(e,t,r){return e?(0,c.jsx)(d,Object.assign({},r,{component:e})):t?(0,c.jsx)(f,Object.assign({},r,{transition:t})):(0,c.jsx)(s.A,Object.assign({},r))}},22818:(e,t,r)=>{"use strict";r.d(t,{A:()=>S});var n=r(91625);function o(e){void 0===e&&(e=(0,n.A)());try{var t=e.activeElement;return t&&t.nodeName?t:null}catch(t){return e.body}}var i=r(56406),a=r(87828),s=r(1284),l=r(96540),c=r(40961),u=r(48880),d=r(91577),f=r(4103),p=r(17895),h=r(61629),m=r(64561),g=r(82810),b=r(46500),v=r(4024),y=r(74848);const w=["show","role","className","style","children","backdrop","keyboard","onBackdropClick","onEscapeKeyDown","transition","runTransition","backdropTransition","runBackdropTransition","autoFocus","enforceFocus","restoreFocus","restoreFocusOptions","renderDialog","renderBackdrop","manager","container","onShow","onHide","onExit","onExited","onExiting","onEnter","onEntering","onEntered"];let E;const _=(0,l.forwardRef)(((e,t)=>{let{show:r=!1,role:n="dialog",className:_,style:S,children:x,backdrop:A=!0,keyboard:T=!0,onBackdropClick:C,onEscapeKeyDown:k,transition:O,runTransition:R,backdropTransition:N,runBackdropTransition:I,autoFocus:M=!0,enforceFocus:P=!0,restoreFocus:D=!0,restoreFocusOptions:L,renderDialog:F,renderBackdrop:B=(e=>(0,y.jsx)("div",Object.assign({},e))),manager:U,container:j,onShow:z,onHide:H=(()=>{}),onExit:G,onExited:W,onExiting:q,onEnter:V,onEntering:Y,onEntered:K}=e,X=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,w);const Z=(0,g.A)(),Q=(0,m.A)(j),J=function(e){const t=(0,g.A)(),r=e||function(e){return E||(E=new h.A({ownerDocument:null==e?void 0:e.document})),E}(t),n=(0,l.useRef)({dialog:null,backdrop:null});return Object.assign(n.current,{add:()=>r.add(n.current),remove:()=>r.remove(n.current),isTopModal:()=>r.isTopModal(n.current),setDialogRef:(0,l.useCallback)((e=>{n.current.dialog=e}),[]),setBackdropRef:(0,l.useCallback)((e=>{n.current.backdrop=e}),[])})}(U),$=(0,u.A)(),ee=(0,f.A)(r),[te,re]=(0,l.useState)(!r),ne=(0,l.useRef)(null);(0,l.useImperativeHandle)(t,(()=>J),[J]),a.A&&!ee&&r&&(ne.current=o(null==Z?void 0:Z.document)),r&&te&&re(!1);const oe=(0,p.A)((()=>{if(J.add(),ue.current=(0,s.A)(document,"keydown",le),ce.current=(0,s.A)(document,"focus",(()=>setTimeout(ae)),!0),z&&z(),M){var e,t;const r=o(null!=(e=null==(t=J.dialog)?void 0:t.ownerDocument)?e:null==Z?void 0:Z.document);J.dialog&&r&&!(0,i.A)(J.dialog,r)&&(ne.current=r,J.dialog.focus())}})),ie=(0,p.A)((()=>{var e;J.remove(),null==ue.current||ue.current(),null==ce.current||ce.current(),D&&(null==(e=ne.current)||null==e.focus||e.focus(L),ne.current=null)}));(0,l.useEffect)((()=>{r&&Q&&oe()}),[r,Q,oe]),(0,l.useEffect)((()=>{te&&ie()}),[te,ie]),(0,d.A)((()=>{ie()}));const ae=(0,p.A)((()=>{if(!P||!$()||!J.isTopModal())return;const e=o(null==Z?void 0:Z.document);J.dialog&&e&&!(0,i.A)(J.dialog,e)&&J.dialog.focus()})),se=(0,p.A)((e=>{e.target===e.currentTarget&&(null==C||C(e),!0===A&&H())})),le=(0,p.A)((e=>{T&&(0,v.v)(e)&&J.isTopModal()&&(null==k||k(e),e.defaultPrevented||H())})),ce=(0,l.useRef)(),ue=(0,l.useRef)();if(!Q)return null;const de=Object.assign({role:n,ref:J.setDialogRef,"aria-modal":"dialog"===n||void 0},X,{style:S,className:_,tabIndex:-1});let fe=F?F(de):(0,y.jsx)("div",Object.assign({},de,{children:l.cloneElement(x,{role:"document"})}));fe=(0,b.Yc)(O,R,{unmountOnExit:!0,mountOnEnter:!0,appear:!0,in:!!r,onExit:G,onExiting:q,onExited:(...e)=>{re(!0),null==W||W(...e)},onEnter:V,onEntering:Y,onEntered:K,children:fe});let pe=null;return A&&(pe=B({ref:J.setBackdropRef,onClick:se}),pe=(0,b.Yc)(N,I,{in:!!r,appear:!0,mountOnEnter:!0,unmountOnExit:!0,children:pe})),(0,y.jsx)(y.Fragment,{children:c.createPortal((0,y.jsxs)(y.Fragment,{children:[pe,fe]}),Q)})}));_.displayName="Modal";const S=Object.assign(_,{Manager:h.A})},61629:(e,t,r)=>{"use strict";r.d(t,{A:()=>i});var n=r(62660);const o=(0,r(5182).sE)("modal-open"),i=class{constructor({ownerDocument:e,handleContainerOverflow:t=!0,isRTL:r=!1}={}){this.handleContainerOverflow=t,this.isRTL=r,this.modals=[],this.ownerDocument=e}getScrollbarWidth(){return function(e=document){const t=e.defaultView;return Math.abs(t.innerWidth-e.documentElement.clientWidth)}(this.ownerDocument)}getElement(){return(this.ownerDocument||document).body}setModalAttributes(e){}removeModalAttributes(e){}setContainerStyle(e){const t={overflow:"hidden"},r=this.isRTL?"paddingLeft":"paddingRight",i=this.getElement();e.style={overflow:i.style.overflow,[r]:i.style[r]},e.scrollBarWidth&&(t[r]=`${parseInt((0,n.A)(i,r)||"0",10)+e.scrollBarWidth}px`),i.setAttribute(o,""),(0,n.A)(i,t)}reset(){[...this.modals].forEach((e=>this.remove(e)))}removeContainerStyle(e){const t=this.getElement();t.removeAttribute(o),Object.assign(t.style,e.style)}add(e){let t=this.modals.indexOf(e);return-1!==t||(t=this.modals.length,this.modals.push(e),this.setModalAttributes(e),0!==t||(this.state={scrollBarWidth:this.getScrollbarWidth(),style:{}},this.handleContainerOverflow&&this.setContainerStyle(this.state))),t}remove(e){const t=this.modals.indexOf(e);-1!==t&&(this.modals.splice(t,1),!this.modals.length&&this.handleContainerOverflow&&this.removeContainerStyle(this.state),this.removeModalAttributes(e))}isTopModal(e){return!!this.modals.length&&this.modals[this.modals.length-1]===e}}},88978:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(17895),o=r(43804),i=r(96540);const a=function({children:e,in:t,onExited:r,mountOnEnter:a,unmountOnExit:s}){const l=(0,i.useRef)(null),c=(0,i.useRef)(t),u=(0,n.A)(r);(0,i.useEffect)((()=>{t?c.current=!0:u(l.current)}),[t,u]);const d=(0,o.A)(l,e.ref),f=(0,i.cloneElement)(e,{ref:d});return t?f:s||!c.current&&a?null:f}},64561:(e,t,r)=>{"use strict";r.d(t,{A:()=>l});var n=r(91625),o=r(87828),i=r(96540),a=r(82810);const s=(e,t)=>o.A?null==e?(t||(0,n.A)()).body:("function"==typeof e&&(e=e()),e&&"current"in e&&(e=e.current),e&&("nodeType"in e||e.getBoundingClientRect)?e:null):null;function l(e,t){const r=(0,a.A)(),[n,o]=(0,i.useState)((()=>s(e,null==r?void 0:r.document)));if(!n){const t=s(e);t&&o(t)}return(0,i.useEffect)((()=>{t&&n&&t(n)}),[t,n]),(0,i.useEffect)((()=>{const t=s(e);t!==n&&o(t)}),[e,n]),n}},82810:(e,t,r)=>{"use strict";r.d(t,{A:()=>a});var n=r(96540),o=r(87828);const i=(0,n.createContext)(o.A?window:void 0);function a(){return(0,n.useContext)(i)}i.Provider},4024:(e,t,r)=>{"use strict";function n(e){return"Escape"===e.code||27===e.keyCode}r.d(t,{v:()=>n})},8690:(e,t,r)=>{"use strict";var n=r(96540),o="function"==typeof Object.is?Object.is:function(e,t){return e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t},i=n.useState,a=n.useEffect,s=n.useLayoutEffect,l=n.useDebugValue;function c(e){var t=e.getSnapshot;e=e.value;try{var r=t();return!o(e,r)}catch(e){return!0}}var u="undefined"==typeof window||void 0===window.document||void 0===window.document.createElement?function(e,t){return t()}:function(e,t){var r=t(),n=i({inst:{value:r,getSnapshot:t}}),o=n[0].inst,u=n[1];return s((function(){o.value=r,o.getSnapshot=t,c(o)&&u({inst:o})}),[e,r,t]),a((function(){return c(o)&&u({inst:o}),e((function(){c(o)&&u({inst:o})}))}),[e]),l(r),r};t.useSyncExternalStore=void 0!==n.useSyncExternalStore?n.useSyncExternalStore:u},35779:(e,t,r)=>{"use strict";e.exports=r(8690)},19214:(e,t,r)=>{"use strict";const n=r(67591),o=/^[\da-fA-F]+$/,i=/^\d+$/,a=new WeakMap;function s(e){e=e.Parser.acorn||e;let t=a.get(e);if(!t){const r=e.tokTypes,n=e.TokContext,o=e.TokenType,i=new n("... ",!0,!0),c={tc_oTag:i,tc_cTag:s,tc_expr:l},u={jsxName:new o("jsxName"),jsxText:new o("jsxText",{beforeExpr:!0}),jsxTagStart:new o("jsxTagStart",{startsExpr:!0}),jsxTagEnd:new o("jsxTagEnd")};u.jsxTagStart.updateContext=function(){this.context.push(l),this.context.push(i),this.exprAllowed=!1},u.jsxTagEnd.updateContext=function(e){let t=this.context.pop();t===i&&e===r.slash||t===s?(this.context.pop(),this.exprAllowed=this.curContext()===l):this.exprAllowed=!0},t={tokContexts:c,tokTypes:u},a.set(e,t)}return t}function l(e){return e?"JSXIdentifier"===e.type?e.name:"JSXNamespacedName"===e.type?e.namespace.name+":"+e.name.name:"JSXMemberExpression"===e.type?l(e.object)+"."+l(e.property):void 0:e}e.exports=function(e){return e=e||{},function(t){return function(e,t){const a=t.acorn||r(48630),c=s(a),u=a.tokTypes,d=c.tokTypes,f=a.tokContexts,p=c.tokContexts.tc_oTag,h=c.tokContexts.tc_cTag,m=c.tokContexts.tc_expr,g=a.isNewLine,b=a.isIdentifierStart,v=a.isIdentifierChar;return class extends t{static get acornJsx(){return c}jsx_readToken(){let e="",t=this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated JSX contents");let r=this.input.charCodeAt(this.pos);switch(r){case 60:case 123:return this.pos===this.start?60===r&&this.exprAllowed?(++this.pos,this.finishToken(d.jsxTagStart)):this.getTokenFromCode(r):(e+=this.input.slice(t,this.pos),this.finishToken(d.jsxText,e));case 38:e+=this.input.slice(t,this.pos),e+=this.jsx_readEntity(),t=this.pos;break;case 62:case 125:this.raise(this.pos,"Unexpected token `"+this.input[this.pos]+"`. Did you mean `"+(62===r?">":"}")+'` or `{"'+this.input[this.pos]+'"}`?');default:g(r)?(e+=this.input.slice(t,this.pos),e+=this.jsx_readNewLine(!0),t=this.pos):++this.pos}}}jsx_readNewLine(e){let t,r=this.input.charCodeAt(this.pos);return++this.pos,13===r&&10===this.input.charCodeAt(this.pos)?(++this.pos,t=e?"\n":"\r\n"):t=String.fromCharCode(r),this.options.locations&&(++this.curLine,this.lineStart=this.pos),t}jsx_readString(e){let t="",r=++this.pos;for(;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");let n=this.input.charCodeAt(this.pos);if(n===e)break;38===n?(t+=this.input.slice(r,this.pos),t+=this.jsx_readEntity(),r=this.pos):g(n)?(t+=this.input.slice(r,this.pos),t+=this.jsx_readNewLine(!1),r=this.pos):++this.pos}return t+=this.input.slice(r,this.pos++),this.finishToken(u.string,t)}jsx_readEntity(){let e,t="",r=0,a=this.input[this.pos];"&"!==a&&this.raise(this.pos,"Entity must start with an ampersand");let s=++this.pos;for(;this.pos")}let a=o.name?"Element":"Fragment";return r["opening"+a]=o,r["closing"+a]=i,r.children=n,this.type===u.relational&&"<"===this.value&&this.raise(this.start,"Adjacent JSX elements must be wrapped in an enclosing tag"),this.finishNode(r,"JSX"+a)}jsx_parseText(){let e=this.parseLiteral(this.value);return e.type="JSXText",e}jsx_parseElement(){let e=this.start,t=this.startLoc;return this.next(),this.jsx_parseElementAt(e,t)}parseExprAtom(e){return this.type===d.jsxText?this.jsx_parseText():this.type===d.jsxTagStart?this.jsx_parseElement():super.parseExprAtom(e)}readToken(e){let t=this.curContext();if(t===m)return this.jsx_readToken();if(t===p||t===h){if(b(e))return this.jsx_readWord();if(62==e)return++this.pos,this.finishToken(d.jsxTagEnd);if((34===e||39===e)&&t==p)return this.jsx_readString(e)}return 60===e&&this.exprAllowed&&33!==this.input.charCodeAt(this.pos+1)?(++this.pos,this.finishToken(d.jsxTagStart)):super.readToken(e)}updateContext(e){if(this.type==u.braceL){var t=this.curContext();t==p?this.context.push(f.b_expr):t==m?this.context.push(f.b_tmpl):super.updateContext(e),this.exprAllowed=!0}else{if(this.type!==u.slash||e!==d.jsxTagStart)return super.updateContext(e);this.context.length-=2,this.context.push(h),this.exprAllowed=!1}}}}({allowNamespaces:!1!==e.allowNamespaces,allowNamespacedObjects:!!e.allowNamespacedObjects},t)}},Object.defineProperty(e.exports,"tokTypes",{get:function(){return s(r(48630)).tokTypes},configurable:!0,enumerable:!0})},67591:e=>{e.exports={quot:'"',amp:"&",apos:"'",lt:"<",gt:">",nbsp:" ",iexcl:"¡",cent:"¢",pound:"£",curren:"¤",yen:"¥",brvbar:"¦",sect:"§",uml:"¨",copy:"©",ordf:"ª",laquo:"«",not:"¬",shy:"",reg:"®",macr:"¯",deg:"°",plusmn:"±",sup2:"²",sup3:"³",acute:"´",micro:"µ",para:"¶",middot:"·",cedil:"¸",sup1:"¹",ordm:"º",raquo:"»",frac14:"¼",frac12:"½",frac34:"¾",iquest:"¿",Agrave:"À",Aacute:"Á",Acirc:"Â",Atilde:"Ã",Auml:"Ä",Aring:"Å",AElig:"Æ",Ccedil:"Ç",Egrave:"È",Eacute:"É",Ecirc:"Ê",Euml:"Ë",Igrave:"Ì",Iacute:"Í",Icirc:"Î",Iuml:"Ï",ETH:"Ð",Ntilde:"Ñ",Ograve:"Ò",Oacute:"Ó",Ocirc:"Ô",Otilde:"Õ",Ouml:"Ö",times:"×",Oslash:"Ø",Ugrave:"Ù",Uacute:"Ú",Ucirc:"Û",Uuml:"Ü",Yacute:"Ý",THORN:"Þ",szlig:"ß",agrave:"à",aacute:"á",acirc:"â",atilde:"ã",auml:"ä",aring:"å",aelig:"æ",ccedil:"ç",egrave:"è",eacute:"é",ecirc:"ê",euml:"ë",igrave:"ì",iacute:"í",icirc:"î",iuml:"ï",eth:"ð",ntilde:"ñ",ograve:"ò",oacute:"ó",ocirc:"ô",otilde:"õ",ouml:"ö",divide:"÷",oslash:"ø",ugrave:"ù",uacute:"ú",ucirc:"û",uuml:"ü",yacute:"ý",thorn:"þ",yuml:"ÿ",OElig:"Œ",oelig:"œ",Scaron:"Š",scaron:"š",Yuml:"Ÿ",fnof:"ƒ",circ:"ˆ",tilde:"˜",Alpha:"Α",Beta:"Β",Gamma:"Γ",Delta:"Δ",Epsilon:"Ε",Zeta:"Ζ",Eta:"Η",Theta:"Θ",Iota:"Ι",Kappa:"Κ",Lambda:"Λ",Mu:"Μ",Nu:"Ν",Xi:"Ξ",Omicron:"Ο",Pi:"Π",Rho:"Ρ",Sigma:"Σ",Tau:"Τ",Upsilon:"Υ",Phi:"Φ",Chi:"Χ",Psi:"Ψ",Omega:"Ω",alpha:"α",beta:"β",gamma:"γ",delta:"δ",epsilon:"ε",zeta:"ζ",eta:"η",theta:"θ",iota:"ι",kappa:"κ",lambda:"λ",mu:"μ",nu:"ν",xi:"ξ",omicron:"ο",pi:"π",rho:"ρ",sigmaf:"ς",sigma:"σ",tau:"τ",upsilon:"υ",phi:"φ",chi:"χ",psi:"ψ",omega:"ω",thetasym:"ϑ",upsih:"ϒ",piv:"ϖ",ensp:" ",emsp:" ",thinsp:" ",zwnj:"",zwj:"",lrm:"",rlm:"",ndash:"–",mdash:"—",lsquo:"‘",rsquo:"’",sbquo:"‚",ldquo:"“",rdquo:"”",bdquo:"„",dagger:"†",Dagger:"‡",bull:"•",hellip:"…",permil:"‰",prime:"′",Prime:"″",lsaquo:"‹",rsaquo:"›",oline:"‾",frasl:"⁄",euro:"€",image:"ℑ",weierp:"℘",real:"ℜ",trade:"™",alefsym:"ℵ",larr:"←",uarr:"↑",rarr:"→",darr:"↓",harr:"↔",crarr:"↵",lArr:"⇐",uArr:"⇑",rArr:"⇒",dArr:"⇓",hArr:"⇔",forall:"∀",part:"∂",exist:"∃",empty:"∅",nabla:"∇",isin:"∈",notin:"∉",ni:"∋",prod:"∏",sum:"∑",minus:"−",lowast:"∗",radic:"√",prop:"∝",infin:"∞",ang:"∠",and:"∧",or:"∨",cap:"∩",cup:"∪",int:"∫",there4:"∴",sim:"∼",cong:"≅",asymp:"≈",ne:"≠",equiv:"≡",le:"≤",ge:"≥",sub:"⊂",sup:"⊃",nsub:"⊄",sube:"⊆",supe:"⊇",oplus:"⊕",otimes:"⊗",perp:"⊥",sdot:"⋅",lceil:"⌈",rceil:"⌉",lfloor:"⌊",rfloor:"⌋",lang:"〈",rang:"〉",loz:"◊",spades:"♠",clubs:"♣",hearts:"♥",diams:"♦"}},48630:function(e,t){!function(e){"use strict";var t=[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],r=[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,16,621,2467,541,1507,4938,6,4191],n="ªµºÀ-ÖØ-öø-ˁˆ-ˑˠ-ˤˬˮͰ-ʹͶͷͺ-ͽͿΆΈ-ΊΌΎ-ΡΣ-ϵϷ-ҁҊ-ԯԱ-Ֆՙՠ-ֈא-תׯ-ײؠ-يٮٯٱ-ۓەۥۦۮۯۺ-ۼۿܐܒ-ܯݍ-ޥޱߊ-ߪߴߵߺࠀ-ࠕࠚࠤࠨࡀ-ࡘࡠ-ࡪࡰ-ࢇࢉ-ࢎࢠ-ࣉऄ-हऽॐक़-ॡॱ-ঀঅ-ঌএঐও-নপ-রলশ-হঽৎড়ঢ়য়-ৡৰৱৼਅ-ਊਏਐਓ-ਨਪ-ਰਲਲ਼ਵਸ਼ਸਹਖ਼-ੜਫ਼ੲ-ੴઅ-ઍએ-ઑઓ-નપ-રલળવ-હઽૐૠૡૹଅ-ଌଏଐଓ-ନପ-ରଲଳଵ-ହଽଡ଼ଢ଼ୟ-ୡୱஃஅ-ஊஎ-ஐஒ-கஙசஜஞடணதந-பம-ஹௐఅ-ఌఎ-ఐఒ-నప-హఽౘ-ౚౝౠౡಀಅ-ಌಎ-ಐಒ-ನಪ-ಳವ-ಹಽೝೞೠೡೱೲഄ-ഌഎ-ഐഒ-ഺഽൎൔ-ൖൟ-ൡൺ-ൿඅ-ඖක-නඳ-රලව-ෆก-ะาำเ-ๆກຂຄຆ-ຊຌ-ຣລວ-ະາຳຽເ-ໄໆໜ-ໟༀཀ-ཇཉ-ཬྈ-ྌက-ဪဿၐ-ၕၚ-ၝၡၥၦၮ-ၰၵ-ႁႎႠ-ჅჇჍა-ჺჼ-ቈቊ-ቍቐ-ቖቘቚ-ቝበ-ኈኊ-ኍነ-ኰኲ-ኵኸ-ኾዀዂ-ዅወ-ዖዘ-ጐጒ-ጕጘ-ፚᎀ-ᎏᎠ-Ᏽᏸ-ᏽᐁ-ᙬᙯ-ᙿᚁ-ᚚᚠ-ᛪᛮ-ᛸᜀ-ᜑᜟ-ᜱᝀ-ᝑᝠ-ᝬᝮ-ᝰក-ឳៗៜᠠ-ᡸᢀ-ᢨᢪᢰ-ᣵᤀ-ᤞᥐ-ᥭᥰ-ᥴᦀ-ᦫᦰ-ᧉᨀ-ᨖᨠ-ᩔᪧᬅ-ᬳᭅ-ᭌᮃ-ᮠᮮᮯᮺ-ᯥᰀ-ᰣᱍ-ᱏᱚ-ᱽᲀ-ᲈᲐ-ᲺᲽ-Ჿᳩ-ᳬᳮ-ᳳᳵᳶᳺᴀ-ᶿḀ-ἕἘ-Ἕἠ-ὅὈ-Ὅὐ-ὗὙὛὝὟ-ώᾀ-ᾴᾶ-ᾼιῂ-ῄῆ-ῌῐ-ΐῖ-Ίῠ-Ῥῲ-ῴῶ-ῼⁱⁿₐ-ₜℂℇℊ-ℓℕ℘-ℝℤΩℨK-ℹℼ-ℿⅅ-ⅉⅎⅠ-ↈⰀ-ⳤⳫ-ⳮⳲⳳⴀ-ⴥⴧⴭⴰ-ⵧⵯⶀ-ⶖⶠ-ⶦⶨ-ⶮⶰ-ⶶⶸ-ⶾⷀ-ⷆⷈ-ⷎⷐ-ⷖⷘ-ⷞ々-〇〡-〩〱-〵〸-〼ぁ-ゖ゛-ゟァ-ヺー-ヿㄅ-ㄯㄱ-ㆎㆠ-ㆿㇰ-ㇿ㐀-䶿一-ꒌꓐ-ꓽꔀ-ꘌꘐ-ꘟꘪꘫꙀ-ꙮꙿ-ꚝꚠ-ꛯꜗ-ꜟꜢ-ꞈꞋ-ꟊꟐꟑꟓꟕ-ꟙꟲ-ꠁꠃ-ꠅꠇ-ꠊꠌ-ꠢꡀ-ꡳꢂ-ꢳꣲ-ꣷꣻꣽꣾꤊ-ꤥꤰ-ꥆꥠ-ꥼꦄ-ꦲꧏꧠ-ꧤꧦ-ꧯꧺ-ꧾꨀ-ꨨꩀ-ꩂꩄ-ꩋꩠ-ꩶꩺꩾ-ꪯꪱꪵꪶꪹ-ꪽꫀꫂꫛ-ꫝꫠ-ꫪꫲ-ꫴꬁ-ꬆꬉ-ꬎꬑ-ꬖꬠ-ꬦꬨ-ꬮꬰ-ꭚꭜ-ꭩꭰ-ꯢ가-힣ힰ-ퟆퟋ-ퟻ豈-舘並-龎ff-stﬓ-ﬗיִײַ-ﬨשׁ-זּטּ-לּמּנּסּףּפּצּ-ﮱﯓ-ﴽﵐ-ﶏﶒ-ﷇﷰ-ﷻﹰ-ﹴﹶ-ﻼA-Za-zヲ-하-ᅦᅧ-ᅬᅭ-ᅲᅳ-ᅵ",o={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"},i="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",a={5:i,"5module":i+" export import",6:i+" const class extends export import super"},s=/^in(stanceof)?$/,l=new RegExp("["+n+"]"),c=new RegExp("["+n+"·̀-ͯ·҃-֑҇-ׇֽֿׁׂׅׄؐ-ًؚ-٩ٰۖ-ۜ۟-۪ۤۧۨ-ۭ۰-۹ܑܰ-݊ަ-ް߀-߉߫-߽߳ࠖ-࠙ࠛ-ࠣࠥ-ࠧࠩ-࡙࠭-࡛࢘-࢟࣊-ࣣ࣡-ःऺ-़ा-ॏ॑-ॗॢॣ०-९ঁ-ঃ়া-ৄেৈো-্ৗৢৣ০-৯৾ਁ-ਃ਼ਾ-ੂੇੈੋ-੍ੑ੦-ੱੵઁ-ઃ઼ા-ૅે-ૉો-્ૢૣ૦-૯ૺ-૿ଁ-ଃ଼ା-ୄେୈୋ-୍୕-ୗୢୣ୦-୯ஂா-ூெ-ைொ-்ௗ௦-௯ఀ-ఄ఼ా-ౄె-ైొ-్ౕౖౢౣ౦-౯ಁ-ಃ಼ಾ-ೄೆ-ೈೊ-್ೕೖೢೣ೦-೯ೳഀ-ഃ഻഼ാ-ൄെ-ൈൊ-്ൗൢൣ൦-൯ඁ-ඃ්ා-ුූෘ-ෟ෦-෯ෲෳัิ-ฺ็-๎๐-๙ັິ-ຼ່-໎໐-໙༘༙༠-༩༹༵༷༾༿ཱ-྄྆྇ྍ-ྗྙ-ྼ࿆ါ-ှ၀-၉ၖ-ၙၞ-ၠၢ-ၤၧ-ၭၱ-ၴႂ-ႍႏ-ႝ፝-፟፩-፱ᜒ-᜕ᜲ-᜴ᝒᝓᝲᝳ឴-៓៝០-៩᠋-᠍᠏-᠙ᢩᤠ-ᤫᤰ-᤻᥆-᥏᧐-᧚ᨗ-ᨛᩕ-ᩞ᩠-᩿᩼-᪉᪐-᪙᪰-᪽ᪿ-ᫎᬀ-ᬄ᬴-᭄᭐-᭙᭫-᭳ᮀ-ᮂᮡ-ᮭ᮰-᮹᯦-᯳ᰤ-᰷᱀-᱉᱐-᱙᳐-᳔᳒-᳨᳭᳴᳷-᳹᷀-᷿‿⁀⁔⃐-⃥⃜⃡-⃰⳯-⵿⳱ⷠ-〪ⷿ-゙゚〯・꘠-꘩꙯ꙴ-꙽ꚞꚟ꛰꛱ꠂ꠆ꠋꠣ-ꠧ꠬ꢀꢁꢴ-ꣅ꣐-꣙꣠-꣱ꣿ-꤉ꤦ-꤭ꥇ-꥓ꦀ-ꦃ꦳-꧀꧐-꧙ꧥ꧰-꧹ꨩ-ꨶꩃꩌꩍ꩐-꩙ꩻ-ꩽꪰꪲ-ꪴꪷꪸꪾ꪿꫁ꫫ-ꫯꫵ꫶ꯣ-ꯪ꯬꯭꯰-꯹ﬞ︀-️︠-︯︳︴﹍-﹏0-9_・]");function u(e,t){for(var r=65536,n=0;ne)return!1;if((r+=t[n+1])>=e)return!0}return!1}function d(e,t){return e<65?36===e:e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&l.test(String.fromCharCode(e)):!1!==t&&u(e,r)))}function f(e,n){return e<48?36===e:e<58||!(e<65)&&(e<91||(e<97?95===e:e<123||(e<=65535?e>=170&&c.test(String.fromCharCode(e)):!1!==n&&(u(e,r)||u(e,t)))))}var p=function(e,t){void 0===t&&(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 h(e,t){return new p(e,{beforeExpr:!0,binop:t})}var m={beforeExpr:!0},g={startsExpr:!0},b={};function v(e,t){return void 0===t&&(t={}),t.keyword=e,b[e]=new p(e,t)}var y={num:new p("num",g),regexp:new p("regexp",g),string:new p("string",g),name:new p("name",g),privateId:new p("privateId",g),eof:new p("eof"),bracketL:new p("[",{beforeExpr:!0,startsExpr:!0}),bracketR:new p("]"),braceL:new p("{",{beforeExpr:!0,startsExpr:!0}),braceR:new p("}"),parenL:new p("(",{beforeExpr:!0,startsExpr:!0}),parenR:new p(")"),comma:new p(",",m),semi:new p(";",m),colon:new p(":",m),dot:new p("."),question:new p("?",m),questionDot:new p("?."),arrow:new p("=>",m),template:new p("template"),invalidTemplate:new p("invalidTemplate"),ellipsis:new p("...",m),backQuote:new p("`",g),dollarBraceL:new p("${",{beforeExpr:!0,startsExpr:!0}),eq:new p("=",{beforeExpr:!0,isAssign:!0}),assign:new p("_=",{beforeExpr:!0,isAssign:!0}),incDec:new p("++/--",{prefix:!0,postfix:!0,startsExpr:!0}),prefix:new p("!/~",{beforeExpr:!0,prefix:!0,startsExpr:!0}),logicalOR:h("||",1),logicalAND:h("&&",2),bitwiseOR:h("|",3),bitwiseXOR:h("^",4),bitwiseAND:h("&",5),equality:h("==/!=/===/!==",6),relational:h(">/<=/>=",7),bitShift:h("<>>/>>>",8),plusMin:new p("+/-",{beforeExpr:!0,binop:9,prefix:!0,startsExpr:!0}),modulo:h("%",10),star:h("*",10),slash:h("/",10),starstar:new p("**",{beforeExpr:!0}),coalesce:h("??",1),_break:v("break"),_case:v("case",m),_catch:v("catch"),_continue:v("continue"),_debugger:v("debugger"),_default:v("default",m),_do:v("do",{isLoop:!0,beforeExpr:!0}),_else:v("else",m),_finally:v("finally"),_for:v("for",{isLoop:!0}),_function:v("function",g),_if:v("if"),_return:v("return",m),_switch:v("switch"),_throw:v("throw",m),_try:v("try"),_var:v("var"),_const:v("const"),_while:v("while",{isLoop:!0}),_with:v("with"),_new:v("new",{beforeExpr:!0,startsExpr:!0}),_this:v("this",g),_super:v("super",g),_class:v("class",g),_extends:v("extends",m),_export:v("export"),_import:v("import",g),_null:v("null",g),_true:v("true",g),_false:v("false",g),_in:v("in",{beforeExpr:!0,binop:7}),_instanceof:v("instanceof",{beforeExpr:!0,binop:7}),_typeof:v("typeof",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_void:v("void",{beforeExpr:!0,prefix:!0,startsExpr:!0}),_delete:v("delete",{beforeExpr:!0,prefix:!0,startsExpr:!0})},w=/\r\n?|\n|\u2028|\u2029/,E=new RegExp(w.source,"g");function _(e){return 10===e||13===e||8232===e||8233===e}function S(e,t,r){void 0===r&&(r=e.length);for(var n=t;n>10),56320+(1023&e)))}var P=/(?:[\uD800-\uDBFF](?![\uDC00-\uDFFF])|(?:[^\uD800-\uDBFF]|^)[\uDC00-\uDFFF])/,D=function(e,t){this.line=e,this.column=t};D.prototype.offset=function(e){return new D(this.line,this.column+e)};var L=function(e,t,r){this.start=t,this.end=r,null!==e.sourceFile&&(this.source=e.sourceFile)};function F(e,t){for(var r=1,n=0;;){var o=S(e,n,t);if(o<0)return new D(r,t-n);++r,n=o}}var B={ecmaVersion:null,sourceType:"script",onInsertedSemicolon:null,onTrailingComma:null,allowReserved:null,allowReturnOutsideFunction:!1,allowImportExportEverywhere:!1,allowAwaitOutsideFunction:null,allowSuperOutsideMethod:null,allowHashBang:!1,checkPrivateFields:!0,locations:!1,onToken:null,onComment:null,ranges:!1,program:null,sourceFile:null,directSourceFile:null,preserveParens:!1},U=!1;function j(e){var t={};for(var r in B)t[r]=e&&O(e,r)?e[r]:B[r];if("latest"===t.ecmaVersion?t.ecmaVersion=1e8:null==t.ecmaVersion?(!U&&"object"==typeof console&&console.warn&&(U=!0,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):t.ecmaVersion>=2015&&(t.ecmaVersion-=2009),null==t.allowReserved&&(t.allowReserved=t.ecmaVersion<5),e&&null!=e.allowHashBang||(t.allowHashBang=t.ecmaVersion>=14),R(t.onToken)){var n=t.onToken;t.onToken=function(e){return n.push(e)}}return R(t.onComment)&&(t.onComment=function(e,t){return function(r,n,o,i,a,s){var l={type:r?"Block":"Line",value:n,start:o,end:i};e.locations&&(l.loc=new L(this,a,s)),e.ranges&&(l.range=[o,i]),t.push(l)}}(t,t.onComment)),t}var z=256;function H(e,t){return 2|(e?4:0)|(t?8:0)}var G=function(e,t,r){this.options=e=j(e),this.sourceFile=e.sourceFile,this.keywords=I(a[e.ecmaVersion>=6?6:"module"===e.sourceType?"5module":5]);var n="";!0!==e.allowReserved&&(n=o[e.ecmaVersion>=6?6:5===e.ecmaVersion?5:3],"module"===e.sourceType&&(n+=" await")),this.reservedWords=I(n);var i=(n?n+" ":"")+o.strict;this.reservedWordsStrict=I(i),this.reservedWordsStrictBind=I(i+" "+o.strictBind),this.input=String(t),this.containsEsc=!1,r?(this.pos=r,this.lineStart=this.input.lastIndexOf("\n",r-1)+1,this.curLine=this.input.slice(0,this.lineStart).split(w).length):(this.pos=this.lineStart=0,this.curLine=1),this.type=y.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=!0,this.inModule="module"===e.sourceType,this.strict=this.inModule||this.strictDirective(this.pos),this.potentialArrowAt=-1,this.potentialArrowInForAwait=!1,this.yieldPos=this.awaitPos=this.awaitIdentPos=0,this.labels=[],this.undefinedExports=Object.create(null),0===this.pos&&e.allowHashBang&&"#!"===this.input.slice(0,2)&&this.skipLineComment(2),this.scopeStack=[],this.enterScope(1),this.regexpState=null,this.privateNameStack=[]},W={inFunction:{configurable:!0},inGenerator:{configurable:!0},inAsync:{configurable:!0},canAwait:{configurable:!0},allowSuper:{configurable:!0},allowDirectSuper:{configurable:!0},treatFunctionsAsVar:{configurable:!0},allowNewDotTarget:{configurable:!0},inClassStaticBlock:{configurable:!0}};G.prototype.parse=function(){var e=this.options.program||this.startNode();return this.nextToken(),this.parseTopLevel(e)},W.inFunction.get=function(){return(2&this.currentVarScope().flags)>0},W.inGenerator.get=function(){return(8&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},W.inAsync.get=function(){return(4&this.currentVarScope().flags)>0&&!this.currentVarScope().inClassFieldInit},W.canAwait.get=function(){for(var e=this.scopeStack.length-1;e>=0;e--){var t=this.scopeStack[e];if(t.inClassFieldInit||t.flags&z)return!1;if(2&t.flags)return(4&t.flags)>0}return this.inModule&&this.options.ecmaVersion>=13||this.options.allowAwaitOutsideFunction},W.allowSuper.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(64&t)>0||r||this.options.allowSuperOutsideMethod},W.allowDirectSuper.get=function(){return(128&this.currentThisScope().flags)>0},W.treatFunctionsAsVar.get=function(){return this.treatFunctionsAsVarInScope(this.currentScope())},W.allowNewDotTarget.get=function(){var e=this.currentThisScope(),t=e.flags,r=e.inClassFieldInit;return(258&t)>0||r},W.inClassStaticBlock.get=function(){return(this.currentVarScope().flags&z)>0},G.extend=function(){for(var e=[],t=arguments.length;t--;)e[t]=arguments[t];for(var r=this,n=0;n=,?^&]/.test(o)||"!"===o&&"="===this.input.charAt(n+1))}e+=t[0].length,A.lastIndex=e,e+=A.exec(this.input)[0].length,";"===this.input[e]&&e++}},q.eat=function(e){return this.type===e&&(this.next(),!0)},q.isContextual=function(e){return this.type===y.name&&this.value===e&&!this.containsEsc},q.eatContextual=function(e){return!!this.isContextual(e)&&(this.next(),!0)},q.expectContextual=function(e){this.eatContextual(e)||this.unexpected()},q.canInsertSemicolon=function(){return this.type===y.eof||this.type===y.braceR||w.test(this.input.slice(this.lastTokEnd,this.start))},q.insertSemicolon=function(){if(this.canInsertSemicolon())return this.options.onInsertedSemicolon&&this.options.onInsertedSemicolon(this.lastTokEnd,this.lastTokEndLoc),!0},q.semicolon=function(){this.eat(y.semi)||this.insertSemicolon()||this.unexpected()},q.afterTrailingComma=function(e,t){if(this.type===e)return this.options.onTrailingComma&&this.options.onTrailingComma(this.lastTokStart,this.lastTokStartLoc),t||this.next(),!0},q.expect=function(e){this.eat(e)||this.unexpected()},q.unexpected=function(e){this.raise(null!=e?e:this.start,"Unexpected token")};var Y=function(){this.shorthandAssign=this.trailingComma=this.parenthesizedAssign=this.parenthesizedBind=this.doubleProto=-1};q.checkPatternErrors=function(e,t){if(e){e.trailingComma>-1&&this.raiseRecoverable(e.trailingComma,"Comma is not permitted after the rest element");var r=t?e.parenthesizedAssign:e.parenthesizedBind;r>-1&&this.raiseRecoverable(r,t?"Assigning to rvalue":"Parenthesized pattern")}},q.checkExpressionErrors=function(e,t){if(!e)return!1;var r=e.shorthandAssign,n=e.doubleProto;if(!t)return r>=0||n>=0;r>=0&&this.raise(r,"Shorthand property assignments are valid only in destructuring patterns"),n>=0&&this.raiseRecoverable(n,"Redefinition of __proto__ property")},q.checkYieldAwaitInDefaultParams=function(){this.yieldPos&&(!this.awaitPos||this.yieldPos55295&&n<56320)return!0;if(d(n,!0)){for(var o=r+1;f(n=this.input.charCodeAt(o),!0);)++o;if(92===n||n>55295&&n<56320)return!0;var i=this.input.slice(r,o);if(!s.test(i))return!0}return!1},K.isAsyncFunction=function(){if(this.options.ecmaVersion<8||!this.isContextual("async"))return!1;A.lastIndex=this.pos;var e,t=A.exec(this.input),r=this.pos+t[0].length;return!(w.test(this.input.slice(this.pos,r))||"function"!==this.input.slice(r,r+8)||r+8!==this.input.length&&(f(e=this.input.charCodeAt(r+8))||e>55295&&e<56320))},K.parseStatement=function(e,t,r){var n,o=this.type,i=this.startNode();switch(this.isLet(e)&&(o=y._var,n="let"),o){case y._break:case y._continue:return this.parseBreakContinueStatement(i,o.keyword);case y._debugger:return this.parseDebuggerStatement(i);case y._do:return this.parseDoStatement(i);case y._for:return this.parseForStatement(i);case y._function:return e&&(this.strict||"if"!==e&&"label"!==e)&&this.options.ecmaVersion>=6&&this.unexpected(),this.parseFunctionStatement(i,!1,!e);case y._class:return e&&this.unexpected(),this.parseClass(i,!0);case y._if:return this.parseIfStatement(i);case y._return:return this.parseReturnStatement(i);case y._switch:return this.parseSwitchStatement(i);case y._throw:return this.parseThrowStatement(i);case y._try:return this.parseTryStatement(i);case y._const:case y._var:return n=n||this.value,e&&"var"!==n&&this.unexpected(),this.parseVarStatement(i,n);case y._while:return this.parseWhileStatement(i);case y._with:return this.parseWithStatement(i);case y.braceL:return this.parseBlock(!0,i);case y.semi:return this.parseEmptyStatement(i);case y._export:case y._import:if(this.options.ecmaVersion>10&&o===y._import){A.lastIndex=this.pos;var a=A.exec(this.input),s=this.pos+a[0].length,l=this.input.charCodeAt(s);if(40===l||46===l)return this.parseExpressionStatement(i,this.parseExpression())}return this.options.allowImportExportEverywhere||(t||this.raise(this.start,"'import' and 'export' may only appear at the top level"),this.inModule||this.raise(this.start,"'import' and 'export' may appear only with 'sourceType: module'")),o===y._import?this.parseImport(i):this.parseExport(i,r);default:if(this.isAsyncFunction())return e&&this.unexpected(),this.next(),this.parseFunctionStatement(i,!0,!e);var c=this.value,u=this.parseExpression();return o===y.name&&"Identifier"===u.type&&this.eat(y.colon)?this.parseLabeledStatement(i,c,u,e):this.parseExpressionStatement(i,u)}},K.parseBreakContinueStatement=function(e,t){var r="break"===t;this.next(),this.eat(y.semi)||this.insertSemicolon()?e.label=null:this.type!==y.name?this.unexpected():(e.label=this.parseIdent(),this.semicolon());for(var n=0;n=6?this.eat(y.semi):this.semicolon(),this.finishNode(e,"DoWhileStatement")},K.parseForStatement=function(e){this.next();var t=this.options.ecmaVersion>=9&&this.canAwait&&this.eatContextual("await")?this.lastTokStart:-1;if(this.labels.push(X),this.enterScope(0),this.expect(y.parenL),this.type===y.semi)return t>-1&&this.unexpected(t),this.parseFor(e,null);var r=this.isLet();if(this.type===y._var||this.type===y._const||r){var n=this.startNode(),o=r?"let":this.value;return this.next(),this.parseVar(n,!0,o),this.finishNode(n,"VariableDeclaration"),(this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of"))&&1===n.declarations.length?(this.options.ecmaVersion>=9&&(this.type===y._in?t>-1&&this.unexpected(t):e.await=t>-1),this.parseForIn(e,n)):(t>-1&&this.unexpected(t),this.parseFor(e,n))}var i=this.isContextual("let"),a=!1,s=new Y,l=this.parseExpression(!(t>-1)||"await",s);return this.type===y._in||(a=this.options.ecmaVersion>=6&&this.isContextual("of"))?(this.options.ecmaVersion>=9&&(this.type===y._in?t>-1&&this.unexpected(t):e.await=t>-1),i&&a&&this.raise(l.start,"The left-hand side of a for-of loop may not start with 'let'."),this.toAssignable(l,!1,s),this.checkLValPattern(l),this.parseForIn(e,l)):(this.checkExpressionErrors(s,!0),t>-1&&this.unexpected(t),this.parseFor(e,l))},K.parseFunctionStatement=function(e,t,r){return this.next(),this.parseFunction(e,J|(r?0:$),!1,t)},K.parseIfStatement=function(e){return this.next(),e.test=this.parseParenExpression(),e.consequent=this.parseStatement("if"),e.alternate=this.eat(y._else)?this.parseStatement("if"):null,this.finishNode(e,"IfStatement")},K.parseReturnStatement=function(e){return this.inFunction||this.options.allowReturnOutsideFunction||this.raise(this.start,"'return' outside of function"),this.next(),this.eat(y.semi)||this.insertSemicolon()?e.argument=null:(e.argument=this.parseExpression(),this.semicolon()),this.finishNode(e,"ReturnStatement")},K.parseSwitchStatement=function(e){var t;this.next(),e.discriminant=this.parseParenExpression(),e.cases=[],this.expect(y.braceL),this.labels.push(Z),this.enterScope(0);for(var r=!1;this.type!==y.braceR;)if(this.type===y._case||this.type===y._default){var n=this.type===y._case;t&&this.finishNode(t,"SwitchCase"),e.cases.push(t=this.startNode()),t.consequent=[],this.next(),n?t.test=this.parseExpression():(r&&this.raiseRecoverable(this.lastTokStart,"Multiple default clauses"),r=!0,t.test=null),this.expect(y.colon)}else t||this.unexpected(),t.consequent.push(this.parseStatement(null));return this.exitScope(),t&&this.finishNode(t,"SwitchCase"),this.next(),this.labels.pop(),this.finishNode(e,"SwitchStatement")},K.parseThrowStatement=function(e){return this.next(),w.test(this.input.slice(this.lastTokEnd,this.start))&&this.raise(this.lastTokEnd,"Illegal newline after throw"),e.argument=this.parseExpression(),this.semicolon(),this.finishNode(e,"ThrowStatement")};var Q=[];K.parseCatchClauseParam=function(){var e=this.parseBindingAtom(),t="Identifier"===e.type;return this.enterScope(t?32:0),this.checkLValPattern(e,t?4:2),this.expect(y.parenR),e},K.parseTryStatement=function(e){if(this.next(),e.block=this.parseBlock(),e.handler=null,this.type===y._catch){var t=this.startNode();this.next(),this.eat(y.parenL)?t.param=this.parseCatchClauseParam():(this.options.ecmaVersion<10&&this.unexpected(),t.param=null,this.enterScope(0)),t.body=this.parseBlock(!1),this.exitScope(),e.handler=this.finishNode(t,"CatchClause")}return e.finalizer=this.eat(y._finally)?this.parseBlock():null,e.handler||e.finalizer||this.raise(e.start,"Missing catch or finally clause"),this.finishNode(e,"TryStatement")},K.parseVarStatement=function(e,t,r){return this.next(),this.parseVar(e,!1,t,r),this.semicolon(),this.finishNode(e,"VariableDeclaration")},K.parseWhileStatement=function(e){return this.next(),e.test=this.parseParenExpression(),this.labels.push(X),e.body=this.parseStatement("while"),this.labels.pop(),this.finishNode(e,"WhileStatement")},K.parseWithStatement=function(e){return this.strict&&this.raise(this.start,"'with' in strict mode"),this.next(),e.object=this.parseParenExpression(),e.body=this.parseStatement("with"),this.finishNode(e,"WithStatement")},K.parseEmptyStatement=function(e){return this.next(),this.finishNode(e,"EmptyStatement")},K.parseLabeledStatement=function(e,t,r,n){for(var o=0,i=this.labels;o=0;s--){var l=this.labels[s];if(l.statementStart!==e.start)break;l.statementStart=this.start,l.kind=a}return this.labels.push({name:t,kind:a,statementStart:this.start}),e.body=this.parseStatement(n?-1===n.indexOf("label")?n+"label":n:"label"),this.labels.pop(),e.label=r,this.finishNode(e,"LabeledStatement")},K.parseExpressionStatement=function(e,t){return e.expression=t,this.semicolon(),this.finishNode(e,"ExpressionStatement")},K.parseBlock=function(e,t,r){for(void 0===e&&(e=!0),void 0===t&&(t=this.startNode()),t.body=[],this.expect(y.braceL),e&&this.enterScope(0);this.type!==y.braceR;){var n=this.parseStatement(null);t.body.push(n)}return r&&(this.strict=!1),this.next(),e&&this.exitScope(),this.finishNode(t,"BlockStatement")},K.parseFor=function(e,t){return e.init=t,this.expect(y.semi),e.test=this.type===y.semi?null:this.parseExpression(),this.expect(y.semi),e.update=this.type===y.parenR?null:this.parseExpression(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,"ForStatement")},K.parseForIn=function(e,t){var r=this.type===y._in;return this.next(),"VariableDeclaration"===t.type&&null!=t.declarations[0].init&&(!r||this.options.ecmaVersion<8||this.strict||"var"!==t.kind||"Identifier"!==t.declarations[0].id.type)&&this.raise(t.start,(r?"for-in":"for-of")+" loop variable declaration may not have an initializer"),e.left=t,e.right=r?this.parseExpression():this.parseMaybeAssign(),this.expect(y.parenR),e.body=this.parseStatement("for"),this.exitScope(),this.labels.pop(),this.finishNode(e,r?"ForInStatement":"ForOfStatement")},K.parseVar=function(e,t,r,n){for(e.declarations=[],e.kind=r;;){var o=this.startNode();if(this.parseVarId(o,r),this.eat(y.eq)?o.init=this.parseMaybeAssign(t):n||"const"!==r||this.type===y._in||this.options.ecmaVersion>=6&&this.isContextual("of")?n||"Identifier"===o.id.type||t&&(this.type===y._in||this.isContextual("of"))?o.init=null:this.raise(this.lastTokEnd,"Complex binding patterns require an initialization value"):this.unexpected(),e.declarations.push(this.finishNode(o,"VariableDeclarator")),!this.eat(y.comma))break}return e},K.parseVarId=function(e,t){e.id=this.parseBindingAtom(),this.checkLValPattern(e.id,"var"===t?1:2,!1)};var J=1,$=2;function ee(e,t){var r=t.key.name,n=e[r],o="true";return"MethodDefinition"!==t.type||"get"!==t.kind&&"set"!==t.kind||(o=(t.static?"s":"i")+t.kind),"iget"===n&&"iset"===o||"iset"===n&&"iget"===o||"sget"===n&&"sset"===o||"sset"===n&&"sget"===o?(e[r]="true",!1):!!n||(e[r]=o,!1)}function te(e,t){var r=e.computed,n=e.key;return!r&&("Identifier"===n.type&&n.name===t||"Literal"===n.type&&n.value===t)}K.parseFunction=function(e,t,r,n,o){this.initFunction(e),(this.options.ecmaVersion>=9||this.options.ecmaVersion>=6&&!n)&&(this.type===y.star&&t&$&&this.unexpected(),e.generator=this.eat(y.star)),this.options.ecmaVersion>=8&&(e.async=!!n),t&J&&(e.id=4&t&&this.type!==y.name?null:this.parseIdent(),!e.id||t&$||this.checkLValSimple(e.id,this.strict||e.generator||e.async?this.treatFunctionsAsVar?1:2:3));var i=this.yieldPos,a=this.awaitPos,s=this.awaitIdentPos;return this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(H(e.async,e.generator)),t&J||(e.id=this.type===y.name?this.parseIdent():null),this.parseFunctionParams(e),this.parseFunctionBody(e,r,!1,o),this.yieldPos=i,this.awaitPos=a,this.awaitIdentPos=s,this.finishNode(e,t&J?"FunctionDeclaration":"FunctionExpression")},K.parseFunctionParams=function(e){this.expect(y.parenL),e.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams()},K.parseClass=function(e,t){this.next();var r=this.strict;this.strict=!0,this.parseClassId(e,t),this.parseClassSuper(e);var n=this.enterClassBody(),o=this.startNode(),i=!1;for(o.body=[],this.expect(y.braceL);this.type!==y.braceR;){var a=this.parseClassElement(null!==e.superClass);a&&(o.body.push(a),"MethodDefinition"===a.type&&"constructor"===a.kind?(i&&this.raiseRecoverable(a.start,"Duplicate constructor in the same class"),i=!0):a.key&&"PrivateIdentifier"===a.key.type&&ee(n,a)&&this.raiseRecoverable(a.key.start,"Identifier '#"+a.key.name+"' has already been declared"))}return this.strict=r,this.next(),e.body=this.finishNode(o,"ClassBody"),this.exitClassBody(),this.finishNode(e,t?"ClassDeclaration":"ClassExpression")},K.parseClassElement=function(e){if(this.eat(y.semi))return null;var t=this.options.ecmaVersion,r=this.startNode(),n="",o=!1,i=!1,a="method",s=!1;if(this.eatContextual("static")){if(t>=13&&this.eat(y.braceL))return this.parseClassStaticBlock(r),r;this.isClassElementNameStart()||this.type===y.star?s=!0:n="static"}if(r.static=s,!n&&t>=8&&this.eatContextual("async")&&(!this.isClassElementNameStart()&&this.type!==y.star||this.canInsertSemicolon()?n="async":i=!0),!n&&(t>=9||!i)&&this.eat(y.star)&&(o=!0),!n&&!i&&!o){var l=this.value;(this.eatContextual("get")||this.eatContextual("set"))&&(this.isClassElementNameStart()?a=l:n=l)}if(n?(r.computed=!1,r.key=this.startNodeAt(this.lastTokStart,this.lastTokStartLoc),r.key.name=n,this.finishNode(r.key,"Identifier")):this.parseClassElementName(r),t<13||this.type===y.parenL||"method"!==a||o||i){var c=!r.static&&te(r,"constructor"),u=c&&e;c&&"method"!==a&&this.raise(r.key.start,"Constructor can't have get/set modifier"),r.kind=c?"constructor":a,this.parseClassMethod(r,o,i,u)}else this.parseClassField(r);return r},K.isClassElementNameStart=function(){return this.type===y.name||this.type===y.privateId||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword},K.parseClassElementName=function(e){this.type===y.privateId?("constructor"===this.value&&this.raise(this.start,"Classes can't have an element named '#constructor'"),e.computed=!1,e.key=this.parsePrivateIdent()):this.parsePropertyName(e)},K.parseClassMethod=function(e,t,r,n){var o=e.key;"constructor"===e.kind?(t&&this.raise(o.start,"Constructor can't be a generator"),r&&this.raise(o.start,"Constructor can't be an async method")):e.static&&te(e,"prototype")&&this.raise(o.start,"Classes may not have a static property named prototype");var i=e.value=this.parseMethod(t,r,n);return"get"===e.kind&&0!==i.params.length&&this.raiseRecoverable(i.start,"getter should have no params"),"set"===e.kind&&1!==i.params.length&&this.raiseRecoverable(i.start,"setter should have exactly one param"),"set"===e.kind&&"RestElement"===i.params[0].type&&this.raiseRecoverable(i.params[0].start,"Setter cannot use rest params"),this.finishNode(e,"MethodDefinition")},K.parseClassField=function(e){if(te(e,"constructor")?this.raise(e.key.start,"Classes can't have a field named 'constructor'"):e.static&&te(e,"prototype")&&this.raise(e.key.start,"Classes can't have a static field named 'prototype'"),this.eat(y.eq)){var t=this.currentThisScope(),r=t.inClassFieldInit;t.inClassFieldInit=!0,e.value=this.parseMaybeAssign(),t.inClassFieldInit=r}else e.value=null;return this.semicolon(),this.finishNode(e,"PropertyDefinition")},K.parseClassStaticBlock=function(e){e.body=[];var t=this.labels;for(this.labels=[],this.enterScope(320);this.type!==y.braceR;){var r=this.parseStatement(null);e.body.push(r)}return this.next(),this.exitScope(),this.labels=t,this.finishNode(e,"StaticBlock")},K.parseClassId=function(e,t){this.type===y.name?(e.id=this.parseIdent(),t&&this.checkLValSimple(e.id,2,!1)):(!0===t&&this.unexpected(),e.id=null)},K.parseClassSuper=function(e){e.superClass=this.eat(y._extends)?this.parseExprSubscripts(null,!1):null},K.enterClassBody=function(){var e={declared:Object.create(null),used:[]};return this.privateNameStack.push(e),e.declared},K.exitClassBody=function(){var e=this.privateNameStack.pop(),t=e.declared,r=e.used;if(this.options.checkPrivateFields)for(var n=this.privateNameStack.length,o=0===n?null:this.privateNameStack[n-1],i=0;i=11&&(this.eatContextual("as")?(e.exported=this.parseModuleExportName(),this.checkExport(t,e.exported,this.lastTokStart)):e.exported=null),this.expectContextual("from"),this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom(),this.semicolon(),this.finishNode(e,"ExportAllDeclaration")},K.parseExport=function(e,t){if(this.next(),this.eat(y.star))return this.parseExportAllDeclaration(e,t);if(this.eat(y._default))return this.checkExport(t,"default",this.lastTokStart),e.declaration=this.parseExportDefaultDeclaration(),this.finishNode(e,"ExportDefaultDeclaration");if(this.shouldParseExportStatement())e.declaration=this.parseExportDeclaration(e),"VariableDeclaration"===e.declaration.type?this.checkVariableExport(t,e.declaration.declarations):this.checkExport(t,e.declaration.id,e.declaration.id.start),e.specifiers=[],e.source=null;else{if(e.declaration=null,e.specifiers=this.parseExportSpecifiers(t),this.eatContextual("from"))this.type!==y.string&&this.unexpected(),e.source=this.parseExprAtom();else{for(var r=0,n=e.specifiers;r=13&&this.type===y.string){var e=this.parseLiteral(this.value);return P.test(e.value)&&this.raise(e.start,"An export name cannot include a lone surrogate."),e}return this.parseIdent(!0)},K.adaptDirectivePrologue=function(e){for(var t=0;t=5&&"ExpressionStatement"===e.type&&"Literal"===e.expression.type&&"string"==typeof e.expression.value&&('"'===this.input[e.start]||"'"===this.input[e.start])};var re=G.prototype;re.toAssignable=function(e,t,r){if(this.options.ecmaVersion>=6&&e)switch(e.type){case"Identifier":this.inAsync&&"await"===e.name&&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",r&&this.checkPatternErrors(r,!0);for(var n=0,o=e.properties;n=6)switch(this.type){case y.bracketL:var e=this.startNode();return this.next(),e.elements=this.parseBindingList(y.bracketR,!0,!0),this.finishNode(e,"ArrayPattern");case y.braceL:return this.parseObj(!0)}return this.parseIdent()},re.parseBindingList=function(e,t,r,n){for(var o=[],i=!0;!this.eat(e);)if(i?i=!1:this.expect(y.comma),t&&this.type===y.comma)o.push(null);else{if(r&&this.afterTrailingComma(e))break;if(this.type===y.ellipsis){var a=this.parseRestBinding();this.parseBindingListItem(a),o.push(a),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.expect(e);break}o.push(this.parseAssignableListItem(n))}return o},re.parseAssignableListItem=function(e){var t=this.parseMaybeDefault(this.start,this.startLoc);return this.parseBindingListItem(t),t},re.parseBindingListItem=function(e){return e},re.parseMaybeDefault=function(e,t,r){if(r=r||this.parseBindingAtom(),this.options.ecmaVersion<6||!this.eat(y.eq))return r;var n=this.startNodeAt(e,t);return n.left=r,n.right=this.parseMaybeAssign(),this.finishNode(n,"AssignmentPattern")},re.checkLValSimple=function(e,t,r){void 0===t&&(t=0);var n=0!==t;switch(e.type){case"Identifier":this.strict&&this.reservedWordsStrictBind.test(e.name)&&this.raiseRecoverable(e.start,(n?"Binding ":"Assigning to ")+e.name+" in strict mode"),n&&(2===t&&"let"===e.name&&this.raiseRecoverable(e.start,"let is disallowed as a lexically bound name"),r&&(O(r,e.name)&&this.raiseRecoverable(e.start,"Argument name clash"),r[e.name]=!0),5!==t&&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":n&&this.raiseRecoverable(e.start,"Binding member expression");break;case"ParenthesizedExpression":return n&&this.raiseRecoverable(e.start,"Binding parenthesized expression"),this.checkLValSimple(e.expression,t,r);default:this.raise(e.start,(n?"Binding":"Assigning to")+" rvalue")}},re.checkLValPattern=function(e,t,r){switch(void 0===t&&(t=0),e.type){case"ObjectPattern":for(var n=0,o=e.properties;n=1;e--){var t=this.context[e];if("function"===t.token)return t.generator}return!1},ie.updateContext=function(e){var t,r=this.type;r.keyword&&e===y.dot?this.exprAllowed=!1:(t=r.updateContext)?t.call(this,e):this.exprAllowed=r.beforeExpr},ie.overrideContext=function(e){this.curContext()!==e&&(this.context[this.context.length-1]=e)},y.parenR.updateContext=y.braceR.updateContext=function(){if(1!==this.context.length){var e=this.context.pop();e===oe.b_stat&&"function"===this.curContext().token&&(e=this.context.pop()),this.exprAllowed=!e.isExpr}else this.exprAllowed=!0},y.braceL.updateContext=function(e){this.context.push(this.braceIsBlock(e)?oe.b_stat:oe.b_expr),this.exprAllowed=!0},y.dollarBraceL.updateContext=function(){this.context.push(oe.b_tmpl),this.exprAllowed=!0},y.parenL.updateContext=function(e){var t=e===y._if||e===y._for||e===y._with||e===y._while;this.context.push(t?oe.p_stat:oe.p_expr),this.exprAllowed=!0},y.incDec.updateContext=function(){},y._function.updateContext=y._class.updateContext=function(e){!e.beforeExpr||e===y._else||e===y.semi&&this.curContext()!==oe.p_stat||e===y._return&&w.test(this.input.slice(this.lastTokEnd,this.start))||(e===y.colon||e===y.braceL)&&this.curContext()===oe.b_stat?this.context.push(oe.f_stat):this.context.push(oe.f_expr),this.exprAllowed=!1},y.colon.updateContext=function(){"function"===this.curContext().token&&this.context.pop(),this.exprAllowed=!0},y.backQuote.updateContext=function(){this.curContext()===oe.q_tmpl?this.context.pop():this.context.push(oe.q_tmpl),this.exprAllowed=!1},y.star.updateContext=function(e){if(e===y._function){var t=this.context.length-1;this.context[t]===oe.f_expr?this.context[t]=oe.f_expr_gen:this.context[t]=oe.f_gen}this.exprAllowed=!0},y.name.updateContext=function(e){var t=!1;this.options.ecmaVersion>=6&&e!==y.dot&&("of"===this.value&&!this.exprAllowed||"yield"===this.value&&this.inGeneratorContext())&&(t=!0),this.exprAllowed=t};var ae=G.prototype;function se(e){return"MemberExpression"===e.type&&"PrivateIdentifier"===e.property.type||"ChainExpression"===e.type&&se(e.expression)}ae.checkPropClash=function(e,t,r){if(!(this.options.ecmaVersion>=9&&"SpreadElement"===e.type||this.options.ecmaVersion>=6&&(e.computed||e.method||e.shorthand))){var n,o=e.key;switch(o.type){case"Identifier":n=o.name;break;case"Literal":n=String(o.value);break;default:return}var i=e.kind;if(this.options.ecmaVersion>=6)"__proto__"===n&&"init"===i&&(t.proto&&(r?r.doubleProto<0&&(r.doubleProto=o.start):this.raiseRecoverable(o.start,"Redefinition of __proto__ property")),t.proto=!0);else{var a=t[n="$"+n];a?("init"===i?this.strict&&a.init||a.get||a.set:a.init||a[i])&&this.raiseRecoverable(o.start,"Redefinition of property"):a=t[n]={init:!1,get:!1,set:!1},a[i]=!0}}},ae.parseExpression=function(e,t){var r=this.start,n=this.startLoc,o=this.parseMaybeAssign(e,t);if(this.type===y.comma){var i=this.startNodeAt(r,n);for(i.expressions=[o];this.eat(y.comma);)i.expressions.push(this.parseMaybeAssign(e,t));return this.finishNode(i,"SequenceExpression")}return o},ae.parseMaybeAssign=function(e,t,r){if(this.isContextual("yield")){if(this.inGenerator)return this.parseYield(e);this.exprAllowed=!1}var n=!1,o=-1,i=-1,a=-1;t?(o=t.parenthesizedAssign,i=t.trailingComma,a=t.doubleProto,t.parenthesizedAssign=t.trailingComma=-1):(t=new Y,n=!0);var s=this.start,l=this.startLoc;this.type!==y.parenL&&this.type!==y.name||(this.potentialArrowAt=this.start,this.potentialArrowInForAwait="await"===e);var c=this.parseMaybeConditional(e,t);if(r&&(c=r.call(this,c,s,l)),this.type.isAssign){var u=this.startNodeAt(s,l);return u.operator=this.value,this.type===y.eq&&(c=this.toAssignable(c,!1,t)),n||(t.parenthesizedAssign=t.trailingComma=t.doubleProto=-1),t.shorthandAssign>=c.start&&(t.shorthandAssign=-1),this.type===y.eq?this.checkLValPattern(c):this.checkLValSimple(c),u.left=c,this.next(),u.right=this.parseMaybeAssign(e),a>-1&&(t.doubleProto=a),this.finishNode(u,"AssignmentExpression")}return n&&this.checkExpressionErrors(t,!0),o>-1&&(t.parenthesizedAssign=o),i>-1&&(t.trailingComma=i),c},ae.parseMaybeConditional=function(e,t){var r=this.start,n=this.startLoc,o=this.parseExprOps(e,t);if(this.checkExpressionErrors(t))return o;if(this.eat(y.question)){var i=this.startNodeAt(r,n);return i.test=o,i.consequent=this.parseMaybeAssign(),this.expect(y.colon),i.alternate=this.parseMaybeAssign(e),this.finishNode(i,"ConditionalExpression")}return o},ae.parseExprOps=function(e,t){var r=this.start,n=this.startLoc,o=this.parseMaybeUnary(t,!1,!1,e);return this.checkExpressionErrors(t)||o.start===r&&"ArrowFunctionExpression"===o.type?o:this.parseExprOp(o,r,n,-1,e)},ae.parseExprOp=function(e,t,r,n,o){var i=this.type.binop;if(null!=i&&(!o||this.type!==y._in)&&i>n){var a=this.type===y.logicalOR||this.type===y.logicalAND,s=this.type===y.coalesce;s&&(i=y.logicalAND.binop);var l=this.value;this.next();var c=this.start,u=this.startLoc,d=this.parseExprOp(this.parseMaybeUnary(null,!1,!1,o),c,u,i,o),f=this.buildBinary(t,r,e,d,l,a||s);return(a&&this.type===y.coalesce||s&&(this.type===y.logicalOR||this.type===y.logicalAND))&&this.raiseRecoverable(this.start,"Logical expressions and coalesce expressions cannot be mixed. Wrap either by parentheses"),this.parseExprOp(f,t,r,n,o)}return e},ae.buildBinary=function(e,t,r,n,o,i){"PrivateIdentifier"===n.type&&this.raise(n.start,"Private identifier can only be left side of binary expression");var a=this.startNodeAt(e,t);return a.left=r,a.operator=o,a.right=n,this.finishNode(a,i?"LogicalExpression":"BinaryExpression")},ae.parseMaybeUnary=function(e,t,r,n){var o,i=this.start,a=this.startLoc;if(this.isContextual("await")&&this.canAwait)o=this.parseAwait(n),t=!0;else if(this.type.prefix){var s=this.startNode(),l=this.type===y.incDec;s.operator=this.value,s.prefix=!0,this.next(),s.argument=this.parseMaybeUnary(null,!0,l,n),this.checkExpressionErrors(e,!0),l?this.checkLValSimple(s.argument):this.strict&&"delete"===s.operator&&"Identifier"===s.argument.type?this.raiseRecoverable(s.start,"Deleting local variable in strict mode"):"delete"===s.operator&&se(s.argument)?this.raiseRecoverable(s.start,"Private fields can not be deleted"):t=!0,o=this.finishNode(s,l?"UpdateExpression":"UnaryExpression")}else if(t||this.type!==y.privateId){if(o=this.parseExprSubscripts(e,n),this.checkExpressionErrors(e))return o;for(;this.type.postfix&&!this.canInsertSemicolon();){var c=this.startNodeAt(i,a);c.operator=this.value,c.prefix=!1,c.argument=o,this.checkLValSimple(o),this.next(),o=this.finishNode(c,"UpdateExpression")}}else(n||0===this.privateNameStack.length)&&this.options.checkPrivateFields&&this.unexpected(),o=this.parsePrivateIdent(),this.type!==y._in&&this.unexpected();return r||!this.eat(y.starstar)?o:t?void this.unexpected(this.lastTokStart):this.buildBinary(i,a,o,this.parseMaybeUnary(null,!1,!1,n),"**",!1)},ae.parseExprSubscripts=function(e,t){var r=this.start,n=this.startLoc,o=this.parseExprAtom(e,t);if("ArrowFunctionExpression"===o.type&&")"!==this.input.slice(this.lastTokStart,this.lastTokEnd))return o;var i=this.parseSubscripts(o,r,n,!1,t);return e&&"MemberExpression"===i.type&&(e.parenthesizedAssign>=i.start&&(e.parenthesizedAssign=-1),e.parenthesizedBind>=i.start&&(e.parenthesizedBind=-1),e.trailingComma>=i.start&&(e.trailingComma=-1)),i},ae.parseSubscripts=function(e,t,r,n,o){for(var i=this.options.ecmaVersion>=8&&"Identifier"===e.type&&"async"===e.name&&this.lastTokEnd===e.end&&!this.canInsertSemicolon()&&e.end-e.start==5&&this.potentialArrowAt===e.start,a=!1;;){var s=this.parseSubscript(e,t,r,n,i,a,o);if(s.optional&&(a=!0),s===e||"ArrowFunctionExpression"===s.type){if(a){var l=this.startNodeAt(t,r);l.expression=s,s=this.finishNode(l,"ChainExpression")}return s}e=s}},ae.shouldParseAsyncArrow=function(){return!this.canInsertSemicolon()&&this.eat(y.arrow)},ae.parseSubscriptAsyncArrow=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!0,n)},ae.parseSubscript=function(e,t,r,n,o,i,a){var s=this.options.ecmaVersion>=11,l=s&&this.eat(y.questionDot);n&&l&&this.raise(this.lastTokStart,"Optional chaining cannot appear in the callee of new expressions");var c=this.eat(y.bracketL);if(c||l&&this.type!==y.parenL&&this.type!==y.backQuote||this.eat(y.dot)){var u=this.startNodeAt(t,r);u.object=e,c?(u.property=this.parseExpression(),this.expect(y.bracketR)):this.type===y.privateId&&"Super"!==e.type?u.property=this.parsePrivateIdent():u.property=this.parseIdent("never"!==this.options.allowReserved),u.computed=!!c,s&&(u.optional=l),e=this.finishNode(u,"MemberExpression")}else if(!n&&this.eat(y.parenL)){var d=new Y,f=this.yieldPos,p=this.awaitPos,h=this.awaitIdentPos;this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0;var m=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1,d);if(o&&!l&&this.shouldParseAsyncArrow())return this.checkPatternErrors(d,!1),this.checkYieldAwaitInDefaultParams(),this.awaitIdentPos>0&&this.raise(this.awaitIdentPos,"Cannot use 'await' as identifier inside an async function"),this.yieldPos=f,this.awaitPos=p,this.awaitIdentPos=h,this.parseSubscriptAsyncArrow(t,r,m,a);this.checkExpressionErrors(d,!0),this.yieldPos=f||this.yieldPos,this.awaitPos=p||this.awaitPos,this.awaitIdentPos=h||this.awaitIdentPos;var g=this.startNodeAt(t,r);g.callee=e,g.arguments=m,s&&(g.optional=l),e=this.finishNode(g,"CallExpression")}else if(this.type===y.backQuote){(l||i)&&this.raise(this.start,"Optional chaining cannot appear in the tag of tagged template expressions");var b=this.startNodeAt(t,r);b.tag=e,b.quasi=this.parseTemplate({isTagged:!0}),e=this.finishNode(b,"TaggedTemplateExpression")}return e},ae.parseExprAtom=function(e,t,r){this.type===y.slash&&this.readRegexp();var n,o=this.potentialArrowAt===this.start;switch(this.type){case y._super:return this.allowSuper||this.raise(this.start,"'super' keyword outside a method"),n=this.startNode(),this.next(),this.type!==y.parenL||this.allowDirectSuper||this.raise(n.start,"super() call outside constructor of a subclass"),this.type!==y.dot&&this.type!==y.bracketL&&this.type!==y.parenL&&this.unexpected(),this.finishNode(n,"Super");case y._this:return n=this.startNode(),this.next(),this.finishNode(n,"ThisExpression");case y.name:var i=this.start,a=this.startLoc,s=this.containsEsc,l=this.parseIdent(!1);if(this.options.ecmaVersion>=8&&!s&&"async"===l.name&&!this.canInsertSemicolon()&&this.eat(y._function))return this.overrideContext(oe.f_expr),this.parseFunction(this.startNodeAt(i,a),0,!1,!0,t);if(o&&!this.canInsertSemicolon()){if(this.eat(y.arrow))return this.parseArrowExpression(this.startNodeAt(i,a),[l],!1,t);if(this.options.ecmaVersion>=8&&"async"===l.name&&this.type===y.name&&!s&&(!this.potentialArrowInForAwait||"of"!==this.value||this.containsEsc))return l=this.parseIdent(!1),!this.canInsertSemicolon()&&this.eat(y.arrow)||this.unexpected(),this.parseArrowExpression(this.startNodeAt(i,a),[l],!0,t)}return l;case y.regexp:var c=this.value;return(n=this.parseLiteral(c.value)).regex={pattern:c.pattern,flags:c.flags},n;case y.num:case y.string:return this.parseLiteral(this.value);case y._null:case y._true:case y._false:return(n=this.startNode()).value=this.type===y._null?null:this.type===y._true,n.raw=this.type.keyword,this.next(),this.finishNode(n,"Literal");case y.parenL:var u=this.start,d=this.parseParenAndDistinguishExpression(o,t);return e&&(e.parenthesizedAssign<0&&!this.isSimpleAssignTarget(d)&&(e.parenthesizedAssign=u),e.parenthesizedBind<0&&(e.parenthesizedBind=u)),d;case y.bracketL:return n=this.startNode(),this.next(),n.elements=this.parseExprList(y.bracketR,!0,!0,e),this.finishNode(n,"ArrayExpression");case y.braceL:return this.overrideContext(oe.b_expr),this.parseObj(!1,e);case y._function:return n=this.startNode(),this.next(),this.parseFunction(n,0);case y._class:return this.parseClass(this.startNode(),!1);case y._new:return this.parseNew();case y.backQuote:return this.parseTemplate();case y._import:return this.options.ecmaVersion>=11?this.parseExprImport(r):this.unexpected();default:return this.parseExprAtomDefault()}},ae.parseExprAtomDefault=function(){this.unexpected()},ae.parseExprImport=function(e){var t=this.startNode();if(this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword import"),this.next(),this.type===y.parenL&&!e)return this.parseDynamicImport(t);if(this.type===y.dot){var r=this.startNodeAt(t.start,t.loc&&t.loc.start);return r.name="import",t.meta=this.finishNode(r,"Identifier"),this.parseImportMeta(t)}this.unexpected()},ae.parseDynamicImport=function(e){if(this.next(),e.source=this.parseMaybeAssign(),!this.eat(y.parenR)){var t=this.start;this.eat(y.comma)&&this.eat(y.parenR)?this.raiseRecoverable(t,"Trailing comma is not allowed in import()"):this.unexpected(t)}return this.finishNode(e,"ImportExpression")},ae.parseImportMeta=function(e){this.next();var t=this.containsEsc;return e.property=this.parseIdent(!0),"meta"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for import is 'import.meta'"),t&&this.raiseRecoverable(e.start,"'import.meta' must not contain escaped characters"),"module"===this.options.sourceType||this.options.allowImportExportEverywhere||this.raiseRecoverable(e.start,"Cannot use 'import.meta' outside a module"),this.finishNode(e,"MetaProperty")},ae.parseLiteral=function(e){var t=this.startNode();return t.value=e,t.raw=this.input.slice(this.start,this.end),110===t.raw.charCodeAt(t.raw.length-1)&&(t.bigint=t.raw.slice(0,-1).replace(/_/g,"")),this.next(),this.finishNode(t,"Literal")},ae.parseParenExpression=function(){this.expect(y.parenL);var e=this.parseExpression();return this.expect(y.parenR),e},ae.shouldParseArrow=function(e){return!this.canInsertSemicolon()},ae.parseParenAndDistinguishExpression=function(e,t){var r,n=this.start,o=this.startLoc,i=this.options.ecmaVersion>=8;if(this.options.ecmaVersion>=6){this.next();var a,s=this.start,l=this.startLoc,c=[],u=!0,d=!1,f=new Y,p=this.yieldPos,h=this.awaitPos;for(this.yieldPos=0,this.awaitPos=0;this.type!==y.parenR;){if(u?u=!1:this.expect(y.comma),i&&this.afterTrailingComma(y.parenR,!0)){d=!0;break}if(this.type===y.ellipsis){a=this.start,c.push(this.parseParenItem(this.parseRestBinding())),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element");break}c.push(this.parseMaybeAssign(!1,f,this.parseParenItem))}var m=this.lastTokEnd,g=this.lastTokEndLoc;if(this.expect(y.parenR),e&&this.shouldParseArrow(c)&&this.eat(y.arrow))return this.checkPatternErrors(f,!1),this.checkYieldAwaitInDefaultParams(),this.yieldPos=p,this.awaitPos=h,this.parseParenArrowList(n,o,c,t);c.length&&!d||this.unexpected(this.lastTokStart),a&&this.unexpected(a),this.checkExpressionErrors(f,!0),this.yieldPos=p||this.yieldPos,this.awaitPos=h||this.awaitPos,c.length>1?((r=this.startNodeAt(s,l)).expressions=c,this.finishNodeAt(r,"SequenceExpression",m,g)):r=c[0]}else r=this.parseParenExpression();if(this.options.preserveParens){var b=this.startNodeAt(n,o);return b.expression=r,this.finishNode(b,"ParenthesizedExpression")}return r},ae.parseParenItem=function(e){return e},ae.parseParenArrowList=function(e,t,r,n){return this.parseArrowExpression(this.startNodeAt(e,t),r,!1,n)};var le=[];ae.parseNew=function(){this.containsEsc&&this.raiseRecoverable(this.start,"Escape sequence in keyword new");var e=this.startNode();if(this.next(),this.options.ecmaVersion>=6&&this.type===y.dot){var t=this.startNodeAt(e.start,e.loc&&e.loc.start);t.name="new",e.meta=this.finishNode(t,"Identifier"),this.next();var r=this.containsEsc;return e.property=this.parseIdent(!0),"target"!==e.property.name&&this.raiseRecoverable(e.property.start,"The only valid meta property for new is 'new.target'"),r&&this.raiseRecoverable(e.start,"'new.target' must not contain escaped characters"),this.allowNewDotTarget||this.raiseRecoverable(e.start,"'new.target' can only be used in functions and class static block"),this.finishNode(e,"MetaProperty")}var n=this.start,o=this.startLoc;return e.callee=this.parseSubscripts(this.parseExprAtom(null,!1,!0),n,o,!0,!1),this.eat(y.parenL)?e.arguments=this.parseExprList(y.parenR,this.options.ecmaVersion>=8,!1):e.arguments=le,this.finishNode(e,"NewExpression")},ae.parseTemplateElement=function(e){var t=e.isTagged,r=this.startNode();return this.type===y.invalidTemplate?(t||this.raiseRecoverable(this.start,"Bad escape sequence in untagged template literal"),r.value={raw:this.value,cooked:null}):r.value={raw:this.input.slice(this.start,this.end).replace(/\r\n?/g,"\n"),cooked:this.value},this.next(),r.tail=this.type===y.backQuote,this.finishNode(r,"TemplateElement")},ae.parseTemplate=function(e){void 0===e&&(e={});var t=e.isTagged;void 0===t&&(t=!1);var r=this.startNode();this.next(),r.expressions=[];var n=this.parseTemplateElement({isTagged:t});for(r.quasis=[n];!n.tail;)this.type===y.eof&&this.raise(this.pos,"Unterminated template literal"),this.expect(y.dollarBraceL),r.expressions.push(this.parseExpression()),this.expect(y.braceR),r.quasis.push(n=this.parseTemplateElement({isTagged:t}));return this.next(),this.finishNode(r,"TemplateLiteral")},ae.isAsyncProp=function(e){return!e.computed&&"Identifier"===e.key.type&&"async"===e.key.name&&(this.type===y.name||this.type===y.num||this.type===y.string||this.type===y.bracketL||this.type.keyword||this.options.ecmaVersion>=9&&this.type===y.star)&&!w.test(this.input.slice(this.lastTokEnd,this.start))},ae.parseObj=function(e,t){var r=this.startNode(),n=!0,o={};for(r.properties=[],this.next();!this.eat(y.braceR);){if(n)n=!1;else if(this.expect(y.comma),this.options.ecmaVersion>=5&&this.afterTrailingComma(y.braceR))break;var i=this.parseProperty(e,t);e||this.checkPropClash(i,o,t),r.properties.push(i)}return this.finishNode(r,e?"ObjectPattern":"ObjectExpression")},ae.parseProperty=function(e,t){var r,n,o,i,a=this.startNode();if(this.options.ecmaVersion>=9&&this.eat(y.ellipsis))return e?(a.argument=this.parseIdent(!1),this.type===y.comma&&this.raiseRecoverable(this.start,"Comma is not permitted after the rest element"),this.finishNode(a,"RestElement")):(a.argument=this.parseMaybeAssign(!1,t),this.type===y.comma&&t&&t.trailingComma<0&&(t.trailingComma=this.start),this.finishNode(a,"SpreadElement"));this.options.ecmaVersion>=6&&(a.method=!1,a.shorthand=!1,(e||t)&&(o=this.start,i=this.startLoc),e||(r=this.eat(y.star)));var s=this.containsEsc;return this.parsePropertyName(a),!e&&!s&&this.options.ecmaVersion>=8&&!r&&this.isAsyncProp(a)?(n=!0,r=this.options.ecmaVersion>=9&&this.eat(y.star),this.parsePropertyName(a)):n=!1,this.parsePropertyValue(a,e,r,n,o,i,t,s),this.finishNode(a,"Property")},ae.parseGetterSetter=function(e){e.kind=e.key.name,this.parsePropertyName(e),e.value=this.parseMethod(!1);var t="get"===e.kind?0:1;if(e.value.params.length!==t){var r=e.value.start;"get"===e.kind?this.raiseRecoverable(r,"getter should have no params"):this.raiseRecoverable(r,"setter should have exactly one param")}else"set"===e.kind&&"RestElement"===e.value.params[0].type&&this.raiseRecoverable(e.value.params[0].start,"Setter cannot use rest params")},ae.parsePropertyValue=function(e,t,r,n,o,i,a,s){(r||n)&&this.type===y.colon&&this.unexpected(),this.eat(y.colon)?(e.value=t?this.parseMaybeDefault(this.start,this.startLoc):this.parseMaybeAssign(!1,a),e.kind="init"):this.options.ecmaVersion>=6&&this.type===y.parenL?(t&&this.unexpected(),e.kind="init",e.method=!0,e.value=this.parseMethod(r,n)):t||s||!(this.options.ecmaVersion>=5)||e.computed||"Identifier"!==e.key.type||"get"!==e.key.name&&"set"!==e.key.name||this.type===y.comma||this.type===y.braceR||this.type===y.eq?this.options.ecmaVersion>=6&&!e.computed&&"Identifier"===e.key.type?((r||n)&&this.unexpected(),this.checkUnreserved(e.key),"await"!==e.key.name||this.awaitIdentPos||(this.awaitIdentPos=o),e.kind="init",t?e.value=this.parseMaybeDefault(o,i,this.copyNode(e.key)):this.type===y.eq&&a?(a.shorthandAssign<0&&(a.shorthandAssign=this.start),e.value=this.parseMaybeDefault(o,i,this.copyNode(e.key))):e.value=this.copyNode(e.key),e.shorthand=!0):this.unexpected():((r||n)&&this.unexpected(),this.parseGetterSetter(e))},ae.parsePropertyName=function(e){if(this.options.ecmaVersion>=6){if(this.eat(y.bracketL))return e.computed=!0,e.key=this.parseMaybeAssign(),this.expect(y.bracketR),e.key;e.computed=!1}return e.key=this.type===y.num||this.type===y.string?this.parseExprAtom():this.parseIdent("never"!==this.options.allowReserved)},ae.initFunction=function(e){e.id=null,this.options.ecmaVersion>=6&&(e.generator=e.expression=!1),this.options.ecmaVersion>=8&&(e.async=!1)},ae.parseMethod=function(e,t,r){var n=this.startNode(),o=this.yieldPos,i=this.awaitPos,a=this.awaitIdentPos;return this.initFunction(n),this.options.ecmaVersion>=6&&(n.generator=e),this.options.ecmaVersion>=8&&(n.async=!!t),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,this.enterScope(64|H(t,n.generator)|(r?128:0)),this.expect(y.parenL),n.params=this.parseBindingList(y.parenR,!1,this.options.ecmaVersion>=8),this.checkYieldAwaitInDefaultParams(),this.parseFunctionBody(n,!1,!0,!1),this.yieldPos=o,this.awaitPos=i,this.awaitIdentPos=a,this.finishNode(n,"FunctionExpression")},ae.parseArrowExpression=function(e,t,r,n){var o=this.yieldPos,i=this.awaitPos,a=this.awaitIdentPos;return this.enterScope(16|H(r,!1)),this.initFunction(e),this.options.ecmaVersion>=8&&(e.async=!!r),this.yieldPos=0,this.awaitPos=0,this.awaitIdentPos=0,e.params=this.toAssignableList(t,!0),this.parseFunctionBody(e,!0,!1,n),this.yieldPos=o,this.awaitPos=i,this.awaitIdentPos=a,this.finishNode(e,"ArrowFunctionExpression")},ae.parseFunctionBody=function(e,t,r,n){var o=t&&this.type!==y.braceL,i=this.strict,a=!1;if(o)e.body=this.parseMaybeAssign(n),e.expression=!0,this.checkParams(e,!1);else{var s=this.options.ecmaVersion>=7&&!this.isSimpleParamList(e.params);i&&!s||(a=this.strictDirective(this.end))&&s&&this.raiseRecoverable(e.start,"Illegal 'use strict' directive in function with non-simple parameter list");var l=this.labels;this.labels=[],a&&(this.strict=!0),this.checkParams(e,!i&&!a&&!t&&!r&&this.isSimpleParamList(e.params)),this.strict&&e.id&&this.checkLValSimple(e.id,5),e.body=this.parseBlock(!1,void 0,a&&!i),e.expression=!1,this.adaptDirectivePrologue(e.body.body),this.labels=l}this.exitScope()},ae.isSimpleParamList=function(e){for(var t=0,r=e;t-1||o.functions.indexOf(e)>-1||o.var.indexOf(e)>-1,o.lexical.push(e),this.inModule&&1&o.flags&&delete this.undefinedExports[e]}else if(4===t)this.currentScope().lexical.push(e);else if(3===t){var i=this.currentScope();n=this.treatFunctionsAsVar?i.lexical.indexOf(e)>-1:i.lexical.indexOf(e)>-1||i.var.indexOf(e)>-1,i.functions.push(e)}else for(var a=this.scopeStack.length-1;a>=0;--a){var s=this.scopeStack[a];if(s.lexical.indexOf(e)>-1&&!(32&s.flags&&s.lexical[0]===e)||!this.treatFunctionsAsVarInScope(s)&&s.functions.indexOf(e)>-1){n=!0;break}if(s.var.push(e),this.inModule&&1&s.flags&&delete this.undefinedExports[e],259&s.flags)break}n&&this.raiseRecoverable(r,"Identifier '"+e+"' has already been declared")},ue.checkLocalExport=function(e){-1===this.scopeStack[0].lexical.indexOf(e.name)&&-1===this.scopeStack[0].var.indexOf(e.name)&&(this.undefinedExports[e.name]=e)},ue.currentScope=function(){return this.scopeStack[this.scopeStack.length-1]},ue.currentVarScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags)return t}},ue.currentThisScope=function(){for(var e=this.scopeStack.length-1;;e--){var t=this.scopeStack[e];if(259&t.flags&&!(16&t.flags))return t}};var fe=function(e,t,r){this.type="",this.start=t,this.end=0,e.options.locations&&(this.loc=new L(e,r)),e.options.directSourceFile&&(this.sourceFile=e.options.directSourceFile),e.options.ranges&&(this.range=[t,0])},pe=G.prototype;function he(e,t,r,n){return e.type=t,e.end=r,this.options.locations&&(e.loc.end=n),this.options.ranges&&(e.range[1]=r),e}pe.startNode=function(){return new fe(this,this.start,this.startLoc)},pe.startNodeAt=function(e,t){return new fe(this,e,t)},pe.finishNode=function(e,t){return he.call(this,e,t,this.lastTokEnd,this.lastTokEndLoc)},pe.finishNodeAt=function(e,t,r,n){return he.call(this,e,t,r,n)},pe.copyNode=function(e){var t=new fe(this,e.start,this.startLoc);for(var r in e)t[r]=e[r];return t};var me,ge,be="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",ve=be+" Extended_Pictographic",ye=ve+" EBase EComp EMod EPres ExtPict",we={9:be,10:ve,11:ve,12:ye,13:ye,14:ye},Ee={9:"",10:"",11:"",12:"",13:"",14:"Basic_Emoji Emoji_Keycap_Sequence RGI_Emoji_Modifier_Sequence RGI_Emoji_Flag_Sequence RGI_Emoji_Tag_Sequence RGI_Emoji_ZWJ_Sequence RGI_Emoji"},_e="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",Se="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",xe=Se+" Dogra Dogr Gunjala_Gondi Gong Hanifi_Rohingya Rohg Makasar Maka Medefaidrin Medf Old_Sogdian Sogo Sogdian Sogd",Ae=xe+" Elymaic Elym Nandinagari Nand Nyiakeng_Puachue_Hmong Hmnp Wancho Wcho",Te=Ae+" Chorasmian Chrs Diak Dives_Akuru Khitan_Small_Script Kits Yezi Yezidi",Ce=Te+" Cypro_Minoan Cpmn Old_Uyghur Ougr Tangsa Tnsa Toto Vithkuqi Vith",ke={9:Se,10:xe,11:Ae,12:Te,13:Ce,14:Ce+" Hrkt Katakana_Or_Hiragana Kawi Nag_Mundari Nagm Unknown Zzzz"},Oe={};for(var Re=0,Ne=[9,10,11,12,13,14];Re=6?"uy":"")+(e.options.ecmaVersion>=9?"s":"")+(e.options.ecmaVersion>=13?"d":"")+(e.options.ecmaVersion>=15?"v":""),this.unicodeProperties=Oe[e.options.ecmaVersion>=14?14:e.options.ecmaVersion],this.source="",this.flags="",this.start=0,this.switchU=!1,this.switchV=!1,this.switchN=!1,this.pos=0,this.lastIntValue=0,this.lastStringValue="",this.lastAssertionIsQuantifiable=!1,this.numCapturingParens=0,this.maxBackReference=0,this.groupNames=[],this.backReferenceNames=[]};function Pe(e){return 36===e||e>=40&&e<=43||46===e||63===e||e>=91&&e<=94||e>=123&&e<=125}function De(e){return e>=65&&e<=90||e>=97&&e<=122}Me.prototype.reset=function(e,t,r){var n=-1!==r.indexOf("v"),o=-1!==r.indexOf("u");this.start=0|e,this.source=t+"",this.flags=r,n&&this.parser.options.ecmaVersion>=15?(this.switchU=!0,this.switchV=!0,this.switchN=!0):(this.switchU=o&&this.parser.options.ecmaVersion>=6,this.switchV=!1,this.switchN=o&&this.parser.options.ecmaVersion>=9)},Me.prototype.raise=function(e){this.parser.raiseRecoverable(this.start,"Invalid regular expression: /"+this.source+"/: "+e)},Me.prototype.at=function(e,t){void 0===t&&(t=!1);var r=this.source,n=r.length;if(e>=n)return-1;var o=r.charCodeAt(e);if(!t&&!this.switchU||o<=55295||o>=57344||e+1>=n)return o;var i=r.charCodeAt(e+1);return i>=56320&&i<=57343?(o<<10)+i-56613888:o},Me.prototype.nextIndex=function(e,t){void 0===t&&(t=!1);var r=this.source,n=r.length;if(e>=n)return n;var o,i=r.charCodeAt(e);return!t&&!this.switchU||i<=55295||i>=57344||e+1>=n||(o=r.charCodeAt(e+1))<56320||o>57343?e+1:e+2},Me.prototype.current=function(e){return void 0===e&&(e=!1),this.at(this.pos,e)},Me.prototype.lookahead=function(e){return void 0===e&&(e=!1),this.at(this.nextIndex(this.pos,e),e)},Me.prototype.advance=function(e){void 0===e&&(e=!1),this.pos=this.nextIndex(this.pos,e)},Me.prototype.eat=function(e,t){return void 0===t&&(t=!1),this.current(t)===e&&(this.advance(t),!0)},Me.prototype.eatChars=function(e,t){void 0===t&&(t=!1);for(var r=this.pos,n=0,o=e;n-1&&this.raise(e.start,"Duplicate regular expression flag"),"u"===a&&(n=!0),"v"===a&&(o=!0)}this.options.ecmaVersion>=15&&n&&o&&this.raise(e.start,"Invalid regular expression flag")},Ie.validateRegExpPattern=function(e){this.regexp_pattern(e),!e.switchN&&this.options.ecmaVersion>=9&&e.groupNames.length>0&&(e.switchN=!0,this.regexp_pattern(e))},Ie.regexp_pattern=function(e){e.pos=0,e.lastIntValue=0,e.lastStringValue="",e.lastAssertionIsQuantifiable=!1,e.numCapturingParens=0,e.maxBackReference=0,e.groupNames.length=0,e.backReferenceNames.length=0,this.regexp_disjunction(e),e.pos!==e.source.length&&(e.eat(41)&&e.raise("Unmatched ')'"),(e.eat(93)||e.eat(125))&&e.raise("Lone quantifier brackets")),e.maxBackReference>e.numCapturingParens&&e.raise("Invalid escape");for(var t=0,r=e.backReferenceNames;t=9&&(r=e.eat(60)),e.eat(61)||e.eat(33))return this.regexp_disjunction(e),e.eat(41)||e.raise("Unterminated group"),e.lastAssertionIsQuantifiable=!r,!0}return e.pos=t,!1},Ie.regexp_eatQuantifier=function(e,t){return void 0===t&&(t=!1),!!this.regexp_eatQuantifierPrefix(e,t)&&(e.eat(63),!0)},Ie.regexp_eatQuantifierPrefix=function(e,t){return e.eat(42)||e.eat(43)||e.eat(63)||this.regexp_eatBracedQuantifier(e,t)},Ie.regexp_eatBracedQuantifier=function(e,t){var r=e.pos;if(e.eat(123)){var n=0,o=-1;if(this.regexp_eatDecimalDigits(e)&&(n=e.lastIntValue,e.eat(44)&&this.regexp_eatDecimalDigits(e)&&(o=e.lastIntValue),e.eat(125)))return-1!==o&&o=9?this.regexp_groupSpecifier(e):63===e.current()&&e.raise("Invalid group"),this.regexp_disjunction(e),e.eat(41))return e.numCapturingParens+=1,!0;e.raise("Unterminated group")}return!1},Ie.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)},Ie.regexp_eatInvalidBracedQuantifier=function(e){return this.regexp_eatBracedQuantifier(e,!0)&&e.raise("Nothing to repeat"),!1},Ie.regexp_eatSyntaxCharacter=function(e){var t=e.current();return!!Pe(t)&&(e.lastIntValue=t,e.advance(),!0)},Ie.regexp_eatPatternCharacters=function(e){for(var t=e.pos,r=0;-1!==(r=e.current())&&!Pe(r);)e.advance();return e.pos!==t},Ie.regexp_eatExtendedPatternCharacter=function(e){var t=e.current();return!(-1===t||36===t||t>=40&&t<=43||46===t||63===t||91===t||94===t||124===t||(e.advance(),0))},Ie.regexp_groupSpecifier=function(e){if(e.eat(63)){if(this.regexp_eatGroupName(e))return-1!==e.groupNames.indexOf(e.lastStringValue)&&e.raise("Duplicate capture group name"),void e.groupNames.push(e.lastStringValue);e.raise("Invalid group")}},Ie.regexp_eatGroupName=function(e){if(e.lastStringValue="",e.eat(60)){if(this.regexp_eatRegExpIdentifierName(e)&&e.eat(62))return!0;e.raise("Invalid capture group name")}return!1},Ie.regexp_eatRegExpIdentifierName=function(e){if(e.lastStringValue="",this.regexp_eatRegExpIdentifierStart(e)){for(e.lastStringValue+=M(e.lastIntValue);this.regexp_eatRegExpIdentifierPart(e);)e.lastStringValue+=M(e.lastIntValue);return!0}return!1},Ie.regexp_eatRegExpIdentifierStart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),function(e){return d(e,!0)||36===e||95===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Ie.regexp_eatRegExpIdentifierPart=function(e){var t=e.pos,r=this.options.ecmaVersion>=11,n=e.current(r);return e.advance(r),92===n&&this.regexp_eatRegExpUnicodeEscapeSequence(e,r)&&(n=e.lastIntValue),function(e){return f(e,!0)||36===e||95===e||8204===e||8205===e}(n)?(e.lastIntValue=n,!0):(e.pos=t,!1)},Ie.regexp_eatAtomEscape=function(e){return!!(this.regexp_eatBackReference(e)||this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)||e.switchN&&this.regexp_eatKGroupName(e))||(e.switchU&&(99===e.current()&&e.raise("Invalid unicode escape"),e.raise("Invalid escape")),!1)},Ie.regexp_eatBackReference=function(e){var t=e.pos;if(this.regexp_eatDecimalEscape(e)){var r=e.lastIntValue;if(e.switchU)return r>e.maxBackReference&&(e.maxBackReference=r),!0;if(r<=e.numCapturingParens)return!0;e.pos=t}return!1},Ie.regexp_eatKGroupName=function(e){if(e.eat(107)){if(this.regexp_eatGroupName(e))return e.backReferenceNames.push(e.lastStringValue),!0;e.raise("Invalid named reference")}return!1},Ie.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,!1)||!e.switchU&&this.regexp_eatLegacyOctalEscapeSequence(e)||this.regexp_eatIdentityEscape(e)},Ie.regexp_eatCControlLetter=function(e){var t=e.pos;if(e.eat(99)){if(this.regexp_eatControlLetter(e))return!0;e.pos=t}return!1},Ie.regexp_eatZero=function(e){return 48===e.current()&&!Be(e.lookahead())&&(e.lastIntValue=0,e.advance(),!0)},Ie.regexp_eatControlEscape=function(e){var t=e.current();return 116===t?(e.lastIntValue=9,e.advance(),!0):110===t?(e.lastIntValue=10,e.advance(),!0):118===t?(e.lastIntValue=11,e.advance(),!0):102===t?(e.lastIntValue=12,e.advance(),!0):114===t&&(e.lastIntValue=13,e.advance(),!0)},Ie.regexp_eatControlLetter=function(e){var t=e.current();return!!De(t)&&(e.lastIntValue=t%32,e.advance(),!0)},Ie.regexp_eatRegExpUnicodeEscapeSequence=function(e,t){void 0===t&&(t=!1);var r,n=e.pos,o=t||e.switchU;if(e.eat(117)){if(this.regexp_eatFixedHexDigits(e,4)){var i=e.lastIntValue;if(o&&i>=55296&&i<=56319){var a=e.pos;if(e.eat(92)&&e.eat(117)&&this.regexp_eatFixedHexDigits(e,4)){var s=e.lastIntValue;if(s>=56320&&s<=57343)return e.lastIntValue=1024*(i-55296)+(s-56320)+65536,!0}e.pos=a,e.lastIntValue=i}return!0}if(o&&e.eat(123)&&this.regexp_eatHexDigits(e)&&e.eat(125)&&((r=e.lastIntValue)>=0&&r<=1114111))return!0;o&&e.raise("Invalid unicode escape"),e.pos=n}return!1},Ie.regexp_eatIdentityEscape=function(e){if(e.switchU)return!!this.regexp_eatSyntaxCharacter(e)||!!e.eat(47)&&(e.lastIntValue=47,!0);var t=e.current();return!(99===t||e.switchN&&107===t||(e.lastIntValue=t,e.advance(),0))},Ie.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!0}return!1};function Le(e){return De(e)||95===e}function Fe(e){return Le(e)||Be(e)}function Be(e){return e>=48&&e<=57}function Ue(e){return e>=48&&e<=57||e>=65&&e<=70||e>=97&&e<=102}function je(e){return e>=65&&e<=70?e-65+10:e>=97&&e<=102?e-97+10:e-48}function ze(e){return e>=48&&e<=55}Ie.regexp_eatCharacterClassEscape=function(e){var t=e.current();if(function(e){return 100===e||68===e||115===e||83===e||119===e||87===e}(t))return e.lastIntValue=-1,e.advance(),1;var r=!1;if(e.switchU&&this.options.ecmaVersion>=9&&((r=80===t)||112===t)){var n;if(e.lastIntValue=-1,e.advance(),e.eat(123)&&(n=this.regexp_eatUnicodePropertyValueExpression(e))&&e.eat(125))return r&&2===n&&e.raise("Invalid property name"),n;e.raise("Invalid property name")}return 0},Ie.regexp_eatUnicodePropertyValueExpression=function(e){var t=e.pos;if(this.regexp_eatUnicodePropertyName(e)&&e.eat(61)){var r=e.lastStringValue;if(this.regexp_eatUnicodePropertyValue(e)){var n=e.lastStringValue;return this.regexp_validateUnicodePropertyNameAndValue(e,r,n),1}}if(e.pos=t,this.regexp_eatLoneUnicodePropertyNameOrValue(e)){var o=e.lastStringValue;return this.regexp_validateUnicodePropertyNameOrValue(e,o)}return 0},Ie.regexp_validateUnicodePropertyNameAndValue=function(e,t,r){O(e.unicodeProperties.nonBinary,t)||e.raise("Invalid property name"),e.unicodeProperties.nonBinary[t].test(r)||e.raise("Invalid property value")},Ie.regexp_validateUnicodePropertyNameOrValue=function(e,t){return e.unicodeProperties.binary.test(t)?1:e.switchV&&e.unicodeProperties.binaryOfStrings.test(t)?2:void e.raise("Invalid property name")},Ie.regexp_eatUnicodePropertyName=function(e){var t=0;for(e.lastStringValue="";Le(t=e.current());)e.lastStringValue+=M(t),e.advance();return""!==e.lastStringValue},Ie.regexp_eatUnicodePropertyValue=function(e){var t=0;for(e.lastStringValue="";Fe(t=e.current());)e.lastStringValue+=M(t),e.advance();return""!==e.lastStringValue},Ie.regexp_eatLoneUnicodePropertyNameOrValue=function(e){return this.regexp_eatUnicodePropertyValue(e)},Ie.regexp_eatCharacterClass=function(e){if(e.eat(91)){var t=e.eat(94),r=this.regexp_classContents(e);return e.eat(93)||e.raise("Unterminated character class"),t&&2===r&&e.raise("Negated character class may contain strings"),!0}return!1},Ie.regexp_classContents=function(e){return 93===e.current()?1:e.switchV?this.regexp_classSetExpression(e):(this.regexp_nonEmptyClassRanges(e),1)},Ie.regexp_nonEmptyClassRanges=function(e){for(;this.regexp_eatClassAtom(e);){var t=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassAtom(e)){var r=e.lastIntValue;!e.switchU||-1!==t&&-1!==r||e.raise("Invalid character class"),-1!==t&&-1!==r&&t>r&&e.raise("Range out of order in character class")}}},Ie.regexp_eatClassAtom=function(e){var t=e.pos;if(e.eat(92)){if(this.regexp_eatClassEscape(e))return!0;if(e.switchU){var r=e.current();(99===r||ze(r))&&e.raise("Invalid class escape"),e.raise("Invalid escape")}e.pos=t}var n=e.current();return 93!==n&&(e.lastIntValue=n,e.advance(),!0)},Ie.regexp_eatClassEscape=function(e){var t=e.pos;if(e.eat(98))return e.lastIntValue=8,!0;if(e.switchU&&e.eat(45))return e.lastIntValue=45,!0;if(!e.switchU&&e.eat(99)){if(this.regexp_eatClassControlLetter(e))return!0;e.pos=t}return this.regexp_eatCharacterClassEscape(e)||this.regexp_eatCharacterEscape(e)},Ie.regexp_classSetExpression=function(e){var t,r=1;if(this.regexp_eatClassSetRange(e));else if(t=this.regexp_eatClassSetOperand(e)){2===t&&(r=2);for(var n=e.pos;e.eatChars([38,38]);)38!==e.current()&&(t=this.regexp_eatClassSetOperand(e))?2!==t&&(r=1):e.raise("Invalid character in character class");if(n!==e.pos)return r;for(;e.eatChars([45,45]);)this.regexp_eatClassSetOperand(e)||e.raise("Invalid character in character class");if(n!==e.pos)return r}else e.raise("Invalid character in character class");for(;;)if(!this.regexp_eatClassSetRange(e)){if(!(t=this.regexp_eatClassSetOperand(e)))return r;2===t&&(r=2)}},Ie.regexp_eatClassSetRange=function(e){var t=e.pos;if(this.regexp_eatClassSetCharacter(e)){var r=e.lastIntValue;if(e.eat(45)&&this.regexp_eatClassSetCharacter(e)){var n=e.lastIntValue;return-1!==r&&-1!==n&&r>n&&e.raise("Range out of order in character class"),!0}e.pos=t}return!1},Ie.regexp_eatClassSetOperand=function(e){return this.regexp_eatClassSetCharacter(e)?1:this.regexp_eatClassStringDisjunction(e)||this.regexp_eatNestedClass(e)},Ie.regexp_eatNestedClass=function(e){var t=e.pos;if(e.eat(91)){var r=e.eat(94),n=this.regexp_classContents(e);if(e.eat(93))return r&&2===n&&e.raise("Negated character class may contain strings"),n;e.pos=t}if(e.eat(92)){var o=this.regexp_eatCharacterClassEscape(e);if(o)return o;e.pos=t}return null},Ie.regexp_eatClassStringDisjunction=function(e){var t=e.pos;if(e.eatChars([92,113])){if(e.eat(123)){var r=this.regexp_classStringDisjunctionContents(e);if(e.eat(125))return r}else e.raise("Invalid escape");e.pos=t}return null},Ie.regexp_classStringDisjunctionContents=function(e){for(var t=this.regexp_classString(e);e.eat(124);)2===this.regexp_classString(e)&&(t=2);return t},Ie.regexp_classString=function(e){for(var t=0;this.regexp_eatClassSetCharacter(e);)t++;return 1===t?1:2},Ie.regexp_eatClassSetCharacter=function(e){var t=e.pos;if(e.eat(92))return!(!this.regexp_eatCharacterEscape(e)&&!this.regexp_eatClassSetReservedPunctuator(e)&&(e.eat(98)?(e.lastIntValue=8,0):(e.pos=t,1)));var r=e.current();return!(r<0||r===e.lookahead()&&function(e){return 33===e||e>=35&&e<=38||e>=42&&e<=44||46===e||e>=58&&e<=64||94===e||96===e||126===e}(r)||function(e){return 40===e||41===e||45===e||47===e||e>=91&&e<=93||e>=123&&e<=125}(r)||(e.advance(),e.lastIntValue=r,0))},Ie.regexp_eatClassSetReservedPunctuator=function(e){var t=e.current();return!!function(e){return 33===e||35===e||37===e||38===e||44===e||45===e||e>=58&&e<=62||64===e||96===e||126===e}(t)&&(e.lastIntValue=t,e.advance(),!0)},Ie.regexp_eatClassControlLetter=function(e){var t=e.current();return!(!Be(t)&&95!==t||(e.lastIntValue=t%32,e.advance(),0))},Ie.regexp_eatHexEscapeSequence=function(e){var t=e.pos;if(e.eat(120)){if(this.regexp_eatFixedHexDigits(e,2))return!0;e.switchU&&e.raise("Invalid escape"),e.pos=t}return!1},Ie.regexp_eatDecimalDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Be(r=e.current());)e.lastIntValue=10*e.lastIntValue+(r-48),e.advance();return e.pos!==t},Ie.regexp_eatHexDigits=function(e){var t=e.pos,r=0;for(e.lastIntValue=0;Ue(r=e.current());)e.lastIntValue=16*e.lastIntValue+je(r),e.advance();return e.pos!==t},Ie.regexp_eatLegacyOctalEscapeSequence=function(e){if(this.regexp_eatOctalDigit(e)){var t=e.lastIntValue;if(this.regexp_eatOctalDigit(e)){var r=e.lastIntValue;t<=3&&this.regexp_eatOctalDigit(e)?e.lastIntValue=64*t+8*r+e.lastIntValue:e.lastIntValue=8*t+r}else e.lastIntValue=t;return!0}return!1},Ie.regexp_eatOctalDigit=function(e){var t=e.current();return ze(t)?(e.lastIntValue=t-48,e.advance(),!0):(e.lastIntValue=0,!1)},Ie.regexp_eatFixedHexDigits=function(e,t){var r=e.pos;e.lastIntValue=0;for(var n=0;n=this.input.length?this.finishToken(y.eof):e.override?e.override(this):void this.readToken(this.fullCharCodeAtPos())},Ge.readToken=function(e){return d(e,this.options.ecmaVersion>=6)||92===e?this.readWord():this.getTokenFromCode(e)},Ge.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},Ge.skipBlockComment=function(){var e=this.options.onComment&&this.curPosition(),t=this.pos,r=this.input.indexOf("*/",this.pos+=2);if(-1===r&&this.raise(this.pos-2,"Unterminated comment"),this.pos=r+2,this.options.locations)for(var n=void 0,o=t;(n=S(this.input,o,this.pos))>-1;)++this.curLine,o=this.lineStart=n;this.options.onComment&&this.options.onComment(!0,this.input.slice(t+2,r),t,this.pos,e,this.curPosition())},Ge.skipLineComment=function(e){for(var t=this.pos,r=this.options.onComment&&this.curPosition(),n=this.input.charCodeAt(this.pos+=e);this.pos8&&e<14||e>=5760&&x.test(String.fromCharCode(e))))break e;++this.pos}}},Ge.finishToken=function(e,t){this.end=this.pos,this.options.locations&&(this.endLoc=this.curPosition());var r=this.type;this.type=e,this.value=t,this.updateContext(r)},Ge.readToken_dot=function(){var e=this.input.charCodeAt(this.pos+1);if(e>=48&&e<=57)return this.readNumber(!0);var t=this.input.charCodeAt(this.pos+2);return this.options.ecmaVersion>=6&&46===e&&46===t?(this.pos+=3,this.finishToken(y.ellipsis)):(++this.pos,this.finishToken(y.dot))},Ge.readToken_slash=function(){var e=this.input.charCodeAt(this.pos+1);return this.exprAllowed?(++this.pos,this.readRegexp()):61===e?this.finishOp(y.assign,2):this.finishOp(y.slash,1)},Ge.readToken_mult_modulo_exp=function(e){var t=this.input.charCodeAt(this.pos+1),r=1,n=42===e?y.star:y.modulo;return this.options.ecmaVersion>=7&&42===e&&42===t&&(++r,n=y.starstar,t=this.input.charCodeAt(this.pos+2)),61===t?this.finishOp(y.assign,r+1):this.finishOp(n,r)},Ge.readToken_pipe_amp=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?this.options.ecmaVersion>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(y.assign,3):this.finishOp(124===e?y.logicalOR:y.logicalAND,2):61===t?this.finishOp(y.assign,2):this.finishOp(124===e?y.bitwiseOR:y.bitwiseAND,1)},Ge.readToken_caret=function(){return 61===this.input.charCodeAt(this.pos+1)?this.finishOp(y.assign,2):this.finishOp(y.bitwiseXOR,1)},Ge.readToken_plus_min=function(e){var t=this.input.charCodeAt(this.pos+1);return t===e?45!==t||this.inModule||62!==this.input.charCodeAt(this.pos+2)||0!==this.lastTokEnd&&!w.test(this.input.slice(this.lastTokEnd,this.pos))?this.finishOp(y.incDec,2):(this.skipLineComment(3),this.skipSpace(),this.nextToken()):61===t?this.finishOp(y.assign,2):this.finishOp(y.plusMin,1)},Ge.readToken_lt_gt=function(e){var t=this.input.charCodeAt(this.pos+1),r=1;return t===e?(r=62===e&&62===this.input.charCodeAt(this.pos+2)?3:2,61===this.input.charCodeAt(this.pos+r)?this.finishOp(y.assign,r+1):this.finishOp(y.bitShift,r)):33!==t||60!==e||this.inModule||45!==this.input.charCodeAt(this.pos+2)||45!==this.input.charCodeAt(this.pos+3)?(61===t&&(r=2),this.finishOp(y.relational,r)):(this.skipLineComment(4),this.skipSpace(),this.nextToken())},Ge.readToken_eq_excl=function(e){var t=this.input.charCodeAt(this.pos+1);return 61===t?this.finishOp(y.equality,61===this.input.charCodeAt(this.pos+2)?3:2):61===e&&62===t&&this.options.ecmaVersion>=6?(this.pos+=2,this.finishToken(y.arrow)):this.finishOp(61===e?y.eq:y.prefix,1)},Ge.readToken_question=function(){var e=this.options.ecmaVersion;if(e>=11){var t=this.input.charCodeAt(this.pos+1);if(46===t){var r=this.input.charCodeAt(this.pos+2);if(r<48||r>57)return this.finishOp(y.questionDot,2)}if(63===t)return e>=12&&61===this.input.charCodeAt(this.pos+2)?this.finishOp(y.assign,3):this.finishOp(y.coalesce,2)}return this.finishOp(y.question,1)},Ge.readToken_numberSign=function(){var e=35;if(this.options.ecmaVersion>=13&&(++this.pos,d(e=this.fullCharCodeAtPos(),!0)||92===e))return this.finishToken(y.privateId,this.readWord1());this.raise(this.pos,"Unexpected character '"+M(e)+"'")},Ge.getTokenFromCode=function(e){switch(e){case 46:return this.readToken_dot();case 40:return++this.pos,this.finishToken(y.parenL);case 41:return++this.pos,this.finishToken(y.parenR);case 59:return++this.pos,this.finishToken(y.semi);case 44:return++this.pos,this.finishToken(y.comma);case 91:return++this.pos,this.finishToken(y.bracketL);case 93:return++this.pos,this.finishToken(y.bracketR);case 123:return++this.pos,this.finishToken(y.braceL);case 125:return++this.pos,this.finishToken(y.braceR);case 58:return++this.pos,this.finishToken(y.colon);case 96:if(this.options.ecmaVersion<6)break;return++this.pos,this.finishToken(y.backQuote);case 48:var t=this.input.charCodeAt(this.pos+1);if(120===t||88===t)return this.readRadixNumber(16);if(this.options.ecmaVersion>=6){if(111===t||79===t)return this.readRadixNumber(8);if(98===t||66===t)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(!1);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(y.prefix,1);case 35:return this.readToken_numberSign()}this.raise(this.pos,"Unexpected character '"+M(e)+"'")},Ge.finishOp=function(e,t){var r=this.input.slice(this.pos,this.pos+t);return this.pos+=t,this.finishToken(e,r)},Ge.readRegexp=function(){for(var e,t,r=this.pos;;){this.pos>=this.input.length&&this.raise(r,"Unterminated regular expression");var n=this.input.charAt(this.pos);if(w.test(n)&&this.raise(r,"Unterminated regular expression"),e)e=!1;else{if("["===n)t=!0;else if("]"===n&&t)t=!1;else if("/"===n&&!t)break;e="\\"===n}++this.pos}var o=this.input.slice(r,this.pos);++this.pos;var i=this.pos,a=this.readWord1();this.containsEsc&&this.unexpected(i);var s=this.regexpState||(this.regexpState=new Me(this));s.reset(r,o,a),this.validateRegExpFlags(s),this.validateRegExpPattern(s);var l=null;try{l=new RegExp(o,a)}catch(e){}return this.finishToken(y.regexp,{pattern:o,flags:a,value:l})},Ge.readInt=function(e,t,r){for(var n=this.options.ecmaVersion>=12&&void 0===t,o=r&&48===this.input.charCodeAt(this.pos),i=this.pos,a=0,s=0,l=0,c=null==t?1/0:t;l=97?u-97+10:u>=65?u-65+10:u>=48&&u<=57?u-48:1/0)>=e)break;s=u,a=a*e+d}}return n&&95===s&&this.raiseRecoverable(this.pos-1,"Numeric separator is not allowed at the last of digits"),this.pos===i||null!=t&&this.pos-i!==t?null:a},Ge.readRadixNumber=function(e){var t=this.pos;this.pos+=2;var r=this.readInt(e);return null==r&&this.raise(this.start+2,"Expected number in radix "+e),this.options.ecmaVersion>=11&&110===this.input.charCodeAt(this.pos)?(r=We(this.input.slice(t,this.pos)),++this.pos):d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,r)},Ge.readNumber=function(e){var t=this.pos;e||null!==this.readInt(10,void 0,!0)||this.raise(t,"Invalid number");var r=this.pos-t>=2&&48===this.input.charCodeAt(t);r&&this.strict&&this.raise(t,"Invalid number");var n=this.input.charCodeAt(this.pos);if(!r&&!e&&this.options.ecmaVersion>=11&&110===n){var o=We(this.input.slice(t,this.pos));return++this.pos,d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number"),this.finishToken(y.num,o)}r&&/[89]/.test(this.input.slice(t,this.pos))&&(r=!1),46!==n||r||(++this.pos,this.readInt(10),n=this.input.charCodeAt(this.pos)),69!==n&&101!==n||r||(43!==(n=this.input.charCodeAt(++this.pos))&&45!==n||++this.pos,null===this.readInt(10)&&this.raise(t,"Invalid number")),d(this.fullCharCodeAtPos())&&this.raise(this.pos,"Identifier directly after number");var i,a=(i=this.input.slice(t,this.pos),r?parseInt(i,8):parseFloat(i.replace(/_/g,"")));return this.finishToken(y.num,a)},Ge.readCodePoint=function(){var e;if(123===this.input.charCodeAt(this.pos)){this.options.ecmaVersion<6&&this.unexpected();var t=++this.pos;e=this.readHexChar(this.input.indexOf("}",this.pos)-this.pos),++this.pos,e>1114111&&this.invalidStringToken(t,"Code point out of bounds")}else e=this.readHexChar(4);return e},Ge.readString=function(e){for(var t="",r=++this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated string constant");var n=this.input.charCodeAt(this.pos);if(n===e)break;92===n?(t+=this.input.slice(r,this.pos),t+=this.readEscapedChar(!1),r=this.pos):8232===n||8233===n?(this.options.ecmaVersion<10&&this.raise(this.start,"Unterminated string constant"),++this.pos,this.options.locations&&(this.curLine++,this.lineStart=this.pos)):(_(n)&&this.raise(this.start,"Unterminated string constant"),++this.pos)}return t+=this.input.slice(r,this.pos++),this.finishToken(y.string,t)};var qe={};Ge.tryReadTemplateToken=function(){this.inTemplateElement=!0;try{this.readTmplToken()}catch(e){if(e!==qe)throw e;this.readInvalidTemplateToken()}this.inTemplateElement=!1},Ge.invalidStringToken=function(e,t){if(this.inTemplateElement&&this.options.ecmaVersion>=9)throw qe;this.raise(e,t)},Ge.readTmplToken=function(){for(var e="",t=this.pos;;){this.pos>=this.input.length&&this.raise(this.start,"Unterminated template");var r=this.input.charCodeAt(this.pos);if(96===r||36===r&&123===this.input.charCodeAt(this.pos+1))return this.pos!==this.start||this.type!==y.template&&this.type!==y.invalidTemplate?(e+=this.input.slice(t,this.pos),this.finishToken(y.template,e)):36===r?(this.pos+=2,this.finishToken(y.dollarBraceL)):(++this.pos,this.finishToken(y.backQuote));if(92===r)e+=this.input.slice(t,this.pos),e+=this.readEscapedChar(!0),t=this.pos;else if(_(r)){switch(e+=this.input.slice(t,this.pos),++this.pos,r){case 13:10===this.input.charCodeAt(this.pos)&&++this.pos;case 10:e+="\n";break;default:e+=String.fromCharCode(r)}this.options.locations&&(++this.curLine,this.lineStart=this.pos),t=this.pos}else++this.pos}},Ge.readInvalidTemplateToken=function(){for(;this.pos=48&&t<=55){var n=this.input.substr(this.pos-1,3).match(/^[0-7]+/)[0],o=parseInt(n,8);return o>255&&(n=n.slice(0,-1),o=parseInt(n,8)),this.pos+=n.length-1,t=this.input.charCodeAt(this.pos),"0"===n&&56!==t&&57!==t||!this.strict&&!e||this.invalidStringToken(this.pos-1-n.length,e?"Octal literal in template string":"Octal literal in strict mode"),String.fromCharCode(o)}return _(t)?"":String.fromCharCode(t)}},Ge.readHexChar=function(e){var t=this.pos,r=this.readInt(16,e);return null===r&&this.invalidStringToken(t,"Bad character escape sequence"),r},Ge.readWord1=function(){this.containsEsc=!1;for(var e="",t=!0,r=this.pos,n=this.options.ecmaVersion>=6;this.pos255)return!1;return!0}function o(e,t){if(e.buffer&&ArrayBuffer.isView(e)&&"Uint8Array"===e.name)return t&&(e=e.slice?e.slice():Array.prototype.slice.call(e)),e;if(Array.isArray(e)){if(!n(e))throw new Error("Array contains invalid value: "+e);return new Uint8Array(e)}if(r(e.length)&&n(e))return new Uint8Array(e);throw new Error("unsupported array-like object")}function i(e){return new Uint8Array(e)}function a(e,t,r,n,o){null==n&&null==o||(e=e.slice?e.slice(n,o):Array.prototype.slice.call(e,n,o)),t.set(e,r)}var s,l={toBytes:function(e){var t=[],r=0;for(e=encodeURI(e);r191&&n<224?(t.push(String.fromCharCode((31&n)<<6|63&e[r+1])),r+=2):(t.push(String.fromCharCode((15&n)<<12|(63&e[r+1])<<6|63&e[r+2])),r+=3)}return t.join("")}},c=(s="0123456789abcdef",{toBytes:function(e){for(var t=[],r=0;r>4]+s[15&n])}return t.join("")}}),u={16:10,24:12,32:14},d=[1,2,4,8,16,32,64,128,27,54,108,216,171,77,154,47,94,188,99,198,151,53,106,212,179,125,250,239,197,145],f=[99,124,119,123,242,107,111,197,48,1,103,43,254,215,171,118,202,130,201,125,250,89,71,240,173,212,162,175,156,164,114,192,183,253,147,38,54,63,247,204,52,165,229,241,113,216,49,21,4,199,35,195,24,150,5,154,7,18,128,226,235,39,178,117,9,131,44,26,27,110,90,160,82,59,214,179,41,227,47,132,83,209,0,237,32,252,177,91,106,203,190,57,74,76,88,207,208,239,170,251,67,77,51,133,69,249,2,127,80,60,159,168,81,163,64,143,146,157,56,245,188,182,218,33,16,255,243,210,205,12,19,236,95,151,68,23,196,167,126,61,100,93,25,115,96,129,79,220,34,42,144,136,70,238,184,20,222,94,11,219,224,50,58,10,73,6,36,92,194,211,172,98,145,149,228,121,231,200,55,109,141,213,78,169,108,86,244,234,101,122,174,8,186,120,37,46,28,166,180,198,232,221,116,31,75,189,139,138,112,62,181,102,72,3,246,14,97,53,87,185,134,193,29,158,225,248,152,17,105,217,142,148,155,30,135,233,206,85,40,223,140,161,137,13,191,230,66,104,65,153,45,15,176,84,187,22],p=[82,9,106,213,48,54,165,56,191,64,163,158,129,243,215,251,124,227,57,130,155,47,255,135,52,142,67,68,196,222,233,203,84,123,148,50,166,194,35,61,238,76,149,11,66,250,195,78,8,46,161,102,40,217,36,178,118,91,162,73,109,139,209,37,114,248,246,100,134,104,152,22,212,164,92,204,93,101,182,146,108,112,72,80,253,237,185,218,94,21,70,87,167,141,157,132,144,216,171,0,140,188,211,10,247,228,88,5,184,179,69,6,208,44,30,143,202,63,15,2,193,175,189,3,1,19,138,107,58,145,17,65,79,103,220,234,151,242,207,206,240,180,230,115,150,172,116,34,231,173,53,133,226,249,55,232,28,117,223,110,71,241,26,113,29,41,197,137,111,183,98,14,170,24,190,27,252,86,62,75,198,210,121,32,154,219,192,254,120,205,90,244,31,221,168,51,136,7,199,49,177,18,16,89,39,128,236,95,96,81,127,169,25,181,74,13,45,229,122,159,147,201,156,239,160,224,59,77,174,42,245,176,200,235,187,60,131,83,153,97,23,43,4,126,186,119,214,38,225,105,20,99,85,33,12,125],h=[3328402341,4168907908,4000806809,4135287693,4294111757,3597364157,3731845041,2445657428,1613770832,33620227,3462883241,1445669757,3892248089,3050821474,1303096294,3967186586,2412431941,528646813,2311702848,4202528135,4026202645,2992200171,2387036105,4226871307,1101901292,3017069671,1604494077,1169141738,597466303,1403299063,3832705686,2613100635,1974974402,3791519004,1033081774,1277568618,1815492186,2118074177,4126668546,2211236943,1748251740,1369810420,3521504564,4193382664,3799085459,2883115123,1647391059,706024767,134480908,2512897874,1176707941,2646852446,806885416,932615841,168101135,798661301,235341577,605164086,461406363,3756188221,3454790438,1311188841,2142417613,3933566367,302582043,495158174,1479289972,874125870,907746093,3698224818,3025820398,1537253627,2756858614,1983593293,3084310113,2108928974,1378429307,3722699582,1580150641,327451799,2790478837,3117535592,0,3253595436,1075847264,3825007647,2041688520,3059440621,3563743934,2378943302,1740553945,1916352843,2487896798,2555137236,2958579944,2244988746,3151024235,3320835882,1336584933,3992714006,2252555205,2588757463,1714631509,293963156,2319795663,3925473552,67240454,4269768577,2689618160,2017213508,631218106,1269344483,2723238387,1571005438,2151694528,93294474,1066570413,563977660,1882732616,4059428100,1673313503,2008463041,2950355573,1109467491,537923632,3858759450,4260623118,3218264685,2177748300,403442708,638784309,3287084079,3193921505,899127202,2286175436,773265209,2479146071,1437050866,4236148354,2050833735,3362022572,3126681063,840505643,3866325909,3227541664,427917720,2655997905,2749160575,1143087718,1412049534,999329963,193497219,2353415882,3354324521,1807268051,672404540,2816401017,3160301282,369822493,2916866934,3688947771,1681011286,1949973070,336202270,2454276571,201721354,1210328172,3093060836,2680341085,3184776046,1135389935,3294782118,965841320,831886756,3554993207,4068047243,3588745010,2345191491,1849112409,3664604599,26054028,2983581028,2622377682,1235855840,3630984372,2891339514,4092916743,3488279077,3395642799,4101667470,1202630377,268961816,1874508501,4034427016,1243948399,1546530418,941366308,1470539505,1941222599,2546386513,3421038627,2715671932,3899946140,1042226977,2521517021,1639824860,227249030,260737669,3765465232,2084453954,1907733956,3429263018,2420656344,100860677,4160157185,470683154,3261161891,1781871967,2924959737,1773779408,394692241,2579611992,974986535,664706745,3655459128,3958962195,731420851,571543859,3530123707,2849626480,126783113,865375399,765172662,1008606754,361203602,3387549984,2278477385,2857719295,1344809080,2782912378,59542671,1503764984,160008576,437062935,1707065306,3622233649,2218934982,3496503480,2185314755,697932208,1512910199,504303377,2075177163,2824099068,1841019862,739644986],m=[2781242211,2230877308,2582542199,2381740923,234877682,3184946027,2984144751,1418839493,1348481072,50462977,2848876391,2102799147,434634494,1656084439,3863849899,2599188086,1167051466,2636087938,1082771913,2281340285,368048890,3954334041,3381544775,201060592,3963727277,1739838676,4250903202,3930435503,3206782108,4149453988,2531553906,1536934080,3262494647,484572669,2923271059,1783375398,1517041206,1098792767,49674231,1334037708,1550332980,4098991525,886171109,150598129,2481090929,1940642008,1398944049,1059722517,201851908,1385547719,1699095331,1587397571,674240536,2704774806,252314885,3039795866,151914247,908333586,2602270848,1038082786,651029483,1766729511,3447698098,2682942837,454166793,2652734339,1951935532,775166490,758520603,3000790638,4004797018,4217086112,4137964114,1299594043,1639438038,3464344499,2068982057,1054729187,1901997871,2534638724,4121318227,1757008337,0,750906861,1614815264,535035132,3363418545,3988151131,3201591914,1183697867,3647454910,1265776953,3734260298,3566750796,3903871064,1250283471,1807470800,717615087,3847203498,384695291,3313910595,3617213773,1432761139,2484176261,3481945413,283769337,100925954,2180939647,4037038160,1148730428,3123027871,3813386408,4087501137,4267549603,3229630528,2315620239,2906624658,3156319645,1215313976,82966005,3747855548,3245848246,1974459098,1665278241,807407632,451280895,251524083,1841287890,1283575245,337120268,891687699,801369324,3787349855,2721421207,3431482436,959321879,1469301956,4065699751,2197585534,1199193405,2898814052,3887750493,724703513,2514908019,2696962144,2551808385,3516813135,2141445340,1715741218,2119445034,2872807568,2198571144,3398190662,700968686,3547052216,1009259540,2041044702,3803995742,487983883,1991105499,1004265696,1449407026,1316239930,504629770,3683797321,168560134,1816667172,3837287516,1570751170,1857934291,4014189740,2797888098,2822345105,2754712981,936633572,2347923833,852879335,1133234376,1500395319,3084545389,2348912013,1689376213,3533459022,3762923945,3034082412,4205598294,133428468,634383082,2949277029,2398386810,3913789102,403703816,3580869306,2297460856,1867130149,1918643758,607656988,4049053350,3346248884,1368901318,600565992,2090982877,2632479860,557719327,3717614411,3697393085,2249034635,2232388234,2430627952,1115438654,3295786421,2865522278,3633334344,84280067,33027830,303828494,2747425121,1600795957,4188952407,3496589753,2434238086,1486471617,658119965,3106381470,953803233,334231800,3005978776,857870609,3151128937,1890179545,2298973838,2805175444,3056442267,574365214,2450884487,550103529,1233637070,4289353045,2018519080,2057691103,2399374476,4166623649,2148108681,387583245,3664101311,836232934,3330556482,3100665960,3280093505,2955516313,2002398509,287182607,3413881008,4238890068,3597515707,975967766],g=[1671808611,2089089148,2006576759,2072901243,4061003762,1807603307,1873927791,3310653893,810573872,16974337,1739181671,729634347,4263110654,3613570519,2883997099,1989864566,3393556426,2191335298,3376449993,2106063485,4195741690,1508618841,1204391495,4027317232,2917941677,3563566036,2734514082,2951366063,2629772188,2767672228,1922491506,3227229120,3082974647,4246528509,2477669779,644500518,911895606,1061256767,4144166391,3427763148,878471220,2784252325,3845444069,4043897329,1905517169,3631459288,827548209,356461077,67897348,3344078279,593839651,3277757891,405286936,2527147926,84871685,2595565466,118033927,305538066,2157648768,3795705826,3945188843,661212711,2999812018,1973414517,152769033,2208177539,745822252,439235610,455947803,1857215598,1525593178,2700827552,1391895634,994932283,3596728278,3016654259,695947817,3812548067,795958831,2224493444,1408607827,3513301457,0,3979133421,543178784,4229948412,2982705585,1542305371,1790891114,3410398667,3201918910,961245753,1256100938,1289001036,1491644504,3477767631,3496721360,4012557807,2867154858,4212583931,1137018435,1305975373,861234739,2241073541,1171229253,4178635257,33948674,2139225727,1357946960,1011120188,2679776671,2833468328,1374921297,2751356323,1086357568,2408187279,2460827538,2646352285,944271416,4110742005,3168756668,3066132406,3665145818,560153121,271589392,4279952895,4077846003,3530407890,3444343245,202643468,322250259,3962553324,1608629855,2543990167,1154254916,389623319,3294073796,2817676711,2122513534,1028094525,1689045092,1575467613,422261273,1939203699,1621147744,2174228865,1339137615,3699352540,577127458,712922154,2427141008,2290289544,1187679302,3995715566,3100863416,339486740,3732514782,1591917662,186455563,3681988059,3762019296,844522546,978220090,169743370,1239126601,101321734,611076132,1558493276,3260915650,3547250131,2901361580,1655096418,2443721105,2510565781,3828863972,2039214713,3878868455,3359869896,928607799,1840765549,2374762893,3580146133,1322425422,2850048425,1823791212,1459268694,4094161908,3928346602,1706019429,2056189050,2934523822,135794696,3134549946,2022240376,628050469,779246638,472135708,2800834470,3032970164,3327236038,3894660072,3715932637,1956440180,522272287,1272813131,3185336765,2340818315,2323976074,1888542832,1044544574,3049550261,1722469478,1222152264,50660867,4127324150,236067854,1638122081,895445557,1475980887,3117443513,2257655686,3243809217,489110045,2662934430,3778599393,4162055160,2561878936,288563729,1773916777,3648039385,2391345038,2493985684,2612407707,505560094,2274497927,3911240169,3460925390,1442818645,678973480,3749357023,2358182796,2717407649,2306869641,219617805,3218761151,3862026214,1120306242,1756942440,1103331905,2578459033,762796589,252780047,2966125488,1425844308,3151392187,372911126],b=[1667474886,2088535288,2004326894,2071694838,4075949567,1802223062,1869591006,3318043793,808472672,16843522,1734846926,724270422,4278065639,3621216949,2880169549,1987484396,3402253711,2189597983,3385409673,2105378810,4210693615,1499065266,1195886990,4042263547,2913856577,3570689971,2728590687,2947541573,2627518243,2762274643,1920112356,3233831835,3082273397,4261223649,2475929149,640051788,909531756,1061110142,4160160501,3435941763,875846760,2779116625,3857003729,4059105529,1903268834,3638064043,825316194,353713962,67374088,3351728789,589522246,3284360861,404236336,2526454071,84217610,2593830191,117901582,303183396,2155911963,3806477791,3958056653,656894286,2998062463,1970642922,151591698,2206440989,741110872,437923380,454765878,1852748508,1515908788,2694904667,1381168804,993742198,3604373943,3014905469,690584402,3823320797,791638366,2223281939,1398011302,3520161977,0,3991743681,538992704,4244381667,2981218425,1532751286,1785380564,3419096717,3200178535,960056178,1246420628,1280103576,1482221744,3486468741,3503319995,4025428677,2863326543,4227536621,1128514950,1296947098,859002214,2240123921,1162203018,4193849577,33687044,2139062782,1347481760,1010582648,2678045221,2829640523,1364325282,2745433693,1077985408,2408548869,2459086143,2644360225,943212656,4126475505,3166494563,3065430391,3671750063,555836226,269496352,4294908645,4092792573,3537006015,3452783745,202118168,320025894,3974901699,1600119230,2543297077,1145359496,387397934,3301201811,2812801621,2122220284,1027426170,1684319432,1566435258,421079858,1936954854,1616945344,2172753945,1330631070,3705438115,572679748,707427924,2425400123,2290647819,1179044492,4008585671,3099120491,336870440,3739122087,1583276732,185277718,3688593069,3772791771,842159716,976899700,168435220,1229577106,101059084,606366792,1549591736,3267517855,3553849021,2897014595,1650632388,2442242105,2509612081,3840161747,2038008818,3890688725,3368567691,926374254,1835907034,2374863873,3587531953,1313788572,2846482505,1819063512,1448540844,4109633523,3941213647,1701162954,2054852340,2930698567,134748176,3132806511,2021165296,623210314,774795868,471606328,2795958615,3031746419,3334885783,3907527627,3722280097,1953799400,522133822,1263263126,3183336545,2341176845,2324333839,1886425312,1044267644,3048588401,1718004428,1212733584,50529542,4143317495,235803164,1633788866,892690282,1465383342,3115962473,2256965911,3250673817,488449850,2661202215,3789633753,4177007595,2560144171,286339874,1768537042,3654906025,2391705863,2492770099,2610673197,505291324,2273808917,3924369609,3469625735,1431699370,673740880,3755965093,2358021891,2711746649,2307489801,218961690,3217021541,3873845719,1111672452,1751693520,1094828930,2576986153,757954394,252645662,2964376443,1414855848,3149649517,370555436],v=[1374988112,2118214995,437757123,975658646,1001089995,530400753,2902087851,1273168787,540080725,2910219766,2295101073,4110568485,1340463100,3307916247,641025152,3043140495,3736164937,632953703,1172967064,1576976609,3274667266,2169303058,2370213795,1809054150,59727847,361929877,3211623147,2505202138,3569255213,1484005843,1239443753,2395588676,1975683434,4102977912,2572697195,666464733,3202437046,4035489047,3374361702,2110667444,1675577880,3843699074,2538681184,1649639237,2976151520,3144396420,4269907996,4178062228,1883793496,2403728665,2497604743,1383856311,2876494627,1917518562,3810496343,1716890410,3001755655,800440835,2261089178,3543599269,807962610,599762354,33778362,3977675356,2328828971,2809771154,4077384432,1315562145,1708848333,101039829,3509871135,3299278474,875451293,2733856160,92987698,2767645557,193195065,1080094634,1584504582,3178106961,1042385657,2531067453,3711829422,1306967366,2438237621,1908694277,67556463,1615861247,429456164,3602770327,2302690252,1742315127,2968011453,126454664,3877198648,2043211483,2709260871,2084704233,4169408201,0,159417987,841739592,504459436,1817866830,4245618683,260388950,1034867998,908933415,168810852,1750902305,2606453969,607530554,202008497,2472011535,3035535058,463180190,2160117071,1641816226,1517767529,470948374,3801332234,3231722213,1008918595,303765277,235474187,4069246893,766945465,337553864,1475418501,2943682380,4003061179,2743034109,4144047775,1551037884,1147550661,1543208500,2336434550,3408119516,3069049960,3102011747,3610369226,1113818384,328671808,2227573024,2236228733,3535486456,2935566865,3341394285,496906059,3702665459,226906860,2009195472,733156972,2842737049,294930682,1206477858,2835123396,2700099354,1451044056,573804783,2269728455,3644379585,2362090238,2564033334,2801107407,2776292904,3669462566,1068351396,742039012,1350078989,1784663195,1417561698,4136440770,2430122216,775550814,2193862645,2673705150,1775276924,1876241833,3475313331,3366754619,270040487,3902563182,3678124923,3441850377,1851332852,3969562369,2203032232,3868552805,2868897406,566021896,4011190502,3135740889,1248802510,3936291284,699432150,832877231,708780849,3332740144,899835584,1951317047,4236429990,3767586992,866637845,4043610186,1106041591,2144161806,395441711,1984812685,1139781709,3433712980,3835036895,2664543715,1282050075,3240894392,1181045119,2640243204,25965917,4203181171,4211818798,3009879386,2463879762,3910161971,1842759443,2597806476,933301370,1509430414,3943906441,3467192302,3076639029,3776767469,2051518780,2631065433,1441952575,404016761,1942435775,1408749034,1610459739,3745345300,2017778566,3400528769,3110650942,941896748,3265478751,371049330,3168937228,675039627,4279080257,967311729,135050206,3635733660,1683407248,2076935265,3576870512,1215061108,3501741890],y=[1347548327,1400783205,3273267108,2520393566,3409685355,4045380933,2880240216,2471224067,1428173050,4138563181,2441661558,636813900,4233094615,3620022987,2149987652,2411029155,1239331162,1730525723,2554718734,3781033664,46346101,310463728,2743944855,3328955385,3875770207,2501218972,3955191162,3667219033,768917123,3545789473,692707433,1150208456,1786102409,2029293177,1805211710,3710368113,3065962831,401639597,1724457132,3028143674,409198410,2196052529,1620529459,1164071807,3769721975,2226875310,486441376,2499348523,1483753576,428819965,2274680428,3075636216,598438867,3799141122,1474502543,711349675,129166120,53458370,2592523643,2782082824,4063242375,2988687269,3120694122,1559041666,730517276,2460449204,4042459122,2706270690,3446004468,3573941694,533804130,2328143614,2637442643,2695033685,839224033,1973745387,957055980,2856345839,106852767,1371368976,4181598602,1033297158,2933734917,1179510461,3046200461,91341917,1862534868,4284502037,605657339,2547432937,3431546947,2003294622,3182487618,2282195339,954669403,3682191598,1201765386,3917234703,3388507166,0,2198438022,1211247597,2887651696,1315723890,4227665663,1443857720,507358933,657861945,1678381017,560487590,3516619604,975451694,2970356327,261314535,3535072918,2652609425,1333838021,2724322336,1767536459,370938394,182621114,3854606378,1128014560,487725847,185469197,2918353863,3106780840,3356761769,2237133081,1286567175,3152976349,4255350624,2683765030,3160175349,3309594171,878443390,1988838185,3704300486,1756818940,1673061617,3403100636,272786309,1075025698,545572369,2105887268,4174560061,296679730,1841768865,1260232239,4091327024,3960309330,3497509347,1814803222,2578018489,4195456072,575138148,3299409036,446754879,3629546796,4011996048,3347532110,3252238545,4270639778,915985419,3483825537,681933534,651868046,2755636671,3828103837,223377554,2607439820,1649704518,3270937875,3901806776,1580087799,4118987695,3198115200,2087309459,2842678573,3016697106,1003007129,2802849917,1860738147,2077965243,164439672,4100872472,32283319,2827177882,1709610350,2125135846,136428751,3874428392,3652904859,3460984630,3572145929,3593056380,2939266226,824852259,818324884,3224740454,930369212,2801566410,2967507152,355706840,1257309336,4148292826,243256656,790073846,2373340630,1296297904,1422699085,3756299780,3818836405,457992840,3099667487,2135319889,77422314,1560382517,1945798516,788204353,1521706781,1385356242,870912086,325965383,2358957921,2050466060,2388260884,2313884476,4006521127,901210569,3990953189,1014646705,1503449823,1062597235,2031621326,3212035895,3931371469,1533017514,350174575,2256028891,2177544179,1052338372,741876788,1606591296,1914052035,213705253,2334669897,1107234197,1899603969,3725069491,2631447780,2422494913,1635502980,1893020342,1950903388,1120974935],w=[2807058932,1699970625,2764249623,1586903591,1808481195,1173430173,1487645946,59984867,4199882800,1844882806,1989249228,1277555970,3623636965,3419915562,1149249077,2744104290,1514790577,459744698,244860394,3235995134,1963115311,4027744588,2544078150,4190530515,1608975247,2627016082,2062270317,1507497298,2200818878,567498868,1764313568,3359936201,2305455554,2037970062,1047239e3,1910319033,1337376481,2904027272,2892417312,984907214,1243112415,830661914,861968209,2135253587,2011214180,2927934315,2686254721,731183368,1750626376,4246310725,1820824798,4172763771,3542330227,48394827,2404901663,2871682645,671593195,3254988725,2073724613,145085239,2280796200,2779915199,1790575107,2187128086,472615631,3029510009,4075877127,3802222185,4107101658,3201631749,1646252340,4270507174,1402811438,1436590835,3778151818,3950355702,3963161475,4020912224,2667994737,273792366,2331590177,104699613,95345982,3175501286,2377486676,1560637892,3564045318,369057872,4213447064,3919042237,1137477952,2658625497,1119727848,2340947849,1530455833,4007360968,172466556,266959938,516552836,0,2256734592,3980931627,1890328081,1917742170,4294704398,945164165,3575528878,958871085,3647212047,2787207260,1423022939,775562294,1739656202,3876557655,2530391278,2443058075,3310321856,547512796,1265195639,437656594,3121275539,719700128,3762502690,387781147,218828297,3350065803,2830708150,2848461854,428169201,122466165,3720081049,1627235199,648017665,4122762354,1002783846,2117360635,695634755,3336358691,4234721005,4049844452,3704280881,2232435299,574624663,287343814,612205898,1039717051,840019705,2708326185,793451934,821288114,1391201670,3822090177,376187827,3113855344,1224348052,1679968233,2361698556,1058709744,752375421,2431590963,1321699145,3519142200,2734591178,188127444,2177869557,3727205754,2384911031,3215212461,2648976442,2450346104,3432737375,1180849278,331544205,3102249176,4150144569,2952102595,2159976285,2474404304,766078933,313773861,2570832044,2108100632,1668212892,3145456443,2013908262,418672217,3070356634,2594734927,1852171925,3867060991,3473416636,3907448597,2614737639,919489135,164948639,2094410160,2997825956,590424639,2486224549,1723872674,3157750862,3399941250,3501252752,3625268135,2555048196,3673637356,1343127501,4130281361,3599595085,2957853679,1297403050,81781910,3051593425,2283490410,532201772,1367295589,3926170974,895287692,1953757831,1093597963,492483431,3528626907,1446242576,1192455638,1636604631,209336225,344873464,1015671571,669961897,3375740769,3857572124,2973530695,3747192018,1933530610,3464042516,935293895,3454686199,2858115069,1863638845,3683022916,4085369519,3292445032,875313188,1080017571,3279033885,621591778,1233856572,2504130317,24197544,3017672716,3835484340,3247465558,2220981195,3060847922,1551124588,1463996600],E=[4104605777,1097159550,396673818,660510266,2875968315,2638606623,4200115116,3808662347,821712160,1986918061,3430322568,38544885,3856137295,718002117,893681702,1654886325,2975484382,3122358053,3926825029,4274053469,796197571,1290801793,1184342925,3556361835,2405426947,2459735317,1836772287,1381620373,3196267988,1948373848,3764988233,3385345166,3263785589,2390325492,1480485785,3111247143,3780097726,2293045232,548169417,3459953789,3746175075,439452389,1362321559,1400849762,1685577905,1806599355,2174754046,137073913,1214797936,1174215055,3731654548,2079897426,1943217067,1258480242,529487843,1437280870,3945269170,3049390895,3313212038,923313619,679998e3,3215307299,57326082,377642221,3474729866,2041877159,133361907,1776460110,3673476453,96392454,878845905,2801699524,777231668,4082475170,2330014213,4142626212,2213296395,1626319424,1906247262,1846563261,562755902,3708173718,1040559837,3871163981,1418573201,3294430577,114585348,1343618912,2566595609,3186202582,1078185097,3651041127,3896688048,2307622919,425408743,3371096953,2081048481,1108339068,2216610296,0,2156299017,736970802,292596766,1517440620,251657213,2235061775,2933202493,758720310,265905162,1554391400,1532285339,908999204,174567692,1474760595,4002861748,2610011675,3234156416,3693126241,2001430874,303699484,2478443234,2687165888,585122620,454499602,151849742,2345119218,3064510765,514443284,4044981591,1963412655,2581445614,2137062819,19308535,1928707164,1715193156,4219352155,1126790795,600235211,3992742070,3841024952,836553431,1669664834,2535604243,3323011204,1243905413,3141400786,4180808110,698445255,2653899549,2989552604,2253581325,3252932727,3004591147,1891211689,2487810577,3915653703,4237083816,4030667424,2100090966,865136418,1229899655,953270745,3399679628,3557504664,4118925222,2061379749,3079546586,2915017791,983426092,2022837584,1607244650,2118541908,2366882550,3635996816,972512814,3283088770,1568718495,3499326569,3576539503,621982671,2895723464,410887952,2623762152,1002142683,645401037,1494807662,2595684844,1335535747,2507040230,4293295786,3167684641,367585007,3885750714,1865862730,2668221674,2960971305,2763173681,1059270954,2777952454,2724642869,1320957812,2194319100,2429595872,2815956275,77089521,3973773121,3444575871,2448830231,1305906550,4021308739,2857194700,2516901860,3518358430,1787304780,740276417,1699839814,1592394909,2352307457,2272556026,188821243,1729977011,3687994002,274084841,3594982253,3613494426,2701949495,4162096729,322734571,2837966542,1640576439,484830689,1202797690,3537852828,4067639125,349075736,3342319475,4157467219,4255800159,1030690015,1155237496,2951971274,1757691577,607398968,2738905026,499347990,3794078908,1011452712,227885567,2818666809,213114376,3034881240,1455525988,3414450555,850817237,1817998408,3092726480],_=[0,235474187,470948374,303765277,941896748,908933415,607530554,708780849,1883793496,2118214995,1817866830,1649639237,1215061108,1181045119,1417561698,1517767529,3767586992,4003061179,4236429990,4069246893,3635733660,3602770327,3299278474,3400528769,2430122216,2664543715,2362090238,2193862645,2835123396,2801107407,3035535058,3135740889,3678124923,3576870512,3341394285,3374361702,3810496343,3977675356,4279080257,4043610186,2876494627,2776292904,3076639029,3110650942,2472011535,2640243204,2403728665,2169303058,1001089995,899835584,666464733,699432150,59727847,226906860,530400753,294930682,1273168787,1172967064,1475418501,1509430414,1942435775,2110667444,1876241833,1641816226,2910219766,2743034109,2976151520,3211623147,2505202138,2606453969,2302690252,2269728455,3711829422,3543599269,3240894392,3475313331,3843699074,3943906441,4178062228,4144047775,1306967366,1139781709,1374988112,1610459739,1975683434,2076935265,1775276924,1742315127,1034867998,866637845,566021896,800440835,92987698,193195065,429456164,395441711,1984812685,2017778566,1784663195,1683407248,1315562145,1080094634,1383856311,1551037884,101039829,135050206,437757123,337553864,1042385657,807962610,573804783,742039012,2531067453,2564033334,2328828971,2227573024,2935566865,2700099354,3001755655,3168937228,3868552805,3902563182,4203181171,4102977912,3736164937,3501741890,3265478751,3433712980,1106041591,1340463100,1576976609,1408749034,2043211483,2009195472,1708848333,1809054150,832877231,1068351396,766945465,599762354,159417987,126454664,361929877,463180190,2709260871,2943682380,3178106961,3009879386,2572697195,2538681184,2236228733,2336434550,3509871135,3745345300,3441850377,3274667266,3910161971,3877198648,4110568485,4211818798,2597806476,2497604743,2261089178,2295101073,2733856160,2902087851,3202437046,2968011453,3936291284,3835036895,4136440770,4169408201,3535486456,3702665459,3467192302,3231722213,2051518780,1951317047,1716890410,1750902305,1113818384,1282050075,1584504582,1350078989,168810852,67556463,371049330,404016761,841739592,1008918595,775550814,540080725,3969562369,3801332234,4035489047,4269907996,3569255213,3669462566,3366754619,3332740144,2631065433,2463879762,2160117071,2395588676,2767645557,2868897406,3102011747,3069049960,202008497,33778362,270040487,504459436,875451293,975658646,675039627,641025152,2084704233,1917518562,1615861247,1851332852,1147550661,1248802510,1484005843,1451044056,933301370,967311729,733156972,632953703,260388950,25965917,328671808,496906059,1206477858,1239443753,1543208500,1441952575,2144161806,1908694277,1675577880,1842759443,3610369226,3644379585,3408119516,3307916247,4011190502,3776767469,4077384432,4245618683,2809771154,2842737049,3144396420,3043140495,2673705150,2438237621,2203032232,2370213795],S=[0,185469197,370938394,487725847,741876788,657861945,975451694,824852259,1483753576,1400783205,1315723890,1164071807,1950903388,2135319889,1649704518,1767536459,2967507152,3152976349,2801566410,2918353863,2631447780,2547432937,2328143614,2177544179,3901806776,3818836405,4270639778,4118987695,3299409036,3483825537,3535072918,3652904859,2077965243,1893020342,1841768865,1724457132,1474502543,1559041666,1107234197,1257309336,598438867,681933534,901210569,1052338372,261314535,77422314,428819965,310463728,3409685355,3224740454,3710368113,3593056380,3875770207,3960309330,4045380933,4195456072,2471224067,2554718734,2237133081,2388260884,3212035895,3028143674,2842678573,2724322336,4138563181,4255350624,3769721975,3955191162,3667219033,3516619604,3431546947,3347532110,2933734917,2782082824,3099667487,3016697106,2196052529,2313884476,2499348523,2683765030,1179510461,1296297904,1347548327,1533017514,1786102409,1635502980,2087309459,2003294622,507358933,355706840,136428751,53458370,839224033,957055980,605657339,790073846,2373340630,2256028891,2607439820,2422494913,2706270690,2856345839,3075636216,3160175349,3573941694,3725069491,3273267108,3356761769,4181598602,4063242375,4011996048,3828103837,1033297158,915985419,730517276,545572369,296679730,446754879,129166120,213705253,1709610350,1860738147,1945798516,2029293177,1239331162,1120974935,1606591296,1422699085,4148292826,4233094615,3781033664,3931371469,3682191598,3497509347,3446004468,3328955385,2939266226,2755636671,3106780840,2988687269,2198438022,2282195339,2501218972,2652609425,1201765386,1286567175,1371368976,1521706781,1805211710,1620529459,2105887268,1988838185,533804130,350174575,164439672,46346101,870912086,954669403,636813900,788204353,2358957921,2274680428,2592523643,2441661558,2695033685,2880240216,3065962831,3182487618,3572145929,3756299780,3270937875,3388507166,4174560061,4091327024,4006521127,3854606378,1014646705,930369212,711349675,560487590,272786309,457992840,106852767,223377554,1678381017,1862534868,1914052035,2031621326,1211247597,1128014560,1580087799,1428173050,32283319,182621114,401639597,486441376,768917123,651868046,1003007129,818324884,1503449823,1385356242,1333838021,1150208456,1973745387,2125135846,1673061617,1756818940,2970356327,3120694122,2802849917,2887651696,2637442643,2520393566,2334669897,2149987652,3917234703,3799141122,4284502037,4100872472,3309594171,3460984630,3545789473,3629546796,2050466060,1899603969,1814803222,1730525723,1443857720,1560382517,1075025698,1260232239,575138148,692707433,878443390,1062597235,243256656,91341917,409198410,325965383,3403100636,3252238545,3704300486,3620022987,3874428392,3990953189,4042459122,4227665663,2460449204,2578018489,2226875310,2411029155,3198115200,3046200461,2827177882,2743944855],x=[0,218828297,437656594,387781147,875313188,958871085,775562294,590424639,1750626376,1699970625,1917742170,2135253587,1551124588,1367295589,1180849278,1265195639,3501252752,3720081049,3399941250,3350065803,3835484340,3919042237,4270507174,4085369519,3102249176,3051593425,2734591178,2952102595,2361698556,2177869557,2530391278,2614737639,3145456443,3060847922,2708326185,2892417312,2404901663,2187128086,2504130317,2555048196,3542330227,3727205754,3375740769,3292445032,3876557655,3926170974,4246310725,4027744588,1808481195,1723872674,1910319033,2094410160,1608975247,1391201670,1173430173,1224348052,59984867,244860394,428169201,344873464,935293895,984907214,766078933,547512796,1844882806,1627235199,2011214180,2062270317,1507497298,1423022939,1137477952,1321699145,95345982,145085239,532201772,313773861,830661914,1015671571,731183368,648017665,3175501286,2957853679,2807058932,2858115069,2305455554,2220981195,2474404304,2658625497,3575528878,3625268135,3473416636,3254988725,3778151818,3963161475,4213447064,4130281361,3599595085,3683022916,3432737375,3247465558,3802222185,4020912224,4172763771,4122762354,3201631749,3017672716,2764249623,2848461854,2331590177,2280796200,2431590963,2648976442,104699613,188127444,472615631,287343814,840019705,1058709744,671593195,621591778,1852171925,1668212892,1953757831,2037970062,1514790577,1463996600,1080017571,1297403050,3673637356,3623636965,3235995134,3454686199,4007360968,3822090177,4107101658,4190530515,2997825956,3215212461,2830708150,2779915199,2256734592,2340947849,2627016082,2443058075,172466556,122466165,273792366,492483431,1047239e3,861968209,612205898,695634755,1646252340,1863638845,2013908262,1963115311,1446242576,1530455833,1277555970,1093597963,1636604631,1820824798,2073724613,1989249228,1436590835,1487645946,1337376481,1119727848,164948639,81781910,331544205,516552836,1039717051,821288114,669961897,719700128,2973530695,3157750862,2871682645,2787207260,2232435299,2283490410,2667994737,2450346104,3647212047,3564045318,3279033885,3464042516,3980931627,3762502690,4150144569,4199882800,3070356634,3121275539,2904027272,2686254721,2200818878,2384911031,2570832044,2486224549,3747192018,3528626907,3310321856,3359936201,3950355702,3867060991,4049844452,4234721005,1739656202,1790575107,2108100632,1890328081,1402811438,1586903591,1233856572,1149249077,266959938,48394827,369057872,418672217,1002783846,919489135,567498868,752375421,209336225,24197544,376187827,459744698,945164165,895287692,574624663,793451934,1679968233,1764313568,2117360635,1933530610,1343127501,1560637892,1243112415,1192455638,3704280881,3519142200,3336358691,3419915562,3907448597,3857572124,4075877127,4294704398,3029510009,3113855344,2927934315,2744104290,2159976285,2377486676,2594734927,2544078150],A=[0,151849742,303699484,454499602,607398968,758720310,908999204,1059270954,1214797936,1097159550,1517440620,1400849762,1817998408,1699839814,2118541908,2001430874,2429595872,2581445614,2194319100,2345119218,3034881240,3186202582,2801699524,2951971274,3635996816,3518358430,3399679628,3283088770,4237083816,4118925222,4002861748,3885750714,1002142683,850817237,698445255,548169417,529487843,377642221,227885567,77089521,1943217067,2061379749,1640576439,1757691577,1474760595,1592394909,1174215055,1290801793,2875968315,2724642869,3111247143,2960971305,2405426947,2253581325,2638606623,2487810577,3808662347,3926825029,4044981591,4162096729,3342319475,3459953789,3576539503,3693126241,1986918061,2137062819,1685577905,1836772287,1381620373,1532285339,1078185097,1229899655,1040559837,923313619,740276417,621982671,439452389,322734571,137073913,19308535,3871163981,4021308739,4104605777,4255800159,3263785589,3414450555,3499326569,3651041127,2933202493,2815956275,3167684641,3049390895,2330014213,2213296395,2566595609,2448830231,1305906550,1155237496,1607244650,1455525988,1776460110,1626319424,2079897426,1928707164,96392454,213114376,396673818,514443284,562755902,679998e3,865136418,983426092,3708173718,3557504664,3474729866,3323011204,4180808110,4030667424,3945269170,3794078908,2507040230,2623762152,2272556026,2390325492,2975484382,3092726480,2738905026,2857194700,3973773121,3856137295,4274053469,4157467219,3371096953,3252932727,3673476453,3556361835,2763173681,2915017791,3064510765,3215307299,2156299017,2307622919,2459735317,2610011675,2081048481,1963412655,1846563261,1729977011,1480485785,1362321559,1243905413,1126790795,878845905,1030690015,645401037,796197571,274084841,425408743,38544885,188821243,3613494426,3731654548,3313212038,3430322568,4082475170,4200115116,3780097726,3896688048,2668221674,2516901860,2366882550,2216610296,3141400786,2989552604,2837966542,2687165888,1202797690,1320957812,1437280870,1554391400,1669664834,1787304780,1906247262,2022837584,265905162,114585348,499347990,349075736,736970802,585122620,972512814,821712160,2595684844,2478443234,2293045232,2174754046,3196267988,3079546586,2895723464,2777952454,3537852828,3687994002,3234156416,3385345166,4142626212,4293295786,3841024952,3992742070,174567692,57326082,410887952,292596766,777231668,660510266,1011452712,893681702,1108339068,1258480242,1343618912,1494807662,1715193156,1865862730,1948373848,2100090966,2701949495,2818666809,3004591147,3122358053,2235061775,2352307457,2535604243,2653899549,3915653703,3764988233,4219352155,4067639125,3444575871,3294430577,3746175075,3594982253,836553431,953270745,600235211,718002117,367585007,484830689,133361907,251657213,2041877159,1891211689,1806599355,1654886325,1568718495,1418573201,1335535747,1184342925];function T(e){for(var t=[],r=0;r>2,this._Ke[r][t%4]=i[t],this._Kd[e-r][t%4]=i[t];for(var a,s=0,l=o;l>16&255]<<24^f[a>>8&255]<<16^f[255&a]<<8^f[a>>24&255]^d[s]<<24,s+=1,8!=o)for(t=1;t>8&255]<<8^f[a>>16&255]<<16^f[a>>24&255]<<24,t=o/2+1;t>2,p=l%4,this._Ke[c][p]=i[t],this._Kd[e-c][p]=i[t++],l++}for(var c=1;c>24&255]^S[a>>16&255]^x[a>>8&255]^A[255&a]},C.prototype.encrypt=function(e){if(16!=e.length)throw new Error("invalid plaintext size (must be 16 bytes)");for(var t=this._Ke.length-1,r=[0,0,0,0],n=T(e),o=0;o<4;o++)n[o]^=this._Ke[0][o];for(var a=1;a>24&255]^m[n[(o+1)%4]>>16&255]^g[n[(o+2)%4]>>8&255]^b[255&n[(o+3)%4]]^this._Ke[a][o];n=r.slice()}var s,l=i(16);for(o=0;o<4;o++)s=this._Ke[t][o],l[4*o]=255&(f[n[o]>>24&255]^s>>24),l[4*o+1]=255&(f[n[(o+1)%4]>>16&255]^s>>16),l[4*o+2]=255&(f[n[(o+2)%4]>>8&255]^s>>8),l[4*o+3]=255&(f[255&n[(o+3)%4]]^s);return l},C.prototype.decrypt=function(e){if(16!=e.length)throw new Error("invalid ciphertext size (must be 16 bytes)");for(var t=this._Kd.length-1,r=[0,0,0,0],n=T(e),o=0;o<4;o++)n[o]^=this._Kd[0][o];for(var a=1;a>24&255]^y[n[(o+3)%4]>>16&255]^w[n[(o+2)%4]>>8&255]^E[255&n[(o+1)%4]]^this._Kd[a][o];n=r.slice()}var s,l=i(16);for(o=0;o<4;o++)s=this._Kd[t][o],l[4*o]=255&(p[n[o]>>24&255]^s>>24),l[4*o+1]=255&(p[n[(o+3)%4]>>16&255]^s>>16),l[4*o+2]=255&(p[n[(o+2)%4]>>8&255]^s>>8),l[4*o+3]=255&(p[255&n[(o+1)%4]]^s);return l};var k=function(e){if(!(this instanceof k))throw Error("AES must be instanitated with `new`");this.description="Electronic Code Block",this.name="ecb",this._aes=new C(e)};k.prototype.encrypt=function(e){if((e=o(e)).length%16!=0)throw new Error("invalid plaintext size (must be multiple of 16 bytes)");for(var t=i(e.length),r=i(16),n=0;n=0;--t)this._counter[t]=e%256,e>>=8},I.prototype.setBytes=function(e){if(16!=(e=o(e,!0)).length)throw new Error("invalid counter bytes size (must be 16 bytes)");this._counter=e},I.prototype.increment=function(){for(var e=15;e>=0;e--){if(255!==this._counter[e]){this._counter[e]++;break}this._counter[e]=0}};var M=function(e,t){if(!(this instanceof M))throw Error("AES must be instanitated with `new`");this.description="Counter",this.name="ctr",t instanceof I||(t=new I(t)),this._counter=t,this._remainingCounter=null,this._remainingCounterIndex=16,this._aes=new C(e)};M.prototype.encrypt=function(e){for(var t=o(e,!0),r=0;r16)throw new Error("PKCS#7 padding byte out of range");for(var r=e.length-t,n=0;n{"use strict";function r(e,t){return{validate:e,compare:t}}Object.defineProperty(t,"__esModule",{value:!0}),t.formatNames=t.fastFormats=t.fullFormats=void 0,t.fullFormats={date:r(i,a),time:r(l,c),"date-time":r((function(e){const t=e.split(u);return 2===t.length&&i(t[0])&&l(t[1],!0)}),d),duration:/^P(?!$)((\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)?|(\d+W)?)$/,uri:function(e){return f.test(e)&&p.test(e)},"uri-reference":/^(?:[a-z][a-z0-9+\-.]*:)?(?:\/?\/(?:(?:[a-z0-9\-._~!$&'()*+,;=:]|%[0-9a-f]{2})*@)?(?:\[(?:(?:(?:(?:[0-9a-f]{1,4}:){6}|::(?:[0-9a-f]{1,4}:){5}|(?:[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){4}|(?:(?:[0-9a-f]{1,4}:){0,1}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){3}|(?:(?:[0-9a-f]{1,4}:){0,2}[0-9a-f]{1,4})?::(?:[0-9a-f]{1,4}:){2}|(?:(?:[0-9a-f]{1,4}:){0,3}[0-9a-f]{1,4})?::[0-9a-f]{1,4}:|(?:(?:[0-9a-f]{1,4}:){0,4}[0-9a-f]{1,4})?::)(?:[0-9a-f]{1,4}:[0-9a-f]{1,4}|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?))|(?:(?:[0-9a-f]{1,4}:){0,5}[0-9a-f]{1,4})?::[0-9a-f]{1,4}|(?:(?:[0-9a-f]{1,4}:){0,6}[0-9a-f]{1,4})?::)|[Vv][0-9a-f]+\.[a-z0-9\-._~!$&'()*+,;=:]+)\]|(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)|(?:[a-z0-9\-._~!$&'"()*+,;=]|%[0-9a-f]{2})*)(?::\d*)?(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*|\/(?:(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?|(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})+(?:\/(?:[a-z0-9\-._~!$&'"()*+,;=:@]|%[0-9a-f]{2})*)*)?(?:\?(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?(?:#(?:[a-z0-9\-._~!$&'"()*+,;=:@/?]|%[0-9a-f]{2})*)?$/i,"uri-template":/^(?:(?:[^\x00-\x20"'<>%\\^`{|}]|%[0-9a-f]{2})|\{[+#./;?&=,!@|]?(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?(?:,(?:[a-z0-9_]|%[0-9a-f]{2})+(?::[1-9][0-9]{0,3}|\*)?)*\})*$/i,url:/^(?:https?|ftp):\/\/(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)(?:\.(?:[a-z0-9\u{00a1}-\u{ffff}]+-)*[a-z0-9\u{00a1}-\u{ffff}]+)*(?:\.(?:[a-z\u{00a1}-\u{ffff}]{2,})))(?::\d{2,5})?(?:\/[^\s]*)?$/iu,email:/^[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*@(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/i,hostname:/^(?=.{1,253}\.?$)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[-0-9a-z]{0,61}[0-9a-z])?)*\.?$/i,ipv4:/^(?:(?:25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(?:25[0-5]|2[0-4]\d|[01]?\d\d?)$/,ipv6:/^((([0-9a-f]{1,4}:){7}([0-9a-f]{1,4}|:))|(([0-9a-f]{1,4}:){6}(:[0-9a-f]{1,4}|((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){5}(((:[0-9a-f]{1,4}){1,2})|:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3})|:))|(([0-9a-f]{1,4}:){4}(((:[0-9a-f]{1,4}){1,3})|((:[0-9a-f]{1,4})?:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){3}(((:[0-9a-f]{1,4}){1,4})|((:[0-9a-f]{1,4}){0,2}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){2}(((:[0-9a-f]{1,4}){1,5})|((:[0-9a-f]{1,4}){0,3}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(([0-9a-f]{1,4}:){1}(((:[0-9a-f]{1,4}){1,6})|((:[0-9a-f]{1,4}){0,4}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:))|(:(((:[0-9a-f]{1,4}){1,7})|((:[0-9a-f]{1,4}){0,5}:((25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)(\.(25[0-5]|2[0-4]\d|1\d\d|[1-9]?\d)){3}))|:)))$/i,regex:function(e){if(v.test(e))return!1;try{return new RegExp(e),!0}catch(e){return!1}},uuid:/^(?:urn:uuid:)?[0-9a-f]{8}-(?:[0-9a-f]{4}-){3}[0-9a-f]{12}$/i,"json-pointer":/^(?:\/(?:[^~/]|~0|~1)*)*$/,"json-pointer-uri-fragment":/^#(?:\/(?:[a-z0-9_\-.!$&'()*+,;:=@]|%[0-9a-f]{2}|~0|~1)*)*$/i,"relative-json-pointer":/^(?:0|[1-9][0-9]*)(?:#|(?:\/(?:[^~/]|~0|~1)*)*)$/,byte:function(e){return h.lastIndex=0,h.test(e)},int32:{type:"number",validate:function(e){return Number.isInteger(e)&&e<=g&&e>=m}},int64:{type:"number",validate:function(e){return Number.isInteger(e)}},float:{type:"number",validate:b},double:{type:"number",validate:b},password:!0,binary:!0},t.fastFormats={...t.fullFormats,date:r(/^\d\d\d\d-[0-1]\d-[0-3]\d$/,a),time:r(/^(?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)?$/i,c),"date-time":r(/^\d\d\d\d-[0-1]\d-[0-3]\d[t\s](?:[0-2]\d:[0-5]\d:[0-5]\d|23:59:60)(?:\.\d+)?(?:z|[+-]\d\d(?::?\d\d)?)$/i,d),uri:/^(?:[a-z][a-z0-9+\-.]*:)(?:\/?\/)?[^\s]*$/i,"uri-reference":/^(?:(?:[a-z][a-z0-9+\-.]*:)?\/?\/)?(?:[^\\\s#][^\s#]*)?(?:#[^\\\s]*)?$/i,email:/^[a-z0-9.!#$%&'*+/=?^_`{|}~-]+@[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?(?:\.[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?)*$/i},t.formatNames=Object.keys(t.fullFormats);const n=/^(\d\d\d\d)-(\d\d)-(\d\d)$/,o=[0,31,28,31,30,31,30,31,31,30,31,30,31];function i(e){const t=n.exec(e);if(!t)return!1;const r=+t[1],i=+t[2],a=+t[3];return i>=1&&i<=12&&a>=1&&a<=(2===i&&function(e){return e%4==0&&(e%100!=0||e%400==0)}(r)?29:o[i])}function a(e,t){if(e&&t)return e>t?1:e(t=n[1]+n[2]+n[3]+(n[4]||""))?1:e{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(14018),o=r(26461),i=r(99029),a=new i.Name("fullFormats"),s=new i.Name("fastFormats"),l=(e,t={keywords:!0})=>{if(Array.isArray(t))return c(e,t,n.fullFormats,a),e;const[r,i]="fast"===t.mode?[n.fastFormats,s]:[n.fullFormats,a];return c(e,t.formats||n.formatNames,r,i),t.keywords&&o.default(e),e};function c(e,t,r,n){var o,a;null!==(o=(a=e.opts.code).formats)&&void 0!==o||(a.formats=i._`require("ajv-formats/dist/formats").${n}`);for(const n of t)e.addFormat(n,r[n])}l.get=(e,t="full")=>{const r=("fast"===t?n.fastFormats:n.fullFormats)[e];if(!r)throw new Error(`Unknown format "${e}"`);return r},e.exports=t=l,Object.defineProperty(t,"__esModule",{value:!0}),t.default=l},26461:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.formatLimitDefinition=void 0;const n=r(63282),o=r(99029),i=o.operators,a={formatMaximum:{okStr:"<=",ok:i.LTE,fail:i.GT},formatMinimum:{okStr:">=",ok:i.GTE,fail:i.LT},formatExclusiveMaximum:{okStr:"<",ok:i.LT,fail:i.GTE},formatExclusiveMinimum:{okStr:">",ok:i.GT,fail:i.LTE}},s={message:({keyword:e,schemaCode:t})=>o.str`should be ${a[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>o._`{comparison: ${a[e].okStr}, limit: ${t}}`};t.formatLimitDefinition={keyword:Object.keys(a),type:"string",schemaType:"string",$data:!0,error:s,code(e){const{gen:t,data:r,schemaCode:i,keyword:s,it:l}=e,{opts:c,self:u}=l;if(!c.validateFormats)return;const d=new n.KeywordCxt(l,u.RULES.all.format.definition,"format");function f(e){return o._`${e}.compare(${r}, ${i}) ${a[s].fail} 0`}d.$data?function(){const r=t.scopeValue("formats",{ref:u.formats,code:c.code.formats}),n=t.const("fmt",o._`${r}[${d.schemaCode}]`);e.fail$data(o.or(o._`typeof ${n} != "object"`,o._`${n} instanceof RegExp`,o._`typeof ${n}.compare != "function"`,f(n)))}():function(){const r=d.schema,n=u.formats[r];if(!n||!0===n)return;if("object"!=typeof n||n instanceof RegExp||"function"!=typeof n.compare)throw new Error(`"${s}": format "${r}" does not define "compare" function`);const i=t.scopeValue("formats",{key:r,ref:n,code:c.code.formats?o._`${c.code.formats}${o.getProperty(r)}`:void 0});e.fail$data(f(i))}()},dependencies:["format"]},t.default=e=>(e.addKeyword(t.formatLimitDefinition),e)},63282:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.MissingRefError=t.ValidationError=t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;const n=r(4042),o=r(86144),i=r(36653),a=r(72079),s=["/properties"],l="http://json-schema.org/draft-07/schema";class c extends n.default{_addVocabularies(){super._addVocabularies(),o.default.forEach((e=>this.addVocabulary(e))),this.opts.discriminator&&this.addKeyword(i.default)}_addDefaultMetaSchema(){if(super._addDefaultMetaSchema(),!this.opts.meta)return;const e=this.opts.$data?this.$dataMetaSchema(a,s):a;this.addMetaSchema(e,l,!1),this.refs["http://json-schema.org/schema"]=l}defaultMeta(){return this.opts.defaultMeta=super.defaultMeta()||(this.getSchema(l)?l:void 0)}}e.exports=t=c,Object.defineProperty(t,"__esModule",{value:!0}),t.default=c;var u=r(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return u.KeywordCxt}});var d=r(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return d._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return d.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return d.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return d.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return d.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return d.CodeGen}});var f=r(13558);Object.defineProperty(t,"ValidationError",{enumerable:!0,get:function(){return f.default}});var p=r(34551);Object.defineProperty(t,"MissingRefError",{enumerable:!0,get:function(){return p.default}})},41520:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.regexpCode=t.getEsmExportName=t.getProperty=t.safeStringify=t.stringify=t.strConcat=t.addCodeArg=t.str=t._=t.nil=t._Code=t.Name=t.IDENTIFIER=t._CodeOrName=void 0;class r{}t._CodeOrName=r,t.IDENTIFIER=/^[a-z$_][a-z$_0-9]*$/i;class n extends r{constructor(e){if(super(),!t.IDENTIFIER.test(e))throw new Error("CodeGen: name must be a valid identifier");this.str=e}toString(){return this.str}emptyStr(){return!1}get names(){return{[this.str]:1}}}t.Name=n;class o extends r{constructor(e){super(),this._items="string"==typeof e?[e]:e}toString(){return this.str}emptyStr(){if(this._items.length>1)return!1;const e=this._items[0];return""===e||'""'===e}get str(){var e;return null!==(e=this._str)&&void 0!==e?e:this._str=this._items.reduce(((e,t)=>`${e}${t}`),"")}get names(){var e;return null!==(e=this._names)&&void 0!==e?e:this._names=this._items.reduce(((e,t)=>(t instanceof n&&(e[t.str]=(e[t.str]||0)+1),e)),{})}}function i(e,...t){const r=[e[0]];let n=0;for(;n{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.or=t.and=t.not=t.CodeGen=t.operators=t.varKinds=t.ValueScopeName=t.ValueScope=t.Scope=t.Name=t.regexpCode=t.stringify=t.getProperty=t.nil=t.strConcat=t.str=t._=void 0;const n=r(41520),o=r(57845);var i=r(41520);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return i._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return i.str}}),Object.defineProperty(t,"strConcat",{enumerable:!0,get:function(){return i.strConcat}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return i.nil}}),Object.defineProperty(t,"getProperty",{enumerable:!0,get:function(){return i.getProperty}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return i.stringify}}),Object.defineProperty(t,"regexpCode",{enumerable:!0,get:function(){return i.regexpCode}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return i.Name}});var a=r(57845);Object.defineProperty(t,"Scope",{enumerable:!0,get:function(){return a.Scope}}),Object.defineProperty(t,"ValueScope",{enumerable:!0,get:function(){return a.ValueScope}}),Object.defineProperty(t,"ValueScopeName",{enumerable:!0,get:function(){return a.ValueScopeName}}),Object.defineProperty(t,"varKinds",{enumerable:!0,get:function(){return a.varKinds}}),t.operators={GT:new n._Code(">"),GTE:new n._Code(">="),LT:new n._Code("<"),LTE:new n._Code("<="),EQ:new n._Code("==="),NEQ:new n._Code("!=="),NOT:new n._Code("!"),OR:new n._Code("||"),AND:new n._Code("&&"),ADD:new n._Code("+")};class s{optimizeNodes(){return this}optimizeNames(e,t){return this}}class l extends s{constructor(e,t,r){super(),this.varKind=e,this.name=t,this.rhs=r}render({es5:e,_n:t}){const r=e?o.varKinds.var:this.varKind,n=void 0===this.rhs?"":` = ${this.rhs}`;return`${r} ${this.name}${n};`+t}optimizeNames(e,t){if(e[this.name.str])return this.rhs&&(this.rhs=N(this.rhs,e,t)),this}get names(){return this.rhs instanceof n._CodeOrName?this.rhs.names:{}}}class c extends s{constructor(e,t,r){super(),this.lhs=e,this.rhs=t,this.sideEffects=r}render({_n:e}){return`${this.lhs} = ${this.rhs};`+e}optimizeNames(e,t){if(!(this.lhs instanceof n.Name)||e[this.lhs.str]||this.sideEffects)return this.rhs=N(this.rhs,e,t),this}get names(){return R(this.lhs instanceof n.Name?{}:{...this.lhs.names},this.rhs)}}class u extends c{constructor(e,t,r,n){super(e,r,n),this.op=t}render({_n:e}){return`${this.lhs} ${this.op}= ${this.rhs};`+e}}class d extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`${this.label}:`+e}}class f extends s{constructor(e){super(),this.label=e,this.names={}}render({_n:e}){return`break${this.label?` ${this.label}`:""};`+e}}class p extends s{constructor(e){super(),this.error=e}render({_n:e}){return`throw ${this.error};`+e}get names(){return this.error.names}}class h extends s{constructor(e){super(),this.code=e}render({_n:e}){return`${this.code};`+e}optimizeNodes(){return`${this.code}`?this:void 0}optimizeNames(e,t){return this.code=N(this.code,e,t),this}get names(){return this.code instanceof n._CodeOrName?this.code.names:{}}}class m extends s{constructor(e=[]){super(),this.nodes=e}render(e){return this.nodes.reduce(((t,r)=>t+r.render(e)),"")}optimizeNodes(){const{nodes:e}=this;let t=e.length;for(;t--;){const r=e[t].optimizeNodes();Array.isArray(r)?e.splice(t,1,...r):r?e[t]=r:e.splice(t,1)}return e.length>0?this:void 0}optimizeNames(e,t){const{nodes:r}=this;let n=r.length;for(;n--;){const o=r[n];o.optimizeNames(e,t)||(I(e,o.names),r.splice(n,1))}return r.length>0?this:void 0}get names(){return this.nodes.reduce(((e,t)=>O(e,t.names)),{})}}class g extends m{render(e){return"{"+e._n+super.render(e)+"}"+e._n}}class b extends m{}class v extends g{}v.kind="else";class y extends g{constructor(e,t){super(t),this.condition=e}render(e){let t=`if(${this.condition})`+super.render(e);return this.else&&(t+="else "+this.else.render(e)),t}optimizeNodes(){super.optimizeNodes();const e=this.condition;if(!0===e)return this.nodes;let t=this.else;if(t){const e=t.optimizeNodes();t=this.else=Array.isArray(e)?new v(e):e}return t?!1===e?t instanceof y?t:t.nodes:this.nodes.length?this:new y(M(e),t instanceof y?[t]:t.nodes):!1!==e&&this.nodes.length?this:void 0}optimizeNames(e,t){var r;if(this.else=null===(r=this.else)||void 0===r?void 0:r.optimizeNames(e,t),super.optimizeNames(e,t)||this.else)return this.condition=N(this.condition,e,t),this}get names(){const e=super.names;return R(e,this.condition),this.else&&O(e,this.else.names),e}}y.kind="if";class w extends g{}w.kind="for";class E extends w{constructor(e){super(),this.iteration=e}render(e){return`for(${this.iteration})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iteration=N(this.iteration,e,t),this}get names(){return O(super.names,this.iteration.names)}}class _ extends w{constructor(e,t,r,n){super(),this.varKind=e,this.name=t,this.from=r,this.to=n}render(e){const t=e.es5?o.varKinds.var:this.varKind,{name:r,from:n,to:i}=this;return`for(${t} ${r}=${n}; ${r}<${i}; ${r}++)`+super.render(e)}get names(){const e=R(super.names,this.from);return R(e,this.to)}}class S extends w{constructor(e,t,r,n){super(),this.loop=e,this.varKind=t,this.name=r,this.iterable=n}render(e){return`for(${this.varKind} ${this.name} ${this.loop} ${this.iterable})`+super.render(e)}optimizeNames(e,t){if(super.optimizeNames(e,t))return this.iterable=N(this.iterable,e,t),this}get names(){return O(super.names,this.iterable.names)}}class x extends g{constructor(e,t,r){super(),this.name=e,this.args=t,this.async=r}render(e){return`${this.async?"async ":""}function ${this.name}(${this.args})`+super.render(e)}}x.kind="func";class A extends m{render(e){return"return "+super.render(e)}}A.kind="return";class T extends g{render(e){let t="try"+super.render(e);return this.catch&&(t+=this.catch.render(e)),this.finally&&(t+=this.finally.render(e)),t}optimizeNodes(){var e,t;return super.optimizeNodes(),null===(e=this.catch)||void 0===e||e.optimizeNodes(),null===(t=this.finally)||void 0===t||t.optimizeNodes(),this}optimizeNames(e,t){var r,n;return super.optimizeNames(e,t),null===(r=this.catch)||void 0===r||r.optimizeNames(e,t),null===(n=this.finally)||void 0===n||n.optimizeNames(e,t),this}get names(){const e=super.names;return this.catch&&O(e,this.catch.names),this.finally&&O(e,this.finally.names),e}}class C extends g{constructor(e){super(),this.error=e}render(e){return`catch(${this.error})`+super.render(e)}}C.kind="catch";class k extends g{render(e){return"finally"+super.render(e)}}function O(e,t){for(const r in t)e[r]=(e[r]||0)+(t[r]||0);return e}function R(e,t){return t instanceof n._CodeOrName?O(e,t.names):e}function N(e,t,r){return e instanceof n.Name?i(e):(o=e)instanceof n._Code&&o._items.some((e=>e instanceof n.Name&&1===t[e.str]&&void 0!==r[e.str]))?new n._Code(e._items.reduce(((e,t)=>(t instanceof n.Name&&(t=i(t)),t instanceof n._Code?e.push(...t._items):e.push(t),e)),[])):e;var o;function i(e){const n=r[e.str];return void 0===n||1!==t[e.str]?e:(delete t[e.str],n)}}function I(e,t){for(const r in t)e[r]=(e[r]||0)-(t[r]||0)}function M(e){return"boolean"==typeof e||"number"==typeof e||null===e?!e:n._`!${F(e)}`}k.kind="finally",t.CodeGen=class{constructor(e,t={}){this._values={},this._blockStarts=[],this._constants={},this.opts={...t,_n:t.lines?"\n":""},this._extScope=e,this._scope=new o.Scope({parent:e}),this._nodes=[new b]}toString(){return this._root.render(this.opts)}name(e){return this._scope.name(e)}scopeName(e){return this._extScope.name(e)}scopeValue(e,t){const r=this._extScope.value(e,t);return(this._values[r.prefix]||(this._values[r.prefix]=new Set)).add(r),r}getScopeValue(e,t){return this._extScope.getValue(e,t)}scopeRefs(e){return this._extScope.scopeRefs(e,this._values)}scopeCode(){return this._extScope.scopeCode(this._values)}_def(e,t,r,n){const o=this._scope.toName(t);return void 0!==r&&n&&(this._constants[o.str]=r),this._leafNode(new l(e,o,r)),o}const(e,t,r){return this._def(o.varKinds.const,e,t,r)}let(e,t,r){return this._def(o.varKinds.let,e,t,r)}var(e,t,r){return this._def(o.varKinds.var,e,t,r)}assign(e,t,r){return this._leafNode(new c(e,t,r))}add(e,r){return this._leafNode(new u(e,t.operators.ADD,r))}code(e){return"function"==typeof e?e():e!==n.nil&&this._leafNode(new h(e)),this}object(...e){const t=["{"];for(const[r,o]of e)t.length>1&&t.push(","),t.push(r),(r!==o||this.opts.es5)&&(t.push(":"),(0,n.addCodeArg)(t,o));return t.push("}"),new n._Code(t)}if(e,t,r){if(this._blockNode(new y(e)),t&&r)this.code(t).else().code(r).endIf();else if(t)this.code(t).endIf();else if(r)throw new Error('CodeGen: "else" body without "then" body');return this}elseIf(e){return this._elseNode(new y(e))}else(){return this._elseNode(new v)}endIf(){return this._endBlockNode(y,v)}_for(e,t){return this._blockNode(e),t&&this.code(t).endFor(),this}for(e,t){return this._for(new E(e),t)}forRange(e,t,r,n,i=(this.opts.es5?o.varKinds.var:o.varKinds.let)){const a=this._scope.toName(e);return this._for(new _(i,a,t,r),(()=>n(a)))}forOf(e,t,r,i=o.varKinds.const){const a=this._scope.toName(e);if(this.opts.es5){const e=t instanceof n.Name?t:this.var("_arr",t);return this.forRange("_i",0,n._`${e}.length`,(t=>{this.var(a,n._`${e}[${t}]`),r(a)}))}return this._for(new S("of",i,a,t),(()=>r(a)))}forIn(e,t,r,i=(this.opts.es5?o.varKinds.var:o.varKinds.const)){if(this.opts.ownProperties)return this.forOf(e,n._`Object.keys(${t})`,r);const a=this._scope.toName(e);return this._for(new S("in",i,a,t),(()=>r(a)))}endFor(){return this._endBlockNode(w)}label(e){return this._leafNode(new d(e))}break(e){return this._leafNode(new f(e))}return(e){const t=new A;if(this._blockNode(t),this.code(e),1!==t.nodes.length)throw new Error('CodeGen: "return" should have one node');return this._endBlockNode(A)}try(e,t,r){if(!t&&!r)throw new Error('CodeGen: "try" without "catch" and "finally"');const n=new T;if(this._blockNode(n),this.code(e),t){const e=this.name("e");this._currNode=n.catch=new C(e),t(e)}return r&&(this._currNode=n.finally=new k,this.code(r)),this._endBlockNode(C,k)}throw(e){return this._leafNode(new p(e))}block(e,t){return this._blockStarts.push(this._nodes.length),e&&this.code(e).endBlock(t),this}endBlock(e){const t=this._blockStarts.pop();if(void 0===t)throw new Error("CodeGen: not in self-balancing block");const r=this._nodes.length-t;if(r<0||void 0!==e&&r!==e)throw new Error(`CodeGen: wrong number of nodes: ${r} vs ${e} expected`);return this._nodes.length=t,this}func(e,t=n.nil,r,o){return this._blockNode(new x(e,t,r)),o&&this.code(o).endFunc(),this}endFunc(){return this._endBlockNode(x)}optimize(e=1){for(;e-- >0;)this._root.optimizeNodes(),this._root.optimizeNames(this._root.names,this._constants)}_leafNode(e){return this._currNode.nodes.push(e),this}_blockNode(e){this._currNode.nodes.push(e),this._nodes.push(e)}_endBlockNode(e,t){const r=this._currNode;if(r instanceof e||t&&r instanceof t)return this._nodes.pop(),this;throw new Error(`CodeGen: not in block "${t?`${e.kind}/${t.kind}`:e.kind}"`)}_elseNode(e){const t=this._currNode;if(!(t instanceof y))throw new Error('CodeGen: "else" without "if"');return this._currNode=t.else=e,this}get _root(){return this._nodes[0]}get _currNode(){const e=this._nodes;return e[e.length-1]}set _currNode(e){const t=this._nodes;t[t.length-1]=e}},t.not=M;const P=L(t.operators.AND);t.and=function(...e){return e.reduce(P)};const D=L(t.operators.OR);function L(e){return(t,r)=>t===n.nil?r:r===n.nil?t:n._`${F(t)} ${e} ${F(r)}`}function F(e){return e instanceof n.Name?e:n._`(${e})`}t.or=function(...e){return e.reduce(D)}},57845:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.ValueScope=t.ValueScopeName=t.Scope=t.varKinds=t.UsedValueState=void 0;const n=r(41520);class o extends Error{constructor(e){super(`CodeGen: "code" for ${e} not defined`),this.value=e.value}}var i;!function(e){e[e.Started=0]="Started",e[e.Completed=1]="Completed"}(i=t.UsedValueState||(t.UsedValueState={})),t.varKinds={const:new n.Name("const"),let:new n.Name("let"),var:new n.Name("var")};class a{constructor({prefixes:e,parent:t}={}){this._names={},this._prefixes=e,this._parent=t}toName(e){return e instanceof n.Name?e:this.name(e)}name(e){return new n.Name(this._newName(e))}_newName(e){return`${e}${(this._names[e]||this._nameGroup(e)).index++}`}_nameGroup(e){var t,r;if((null===(r=null===(t=this._parent)||void 0===t?void 0:t._prefixes)||void 0===r?void 0:r.has(e))||this._prefixes&&!this._prefixes.has(e))throw new Error(`CodeGen: prefix "${e}" is not allowed in this scope`);return this._names[e]={prefix:e,index:0}}}t.Scope=a;class s extends n.Name{constructor(e,t){super(t),this.prefix=e}setValue(e,{property:t,itemIndex:r}){this.value=e,this.scopePath=n._`.${new n.Name(t)}[${r}]`}}t.ValueScopeName=s;const l=n._`\n`;t.ValueScope=class extends a{constructor(e){super(e),this._values={},this._scope=e.scope,this.opts={...e,_n:e.lines?l:n.nil}}get(){return this._scope}name(e){return new s(e,this._newName(e))}value(e,t){var r;if(void 0===t.ref)throw new Error("CodeGen: ref must be passed in value");const n=this.toName(e),{prefix:o}=n,i=null!==(r=t.key)&&void 0!==r?r:t.ref;let a=this._values[o];if(a){const e=a.get(i);if(e)return e}else a=this._values[o]=new Map;a.set(i,n);const s=this._scope[o]||(this._scope[o]=[]),l=s.length;return s[l]=t.ref,n.setValue(t,{property:o,itemIndex:l}),n}getValue(e,t){const r=this._values[e];if(r)return r.get(t)}scopeRefs(e,t=this._values){return this._reduceValues(t,(t=>{if(void 0===t.scopePath)throw new Error(`CodeGen: name "${t}" has no value`);return n._`${e}${t.scopePath}`}))}scopeCode(e=this._values,t,r){return this._reduceValues(e,(e=>{if(void 0===e.value)throw new Error(`CodeGen: name "${e}" has no value`);return e.value.code}),t,r)}_reduceValues(e,r,a={},s){let l=n.nil;for(const c in e){const u=e[c];if(!u)continue;const d=a[c]=a[c]||new Map;u.forEach((e=>{if(d.has(e))return;d.set(e,i.Started);let a=r(e);if(a){const r=this.opts.es5?t.varKinds.var:t.varKinds.const;l=n._`${l}${r} ${e} = ${a};${this.opts._n}`}else{if(!(a=null==s?void 0:s(e)))throw new o(e);l=n._`${l}${a}${this.opts._n}`}d.set(e,i.Completed)}))}return l}}},48708:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendErrors=t.resetErrorsCount=t.reportExtraError=t.reportError=t.keyword$DataError=t.keywordError=void 0;const n=r(99029),o=r(94227),i=r(42023);function a(e,t){const r=e.const("err",t);e.if(n._`${i.default.vErrors} === null`,(()=>e.assign(i.default.vErrors,n._`[${r}]`)),n._`${i.default.vErrors}.push(${r})`),e.code(n._`${i.default.errors}++`)}function s(e,t){const{gen:r,validateName:o,schemaEnv:i}=e;i.$async?r.throw(n._`new ${e.ValidationError}(${t})`):(r.assign(n._`${o}.errors`,t),r.return(!1))}t.keywordError={message:({keyword:e})=>n.str`must pass "${e}" keyword validation`},t.keyword$DataError={message:({keyword:e,schemaType:t})=>t?n.str`"${e}" keyword must be ${t} ($data)`:n.str`"${e}" keyword is invalid ($data)`},t.reportError=function(e,r=t.keywordError,o,i){const{it:l}=e,{gen:u,compositeRule:d,allErrors:f}=l,p=c(e,r,o);(null!=i?i:d||f)?a(u,p):s(l,n._`[${p}]`)},t.reportExtraError=function(e,r=t.keywordError,n){const{it:o}=e,{gen:l,compositeRule:u,allErrors:d}=o;a(l,c(e,r,n)),u||d||s(o,i.default.vErrors)},t.resetErrorsCount=function(e,t){e.assign(i.default.errors,t),e.if(n._`${i.default.vErrors} !== null`,(()=>e.if(t,(()=>e.assign(n._`${i.default.vErrors}.length`,t)),(()=>e.assign(i.default.vErrors,null)))))},t.extendErrors=function({gen:e,keyword:t,schemaValue:r,data:o,errsCount:a,it:s}){if(void 0===a)throw new Error("ajv implementation error");const l=e.name("err");e.forRange("i",a,i.default.errors,(a=>{e.const(l,n._`${i.default.vErrors}[${a}]`),e.if(n._`${l}.instancePath === undefined`,(()=>e.assign(n._`${l}.instancePath`,(0,n.strConcat)(i.default.instancePath,s.errorPath)))),e.assign(n._`${l}.schemaPath`,n.str`${s.errSchemaPath}/${t}`),s.opts.verbose&&(e.assign(n._`${l}.schema`,r),e.assign(n._`${l}.data`,o))}))};const l={keyword:new n.Name("keyword"),schemaPath:new n.Name("schemaPath"),params:new n.Name("params"),propertyName:new n.Name("propertyName"),message:new n.Name("message"),schema:new n.Name("schema"),parentSchema:new n.Name("parentSchema")};function c(e,t,r){const{createErrors:o}=e.it;return!1===o?n._`{}`:function(e,t,r={}){const{gen:o,it:a}=e,s=[u(a,r),d(e,r)];return function(e,{params:t,message:r},o){const{keyword:a,data:s,schemaValue:c,it:u}=e,{opts:d,propertyName:f,topSchemaRef:p,schemaPath:h}=u;o.push([l.keyword,a],[l.params,"function"==typeof t?t(e):t||n._`{}`]),d.messages&&o.push([l.message,"function"==typeof r?r(e):r]),d.verbose&&o.push([l.schema,c],[l.parentSchema,n._`${p}${h}`],[i.default.data,s]),f&&o.push([l.propertyName,f])}(e,t,s),o.object(...s)}(e,t,r)}function u({errorPath:e},{instancePath:t}){const r=t?n.str`${e}${(0,o.getErrorPath)(t,o.Type.Str)}`:e;return[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,r)]}function d({keyword:e,it:{errSchemaPath:t}},{schemaPath:r,parentSchema:i}){let a=i?t:n.str`${t}/${e}`;return r&&(a=n.str`${a}${(0,o.getErrorPath)(r,o.Type.Str)}`),[l.schemaPath,a]}},73835:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.resolveSchema=t.getCompilingSchema=t.resolveRef=t.compileSchema=t.SchemaEnv=void 0;const n=r(99029),o=r(13558),i=r(42023),a=r(66939),s=r(94227),l=r(62586);class c{constructor(e){var t;let r;this.refs={},this.dynamicAnchors={},"object"==typeof e.schema&&(r=e.schema),this.schema=e.schema,this.schemaId=e.schemaId,this.root=e.root||this,this.baseId=null!==(t=e.baseId)&&void 0!==t?t:(0,a.normalizeId)(null==r?void 0:r[e.schemaId||"$id"]),this.schemaPath=e.schemaPath,this.localRefs=e.localRefs,this.meta=e.meta,this.$async=null==r?void 0:r.$async,this.refs={}}}function u(e){const t=f.call(this,e);if(t)return t;const r=(0,a.getFullPath)(this.opts.uriResolver,e.root.baseId),{es5:s,lines:c}=this.opts.code,{ownProperties:u}=this.opts,d=new n.CodeGen(this.scope,{es5:s,lines:c,ownProperties:u});let p;e.$async&&(p=d.scopeValue("Error",{ref:o.default,code:n._`require("ajv/dist/runtime/validation_error").default`}));const h=d.scopeName("validate");e.validateName=h;const m={gen:d,allErrors:this.opts.allErrors,data:i.default.data,parentData:i.default.parentData,parentDataProperty:i.default.parentDataProperty,dataNames:[i.default.data],dataPathArr:[n.nil],dataLevel:0,dataTypes:[],definedProperties:new Set,topSchemaRef:d.scopeValue("schema",!0===this.opts.code.source?{ref:e.schema,code:(0,n.stringify)(e.schema)}:{ref:e.schema}),validateName:h,ValidationError:p,schema:e.schema,schemaEnv:e,rootId:r,baseId:e.baseId||r,schemaPath:n.nil,errSchemaPath:e.schemaPath||(this.opts.jtd?"":"#"),errorPath:n._`""`,opts:this.opts,self:this};let g;try{this._compilations.add(e),(0,l.validateFunctionCode)(m),d.optimize(this.opts.code.optimize);const t=d.toString();g=`${d.scopeRefs(i.default.scope)}return ${t}`,this.opts.code.process&&(g=this.opts.code.process(g,e));const r=new Function(`${i.default.self}`,`${i.default.scope}`,g)(this,this.scope.get());if(this.scope.value(h,{ref:r}),r.errors=null,r.schema=e.schema,r.schemaEnv=e,e.$async&&(r.$async=!0),!0===this.opts.code.source&&(r.source={validateName:h,validateCode:t,scopeValues:d._values}),this.opts.unevaluated){const{props:e,items:t}=m;r.evaluated={props:e instanceof n.Name?void 0:e,items:t instanceof n.Name?void 0:t,dynamicProps:e instanceof n.Name,dynamicItems:t instanceof n.Name},r.source&&(r.source.evaluated=(0,n.stringify)(r.evaluated))}return e.validate=r,e}catch(t){throw delete e.validate,delete e.validateName,g&&this.logger.error("Error compiling schema, function code:",g),t}finally{this._compilations.delete(e)}}function d(e){return(0,a.inlineRef)(e.schema,this.opts.inlineRefs)?e.schema:e.validate?e:u.call(this,e)}function f(e){for(const n of this._compilations)if(r=e,(t=n).schema===r.schema&&t.root===r.root&&t.baseId===r.baseId)return n;var t,r}function p(e,t){let r;for(;"string"==typeof(r=this.refs[t]);)t=r;return r||this.schemas[t]||h.call(this,e,t)}function h(e,t){const r=this.opts.uriResolver.parse(t),n=(0,a._getFullPath)(this.opts.uriResolver,r);let o=(0,a.getFullPath)(this.opts.uriResolver,e.baseId,void 0);if(Object.keys(e.schema).length>0&&n===o)return g.call(this,r,e);const i=(0,a.normalizeId)(n),s=this.refs[i]||this.schemas[i];if("string"==typeof s){const t=h.call(this,e,s);if("object"!=typeof(null==t?void 0:t.schema))return;return g.call(this,r,t)}if("object"==typeof(null==s?void 0:s.schema)){if(s.validate||u.call(this,s),i===(0,a.normalizeId)(t)){const{schema:t}=s,{schemaId:r}=this.opts,n=t[r];return n&&(o=(0,a.resolveUrl)(this.opts.uriResolver,o,n)),new c({schema:t,schemaId:r,root:e,baseId:o})}return g.call(this,r,s)}}t.SchemaEnv=c,t.compileSchema=u,t.resolveRef=function(e,t,r){var n;r=(0,a.resolveUrl)(this.opts.uriResolver,t,r);const o=e.refs[r];if(o)return o;let i=p.call(this,e,r);if(void 0===i){const o=null===(n=e.localRefs)||void 0===n?void 0:n[r],{schemaId:a}=this.opts;o&&(i=new c({schema:o,schemaId:a,root:e,baseId:t}))}return void 0!==i?e.refs[r]=d.call(this,i):void 0},t.getCompilingSchema=f,t.resolveSchema=h;const m=new Set(["properties","patternProperties","enum","dependencies","definitions"]);function g(e,{baseId:t,schema:r,root:n}){var o;if("/"!==(null===(o=e.fragment)||void 0===o?void 0:o[0]))return;for(const n of e.fragment.slice(1).split("/")){if("boolean"==typeof r)return;const e=r[(0,s.unescapeFragment)(n)];if(void 0===e)return;const o="object"==typeof(r=e)&&r[this.opts.schemaId];!m.has(n)&&o&&(t=(0,a.resolveUrl)(this.opts.uriResolver,t,o))}let i;if("boolean"!=typeof r&&r.$ref&&!(0,s.schemaHasRulesButRef)(r,this.RULES)){const e=(0,a.resolveUrl)(this.opts.uriResolver,t,r.$ref);i=h.call(this,n,e)}const{schemaId:l}=this.opts;return i=i||new c({schema:r,schemaId:l,root:n,baseId:t}),i.schema!==i.root.schema?i:void 0}},42023:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={data:new n.Name("data"),valCxt:new n.Name("valCxt"),instancePath:new n.Name("instancePath"),parentData:new n.Name("parentData"),parentDataProperty:new n.Name("parentDataProperty"),rootData:new n.Name("rootData"),dynamicAnchors:new n.Name("dynamicAnchors"),vErrors:new n.Name("vErrors"),errors:new n.Name("errors"),this:new n.Name("this"),self:new n.Name("self"),scope:new n.Name("scope"),json:new n.Name("json"),jsonPos:new n.Name("jsonPos"),jsonLen:new n.Name("jsonLen"),jsonPart:new n.Name("jsonPart")};t.default=o},34551:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(66939);class o extends Error{constructor(e,t,r,o){super(o||`can't resolve reference ${r} from id ${t}`),this.missingRef=(0,n.resolveUrl)(e,t,r),this.missingSchema=(0,n.normalizeId)((0,n.getFullPath)(e,this.missingRef))}}t.default=o},66939:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getSchemaRefs=t.resolveUrl=t.normalizeId=t._getFullPath=t.getFullPath=t.inlineRef=void 0;const n=r(94227),o=r(32017),i=r(7106),a=new Set(["type","format","pattern","maxLength","minLength","maxProperties","minProperties","maxItems","minItems","maximum","minimum","uniqueItems","multipleOf","required","enum","const"]);t.inlineRef=function(e,t=!0){return"boolean"==typeof e||(!0===t?!l(e):!!t&&c(e)<=t)};const s=new Set(["$ref","$recursiveRef","$recursiveAnchor","$dynamicRef","$dynamicAnchor"]);function l(e){for(const t in e){if(s.has(t))return!0;const r=e[t];if(Array.isArray(r)&&r.some(l))return!0;if("object"==typeof r&&l(r))return!0}return!1}function c(e){let t=0;for(const r in e){if("$ref"===r)return 1/0;if(t++,!a.has(r)&&("object"==typeof e[r]&&(0,n.eachItem)(e[r],(e=>t+=c(e))),t===1/0))return 1/0}return t}function u(e,t="",r){!1!==r&&(t=p(t));const n=e.parse(t);return d(e,n)}function d(e,t){return e.serialize(t).split("#")[0]+"#"}t.getFullPath=u,t._getFullPath=d;const f=/#\/?$/;function p(e){return e?e.replace(f,""):""}t.normalizeId=p,t.resolveUrl=function(e,t,r){return r=p(r),e.resolve(t,r)};const h=/^[a-z_][-a-z0-9._]*$/i;t.getSchemaRefs=function(e,t){if("boolean"==typeof e)return{};const{schemaId:r,uriResolver:n}=this.opts,a=p(e[r]||t),s={"":a},l=u(n,a,!1),c={},d=new Set;return i(e,{allKeys:!0},((e,t,n,o)=>{if(void 0===o)return;const i=l+t;let a=s[o];function u(t){const r=this.opts.uriResolver.resolve;if(t=p(a?r(a,t):t),d.has(t))throw m(t);d.add(t);let n=this.refs[t];return"string"==typeof n&&(n=this.refs[n]),"object"==typeof n?f(e,n.schema,t):t!==p(i)&&("#"===t[0]?(f(e,c[t],t),c[t]=e):this.refs[t]=i),t}function g(e){if("string"==typeof e){if(!h.test(e))throw new Error(`invalid anchor "${e}"`);u.call(this,`#${e}`)}}"string"==typeof e[r]&&(a=u.call(this,e[r])),g.call(this,e.$anchor),g.call(this,e.$dynamicAnchor),s[t]=a})),c;function f(e,t,r){if(void 0!==t&&!o(e,t))throw m(r)}function m(e){return new Error(`reference "${e}" resolves to more than one schema`)}}},10396:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getRules=t.isJSONType=void 0;const r=new Set(["string","number","integer","boolean","null","object","array"]);t.isJSONType=function(e){return"string"==typeof e&&r.has(e)},t.getRules=function(){const e={number:{type:"number",rules:[]},string:{type:"string",rules:[]},array:{type:"array",rules:[]},object:{type:"object",rules:[]}};return{types:{...e,integer:!0,boolean:!0,null:!0},rules:[{rules:[]},e.number,e.string,e.array,e.object],post:{rules:[]},all:{},keywords:{}}}},94227:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.checkStrictMode=t.getErrorPath=t.Type=t.useFunc=t.setEvaluated=t.evaluatedPropsToName=t.mergeEvaluated=t.eachItem=t.unescapeJsonPointer=t.escapeJsonPointer=t.escapeFragment=t.unescapeFragment=t.schemaRefOrVal=t.schemaHasRulesButRef=t.schemaHasRules=t.checkUnknownRules=t.alwaysValidSchema=t.toHash=void 0;const n=r(99029),o=r(41520);function i(e,t=e.schema){const{opts:r,self:n}=e;if(!r.strictSchema)return;if("boolean"==typeof t)return;const o=n.RULES.keywords;for(const r in t)o[r]||h(e,`unknown keyword: "${r}"`)}function a(e,t){if("boolean"==typeof e)return!e;for(const r in e)if(t[r])return!0;return!1}function s(e){return"number"==typeof e?`${e}`:e.replace(/~/g,"~0").replace(/\//g,"~1")}function l(e){return e.replace(/~1/g,"/").replace(/~0/g,"~")}function c({mergeNames:e,mergeToName:t,mergeValues:r,resultToName:o}){return(i,a,s,l)=>{const c=void 0===s?a:s instanceof n.Name?(a instanceof n.Name?e(i,a,s):t(i,a,s),s):a instanceof n.Name?(t(i,s,a),a):r(a,s);return l!==n.Name||c instanceof n.Name?c:o(i,c)}}function u(e,t){if(!0===t)return e.var("props",!0);const r=e.var("props",n._`{}`);return void 0!==t&&d(e,r,t),r}function d(e,t,r){Object.keys(r).forEach((r=>e.assign(n._`${t}${(0,n.getProperty)(r)}`,!0)))}t.toHash=function(e){const t={};for(const r of e)t[r]=!0;return t},t.alwaysValidSchema=function(e,t){return"boolean"==typeof t?t:0===Object.keys(t).length||(i(e,t),!a(t,e.self.RULES.all))},t.checkUnknownRules=i,t.schemaHasRules=a,t.schemaHasRulesButRef=function(e,t){if("boolean"==typeof e)return!e;for(const r in e)if("$ref"!==r&&t.all[r])return!0;return!1},t.schemaRefOrVal=function({topSchemaRef:e,schemaPath:t},r,o,i){if(!i){if("number"==typeof r||"boolean"==typeof r)return r;if("string"==typeof r)return n._`${r}`}return n._`${e}${t}${(0,n.getProperty)(o)}`},t.unescapeFragment=function(e){return l(decodeURIComponent(e))},t.escapeFragment=function(e){return encodeURIComponent(s(e))},t.escapeJsonPointer=s,t.unescapeJsonPointer=l,t.eachItem=function(e,t){if(Array.isArray(e))for(const r of e)t(r);else t(e)},t.mergeEvaluated={props:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>{e.if(n._`${t} === true`,(()=>e.assign(r,!0)),(()=>e.assign(r,n._`${r} || {}`).code(n._`Object.assign(${r}, ${t})`)))})),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>{!0===t?e.assign(r,!0):(e.assign(r,n._`${r} || {}`),d(e,r,t))})),mergeValues:(e,t)=>!0===e||{...e,...t},resultToName:u}),items:c({mergeNames:(e,t,r)=>e.if(n._`${r} !== true && ${t} !== undefined`,(()=>e.assign(r,n._`${t} === true ? true : ${r} > ${t} ? ${r} : ${t}`))),mergeToName:(e,t,r)=>e.if(n._`${r} !== true`,(()=>e.assign(r,!0===t||n._`${r} > ${t} ? ${r} : ${t}`))),mergeValues:(e,t)=>!0===e||Math.max(e,t),resultToName:(e,t)=>e.var("items",t)})},t.evaluatedPropsToName=u,t.setEvaluated=d;const f={};var p;function h(e,t,r=e.opts.strictSchema){if(r){if(t=`strict mode: ${t}`,!0===r)throw new Error(t);e.self.logger.warn(t)}}t.useFunc=function(e,t){return e.scopeValue("func",{ref:t,code:f[t.code]||(f[t.code]=new o._Code(t.code))})},function(e){e[e.Num=0]="Num",e[e.Str=1]="Str"}(p=t.Type||(t.Type={})),t.getErrorPath=function(e,t,r){if(e instanceof n.Name){const o=t===p.Num;return r?o?n._`"[" + ${e} + "]"`:n._`"['" + ${e} + "']"`:o?n._`"/" + ${e}`:n._`"/" + ${e}.replace(/~/g, "~0").replace(/\\//g, "~1")`}return r?(0,n.getProperty)(e).toString():"/"+s(e)},t.checkStrictMode=h},7887:(e,t)=>{"use strict";function r(e,t){return t.rules.some((t=>n(e,t)))}function n(e,t){var r;return void 0!==e[t.keyword]||(null===(r=t.definition.implements)||void 0===r?void 0:r.some((t=>void 0!==e[t])))}Object.defineProperty(t,"__esModule",{value:!0}),t.shouldUseRule=t.shouldUseGroup=t.schemaHasRulesForType=void 0,t.schemaHasRulesForType=function({schema:e,self:t},n){const o=t.RULES.types[n];return o&&!0!==o&&r(e,o)},t.shouldUseGroup=r,t.shouldUseRule=n},28727:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.boolOrEmptySchema=t.topBoolOrEmptySchema=void 0;const n=r(48708),o=r(99029),i=r(42023),a={message:"boolean schema is false"};function s(e,t){const{gen:r,data:o}=e,i={gen:r,keyword:"false schema",data:o,schema:!1,schemaCode:!1,schemaValue:!1,params:{},it:e};(0,n.reportError)(i,a,void 0,t)}t.topBoolOrEmptySchema=function(e){const{gen:t,schema:r,validateName:n}=e;!1===r?s(e,!1):"object"==typeof r&&!0===r.$async?t.return(i.default.data):(t.assign(o._`${n}.errors`,null),t.return(!0))},t.boolOrEmptySchema=function(e,t){const{gen:r,schema:n}=e;!1===n?(r.var(t,!1),s(e)):r.var(t,!0)}},10208:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.reportTypeError=t.checkDataTypes=t.checkDataType=t.coerceAndCheckDataType=t.getJSONTypes=t.getSchemaTypes=t.DataType=void 0;const n=r(10396),o=r(7887),i=r(48708),a=r(99029),s=r(94227);var l;function c(e){const t=Array.isArray(e)?e:e?[e]:[];if(t.every(n.isJSONType))return t;throw new Error("type must be JSONType or JSONType[]: "+t.join(","))}!function(e){e[e.Correct=0]="Correct",e[e.Wrong=1]="Wrong"}(l=t.DataType||(t.DataType={})),t.getSchemaTypes=function(e){const t=c(e.type);if(t.includes("null")){if(!1===e.nullable)throw new Error("type: null contradicts nullable: false")}else{if(!t.length&&void 0!==e.nullable)throw new Error('"nullable" cannot be used without "type"');!0===e.nullable&&t.push("null")}return t},t.getJSONTypes=c,t.coerceAndCheckDataType=function(e,t){const{gen:r,data:n,opts:i}=e,s=function(e,t){return t?e.filter((e=>u.has(e)||"array"===t&&"array"===e)):[]}(t,i.coerceTypes),c=t.length>0&&!(0===s.length&&1===t.length&&(0,o.schemaHasRulesForType)(e,t[0]));if(c){const o=f(t,n,i.strictNumbers,l.Wrong);r.if(o,(()=>{s.length?function(e,t,r){const{gen:n,data:o,opts:i}=e,s=n.let("dataType",a._`typeof ${o}`),l=n.let("coerced",a._`undefined`);"array"===i.coerceTypes&&n.if(a._`${s} == 'object' && Array.isArray(${o}) && ${o}.length == 1`,(()=>n.assign(o,a._`${o}[0]`).assign(s,a._`typeof ${o}`).if(f(t,o,i.strictNumbers),(()=>n.assign(l,o))))),n.if(a._`${l} !== undefined`);for(const e of r)(u.has(e)||"array"===e&&"array"===i.coerceTypes)&&c(e);function c(e){switch(e){case"string":return void n.elseIf(a._`${s} == "number" || ${s} == "boolean"`).assign(l,a._`"" + ${o}`).elseIf(a._`${o} === null`).assign(l,a._`""`);case"number":return void n.elseIf(a._`${s} == "boolean" || ${o} === null
+ || (${s} == "string" && ${o} && ${o} == +${o})`).assign(l,a._`+${o}`);case"integer":return void n.elseIf(a._`${s} === "boolean" || ${o} === null
+ || (${s} === "string" && ${o} && ${o} == +${o} && !(${o} % 1))`).assign(l,a._`+${o}`);case"boolean":return void n.elseIf(a._`${o} === "false" || ${o} === 0 || ${o} === null`).assign(l,!1).elseIf(a._`${o} === "true" || ${o} === 1`).assign(l,!0);case"null":return n.elseIf(a._`${o} === "" || ${o} === 0 || ${o} === false`),void n.assign(l,null);case"array":n.elseIf(a._`${s} === "string" || ${s} === "number"
+ || ${s} === "boolean" || ${o} === null`).assign(l,a._`[${o}]`)}}n.else(),h(e),n.endIf(),n.if(a._`${l} !== undefined`,(()=>{n.assign(o,l),function({gen:e,parentData:t,parentDataProperty:r},n){e.if(a._`${t} !== undefined`,(()=>e.assign(a._`${t}[${r}]`,n)))}(e,l)}))}(e,t,s):h(e)}))}return c};const u=new Set(["string","number","integer","boolean","null"]);function d(e,t,r,n=l.Correct){const o=n===l.Correct?a.operators.EQ:a.operators.NEQ;let i;switch(e){case"null":return a._`${t} ${o} null`;case"array":i=a._`Array.isArray(${t})`;break;case"object":i=a._`${t} && typeof ${t} == "object" && !Array.isArray(${t})`;break;case"integer":i=s(a._`!(${t} % 1) && !isNaN(${t})`);break;case"number":i=s();break;default:return a._`typeof ${t} ${o} ${e}`}return n===l.Correct?i:(0,a.not)(i);function s(e=a.nil){return(0,a.and)(a._`typeof ${t} == "number"`,e,r?a._`isFinite(${t})`:a.nil)}}function f(e,t,r,n){if(1===e.length)return d(e[0],t,r,n);let o;const i=(0,s.toHash)(e);if(i.array&&i.object){const e=a._`typeof ${t} != "object"`;o=i.null?e:a._`!${t} || ${e}`,delete i.null,delete i.array,delete i.object}else o=a.nil;i.number&&delete i.integer;for(const e in i)o=(0,a.and)(o,d(e,t,r,n));return o}t.checkDataType=d,t.checkDataTypes=f;const p={message:({schema:e})=>`must be ${e}`,params:({schema:e,schemaValue:t})=>"string"==typeof e?a._`{type: ${e}}`:a._`{type: ${t}}`};function h(e){const t=function(e){const{gen:t,data:r,schema:n}=e,o=(0,s.schemaRefOrVal)(e,n,"type");return{gen:t,keyword:"type",data:r,schema:n.type,schemaCode:o,schemaValue:o,parentSchema:n,params:{},it:e}}(e);(0,i.reportError)(t,p)}t.reportTypeError=h},7870:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.assignDefaults=void 0;const n=r(99029),o=r(94227);function i(e,t,r){const{gen:i,compositeRule:a,data:s,opts:l}=e;if(void 0===r)return;const c=n._`${s}${(0,n.getProperty)(t)}`;if(a)return void(0,o.checkStrictMode)(e,`default is ignored for: ${c}`);let u=n._`${c} === undefined`;"empty"===l.useDefaults&&(u=n._`${u} || ${c} === null || ${c} === ""`),i.if(u,n._`${c} = ${(0,n.stringify)(r)}`)}t.assignDefaults=function(e,t){const{properties:r,items:n}=e.schema;if("object"===t&&r)for(const t in r)i(e,t,r[t].default);else"array"===t&&Array.isArray(n)&&n.forEach(((t,r)=>i(e,r,t.default)))}},62586:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.getData=t.KeywordCxt=t.validateFunctionCode=void 0;const n=r(28727),o=r(10208),i=r(7887),a=r(10208),s=r(7870),l=r(33673),c=r(24495),u=r(99029),d=r(42023),f=r(66939),p=r(94227),h=r(48708);function m({gen:e,validateName:t,schema:r,schemaEnv:n,opts:o},i){o.code.es5?e.func(t,u._`${d.default.data}, ${d.default.valCxt}`,n.$async,(()=>{e.code(u._`"use strict"; ${g(r,o)}`),function(e,t){e.if(d.default.valCxt,(()=>{e.var(d.default.instancePath,u._`${d.default.valCxt}.${d.default.instancePath}`),e.var(d.default.parentData,u._`${d.default.valCxt}.${d.default.parentData}`),e.var(d.default.parentDataProperty,u._`${d.default.valCxt}.${d.default.parentDataProperty}`),e.var(d.default.rootData,u._`${d.default.valCxt}.${d.default.rootData}`),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`${d.default.valCxt}.${d.default.dynamicAnchors}`)}),(()=>{e.var(d.default.instancePath,u._`""`),e.var(d.default.parentData,u._`undefined`),e.var(d.default.parentDataProperty,u._`undefined`),e.var(d.default.rootData,d.default.data),t.dynamicRef&&e.var(d.default.dynamicAnchors,u._`{}`)}))}(e,o),e.code(i)})):e.func(t,u._`${d.default.data}, ${function(e){return u._`{${d.default.instancePath}="", ${d.default.parentData}, ${d.default.parentDataProperty}, ${d.default.rootData}=${d.default.data}${e.dynamicRef?u._`, ${d.default.dynamicAnchors}={}`:u.nil}}={}`}(o)}`,n.$async,(()=>e.code(g(r,o)).code(i)))}function g(e,t){const r="object"==typeof e&&e[t.schemaId];return r&&(t.code.source||t.code.process)?u._`/*# sourceURL=${r} */`:u.nil}function b({schema:e,self:t}){if("boolean"==typeof e)return!e;for(const r in e)if(t.RULES.all[r])return!0;return!1}function v(e){return"boolean"!=typeof e.schema}function y(e){(0,p.checkUnknownRules)(e),function(e){const{schema:t,errSchemaPath:r,opts:n,self:o}=e;t.$ref&&n.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(t,o.RULES)&&o.logger.warn(`$ref: keywords ignored in schema at path "${r}"`)}(e)}function w(e,t){if(e.opts.jtd)return _(e,[],!1,t);const r=(0,o.getSchemaTypes)(e.schema);_(e,r,!(0,o.coerceAndCheckDataType)(e,r),t)}function E({gen:e,schemaEnv:t,schema:r,errSchemaPath:n,opts:o}){const i=r.$comment;if(!0===o.$comment)e.code(u._`${d.default.self}.logger.log(${i})`);else if("function"==typeof o.$comment){const r=u.str`${n}/$comment`,o=e.scopeValue("root",{ref:t.root});e.code(u._`${d.default.self}.opts.$comment(${i}, ${r}, ${o}.schema)`)}}function _(e,t,r,n){const{gen:o,schema:s,data:l,allErrors:c,opts:f,self:h}=e,{RULES:m}=h;function g(p){(0,i.shouldUseGroup)(s,p)&&(p.type?(o.if((0,a.checkDataType)(p.type,l,f.strictNumbers)),S(e,p),1===t.length&&t[0]===p.type&&r&&(o.else(),(0,a.reportTypeError)(e)),o.endIf()):S(e,p),c||o.if(u._`${d.default.errors} === ${n||0}`))}!s.$ref||!f.ignoreKeywordsWithRef&&(0,p.schemaHasRulesButRef)(s,m)?(f.jtd||function(e,t){!e.schemaEnv.meta&&e.opts.strictTypes&&(function(e,t){t.length&&(e.dataTypes.length?(t.forEach((t=>{x(e.dataTypes,t)||A(e,`type "${t}" not allowed by context "${e.dataTypes.join(",")}"`)})),function(e,t){const r=[];for(const n of e.dataTypes)x(t,n)?r.push(n):t.includes("integer")&&"number"===n&&r.push("integer");e.dataTypes=r}(e,t)):e.dataTypes=t)}(e,t),e.opts.allowUnionTypes||function(e,t){t.length>1&&(2!==t.length||!t.includes("null"))&&A(e,"use allowUnionTypes to allow union type keyword")}(e,t),function(e,t){const r=e.self.RULES.all;for(const n in r){const o=r[n];if("object"==typeof o&&(0,i.shouldUseRule)(e.schema,o)){const{type:r}=o.definition;r.length&&!r.some((e=>{return n=e,(r=t).includes(n)||"number"===n&&r.includes("integer");var r,n}))&&A(e,`missing type "${r.join(",")}" for keyword "${n}"`)}}}(e,e.dataTypes))}(e,t),o.block((()=>{for(const e of m.rules)g(e);g(m.post)}))):o.block((()=>C(e,"$ref",m.all.$ref.definition)))}function S(e,t){const{gen:r,schema:n,opts:{useDefaults:o}}=e;o&&(0,s.assignDefaults)(e,t.type),r.block((()=>{for(const r of t.rules)(0,i.shouldUseRule)(n,r)&&C(e,r.keyword,r.definition,t.type)}))}function x(e,t){return e.includes(t)||"integer"===t&&e.includes("number")}function A(e,t){t+=` at "${e.schemaEnv.baseId+e.errSchemaPath}" (strictTypes)`,(0,p.checkStrictMode)(e,t,e.opts.strictTypes)}t.validateFunctionCode=function(e){v(e)&&(y(e),b(e))?function(e){const{schema:t,opts:r,gen:n}=e;m(e,(()=>{r.$comment&&t.$comment&&E(e),function(e){const{schema:t,opts:r}=e;void 0!==t.default&&r.useDefaults&&r.strictSchema&&(0,p.checkStrictMode)(e,"default is ignored in the schema root")}(e),n.let(d.default.vErrors,null),n.let(d.default.errors,0),r.unevaluated&&function(e){const{gen:t,validateName:r}=e;e.evaluated=t.const("evaluated",u._`${r}.evaluated`),t.if(u._`${e.evaluated}.dynamicProps`,(()=>t.assign(u._`${e.evaluated}.props`,u._`undefined`))),t.if(u._`${e.evaluated}.dynamicItems`,(()=>t.assign(u._`${e.evaluated}.items`,u._`undefined`)))}(e),w(e),function(e){const{gen:t,schemaEnv:r,validateName:n,ValidationError:o,opts:i}=e;r.$async?t.if(u._`${d.default.errors} === 0`,(()=>t.return(d.default.data)),(()=>t.throw(u._`new ${o}(${d.default.vErrors})`))):(t.assign(u._`${n}.errors`,d.default.vErrors),i.unevaluated&&function({gen:e,evaluated:t,props:r,items:n}){r instanceof u.Name&&e.assign(u._`${t}.props`,r),n instanceof u.Name&&e.assign(u._`${t}.items`,n)}(e),t.return(u._`${d.default.errors} === 0`))}(e)}))}(e):m(e,(()=>(0,n.topBoolOrEmptySchema)(e)))};class T{constructor(e,t,r){if((0,l.validateKeywordUsage)(e,t,r),this.gen=e.gen,this.allErrors=e.allErrors,this.keyword=r,this.data=e.data,this.schema=e.schema[r],this.$data=t.$data&&e.opts.$data&&this.schema&&this.schema.$data,this.schemaValue=(0,p.schemaRefOrVal)(e,this.schema,r,this.$data),this.schemaType=t.schemaType,this.parentSchema=e.schema,this.params={},this.it=e,this.def=t,this.$data)this.schemaCode=e.gen.const("vSchema",R(this.$data,e));else if(this.schemaCode=this.schemaValue,!(0,l.validSchemaType)(this.schema,t.schemaType,t.allowUndefined))throw new Error(`${r} value must be ${JSON.stringify(t.schemaType)}`);("code"in t?t.trackErrors:!1!==t.errors)&&(this.errsCount=e.gen.const("_errs",d.default.errors))}result(e,t,r){this.failResult((0,u.not)(e),t,r)}failResult(e,t,r){this.gen.if(e),r?r():this.error(),t?(this.gen.else(),t(),this.allErrors&&this.gen.endIf()):this.allErrors?this.gen.endIf():this.gen.else()}pass(e,t){this.failResult((0,u.not)(e),void 0,t)}fail(e){if(void 0===e)return this.error(),void(this.allErrors||this.gen.if(!1));this.gen.if(e),this.error(),this.allErrors?this.gen.endIf():this.gen.else()}fail$data(e){if(!this.$data)return this.fail(e);const{schemaCode:t}=this;this.fail(u._`${t} !== undefined && (${(0,u.or)(this.invalid$data(),e)})`)}error(e,t,r){if(t)return this.setParams(t),this._error(e,r),void this.setParams({});this._error(e,r)}_error(e,t){(e?h.reportExtraError:h.reportError)(this,this.def.error,t)}$dataError(){(0,h.reportError)(this,this.def.$dataError||h.keyword$DataError)}reset(){if(void 0===this.errsCount)throw new Error('add "trackErrors" to keyword definition');(0,h.resetErrorsCount)(this.gen,this.errsCount)}ok(e){this.allErrors||this.gen.if(e)}setParams(e,t){t?Object.assign(this.params,e):this.params=e}block$data(e,t,r=u.nil){this.gen.block((()=>{this.check$data(e,r),t()}))}check$data(e=u.nil,t=u.nil){if(!this.$data)return;const{gen:r,schemaCode:n,schemaType:o,def:i}=this;r.if((0,u.or)(u._`${n} === undefined`,t)),e!==u.nil&&r.assign(e,!0),(o.length||i.validateSchema)&&(r.elseIf(this.invalid$data()),this.$dataError(),e!==u.nil&&r.assign(e,!1)),r.else()}invalid$data(){const{gen:e,schemaCode:t,schemaType:r,def:n,it:o}=this;return(0,u.or)(function(){if(r.length){if(!(t instanceof u.Name))throw new Error("ajv implementation error");const e=Array.isArray(r)?r:[r];return u._`${(0,a.checkDataTypes)(e,t,o.opts.strictNumbers,a.DataType.Wrong)}`}return u.nil}(),function(){if(n.validateSchema){const r=e.scopeValue("validate$data",{ref:n.validateSchema});return u._`!${r}(${t})`}return u.nil}())}subschema(e,t){const r=(0,c.getSubschema)(this.it,e);(0,c.extendSubschemaData)(r,this.it,e),(0,c.extendSubschemaMode)(r,e);const o={...this.it,...r,items:void 0,props:void 0};return function(e,t){v(e)&&(y(e),b(e))?function(e,t){const{schema:r,gen:n,opts:o}=e;o.$comment&&r.$comment&&E(e),function(e){const t=e.schema[e.opts.schemaId];t&&(e.baseId=(0,f.resolveUrl)(e.opts.uriResolver,e.baseId,t))}(e),function(e){if(e.schema.$async&&!e.schemaEnv.$async)throw new Error("async schema in sync schema")}(e);const i=n.const("_errs",d.default.errors);w(e,i),n.var(t,u._`${i} === ${d.default.errors}`)}(e,t):(0,n.boolOrEmptySchema)(e,t)}(o,t),o}mergeEvaluated(e,t){const{it:r,gen:n}=this;r.opts.unevaluated&&(!0!==r.props&&void 0!==e.props&&(r.props=p.mergeEvaluated.props(n,e.props,r.props,t)),!0!==r.items&&void 0!==e.items&&(r.items=p.mergeEvaluated.items(n,e.items,r.items,t)))}mergeValidEvaluated(e,t){const{it:r,gen:n}=this;if(r.opts.unevaluated&&(!0!==r.props||!0!==r.items))return n.if(t,(()=>this.mergeEvaluated(e,u.Name))),!0}}function C(e,t,r,n){const o=new T(e,r,t);"code"in r?r.code(o,n):o.$data&&r.validate?(0,l.funcKeywordCode)(o,r):"macro"in r?(0,l.macroKeywordCode)(o,r):(r.compile||r.validate)&&(0,l.funcKeywordCode)(o,r)}t.KeywordCxt=T;const k=/^\/(?:[^~]|~0|~1)*$/,O=/^([0-9]+)(#|\/(?:[^~]|~0|~1)*)?$/;function R(e,{dataLevel:t,dataNames:r,dataPathArr:n}){let o,i;if(""===e)return d.default.rootData;if("/"===e[0]){if(!k.test(e))throw new Error(`Invalid JSON-pointer: ${e}`);o=e,i=d.default.rootData}else{const a=O.exec(e);if(!a)throw new Error(`Invalid JSON-pointer: ${e}`);const s=+a[1];if(o=a[2],"#"===o){if(s>=t)throw new Error(l("property/index",s));return n[t-s]}if(s>t)throw new Error(l("data",s));if(i=r[t-s],!o)return i}let a=i;const s=o.split("/");for(const e of s)e&&(i=u._`${i}${(0,u.getProperty)((0,p.unescapeJsonPointer)(e))}`,a=u._`${a} && ${i}`);return a;function l(e,r){return`Cannot access ${e} ${r} levels up, current level is ${t}`}}t.getData=R},33673:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateKeywordUsage=t.validSchemaType=t.funcKeywordCode=t.macroKeywordCode=void 0;const n=r(99029),o=r(42023),i=r(15765),a=r(48708);function s(e){const{gen:t,data:r,it:o}=e;t.if(o.parentData,(()=>t.assign(r,n._`${o.parentData}[${o.parentDataProperty}]`)))}function l(e,t,r){if(void 0===r)throw new Error(`keyword "${t}" failed to compile`);return e.scopeValue("keyword","function"==typeof r?{ref:r}:{ref:r,code:(0,n.stringify)(r)})}t.macroKeywordCode=function(e,t){const{gen:r,keyword:o,schema:i,parentSchema:a,it:s}=e,c=t.macro.call(s.self,i,a,s),u=l(r,o,c);!1!==s.opts.validateSchema&&s.self.validateSchema(c,!0);const d=r.name("valid");e.subschema({schema:c,schemaPath:n.nil,errSchemaPath:`${s.errSchemaPath}/${o}`,topSchemaRef:u,compositeRule:!0},d),e.pass(d,(()=>e.error(!0)))},t.funcKeywordCode=function(e,t){var r;const{gen:c,keyword:u,schema:d,parentSchema:f,$data:p,it:h}=e;!function({schemaEnv:e},t){if(t.async&&!e.$async)throw new Error("async keyword in sync schema")}(h,t);const m=!p&&t.compile?t.compile.call(h.self,d,f,h):t.validate,g=l(c,u,m),b=c.let("valid");function v(r=(t.async?n._`await `:n.nil)){const a=h.opts.passContext?o.default.this:o.default.self,s=!("compile"in t&&!p||!1===t.schema);c.assign(b,n._`${r}${(0,i.callValidateCode)(e,g,a,s)}`,t.modifying)}function y(e){var r;c.if((0,n.not)(null!==(r=t.valid)&&void 0!==r?r:b),e)}e.block$data(b,(function(){if(!1===t.errors)v(),t.modifying&&s(e),y((()=>e.error()));else{const r=t.async?function(){const e=c.let("ruleErrs",null);return c.try((()=>v(n._`await `)),(t=>c.assign(b,!1).if(n._`${t} instanceof ${h.ValidationError}`,(()=>c.assign(e,n._`${t}.errors`)),(()=>c.throw(t))))),e}():function(){const e=n._`${g}.errors`;return c.assign(e,null),v(n.nil),e}();t.modifying&&s(e),y((()=>function(e,t){const{gen:r}=e;r.if(n._`Array.isArray(${t})`,(()=>{r.assign(o.default.vErrors,n._`${o.default.vErrors} === null ? ${t} : ${o.default.vErrors}.concat(${t})`).assign(o.default.errors,n._`${o.default.vErrors}.length`),(0,a.extendErrors)(e)}),(()=>e.error()))}(e,r)))}})),e.ok(null!==(r=t.valid)&&void 0!==r?r:b)},t.validSchemaType=function(e,t,r=!1){return!t.length||t.some((t=>"array"===t?Array.isArray(e):"object"===t?e&&"object"==typeof e&&!Array.isArray(e):typeof e==t||r&&void 0===e))},t.validateKeywordUsage=function({schema:e,opts:t,self:r,errSchemaPath:n},o,i){if(Array.isArray(o.keyword)?!o.keyword.includes(i):o.keyword!==i)throw new Error("ajv implementation error");const a=o.dependencies;if(null==a?void 0:a.some((t=>!Object.prototype.hasOwnProperty.call(e,t))))throw new Error(`parent schema must have dependencies of ${i}: ${a.join(",")}`);if(o.validateSchema&&!o.validateSchema(e[i])){const e=`keyword "${i}" value is invalid at path "${n}": `+r.errorsText(o.validateSchema.errors);if("log"!==t.validateSchema)throw new Error(e);r.logger.error(e)}}},24495:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.extendSubschemaMode=t.extendSubschemaData=t.getSubschema=void 0;const n=r(99029),o=r(94227);t.getSubschema=function(e,{keyword:t,schemaProp:r,schema:i,schemaPath:a,errSchemaPath:s,topSchemaRef:l}){if(void 0!==t&&void 0!==i)throw new Error('both "keyword" and "schema" passed, only one allowed');if(void 0!==t){const i=e.schema[t];return void 0===r?{schema:i,schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}`,errSchemaPath:`${e.errSchemaPath}/${t}`}:{schema:i[r],schemaPath:n._`${e.schemaPath}${(0,n.getProperty)(t)}${(0,n.getProperty)(r)}`,errSchemaPath:`${e.errSchemaPath}/${t}/${(0,o.escapeFragment)(r)}`}}if(void 0!==i){if(void 0===a||void 0===s||void 0===l)throw new Error('"schemaPath", "errSchemaPath" and "topSchemaRef" are required with "schema"');return{schema:i,schemaPath:a,topSchemaRef:l,errSchemaPath:s}}throw new Error('either "keyword" or "schema" must be passed')},t.extendSubschemaData=function(e,t,{dataProp:r,dataPropType:i,data:a,dataTypes:s,propertyName:l}){if(void 0!==a&&void 0!==r)throw new Error('both "data" and "dataProp" passed, only one allowed');const{gen:c}=t;if(void 0!==r){const{errorPath:a,dataPathArr:s,opts:l}=t;u(c.let("data",n._`${t.data}${(0,n.getProperty)(r)}`,!0)),e.errorPath=n.str`${a}${(0,o.getErrorPath)(r,i,l.jsPropertySyntax)}`,e.parentDataProperty=n._`${r}`,e.dataPathArr=[...s,e.parentDataProperty]}function u(r){e.data=r,e.dataLevel=t.dataLevel+1,e.dataTypes=[],t.definedProperties=new Set,e.parentData=t.data,e.dataNames=[...t.dataNames,r]}void 0!==a&&(u(a instanceof n.Name?a:c.let("data",a,!0)),void 0!==l&&(e.propertyName=l)),s&&(e.dataTypes=s)},t.extendSubschemaMode=function(e,{jtdDiscriminator:t,jtdMetadata:r,compositeRule:n,createErrors:o,allErrors:i}){void 0!==n&&(e.compositeRule=n),void 0!==o&&(e.createErrors=o),void 0!==i&&(e.allErrors=i),e.jtdDiscriminator=t,e.jtdMetadata=r}},4042:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.CodeGen=t.Name=t.nil=t.stringify=t.str=t._=t.KeywordCxt=void 0;var n=r(62586);Object.defineProperty(t,"KeywordCxt",{enumerable:!0,get:function(){return n.KeywordCxt}});var o=r(99029);Object.defineProperty(t,"_",{enumerable:!0,get:function(){return o._}}),Object.defineProperty(t,"str",{enumerable:!0,get:function(){return o.str}}),Object.defineProperty(t,"stringify",{enumerable:!0,get:function(){return o.stringify}}),Object.defineProperty(t,"nil",{enumerable:!0,get:function(){return o.nil}}),Object.defineProperty(t,"Name",{enumerable:!0,get:function(){return o.Name}}),Object.defineProperty(t,"CodeGen",{enumerable:!0,get:function(){return o.CodeGen}});const i=r(13558),a=r(34551),s=r(10396),l=r(73835),c=r(99029),u=r(66939),d=r(10208),f=r(94227),p=r(63837),h=r(55944),m=(e,t)=>new RegExp(e,t);m.code="new RegExp";const g=["removeAdditional","useDefaults","coerceTypes"],b=new Set(["validate","serialize","parse","wrapper","root","schema","keyword","pattern","formats","validate$data","func","obj","Error"]),v={errorDataPath:"",format:"`validateFormats: false` can be used instead.",nullable:'"nullable" keyword is supported by default.',jsonPointers:"Deprecated jsPropertySyntax can be used instead.",extendRefs:"Deprecated ignoreKeywordsWithRef can be used instead.",missingRefs:"Pass empty schema with $id that should be ignored to ajv.addSchema.",processCode:"Use option `code: {process: (code, schemaEnv: object) => string}`",sourceCode:"Use option `code: {source: true}`",strictDefaults:"It is default now, see option `strict`.",strictKeywords:"It is default now, see option `strict`.",uniqueItems:'"uniqueItems" keyword is always validated.',unknownFormats:"Disable strict mode or pass `true` to `ajv.addFormat` (or `formats` option).",cache:"Map is used as cache, schema object as key.",serialize:"Map is used as cache, schema object as key.",ajvErrors:"It is default now."},y={ignoreKeywordsWithRef:"",jsPropertySyntax:"",unicode:'"minLength"/"maxLength" account for unicode characters by default.'};function w(e){var t,r,n,o,i,a,s,l,c,u,d,f,p,g,b,v,y,w,E,_,S,x,A,T,C;const k=e.strict,O=null===(t=e.code)||void 0===t?void 0:t.optimize,R=!0===O||void 0===O?1:O||0,N=null!==(n=null===(r=e.code)||void 0===r?void 0:r.regExp)&&void 0!==n?n:m,I=null!==(o=e.uriResolver)&&void 0!==o?o:h.default;return{strictSchema:null===(a=null!==(i=e.strictSchema)&&void 0!==i?i:k)||void 0===a||a,strictNumbers:null===(l=null!==(s=e.strictNumbers)&&void 0!==s?s:k)||void 0===l||l,strictTypes:null!==(u=null!==(c=e.strictTypes)&&void 0!==c?c:k)&&void 0!==u?u:"log",strictTuples:null!==(f=null!==(d=e.strictTuples)&&void 0!==d?d:k)&&void 0!==f?f:"log",strictRequired:null!==(g=null!==(p=e.strictRequired)&&void 0!==p?p:k)&&void 0!==g&&g,code:e.code?{...e.code,optimize:R,regExp:N}:{optimize:R,regExp:N},loopRequired:null!==(b=e.loopRequired)&&void 0!==b?b:200,loopEnum:null!==(v=e.loopEnum)&&void 0!==v?v:200,meta:null===(y=e.meta)||void 0===y||y,messages:null===(w=e.messages)||void 0===w||w,inlineRefs:null===(E=e.inlineRefs)||void 0===E||E,schemaId:null!==(_=e.schemaId)&&void 0!==_?_:"$id",addUsedSchema:null===(S=e.addUsedSchema)||void 0===S||S,validateSchema:null===(x=e.validateSchema)||void 0===x||x,validateFormats:null===(A=e.validateFormats)||void 0===A||A,unicodeRegExp:null===(T=e.unicodeRegExp)||void 0===T||T,int32range:null===(C=e.int32range)||void 0===C||C,uriResolver:I}}class E{constructor(e={}){this.schemas={},this.refs={},this.formats={},this._compilations=new Set,this._loading={},this._cache=new Map,e=this.opts={...e,...w(e)};const{es5:t,lines:r}=this.opts.code;this.scope=new c.ValueScope({scope:{},prefixes:b,es5:t,lines:r}),this.logger=function(e){if(!1===e)return k;if(void 0===e)return console;if(e.log&&e.warn&&e.error)return e;throw new Error("logger must implement log, warn and error methods")}(e.logger);const n=e.validateFormats;e.validateFormats=!1,this.RULES=(0,s.getRules)(),_.call(this,v,e,"NOT SUPPORTED"),_.call(this,y,e,"DEPRECATED","warn"),this._metaOpts=C.call(this),e.formats&&A.call(this),this._addVocabularies(),this._addDefaultMetaSchema(),e.keywords&&T.call(this,e.keywords),"object"==typeof e.meta&&this.addMetaSchema(e.meta),x.call(this),e.validateFormats=n}_addVocabularies(){this.addKeyword("$async")}_addDefaultMetaSchema(){const{$data:e,meta:t,schemaId:r}=this.opts;let n=p;"id"===r&&(n={...p},n.id=n.$id,delete n.$id),t&&e&&this.addMetaSchema(n,n[r],!1)}defaultMeta(){const{meta:e,schemaId:t}=this.opts;return this.opts.defaultMeta="object"==typeof e?e[t]||e:void 0}validate(e,t){let r;if("string"==typeof e){if(r=this.getSchema(e),!r)throw new Error(`no schema with key or ref "${e}"`)}else r=this.compile(e);const n=r(t);return"$async"in r||(this.errors=r.errors),n}compile(e,t){const r=this._addSchema(e,t);return r.validate||this._compileSchemaEnv(r)}compileAsync(e,t){if("function"!=typeof this.opts.loadSchema)throw new Error("options.loadSchema should be a function");const{loadSchema:r}=this.opts;return n.call(this,e,t);async function n(e,t){await o.call(this,e.$schema);const r=this._addSchema(e,t);return r.validate||i.call(this,r)}async function o(e){e&&!this.getSchema(e)&&await n.call(this,{$ref:e},!0)}async function i(e){try{return this._compileSchemaEnv(e)}catch(t){if(!(t instanceof a.default))throw t;return s.call(this,t),await l.call(this,t.missingSchema),i.call(this,e)}}function s({missingSchema:e,missingRef:t}){if(this.refs[e])throw new Error(`AnySchema ${e} is loaded but ${t} cannot be resolved`)}async function l(e){const r=await c.call(this,e);this.refs[e]||await o.call(this,r.$schema),this.refs[e]||this.addSchema(r,e,t)}async function c(e){const t=this._loading[e];if(t)return t;try{return await(this._loading[e]=r(e))}finally{delete this._loading[e]}}}addSchema(e,t,r,n=this.opts.validateSchema){if(Array.isArray(e)){for(const t of e)this.addSchema(t,void 0,r,n);return this}let o;if("object"==typeof e){const{schemaId:t}=this.opts;if(o=e[t],void 0!==o&&"string"!=typeof o)throw new Error(`schema ${t} must be string`)}return t=(0,u.normalizeId)(t||o),this._checkUnique(t),this.schemas[t]=this._addSchema(e,r,t,n,!0),this}addMetaSchema(e,t,r=this.opts.validateSchema){return this.addSchema(e,t,!0,r),this}validateSchema(e,t){if("boolean"==typeof e)return!0;let r;if(r=e.$schema,void 0!==r&&"string"!=typeof r)throw new Error("$schema must be a string");if(r=r||this.opts.defaultMeta||this.defaultMeta(),!r)return this.logger.warn("meta-schema not available"),this.errors=null,!0;const n=this.validate(r,e);if(!n&&t){const e="schema is invalid: "+this.errorsText();if("log"!==this.opts.validateSchema)throw new Error(e);this.logger.error(e)}return n}getSchema(e){let t;for(;"string"==typeof(t=S.call(this,e));)e=t;if(void 0===t){const{schemaId:r}=this.opts,n=new l.SchemaEnv({schema:{},schemaId:r});if(t=l.resolveSchema.call(this,n,e),!t)return;this.refs[e]=t}return t.validate||this._compileSchemaEnv(t)}removeSchema(e){if(e instanceof RegExp)return this._removeAllSchemas(this.schemas,e),this._removeAllSchemas(this.refs,e),this;switch(typeof e){case"undefined":return this._removeAllSchemas(this.schemas),this._removeAllSchemas(this.refs),this._cache.clear(),this;case"string":{const t=S.call(this,e);return"object"==typeof t&&this._cache.delete(t.schema),delete this.schemas[e],delete this.refs[e],this}case"object":{const t=e;this._cache.delete(t);let r=e[this.opts.schemaId];return r&&(r=(0,u.normalizeId)(r),delete this.schemas[r],delete this.refs[r]),this}default:throw new Error("ajv.removeSchema: invalid parameter")}}addVocabulary(e){for(const t of e)this.addKeyword(t);return this}addKeyword(e,t){let r;if("string"==typeof e)r=e,"object"==typeof t&&(this.logger.warn("these parameters are deprecated, see docs for addKeyword"),t.keyword=r);else{if("object"!=typeof e||void 0!==t)throw new Error("invalid addKeywords parameters");if(r=(t=e).keyword,Array.isArray(r)&&!r.length)throw new Error("addKeywords: keyword must be string or non-empty array")}if(R.call(this,r,t),!t)return(0,f.eachItem)(r,(e=>N.call(this,e))),this;M.call(this,t);const n={...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)};return(0,f.eachItem)(r,0===n.type.length?e=>N.call(this,e,n):e=>n.type.forEach((t=>N.call(this,e,n,t)))),this}getKeyword(e){const t=this.RULES.all[e];return"object"==typeof t?t.definition:!!t}removeKeyword(e){const{RULES:t}=this;delete t.keywords[e],delete t.all[e];for(const r of t.rules){const t=r.rules.findIndex((t=>t.keyword===e));t>=0&&r.rules.splice(t,1)}return this}addFormat(e,t){return"string"==typeof t&&(t=new RegExp(t)),this.formats[e]=t,this}errorsText(e=this.errors,{separator:t=", ",dataVar:r="data"}={}){return e&&0!==e.length?e.map((e=>`${r}${e.instancePath} ${e.message}`)).reduce(((e,r)=>e+t+r)):"No errors"}$dataMetaSchema(e,t){const r=this.RULES.all;e=JSON.parse(JSON.stringify(e));for(const n of t){const t=n.split("/").slice(1);let o=e;for(const e of t)o=o[e];for(const e in r){const t=r[e];if("object"!=typeof t)continue;const{$data:n}=t.definition,i=o[e];n&&i&&(o[e]=D(i))}}return e}_removeAllSchemas(e,t){for(const r in e){const n=e[r];t&&!t.test(r)||("string"==typeof n?delete e[r]:n&&!n.meta&&(this._cache.delete(n.schema),delete e[r]))}}_addSchema(e,t,r,n=this.opts.validateSchema,o=this.opts.addUsedSchema){let i;const{schemaId:a}=this.opts;if("object"==typeof e)i=e[a];else{if(this.opts.jtd)throw new Error("schema must be object");if("boolean"!=typeof e)throw new Error("schema must be object or boolean")}let s=this._cache.get(e);if(void 0!==s)return s;r=(0,u.normalizeId)(i||r);const c=u.getSchemaRefs.call(this,e,r);return s=new l.SchemaEnv({schema:e,schemaId:a,meta:t,baseId:r,localRefs:c}),this._cache.set(s.schema,s),o&&!r.startsWith("#")&&(r&&this._checkUnique(r),this.refs[r]=s),n&&this.validateSchema(e,!0),s}_checkUnique(e){if(this.schemas[e]||this.refs[e])throw new Error(`schema with key or id "${e}" already exists`)}_compileSchemaEnv(e){if(e.meta?this._compileMetaSchema(e):l.compileSchema.call(this,e),!e.validate)throw new Error("ajv implementation error");return e.validate}_compileMetaSchema(e){const t=this.opts;this.opts=this._metaOpts;try{l.compileSchema.call(this,e)}finally{this.opts=t}}}function _(e,t,r,n="error"){for(const o in e){const i=o;i in t&&this.logger[n](`${r}: option ${o}. ${e[i]}`)}}function S(e){return e=(0,u.normalizeId)(e),this.schemas[e]||this.refs[e]}function x(){const e=this.opts.schemas;if(e)if(Array.isArray(e))this.addSchema(e);else for(const t in e)this.addSchema(e[t],t)}function A(){for(const e in this.opts.formats){const t=this.opts.formats[e];t&&this.addFormat(e,t)}}function T(e){if(Array.isArray(e))this.addVocabulary(e);else{this.logger.warn("keywords option as map is deprecated, pass array");for(const t in e){const r=e[t];r.keyword||(r.keyword=t),this.addKeyword(r)}}}function C(){const e={...this.opts};for(const t of g)delete e[t];return e}t.default=E,E.ValidationError=i.default,E.MissingRefError=a.default;const k={log(){},warn(){},error(){}},O=/^[a-z_$][a-z0-9_$:-]*$/i;function R(e,t){const{RULES:r}=this;if((0,f.eachItem)(e,(e=>{if(r.keywords[e])throw new Error(`Keyword ${e} is already defined`);if(!O.test(e))throw new Error(`Keyword ${e} has invalid name`)})),t&&t.$data&&!("code"in t)&&!("validate"in t))throw new Error('$data keyword must have "code" or "validate" function')}function N(e,t,r){var n;const o=null==t?void 0:t.post;if(r&&o)throw new Error('keyword with "post" flag cannot have "type"');const{RULES:i}=this;let a=o?i.post:i.rules.find((({type:e})=>e===r));if(a||(a={type:r,rules:[]},i.rules.push(a)),i.keywords[e]=!0,!t)return;const s={keyword:e,definition:{...t,type:(0,d.getJSONTypes)(t.type),schemaType:(0,d.getJSONTypes)(t.schemaType)}};t.before?I.call(this,a,s,t.before):a.rules.push(s),i.all[e]=s,null===(n=t.implements)||void 0===n||n.forEach((e=>this.addKeyword(e)))}function I(e,t,r){const n=e.rules.findIndex((e=>e.keyword===r));n>=0?e.rules.splice(n,0,t):(e.rules.push(t),this.logger.warn(`rule ${r} is not defined`))}function M(e){let{metaSchema:t}=e;void 0!==t&&(e.$data&&this.opts.$data&&(t=D(t)),e.validateSchema=this.compile(t,!0))}const P={$ref:"https://raw.githubusercontent.com/ajv-validator/ajv/master/lib/refs/data.json#"};function D(e){return{anyOf:[e,P]}}},76250:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(32017);n.code='require("ajv/dist/runtime/equal").default',t.default=n},53853:(e,t)=>{"use strict";function r(e){const t=e.length;let r,n=0,o=0;for(;o=55296&&r<=56319&&o{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(46579);n.code='require("ajv/dist/runtime/uri").default',t.default=n},13558:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});class r extends Error{constructor(e){super("validation failed"),this.errors=e,this.ajv=this.validation=!0}}t.default=r},15457:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateAdditionalItems=void 0;const n=r(99029),o=r(94227),i={keyword:"additionalItems",type:"array",schemaType:["boolean","object"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{parentSchema:t,it:r}=e,{items:n}=t;Array.isArray(n)?a(e,n):(0,o.checkStrictMode)(r,'"additionalItems" is ignored when "items" is not an array of schemas')}};function a(e,t){const{gen:r,schema:i,data:a,keyword:s,it:l}=e;l.items=!0;const c=r.const("len",n._`${a}.length`);if(!1===i)e.setParams({len:t.length}),e.pass(n._`${c} <= ${t.length}`);else if("object"==typeof i&&!(0,o.alwaysValidSchema)(l,i)){const i=r.var("valid",n._`${c} <= ${t.length}`);r.if((0,n.not)(i),(()=>function(i){r.forRange("i",t.length,c,(t=>{e.subschema({keyword:s,dataProp:t,dataPropType:o.Type.Num},i),l.allErrors||r.if((0,n.not)(i),(()=>r.break()))}))}(i))),e.ok(i)}}t.validateAdditionalItems=a,t.default=i},38660:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(42023),a=r(94227),s={keyword:"additionalProperties",type:["object"],schemaType:["boolean","object"],allowUndefined:!0,trackErrors:!0,error:{message:"must NOT have additional properties",params:({params:e})=>o._`{additionalProperty: ${e.additionalProperty}}`},code(e){const{gen:t,schema:r,parentSchema:s,data:l,errsCount:c,it:u}=e;if(!c)throw new Error("ajv implementation error");const{allErrors:d,opts:f}=u;if(u.props=!0,"all"!==f.removeAdditional&&(0,a.alwaysValidSchema)(u,r))return;const p=(0,n.allSchemaProperties)(s.properties),h=(0,n.allSchemaProperties)(s.patternProperties);function m(e){t.code(o._`delete ${l}[${e}]`)}function g(n){if("all"===f.removeAdditional||f.removeAdditional&&!1===r)m(n);else{if(!1===r)return e.setParams({additionalProperty:n}),e.error(),void(d||t.break());if("object"==typeof r&&!(0,a.alwaysValidSchema)(u,r)){const r=t.name("valid");"failing"===f.removeAdditional?(b(n,r,!1),t.if((0,o.not)(r),(()=>{e.reset(),m(n)}))):(b(n,r),d||t.if((0,o.not)(r),(()=>t.break())))}}}function b(t,r,n){const o={keyword:"additionalProperties",dataProp:t,dataPropType:a.Type.Str};!1===n&&Object.assign(o,{compositeRule:!0,createErrors:!1,allErrors:!1}),e.subschema(o,r)}t.forIn("key",l,(r=>{p.length||h.length?t.if(function(r){let i;if(p.length>8){const e=(0,a.schemaRefOrVal)(u,s.properties,"properties");i=(0,n.isOwnProperty)(t,e,r)}else i=p.length?(0,o.or)(...p.map((e=>o._`${r} === ${e}`))):o.nil;return h.length&&(i=(0,o.or)(i,...h.map((t=>o._`${(0,n.usePattern)(e,t)}.test(${r})`)))),(0,o.not)(i)}(r),(()=>g(r))):g(r)})),e.ok(o._`${c} === ${i.default.errors}`)}};t.default=s},15844:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:"allOf",schemaType:"array",code(e){const{gen:t,schema:r,it:o}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");const i=t.name("valid");r.forEach(((t,r)=>{if((0,n.alwaysValidSchema)(o,t))return;const a=e.subschema({keyword:"allOf",schemaProp:r},i);e.ok(i),e.mergeEvaluated(a)}))}};t.default=o},16505:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n={keyword:"anyOf",schemaType:"array",trackErrors:!0,code:r(15765).validateUnion,error:{message:"must match a schema in anyOf"}};t.default=n},12661:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"contains",type:"array",schemaType:["object","boolean"],before:"uniqueItems",trackErrors:!0,error:{message:({params:{min:e,max:t}})=>void 0===t?n.str`must contain at least ${e} valid item(s)`:n.str`must contain at least ${e} and no more than ${t} valid item(s)`,params:({params:{min:e,max:t}})=>void 0===t?n._`{minContains: ${e}}`:n._`{minContains: ${e}, maxContains: ${t}}`},code(e){const{gen:t,schema:r,parentSchema:i,data:a,it:s}=e;let l,c;const{minContains:u,maxContains:d}=i;s.opts.next?(l=void 0===u?1:u,c=d):l=1;const f=t.const("len",n._`${a}.length`);if(e.setParams({min:l,max:c}),void 0===c&&0===l)return void(0,o.checkStrictMode)(s,'"minContains" == 0 without "maxContains": "contains" keyword ignored');if(void 0!==c&&l>c)return(0,o.checkStrictMode)(s,'"minContains" > "maxContains" is always invalid'),void e.fail();if((0,o.alwaysValidSchema)(s,r)){let t=n._`${f} >= ${l}`;return void 0!==c&&(t=n._`${t} && ${f} <= ${c}`),void e.pass(t)}s.items=!0;const p=t.name("valid");function h(){const e=t.name("_valid"),r=t.let("count",0);m(e,(()=>t.if(e,(()=>function(e){t.code(n._`${e}++`),void 0===c?t.if(n._`${e} >= ${l}`,(()=>t.assign(p,!0).break())):(t.if(n._`${e} > ${c}`,(()=>t.assign(p,!1).break())),1===l?t.assign(p,!0):t.if(n._`${e} >= ${l}`,(()=>t.assign(p,!0))))}(r)))))}function m(r,n){t.forRange("i",0,f,(t=>{e.subschema({keyword:"contains",dataProp:t,dataPropType:o.Type.Num,compositeRule:!0},r),n()}))}void 0===c&&1===l?m(p,(()=>t.if(p,(()=>t.break())))):0===l?(t.let(p,!0),void 0!==c&&t.if(n._`${a}.length > 0`,h)):(t.let(p,!1),h()),e.result(p,(()=>e.reset()))}};t.default=i},83025:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateSchemaDeps=t.validatePropertyDeps=t.error=void 0;const n=r(99029),o=r(94227),i=r(15765);t.error={message:({params:{property:e,depsCount:t,deps:r}})=>{const o=1===t?"property":"properties";return n.str`must have ${o} ${r} when property ${e} is present`},params:({params:{property:e,depsCount:t,deps:r,missingProperty:o}})=>n._`{property: ${e},
+ missingProperty: ${o},
+ depsCount: ${t},
+ deps: ${r}}`};const a={keyword:"dependencies",type:"object",schemaType:"object",error:t.error,code(e){const[t,r]=function({schema:e}){const t={},r={};for(const n in e)"__proto__"!==n&&((Array.isArray(e[n])?t:r)[n]=e[n]);return[t,r]}(e);s(e,t),l(e,r)}};function s(e,t=e.schema){const{gen:r,data:o,it:a}=e;if(0===Object.keys(t).length)return;const s=r.let("missing");for(const l in t){const c=t[l];if(0===c.length)continue;const u=(0,i.propertyInData)(r,o,l,a.opts.ownProperties);e.setParams({property:l,depsCount:c.length,deps:c.join(", ")}),a.allErrors?r.if(u,(()=>{for(const t of c)(0,i.checkReportMissingProp)(e,t)})):(r.if(n._`${u} && (${(0,i.checkMissingProp)(e,c,s)})`),(0,i.reportMissingProp)(e,s),r.else())}}function l(e,t=e.schema){const{gen:r,data:n,keyword:a,it:s}=e,l=r.name("valid");for(const c in t)(0,o.alwaysValidSchema)(s,t[c])||(r.if((0,i.propertyInData)(r,n,c,s.opts.ownProperties),(()=>{const t=e.subschema({keyword:a,schemaProp:c},l);e.mergeValidEvaluated(t,l)}),(()=>r.var(l,!0))),e.ok(l))}t.validatePropertyDeps=s,t.validateSchemaDeps=l,t.default=a},1239:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"if",schemaType:["object","boolean"],trackErrors:!0,error:{message:({params:e})=>n.str`must match "${e.ifClause}" schema`,params:({params:e})=>n._`{failingKeyword: ${e.ifClause}}`},code(e){const{gen:t,parentSchema:r,it:i}=e;void 0===r.then&&void 0===r.else&&(0,o.checkStrictMode)(i,'"if" without "then" and "else" is ignored');const s=a(i,"then"),l=a(i,"else");if(!s&&!l)return;const c=t.let("valid",!0),u=t.name("_valid");if(function(){const t=e.subschema({keyword:"if",compositeRule:!0,createErrors:!1,allErrors:!1},u);e.mergeEvaluated(t)}(),e.reset(),s&&l){const r=t.let("ifClause");e.setParams({ifClause:r}),t.if(u,d("then",r),d("else",r))}else s?t.if(u,d("then")):t.if((0,n.not)(u),d("else"));function d(r,o){return()=>{const i=e.subschema({keyword:r},u);t.assign(c,u),e.mergeValidEvaluated(i,c),o?t.assign(o,n._`${r}`):e.setParams({ifClause:r})}}e.pass(c,(()=>e.error(!0)))}};function a(e,t){const r=e.schema[t];return void 0!==r&&!(0,o.alwaysValidSchema)(e,r)}t.default=i},56378:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15457),o=r(65354),i=r(20494),a=r(93966),s=r(12661),l=r(83025),c=r(19713),u=r(38660),d=r(40117),f=r(45333),p=r(57923),h=r(16505),m=r(96163),g=r(15844),b=r(1239),v=r(14426);t.default=function(e=!1){const t=[p.default,h.default,m.default,g.default,b.default,v.default,c.default,u.default,l.default,d.default,f.default];return e?t.push(o.default,a.default):t.push(n.default,i.default),t.push(s.default),t}},20494:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateTuple=void 0;const n=r(99029),o=r(94227),i=r(15765),a={keyword:"items",type:"array",schemaType:["object","array","boolean"],before:"uniqueItems",code(e){const{schema:t,it:r}=e;if(Array.isArray(t))return s(e,"additionalItems",t);r.items=!0,(0,o.alwaysValidSchema)(r,t)||e.ok((0,i.validateArray)(e))}};function s(e,t,r=e.schema){const{gen:i,parentSchema:a,data:s,keyword:l,it:c}=e;!function(e){const{opts:n,errSchemaPath:i}=c,a=r.length,s=a===e.minItems&&(a===e.maxItems||!1===e[t]);if(n.strictTuples&&!s){const e=`"${l}" is ${a}-tuple, but minItems or maxItems/${t} are not specified or different at path "${i}"`;(0,o.checkStrictMode)(c,e,n.strictTuples)}}(a),c.opts.unevaluated&&r.length&&!0!==c.items&&(c.items=o.mergeEvaluated.items(i,r.length,c.items));const u=i.name("valid"),d=i.const("len",n._`${s}.length`);r.forEach(((t,r)=>{(0,o.alwaysValidSchema)(c,t)||(i.if(n._`${d} > ${r}`,(()=>e.subschema({keyword:l,schemaProp:r,dataProp:r},u))),e.ok(u))}))}t.validateTuple=s,t.default=a},93966:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(15765),a=r(15457),s={keyword:"items",type:"array",schemaType:["object","boolean"],before:"uniqueItems",error:{message:({params:{len:e}})=>n.str`must NOT have more than ${e} items`,params:({params:{len:e}})=>n._`{limit: ${e}}`},code(e){const{schema:t,parentSchema:r,it:n}=e,{prefixItems:s}=r;n.items=!0,(0,o.alwaysValidSchema)(n,t)||(s?(0,a.validateAdditionalItems)(e,s):e.ok((0,i.validateArray)(e)))}};t.default=s},57923:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:"not",schemaType:["object","boolean"],trackErrors:!0,code(e){const{gen:t,schema:r,it:o}=e;if((0,n.alwaysValidSchema)(o,r))return void e.fail();const i=t.name("valid");e.subschema({keyword:"not",compositeRule:!0,createErrors:!1,allErrors:!1},i),e.failResult(i,(()=>e.reset()),(()=>e.error()))},error:{message:"must NOT be valid"}};t.default=o},96163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"oneOf",schemaType:"array",trackErrors:!0,error:{message:"must match exactly one schema in oneOf",params:({params:e})=>n._`{passingSchemas: ${e.passing}}`},code(e){const{gen:t,schema:r,parentSchema:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(a.opts.discriminator&&i.discriminator)return;const s=r,l=t.let("valid",!1),c=t.let("passing",null),u=t.name("_valid");e.setParams({passing:c}),t.block((function(){s.forEach(((r,i)=>{let s;(0,o.alwaysValidSchema)(a,r)?t.var(u,!0):s=e.subschema({keyword:"oneOf",schemaProp:i,compositeRule:!0},u),i>0&&t.if(n._`${u} && ${l}`).assign(l,!1).assign(c,n._`[${c}, ${i}]`).else(),t.if(u,(()=>{t.assign(l,!0),t.assign(c,i),s&&e.mergeEvaluated(s,n.Name)}))}))})),e.result(l,(()=>e.reset()),(()=>e.error(!0)))}};t.default=i},45333:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(94227),a=r(94227),s={keyword:"patternProperties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,data:s,parentSchema:l,it:c}=e,{opts:u}=c,d=(0,n.allSchemaProperties)(r),f=d.filter((e=>(0,i.alwaysValidSchema)(c,r[e])));if(0===d.length||f.length===d.length&&(!c.opts.unevaluated||!0===c.props))return;const p=u.strictSchema&&!u.allowMatchingProperties&&l.properties,h=t.name("valid");!0===c.props||c.props instanceof o.Name||(c.props=(0,a.evaluatedPropsToName)(t,c.props));const{props:m}=c;function g(e){for(const t in p)new RegExp(e).test(t)&&(0,i.checkStrictMode)(c,`property ${t} matches pattern ${e} (use allowMatchingProperties)`)}function b(r){t.forIn("key",s,(i=>{t.if(o._`${(0,n.usePattern)(e,r)}.test(${i})`,(()=>{const n=f.includes(r);n||e.subschema({keyword:"patternProperties",schemaProp:r,dataProp:i,dataPropType:a.Type.Str},h),c.opts.unevaluated&&!0!==m?t.assign(o._`${m}[${i}]`,!0):n||c.allErrors||t.if((0,o.not)(h),(()=>t.break()))}))}))}!function(){for(const e of d)p&&g(e),c.allErrors?b(e):(t.var(h,!0),b(e),t.if(h))}()}};t.default=s},65354:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(20494),o={keyword:"prefixItems",type:"array",schemaType:["array"],before:"uniqueItems",code:e=>(0,n.validateTuple)(e,"items")};t.default=o},40117:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(62586),o=r(15765),i=r(94227),a=r(38660),s={keyword:"properties",type:"object",schemaType:"object",code(e){const{gen:t,schema:r,parentSchema:s,data:l,it:c}=e;"all"===c.opts.removeAdditional&&void 0===s.additionalProperties&&a.default.code(new n.KeywordCxt(c,a.default,"additionalProperties"));const u=(0,o.allSchemaProperties)(r);for(const e of u)c.definedProperties.add(e);c.opts.unevaluated&&u.length&&!0!==c.props&&(c.props=i.mergeEvaluated.props(t,(0,i.toHash)(u),c.props));const d=u.filter((e=>!(0,i.alwaysValidSchema)(c,r[e])));if(0===d.length)return;const f=t.name("valid");for(const r of d)p(r)?h(r):(t.if((0,o.propertyInData)(t,l,r,c.opts.ownProperties)),h(r),c.allErrors||t.else().var(f,!0),t.endIf()),e.it.definedProperties.add(r),e.ok(f);function p(e){return c.opts.useDefaults&&!c.compositeRule&&void 0!==r[e].default}function h(t){e.subschema({keyword:"properties",schemaProp:t,dataProp:t},f)}}};t.default=s},19713:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i={keyword:"propertyNames",type:"object",schemaType:["object","boolean"],error:{message:"property name must be valid",params:({params:e})=>n._`{propertyName: ${e.propertyName}}`},code(e){const{gen:t,schema:r,data:i,it:a}=e;if((0,o.alwaysValidSchema)(a,r))return;const s=t.name("valid");t.forIn("key",i,(r=>{e.setParams({propertyName:r}),e.subschema({keyword:"propertyNames",data:r,dataTypes:["string"],propertyName:r,compositeRule:!0},s),t.if((0,n.not)(s),(()=>{e.error(!0),a.allErrors||t.break()}))})),e.ok(s)}};t.default=i},14426:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(94227),o={keyword:["then","else"],schemaType:["object","boolean"],code({keyword:e,parentSchema:t,it:r}){void 0===t.if&&(0,n.checkStrictMode)(r,`"${e}" without "if" is ignored`)}};t.default=o},15765:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.validateUnion=t.validateArray=t.usePattern=t.callValidateCode=t.schemaProperties=t.allSchemaProperties=t.noPropertyInData=t.propertyInData=t.isOwnProperty=t.hasPropFunc=t.reportMissingProp=t.checkMissingProp=t.checkReportMissingProp=void 0;const n=r(99029),o=r(94227),i=r(42023),a=r(94227);function s(e){return e.scopeValue("func",{ref:Object.prototype.hasOwnProperty,code:n._`Object.prototype.hasOwnProperty`})}function l(e,t,r){return n._`${s(e)}.call(${t}, ${r})`}function c(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} === undefined`;return o?(0,n.or)(i,(0,n.not)(l(e,t,r))):i}function u(e){return e?Object.keys(e).filter((e=>"__proto__"!==e)):[]}t.checkReportMissingProp=function(e,t){const{gen:r,data:o,it:i}=e;r.if(c(r,o,t,i.opts.ownProperties),(()=>{e.setParams({missingProperty:n._`${t}`},!0),e.error()}))},t.checkMissingProp=function({gen:e,data:t,it:{opts:r}},o,i){return(0,n.or)(...o.map((o=>(0,n.and)(c(e,t,o,r.ownProperties),n._`${i} = ${o}`))))},t.reportMissingProp=function(e,t){e.setParams({missingProperty:t},!0),e.error()},t.hasPropFunc=s,t.isOwnProperty=l,t.propertyInData=function(e,t,r,o){const i=n._`${t}${(0,n.getProperty)(r)} !== undefined`;return o?n._`${i} && ${l(e,t,r)}`:i},t.noPropertyInData=c,t.allSchemaProperties=u,t.schemaProperties=function(e,t){return u(t).filter((r=>!(0,o.alwaysValidSchema)(e,t[r])))},t.callValidateCode=function({schemaCode:e,data:t,it:{gen:r,topSchemaRef:o,schemaPath:a,errorPath:s},it:l},c,u,d){const f=d?n._`${e}, ${t}, ${o}${a}`:t,p=[[i.default.instancePath,(0,n.strConcat)(i.default.instancePath,s)],[i.default.parentData,l.parentData],[i.default.parentDataProperty,l.parentDataProperty],[i.default.rootData,i.default.rootData]];l.opts.dynamicRef&&p.push([i.default.dynamicAnchors,i.default.dynamicAnchors]);const h=n._`${f}, ${r.object(...p)}`;return u!==n.nil?n._`${c}.call(${u}, ${h})`:n._`${c}(${h})`};const d=n._`new RegExp`;t.usePattern=function({gen:e,it:{opts:t}},r){const o=t.unicodeRegExp?"u":"",{regExp:i}=t.code,s=i(r,o);return e.scopeValue("pattern",{key:s.toString(),ref:s,code:n._`${"new RegExp"===i.code?d:(0,a.useFunc)(e,i)}(${r}, ${o})`})},t.validateArray=function(e){const{gen:t,data:r,keyword:i,it:a}=e,s=t.name("valid");if(a.allErrors){const e=t.let("valid",!0);return l((()=>t.assign(e,!1))),e}return t.var(s,!0),l((()=>t.break())),s;function l(a){const l=t.const("len",n._`${r}.length`);t.forRange("i",0,l,(r=>{e.subschema({keyword:i,dataProp:r,dataPropType:o.Type.Num},s),t.if((0,n.not)(s),a)}))}},t.validateUnion=function(e){const{gen:t,schema:r,keyword:i,it:a}=e;if(!Array.isArray(r))throw new Error("ajv implementation error");if(r.some((e=>(0,o.alwaysValidSchema)(a,e)))&&!a.opts.unevaluated)return;const s=t.let("valid",!1),l=t.name("_valid");t.block((()=>r.forEach(((r,o)=>{const a=e.subschema({keyword:i,schemaProp:o,compositeRule:!0},l);t.assign(s,n._`${s} || ${l}`),e.mergeValidEvaluated(a,l)||t.if((0,n.not)(s))})))),e.result(s,(()=>e.reset()),(()=>e.error(!0)))}},83463:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const r={keyword:"id",code(){throw new Error('NOT SUPPORTED: keyword "id", use "$id" for schema ID')}};t.default=r},72128:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(83463),o=r(13693),i=["$schema","$id","$defs","$vocabulary",{keyword:"$comment"},"definitions",n.default,o.default];t.default=i},13693:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.callRef=t.getValidate=void 0;const n=r(34551),o=r(15765),i=r(99029),a=r(42023),s=r(73835),l=r(94227),c={keyword:"$ref",schemaType:"string",code(e){const{gen:t,schema:r,it:o}=e,{baseId:a,schemaEnv:l,validateName:c,opts:f,self:p}=o,{root:h}=l;if(("#"===r||"#/"===r)&&a===h.baseId)return function(){if(l===h)return d(e,c,l,l.$async);const r=t.scopeValue("root",{ref:h});return d(e,i._`${r}.validate`,h,h.$async)}();const m=s.resolveRef.call(p,h,a,r);if(void 0===m)throw new n.default(o.opts.uriResolver,a,r);return m instanceof s.SchemaEnv?function(t){const r=u(e,t);d(e,r,t,t.$async)}(m):function(n){const o=t.scopeValue("schema",!0===f.code.source?{ref:n,code:(0,i.stringify)(n)}:{ref:n}),a=t.name("valid"),s=e.subschema({schema:n,dataTypes:[],schemaPath:i.nil,topSchemaRef:o,errSchemaPath:r},a);e.mergeEvaluated(s),e.ok(a)}(m)}};function u(e,t){const{gen:r}=e;return t.validate?r.scopeValue("validate",{ref:t.validate}):i._`${r.scopeValue("wrapper",{ref:t})}.validate`}function d(e,t,r,n){const{gen:s,it:c}=e,{allErrors:u,schemaEnv:d,opts:f}=c,p=f.passContext?a.default.this:i.nil;function h(e){const t=i._`${e}.errors`;s.assign(a.default.vErrors,i._`${a.default.vErrors} === null ? ${t} : ${a.default.vErrors}.concat(${t})`),s.assign(a.default.errors,i._`${a.default.vErrors}.length`)}function m(e){var t;if(!c.opts.unevaluated)return;const n=null===(t=null==r?void 0:r.validate)||void 0===t?void 0:t.evaluated;if(!0!==c.props)if(n&&!n.dynamicProps)void 0!==n.props&&(c.props=l.mergeEvaluated.props(s,n.props,c.props));else{const t=s.var("props",i._`${e}.evaluated.props`);c.props=l.mergeEvaluated.props(s,t,c.props,i.Name)}if(!0!==c.items)if(n&&!n.dynamicItems)void 0!==n.items&&(c.items=l.mergeEvaluated.items(s,n.items,c.items));else{const t=s.var("items",i._`${e}.evaluated.items`);c.items=l.mergeEvaluated.items(s,t,c.items,i.Name)}}n?function(){if(!d.$async)throw new Error("async schema referenced by sync schema");const r=s.let("valid");s.try((()=>{s.code(i._`await ${(0,o.callValidateCode)(e,t,p)}`),m(t),u||s.assign(r,!0)}),(e=>{s.if(i._`!(${e} instanceof ${c.ValidationError})`,(()=>s.throw(e))),h(e),u||s.assign(r,!1)})),e.ok(r)}():e.result((0,o.callValidateCode)(e,t,p),(()=>m(t)),(()=>h(t)))}t.getValidate=u,t.callRef=d,t.default=c},36653:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(97652),i=r(73835),a=r(94227),s={keyword:"discriminator",type:"object",schemaType:"object",error:{message:({params:{discrError:e,tagName:t}})=>e===o.DiscrError.Tag?`tag "${t}" must be string`:`value of tag "${t}" must be in oneOf`,params:({params:{discrError:e,tag:t,tagName:r}})=>n._`{error: ${e}, tag: ${r}, tagValue: ${t}}`},code(e){const{gen:t,data:r,schema:s,parentSchema:l,it:c}=e,{oneOf:u}=l;if(!c.opts.discriminator)throw new Error("discriminator: requires discriminator option");const d=s.propertyName;if("string"!=typeof d)throw new Error("discriminator: requires propertyName");if(s.mapping)throw new Error("discriminator: mapping is not supported");if(!u)throw new Error("discriminator: requires oneOf keyword");const f=t.let("valid",!1),p=t.const("tag",n._`${r}${(0,n.getProperty)(d)}`);function h(r){const o=t.name("valid"),i=e.subschema({keyword:"oneOf",schemaProp:r},o);return e.mergeEvaluated(i,n.Name),o}t.if(n._`typeof ${p} == "string"`,(()=>function(){const r=function(){var e;const t={},r=o(l);let n=!0;for(let t=0;te.error(!1,{discrError:o.DiscrError.Tag,tag:p,tagName:d}))),e.ok(f)}};t.default=s},97652:(e,t)=>{"use strict";var r;Object.defineProperty(t,"__esModule",{value:!0}),t.DiscrError=void 0,(r=t.DiscrError||(t.DiscrError={})).Tag="tag",r.Mapping="mapping"},86144:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(72128),o=r(67060),i=r(56378),a=r(97532),s=r(69857),l=[n.default,o.default,(0,i.default)(),a.default,s.metadataVocabulary,s.contentVocabulary];t.default=l},94737:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:"format",type:["number","string"],schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>n.str`must match format "${e}"`,params:({schemaCode:e})=>n._`{format: ${e}}`},code(e,t){const{gen:r,data:o,$data:i,schema:a,schemaCode:s,it:l}=e,{opts:c,errSchemaPath:u,schemaEnv:d,self:f}=l;c.validateFormats&&(i?function(){const i=r.scopeValue("formats",{ref:f.formats,code:c.code.formats}),a=r.const("fDef",n._`${i}[${s}]`),l=r.let("fType"),u=r.let("format");r.if(n._`typeof ${a} == "object" && !(${a} instanceof RegExp)`,(()=>r.assign(l,n._`${a}.type || "string"`).assign(u,n._`${a}.validate`)),(()=>r.assign(l,n._`"string"`).assign(u,a))),e.fail$data((0,n.or)(!1===c.strictSchema?n.nil:n._`${s} && !${u}`,function(){const e=d.$async?n._`(${a}.async ? await ${u}(${o}) : ${u}(${o}))`:n._`${u}(${o})`,r=n._`(typeof ${u} == "function" ? ${e} : ${u}.test(${o}))`;return n._`${u} && ${u} !== true && ${l} === ${t} && !${r}`}()))}():function(){const i=f.formats[a];if(!i)return void function(){if(!1!==c.strictSchema)throw new Error(e());function e(){return`unknown format "${a}" ignored in schema at path "${u}"`}f.logger.warn(e())}();if(!0===i)return;const[s,l,p]=function(e){const t=e instanceof RegExp?(0,n.regexpCode)(e):c.code.formats?n._`${c.code.formats}${(0,n.getProperty)(a)}`:void 0,o=r.scopeValue("formats",{key:a,ref:e,code:t});return"object"!=typeof e||e instanceof RegExp?["string",e,o]:[e.type||"string",e.validate,n._`${o}.validate`]}(i);s===t&&e.pass(function(){if("object"==typeof i&&!(i instanceof RegExp)&&i.async){if(!d.$async)throw new Error("async format in sync schema");return n._`await ${p}(${o})`}return"function"==typeof l?n._`${p}(${o})`:n._`${p}.test(${o})`}())}())}};t.default=o},97532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=[r(94737).default];t.default=n},69857:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.contentVocabulary=t.metadataVocabulary=void 0,t.metadataVocabulary=["title","description","default","deprecated","readOnly","writeOnly","examples"],t.contentVocabulary=["contentMediaType","contentEncoding","contentSchema"]},27935:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(76250),a={keyword:"const",$data:!0,error:{message:"must be equal to constant",params:({schemaCode:e})=>n._`{allowedValue: ${e}}`},code(e){const{gen:t,data:r,$data:a,schemaCode:s,schema:l}=e;a||l&&"object"==typeof l?e.fail$data(n._`!${(0,o.useFunc)(t,i.default)}(${r}, ${s})`):e.fail(n._`${l} !== ${r}`)}};t.default=a},28643:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(76250),a={keyword:"enum",schemaType:"array",$data:!0,error:{message:"must be equal to one of the allowed values",params:({schemaCode:e})=>n._`{allowedValues: ${e}}`},code(e){const{gen:t,data:r,$data:a,schema:s,schemaCode:l,it:c}=e;if(!a&&0===s.length)throw new Error("enum must have non-empty array");const u=s.length>=c.opts.loopEnum;let d;const f=()=>null!=d?d:d=(0,o.useFunc)(t,i.default);let p;if(u||a)p=t.let("valid"),e.block$data(p,(function(){t.assign(p,!1),t.forOf("v",l,(e=>t.if(n._`${f()}(${r}, ${e})`,(()=>t.assign(p,!0).break()))))}));else{if(!Array.isArray(s))throw new Error("ajv implementation error");const e=t.const("vSchema",l);p=(0,n.or)(...s.map(((t,o)=>function(e,t){const o=s[t];return"object"==typeof o&&null!==o?n._`${f()}(${r}, ${e}[${t}])`:n._`${r} === ${o}`}(e,o))))}e.pass(p)}};t.default=a},67060:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(75882),o=r(63439),i=r(77307),a=r(90422),s=r(34486),l=r(34003),c=r(61163),u=r(60617),d=r(27935),f=r(28643),p=[n.default,o.default,i.default,a.default,s.default,l.default,c.default,u.default,{keyword:"type",schemaType:["string","array"]},{keyword:"nullable",schemaType:"boolean"},d.default,f.default];t.default=p},61163:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:["maxItems","minItems"],type:"array",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxItems"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} items`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxItems"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`${r}.length ${i} ${o}`)}};t.default=o},77307:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=r(94227),i=r(53853),a={keyword:["maxLength","minLength"],type:"string",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxLength"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} characters`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:a,it:s}=e,l="maxLength"===t?n.operators.GT:n.operators.LT,c=!1===s.opts.unicode?n._`${r}.length`:n._`${(0,o.useFunc)(e.gen,i.default)}(${r})`;e.fail$data(n._`${c} ${l} ${a}`)}};t.default=a},75882:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o=n.operators,i={maximum:{okStr:"<=",ok:o.LTE,fail:o.GT},minimum:{okStr:">=",ok:o.GTE,fail:o.LT},exclusiveMaximum:{okStr:"<",ok:o.LT,fail:o.GTE},exclusiveMinimum:{okStr:">",ok:o.GT,fail:o.LTE}},a={message:({keyword:e,schemaCode:t})=>n.str`must be ${i[e].okStr} ${t}`,params:({keyword:e,schemaCode:t})=>n._`{comparison: ${i[e].okStr}, limit: ${t}}`},s={keyword:Object.keys(i),type:"number",schemaType:"number",$data:!0,error:a,code(e){const{keyword:t,data:r,schemaCode:o}=e;e.fail$data(n._`${r} ${i[t].fail} ${o} || isNaN(${r})`)}};t.default=s},34486:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:["maxProperties","minProperties"],type:"object",schemaType:"number",$data:!0,error:{message({keyword:e,schemaCode:t}){const r="maxProperties"===e?"more":"fewer";return n.str`must NOT have ${r} than ${t} properties`},params:({schemaCode:e})=>n._`{limit: ${e}}`},code(e){const{keyword:t,data:r,schemaCode:o}=e,i="maxProperties"===t?n.operators.GT:n.operators.LT;e.fail$data(n._`Object.keys(${r}).length ${i} ${o}`)}};t.default=o},63439:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(99029),o={keyword:"multipleOf",type:"number",schemaType:"number",$data:!0,error:{message:({schemaCode:e})=>n.str`must be multiple of ${e}`,params:({schemaCode:e})=>n._`{multipleOf: ${e}}`},code(e){const{gen:t,data:r,schemaCode:o,it:i}=e,a=i.opts.multipleOfPrecision,s=t.let("res"),l=a?n._`Math.abs(Math.round(${s}) - ${s}) > 1e-${a}`:n._`${s} !== parseInt(${s})`;e.fail$data(n._`(${o} === 0 || (${s} = ${r}/${o}, ${l}))`)}};t.default=o},90422:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i={keyword:"pattern",type:"string",schemaType:"string",$data:!0,error:{message:({schemaCode:e})=>o.str`must match pattern "${e}"`,params:({schemaCode:e})=>o._`{pattern: ${e}}`},code(e){const{data:t,$data:r,schema:i,schemaCode:a,it:s}=e,l=s.opts.unicodeRegExp?"u":"",c=r?o._`(new RegExp(${a}, ${l}))`:(0,n.usePattern)(e,i);e.fail$data(o._`!${c}.test(${t})`)}};t.default=i},34003:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(15765),o=r(99029),i=r(94227),a={keyword:"required",type:"object",schemaType:"array",$data:!0,error:{message:({params:{missingProperty:e}})=>o.str`must have required property '${e}'`,params:({params:{missingProperty:e}})=>o._`{missingProperty: ${e}}`},code(e){const{gen:t,schema:r,schemaCode:a,data:s,$data:l,it:c}=e,{opts:u}=c;if(!l&&0===r.length)return;const d=r.length>=u.loopRequired;if(c.allErrors?function(){if(d||l)e.block$data(o.nil,f);else for(const t of r)(0,n.checkReportMissingProp)(e,t)}():function(){const i=t.let("missing");if(d||l){const r=t.let("valid",!0);e.block$data(r,(()=>function(r,i){e.setParams({missingProperty:r}),t.forOf(r,a,(()=>{t.assign(i,(0,n.propertyInData)(t,s,r,u.ownProperties)),t.if((0,o.not)(i),(()=>{e.error(),t.break()}))}),o.nil)}(i,r))),e.ok(r)}else t.if((0,n.checkMissingProp)(e,r,i)),(0,n.reportMissingProp)(e,i),t.else()}(),u.strictRequired){const t=e.parentSchema.properties,{definedProperties:n}=e.it;for(const e of r)if(void 0===(null==t?void 0:t[e])&&!n.has(e)){const t=`required property "${e}" is not defined at "${c.schemaEnv.baseId+c.errSchemaPath}" (strictRequired)`;(0,i.checkStrictMode)(c,t,c.opts.strictRequired)}}function f(){t.forOf("prop",a,(r=>{e.setParams({missingProperty:r}),t.if((0,n.noPropertyInData)(t,s,r,u.ownProperties),(()=>e.error()))}))}}};t.default=a},60617:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});const n=r(10208),o=r(99029),i=r(94227),a=r(76250),s={keyword:"uniqueItems",type:"array",schemaType:"boolean",$data:!0,error:{message:({params:{i:e,j:t}})=>o.str`must NOT have duplicate items (items ## ${t} and ${e} are identical)`,params:({params:{i:e,j:t}})=>o._`{i: ${e}, j: ${t}}`},code(e){const{gen:t,data:r,$data:s,schema:l,parentSchema:c,schemaCode:u,it:d}=e;if(!s&&!l)return;const f=t.let("valid"),p=c.items?(0,n.getSchemaTypes)(c.items):[];function h(i,a){const s=t.name("item"),l=(0,n.checkDataTypes)(p,s,d.opts.strictNumbers,n.DataType.Wrong),c=t.const("indices",o._`{}`);t.for(o._`;${i}--;`,(()=>{t.let(s,o._`${r}[${i}]`),t.if(l,o._`continue`),p.length>1&&t.if(o._`typeof ${s} == "string"`,o._`${s} += "_"`),t.if(o._`typeof ${c}[${s}] == "number"`,(()=>{t.assign(a,o._`${c}[${s}]`),e.error(),t.assign(f,!1).break()})).code(o._`${c}[${s}] = ${i}`)}))}function m(n,s){const l=(0,i.useFunc)(t,a.default),c=t.name("outer");t.label(c).for(o._`;${n}--;`,(()=>t.for(o._`${s} = ${n}; ${s}--;`,(()=>t.if(o._`${l}(${r}[${n}], ${r}[${s}])`,(()=>{e.error(),t.assign(f,!1).break(c)}))))))}e.block$data(f,(function(){const n=t.let("i",o._`${r}.length`),i=t.let("j");e.setParams({i:n,j:i}),t.assign(f,!0),t.if(o._`${n} > 1`,(()=>(p.length>0&&!p.some((e=>"object"===e||"array"===e))?h:m)(n,i)))}),o._`${u} === false`),e.ok(f)}};t.default=s},58241:(e,t,r)=>{"use strict";r.r(t),r.d(t,{hideOthers:()=>u,inertOthers:()=>d,supportsInert:()=>f,suppressOthers:()=>p});var n=function(e){return"undefined"==typeof document?null:(Array.isArray(e)?e[0]:e).ownerDocument.body},o=new WeakMap,i=new WeakMap,a={},s=0,l=function(e){return e&&(e.host||l(e.parentNode))},c=function(e,t,r,n){var c=function(e,t){return t.map((function(t){if(e.contains(t))return t;var r=l(t);return r&&e.contains(r)?r:(console.error("aria-hidden",t,"in not contained inside",e,". Doing nothing"),null)})).filter((function(e){return Boolean(e)}))}(t,Array.isArray(e)?e:[e]);a[r]||(a[r]=new WeakMap);var u=a[r],d=[],f=new Set,p=new Set(c),h=function(e){e&&!f.has(e)&&(f.add(e),h(e.parentNode))};c.forEach(h);var m=function(e){e&&!p.has(e)&&Array.prototype.forEach.call(e.children,(function(e){if(f.has(e))m(e);else try{var t=e.getAttribute(n),a=null!==t&&"false"!==t,s=(o.get(e)||0)+1,l=(u.get(e)||0)+1;o.set(e,s),u.set(e,l),d.push(e),1===s&&a&&i.set(e,!0),1===l&&e.setAttribute(r,"true"),a||e.setAttribute(n,"true")}catch(t){console.error("aria-hidden: cannot operate on ",e,t)}}))};return m(t),f.clear(),s++,function(){d.forEach((function(e){var t=o.get(e)-1,a=u.get(e)-1;o.set(e,t),u.set(e,a),t||(i.has(e)||e.removeAttribute(n),i.delete(e)),a||e.removeAttribute(r)})),--s||(o=new WeakMap,o=new WeakMap,i=new WeakMap,a={})}},u=function(e,t,r){void 0===r&&(r="data-aria-hidden");var o=Array.from(Array.isArray(e)?e:[e]),i=t||n(e);return i?(o.push.apply(o,Array.from(i.querySelectorAll("[aria-live]"))),c(o,i,r,"aria-hidden")):function(){return null}},d=function(e,t,r){void 0===r&&(r="data-inert-ed");var o=t||n(e);return o?c(e,o,r,"inert"):function(){return null}},f=function(){return"undefined"!=typeof HTMLElement&&HTMLElement.prototype.hasOwnProperty("inert")},p=function(e,t,r){return void 0===r&&(r="data-suppressed"),(f()?d:u)(e,t,r)}},19511:(e,t,r)=>{"use strict";var n=r(38075)("ArrayBuffer.prototype.byteLength",!0),o=r(84670);e.exports=function(e){return o(e)?n?n(e):e.byteLength:NaN}},87568:(e,t,r)=>{var n=t;n.bignum=r(72344),n.define=r(47363).define,n.base=r(9673),n.constants=r(22153),n.decoders=r(22853),n.encoders=r(24669)},47363:(e,t,r)=>{var n=r(87568),o=r(56698);function i(e,t){this.name=e,this.body=t,this.decoders={},this.encoders={}}t.define=function(e,t){return new i(e,t)},i.prototype._createNamed=function(e){var t;try{t=r(68961).runInThisContext("(function "+this.name+"(entity) {\n this._initNamed(entity);\n})")}catch(e){t=function(e){this._initNamed(e)}}return o(t,e),t.prototype._initNamed=function(t){e.call(this,t)},new t(this)},i.prototype._getDecoder=function(e){return e=e||"der",this.decoders.hasOwnProperty(e)||(this.decoders[e]=this._createNamed(n.decoders[e])),this.decoders[e]},i.prototype.decode=function(e,t,r){return this._getDecoder(t).decode(e,r)},i.prototype._getEncoder=function(e){return e=e||"der",this.encoders.hasOwnProperty(e)||(this.encoders[e]=this._createNamed(n.encoders[e])),this.encoders[e]},i.prototype.encode=function(e,t,r){return this._getEncoder(t).encode(e,r)}},47227:(e,t,r)=>{var n=r(56698),o=r(9673).Reporter,i=r(48287).Buffer;function a(e,t){o.call(this,t),i.isBuffer(e)?(this.base=e,this.offset=0,this.length=e.length):this.error("Input not Buffer")}function s(e,t){if(Array.isArray(e))this.length=0,this.value=e.map((function(e){return e instanceof s||(e=new s(e,t)),this.length+=e.length,e}),this);else if("number"==typeof e){if(!(0<=e&&e<=255))return t.error("non-byte EncoderBuffer value");this.value=e,this.length=1}else if("string"==typeof e)this.value=e,this.length=i.byteLength(e);else{if(!i.isBuffer(e))return t.error("Unsupported type: "+typeof e);this.value=e,this.length=e.length}}n(a,o),t.t=a,a.prototype.save=function(){return{offset:this.offset,reporter:o.prototype.save.call(this)}},a.prototype.restore=function(e){var t=new a(this.base);return t.offset=e.offset,t.length=this.offset,this.offset=e.offset,o.prototype.restore.call(this,e.reporter),t},a.prototype.isEmpty=function(){return this.offset===this.length},a.prototype.readUInt8=function(e){return this.offset+1<=this.length?this.base.readUInt8(this.offset++,!0):this.error(e||"DecoderBuffer overrun")},a.prototype.skip=function(e,t){if(!(this.offset+e<=this.length))return this.error(t||"DecoderBuffer overrun");var r=new a(this.base);return r._reporterState=this._reporterState,r.offset=this.offset,r.length=this.offset+e,this.offset+=e,r},a.prototype.raw=function(e){return this.base.slice(e?e.offset:this.offset,this.length)},t.d=s,s.prototype.join=function(e,t){return e||(e=new i(this.length)),t||(t=0),0===this.length||(Array.isArray(this.value)?this.value.forEach((function(r){r.join(e,t),t+=r.length})):("number"==typeof this.value?e[t]=this.value:"string"==typeof this.value?e.write(this.value,t):i.isBuffer(this.value)&&this.value.copy(e,t),t+=this.length)),e}},9673:(e,t,r)=>{var n=t;n.Reporter=r(89220).a,n.DecoderBuffer=r(47227).t,n.EncoderBuffer=r(47227).d,n.Node=r(90993)},90993:(e,t,r)=>{var n=r(9673).Reporter,o=r(9673).EncoderBuffer,i=r(9673).DecoderBuffer,a=r(43349),s=["seq","seqof","set","setof","objid","bool","gentime","utctime","null_","enum","int","objDesc","bitstr","bmpstr","charstr","genstr","graphstr","ia5str","iso646str","numstr","octstr","printstr","t61str","unistr","utf8str","videostr"],l=["key","obj","use","optional","explicit","implicit","def","choice","any","contains"].concat(s);function c(e,t){var r={};this._baseState=r,r.enc=e,r.parent=t||null,r.children=null,r.tag=null,r.args=null,r.reverseArgs=null,r.choice=null,r.optional=!1,r.any=!1,r.obj=!1,r.use=null,r.useDecoder=null,r.key=null,r.default=null,r.explicit=null,r.implicit=null,r.contains=null,r.parent||(r.children=[],this._wrap())}e.exports=c;var u=["enc","parent","children","tag","args","reverseArgs","choice","optional","any","obj","use","alteredUse","key","default","explicit","implicit","contains"];c.prototype.clone=function(){var e=this._baseState,t={};u.forEach((function(r){t[r]=e[r]}));var r=new this.constructor(t.parent);return r._baseState=t,r},c.prototype._wrap=function(){var e=this._baseState;l.forEach((function(t){this[t]=function(){var r=new this.constructor(this);return e.children.push(r),r[t].apply(r,arguments)}}),this)},c.prototype._init=function(e){var t=this._baseState;a(null===t.parent),e.call(this),t.children=t.children.filter((function(e){return e._baseState.parent===this}),this),a.equal(t.children.length,1,"Root node can have only one child")},c.prototype._useArgs=function(e){var t=this._baseState,r=e.filter((function(e){return e instanceof this.constructor}),this);e=e.filter((function(e){return!(e instanceof this.constructor)}),this),0!==r.length&&(a(null===t.children),t.children=r,r.forEach((function(e){e._baseState.parent=this}),this)),0!==e.length&&(a(null===t.args),t.args=e,t.reverseArgs=e.map((function(e){if("object"!=typeof e||e.constructor!==Object)return e;var t={};return Object.keys(e).forEach((function(r){r==(0|r)&&(r|=0);var n=e[r];t[n]=r})),t})))},["_peekTag","_decodeTag","_use","_decodeStr","_decodeObjid","_decodeTime","_decodeNull","_decodeInt","_decodeBool","_decodeList","_encodeComposite","_encodeStr","_encodeObjid","_encodeTime","_encodeNull","_encodeInt","_encodeBool"].forEach((function(e){c.prototype[e]=function(){var t=this._baseState;throw new Error(e+" not implemented for encoding: "+t.enc)}})),s.forEach((function(e){c.prototype[e]=function(){var t=this._baseState,r=Array.prototype.slice.call(arguments);return a(null===t.tag),t.tag=e,this._useArgs(r),this}})),c.prototype.use=function(e){a(e);var t=this._baseState;return a(null===t.use),t.use=e,this},c.prototype.optional=function(){return this._baseState.optional=!0,this},c.prototype.def=function(e){var t=this._baseState;return a(null===t.default),t.default=e,t.optional=!0,this},c.prototype.explicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.explicit=e,this},c.prototype.implicit=function(e){var t=this._baseState;return a(null===t.explicit&&null===t.implicit),t.implicit=e,this},c.prototype.obj=function(){var e=this._baseState,t=Array.prototype.slice.call(arguments);return e.obj=!0,0!==t.length&&this._useArgs(t),this},c.prototype.key=function(e){var t=this._baseState;return a(null===t.key),t.key=e,this},c.prototype.any=function(){return this._baseState.any=!0,this},c.prototype.choice=function(e){var t=this._baseState;return a(null===t.choice),t.choice=e,this._useArgs(Object.keys(e).map((function(t){return e[t]}))),this},c.prototype.contains=function(e){var t=this._baseState;return a(null===t.use),t.contains=e,this},c.prototype._decode=function(e,t){var r=this._baseState;if(null===r.parent)return e.wrapResult(r.children[0]._decode(e,t));var n,o=r.default,a=!0,s=null;if(null!==r.key&&(s=e.enterKey(r.key)),r.optional){var l=null;if(null!==r.explicit?l=r.explicit:null!==r.implicit?l=r.implicit:null!==r.tag&&(l=r.tag),null!==l||r.any){if(a=this._peekTag(e,l,r.any),e.isError(a))return a}else{var c=e.save();try{null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t),a=!0}catch(e){a=!1}e.restore(c)}}if(r.obj&&a&&(n=e.enterObject()),a){if(null!==r.explicit){var u=this._decodeTag(e,r.explicit);if(e.isError(u))return u;e=u}var d=e.offset;if(null===r.use&&null===r.choice){r.any&&(c=e.save());var f=this._decodeTag(e,null!==r.implicit?r.implicit:r.tag,r.any);if(e.isError(f))return f;r.any?o=e.raw(c):e=f}if(t&&t.track&&null!==r.tag&&t.track(e.path(),d,e.length,"tagged"),t&&t.track&&null!==r.tag&&t.track(e.path(),e.offset,e.length,"content"),r.any||(o=null===r.choice?this._decodeGeneric(r.tag,e,t):this._decodeChoice(e,t)),e.isError(o))return o;if(r.any||null!==r.choice||null===r.children||r.children.forEach((function(r){r._decode(e,t)})),r.contains&&("octstr"===r.tag||"bitstr"===r.tag)){var p=new i(o);o=this._getUse(r.contains,e._reporterState.obj)._decode(p,t)}}return r.obj&&a&&(o=e.leaveObject(n)),null===r.key||null===o&&!0!==a?null!==s&&e.exitKey(s):e.leaveKey(s,r.key,o),o},c.prototype._decodeGeneric=function(e,t,r){var n=this._baseState;return"seq"===e||"set"===e?null:"seqof"===e||"setof"===e?this._decodeList(t,e,n.args[0],r):/str$/.test(e)?this._decodeStr(t,e,r):"objid"===e&&n.args?this._decodeObjid(t,n.args[0],n.args[1],r):"objid"===e?this._decodeObjid(t,null,null,r):"gentime"===e||"utctime"===e?this._decodeTime(t,e,r):"null_"===e?this._decodeNull(t,r):"bool"===e?this._decodeBool(t,r):"objDesc"===e?this._decodeStr(t,e,r):"int"===e||"enum"===e?this._decodeInt(t,n.args&&n.args[0],r):null!==n.use?this._getUse(n.use,t._reporterState.obj)._decode(t,r):t.error("unknown tag: "+e)},c.prototype._getUse=function(e,t){var r=this._baseState;return r.useDecoder=this._use(e,t),a(null===r.useDecoder._baseState.parent),r.useDecoder=r.useDecoder._baseState.children[0],r.implicit!==r.useDecoder._baseState.implicit&&(r.useDecoder=r.useDecoder.clone(),r.useDecoder._baseState.implicit=r.implicit),r.useDecoder},c.prototype._decodeChoice=function(e,t){var r=this._baseState,n=null,o=!1;return Object.keys(r.choice).some((function(i){var a=e.save(),s=r.choice[i];try{var l=s._decode(e,t);if(e.isError(l))return!1;n={type:i,value:l},o=!0}catch(t){return e.restore(a),!1}return!0}),this),o?n:e.error("Choice not matched")},c.prototype._createEncoderBuffer=function(e){return new o(e,this.reporter)},c.prototype._encode=function(e,t,r){var n=this._baseState;if(null===n.default||n.default!==e){var o=this._encodeValue(e,t,r);if(void 0!==o&&!this._skipDefault(o,t,r))return o}},c.prototype._encodeValue=function(e,t,r){var o=this._baseState;if(null===o.parent)return o.children[0]._encode(e,t||new n);var i=null;if(this.reporter=t,o.optional&&void 0===e){if(null===o.default)return;e=o.default}var a=null,s=!1;if(o.any)i=this._createEncoderBuffer(e);else if(o.choice)i=this._encodeChoice(e,t);else if(o.contains)a=this._getUse(o.contains,r)._encode(e,t),s=!0;else if(o.children)a=o.children.map((function(r){if("null_"===r._baseState.tag)return r._encode(null,t,e);if(null===r._baseState.key)return t.error("Child should have a key");var n=t.enterKey(r._baseState.key);if("object"!=typeof e)return t.error("Child expected, but input is not object");var o=r._encode(e[r._baseState.key],t,e);return t.leaveKey(n),o}),this).filter((function(e){return e})),a=this._createEncoderBuffer(a);else if("seqof"===o.tag||"setof"===o.tag){if(!o.args||1!==o.args.length)return t.error("Too many args for : "+o.tag);if(!Array.isArray(e))return t.error("seqof/setof, but data is not Array");var l=this.clone();l._baseState.implicit=null,a=this._createEncoderBuffer(e.map((function(r){var n=this._baseState;return this._getUse(n.args[0],e)._encode(r,t)}),l))}else null!==o.use?i=this._getUse(o.use,r)._encode(e,t):(a=this._encodePrimitive(o.tag,e),s=!0);if(!o.any&&null===o.choice){var c=null!==o.implicit?o.implicit:o.tag,u=null===o.implicit?"universal":"context";null===c?null===o.use&&t.error("Tag could be omitted only for .use()"):null===o.use&&(i=this._encodeComposite(c,s,u,a))}return null!==o.explicit&&(i=this._encodeComposite(o.explicit,!1,"context",i)),i},c.prototype._encodeChoice=function(e,t){var r=this._baseState,n=r.choice[e.type];return n||a(!1,e.type+" not found in "+JSON.stringify(Object.keys(r.choice))),n._encode(e.value,t)},c.prototype._encodePrimitive=function(e,t){var r=this._baseState;if(/str$/.test(e))return this._encodeStr(t,e);if("objid"===e&&r.args)return this._encodeObjid(t,r.reverseArgs[0],r.args[1]);if("objid"===e)return this._encodeObjid(t,null,null);if("gentime"===e||"utctime"===e)return this._encodeTime(t,e);if("null_"===e)return this._encodeNull();if("int"===e||"enum"===e)return this._encodeInt(t,r.args&&r.reverseArgs[0]);if("bool"===e)return this._encodeBool(t);if("objDesc"===e)return this._encodeStr(t,e);throw new Error("Unsupported tag: "+e)},c.prototype._isNumstr=function(e){return/^[0-9 ]*$/.test(e)},c.prototype._isPrintstr=function(e){return/^[A-Za-z0-9 '\(\)\+,\-\.\/:=\?]*$/.test(e)}},89220:(e,t,r)=>{var n=r(56698);function o(e){this._reporterState={obj:null,path:[],options:e||{},errors:[]}}function i(e,t){this.path=e,this.rethrow(t)}t.a=o,o.prototype.isError=function(e){return e instanceof i},o.prototype.save=function(){var e=this._reporterState;return{obj:e.obj,pathLen:e.path.length}},o.prototype.restore=function(e){var t=this._reporterState;t.obj=e.obj,t.path=t.path.slice(0,e.pathLen)},o.prototype.enterKey=function(e){return this._reporterState.path.push(e)},o.prototype.exitKey=function(e){var t=this._reporterState;t.path=t.path.slice(0,e-1)},o.prototype.leaveKey=function(e,t,r){var n=this._reporterState;this.exitKey(e),null!==n.obj&&(n.obj[t]=r)},o.prototype.path=function(){return this._reporterState.path.join("/")},o.prototype.enterObject=function(){var e=this._reporterState,t=e.obj;return e.obj={},t},o.prototype.leaveObject=function(e){var t=this._reporterState,r=t.obj;return t.obj=e,r},o.prototype.error=function(e){var t,r=this._reporterState,n=e instanceof i;if(t=n?e:new i(r.path.map((function(e){return"["+JSON.stringify(e)+"]"})).join(""),e.message||e,e.stack),!r.options.partial)throw t;return n||r.errors.push(t),t},o.prototype.wrapResult=function(e){var t=this._reporterState;return t.options.partial?{result:this.isError(e)?null:e,errors:t.errors}:e},n(i,Error),i.prototype.rethrow=function(e){if(this.message=e+" at: "+(this.path||"(shallow)"),Error.captureStackTrace&&Error.captureStackTrace(this,i),!this.stack)try{throw new Error(this.message)}catch(e){this.stack=e.stack}return this}},74598:(e,t,r)=>{var n=r(22153);t.tagClass={0:"universal",1:"application",2:"context",3:"private"},t.tagClassByName=n._reverse(t.tagClass),t.tag={0:"end",1:"bool",2:"int",3:"bitstr",4:"octstr",5:"null_",6:"objid",7:"objDesc",8:"external",9:"real",10:"enum",11:"embed",12:"utf8str",13:"relativeOid",16:"seq",17:"set",18:"numstr",19:"printstr",20:"t61str",21:"videostr",22:"ia5str",23:"utctime",24:"gentime",25:"graphstr",26:"iso646str",27:"genstr",28:"unistr",29:"charstr",30:"bmpstr"},t.tagByName=n._reverse(t.tag)},22153:(e,t,r)=>{var n=t;n._reverse=function(e){var t={};return Object.keys(e).forEach((function(r){(0|r)==r&&(r|=0);var n=e[r];t[n]=r})),t},n.der=r(74598)},62010:(e,t,r)=>{var n=r(56698),o=r(87568),i=o.base,a=o.bignum,s=o.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){i.Node.call(this,"der",e)}function u(e,t){var r=e.readUInt8(t);if(e.isError(r))return r;var n=s.tagClass[r>>6],o=!(32&r);if(31&~r)r&=31;else{var i=r;for(r=0;!(128&~i);){if(i=e.readUInt8(t),e.isError(i))return i;r<<=7,r|=127&i}}return{cls:n,primitive:o,tag:r,tagStr:s.tag[r]}}function d(e,t,r){var n=e.readUInt8(r);if(e.isError(n))return n;if(!t&&128===n)return null;if(!(128&n))return n;var o=127&n;if(o>4)return e.error("length octect is too long");n=0;for(var i=0;i{var n=t;n.der=r(62010),n.pem=r(58903)},58903:(e,t,r)=>{var n=r(56698),o=r(48287).Buffer,i=r(62010);function a(e){i.call(this,e),this.enc="pem"}n(a,i),e.exports=a,a.prototype.decode=function(e,t){for(var r=e.toString().split(/[\r\n]+/g),n=t.label.toUpperCase(),a=/^-----(BEGIN|END) ([^-]+)-----$/,s=-1,l=-1,c=0;c{var n=r(56698),o=r(48287).Buffer,i=r(87568),a=i.base,s=i.constants.der;function l(e){this.enc="der",this.name=e.name,this.entity=e,this.tree=new c,this.tree._init(e.body)}function c(e){a.Node.call(this,"der",e)}function u(e){return e<10?"0"+e:e}e.exports=l,l.prototype.encode=function(e,t){return this.tree._encode(e,t).join()},n(c,a.Node),c.prototype._encodeComposite=function(e,t,r,n){var i,a=function(e,t,r,n){var o;if("seqof"===e?e="seq":"setof"===e&&(e="set"),s.tagByName.hasOwnProperty(e))o=s.tagByName[e];else{if("number"!=typeof e||(0|e)!==e)return n.error("Unknown tag: "+e);o=e}return o>=31?n.error("Multi-octet tag encoding unsupported"):(t||(o|=32),o|=s.tagClassByName[r||"universal"]<<6)}(e,t,r,this.reporter);if(n.length<128)return(i=new o(2))[0]=a,i[1]=n.length,this._createEncoderBuffer([i,n]);for(var l=1,c=n.length;c>=256;c>>=8)l++;(i=new o(2+l))[0]=a,i[1]=128|l,c=1+l;for(var u=n.length;u>0;c--,u>>=8)i[c]=255&u;return this._createEncoderBuffer([i,n])},c.prototype._encodeStr=function(e,t){if("bitstr"===t)return this._createEncoderBuffer([0|e.unused,e.data]);if("bmpstr"===t){for(var r=new o(2*e.length),n=0;n=40)return this.reporter.error("Second objid identifier OOB");e.splice(0,2,40*e[0]+e[1])}var i=0;for(n=0;n=128;a>>=7)i++}var s=new o(i),l=s.length-1;for(n=e.length-1;n>=0;n--)for(a=e[n],s[l--]=127&a;(a>>=7)>0;)s[l--]=128|127&a;return this._createEncoderBuffer(s)},c.prototype._encodeTime=function(e,t){var r,n=new Date(e);return"gentime"===t?r=[u(n.getFullYear()),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):"utctime"===t?r=[u(n.getFullYear()%100),u(n.getUTCMonth()+1),u(n.getUTCDate()),u(n.getUTCHours()),u(n.getUTCMinutes()),u(n.getUTCSeconds()),"Z"].join(""):this.reporter.error("Encoding "+t+" time is not supported yet"),this._encodeStr(r,"octstr")},c.prototype._encodeNull=function(){return this._createEncoderBuffer("")},c.prototype._encodeInt=function(e,t){if("string"==typeof e){if(!t)return this.reporter.error("String int or enum given, but no values map");if(!t.hasOwnProperty(e))return this.reporter.error("Values map doesn't contain: "+JSON.stringify(e));e=t[e]}if("number"!=typeof e&&!o.isBuffer(e)){var r=e.toArray();!e.sign&&128&r[0]&&r.unshift(0),e=new o(r)}if(o.isBuffer(e)){var n=e.length;0===e.length&&n++;var i=new o(n);return e.copy(i),0===e.length&&(i[0]=0),this._createEncoderBuffer(i)}if(e<128)return this._createEncoderBuffer(e);if(e<256)return this._createEncoderBuffer([0,e]);n=1;for(var a=e;a>=256;a>>=8)n++;for(a=(i=new Array(n)).length-1;a>=0;a--)i[a]=255&e,e>>=8;return 128&i[0]&&i.unshift(0),this._createEncoderBuffer(new o(i))},c.prototype._encodeBool=function(e){return this._createEncoderBuffer(e?255:0)},c.prototype._use=function(e,t){return"function"==typeof e&&(e=e(t)),e._getEncoder("der").tree},c.prototype._skipDefault=function(e,t,r){var n,o=this._baseState;if(null===o.default)return!1;var i=e.join();if(void 0===o.defaultBuffer&&(o.defaultBuffer=this._encodeValue(o.default,t,r).join()),i.length!==o.defaultBuffer.length)return!1;for(n=0;n{var n=t;n.der=r(70082),n.pem=r(90735)},90735:(e,t,r)=>{var n=r(56698),o=r(70082);function i(e){o.call(this,e),this.enc="pem"}n(i,o),e.exports=i,i.prototype.encode=function(e,t){for(var r=o.prototype.encode.call(this,e).toString("base64"),n=["-----BEGIN "+t.label+"-----"],i=0;i=65&&r<=70?r-55:r>=97&&r<=102?r-87:r-48&15}function l(e,t,r){var n=s(e,r);return r-1>=t&&(n|=s(e,r-1)<<4),n}function c(e,t,r,n){for(var o=0,i=Math.min(e.length,r),a=t;a=49?s-49+10:s>=17?s-17+10:s}return o}i.isBN=function(e){return e instanceof i||null!==e&&"object"==typeof e&&e.constructor.wordSize===i.wordSize&&Array.isArray(e.words)},i.max=function(e,t){return e.cmp(t)>0?e:t},i.min=function(e,t){return e.cmp(t)<0?e:t},i.prototype._init=function(e,t,r){if("number"==typeof e)return this._initNumber(e,t,r);if("object"==typeof e)return this._initArray(e,t,r);"hex"===t&&(t=16),n(t===(0|t)&&t>=2&&t<=36);var o=0;"-"===(e=e.toString().replace(/\s+/g,""))[0]&&(o++,this.negative=1),o=0;o-=3)a=e[o]|e[o-1]<<8|e[o-2]<<16,this.words[i]|=a<>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);else if("le"===r)for(o=0,i=0;o>>26-s&67108863,(s+=24)>=26&&(s-=26,i++);return this.strip()},i.prototype._parseHex=function(e,t,r){this.length=Math.ceil((e.length-t)/6),this.words=new Array(this.length);for(var n=0;n=t;n-=2)o=l(e,t,n)<=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;else for(n=(e.length-t)%2==0?t+1:t;n=18?(i-=18,a+=1,this.words[a]|=o>>>26):i+=8;this.strip()},i.prototype._parseBase=function(e,t,r){this.words=[0],this.length=1;for(var n=0,o=1;o<=67108863;o*=t)n++;n--,o=o/t|0;for(var i=e.length-r,a=i%n,s=Math.min(i,i-a)+r,l=0,u=r;u1&&0===this.words[this.length-1];)this.length--;return this._normSign()},i.prototype._normSign=function(){return 1===this.length&&0===this.words[0]&&(this.negative=0),this},i.prototype.inspect=function(){return(this.red?""};var u=["","0","00","000","0000","00000","000000","0000000","00000000","000000000","0000000000","00000000000","000000000000","0000000000000","00000000000000","000000000000000","0000000000000000","00000000000000000","000000000000000000","0000000000000000000","00000000000000000000","000000000000000000000","0000000000000000000000","00000000000000000000000","000000000000000000000000","0000000000000000000000000"],d=[0,0,25,16,12,11,10,9,8,8,7,7,7,7,6,6,6,6,6,6,6,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5,5],f=[0,0,33554432,43046721,16777216,48828125,60466176,40353607,16777216,43046721,1e7,19487171,35831808,62748517,7529536,11390625,16777216,24137569,34012224,47045881,64e6,4084101,5153632,6436343,7962624,9765625,11881376,14348907,17210368,20511149,243e5,28629151,33554432,39135393,45435424,52521875,60466176];function p(e,t,r){r.negative=t.negative^e.negative;var n=e.length+t.length|0;r.length=n,n=n-1|0;var o=0|e.words[0],i=0|t.words[0],a=o*i,s=67108863&a,l=a/67108864|0;r.words[0]=s;for(var c=1;c>>26,d=67108863&l,f=Math.min(c,t.length-1),p=Math.max(0,c-e.length+1);p<=f;p++){var h=c-p|0;u+=(a=(o=0|e.words[h])*(i=0|t.words[p])+d)/67108864|0,d=67108863&a}r.words[c]=0|d,l=0|u}return 0!==l?r.words[c]=0|l:r.length--,r.strip()}i.prototype.toString=function(e,t){var r;if(t=0|t||1,16===(e=e||10)||"hex"===e){r="";for(var o=0,i=0,a=0;a>>24-o&16777215)||a!==this.length-1?u[6-l.length]+l+r:l+r,(o+=2)>=26&&(o-=26,a--)}for(0!==i&&(r=i.toString(16)+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}if(e===(0|e)&&e>=2&&e<=36){var c=d[e],p=f[e];r="";var h=this.clone();for(h.negative=0;!h.isZero();){var m=h.modn(p).toString(e);r=(h=h.idivn(p)).isZero()?m+r:u[c-m.length]+m+r}for(this.isZero()&&(r="0"+r);r.length%t!=0;)r="0"+r;return 0!==this.negative&&(r="-"+r),r}n(!1,"Base should be between 2 and 36")},i.prototype.toNumber=function(){var e=this.words[0];return 2===this.length?e+=67108864*this.words[1]:3===this.length&&1===this.words[2]?e+=4503599627370496+67108864*this.words[1]:this.length>2&&n(!1,"Number can only safely store up to 53 bits"),0!==this.negative?-e:e},i.prototype.toJSON=function(){return this.toString(16)},i.prototype.toBuffer=function(e,t){return n(void 0!==a),this.toArrayLike(a,e,t)},i.prototype.toArray=function(e,t){return this.toArrayLike(Array,e,t)},i.prototype.toArrayLike=function(e,t,r){var o=this.byteLength(),i=r||Math.max(1,o);n(o<=i,"byte array longer than desired length"),n(i>0,"Requested array length <= 0"),this.strip();var a,s,l="le"===t,c=new e(i),u=this.clone();if(l){for(s=0;!u.isZero();s++)a=u.andln(255),u.iushrn(8),c[s]=a;for(;s=4096&&(r+=13,t>>>=13),t>=64&&(r+=7,t>>>=7),t>=8&&(r+=4,t>>>=4),t>=2&&(r+=2,t>>>=2),r+t},i.prototype._zeroBits=function(e){if(0===e)return 26;var t=e,r=0;return 8191&t||(r+=13,t>>>=13),127&t||(r+=7,t>>>=7),15&t||(r+=4,t>>>=4),3&t||(r+=2,t>>>=2),1&t||r++,r},i.prototype.bitLength=function(){var e=this.words[this.length-1],t=this._countBits(e);return 26*(this.length-1)+t},i.prototype.zeroBits=function(){if(this.isZero())return 0;for(var e=0,t=0;te.length?this.clone().ior(e):e.clone().ior(this)},i.prototype.uor=function(e){return this.length>e.length?this.clone().iuor(e):e.clone().iuor(this)},i.prototype.iuand=function(e){var t;t=this.length>e.length?e:this;for(var r=0;re.length?this.clone().iand(e):e.clone().iand(this)},i.prototype.uand=function(e){return this.length>e.length?this.clone().iuand(e):e.clone().iuand(this)},i.prototype.iuxor=function(e){var t,r;this.length>e.length?(t=this,r=e):(t=e,r=this);for(var n=0;ne.length?this.clone().ixor(e):e.clone().ixor(this)},i.prototype.uxor=function(e){return this.length>e.length?this.clone().iuxor(e):e.clone().iuxor(this)},i.prototype.inotn=function(e){n("number"==typeof e&&e>=0);var t=0|Math.ceil(e/26),r=e%26;this._expand(t),r>0&&t--;for(var o=0;o0&&(this.words[o]=~this.words[o]&67108863>>26-r),this.strip()},i.prototype.notn=function(e){return this.clone().inotn(e)},i.prototype.setn=function(e,t){n("number"==typeof e&&e>=0);var r=e/26|0,o=e%26;return this._expand(r+1),this.words[r]=t?this.words[r]|1<e.length?(r=this,n=e):(r=e,n=this);for(var o=0,i=0;i>>26;for(;0!==o&&i>>26;if(this.length=r.length,0!==o)this.words[this.length]=o,this.length++;else if(r!==this)for(;ie.length?this.clone().iadd(e):e.clone().iadd(this)},i.prototype.isub=function(e){if(0!==e.negative){e.negative=0;var t=this.iadd(e);return e.negative=1,t._normSign()}if(0!==this.negative)return this.negative=0,this.iadd(e),this.negative=1,this._normSign();var r,n,o=this.cmp(e);if(0===o)return this.negative=0,this.length=1,this.words[0]=0,this;o>0?(r=this,n=e):(r=e,n=this);for(var i=0,a=0;a>26,this.words[a]=67108863&t;for(;0!==i&&a>26,this.words[a]=67108863&t;if(0===i&&a>>13,p=0|a[1],h=8191&p,m=p>>>13,g=0|a[2],b=8191&g,v=g>>>13,y=0|a[3],w=8191&y,E=y>>>13,_=0|a[4],S=8191&_,x=_>>>13,A=0|a[5],T=8191&A,C=A>>>13,k=0|a[6],O=8191&k,R=k>>>13,N=0|a[7],I=8191&N,M=N>>>13,P=0|a[8],D=8191&P,L=P>>>13,F=0|a[9],B=8191&F,U=F>>>13,j=0|s[0],z=8191&j,H=j>>>13,G=0|s[1],W=8191&G,q=G>>>13,V=0|s[2],Y=8191&V,K=V>>>13,X=0|s[3],Z=8191&X,Q=X>>>13,J=0|s[4],$=8191&J,ee=J>>>13,te=0|s[5],re=8191&te,ne=te>>>13,oe=0|s[6],ie=8191&oe,ae=oe>>>13,se=0|s[7],le=8191&se,ce=se>>>13,ue=0|s[8],de=8191&ue,fe=ue>>>13,pe=0|s[9],he=8191&pe,me=pe>>>13;r.negative=e.negative^t.negative,r.length=19;var ge=(c+(n=Math.imul(d,z))|0)+((8191&(o=(o=Math.imul(d,H))+Math.imul(f,z)|0))<<13)|0;c=((i=Math.imul(f,H))+(o>>>13)|0)+(ge>>>26)|0,ge&=67108863,n=Math.imul(h,z),o=(o=Math.imul(h,H))+Math.imul(m,z)|0,i=Math.imul(m,H);var be=(c+(n=n+Math.imul(d,W)|0)|0)+((8191&(o=(o=o+Math.imul(d,q)|0)+Math.imul(f,W)|0))<<13)|0;c=((i=i+Math.imul(f,q)|0)+(o>>>13)|0)+(be>>>26)|0,be&=67108863,n=Math.imul(b,z),o=(o=Math.imul(b,H))+Math.imul(v,z)|0,i=Math.imul(v,H),n=n+Math.imul(h,W)|0,o=(o=o+Math.imul(h,q)|0)+Math.imul(m,W)|0,i=i+Math.imul(m,q)|0;var ve=(c+(n=n+Math.imul(d,Y)|0)|0)+((8191&(o=(o=o+Math.imul(d,K)|0)+Math.imul(f,Y)|0))<<13)|0;c=((i=i+Math.imul(f,K)|0)+(o>>>13)|0)+(ve>>>26)|0,ve&=67108863,n=Math.imul(w,z),o=(o=Math.imul(w,H))+Math.imul(E,z)|0,i=Math.imul(E,H),n=n+Math.imul(b,W)|0,o=(o=o+Math.imul(b,q)|0)+Math.imul(v,W)|0,i=i+Math.imul(v,q)|0,n=n+Math.imul(h,Y)|0,o=(o=o+Math.imul(h,K)|0)+Math.imul(m,Y)|0,i=i+Math.imul(m,K)|0;var ye=(c+(n=n+Math.imul(d,Z)|0)|0)+((8191&(o=(o=o+Math.imul(d,Q)|0)+Math.imul(f,Z)|0))<<13)|0;c=((i=i+Math.imul(f,Q)|0)+(o>>>13)|0)+(ye>>>26)|0,ye&=67108863,n=Math.imul(S,z),o=(o=Math.imul(S,H))+Math.imul(x,z)|0,i=Math.imul(x,H),n=n+Math.imul(w,W)|0,o=(o=o+Math.imul(w,q)|0)+Math.imul(E,W)|0,i=i+Math.imul(E,q)|0,n=n+Math.imul(b,Y)|0,o=(o=o+Math.imul(b,K)|0)+Math.imul(v,Y)|0,i=i+Math.imul(v,K)|0,n=n+Math.imul(h,Z)|0,o=(o=o+Math.imul(h,Q)|0)+Math.imul(m,Z)|0,i=i+Math.imul(m,Q)|0;var we=(c+(n=n+Math.imul(d,$)|0)|0)+((8191&(o=(o=o+Math.imul(d,ee)|0)+Math.imul(f,$)|0))<<13)|0;c=((i=i+Math.imul(f,ee)|0)+(o>>>13)|0)+(we>>>26)|0,we&=67108863,n=Math.imul(T,z),o=(o=Math.imul(T,H))+Math.imul(C,z)|0,i=Math.imul(C,H),n=n+Math.imul(S,W)|0,o=(o=o+Math.imul(S,q)|0)+Math.imul(x,W)|0,i=i+Math.imul(x,q)|0,n=n+Math.imul(w,Y)|0,o=(o=o+Math.imul(w,K)|0)+Math.imul(E,Y)|0,i=i+Math.imul(E,K)|0,n=n+Math.imul(b,Z)|0,o=(o=o+Math.imul(b,Q)|0)+Math.imul(v,Z)|0,i=i+Math.imul(v,Q)|0,n=n+Math.imul(h,$)|0,o=(o=o+Math.imul(h,ee)|0)+Math.imul(m,$)|0,i=i+Math.imul(m,ee)|0;var Ee=(c+(n=n+Math.imul(d,re)|0)|0)+((8191&(o=(o=o+Math.imul(d,ne)|0)+Math.imul(f,re)|0))<<13)|0;c=((i=i+Math.imul(f,ne)|0)+(o>>>13)|0)+(Ee>>>26)|0,Ee&=67108863,n=Math.imul(O,z),o=(o=Math.imul(O,H))+Math.imul(R,z)|0,i=Math.imul(R,H),n=n+Math.imul(T,W)|0,o=(o=o+Math.imul(T,q)|0)+Math.imul(C,W)|0,i=i+Math.imul(C,q)|0,n=n+Math.imul(S,Y)|0,o=(o=o+Math.imul(S,K)|0)+Math.imul(x,Y)|0,i=i+Math.imul(x,K)|0,n=n+Math.imul(w,Z)|0,o=(o=o+Math.imul(w,Q)|0)+Math.imul(E,Z)|0,i=i+Math.imul(E,Q)|0,n=n+Math.imul(b,$)|0,o=(o=o+Math.imul(b,ee)|0)+Math.imul(v,$)|0,i=i+Math.imul(v,ee)|0,n=n+Math.imul(h,re)|0,o=(o=o+Math.imul(h,ne)|0)+Math.imul(m,re)|0,i=i+Math.imul(m,ne)|0;var _e=(c+(n=n+Math.imul(d,ie)|0)|0)+((8191&(o=(o=o+Math.imul(d,ae)|0)+Math.imul(f,ie)|0))<<13)|0;c=((i=i+Math.imul(f,ae)|0)+(o>>>13)|0)+(_e>>>26)|0,_e&=67108863,n=Math.imul(I,z),o=(o=Math.imul(I,H))+Math.imul(M,z)|0,i=Math.imul(M,H),n=n+Math.imul(O,W)|0,o=(o=o+Math.imul(O,q)|0)+Math.imul(R,W)|0,i=i+Math.imul(R,q)|0,n=n+Math.imul(T,Y)|0,o=(o=o+Math.imul(T,K)|0)+Math.imul(C,Y)|0,i=i+Math.imul(C,K)|0,n=n+Math.imul(S,Z)|0,o=(o=o+Math.imul(S,Q)|0)+Math.imul(x,Z)|0,i=i+Math.imul(x,Q)|0,n=n+Math.imul(w,$)|0,o=(o=o+Math.imul(w,ee)|0)+Math.imul(E,$)|0,i=i+Math.imul(E,ee)|0,n=n+Math.imul(b,re)|0,o=(o=o+Math.imul(b,ne)|0)+Math.imul(v,re)|0,i=i+Math.imul(v,ne)|0,n=n+Math.imul(h,ie)|0,o=(o=o+Math.imul(h,ae)|0)+Math.imul(m,ie)|0,i=i+Math.imul(m,ae)|0;var Se=(c+(n=n+Math.imul(d,le)|0)|0)+((8191&(o=(o=o+Math.imul(d,ce)|0)+Math.imul(f,le)|0))<<13)|0;c=((i=i+Math.imul(f,ce)|0)+(o>>>13)|0)+(Se>>>26)|0,Se&=67108863,n=Math.imul(D,z),o=(o=Math.imul(D,H))+Math.imul(L,z)|0,i=Math.imul(L,H),n=n+Math.imul(I,W)|0,o=(o=o+Math.imul(I,q)|0)+Math.imul(M,W)|0,i=i+Math.imul(M,q)|0,n=n+Math.imul(O,Y)|0,o=(o=o+Math.imul(O,K)|0)+Math.imul(R,Y)|0,i=i+Math.imul(R,K)|0,n=n+Math.imul(T,Z)|0,o=(o=o+Math.imul(T,Q)|0)+Math.imul(C,Z)|0,i=i+Math.imul(C,Q)|0,n=n+Math.imul(S,$)|0,o=(o=o+Math.imul(S,ee)|0)+Math.imul(x,$)|0,i=i+Math.imul(x,ee)|0,n=n+Math.imul(w,re)|0,o=(o=o+Math.imul(w,ne)|0)+Math.imul(E,re)|0,i=i+Math.imul(E,ne)|0,n=n+Math.imul(b,ie)|0,o=(o=o+Math.imul(b,ae)|0)+Math.imul(v,ie)|0,i=i+Math.imul(v,ae)|0,n=n+Math.imul(h,le)|0,o=(o=o+Math.imul(h,ce)|0)+Math.imul(m,le)|0,i=i+Math.imul(m,ce)|0;var xe=(c+(n=n+Math.imul(d,de)|0)|0)+((8191&(o=(o=o+Math.imul(d,fe)|0)+Math.imul(f,de)|0))<<13)|0;c=((i=i+Math.imul(f,fe)|0)+(o>>>13)|0)+(xe>>>26)|0,xe&=67108863,n=Math.imul(B,z),o=(o=Math.imul(B,H))+Math.imul(U,z)|0,i=Math.imul(U,H),n=n+Math.imul(D,W)|0,o=(o=o+Math.imul(D,q)|0)+Math.imul(L,W)|0,i=i+Math.imul(L,q)|0,n=n+Math.imul(I,Y)|0,o=(o=o+Math.imul(I,K)|0)+Math.imul(M,Y)|0,i=i+Math.imul(M,K)|0,n=n+Math.imul(O,Z)|0,o=(o=o+Math.imul(O,Q)|0)+Math.imul(R,Z)|0,i=i+Math.imul(R,Q)|0,n=n+Math.imul(T,$)|0,o=(o=o+Math.imul(T,ee)|0)+Math.imul(C,$)|0,i=i+Math.imul(C,ee)|0,n=n+Math.imul(S,re)|0,o=(o=o+Math.imul(S,ne)|0)+Math.imul(x,re)|0,i=i+Math.imul(x,ne)|0,n=n+Math.imul(w,ie)|0,o=(o=o+Math.imul(w,ae)|0)+Math.imul(E,ie)|0,i=i+Math.imul(E,ae)|0,n=n+Math.imul(b,le)|0,o=(o=o+Math.imul(b,ce)|0)+Math.imul(v,le)|0,i=i+Math.imul(v,ce)|0,n=n+Math.imul(h,de)|0,o=(o=o+Math.imul(h,fe)|0)+Math.imul(m,de)|0,i=i+Math.imul(m,fe)|0;var Ae=(c+(n=n+Math.imul(d,he)|0)|0)+((8191&(o=(o=o+Math.imul(d,me)|0)+Math.imul(f,he)|0))<<13)|0;c=((i=i+Math.imul(f,me)|0)+(o>>>13)|0)+(Ae>>>26)|0,Ae&=67108863,n=Math.imul(B,W),o=(o=Math.imul(B,q))+Math.imul(U,W)|0,i=Math.imul(U,q),n=n+Math.imul(D,Y)|0,o=(o=o+Math.imul(D,K)|0)+Math.imul(L,Y)|0,i=i+Math.imul(L,K)|0,n=n+Math.imul(I,Z)|0,o=(o=o+Math.imul(I,Q)|0)+Math.imul(M,Z)|0,i=i+Math.imul(M,Q)|0,n=n+Math.imul(O,$)|0,o=(o=o+Math.imul(O,ee)|0)+Math.imul(R,$)|0,i=i+Math.imul(R,ee)|0,n=n+Math.imul(T,re)|0,o=(o=o+Math.imul(T,ne)|0)+Math.imul(C,re)|0,i=i+Math.imul(C,ne)|0,n=n+Math.imul(S,ie)|0,o=(o=o+Math.imul(S,ae)|0)+Math.imul(x,ie)|0,i=i+Math.imul(x,ae)|0,n=n+Math.imul(w,le)|0,o=(o=o+Math.imul(w,ce)|0)+Math.imul(E,le)|0,i=i+Math.imul(E,ce)|0,n=n+Math.imul(b,de)|0,o=(o=o+Math.imul(b,fe)|0)+Math.imul(v,de)|0,i=i+Math.imul(v,fe)|0;var Te=(c+(n=n+Math.imul(h,he)|0)|0)+((8191&(o=(o=o+Math.imul(h,me)|0)+Math.imul(m,he)|0))<<13)|0;c=((i=i+Math.imul(m,me)|0)+(o>>>13)|0)+(Te>>>26)|0,Te&=67108863,n=Math.imul(B,Y),o=(o=Math.imul(B,K))+Math.imul(U,Y)|0,i=Math.imul(U,K),n=n+Math.imul(D,Z)|0,o=(o=o+Math.imul(D,Q)|0)+Math.imul(L,Z)|0,i=i+Math.imul(L,Q)|0,n=n+Math.imul(I,$)|0,o=(o=o+Math.imul(I,ee)|0)+Math.imul(M,$)|0,i=i+Math.imul(M,ee)|0,n=n+Math.imul(O,re)|0,o=(o=o+Math.imul(O,ne)|0)+Math.imul(R,re)|0,i=i+Math.imul(R,ne)|0,n=n+Math.imul(T,ie)|0,o=(o=o+Math.imul(T,ae)|0)+Math.imul(C,ie)|0,i=i+Math.imul(C,ae)|0,n=n+Math.imul(S,le)|0,o=(o=o+Math.imul(S,ce)|0)+Math.imul(x,le)|0,i=i+Math.imul(x,ce)|0,n=n+Math.imul(w,de)|0,o=(o=o+Math.imul(w,fe)|0)+Math.imul(E,de)|0,i=i+Math.imul(E,fe)|0;var Ce=(c+(n=n+Math.imul(b,he)|0)|0)+((8191&(o=(o=o+Math.imul(b,me)|0)+Math.imul(v,he)|0))<<13)|0;c=((i=i+Math.imul(v,me)|0)+(o>>>13)|0)+(Ce>>>26)|0,Ce&=67108863,n=Math.imul(B,Z),o=(o=Math.imul(B,Q))+Math.imul(U,Z)|0,i=Math.imul(U,Q),n=n+Math.imul(D,$)|0,o=(o=o+Math.imul(D,ee)|0)+Math.imul(L,$)|0,i=i+Math.imul(L,ee)|0,n=n+Math.imul(I,re)|0,o=(o=o+Math.imul(I,ne)|0)+Math.imul(M,re)|0,i=i+Math.imul(M,ne)|0,n=n+Math.imul(O,ie)|0,o=(o=o+Math.imul(O,ae)|0)+Math.imul(R,ie)|0,i=i+Math.imul(R,ae)|0,n=n+Math.imul(T,le)|0,o=(o=o+Math.imul(T,ce)|0)+Math.imul(C,le)|0,i=i+Math.imul(C,ce)|0,n=n+Math.imul(S,de)|0,o=(o=o+Math.imul(S,fe)|0)+Math.imul(x,de)|0,i=i+Math.imul(x,fe)|0;var ke=(c+(n=n+Math.imul(w,he)|0)|0)+((8191&(o=(o=o+Math.imul(w,me)|0)+Math.imul(E,he)|0))<<13)|0;c=((i=i+Math.imul(E,me)|0)+(o>>>13)|0)+(ke>>>26)|0,ke&=67108863,n=Math.imul(B,$),o=(o=Math.imul(B,ee))+Math.imul(U,$)|0,i=Math.imul(U,ee),n=n+Math.imul(D,re)|0,o=(o=o+Math.imul(D,ne)|0)+Math.imul(L,re)|0,i=i+Math.imul(L,ne)|0,n=n+Math.imul(I,ie)|0,o=(o=o+Math.imul(I,ae)|0)+Math.imul(M,ie)|0,i=i+Math.imul(M,ae)|0,n=n+Math.imul(O,le)|0,o=(o=o+Math.imul(O,ce)|0)+Math.imul(R,le)|0,i=i+Math.imul(R,ce)|0,n=n+Math.imul(T,de)|0,o=(o=o+Math.imul(T,fe)|0)+Math.imul(C,de)|0,i=i+Math.imul(C,fe)|0;var Oe=(c+(n=n+Math.imul(S,he)|0)|0)+((8191&(o=(o=o+Math.imul(S,me)|0)+Math.imul(x,he)|0))<<13)|0;c=((i=i+Math.imul(x,me)|0)+(o>>>13)|0)+(Oe>>>26)|0,Oe&=67108863,n=Math.imul(B,re),o=(o=Math.imul(B,ne))+Math.imul(U,re)|0,i=Math.imul(U,ne),n=n+Math.imul(D,ie)|0,o=(o=o+Math.imul(D,ae)|0)+Math.imul(L,ie)|0,i=i+Math.imul(L,ae)|0,n=n+Math.imul(I,le)|0,o=(o=o+Math.imul(I,ce)|0)+Math.imul(M,le)|0,i=i+Math.imul(M,ce)|0,n=n+Math.imul(O,de)|0,o=(o=o+Math.imul(O,fe)|0)+Math.imul(R,de)|0,i=i+Math.imul(R,fe)|0;var Re=(c+(n=n+Math.imul(T,he)|0)|0)+((8191&(o=(o=o+Math.imul(T,me)|0)+Math.imul(C,he)|0))<<13)|0;c=((i=i+Math.imul(C,me)|0)+(o>>>13)|0)+(Re>>>26)|0,Re&=67108863,n=Math.imul(B,ie),o=(o=Math.imul(B,ae))+Math.imul(U,ie)|0,i=Math.imul(U,ae),n=n+Math.imul(D,le)|0,o=(o=o+Math.imul(D,ce)|0)+Math.imul(L,le)|0,i=i+Math.imul(L,ce)|0,n=n+Math.imul(I,de)|0,o=(o=o+Math.imul(I,fe)|0)+Math.imul(M,de)|0,i=i+Math.imul(M,fe)|0;var Ne=(c+(n=n+Math.imul(O,he)|0)|0)+((8191&(o=(o=o+Math.imul(O,me)|0)+Math.imul(R,he)|0))<<13)|0;c=((i=i+Math.imul(R,me)|0)+(o>>>13)|0)+(Ne>>>26)|0,Ne&=67108863,n=Math.imul(B,le),o=(o=Math.imul(B,ce))+Math.imul(U,le)|0,i=Math.imul(U,ce),n=n+Math.imul(D,de)|0,o=(o=o+Math.imul(D,fe)|0)+Math.imul(L,de)|0,i=i+Math.imul(L,fe)|0;var Ie=(c+(n=n+Math.imul(I,he)|0)|0)+((8191&(o=(o=o+Math.imul(I,me)|0)+Math.imul(M,he)|0))<<13)|0;c=((i=i+Math.imul(M,me)|0)+(o>>>13)|0)+(Ie>>>26)|0,Ie&=67108863,n=Math.imul(B,de),o=(o=Math.imul(B,fe))+Math.imul(U,de)|0,i=Math.imul(U,fe);var Me=(c+(n=n+Math.imul(D,he)|0)|0)+((8191&(o=(o=o+Math.imul(D,me)|0)+Math.imul(L,he)|0))<<13)|0;c=((i=i+Math.imul(L,me)|0)+(o>>>13)|0)+(Me>>>26)|0,Me&=67108863;var Pe=(c+(n=Math.imul(B,he))|0)+((8191&(o=(o=Math.imul(B,me))+Math.imul(U,he)|0))<<13)|0;return c=((i=Math.imul(U,me))+(o>>>13)|0)+(Pe>>>26)|0,Pe&=67108863,l[0]=ge,l[1]=be,l[2]=ve,l[3]=ye,l[4]=we,l[5]=Ee,l[6]=_e,l[7]=Se,l[8]=xe,l[9]=Ae,l[10]=Te,l[11]=Ce,l[12]=ke,l[13]=Oe,l[14]=Re,l[15]=Ne,l[16]=Ie,l[17]=Me,l[18]=Pe,0!==c&&(l[19]=c,r.length++),r};function m(e,t,r){return(new g).mulp(e,t,r)}function g(e,t){this.x=e,this.y=t}Math.imul||(h=p),i.prototype.mulTo=function(e,t){var r,n=this.length+e.length;return r=10===this.length&&10===e.length?h(this,e,t):n<63?p(this,e,t):n<1024?function(e,t,r){r.negative=t.negative^e.negative,r.length=e.length+t.length;for(var n=0,o=0,i=0;i>>26)|0)>>>26,a&=67108863}r.words[i]=s,n=a,a=o}return 0!==n?r.words[i]=n:r.length--,r.strip()}(this,e,t):m(this,e,t),r},g.prototype.makeRBT=function(e){for(var t=new Array(e),r=i.prototype._countBits(e)-1,n=0;n>=1;return n},g.prototype.permute=function(e,t,r,n,o,i){for(var a=0;a>>=1)o++;return 1<>>=13,r[2*a+1]=8191&i,i>>>=13;for(a=2*t;a>=26,t+=o/67108864|0,t+=i>>>26,this.words[r]=67108863&i}return 0!==t&&(this.words[r]=t,this.length++),this},i.prototype.muln=function(e){return this.clone().imuln(e)},i.prototype.sqr=function(){return this.mul(this)},i.prototype.isqr=function(){return this.imul(this.clone())},i.prototype.pow=function(e){var t=function(e){for(var t=new Array(e.bitLength()),r=0;r>>o}return t}(e);if(0===t.length)return new i(1);for(var r=this,n=0;n=0);var t,r=e%26,o=(e-r)/26,i=67108863>>>26-r<<26-r;if(0!==r){var a=0;for(t=0;t>>26-r}a&&(this.words[t]=a,this.length++)}if(0!==o){for(t=this.length-1;t>=0;t--)this.words[t+o]=this.words[t];for(t=0;t=0),o=t?(t-t%26)/26:0;var i=e%26,a=Math.min((e-i)/26,this.length),s=67108863^67108863>>>i<a)for(this.length-=a,c=0;c=0&&(0!==u||c>=o);c--){var d=0|this.words[c];this.words[c]=u<<26-i|d>>>i,u=d&s}return l&&0!==u&&(l.words[l.length++]=u),0===this.length&&(this.words[0]=0,this.length=1),this.strip()},i.prototype.ishrn=function(e,t,r){return n(0===this.negative),this.iushrn(e,t,r)},i.prototype.shln=function(e){return this.clone().ishln(e)},i.prototype.ushln=function(e){return this.clone().iushln(e)},i.prototype.shrn=function(e){return this.clone().ishrn(e)},i.prototype.ushrn=function(e){return this.clone().iushrn(e)},i.prototype.testn=function(e){n("number"==typeof e&&e>=0);var t=e%26,r=(e-t)/26,o=1<=0);var t=e%26,r=(e-t)/26;if(n(0===this.negative,"imaskn works only with positive numbers"),this.length<=r)return this;if(0!==t&&r++,this.length=Math.min(r,this.length),0!==t){var o=67108863^67108863>>>t<=67108864;t++)this.words[t]-=67108864,t===this.length-1?this.words[t+1]=1:this.words[t+1]++;return this.length=Math.max(this.length,t+1),this},i.prototype.isubn=function(e){if(n("number"==typeof e),n(e<67108864),e<0)return this.iaddn(-e);if(0!==this.negative)return this.negative=0,this.iaddn(e),this.negative=1,this;if(this.words[0]-=e,1===this.length&&this.words[0]<0)this.words[0]=-this.words[0],this.negative=1;else for(var t=0;t>26)-(l/67108864|0),this.words[o+r]=67108863&i}for(;o>26,this.words[o+r]=67108863&i;if(0===s)return this.strip();for(n(-1===s),s=0,o=0;o>26,this.words[o]=67108863&i;return this.negative=1,this.strip()},i.prototype._wordDiv=function(e,t){var r=(this.length,e.length),n=this.clone(),o=e,a=0|o.words[o.length-1];0!=(r=26-this._countBits(a))&&(o=o.ushln(r),n.iushln(r),a=0|o.words[o.length-1]);var s,l=n.length-o.length;if("mod"!==t){(s=new i(null)).length=l+1,s.words=new Array(s.length);for(var c=0;c=0;d--){var f=67108864*(0|n.words[o.length+d])+(0|n.words[o.length+d-1]);for(f=Math.min(f/a|0,67108863),n._ishlnsubmul(o,f,d);0!==n.negative;)f--,n.negative=0,n._ishlnsubmul(o,1,d),n.isZero()||(n.negative^=1);s&&(s.words[d]=f)}return s&&s.strip(),n.strip(),"div"!==t&&0!==r&&n.iushrn(r),{div:s||null,mod:n}},i.prototype.divmod=function(e,t,r){return n(!e.isZero()),this.isZero()?{div:new i(0),mod:new i(0)}:0!==this.negative&&0===e.negative?(s=this.neg().divmod(e,t),"mod"!==t&&(o=s.div.neg()),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.iadd(e)),{div:o,mod:a}):0===this.negative&&0!==e.negative?(s=this.divmod(e.neg(),t),"mod"!==t&&(o=s.div.neg()),{div:o,mod:s.mod}):this.negative&e.negative?(s=this.neg().divmod(e.neg(),t),"div"!==t&&(a=s.mod.neg(),r&&0!==a.negative&&a.isub(e)),{div:s.div,mod:a}):e.length>this.length||this.cmp(e)<0?{div:new i(0),mod:this}:1===e.length?"div"===t?{div:this.divn(e.words[0]),mod:null}:"mod"===t?{div:null,mod:new i(this.modn(e.words[0]))}:{div:this.divn(e.words[0]),mod:new i(this.modn(e.words[0]))}:this._wordDiv(e,t);var o,a,s},i.prototype.div=function(e){return this.divmod(e,"div",!1).div},i.prototype.mod=function(e){return this.divmod(e,"mod",!1).mod},i.prototype.umod=function(e){return this.divmod(e,"mod",!0).mod},i.prototype.divRound=function(e){var t=this.divmod(e);if(t.mod.isZero())return t.div;var r=0!==t.div.negative?t.mod.isub(e):t.mod,n=e.ushrn(1),o=e.andln(1),i=r.cmp(n);return i<0||1===o&&0===i?t.div:0!==t.div.negative?t.div.isubn(1):t.div.iaddn(1)},i.prototype.modn=function(e){n(e<=67108863);for(var t=(1<<26)%e,r=0,o=this.length-1;o>=0;o--)r=(t*r+(0|this.words[o]))%e;return r},i.prototype.idivn=function(e){n(e<=67108863);for(var t=0,r=this.length-1;r>=0;r--){var o=(0|this.words[r])+67108864*t;this.words[r]=o/e|0,t=o%e}return this.strip()},i.prototype.divn=function(e){return this.clone().idivn(e)},i.prototype.egcd=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o=new i(1),a=new i(0),s=new i(0),l=new i(1),c=0;t.isEven()&&r.isEven();)t.iushrn(1),r.iushrn(1),++c;for(var u=r.clone(),d=t.clone();!t.isZero();){for(var f=0,p=1;!(t.words[0]&p)&&f<26;++f,p<<=1);if(f>0)for(t.iushrn(f);f-- >0;)(o.isOdd()||a.isOdd())&&(o.iadd(u),a.isub(d)),o.iushrn(1),a.iushrn(1);for(var h=0,m=1;!(r.words[0]&m)&&h<26;++h,m<<=1);if(h>0)for(r.iushrn(h);h-- >0;)(s.isOdd()||l.isOdd())&&(s.iadd(u),l.isub(d)),s.iushrn(1),l.iushrn(1);t.cmp(r)>=0?(t.isub(r),o.isub(s),a.isub(l)):(r.isub(t),s.isub(o),l.isub(a))}return{a:s,b:l,gcd:r.iushln(c)}},i.prototype._invmp=function(e){n(0===e.negative),n(!e.isZero());var t=this,r=e.clone();t=0!==t.negative?t.umod(e):t.clone();for(var o,a=new i(1),s=new i(0),l=r.clone();t.cmpn(1)>0&&r.cmpn(1)>0;){for(var c=0,u=1;!(t.words[0]&u)&&c<26;++c,u<<=1);if(c>0)for(t.iushrn(c);c-- >0;)a.isOdd()&&a.iadd(l),a.iushrn(1);for(var d=0,f=1;!(r.words[0]&f)&&d<26;++d,f<<=1);if(d>0)for(r.iushrn(d);d-- >0;)s.isOdd()&&s.iadd(l),s.iushrn(1);t.cmp(r)>=0?(t.isub(r),a.isub(s)):(r.isub(t),s.isub(a))}return(o=0===t.cmpn(1)?a:s).cmpn(0)<0&&o.iadd(e),o},i.prototype.gcd=function(e){if(this.isZero())return e.abs();if(e.isZero())return this.abs();var t=this.clone(),r=e.clone();t.negative=0,r.negative=0;for(var n=0;t.isEven()&&r.isEven();n++)t.iushrn(1),r.iushrn(1);for(;;){for(;t.isEven();)t.iushrn(1);for(;r.isEven();)r.iushrn(1);var o=t.cmp(r);if(o<0){var i=t;t=r,r=i}else if(0===o||0===r.cmpn(1))break;t.isub(r)}return r.iushln(n)},i.prototype.invm=function(e){return this.egcd(e).a.umod(e)},i.prototype.isEven=function(){return!(1&this.words[0])},i.prototype.isOdd=function(){return!(1&~this.words[0])},i.prototype.andln=function(e){return this.words[0]&e},i.prototype.bincn=function(e){n("number"==typeof e);var t=e%26,r=(e-t)/26,o=1<>>26,s&=67108863,this.words[a]=s}return 0!==i&&(this.words[a]=i,this.length++),this},i.prototype.isZero=function(){return 1===this.length&&0===this.words[0]},i.prototype.cmpn=function(e){var t,r=e<0;if(0!==this.negative&&!r)return-1;if(0===this.negative&&r)return 1;if(this.strip(),this.length>1)t=1;else{r&&(e=-e),n(e<=67108863,"Number is too big");var o=0|this.words[0];t=o===e?0:oe.length)return 1;if(this.length=0;r--){var n=0|this.words[r],o=0|e.words[r];if(n!==o){no&&(t=1);break}}return t},i.prototype.gtn=function(e){return 1===this.cmpn(e)},i.prototype.gt=function(e){return 1===this.cmp(e)},i.prototype.gten=function(e){return this.cmpn(e)>=0},i.prototype.gte=function(e){return this.cmp(e)>=0},i.prototype.ltn=function(e){return-1===this.cmpn(e)},i.prototype.lt=function(e){return-1===this.cmp(e)},i.prototype.lten=function(e){return this.cmpn(e)<=0},i.prototype.lte=function(e){return this.cmp(e)<=0},i.prototype.eqn=function(e){return 0===this.cmpn(e)},i.prototype.eq=function(e){return 0===this.cmp(e)},i.red=function(e){return new S(e)},i.prototype.toRed=function(e){return n(!this.red,"Already a number in reduction context"),n(0===this.negative,"red works only with positives"),e.convertTo(this)._forceRed(e)},i.prototype.fromRed=function(){return n(this.red,"fromRed works only with numbers in reduction context"),this.red.convertFrom(this)},i.prototype._forceRed=function(e){return this.red=e,this},i.prototype.forceRed=function(e){return n(!this.red,"Already a number in reduction context"),this._forceRed(e)},i.prototype.redAdd=function(e){return n(this.red,"redAdd works only with red numbers"),this.red.add(this,e)},i.prototype.redIAdd=function(e){return n(this.red,"redIAdd works only with red numbers"),this.red.iadd(this,e)},i.prototype.redSub=function(e){return n(this.red,"redSub works only with red numbers"),this.red.sub(this,e)},i.prototype.redISub=function(e){return n(this.red,"redISub works only with red numbers"),this.red.isub(this,e)},i.prototype.redShl=function(e){return n(this.red,"redShl works only with red numbers"),this.red.shl(this,e)},i.prototype.redMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.mul(this,e)},i.prototype.redIMul=function(e){return n(this.red,"redMul works only with red numbers"),this.red._verify2(this,e),this.red.imul(this,e)},i.prototype.redSqr=function(){return n(this.red,"redSqr works only with red numbers"),this.red._verify1(this),this.red.sqr(this)},i.prototype.redISqr=function(){return n(this.red,"redISqr works only with red numbers"),this.red._verify1(this),this.red.isqr(this)},i.prototype.redSqrt=function(){return n(this.red,"redSqrt works only with red numbers"),this.red._verify1(this),this.red.sqrt(this)},i.prototype.redInvm=function(){return n(this.red,"redInvm works only with red numbers"),this.red._verify1(this),this.red.invm(this)},i.prototype.redNeg=function(){return n(this.red,"redNeg works only with red numbers"),this.red._verify1(this),this.red.neg(this)},i.prototype.redPow=function(e){return n(this.red&&!e.red,"redPow(normalNum)"),this.red._verify1(this),this.red.pow(this,e)};var b={k256:null,p224:null,p192:null,p25519:null};function v(e,t){this.name=e,this.p=new i(t,16),this.n=this.p.bitLength(),this.k=new i(1).iushln(this.n).isub(this.p),this.tmp=this._tmp()}function y(){v.call(this,"k256","ffffffff ffffffff ffffffff ffffffff ffffffff ffffffff fffffffe fffffc2f")}function w(){v.call(this,"p224","ffffffff ffffffff ffffffff ffffffff 00000000 00000000 00000001")}function E(){v.call(this,"p192","ffffffff ffffffff ffffffff fffffffe ffffffff ffffffff")}function _(){v.call(this,"25519","7fffffffffffffff ffffffffffffffff ffffffffffffffff ffffffffffffffed")}function S(e){if("string"==typeof e){var t=i._prime(e);this.m=t.p,this.prime=t}else n(e.gtn(1),"modulus must be greater than 1"),this.m=e,this.prime=null}function x(e){S.call(this,e),this.shift=this.m.bitLength(),this.shift%26!=0&&(this.shift+=26-this.shift%26),this.r=new i(1).iushln(this.shift),this.r2=this.imod(this.r.sqr()),this.rinv=this.r._invmp(this.m),this.minv=this.rinv.mul(this.r).isubn(1).div(this.m),this.minv=this.minv.umod(this.r),this.minv=this.r.sub(this.minv)}v.prototype._tmp=function(){var e=new i(null);return e.words=new Array(Math.ceil(this.n/13)),e},v.prototype.ireduce=function(e){var t,r=e;do{this.split(r,this.tmp),t=(r=(r=this.imulK(r)).iadd(this.tmp)).bitLength()}while(t>this.n);var n=t0?r.isub(this.p):void 0!==r.strip?r.strip():r._strip(),r},v.prototype.split=function(e,t){e.iushrn(this.n,0,t)},v.prototype.imulK=function(e){return e.imul(this.k)},o(y,v),y.prototype.split=function(e,t){for(var r=4194303,n=Math.min(e.length,9),o=0;o>>22,i=a}i>>>=22,e.words[o-10]=i,0===i&&e.length>10?e.length-=10:e.length-=9},y.prototype.imulK=function(e){e.words[e.length]=0,e.words[e.length+1]=0,e.length+=2;for(var t=0,r=0;r>>=26,e.words[r]=o,t=n}return 0!==t&&(e.words[e.length++]=t),e},i._prime=function(e){if(b[e])return b[e];var t;if("k256"===e)t=new y;else if("p224"===e)t=new w;else if("p192"===e)t=new E;else{if("p25519"!==e)throw new Error("Unknown prime "+e);t=new _}return b[e]=t,t},S.prototype._verify1=function(e){n(0===e.negative,"red works only with positives"),n(e.red,"red works only with red numbers")},S.prototype._verify2=function(e,t){n(!(e.negative|t.negative),"red works only with positives"),n(e.red&&e.red===t.red,"red works only with red numbers")},S.prototype.imod=function(e){return this.prime?this.prime.ireduce(e)._forceRed(this):e.umod(this.m)._forceRed(this)},S.prototype.neg=function(e){return e.isZero()?e.clone():this.m.sub(e)._forceRed(this)},S.prototype.add=function(e,t){this._verify2(e,t);var r=e.add(t);return r.cmp(this.m)>=0&&r.isub(this.m),r._forceRed(this)},S.prototype.iadd=function(e,t){this._verify2(e,t);var r=e.iadd(t);return r.cmp(this.m)>=0&&r.isub(this.m),r},S.prototype.sub=function(e,t){this._verify2(e,t);var r=e.sub(t);return r.cmpn(0)<0&&r.iadd(this.m),r._forceRed(this)},S.prototype.isub=function(e,t){this._verify2(e,t);var r=e.isub(t);return r.cmpn(0)<0&&r.iadd(this.m),r},S.prototype.shl=function(e,t){return this._verify1(e),this.imod(e.ushln(t))},S.prototype.imul=function(e,t){return this._verify2(e,t),this.imod(e.imul(t))},S.prototype.mul=function(e,t){return this._verify2(e,t),this.imod(e.mul(t))},S.prototype.isqr=function(e){return this.imul(e,e.clone())},S.prototype.sqr=function(e){return this.mul(e,e)},S.prototype.sqrt=function(e){if(e.isZero())return e.clone();var t=this.m.andln(3);if(n(t%2==1),3===t){var r=this.m.add(new i(1)).iushrn(2);return this.pow(e,r)}for(var o=this.m.subn(1),a=0;!o.isZero()&&0===o.andln(1);)a++,o.iushrn(1);n(!o.isZero());var s=new i(1).toRed(this),l=s.redNeg(),c=this.m.subn(1).iushrn(1),u=this.m.bitLength();for(u=new i(2*u*u).toRed(this);0!==this.pow(u,c).cmp(l);)u.redIAdd(l);for(var d=this.pow(u,o),f=this.pow(e,o.addn(1).iushrn(1)),p=this.pow(e,o),h=a;0!==p.cmp(s);){for(var m=p,g=0;0!==m.cmp(s);g++)m=m.redSqr();n(g=0;n--){for(var c=t.words[n],u=l-1;u>=0;u--){var d=c>>u&1;o!==r[0]&&(o=this.sqr(o)),0!==d||0!==a?(a<<=1,a|=d,(4==++s||0===n&&0===u)&&(o=this.mul(o,r[a]),s=0,a=0)):s=0}l=26}return o},S.prototype.convertTo=function(e){var t=e.umod(this.m);return t===e?t.clone():t},S.prototype.convertFrom=function(e){var t=e.clone();return t.red=null,t},i.mont=function(e){return new x(e)},o(x,S),x.prototype.convertTo=function(e){return this.imod(e.ushln(this.shift))},x.prototype.convertFrom=function(e){var t=this.imod(e.mul(this.rinv));return t.red=null,t},x.prototype.imul=function(e,t){if(e.isZero()||t.isZero())return e.words[0]=0,e.length=1,e;var r=e.imul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),i=o;return o.cmp(this.m)>=0?i=o.isub(this.m):o.cmpn(0)<0&&(i=o.iadd(this.m)),i._forceRed(this)},x.prototype.mul=function(e,t){if(e.isZero()||t.isZero())return new i(0)._forceRed(this);var r=e.mul(t),n=r.maskn(this.shift).mul(this.minv).imaskn(this.shift).mul(this.m),o=r.isub(n).iushrn(this.shift),a=o;return o.cmp(this.m)>=0?a=o.isub(this.m):o.cmpn(0)<0&&(a=o.iadd(this.m)),a._forceRed(this)},x.prototype.invm=function(e){return this.imod(e._invmp(this.m).mul(this.r2))._forceRed(this)}}(e=r.nmd(e),this)},81215:(e,t,r)=>{"use strict";var n={};r.r(n),r.d(n,{Decoder:()=>je,Encoder:()=>Be,PacketType:()=>Fe,protocol:()=>Le});var o=r(96540),i=r.t(o,2),a=r(5338),s=r(77454),l=r(85072),c=r.n(l),u=r(97825),d=r.n(u),f=r(77659),p=r.n(f),h=r(55056),m=r.n(h),g=r(10540),b=r.n(g),v=r(41113),y=r.n(v),w=r(92254),E={};E.styleTagTransform=y(),E.setAttributes=m(),E.insert=p().bind(null,"head"),E.domAPI=d(),E.insertStyleElement=b(),c()(w.A,E),w.A&&w.A.locals&&w.A.locals;var _=r(54407),S={};S.styleTagTransform=y(),S.setAttributes=m(),S.insert=p().bind(null,"head"),S.domAPI=d(),S.insertStyleElement=b(),c()(_.A,S),_.A&&_.A.locals&&_.A.locals;var x=r(3920),A={};A.styleTagTransform=y(),A.setAttributes=m(),A.insert=p().bind(null,"head"),A.domAPI=d(),A.insertStyleElement=b(),c()(x.A,A),x.A&&x.A.locals&&x.A.locals,r(10414);var T=r(81370),C={};C.styleTagTransform=y(),C.setAttributes=m(),C.insert=p().bind(null,"head"),C.domAPI=d(),C.insertStyleElement=b(),c()(T.A,C),T.A&&T.A.locals&&T.A.locals;const k=Object.create(null);k.open="0",k.close="1",k.ping="2",k.pong="3",k.message="4",k.upgrade="5",k.noop="6";const O=Object.create(null);Object.keys(k).forEach((e=>{O[k[e]]=e}));const R={type:"error",data:"parser error"},N="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Object.prototype.toString.call(Blob),I="function"==typeof ArrayBuffer,M=e=>"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e&&e.buffer instanceof ArrayBuffer,P=({type:e,data:t},r,n)=>N&&t instanceof Blob?r?n(t):D(t,n):I&&(t instanceof ArrayBuffer||M(t))?r?n(t):D(new Blob([t]),n):n(k[e]+(t||"")),D=(e,t)=>{const r=new FileReader;return r.onload=function(){const e=r.result.split(",")[1];t("b"+(e||""))},r.readAsDataURL(e)};function L(e){return e instanceof Uint8Array?e:e instanceof ArrayBuffer?new Uint8Array(e):new Uint8Array(e.buffer,e.byteOffset,e.byteLength)}let F;const B="undefined"==typeof Uint8Array?[]:new Uint8Array(256);for(let e=0;e<64;e++)B["ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/".charCodeAt(e)]=e;const U="function"==typeof ArrayBuffer,j=(e,t)=>{if("string"!=typeof e)return{type:"message",data:H(e,t)};const r=e.charAt(0);return"b"===r?{type:"message",data:z(e.substring(1),t)}:O[r]?e.length>1?{type:O[r],data:e.substring(1)}:{type:O[r]}:R},z=(e,t)=>{if(U){const r=(e=>{let t,r,n,o,i,a=.75*e.length,s=e.length,l=0;"="===e[e.length-1]&&(a--,"="===e[e.length-2]&&a--);const c=new ArrayBuffer(a),u=new Uint8Array(c);for(t=0;t>4,u[l++]=(15&n)<<4|o>>2,u[l++]=(3&o)<<6|63&i;return c})(e);return H(r,t)}return{base64:!0,data:e}},H=(e,t)=>"blob"===t?e instanceof Blob?e:new Blob([e]):e instanceof ArrayBuffer?e:e.buffer,G=String.fromCharCode(30);let W;function q(e){return e.reduce(((e,t)=>e+t.length),0)}function V(e,t){if(e[0].length===t)return e.shift();const r=new Uint8Array(t);let n=0;for(let o=0;o(e.hasOwnProperty(r)&&(t[r]=e[r]),t)),{})}const Z=K.setTimeout,Q=K.clearTimeout;function J(e,t){t.useNativeTimers?(e.setTimeoutFn=Z.bind(K),e.clearTimeoutFn=Q.bind(K)):(e.setTimeoutFn=K.setTimeout.bind(K),e.clearTimeoutFn=K.clearTimeout.bind(K))}class $ extends Error{constructor(e,t,r){super(e),this.description=t,this.context=r,this.type="TransportError"}}class ee extends Y{constructor(e){super(),this.writable=!1,J(this,e),this.opts=e,this.query=e.query,this.socket=e.socket}onError(e,t,r){return super.emitReserved("error",new $(e,t,r)),this}open(){return this.readyState="opening",this.doOpen(),this}close(){return"opening"!==this.readyState&&"open"!==this.readyState||(this.doClose(),this.onClose()),this}send(e){"open"===this.readyState&&this.write(e)}onOpen(){this.readyState="open",this.writable=!0,super.emitReserved("open")}onData(e){const t=j(e,this.socket.binaryType);this.onPacket(t)}onPacket(e){super.emitReserved("packet",e)}onClose(e){this.readyState="closed",super.emitReserved("close",e)}pause(e){}createUri(e,t={}){return e+"://"+this._hostname()+this._port()+this.opts.path+this._query(t)}_hostname(){const e=this.opts.hostname;return-1===e.indexOf(":")?e:"["+e+"]"}_port(){return this.opts.port&&(this.opts.secure&&Number(443!==this.opts.port)||!this.opts.secure&&80!==Number(this.opts.port))?":"+this.opts.port:""}_query(e){const t=function(e){let t="";for(let r in e)e.hasOwnProperty(r)&&(t.length&&(t+="&"),t+=encodeURIComponent(r)+"="+encodeURIComponent(e[r]));return t}(e);return t.length?"?"+t:""}}const te="0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz-_".split(""),re=64,ne={};let oe,ie=0,ae=0;function se(e){let t="";do{t=te[e%re]+t,e=Math.floor(e/re)}while(e>0);return t}function le(){const e=se(+new Date);return e!==oe?(ie=0,oe=e):e+"."+se(ie++)}for(;ae{var e;3===r.readyState&&(null===(e=this.opts.cookieJar)||void 0===e||e.parseCookies(r)),4===r.readyState&&(200===r.status||1223===r.status?this.onLoad():this.setTimeoutFn((()=>{this.onError("number"==typeof r.status?r.status:0)}),0))},r.send(this.data)}catch(e){return void this.setTimeoutFn((()=>{this.onError(e)}),0)}"undefined"!=typeof document&&(this.index=he.requestsCount++,he.requests[this.index]=this)}onError(e){this.emitReserved("error",e,this.xhr),this.cleanup(!0)}cleanup(e){if(void 0!==this.xhr&&null!==this.xhr){if(this.xhr.onreadystatechange=fe,e)try{this.xhr.abort()}catch(e){}"undefined"!=typeof document&&delete he.requests[this.index],this.xhr=null}}onLoad(){const e=this.xhr.responseText;null!==e&&(this.emitReserved("data",e),this.emitReserved("success"),this.cleanup())}abort(){this.cleanup()}}function me(){for(let e in he.requests)he.requests.hasOwnProperty(e)&&he.requests[e].abort()}he.requestsCount=0,he.requests={},"undefined"!=typeof document&&("function"==typeof attachEvent?attachEvent("onunload",me):"function"==typeof addEventListener&&addEventListener("onpagehide"in K?"pagehide":"unload",me,!1));const ge="function"==typeof Promise&&"function"==typeof Promise.resolve?e=>Promise.resolve().then(e):(e,t)=>t(e,0),be=K.WebSocket||K.MozWebSocket;r(48287).Buffer;const ve="undefined"!=typeof navigator&&"string"==typeof navigator.product&&"reactnative"===navigator.product.toLowerCase(),ye={websocket:class extends ee{constructor(e){super(e),this.supportsBinary=!e.forceBase64}get name(){return"websocket"}doOpen(){if(!this.check())return;const e=this.uri(),t=this.opts.protocols,r=ve?{}:X(this.opts,"agent","perMessageDeflate","pfx","key","passphrase","cert","ca","ciphers","rejectUnauthorized","localAddress","protocolVersion","origin","maxPayload","family","checkServerIdentity");this.opts.extraHeaders&&(r.headers=this.opts.extraHeaders);try{this.ws=ve?new be(e,t,r):t?new be(e,t):new be(e)}catch(e){return this.emitReserved("error",e)}this.ws.binaryType=this.socket.binaryType,this.addEventListeners()}addEventListeners(){this.ws.onopen=()=>{this.opts.autoUnref&&this.ws._socket.unref(),this.onOpen()},this.ws.onclose=e=>this.onClose({description:"websocket connection closed",context:e}),this.ws.onmessage=e=>this.onData(e.data),this.ws.onerror=e=>this.onError("websocket error",e)}write(e){this.writable=!1;for(let t=0;t{try{this.ws.send(e)}catch(e){}n&&ge((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){void 0!==this.ws&&(this.ws.close(),this.ws=null)}uri(){const e=this.opts.secure?"wss":"ws",t=this.query||{};return this.opts.timestampRequests&&(t[this.opts.timestampParam]=le()),this.supportsBinary||(t.b64=1),this.createUri(e,t)}check(){return!!be}},webtransport:class extends ee{get name(){return"webtransport"}doOpen(){"function"==typeof WebTransport&&(this.transport=new WebTransport(this.createUri("https"),this.opts.transportOptions[this.name]),this.transport.closed.then((()=>{this.onClose()})).catch((e=>{this.onError("webtransport error",e)})),this.transport.ready.then((()=>{this.transport.createBidirectionalStream().then((e=>{const t=function(e,t){W||(W=new TextDecoder);const r=[];let n=0,o=-1,i=!1;return new TransformStream({transform(a,s){for(r.push(a);;){if(0===n){if(q(r)<1)break;const e=V(r,1);i=!(128&~e[0]),o=127&e[0],n=o<126?3:126===o?1:2}else if(1===n){if(q(r)<2)break;const e=V(r,2);o=new DataView(e.buffer,e.byteOffset,e.length).getUint16(0),n=3}else if(2===n){if(q(r)<8)break;const e=V(r,8),t=new DataView(e.buffer,e.byteOffset,e.length),i=t.getUint32(0);if(i>Math.pow(2,21)-1){s.enqueue(R);break}o=i*Math.pow(2,32)+t.getUint32(4),n=3}else{if(q(r)e){s.enqueue(R);break}}}})}(Number.MAX_SAFE_INTEGER,this.socket.binaryType),r=e.readable.pipeThrough(t).getReader(),n=new TransformStream({transform(e,t){!function(e,t){N&&e.data instanceof Blob?e.data.arrayBuffer().then(L).then(t):I&&(e.data instanceof ArrayBuffer||M(e.data))?t(L(e.data)):P(e,!1,(e=>{F||(F=new TextEncoder),t(F.encode(e))}))}(e,(r=>{const n=r.length;let o;if(n<126)o=new Uint8Array(1),new DataView(o.buffer).setUint8(0,n);else if(n<65536){o=new Uint8Array(3);const e=new DataView(o.buffer);e.setUint8(0,126),e.setUint16(1,n)}else{o=new Uint8Array(9);const e=new DataView(o.buffer);e.setUint8(0,127),e.setBigUint64(1,BigInt(n))}e.data&&"string"!=typeof e.data&&(o[0]|=128),t.enqueue(o),t.enqueue(r)}))}});n.readable.pipeTo(e.writable),this.writer=n.writable.getWriter();const o=()=>{r.read().then((({done:e,value:t})=>{e||(this.onPacket(t),o())})).catch((e=>{}))};o();const i={type:"open"};this.query.sid&&(i.data=`{"sid":"${this.query.sid}"}`),this.writer.write(i).then((()=>this.onOpen()))}))})))}write(e){this.writable=!1;for(let t=0;t{n&&ge((()=>{this.writable=!0,this.emitReserved("drain")}),this.setTimeoutFn)}))}}doClose(){var e;null===(e=this.transport)||void 0===e||e.close()}},polling:class extends ee{constructor(e){if(super(e),this.polling=!1,"undefined"!=typeof location){const t="https:"===location.protocol;let r=location.port;r||(r=t?"443":"80"),this.xd="undefined"!=typeof location&&e.hostname!==location.hostname||r!==e.port}const t=e&&e.forceBase64;this.supportsBinary=pe&&!t,this.opts.withCredentials&&(this.cookieJar=void 0)}get name(){return"polling"}doOpen(){this.poll()}pause(e){this.readyState="pausing";const t=()=>{this.readyState="paused",e()};if(this.polling||!this.writable){let e=0;this.polling&&(e++,this.once("pollComplete",(function(){--e||t()}))),this.writable||(e++,this.once("drain",(function(){--e||t()})))}else t()}poll(){this.polling=!0,this.doPoll(),this.emitReserved("poll")}onData(e){((e,t)=>{const r=e.split(G),n=[];for(let e=0;e{if("opening"===this.readyState&&"open"===e.type&&this.onOpen(),"close"===e.type)return this.onClose({description:"transport closed by the server"}),!1;this.onPacket(e)})),"closed"!==this.readyState&&(this.polling=!1,this.emitReserved("pollComplete"),"open"===this.readyState&&this.poll())}doClose(){const e=()=>{this.write([{type:"close"}])};"open"===this.readyState?e():this.once("open",e)}write(e){this.writable=!1,((e,t)=>{const r=e.length,n=new Array(r);let o=0;e.forEach(((e,i)=>{P(e,!1,(e=>{n[i]=e,++o===r&&t(n.join(G))}))}))})(e,(e=>{this.doWrite(e,(()=>{this.writable=!0,this.emitReserved("drain")}))}))}uri(){const e=this.opts.secure?"https":"http",t=this.query||{};return!1!==this.opts.timestampRequests&&(t[this.opts.timestampParam]=le()),this.supportsBinary||t.sid||(t.b64=1),this.createUri(e,t)}request(e={}){return Object.assign(e,{xd:this.xd,cookieJar:this.cookieJar},this.opts),new he(this.uri(),e)}doWrite(e,t){const r=this.request({method:"POST",data:e});r.on("success",t),r.on("error",((e,t)=>{this.onError("xhr post error",e,t)}))}doPoll(){const e=this.request();e.on("data",this.onData.bind(this)),e.on("error",((e,t)=>{this.onError("xhr poll error",e,t)})),this.pollXhr=e}}},we=/^(?:(?![^:@\/?#]+:[^:@\/]*@)(http|https|ws|wss):\/\/)?((?:(([^:@\/?#]*)(?::([^:@\/?#]*))?)?@)?((?:[a-f0-9]{0,4}:){2,7}[a-f0-9]{0,4}|[^:\/?#]*)(?::(\d*))?)(((\/(?:[^?#](?![^?#\/]*\.[^?#\/.]+(?:[?#]|$)))*\/?)?([^?#\/]*))(?:\?([^#]*))?(?:#(.*))?)/,Ee=["source","protocol","authority","userInfo","user","password","host","port","relative","path","directory","file","query","anchor"];function _e(e){if(e.length>2e3)throw"URI too long";const t=e,r=e.indexOf("["),n=e.indexOf("]");-1!=r&&-1!=n&&(e=e.substring(0,r)+e.substring(r,n).replace(/:/g,";")+e.substring(n,e.length));let o=we.exec(e||""),i={},a=14;for(;a--;)i[Ee[a]]=o[a]||"";return-1!=r&&-1!=n&&(i.source=t,i.host=i.host.substring(1,i.host.length-1).replace(/;/g,":"),i.authority=i.authority.replace("[","").replace("]","").replace(/;/g,":"),i.ipv6uri=!0),i.pathNames=function(e,t){const r=t.replace(/\/{2,9}/g,"/").split("/");return"/"!=t.slice(0,1)&&0!==t.length||r.splice(0,1),"/"==t.slice(-1)&&r.splice(r.length-1,1),r}(0,i.path),i.queryKey=function(e,t){const r={};return t.replace(/(?:^|&)([^&=]*)=?([^&]*)/g,(function(e,t,n){t&&(r[t]=n)})),r}(0,i.query),i}class Se extends Y{constructor(e,t={}){super(),this.binaryType="arraybuffer",this.writeBuffer=[],e&&"object"==typeof e&&(t=e,e=null),e?(e=_e(e),t.hostname=e.host,t.secure="https"===e.protocol||"wss"===e.protocol,t.port=e.port,e.query&&(t.query=e.query)):t.host&&(t.hostname=_e(t.host).host),J(this,t),this.secure=null!=t.secure?t.secure:"undefined"!=typeof location&&"https:"===location.protocol,t.hostname&&!t.port&&(t.port=this.secure?"443":"80"),this.hostname=t.hostname||("undefined"!=typeof location?location.hostname:"localhost"),this.port=t.port||("undefined"!=typeof location&&location.port?location.port:this.secure?"443":"80"),this.transports=t.transports||["polling","websocket","webtransport"],this.writeBuffer=[],this.prevBufferLen=0,this.opts=Object.assign({path:"/engine.io",agent:!1,withCredentials:!1,upgrade:!0,timestampParam:"t",rememberUpgrade:!1,addTrailingSlash:!0,rejectUnauthorized:!0,perMessageDeflate:{threshold:1024},transportOptions:{},closeOnBeforeunload:!1},t),this.opts.path=this.opts.path.replace(/\/$/,"")+(this.opts.addTrailingSlash?"/":""),"string"==typeof this.opts.query&&(this.opts.query=function(e){let t={},r=e.split("&");for(let e=0,n=r.length;e{this.transport&&(this.transport.removeAllListeners(),this.transport.close())},addEventListener("beforeunload",this.beforeunloadEventListener,!1)),"localhost"!==this.hostname&&(this.offlineEventListener=()=>{this.onClose("transport close",{description:"network connection lost"})},addEventListener("offline",this.offlineEventListener,!1))),this.open()}createTransport(e){const t=Object.assign({},this.opts.query);t.EIO=4,t.transport=e,this.id&&(t.sid=this.id);const r=Object.assign({},this.opts,{query:t,socket:this,hostname:this.hostname,secure:this.secure,port:this.port},this.opts.transportOptions[e]);return new ye[e](r)}open(){let e;if(this.opts.rememberUpgrade&&Se.priorWebsocketSuccess&&-1!==this.transports.indexOf("websocket"))e="websocket";else{if(0===this.transports.length)return void this.setTimeoutFn((()=>{this.emitReserved("error","No transports available")}),0);e=this.transports[0]}this.readyState="opening";try{e=this.createTransport(e)}catch(e){return this.transports.shift(),void this.open()}e.open(),this.setTransport(e)}setTransport(e){this.transport&&this.transport.removeAllListeners(),this.transport=e,e.on("drain",this.onDrain.bind(this)).on("packet",this.onPacket.bind(this)).on("error",this.onError.bind(this)).on("close",(e=>this.onClose("transport close",e)))}probe(e){let t=this.createTransport(e),r=!1;Se.priorWebsocketSuccess=!1;const n=()=>{r||(t.send([{type:"ping",data:"probe"}]),t.once("packet",(e=>{if(!r)if("pong"===e.type&&"probe"===e.data){if(this.upgrading=!0,this.emitReserved("upgrading",t),!t)return;Se.priorWebsocketSuccess="websocket"===t.name,this.transport.pause((()=>{r||"closed"!==this.readyState&&(c(),this.setTransport(t),t.send([{type:"upgrade"}]),this.emitReserved("upgrade",t),t=null,this.upgrading=!1,this.flush())}))}else{const e=new Error("probe error");e.transport=t.name,this.emitReserved("upgradeError",e)}})))};function o(){r||(r=!0,c(),t.close(),t=null)}const i=e=>{const r=new Error("probe error: "+e);r.transport=t.name,o(),this.emitReserved("upgradeError",r)};function a(){i("transport closed")}function s(){i("socket closed")}function l(e){t&&e.name!==t.name&&o()}const c=()=>{t.removeListener("open",n),t.removeListener("error",i),t.removeListener("close",a),this.off("close",s),this.off("upgrading",l)};t.once("open",n),t.once("error",i),t.once("close",a),this.once("close",s),this.once("upgrading",l),-1!==this.upgrades.indexOf("webtransport")&&"webtransport"!==e?this.setTimeoutFn((()=>{r||t.open()}),200):t.open()}onOpen(){if(this.readyState="open",Se.priorWebsocketSuccess="websocket"===this.transport.name,this.emitReserved("open"),this.flush(),"open"===this.readyState&&this.opts.upgrade){let e=0;const t=this.upgrades.length;for(;e{this.onClose("ping timeout")}),this.pingInterval+this.pingTimeout),this.opts.autoUnref&&this.pingTimeoutTimer.unref()}onDrain(){this.writeBuffer.splice(0,this.prevBufferLen),this.prevBufferLen=0,0===this.writeBuffer.length?this.emitReserved("drain"):this.flush()}flush(){if("closed"!==this.readyState&&this.transport.writable&&!this.upgrading&&this.writeBuffer.length){const e=this.getWritablePackets();this.transport.send(e),this.prevBufferLen=e.length,this.emitReserved("flush")}}getWritablePackets(){if(!(this.maxPayload&&"polling"===this.transport.name&&this.writeBuffer.length>1))return this.writeBuffer;let e=1;for(let r=0;r=57344?r+=3:(n++,r+=4);return r}(t):Math.ceil(1.33*(t.byteLength||t.size))),r>0&&e>this.maxPayload)return this.writeBuffer.slice(0,r);e+=2}var t;return this.writeBuffer}write(e,t,r){return this.sendPacket("message",e,t,r),this}send(e,t,r){return this.sendPacket("message",e,t,r),this}sendPacket(e,t,r,n){if("function"==typeof t&&(n=t,t=void 0),"function"==typeof r&&(n=r,r=null),"closing"===this.readyState||"closed"===this.readyState)return;(r=r||{}).compress=!1!==r.compress;const o={type:e,data:t,options:r};this.emitReserved("packetCreate",o),this.writeBuffer.push(o),n&&this.once("flush",n),this.flush()}close(){const e=()=>{this.onClose("forced close"),this.transport.close()},t=()=>{this.off("upgrade",t),this.off("upgradeError",t),e()},r=()=>{this.once("upgrade",t),this.once("upgradeError",t)};return"opening"!==this.readyState&&"open"!==this.readyState||(this.readyState="closing",this.writeBuffer.length?this.once("drain",(()=>{this.upgrading?r():e()})):this.upgrading?r():e()),this}onError(e){Se.priorWebsocketSuccess=!1,this.emitReserved("error",e),this.onClose("transport error",e)}onClose(e,t){"opening"!==this.readyState&&"open"!==this.readyState&&"closing"!==this.readyState||(this.clearTimeoutFn(this.pingTimeoutTimer),this.transport.removeAllListeners("close"),this.transport.close(),this.transport.removeAllListeners(),"function"==typeof removeEventListener&&(removeEventListener("beforeunload",this.beforeunloadEventListener,!1),removeEventListener("offline",this.offlineEventListener,!1)),this.readyState="closed",this.id=null,this.emitReserved("close",e,t),this.writeBuffer=[],this.prevBufferLen=0)}filterUpgrades(e){const t=[];let r=0;const n=e.length;for(;r"function"==typeof ArrayBuffer.isView?ArrayBuffer.isView(e):e.buffer instanceof ArrayBuffer,Te=Object.prototype.toString,Ce="function"==typeof Blob||"undefined"!=typeof Blob&&"[object BlobConstructor]"===Te.call(Blob),ke="function"==typeof File||"undefined"!=typeof File&&"[object FileConstructor]"===Te.call(File);function Oe(e){return xe&&(e instanceof ArrayBuffer||Ae(e))||Ce&&e instanceof Blob||ke&&e instanceof File}function Re(e,t){if(!e||"object"!=typeof e)return!1;if(Array.isArray(e)){for(let t=0,r=e.length;t=0&&e.num{delete this.acks[e];for(let t=0;t{this.io.clearTimeoutFn(o),t.apply(this,e)};i.withError=!0,this.acks[e]=i}emitWithAck(e,...t){return new Promise(((r,n)=>{const o=(e,t)=>e?n(e):r(t);o.withError=!0,t.push(o),this.emit(e,...t)}))}_addToQueue(e){let t;"function"==typeof e[e.length-1]&&(t=e.pop());const r={id:this._queueSeq++,tryCount:0,pending:!1,args:e,flags:Object.assign({fromQueue:!0},this.flags)};e.push(((e,...n)=>{if(r===this._queue[0])return null!==e?r.tryCount>this._opts.retries&&(this._queue.shift(),t&&t(e)):(this._queue.shift(),t&&t(null,...n)),r.pending=!1,this._drainQueue()})),this._queue.push(r),this._drainQueue()}_drainQueue(e=!1){if(!this.connected||0===this._queue.length)return;const t=this._queue[0];t.pending&&!e||(t.pending=!0,t.tryCount++,this.flags=t.flags,this.emit.apply(this,t.args))}packet(e){e.nsp=this.nsp,this.io._packet(e)}onopen(){"function"==typeof this.auth?this.auth((e=>{this._sendConnectPacket(e)})):this._sendConnectPacket(this.auth)}_sendConnectPacket(e){this.packet({type:Fe.CONNECT,data:this._pid?Object.assign({pid:this._pid,offset:this._lastOffset},e):e})}onerror(e){this.connected||this.emitReserved("connect_error",e)}onclose(e,t){this.connected=!1,delete this.id,this.emitReserved("disconnect",e,t),this._clearAcks()}_clearAcks(){Object.keys(this.acks).forEach((e=>{if(!this.sendBuffer.some((t=>String(t.id)===e))){const t=this.acks[e];delete this.acks[e],t.withError&&t.call(this,new Error("socket has been disconnected"))}}))}onpacket(e){if(e.nsp===this.nsp)switch(e.type){case Fe.CONNECT:e.data&&e.data.sid?this.onconnect(e.data.sid,e.data.pid):this.emitReserved("connect_error",new Error("It seems you are trying to reach a Socket.IO server in v2.x with a v3.x client, but they are not compatible (more information here: https://socket.io/docs/v3/migrating-from-2-x-to-3-0/)"));break;case Fe.EVENT:case Fe.BINARY_EVENT:this.onevent(e);break;case Fe.ACK:case Fe.BINARY_ACK:this.onack(e);break;case Fe.DISCONNECT:this.ondisconnect();break;case Fe.CONNECT_ERROR:this.destroy();const t=new Error(e.data.message);t.data=e.data.data,this.emitReserved("connect_error",t)}}onevent(e){const t=e.data||[];null!=e.id&&t.push(this.ack(e.id)),this.connected?this.emitEvent(t):this.receiveBuffer.push(Object.freeze(t))}emitEvent(e){if(this._anyListeners&&this._anyListeners.length){const t=this._anyListeners.slice();for(const r of t)r.apply(this,e)}super.emit.apply(this,e),this._pid&&e.length&&"string"==typeof e[e.length-1]&&(this._lastOffset=e[e.length-1])}ack(e){const t=this;let r=!1;return function(...n){r||(r=!0,t.packet({type:Fe.ACK,id:e,data:n}))}}onack(e){const t=this.acks[e.id];"function"==typeof t&&(delete this.acks[e.id],t.withError&&e.data.unshift(null),t.apply(this,e.data))}onconnect(e,t){this.id=e,this.recovered=t&&this._pid===t,this._pid=t,this.connected=!0,this.emitBuffered(),this.emitReserved("connect"),this._drainQueue(!0)}emitBuffered(){this.receiveBuffer.forEach((e=>this.emitEvent(e))),this.receiveBuffer=[],this.sendBuffer.forEach((e=>{this.notifyOutgoingListeners(e),this.packet(e)})),this.sendBuffer=[]}ondisconnect(){this.destroy(),this.onclose("io server disconnect")}destroy(){this.subs&&(this.subs.forEach((e=>e())),this.subs=void 0),this.io._destroy(this)}disconnect(){return this.connected&&this.packet({type:Fe.DISCONNECT}),this.destroy(),this.connected&&this.onclose("io client disconnect"),this}close(){return this.disconnect()}compress(e){return this.flags.compress=e,this}get volatile(){return this.flags.volatile=!0,this}timeout(e){return this.flags.timeout=e,this}onAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.push(e),this}prependAny(e){return this._anyListeners=this._anyListeners||[],this._anyListeners.unshift(e),this}offAny(e){if(!this._anyListeners)return this;if(e){const t=this._anyListeners;for(let r=0;r0&&e.jitter<=1?e.jitter:0,this.attempts=0}qe.prototype.duration=function(){var e=this.ms*Math.pow(this.factor,this.attempts++);if(this.jitter){var t=Math.random(),r=Math.floor(t*this.jitter*e);e=1&Math.floor(10*t)?e+r:e-r}return 0|Math.min(e,this.max)},qe.prototype.reset=function(){this.attempts=0},qe.prototype.setMin=function(e){this.ms=e},qe.prototype.setMax=function(e){this.max=e},qe.prototype.setJitter=function(e){this.jitter=e};class Ve extends Y{constructor(e,t){var r;super(),this.nsps={},this.subs=[],e&&"object"==typeof e&&(t=e,e=void 0),(t=t||{}).path=t.path||"/socket.io",this.opts=t,J(this,t),this.reconnection(!1!==t.reconnection),this.reconnectionAttempts(t.reconnectionAttempts||1/0),this.reconnectionDelay(t.reconnectionDelay||1e3),this.reconnectionDelayMax(t.reconnectionDelayMax||5e3),this.randomizationFactor(null!==(r=t.randomizationFactor)&&void 0!==r?r:.5),this.backoff=new qe({min:this.reconnectionDelay(),max:this.reconnectionDelayMax(),jitter:this.randomizationFactor()}),this.timeout(null==t.timeout?2e4:t.timeout),this._readyState="closed",this.uri=e;const o=t.parser||n;this.encoder=new o.Encoder,this.decoder=new o.Decoder,this._autoConnect=!1!==t.autoConnect,this._autoConnect&&this.open()}reconnection(e){return arguments.length?(this._reconnection=!!e,this):this._reconnection}reconnectionAttempts(e){return void 0===e?this._reconnectionAttempts:(this._reconnectionAttempts=e,this)}reconnectionDelay(e){var t;return void 0===e?this._reconnectionDelay:(this._reconnectionDelay=e,null===(t=this.backoff)||void 0===t||t.setMin(e),this)}randomizationFactor(e){var t;return void 0===e?this._randomizationFactor:(this._randomizationFactor=e,null===(t=this.backoff)||void 0===t||t.setJitter(e),this)}reconnectionDelayMax(e){var t;return void 0===e?this._reconnectionDelayMax:(this._reconnectionDelayMax=e,null===(t=this.backoff)||void 0===t||t.setMax(e),this)}timeout(e){return arguments.length?(this._timeout=e,this):this._timeout}maybeReconnectOnOpen(){!this._reconnecting&&this._reconnection&&0===this.backoff.attempts&&this.reconnect()}open(e){if(~this._readyState.indexOf("open"))return this;this.engine=new Se(this.uri,this.opts);const t=this.engine,r=this;this._readyState="opening",this.skipReconnect=!1;const n=He(t,"open",(function(){r.onopen(),e&&e()})),o=t=>{this.cleanup(),this._readyState="closed",this.emitReserved("error",t),e?e(t):this.maybeReconnectOnOpen()},i=He(t,"error",o);if(!1!==this._timeout){const e=this._timeout,r=this.setTimeoutFn((()=>{n(),o(new Error("timeout")),t.close()}),e);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}return this.subs.push(n),this.subs.push(i),this}connect(e){return this.open(e)}onopen(){this.cleanup(),this._readyState="open",this.emitReserved("open");const e=this.engine;this.subs.push(He(e,"ping",this.onping.bind(this)),He(e,"data",this.ondata.bind(this)),He(e,"error",this.onerror.bind(this)),He(e,"close",this.onclose.bind(this)),He(this.decoder,"decoded",this.ondecoded.bind(this)))}onping(){this.emitReserved("ping")}ondata(e){try{this.decoder.add(e)}catch(e){this.onclose("parse error",e)}}ondecoded(e){ge((()=>{this.emitReserved("packet",e)}),this.setTimeoutFn)}onerror(e){this.emitReserved("error",e)}socket(e,t){let r=this.nsps[e];return r?this._autoConnect&&!r.active&&r.connect():(r=new We(this,e,t),this.nsps[e]=r),r}_destroy(e){const t=Object.keys(this.nsps);for(const e of t)if(this.nsps[e].active)return;this._close()}_packet(e){const t=this.encoder.encode(e);for(let r=0;re())),this.subs.length=0,this.decoder.destroy()}_close(){this.skipReconnect=!0,this._reconnecting=!1,this.onclose("forced close"),this.engine&&this.engine.close()}disconnect(){return this._close()}onclose(e,t){this.cleanup(),this.backoff.reset(),this._readyState="closed",this.emitReserved("close",e,t),this._reconnection&&!this.skipReconnect&&this.reconnect()}reconnect(){if(this._reconnecting||this.skipReconnect)return this;const e=this;if(this.backoff.attempts>=this._reconnectionAttempts)this.backoff.reset(),this.emitReserved("reconnect_failed"),this._reconnecting=!1;else{const t=this.backoff.duration();this._reconnecting=!0;const r=this.setTimeoutFn((()=>{e.skipReconnect||(this.emitReserved("reconnect_attempt",e.backoff.attempts),e.skipReconnect||e.open((t=>{t?(e._reconnecting=!1,e.reconnect(),this.emitReserved("reconnect_error",t)):e.onreconnect()})))}),t);this.opts.autoUnref&&r.unref(),this.subs.push((()=>{this.clearTimeoutFn(r)}))}}onreconnect(){const e=this.backoff.attempts;this._reconnecting=!1,this.backoff.reset(),this.emitReserved("reconnect",e)}}const Ye={};function Ke(e,t){"object"==typeof e&&(t=e,e=void 0);const r=function(e,t="",r){let n=e;r=r||"undefined"!=typeof location&&location,null==e&&(e=r.protocol+"//"+r.host),"string"==typeof e&&("/"===e.charAt(0)&&(e="/"===e.charAt(1)?r.protocol+e:r.host+e),/^(https?|wss?):\/\//.test(e)||(e=void 0!==r?r.protocol+"//"+e:"https://"+e),n=_e(e)),n.port||(/^(http|ws)$/.test(n.protocol)?n.port="80":/^(http|ws)s$/.test(n.protocol)&&(n.port="443")),n.path=n.path||"/";const o=-1!==n.host.indexOf(":")?"["+n.host+"]":n.host;return n.id=n.protocol+"://"+o+":"+n.port+t,n.href=n.protocol+"://"+o+(r&&r.port===n.port?"":":"+n.port),n}(e,(t=t||{}).path||"/socket.io"),n=r.source,o=r.id,i=r.path,a=Ye[o]&&i in Ye[o].nsps;let s;return t.forceNew||t["force new connection"]||!1===t.multiplex||a?s=new Ve(n,t):(Ye[o]||(Ye[o]=new Ve(n,t)),s=Ye[o]),r.query&&!t.query&&(t.query=r.queryKey),s.socket(r.path,t)}Object.assign(Ke,{Manager:Ve,Socket:We,io:Ke,connect:Ke});var Xe,Ze,Qe=r(65606);const Je=document.getElementById("env-config").textContent,$e=JSON.parse(Je),et={bosLoaderUrl:Qe.env.BOS_LOADER_URL||$e.bosLoaderUrl||"http://127.0.0.1:4040",bosLoaderWs:Qe.env.BOS_LOADER_WS||$e.bosLoaderWs||"ws://127.0.0.1:4040",enableHotReload:null===(Xe=null!==(Ze=Qe.env.ENABLE_HOT_RELOAD)&&void 0!==Ze?Ze:$e.enableHotReload)||void 0===Xe||Xe,network:Qe.env.NETWORK||$e.network||"mainnet"},tt=function(){const[e,t]=(0,o.useState)({components:{},data:{}}),[r,n]=(0,o.useState)(et.enableHotReload);return(0,o.useEffect)((()=>{if(r){const e=Ke("ws://".concat(window.location.host),{reconnectionAttempts:1});return e.on("fileChange",(e=>{console.log("File change detected via WebSocket",e),t(e)})),e.on("connect_error",(()=>{console.warn("WebSocket connection error. Disabling WebSocket"),n(!1),e.disconnect()})),()=>{e.disconnect()}}}),[r]),e};function rt(){return rt=Object.assign?Object.assign.bind():function(e){for(var t=1;t=0&&(t.hash=e.substr(r),e=e.substr(0,r));let n=e.indexOf("?");n>=0&&(t.search=e.substr(n),e=e.substr(0,n)),e&&(t.pathname=e)}return t}var dt;function ft(e,t,r){void 0===r&&(r="/");let n=Tt(("string"==typeof t?ut(t):t).pathname||"/",r);if(null==n)return null;let o=pt(e);!function(e){e.sort(((e,t)=>e.score!==t.score?t.score-e.score:function(e,t){let r=e.length===t.length&&e.slice(0,-1).every(((e,r)=>e===t[r]));return r?e[e.length-1]-t[t.length-1]:0}(e.routesMeta.map((e=>e.childrenIndex)),t.routesMeta.map((e=>e.childrenIndex)))))}(o);let i=null;for(let e=0;null==i&&e{let a={relativePath:void 0===i?e.path||"":i,caseSensitive:!0===e.caseSensitive,childrenIndex:o,route:e};a.relativePath.startsWith("/")&&(it(a.relativePath.startsWith(n),'Absolute route path "'+a.relativePath+'" nested under path "'+n+'" is not valid. An absolute child route path must start with the combined path of all its parent routes.'),a.relativePath=a.relativePath.slice(n.length));let s=Rt([n,a.relativePath]),l=r.concat(a);e.children&&e.children.length>0&&(it(!0!==e.index,'Index routes must not have child routes. Please remove all child routes from route path "'+s+'".'),pt(e.children,t,l,s)),(null!=e.path||e.index)&&t.push({path:s,score:_t(s,e.index),routesMeta:l})};return e.forEach(((e,t)=>{var r;if(""!==e.path&&null!=(r=e.path)&&r.includes("?"))for(let r of ht(e.path))o(e,t,r);else o(e,t)})),t}function ht(e){let t=e.split("/");if(0===t.length)return[];let[r,...n]=t,o=r.endsWith("?"),i=r.replace(/\?$/,"");if(0===n.length)return o?[i,""]:[i];let a=ht(n.join("/")),s=[];return s.push(...a.map((e=>""===e?i:[i,e].join("/")))),o&&s.push(...a),s.map((t=>e.startsWith("/")&&""===t?"/":t))}!function(e){e.data="data",e.deferred="deferred",e.redirect="redirect",e.error="error"}(dt||(dt={})),new Set(["lazy","caseSensitive","path","id","index","children"]);const mt=/^:[\w-]+$/,gt=3,bt=2,vt=1,yt=10,wt=-2,Et=e=>"*"===e;function _t(e,t){let r=e.split("/"),n=r.length;return r.some(Et)&&(n+=wt),t&&(n+=bt),r.filter((e=>!Et(e))).reduce(((e,t)=>e+(mt.test(t)?gt:""===t?vt:yt)),n)}function St(e,t){let{routesMeta:r}=e,n={},o="/",i=[];for(let e=0;e(n.push({paramName:t,isOptional:null!=r}),r?"/?([^\\/]+)?":"/([^\\/]+)")));return e.endsWith("*")?(n.push({paramName:"*"}),o+="*"===e||"/*"===e?"(.*)$":"(?:\\/(.+)|\\/*)$"):r?o+="\\/*$":""!==e&&"/"!==e&&(o+="(?:(?=\\/|$))"),[new RegExp(o,t?void 0:"i"),n]}(e.path,e.caseSensitive,e.end),o=t.match(r);if(!o)return null;let i=o[0],a=i.replace(/(.)\/+$/,"$1"),s=o.slice(1),l=n.reduce(((e,t,r)=>{let{paramName:n,isOptional:o}=t;if("*"===n){let e=s[r]||"";a=i.slice(0,i.length-e.length).replace(/(.)\/+$/,"$1")}const l=s[r];return e[n]=o&&!l?void 0:(l||"").replace(/%2F/g,"/"),e}),{});return{params:l,pathname:i,pathnameBase:a,pattern:e}}function At(e){try{return e.split("/").map((e=>decodeURIComponent(e).replace(/\//g,"%2F"))).join("/")}catch(t){return at(!1,'The URL path "'+e+'" could not be decoded because it is is a malformed URL segment. This is probably due to a bad percent encoding ('+t+")."),e}}function Tt(e,t){if("/"===t)return e;if(!e.toLowerCase().startsWith(t.toLowerCase()))return null;let r=t.endsWith("/")?t.length-1:t.length,n=e.charAt(r);return n&&"/"!==n?null:e.slice(r)||"/"}function Ct(e,t,r,n){return"Cannot include a '"+e+"' character in a manually specified `to."+t+"` field ["+JSON.stringify(n)+"]. Please separate it out to the `to."+r+'` field. Alternatively you may provide the full path as a string in and the router will parse it for you.'}function kt(e,t){let r=function(e){return e.filter(((e,t)=>0===t||e.route.path&&e.route.path.length>0))}(e);return t?r.map(((t,r)=>r===e.length-1?t.pathname:t.pathnameBase)):r.map((e=>e.pathnameBase))}function Ot(e,t,r,n){let o;void 0===n&&(n=!1),"string"==typeof e?o=ut(e):(o=rt({},e),it(!o.pathname||!o.pathname.includes("?"),Ct("?","pathname","search",o)),it(!o.pathname||!o.pathname.includes("#"),Ct("#","pathname","hash",o)),it(!o.search||!o.search.includes("#"),Ct("#","search","hash",o)));let i,a=""===e||""===o.pathname,s=a?"/":o.pathname;if(null==s)i=r;else{let e=t.length-1;if(!n&&s.startsWith("..")){let t=s.split("/");for(;".."===t[0];)t.shift(),e-=1;o.pathname=t.join("/")}i=e>=0?t[e]:"/"}let l=function(e,t){void 0===t&&(t="/");let{pathname:r,search:n="",hash:o=""}="string"==typeof e?ut(e):e,i=r?r.startsWith("/")?r:function(e,t){let r=t.replace(/\/+$/,"").split("/");return e.split("/").forEach((e=>{".."===e?r.length>1&&r.pop():"."!==e&&r.push(e)})),r.length>1?r.join("/"):"/"}(r,t):t;return{pathname:i,search:It(n),hash:Mt(o)}}(o,i),c=s&&"/"!==s&&s.endsWith("/"),u=(a||"."===s)&&r.endsWith("/");return l.pathname.endsWith("/")||!c&&!u||(l.pathname+="/"),l}const Rt=e=>e.join("/").replace(/\/\/+/g,"/"),Nt=e=>e.replace(/\/+$/,"").replace(/^\/*/,"/"),It=e=>e&&"?"!==e?e.startsWith("?")?e:"?"+e:"",Mt=e=>e&&"#"!==e?e.startsWith("#")?e:"#"+e:"";Error;const Pt=["post","put","patch","delete"],Dt=(new Set(Pt),["get",...Pt]);function Lt(){return Lt=Object.assign?Object.assign.bind():function(e){for(var t=1;t{r.current=!0}));let n=o.useCallback((function(n,o){void 0===o&&(o={}),r.current&&("number"==typeof n?e.navigate(n):e.navigate(n,Lt({fromRouteId:t},o)))}),[e,t]);return n}():function(){Gt()||it(!1);let e=o.useContext(Ft),{basename:t,future:r,navigator:n}=o.useContext(Ut),{matches:i}=o.useContext(zt),{pathname:a}=Wt(),s=JSON.stringify(kt(i,r.v7_relativeSplatPath)),l=o.useRef(!1);qt((()=>{l.current=!0}));let c=o.useCallback((function(r,o){if(void 0===o&&(o={}),!l.current)return;if("number"==typeof r)return void n.go(r);let i=Ot(r,JSON.parse(s),a,"path"===o.relative);null==e&&"/"!==t&&(i.pathname="/"===i.pathname?t:Rt([t,i.pathname])),(o.replace?n.replace:n.push)(i,o.state,o)}),[t,n,s,a,e]);return c}()}function Yt(e,t){let{relative:r}=void 0===t?{}:t,{future:n}=o.useContext(Ut),{matches:i}=o.useContext(zt),{pathname:a}=Wt(),s=JSON.stringify(kt(i,n.v7_relativeSplatPath));return o.useMemo((()=>Ot(e,JSON.parse(s),a,"path"===r)),[e,s,a,r])}function Kt(e,t,r,n){Gt()||it(!1);let{navigator:i}=o.useContext(Ut),{matches:a}=o.useContext(zt),s=a[a.length-1],l=s?s.params:{},c=(s&&s.pathname,s?s.pathnameBase:"/");s&&s.route;let u,d=Wt();if(t){var f;let e="string"==typeof t?ut(t):t;"/"===c||(null==(f=e.pathname)?void 0:f.startsWith(c))||it(!1),u=e}else u=d;let p=u.pathname||"/",h=p;if("/"!==c){let e=c.replace(/^\//,"").split("/");h="/"+p.replace(/^\//,"").split("/").slice(e.length).join("/")}let m=ft(e,{pathname:h}),g=function(e,t,r,n){var i;if(void 0===t&&(t=[]),void 0===r&&(r=null),void 0===n&&(n=null),null==e){var a;if(null==(a=r)||!a.errors)return null;e=r.matches}let s=e,l=null==(i=r)?void 0:i.errors;if(null!=l){let e=s.findIndex((e=>e.route.id&&(null==l?void 0:l[e.route.id])));e>=0||it(!1),s=s.slice(0,Math.min(s.length,e+1))}let c=!1,u=-1;if(r&&n&&n.v7_partialHydration)for(let e=0;e=0?s.slice(0,u+1):[s[0]];break}}}return s.reduceRight(((e,n,i)=>{let a,d=!1,f=null,p=null;r&&(a=l&&n.route.id?l[n.route.id]:void 0,f=n.route.errorElement||Zt,c&&(u<0&&0===i?(function(e,t,r){!1||rr[e]||(rr[e]=!0)}("route-fallback"),d=!0,p=null):u===i&&(d=!0,p=n.route.hydrateFallbackElement||null)));let h=t.concat(s.slice(0,i+1)),m=()=>{let t;return t=a?f:d?p:n.route.Component?o.createElement(n.route.Component,null):n.route.element?n.route.element:e,o.createElement(Jt,{match:n,routeContext:{outlet:e,matches:h,isDataRoute:null!=r},children:t})};return r&&(n.route.ErrorBoundary||n.route.errorElement||0===i)?o.createElement(Qt,{location:r.location,revalidation:r.revalidation,component:f,error:a,children:m(),routeContext:{outlet:null,matches:h,isDataRoute:!0}}):m()}),null)}(m&&m.map((e=>Object.assign({},e,{params:Object.assign({},l,e.params),pathname:Rt([c,i.encodeLocation?i.encodeLocation(e.pathname).pathname:e.pathname]),pathnameBase:"/"===e.pathnameBase?c:Rt([c,i.encodeLocation?i.encodeLocation(e.pathnameBase).pathname:e.pathnameBase])}))),a,r,n);return t&&g?o.createElement(jt.Provider,{value:{location:Lt({pathname:"/",search:"",hash:"",state:null,key:"default"},u),navigationType:nt.Pop}},g):g}function Xt(){let e=function(){var e;let t=o.useContext(Ht),r=function(e){let t=o.useContext(Bt);return t||it(!1),t}(er.UseRouteError),n=tr(er.UseRouteError);return void 0!==t?t:null==(e=r.errors)?void 0:e[n]}(),t=function(e){return null!=e&&"number"==typeof e.status&&"string"==typeof e.statusText&&"boolean"==typeof e.internal&&"data"in e}(e)?e.status+" "+e.statusText:e instanceof Error?e.message:JSON.stringify(e),r=e instanceof Error?e.stack:null,n={padding:"0.5rem",backgroundColor:"rgba(200,200,200, 0.5)"};return o.createElement(o.Fragment,null,o.createElement("h2",null,"Unexpected Application Error!"),o.createElement("h3",{style:{fontStyle:"italic"}},t),r?o.createElement("pre",{style:n},r):null,null)}const Zt=o.createElement(Xt,null);class Qt extends o.Component{constructor(e){super(e),this.state={location:e.location,revalidation:e.revalidation,error:e.error}}static getDerivedStateFromError(e){return{error:e}}static getDerivedStateFromProps(e,t){return t.location!==e.location||"idle"!==t.revalidation&&"idle"===e.revalidation?{error:e.error,location:e.location,revalidation:e.revalidation}:{error:void 0!==e.error?e.error:t.error,location:t.location,revalidation:e.revalidation||t.revalidation}}componentDidCatch(e,t){console.error("React Router caught the following error during render",e,t)}render(){return void 0!==this.state.error?o.createElement(zt.Provider,{value:this.props.routeContext},o.createElement(Ht.Provider,{value:this.state.error,children:this.props.component})):this.props.children}}function Jt(e){let{routeContext:t,match:r,children:n}=e,i=o.useContext(Ft);return i&&i.static&&i.staticContext&&(r.route.errorElement||r.route.ErrorBoundary)&&(i.staticContext._deepestRenderedBoundaryId=r.route.id),o.createElement(zt.Provider,{value:t},n)}var $t=function(e){return e.UseBlocker="useBlocker",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e}($t||{}),er=function(e){return e.UseBlocker="useBlocker",e.UseLoaderData="useLoaderData",e.UseActionData="useActionData",e.UseRouteError="useRouteError",e.UseNavigation="useNavigation",e.UseRouteLoaderData="useRouteLoaderData",e.UseMatches="useMatches",e.UseRevalidator="useRevalidator",e.UseNavigateStable="useNavigate",e.UseRouteId="useRouteId",e}(er||{});function tr(e){let t=function(e){let t=o.useContext(zt);return t||it(!1),t}(),r=t.matches[t.matches.length-1];return r.route.id||it(!1),r.route.id}const rr={};function nr(e){it(!1)}function or(e){let{basename:t="/",children:r=null,location:n,navigationType:i=nt.Pop,navigator:a,static:s=!1,future:l}=e;Gt()&&it(!1);let c=t.replace(/^\/*/,"/"),u=o.useMemo((()=>({basename:c,navigator:a,static:s,future:Lt({v7_relativeSplatPath:!1},l)})),[c,l,a,s]);"string"==typeof n&&(n=ut(n));let{pathname:d="/",search:f="",hash:p="",state:h=null,key:m="default"}=n,g=o.useMemo((()=>{let e=Tt(d,c);return null==e?null:{location:{pathname:e,search:f,hash:p,state:h,key:m},navigationType:i}}),[c,d,f,p,h,m,i]);return null==g?null:o.createElement(Ut.Provider,{value:u},o.createElement(jt.Provider,{children:r,value:g}))}function ir(e){let{children:t,location:r}=e;return Kt(ar(t),r)}function ar(e,t){void 0===t&&(t=[]);let r=[];return o.Children.forEach(e,((e,n)=>{if(!o.isValidElement(e))return;let i=[...t,n];if(e.type===o.Fragment)return void r.push.apply(r,ar(e.props.children,i));e.type!==nr&&it(!1),e.props.index&&e.props.children&&it(!1);let a={id:e.props.id||i.join("-"),caseSensitive:e.props.caseSensitive,element:e.props.element,Component:e.props.Component,index:e.props.index,path:e.props.path,loader:e.props.loader,action:e.props.action,errorElement:e.props.errorElement,ErrorBoundary:e.props.ErrorBoundary,hasErrorBoundary:null!=e.props.ErrorBoundary||null!=e.props.errorElement,shouldRevalidate:e.props.shouldRevalidate,handle:e.props.handle,lazy:e.props.lazy};e.props.children&&(a.children=ar(e.props.children,i)),r.push(a)})),r}i.startTransition,new Promise((()=>{})),o.Component;var sr=r(40961),lr=r.t(sr,2);function cr(){return cr=Object.assign?Object.assign.bind():function(e){for(var t=1;t{o.removeEventListener(ot,d),l=null}},createHref:e=>t(o,e),createURL:f,encodeLocation(e){let t=f(e);return{pathname:t.pathname,search:t.search,hash:t.hash}},push:function(e,t){s=nt.Push;let n=lt(p.location,e,t);r&&r(n,e),c=u()+1;let d=st(n,c),f=p.createHref(n);try{a.pushState(d,"",f)}catch(e){if(e instanceof DOMException&&"DataCloneError"===e.name)throw e;o.location.assign(f)}i&&l&&l({action:s,location:p.location,delta:1})},replace:function(e,t){s=nt.Replace;let n=lt(p.location,e,t);r&&r(n,e),c=u();let o=st(n,c),d=p.createHref(n);a.replaceState(o,"",d),i&&l&&l({action:s,location:p.location,delta:0})},go:e=>a.go(e)};return p}((function(e,t){let{pathname:r,search:n,hash:o}=e.location;return lt("",{pathname:r,search:n,hash:o},t.state&&t.state.usr||null,t.state&&t.state.key||"default")}),(function(e,t){return"string"==typeof t?t:ct(t)}),null,e)}({window:i,v5Compat:!0}));let s=a.current,[l,c]=o.useState({action:s.action,location:s.location}),{v7_startTransition:u}=n||{},d=o.useCallback((e=>{u&&dr?dr((()=>c(e))):c(e)}),[c,u]);return o.useLayoutEffect((()=>s.listen(d)),[s,d]),o.createElement(or,{basename:t,children:r,location:l.location,navigationType:l.action,navigator:s,future:n})}lr.flushSync,i.useId;const pr="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,hr=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,mr=o.forwardRef((function(e,t){let r,{onClick:n,relative:i,reloadDocument:a,replace:s,state:l,target:c,to:u,preventScrollReset:d,unstable_viewTransition:f}=e,p=function(e,t){if(null==e)return{};var r,n,o={},i=Object.keys(e);for(n=0;n=0||(o[r]=e[r]);return o}(e,ur),{basename:h}=o.useContext(Ut),m=!1;if("string"==typeof u&&hr.test(u)&&(r=u,pr))try{let e=new URL(window.location.href),t=u.startsWith("//")?new URL(e.protocol+u):new URL(u),r=Tt(t.pathname,h);t.origin===e.origin&&null!=r?u=r+t.search+t.hash:m=!0}catch(e){}let g=function(e,t){let{relative:r}=void 0===t?{}:t;Gt()||it(!1);let{basename:n,navigator:i}=o.useContext(Ut),{hash:a,pathname:s,search:l}=Yt(e,{relative:r}),c=s;return"/"!==n&&(c="/"===s?n:Rt([n,s])),i.createHref({pathname:c,search:l,hash:a})}(u,{relative:i}),b=function(e,t){let{target:r,replace:n,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:l}=void 0===t?{}:t,c=Vt(),u=Wt(),d=Yt(e,{relative:s});return o.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,r)){t.preventDefault();let r=void 0!==n?n:ct(u)===ct(d);c(e,{replace:r,state:i,preventScrollReset:a,relative:s,unstable_viewTransition:l})}}),[u,c,d,n,i,r,e,a,s,l])}(u,{replace:s,state:l,target:c,preventScrollReset:d,relative:i,unstable_viewTransition:f});return o.createElement("a",cr({},p,{href:r||g,onClick:m||a?n:function(e){n&&n(e),e.defaultPrevented||b(e)},ref:t,target:c}))}));var gr,br;(function(e){e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState"})(gr||(gr={})),function(e){e.UseFetcher="useFetcher",e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration"}(br||(br={}));var vr=r(75479),yr=r.t(vr,2),wr=r(37007),Er=r(49426),_r=r(27291),Sr=r(92908),xr=r(64878);r(92755),r(71312);var Ar=r(48287).Buffer;function Tr(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;class Cr{constructor(e){this.provider=new vr.providers.JsonRpcProvider({url:e})}query(e){return this.provider.query(e)}viewAccessKey({accountId:e,publicKey:t}){return this.query({request_type:"view_access_key",finality:"final",account_id:e,public_key:t})}block(e){return this.provider.block(e)}sendTransaction(e){return this.provider.sendTransaction(e)}}class kr{constructor(e,t){this.storage=e,this.namespace=Array.isArray(t)?t.join(":"):t}resolveKey(e){return[this.namespace,e].join(":")}getItem(e){return this.storage.getItem(this.resolveKey(e)).then((e=>"string"==typeof e?JSON.parse(e):null))}setItem(e,t){return this.storage.setItem(this.resolveKey(e),JSON.stringify(t))}removeItem(e){return this.storage.removeItem(this.resolveKey(e))}}var Or="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},Rr=function(e){return e&&e.Math==Math&&e},Nr=Rr("object"==typeof globalThis&&globalThis)||Rr("object"==typeof window&&window)||Rr("object"==typeof self&&self)||Rr("object"==typeof Or&&Or)||function(){return this}()||Function("return this")(),Ir={},Mr=function(e){try{return!!e()}catch(e){return!0}},Pr=!Mr((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),Dr=!Mr((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),Lr=Dr,Fr=Function.prototype.call,Br=Lr?Fr.bind(Fr):function(){return Fr.apply(Fr,arguments)},Ur={},jr={}.propertyIsEnumerable,zr=Object.getOwnPropertyDescriptor,Hr=zr&&!jr.call({1:2},1);Ur.f=Hr?function(e){var t=zr(this,e);return!!t&&t.enumerable}:jr;var Gr,Wr,qr=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},Vr=Dr,Yr=Function.prototype,Kr=Yr.bind,Xr=Yr.call,Zr=Vr&&Kr.bind(Xr,Xr),Qr=Vr?function(e){return e&&Zr(e)}:function(e){return e&&function(){return Xr.apply(e,arguments)}},Jr=Qr,$r=Jr({}.toString),en=Jr("".slice),tn=function(e){return en($r(e),8,-1)},rn=Mr,nn=tn,on=Object,an=Qr("".split),sn=rn((function(){return!on("z").propertyIsEnumerable(0)}))?function(e){return"String"==nn(e)?an(e,""):on(e)}:on,ln=TypeError,cn=function(e){if(null==e)throw ln("Can't call method on "+e);return e},un=sn,dn=cn,fn=function(e){return un(dn(e))},pn=function(e){return"function"==typeof e},hn=pn,mn=function(e){return"object"==typeof e?null!==e:hn(e)},gn=Nr,bn=pn,vn=function(e,t){return arguments.length<2?(r=gn[e],bn(r)?r:void 0):gn[e]&&gn[e][t];var r},yn=Qr({}.isPrototypeOf),wn=vn("navigator","userAgent")||"",En=Nr,_n=wn,Sn=En.process,xn=En.Deno,An=Sn&&Sn.versions||xn&&xn.version,Tn=An&&An.v8;Tn&&(Wr=(Gr=Tn.split("."))[0]>0&&Gr[0]<4?1:+(Gr[0]+Gr[1])),!Wr&&_n&&(!(Gr=_n.match(/Edge\/(\d+)/))||Gr[1]>=74)&&(Gr=_n.match(/Chrome\/(\d+)/))&&(Wr=+Gr[1]);var Cn=Wr,kn=Cn,On=Mr,Rn=!!Object.getOwnPropertySymbols&&!On((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&kn&&kn<41})),Nn=Rn&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,In=vn,Mn=pn,Pn=yn,Dn=Object,Ln=Nn?function(e){return"symbol"==typeof e}:function(e){var t=In("Symbol");return Mn(t)&&Pn(t.prototype,Dn(e))},Fn=String,Bn=function(e){try{return Fn(e)}catch(e){return"Object"}},Un=pn,jn=Bn,zn=TypeError,Hn=function(e){if(Un(e))return e;throw zn(jn(e)+" is not a function")},Gn=Hn,Wn=function(e,t){var r=e[t];return null==r?void 0:Gn(r)},qn=Br,Vn=pn,Yn=mn,Kn=TypeError,Xn={exports:{}},Zn=Nr,Qn=Object.defineProperty,Jn=function(e,t){try{Qn(Zn,e,{value:t,configurable:!0,writable:!0})}catch(r){Zn[e]=t}return t},$n=Jn,eo="__core-js_shared__",to=Nr[eo]||$n(eo,{}),ro=to;(Xn.exports=function(e,t){return ro[e]||(ro[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"});var no=cn,oo=Object,io=function(e){return oo(no(e))},ao=io,so=Qr({}.hasOwnProperty),lo=Object.hasOwn||function(e,t){return so(ao(e),t)},co=Qr,uo=0,fo=Math.random(),po=co(1..toString),ho=function(e){return"Symbol("+(void 0===e?"":e)+")_"+po(++uo+fo,36)},mo=Nr,go=Xn.exports,bo=lo,vo=ho,yo=Rn,wo=Nn,Eo=go("wks"),_o=mo.Symbol,So=_o&&_o.for,xo=wo?_o:_o&&_o.withoutSetter||vo,Ao=function(e){if(!bo(Eo,e)||!yo&&"string"!=typeof Eo[e]){var t="Symbol."+e;yo&&bo(_o,e)?Eo[e]=_o[e]:Eo[e]=wo&&So?So(t):xo(t)}return Eo[e]},To=Br,Co=mn,ko=Ln,Oo=Wn,Ro=TypeError,No=Ao("toPrimitive"),Io=function(e,t){if(!Co(e)||ko(e))return e;var r,n=Oo(e,No);if(n){if(void 0===t&&(t="default"),r=To(n,e,t),!Co(r)||ko(r))return r;throw Ro("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&Vn(r=e.toString)&&!Yn(n=qn(r,e)))return n;if(Vn(r=e.valueOf)&&!Yn(n=qn(r,e)))return n;if("string"!==t&&Vn(r=e.toString)&&!Yn(n=qn(r,e)))return n;throw Kn("Can't convert object to primitive value")}(e,t)},Mo=Io,Po=Ln,Do=function(e){var t=Mo(e,"string");return Po(t)?t:t+""},Lo=mn,Fo=Nr.document,Bo=Lo(Fo)&&Lo(Fo.createElement),Uo=function(e){return Bo?Fo.createElement(e):{}},jo=Uo,zo=!Pr&&!Mr((function(){return 7!=Object.defineProperty(jo("div"),"a",{get:function(){return 7}}).a})),Ho=Pr,Go=Br,Wo=Ur,qo=qr,Vo=fn,Yo=Do,Ko=lo,Xo=zo,Zo=Object.getOwnPropertyDescriptor;Ir.f=Ho?Zo:function(e,t){if(e=Vo(e),t=Yo(t),Xo)try{return Zo(e,t)}catch(e){}if(Ko(e,t))return qo(!Go(Wo.f,e,t),e[t])};var Qo={},Jo=Pr&&Mr((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),$o=mn,ei=String,ti=TypeError,ri=function(e){if($o(e))return e;throw ti(ei(e)+" is not an object")},ni=Pr,oi=zo,ii=Jo,ai=ri,si=Do,li=TypeError,ci=Object.defineProperty,ui=Object.getOwnPropertyDescriptor,di="enumerable",fi="configurable",pi="writable";Qo.f=ni?ii?function(e,t,r){if(ai(e),t=si(t),ai(r),"function"==typeof e&&"prototype"===t&&"value"in r&&pi in r&&!r[pi]){var n=ui(e,t);n&&n[pi]&&(e[t]=r.value,r={configurable:fi in r?r[fi]:n[fi],enumerable:di in r?r[di]:n[di],writable:!1})}return ci(e,t,r)}:ci:function(e,t,r){if(ai(e),t=si(t),ai(r),oi)try{return ci(e,t,r)}catch(e){}if("get"in r||"set"in r)throw li("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var hi=Qo,mi=qr,gi=Pr?function(e,t,r){return hi.f(e,t,mi(1,r))}:function(e,t,r){return e[t]=r,e},bi={exports:{}},vi=Pr,yi=lo,wi=Function.prototype,Ei=vi&&Object.getOwnPropertyDescriptor,_i=yi(wi,"name"),Si={EXISTS:_i,PROPER:_i&&"something"===function(){}.name,CONFIGURABLE:_i&&(!vi||vi&&Ei(wi,"name").configurable)},xi=pn,Ai=to,Ti=Qr(Function.toString);xi(Ai.inspectSource)||(Ai.inspectSource=function(e){return Ti(e)});var Ci,ki,Oi,Ri=Ai.inspectSource,Ni=pn,Ii=Ri,Mi=Nr.WeakMap,Pi=Ni(Mi)&&/native code/.test(Ii(Mi)),Di=Xn.exports,Li=ho,Fi=Di("keys"),Bi=function(e){return Fi[e]||(Fi[e]=Li(e))},Ui={},ji=Pi,zi=Nr,Hi=Qr,Gi=mn,Wi=gi,qi=lo,Vi=to,Yi=Bi,Ki=Ui,Xi="Object already initialized",Zi=zi.TypeError,Qi=zi.WeakMap;if(ji||Vi.state){var Ji=Vi.state||(Vi.state=new Qi),$i=Hi(Ji.get),ea=Hi(Ji.has),ta=Hi(Ji.set);Ci=function(e,t){if(ea(Ji,e))throw new Zi(Xi);return t.facade=e,ta(Ji,e,t),t},ki=function(e){return $i(Ji,e)||{}},Oi=function(e){return ea(Ji,e)}}else{var ra=Yi("state");Ki[ra]=!0,Ci=function(e,t){if(qi(e,ra))throw new Zi(Xi);return t.facade=e,Wi(e,ra,t),t},ki=function(e){return qi(e,ra)?e[ra]:{}},Oi=function(e){return qi(e,ra)}}var na={set:Ci,get:ki,has:Oi,enforce:function(e){return Oi(e)?ki(e):Ci(e,{})},getterFor:function(e){return function(t){var r;if(!Gi(t)||(r=ki(t)).type!==e)throw Zi("Incompatible receiver, "+e+" required");return r}}},oa=Mr,ia=pn,aa=lo,sa=Pr,la=Si.CONFIGURABLE,ca=Ri,ua=na.enforce,da=na.get,fa=Object.defineProperty,pa=sa&&!oa((function(){return 8!==fa((function(){}),"length",{value:8}).length})),ha=String(String).split("String"),ma=bi.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!aa(e,"name")||la&&e.name!==t)&&(sa?fa(e,"name",{value:t,configurable:!0}):e.name=t),pa&&r&&aa(r,"arity")&&e.length!==r.arity&&fa(e,"length",{value:r.arity});try{r&&aa(r,"constructor")&&r.constructor?sa&&fa(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=ua(e);return aa(n,"source")||(n.source=ha.join("string"==typeof t?t:"")),e};Function.prototype.toString=ma((function(){return ia(this)&&da(this).source||ca(this)}),"toString");var ga=pn,ba=Qo,va=bi.exports,ya=Jn,wa=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(ga(r)&&va(r,i,n),n.global)o?e[t]=r:ya(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:ba.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},Ea={},_a=Math.ceil,Sa=Math.floor,xa=Math.trunc||function(e){var t=+e;return(t>0?Sa:_a)(t)},Aa=function(e){var t=+e;return t!=t||0===t?0:xa(t)},Ta=Aa,Ca=Math.max,ka=Math.min,Oa=function(e,t){var r=Ta(e);return r<0?Ca(r+t,0):ka(r,t)},Ra=Aa,Na=Math.min,Ia=function(e){return e>0?Na(Ra(e),9007199254740991):0},Ma=Ia,Pa=function(e){return Ma(e.length)},Da=fn,La=Oa,Fa=Pa,Ba=function(e){return function(t,r,n){var o,i=Da(t),a=Fa(i),s=La(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},Ua={includes:Ba(!0),indexOf:Ba(!1)},ja=lo,za=fn,Ha=Ua.indexOf,Ga=Ui,Wa=Qr([].push),qa=function(e,t){var r,n=za(e),o=0,i=[];for(r in n)!ja(Ga,r)&&ja(n,r)&&Wa(i,r);for(;t.length>o;)ja(n,r=t[o++])&&(~Ha(i,r)||Wa(i,r));return i},Va=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],Ya=qa,Ka=Va.concat("length","prototype");Ea.f=Object.getOwnPropertyNames||function(e){return Ya(e,Ka)};var Xa={};Xa.f=Object.getOwnPropertySymbols;var Za=vn,Qa=Ea,Ja=Xa,$a=ri,es=Qr([].concat),ts=Za("Reflect","ownKeys")||function(e){var t=Qa.f($a(e)),r=Ja.f;return r?es(t,r(e)):t},rs=lo,ns=ts,os=Ir,is=Qo,as=Mr,ss=pn,ls=/#|\.prototype\./,cs=function(e,t){var r=ds[us(e)];return r==ps||r!=fs&&(ss(t)?as(t):!!t)},us=cs.normalize=function(e){return String(e).replace(ls,".").toLowerCase()},ds=cs.data={},fs=cs.NATIVE="N",ps=cs.POLYFILL="P",hs=cs,ms=Nr,gs=Ir.f,bs=gi,vs=wa,ys=Jn,ws=function(e,t,r){for(var n=ns(t),o=is.f,i=os.f,a=0;a=51&&/native code/.test(e))return!1;var r=new jc((function(e){e(1)})),n=function(e){e((function(){}),(function(){}))};return(r.constructor={})[Yc]=n,!(Kc=r.then((function(){}))instanceof n)||!t&&qc&&!Xc})),Qc={CONSTRUCTOR:Zc,REJECTION_EVENT:Xc,SUBCLASSING:Kc},Jc={},$c=Hn,eu=function(e){var t,r;this.promise=new e((function(e,n){if(void 0!==t||void 0!==r)throw TypeError("Bad Promise constructor");t=e,r=n})),this.resolve=$c(t),this.reject=$c(r)};Jc.f=function(e){return new eu(e)};var tu,ru,nu,ou=_s,iu=Ss,au=Nr,su=Br,lu=wa,cu=Os,uu=Ms,du=Bs,fu=Hn,pu=pn,hu=mn,mu=zs,gu=El,bu=hc.set,vu=Ic,yu=Pc,wu=Lc,Eu=na,_u=Fc,Su=Jc,xu="Promise",Au=Qc.CONSTRUCTOR,Tu=Qc.REJECTION_EVENT,Cu=Qc.SUBCLASSING,ku=Eu.getterFor(xu),Ou=Eu.set,Ru=_u&&_u.prototype,Nu=_u,Iu=Ru,Mu=au.TypeError,Pu=au.document,Du=au.process,Lu=Su.f,Fu=Lu,Bu=!!(Pu&&Pu.createEvent&&au.dispatchEvent),Uu="unhandledrejection",ju=function(e){var t;return!(!hu(e)||!pu(t=e.then))&&t},zu=function(e,t){var r,n,o,i=t.value,a=1==t.state,s=a?e.ok:e.fail,l=e.resolve,c=e.reject,u=e.domain;try{s?(a||(2===t.rejection&&Vu(t),t.rejection=1),!0===s?r=i:(u&&u.enter(),r=s(i),u&&(u.exit(),o=!0)),r===e.promise?c(Mu("Promise-chain cycle")):(n=ju(r))?su(n,r,l,c):l(r)):c(i)}catch(e){u&&!o&&u.exit(),c(e)}},Hu=function(e,t){e.notified||(e.notified=!0,vu((function(){for(var r,n=e.reactions;r=n.get();)zu(r,e);e.notified=!1,t&&!e.rejection&&Wu(e)})))},Gu=function(e,t,r){var n,o;Bu?((n=Pu.createEvent("Event")).promise=t,n.reason=r,n.initEvent(e,!1,!0),au.dispatchEvent(n)):n={promise:t,reason:r},!Tu&&(o=au["on"+e])?o(n):e===Uu&&function(e,t){var r=Mc.console;r&&r.error&&(1==arguments.length?r.error(e):r.error(e,t))}("Unhandled promise rejection",r)},Wu=function(e){su(bu,au,(function(){var t,r=e.facade,n=e.value;if(qu(e)&&(t=yu((function(){iu?Du.emit("unhandledRejection",n,r):Gu(Uu,r,n)})),e.rejection=iu||qu(e)?2:1,t.error))throw t.value}))},qu=function(e){return 1!==e.rejection&&!e.parent},Vu=function(e){su(bu,au,(function(){var t=e.facade;iu?Du.emit("rejectionHandled",t):Gu("rejectionhandled",t,e.value)}))},Yu=function(e,t,r){return function(n){e(t,n,r)}},Ku=function(e,t,r){e.done||(e.done=!0,r&&(e=r),e.value=t,e.state=2,Hu(e,!0))},Xu=function(e,t,r){if(!e.done){e.done=!0,r&&(e=r);try{if(e.facade===t)throw Mu("Promise can't be resolved itself");var n=ju(t);n?vu((function(){var r={done:!1};try{su(n,t,Yu(Xu,r,e),Yu(Ku,r,e))}catch(t){Ku(r,t,e)}})):(e.value=t,e.state=1,Hu(e,!1))}catch(t){Ku({done:!1},t,e)}}};if(Au&&(Iu=(Nu=function(e){mu(this,Iu),fu(e),su(tu,this);var t=ku(this);try{e(Yu(Xu,t),Yu(Ku,t))}catch(e){Ku(t,e)}}).prototype,(tu=function(e){Ou(this,{type:xu,done:!1,notified:!1,parent:!1,reactions:new wu,rejection:!1,state:0,value:void 0})}).prototype=lu(Iu,"then",(function(e,t){var r=ku(this),n=Lu(gu(this,Nu));return r.parent=!0,n.ok=!pu(e)||e,n.fail=pu(t)&&t,n.domain=iu?Du.domain:void 0,0==r.state?r.reactions.add(n):vu((function(){zu(n,r)})),n.promise})),ru=function(){var e=new tu,t=ku(e);this.promise=e,this.resolve=Yu(Xu,t),this.reject=Yu(Ku,t)},Su.f=Lu=function(e){return e===Nu||void 0===e?new ru(e):Fu(e)},pu(_u)&&Ru!==Object.prototype)){nu=Ru.then,Cu||lu(Ru,"then",(function(e,t){var r=this;return new Nu((function(e,t){su(nu,r,e,t)})).then(e,t)}),{unsafe:!0});try{delete Ru.constructor}catch(e){}cu&&cu(Ru,Iu)}ou({global:!0,constructor:!0,wrap:!0,forced:Au},{Promise:Nu}),uu(Nu,xu,!1),du(xu);var Zu={},Qu=Zu,Ju=Ao("iterator"),$u=Array.prototype,ed=function(e){return void 0!==e&&(Qu.Array===e||$u[Ju]===e)},td=Xs,rd=Wn,nd=Zu,od=Ao("iterator"),id=function(e){if(null!=e)return rd(e,od)||rd(e,"@@iterator")||nd[td(e)]},ad=Br,sd=Hn,ld=ri,cd=Bn,ud=id,dd=TypeError,fd=function(e,t){var r=arguments.length<2?ud(e):t;if(sd(r))return ld(ad(r,e));throw dd(cd(e)+" is not iterable")},pd=Br,hd=ri,md=Wn,gd=Rl,bd=Br,vd=ri,yd=Bn,wd=ed,Ed=Pa,_d=yn,Sd=fd,xd=id,Ad=function(e,t,r){var n,o;hd(e);try{if(!(n=md(e,"return"))){if("throw"===t)throw r;return r}n=pd(n,e)}catch(e){o=!0,n=e}if("throw"===t)throw r;if(o)throw n;return hd(n),r},Td=TypeError,Cd=function(e,t){this.stopped=e,this.result=t},kd=Cd.prototype,Od=function(e,t,r){var n,o,i,a,s,l,c,u=r&&r.that,d=!(!r||!r.AS_ENTRIES),f=!(!r||!r.IS_ITERATOR),p=!(!r||!r.INTERRUPTED),h=gd(t,u),m=function(e){return n&&Ad(n,"normal",e),new Cd(!0,e)},g=function(e){return d?(vd(e),p?h(e[0],e[1],m):h(e[0],e[1])):p?h(e,m):h(e)};if(f)n=e;else{if(!(o=xd(e)))throw Td(yd(e)+" is not iterable");if(wd(o)){for(i=0,a=Ed(e);a>i;i++)if((s=g(e[i]))&&_d(kd,s))return s;return new Cd(!1)}n=Sd(e,o)}for(l=n.next;!(c=bd(l,n)).done;){try{s=g(c.value)}catch(e){Ad(n,"throw",e)}if("object"==typeof s&&s&&_d(kd,s))return s}return new Cd(!1)},Rd=Ao("iterator"),Nd=!1;try{var Id=0,Md={next:function(){return{done:!!Id++}},return:function(){Nd=!0}};Md[Rd]=function(){return this},Array.from(Md,(function(){throw 2}))}catch(e){}var Pd=function(e,t){if(!t&&!Nd)return!1;var r=!1;try{var n={};n[Rd]=function(){return{next:function(){return{done:r=!0}}}},e(n)}catch(e){}return r},Dd=Fc,Ld=Qc.CONSTRUCTOR||!Pd((function(e){Dd.all(e).then(void 0,(function(){}))})),Fd=Br,Bd=Hn,Ud=Jc,jd=Pc,zd=Od;_s({target:"Promise",stat:!0,forced:Ld},{all:function(e){var t=this,r=Ud.f(t),n=r.resolve,o=r.reject,i=jd((function(){var r=Bd(t.resolve),i=[],a=0,s=1;zd(e,(function(e){var l=a++,c=!1;s++,Fd(r,t,e).then((function(e){c||(c=!0,i[l]=e,--s||n(i))}),o)})),--s||n(i)}));return i.error&&o(i.value),r.promise}});var Hd=_s,Gd=Qc.CONSTRUCTOR,Wd=Fc,qd=vn,Vd=pn,Yd=wa,Kd=Wd&&Wd.prototype;if(Hd({target:"Promise",proto:!0,forced:Gd,real:!0},{catch:function(e){return this.then(void 0,e)}}),Vd(Wd)){var Xd=qd("Promise").prototype.catch;Kd.catch!==Xd&&Yd(Kd,"catch",Xd,{unsafe:!0})}var Zd=Br,Qd=Hn,Jd=Jc,$d=Pc,ef=Od;_s({target:"Promise",stat:!0,forced:Ld},{race:function(e){var t=this,r=Jd.f(t),n=r.reject,o=$d((function(){var o=Qd(t.resolve);ef(e,(function(e){Zd(o,t,e).then(r.resolve,n)}))}));return o.error&&n(o.value),r.promise}});var tf=Br,rf=Jc;_s({target:"Promise",stat:!0,forced:Qc.CONSTRUCTOR},{reject:function(e){var t=rf.f(this);return tf(t.reject,void 0,e),t.promise}});var nf=ri,of=mn,af=Jc,sf=_s,lf=Qc.CONSTRUCTOR;vn("Promise"),sf({target:"Promise",stat:!0,forced:lf},{resolve:function(e){return function(e,t){if(nf(e),of(t)&&t.constructor===e)return t;var r=af.f(e);return(0,r.resolve)(t),r.promise}(this,e)}});class cf{getItem(e){return new Promise((t=>{t(localStorage.getItem(e))}))}setItem(e,t){return new Promise((r=>{localStorage.setItem(e,t),r()}))}removeItem(e){return new Promise((t=>{localStorage.removeItem(e),t()}))}}var uf={},df=qa,ff=Va,pf=Object.keys||function(e){return df(e,ff)},hf=Pr,mf=Jo,gf=Qo,bf=ri,vf=fn,yf=pf;uf.f=hf&&!mf?Object.defineProperties:function(e,t){bf(e);for(var r,n=vf(t),o=yf(t),i=o.length,a=0;i>a;)gf.f(e,r=o[a++],n[r]);return e};var wf,Ef=ri,_f=uf,Sf=Va,xf=Ui,Af=Nl,Tf=Uo,Cf="prototype",kf="script",Of=Bi("IE_PROTO"),Rf=function(){},Nf=function(e){return"<"+kf+">"+e+""+kf+">"},If=function(e){e.write(Nf("")),e.close();var t=e.parentWindow.Object;return e=null,t},Mf=function(){try{wf=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;Mf="undefined"!=typeof document?document.domain&&wf?If(wf):(t=Tf("iframe"),r="java"+kf+":",t.style.display="none",Af.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(Nf("document.F=Object")),e.close(),e.F):If(wf);for(var n=Sf.length;n--;)delete Mf[Cf][Sf[n]];return Mf()};xf[Of]=!0;var Pf=Object.create||function(e,t){var r;return null!==e?(Rf[Cf]=Ef(e),r=new Rf,Rf[Cf]=null,r[Of]=e):r=Mf(),void 0===t?r:_f.f(r,t)},Df=Ao,Lf=Pf,Ff=Qo.f,Bf=Df("unscopables"),Uf=Array.prototype;null==Uf[Bf]&&Ff(Uf,Bf,{configurable:!0,value:Lf(null)});var jf,zf,Hf,Gf=function(e){Uf[Bf][e]=!0},Wf=!Mr((function(){function e(){}return e.prototype.constructor=null,Object.getPrototypeOf(new e)!==e.prototype})),qf=lo,Vf=pn,Yf=io,Kf=Wf,Xf=Bi("IE_PROTO"),Zf=Object,Qf=Zf.prototype,Jf=Kf?Zf.getPrototypeOf:function(e){var t=Yf(e);if(qf(t,Xf))return t[Xf];var r=t.constructor;return Vf(r)&&t instanceof r?r.prototype:t instanceof Zf?Qf:null},$f=Mr,ep=pn,tp=Jf,rp=wa,np=Ao("iterator"),op=!1;[].keys&&("next"in(Hf=[].keys())?(zf=tp(tp(Hf)))!==Object.prototype&&(jf=zf):op=!0);var ip=null==jf||$f((function(){var e={};return jf[np].call(e)!==e}));ip&&(jf={}),ep(jf[np])||rp(jf,np,(function(){return this}));var ap={IteratorPrototype:jf,BUGGY_SAFARI_ITERATORS:op},sp=ap.IteratorPrototype,lp=Pf,cp=qr,up=Ms,dp=Zu,fp=function(){return this},pp=_s,hp=Br,mp=pn,gp=Jf,bp=Os,vp=Ms,yp=gi,wp=wa,Ep=Zu,_p=Si.PROPER,Sp=Si.CONFIGURABLE,xp=ap.IteratorPrototype,Ap=ap.BUGGY_SAFARI_ITERATORS,Tp=Ao("iterator"),Cp="keys",kp="values",Op="entries",Rp=function(){return this},Np=fn,Ip=Gf,Mp=Zu,Pp=na,Dp=Qo.f,Lp=Pr,Fp="Array Iterator",Bp=Pp.set,Up=Pp.getterFor(Fp),jp=function(e,t,r,n,o,i,a){!function(e,t,r,n){var o=t+" Iterator";e.prototype=lp(sp,{next:cp(+!n,r)}),up(e,o,!1),dp[o]=fp}(r,t,n);var s,l,c,u=function(e){if(e===o&&m)return m;if(!Ap&&e in p)return p[e];switch(e){case Cp:case kp:case Op:return function(){return new r(this,e)}}return function(){return new r(this)}},d=t+" Iterator",f=!1,p=e.prototype,h=p[Tp]||p["@@iterator"]||o&&p[o],m=!Ap&&h||u(o),g="Array"==t&&p.entries||h;if(g&&(s=gp(g.call(new e)))!==Object.prototype&&s.next&&(gp(s)!==xp&&(bp?bp(s,xp):mp(s[Tp])||wp(s,Tp,Rp)),vp(s,d,!0)),_p&&o==kp&&h&&h.name!==kp&&(Sp?yp(p,"name",kp):(f=!0,m=function(){return hp(h,this)})),o)if(l={values:u(kp),keys:i?m:u(Cp),entries:u(Op)},a)for(c in l)(Ap||f||!(c in p))&&wp(p,c,l[c]);else pp({target:t,proto:!0,forced:Ap||f},l);return p[Tp]!==m&&wp(p,Tp,m,{name:o}),Ep[t]=m,l}(Array,"Array",(function(e,t){Bp(this,{type:Fp,target:Np(e),index:0,kind:t})}),(function(){var e=Up(this),t=e.target,r=e.kind,n=e.index++;return!t||n>=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),zp=Mp.Arguments=Mp.Array;if(Ip("keys"),Ip("values"),Ip("entries"),Lp&&"values"!==zp.name)try{Dp(zp,"name",{value:"values"})}catch(e){}var Hp=Uo("span").classList,Gp=Hp&&Hp.constructor&&Hp.constructor.prototype,Wp=Gp===Object.prototype?void 0:Gp,qp=Nr,Vp={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},Yp=Wp,Kp=jp,Xp=gi,Zp=Ao,Qp=Zp("iterator"),Jp=Zp("toStringTag"),$p=Kp.values,eh=function(e,t){if(e){if(e[Qp]!==$p)try{Xp(e,Qp,$p)}catch(t){e[Qp]=$p}if(e[Jp]||Xp(e,Jp,t),Vp[t])for(var r in Kp)if(e[r]!==Kp[r])try{Xp(e,r,Kp[r])}catch(t){e[r]=Kp[r]}}};for(var th in Vp)eh(qp[th]&&qp[th].prototype,th);eh(Yp,"DOMTokenList");class rh{constructor(e){this.namespace=e}emit(e,...t){rh.debug&&(this.namespace&&"error"!==e?console[e](this.namespace,...t):console[e](...t))}log(...e){this.emit("log",...e)}info(...e){this.emit("info",...e)}warn(...e){this.emit("warn",...e)}error(...e){this.emit("error",...e)}}rh.debug=!1;const nh=new rh;var oh=Ua.includes,ih=Gf;_s({target:"Array",proto:!0,forced:Mr((function(){return!Array(1).includes()}))},{includes:function(e){return oh(this,e,arguments.length>1?arguments[1]:void 0)}}),ih("includes");var ah=mn,sh=tn,lh=Ao("match"),ch=function(e){var t;return ah(e)&&(void 0!==(t=e[lh])?!!t:"RegExp"==sh(e))},uh=ch,dh=TypeError,fh=Xs,ph=String,hh=function(e){if("Symbol"===fh(e))throw TypeError("Cannot convert a Symbol value to a string");return ph(e)},mh=Ao("match"),gh=_s,bh=cn,vh=hh,yh=Qr("".indexOf);gh({target:"String",proto:!0,forced:!function(e){var t=/./;try{"/./"[e](t)}catch(r){try{return t[mh]=!1,"/./"[e](t)}catch(e){}}return!1}("includes")},{includes:function(e){return!!~yh(vh(bh(this)),vh(function(e){if(uh(e))throw dh("The method doesn't accept regular expressions");return e}(e)),arguments.length>1?arguments[1]:void 0)}});var wh,Eh="\t\n\v\f\r \u2028\u2029\ufeff",_h=cn,Sh=hh,xh=Eh,Ah=Qr("".replace),Th="["+xh+"]",Ch=RegExp("^"+Th+Th+"*"),kh=RegExp(Th+Th+"*$"),Oh=function(e){return function(t){var r=Sh(_h(t));return 1&e&&(r=Ah(r,Ch,"")),2&e&&(r=Ah(r,kh,"")),r}},Rh={start:Oh(1),end:Oh(2),trim:Oh(3)},Nh=Si.PROPER,Ih=Eh,Mh=Rh.trim;_s({target:"String",proto:!0,forced:(wh="trim",Mr((function(){return!!Ih[wh]()||"
"!=="
"[wh]()||Nh&&Ih[wh].name!==wh})))},{trim:function(){return Mh(this)}});var Ph=Pr,Dh=Qr,Lh=Br,Fh=Mr,Bh=pf,Uh=Xa,jh=Ur,zh=io,Hh=sn,Gh=Object.assign,Wh=Object.defineProperty,qh=Dh([].concat),Vh=!Gh||Fh((function(){if(Ph&&1!==Gh({b:1},Gh(Wh({},"a",{enumerable:!0,get:function(){Wh(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=Gh({},e)[r]||Bh(Gh({},t)).join("")!=n}))?function(e,t){for(var r=zh(e),n=arguments.length,o=1,i=Uh.f,a=jh.f;n>o;)for(var s,l=Hh(arguments[o++]),c=i?qh(Bh(l),i(l)):Bh(l),u=c.length,d=0;u>d;)s=c[d++],Ph&&!Lh(a,l,s)||(r[s]=l[s]);return r}:Gh,Yh=Vh;_s({target:"Object",stat:!0,arity:2,forced:Object.assign!==Yh},{assign:Yh});class Kh{constructor(){this.emitter=new wr.EventEmitter}on(e,t){return this.emitter.on(e,t),{remove:()=>this.emitter.off(e,t)}}off(e,t){this.emitter.off(e,t)}emit(e,t){this.emitter.emit(e,t)}}const Xh="near-wallet-selector",Zh="recentlySignedInWallets",Qh="contract",Jh="contract:pending",$h="selectedWalletId",em="selectedWalletId:pending";class tm{constructor({factories:e,storage:t,options:r,store:n,emitter:o,provider:i}){this.factories=e,this.storage=t,this.options=r,this.store=n,this.emitter=o,this.provider=i,this.modules=[],this.instances={}}validateWallet(e){return Tr(this,void 0,void 0,(function*(){let t=[];const r=yield this.getWallet(e);return r&&(t=yield r.getAccounts().catch((e=>(nh.log(`Failed to validate ${r.id} during setup`),nh.error(e),[])))),t}))}resolveStorageState(){return Tr(this,void 0,void 0,(function*(){const e=new kr(this.storage,Xh),t=yield e.getItem(em),r=yield e.getItem(Jh);if(t&&r){const n=yield this.validateWallet(t);if(yield e.removeItem(em),yield e.removeItem(Jh),n.length){const{selectedWalletId:e}=this.store.getState(),o=yield this.getWallet(e);return o&&t!==e&&(yield o.signOut().catch((e=>{nh.log("Failed to sign out existing wallet"),nh.error(e)}))),{accounts:n,contract:r,selectedWalletId:t,recentlySignedInWallets:yield this.setWalletAsRecentlySignedIn(t)}}}const{contract:n,selectedWalletId:o}=this.store.getState(),i=yield this.validateWallet(o),a=yield e.getItem(Zh);return i.length?{accounts:i,contract:n,selectedWalletId:o,recentlySignedInWallets:a||[]}:{accounts:[],contract:null,selectedWalletId:null,recentlySignedInWallets:a||[]}}))}setWalletAsRecentlySignedIn(e){return Tr(this,void 0,void 0,(function*(){const t=new kr(this.storage,Xh);let r=yield t.getItem(Zh);return r||(r=[]),r.includes(e)||(r.unshift(e),r=r.slice(0,5),yield t.setItem(Zh,r)),r}))}signOutWallet(e){return Tr(this,void 0,void 0,(function*(){const t=yield this.getWallet(e);yield t.signOut().catch((e=>{nh.log(`Failed to sign out ${t.id}`),nh.error(e),this.onWalletSignedOut(t.id)}))}))}onWalletSignedIn(e,{accounts:t,contractId:r,methodNames:n}){return Tr(this,void 0,void 0,(function*(){const{selectedWalletId:o}=this.store.getState(),i=new kr(this.storage,Xh),a={contractId:r,methodNames:n};if(!t.length)return void("browser"===this.getModule(e).type&&(yield i.setItem(em,e),yield i.setItem(Jh,a)));o&&o!==e&&(yield this.signOutWallet(o));const s=yield this.setWalletAsRecentlySignedIn(e);this.store.dispatch({type:"WALLET_CONNECTED",payload:{walletId:e,contract:a,accounts:t,recentlySignedInWallets:s}}),this.emitter.emit("signedIn",{walletId:e,contractId:r,methodNames:n,accounts:t})}))}onWalletSignedOut(e){this.store.dispatch({type:"WALLET_DISCONNECTED",payload:{walletId:e}}),this.emitter.emit("signedOut",{walletId:e})}setupWalletEmitter(e){const t=new Kh;return t.on("signedOut",(()=>{this.onWalletSignedOut(e.id)})),t.on("signedIn",(t=>{this.onWalletSignedIn(e.id,t)})),t.on("accountsChanged",(({accounts:t})=>Tr(this,void 0,void 0,(function*(){if(this.emitter.emit("accountsChanged",{walletId:e.id,accounts:t}),!t.length)return this.signOutWallet(e.id);this.store.dispatch({type:"ACCOUNTS_CHANGED",payload:{walletId:e.id,accounts:t}})})))),t.on("networkChanged",(({networkId:t})=>{this.emitter.emit("networkChanged",{walletId:e.id,networkId:t})})),t.on("uriChanged",(({uri:t})=>{this.emitter.emit("uriChanged",{walletId:e.id,uri:t})})),t}validateSignMessageParams({message:e,nonce:t,recipient:r}){if(!e||""===e.trim())throw new Error("Invalid message. It must be a non-empty string.");if(!Ar.isBuffer(t)||32!==t.length)throw new Error("Invalid nonce. It must be a Buffer with a length of 32 bytes.");if(!r||""===r.trim())throw new Error("Invalid recipient. It must be a non-empty string.")}decorateWallet(e){const t=e.signIn,r=e.signOut,n=e.signMessage;return e.signIn=r=>Tr(this,void 0,void 0,(function*(){const n=yield t(r),{contractId:o,methodNames:i=[]}=r;return yield this.onWalletSignedIn(e.id,{accounts:n,contractId:o,methodNames:i}),n})),e.signOut=()=>Tr(this,void 0,void 0,(function*(){yield r(),this.onWalletSignedOut(e.id)})),e.signMessage=t=>Tr(this,void 0,void 0,(function*(){if(void 0===n)throw Error(`The signMessage method is not supported by ${e.metadata.name}`);return this.validateSignMessageParams(t),yield n(t)})),e}setupInstance(e){return Tr(this,void 0,void 0,(function*(){if(!e.metadata.available){const t="injected"===e.type?"not installed":"not available";throw Error(`${e.metadata.name} is ${t}`)}const t=Object.assign({id:e.id,type:e.type,metadata:e.metadata},yield e.init({id:e.id,type:e.type,metadata:e.metadata,options:this.options,store:this.store.toReadOnly(),provider:this.provider,emitter:this.setupWalletEmitter(e),logger:new rh(e.id),storage:new kr(this.storage,[Xh,e.id])}));return this.decorateWallet(t)}))}getModule(e){return this.modules.find((t=>t.id===e))}getWallet(e){return Tr(this,void 0,void 0,(function*(){const t=this.getModule(e);if(!t)return null;const{selectedWalletId:r}=this.store.getState();return!t.metadata.available&&r?(this.onWalletSignedOut(r),null):yield t.wallet()}))}setup(){return Tr(this,void 0,void 0,(function*(){const e=[];for(let t=0;t(nh.log("Failed to setup module"),nh.error(e),null)));r&&(e.some((e=>e.id===r.id))||e.push({id:r.id,type:r.type,metadata:r.metadata,wallet:()=>Tr(this,void 0,void 0,(function*(){let e=this.instances[r.id];return e||(e=yield this.setupInstance(r),this.instances[r.id]=e,e)}))}))}this.modules=e;const{accounts:t,contract:r,selectedWalletId:n,recentlySignedInWallets:o}=yield this.resolveStorageState();this.store.dispatch({type:"SETUP_WALLET_MODULES",payload:{modules:e,accounts:t,contract:r,selectedWalletId:n,recentlySignedInWallets:o}});for(let e=0;e{switch(nh.log("Store Action",t),t.type){case"SETUP_WALLET_MODULES":{const{modules:r,accounts:n,contract:o,selectedWalletId:i,recentlySignedInWallets:a}=t.payload,s=n.map(((e,t)=>Object.assign(Object.assign({},e),{active:0===t})));return Object.assign(Object.assign({},e),{modules:r,accounts:s,contract:o,selectedWalletId:i,recentlySignedInWallets:a})}case"WALLET_CONNECTED":{const{walletId:r,contract:n,accounts:o,recentlySignedInWallets:i}=t.payload;if(!o.length)return e;const a=e.accounts.findIndex((e=>e.active)),s=o.map(((e,t)=>Object.assign(Object.assign({},e),{active:t===(a>-1?a:0)})));return Object.assign(Object.assign({},e),{contract:n,accounts:s,selectedWalletId:r,recentlySignedInWallets:i})}case"WALLET_DISCONNECTED":{const{walletId:r}=t.payload;return r!==e.selectedWalletId?e:Object.assign(Object.assign({},e),{contract:null,accounts:[],selectedWalletId:null})}case"ACCOUNTS_CHANGED":{const{walletId:r,accounts:n}=t.payload;if(r!==e.selectedWalletId)return e;const o=e.accounts.find((e=>e.active)),i=!n.some((e=>e.accountId===(null==o?void 0:o.accountId))),a=n.map(((e,t)=>Object.assign(Object.assign({},e),{active:i?0===t:e.accountId===(null==o?void 0:o.accountId)})));return Object.assign(Object.assign({},e),{accounts:a})}case"SET_ACTIVE_ACCOUNT":{const{accountId:r}=t.payload,n=e.accounts.map((e=>Object.assign(Object.assign({},e),{active:e.accountId===r})));return Object.assign(Object.assign({},e),{accounts:n})}default:return e}};let nm=null;const om=(e,t,r,n)=>({options:e,store:t.toReadOnly(),wallet:e=>Tr(void 0,void 0,void 0,(function*(){const{selectedWalletId:n}=t.getState(),o=yield r.getWallet(e||n);if(!o){if(e)throw new Error("Invalid wallet id");throw new Error("No wallet selected")}return o})),setActiveAccount:e=>{const{accounts:r}=t.getState();if(!r.some((t=>t.accountId===e)))throw new Error("Invalid account id");t.dispatch({type:"SET_ACTIVE_ACCOUNT",payload:{accountId:e}})},isSignedIn(){const{accounts:e}=t.getState();return Boolean(e.length)},on:(e,t)=>n.on(e,t),off:(e,t)=>{n.off(e,t)}}),im=e=>Tr(void 0,void 0,void 0,(function*(){const{options:t,storage:r}=(e=>{return{options:{languageCode:e.languageCode||void 0,network:(t=e.network,"string"==typeof t?(e=>{switch(e){case"mainnet":return{networkId:e,nodeUrl:"https://rpc.mainnet.near.org",helperUrl:"https://helper.mainnet.near.org",explorerUrl:"https://nearblocks.io",indexerUrl:"https://api.kitwallet.app"};case"testnet":return{networkId:e,nodeUrl:"https://rpc.testnet.near.org",helperUrl:"https://helper.testnet.near.org",explorerUrl:"https://testnet.nearblocks.io",indexerUrl:"https://testnet-api.kitwallet.app"};default:throw Error(`Failed to find config for: '${e}'`)}})(t):t),debug:e.debug||!1,optimizeWalletOrder:!1!==e.optimizeWalletOrder,randomizeWalletOrder:e.randomizeWalletOrder||!1,relayerUrl:e.relayerUrl||void 0},storage:e.storage||new cf};var t})(e);rh.debug=t.debug;const n=new Kh,o=yield(e=>Tr(void 0,void 0,void 0,(function*(){const t=new kr(e,Xh),r={modules:[],accounts:[],contract:yield t.getItem(Qh),selectedWalletId:yield t.getItem($h),recentlySignedInWallets:(yield t.getItem(Zh))||[]},n=new Er.t(r),o=new _r.B;o.pipe(function(e,t){return(0,Sr.N)(function(e,t,r,n,o){return function(n,o){var i=r,a=t,s=0;n.subscribe((0,xr._)(o,(function(t){var r=s++;a=i?e(a,t,r):(i=!0,t),o.next(a)}),void 0))}}(e,t,arguments.length>=2))}(rm,r)).subscribe(n);const i=(e,r,n,o)=>Tr(void 0,void 0,void 0,(function*(){r[o]!==e[o]&&(r[o]?yield t.setItem(n,r[o]):yield t.removeItem(n))}));let a=n.getValue();return n.subscribe((e=>{i(a,e,$h,"selectedWalletId"),i(a,e,Qh,"contract"),i(a,e,Zh,"recentlySignedInWallets"),a=e})),{observable:n,getState:()=>n.getValue(),dispatch:e=>o.next(e),toReadOnly:()=>({getState:()=>n.getValue(),observable:n.asObservable()})}})))(r),i=new tm({factories:e.modules,storage:r,options:t,store:o,emitter:n,provider:new Cr(t.network.nodeUrl)});return yield i.setup(),e.allowMultipleSelectors?om(t,o,i,n):(nm||(nm=om(t,o,i,n)),nm)})),am=e=>new Promise((t=>setTimeout(t,e))),sm=(e,t,r)=>Tr(void 0,void 0,void 0,(function*(){const n=e();if(n)return n;if(!r)throw new Error("Exceeded timeout");return am(t).then((()=>sm(e,t,r-1)))})),lm=(e,t={})=>Tr(void 0,void 0,void 0,(function*(){const{timeout:r=100,interval:n=50}=t;return Promise.race([am(r).then((()=>{throw new Error("Exceeded timeout")})),sm(e,n,Math.floor(r/n))])}));var cm=Hn,um=io,dm=sn,fm=Pa,pm=TypeError,hm=function(e){return function(t,r,n,o){cm(r);var i=um(t),a=dm(i),s=fm(i),l=e?s-1:0,c=e?-1:1;if(n<2)for(;;){if(l in a){o=a[l],l+=c;break}if(l+=c,e?l<0:s<=l)throw pm("Reduce of empty array with no initial value")}for(;e?l>=0:s>l;l+=c)l in a&&(o=r(o,a[l],l,i));return o}},mm={left:hm(!1),right:hm(!0)},gm=Mr,bm=mm.left,vm=Cn,ym=Ss;_s({target:"Array",proto:!0,forced:!function(e,t){var r=[][e];return!!r&&gm((function(){r.call(null,t||function(){return 1},1)}))}("reduce")||!ym&&vm>79&&vm<83},{reduce:function(e){var t=arguments.length;return bm(this,e,t,t>1?arguments[1]:void 0)}});var wm,Em,_m=ri,Sm=Mr,xm=Nr.RegExp,Am=Sm((function(){var e=xm("a","y");return e.lastIndex=2,null!=e.exec("abcd")})),Tm=Am||Sm((function(){return!xm("a","y").sticky})),Cm=Am||Sm((function(){var e=xm("^r","gy");return e.lastIndex=2,null!=e.exec("str")})),km={BROKEN_CARET:Cm,MISSED_STICKY:Tm,UNSUPPORTED_Y:Am},Om=Mr,Rm=Nr.RegExp,Nm=Om((function(){var e=Rm(".","s");return!(e.dotAll&&e.exec("\n")&&"s"===e.flags)})),Im=Mr,Mm=Nr.RegExp,Pm=Im((function(){var e=Mm("(?b)","g");return"b"!==e.exec("b").groups.a||"bc"!=="b".replace(e,"$ c")})),Dm=Br,Lm=Qr,Fm=hh,Bm=function(){var e=_m(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},Um=km,jm=Xn.exports,zm=Pf,Hm=na.get,Gm=Nm,Wm=Pm,qm=jm("native-string-replace",String.prototype.replace),Vm=RegExp.prototype.exec,Ym=Vm,Km=Lm("".charAt),Xm=Lm("".indexOf),Zm=Lm("".replace),Qm=Lm("".slice),Jm=(Em=/b*/g,Dm(Vm,wm=/a/,"a"),Dm(Vm,Em,"a"),0!==wm.lastIndex||0!==Em.lastIndex),$m=Um.BROKEN_CARET,eg=void 0!==/()??/.exec("")[1];(Jm||eg||$m||Gm||Wm)&&(Ym=function(e){var t,r,n,o,i,a,s,l=this,c=Hm(l),u=Fm(e),d=c.raw;if(d)return d.lastIndex=l.lastIndex,t=Dm(Ym,d,u),l.lastIndex=d.lastIndex,t;var f=c.groups,p=$m&&l.sticky,h=Dm(Bm,l),m=l.source,g=0,b=u;if(p&&(h=Zm(h,"y",""),-1===Xm(h,"g")&&(h+="g"),b=Qm(u,l.lastIndex),l.lastIndex>0&&(!l.multiline||l.multiline&&"\n"!==Km(u,l.lastIndex-1))&&(m="(?: "+m+")",b=" "+b,g++),r=new RegExp("^(?:"+m+")",h)),eg&&(r=new RegExp("^"+m+"$(?!\\s)",h)),Jm&&(n=l.lastIndex),o=Dm(Vm,p?r:l,b),p?o?(o.input=Qm(o.input,g),o[0]=Qm(o[0],g),o.index=l.lastIndex,l.lastIndex+=o[0].length):l.lastIndex=0:Jm&&o&&(l.lastIndex=l.global?o.index+o[0].length:n),eg&&o&&o.length>1&&Dm(qm,o[0],r,(function(){for(i=1;i1?arguments[1]:void 0,d=void 0!==u,f=tb(l);if(f&&!rb(f))for(a=(i=eb(l,f)).next,l=[];!(o=Zg(a,i)).done;)l.push(o.value);for(d&&c>2&&(u=Xg(u,arguments[2])),r=$g(l),n=new(nb(s))(r),t=0;r>t;t++)n[t]=d?u(l[t],t):l[t];return n};(0,zg.exportTypedArrayStaticMethod)("from",ob,Kg);var ib=wa,ab=Aa,sb=Ia,lb=RangeError,cb=function(e){if(void 0===e)return 0;var t=ab(e),r=sb(t);if(t!==r)throw lb("Wrong length or index");return r},ub=Array,db=Math.abs,fb=Math.pow,pb=Math.floor,hb=Math.log,mb=Math.LN2,gb={pack:function(e,t,r){var n,o,i,a=ub(r),s=8*r-t-1,l=(1<>1,u=23===t?fb(2,-24)-fb(2,-77):0,d=e<0||0===e&&1/e<0?1:0,f=0;for((e=db(e))!=e||e===1/0?(o=e!=e?1:0,n=l):(n=pb(hb(e)/mb),e*(i=fb(2,-n))<1&&(n--,i*=2),(e+=n+c>=1?u/i:u*fb(2,1-c))*i>=2&&(n++,i/=2),n+c>=l?(o=0,n=l):n+c>=1?(o=(e*i-1)*fb(2,t),n+=c):(o=e*fb(2,c-1)*fb(2,t),n=0));t>=8;)a[f++]=255&o,o/=256,t-=8;for(n=n<0;)a[f++]=255&n,n/=256,s-=8;return a[--f]|=128*d,a},unpack:function(e,t){var r,n=e.length,o=8*n-t-1,i=(1<>1,s=o-7,l=n-1,c=e[l--],u=127&c;for(c>>=7;s>0;)u=256*u+e[l--],s-=8;for(r=u&(1<<-s)-1,u>>=-s,s+=t;s>0;)r=256*r+e[l--],s-=8;if(0===u)u=1-a;else{if(u===i)return r?NaN:c?-1/0:1/0;r+=fb(2,t),u-=a}return(c?-1:1)*r*fb(2,u-t)}},bb=io,vb=Oa,yb=Pa,wb=function(e){for(var t=bb(this),r=yb(t),n=arguments.length,o=vb(n>1?arguments[1]:void 0,r),i=n>2?arguments[2]:void 0,a=void 0===i?r:vb(i,r);a>o;)t[o++]=e;return t},Eb=Do,_b=Qo,Sb=qr,xb=Oa,Ab=Pa,Tb=function(e,t,r){var n=Eb(t);n in e?_b.f(e,n,Sb(0,r)):e[n]=r},Cb=Array,kb=Math.max,Ob=function(e,t,r){for(var n=Ab(e),o=xb(t,n),i=xb(void 0===r?n:r,n),a=Cb(kb(i-o,0)),s=0;o>8&255]},vv=function(e){return[255&e,e>>8&255,e>>16&255,e>>24&255]},yv=function(e){return e[3]<<24|e[2]<<16|e[1]<<8|e[0]},wv=function(e){return hv(e,23,4)},Ev=function(e){return hv(e,52,8)},_v=function(e,t){Vb(e[rv],t,{get:function(){return Jb(this)[t]}})},Sv=function(e,t,r,n){var o=zb(r),i=Jb(e);if(o+t>i.byteLength)throw dv(nv);var a=Jb(i.buffer).bytes,s=o+i.byteOffset,l=Kb(a,s,s+t);return n?l:pv(l)},xv=function(e,t,r,n,o,i){var a=zb(r),s=Jb(e);if(a+t>s.byteLength)throw dv(nv);for(var l=Jb(s.buffer).bytes,c=a+s.byteOffset,u=n(+o),d=0;dkv;)(Tv=Cv[kv++])in iv||Db(iv,Tv,ov[Tv]);av.constructor=iv}Wb&&Gb(lv)!==cv&&Wb(lv,cv);var Ov=new sv(new iv(2)),Rv=Nb(lv.setInt8);Ov.setInt8(0,2147483648),Ov.setInt8(1,2147483649),!Ov.getInt8(0)&&Ov.getInt8(1)||Lb(lv,{setInt8:function(e,t){Rv(this,e,t<<24>>24)},setUint8:function(e,t){Rv(this,e,t<<24>>24)}},{unsafe:!0})}else av=(iv=function(e){Bb(this,av);var t=zb(e);$b(this,{bytes:fv(uv(t),0),byteLength:t}),Ib||(this.byteLength=t)})[rv],lv=(sv=function(e,t,r){Bb(this,lv),Bb(e,av);var n=Jb(e).byteLength,o=Ub(t);if(o<0||o>n)throw dv("Wrong offset");if(o+(r=void 0===r?n-o:jb(r))>n)throw dv("Wrong length");$b(this,{buffer:e,byteLength:r,byteOffset:o}),Ib||(this.buffer=e,this.byteLength=r,this.byteOffset=o)})[rv],Ib&&(_v(iv,"byteLength"),_v(sv,"buffer"),_v(sv,"byteLength"),_v(sv,"byteOffset")),Lb(lv,{getInt8:function(e){return Sv(this,1,e)[0]<<24>>24},getUint8:function(e){return Sv(this,1,e)[0]},getInt16:function(e){var t=Sv(this,2,e,arguments.length>1?arguments[1]:void 0);return(t[1]<<8|t[0])<<16>>16},getUint16:function(e){var t=Sv(this,2,e,arguments.length>1?arguments[1]:void 0);return t[1]<<8|t[0]},getInt32:function(e){return yv(Sv(this,4,e,arguments.length>1?arguments[1]:void 0))},getUint32:function(e){return yv(Sv(this,4,e,arguments.length>1?arguments[1]:void 0))>>>0},getFloat32:function(e){return mv(Sv(this,4,e,arguments.length>1?arguments[1]:void 0),23)},getFloat64:function(e){return mv(Sv(this,8,e,arguments.length>1?arguments[1]:void 0),52)},setInt8:function(e,t){xv(this,1,e,gv,t)},setUint8:function(e,t){xv(this,1,e,gv,t)},setInt16:function(e,t){xv(this,2,e,bv,t,arguments.length>2?arguments[2]:void 0)},setUint16:function(e,t){xv(this,2,e,bv,t,arguments.length>2?arguments[2]:void 0)},setInt32:function(e,t){xv(this,4,e,vv,t,arguments.length>2?arguments[2]:void 0)},setUint32:function(e,t){xv(this,4,e,vv,t,arguments.length>2?arguments[2]:void 0)},setFloat32:function(e,t){xv(this,4,e,wv,t,arguments.length>2?arguments[2]:void 0)},setFloat64:function(e,t){xv(this,8,e,Ev,t,arguments.length>2?arguments[2]:void 0)}});Xb(iv,ev),Xb(sv,tv);var Nv={ArrayBuffer:iv,DataView:sv},Iv=_s,Mv=Qr,Pv=Mr,Dv=ri,Lv=Oa,Fv=Ia,Bv=El,Uv=Nv.ArrayBuffer,jv=Nv.DataView,zv=jv.prototype,Hv=Mv(Uv.prototype.slice),Gv=Mv(zv.getUint8),Wv=Mv(zv.setUint8);Iv({target:"ArrayBuffer",proto:!0,unsafe:!0,forced:Pv((function(){return!new Uv(2).slice(1,void 0).byteLength}))},{slice:function(e,t){if(Hv&&void 0===t)return Hv(Dv(this),e);for(var r=Dv(this).byteLength,n=Lv(e,r),o=Lv(void 0===t?r:t,r),i=new(Bv(this,Uv))(Fv(o-n)),a=new jv(this),s=new jv(i),l=0;nv;v++)if((s||v in m)&&(p=g(f=m[v],v,h),e))if(t)w[v]=p;else if(p)switch(e){case 3:return!0;case 5:return f;case 6:return v;case 2:uy(w,f)}else switch(e){case 4:return!1;case 7:uy(w,f)}return i?-1:n||o?o:w}},fy={forEach:dy(0),map:dy(1),filter:dy(2),some:dy(3),every:dy(4),find:dy(5),findIndex:dy(6),filterReject:dy(7)},py=pn,hy=mn,my=Os,gy=_s,by=Nr,vy=Br,yy=Pr,wy=Kg,Ey=zg,_y=Nv,Sy=zs,xy=qr,Ay=gi,Ty=Kv,Cy=Ia,ky=cb,Oy=Jv,Ry=Do,Ny=lo,Iy=Xs,My=mn,Py=Ln,Dy=Pf,Ly=yn,Fy=Os,By=Ea.f,Uy=ob,jy=fy.forEach,zy=Bs,Hy=Qo,Gy=Ir,Wy=na.get,qy=na.set,Vy=na.enforce,Yy=Hy.f,Ky=Gy.f,Xy=Math.round,Zy=by.RangeError,Qy=_y.ArrayBuffer,Jy=Qy.prototype,$y=_y.DataView,ew=Ey.NATIVE_ARRAY_BUFFER_VIEWS,tw=Ey.TYPED_ARRAY_TAG,rw=Ey.TypedArray,nw=Ey.TypedArrayPrototype,ow=Ey.aTypedArrayConstructor,iw=Ey.isTypedArray,aw="BYTES_PER_ELEMENT",sw="Wrong length",lw=function(e,t){ow(e);for(var r=0,n=t.length,o=new e(n);n>r;)o[r]=t[r++];return o},cw=function(e,t){Yy(e,t,{get:function(){return Wy(this)[t]}})},uw=function(e){var t;return Ly(Jy,e)||"ArrayBuffer"==(t=Iy(e))||"SharedArrayBuffer"==t},dw=function(e,t){return iw(e)&&!Py(t)&&t in e&&Ty(+t)&&t>=0},fw=function(e,t){return t=Ry(t),dw(e,t)?xy(2,e[t]):Ky(e,t)},pw=function(e,t,r){return t=Ry(t),!(dw(e,t)&&My(r)&&Ny(r,"value"))||Ny(r,"get")||Ny(r,"set")||r.configurable||Ny(r,"writable")&&!r.writable||Ny(r,"enumerable")&&!r.enumerable?Yy(e,t,r):(e[t]=r.value,e)};yy?(ew||(Gy.f=fw,Hy.f=pw,cw(nw,"buffer"),cw(nw,"byteOffset"),cw(nw,"byteLength"),cw(nw,"length")),gy({target:"Object",stat:!0,forced:!ew},{getOwnPropertyDescriptor:fw,defineProperty:pw}),qv.exports=function(e,t,r){var n=e.match(/\d+$/)[0]/8,o=e+(r?"Clamped":"")+"Array",i="get"+e,a="set"+e,s=by[o],l=s,c=l&&l.prototype,u={},d=function(e,t){Yy(e,t,{get:function(){return function(e,t){var r=Wy(e);return r.view[i](t*n+r.byteOffset,!0)}(this,t)},set:function(e){return function(e,t,o){var i=Wy(e);r&&(o=(o=Xy(o))<0?0:o>255?255:255&o),i.view[a](t*n+i.byteOffset,o,!0)}(this,t,e)},enumerable:!0})};ew?wy&&(l=t((function(e,t,r,o){return Sy(e,c),function(e,t,r){var n,o;return my&&py(n=t.constructor)&&n!==r&&hy(o=n.prototype)&&o!==r.prototype&&my(e,o),e}(My(t)?uw(t)?void 0!==o?new s(t,Oy(r,n),o):void 0!==r?new s(t,Oy(r,n)):new s(t):iw(t)?lw(l,t):vy(Uy,l,t):new s(ky(t)),e,l)})),Fy&&Fy(l,rw),jy(By(s),(function(e){e in l||Ay(l,e,s[e])})),l.prototype=c):(l=t((function(e,t,r,o){Sy(e,c);var i,a,s,u=0,f=0;if(My(t)){if(!uw(t))return iw(t)?lw(l,t):vy(Uy,l,t);i=t,f=Oy(r,n);var p=t.byteLength;if(void 0===o){if(p%n)throw Zy(sw);if((a=p-f)<0)throw Zy(sw)}else if((a=Cy(o)*n)+f>p)throw Zy(sw);s=a/n}else s=ky(t),i=new Qy(a=s*n);for(qy(e,{buffer:i,byteOffset:f,byteLength:a,length:s,view:new $y(i)});u1?arguments[1]:void 0,t>2?arguments[2]:void 0)}),yw((function(){var e=0;return new Int8Array(2).fill({valueOf:function(){return e++}}),1!==e})));var Sw=Nr,xw=Br,Aw=zg,Tw=Pa,Cw=Jv,kw=io,Ow=Mr,Rw=Sw.RangeError,Nw=Sw.Int8Array,Iw=Nw&&Nw.prototype,Mw=Iw&&Iw.set,Pw=Aw.aTypedArray,Dw=Aw.exportTypedArrayMethod,Lw=!Ow((function(){var e=new Uint8ClampedArray(2);return xw(Mw,e,{length:1,0:3},1),3!==e[1]})),Fw=Lw&&Aw.NATIVE_ARRAY_BUFFER_VIEWS&&Ow((function(){var e=new Nw(2);return e.set(1),e.set("2",1),0!==e[0]||2!==e[1]}));Dw("set",(function(e){Pw(this);var t=Cw(arguments.length>1?arguments[1]:void 0,1),r=kw(e);if(Lw)return xw(Mw,this,r,t);var n=this.length,o=Tw(r),i=0;if(o+t>n)throw Rw("Wrong length");for(;i0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},Hw=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a0&&1/r<0?1:-1:t>r}}(e))}),!lE||sE);var cE=Tl,uE=zg,dE=Mr,fE=Il,pE=Nr.Int8Array,hE=uE.aTypedArray,mE=uE.exportTypedArrayMethod,gE=[].toLocaleString,bE=!!pE&&dE((function(){gE.call(new pE(1))}));mE("toLocaleString",(function(){return cE(gE,bE?fE(hE(this)):hE(this),fE(arguments))}),dE((function(){return[1,2].toLocaleString()!=new pE([1,2]).toLocaleString()}))||!dE((function(){pE.prototype.toLocaleString.call([1,2])})));new Map([[class{constructor(e){this.tag=2147484061,this.message=e.message,this.nonce=e.nonce,this.recipient=e.recipient,e.callbackUrl&&(this.callbackUrl=e.callbackUrl)}},{kind:"struct",fields:[["tag","u32"],["message","string"],["nonce",[32]],["recipient","string"],["callbackUrl",{kind:"option",type:"string"}]]}]]);var vE=Qr,yE=wa,wE=tg,EE=Mr,_E=Ao,SE=gi,xE=_E("species"),AE=RegExp.prototype,TE=Qr,CE=Aa,kE=hh,OE=cn,RE=TE("".charAt),NE=TE("".charCodeAt),IE=TE("".slice),ME=function(e){return function(t,r){var n,o,i=kE(OE(t)),a=CE(r),s=i.length;return a<0||a>=s?e?"":void 0:(n=NE(i,a))<55296||n>56319||a+1===s||(o=NE(i,a+1))<56320||o>57343?e?RE(i,a):n:e?IE(i,a,a+2):o-56320+(n-55296<<10)+65536}},PE=(ME(!1),ME(!0)),DE=Br,LE=ri,FE=pn,BE=tn,UE=tg,jE=TypeError,zE=Tl,HE=Br,GE=Qr,WE=ch,qE=ri,VE=cn,YE=El,KE=function(e,t,r){return t+(r?PE(e,t).length:1)},XE=Ia,ZE=hh,QE=Wn,JE=Ob,$E=function(e,t){var r=e.exec;if(FE(r)){var n=DE(r,e,t);return null!==n&&LE(n),n}if("RegExp"===BE(e))return DE(UE,e,t);throw jE("RegExp#exec called on incompatible receiver")},e_=tg,t_=Mr,r_=km.UNSUPPORTED_Y,n_=4294967295,o_=Math.min,i_=[].push,a_=GE(/./.exec),s_=GE(i_),l_=GE("".slice),c_=!t_((function(){var e=/(?:)/,t=e.exec;e.exec=function(){return t.apply(this,arguments)};var r="ab".split(e);return 2!==r.length||"a"!==r[0]||"b"!==r[1]}));!function(e,t,r,n){var o=_E(e),i=!EE((function(){var t={};return t[o]=function(){return 7},7!=""[e](t)})),a=i&&!EE((function(){var t=!1,r=/a/;return"split"===e&&((r={}).constructor={},r.constructor[xE]=function(){return r},r.flags="",r[o]=/./[o]),r.exec=function(){return t=!0,null},r[o](""),!t}));if(!i||!a||r){var s=vE(/./[o]),l=t(o,""[e],(function(e,t,r,n,o){var a=vE(e),l=t.exec;return l===wE||l===AE.exec?i&&!o?{done:!0,value:s(t,r,n)}:{done:!0,value:a(r,t,n)}:{done:!1}}));yE(String.prototype,e,l[0]),yE(AE,o,l[1])}n&&SE(AE[o],"sham",!0)}("split",(function(e,t,r){var n;return n="c"=="abbc".split(/(b)*/)[1]||4!="test".split(/(?:)/,-1).length||2!="ab".split(/(?:ab)*/).length||4!=".".split(/(.?)(.?)/).length||".".split(/()()/).length>1||"".split(/.?/).length?function(e,r){var n=ZE(VE(this)),o=void 0===r?n_:r>>>0;if(0===o)return[];if(void 0===e)return[n];if(!WE(e))return HE(t,n,e,o);for(var i,a,s,l=[],c=(e.ignoreCase?"i":"")+(e.multiline?"m":"")+(e.unicode?"u":"")+(e.sticky?"y":""),u=0,d=new RegExp(e.source,c+"g");(i=HE(e_,d,n))&&!((a=d.lastIndex)>u&&(s_(l,l_(n,u,i.index)),i.length>1&&i.index=o));)d.lastIndex===i.index&&d.lastIndex++;return u===n.length?!s&&a_(d,"")||s_(l,""):s_(l,l_(n,u)),l.length>o?JE(l,0,o):l}:"0".split(void 0,0).length?function(e,r){return void 0===e&&0===r?[]:HE(t,this,e,r)}:t,[function(t,r){var o=VE(this),i=null==t?void 0:QE(t,e);return i?HE(i,t,o,r):HE(n,ZE(o),t,r)},function(e,o){var i=qE(this),a=ZE(e),s=r(n,i,a,o,n!==t);if(s.done)return s.value;var l=YE(i,RegExp),c=i.unicode,u=(i.ignoreCase?"i":"")+(i.multiline?"m":"")+(i.unicode?"u":"")+(r_?"g":"y"),d=new l(r_?"^(?:"+i.source+")":i,u),f=void 0===o?n_:o>>>0;if(0===f)return[];if(0===a.length)return null===$E(d,a)?[a]:[];for(var p=0,h=0,m=[];h{if(!e)return"";const r=t.indexOf(".");if(r>-1){const n=t.substring(0,r),o=t.substring(r+1);return S_(e[n],o)}return e[t]},x_=e=>{let t=window.navigator.languages?window.navigator.languages[0]:null;var r;t=t||window.navigator.language;const n=(e=>{switch(e){case"en":default:return u_;case"es":return d_;case"zh":return f_;case"bg":return p_;case"ko":return h_;case"vi":return m_;case"hi":return g_;case"ar":return b_;case"hr":return v_;case"mk":return y_;case"sl":return w_;case"sr":return E_}})(-1!==(r=__||t).indexOf("-")?r.split("-")[0]:r.split("_")[0]),o=S_(n,e);return o&&"string"==typeof o?o:e};var A_=r(85820),T_="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},C_=function(e){return e&&e.Math==Math&&e},k_=C_("object"==typeof globalThis&&globalThis)||C_("object"==typeof window&&window)||C_("object"==typeof self&&self)||C_("object"==typeof T_&&T_)||function(){return this}()||Function("return this")(),O_={},R_=function(e){try{return!!e()}catch(e){return!0}},N_=!R_((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),I_=!R_((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),M_=I_,P_=Function.prototype.call,D_=M_?P_.bind(P_):function(){return P_.apply(P_,arguments)},L_={},F_={}.propertyIsEnumerable,B_=Object.getOwnPropertyDescriptor,U_=B_&&!F_.call({1:2},1);L_.f=U_?function(e){var t=B_(this,e);return!!t&&t.enumerable}:F_;var j_,z_,H_=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},G_=I_,W_=Function.prototype,q_=W_.bind,V_=W_.call,Y_=G_&&q_.bind(V_,V_),K_=G_?function(e){return e&&Y_(e)}:function(e){return e&&function(){return V_.apply(e,arguments)}},X_=K_,Z_=X_({}.toString),Q_=X_("".slice),J_=function(e){return Q_(Z_(e),8,-1)},$_=R_,eS=J_,tS=Object,rS=K_("".split),nS=$_((function(){return!tS("z").propertyIsEnumerable(0)}))?function(e){return"String"==eS(e)?rS(e,""):tS(e)}:tS,oS=TypeError,iS=function(e){if(null==e)throw oS("Can't call method on "+e);return e},aS=nS,sS=iS,lS=function(e){return aS(sS(e))},cS=function(e){return"function"==typeof e},uS=cS,dS=function(e){return"object"==typeof e?null!==e:uS(e)},fS=k_,pS=cS,hS=function(e,t){return arguments.length<2?(r=fS[e],pS(r)?r:void 0):fS[e]&&fS[e][t];var r},mS=K_({}.isPrototypeOf),gS=k_,bS=hS("navigator","userAgent")||"",vS=gS.process,yS=gS.Deno,wS=vS&&vS.versions||yS&&yS.version,ES=wS&&wS.v8;ES&&(z_=(j_=ES.split("."))[0]>0&&j_[0]<4?1:+(j_[0]+j_[1])),!z_&&bS&&(!(j_=bS.match(/Edge\/(\d+)/))||j_[1]>=74)&&(j_=bS.match(/Chrome\/(\d+)/))&&(z_=+j_[1]);var _S=z_,SS=R_,xS=!!Object.getOwnPropertySymbols&&!SS((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&_S&&_S<41})),AS=xS&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,TS=hS,CS=cS,kS=mS,OS=Object,RS=AS?function(e){return"symbol"==typeof e}:function(e){var t=TS("Symbol");return CS(t)&&kS(t.prototype,OS(e))},NS=String,IS=cS,MS=TypeError,PS=function(e){if(IS(e))return e;throw MS(function(e){try{return NS(e)}catch(e){return"Object"}}(e)+" is not a function")},DS=D_,LS=cS,FS=dS,BS=TypeError,US={exports:{}},jS=k_,zS=Object.defineProperty,HS=function(e,t){try{zS(jS,e,{value:t,configurable:!0,writable:!0})}catch(r){jS[e]=t}return t},GS=HS,WS="__core-js_shared__",qS=k_[WS]||GS(WS,{}),VS=qS;(US.exports=function(e,t){return VS[e]||(VS[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"});var YS=iS,KS=Object,XS=function(e){return KS(YS(e))},ZS=XS,QS=K_({}.hasOwnProperty),JS=Object.hasOwn||function(e,t){return QS(ZS(e),t)},$S=K_,ex=0,tx=Math.random(),rx=$S(1..toString),nx=function(e){return"Symbol("+(void 0===e?"":e)+")_"+rx(++ex+tx,36)},ox=k_,ix=US.exports,ax=JS,sx=nx,lx=xS,cx=AS,ux=ix("wks"),dx=ox.Symbol,fx=dx&&dx.for,px=cx?dx:dx&&dx.withoutSetter||sx,hx=function(e){if(!ax(ux,e)||!lx&&"string"!=typeof ux[e]){var t="Symbol."+e;lx&&ax(dx,e)?ux[e]=dx[e]:ux[e]=cx&&fx?fx(t):px(t)}return ux[e]},mx=D_,gx=dS,bx=RS,vx=TypeError,yx=hx("toPrimitive"),wx=function(e,t){if(!gx(e)||bx(e))return e;var r,n=function(e,t){var r=e[t];return null==r?void 0:PS(r)}(e,yx);if(n){if(void 0===t&&(t="default"),r=mx(n,e,t),!gx(r)||bx(r))return r;throw vx("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&LS(r=e.toString)&&!FS(n=DS(r,e)))return n;if(LS(r=e.valueOf)&&!FS(n=DS(r,e)))return n;if("string"!==t&&LS(r=e.toString)&&!FS(n=DS(r,e)))return n;throw BS("Can't convert object to primitive value")}(e,t)},Ex=RS,_x=function(e){var t=wx(e,"string");return Ex(t)?t:t+""},Sx=dS,xx=k_.document,Ax=Sx(xx)&&Sx(xx.createElement),Tx=!N_&&!R_((function(){return 7!=Object.defineProperty((e="div",Ax?xx.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),Cx=N_,kx=D_,Ox=L_,Rx=H_,Nx=lS,Ix=_x,Mx=JS,Px=Tx,Dx=Object.getOwnPropertyDescriptor;O_.f=Cx?Dx:function(e,t){if(e=Nx(e),t=Ix(t),Px)try{return Dx(e,t)}catch(e){}if(Mx(e,t))return Rx(!kx(Ox.f,e,t),e[t])};var Lx={},Fx=N_&&R_((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),Bx=dS,Ux=String,jx=TypeError,zx=function(e){if(Bx(e))return e;throw jx(Ux(e)+" is not an object")},Hx=N_,Gx=Tx,Wx=Fx,qx=zx,Vx=_x,Yx=TypeError,Kx=Object.defineProperty,Xx=Object.getOwnPropertyDescriptor,Zx="enumerable",Qx="configurable",Jx="writable";Lx.f=Hx?Wx?function(e,t,r){if(qx(e),t=Vx(t),qx(r),"function"==typeof e&&"prototype"===t&&"value"in r&&Jx in r&&!r[Jx]){var n=Xx(e,t);n&&n[Jx]&&(e[t]=r.value,r={configurable:Qx in r?r[Qx]:n[Qx],enumerable:Zx in r?r[Zx]:n[Zx],writable:!1})}return Kx(e,t,r)}:Kx:function(e,t,r){if(qx(e),t=Vx(t),qx(r),Gx)try{return Kx(e,t,r)}catch(e){}if("get"in r||"set"in r)throw Yx("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var $x=Lx,eA=H_,tA=N_?function(e,t,r){return $x.f(e,t,eA(1,r))}:function(e,t,r){return e[t]=r,e},rA={exports:{}},nA=N_,oA=JS,iA=Function.prototype,aA=nA&&Object.getOwnPropertyDescriptor,sA=oA(iA,"name"),lA={EXISTS:sA,PROPER:sA&&"something"===function(){}.name,CONFIGURABLE:sA&&(!nA||nA&&aA(iA,"name").configurable)},cA=cS,uA=qS,dA=K_(Function.toString);cA(uA.inspectSource)||(uA.inspectSource=function(e){return dA(e)});var fA,pA,hA,mA=uA.inspectSource,gA=cS,bA=mA,vA=k_.WeakMap,yA=gA(vA)&&/native code/.test(bA(vA)),wA=US.exports,EA=nx,_A=wA("keys"),SA={},xA=yA,AA=k_,TA=K_,CA=dS,kA=tA,OA=JS,RA=qS,NA=SA,IA="Object already initialized",MA=AA.TypeError,PA=AA.WeakMap;if(xA||RA.state){var DA=RA.state||(RA.state=new PA),LA=TA(DA.get),FA=TA(DA.has),BA=TA(DA.set);fA=function(e,t){if(FA(DA,e))throw new MA(IA);return t.facade=e,BA(DA,e,t),t},pA=function(e){return LA(DA,e)||{}},hA=function(e){return FA(DA,e)}}else{var UA=function(e){return _A[e]||(_A[e]=EA(e))}("state");NA[UA]=!0,fA=function(e,t){if(OA(e,UA))throw new MA(IA);return t.facade=e,kA(e,UA,t),t},pA=function(e){return OA(e,UA)?e[UA]:{}},hA=function(e){return OA(e,UA)}}var jA={set:fA,get:pA,has:hA,enforce:function(e){return hA(e)?pA(e):fA(e,{})},getterFor:function(e){return function(t){var r;if(!CA(t)||(r=pA(t)).type!==e)throw MA("Incompatible receiver, "+e+" required");return r}}},zA=R_,HA=cS,GA=JS,WA=N_,qA=lA.CONFIGURABLE,VA=mA,YA=jA.enforce,KA=jA.get,XA=Object.defineProperty,ZA=WA&&!zA((function(){return 8!==XA((function(){}),"length",{value:8}).length})),QA=String(String).split("String"),JA=rA.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!GA(e,"name")||qA&&e.name!==t)&&(WA?XA(e,"name",{value:t,configurable:!0}):e.name=t),ZA&&r&&GA(r,"arity")&&e.length!==r.arity&&XA(e,"length",{value:r.arity});try{r&&GA(r,"constructor")&&r.constructor?WA&&XA(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=YA(e);return GA(n,"source")||(n.source=QA.join("string"==typeof t?t:"")),e};Function.prototype.toString=JA((function(){return HA(this)&&KA(this).source||VA(this)}),"toString");var $A=cS,eT=Lx,tT=rA.exports,rT=HS,nT=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if($A(r)&&tT(r,i,n),n.global)o?e[t]=r:rT(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:eT.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},oT={},iT=Math.ceil,aT=Math.floor,sT=Math.trunc||function(e){var t=+e;return(t>0?aT:iT)(t)},lT=function(e){var t=+e;return t!=t||0===t?0:sT(t)},cT=lT,uT=Math.max,dT=Math.min,fT=lT,pT=Math.min,hT=lS,mT=function(e){return(t=e.length)>0?pT(fT(t),9007199254740991):0;var t},gT=function(e){return function(t,r,n){var o,i=hT(t),a=mT(i),s=function(e,t){var r=cT(e);return r<0?uT(r+t,0):dT(r,t)}(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},bT={includes:gT(!0),indexOf:gT(!1)},vT=JS,yT=lS,wT=bT.indexOf,ET=SA,_T=K_([].push),ST=function(e,t){var r,n=yT(e),o=0,i=[];for(r in n)!vT(ET,r)&&vT(n,r)&&_T(i,r);for(;t.length>o;)vT(n,r=t[o++])&&(~wT(i,r)||_T(i,r));return i},xT=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],AT=ST,TT=xT.concat("length","prototype");oT.f=Object.getOwnPropertyNames||function(e){return AT(e,TT)};var CT={};CT.f=Object.getOwnPropertySymbols;var kT=hS,OT=oT,RT=CT,NT=zx,IT=K_([].concat),MT=kT("Reflect","ownKeys")||function(e){var t=OT.f(NT(e)),r=RT.f;return r?IT(t,r(e)):t},PT=JS,DT=MT,LT=O_,FT=Lx,BT=R_,UT=cS,jT=/#|\.prototype\./,zT=function(e,t){var r=GT[HT(e)];return r==qT||r!=WT&&(UT(t)?BT(t):!!t)},HT=zT.normalize=function(e){return String(e).replace(jT,".").toLowerCase()},GT=zT.data={},WT=zT.NATIVE="N",qT=zT.POLYFILL="P",VT=zT,YT=k_,KT=O_.f,XT=tA,ZT=nT,QT=HS,JT=function(e,t,r){for(var n=DT(t),o=FT.f,i=LT.f,a=0;ao;)for(var s,l=dC(arguments[o++]),c=i?hC(sC(l),i(l)):sC(l),u=c.length,d=0;u>d;)s=c[d++],nC&&!iC(a,l,s)||(r[s]=l[s]);return r}:fC,gC=mC;function bC(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))}(function(e,t){var r,n,o,i,a,s=e.target,l=e.global,c=e.stat;if(r=l?YT:c?YT[s]||QT(s,{}):(YT[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=KT(r,n))&&a.value:r[n],!$T(l?n:s+(c?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;JT(i,o)}(e.sham||o&&o.sham)&&XT(i,"sham",!0),ZT(r,n,i,e)}})({target:"Object",stat:!0,arity:2,forced:Object.assign!==gC},{assign:gC}),"function"==typeof SuppressedError&&SuppressedError;var vC={};vC[hx("toStringTag")]="z";var yC="[object z]"===String(vC),wC=cS,EC=J_,_C=hx("toStringTag"),SC=Object,xC="Arguments"==EC(function(){return arguments}()),AC=yC?EC:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=SC(e),_C))?r:xC?EC(t):"Object"==(n=EC(t))&&wC(t.callee)?"Arguments":n},TC=AC,CC=String,kC=zx,OC=D_,RC=JS,NC=mS,IC=function(){var e=kC(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},MC=RegExp.prototype,PC=lA.PROPER,DC=nT,LC=zx,FC=function(e){if("Symbol"===TC(e))throw TypeError("Cannot convert a Symbol value to a string");return CC(e)},BC=R_,UC="toString",jC=RegExp.prototype[UC],zC=BC((function(){return"/a/b"!=jC.call({source:"a",flags:"b"})})),HC=PC&&jC.name!=UC;(zC||HC)&&DC(RegExp.prototype,UC,(function(){var e=LC(this);return"/"+FC(e.source)+"/"+FC(function(e){var t=e.flags;return void 0!==t||"flags"in MC||RC(e,"flags")||!NC(MC,e)?t:OC(IC,e)}(e))}),{unsafe:!0});const GC=e=>bC(void 0,void 0,void 0,(function*(){const{store:t,logger:r,emitter:n,options:o,defaultProvider:i,defaultStrategy:a}=e,s=new A_.HereWallet({networkId:o.network.networkId,nodeUrl:o.network.nodeUrl,defaultProvider:i,defaultStrategy:a});function l(){return bC(this,void 0,void 0,(function*(){r.log("HereWallet:getAccounts");const e=yield s.getAccounts(),t=[];for(let r=0;r`https://my.herewallet.app/import?network=${o.network.networkId}`,account(e){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:account"),yield s.account(e)}))},switchAccount(e){return bC(this,void 0,void 0,(function*(){r.log("HereWallet:switchAccount"),yield s.switchAccount(e)}))},getAccountId(){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:getAccountId"),yield s.getAccountId()}))},isSignedIn(){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:isSignedIn"),yield s.isSignedIn()}))},signIn(e){var t;return bC(this,void 0,void 0,(function*(){r.log("HereWallet:signIn");const o=""!==e.contractId?e.contractId:void 0;return yield s.signIn(Object.assign(Object.assign({},e),{contractId:o})),n.emit("signedIn",{contractId:e.contractId,methodNames:null!==(t=e.methodNames)&&void 0!==t?t:[],accounts:yield l()}),yield l()}))},getHereBalance(){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:getHereBalance"),yield s.getHereBalance()}))},getAvailableBalance(){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:getAvailableBalance"),yield s.getAvailableBalance()}))},signOut(){return bC(this,void 0,void 0,(function*(){r.log("HereWallet:signOut"),yield s.signOut()}))},getAccounts(){return bC(this,void 0,void 0,(function*(){return l()}))},signAndSendTransaction(e){return bC(this,void 0,void 0,(function*(){r.log("HereWallet:signAndSendTransaction",e);const{contract:n}=t.getState();if(!s.isSignedIn||!n)throw new Error("Wallet not signed in");return yield s.signAndSendTransaction(Object.assign({receiverId:n.contractId},e))}))},verifyOwner(){return bC(this,void 0,void 0,(function*(){throw Error("HereWallet:verifyOwner is deprecated, use signMessage method with implementation NEP0413 Standard")}))},signMessage(e){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:signMessage",e),yield s.signMessage(e)}))},signAndSendTransactions(e){return bC(this,void 0,void 0,(function*(){return r.log("HereWallet:signAndSendTransactions",e),yield s.signAndSendTransactions(e)}))}}}));var WC="data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNDAiIGhlaWdodD0iNDAiIHZpZXdCb3g9IjAgMCA0MCA0MCIgZmlsbD0ibm9uZSIgeG1sbnM9Imh0dHA6Ly93d3cudzMub3JnLzIwMDAvc3ZnIj4KPHBhdGggZmlsbC1ydWxlPSJldmVub2RkIiBjbGlwLXJ1bGU9ImV2ZW5vZGQiIGQ9Ik0xOS43MzM1IDExLjY4MzFMMjEuNzA4OSA4TDI0LjI5ODMgMTYuNjc2NkwyMC40MTYgMTQuOTIxNUwxOS43MzM1IDExLjY4MzFaTTUuNzYzODggMTUuNTQwOUwzLjc1NTYyIDE5LjE2MjFMOS44OTYwNSAyMi4xNjYxTDE4LjM0NzMgMjEuNTgyOEw1Ljc2Mzg4IDE1LjU0MDlaTTQuNjQ0NjQgMjIuMzY5NEwyLjY0ODY1IDI1Ljk3MTNMMTQuOTA4MyAzMi4wNTc1TDM1LjMzODggMzAuODE3NEwzNy4zMzQ4IDI3LjIxNTRMMTYuOTA0MyAyOC40NTU3TDQuNjQ0NjQgMjIuMzY5NFoiIGZpbGw9IiMyQzMwMzQiLz4KPHBhdGggZD0iTTM3LjMzNTkgMjcuMjE1N0wxNi45MTEyIDI4LjQ1NjFMNC41NDYzMyAyMi4zNTU0TDE3LjkzNTggMjEuNTQ1M0w1Ljc2Mzg3IDE1LjU0MDlMMTEuNzQxIDEwLjQ3ODZMMjQuMTQwMSAxNi41NzYzTDIxLjcwOSA4TDMzLjU1NyAxMy44MUwzNy4zMzU5IDI3LjIxNTdaIiBmaWxsPSIjRkRCRjFDIi8+Cjwvc3ZnPgo=";function qC({deprecated:e=!1,iconUrl:t=WC,defaultStrategy:r,defaultProvider:n}={}){return()=>bC(this,void 0,void 0,(function*(){return{id:"here-wallet",type:"injected",metadata:{name:"Here Wallet",description:"Mobile wallet for NEAR Protocol",useUrlAccountImport:!0,downloadUrl:"https://herewallet.app",iconUrl:t,deprecated:e,available:!0},init:e=>GC(Object.assign(Object.assign({},e),{defaultStrategy:r,defaultProvider:n}))}}))}var VC=r(34350),YC="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},KC=function(e){return e&&e.Math==Math&&e},XC=KC("object"==typeof globalThis&&globalThis)||KC("object"==typeof window&&window)||KC("object"==typeof self&&self)||KC("object"==typeof YC&&YC)||function(){return this}()||Function("return this")(),ZC={},QC=function(e){try{return!!e()}catch(e){return!0}},JC=!QC((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),$C=!QC((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),ek=$C,tk=Function.prototype.call,rk=ek?tk.bind(tk):function(){return tk.apply(tk,arguments)},nk={},ok={}.propertyIsEnumerable,ik=Object.getOwnPropertyDescriptor,ak=ik&&!ok.call({1:2},1);nk.f=ak?function(e){var t=ik(this,e);return!!t&&t.enumerable}:ok;var sk,lk,ck=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},uk=$C,dk=Function.prototype,fk=dk.bind,pk=dk.call,hk=uk&&fk.bind(pk,pk),mk=uk?function(e){return e&&hk(e)}:function(e){return e&&function(){return pk.apply(e,arguments)}},gk=mk,bk=gk({}.toString),vk=gk("".slice),yk=function(e){return vk(bk(e),8,-1)},wk=QC,Ek=yk,_k=Object,Sk=mk("".split),xk=wk((function(){return!_k("z").propertyIsEnumerable(0)}))?function(e){return"String"==Ek(e)?Sk(e,""):_k(e)}:_k,Ak=TypeError,Tk=function(e){if(null==e)throw Ak("Can't call method on "+e);return e},Ck=xk,kk=Tk,Ok=function(e){return Ck(kk(e))},Rk=function(e){return"function"==typeof e},Nk=Rk,Ik=function(e){return"object"==typeof e?null!==e:Nk(e)},Mk=XC,Pk=Rk,Dk=function(e,t){return arguments.length<2?(r=Mk[e],Pk(r)?r:void 0):Mk[e]&&Mk[e][t];var r},Lk=mk({}.isPrototypeOf),Fk=XC,Bk=Dk("navigator","userAgent")||"",Uk=Fk.process,jk=Fk.Deno,zk=Uk&&Uk.versions||jk&&jk.version,Hk=zk&&zk.v8;Hk&&(lk=(sk=Hk.split("."))[0]>0&&sk[0]<4?1:+(sk[0]+sk[1])),!lk&&Bk&&(!(sk=Bk.match(/Edge\/(\d+)/))||sk[1]>=74)&&(sk=Bk.match(/Chrome\/(\d+)/))&&(lk=+sk[1]);var Gk=lk,Wk=QC,qk=!!Object.getOwnPropertySymbols&&!Wk((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&Gk&&Gk<41})),Vk=qk&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,Yk=Dk,Kk=Rk,Xk=Lk,Zk=Object,Qk=Vk?function(e){return"symbol"==typeof e}:function(e){var t=Yk("Symbol");return Kk(t)&&Xk(t.prototype,Zk(e))},Jk=String,$k=Rk,eO=TypeError,tO=function(e){if($k(e))return e;throw eO(function(e){try{return Jk(e)}catch(e){return"Object"}}(e)+" is not a function")},rO=rk,nO=Rk,oO=Ik,iO=TypeError,aO={exports:{}},sO=XC,lO=Object.defineProperty,cO=function(e,t){try{lO(sO,e,{value:t,configurable:!0,writable:!0})}catch(r){sO[e]=t}return t},uO=cO,dO="__core-js_shared__",fO=XC[dO]||uO(dO,{}),pO=fO;(aO.exports=function(e,t){return pO[e]||(pO[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"});var hO=Tk,mO=Object,gO=function(e){return mO(hO(e))},bO=gO,vO=mk({}.hasOwnProperty),yO=Object.hasOwn||function(e,t){return vO(bO(e),t)},wO=mk,EO=0,_O=Math.random(),SO=wO(1..toString),xO=function(e){return"Symbol("+(void 0===e?"":e)+")_"+SO(++EO+_O,36)},AO=XC,TO=aO.exports,CO=yO,kO=xO,OO=qk,RO=Vk,NO=TO("wks"),IO=AO.Symbol,MO=IO&&IO.for,PO=RO?IO:IO&&IO.withoutSetter||kO,DO=function(e){if(!CO(NO,e)||!OO&&"string"!=typeof NO[e]){var t="Symbol."+e;OO&&CO(IO,e)?NO[e]=IO[e]:NO[e]=RO&&MO?MO(t):PO(t)}return NO[e]},LO=rk,FO=Ik,BO=Qk,UO=TypeError,jO=DO("toPrimitive"),zO=function(e,t){if(!FO(e)||BO(e))return e;var r,n=function(e,t){var r=e[t];return null==r?void 0:tO(r)}(e,jO);if(n){if(void 0===t&&(t="default"),r=LO(n,e,t),!FO(r)||BO(r))return r;throw UO("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&nO(r=e.toString)&&!oO(n=rO(r,e)))return n;if(nO(r=e.valueOf)&&!oO(n=rO(r,e)))return n;if("string"!==t&&nO(r=e.toString)&&!oO(n=rO(r,e)))return n;throw iO("Can't convert object to primitive value")}(e,t)},HO=Qk,GO=function(e){var t=zO(e,"string");return HO(t)?t:t+""},WO=Ik,qO=XC.document,VO=WO(qO)&&WO(qO.createElement),YO=!JC&&!QC((function(){return 7!=Object.defineProperty((e="div",VO?qO.createElement(e):{}),"a",{get:function(){return 7}}).a;var e})),KO=JC,XO=rk,ZO=nk,QO=ck,JO=Ok,$O=GO,eR=yO,tR=YO,rR=Object.getOwnPropertyDescriptor;ZC.f=KO?rR:function(e,t){if(e=JO(e),t=$O(t),tR)try{return rR(e,t)}catch(e){}if(eR(e,t))return QO(!XO(ZO.f,e,t),e[t])};var nR={},oR=JC&&QC((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),iR=Ik,aR=String,sR=TypeError,lR=function(e){if(iR(e))return e;throw sR(aR(e)+" is not an object")},cR=JC,uR=YO,dR=oR,fR=lR,pR=GO,hR=TypeError,mR=Object.defineProperty,gR=Object.getOwnPropertyDescriptor,bR="enumerable",vR="configurable",yR="writable";nR.f=cR?dR?function(e,t,r){if(fR(e),t=pR(t),fR(r),"function"==typeof e&&"prototype"===t&&"value"in r&&yR in r&&!r[yR]){var n=gR(e,t);n&&n[yR]&&(e[t]=r.value,r={configurable:vR in r?r[vR]:n[vR],enumerable:bR in r?r[bR]:n[bR],writable:!1})}return mR(e,t,r)}:mR:function(e,t,r){if(fR(e),t=pR(t),fR(r),uR)try{return mR(e,t,r)}catch(e){}if("get"in r||"set"in r)throw hR("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var wR=nR,ER=ck,_R=JC?function(e,t,r){return wR.f(e,t,ER(1,r))}:function(e,t,r){return e[t]=r,e},SR={exports:{}},xR=JC,AR=yO,TR=Function.prototype,CR=xR&&Object.getOwnPropertyDescriptor,kR=AR(TR,"name"),OR={EXISTS:kR,PROPER:kR&&"something"===function(){}.name,CONFIGURABLE:kR&&(!xR||xR&&CR(TR,"name").configurable)},RR=Rk,NR=fO,IR=mk(Function.toString);RR(NR.inspectSource)||(NR.inspectSource=function(e){return IR(e)});var MR,PR,DR,LR=NR.inspectSource,FR=Rk,BR=LR,UR=XC.WeakMap,jR=FR(UR)&&/native code/.test(BR(UR)),zR=aO.exports,HR=xO,GR=zR("keys"),WR={},qR=jR,VR=XC,YR=mk,KR=Ik,XR=_R,ZR=yO,QR=fO,JR=WR,$R="Object already initialized",eN=VR.TypeError,tN=VR.WeakMap;if(qR||QR.state){var rN=QR.state||(QR.state=new tN),nN=YR(rN.get),oN=YR(rN.has),iN=YR(rN.set);MR=function(e,t){if(oN(rN,e))throw new eN($R);return t.facade=e,iN(rN,e,t),t},PR=function(e){return nN(rN,e)||{}},DR=function(e){return oN(rN,e)}}else{var aN=function(e){return GR[e]||(GR[e]=HR(e))}("state");JR[aN]=!0,MR=function(e,t){if(ZR(e,aN))throw new eN($R);return t.facade=e,XR(e,aN,t),t},PR=function(e){return ZR(e,aN)?e[aN]:{}},DR=function(e){return ZR(e,aN)}}var sN={set:MR,get:PR,has:DR,enforce:function(e){return DR(e)?PR(e):MR(e,{})},getterFor:function(e){return function(t){var r;if(!KR(t)||(r=PR(t)).type!==e)throw eN("Incompatible receiver, "+e+" required");return r}}},lN=QC,cN=Rk,uN=yO,dN=JC,fN=OR.CONFIGURABLE,pN=LR,hN=sN.enforce,mN=sN.get,gN=Object.defineProperty,bN=dN&&!lN((function(){return 8!==gN((function(){}),"length",{value:8}).length})),vN=String(String).split("String"),yN=SR.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!uN(e,"name")||fN&&e.name!==t)&&(dN?gN(e,"name",{value:t,configurable:!0}):e.name=t),bN&&r&&uN(r,"arity")&&e.length!==r.arity&&gN(e,"length",{value:r.arity});try{r&&uN(r,"constructor")&&r.constructor?dN&&gN(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=hN(e);return uN(n,"source")||(n.source=vN.join("string"==typeof t?t:"")),e};Function.prototype.toString=yN((function(){return cN(this)&&mN(this).source||pN(this)}),"toString");var wN=Rk,EN=nR,_N=SR.exports,SN=cO,xN=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(wN(r)&&_N(r,i,n),n.global)o?e[t]=r:SN(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:EN.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},AN={},TN=Math.ceil,CN=Math.floor,kN=Math.trunc||function(e){var t=+e;return(t>0?CN:TN)(t)},ON=function(e){var t=+e;return t!=t||0===t?0:kN(t)},RN=ON,NN=Math.max,IN=Math.min,MN=ON,PN=Math.min,DN=Ok,LN=function(e){return(t=e.length)>0?PN(MN(t),9007199254740991):0;var t},FN=function(e){return function(t,r,n){var o,i=DN(t),a=LN(i),s=function(e,t){var r=RN(e);return r<0?NN(r+t,0):IN(r,t)}(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},BN={includes:FN(!0),indexOf:FN(!1)},UN=yO,jN=Ok,zN=BN.indexOf,HN=WR,GN=mk([].push),WN=function(e,t){var r,n=jN(e),o=0,i=[];for(r in n)!UN(HN,r)&&UN(n,r)&&GN(i,r);for(;t.length>o;)UN(n,r=t[o++])&&(~zN(i,r)||GN(i,r));return i},qN=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],VN=WN,YN=qN.concat("length","prototype");AN.f=Object.getOwnPropertyNames||function(e){return VN(e,YN)};var KN={};KN.f=Object.getOwnPropertySymbols;var XN=Dk,ZN=AN,QN=KN,JN=lR,$N=mk([].concat),eI=XN("Reflect","ownKeys")||function(e){var t=ZN.f(JN(e)),r=QN.f;return r?$N(t,r(e)):t},tI=yO,rI=eI,nI=ZC,oI=nR,iI=QC,aI=Rk,sI=/#|\.prototype\./,lI=function(e,t){var r=uI[cI(e)];return r==fI||r!=dI&&(aI(t)?iI(t):!!t)},cI=lI.normalize=function(e){return String(e).replace(sI,".").toLowerCase()},uI=lI.data={},dI=lI.NATIVE="N",fI=lI.POLYFILL="P",pI=lI,hI=XC,mI=ZC.f,gI=_R,bI=xN,vI=cO,yI=function(e,t,r){for(var n=rI(t),o=oI.f,i=nI.f,a=0;ao;)for(var s,l=II(arguments[o++]),c=i?DI(kI(l),i(l)):kI(l),u=c.length,d=0;u>d;)s=c[d++],xI&&!TI(a,l,s)||(r[s]=l[s]);return r}:MI,FI=LI;!function(e,t){var r,n,o,i,a,s=e.target,l=e.global,c=e.stat;if(r=l?hI:c?hI[s]||vI(s,{}):(hI[s]||{}).prototype)for(n in t){if(i=t[n],o=e.dontCallGetSet?(a=mI(r,n))&&a.value:r[n],!wI(l?n:s+(c?".":"#")+n,e.forced)&&void 0!==o){if(typeof i==typeof o)continue;yI(i,o)}(e.sham||o&&o.sham)&&gI(i,"sham",!0),bI(r,n,i,e)}}({target:"Object",stat:!0,arity:2,forced:Object.assign!==FI},{assign:FI});var BI={};BI[DO("toStringTag")]="z";var UI="[object z]"===String(BI),jI=Rk,zI=yk,HI=DO("toStringTag"),GI=Object,WI="Arguments"==zI(function(){return arguments}()),qI=UI?zI:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=GI(e),HI))?r:WI?zI(t):"Object"==(n=zI(t))&&jI(t.callee)?"Arguments":n},VI=qI,YI=String,KI=lR,XI=rk,ZI=yO,QI=Lk,JI=function(){var e=KI(this),t="";return e.hasIndices&&(t+="d"),e.global&&(t+="g"),e.ignoreCase&&(t+="i"),e.multiline&&(t+="m"),e.dotAll&&(t+="s"),e.unicode&&(t+="u"),e.unicodeSets&&(t+="v"),e.sticky&&(t+="y"),t},$I=RegExp.prototype,eM=OR.PROPER,tM=xN,rM=lR,nM=function(e){if("Symbol"===VI(e))throw TypeError("Cannot convert a Symbol value to a string");return YI(e)},oM=QC,iM="toString",aM=RegExp.prototype[iM],sM=oM((function(){return"/a/b"!=aM.call({source:"a",flags:"b"})})),lM=eM&&aM.name!=iM;function cM(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))}(sM||lM)&&tM(RegExp.prototype,iM,(function(){var e=rM(this);return"/"+nM(e.source)+"/"+nM(function(e){var t=e.flags;return void 0!==t||"flags"in $I||ZI(e,"flags")||!QI($I,e)?t:XI(JI,e)}(e))}),{unsafe:!0}),"function"==typeof SuppressedError&&SuppressedError;var uM="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAZsAAAGbCAMAAAAlRs3KAAAC/VBMVEUAAAB1gdddWs6cq+JsadRdXalLTJhFRXtTU415iNhOTo5+pe41NXxjYM8qKmscHGuRn+MSGZl0ovJ3eL6EqPEXF19QUcFdnfNlctZZmvNvc9prbdaMsPA1NoYkJHFdXdFSg+08ReFMO9VVTdg3k/Vdk/BHSL1bXac+mPVDlvQcIqFKcupJlfQvL3lRculLS404ivJLRNw9P7dHkPIoKHQ/lPQpLapPm/RGRohmlvF0oPCBg7pFPt4UFFBOQ9AkKag0OK9Ie+04PLJYT9ZeYLtJRsc4OH9LXOE/TuIrL64kJG9dZ+EVHJxDZudFgu5AXuZHk/NHjfE9PMA2OLVQfOtLd+tQjfBrbLZ7fbFGdOs8d+1Dj/JCK9hPT49Jk/JqnvJaVc4jI3EXHptRTclVUcxOS8dUQdhNQ91SO9pZUdBLRt5WR9UgIGlLScVYU80YGFJXTNJGRcMbG1tDfO1BXOVDeexSPttJR8RVRNZDV+MUFEVTUMohIW5BaOhCcuqkoe9Eh+9DgO5CQcBCdetAX+VHT+FCbelBZedPQdxBaulITeBJS99GUeFFU+JAYeZYTtEdHWBKSd8XF04WFkseHmNCWeQTE0JEVeISEj94a+49Pr1WStRQP9xAQL5FivBCb+lFj/IfH2YZGVVBY+YaGlhGlvNEhO4VFUk5O7tGkvNFjPEPDzoRET0tMLDCv/02OLgwM7IqLa00NrZaVM8cIqAcHF4kKagyNbQhJqVCWuQODjVGmvQnK6tEQsIKCi0dHW1MR8tQSsuAcfUYGGmrqPNiXd97bfFKSN9hXNFNS9CvrPQGBiMFDJMTE2ZIRMhfWtsVG6NFRc0/QMfIxf9AlvQICFxQTtUoJ3lpZNU5OcCbmOw0NJrRzv8ZHopoYONcV9UwL4ampPAPFpgSElRRTcJEQacwMbo6Oq1WU9g8PLM+jvIVFV0dIamBfeAoKpM3cOsnKrOOi+ZJSNE7g+9GM9s4VuU7OqJ0cNo1e+83aOlyZ+q7uPkyX+gzT+RLR7VJUHVbAAAAYHRSTlMACZEcgRAaYFcjjy+3ib/zE9xhVFP2lmouhmk/Q3XcXEv+/bL+qGNK9d7Vq8yjfzb+2a2k7em8saKagj/++dCljvvGnHfp0r7s6s2b7u3z3b7u6NrO8+HPcNr59ujU+LDlSLXNAAApKklEQVR42uzYPU7EMBAF4IlQftZEASkNTdxSRdtssdK2aIvcYu4xd5vCtUvEdRACaSRgvSlINsLvu8LzjJ9NAAAAAAAAAAAAAAAAAJCzsjoNbhzd0FcVwXZUjTt7/uInVz8RbMLe+fAqLMIfhDnGw1gXBLfWtxqUv9Gg55eS4Jb2owb+VQhdQ3A79SEIX6I8YLHdjAvKCRLaHa2prO77pq6b/qnK/FSUY+Ar4rSntVS18wdVEVHVw3loMo6naCNfpX6dcIrno5coLHbdvU1uT3myaJKC39HiiuEcflx8IoG7njJUWjRpsStoYc2kKvwLERl3lJuyDTxTGGlR1VGVLxH1uTX5wqK5Lja0oJNX4QRVRzmxhTaH+pIW8/ygnCaxzej31aKZJwy0lMaiuUynbAqbNbSZ1N+RWW1qjHSZTM7n1GxicCyaK7TL4iFqDW0+nQoy6y00E3MoBIloEuKJzB9Gs5WyuAmJhZYSj2RWXGhG/SP9b+/s2rFrE1EcB/BLbFqjRcWaUBTtIOgkhVKkIARRU1G3OOgiRK635QXO5YY7EO4vyNCp4FBwTWiE6OLjkOsQAhHhCCYli4iTEezk0MXna8jvJeba9L0neSl+h66v8Mn39969O9oaHptVGGqSW/N/qgENV5zPi+OhgTiJY317Qwaa4/DhNK7/C5r/xWFpSPhsno6JBuItn9COa8hAc2jGfxhgaY7PUS0yfeHixYsX4rEIV2u4cfyVsdM892c1dXPp2t1U2sWmiTPp1KOFeQ4aXhxvVioN1+/DUfYYHVu4qiPTMNB+rBZOJy8dgeZ7zhHAcWaltobP5rmiQ23hqoWQ8SeoG8vCZnJ+dJqcCI43K5OGt7yXNQUzf9WkMAM4Fn68MDKNEI6/Io+Gu7yNFU29TKWRbUAAB5k4GRuZhsUZw8MFtIbTxl/VlEvU1EmG4ZDgpfhhNGcojVBzGnOSaHxn4F9Q5QUsVyJ3EZEJx7Ey04fTiOJ4i1JoNoGGA8dZVuwVWyRKaSiOibH5N465FNPCM00HmiCOv3pOSms2yfI5fpyzatlEooZOY2GMstVq1nRdNIDjJg9szWZOGMe/IYeGLn9cbLo0tuEav3Zqe6XS3pfdJt5AAzgLB9FsiuP4JyXQdP8PJzdEZwJnWiSq2zahMY0ftaDdDkjI35dN19T7cDLxkIFGaYRxnOWYOE1iHZbnw/GuKPTVAKUhOLi63W6XemkHOwizOOhVNOzwTGDEceqnJAw0SkPDu+XUn2nKhNKQ4GaJyDAJ2tvI7WvORnzoQPu6vi4Bxzkbl9QaseY01HmDQ2jW1oCmL+0vlmkADmpFhw60dRJxnPqKRJrhe86E3dlQGoKD9BrQAM7uRt9pLRVGI47jLcflDTRYnmPXu6WpkUjUXqPBu0ADCYKmy+LguWEDTQpOY0ZOa0Sb41zR1EiPBlVLAZCwU81EDE5rarA1XwsFKTj+rDBNBZYO23Mm6IOBHo39EWrDhoBVsQE47v2/aaTgeA8FHypmEgV2ae7TmuOr8cV6JLrWjW7XgtLQtH+0DAYnHWMHGqWRgeMkFgVbQ2hIxJvjryrxdENo8vk8tTGqpTCbHYwYnPT0QGsAh4YPxxO9gJ6pVOB3wbfnwGdYCoTSdHHQrzCbYNuwDMDJnGBpKhXAEWiOVxelSVToyjSHNWcCXt5QGrAJwmz28qYBOK0LDM0LsBFojnhrTia+04UlNKeuQm0ITTab3w/0JsQGcFrnGZoXgMPRHIk0FVhZbM+p39DGH0oDOEa4Tc224GWbtXGaoeHDkb7XkNbAyjS8zfGvKPBRZySaz2YB56CzwEsDbAyUOQc01IYbRz7N6M0JvdFT4EqAtobFse3tMJtdVzcg6WmGhrc5kml663LuOUAzo409PRrACX32DJpYBxwzBTQCOHJpCoAjdFqrK3DJCTSA86EZcmdT05EOOO4USyM01uDwHL8+lVy6eXMpOTW3yEVT4GiOou8GgIbB+bjTHmrzi9QGcNAcpXkNMiLN8RK3tNi125lO5325WCy/7XzaunMvfhSaF4RmdJz+KEgDrenD+VDdC4beChg6g5Pap3ktBccrPJlPPtjaKr7bIin+SbnTeXD70hFpOJvjTAJNtzjw+MlONMvWAQc/6tIADv9Yy+W+Vd/8fPfmzTuwKZbL79+Wb8ePMtC4m6MazW/q7i60rTIOA7jzC4coykBkIkIHE7zTCxH82Jh6oezOC28U0iaZ69YmSy/WkQwCvfKuNSkhzZaLhsIJJCH9yloObWhCEtO07KwV1i5zSVNbt+Iy7CgtdFD8vydJ/yc5zTnp+5529ZmgF2rAn89z3ryJFgdNpnO7+MefNTTP0pNAs4vT/u1bx77nfISGvTn91zfn/x0OD0NKOKjz+LsPG6PBF6VrzpGiwdbshbP47M8/pF8XsNssQIM4t19+4c2/fD5NcHqbH94bDkNEnOrqDI1PvK9OMzDQg32lfOb8H2jKs5bO/vEn8JS+BPWsaOy0Vdk8+vFNzkcywDxrvQtr8/5w2aZ21kh13lFtzUAEwtico0ODg1ZHJza1SL46CHlWKJomjTYI0tzVdbiIDHtzgMY/74eIOvJZg9z5RJUG/41gaM4RocHWwC2NzQbX0DIcg9GiTy9CdO0WI/w5UhxDa7PbZzaz4xAaD9CQgExJpTJriHNWedAilbpGmJpzxGgMeoMOANLkD2pwIDZjO/wy2gwQm0TH8GjJbYYo4kQawiGt8ZRoBsfCnslOb3gsNCTD+UClNTIcqhuCo0RjiKWL61k7JLteTMdMMhyDJGhjE+5bzT60UXjmqH2eEyE0HoIzFo4Jue2+vr7tXGvXUAhnjdjc+uhYXRrJxQTVM+do0uhtRXsmkShAEomMfctmk+GY9sIRVq2cWQzrrEWaPUADCY915uLxeIoEfi+Eh6qfOXfeqTdovg4MxawdUZpYej2TsO8mkVlP61VxII9WOaDRAqenQuMP5+Pxvt2k4n2WGpzxd/emwdZQz1rb0aPRL9oz9qpksoCjNmsGYZWzmqU21Efpjt3W+JPxVJ808XgMcbA4dQYNQ3GUPkI0lcOzcbFQosGAlU5t1oDGijQszZHS5HZLg9WZqmrOxHfH5TQ+pGF55hwVmt1BW7TjniHOusGkhCPSuBwOdpzys8br9SJNNU7KOzSGOHhUQ5ov/8LXY5q1/wMN4GzFdAqzVqZBHPpZg9bc9pIgTXXiyZC0OLc+kdPg6zHO2lGgeWGXpoA00iSyOkNdHJshWaZhb85AhcaPNLU4Fun7nIkfjslpSNhmDWle/fybs2fOnDl78l2mr/xq3xrE2cLjgGzWhFW3y+xgxyGt8ZZpPEhTayOExhBnKPReFY2jTKM6a+o4/3z2wntnz52fXV5uaWlZXp49f+6s6uX3IdKgTTFWz8aUXHW5nSIM66zBoM15uxRpwGY7PCi9IDhd3ZrSq7HPWn/P0o9nWpZnWzCzyy2f4uONMeyDhqOGV2tVOmUapzqOenN8zV6ggSjRwGnAEpJcfA6+X0ODOAyz1t/b9mAcClMTsPoUekoRptYY67cGUsimDbq9cIDGDTSIQz9rvuswaITGo0ADgfc4ks9zHp+WDJrDJ4Z11qA0zS13UKRKp+UNbQFoBw1t7GnbXja6Mg2EddYGoDVdIo0XaBRtQpKPDO6cxNaUaRhmDSK2ZgFp9qgO5amAfdDUbVBnJLfqDgILOw60pkLjTwKNig3iQG+QBl6tnP3OGuoATf8DlNlL56PXXzj4HFOmwSRw0zCkNcGgk+PAhXXWzNe7gIbEnwcaRZupkORj6rH3cdDMZsShn7VeFRrAOS+/jdCexiQbNNWzAGYkuRogNBrg+K5PTpVoPMZUSpEGzgKDYQnOaWyNrKc0OL29QKOS2bdf0UaAnQbP0NLAoAUDnBjWWYPWTFssoo03p1abbenH1KGxEyUavAOnnzWkUcU5q5EBO02hsKiX2eRWAwHOakUc6uaY2yanJi0WyyTWRsEmPyjBCf3wFqFxIg1Lc5BGFecEOwALDSaxjpOGgybSEBzGWTNfF2kIjvrTJtU3OexHnMFz2BoNcJBGJcvyj1y1p9Gn1WkKeNdZNWjWUhhnzdEGg1ZOA5MmjEm/ffP4ZTkNztp+j9I9PUijVhx8z3tgrVGiwc8I9Cb5oFVo2GYt4myzAE3FxrKdUqbp8w77EWcwdBxOaEizn+bIcZBGPctv47ucA2rNYiM0WVPtATq5yiMNy6xFHIQGbdqVbVJxI9QGcULvwLPGii9EP2tI02hx8ELigAYtq06TwM+kcdACPMpQzhrSYLztfSlFmm7SGrT5+8RrX3IOBwWObNaQpsHifMoAoE5jMGUz6q2xp2O1g7YT4F0uF5iwzpqz3zLd2dmJvencTinRtI75PR7UGZ7/mePwhVhmDWkaHrXjGpIgjWGkVJuiOk1CTpNccfNWF+JQzxrQdE5bOiH4vMmllFpDaCQ48/cDVocY5lnriCANw6ix07SKNvrFQqHhQcPk871RVymMs0aOAUQGbSa9ybhCa8JAgzjhe8M+l0MM86xFkKZhmxe1t3nxSmsrwTHp1zMUg6bLLUXdLi1wuH7L3RIN6nhaU/VphokL4njmm4MOCFNzaFsDNue0b00MaAiOLW0vqNJga3DRgrwbcehnjevtvNvejjj4wFGkQZy5J0HOqYajfvFJRwP56BWtWxPrbi3h6LcS+xg0vA9ojrohzDhcP6GR4Xjz8XqDJn41CnHmN61WfBmGZw7NoJGc1/gdzhvXusFGTKyoYpPJ4qBhbXYCAWLDOmswaEAjx4F3n/G9aUBGajO/5nA7IezNEVvz/G3eaOqGoE2jNBhhAWqDOLRHaVdPu0gjx8HbTllrpDhza76gE8KO09EBNM/f5mTTlStXKjqx9USjg4bJr7h4AsM4a1Z41hiNdXAMqbiMxi/CoM480rDNWmSA0Dx/m/e+7VawUWgNJnk/GgiCC9usuXo7HxmN9XC8xu24pDogpfd7u9BGbI054IQwNwdpnu9Z4N2PbwBNSQc3raETGr63aYsGg5Q4SBMhNAo4k0JfvLRsqVQ8lbSEvV0QxCE0+CIUzUGaAQoa7c/Qx7+6fKOCQ3RiW4kGBw0j2Dg+CGGZNZ+1hwyaEk6X1yjkwAV8tgWjx0NkEKdMQ43DSqP9e8+Xvmq6AZHY4PsbtUFDG/hoAG3omuPqWYHW1MOpXHp6J42t+XyrsQtkKtmlcQCNFjh0g6b9nc2ppsuXoTiS5sTWM/ugwceNGGocd2Tlkd5YDwd1KhRlF8QBGt7KaYHjG3jwmAJF87vOF5tuXK7BiS0mCo0OGt7XkOIwzJoLaIx6NRzMZFdVyjRWLXB8Phoa7T8jONl07bIYyaxdweKotQYvBWZkNvtqjrsHWgNRwrFUpcZm7qEzYIWw4xCa0ZZR6kn7QKsjWtO1a3KcWN6eaYgGbdqiAcChnbXSoJHQNufpGkdaw44jDtroKDXOslYn6Le+unBNhgM6U2nEQRq9rq6N0E9sqGct2EFo6HG8T9ecQKMFjtgaCNCMPteTwKkmsJE3h+BkMwU7JpFZ1wFNfZu2GZChnbUgtoZu1uawNYw4ZjPQiKGQ0fI7UKc3rl2oh2MoFjLlI0EhkbEXbUBTP8nrxIZy1gIdK4INTKib8/Qh0rDhmKE142Uaqlmb/VAbmhNNFyByHFHnylS6mC1kIAl7tqiLmXRKyS3M8CBDNWswaHmbjQHn6ZoVaZhwoDX/Ak05FDiz32j1sLl4oZQ9cbpjsdbFrWKxuLVo0ht0ykkuRcGGCicQARoxlDhzQIN/fxYch/nBxPj4+CjhoXrmLJ/RaNG+birJ1Js1wjMVg98M0Bk1m01iQzNr4qBBaJvTNedxAo0WOA7SGhKszT5ptPrPCD7YuHi1Hg5efJKM6FQj7PBgQ4ETGAAag4Ee5/YU+QYJOw6hefLvrVslnHGaWZt9+yWN3tn8dPGiCg6kjKOqkzc54BC931kjrbERGgacu0u826UBjs/hABpIVXMQh4KGOqeARhmnu8Hm4MXAvpvDw6ABDAPO9Fow4HKx4/icZZqa5hCZ0UOmeXnjopgLGs1abnOG57E4DTXHyfv0QMOE87QfFo0FB2n+nhBlKjiYQ6Y5DosGYZ81HDUuyvP7m7WAzwY0TDjTcP/tZsLB1kxMAA7RwebgiYCChnrRNq5eBRgNZy25BMUpyTR4Q8APrCRNBgoctOmEg4DbzY5DWjNUtsFZk5ykD5HmA6ABHC1nTVjhowSn0aM0x5uBxkSDgzrTm4GAmx2HcwLNEOBgc2TPnMOiOd508yqJprOWg+Jgc1RnjTfbBJMYBpy7C1AbJhykQRxsDoaChnbRblbhXNBi1gQTV8LhG5k13getEcMwa1MWM+9mxnECTQhtZM3B4hwCzYmNX28eAE5udSaKzVGetSgMGv6/b2hxpjeBhhWHIzQhxKnTHMA5BJpjH9/8tQan4RsCJZ2R0nGgkdMaDBrQMONML4ENIw6hGQyVcBSeOXgiUKRhf2vzKwRw0EbttAZpoDl5IVLBkdtI//mRQdOhjRwH0gjOdFvUzYhj5Z7cAxqSKpu9bggOnub1jV9+QRwtj9Km5IgDcFRPa1EH0FTC8syZ8kWD1DhIM1iFU/+0Br8Uadhz6otf9okDaRTHxmFz6uFEyaBh6GdtysvxQSYcq/XJveFBxFE5rbUcMM17QENwUAdxKqE9SgOOYUD5meNyR3tNhAZDPWvTay4+CKHGITT4A3QaeeaMKtOw1wZycLOWb1Y8rfHRhTzSsM3a9EM32lDglGnABiK1kTUHZUYPkObkhihzcLMmJDcDoLP3m9BA1LqZFEw6DMusTT8Mgg01jtv6ZD4s+7Fg6qe1g6J56+MvLl1CHFFH2xsCUz6nX+BBJ1A7ayDDL6zk8kDDjIM21Dgu631Co4gDkeFoToO1uURs2GdNKUJyp5mfmameNT4aDbTtJAUdhnXWxOcNBQ7S1PxYMLkNNgeCpzWk0bI2QCPH0fricySZ3FnyRWdmohCeB5aZqCuytCMk4a/TDifWxUUDlDhu6/05f5ikweagDrZG07z8xe/EpnbWtL/4HBGS+dX7S70+zh10Wc29C5sr+aQwgnOmxawZY75ogA6HtMbvV8BROa2NIo1mtfn9t0sUzaH8mDon5E2GlZ0VmwmocMy0aw7cCwRocCo0aKN0kpaf1pBGu5z8j717i42iCuMAvmu9gEUliAgCYuOFKOIFFFEeVEQF7wQvqC+u8fbQ2tCChLoQWi4Nd9gtZUNSSguhwK4BTCi4abdt9oFsmq5tI7tp+mDDA21NA00JBBIwfrPd9ut2Zs45c3pWZqbnM9EXn/jl+8/Z7xvOZO3ZAzjpjjXk+Rvqzz/hX/g/i+ycWAfYcOAESttb9gMNoXOIE4I00IxffG7PIA7GmpjBJ73E48TgtjYOHB/SHDXyzEGaZ4BGdNts2wY253Q75yeeWBNvw4zTkOMJGcbxJmig0IYaa9g5SCP6abMtgSPwmSO4jOJ0xRv9RnH8CRrEIXxhVz0hwEAT3TZbt0EJjbVvbm+sxTqDQYM4fp9CgziGT2sXnhkvnMb54tatAziYawYHn9g6Ap85/IPPhkhFox9x6IPPqgDQ4OU3HM+cCxBowmtG1lbEocfaL5aItS58R56pc/wKDdqocMiDT6QRXI9nbQIbu8VaDBqHHccfaO8r2484Rw11DhQGmsiamrVpEwmHfZ9jqljr+jcY8rPGmtI1RWVKccZaM3aNyHo/YWO/WOuCF0gYOwdo+gbvvsFij7UL6aGZvHiTUsZi7QcLxNqvXRVsOIlAK0rScMVaMwaa0Loza/t2Ag518GmOWNPCieV4Gv0MOMEETZFKB4oJp7pnHnaNyHK+u2k74AzY2CrWulYXUHGQhqVztBvn9TR9d+ix7TvARq9zfjRrrDHirPBSYy3ku9ZXWwRFaBzi4LMaaQTXW1k7EIfyzLFerHXlnCbj+ELezgSNSocVpyZtNGMX71BsNGLtnFlna0YGnzm7YvFQSBen1B+qgI8dYqljjTL4RBrxdeetHUohjqJjjcEnW+d819Ve2ggLai0cfyjQUd+HMmoc+uBTPA2eBHbs2wc26lizzT6noSsn7ged4TgB+Gnq7o5Ea2uLiDpHSac1pBFfU4EGbNSxZqN9Ts6urn87vCGINsQBmGCBqzMSwYuJSI+c/XqxNgdphNdzWWsAx7Kxxjr43NWV057tCYYGK+itaC8Dmf6q5Y211x1Qd89cfu/82bPn37v8+btFRtrH+9YATmqs2XHw+X1DLLa6s70j7q6ocMU72q8VRSL1q3WvkVSnmlas9cInOxdMn/1SuKnO7XK565rCL82e/rywHzdroIbh2HLwqbxDADyxSEN9fUMkEoshDAGHPCHofXvszHFhVxhcBsoddtWNG+MUM+a8NYCDsWbPwSfgKJX8r8bFREZj7eTF/V+8Ew67VBUOj1sgItI+XLMXaEZJrBm6HZc2vjlz4veOkiY3kgxtnqbpI7fJXLx3717eWLPYhIADhzQhOHoifjrb5QYcLZ2mcXeP+JR2td8GasDG/rGmi0OxgUKcthPx3dluKJd2hR99fqQ/PK/+sXdY51hy8Pm/x1rb0Xhedjbg6OrU1T04ski7unKlFo5d9zmiYi1JQ8EJzxyJzcO3VgIOxhppQmDXWFvBcVpra4vnVSRsSLHmfmAkz5x3oW+Gdc4Oq8bad6I6h44DNJUlFYijpxO+38kfaR/uBRp1rNl5nyMg1lrbXJUlYEPvnPP38r9pe3UjyKhizdb7HO5YQ5r98crdJVBUHEi1ydwn6FsbEadfx9KDz5/TGmvYNbn9H8ivoMda02zuOefKjVo4dt/njCTWoGtc3rzdKhzdRw7nr5yMxTvBxlisnVN1Du/FRCKL/2IitGHrnNYylwe+uQY2bLHWNJ/PZsJKsEntnFE2+DQca61Fbm8eFDNOHZyj+QY2OxEHCmzk4FM71pCm4HDys8UqHG2d81zTAeenYKPqnNG0zzGEk6SpPJzE2c2GU8d1Gpi8duNONc4aGWt6R+lobXZBZSUBR9PmUSfPyvPWoUM7d8pYY+2c1la3LxdsjHVOXZxnz/ba1UODONg5cp+jjVNW2+oqzYVixMG6h8NmVrFiQ4k1sLHti+zGJgR9HT5PLh1HbTOdx2ZncbEaxx77HOFH6bKWa74qsDHeOU1jeAadYFM8PNbkPkcTpyxaVunzeNQ4p6njm/OLjNvMWAs0KbFmj8FnWmKttiXu93oRx0CsnV/OMYS+WazCoU4ILBRrQjunpbOqwMuKk6pTx3EWePXm2kTnYKzJwacuTl/cX+VNxTlMirURngW+LAYbaqzZ/0V2lliL7vf4qgCHI9bcrjEcC4Ita9U49trnCDuttVwKwp0qup2zm3AgqHtprPEFwYdAM6gjJwREnGgJ2KhwQIc++Ky7n2NBULyFG8d+FxORcaJlXn8B4kCxHwjC8zkWBGu3bFHZyH2OJg58HixQoBTHM+f8Aj6bLTLWmHDg7k/lXhWeWAu/5+SwublFjSP3OZo4kXioFIon1sLTeRZrN4CGFmvyRfb+r1G6Qj6w4Yg19wMZHBd0frZ2M9BwxZo9LybSx1kdzQ75+HC4Xh6cXL55cyqOHHzq4UQVG8CBMoiTXHo6M2c+BTU1g9HmxmbESdrIfY4KBzPNx9M5D42BP+lFcxb+3n9PxJJ5kx68i24z7SbQqDsnFUe+yA46/TaBAAfO4emOGXPO9Jw8VXMKZOBOolM9PfMWjaUupG+Wp+Lc9sGniWMtFm8MqHCog8+S0/EvFv7Wm3KvNPicXTKJ0jtTboDNsFiz5z5HwOAzdkn5XovBWDtdcunoxZMa961VNy+cSd4Q3ChPxbH94HMEnQPf2A0CjqFYy8vubNO8kR3q7AekXahz1rry8nKzxZpZ9zk5K6pCfr+hWDtccbKVcI1k8xz9ccFds9YBzrDOkfscPZyIG2yMxFplRWcr8UMTgEPoG8AZbbHGjRNrDwXpOLjPqdzd2Ur+0ATg6I4FZt1QcDDW5OCThFMfLVAah/WZk1sCNLTbcZvf0Pt589nldQZxRvXgMwa3gCMOZfCZm+gaGk71t1MJNpRYky+yI06kqBQah+2Z48nrbKV+aALq7Dxtm4lvKjYy1hhwsHGCTLEGNC1s3zJoXqRjU76BgiNfZB+KUx/NRRxSrHkTNEw41Us0z2oT3ly3AXBSYk3uc0g4sU7lU7G0WKusqgQa1u/nnJ2ha8PQObZ8kZ2vc+CjICFqrFXlJmmYOqdnoa5NKo7c55BxcmDiGSTFGuAUAI2BG9lreibr2hiNtdF9MVF9xNVIjrVSD9Aw38gO1fyIpg3ApHaO3OdQcWJxQqx5vAHoGmMfmqiZ49Q6p21YNQTHjINPE8Zafazd3wg2mjil/uzuFqYb2RGnZt5d2jbDcOQ+h+WZ03061KgRayDj6aiNst3IjjZnl2Xq2CDOaBx88p3WIrF2TyMkW2Aojs8fLIh399WWGf3QRM3JRzRsPlJszB5rJtznrKiP1bfn+RsbgwPBFgiGArkgE9W+Nor4zDl1cpHGPE2xMdo58mKiRIFOd0e2xx9MlL+qJN5e1tKif98a4WuHBJvbH2sWPEpD5URikSL4toFS17pX9PWtqCXfv6qDAzaPaNi8+RXAII4cfBrCgaqPJKs+Sru6WD/WapY8qLbJ+PRy/lAcEww+LbXPGdGN7IhTszBDbeOcuwpsUnDkPiftN7KrP0Wp9fvGOSs/P3+VjLXb8qEJ7Jzq+xyaNlBmizXrTAgoOKxf2G2eqmUzF220Yk2+yC7g6mJq5/y2bLzme51fIQ5b58iLicidw3FaOzVJ+33o6yCTEmtyn5PmWFPj1CzQtHntcorNaB183oZYQ5veOTrXCyg2xFgz0eDToqc12uCzd4G2TaaSaagjB5+icehf2O3Ve7FzcmFhfr45Ys3iL7IjjLEv7J5ZlqFncyQFxxSDT4s+czhjbclU3auGluarcKDkhEB0rOmlWu9TDr1yfn69ECq/kPGZIy8mEnuU7r2P9JcKEzagUmimWLPohMBwrPVOIt5nU5iofhk5+PwfYw2KTOOYciRpo/xjxsGnjfc5F8k0jgmFgKMba/JF9jTuc6BryDXtypEBHJPFmg0nBIM6SEMq55dHAGcg1+TgM/04ycJAIxyiwWZIrMl9TpoHn0hDr2evII7qtCZfZBfdOUjDUK9dXw82ZjmtWf9FdmqsIQ21HruyfhDHPINPC7/IzhBrF+9wMNW0A0dScArNNSGw4ovslM7BrqGV81lonCE4cp+TbhzsGmrNhb4Z3jlmiDW77nOQhl5PKn2DOHKfk97TGgQae028DjKqzpH7HNGxhl3DXpmJvmF75siLiUYw+EQa5sqAw4Be58gX2QXGGtKw1xSwGcAx6+DTHrGGNMw2Bw4kbcw0IbDhi+xtSMMcah9p4kDJfY7IWMOuYS/n0gOIQ37myIuJOHCQhqNevTKAY64Jga32ORBoPPUw2PTjmHNCYPFYQxqOmrZ0vQ6O3OcIeuYADWd9otCY8rRmk31O230O3npy/fEhOHKfI3rwydM1OFIDG8SR+xxhncNPg2+sHzhO7xxrxJrp9jk5GGh8ofaCYmOK05rtLiZCGr6acOX4EByT73OsdZTGQOOs8S8cPA5F6Bw5+OSINaQZaaglcEw7IbDmPgcDjb8efuHgQYw1uc8RE2tCaByZTys2AzpynyMm1oqARkC98k8Sx6wTAgvucwTROCZAqPWfB0wxIbBDrLUKonGMXQqNQ+0ceTERO07RHQ5RNVexOWj205p1Bp/QNcJqIoRaAsc0EwKTz9bInVMkkMbhfBoah9Y58mIixs6pBRqBNSXROCY/rVlk8CmYxjHta0XGVKc1q77ILo4Gf+IcG8SR+xzOZw7SCK3H/jmWxNEffMqLieixBjTCK+NpwGF75siLifRxxNLgwPMYdo52rMmLiWixFkUakTX+5YNJHDn45OscpBFeUyDUCDimusHDnPscpBFdmS8rNqTTmryYSAMnzTR4jKZ1jjnvWzPHhCCdNI6JTxxLlAUmBCYcfKaVxuH85K+EjekmBFaItXTR4DT6v/bOoLWJKIjjs6wKYRHKGojRBZMYpSEhWEIIhuAlhxZKbQUVRNCbeBRE6EWoWBXRjyClICnYq8dc9CRePO2n2IuHNNBAC07WrjGmJumyu5l5O79D6P3HzJvM//WldZLKkYvsg8pBNSFTcv7IIZ/nkLrI/uUUhA0WTuvIjeQ50xGRGmTNbo1WDpMbn7NbfH4JvaF5hdNiM60RyXPCrxpvVEM5NKc1qnkOqomGZL7lyZE8ZyqwoUVF7Y8cyXNIVQ2SqLY8OQTzHHKLz6+oJjqu256cKfOcOF9kx6qJEr3a8uRInkNLDUA678lhnudM2hAwa2h95gr2kRzJc2hVDWLlWyesHPQSv4eJUM0MqLmFw2lD4DfPYacGu5prhuGG4KRtjZ0agJTX1STPoaYGtJLX1STPIaYGwPAKR/Icamq8LzmjlcPoBY9p5XBTA4BdbUxbo/PGZxB5DjM1YM23W8SntcAeJmKmBruaPSRnYIdRnjPtKM1MDc5qrhxZfNJTA2DMt1EOww2BrzyHlZr+N9DfciTPIacGoGK3pa3RVAN66bccyXPIqXGPHFcOxTwn+IvsrNQA1G1Xjo88R72HiYipcY8cptOar8UnJzWgF1AO+Q1BYLs1TmoAjGrbb+Wo9DARRTUAmXlXjup5zp/FJyM1/bigjbDNc056kZ2TGnceQGKc5/wgqwa02kDOuIvsqv7CLt2qQfRa2/eZw/9hIsJV0ydRaiPxzHOIq+mnoKgmlotP8moAkiiH64bAV57D4azxMFEO3cVn8G2NTdW4chRpa9NuCBipAUj15TDNc3wtPnk0tDFytqm0teDzHDZV48pBM2TynJAvsn/mpQblcJ3WfFxkZ6bmt5x45Dns1ExROUw2BJPk4Gsb/EA5MchznjSBIyhH+Tzne/M0sMS0Vc9zck0NmGJV20rnOTmOZ42HscYiz/G5+Mzxm9D+JlGzZ57nhHSRfX3hEvBGu5JXYvE5Iie3cBHYU6/y3BCMv8i+fuM8KECmao/KobIh8NnWHjV1UALLvY7L47+ppxulmU8Bf2PUbJYbguPznPVHuQugDlra5rwhGJKznruhwBTwN2bB9lM59PKcx3uXE6AYRinPcVr7t3Ier18F9dCv5G32ec7eZcX62aCvHclh+yL7XvMMKIpes21fZw6Rh4nYb2nGoaUKNvVp7T8PE6GapnJDwDBGZbRyXKjnOWoXzRFYOn6mtRkvPveaSuzPJmHgwMZsQ7B3Q6VNwKTS4ZTnfMgtKzuejaKn5202eY6y32n+h4XjNIsNQWMhNu1sgFnK2/TynHfDchoLZxUfnI9Hr1fzn3xUTnQPEzUay7E049pJVx2601qjEbeDZhgD7XwiuSH41rh8DmJO344d0rTmf0PwLbsYgzXAZBLpap7WtJbNXs6wvUwbeO0UHIdKnvMKzVwUMwP0esHZJpHnZJfiPQEch2auOc7Mf2E3u1CO7dQ8Di1Z23acGf7CbnZp8cIcCMdjpQvXnN3JeU4Ybe390rI0swmtrfLg2m7ki8/s+0VpZlNgpGo4tkX1gge6Oeyuls/LZDb1UF26tu1E0da63e5S8ZIiF8+jwkpX7ne2tsL9hd3u4cqyKce/r+ZWubXb2QhpWusebi4Wk1IxvjEy6dLNrQ4WUIAbgo+b3c3u6u0LspcJoHzSdzc6G52dnQDynM3Nj4eHK8VyUrwExFzCrKztbnX20Y3PPAfNPD84eP56sVg3ZFoOGiOTeli6vbOxs7//4oS7tTcHb96+WV0tXsgYIISFZqXK6dLdmy/2nz7dwY8xZ87rt73eW/w4WFm5d6VcTso8FglzifNmvVKsoCMsnWc/h+j1egc99PPyzp3bxeJy3UqcFy3RoxtGBqlfR6544N/1DHLR0OXAnykaYljJZNI0zVQqhZ/4tzWnaeJFEARBEARBEARBEARBEARBEARBEASBMr8ADJvUZ0bGgJQAAAAASUVORK5CYII=";const dM=({options:e,logger:t,store:r,params:n})=>cM(void 0,void 0,void 0,(function*(){const n=yield(o=e.network,cM(void 0,void 0,void 0,(function*(){const e=new vr.keyStores.BrowserLocalStorageKeyStore(window.localStorage,"_meteor_wallet"),t=yield vr.connect(Object.assign(Object.assign({keyStore:e},o),{headers:{}}));return{wallet:new VC.MeteorWallet({near:t,appKeyPrefix:"near_app"}),keyStore:e}})));var o;const i=()=>cM(void 0,void 0,void 0,(function*(){const t=n.wallet.getAccountId(),r=n.wallet.account();if(!t||!r)return[];const o=yield r.connection.signer.getPublicKey(r.accountId,e.network.networkId);return[{accountId:t,publicKey:o?o.toString():""}]}));return{signIn({contractId:e,methodNames:r=[]}){return cM(this,void 0,void 0,(function*(){t.log("MeteorWallet:signIn",{contractId:e,methodNames:r}),r.length?yield n.wallet.requestSignIn({methods:r,type:VC.EMeteorWalletSignInType.SELECTED_METHODS,contract_id:e}):yield n.wallet.requestSignIn({type:VC.EMeteorWalletSignInType.ALL_METHODS,contract_id:e});const o=yield i();return t.log("MeteorWallet:signIn",{contractId:e,methodNames:r,account:o[0]}),o}))},signOut(){return cM(this,void 0,void 0,(function*(){n.wallet.isSignedIn()&&(yield n.wallet.signOut())}))},isSignedIn(){return cM(this,void 0,void 0,(function*(){return!!n.wallet&&n.wallet.isSignedIn()}))},getAccounts(){return cM(this,void 0,void 0,(function*(){return i()}))},verifyOwner({message:e}){return cM(this,void 0,void 0,(function*(){t.log("MeteorWallet:verifyOwner",{message:e});const r=yield n.wallet.verifyOwner({message:e});if(r.success)return r.payload;throw new Error(`Couldn't verify owner: ${r.message}`)}))},signMessage({message:e,nonce:r,recipient:o,state:i}){return cM(this,void 0,void 0,(function*(){t.log("MeteorWallet:signMessage",{message:e,nonce:r,recipient:o,state:i});const a=n.wallet.getAccountId(),s=yield n.wallet.signMessage({message:e,nonce:r,recipient:o,accountId:a,state:i});if(s.success)return s.payload;throw new Error(`Couldn't sign message owner: ${s.message}`)}))},signAndSendTransaction({signerId:e,receiverId:o,actions:i}){return cM(this,void 0,void 0,(function*(){t.log("MeteorWallet:signAndSendTransaction",{signerId:e,receiverId:o,actions:i});const{contract:a}=r.getState();if(!n.wallet.isSignedIn())throw new Error("Wallet not signed in");if(!o&&!a)throw new Error("No receiver found to send the transaction to");return n.wallet.account().signAndSendTransaction_direct({receiverId:null!=o?o:a.contractId,actions:i})}))},signAndSendTransactions({transactions:e}){return cM(this,void 0,void 0,(function*(){if(t.log("MeteorWallet:signAndSendTransactions",{transactions:e}),!n.wallet.isSignedIn())throw new Error("Wallet not signed in");return n.wallet.requestSignTransactions({transactions:e})}))},buildImportAccountsUrl:()=>`https://wallet.meteorwallet.app/batch-import?network=${n.wallet._networkId}`}}));function fM({iconUrl:e=uM,deprecated:t=!1}={}){return()=>cM(this,void 0,void 0,(function*(){return{id:"meteor-wallet",type:"injected",metadata:{available:!0,name:"Meteor Wallet",description:"Securely store and stake your NEAR tokens and compatible assets with Meteor.",iconUrl:e,deprecated:t,downloadUrl:"https://wallet.meteorwallet.app",useUrlAccountImport:!0},init:t=>dM(Object.assign(Object.assign({},t),{params:{iconUrl:e}}))}}))}var pM=r(74848),hM=r(87583),mM=r(17965),gM="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},bM=function(e){try{return!!e()}catch(e){return!0}},vM=!bM((function(){var e=function(){}.bind();return"function"!=typeof e||e.hasOwnProperty("prototype")})),yM=vM,wM=Function.prototype,EM=wM.bind,_M=wM.call,SM=yM&&EM.bind(_M,_M),xM=yM?function(e){return e&&SM(e)}:function(e){return e&&function(){return _M.apply(e,arguments)}},AM=xM,TM=AM({}.toString),CM=AM("".slice),kM=function(e){return CM(TM(e),8,-1)},OM=bM,RM=kM,NM=Object,IM=xM("".split),MM=OM((function(){return!NM("z").propertyIsEnumerable(0)}))?function(e){return"String"==RM(e)?IM(e,""):NM(e)}:NM,PM=TypeError,DM=function(e){if(null==e)throw PM("Can't call method on "+e);return e},LM=MM,FM=DM,BM=function(e){return LM(FM(e))},UM=function(e){return e&&e.Math==Math&&e},jM=UM("object"==typeof globalThis&&globalThis)||UM("object"==typeof window&&window)||UM("object"==typeof self&&self)||UM("object"==typeof gM&&gM)||function(){return this}()||Function("return this")(),zM={exports:{}},HM=jM,GM=Object.defineProperty,WM=function(e,t){try{GM(HM,e,{value:t,configurable:!0,writable:!0})}catch(r){HM[e]=t}return t},qM=WM,VM="__core-js_shared__",YM=jM[VM]||qM(VM,{}),KM=YM;(zM.exports=function(e,t){return KM[e]||(KM[e]=void 0!==t?t:{})})("versions",[]).push({version:"3.23.3",mode:"global",copyright:"© 2014-2022 Denis Pushkarev (zloirock.ru)",license:"https://github.com/zloirock/core-js/blob/v3.23.3/LICENSE",source:"https://github.com/zloirock/core-js"});var XM,ZM,QM=DM,JM=Object,$M=function(e){return JM(QM(e))},eP=$M,tP=xM({}.hasOwnProperty),rP=Object.hasOwn||function(e,t){return tP(eP(e),t)},nP=xM,oP=0,iP=Math.random(),aP=nP(1..toString),sP=function(e){return"Symbol("+(void 0===e?"":e)+")_"+aP(++oP+iP,36)},lP=function(e){return"function"==typeof e},cP=jM,uP=lP,dP=function(e,t){return arguments.length<2?(r=cP[e],uP(r)?r:void 0):cP[e]&&cP[e][t];var r},fP=dP("navigator","userAgent")||"",pP=jM,hP=fP,mP=pP.process,gP=pP.Deno,bP=mP&&mP.versions||gP&&gP.version,vP=bP&&bP.v8;vP&&(ZM=(XM=vP.split("."))[0]>0&&XM[0]<4?1:+(XM[0]+XM[1])),!ZM&&hP&&(!(XM=hP.match(/Edge\/(\d+)/))||XM[1]>=74)&&(XM=hP.match(/Chrome\/(\d+)/))&&(ZM=+XM[1]);var yP=ZM,wP=yP,EP=bM,_P=!!Object.getOwnPropertySymbols&&!EP((function(){var e=Symbol();return!String(e)||!(Object(e)instanceof Symbol)||!Symbol.sham&&wP&&wP<41})),SP=_P&&!Symbol.sham&&"symbol"==typeof Symbol.iterator,xP=jM,AP=zM.exports,TP=rP,CP=sP,kP=_P,OP=SP,RP=AP("wks"),NP=xP.Symbol,IP=NP&&NP.for,MP=OP?NP:NP&&NP.withoutSetter||CP,PP=function(e){if(!TP(RP,e)||!kP&&"string"!=typeof RP[e]){var t="Symbol."+e;kP&&TP(NP,e)?RP[e]=NP[e]:RP[e]=OP&&IP?IP(t):MP(t)}return RP[e]},DP=lP,LP=function(e){return"object"==typeof e?null!==e:DP(e)},FP=LP,BP=String,UP=TypeError,jP=function(e){if(FP(e))return e;throw UP(BP(e)+" is not an object")},zP={},HP=!bM((function(){return 7!=Object.defineProperty({},1,{get:function(){return 7}})[1]})),GP=HP&&bM((function(){return 42!=Object.defineProperty((function(){}),"prototype",{value:42,writable:!1}).prototype})),WP={},qP=LP,VP=jM.document,YP=qP(VP)&&qP(VP.createElement),KP=function(e){return YP?VP.createElement(e):{}},XP=KP,ZP=!HP&&!bM((function(){return 7!=Object.defineProperty(XP("div"),"a",{get:function(){return 7}}).a})),QP=vM,JP=Function.prototype.call,$P=QP?JP.bind(JP):function(){return JP.apply(JP,arguments)},eD=xM({}.isPrototypeOf),tD=dP,rD=lP,nD=eD,oD=Object,iD=SP?function(e){return"symbol"==typeof e}:function(e){var t=tD("Symbol");return rD(t)&&nD(t.prototype,oD(e))},aD=String,sD=function(e){try{return aD(e)}catch(e){return"Object"}},lD=lP,cD=sD,uD=TypeError,dD=function(e){if(lD(e))return e;throw uD(cD(e)+" is not a function")},fD=dD,pD=function(e,t){var r=e[t];return null==r?void 0:fD(r)},hD=$P,mD=lP,gD=LP,bD=TypeError,vD=$P,yD=LP,wD=iD,ED=pD,_D=TypeError,SD=PP("toPrimitive"),xD=function(e,t){if(!yD(e)||wD(e))return e;var r,n=ED(e,SD);if(n){if(void 0===t&&(t="default"),r=vD(n,e,t),!yD(r)||wD(r))return r;throw _D("Can't convert object to primitive value")}return void 0===t&&(t="number"),function(e,t){var r,n;if("string"===t&&mD(r=e.toString)&&!gD(n=hD(r,e)))return n;if(mD(r=e.valueOf)&&!gD(n=hD(r,e)))return n;if("string"!==t&&mD(r=e.toString)&&!gD(n=hD(r,e)))return n;throw bD("Can't convert object to primitive value")}(e,t)},AD=iD,TD=function(e){var t=xD(e,"string");return AD(t)?t:t+""},CD=HP,kD=ZP,OD=GP,RD=jP,ND=TD,ID=TypeError,MD=Object.defineProperty,PD=Object.getOwnPropertyDescriptor,DD="enumerable",LD="configurable",FD="writable";WP.f=CD?OD?function(e,t,r){if(RD(e),t=ND(t),RD(r),"function"==typeof e&&"prototype"===t&&"value"in r&&FD in r&&!r[FD]){var n=PD(e,t);n&&n[FD]&&(e[t]=r.value,r={configurable:LD in r?r[LD]:n[LD],enumerable:DD in r?r[DD]:n[DD],writable:!1})}return MD(e,t,r)}:MD:function(e,t,r){if(RD(e),t=ND(t),RD(r),kD)try{return MD(e,t,r)}catch(e){}if("get"in r||"set"in r)throw ID("Accessors not supported");return"value"in r&&(e[t]=r.value),e};var BD=Math.ceil,UD=Math.floor,jD=Math.trunc||function(e){var t=+e;return(t>0?UD:BD)(t)},zD=function(e){var t=+e;return t!=t||0===t?0:jD(t)},HD=zD,GD=Math.max,WD=Math.min,qD=function(e,t){var r=HD(e);return r<0?GD(r+t,0):WD(r,t)},VD=zD,YD=Math.min,KD=function(e){return(t=e.length)>0?YD(VD(t),9007199254740991):0;var t},XD=BM,ZD=qD,QD=KD,JD=function(e){return function(t,r,n){var o,i=XD(t),a=QD(i),s=ZD(n,a);if(e&&r!=r){for(;a>s;)if((o=i[s++])!=o)return!0}else for(;a>s;s++)if((e||s in i)&&i[s]===r)return e||s||0;return!e&&-1}},$D={includes:JD(!0),indexOf:JD(!1)},eL={},tL=rP,rL=BM,nL=$D.indexOf,oL=eL,iL=xM([].push),aL=function(e,t){var r,n=rL(e),o=0,i=[];for(r in n)!tL(oL,r)&&tL(n,r)&&iL(i,r);for(;t.length>o;)tL(n,r=t[o++])&&(~nL(i,r)||iL(i,r));return i},sL=["constructor","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","toLocaleString","toString","valueOf"],lL=aL,cL=sL,uL=Object.keys||function(e){return lL(e,cL)},dL=HP,fL=GP,pL=WP,hL=jP,mL=BM,gL=uL;zP.f=dL&&!fL?Object.defineProperties:function(e,t){hL(e);for(var r,n=mL(t),o=gL(t),i=o.length,a=0;i>a;)pL.f(e,r=o[a++],n[r]);return e};var bL,vL=dP("document","documentElement"),yL=zM.exports,wL=sP,EL=yL("keys"),_L=function(e){return EL[e]||(EL[e]=wL(e))},SL=jP,xL=zP,AL=sL,TL=eL,CL=vL,kL=KP,OL="prototype",RL="script",NL=_L("IE_PROTO"),IL=function(){},ML=function(e){return"<"+RL+">"+e+""+RL+">"},PL=function(e){e.write(ML("")),e.close();var t=e.parentWindow.Object;return e=null,t},DL=function(){try{bL=new ActiveXObject("htmlfile")}catch(e){}var e,t,r;DL="undefined"!=typeof document?document.domain&&bL?PL(bL):(t=kL("iframe"),r="java"+RL+":",t.style.display="none",CL.appendChild(t),t.src=String(r),(e=t.contentWindow.document).open(),e.write(ML("document.F=Object")),e.close(),e.F):PL(bL);for(var n=AL.length;n--;)delete DL[OL][AL[n]];return DL()};TL[NL]=!0;var LL=Object.create||function(e,t){var r;return null!==e?(IL[OL]=SL(e),r=new IL,IL[OL]=null,r[NL]=e):r=DL(),void 0===t?r:xL.f(r,t)},FL=PP,BL=LL,UL=WP.f,jL=FL("unscopables"),zL=Array.prototype;null==zL[jL]&&UL(zL,jL,{configurable:!0,value:BL(null)});var HL=function(e){zL[jL][e]=!0},GL={},WL=lP,qL=YM,VL=xM(Function.toString);WL(qL.inspectSource)||(qL.inspectSource=function(e){return VL(e)});var YL,KL,XL,ZL=qL.inspectSource,QL=lP,JL=ZL,$L=jM.WeakMap,eF=QL($L)&&/native code/.test(JL($L)),tF=function(e,t){return{enumerable:!(1&e),configurable:!(2&e),writable:!(4&e),value:t}},rF=WP,nF=tF,oF=HP?function(e,t,r){return rF.f(e,t,nF(1,r))}:function(e,t,r){return e[t]=r,e},iF=eF,aF=jM,sF=xM,lF=LP,cF=oF,uF=rP,dF=YM,fF=_L,pF=eL,hF="Object already initialized",mF=aF.TypeError,gF=aF.WeakMap;if(iF||dF.state){var bF=dF.state||(dF.state=new gF),vF=sF(bF.get),yF=sF(bF.has),wF=sF(bF.set);YL=function(e,t){if(yF(bF,e))throw new mF(hF);return t.facade=e,wF(bF,e,t),t},KL=function(e){return vF(bF,e)||{}},XL=function(e){return yF(bF,e)}}else{var EF=fF("state");pF[EF]=!0,YL=function(e,t){if(uF(e,EF))throw new mF(hF);return t.facade=e,cF(e,EF,t),t},KL=function(e){return uF(e,EF)?e[EF]:{}},XL=function(e){return uF(e,EF)}}var _F={set:YL,get:KL,has:XL,enforce:function(e){return XL(e)?KL(e):YL(e,{})},getterFor:function(e){return function(t){var r;if(!lF(t)||(r=KL(t)).type!==e)throw mF("Incompatible receiver, "+e+" required");return r}}},SF={},xF={},AF={}.propertyIsEnumerable,TF=Object.getOwnPropertyDescriptor,CF=TF&&!AF.call({1:2},1);xF.f=CF?function(e){var t=TF(this,e);return!!t&&t.enumerable}:AF;var kF=HP,OF=$P,RF=xF,NF=tF,IF=BM,MF=TD,PF=rP,DF=ZP,LF=Object.getOwnPropertyDescriptor;SF.f=kF?LF:function(e,t){if(e=IF(e),t=MF(t),DF)try{return LF(e,t)}catch(e){}if(PF(e,t))return NF(!OF(RF.f,e,t),e[t])};var FF={exports:{}},BF=HP,UF=rP,jF=Function.prototype,zF=BF&&Object.getOwnPropertyDescriptor,HF=UF(jF,"name"),GF={EXISTS:HF,PROPER:HF&&"something"===function(){}.name,CONFIGURABLE:HF&&(!BF||BF&&zF(jF,"name").configurable)},WF=bM,qF=lP,VF=rP,YF=HP,KF=GF.CONFIGURABLE,XF=ZL,ZF=_F.enforce,QF=_F.get,JF=Object.defineProperty,$F=YF&&!WF((function(){return 8!==JF((function(){}),"length",{value:8}).length})),eB=String(String).split("String"),tB=FF.exports=function(e,t,r){"Symbol("===String(t).slice(0,7)&&(t="["+String(t).replace(/^Symbol\(([^)]*)\)/,"$1")+"]"),r&&r.getter&&(t="get "+t),r&&r.setter&&(t="set "+t),(!VF(e,"name")||KF&&e.name!==t)&&(YF?JF(e,"name",{value:t,configurable:!0}):e.name=t),$F&&r&&VF(r,"arity")&&e.length!==r.arity&&JF(e,"length",{value:r.arity});try{r&&VF(r,"constructor")&&r.constructor?YF&&JF(e,"prototype",{writable:!1}):e.prototype&&(e.prototype=void 0)}catch(e){}var n=ZF(e);return VF(n,"source")||(n.source=eB.join("string"==typeof t?t:"")),e};Function.prototype.toString=tB((function(){return qF(this)&&QF(this).source||XF(this)}),"toString");var rB=lP,nB=WP,oB=FF.exports,iB=WM,aB=function(e,t,r,n){n||(n={});var o=n.enumerable,i=void 0!==n.name?n.name:t;if(rB(r)&&oB(r,i,n),n.global)o?e[t]=r:iB(t,r);else{try{n.unsafe?e[t]&&(o=!0):delete e[t]}catch(e){}o?e[t]=r:nB.f(e,t,{value:r,enumerable:!1,configurable:!n.nonConfigurable,writable:!n.nonWritable})}return e},sB={},lB=aL,cB=sL.concat("length","prototype");sB.f=Object.getOwnPropertyNames||function(e){return lB(e,cB)};var uB={};uB.f=Object.getOwnPropertySymbols;var dB,fB,pB,hB=dP,mB=sB,gB=uB,bB=jP,vB=xM([].concat),yB=hB("Reflect","ownKeys")||function(e){var t=mB.f(bB(e)),r=gB.f;return r?vB(t,r(e)):t},wB=rP,EB=yB,_B=SF,SB=WP,xB=function(e,t,r){for(var n=EB(t),o=SB.f,i=_B.f,a=0;a=t.length?(e.target=void 0,{value:void 0,done:!0}):"keys"==r?{value:n,done:!1}:"values"==r?{value:t[n],done:!1}:{value:[n,t[n]],done:!1}}),"values"),XU=zU.Arguments=zU.Array;if(jU("keys"),jU("values"),jU("entries"),WU&&"values"!==XU.name)try{GU(XU,"name",{value:"values"})}catch(e){}var ZU=KP("span").classList,QU=ZU&&ZU.constructor&&ZU.constructor.prototype,JU=QU===Object.prototype?void 0:QU,$U=jM,ej={CSSRuleList:0,CSSStyleDeclaration:0,CSSValueList:0,ClientRectList:0,DOMRectList:0,DOMStringList:0,DOMTokenList:1,DataTransferItemList:0,FileList:0,HTMLAllCollection:0,HTMLCollection:0,HTMLFormElement:0,HTMLSelectElement:0,MediaList:0,MimeTypeArray:0,NamedNodeMap:0,NodeList:1,PaintRequestList:0,Plugin:0,PluginArray:0,SVGLengthList:0,SVGNumberList:0,SVGPathSegList:0,SVGPointList:0,SVGStringList:0,SVGTransformList:0,SourceBufferList:0,StyleSheetList:0,TextTrackCueList:0,TextTrackList:0,TouchList:0},tj=JU,rj=KU,nj=oF,oj=PP,ij=oj("iterator"),aj=oj("toStringTag"),sj=rj.values,lj=function(e,t){if(e){if(e[ij]!==sj)try{nj(e,ij,sj)}catch(t){e[ij]=sj}if(e[aj]||nj(e,aj,t),ej[t])for(var r in rj)if(e[r]!==rj[r])try{nj(e,r,rj[r])}catch(t){e[r]=rj[r]}}};for(var cj in ej)lj($U[cj]&&$U[cj].prototype,cj);lj(tj,"DOMTokenList");var uj=HP,dj=xM,fj=$P,pj=bM,hj=uL,mj=uB,gj=xF,bj=$M,vj=MM,yj=Object.assign,wj=Object.defineProperty,Ej=dj([].concat),_j=!yj||pj((function(){if(uj&&1!==yj({b:1},yj(wj({},"a",{enumerable:!0,get:function(){wj(this,"b",{value:3,enumerable:!1})}}),{b:2})).b)return!0;var e={},t={},r=Symbol(),n="abcdefghijklmnopqrst";return e[r]=7,n.split("").forEach((function(e){t[e]=e})),7!=yj({},e)[r]||hj(yj({},t)).join("")!=n}))?function(e,t){for(var r=bj(e),n=arguments.length,o=1,i=mj.f,a=gj.f;n>o;)for(var s,l=vj(arguments[o++]),c=i?Ej(hj(l),i(l)):hj(l),u=c.length,d=0;u>d;)s=c[d++],uj&&!fj(a,l,s)||(r[s]=l[s]);return r}:yj,Sj=_j;function xj(e,t,r,n){return new(r||(r=Promise))((function(o,i){function a(e){try{l(n.next(e))}catch(e){i(e)}}function s(e){try{l(n.throw(e))}catch(e){i(e)}}function l(e){e.done?o(e.value):function(e){return e instanceof r?e:new r((function(t){t(e)}))}(e.value).then(a,s)}l((n=n.apply(e,t||[])).next())}))}zB({target:"Object",stat:!0,arity:2,forced:Object.assign!==Sj},{assign:Sj}),"function"==typeof SuppressedError&&SuppressedError;const Aj=()=>(0,pM.jsxs)("svg",Object.assign({xmlns:"http://www.w3.org/2000/svg",height:"24",viewBox:"0 0 24 24",width:"24",fill:"#C1C1C1"},{children:[(0,pM.jsx)("path",{d:"M0 0h24v24H0z",fill:"none"}),(0,pM.jsx)("path",{d:"M19 6.41L17.59 5 12 10.59 6.41 5 5 6.41 10.59 12 5 17.59 6.41 19 12 13.41 17.59 19 19 17.59 13.41 12z"})]})),Tj=({onClick:e})=>(0,pM.jsx)("button",Object.assign({onClick:e,className:"close-button"},{children:(0,pM.jsx)(Aj,{})})),Cj=({title:e,onCloseModal:t})=>{const r="Get a Wallet"===e?" -open":"";return(0,pM.jsxs)("div",Object.assign({className:"nws-modal-header"},{children:[(0,pM.jsx)("h3",Object.assign({className:`middleTitle ${r}`},{children:e})),(0,pM.jsx)(Tj,{onClick:t})]}))},kj=()=>(0,pM.jsx)("svg",Object.assign({width:"8",height:"14",viewBox:"0 0 8 14",fill:"none",xmlns:"http://www.w3.org/2000/svg"},{children:(0,pM.jsx)("path",{d:"M7 13L1 7L7 1",stroke:"#6494EE",strokeWidth:"1.5",strokeLinecap:"round",strokeLinejoin:"round"})})),Oj=({onClick:e})=>(0,pM.jsx)("button",Object.assign({onClick:e,className:"back-button"},{children:(0,pM.jsx)(kj,{})})),Rj=({selector:e,onBack:t,onCloseModal:r})=>(0,pM.jsxs)(o.Fragment,{children:[(0,pM.jsxs)("div",Object.assign({className:"nws-modal-header-wrapper"},{children:[(0,pM.jsx)(Oj,{onClick:t}),(0,pM.jsx)(Cj,{title:"You Must Change the Network",onCloseModal:r})]})),(0,pM.jsx)("div",Object.assign({className:"switch-network-message-wrapper"},{children:(0,pM.jsxs)("div",Object.assign({className:"content"},{children:[(0,pM.jsxs)("p",{children:["We've detected that you need to change your wallet's network to",(0,pM.jsx)("strong",Object.assign({className:"network-id"},{children:` ${e.options.network.networkId}`}))," ","for this dApp."]}),(0,pM.jsx)("p",{children:"Some wallets may not support changing networks. If you can not change networks you may consider switching to another wallet."})]}))}))]});var Nj=sD,Ij=TypeError,Mj={};Mj[PP("toStringTag")]="z";var Pj="[object z]"===String(Mj),Dj=lP,Lj=kM,Fj=PP("toStringTag"),Bj=Object,Uj="Arguments"==Lj(function(){return arguments}()),jj=Pj?Lj:function(e){var t,r,n;return void 0===e?"Undefined":null===e?"Null":"string"==typeof(r=function(e,t){try{return e[t]}catch(e){}}(t=Bj(e),Fj))?r:Uj?Lj(t):"Object"==(n=Lj(t))&&Dj(t.callee)?"Arguments":n},zj=jj,Hj=String,Gj=function(e){if("Symbol"===zj(e))throw TypeError("Cannot convert a Symbol value to a string");return Hj(e)},Wj=TD,qj=WP,Vj=tF,Yj=qD,Kj=KD,Xj=function(e,t,r){var n=Wj(t);n in e?qj.f(e,n,Vj(0,r)):e[n]=r},Zj=Array,Qj=Math.max,Jj=function(e,t,r){for(var n=Kj(e),o=Yj(t,n),i=Yj(void 0===r?n:r,n),a=Zj(Qj(i-o,0)),s=0;o0;)e[n]=e[--n];n!==i++&&(e[n]=r)}return e},rz=function(e,t,r,n){for(var o=t.length,i=r.length,a=0,s=0;a3)){if(_z)return!0;if(xz)return xz<603;var e,t,r,n,o="";for(e=65;e<76;e++){switch(t=String.fromCharCode(e),e){case 66:case 69:case 70:case 72:r=3;break;case 68:case 71:r=4;break;default:r=2}for(n=0;n<47;n++)Az.push({k:t+n,v:r})}for(Az.sort((function(e,t){return t.v-e.v})),n=0;n