@metamask/interactive-ui-example-snap 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md ADDED
@@ -0,0 +1,14 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
5
+ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [1.0.0]
10
+ ### Added
11
+ - Add interactive UI example Snap ([#2171](https://github.com/MetaMask/snaps/pull/2171))
12
+
13
+ [Unreleased]: https://github.com/MetaMask/snaps/compare/@metamask/interactive-ui-example-snap@1.0.0...HEAD
14
+ [1.0.0]: https://github.com/MetaMask/snaps/releases/tag/@metamask/interactive-ui-example-snap@1.0.0
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2024 ConsenSys Software Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
package/LICENSE.MIT0 ADDED
@@ -0,0 +1,16 @@
1
+ MIT No Attribution
2
+
3
+ Copyright 2024 ConsenSys Software Inc.
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this
6
+ software and associated documentation files (the "Software"), to deal in the Software
7
+ without restriction, including without limitation the rights to use, copy, modify,
8
+ merge, publish, distribute, sublicense, and/or sell copies of the Software, and to
9
+ permit persons to whom the Software is furnished to do so.
10
+
11
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED,
12
+ INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
13
+ PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
14
+ HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
15
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
16
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # `@metamask/interactive-ui-example-snap`
2
+
3
+ This snap demonstrates how to use interactive UI to build reactive custom UI interfaces across all the available APIs.
4
+
5
+ ## Snap usage
6
+
7
+ ### onRpcRequest
8
+
9
+ This snap exposes an `onRpcRequest` handler, which supports the following
10
+ JSON-RPC methods:
11
+
12
+ - `dialog`: Create a `snap_dialog` with an interactive interface. This demonstrates that a snap can show an interactive `snap_dialog` that the user can interact with.
13
+
14
+ - `getState`: Get the state of a given interface. This demonstrates that a snap can retrieve an interface state.
15
+
16
+ ### onTransaction
17
+
18
+ This snap exposes an `onTransaction` handler, which is called when a transaction
19
+ is sent by the user. It shows a user interface with details about the transaction.
20
+
21
+ ### onHomePage
22
+
23
+ The snap exposes an `onHomePage` handler, which shows a user interface.
24
+
25
+ ```
26
+
27
+ For more information, you can refer to
28
+ [the end-to-end tests](./src/index.test.ts).
29
+ ```
package/dist/bundle.js ADDED
@@ -0,0 +1 @@
1
+ (()=>{var e={5497: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.EthereumProviderError=t.JsonRpcError=void 0;const o=r(6500),i=n(r(5012)),s=r(9849);class a extends Error{constructor(e,t,r){if(!Number.isInteger(e))throw new Error('"code" must be an integer.');if(!t||"string"!=typeof t)throw new Error('"message" must be a non-empty string.');super(t),this.code=e,void 0!==r&&(this.data=r)}serialize(){const e={code:this.code,message:this.message};return void 0!==this.data&&(e.data=this.data,(0,o.isPlainObject)(this.data)&&(e.data.cause=(0,s.serializeCause)(this.data.cause))),this.stack&&(e.stack=this.stack),e}toString(){return(0,i.default)(this.serialize(),c,2)}}t.JsonRpcError=a;function c(e,t){if("[Circular]"!==t)return t}t.EthereumProviderError=class extends a{constructor(e,t,r){if(!function(e){return Number.isInteger(e)&&e>=1e3&&e<=4999}(e))throw new Error('"code" must be an integer such that: 1000 <= code <= 4999');super(e,t,r)}}},117:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.errorValues=t.errorCodes=void 0,t.errorCodes={rpc:{invalidInput:-32e3,resourceNotFound:-32001,resourceUnavailable:-32002,transactionRejected:-32003,methodNotSupported:-32004,limitExceeded:-32005,parse:-32700,invalidRequest:-32600,methodNotFound:-32601,invalidParams:-32602,internal:-32603},provider:{userRejectedRequest:4001,unauthorized:4100,unsupportedMethod:4200,disconnected:4900,chainDisconnected:4901}},t.errorValues={"-32700":{standard:"JSON RPC 2.0",message:"Invalid JSON was received by the server. An error occurred on the server while parsing the JSON text."},"-32600":{standard:"JSON RPC 2.0",message:"The JSON sent is not a valid Request object."},"-32601":{standard:"JSON RPC 2.0",message:"The method does not exist / is not available."},"-32602":{standard:"JSON RPC 2.0",message:"Invalid method parameter(s)."},"-32603":{standard:"JSON RPC 2.0",message:"Internal JSON-RPC error."},"-32000":{standard:"EIP-1474",message:"Invalid input."},"-32001":{standard:"EIP-1474",message:"Resource not found."},"-32002":{standard:"EIP-1474",message:"Resource unavailable."},"-32003":{standard:"EIP-1474",message:"Transaction rejected."},"-32004":{standard:"EIP-1474",message:"Method not supported."},"-32005":{standard:"EIP-1474",message:"Request limit exceeded."},4001:{standard:"EIP-1193",message:"User rejected the request."},4100:{standard:"EIP-1193",message:"The requested account and/or method has not been authorized by the user."},4200:{standard:"EIP-1193",message:"The requested method is not supported by this Ethereum provider."},4900:{standard:"EIP-1193",message:"The provider is disconnected from all chains."},4901:{standard:"EIP-1193",message:"The provider is disconnected from the specified chain."}}},1532:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.providerErrors=t.rpcErrors=void 0;const n=r(5497),o=r(117),i=r(9849);function s(e,t){const[r,o]=c(t);return new n.JsonRpcError(e,r??(0,i.getMessageFromCode)(e),o)}function a(e,t){const[r,o]=c(t);return new n.EthereumProviderError(e,r??(0,i.getMessageFromCode)(e),o)}function c(e){if(e){if("string"==typeof e)return[e];if("object"==typeof e&&!Array.isArray(e)){const{message:t,data:r}=e;if(t&&"string"!=typeof t)throw new Error("Must specify string message.");return[t??void 0,r]}}return[]}t.rpcErrors={parse:e=>s(o.errorCodes.rpc.parse,e),invalidRequest:e=>s(o.errorCodes.rpc.invalidRequest,e),invalidParams:e=>s(o.errorCodes.rpc.invalidParams,e),methodNotFound:e=>s(o.errorCodes.rpc.methodNotFound,e),internal:e=>s(o.errorCodes.rpc.internal,e),server:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum RPC Server errors must provide single object argument.");const{code:t}=e;if(!Number.isInteger(t)||t>-32005||t<-32099)throw new Error('"code" must be an integer such that: -32099 <= code <= -32005');return s(t,e)},invalidInput:e=>s(o.errorCodes.rpc.invalidInput,e),resourceNotFound:e=>s(o.errorCodes.rpc.resourceNotFound,e),resourceUnavailable:e=>s(o.errorCodes.rpc.resourceUnavailable,e),transactionRejected:e=>s(o.errorCodes.rpc.transactionRejected,e),methodNotSupported:e=>s(o.errorCodes.rpc.methodNotSupported,e),limitExceeded:e=>s(o.errorCodes.rpc.limitExceeded,e)},t.providerErrors={userRejectedRequest:e=>a(o.errorCodes.provider.userRejectedRequest,e),unauthorized:e=>a(o.errorCodes.provider.unauthorized,e),unsupportedMethod:e=>a(o.errorCodes.provider.unsupportedMethod,e),disconnected:e=>a(o.errorCodes.provider.disconnected,e),chainDisconnected:e=>a(o.errorCodes.provider.chainDisconnected,e),custom:e=>{if(!e||"object"!=typeof e||Array.isArray(e))throw new Error("Ethereum Provider custom errors must provide single object argument.");const{code:t,message:r,data:o}=e;if(!r||"string"!=typeof r)throw new Error('"message" must be a nonempty string');return new n.EthereumProviderError(t,r,o)}}},9917:(e,t,r)=>{"use strict";t.PY=void 0;var n=r(5497);var o=r(9849);var i=r(1532);Object.defineProperty(t,"PY",{enumerable:!0,get:function(){return i.rpcErrors}});var s=r(117)},9849:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.serializeCause=t.serializeError=t.isValidCode=t.getMessageFromCode=t.JSON_RPC_SERVER_ERROR_MESSAGE=void 0;const n=r(6500),o=r(117),i=o.errorCodes.rpc.internal,s={code:i,message:a(i)};function a(e,r="Unspecified error message. This is a bug, please report it."){if(c(e)){const r=e.toString();if((0,n.hasProperty)(o.errorValues,r))return o.errorValues[r].message;if(function(e){return e>=-32099&&e<=-32e3}(e))return t.JSON_RPC_SERVER_ERROR_MESSAGE}return r}function c(e){return Number.isInteger(e)}function u(e){return Array.isArray(e)?e.map((e=>(0,n.isValidJson)(e)?e:(0,n.isObject)(e)?l(e):null)):(0,n.isObject)(e)?l(e):(0,n.isValidJson)(e)?e:null}function l(e){return Object.getOwnPropertyNames(e).reduce(((t,r)=>{const o=e[r];return(0,n.isValidJson)(o)&&(t[r]=o),t}),{})}t.JSON_RPC_SERVER_ERROR_MESSAGE="Unspecified server error.",t.getMessageFromCode=a,t.isValidCode=c,t.serializeError=function(e,{fallbackError:t=s,shouldIncludeStack:r=!0}={}){if(!(0,n.isJsonRpcError)(t))throw new Error("Must provide fallback error with integer number code and string message.");const o=function(e,t){if(e&&"object"==typeof e&&"serialize"in e&&"function"==typeof e.serialize)return e.serialize();if((0,n.isJsonRpcError)(e))return e;const r=u(e),o={...t,data:{cause:r}};return o}(e,t);return r||delete o.stack,o},t.serializeCause=u},9182:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o=r(5579),i=((n=o)&&n.__esModule?n:{default:n}).default.call(void 0,"metamask");t.createProjectLogger=function(e){return i.extend(e)},t.createModuleLogger=function(e,t){return e.extend(t)}},4316:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r=(e,t,r)=>{if(!t.has(e))throw TypeError("Cannot "+r)};t.__privateGet=(e,t,n)=>(r(e,t,"read from private field"),n?n.call(e):t.get(e)),t.__privateAdd=(e,t,r)=>{if(t.has(e))throw TypeError("Cannot add the same private member more than once");t instanceof WeakSet?t.add(e):t.set(e,r)},t.__privateSet=(e,t,n,o)=>(r(e,t,"write to private field"),o?o.call(e,n):t.set(e,n),n)},9900:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4087),o=r(5825),i=r(6291),s=i.refine.call(void 0,i.string.call(void 0),"Version",(e=>null!==o.valid.call(void 0,e)||`Expected SemVer version, got "${e}"`)),a=i.refine.call(void 0,i.string.call(void 0),"Version range",(e=>null!==o.validRange.call(void 0,e)||`Expected SemVer range, got "${e}"`));t.VersionStruct=s,t.VersionRangeStruct=a,t.isValidSemVerVersion=function(e){return i.is.call(void 0,e,s)},t.isValidSemVerRange=function(e){return i.is.call(void 0,e,a)},t.assertIsSemVerVersion=function(e){n.assertStruct.call(void 0,e,s)},t.assertIsSemVerRange=function(e){n.assertStruct.call(void 0,e,a)},t.gtVersion=function(e,t){return o.gt.call(void 0,e,t)},t.gtRange=function(e,t){return o.gtr.call(void 0,e,t)},t.satisfiesVersionRange=function(e,t){return o.satisfies.call(void 0,e,t,{includePrerelease:!0})}},6704:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.createDeferredPromise=function({suppressUnhandledRejection:e=!1}={}){let t,r;const n=new Promise(((e,n)=>{t=e,r=n}));return e&&n.catch((e=>{})),{promise:n,resolve:t,reject:r}}},9568:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=((r=n||{})[r.Millisecond=1]="Millisecond",r[r.Second=1e3]="Second",r[r.Minute=6e4]="Minute",r[r.Hour=36e5]="Hour",r[r.Day=864e5]="Day",r[r.Week=6048e5]="Week",r[r.Year=31536e6]="Year",r),o=(e,t)=>{if(!(e=>Number.isInteger(e)&&e>=0)(e))throw new Error(`"${t}" must be a non-negative integer. Received: "${e}".`)};t.Duration=n,t.inMilliseconds=function(e,t){return o(e,"count"),e*t},t.timeSince=function(e){return o(e,"timestamp"),Date.now()-e}},3530:()=>{},7811:(e,t,r)=>{"use strict";function n(e,t){return null!=e?e:t()}Object.defineProperty(t,"__esModule",{value:!0});var o=r(4087),i=r(6291);t.base64=(e,t={})=>{const r=n(t.paddingRequired,(()=>!1)),s=n(t.characterSet,(()=>"base64"));let a,c;return"base64"===s?a=String.raw`[A-Za-z0-9+\/]`:(o.assert.call(void 0,"base64url"===s),a=String.raw`[-_A-Za-z0-9]`),c=r?new RegExp(`^(?:${a}{4})*(?:${a}{3}=|${a}{2}==)?$`,"u"):new RegExp(`^(?:${a}{4})*(?:${a}{2,3}|${a}{3}=|${a}{2}==)?$`,"u"),i.pattern.call(void 0,e,c)}},4087:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1054),o=r(6291);function i(e,t){return Boolean("string"==typeof function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i(((...e)=>r.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.prototype,"optionalAccess",e=>e.constructor,"optionalAccess",e=>e.name]))?new e({message:t}):e({message:t})}var s=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};t.AssertionError=s,t.assert=function(e,t="Assertion failed.",r=s){if(!e){if(t instanceof Error)throw t;throw i(r,t)}},t.assertStruct=function(e,t,r="Assertion failed",a=s){try{o.assert.call(void 0,e,t)}catch(e){throw i(a,`${r}: ${function(e){return n.getErrorMessage.call(void 0,e).replace(/\.$/u,"")}(e)}.`)}},t.assertExhaustive=function(e){throw new Error("Invalid branch reached. Should be detected during compilation.")}},2806:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1714),o=r(4087),i=r(6291),s=i.union.call(void 0,[i.number.call(void 0),i.bigint.call(void 0),i.string.call(void 0),n.StrictHexStruct]),a=i.coerce.call(void 0,i.number.call(void 0),s,Number),c=i.coerce.call(void 0,i.bigint.call(void 0),s,BigInt),u=(i.union.call(void 0,[n.StrictHexStruct,i.instance.call(void 0,Uint8Array)]),i.coerce.call(void 0,i.instance.call(void 0,Uint8Array),i.union.call(void 0,[n.StrictHexStruct]),n.hexToBytes)),l=i.coerce.call(void 0,n.StrictHexStruct,i.instance.call(void 0,Uint8Array),n.bytesToHex);t.createNumber=function(e){try{const t=i.create.call(void 0,e,a);return o.assert.call(void 0,Number.isFinite(t),`Expected a number-like value, got "${e}".`),t}catch(t){if(t instanceof i.StructError)throw new Error(`Expected a number-like value, got "${e}".`);throw t}},t.createBigInt=function(e){try{return i.create.call(void 0,e,c)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a number-like value, got "${String(e.value)}".`);throw e}},t.createBytes=function(e){if("string"==typeof e&&"0x"===e.toLowerCase())return new Uint8Array;try{return i.create.call(void 0,e,u)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}},t.createHex=function(e){if(e instanceof Uint8Array&&0===e.length||"string"==typeof e&&"0x"===e.toLowerCase())return"0x";try{return i.create.call(void 0,e,l)}catch(e){if(e instanceof i.StructError)throw new Error(`Expected a bytes-like value, got "${String(e.value)}".`);throw e}}},4772:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(7811),o=r(6291),i=o.size.call(void 0,n.base64.call(void 0,o.string.call(void 0),{paddingRequired:!0}),44,44);t.ChecksumStruct=i},3057:()=>{},1054:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(3692),o=r(9163);function i(e){return"object"==typeof e&&null!==e&&"code"in e}function s(e){return"object"==typeof e&&null!==e&&"message"in e}t.isErrorWithCode=i,t.isErrorWithMessage=s,t.isErrorWithStack=function(e){return"object"==typeof e&&null!==e&&"stack"in e},t.getErrorMessage=function(e){return s(e)&&"string"==typeof e.message?e.message:n.isNullOrUndefined.call(void 0,e)?"":String(e)},t.wrapError=function(e,t){if((r=e)instanceof Error||n.isObject.call(void 0,r)&&"Error"===r.constructor.name){let r;return r=2===Error.length?new Error(t,{cause:e}):new(0,o.ErrorWithCause)(t,{cause:e}),i(e)&&(r.code=e.code),r}var r;return t.length>0?new Error(`${String(e)}: ${t}`):new Error(String(e))}},1467:()=>{},6320:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4087),o=r(3692),i=r(6291),s=e=>i.object.call(void 0,e);function a({path:e,branch:t}){const r=e[e.length-1];return o.hasProperty.call(void 0,t[t.length-2],r)}function c(e){return new(0,i.Struct)({...e,type:`optional ${e.type}`,validator:(t,r)=>!a(r)||e.validator(t,r),refiner:(t,r)=>!a(r)||e.refiner(t,r)})}var u=i.union.call(void 0,[i.literal.call(void 0,null),i.boolean.call(void 0),i.define.call(void 0,"finite number",(e=>i.is.call(void 0,e,i.number.call(void 0))&&Number.isFinite(e))),i.string.call(void 0),i.array.call(void 0,i.lazy.call(void 0,(()=>u))),i.record.call(void 0,i.string.call(void 0),i.lazy.call(void 0,(()=>u)))]),l=i.coerce.call(void 0,u,i.any.call(void 0),(e=>(n.assertStruct.call(void 0,e,u),JSON.parse(JSON.stringify(e,((e,t)=>{if("__proto__"!==e&&"constructor"!==e)return t}))))));function f(e){return i.create.call(void 0,e,l)}var p=i.literal.call(void 0,"2.0"),d=i.nullable.call(void 0,i.union.call(void 0,[i.number.call(void 0),i.string.call(void 0)])),h=s({code:i.integer.call(void 0),message:i.string.call(void 0),data:c(l),stack:c(i.string.call(void 0))}),g=i.union.call(void 0,[i.record.call(void 0,i.string.call(void 0),l),i.array.call(void 0,l)]),y=s({id:d,jsonrpc:p,method:i.string.call(void 0),params:c(g)}),m=s({jsonrpc:p,method:i.string.call(void 0),params:c(g)});var v=i.object.call(void 0,{id:d,jsonrpc:p,result:i.optional.call(void 0,i.unknown.call(void 0)),error:i.optional.call(void 0,h)}),b=s({id:d,jsonrpc:p,result:l}),E=s({id:d,jsonrpc:p,error:h}),w=i.union.call(void 0,[b,E]);t.object=s,t.exactOptional=c,t.UnsafeJsonStruct=u,t.JsonStruct=l,t.isValidJson=function(e){try{return f(e),!0}catch(e){return!1}},t.getSafeJson=f,t.getJsonSize=function(e){n.assertStruct.call(void 0,e,l,"Invalid JSON value");const t=JSON.stringify(e);return(new TextEncoder).encode(t).byteLength},t.jsonrpc2="2.0",t.JsonRpcVersionStruct=p,t.JsonRpcIdStruct=d,t.JsonRpcErrorStruct=h,t.JsonRpcParamsStruct=g,t.JsonRpcRequestStruct=y,t.JsonRpcNotificationStruct=m,t.isJsonRpcNotification=function(e){return i.is.call(void 0,e,m)},t.assertIsJsonRpcNotification=function(e,t){n.assertStruct.call(void 0,e,m,"Invalid JSON-RPC notification",t)},t.isJsonRpcRequest=function(e){return i.is.call(void 0,e,y)},t.assertIsJsonRpcRequest=function(e,t){n.assertStruct.call(void 0,e,y,"Invalid JSON-RPC request",t)},t.PendingJsonRpcResponseStruct=v,t.JsonRpcSuccessStruct=b,t.JsonRpcFailureStruct=E,t.JsonRpcResponseStruct=w,t.isPendingJsonRpcResponse=function(e){return i.is.call(void 0,e,v)},t.assertIsPendingJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,v,"Invalid pending JSON-RPC response",t)},t.isJsonRpcResponse=function(e){return i.is.call(void 0,e,w)},t.assertIsJsonRpcResponse=function(e,t){n.assertStruct.call(void 0,e,w,"Invalid JSON-RPC response",t)},t.isJsonRpcSuccess=function(e){return i.is.call(void 0,e,b)},t.assertIsJsonRpcSuccess=function(e,t){n.assertStruct.call(void 0,e,b,"Invalid JSON-RPC success response",t)},t.isJsonRpcFailure=function(e){return i.is.call(void 0,e,E)},t.assertIsJsonRpcFailure=function(e,t){n.assertStruct.call(void 0,e,E,"Invalid JSON-RPC failure response",t)},t.isJsonRpcError=function(e){return i.is.call(void 0,e,h)},t.assertIsJsonRpcError=function(e,t){n.assertStruct.call(void 0,e,h,"Invalid JSON-RPC error",t)},t.getJsonRpcIdValidator=function(e){const{permitEmptyString:t,permitFractions:r,permitNull:n}={permitEmptyString:!0,permitFractions:!1,permitNull:!0,...e};return e=>Boolean("number"==typeof e&&(r||Number.isInteger(e))||"string"==typeof e&&(t||e.length>0)||n&&null===e)}},1714:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(4087),o=r(1647),i=r(6291),s=r(8269),a=48,c=58,u=87;var l=function(){const e=[];return()=>{if(0===e.length)for(let t=0;t<256;t++)e.push(t.toString(16).padStart(2,"0"));return e}}();function f(e){return e instanceof Uint8Array}function p(e){n.assert.call(void 0,f(e),"Value must be a Uint8Array.")}function d(e){if(p(e),0===e.length)return"0x";const t=l(),r=new Array(e.length);for(let n=0;n<e.length;n++)r[n]=t[e[n]];return j(r.join(""))}function h(e){p(e);const t=d(e);return BigInt(t)}function g(e){if("0x"===function(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i(((...e)=>r.call(t,...e))),t=void 0)}return r}([e,"optionalAccess",e=>e.toLowerCase,"optionalCall",e=>e()]))return new Uint8Array;I(e);const t=C(e).toLowerCase(),r=t.length%2==0?t:`0${t}`,n=new Uint8Array(r.length/2);for(let e=0;e<n.length;e++){const t=r.charCodeAt(2*e),o=r.charCodeAt(2*e+1),i=t-(t<c?a:u),s=o-(o<c?a:u);n[e]=16*i+s}return n}function y(e){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,e>=BigInt(0),"Value must be a non-negative bigint.");return g(e.toString(16))}function m(e){n.assert.call(void 0,"number"==typeof e,"Value must be a number."),n.assert.call(void 0,e>=0,"Value must be a non-negative number."),n.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToBytes` instead.");return g(e.toString(16))}function v(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),(new TextEncoder).encode(e)}function b(e){if("bigint"==typeof e)return y(e);if("number"==typeof e)return m(e);if("string"==typeof e)return e.startsWith("0x")?g(e):v(e);if(f(e))return e;throw new TypeError(`Unsupported value type: "${typeof e}".`)}var E=i.pattern.call(void 0,i.string.call(void 0),/^(?:0x)?[0-9a-f]+$/iu),w=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]+$/iu),S=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-f]{40}$/u),x=i.pattern.call(void 0,i.string.call(void 0),/^0x[0-9a-fA-F]{40}$/u);function A(e){return i.is.call(void 0,e,E)}function O(e){return i.is.call(void 0,e,w)}function I(e){n.assert.call(void 0,A(e),"Value must be a hexadecimal string.")}function N(e){n.assert.call(void 0,i.is.call(void 0,e,x),"Invalid hex address.");const t=C(e.toLowerCase()),r=C(d(o.keccak_256.call(void 0,t)));return`0x${t.split("").map(((e,t)=>{const o=r[t];return n.assert.call(void 0,i.is.call(void 0,o,i.string.call(void 0)),"Hash shorter than address."),parseInt(o,16)>7?e.toUpperCase():e})).join("")}`}function R(e){return!!i.is.call(void 0,e,x)&&N(e)===e}function j(e){return e.startsWith("0x")?e:e.startsWith("0X")?`0x${e.substring(2)}`:`0x${e}`}function C(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}t.HexStruct=E,t.StrictHexStruct=w,t.HexAddressStruct=S,t.HexChecksumAddressStruct=x,t.isHexString=A,t.isStrictHexString=O,t.assertIsHexString=I,t.assertIsStrictHexString=function(e){n.assert.call(void 0,O(e),'Value must be a hexadecimal string, starting with "0x".')},t.isValidHexAddress=function(e){return i.is.call(void 0,e,S)||R(e)},t.getChecksumAddress=N,t.isValidChecksumAddress=R,t.add0x=j,t.remove0x=C,t.isBytes=f,t.assertIsBytes=p,t.bytesToHex=d,t.bytesToBigInt=h,t.bytesToSignedBigInt=function(e){p(e);let t=BigInt(0);for(const r of e)t=(t<<BigInt(8))+BigInt(r);return BigInt.asIntN(8*e.length,t)},t.bytesToNumber=function(e){p(e);const t=h(e);return n.assert.call(void 0,t<=BigInt(Number.MAX_SAFE_INTEGER),"Number is not a safe integer. Use `bytesToBigInt` instead."),Number(t)},t.bytesToString=function(e){return p(e),(new TextDecoder).decode(e)},t.bytesToBase64=function(e){return p(e),s.base64.encode(e)},t.hexToBytes=g,t.bigIntToBytes=y,t.signedBigIntToBytes=function(e,t){n.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),n.assert.call(void 0,"number"==typeof t,"Byte length must be a number."),n.assert.call(void 0,t>0,"Byte length must be greater than 0."),n.assert.call(void 0,function(e,t){n.assert.call(void 0,t>0);const r=e>>BigInt(31);return!((~e&r)+(e&~r)>>BigInt(8*t-1))}(e,t),"Byte length is too small to represent the given value.");let r=e;const o=new Uint8Array(t);for(let e=0;e<o.length;e++)o[e]=Number(BigInt.asUintN(8,r)),r>>=BigInt(8);return o.reverse()},t.numberToBytes=m,t.stringToBytes=v,t.base64ToBytes=function(e){return n.assert.call(void 0,"string"==typeof e,"Value must be a string."),s.base64.decode(e)},t.valueToBytes=b,t.concatBytes=function(e){const t=new Array(e.length);let r=0;for(let n=0;n<e.length;n++){const o=b(e[n]);t[n]=o,r+=o.length}const n=new Uint8Array(r);for(let e=0,r=0;e<t.length;e++)n.set(t[e],r),r+=t[e].length;return n},t.createDataView=function(e){if("undefined"!=typeof Buffer&&e instanceof Buffer){const t=e.buffer.slice(e.byteOffset,e.byteOffset+e.byteLength);return new DataView(t)}return new DataView(e.buffer,e.byteOffset,e.byteLength)}},3692:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var r,n=((r=n||{})[r.Null=4]="Null",r[r.Comma=1]="Comma",r[r.Wrapper=1]="Wrapper",r[r.True=4]="True",r[r.False=5]="False",r[r.Quote=1]="Quote",r[r.Colon=1]="Colon",r[r.Date=24]="Date",r),o=/"|\\|\n|\r|\t/gu;function i(e){return e.charCodeAt(0)<=127}t.isNonEmptyArray=function(e){return Array.isArray(e)&&e.length>0},t.isNullOrUndefined=function(e){return null==e},t.isObject=function(e){return Boolean(e)&&"object"==typeof e&&!Array.isArray(e)},t.hasProperty=(e,t)=>Object.hasOwnProperty.call(e,t),t.getKnownPropertyNames=function(e){return Object.getOwnPropertyNames(e)},t.JsonSize=n,t.ESCAPE_CHARACTERS_REGEXP=o,t.isPlainObject=function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}},t.isASCII=i,t.calculateStringSize=function(e){return e.split("").reduce(((e,t)=>i(t)?e+1:e+2),0)+(t=e.match(o),r=()=>[],null!=t?t:r()).length;var t,r},t.calculateNumberSize=function(e){return e.toString().length}},6546:()=>{},2292:(e,t,r)=>{"use strict";function n(e){let t,r=e[0],n=1;for(;n<e.length;){const o=e[n],i=e[n+1];if(n+=2,("optionalAccess"===o||"optionalCall"===o)&&null==r)return;"access"===o||"optionalAccess"===o?(t=r,r=i(r)):"call"!==o&&"optionalCall"!==o||(r=i(((...e)=>r.call(t,...e))),t=void 0)}return r}Object.defineProperty(t,"__esModule",{value:!0});var o=r(6291),i=/^(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})$/u,s=/^[-a-z0-9]{3,8}$/u,a=/^[-_a-zA-Z0-9]{1,32}$/u,c=/^(?<chainId>(?<namespace>[-a-z0-9]{3,8}):(?<reference>[-_a-zA-Z0-9]{1,32})):(?<accountAddress>[-.%a-zA-Z0-9]{1,128})$/u,u=/^[-.%a-zA-Z0-9]{1,128}$/u,l=o.pattern.call(void 0,o.string.call(void 0),i),f=o.pattern.call(void 0,o.string.call(void 0),s),p=o.pattern.call(void 0,o.string.call(void 0),a),d=o.pattern.call(void 0,o.string.call(void 0),c),h=o.pattern.call(void 0,o.string.call(void 0),u);t.CAIP_CHAIN_ID_REGEX=i,t.CAIP_NAMESPACE_REGEX=s,t.CAIP_REFERENCE_REGEX=a,t.CAIP_ACCOUNT_ID_REGEX=c,t.CAIP_ACCOUNT_ADDRESS_REGEX=u,t.CaipChainIdStruct=l,t.CaipNamespaceStruct=f,t.CaipReferenceStruct=p,t.CaipAccountIdStruct=d,t.CaipAccountAddressStruct=h,t.isCaipChainId=function(e){return o.is.call(void 0,e,l)},t.isCaipNamespace=function(e){return o.is.call(void 0,e,f)},t.isCaipReference=function(e){return o.is.call(void 0,e,p)},t.isCaipAccountId=function(e){return o.is.call(void 0,e,d)},t.isCaipAccountAddress=function(e){return o.is.call(void 0,e,h)},t.parseCaipChainId=function(e){const t=i.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP chain ID.");return{namespace:t.groups.namespace,reference:t.groups.reference}},t.parseCaipAccountId=function(e){const t=c.exec(e);if(!n([t,"optionalAccess",e=>e.groups]))throw new Error("Invalid CAIP account ID.");return{address:t.groups.accountAddress,chainId:t.groups.chainId,chain:{namespace:t.groups.namespace,reference:t.groups.reference}}}},8154:()=>{},9958:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n=r(1714),o=r(4087);t.numberToHex=e=>(o.assert.call(void 0,"number"==typeof e,"Value must be a number."),o.assert.call(void 0,e>=0,"Value must be a non-negative number."),o.assert.call(void 0,Number.isSafeInteger(e),"Value is not a safe integer. Use `bigIntToHex` instead."),n.add0x.call(void 0,e.toString(16))),t.bigIntToHex=e=>(o.assert.call(void 0,"bigint"==typeof e,"Value must be a bigint."),o.assert.call(void 0,e>=0,"Value must be a non-negative bigint."),n.add0x.call(void 0,e.toString(16))),t.hexToNumber=e=>{n.assertIsHexString.call(void 0,e);const t=parseInt(e,16);return o.assert.call(void 0,Number.isSafeInteger(t),"Value is not a safe integer. Use `hexToBigInt` instead."),t},t.hexToBigInt=e=>(n.assertIsHexString.call(void 0,e),BigInt(n.add0x.call(void 0,e)))},3424:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n,o,i=r(4316),s=class{constructor(e){i.__privateAdd.call(void 0,this,n,void 0),i.__privateSet.call(void 0,this,n,new Map(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,n).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,n)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,n).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,n).forEach(((r,n,o)=>e.call(t,r,n,this)))}get(e){return i.__privateGet.call(void 0,this,n).get(e)}has(e){return i.__privateGet.call(void 0,this,n).has(e)}keys(){return i.__privateGet.call(void 0,this,n).keys()}values(){return i.__privateGet.call(void 0,this,n).values()}toString(){return`FrozenMap(${this.size}) {${this.size>0?` ${[...this.entries()].map((([e,t])=>`${String(e)} => ${String(t)}`)).join(", ")} `:""}}`}};n=new WeakMap;var a=class{constructor(e){i.__privateAdd.call(void 0,this,o,void 0),i.__privateSet.call(void 0,this,o,new Set(e)),Object.freeze(this)}get size(){return i.__privateGet.call(void 0,this,o).size}[Symbol.iterator](){return i.__privateGet.call(void 0,this,o)[Symbol.iterator]()}entries(){return i.__privateGet.call(void 0,this,o).entries()}forEach(e,t){return i.__privateGet.call(void 0,this,o).forEach(((r,n,o)=>e.call(t,r,n,this)))}has(e){return i.__privateGet.call(void 0,this,o).has(e)}keys(){return i.__privateGet.call(void 0,this,o).keys()}values(){return i.__privateGet.call(void 0,this,o).values()}toString(){return`FrozenSet(${this.size}) {${this.size>0?` ${[...this.values()].map((e=>String(e))).join(", ")} `:""}}`}};o=new WeakMap,Object.freeze(s),Object.freeze(s.prototype),Object.freeze(a),Object.freeze(a.prototype),t.FrozenMap=s,t.FrozenSet=a},6500:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),r(3530);var n=r(9958);r(1467);var o=r(6704),i=r(9568);r(8154);var s=r(9900),a=r(6320);r(6546);var c=r(9182),u=r(2292),l=r(4772),f=r(7811),p=r(2806),d=r(1714),h=r(4087),g=r(1054),y=r(3692),m=r(3424);r(4316),r(3057),t.AssertionError=h.AssertionError,t.CAIP_ACCOUNT_ADDRESS_REGEX=u.CAIP_ACCOUNT_ADDRESS_REGEX,t.CAIP_ACCOUNT_ID_REGEX=u.CAIP_ACCOUNT_ID_REGEX,t.CAIP_CHAIN_ID_REGEX=u.CAIP_CHAIN_ID_REGEX,t.CAIP_NAMESPACE_REGEX=u.CAIP_NAMESPACE_REGEX,t.CAIP_REFERENCE_REGEX=u.CAIP_REFERENCE_REGEX,t.CaipAccountAddressStruct=u.CaipAccountAddressStruct,t.CaipAccountIdStruct=u.CaipAccountIdStruct,t.CaipChainIdStruct=u.CaipChainIdStruct,t.CaipNamespaceStruct=u.CaipNamespaceStruct,t.CaipReferenceStruct=u.CaipReferenceStruct,t.ChecksumStruct=l.ChecksumStruct,t.Duration=i.Duration,t.ESCAPE_CHARACTERS_REGEXP=y.ESCAPE_CHARACTERS_REGEXP,t.FrozenMap=m.FrozenMap,t.FrozenSet=m.FrozenSet,t.HexAddressStruct=d.HexAddressStruct,t.HexChecksumAddressStruct=d.HexChecksumAddressStruct,t.HexStruct=d.HexStruct,t.JsonRpcErrorStruct=a.JsonRpcErrorStruct,t.JsonRpcFailureStruct=a.JsonRpcFailureStruct,t.JsonRpcIdStruct=a.JsonRpcIdStruct,t.JsonRpcNotificationStruct=a.JsonRpcNotificationStruct,t.JsonRpcParamsStruct=a.JsonRpcParamsStruct,t.JsonRpcRequestStruct=a.JsonRpcRequestStruct,t.JsonRpcResponseStruct=a.JsonRpcResponseStruct,t.JsonRpcSuccessStruct=a.JsonRpcSuccessStruct,t.JsonRpcVersionStruct=a.JsonRpcVersionStruct,t.JsonSize=y.JsonSize,t.JsonStruct=a.JsonStruct,t.PendingJsonRpcResponseStruct=a.PendingJsonRpcResponseStruct,t.StrictHexStruct=d.StrictHexStruct,t.UnsafeJsonStruct=a.UnsafeJsonStruct,t.VersionRangeStruct=s.VersionRangeStruct,t.VersionStruct=s.VersionStruct,t.add0x=d.add0x,t.assert=h.assert,t.assertExhaustive=h.assertExhaustive,t.assertIsBytes=d.assertIsBytes,t.assertIsHexString=d.assertIsHexString,t.assertIsJsonRpcError=a.assertIsJsonRpcError,t.assertIsJsonRpcFailure=a.assertIsJsonRpcFailure,t.assertIsJsonRpcNotification=a.assertIsJsonRpcNotification,t.assertIsJsonRpcRequest=a.assertIsJsonRpcRequest,t.assertIsJsonRpcResponse=a.assertIsJsonRpcResponse,t.assertIsJsonRpcSuccess=a.assertIsJsonRpcSuccess,t.assertIsPendingJsonRpcResponse=a.assertIsPendingJsonRpcResponse,t.assertIsSemVerRange=s.assertIsSemVerRange,t.assertIsSemVerVersion=s.assertIsSemVerVersion,t.assertIsStrictHexString=d.assertIsStrictHexString,t.assertStruct=h.assertStruct,t.base64=f.base64,t.base64ToBytes=d.base64ToBytes,t.bigIntToBytes=d.bigIntToBytes,t.bigIntToHex=n.bigIntToHex,t.bytesToBase64=d.bytesToBase64,t.bytesToBigInt=d.bytesToBigInt,t.bytesToHex=d.bytesToHex,t.bytesToNumber=d.bytesToNumber,t.bytesToSignedBigInt=d.bytesToSignedBigInt,t.bytesToString=d.bytesToString,t.calculateNumberSize=y.calculateNumberSize,t.calculateStringSize=y.calculateStringSize,t.concatBytes=d.concatBytes,t.createBigInt=p.createBigInt,t.createBytes=p.createBytes,t.createDataView=d.createDataView,t.createDeferredPromise=o.createDeferredPromise,t.createHex=p.createHex,t.createModuleLogger=c.createModuleLogger,t.createNumber=p.createNumber,t.createProjectLogger=c.createProjectLogger,t.exactOptional=a.exactOptional,t.getChecksumAddress=d.getChecksumAddress,t.getErrorMessage=g.getErrorMessage,t.getJsonRpcIdValidator=a.getJsonRpcIdValidator,t.getJsonSize=a.getJsonSize,t.getKnownPropertyNames=y.getKnownPropertyNames,t.getSafeJson=a.getSafeJson,t.gtRange=s.gtRange,t.gtVersion=s.gtVersion,t.hasProperty=y.hasProperty,t.hexToBigInt=n.hexToBigInt,t.hexToBytes=d.hexToBytes,t.hexToNumber=n.hexToNumber,t.inMilliseconds=i.inMilliseconds,t.isASCII=y.isASCII,t.isBytes=d.isBytes,t.isCaipAccountAddress=u.isCaipAccountAddress,t.isCaipAccountId=u.isCaipAccountId,t.isCaipChainId=u.isCaipChainId,t.isCaipNamespace=u.isCaipNamespace,t.isCaipReference=u.isCaipReference,t.isErrorWithCode=g.isErrorWithCode,t.isErrorWithMessage=g.isErrorWithMessage,t.isErrorWithStack=g.isErrorWithStack,t.isHexString=d.isHexString,t.isJsonRpcError=a.isJsonRpcError,t.isJsonRpcFailure=a.isJsonRpcFailure,t.isJsonRpcNotification=a.isJsonRpcNotification,t.isJsonRpcRequest=a.isJsonRpcRequest,t.isJsonRpcResponse=a.isJsonRpcResponse,t.isJsonRpcSuccess=a.isJsonRpcSuccess,t.isNonEmptyArray=y.isNonEmptyArray,t.isNullOrUndefined=y.isNullOrUndefined,t.isObject=y.isObject,t.isPendingJsonRpcResponse=a.isPendingJsonRpcResponse,t.isPlainObject=y.isPlainObject,t.isStrictHexString=d.isStrictHexString,t.isValidChecksumAddress=d.isValidChecksumAddress,t.isValidHexAddress=d.isValidHexAddress,t.isValidJson=a.isValidJson,t.isValidSemVerRange=s.isValidSemVerRange,t.isValidSemVerVersion=s.isValidSemVerVersion,t.jsonrpc2=a.jsonrpc2,t.numberToBytes=d.numberToBytes,t.numberToHex=n.numberToHex,t.object=a.object,t.parseCaipAccountId=u.parseCaipAccountId,t.parseCaipChainId=u.parseCaipChainId,t.remove0x=d.remove0x,t.satisfiesVersionRange=s.satisfiesVersionRange,t.signedBigIntToBytes=d.signedBigIntToBytes,t.stringToBytes=d.stringToBytes,t.timeSince=i.timeSince,t.valueToBytes=d.valueToBytes,t.wrapError=g.wrapError},4514:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e)||e<0)throw new Error(`Wrong positive integer: ${e}`)}function n(e){if("boolean"!=typeof e)throw new Error(`Expected boolean, not ${e}`)}function o(e,...t){if(!(e instanceof Uint8Array))throw new Error("Expected Uint8Array");if(t.length>0&&!t.includes(e.length))throw new Error(`Expected Uint8Array of length ${t}, not of length=${e.length}`)}function i(e){if("function"!=typeof e||"function"!=typeof e.create)throw new Error("Hash should be wrapped by utils.wrapConstructor");r(e.outputLen),r(e.blockLen)}function s(e,t=!0){if(e.destroyed)throw new Error("Hash instance has been destroyed");if(t&&e.finished)throw new Error("Hash#digest() has already been called")}function a(e,t){o(e);const r=t.outputLen;if(e.length<r)throw new Error(`digestInto() expects output buffer of length at least ${r}`)}Object.defineProperty(t,"__esModule",{value:!0}),t.output=t.exists=t.hash=t.bytes=t.bool=t.number=void 0,t.number=r,t.bool=n,t.bytes=o,t.hash=i,t.exists=s,t.output=a;const c={number:r,bool:n,bytes:o,hash:i,exists:s,output:a};t.default=c},4834:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.add5L=t.add5H=t.add4H=t.add4L=t.add3H=t.add3L=t.add=t.rotlBL=t.rotlBH=t.rotlSL=t.rotlSH=t.rotr32L=t.rotr32H=t.rotrBL=t.rotrBH=t.rotrSL=t.rotrSH=t.shrSL=t.shrSH=t.toBig=t.split=t.fromBig=void 0;const r=BigInt(2**32-1),n=BigInt(32);function o(e,t=!1){return t?{h:Number(e&r),l:Number(e>>n&r)}:{h:0|Number(e>>n&r),l:0|Number(e&r)}}function i(e,t=!1){let r=new Uint32Array(e.length),n=new Uint32Array(e.length);for(let i=0;i<e.length;i++){const{h:s,l:a}=o(e[i],t);[r[i],n[i]]=[s,a]}return[r,n]}t.fromBig=o,t.split=i;const s=(e,t)=>BigInt(e>>>0)<<n|BigInt(t>>>0);t.toBig=s;const a=(e,t,r)=>e>>>r;t.shrSH=a;const c=(e,t,r)=>e<<32-r|t>>>r;t.shrSL=c;const u=(e,t,r)=>e>>>r|t<<32-r;t.rotrSH=u;const l=(e,t,r)=>e<<32-r|t>>>r;t.rotrSL=l;const f=(e,t,r)=>e<<64-r|t>>>r-32;t.rotrBH=f;const p=(e,t,r)=>e>>>r-32|t<<64-r;t.rotrBL=p;const d=(e,t)=>t;t.rotr32H=d;const h=(e,t)=>e;t.rotr32L=h;const g=(e,t,r)=>e<<r|t>>>32-r;t.rotlSH=g;const y=(e,t,r)=>t<<r|e>>>32-r;t.rotlSL=y;const m=(e,t,r)=>t<<r-32|e>>>64-r;t.rotlBH=m;const v=(e,t,r)=>e<<r-32|t>>>64-r;function b(e,t,r,n){const o=(t>>>0)+(n>>>0);return{h:e+r+(o/2**32|0)|0,l:0|o}}t.rotlBL=v,t.add=b;const E=(e,t,r)=>(e>>>0)+(t>>>0)+(r>>>0);t.add3L=E;const w=(e,t,r,n)=>t+r+n+(e/2**32|0)|0;t.add3H=w;const S=(e,t,r,n)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0);t.add4L=S;const x=(e,t,r,n,o)=>t+r+n+o+(e/2**32|0)|0;t.add4H=x;const A=(e,t,r,n,o)=>(e>>>0)+(t>>>0)+(r>>>0)+(n>>>0)+(o>>>0);t.add5L=A;const O=(e,t,r,n,o,i)=>t+r+n+o+i+(e/2**32|0)|0;t.add5H=O;const I={fromBig:o,split:i,toBig:s,shrSH:a,shrSL:c,rotrSH:u,rotrSL:l,rotrBH:f,rotrBL:p,rotr32H:d,rotr32L:h,rotlSH:g,rotlSL:y,rotlBH:m,rotlBL:v,add:b,add3L:E,add3H:w,add4L:S,add4H:x,add5H:O,add5L:A};t.default=I},4877:(e,t)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.crypto=void 0,t.crypto="object"==typeof globalThis&&"crypto"in globalThis?globalThis.crypto:void 0},1647:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.shake256=t.shake128=t.keccak_512=t.keccak_384=t.keccak_256=t.keccak_224=t.sha3_512=t.sha3_384=t.sha3_256=t.sha3_224=t.Keccak=t.keccakP=void 0;const n=r(4514),o=r(4834),i=r(2912),[s,a,c]=[[],[],[]],u=BigInt(0),l=BigInt(1),f=BigInt(2),p=BigInt(7),d=BigInt(256),h=BigInt(113);for(let e=0,t=l,r=1,n=0;e<24;e++){[r,n]=[n,(2*r+3*n)%5],s.push(2*(5*n+r)),a.push((e+1)*(e+2)/2%64);let o=u;for(let e=0;e<7;e++)t=(t<<l^(t>>p)*h)%d,t&f&&(o^=l<<(l<<BigInt(e))-l);c.push(o)}const[g,y]=(0,o.split)(c,!0),m=(e,t,r)=>r>32?(0,o.rotlBH)(e,t,r):(0,o.rotlSH)(e,t,r),v=(e,t,r)=>r>32?(0,o.rotlBL)(e,t,r):(0,o.rotlSL)(e,t,r);function b(e,t=24){const r=new Uint32Array(10);for(let n=24-t;n<24;n++){for(let t=0;t<10;t++)r[t]=e[t]^e[t+10]^e[t+20]^e[t+30]^e[t+40];for(let t=0;t<10;t+=2){const n=(t+8)%10,o=(t+2)%10,i=r[o],s=r[o+1],a=m(i,s,1)^r[n],c=v(i,s,1)^r[n+1];for(let r=0;r<50;r+=10)e[t+r]^=a,e[t+r+1]^=c}let t=e[2],o=e[3];for(let r=0;r<24;r++){const n=a[r],i=m(t,o,n),c=v(t,o,n),u=s[r];t=e[u],o=e[u+1],e[u]=i,e[u+1]=c}for(let t=0;t<50;t+=10){for(let n=0;n<10;n++)r[n]=e[t+n];for(let n=0;n<10;n++)e[t+n]^=~r[(n+2)%10]&r[(n+4)%10]}e[0]^=g[n],e[1]^=y[n]}r.fill(0)}t.keccakP=b;class E extends i.Hash{constructor(e,t,r,o=!1,s=24){if(super(),this.blockLen=e,this.suffix=t,this.outputLen=r,this.enableXOF=o,this.rounds=s,this.pos=0,this.posOut=0,this.finished=!1,this.destroyed=!1,(0,n.number)(r),0>=this.blockLen||this.blockLen>=200)throw new Error("Sha3 supports only keccak-f1600 function");this.state=new Uint8Array(200),this.state32=(0,i.u32)(this.state)}keccak(){b(this.state32,this.rounds),this.posOut=0,this.pos=0}update(e){(0,n.exists)(this);const{blockLen:t,state:r}=this,o=(e=(0,i.toBytes)(e)).length;for(let n=0;n<o;){const i=Math.min(t-this.pos,o-n);for(let t=0;t<i;t++)r[this.pos++]^=e[n++];this.pos===t&&this.keccak()}return this}finish(){if(this.finished)return;this.finished=!0;const{state:e,suffix:t,pos:r,blockLen:n}=this;e[r]^=t,0!=(128&t)&&r===n-1&&this.keccak(),e[n-1]^=128,this.keccak()}writeInto(e){(0,n.exists)(this,!1),(0,n.bytes)(e),this.finish();const t=this.state,{blockLen:r}=this;for(let n=0,o=e.length;n<o;){this.posOut>=r&&this.keccak();const i=Math.min(r-this.posOut,o-n);e.set(t.subarray(this.posOut,this.posOut+i),n),this.posOut+=i,n+=i}return e}xofInto(e){if(!this.enableXOF)throw new Error("XOF is not possible for this instance");return this.writeInto(e)}xof(e){return(0,n.number)(e),this.xofInto(new Uint8Array(e))}digestInto(e){if((0,n.output)(e,this),this.finished)throw new Error("digest() was already called");return this.writeInto(e),this.destroy(),e}digest(){return this.digestInto(new Uint8Array(this.outputLen))}destroy(){this.destroyed=!0,this.state.fill(0)}_cloneInto(e){const{blockLen:t,suffix:r,outputLen:n,rounds:o,enableXOF:i}=this;return e||(e=new E(t,r,n,i,o)),e.state32.set(this.state32),e.pos=this.pos,e.posOut=this.posOut,e.finished=this.finished,e.rounds=o,e.suffix=r,e.outputLen=n,e.enableXOF=i,e.destroyed=this.destroyed,e}}t.Keccak=E;const w=(e,t,r)=>(0,i.wrapConstructor)((()=>new E(t,e,r)));t.sha3_224=w(6,144,28),t.sha3_256=w(6,136,32),t.sha3_384=w(6,104,48),t.sha3_512=w(6,72,64),t.keccak_224=w(1,144,28),t.keccak_256=w(1,136,32),t.keccak_384=w(1,104,48),t.keccak_512=w(1,72,64);const S=(e,t,r)=>(0,i.wrapXOFConstructorWithOpts)(((n={})=>new E(t,e,void 0===n.dkLen?r:n.dkLen,!0)));t.shake128=S(31,168,16),t.shake256=S(31,136,32)},2912:(e,t,r)=>{"use strict";Object.defineProperty(t,"__esModule",{value:!0}),t.randomBytes=t.wrapXOFConstructorWithOpts=t.wrapConstructorWithOpts=t.wrapConstructor=t.checkOpts=t.Hash=t.concatBytes=t.toBytes=t.utf8ToBytes=t.asyncLoop=t.nextTick=t.hexToBytes=t.bytesToHex=t.isLE=t.rotr=t.createView=t.u32=t.u8=void 0;const n=r(4877),o=e=>e instanceof Uint8Array;t.u8=e=>new Uint8Array(e.buffer,e.byteOffset,e.byteLength);t.u32=e=>new Uint32Array(e.buffer,e.byteOffset,Math.floor(e.byteLength/4));t.createView=e=>new DataView(e.buffer,e.byteOffset,e.byteLength);if(t.rotr=(e,t)=>e<<32-t|e>>>t,t.isLE=68===new Uint8Array(new Uint32Array([287454020]).buffer)[0],!t.isLE)throw new Error("Non little-endian hardware is not supported");const i=Array.from({length:256},((e,t)=>t.toString(16).padStart(2,"0")));t.bytesToHex=function(e){if(!o(e))throw new Error("Uint8Array expected");let t="";for(let r=0;r<e.length;r++)t+=i[e[r]];return t},t.hexToBytes=function(e){if("string"!=typeof e)throw new Error("hex string expected, got "+typeof e);const t=e.length;if(t%2)throw new Error("padded hex string expected, got unpadded hex of length "+t);const r=new Uint8Array(t/2);for(let t=0;t<r.length;t++){const n=2*t,o=e.slice(n,n+2),i=Number.parseInt(o,16);if(Number.isNaN(i)||i<0)throw new Error("Invalid byte sequence");r[t]=i}return r};function s(e){if("string"!=typeof e)throw new Error("utf8ToBytes expected string, got "+typeof e);return new Uint8Array((new TextEncoder).encode(e))}function a(e){if("string"==typeof e&&(e=s(e)),!o(e))throw new Error("expected Uint8Array, got "+typeof e);return e}t.nextTick=async()=>{},t.asyncLoop=async function(e,r,n){let o=Date.now();for(let i=0;i<e;i++){n(i);const e=Date.now()-o;e>=0&&e<r||(await(0,t.nextTick)(),o+=e)}},t.utf8ToBytes=s,t.toBytes=a,t.concatBytes=function(...e){const t=new Uint8Array(e.reduce(((e,t)=>e+t.length),0));let r=0;return e.forEach((e=>{if(!o(e))throw new Error("Uint8Array expected");t.set(e,r),r+=e.length})),t};t.Hash=class{clone(){return this._cloneInto()}};const c={}.toString;t.checkOpts=function(e,t){if(void 0!==t&&"[object Object]"!==c.call(t))throw new Error("Options should be object or undefined");return Object.assign(e,t)},t.wrapConstructor=function(e){const t=t=>e().update(a(t)).digest(),r=e();return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=()=>e(),t},t.wrapConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.wrapXOFConstructorWithOpts=function(e){const t=(t,r)=>e(r).update(a(t)).digest(),r=e({});return t.outputLen=r.outputLen,t.blockLen=r.blockLen,t.create=t=>e(t),t},t.randomBytes=function(e=32){if(n.crypto&&"function"==typeof n.crypto.getRandomValues)return n.crypto.getRandomValues(new Uint8Array(e));throw new Error("crypto.getRandomValues must be defined")}},8269:(e,t)=>{"use strict";function r(e){if(!Number.isSafeInteger(e))throw new Error(`Wrong integer: ${e}`)}function n(...e){const t=(e,t)=>r=>e(t(r)),r=Array.from(e).reverse().reduce(((e,r)=>e?t(e,r.encode):r.encode),void 0),n=e.reduce(((e,r)=>e?t(e,r.decode):r.decode),void 0);return{encode:r,decode:n}}function o(e){return{encode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("alphabet.encode input should be an array of numbers");return t.map((t=>{if(r(t),t<0||t>=e.length)throw new Error(`Digit index outside alphabet: ${t} (alphabet: ${e.length})`);return e[t]}))},decode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("alphabet.decode input should be array of strings");return t.map((t=>{if("string"!=typeof t)throw new Error(`alphabet.decode: not string element=${t}`);const r=e.indexOf(t);if(-1===r)throw new Error(`Unknown letter: "${t}". Allowed: ${e}`);return r}))}}}function i(e=""){if("string"!=typeof e)throw new Error("join separator should be string");return{encode:t=>{if(!Array.isArray(t)||t.length&&"string"!=typeof t[0])throw new Error("join.encode input should be array of strings");for(let e of t)if("string"!=typeof e)throw new Error(`join.encode: non-string input=${e}`);return t.join(e)},decode:t=>{if("string"!=typeof t)throw new Error("join.decode input should be string");return t.split(e)}}}function s(e,t="="){if(r(e),"string"!=typeof t)throw new Error("padding chr should be string");return{encode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.encode: non-string input=${e}`);for(;r.length*e%8;)r.push(t);return r},decode(r){if(!Array.isArray(r)||r.length&&"string"!=typeof r[0])throw new Error("padding.encode input should be array of strings");for(let e of r)if("string"!=typeof e)throw new Error(`padding.decode: non-string input=${e}`);let n=r.length;if(n*e%8)throw new Error("Invalid padding: string should have whole number of bytes");for(;n>0&&r[n-1]===t;n--)if(!((n-1)*e%8))throw new Error("Invalid padding: string has too much padding");return r.slice(0,n)}}}function a(e){if("function"!=typeof e)throw new Error("normalize fn should be function");return{encode:e=>e,decode:t=>e(t)}}function c(e,t,n){if(t<2)throw new Error(`convertRadix: wrong from=${t}, base cannot be less than 2`);if(n<2)throw new Error(`convertRadix: wrong to=${n}, base cannot be less than 2`);if(!Array.isArray(e))throw new Error("convertRadix: data should be array");if(!e.length)return[];let o=0;const i=[],s=Array.from(e);for(s.forEach((e=>{if(r(e),e<0||e>=t)throw new Error(`Wrong integer: ${e}`)}));;){let e=0,r=!0;for(let i=o;i<s.length;i++){const a=s[i],c=t*e+a;if(!Number.isSafeInteger(c)||t*e/t!==e||c-a!=t*e)throw new Error("convertRadix: carry overflow");e=c%n;const u=Math.floor(c/n);if(s[i]=u,!Number.isSafeInteger(u)||u*n+e!==c)throw new Error("convertRadix: carry overflow");r&&(u?r=!1:o=i)}if(i.push(e),r)break}for(let t=0;t<e.length-1&&0===e[t];t++)i.push(0);return i.reverse()}Object.defineProperty(t,"__esModule",{value:!0}),t.bytes=t.stringToBytes=t.str=t.bytesToString=t.hex=t.utf8=t.bech32m=t.bech32=t.base58check=t.base58xmr=t.base58xrp=t.base58flickr=t.base58=t.base64urlnopad=t.base64url=t.base64=t.base32crockford=t.base32hex=t.base32=t.base16=t.utils=t.assertNumber=void 0,t.assertNumber=r;const u=(e,t)=>t?u(t,e%t):e,l=(e,t)=>e+(t-u(e,t));function f(e,t,n,o){if(!Array.isArray(e))throw new Error("convertRadix2: data should be array");if(t<=0||t>32)throw new Error(`convertRadix2: wrong from=${t}`);if(n<=0||n>32)throw new Error(`convertRadix2: wrong to=${n}`);if(l(t,n)>32)throw new Error(`convertRadix2: carry overflow from=${t} to=${n} carryBits=${l(t,n)}`);let i=0,s=0;const a=2**n-1,c=[];for(const o of e){if(r(o),o>=2**t)throw new Error(`convertRadix2: invalid data word=${o} from=${t}`);if(i=i<<t|o,s+t>32)throw new Error(`convertRadix2: carry overflow pos=${s} from=${t}`);for(s+=t;s>=n;s-=n)c.push((i>>s-n&a)>>>0);i&=2**s-1}if(i=i<<n-s&a,!o&&s>=t)throw new Error("Excess padding");if(!o&&i)throw new Error(`Non-zero padding: ${i}`);return o&&s>0&&c.push(i>>>0),c}function p(e){return r(e),{encode:t=>{if(!(t instanceof Uint8Array))throw new Error("radix.encode input should be Uint8Array");return c(Array.from(t),256,e)},decode:t=>{if(!Array.isArray(t)||t.length&&"number"!=typeof t[0])throw new Error("radix.decode input should be array of strings");return Uint8Array.from(c(t,e,256))}}}function d(e,t=!1){if(r(e),e<=0||e>32)throw new Error("radix2: bits should be in (0..32]");if(l(8,e)>32||l(e,8)>32)throw new Error("radix2: carry overflow");return{encode:r=>{if(!(r instanceof Uint8Array))throw new Error("radix2.encode input should be Uint8Array");return f(Array.from(r),8,e,!t)},decode:r=>{if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("radix2.decode input should be array of strings");return Uint8Array.from(f(r,e,8,t))}}}function h(e){if("function"!=typeof e)throw new Error("unsafeWrapper fn should be function");return function(...t){try{return e.apply(null,t)}catch(e){}}}function g(e,t){if(r(e),"function"!=typeof t)throw new Error("checksum fn should be function");return{encode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.encode: input should be Uint8Array");const n=t(r).slice(0,e),o=new Uint8Array(r.length+e);return o.set(r),o.set(n,r.length),o},decode(r){if(!(r instanceof Uint8Array))throw new Error("checksum.decode: input should be Uint8Array");const n=r.slice(0,-e),o=t(n).slice(0,e),i=r.slice(-e);for(let t=0;t<e;t++)if(o[t]!==i[t])throw new Error("Invalid checksum");return n}}}t.utils={alphabet:o,chain:n,checksum:g,radix:p,radix2:d,join:i,padding:s},t.base16=n(d(4),o("0123456789ABCDEF"),i("")),t.base32=n(d(5),o("ABCDEFGHIJKLMNOPQRSTUVWXYZ234567"),s(5),i("")),t.base32hex=n(d(5),o("0123456789ABCDEFGHIJKLMNOPQRSTUV"),s(5),i("")),t.base32crockford=n(d(5),o("0123456789ABCDEFGHJKMNPQRSTVWXYZ"),i(""),a((e=>e.toUpperCase().replace(/O/g,"0").replace(/[IL]/g,"1")))),t.base64=n(d(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/"),s(6),i("")),t.base64url=n(d(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),s(6),i("")),t.base64urlnopad=n(d(6),o("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_"),i(""));const y=e=>n(p(58),o(e),i(""));t.base58=y("123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz"),t.base58flickr=y("123456789abcdefghijkmnopqrstuvwxyzABCDEFGHJKLMNPQRSTUVWXYZ"),t.base58xrp=y("rpshnaf39wBUDNEGHJKLM4PQRST7VWXYZ2bcdeCg65jkm8oFqi1tuvAxyz");const m=[0,2,3,5,6,7,9,10,11];t.base58xmr={encode(e){let r="";for(let n=0;n<e.length;n+=8){const o=e.subarray(n,n+8);r+=t.base58.encode(o).padStart(m[o.length],"1")}return r},decode(e){let r=[];for(let n=0;n<e.length;n+=11){const o=e.slice(n,n+11),i=m.indexOf(o.length),s=t.base58.decode(o);for(let e=0;e<s.length-i;e++)if(0!==s[e])throw new Error("base58xmr: wrong padding");r=r.concat(Array.from(s.slice(s.length-i)))}return Uint8Array.from(r)}};t.base58check=e=>n(g(4,(t=>e(e(t)))),t.base58);const v=n(o("qpzry9x8gf2tvdw0s3jn54khce6mua7l"),i("")),b=[996825010,642813549,513874426,1027748829,705979059];function E(e){const t=e>>25;let r=(33554431&e)<<5;for(let e=0;e<b.length;e++)1==(t>>e&1)&&(r^=b[e]);return r}function w(e,t,r=1){const n=e.length;let o=1;for(let t=0;t<n;t++){const r=e.charCodeAt(t);if(r<33||r>126)throw new Error(`Invalid prefix (${e})`);o=E(o)^r>>5}o=E(o);for(let t=0;t<n;t++)o=E(o)^31&e.charCodeAt(t);for(let e of t)o=E(o)^e;for(let e=0;e<6;e++)o=E(o);return o^=r,v.encode(f([o%2**30],30,5,!1))}function S(e){const t="bech32"===e?1:734539939,r=d(5),n=r.decode,o=r.encode,i=h(n);function s(e,r=90){if("string"!=typeof e)throw new Error("bech32.decode input should be string, not "+typeof e);if(e.length<8||!1!==r&&e.length>r)throw new TypeError(`Wrong string length: ${e.length} (${e}). Expected (8..${r})`);const n=e.toLowerCase();if(e!==n&&e!==e.toUpperCase())throw new Error("String must be lowercase or uppercase");const o=(e=n).lastIndexOf("1");if(0===o||-1===o)throw new Error('Letter "1" must be present between prefix and data only');const i=e.slice(0,o),s=e.slice(o+1);if(s.length<6)throw new Error("Data must be at least 6 characters long");const a=v.decode(s).slice(0,-6),c=w(i,a,t);if(!s.endsWith(c))throw new Error(`Invalid checksum in ${e}: expected "${c}"`);return{prefix:i,words:a}}return{encode:function(e,r,n=90){if("string"!=typeof e)throw new Error("bech32.encode prefix should be string, not "+typeof e);if(!Array.isArray(r)||r.length&&"number"!=typeof r[0])throw new Error("bech32.encode words should be array of numbers, not "+typeof r);const o=e.length+7+r.length;if(!1!==n&&o>n)throw new TypeError(`Length ${o} exceeds limit ${n}`);const i=e.toLowerCase(),s=w(i,r,t);return`${i}1${v.encode(r)}${s}`},decode:s,decodeToBytes:function(e){const{prefix:t,words:r}=s(e,!1);return{prefix:t,words:r,bytes:n(r)}},decodeUnsafe:h(s),fromWords:n,fromWordsUnsafe:i,toWords:o}}t.bech32=S("bech32"),t.bech32m=S("bech32m"),t.utf8={encode:e=>(new TextDecoder).decode(e),decode:e=>(new TextEncoder).encode(e)},t.hex=n(d(4),o("0123456789abcdef"),i(""),a((e=>{if("string"!=typeof e||e.length%2)throw new TypeError(`hex.decode: expected string, got ${typeof e} with length ${e.length}`);return e.toLowerCase()})));const x={utf8:t.utf8,hex:t.hex,base16:t.base16,base32:t.base32,base64:t.base64,base64url:t.base64url,base58:t.base58,base58xmr:t.base58xmr},A="Invalid encoding type. Available types: utf8, hex, base16, base32, base64, base64url, base58, base58xmr";t.bytesToString=(e,t)=>{if("string"!=typeof e||!x.hasOwnProperty(e))throw new TypeError(A);if(!(t instanceof Uint8Array))throw new TypeError("bytesToString() expects Uint8Array");return x[e].encode(t)},t.str=t.bytesToString;t.stringToBytes=(e,t)=>{if(!x.hasOwnProperty(e))throw new TypeError(A);if("string"!=typeof t)throw new TypeError("stringToBytes() expects string");return x[e].decode(t)},t.bytes=t.stringToBytes},5247:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}var o,i,s=r(409).codes,a=s.ERR_AMBIGUOUS_ARGUMENT,c=s.ERR_INVALID_ARG_TYPE,u=s.ERR_INVALID_ARG_VALUE,l=s.ERR_INVALID_RETURN_VALUE,f=s.ERR_MISSING_ARGS,p=r(5685),d=r(862).inspect,h=r(862).types,g=h.isPromise,y=h.isRegExp,m=Object.assign?Object.assign:r(5021).assign,v=Object.is?Object.is:r(5031);new Map;function b(){var e=r(5872);o=e.isDeepEqual,i=e.isDeepStrictEqual}var E=!1,w=e.exports=O,S={};function x(e){if(e.message instanceof Error)throw e.message;throw new p(e)}function A(e,t,r,n){if(!r){var o=!1;if(0===t)o=!0,n="No value argument passed to `assert.ok()`";else if(n instanceof Error)throw n;var i=new p({actual:r,expected:!0,message:n,operator:"==",stackStartFn:e});throw i.generatedMessage=o,i}}function O(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];A.apply(void 0,[O,t.length].concat(t))}w.fail=function e(t,r,n,o,i){var s,a=arguments.length;if(0===a)s="Failed";else if(1===a)n=t,t=void 0;else{if(!1===E)E=!0,(process.emitWarning?process.emitWarning:console.warn.bind(console))("assert.fail() with more than one argument is deprecated. Please use assert.strictEqual() instead or only pass a message.","DeprecationWarning","DEP0094");2===a&&(o="!=")}if(n instanceof Error)throw n;var c={actual:t,expected:r,operator:void 0===o?"fail":o,stackStartFn:i||e};void 0!==n&&(c.message=n);var u=new p(c);throw s&&(u.message=s,u.generatedMessage=!0),u},w.AssertionError=p,w.ok=O,w.equal=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");t!=r&&x({actual:t,expected:r,message:n,operator:"==",stackStartFn:e})},w.notEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");t==r&&x({actual:t,expected:r,message:n,operator:"!=",stackStartFn:e})},w.deepEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b(),o(t,r)||x({actual:t,expected:r,message:n,operator:"deepEqual",stackStartFn:e})},w.notDeepEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b(),o(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepEqual",stackStartFn:e})},w.deepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b(),i(t,r)||x({actual:t,expected:r,message:n,operator:"deepStrictEqual",stackStartFn:e})},w.notDeepStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");void 0===o&&b();i(t,r)&&x({actual:t,expected:r,message:n,operator:"notDeepStrictEqual",stackStartFn:e})},w.strictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");v(t,r)||x({actual:t,expected:r,message:n,operator:"strictEqual",stackStartFn:e})},w.notStrictEqual=function e(t,r,n){if(arguments.length<2)throw new f("actual","expected");v(t,r)&&x({actual:t,expected:r,message:n,operator:"notStrictEqual",stackStartFn:e})};var I=function e(t,r,n){var o=this;!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),r.forEach((function(e){e in t&&(void 0!==n&&"string"==typeof n[e]&&y(t[e])&&t[e].test(n[e])?o[e]=n[e]:o[e]=t[e])}))};function N(e,t,r,s){if("function"!=typeof t){if(y(t))return t.test(e);if(2===arguments.length)throw new c("expected",["Function","RegExp"],t);if("object"!==n(e)||null===e){var a=new p({actual:e,expected:t,message:r,operator:"deepStrictEqual",stackStartFn:s});throw a.operator=s.name,a}var l=Object.keys(t);if(t instanceof Error)l.push("name","message");else if(0===l.length)throw new u("error",t,"may not be an empty object");return void 0===o&&b(),l.forEach((function(n){"string"==typeof e[n]&&y(t[n])&&t[n].test(e[n])||function(e,t,r,n,o,s){if(!(r in e)||!i(e[r],t[r])){if(!n){var a=new I(e,o),c=new I(t,o,e),u=new p({actual:a,expected:c,operator:"deepStrictEqual",stackStartFn:s});throw u.actual=e,u.expected=t,u.operator=s.name,u}x({actual:e,expected:t,message:n,operator:s.name,stackStartFn:s})}}(e,t,n,r,l,s)})),!0}return void 0!==t.prototype&&e instanceof t||!Error.isPrototypeOf(t)&&!0===t.call({},e)}function R(e){if("function"!=typeof e)throw new c("fn","Function",e);try{e()}catch(e){return e}return S}function j(e){return g(e)||null!==e&&"object"===n(e)&&"function"==typeof e.then&&"function"==typeof e.catch}function C(e){return Promise.resolve().then((function(){var t;if("function"==typeof e){if(!j(t=e()))throw new l("instance of Promise","promiseFn",t)}else{if(!j(e))throw new c("promiseFn",["Function","Promise"],e);t=e}return Promise.resolve().then((function(){return t})).then((function(){return S})).catch((function(e){return e}))}))}function P(e,t,r,o){if("string"==typeof r){if(4===arguments.length)throw new c("error",["Object","Error","Function","RegExp"],r);if("object"===n(t)&&null!==t){if(t.message===r)throw new a("error/message",'The error message "'.concat(t.message,'" is identical to the message.'))}else if(t===r)throw new a("error/message",'The error "'.concat(t,'" is identical to the message.'));o=r,r=void 0}else if(null!=r&&"object"!==n(r)&&"function"!=typeof r)throw new c("error",["Object","Error","Function","RegExp"],r);if(t===S){var i="";r&&r.name&&(i+=" (".concat(r.name,")")),i+=o?": ".concat(o):".";var s="rejects"===e.name?"rejection":"exception";x({actual:void 0,expected:r,operator:e.name,message:"Missing expected ".concat(s).concat(i),stackStartFn:e})}if(r&&!N(t,r,o,e))throw t}function T(e,t,r,n){if(t!==S){if("string"==typeof r&&(n=r,r=void 0),!r||N(t,r)){var o=n?": ".concat(n):".",i="doesNotReject"===e.name?"rejection":"exception";x({actual:t,expected:r,operator:e.name,message:"Got unwanted ".concat(i).concat(o,"\n")+'Actual message: "'.concat(t&&t.message,'"'),stackStartFn:e})}throw t}}function $(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];A.apply(void 0,[$,t.length].concat(t))}w.throws=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];P.apply(void 0,[e,R(t)].concat(n))},w.rejects=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return C(t).then((function(t){return P.apply(void 0,[e,t].concat(n))}))},w.doesNotThrow=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];T.apply(void 0,[e,R(t)].concat(n))},w.doesNotReject=function e(t){for(var r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];return C(t).then((function(t){return T.apply(void 0,[e,t].concat(n))}))},w.ifError=function e(t){if(null!=t){var r="ifError got unwanted exception: ";"object"===n(t)&&"string"==typeof t.message?0===t.message.length&&t.constructor?r+=t.constructor.name:r+=t.message:r+=d(t);var o=new p({actual:t,expected:null,operator:"ifError",message:r,stackStartFn:e}),i=t.stack;if("string"==typeof i){var s=i.split("\n");s.shift();for(var a=o.stack.split("\n"),c=0;c<s.length;c++){var u=a.indexOf(s[c]);if(-1!==u){a=a.slice(0,u);break}}o.stack="".concat(a.join("\n"),"\n").concat(s.join("\n"))}throw o}},w.strict=m($,w,{equal:w.strictEqual,deepEqual:w.deepStrictEqual,notEqual:w.notStrictEqual,notDeepEqual:w.notDeepStrictEqual}),w.strict.strict=w.strict},5685:(e,t,r)=>{"use strict";function n(e,t,r){return t in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function o(e,t){for(var r=0;r<t.length;r++){var n=t[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(e,n.key,n)}}function i(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?s(e):t}function s(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}function a(e){var t="function"==typeof Map?new Map:void 0;return a=function(e){if(null===e||(r=e,-1===Function.toString.call(r).indexOf("[native code]")))return e;var r;if("function"!=typeof e)throw new TypeError("Super expression must either be null or a function");if(void 0!==t){if(t.has(e))return t.get(e);t.set(e,n)}function n(){return c(e,arguments,l(this).constructor)}return n.prototype=Object.create(e.prototype,{constructor:{value:n,enumerable:!1,writable:!0,configurable:!0}}),u(n,e)},a(e)}function c(e,t,r){return c=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],(function(){}))),!0}catch(e){return!1}}()?Reflect.construct:function(e,t,r){var n=[null];n.push.apply(n,t);var o=new(Function.bind.apply(e,n));return r&&u(o,r.prototype),o},c.apply(null,arguments)}function u(e,t){return u=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},u(e,t)}function l(e){return l=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},l(e)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}var p=r(862).inspect,d=r(409).codes.ERR_INVALID_ARG_TYPE;function h(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}var g="",y="",m="",v="",b={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function E(e){var t=Object.keys(e),r=Object.create(Object.getPrototypeOf(e));return t.forEach((function(t){r[t]=e[t]})),Object.defineProperty(r,"message",{value:e.message}),r}function w(e){return p(e,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function S(e,t,r){var n="",o="",i=0,s="",a=!1,c=w(e),u=c.split("\n"),l=w(t).split("\n"),p=0,d="";if("strictEqual"===r&&"object"===f(e)&&"object"===f(t)&&null!==e&&null!==t&&(r="strictEqualObject"),1===u.length&&1===l.length&&u[0]!==l[0]){var E=u[0].length+l[0].length;if(E<=10){if(!("object"===f(e)&&null!==e||"object"===f(t)&&null!==t||0===e&&0===t))return"".concat(b[r],"\n\n")+"".concat(u[0]," !== ").concat(l[0],"\n")}else if("strictEqualObject"!==r){if(E<(process.stderr&&process.stderr.isTTY?process.stderr.columns:80)){for(;u[0][p]===l[0][p];)p++;p>2&&(d="\n ".concat(function(e,t){if(t=Math.floor(t),0==e.length||0==t)return"";var r=e.length*t;for(t=Math.floor(Math.log(t)/Math.log(2));t;)e+=e,t--;return e+e.substring(0,r-e.length)}(" ",p),"^"),p=0)}}}for(var S=u[u.length-1],x=l[l.length-1];S===x&&(p++<2?s="\n ".concat(S).concat(s):n=S,u.pop(),l.pop(),0!==u.length&&0!==l.length);)S=u[u.length-1],x=l[l.length-1];var A=Math.max(u.length,l.length);if(0===A){var O=c.split("\n");if(O.length>30)for(O[26]="".concat(g,"...").concat(v);O.length>27;)O.pop();return"".concat(b.notIdentical,"\n\n").concat(O.join("\n"),"\n")}p>3&&(s="\n".concat(g,"...").concat(v).concat(s),a=!0),""!==n&&(s="\n ".concat(n).concat(s),n="");var I=0,N=b[r]+"\n".concat(y,"+ actual").concat(v," ").concat(m,"- expected").concat(v),R=" ".concat(g,"...").concat(v," Lines skipped");for(p=0;p<A;p++){var j=p-i;if(u.length<p+1)j>1&&p>2&&(j>4?(o+="\n".concat(g,"...").concat(v),a=!0):j>3&&(o+="\n ".concat(l[p-2]),I++),o+="\n ".concat(l[p-1]),I++),i=p,n+="\n".concat(m,"-").concat(v," ").concat(l[p]),I++;else if(l.length<p+1)j>1&&p>2&&(j>4?(o+="\n".concat(g,"...").concat(v),a=!0):j>3&&(o+="\n ".concat(u[p-2]),I++),o+="\n ".concat(u[p-1]),I++),i=p,o+="\n".concat(y,"+").concat(v," ").concat(u[p]),I++;else{var C=l[p],P=u[p],T=P!==C&&(!h(P,",")||P.slice(0,-1)!==C);T&&h(C,",")&&C.slice(0,-1)===P&&(T=!1,P+=","),T?(j>1&&p>2&&(j>4?(o+="\n".concat(g,"...").concat(v),a=!0):j>3&&(o+="\n ".concat(u[p-2]),I++),o+="\n ".concat(u[p-1]),I++),i=p,o+="\n".concat(y,"+").concat(v," ").concat(P),n+="\n".concat(m,"-").concat(v," ").concat(C),I+=2):(o+=n,n="",1!==j&&0!==p||(o+="\n ".concat(P),I++))}if(I>20&&p<A-2)return"".concat(N).concat(R,"\n").concat(o,"\n").concat(g,"...").concat(v).concat(n,"\n")+"".concat(g,"...").concat(v)}return"".concat(N).concat(a?R:"","\n").concat(o).concat(n).concat(s).concat(d)}var x=function(e){function t(e){var r;if(function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,t),"object"!==f(e)||null===e)throw new d("options","Object",e);var n=e.message,o=e.operator,a=e.stackStartFn,c=e.actual,u=e.expected,p=Error.stackTraceLimit;if(Error.stackTraceLimit=0,null!=n)r=i(this,l(t).call(this,String(n)));else if(process.stderr&&process.stderr.isTTY&&(process.stderr&&process.stderr.getColorDepth&&1!==process.stderr.getColorDepth()?(g="",y="",v="",m=""):(g="",y="",v="",m="")),"object"===f(c)&&null!==c&&"object"===f(u)&&null!==u&&"stack"in c&&c instanceof Error&&"stack"in u&&u instanceof Error&&(c=E(c),u=E(u)),"deepStrictEqual"===o||"strictEqual"===o)r=i(this,l(t).call(this,S(c,u,o)));else if("notDeepStrictEqual"===o||"notStrictEqual"===o){var h=b[o],x=w(c).split("\n");if("notStrictEqual"===o&&"object"===f(c)&&null!==c&&(h=b.notStrictEqualObject),x.length>30)for(x[26]="".concat(g,"...").concat(v);x.length>27;)x.pop();r=1===x.length?i(this,l(t).call(this,"".concat(h," ").concat(x[0]))):i(this,l(t).call(this,"".concat(h,"\n\n").concat(x.join("\n"),"\n")))}else{var A=w(c),O="",I=b[o];"notDeepEqual"===o||"notEqual"===o?(A="".concat(b[o],"\n\n").concat(A)).length>1024&&(A="".concat(A.slice(0,1021),"...")):(O="".concat(w(u)),A.length>512&&(A="".concat(A.slice(0,509),"...")),O.length>512&&(O="".concat(O.slice(0,509),"...")),"deepEqual"===o||"equal"===o?A="".concat(I,"\n\n").concat(A,"\n\nshould equal\n\n"):O=" ".concat(o," ").concat(O)),r=i(this,l(t).call(this,"".concat(A).concat(O)))}return Error.stackTraceLimit=p,r.generatedMessage=!n,Object.defineProperty(s(r),"name",{value:"AssertionError [ERR_ASSERTION]",enumerable:!1,writable:!0,configurable:!0}),r.code="ERR_ASSERTION",r.actual=c,r.expected=u,r.operator=o,Error.captureStackTrace&&Error.captureStackTrace(s(r),a),r.stack,r.name="AssertionError",i(r)}var r,a,c;return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&u(e,t)}(t,e),r=t,a=[{key:"toString",value:function(){return"".concat(this.name," [").concat(this.code,"]: ").concat(this.message)}},{key:p.custom,value:function(e,t){return p(this,function(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{},o=Object.keys(r);"function"==typeof Object.getOwnPropertySymbols&&(o=o.concat(Object.getOwnPropertySymbols(r).filter((function(e){return Object.getOwnPropertyDescriptor(r,e).enumerable})))),o.forEach((function(t){n(e,t,r[t])}))}return e}({},t,{customInspect:!1,depth:0}))}}],a&&o(r.prototype,a),c&&o(r,c),t}(a(Error));e.exports=x},409:(e,t,r)=>{"use strict";function n(e){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},n(e)}function o(e,t){return!t||"object"!==n(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}function i(e){return i=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},i(e)}function s(e,t){return s=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},s(e,t)}var a,c,u={};function l(e,t,r){r||(r=Error);var n=function(r){function n(r,s,a){var c;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,n),c=o(this,i(n).call(this,function(e,r,n){return"string"==typeof t?t:t(e,r,n)}(r,s,a))),c.code=e,c}return function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&s(e,t)}(n,r),n}(r);u[e]=n}function f(e,t){if(Array.isArray(e)){var r=e.length;return e=e.map((function(e){return String(e)})),r>2?"one of ".concat(t," ").concat(e.slice(0,r-1).join(", "),", or ")+e[r-1]:2===r?"one of ".concat(t," ").concat(e[0]," or ").concat(e[1]):"of ".concat(t," ").concat(e[0])}return"of ".concat(t," ").concat(String(e))}l("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),l("ERR_INVALID_ARG_TYPE",(function(e,t,o){var i,s,c,u;if(void 0===a&&(a=r(5247)),a("string"==typeof e,"'name' must be a string"),"string"==typeof t&&(s="not ",t.substr(!c||c<0?0:+c,s.length)===s)?(i="must not be",t=t.replace(/^not /,"")):i="must be",function(e,t,r){return(void 0===r||r>e.length)&&(r=e.length),e.substring(r-t.length,r)===t}(e," argument"))u="The ".concat(e," ").concat(i," ").concat(f(t,"type"));else{var l=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+t.length>e.length)&&-1!==e.indexOf(t,r)}(e,".")?"property":"argument";u='The "'.concat(e,'" ').concat(l," ").concat(i," ").concat(f(t,"type"))}return u+=". Received type ".concat(n(o))}),TypeError),l("ERR_INVALID_ARG_VALUE",(function(e,t){var n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:"is invalid";void 0===c&&(c=r(862));var o=c.inspect(t);return o.length>128&&(o="".concat(o.slice(0,128),"...")),"The argument '".concat(e,"' ").concat(n,". Received ").concat(o)}),TypeError,RangeError),l("ERR_INVALID_RETURN_VALUE",(function(e,t,r){var o;return o=r&&r.constructor&&r.constructor.name?"instance of ".concat(r.constructor.name):"type ".concat(n(r)),"Expected ".concat(e,' to be returned from the "').concat(t,'"')+" function but got ".concat(o,".")}),TypeError),l("ERR_MISSING_ARGS",(function(){for(var e=arguments.length,t=new Array(e),n=0;n<e;n++)t[n]=arguments[n];void 0===a&&(a=r(5247)),a(t.length>0,"At least one arg needs to be specified");var o="The ",i=t.length;switch(t=t.map((function(e){return'"'.concat(e,'"')})),i){case 1:o+="".concat(t[0]," argument");break;case 2:o+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:o+=t.slice(0,i-1).join(", "),o+=", and ".concat(t[i-1]," arguments")}return"".concat(o," must be specified")}),TypeError),e.exports.codes=u},5872:(e,t,r)=>{"use strict";function n(e,t){return function(e){if(Array.isArray(e))return e}(e)||function(e,t){var r=[],n=!0,o=!1,i=void 0;try{for(var s,a=e[Symbol.iterator]();!(n=(s=a.next()).done)&&(r.push(s.value),!t||r.length!==t);n=!0);}catch(e){o=!0,i=e}finally{try{n||null==a.return||a.return()}finally{if(o)throw i}}return r}(e,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance")}()}function o(e){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},o(e)}var i=void 0!==/a/g.flags,s=function(e){var t=[];return e.forEach((function(e){return t.push(e)})),t},a=function(e){var t=[];return e.forEach((function(e,r){return t.push([r,e])})),t},c=Object.is?Object.is:r(5031),u=Object.getOwnPropertySymbols?Object.getOwnPropertySymbols:function(){return[]},l=Number.isNaN?Number.isNaN:r(9987);function f(e){return e.call.bind(e)}var p=f(Object.prototype.hasOwnProperty),d=f(Object.prototype.propertyIsEnumerable),h=f(Object.prototype.toString),g=r(862).types,y=g.isAnyArrayBuffer,m=g.isArrayBufferView,v=g.isDate,b=g.isMap,E=g.isRegExp,w=g.isSet,S=g.isNativeError,x=g.isBoxedPrimitive,A=g.isNumberObject,O=g.isStringObject,I=g.isBooleanObject,N=g.isBigIntObject,R=g.isSymbolObject,j=g.isFloat32Array,C=g.isFloat64Array;function P(e){if(0===e.length||e.length>10)return!0;for(var t=0;t<e.length;t++){var r=e.charCodeAt(t);if(r<48||r>57)return!0}return 10===e.length&&e>=Math.pow(2,32)}function T(e){return Object.keys(e).filter(P).concat(u(e).filter(Object.prototype.propertyIsEnumerable.bind(e)))}function $(e,t){if(e===t)return 0;for(var r=e.length,n=t.length,o=0,i=Math.min(r,n);o<i;++o)if(e[o]!==t[o]){r=e[o],n=t[o];break}return r<n?-1:n<r?1:0}var _=0,k=1,F=2,L=3;function B(e,t,r,n){if(e===t)return 0!==e||(!r||c(e,t));if(r){if("object"!==o(e))return"number"==typeof e&&l(e)&&l(t);if("object"!==o(t)||null===e||null===t)return!1;if(Object.getPrototypeOf(e)!==Object.getPrototypeOf(t))return!1}else{if(null===e||"object"!==o(e))return(null===t||"object"!==o(t))&&e==t;if(null===t||"object"!==o(t))return!1}var s,a,u,f,p=h(e);if(p!==h(t))return!1;if(Array.isArray(e)){if(e.length!==t.length)return!1;var d=T(e),g=T(t);return d.length===g.length&&D(e,t,r,n,k,d)}if("[object Object]"===p&&(!b(e)&&b(t)||!w(e)&&w(t)))return!1;if(v(e)){if(!v(t)||Date.prototype.getTime.call(e)!==Date.prototype.getTime.call(t))return!1}else if(E(e)){if(!E(t)||(u=e,f=t,!(i?u.source===f.source&&u.flags===f.flags:RegExp.prototype.toString.call(u)===RegExp.prototype.toString.call(f))))return!1}else if(S(e)||e instanceof Error){if(e.message!==t.message||e.name!==t.name)return!1}else{if(m(e)){if(r||!j(e)&&!C(e)){if(!function(e,t){return e.byteLength===t.byteLength&&0===$(new Uint8Array(e.buffer,e.byteOffset,e.byteLength),new Uint8Array(t.buffer,t.byteOffset,t.byteLength))}(e,t))return!1}else if(!function(e,t){if(e.byteLength!==t.byteLength)return!1;for(var r=0;r<e.byteLength;r++)if(e[r]!==t[r])return!1;return!0}(e,t))return!1;var P=T(e),B=T(t);return P.length===B.length&&D(e,t,r,n,_,P)}if(w(e))return!(!w(t)||e.size!==t.size)&&D(e,t,r,n,F);if(b(e))return!(!b(t)||e.size!==t.size)&&D(e,t,r,n,L);if(y(e)){if(a=t,(s=e).byteLength!==a.byteLength||0!==$(new Uint8Array(s),new Uint8Array(a)))return!1}else if(x(e)&&!function(e,t){return A(e)?A(t)&&c(Number.prototype.valueOf.call(e),Number.prototype.valueOf.call(t)):O(e)?O(t)&&String.prototype.valueOf.call(e)===String.prototype.valueOf.call(t):I(e)?I(t)&&Boolean.prototype.valueOf.call(e)===Boolean.prototype.valueOf.call(t):N(e)?N(t)&&BigInt.prototype.valueOf.call(e)===BigInt.prototype.valueOf.call(t):R(t)&&Symbol.prototype.valueOf.call(e)===Symbol.prototype.valueOf.call(t)}(e,t))return!1}return D(e,t,r,n,_)}function M(e,t){return t.filter((function(t){return d(e,t)}))}function D(e,t,r,i,c,l){if(5===arguments.length){l=Object.keys(e);var f=Object.keys(t);if(l.length!==f.length)return!1}for(var h=0;h<l.length;h++)if(!p(t,l[h]))return!1;if(r&&5===arguments.length){var g=u(e);if(0!==g.length){var y=0;for(h=0;h<g.length;h++){var m=g[h];if(d(e,m)){if(!d(t,m))return!1;l.push(m),y++}else if(d(t,m))return!1}var v=u(t);if(g.length!==v.length&&M(t,v).length!==y)return!1}else{var b=u(t);if(0!==b.length&&0!==M(t,b).length)return!1}}if(0===l.length&&(c===_||c===k&&0===e.length||0===e.size))return!0;if(void 0===i)i={val1:new Map,val2:new Map,position:0};else{var E=i.val1.get(e);if(void 0!==E){var w=i.val2.get(t);if(void 0!==w)return E===w}i.position++}i.val1.set(e,i.position),i.val2.set(t,i.position);var S=function(e,t,r,i,c,u){var l=0;if(u===F){if(!function(e,t,r,n){for(var i=null,a=s(e),c=0;c<a.length;c++){var u=a[c];if("object"===o(u)&&null!==u)null===i&&(i=new Set),i.add(u);else if(!t.has(u)){if(r)return!1;if(!G(e,t,u))return!1;null===i&&(i=new Set),i.add(u)}}if(null!==i){for(var l=s(t),f=0;f<l.length;f++){var p=l[f];if("object"===o(p)&&null!==p){if(!U(i,p,r,n))return!1}else if(!r&&!e.has(p)&&!U(i,p,r,n))return!1}return 0===i.size}return!0}(e,t,r,c))return!1}else if(u===L){if(!function(e,t,r,i){for(var s=null,c=a(e),u=0;u<c.length;u++){var l=n(c[u],2),f=l[0],p=l[1];if("object"===o(f)&&null!==f)null===s&&(s=new Set),s.add(f);else{var d=t.get(f);if(void 0===d&&!t.has(f)||!B(p,d,r,i)){if(r)return!1;if(!J(e,t,f,p,i))return!1;null===s&&(s=new Set),s.add(f)}}}if(null!==s){for(var h=a(t),g=0;g<h.length;g++){var y=n(h[g],2),m=(f=y[0],y[1]);if("object"===o(f)&&null!==f){if(!H(s,e,f,m,r,i))return!1}else if(!(r||e.has(f)&&B(e.get(f),m,!1,i)||H(s,e,f,m,!1,i)))return!1}return 0===s.size}return!0}(e,t,r,c))return!1}else if(u===k)for(;l<e.length;l++){if(!p(e,l)){if(p(t,l))return!1;for(var f=Object.keys(e);l<f.length;l++){var d=f[l];if(!p(t,d)||!B(e[d],t[d],r,c))return!1}return f.length===Object.keys(t).length}if(!p(t,l)||!B(e[l],t[l],r,c))return!1}for(l=0;l<i.length;l++){var h=i[l];if(!B(e[h],t[h],r,c))return!1}return!0}(e,t,r,l,i,c);return i.val1.delete(e),i.val2.delete(t),S}function U(e,t,r,n){for(var o=s(e),i=0;i<o.length;i++){var a=o[i];if(B(t,a,r,n))return e.delete(a),!0}return!1}function V(e){switch(o(e)){case"undefined":return null;case"object":return;case"symbol":return!1;case"string":e=+e;case"number":if(l(e))return!1}return!0}function G(e,t,r){var n=V(r);return null!=n?n:t.has(n)&&!e.has(n)}function J(e,t,r,n,o){var i=V(r);if(null!=i)return i;var s=t.get(i);return!(void 0===s&&!t.has(i)||!B(n,s,!1,o))&&(!e.has(i)&&B(n,s,!1,o))}function H(e,t,r,n,o,i){for(var a=s(e),c=0;c<a.length;c++){var u=a[c];if(B(r,u,o,i)&&B(n,t.get(u),o,i))return e.delete(u),!0}return!1}e.exports={isDeepEqual:function(e,t){return B(e,t,false)},isDeepStrictEqual:function(e,t){return B(e,t,true)}}},3734:(e,t,r)=>{"use strict";var n=r(1308),o=r(8907),i=o(n("String.prototype.indexOf"));e.exports=function(e,t){var r=n(e,!!t);return"function"==typeof r&&i(e,".prototype.")>-1?o(r):r}},8907:(e,t,r)=>{"use strict";var n=r(2786),o=r(1308),i=r(6551),s=r(7266),a=o("%Function.prototype.apply%"),c=o("%Function.prototype.call%"),u=o("%Reflect.apply%",!0)||n.call(c,a),l=o("%Object.defineProperty%",!0),f=o("%Math.max%");if(l)try{l({},"a",{value:1})}catch(e){l=null}e.exports=function(e){if("function"!=typeof e)throw new s("a function is required");var t=u(n,c,arguments);return i(t,1+f(0,e.length-(arguments.length-1)),!0)};var p=function(){return u(n,a,arguments)};l?l(e.exports,"apply",{value:p}):e.exports.apply=p},7154:e=>{var t=1e3,r=60*t,n=60*r,o=24*n,i=7*o,s=365.25*o;function a(e,t,r,n){var o=t>=1.5*r;return Math.round(e/r)+" "+n+(o?"s":"")}e.exports=function(e,c){c=c||{};var u=typeof e;if("string"===u&&e.length>0)return function(e){if((e=String(e)).length>100)return;var a=/^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(e);if(!a)return;var c=parseFloat(a[1]);switch((a[2]||"ms").toLowerCase()){case"years":case"year":case"yrs":case"yr":case"y":return c*s;case"weeks":case"week":case"w":return c*i;case"days":case"day":case"d":return c*o;case"hours":case"hour":case"hrs":case"hr":case"h":return c*n;case"minutes":case"minute":case"mins":case"min":case"m":return c*r;case"seconds":case"second":case"secs":case"sec":case"s":return c*t;case"milliseconds":case"millisecond":case"msecs":case"msec":case"ms":return c;default:return}}(e);if("number"===u&&isFinite(e))return c.long?function(e){var i=Math.abs(e);if(i>=o)return a(e,i,o,"day");if(i>=n)return a(e,i,n,"hour");if(i>=r)return a(e,i,r,"minute");if(i>=t)return a(e,i,t,"second");return e+" ms"}(e):function(e){var i=Math.abs(e);if(i>=o)return Math.round(e/o)+"d";if(i>=n)return Math.round(e/n)+"h";if(i>=r)return Math.round(e/r)+"m";if(i>=t)return Math.round(e/t)+"s";return e+"ms"}(e);throw new Error("val is not a non-empty string or a valid number. val="+JSON.stringify(e))}},5579:(e,t,r)=>{t.formatArgs=function(t){if(t[0]=(this.useColors?"%c":"")+this.namespace+(this.useColors?" %c":" ")+t[0]+(this.useColors?"%c ":" ")+"+"+e.exports.humanize(this.diff),!this.useColors)return;const r="color: "+this.color;t.splice(1,0,r,"color: inherit");let n=0,o=0;t[0].replace(/%[a-zA-Z%]/g,(e=>{"%%"!==e&&(n++,"%c"===e&&(o=n))})),t.splice(o,0,r)},t.save=function(e){try{e?t.storage.setItem("debug",e):t.storage.removeItem("debug")}catch(e){}},t.load=function(){let e;try{e=t.storage.getItem("debug")}catch(e){}!e&&"undefined"!=typeof process&&"env"in process&&(e="false");return e},t.useColors=function(){if("undefined"!=typeof window&&window.process&&("renderer"===window.process.type||window.process.__nwjs))return!0;if("undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/))return!1;return"undefined"!=typeof document&&document.documentElement&&document.documentElement.style&&document.documentElement.style.WebkitAppearance||"undefined"!=typeof window&&window.console&&(window.console.firebug||window.console.exception&&window.console.table)||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)&&parseInt(RegExp.$1,10)>=31||"undefined"!=typeof navigator&&navigator.userAgent&&navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/)},t.storage=function(){try{return localStorage}catch(e){}}(),t.destroy=(()=>{let e=!1;return()=>{e||(e=!0,console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."))}})(),t.colors=["#0000CC","#0000FF","#0033CC","#0033FF","#0066CC","#0066FF","#0099CC","#0099FF","#00CC00","#00CC33","#00CC66","#00CC99","#00CCCC","#00CCFF","#3300CC","#3300FF","#3333CC","#3333FF","#3366CC","#3366FF","#3399CC","#3399FF","#33CC00","#33CC33","#33CC66","#33CC99","#33CCCC","#33CCFF","#6600CC","#6600FF","#6633CC","#6633FF","#66CC00","#66CC33","#9900CC","#9900FF","#9933CC","#9933FF","#99CC00","#99CC33","#CC0000","#CC0033","#CC0066","#CC0099","#CC00CC","#CC00FF","#CC3300","#CC3333","#CC3366","#CC3399","#CC33CC","#CC33FF","#CC6600","#CC6633","#CC9900","#CC9933","#CCCC00","#CCCC33","#FF0000","#FF0033","#FF0066","#FF0099","#FF00CC","#FF00FF","#FF3300","#FF3333","#FF3366","#FF3399","#FF33CC","#FF33FF","#FF6600","#FF6633","#FF9900","#FF9933","#FFCC00","#FFCC33"],t.log=console.debug||console.log||(()=>{}),e.exports=r(3847)(t);const{formatters:n}=e.exports;n.j=function(e){try{return JSON.stringify(e)}catch(e){return"[UnexpectedJSONParseError]: "+e.message}}},3847:(e,t,r)=>{e.exports=function(e){function t(e){let r,o,i,s=null;function a(...e){if(!a.enabled)return;const n=a,o=Number(new Date),i=o-(r||o);n.diff=i,n.prev=r,n.curr=o,r=o,e[0]=t.coerce(e[0]),"string"!=typeof e[0]&&e.unshift("%O");let s=0;e[0]=e[0].replace(/%([a-zA-Z%])/g,((r,o)=>{if("%%"===r)return"%";s++;const i=t.formatters[o];if("function"==typeof i){const t=e[s];r=i.call(n,t),e.splice(s,1),s--}return r})),t.formatArgs.call(n,e);(n.log||t.log).apply(n,e)}return a.namespace=e,a.useColors=t.useColors(),a.color=t.selectColor(e),a.extend=n,a.destroy=t.destroy,Object.defineProperty(a,"enabled",{enumerable:!0,configurable:!1,get:()=>null!==s?s:(o!==t.namespaces&&(o=t.namespaces,i=t.enabled(e)),i),set:e=>{s=e}}),"function"==typeof t.init&&t.init(a),a}function n(e,r){const n=t(this.namespace+(void 0===r?":":r)+e);return n.log=this.log,n}function o(e){return e.toString().substring(2,e.toString().length-2).replace(/\.\*\?$/,"*")}return t.debug=t,t.default=t,t.coerce=function(e){if(e instanceof Error)return e.stack||e.message;return e},t.disable=function(){const e=[...t.names.map(o),...t.skips.map(o).map((e=>"-"+e))].join(",");return t.enable(""),e},t.enable=function(e){let r;t.save(e),t.namespaces=e,t.names=[],t.skips=[];const n=("string"==typeof e?e:"").split(/[\s,]+/),o=n.length;for(r=0;r<o;r++)n[r]&&("-"===(e=n[r].replace(/\*/g,".*?"))[0]?t.skips.push(new RegExp("^"+e.slice(1)+"$")):t.names.push(new RegExp("^"+e+"$")))},t.enabled=function(e){if("*"===e[e.length-1])return!0;let r,n;for(r=0,n=t.skips.length;r<n;r++)if(t.skips[r].test(e))return!1;for(r=0,n=t.names.length;r<n;r++)if(t.names[r].test(e))return!0;return!1},t.humanize=r(7154),t.destroy=function(){console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.")},Object.keys(e).forEach((r=>{t[r]=e[r]})),t.names=[],t.skips=[],t.formatters={},t.selectColor=function(e){let r=0;for(let t=0;t<e.length;t++)r=(r<<5)-r+e.charCodeAt(t),r|=0;return t.colors[Math.abs(r)%t.colors.length]},t.enable(t.load()),t}},9581:(e,t,r)=>{"use strict";var n=r(8027)(),o=r(1308),i=n&&o("%Object.defineProperty%",!0);if(i)try{i({},"a",{value:1})}catch(e){i=!1}var s=r(3910),a=r(7266),c=r(1322);e.exports=function(e,t,r){if(!e||"object"!=typeof e&&"function"!=typeof e)throw new a("`obj` must be an object or a function`");if("string"!=typeof t&&"symbol"!=typeof t)throw new a("`property` must be a string or a symbol`");if(arguments.length>3&&"boolean"!=typeof arguments[3]&&null!==arguments[3])throw new a("`nonEnumerable`, if provided, must be a boolean or null");if(arguments.length>4&&"boolean"!=typeof arguments[4]&&null!==arguments[4])throw new a("`nonWritable`, if provided, must be a boolean or null");if(arguments.length>5&&"boolean"!=typeof arguments[5]&&null!==arguments[5])throw new a("`nonConfigurable`, if provided, must be a boolean or null");if(arguments.length>6&&"boolean"!=typeof arguments[6])throw new a("`loose`, if provided, must be a boolean");var n=arguments.length>3?arguments[3]:null,o=arguments.length>4?arguments[4]:null,u=arguments.length>5?arguments[5]:null,l=arguments.length>6&&arguments[6],f=!!c&&c(e,t);if(i)i(e,t,{configurable:null===u&&f?f.configurable:!u,enumerable:null===n&&f?f.enumerable:!n,value:r,writable:null===o&&f?f.writable:!o});else{if(!l&&(n||o||u))throw new s("This environment does not support defining a property as non-configurable, non-writable, or non-enumerable.");e[t]=r}}},6844:(e,t,r)=>{"use strict";var n=r(7395),o="function"==typeof Symbol&&"symbol"==typeof Symbol("foo"),i=Object.prototype.toString,s=Array.prototype.concat,a=Object.defineProperty,c=r(8027)(),u=a&&c,l=function(e,t,r,n){var o;(!(t in e)||"function"==typeof(o=n)&&"[object Function]"===i.call(o)&&n())&&(u?a(e,t,{configurable:!0,enumerable:!1,value:r,writable:!0}):e[t]=r)},f=function(e,t){var r=arguments.length>2?arguments[2]:{},i=n(t);o&&(i=s.call(i,Object.getOwnPropertySymbols(t)));for(var a=0;a<i.length;a+=1)l(e,i[a],t[i[a]],r[i[a]])};f.supportsDescriptors=!!u,e.exports=f},9436:e=>{"use strict";e.exports=EvalError},7321:e=>{"use strict";e.exports=Error},5831:e=>{"use strict";e.exports=RangeError},4420:e=>{"use strict";e.exports=ReferenceError},3910:e=>{"use strict";e.exports=SyntaxError},7266:e=>{"use strict";e.exports=TypeError},8751:e=>{"use strict";e.exports=URIError},5021:e=>{"use strict";function t(e,t){if(null==e)throw new TypeError("Cannot convert first argument to object");for(var r=Object(e),n=1;n<arguments.length;n++){var o=arguments[n];if(null!=o)for(var i=Object.keys(Object(o)),s=0,a=i.length;s<a;s++){var c=i[s],u=Object.getOwnPropertyDescriptor(o,c);void 0!==u&&u.enumerable&&(r[c]=o[c])}}return r}e.exports={assign:t,polyfill:function(){Object.assign||Object.defineProperty(Object,"assign",{enumerable:!1,configurable:!0,writable:!0,value:t})}}},5012:e=>{e.exports=s,s.default=s,s.stable=l,s.stableStringify=l;var t="[...]",r="[Circular]",n=[],o=[];function i(){return{depthLimit:Number.MAX_SAFE_INTEGER,edgesLimit:Number.MAX_SAFE_INTEGER}}function s(e,t,r,s){var a;void 0===s&&(s=i()),c(e,"",0,[],void 0,0,s);try{a=0===o.length?JSON.stringify(e,t,r):JSON.stringify(e,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function a(e,t,r,i){var s=Object.getOwnPropertyDescriptor(i,r);void 0!==s.get?s.configurable?(Object.defineProperty(i,r,{value:e}),n.push([i,r,t,s])):o.push([t,r,e]):(i[r]=e,n.push([i,r,t]))}function c(e,n,o,i,s,u,l){var f;if(u+=1,"object"==typeof e&&null!==e){for(f=0;f<i.length;f++)if(i[f]===e)return void a(r,e,n,s);if(void 0!==l.depthLimit&&u>l.depthLimit)return void a(t,e,n,s);if(void 0!==l.edgesLimit&&o+1>l.edgesLimit)return void a(t,e,n,s);if(i.push(e),Array.isArray(e))for(f=0;f<e.length;f++)c(e[f],f,f,i,e,u,l);else{var p=Object.keys(e);for(f=0;f<p.length;f++){var d=p[f];c(e[d],d,f,i,e,u,l)}}i.pop()}}function u(e,t){return e<t?-1:e>t?1:0}function l(e,t,r,s){void 0===s&&(s=i());var a,c=f(e,"",0,[],void 0,0,s)||e;try{a=0===o.length?JSON.stringify(c,t,r):JSON.stringify(c,p(t),r)}catch(e){return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]")}finally{for(;0!==n.length;){var u=n.pop();4===u.length?Object.defineProperty(u[0],u[1],u[3]):u[0][u[1]]=u[2]}}return a}function f(e,o,i,s,c,l,p){var d;if(l+=1,"object"==typeof e&&null!==e){for(d=0;d<s.length;d++)if(s[d]===e)return void a(r,e,o,c);try{if("function"==typeof e.toJSON)return}catch(e){return}if(void 0!==p.depthLimit&&l>p.depthLimit)return void a(t,e,o,c);if(void 0!==p.edgesLimit&&i+1>p.edgesLimit)return void a(t,e,o,c);if(s.push(e),Array.isArray(e))for(d=0;d<e.length;d++)f(e[d],d,d,s,e,l,p);else{var h={},g=Object.keys(e).sort(u);for(d=0;d<g.length;d++){var y=g[d];f(e[y],y,d,s,e,l,p),h[y]=e[y]}if(void 0===c)return h;n.push([c,o,e]),c[o]=h}s.pop()}}function p(e){return e=void 0!==e?e:function(e,t){return t},function(t,r){if(o.length>0)for(var n=0;n<o.length;n++){var i=o[n];if(i[1]===t&&i[0]===r){r=i[2],o.splice(n,1);break}}return e.call(this,t,r)}}},9525:(e,t,r)=>{"use strict";const n=r(5730),o=r(7702),i=r(1653);e.exports={XMLParser:o,XMLValidator:n,XMLBuilder:i}},8768:(e,t)=>{"use strict";const r=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",n="["+r+"]["+(r+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040")+"]*",o=new RegExp("^"+n+"$");t.isExist=function(e){return void 0!==e},t.isEmptyObject=function(e){return 0===Object.keys(e).length},t.merge=function(e,t,r){if(t){const n=Object.keys(t),o=n.length;for(let i=0;i<o;i++)e[n[i]]="strict"===r?[t[n[i]]]:t[n[i]]}},t.getValue=function(e){return t.isExist(e)?e:""},t.isName=function(e){const t=o.exec(e);return!(null==t)},t.getAllMatches=function(e,t){const r=[];let n=t.exec(e);for(;n;){const o=[];o.startIndex=t.lastIndex-n[0].length;const i=n.length;for(let e=0;e<i;e++)o.push(n[e]);r.push(o),n=t.exec(e)}return r},t.nameRegexp=n},5730:(e,t,r)=>{"use strict";const n=r(8768),o={allowBooleanAttributes:!1,unpairedTags:[]};function i(e){return" "===e||"\t"===e||"\n"===e||"\r"===e}function s(e,t){const r=t;for(;t<e.length;t++)if("?"!=e[t]&&" "!=e[t]);else{const n=e.substr(r,t-r);if(t>5&&"xml"===n)return h("InvalidXml","XML declaration allowed only at the start of the document.",y(e,t));if("?"==e[t]&&">"==e[t+1]){t++;break}}return t}function a(e,t){if(e.length>t+5&&"-"===e[t+1]&&"-"===e[t+2]){for(t+=3;t<e.length;t++)if("-"===e[t]&&"-"===e[t+1]&&">"===e[t+2]){t+=2;break}}else if(e.length>t+8&&"D"===e[t+1]&&"O"===e[t+2]&&"C"===e[t+3]&&"T"===e[t+4]&&"Y"===e[t+5]&&"P"===e[t+6]&&"E"===e[t+7]){let r=1;for(t+=8;t<e.length;t++)if("<"===e[t])r++;else if(">"===e[t]&&(r--,0===r))break}else if(e.length>t+9&&"["===e[t+1]&&"C"===e[t+2]&&"D"===e[t+3]&&"A"===e[t+4]&&"T"===e[t+5]&&"A"===e[t+6]&&"["===e[t+7])for(t+=8;t<e.length;t++)if("]"===e[t]&&"]"===e[t+1]&&">"===e[t+2]){t+=2;break}return t}t.validate=function(e,t){t=Object.assign({},o,t);const r=[];let c=!1,u=!1;"\ufeff"===e[0]&&(e=e.substr(1));for(let o=0;o<e.length;o++)if("<"===e[o]&&"?"===e[o+1]){if(o+=2,o=s(e,o),o.err)return o}else{if("<"!==e[o]){if(i(e[o]))continue;return h("InvalidChar","char '"+e[o]+"' is not expected.",y(e,o))}{let g=o;if(o++,"!"===e[o]){o=a(e,o);continue}{let m=!1;"/"===e[o]&&(m=!0,o++);let v="";for(;o<e.length&&">"!==e[o]&&" "!==e[o]&&"\t"!==e[o]&&"\n"!==e[o]&&"\r"!==e[o];o++)v+=e[o];if(v=v.trim(),"/"===v[v.length-1]&&(v=v.substring(0,v.length-1),o--),f=v,!n.isName(f)){let t;return t=0===v.trim().length?"Invalid space after '<'.":"Tag '"+v+"' is an invalid name.",h("InvalidTag",t,y(e,o))}const b=l(e,o);if(!1===b)return h("InvalidAttr","Attributes for '"+v+"' have open quote.",y(e,o));let E=b.value;if(o=b.index,"/"===E[E.length-1]){const r=o-E.length;E=E.substring(0,E.length-1);const n=p(E,t);if(!0!==n)return h(n.err.code,n.err.msg,y(e,r+n.err.line));c=!0}else if(m){if(!b.tagClosed)return h("InvalidTag","Closing tag '"+v+"' doesn't have proper closing.",y(e,o));if(E.trim().length>0)return h("InvalidTag","Closing tag '"+v+"' can't have attributes or invalid starting.",y(e,g));{const t=r.pop();if(v!==t.tagName){let r=y(e,t.tagStartPos);return h("InvalidTag","Expected closing tag '"+t.tagName+"' (opened in line "+r.line+", col "+r.col+") instead of closing tag '"+v+"'.",y(e,g))}0==r.length&&(u=!0)}}else{const n=p(E,t);if(!0!==n)return h(n.err.code,n.err.msg,y(e,o-E.length+n.err.line));if(!0===u)return h("InvalidXml","Multiple possible root nodes found.",y(e,o));-1!==t.unpairedTags.indexOf(v)||r.push({tagName:v,tagStartPos:g}),c=!0}for(o++;o<e.length;o++)if("<"===e[o]){if("!"===e[o+1]){o++,o=a(e,o);continue}if("?"!==e[o+1])break;if(o=s(e,++o),o.err)return o}else if("&"===e[o]){const t=d(e,o);if(-1==t)return h("InvalidChar","char '&' is not expected.",y(e,o));o=t}else if(!0===u&&!i(e[o]))return h("InvalidXml","Extra text at the end",y(e,o));"<"===e[o]&&o--}}}var f;return c?1==r.length?h("InvalidTag","Unclosed tag '"+r[0].tagName+"'.",y(e,r[0].tagStartPos)):!(r.length>0)||h("InvalidXml","Invalid '"+JSON.stringify(r.map((e=>e.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):h("InvalidXml","Start tag expected.",1)};const c='"',u="'";function l(e,t){let r="",n="",o=!1;for(;t<e.length;t++){if(e[t]===c||e[t]===u)""===n?n=e[t]:n!==e[t]||(n="");else if(">"===e[t]&&""===n){o=!0;break}r+=e[t]}return""===n&&{value:r,index:t,tagClosed:o}}const f=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function p(e,t){const r=n.getAllMatches(e,f),o={};for(let e=0;e<r.length;e++){if(0===r[e][1].length)return h("InvalidAttr","Attribute '"+r[e][2]+"' has no space in starting.",m(r[e]));if(void 0!==r[e][3]&&void 0===r[e][4])return h("InvalidAttr","Attribute '"+r[e][2]+"' is without value.",m(r[e]));if(void 0===r[e][3]&&!t.allowBooleanAttributes)return h("InvalidAttr","boolean attribute '"+r[e][2]+"' is not allowed.",m(r[e]));const n=r[e][2];if(!g(n))return h("InvalidAttr","Attribute '"+n+"' is an invalid name.",m(r[e]));if(o.hasOwnProperty(n))return h("InvalidAttr","Attribute '"+n+"' is repeated.",m(r[e]));o[n]=1}return!0}function d(e,t){if(";"===e[++t])return-1;if("#"===e[t])return function(e,t){let r=/\d/;for("x"===e[t]&&(t++,r=/[\da-fA-F]/);t<e.length;t++){if(";"===e[t])return t;if(!e[t].match(r))break}return-1}(e,++t);let r=0;for(;t<e.length;t++,r++)if(!(e[t].match(/\w/)&&r<20)){if(";"===e[t])break;return-1}return t}function h(e,t,r){return{err:{code:e,msg:t,line:r.line||r,col:r.col}}}function g(e){return n.isName(e)}function y(e,t){const r=e.substring(0,t).split(/\r?\n/);return{line:r.length,col:r[r.length-1].length+1}}function m(e){return e.startIndex+e[1].length}},1653:(e,t,r)=>{"use strict";const n=r(6292),o={attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,cdataPropName:!1,format:!1,indentBy:" ",suppressEmptyNode:!1,suppressUnpairedNode:!0,suppressBooleanAttributes:!0,tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},preserveOrder:!1,commentPropName:!1,unpairedTags:[],entities:[{regex:new RegExp("&","g"),val:"&amp;"},{regex:new RegExp(">","g"),val:"&gt;"},{regex:new RegExp("<","g"),val:"&lt;"},{regex:new RegExp("'","g"),val:"&apos;"},{regex:new RegExp('"',"g"),val:"&quot;"}],processEntities:!0,stopNodes:[],oneListGroup:!1};function i(e){this.options=Object.assign({},o,e),this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=c),this.processTextOrObjNode=s,this.options.format?(this.indentate=a,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function s(e,t,r){const n=this.j2x(e,r+1);return void 0!==e[this.options.textNodeName]&&1===Object.keys(e).length?this.buildTextValNode(e[this.options.textNodeName],t,n.attrStr,r):this.buildObjectNode(n.val,t,n.attrStr,r)}function a(e){return this.options.indentBy.repeat(e)}function c(e){return!(!e.startsWith(this.options.attributeNamePrefix)||e===this.options.textNodeName)&&e.substr(this.attrPrefixLen)}i.prototype.build=function(e){return this.options.preserveOrder?n(e,this.options):(Array.isArray(e)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(e={[this.options.arrayNodeName]:e}),this.j2x(e,0).val)},i.prototype.j2x=function(e,t){let r="",n="";for(let o in e)if(Object.prototype.hasOwnProperty.call(e,o))if(void 0===e[o])this.isAttribute(o)&&(n+="");else if(null===e[o])this.isAttribute(o)?n+="":"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar;else if(e[o]instanceof Date)n+=this.buildTextValNode(e[o],o,"",t);else if("object"!=typeof e[o]){const i=this.isAttribute(o);if(i)r+=this.buildAttrPairStr(i,""+e[o]);else if(o===this.options.textNodeName){let t=this.options.tagValueProcessor(o,""+e[o]);n+=this.replaceEntitiesValue(t)}else n+=this.buildTextValNode(e[o],o,"",t)}else if(Array.isArray(e[o])){const r=e[o].length;let i="";for(let s=0;s<r;s++){const r=e[o][s];void 0===r||(null===r?"?"===o[0]?n+=this.indentate(t)+"<"+o+"?"+this.tagEndChar:n+=this.indentate(t)+"<"+o+"/"+this.tagEndChar:"object"==typeof r?this.options.oneListGroup?i+=this.j2x(r,t+1).val:i+=this.processTextOrObjNode(r,o,t):i+=this.buildTextValNode(r,o,"",t))}this.options.oneListGroup&&(i=this.buildObjectNode(i,o,"",t)),n+=i}else if(this.options.attributesGroupName&&o===this.options.attributesGroupName){const t=Object.keys(e[o]),n=t.length;for(let i=0;i<n;i++)r+=this.buildAttrPairStr(t[i],""+e[o][t[i]])}else n+=this.processTextOrObjNode(e[o],o,t);return{attrStr:r,val:n}},i.prototype.buildAttrPairStr=function(e,t){return t=this.options.attributeValueProcessor(e,""+t),t=this.replaceEntitiesValue(t),this.options.suppressBooleanAttributes&&"true"===t?" "+e:" "+e+'="'+t+'"'},i.prototype.buildObjectNode=function(e,t,r,n){if(""===e)return"?"===t[0]?this.indentate(n)+"<"+t+r+"?"+this.tagEndChar:this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar;{let o="</"+t+this.tagEndChar,i="";return"?"===t[0]&&(i="?",o=""),!r&&""!==r||-1!==e.indexOf("<")?!1!==this.options.commentPropName&&t===this.options.commentPropName&&0===i.length?this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine:this.indentate(n)+"<"+t+r+i+this.tagEndChar+e+this.indentate(n)+o:this.indentate(n)+"<"+t+r+i+">"+e+o}},i.prototype.closeTag=function(e){let t="";return-1!==this.options.unpairedTags.indexOf(e)?this.options.suppressUnpairedNode||(t="/"):t=this.options.suppressEmptyNode?"/":`></${e}`,t},i.prototype.buildTextValNode=function(e,t,r,n){if(!1!==this.options.cdataPropName&&t===this.options.cdataPropName)return this.indentate(n)+`<![CDATA[${e}]]>`+this.newLine;if(!1!==this.options.commentPropName&&t===this.options.commentPropName)return this.indentate(n)+`\x3c!--${e}--\x3e`+this.newLine;if("?"===t[0])return this.indentate(n)+"<"+t+r+"?"+this.tagEndChar;{let o=this.options.tagValueProcessor(t,e);return o=this.replaceEntitiesValue(o),""===o?this.indentate(n)+"<"+t+r+this.closeTag(t)+this.tagEndChar:this.indentate(n)+"<"+t+r+">"+o+"</"+t+this.tagEndChar}},i.prototype.replaceEntitiesValue=function(e){if(e&&e.length>0&&this.options.processEntities)for(let t=0;t<this.options.entities.length;t++){const r=this.options.entities[t];e=e.replace(r.regex,r.val)}return e},e.exports=i},6292:e=>{function t(e,s,a,c){let u="",l=!1;for(let f=0;f<e.length;f++){const p=e[f],d=r(p);if(void 0===d)continue;let h="";if(h=0===a.length?d:`${a}.${d}`,d===s.textNodeName){let e=p[d];o(h,s)||(e=s.tagValueProcessor(d,e),e=i(e,s)),l&&(u+=c),u+=e,l=!1;continue}if(d===s.cdataPropName){l&&(u+=c),u+=`<![CDATA[${p[d][0][s.textNodeName]}]]>`,l=!1;continue}if(d===s.commentPropName){u+=c+`\x3c!--${p[d][0][s.textNodeName]}--\x3e`,l=!0;continue}if("?"===d[0]){const e=n(p[":@"],s),t="?xml"===d?"":c;let r=p[d][0][s.textNodeName];r=0!==r.length?" "+r:"",u+=t+`<${d}${r}${e}?>`,l=!0;continue}let g=c;""!==g&&(g+=s.indentBy);const y=c+`<${d}${n(p[":@"],s)}`,m=t(p[d],s,h,g);-1!==s.unpairedTags.indexOf(d)?s.suppressUnpairedNode?u+=y+">":u+=y+"/>":m&&0!==m.length||!s.suppressEmptyNode?m&&m.endsWith(">")?u+=y+`>${m}${c}</${d}>`:(u+=y+">",m&&""!==c&&(m.includes("/>")||m.includes("</"))?u+=c+s.indentBy+m+c:u+=m,u+=`</${d}>`):u+=y+"/>",l=!0}return u}function r(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];if(e.hasOwnProperty(n)&&":@"!==n)return n}}function n(e,t){let r="";if(e&&!t.ignoreAttributes)for(let n in e){if(!e.hasOwnProperty(n))continue;let o=t.attributeValueProcessor(n,e[n]);o=i(o,t),!0===o&&t.suppressBooleanAttributes?r+=` ${n.substr(t.attributeNamePrefix.length)}`:r+=` ${n.substr(t.attributeNamePrefix.length)}="${o}"`}return r}function o(e,t){let r=(e=e.substr(0,e.length-t.textNodeName.length-1)).substr(e.lastIndexOf(".")+1);for(let n in t.stopNodes)if(t.stopNodes[n]===e||t.stopNodes[n]==="*."+r)return!0;return!1}function i(e,t){if(e&&e.length>0&&t.processEntities)for(let r=0;r<t.entities.length;r++){const n=t.entities[r];e=e.replace(n.regex,n.val)}return e}e.exports=function(e,r){let n="";return r.format&&r.indentBy.length>0&&(n="\n"),t(e,r,"",n)}},6534:(e,t,r)=>{const n=r(8768);function o(e,t){let r="";for(;t<e.length&&"'"!==e[t]&&'"'!==e[t];t++)r+=e[t];if(r=r.trim(),-1!==r.indexOf(" "))throw new Error("External entites are not supported");const n=e[t++];let o="";for(;t<e.length&&e[t]!==n;t++)o+=e[t];return[r,o,t]}function i(e,t){return"!"===e[t+1]&&"-"===e[t+2]&&"-"===e[t+3]}function s(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"N"===e[t+3]&&"T"===e[t+4]&&"I"===e[t+5]&&"T"===e[t+6]&&"Y"===e[t+7]}function a(e,t){return"!"===e[t+1]&&"E"===e[t+2]&&"L"===e[t+3]&&"E"===e[t+4]&&"M"===e[t+5]&&"E"===e[t+6]&&"N"===e[t+7]&&"T"===e[t+8]}function c(e,t){return"!"===e[t+1]&&"A"===e[t+2]&&"T"===e[t+3]&&"T"===e[t+4]&&"L"===e[t+5]&&"I"===e[t+6]&&"S"===e[t+7]&&"T"===e[t+8]}function u(e,t){return"!"===e[t+1]&&"N"===e[t+2]&&"O"===e[t+3]&&"T"===e[t+4]&&"A"===e[t+5]&&"T"===e[t+6]&&"I"===e[t+7]&&"O"===e[t+8]&&"N"===e[t+9]}function l(e){if(n.isName(e))return e;throw new Error(`Invalid entity name ${e}`)}e.exports=function(e,t){const r={};if("O"!==e[t+3]||"C"!==e[t+4]||"T"!==e[t+5]||"Y"!==e[t+6]||"P"!==e[t+7]||"E"!==e[t+8])throw new Error("Invalid Tag instead of DOCTYPE");{t+=9;let n=1,f=!1,p=!1,d="";for(;t<e.length;t++)if("<"!==e[t]||p)if(">"===e[t]){if(p?"-"===e[t-1]&&"-"===e[t-2]&&(p=!1,n--):n--,0===n)break}else"["===e[t]?f=!0:d+=e[t];else{if(f&&s(e,t))t+=7,[entityName,val,t]=o(e,t+1),-1===val.indexOf("&")&&(r[l(entityName)]={regx:RegExp(`&${entityName};`,"g"),val});else if(f&&a(e,t))t+=8;else if(f&&c(e,t))t+=8;else if(f&&u(e,t))t+=9;else{if(!i)throw new Error("Invalid DOCTYPE");p=!0}n++,d=""}if(0!==n)throw new Error("Unclosed DOCTYPE")}return{entities:r,i:t}}},2911:(e,t)=>{const r={preserveOrder:!1,attributeNamePrefix:"@_",attributesGroupName:!1,textNodeName:"#text",ignoreAttributes:!0,removeNSPrefix:!1,allowBooleanAttributes:!1,parseTagValue:!0,parseAttributeValue:!1,trimValues:!0,cdataPropName:!1,numberParseOptions:{hex:!0,leadingZeros:!0,eNotation:!0},tagValueProcessor:function(e,t){return t},attributeValueProcessor:function(e,t){return t},stopNodes:[],alwaysCreateTextNode:!1,isArray:()=>!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(e,t,r){return e}};t.buildOptions=function(e){return Object.assign({},r,e)},t.defaultOptions=r},9575:(e,t,r)=>{"use strict";const n=r(8768),o=r(3601),i=r(6534),s=r(7396);function a(e){const t=Object.keys(e);for(let r=0;r<t.length;r++){const n=t[r];this.lastEntities[n]={regex:new RegExp("&"+n+";","g"),val:e[n]}}}function c(e,t,r,n,o,i,s){if(void 0!==e&&(this.options.trimValues&&!n&&(e=e.trim()),e.length>0)){s||(e=this.replaceEntitiesValue(e));const n=this.options.tagValueProcessor(t,e,r,o,i);if(null==n)return e;if(typeof n!=typeof e||n!==e)return n;if(this.options.trimValues)return E(e,this.options.parseTagValue,this.options.numberParseOptions);return e.trim()===e?E(e,this.options.parseTagValue,this.options.numberParseOptions):e}}function u(e){if(this.options.removeNSPrefix){const t=e.split(":"),r="/"===e.charAt(0)?"/":"";if("xmlns"===t[0])return"";2===t.length&&(e=r+t[1])}return e}const l=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function f(e,t,r){if(!this.options.ignoreAttributes&&"string"==typeof e){const r=n.getAllMatches(e,l),o=r.length,i={};for(let e=0;e<o;e++){const n=this.resolveNameSpace(r[e][1]);let o=r[e][4],s=this.options.attributeNamePrefix+n;if(n.length)if(this.options.transformAttributeName&&(s=this.options.transformAttributeName(s)),"__proto__"===s&&(s="#__proto__"),void 0!==o){this.options.trimValues&&(o=o.trim()),o=this.replaceEntitiesValue(o);const e=this.options.attributeValueProcessor(n,o,t);i[s]=null==e?o:typeof e!=typeof o||e!==o?e:E(o,this.options.parseAttributeValue,this.options.numberParseOptions)}else this.options.allowBooleanAttributes&&(i[s]=!0)}if(!Object.keys(i).length)return;if(this.options.attributesGroupName){const e={};return e[this.options.attributesGroupName]=i,e}return i}}const p=function(e){e=e.replace(/\r\n?/g,"\n");const t=new o("!xml");let r=t,n="",s="";for(let a=0;a<e.length;a++){if("<"===e[a])if("/"===e[a+1]){const t=m(e,">",a,"Closing Tag is not closed.");let o=e.substring(a+2,t).trim();if(this.options.removeNSPrefix){const e=o.indexOf(":");-1!==e&&(o=o.substr(e+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),r&&(n=this.saveTextToParentTag(n,r,s));const i=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: </${o}>`);let c=0;i&&-1!==this.options.unpairedTags.indexOf(i)?(c=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):c=s.lastIndexOf("."),s=s.substring(0,c),r=this.tagsNodeStack.pop(),n="",a=t}else if("?"===e[a+1]){let t=v(e,a,!1,"?>");if(!t)throw new Error("Pi Tag is not closed.");if(n=this.saveTextToParentTag(n,r,s),this.options.ignoreDeclaration&&"?xml"===t.tagName||this.options.ignorePiTags);else{const e=new o(t.tagName);e.add(this.options.textNodeName,""),t.tagName!==t.tagExp&&t.attrExpPresent&&(e[":@"]=this.buildAttributesMap(t.tagExp,s,t.tagName)),this.addChild(r,e,s)}a=t.closeIndex+1}else if("!--"===e.substr(a+1,3)){const t=m(e,"--\x3e",a+4,"Comment is not closed.");if(this.options.commentPropName){const o=e.substring(a+4,t-2);n=this.saveTextToParentTag(n,r,s),r.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}a=t}else if("!D"===e.substr(a+1,2)){const t=i(e,a);this.docTypeEntities=t.entities,a=t.i}else if("!["===e.substr(a+1,2)){const t=m(e,"]]>",a,"CDATA is not closed.")-2,o=e.substring(a+9,t);n=this.saveTextToParentTag(n,r,s);let i=this.parseTextData(o,r.tagname,s,!0,!1,!0,!0);null==i&&(i=""),this.options.cdataPropName?r.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):r.add(this.options.textNodeName,i),a=t+2}else{let i=v(e,a,this.options.removeNSPrefix),c=i.tagName;const u=i.rawTagName;let l=i.tagExp,f=i.attrExpPresent,p=i.closeIndex;this.options.transformTagName&&(c=this.options.transformTagName(c)),r&&n&&"!xml"!==r.tagname&&(n=this.saveTextToParentTag(n,r,s,!1));const d=r;if(d&&-1!==this.options.unpairedTags.indexOf(d.tagname)&&(r=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),c!==t.tagname&&(s+=s?"."+c:c),this.isItStopNode(this.options.stopNodes,s,c)){let t="";if(l.length>0&&l.lastIndexOf("/")===l.length-1)a=i.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(c))a=i.closeIndex;else{const r=this.readStopNodeData(e,u,p+1);if(!r)throw new Error(`Unexpected end of ${u}`);a=r.i,t=r.tagContent}const n=new o(c);c!==l&&f&&(n[":@"]=this.buildAttributesMap(l,s,c)),t&&(t=this.parseTextData(t,c,s,!0,f,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),n.add(this.options.textNodeName,t),this.addChild(r,n,s)}else{if(l.length>0&&l.lastIndexOf("/")===l.length-1){"/"===c[c.length-1]?(c=c.substr(0,c.length-1),s=s.substr(0,s.length-1),l=c):l=l.substr(0,l.length-1),this.options.transformTagName&&(c=this.options.transformTagName(c));const e=new o(c);c!==l&&f&&(e[":@"]=this.buildAttributesMap(l,s,c)),this.addChild(r,e,s),s=s.substr(0,s.lastIndexOf("."))}else{const e=new o(c);this.tagsNodeStack.push(r),c!==l&&f&&(e[":@"]=this.buildAttributesMap(l,s,c)),this.addChild(r,e,s),r=e}n="",a=p}}else n+=e[a]}return t.child};function d(e,t,r){const n=this.options.updateTag(t.tagname,r,t[":@"]);!1===n||("string"==typeof n?(t.tagname=n,e.addChild(t)):e.addChild(t))}const h=function(e){if(this.options.processEntities){for(let t in this.docTypeEntities){const r=this.docTypeEntities[t];e=e.replace(r.regx,r.val)}for(let t in this.lastEntities){const r=this.lastEntities[t];e=e.replace(r.regex,r.val)}if(this.options.htmlEntities)for(let t in this.htmlEntities){const r=this.htmlEntities[t];e=e.replace(r.regex,r.val)}e=e.replace(this.ampEntity.regex,this.ampEntity.val)}return e};function g(e,t,r,n){return e&&(void 0===n&&(n=0===Object.keys(t.child).length),void 0!==(e=this.parseTextData(e,t.tagname,r,!1,!!t[":@"]&&0!==Object.keys(t[":@"]).length,n))&&""!==e&&t.add(this.options.textNodeName,e),e=""),e}function y(e,t,r){const n="*."+r;for(const r in e){const o=e[r];if(n===o||t===o)return!0}return!1}function m(e,t,r,n){const o=e.indexOf(t,r);if(-1===o)throw new Error(n);return o+t.length-1}function v(e,t,r,n=">"){const o=function(e,t,r=">"){let n,o="";for(let i=t;i<e.length;i++){let t=e[i];if(n)t===n&&(n="");else if('"'===t||"'"===t)n=t;else if(t===r[0]){if(!r[1])return{data:o,index:i};if(e[i+1]===r[1])return{data:o,index:i}}else"\t"===t&&(t=" ");o+=t}}(e,t+1,n);if(!o)return;let i=o.data;const s=o.index,a=i.search(/\s/);let c=i,u=!0;-1!==a&&(c=i.substring(0,a),i=i.substring(a+1).trimStart());const l=c;if(r){const e=c.indexOf(":");-1!==e&&(c=c.substr(e+1),u=c!==o.data.substr(e+1))}return{tagName:c,tagExp:i,closeIndex:s,attrExpPresent:u,rawTagName:l}}function b(e,t,r){const n=r;let o=1;for(;r<e.length;r++)if("<"===e[r])if("/"===e[r+1]){const i=m(e,">",r,`${t} is not closed`);if(e.substring(r+2,i).trim()===t&&(o--,0===o))return{tagContent:e.substring(n,r),i};r=i}else if("?"===e[r+1]){r=m(e,"?>",r+1,"StopNode is not closed.")}else if("!--"===e.substr(r+1,3)){r=m(e,"--\x3e",r+3,"StopNode is not closed.")}else if("!["===e.substr(r+1,2)){r=m(e,"]]>",r,"StopNode is not closed.")-2}else{const n=v(e,r,">");if(n){(n&&n.tagName)===t&&"/"!==n.tagExp[n.tagExp.length-1]&&o++,r=n.closeIndex}}}function E(e,t,r){if(t&&"string"==typeof e){const t=e.trim();return"true"===t||"false"!==t&&s(e,r)}return n.isExist(e)?e:""}e.exports=class{constructor(e){this.options=e,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"}},this.addExternalEntities=a,this.parseXml=p,this.parseTextData=c,this.resolveNameSpace=u,this.buildAttributesMap=f,this.isItStopNode=y,this.replaceEntitiesValue=h,this.readStopNodeData=b,this.saveTextToParentTag=g,this.addChild=d}}},7702:(e,t,r)=>{const{buildOptions:n}=r(2911),o=r(9575),{prettify:i}=r(4625),s=r(5730);e.exports=class{constructor(e){this.externalEntities={},this.options=n(e)}parse(e,t){if("string"==typeof e);else{if(!e.toString)throw new Error("XML data is accepted in String or Bytes[] form.");e=e.toString()}if(t){!0===t&&(t={});const r=s.validate(e,t);if(!0!==r)throw Error(`${r.err.msg}:${r.err.line}:${r.err.col}`)}const r=new o(this.options);r.addExternalEntities(this.externalEntities);const n=r.parseXml(e);return this.options.preserveOrder||void 0===n?n:i(n,this.options)}addEntity(e,t){if(-1!==t.indexOf("&"))throw new Error("Entity value can't have '&'");if(-1!==e.indexOf("&")||-1!==e.indexOf(";"))throw new Error("An entity must be set without '&' and ';'. Eg. use '#xD' for '&#xD;'");if("&"===t)throw new Error("An entity with value '&' is not permitted");this.externalEntities[e]=t}}},4625:(e,t)=>{"use strict";function r(e,t,s){let a;const c={};for(let u=0;u<e.length;u++){const l=e[u],f=n(l);let p="";if(p=void 0===s?f:s+"."+f,f===t.textNodeName)void 0===a?a=l[f]:a+=""+l[f];else{if(void 0===f)continue;if(l[f]){let e=r(l[f],t,p);const n=i(e,t);l[":@"]?o(e,l[":@"],p,t):1!==Object.keys(e).length||void 0===e[t.textNodeName]||t.alwaysCreateTextNode?0===Object.keys(e).length&&(t.alwaysCreateTextNode?e[t.textNodeName]="":e=""):e=e[t.textNodeName],void 0!==c[f]&&c.hasOwnProperty(f)?(Array.isArray(c[f])||(c[f]=[c[f]]),c[f].push(e)):t.isArray(f,p,n)?c[f]=[e]:c[f]=e}}}return"string"==typeof a?a.length>0&&(c[t.textNodeName]=a):void 0!==a&&(c[t.textNodeName]=a),c}function n(e){const t=Object.keys(e);for(let e=0;e<t.length;e++){const r=t[e];if(":@"!==r)return r}}function o(e,t,r,n){if(t){const o=Object.keys(t),i=o.length;for(let s=0;s<i;s++){const i=o[s];n.isArray(i,r+"."+i,!0,!0)?e[i]=[t[i]]:e[i]=t[i]}}}function i(e,t){const{textNodeName:r}=t,n=Object.keys(e).length;return 0===n||!(1!==n||!e[r]&&"boolean"!=typeof e[r]&&0!==e[r])}t.prettify=function(e,t){return r(e,t)}},3601:e=>{"use strict";e.exports=class{constructor(e){this.tagname=e,this.child=[],this[":@"]={}}add(e,t){"__proto__"===e&&(e="#__proto__"),this.child.push({[e]:t})}addChild(e){"__proto__"===e.tagname&&(e.tagname="#__proto__"),e[":@"]&&Object.keys(e[":@"]).length>0?this.child.push({[e.tagname]:e.child,":@":e[":@"]}):this.child.push({[e.tagname]:e.child})}}},4067:(e,t,r)=>{"use strict";var n=r(5938),o=Object.prototype.toString,i=Object.prototype.hasOwnProperty;e.exports=function(e,t,r){if(!n(t))throw new TypeError("iterator must be a function");var s;arguments.length>=3&&(s=r),"[object Array]"===o.call(e)?function(e,t,r){for(var n=0,o=e.length;n<o;n++)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s):"string"==typeof e?function(e,t,r){for(var n=0,o=e.length;n<o;n++)null==r?t(e.charAt(n),n,e):t.call(r,e.charAt(n),n,e)}(e,t,s):function(e,t,r){for(var n in e)i.call(e,n)&&(null==r?t(e[n],n,e):t.call(r,e[n],n,e))}(e,t,s)}},6494:e=>{"use strict";var t=Object.prototype.toString,r=Math.max,n=function(e,t){for(var r=[],n=0;n<e.length;n+=1)r[n]=e[n];for(var o=0;o<t.length;o+=1)r[o+e.length]=t[o];return r};e.exports=function(e){var o=this;if("function"!=typeof o||"[object Function]"!==t.apply(o))throw new TypeError("Function.prototype.bind called on incompatible "+o);for(var i,s=function(e,t){for(var r=[],n=t||0,o=0;n<e.length;n+=1,o+=1)r[o]=e[n];return r}(arguments,1),a=r(0,o.length-s.length),c=[],u=0;u<a;u++)c[u]="$"+u;if(i=Function("binder","return function ("+function(e,t){for(var r="",n=0;n<e.length;n+=1)r+=e[n],n+1<e.length&&(r+=t);return r}(c,",")+"){ return binder.apply(this,arguments); }")((function(){if(this instanceof i){var t=o.apply(this,n(s,arguments));return Object(t)===t?t:this}return o.apply(e,n(s,arguments))})),o.prototype){var l=function(){};l.prototype=o.prototype,i.prototype=new l,l.prototype=null}return i}},2786:(e,t,r)=>{"use strict";var n=r(6494);e.exports=Function.prototype.bind||n},1308:(e,t,r)=>{"use strict";var n,o=r(7321),i=r(9436),s=r(5831),a=r(4420),c=r(3910),u=r(7266),l=r(8751),f=Function,p=function(e){try{return f('"use strict"; return ('+e+").constructor;")()}catch(e){}},d=Object.getOwnPropertyDescriptor;if(d)try{d({},"")}catch(e){d=null}var h=function(){throw new u},g=d?function(){try{return h}catch(e){try{return d(arguments,"callee").get}catch(e){return h}}}():h,y=r(8813)(),m=r(5083)(),v=Object.getPrototypeOf||(m?function(e){return e.__proto__}:null),b={},E="undefined"!=typeof Uint8Array&&v?v(Uint8Array):n,w={__proto__:null,"%AggregateError%":"undefined"==typeof AggregateError?n:AggregateError,"%Array%":Array,"%ArrayBuffer%":"undefined"==typeof ArrayBuffer?n:ArrayBuffer,"%ArrayIteratorPrototype%":y&&v?v([][Symbol.iterator]()):n,"%AsyncFromSyncIteratorPrototype%":n,"%AsyncFunction%":b,"%AsyncGenerator%":b,"%AsyncGeneratorFunction%":b,"%AsyncIteratorPrototype%":b,"%Atomics%":"undefined"==typeof Atomics?n:Atomics,"%BigInt%":"undefined"==typeof BigInt?n:BigInt,"%BigInt64Array%":"undefined"==typeof BigInt64Array?n:BigInt64Array,"%BigUint64Array%":"undefined"==typeof BigUint64Array?n:BigUint64Array,"%Boolean%":Boolean,"%DataView%":"undefined"==typeof DataView?n:DataView,"%Date%":Date,"%decodeURI%":decodeURI,"%decodeURIComponent%":decodeURIComponent,"%encodeURI%":encodeURI,"%encodeURIComponent%":encodeURIComponent,"%Error%":o,"%eval%":eval,"%EvalError%":i,"%Float32Array%":"undefined"==typeof Float32Array?n:Float32Array,"%Float64Array%":"undefined"==typeof Float64Array?n:Float64Array,"%FinalizationRegistry%":"undefined"==typeof FinalizationRegistry?n:FinalizationRegistry,"%Function%":f,"%GeneratorFunction%":b,"%Int8Array%":"undefined"==typeof Int8Array?n:Int8Array,"%Int16Array%":"undefined"==typeof Int16Array?n:Int16Array,"%Int32Array%":"undefined"==typeof Int32Array?n:Int32Array,"%isFinite%":isFinite,"%isNaN%":isNaN,"%IteratorPrototype%":y&&v?v(v([][Symbol.iterator]())):n,"%JSON%":"object"==typeof JSON?JSON:n,"%Map%":"undefined"==typeof Map?n:Map,"%MapIteratorPrototype%":"undefined"!=typeof Map&&y&&v?v((new Map)[Symbol.iterator]()):n,"%Math%":Math,"%Number%":Number,"%Object%":Object,"%parseFloat%":parseFloat,"%parseInt%":parseInt,"%Promise%":"undefined"==typeof Promise?n:Promise,"%Proxy%":"undefined"==typeof Proxy?n:Proxy,"%RangeError%":s,"%ReferenceError%":a,"%Reflect%":"undefined"==typeof Reflect?n:Reflect,"%RegExp%":RegExp,"%Set%":"undefined"==typeof Set?n:Set,"%SetIteratorPrototype%":"undefined"!=typeof Set&&y&&v?v((new Set)[Symbol.iterator]()):n,"%SharedArrayBuffer%":"undefined"==typeof SharedArrayBuffer?n:SharedArrayBuffer,"%String%":String,"%StringIteratorPrototype%":y&&v?v(""[Symbol.iterator]()):n,"%Symbol%":y?Symbol:n,"%SyntaxError%":c,"%ThrowTypeError%":g,"%TypedArray%":E,"%TypeError%":u,"%Uint8Array%":"undefined"==typeof Uint8Array?n:Uint8Array,"%Uint8ClampedArray%":"undefined"==typeof Uint8ClampedArray?n:Uint8ClampedArray,"%Uint16Array%":"undefined"==typeof Uint16Array?n:Uint16Array,"%Uint32Array%":"undefined"==typeof Uint32Array?n:Uint32Array,"%URIError%":l,"%WeakMap%":"undefined"==typeof WeakMap?n:WeakMap,"%WeakRef%":"undefined"==typeof WeakRef?n:WeakRef,"%WeakSet%":"undefined"==typeof WeakSet?n:WeakSet};if(v)try{null.error}catch(e){var S=v(v(e));w["%Error.prototype%"]=S}var x=function e(t){var r;if("%AsyncFunction%"===t)r=p("async function () {}");else if("%GeneratorFunction%"===t)r=p("function* () {}");else if("%AsyncGeneratorFunction%"===t)r=p("async function* () {}");else if("%AsyncGenerator%"===t){var n=e("%AsyncGeneratorFunction%");n&&(r=n.prototype)}else if("%AsyncIteratorPrototype%"===t){var o=e("%AsyncGenerator%");o&&v&&(r=v(o.prototype))}return w[t]=r,r},A={__proto__:null,"%ArrayBufferPrototype%":["ArrayBuffer","prototype"],"%ArrayPrototype%":["Array","prototype"],"%ArrayProto_entries%":["Array","prototype","entries"],"%ArrayProto_forEach%":["Array","prototype","forEach"],"%ArrayProto_keys%":["Array","prototype","keys"],"%ArrayProto_values%":["Array","prototype","values"],"%AsyncFunctionPrototype%":["AsyncFunction","prototype"],"%AsyncGenerator%":["AsyncGeneratorFunction","prototype"],"%AsyncGeneratorPrototype%":["AsyncGeneratorFunction","prototype","prototype"],"%BooleanPrototype%":["Boolean","prototype"],"%DataViewPrototype%":["DataView","prototype"],"%DatePrototype%":["Date","prototype"],"%ErrorPrototype%":["Error","prototype"],"%EvalErrorPrototype%":["EvalError","prototype"],"%Float32ArrayPrototype%":["Float32Array","prototype"],"%Float64ArrayPrototype%":["Float64Array","prototype"],"%FunctionPrototype%":["Function","prototype"],"%Generator%":["GeneratorFunction","prototype"],"%GeneratorPrototype%":["GeneratorFunction","prototype","prototype"],"%Int8ArrayPrototype%":["Int8Array","prototype"],"%Int16ArrayPrototype%":["Int16Array","prototype"],"%Int32ArrayPrototype%":["Int32Array","prototype"],"%JSONParse%":["JSON","parse"],"%JSONStringify%":["JSON","stringify"],"%MapPrototype%":["Map","prototype"],"%NumberPrototype%":["Number","prototype"],"%ObjectPrototype%":["Object","prototype"],"%ObjProto_toString%":["Object","prototype","toString"],"%ObjProto_valueOf%":["Object","prototype","valueOf"],"%PromisePrototype%":["Promise","prototype"],"%PromiseProto_then%":["Promise","prototype","then"],"%Promise_all%":["Promise","all"],"%Promise_reject%":["Promise","reject"],"%Promise_resolve%":["Promise","resolve"],"%RangeErrorPrototype%":["RangeError","prototype"],"%ReferenceErrorPrototype%":["ReferenceError","prototype"],"%RegExpPrototype%":["RegExp","prototype"],"%SetPrototype%":["Set","prototype"],"%SharedArrayBufferPrototype%":["SharedArrayBuffer","prototype"],"%StringPrototype%":["String","prototype"],"%SymbolPrototype%":["Symbol","prototype"],"%SyntaxErrorPrototype%":["SyntaxError","prototype"],"%TypedArrayPrototype%":["TypedArray","prototype"],"%TypeErrorPrototype%":["TypeError","prototype"],"%Uint8ArrayPrototype%":["Uint8Array","prototype"],"%Uint8ClampedArrayPrototype%":["Uint8ClampedArray","prototype"],"%Uint16ArrayPrototype%":["Uint16Array","prototype"],"%Uint32ArrayPrototype%":["Uint32Array","prototype"],"%URIErrorPrototype%":["URIError","prototype"],"%WeakMapPrototype%":["WeakMap","prototype"],"%WeakSetPrototype%":["WeakSet","prototype"]},O=r(2786),I=r(7360),N=O.call(Function.call,Array.prototype.concat),R=O.call(Function.apply,Array.prototype.splice),j=O.call(Function.call,String.prototype.replace),C=O.call(Function.call,String.prototype.slice),P=O.call(Function.call,RegExp.prototype.exec),T=/[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g,$=/\\(\\)?/g,_=function(e,t){var r,n=e;if(I(A,n)&&(n="%"+(r=A[n])[0]+"%"),I(w,n)){var o=w[n];if(o===b&&(o=x(n)),void 0===o&&!t)throw new u("intrinsic "+e+" exists, but is not available. Please file an issue!");return{alias:r,name:n,value:o}}throw new c("intrinsic "+e+" does not exist!")};e.exports=function(e,t){if("string"!=typeof e||0===e.length)throw new u("intrinsic name must be a non-empty string");if(arguments.length>1&&"boolean"!=typeof t)throw new u('"allowMissing" argument must be a boolean');if(null===P(/^%?[^%]*%?$/,e))throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");var r=function(e){var t=C(e,0,1),r=C(e,-1);if("%"===t&&"%"!==r)throw new c("invalid intrinsic syntax, expected closing `%`");if("%"===r&&"%"!==t)throw new c("invalid intrinsic syntax, expected opening `%`");var n=[];return j(e,T,(function(e,t,r,o){n[n.length]=r?j(o,$,"$1"):t||e})),n}(e),n=r.length>0?r[0]:"",o=_("%"+n+"%",t),i=o.name,s=o.value,a=!1,l=o.alias;l&&(n=l[0],R(r,N([0,1],l)));for(var f=1,p=!0;f<r.length;f+=1){var h=r[f],g=C(h,0,1),y=C(h,-1);if(('"'===g||"'"===g||"`"===g||'"'===y||"'"===y||"`"===y)&&g!==y)throw new c("property names with quotes must have matching quotes");if("constructor"!==h&&p||(a=!0),I(w,i="%"+(n+="."+h)+"%"))s=w[i];else if(null!=s){if(!(h in s)){if(!t)throw new u("base intrinsic for "+e+" exists, but the property is not available.");return}if(d&&f+1>=r.length){var m=d(s,h);s=(p=!!m)&&"get"in m&&!("originalValue"in m.get)?m.get:s[h]}else p=I(s,h),s=s[h];p&&!a&&(w[i]=s)}}return s}},1322:(e,t,r)=>{"use strict";var n=r(1308)("%Object.getOwnPropertyDescriptor%",!0);if(n)try{n([],"length")}catch(e){n=null}e.exports=n},8027:(e,t,r)=>{"use strict";var n=r(1308)("%Object.defineProperty%",!0),o=function(){if(n)try{return n({},"a",{value:1}),!0}catch(e){return!1}return!1};o.hasArrayLengthDefineBug=function(){if(!o())return null;try{return 1!==n([],"length",{value:1}).length}catch(e){return!0}},e.exports=o},5083:e=>{"use strict";var t={foo:{}},r=Object;e.exports=function(){return{__proto__:t}.foo===t.foo&&!({__proto__:null}instanceof r)}},8813:(e,t,r)=>{"use strict";var n="undefined"!=typeof Symbol&&Symbol,o=r(7722);e.exports=function(){return"function"==typeof n&&("function"==typeof Symbol&&("symbol"==typeof n("foo")&&("symbol"==typeof Symbol("bar")&&o())))}},7722:e=>{"use strict";e.exports=function(){if("function"!=typeof Symbol||"function"!=typeof Object.getOwnPropertySymbols)return!1;if("symbol"==typeof Symbol.iterator)return!0;var e={},t=Symbol("test"),r=Object(t);if("string"==typeof t)return!1;if("[object Symbol]"!==Object.prototype.toString.call(t))return!1;if("[object Symbol]"!==Object.prototype.toString.call(r))return!1;for(t in e[t]=42,e)return!1;if("function"==typeof Object.keys&&0!==Object.keys(e).length)return!1;if("function"==typeof Object.getOwnPropertyNames&&0!==Object.getOwnPropertyNames(e).length)return!1;var n=Object.getOwnPropertySymbols(e);if(1!==n.length||n[0]!==t)return!1;if(!Object.prototype.propertyIsEnumerable.call(e,t))return!1;if("function"==typeof Object.getOwnPropertyDescriptor){var o=Object.getOwnPropertyDescriptor(e,t);if(42!==o.value||!0!==o.enumerable)return!1}return!0}},1593:(e,t,r)=>{"use strict";var n=r(7722);e.exports=function(){return n()&&!!Symbol.toStringTag}},7360:(e,t,r)=>{"use strict";var n=Function.prototype.call,o=Object.prototype.hasOwnProperty,i=r(2786);e.exports=i.call(n,o)},2400:e=>{"function"==typeof Object.create?e.exports=function(e,t){t&&(e.super_=t,e.prototype=Object.create(t.prototype,{constructor:{value:e,enumerable:!1,writable:!0,configurable:!0}}))}:e.exports=function(e,t){if(t){e.super_=t;var r=function(){};r.prototype=t.prototype,e.prototype=new r,e.prototype.constructor=e}}},6076:(e,t,r)=>{"use strict";var n=r(1593)(),o=r(3734)("Object.prototype.toString"),i=function(e){return!(n&&e&&"object"==typeof e&&Symbol.toStringTag in e)&&"[object Arguments]"===o(e)},s=function(e){return!!i(e)||null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Array]"!==o(e)&&"[object Function]"===o(e.callee)},a=function(){return i(arguments)}();i.isLegacyArguments=s,e.exports=a?i:s},5938:e=>{"use strict";var t,r,n=Function.prototype.toString,o="object"==typeof Reflect&&null!==Reflect&&Reflect.apply;if("function"==typeof o&&"function"==typeof Object.defineProperty)try{t=Object.defineProperty({},"length",{get:function(){throw r}}),r={},o((function(){throw 42}),null,t)}catch(e){e!==r&&(o=null)}else o=null;var i=/^\s*class\b/,s=function(e){try{var t=n.call(e);return i.test(t)}catch(e){return!1}},a=function(e){try{return!s(e)&&(n.call(e),!0)}catch(e){return!1}},c=Object.prototype.toString,u="function"==typeof Symbol&&!!Symbol.toStringTag,l=!(0 in[,]),f=function(){return!1};if("object"==typeof document){var p=document.all;c.call(p)===c.call(document.all)&&(f=function(e){if((l||!e)&&(void 0===e||"object"==typeof e))try{var t=c.call(e);return("[object HTMLAllCollection]"===t||"[object HTML document.all class]"===t||"[object HTMLCollection]"===t||"[object Object]"===t)&&null==e("")}catch(e){}return!1})}e.exports=o?function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;try{o(e,null,t)}catch(e){if(e!==r)return!1}return!s(e)&&a(e)}:function(e){if(f(e))return!0;if(!e)return!1;if("function"!=typeof e&&"object"!=typeof e)return!1;if(u)return a(e);if(s(e))return!1;var t=c.call(e);return!("[object Function]"!==t&&"[object GeneratorFunction]"!==t&&!/^\[object HTML/.test(t))&&a(e)}},3724:(e,t,r)=>{"use strict";var n,o=Object.prototype.toString,i=Function.prototype.toString,s=/^\s*(?:function)?\*/,a=r(1593)(),c=Object.getPrototypeOf;e.exports=function(e){if("function"!=typeof e)return!1;if(s.test(i.call(e)))return!0;if(!a)return"[object GeneratorFunction]"===o.call(e);if(!c)return!1;if(void 0===n){var t=function(){if(!a)return!1;try{return Function("return function*() {}")()}catch(e){}}();n=!!t&&c(t)}return c(e)===n}},7695:e=>{"use strict";e.exports=function(e){return e!=e}},9987:(e,t,r)=>{"use strict";var n=r(8907),o=r(6844),i=r(7695),s=r(7144),a=r(1223),c=n(s(),Number);o(c,{getPolyfill:s,implementation:i,shim:a}),e.exports=c},7144:(e,t,r)=>{"use strict";var n=r(7695);e.exports=function(){return Number.isNaN&&Number.isNaN(NaN)&&!Number.isNaN("a")?Number.isNaN:n}},1223:(e,t,r)=>{"use strict";var n=r(6844),o=r(7144);e.exports=function(){var e=o();return n(Number,{isNaN:e},{isNaN:function(){return Number.isNaN!==e}}),e}},3459:(e,t,r)=>{"use strict";var n=r(4067),o=r(797),i=r(3734),s=i("Object.prototype.toString"),a=r(1593)(),c=r(1322),u="undefined"==typeof globalThis?r.g:globalThis,l=o(),f=i("Array.prototype.indexOf",!0)||function(e,t){for(var r=0;r<e.length;r+=1)if(e[r]===t)return r;return-1},p=i("String.prototype.slice"),d={},h=Object.getPrototypeOf;a&&c&&h&&n(l,(function(e){var t=new u[e];if(Symbol.toStringTag in t){var r=h(t),n=c(r,Symbol.toStringTag);if(!n){var o=h(r);n=c(o,Symbol.toStringTag)}d[e]=n.get}}));e.exports=function(e){if(!e||"object"!=typeof e)return!1;if(!a||!(Symbol.toStringTag in e)){var t=p(s(e),8,-1);return f(l,t)>-1}return!!c&&function(e){var t=!1;return n(d,(function(r,n){if(!t)try{t=r.call(e)===n}catch(e){}})),t}(e)}},6633:e=>{"use strict";var t=function(e){return e!=e};e.exports=function(e,r){return 0===e&&0===r?1/e==1/r:e===r||!(!t(e)||!t(r))}},5031:(e,t,r)=>{"use strict";var n=r(6844),o=r(8907),i=r(6633),s=r(1753),a=r(3238),c=o(s(),Object);n(c,{getPolyfill:s,implementation:i,shim:a}),e.exports=c},1753:(e,t,r)=>{"use strict";var n=r(6633);e.exports=function(){return"function"==typeof Object.is?Object.is:n}},3238:(e,t,r)=>{"use strict";var n=r(1753),o=r(6844);e.exports=function(){var e=n();return o(Object,{is:e},{is:function(){return Object.is!==e}}),e}},1219:(e,t,r)=>{"use strict";var n;if(!Object.keys){var o=Object.prototype.hasOwnProperty,i=Object.prototype.toString,s=r(3401),a=Object.prototype.propertyIsEnumerable,c=!a.call({toString:null},"toString"),u=a.call((function(){}),"prototype"),l=["toString","toLocaleString","valueOf","hasOwnProperty","isPrototypeOf","propertyIsEnumerable","constructor"],f=function(e){var t=e.constructor;return t&&t.prototype===e},p={$applicationCache:!0,$console:!0,$external:!0,$frame:!0,$frameElement:!0,$frames:!0,$innerHeight:!0,$innerWidth:!0,$onmozfullscreenchange:!0,$onmozfullscreenerror:!0,$outerHeight:!0,$outerWidth:!0,$pageXOffset:!0,$pageYOffset:!0,$parent:!0,$scrollLeft:!0,$scrollTop:!0,$scrollX:!0,$scrollY:!0,$self:!0,$webkitIndexedDB:!0,$webkitStorageInfo:!0,$window:!0},d=function(){if("undefined"==typeof window)return!1;for(var e in window)try{if(!p["$"+e]&&o.call(window,e)&&null!==window[e]&&"object"==typeof window[e])try{f(window[e])}catch(e){return!0}}catch(e){return!0}return!1}();n=function(e){var t=null!==e&&"object"==typeof e,r="[object Function]"===i.call(e),n=s(e),a=t&&"[object String]"===i.call(e),p=[];if(!t&&!r&&!n)throw new TypeError("Object.keys called on a non-object");var h=u&&r;if(a&&e.length>0&&!o.call(e,0))for(var g=0;g<e.length;++g)p.push(String(g));if(n&&e.length>0)for(var y=0;y<e.length;++y)p.push(String(y));else for(var m in e)h&&"prototype"===m||!o.call(e,m)||p.push(String(m));if(c)for(var v=function(e){if("undefined"==typeof window||!d)return f(e);try{return f(e)}catch(e){return!1}}(e),b=0;b<l.length;++b)v&&"constructor"===l[b]||!o.call(e,l[b])||p.push(l[b]);return p}}e.exports=n},7395:(e,t,r)=>{"use strict";var n=Array.prototype.slice,o=r(3401),i=Object.keys,s=i?function(e){return i(e)}:r(1219),a=Object.keys;s.shim=function(){if(Object.keys){var e=function(){var e=Object.keys(arguments);return e&&e.length===arguments.length}(1,2);e||(Object.keys=function(e){return o(e)?a(n.call(e)):a(e)})}else Object.keys=s;return Object.keys||s},e.exports=s},3401:e=>{"use strict";var t=Object.prototype.toString;e.exports=function(e){var r=t.call(e),n="[object Arguments]"===r;return n||(n="[object Array]"!==r&&null!==e&&"object"==typeof e&&"number"==typeof e.length&&e.length>=0&&"[object Function]"===t.call(e.callee)),n}},9163:(e,t,r)=>{"use strict";const{ErrorWithCause:n}=r(8868),{findCauseByReference:o,getErrorCause:i,messageWithCauses:s,stackWithCauses:a}=r(1871);e.exports={ErrorWithCause:n,findCauseByReference:o,getErrorCause:i,stackWithCauses:a,messageWithCauses:s}},8868:e=>{"use strict";class t extends Error{constructor(e,{cause:r}={}){super(e),this.name=t.name,r&&(this.cause=r),this.message=e}}e.exports={ErrorWithCause:t}},1871:e=>{"use strict";const t=e=>{if(e&&"object"==typeof e&&"cause"in e){if("function"==typeof e.cause){const t=e.cause();return t instanceof Error?t:void 0}return e.cause instanceof Error?e.cause:void 0}},r=(e,n)=>{if(!(e instanceof Error))return"";const o=e.stack||"";if(n.has(e))return o+"\ncauses have become circular...";const i=t(e);return i?(n.add(e),o+"\ncaused by: "+r(i,n)):o},n=(e,r,o)=>{if(!(e instanceof Error))return"";const i=o?"":e.message||"";if(r.has(e))return i+": ...";const s=t(e);if(s){r.add(e);const t="cause"in e&&"function"==typeof e.cause;return i+(t?"":": ")+n(s,r,t)}return i};e.exports={findCauseByReference:(e,r)=>{if(!e||!r)return;if(!(e instanceof Error))return;if(!(r.prototype instanceof Error)&&r!==Error)return;const n=new Set;let o=e;for(;o&&!n.has(o);){if(n.add(o),o instanceof r)return o;o=t(o)}},getErrorCause:t,stackWithCauses:e=>r(e,new Set),messageWithCauses:e=>n(e,new Set)}},9931:(e,t,r)=>{const n=Symbol("SemVer ANY");class o{static get ANY(){return n}constructor(e,t){if(t=i(t),e instanceof o){if(e.loose===!!t.loose)return e;e=e.value}e=e.trim().split(/\s+/).join(" "),u("comparator",e,t),this.options=t,this.loose=!!t.loose,this.parse(e),this.semver===n?this.value="":this.value=this.operator+this.semver.version,u("comp",this)}parse(e){const t=this.options.loose?s[a.COMPARATORLOOSE]:s[a.COMPARATOR],r=e.match(t);if(!r)throw new TypeError(`Invalid comparator: ${e}`);this.operator=void 0!==r[1]?r[1]:"","="===this.operator&&(this.operator=""),r[2]?this.semver=new l(r[2],this.options.loose):this.semver=n}toString(){return this.value}test(e){if(u("Comparator.test",e,this.options.loose),this.semver===n||e===n)return!0;if("string"==typeof e)try{e=new l(e,this.options)}catch(e){return!1}return c(e,this.operator,this.semver,this.options)}intersects(e,t){if(!(e instanceof o))throw new TypeError("a Comparator is required");return""===this.operator?""===this.value||new f(e.value,t).test(this.value):""===e.operator?""===e.value||new f(this.value,t).test(e.semver):(!(t=i(t)).includePrerelease||"<0.0.0-0"!==this.value&&"<0.0.0-0"!==e.value)&&(!(!t.includePrerelease&&(this.value.startsWith("<0.0.0")||e.value.startsWith("<0.0.0")))&&(!(!this.operator.startsWith(">")||!e.operator.startsWith(">"))||(!(!this.operator.startsWith("<")||!e.operator.startsWith("<"))||(!(this.semver.version!==e.semver.version||!this.operator.includes("=")||!e.operator.includes("="))||(!!(c(this.semver,"<",e.semver,t)&&this.operator.startsWith(">")&&e.operator.startsWith("<"))||!!(c(this.semver,">",e.semver,t)&&this.operator.startsWith("<")&&e.operator.startsWith(">")))))))}}e.exports=o;const i=r(4424),{safeRe:s,t:a}=r(2619),c=r(7712),u=r(4607),l=r(4740),f=r(1959)},1959:(e,t,r)=>{class n{constructor(e,t){if(t=i(t),e instanceof n)return e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease?e:new n(e.raw,t);if(e instanceof s)return this.raw=e.value,this.set=[[e]],this.format(),this;if(this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease,this.raw=e.trim().split(/\s+/).join(" "),this.set=this.raw.split("||").map((e=>this.parseRange(e.trim()))).filter((e=>e.length)),!this.set.length)throw new TypeError(`Invalid SemVer Range: ${this.raw}`);if(this.set.length>1){const e=this.set[0];if(this.set=this.set.filter((e=>!y(e[0]))),0===this.set.length)this.set=[e];else if(this.set.length>1)for(const e of this.set)if(1===e.length&&m(e[0])){this.set=[e];break}}this.format()}format(){return this.range=this.set.map((e=>e.join(" ").trim())).join("||").trim(),this.range}toString(){return this.range}parseRange(e){const t=((this.options.includePrerelease&&h)|(this.options.loose&&g))+":"+e,r=o.get(t);if(r)return r;const n=this.options.loose,i=n?u[l.HYPHENRANGELOOSE]:u[l.HYPHENRANGE];e=e.replace(i,j(this.options.includePrerelease)),a("hyphen replace",e),e=e.replace(u[l.COMPARATORTRIM],f),a("comparator trim",e),e=e.replace(u[l.TILDETRIM],p),a("tilde trim",e),e=e.replace(u[l.CARETTRIM],d),a("caret trim",e);let c=e.split(" ").map((e=>b(e,this.options))).join(" ").split(/\s+/).map((e=>R(e,this.options)));n&&(c=c.filter((e=>(a("loose invalid filter",e,this.options),!!e.match(u[l.COMPARATORLOOSE]))))),a("range list",c);const m=new Map,v=c.map((e=>new s(e,this.options)));for(const e of v){if(y(e))return[e];m.set(e.value,e)}m.size>1&&m.has("")&&m.delete("");const E=[...m.values()];return o.set(t,E),E}intersects(e,t){if(!(e instanceof n))throw new TypeError("a Range is required");return this.set.some((r=>v(r,t)&&e.set.some((e=>v(e,t)&&r.every((r=>e.every((e=>r.intersects(e,t)))))))))}test(e){if(!e)return!1;if("string"==typeof e)try{e=new c(e,this.options)}catch(e){return!1}for(let t=0;t<this.set.length;t++)if(C(this.set[t],e,this.options))return!0;return!1}}e.exports=n;const o=new(r(4850))({max:1e3}),i=r(4424),s=r(9931),a=r(4607),c=r(4740),{safeRe:u,t:l,comparatorTrimReplace:f,tildeTrimReplace:p,caretTrimReplace:d}=r(2619),{FLAG_INCLUDE_PRERELEASE:h,FLAG_LOOSE:g}=r(9268),y=e=>"<0.0.0-0"===e.value,m=e=>""===e.value,v=(e,t)=>{let r=!0;const n=e.slice();let o=n.pop();for(;r&&n.length;)r=n.every((e=>o.intersects(e,t))),o=n.pop();return r},b=(e,t)=>(a("comp",e,t),e=x(e,t),a("caret",e),e=w(e,t),a("tildes",e),e=O(e,t),a("xrange",e),e=N(e,t),a("stars",e),e),E=e=>!e||"x"===e.toLowerCase()||"*"===e,w=(e,t)=>e.trim().split(/\s+/).map((e=>S(e,t))).join(" "),S=(e,t)=>{const r=t.loose?u[l.TILDELOOSE]:u[l.TILDE];return e.replace(r,((t,r,n,o,i)=>{let s;return a("tilde",e,t,r,n,o,i),E(r)?s="":E(n)?s=`>=${r}.0.0 <${+r+1}.0.0-0`:E(o)?s=`>=${r}.${n}.0 <${r}.${+n+1}.0-0`:i?(a("replaceTilde pr",i),s=`>=${r}.${n}.${o}-${i} <${r}.${+n+1}.0-0`):s=`>=${r}.${n}.${o} <${r}.${+n+1}.0-0`,a("tilde return",s),s}))},x=(e,t)=>e.trim().split(/\s+/).map((e=>A(e,t))).join(" "),A=(e,t)=>{a("caret",e,t);const r=t.loose?u[l.CARETLOOSE]:u[l.CARET],n=t.includePrerelease?"-0":"";return e.replace(r,((t,r,o,i,s)=>{let c;return a("caret",e,t,r,o,i,s),E(r)?c="":E(o)?c=`>=${r}.0.0${n} <${+r+1}.0.0-0`:E(i)?c="0"===r?`>=${r}.${o}.0${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.0${n} <${+r+1}.0.0-0`:s?(a("replaceCaret pr",s),c="0"===r?"0"===o?`>=${r}.${o}.${i}-${s} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}-${s} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i}-${s} <${+r+1}.0.0-0`):(a("no pr"),c="0"===r?"0"===o?`>=${r}.${o}.${i}${n} <${r}.${o}.${+i+1}-0`:`>=${r}.${o}.${i}${n} <${r}.${+o+1}.0-0`:`>=${r}.${o}.${i} <${+r+1}.0.0-0`),a("caret return",c),c}))},O=(e,t)=>(a("replaceXRanges",e,t),e.split(/\s+/).map((e=>I(e,t))).join(" ")),I=(e,t)=>{e=e.trim();const r=t.loose?u[l.XRANGELOOSE]:u[l.XRANGE];return e.replace(r,((r,n,o,i,s,c)=>{a("xRange",e,r,n,o,i,s,c);const u=E(o),l=u||E(i),f=l||E(s),p=f;return"="===n&&p&&(n=""),c=t.includePrerelease?"-0":"",u?r=">"===n||"<"===n?"<0.0.0-0":"*":n&&p?(l&&(i=0),s=0,">"===n?(n=">=",l?(o=+o+1,i=0,s=0):(i=+i+1,s=0)):"<="===n&&(n="<",l?o=+o+1:i=+i+1),"<"===n&&(c="-0"),r=`${n+o}.${i}.${s}${c}`):l?r=`>=${o}.0.0${c} <${+o+1}.0.0-0`:f&&(r=`>=${o}.${i}.0${c} <${o}.${+i+1}.0-0`),a("xRange return",r),r}))},N=(e,t)=>(a("replaceStars",e,t),e.trim().replace(u[l.STAR],"")),R=(e,t)=>(a("replaceGTE0",e,t),e.trim().replace(u[t.includePrerelease?l.GTE0PRE:l.GTE0],"")),j=e=>(t,r,n,o,i,s,a,c,u,l,f,p,d)=>`${r=E(n)?"":E(o)?`>=${n}.0.0${e?"-0":""}`:E(i)?`>=${n}.${o}.0${e?"-0":""}`:s?`>=${r}`:`>=${r}${e?"-0":""}`} ${c=E(u)?"":E(l)?`<${+u+1}.0.0-0`:E(f)?`<${u}.${+l+1}.0-0`:p?`<=${u}.${l}.${f}-${p}`:e?`<${u}.${l}.${+f+1}-0`:`<=${c}`}`.trim(),C=(e,t,r)=>{for(let r=0;r<e.length;r++)if(!e[r].test(t))return!1;if(t.prerelease.length&&!r.includePrerelease){for(let r=0;r<e.length;r++)if(a(e[r].semver),e[r].semver!==s.ANY&&e[r].semver.prerelease.length>0){const n=e[r].semver;if(n.major===t.major&&n.minor===t.minor&&n.patch===t.patch)return!0}return!1}return!0}},4740:(e,t,r)=>{const n=r(4607),{MAX_LENGTH:o,MAX_SAFE_INTEGER:i}=r(9268),{safeRe:s,t:a}=r(2619),c=r(4424),{compareIdentifiers:u}=r(1582);class l{constructor(e,t){if(t=c(t),e instanceof l){if(e.loose===!!t.loose&&e.includePrerelease===!!t.includePrerelease)return e;e=e.version}else if("string"!=typeof e)throw new TypeError(`Invalid version. Must be a string. Got type "${typeof e}".`);if(e.length>o)throw new TypeError(`version is longer than ${o} characters`);n("SemVer",e,t),this.options=t,this.loose=!!t.loose,this.includePrerelease=!!t.includePrerelease;const r=e.trim().match(t.loose?s[a.LOOSE]:s[a.FULL]);if(!r)throw new TypeError(`Invalid Version: ${e}`);if(this.raw=e,this.major=+r[1],this.minor=+r[2],this.patch=+r[3],this.major>i||this.major<0)throw new TypeError("Invalid major version");if(this.minor>i||this.minor<0)throw new TypeError("Invalid minor version");if(this.patch>i||this.patch<0)throw new TypeError("Invalid patch version");r[4]?this.prerelease=r[4].split(".").map((e=>{if(/^[0-9]+$/.test(e)){const t=+e;if(t>=0&&t<i)return t}return e})):this.prerelease=[],this.build=r[5]?r[5].split("."):[],this.format()}format(){return this.version=`${this.major}.${this.minor}.${this.patch}`,this.prerelease.length&&(this.version+=`-${this.prerelease.join(".")}`),this.version}toString(){return this.version}compare(e){if(n("SemVer.compare",this.version,this.options,e),!(e instanceof l)){if("string"==typeof e&&e===this.version)return 0;e=new l(e,this.options)}return e.version===this.version?0:this.compareMain(e)||this.comparePre(e)}compareMain(e){return e instanceof l||(e=new l(e,this.options)),u(this.major,e.major)||u(this.minor,e.minor)||u(this.patch,e.patch)}comparePre(e){if(e instanceof l||(e=new l(e,this.options)),this.prerelease.length&&!e.prerelease.length)return-1;if(!this.prerelease.length&&e.prerelease.length)return 1;if(!this.prerelease.length&&!e.prerelease.length)return 0;let t=0;do{const r=this.prerelease[t],o=e.prerelease[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return u(r,o)}while(++t)}compareBuild(e){e instanceof l||(e=new l(e,this.options));let t=0;do{const r=this.build[t],o=e.build[t];if(n("prerelease compare",t,r,o),void 0===r&&void 0===o)return 0;if(void 0===o)return 1;if(void 0===r)return-1;if(r!==o)return u(r,o)}while(++t)}inc(e,t,r){switch(e){case"premajor":this.prerelease.length=0,this.patch=0,this.minor=0,this.major++,this.inc("pre",t,r);break;case"preminor":this.prerelease.length=0,this.patch=0,this.minor++,this.inc("pre",t,r);break;case"prepatch":this.prerelease.length=0,this.inc("patch",t,r),this.inc("pre",t,r);break;case"prerelease":0===this.prerelease.length&&this.inc("patch",t,r),this.inc("pre",t,r);break;case"major":0===this.minor&&0===this.patch&&0!==this.prerelease.length||this.major++,this.minor=0,this.patch=0,this.prerelease=[];break;case"minor":0===this.patch&&0!==this.prerelease.length||this.minor++,this.patch=0,this.prerelease=[];break;case"patch":0===this.prerelease.length&&this.patch++,this.prerelease=[];break;case"pre":{const e=Number(r)?1:0;if(!t&&!1===r)throw new Error("invalid increment argument: identifier is empty");if(0===this.prerelease.length)this.prerelease=[e];else{let n=this.prerelease.length;for(;--n>=0;)"number"==typeof this.prerelease[n]&&(this.prerelease[n]++,n=-2);if(-1===n){if(t===this.prerelease.join(".")&&!1===r)throw new Error("invalid increment argument: identifier already exists");this.prerelease.push(e)}}if(t){let n=[t,e];!1===r&&(n=[t]),0===u(this.prerelease[0],t)?isNaN(this.prerelease[1])&&(this.prerelease=n):this.prerelease=n}break}default:throw new Error(`invalid increment argument: ${e}`)}return this.raw=this.format(),this.build.length&&(this.raw+=`+${this.build.join(".")}`),this}}e.exports=l},3693:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e.trim().replace(/^[=v]+/,""),t);return r?r.version:null}},7712:(e,t,r)=>{const n=r(7083),o=r(4471),i=r(1410),s=r(2384),a=r(7627),c=r(9927);e.exports=(e,t,r,u)=>{switch(t){case"===":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e===r;case"!==":return"object"==typeof e&&(e=e.version),"object"==typeof r&&(r=r.version),e!==r;case"":case"=":case"==":return n(e,r,u);case"!=":return o(e,r,u);case">":return i(e,r,u);case">=":return s(e,r,u);case"<":return a(e,r,u);case"<=":return c(e,r,u);default:throw new TypeError(`Invalid operator: ${t}`)}}},4787:(e,t,r)=>{const n=r(4740),o=r(9203),{safeRe:i,t:s}=r(2619);e.exports=(e,t)=>{if(e instanceof n)return e;if("number"==typeof e&&(e=String(e)),"string"!=typeof e)return null;let r=null;if((t=t||{}).rtl){const n=t.includePrerelease?i[s.COERCERTLFULL]:i[s.COERCERTL];let o;for(;(o=n.exec(e))&&(!r||r.index+r[0].length!==e.length);)r&&o.index+o[0].length===r.index+r[0].length||(r=o),n.lastIndex=o.index+o[1].length+o[2].length;n.lastIndex=-1}else r=e.match(t.includePrerelease?i[s.COERCEFULL]:i[s.COERCE]);if(null===r)return null;const a=r[2],c=r[3]||"0",u=r[4]||"0",l=t.includePrerelease&&r[5]?`-${r[5]}`:"",f=t.includePrerelease&&r[6]?`+${r[6]}`:"";return o(`${a}.${c}.${u}${l}${f}`,t)}},3338:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r)=>{const o=new n(e,r),i=new n(t,r);return o.compare(i)||o.compareBuild(i)}},9017:(e,t,r)=>{const n=r(2014);e.exports=(e,t)=>n(e,t,!0)},2014:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r)=>new n(e,r).compare(new n(t,r))},309:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e,null,!0),o=n(t,null,!0),i=r.compare(o);if(0===i)return null;const s=i>0,a=s?r:o,c=s?o:r,u=!!a.prerelease.length;if(!!c.prerelease.length&&!u)return c.patch||c.minor?a.patch?"patch":a.minor?"minor":"major":"major";const l=u?"pre":"";return r.major!==o.major?l+"major":r.minor!==o.minor?l+"minor":r.patch!==o.patch?l+"patch":"prerelease"}},7083:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>0===n(e,t,r)},1410:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)>0},2384:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)>=0},8498:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r,o,i)=>{"string"==typeof r&&(i=o,o=r,r=void 0);try{return new n(e instanceof n?e.version:e,r).inc(t,o,i).version}catch(e){return null}}},7627:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)<0},9927:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(e,t,r)<=0},2646:(e,t,r)=>{const n=r(4740);e.exports=(e,t)=>new n(e,t).major},1709:(e,t,r)=>{const n=r(4740);e.exports=(e,t)=>new n(e,t).minor},4471:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>0!==n(e,t,r)},9203:(e,t,r)=>{const n=r(4740);e.exports=(e,t,r=!1)=>{if(e instanceof n)return e;try{return new n(e,t)}catch(e){if(!r)return null;throw e}}},2923:(e,t,r)=>{const n=r(4740);e.exports=(e,t)=>new n(e,t).patch},8759:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e,t);return r&&r.prerelease.length?r.prerelease:null}},6677:(e,t,r)=>{const n=r(2014);e.exports=(e,t,r)=>n(t,e,r)},277:(e,t,r)=>{const n=r(3338);e.exports=(e,t)=>e.sort(((e,r)=>n(r,e,t)))},1307:(e,t,r)=>{const n=r(1959);e.exports=(e,t,r)=>{try{t=new n(t,r)}catch(e){return!1}return t.test(e)}},4808:(e,t,r)=>{const n=r(3338);e.exports=(e,t)=>e.sort(((e,r)=>n(e,r,t)))},8914:(e,t,r)=>{const n=r(9203);e.exports=(e,t)=>{const r=n(e,t);return r?r.version:null}},5825:(e,t,r)=>{const n=r(2619),o=r(9268),i=r(4740),s=r(1582),a=r(9203),c=r(8914),u=r(3693),l=r(8498),f=r(309),p=r(2646),d=r(1709),h=r(2923),g=r(8759),y=r(2014),m=r(6677),v=r(9017),b=r(3338),E=r(4808),w=r(277),S=r(1410),x=r(7627),A=r(7083),O=r(4471),I=r(2384),N=r(9927),R=r(7712),j=r(4787),C=r(9931),P=r(1959),T=r(1307),$=r(2931),_=r(8536),k=r(2504),F=r(5800),L=r(4866),B=r(921),M=r(2398),D=r(5174),U=r(8773),V=r(669),G=r(7438);e.exports={parse:a,valid:c,clean:u,inc:l,diff:f,major:p,minor:d,patch:h,prerelease:g,compare:y,rcompare:m,compareLoose:v,compareBuild:b,sort:E,rsort:w,gt:S,lt:x,eq:A,neq:O,gte:I,lte:N,cmp:R,coerce:j,Comparator:C,Range:P,satisfies:T,toComparators:$,maxSatisfying:_,minSatisfying:k,minVersion:F,validRange:L,outside:B,gtr:M,ltr:D,intersects:U,simplifyRange:V,subset:G,SemVer:i,re:n.re,src:n.src,tokens:n.t,SEMVER_SPEC_VERSION:o.SEMVER_SPEC_VERSION,RELEASE_TYPES:o.RELEASE_TYPES,compareIdentifiers:s.compareIdentifiers,rcompareIdentifiers:s.rcompareIdentifiers}},9268:e=>{const t=Number.MAX_SAFE_INTEGER||9007199254740991;e.exports={MAX_LENGTH:256,MAX_SAFE_COMPONENT_LENGTH:16,MAX_SAFE_BUILD_LENGTH:250,MAX_SAFE_INTEGER:t,RELEASE_TYPES:["major","premajor","minor","preminor","patch","prepatch","prerelease"],SEMVER_SPEC_VERSION:"2.0.0",FLAG_INCLUDE_PRERELEASE:1,FLAG_LOOSE:2}},4607:e=>{const t="object"==typeof process&&process.env&&/\bsemver\b/i.test("false")?(...e)=>console.error("SEMVER",...e):()=>{};e.exports=t},1582:e=>{const t=/^[0-9]+$/,r=(e,r)=>{const n=t.test(e),o=t.test(r);return n&&o&&(e=+e,r=+r),e===r?0:n&&!o?-1:o&&!n?1:e<r?-1:1};e.exports={compareIdentifiers:r,rcompareIdentifiers:(e,t)=>r(t,e)}},4424:e=>{const t=Object.freeze({loose:!0}),r=Object.freeze({});e.exports=e=>e?"object"!=typeof e?t:e:r},2619:(e,t,r)=>{const{MAX_SAFE_COMPONENT_LENGTH:n,MAX_SAFE_BUILD_LENGTH:o,MAX_LENGTH:i}=r(9268),s=r(4607),a=(t=e.exports={}).re=[],c=t.safeRe=[],u=t.src=[],l=t.t={};let f=0;const p="[a-zA-Z0-9-]",d=[["\\s",1],["\\d",i],[p,o]],h=(e,t,r)=>{const n=(e=>{for(const[t,r]of d)e=e.split(`${t}*`).join(`${t}{0,${r}}`).split(`${t}+`).join(`${t}{1,${r}}`);return e})(t),o=f++;s(e,o,t),l[e]=o,u[o]=t,a[o]=new RegExp(t,r?"g":void 0),c[o]=new RegExp(n,r?"g":void 0)};h("NUMERICIDENTIFIER","0|[1-9]\\d*"),h("NUMERICIDENTIFIERLOOSE","\\d+"),h("NONNUMERICIDENTIFIER",`\\d*[a-zA-Z-]${p}*`),h("MAINVERSION",`(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})\\.(${u[l.NUMERICIDENTIFIER]})`),h("MAINVERSIONLOOSE",`(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})\\.(${u[l.NUMERICIDENTIFIERLOOSE]})`),h("PRERELEASEIDENTIFIER",`(?:${u[l.NUMERICIDENTIFIER]}|${u[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASEIDENTIFIERLOOSE",`(?:${u[l.NUMERICIDENTIFIERLOOSE]}|${u[l.NONNUMERICIDENTIFIER]})`),h("PRERELEASE",`(?:-(${u[l.PRERELEASEIDENTIFIER]}(?:\\.${u[l.PRERELEASEIDENTIFIER]})*))`),h("PRERELEASELOOSE",`(?:-?(${u[l.PRERELEASEIDENTIFIERLOOSE]}(?:\\.${u[l.PRERELEASEIDENTIFIERLOOSE]})*))`),h("BUILDIDENTIFIER",`${p}+`),h("BUILD",`(?:\\+(${u[l.BUILDIDENTIFIER]}(?:\\.${u[l.BUILDIDENTIFIER]})*))`),h("FULLPLAIN",`v?${u[l.MAINVERSION]}${u[l.PRERELEASE]}?${u[l.BUILD]}?`),h("FULL",`^${u[l.FULLPLAIN]}$`),h("LOOSEPLAIN",`[v=\\s]*${u[l.MAINVERSIONLOOSE]}${u[l.PRERELEASELOOSE]}?${u[l.BUILD]}?`),h("LOOSE",`^${u[l.LOOSEPLAIN]}$`),h("GTLT","((?:<|>)?=?)"),h("XRANGEIDENTIFIERLOOSE",`${u[l.NUMERICIDENTIFIERLOOSE]}|x|X|\\*`),h("XRANGEIDENTIFIER",`${u[l.NUMERICIDENTIFIER]}|x|X|\\*`),h("XRANGEPLAIN",`[v=\\s]*(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:\\.(${u[l.XRANGEIDENTIFIER]})(?:${u[l.PRERELEASE]})?${u[l.BUILD]}?)?)?`),h("XRANGEPLAINLOOSE",`[v=\\s]*(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:\\.(${u[l.XRANGEIDENTIFIERLOOSE]})(?:${u[l.PRERELEASELOOSE]})?${u[l.BUILD]}?)?)?`),h("XRANGE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAIN]}$`),h("XRANGELOOSE",`^${u[l.GTLT]}\\s*${u[l.XRANGEPLAINLOOSE]}$`),h("COERCEPLAIN",`(^|[^\\d])(\\d{1,${n}})(?:\\.(\\d{1,${n}}))?(?:\\.(\\d{1,${n}}))?`),h("COERCE",`${u[l.COERCEPLAIN]}(?:$|[^\\d])`),h("COERCEFULL",u[l.COERCEPLAIN]+`(?:${u[l.PRERELEASE]})?`+`(?:${u[l.BUILD]})?(?:$|[^\\d])`),h("COERCERTL",u[l.COERCE],!0),h("COERCERTLFULL",u[l.COERCEFULL],!0),h("LONETILDE","(?:~>?)"),h("TILDETRIM",`(\\s*)${u[l.LONETILDE]}\\s+`,!0),t.tildeTrimReplace="$1~",h("TILDE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAIN]}$`),h("TILDELOOSE",`^${u[l.LONETILDE]}${u[l.XRANGEPLAINLOOSE]}$`),h("LONECARET","(?:\\^)"),h("CARETTRIM",`(\\s*)${u[l.LONECARET]}\\s+`,!0),t.caretTrimReplace="$1^",h("CARET",`^${u[l.LONECARET]}${u[l.XRANGEPLAIN]}$`),h("CARETLOOSE",`^${u[l.LONECARET]}${u[l.XRANGEPLAINLOOSE]}$`),h("COMPARATORLOOSE",`^${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]})$|^$`),h("COMPARATOR",`^${u[l.GTLT]}\\s*(${u[l.FULLPLAIN]})$|^$`),h("COMPARATORTRIM",`(\\s*)${u[l.GTLT]}\\s*(${u[l.LOOSEPLAIN]}|${u[l.XRANGEPLAIN]})`,!0),t.comparatorTrimReplace="$1$2$3",h("HYPHENRANGE",`^\\s*(${u[l.XRANGEPLAIN]})\\s+-\\s+(${u[l.XRANGEPLAIN]})\\s*$`),h("HYPHENRANGELOOSE",`^\\s*(${u[l.XRANGEPLAINLOOSE]})\\s+-\\s+(${u[l.XRANGEPLAINLOOSE]})\\s*$`),h("STAR","(<|>)?=?\\s*\\*"),h("GTE0","^\\s*>=\\s*0\\.0\\.0\\s*$"),h("GTE0PRE","^\\s*>=\\s*0\\.0\\.0-0\\s*$")},4850:(e,t,r)=>{"use strict";const n=r(6239),o=Symbol("max"),i=Symbol("length"),s=Symbol("lengthCalculator"),a=Symbol("allowStale"),c=Symbol("maxAge"),u=Symbol("dispose"),l=Symbol("noDisposeOnSet"),f=Symbol("lruList"),p=Symbol("cache"),d=Symbol("updateAgeOnGet"),h=()=>1;const g=(e,t,r)=>{const n=e[p].get(t);if(n){const t=n.value;if(y(e,t)){if(v(e,n),!e[a])return}else r&&(e[d]&&(n.value.now=Date.now()),e[f].unshiftNode(n));return t.value}},y=(e,t)=>{if(!t||!t.maxAge&&!e[c])return!1;const r=Date.now()-t.now;return t.maxAge?r>t.maxAge:e[c]&&r>e[c]},m=e=>{if(e[i]>e[o])for(let t=e[f].tail;e[i]>e[o]&&null!==t;){const r=t.prev;v(e,t),t=r}},v=(e,t)=>{if(t){const r=t.value;e[u]&&e[u](r.key,r.value),e[i]-=r.length,e[p].delete(r.key),e[f].removeNode(t)}};class b{constructor(e,t,r,n,o){this.key=e,this.value=t,this.length=r,this.now=n,this.maxAge=o||0}}const E=(e,t,r,n)=>{let o=r.value;y(e,o)&&(v(e,r),e[a]||(o=void 0)),o&&t.call(n,o.value,o.key,e)};e.exports=class{constructor(e){if("number"==typeof e&&(e={max:e}),e||(e={}),e.max&&("number"!=typeof e.max||e.max<0))throw new TypeError("max must be a non-negative number");this[o]=e.max||1/0;const t=e.length||h;if(this[s]="function"!=typeof t?h:t,this[a]=e.stale||!1,e.maxAge&&"number"!=typeof e.maxAge)throw new TypeError("maxAge must be a number");this[c]=e.maxAge||0,this[u]=e.dispose,this[l]=e.noDisposeOnSet||!1,this[d]=e.updateAgeOnGet||!1,this.reset()}set max(e){if("number"!=typeof e||e<0)throw new TypeError("max must be a non-negative number");this[o]=e||1/0,m(this)}get max(){return this[o]}set allowStale(e){this[a]=!!e}get allowStale(){return this[a]}set maxAge(e){if("number"!=typeof e)throw new TypeError("maxAge must be a non-negative number");this[c]=e,m(this)}get maxAge(){return this[c]}set lengthCalculator(e){"function"!=typeof e&&(e=h),e!==this[s]&&(this[s]=e,this[i]=0,this[f].forEach((e=>{e.length=this[s](e.value,e.key),this[i]+=e.length}))),m(this)}get lengthCalculator(){return this[s]}get length(){return this[i]}get itemCount(){return this[f].length}rforEach(e,t){t=t||this;for(let r=this[f].tail;null!==r;){const n=r.prev;E(this,e,r,t),r=n}}forEach(e,t){t=t||this;for(let r=this[f].head;null!==r;){const n=r.next;E(this,e,r,t),r=n}}keys(){return this[f].toArray().map((e=>e.key))}values(){return this[f].toArray().map((e=>e.value))}reset(){this[u]&&this[f]&&this[f].length&&this[f].forEach((e=>this[u](e.key,e.value))),this[p]=new Map,this[f]=new n,this[i]=0}dump(){return this[f].map((e=>!y(this,e)&&{k:e.key,v:e.value,e:e.now+(e.maxAge||0)})).toArray().filter((e=>e))}dumpLru(){return this[f]}set(e,t,r){if((r=r||this[c])&&"number"!=typeof r)throw new TypeError("maxAge must be a number");const n=r?Date.now():0,a=this[s](t,e);if(this[p].has(e)){if(a>this[o])return v(this,this[p].get(e)),!1;const s=this[p].get(e).value;return this[u]&&(this[l]||this[u](e,s.value)),s.now=n,s.maxAge=r,s.value=t,this[i]+=a-s.length,s.length=a,this.get(e),m(this),!0}const d=new b(e,t,a,n,r);return d.length>this[o]?(this[u]&&this[u](e,t),!1):(this[i]+=d.length,this[f].unshift(d),this[p].set(e,this[f].head),m(this),!0)}has(e){if(!this[p].has(e))return!1;const t=this[p].get(e).value;return!y(this,t)}get(e){return g(this,e,!0)}peek(e){return g(this,e,!1)}pop(){const e=this[f].tail;return e?(v(this,e),e.value):null}del(e){v(this,this[p].get(e))}load(e){this.reset();const t=Date.now();for(let r=e.length-1;r>=0;r--){const n=e[r],o=n.e||0;if(0===o)this.set(n.k,n.v);else{const e=o-t;e>0&&this.set(n.k,n.v,e)}}}prune(){this[p].forEach(((e,t)=>g(this,t,!1)))}}},2398:(e,t,r)=>{const n=r(921);e.exports=(e,t,r)=>n(e,t,">",r)},8773:(e,t,r)=>{const n=r(1959);e.exports=(e,t,r)=>(e=new n(e,r),t=new n(t,r),e.intersects(t,r))},5174:(e,t,r)=>{const n=r(921);e.exports=(e,t,r)=>n(e,t,"<",r)},8536:(e,t,r)=>{const n=r(4740),o=r(1959);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&-1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},2504:(e,t,r)=>{const n=r(4740),o=r(1959);e.exports=(e,t,r)=>{let i=null,s=null,a=null;try{a=new o(t,r)}catch(e){return null}return e.forEach((e=>{a.test(e)&&(i&&1!==s.compare(e)||(i=e,s=new n(i,r)))})),i}},5800:(e,t,r)=>{const n=r(4740),o=r(1959),i=r(1410);e.exports=(e,t)=>{e=new o(e,t);let r=new n("0.0.0");if(e.test(r))return r;if(r=new n("0.0.0-0"),e.test(r))return r;r=null;for(let t=0;t<e.set.length;++t){const o=e.set[t];let s=null;o.forEach((e=>{const t=new n(e.semver.version);switch(e.operator){case">":0===t.prerelease.length?t.patch++:t.prerelease.push(0),t.raw=t.format();case"":case">=":s&&!i(t,s)||(s=t);break;case"<":case"<=":break;default:throw new Error(`Unexpected operation: ${e.operator}`)}})),!s||r&&!i(r,s)||(r=s)}return r&&e.test(r)?r:null}},921:(e,t,r)=>{const n=r(4740),o=r(9931),{ANY:i}=o,s=r(1959),a=r(1307),c=r(1410),u=r(7627),l=r(9927),f=r(2384);e.exports=(e,t,r,p)=>{let d,h,g,y,m;switch(e=new n(e,p),t=new s(t,p),r){case">":d=c,h=l,g=u,y=">",m=">=";break;case"<":d=u,h=f,g=c,y="<",m="<=";break;default:throw new TypeError('Must provide a hilo val of "<" or ">"')}if(a(e,t,p))return!1;for(let r=0;r<t.set.length;++r){const n=t.set[r];let s=null,a=null;if(n.forEach((e=>{e.semver===i&&(e=new o(">=0.0.0")),s=s||e,a=a||e,d(e.semver,s.semver,p)?s=e:g(e.semver,a.semver,p)&&(a=e)})),s.operator===y||s.operator===m)return!1;if((!a.operator||a.operator===y)&&h(e,a.semver))return!1;if(a.operator===m&&g(e,a.semver))return!1}return!0}},669:(e,t,r)=>{const n=r(1307),o=r(2014);e.exports=(e,t,r)=>{const i=[];let s=null,a=null;const c=e.sort(((e,t)=>o(e,t,r)));for(const e of c){n(e,t,r)?(a=e,s||(s=e)):(a&&i.push([s,a]),a=null,s=null)}s&&i.push([s,null]);const u=[];for(const[e,t]of i)e===t?u.push(e):t||e!==c[0]?t?e===c[0]?u.push(`<=${t}`):u.push(`${e} - ${t}`):u.push(`>=${e}`):u.push("*");const l=u.join(" || "),f="string"==typeof t.raw?t.raw:String(t);return l.length<f.length?l:t}},7438:(e,t,r)=>{const n=r(1959),o=r(9931),{ANY:i}=o,s=r(1307),a=r(2014),c=[new o(">=0.0.0-0")],u=[new o(">=0.0.0")],l=(e,t,r)=>{if(e===t)return!0;if(1===e.length&&e[0].semver===i){if(1===t.length&&t[0].semver===i)return!0;e=r.includePrerelease?c:u}if(1===t.length&&t[0].semver===i){if(r.includePrerelease)return!0;t=u}const n=new Set;let o,l,d,h,g,y,m;for(const t of e)">"===t.operator||">="===t.operator?o=f(o,t,r):"<"===t.operator||"<="===t.operator?l=p(l,t,r):n.add(t.semver);if(n.size>1)return null;if(o&&l){if(d=a(o.semver,l.semver,r),d>0)return null;if(0===d&&(">="!==o.operator||"<="!==l.operator))return null}for(const e of n){if(o&&!s(e,String(o),r))return null;if(l&&!s(e,String(l),r))return null;for(const n of t)if(!s(e,String(n),r))return!1;return!0}let v=!(!l||r.includePrerelease||!l.semver.prerelease.length)&&l.semver,b=!(!o||r.includePrerelease||!o.semver.prerelease.length)&&o.semver;v&&1===v.prerelease.length&&"<"===l.operator&&0===v.prerelease[0]&&(v=!1);for(const e of t){if(m=m||">"===e.operator||">="===e.operator,y=y||"<"===e.operator||"<="===e.operator,o)if(b&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===b.major&&e.semver.minor===b.minor&&e.semver.patch===b.patch&&(b=!1),">"===e.operator||">="===e.operator){if(h=f(o,e,r),h===e&&h!==o)return!1}else if(">="===o.operator&&!s(o.semver,String(e),r))return!1;if(l)if(v&&e.semver.prerelease&&e.semver.prerelease.length&&e.semver.major===v.major&&e.semver.minor===v.minor&&e.semver.patch===v.patch&&(v=!1),"<"===e.operator||"<="===e.operator){if(g=p(l,e,r),g===e&&g!==l)return!1}else if("<="===l.operator&&!s(l.semver,String(e),r))return!1;if(!e.operator&&(l||o)&&0!==d)return!1}return!(o&&y&&!l&&0!==d)&&(!(l&&m&&!o&&0!==d)&&(!b&&!v))},f=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n>0?e:n<0||">"===t.operator&&">="===e.operator?t:e},p=(e,t,r)=>{if(!e)return t;const n=a(e.semver,t.semver,r);return n<0?e:n>0||"<"===t.operator&&"<="===e.operator?t:e};e.exports=(e,t,r={})=>{if(e===t)return!0;e=new n(e,r),t=new n(t,r);let o=!1;e:for(const n of e.set){for(const e of t.set){const t=l(n,e,r);if(o=o||null!==t,t)continue e}if(o)return!1}return!0}},2931:(e,t,r)=>{const n=r(1959);e.exports=(e,t)=>new n(e,t).set.map((e=>e.map((e=>e.value)).join(" ").trim().split(" ")))},4866:(e,t,r)=>{const n=r(1959);e.exports=(e,t)=>{try{return new n(e,t).range||"*"}catch(e){return null}}},6551:(e,t,r)=>{"use strict";var n=r(1308),o=r(9581),i=r(8027)(),s=r(1322),a=r(7266),c=n("%Math.floor%");e.exports=function(e,t){if("function"!=typeof e)throw new a("`fn` is not a function");if("number"!=typeof t||t<0||t>4294967295||c(t)!==t)throw new a("`length` must be a positive 32-bit integer");var r=arguments.length>2&&!!arguments[2],n=!0,u=!0;if("length"in e&&s){var l=s(e,"length");l&&!l.configurable&&(n=!1),l&&!l.writable&&(u=!1)}return(n||u||!r)&&(i?o(e,"length",t,!0,!0):o(e,"length",t)),e}},7396:e=>{const t=/^[-+]?0x[a-fA-F0-9]+$/,r=/^([\-\+])?(0*)(\.[0-9]+([eE]\-?[0-9]+)?|[0-9]+(\.[0-9]+([eE]\-?[0-9]+)?)?)$/;!Number.parseInt&&window.parseInt&&(Number.parseInt=window.parseInt),!Number.parseFloat&&window.parseFloat&&(Number.parseFloat=window.parseFloat);const n={hex:!0,leadingZeros:!0,decimalPoint:".",eNotation:!0};e.exports=function(e,o={}){if(o=Object.assign({},n,o),!e||"string"!=typeof e)return e;let i=e.trim();if(void 0!==o.skipLike&&o.skipLike.test(i))return e;if(o.hex&&t.test(i))return Number.parseInt(i,16);{const t=r.exec(i);if(t){const r=t[1],n=t[2];let s=function(e){if(e&&-1!==e.indexOf("."))return"."===(e=e.replace(/0+$/,""))?e="0":"."===e[0]?e="0"+e:"."===e[e.length-1]&&(e=e.substr(0,e.length-1)),e;return e}(t[3]);const a=t[4]||t[6];if(!o.leadingZeros&&n.length>0&&r&&"."!==i[2])return e;if(!o.leadingZeros&&n.length>0&&!r&&"."!==i[1])return e;{const t=Number(i),c=""+t;return-1!==c.search(/[eE]/)||a?o.eNotation?t:e:-1!==i.indexOf(".")?"0"===c&&""===s||c===s||r&&c==="-"+s?t:e:n?s===c||r+s===c?t:e:i===c||i===r+c?t:e}}return e}}},5362:e=>{e.exports=function(e){return e&&"object"==typeof e&&"function"==typeof e.copy&&"function"==typeof e.fill&&"function"==typeof e.readUInt8}},813:(e,t,r)=>{"use strict";var n=r(6076),o=r(3724),i=r(8469),s=r(3459);function a(e){return e.call.bind(e)}var c="undefined"!=typeof BigInt,u="undefined"!=typeof Symbol,l=a(Object.prototype.toString),f=a(Number.prototype.valueOf),p=a(String.prototype.valueOf),d=a(Boolean.prototype.valueOf);if(c)var h=a(BigInt.prototype.valueOf);if(u)var g=a(Symbol.prototype.valueOf);function y(e,t){if("object"!=typeof e)return!1;try{return t(e),!0}catch(e){return!1}}function m(e){return"[object Map]"===l(e)}function v(e){return"[object Set]"===l(e)}function b(e){return"[object WeakMap]"===l(e)}function E(e){return"[object WeakSet]"===l(e)}function w(e){return"[object ArrayBuffer]"===l(e)}function S(e){return"undefined"!=typeof ArrayBuffer&&(w.working?w(e):e instanceof ArrayBuffer)}function x(e){return"[object DataView]"===l(e)}function A(e){return"undefined"!=typeof DataView&&(x.working?x(e):e instanceof DataView)}t.isArgumentsObject=n,t.isGeneratorFunction=o,t.isTypedArray=s,t.isPromise=function(e){return"undefined"!=typeof Promise&&e instanceof Promise||null!==e&&"object"==typeof e&&"function"==typeof e.then&&"function"==typeof e.catch},t.isArrayBufferView=function(e){return"undefined"!=typeof ArrayBuffer&&ArrayBuffer.isView?ArrayBuffer.isView(e):s(e)||A(e)},t.isUint8Array=function(e){return"Uint8Array"===i(e)},t.isUint8ClampedArray=function(e){return"Uint8ClampedArray"===i(e)},t.isUint16Array=function(e){return"Uint16Array"===i(e)},t.isUint32Array=function(e){return"Uint32Array"===i(e)},t.isInt8Array=function(e){return"Int8Array"===i(e)},t.isInt16Array=function(e){return"Int16Array"===i(e)},t.isInt32Array=function(e){return"Int32Array"===i(e)},t.isFloat32Array=function(e){return"Float32Array"===i(e)},t.isFloat64Array=function(e){return"Float64Array"===i(e)},t.isBigInt64Array=function(e){return"BigInt64Array"===i(e)},t.isBigUint64Array=function(e){return"BigUint64Array"===i(e)},m.working="undefined"!=typeof Map&&m(new Map),t.isMap=function(e){return"undefined"!=typeof Map&&(m.working?m(e):e instanceof Map)},v.working="undefined"!=typeof Set&&v(new Set),t.isSet=function(e){return"undefined"!=typeof Set&&(v.working?v(e):e instanceof Set)},b.working="undefined"!=typeof WeakMap&&b(new WeakMap),t.isWeakMap=function(e){return"undefined"!=typeof WeakMap&&(b.working?b(e):e instanceof WeakMap)},E.working="undefined"!=typeof WeakSet&&E(new WeakSet),t.isWeakSet=function(e){return E(e)},w.working="undefined"!=typeof ArrayBuffer&&w(new ArrayBuffer),t.isArrayBuffer=S,x.working="undefined"!=typeof ArrayBuffer&&"undefined"!=typeof DataView&&x(new DataView(new ArrayBuffer(1),0,1)),t.isDataView=A;var O="undefined"!=typeof SharedArrayBuffer?SharedArrayBuffer:void 0;function I(e){return"[object SharedArrayBuffer]"===l(e)}function N(e){return void 0!==O&&(void 0===I.working&&(I.working=I(new O)),I.working?I(e):e instanceof O)}function R(e){return y(e,f)}function j(e){return y(e,p)}function C(e){return y(e,d)}function P(e){return c&&y(e,h)}function T(e){return u&&y(e,g)}t.isSharedArrayBuffer=N,t.isAsyncFunction=function(e){return"[object AsyncFunction]"===l(e)},t.isMapIterator=function(e){return"[object Map Iterator]"===l(e)},t.isSetIterator=function(e){return"[object Set Iterator]"===l(e)},t.isGeneratorObject=function(e){return"[object Generator]"===l(e)},t.isWebAssemblyCompiledModule=function(e){return"[object WebAssembly.Module]"===l(e)},t.isNumberObject=R,t.isStringObject=j,t.isBooleanObject=C,t.isBigIntObject=P,t.isSymbolObject=T,t.isBoxedPrimitive=function(e){return R(e)||j(e)||C(e)||P(e)||T(e)},t.isAnyArrayBuffer=function(e){return"undefined"!=typeof Uint8Array&&(S(e)||N(e))},["isProxy","isExternal","isModuleNamespaceObject"].forEach((function(e){Object.defineProperty(t,e,{enumerable:!1,value:function(){throw new Error(e+" is not supported in userland")}})}))},862:(e,t,r)=>{var n=Object.getOwnPropertyDescriptors||function(e){for(var t=Object.keys(e),r={},n=0;n<t.length;n++)r[t[n]]=Object.getOwnPropertyDescriptor(e,t[n]);return r},o=/%[sdj%]/g;t.format=function(e){if(!v(e)){for(var t=[],r=0;r<arguments.length;r++)t.push(c(arguments[r]));return t.join(" ")}r=1;for(var n=arguments,i=n.length,s=String(e).replace(o,(function(e){if("%%"===e)return"%";if(r>=i)return e;switch(e){case"%s":return String(n[r++]);case"%d":return Number(n[r++]);case"%j":try{return JSON.stringify(n[r++])}catch(e){return"[Circular]"}default:return e}})),a=n[r];r<i;a=n[++r])y(a)||!w(a)?s+=" "+a:s+=" "+c(a);return s},t.deprecate=function(e,r){if("undefined"!=typeof process&&!0===process.noDeprecation)return e;if("undefined"==typeof process)return function(){return t.deprecate(e,r).apply(this,arguments)};var n=!1;return function(){if(!n){if(process.throwDeprecation)throw new Error(r);process.traceDeprecation?console.trace(r):console.error(r),n=!0}return e.apply(this,arguments)}};var i={},s=/^$/,a="false";function c(e,r){var n={seen:[],stylize:l};return arguments.length>=3&&(n.depth=arguments[2]),arguments.length>=4&&(n.colors=arguments[3]),g(r)?n.showHidden=r:r&&t._extend(n,r),b(n.showHidden)&&(n.showHidden=!1),b(n.depth)&&(n.depth=2),b(n.colors)&&(n.colors=!1),b(n.customInspect)&&(n.customInspect=!0),n.colors&&(n.stylize=u),f(n,e,n.depth)}function u(e,t){var r=c.styles[t];return r?"["+c.colors[r][0]+"m"+e+"["+c.colors[r][1]+"m":e}function l(e,t){return e}function f(e,r,n){if(e.customInspect&&r&&A(r.inspect)&&r.inspect!==t.inspect&&(!r.constructor||r.constructor.prototype!==r)){var o=r.inspect(n,e);return v(o)||(o=f(e,o,n)),o}var i=function(e,t){if(b(t))return e.stylize("undefined","undefined");if(v(t)){var r="'"+JSON.stringify(t).replace(/^"|"$/g,"").replace(/'/g,"\\'").replace(/\\"/g,'"')+"'";return e.stylize(r,"string")}if(m(t))return e.stylize(""+t,"number");if(g(t))return e.stylize(""+t,"boolean");if(y(t))return e.stylize("null","null")}(e,r);if(i)return i;var s=Object.keys(r),a=function(e){var t={};return e.forEach((function(e,r){t[e]=!0})),t}(s);if(e.showHidden&&(s=Object.getOwnPropertyNames(r)),x(r)&&(s.indexOf("message")>=0||s.indexOf("description")>=0))return p(r);if(0===s.length){if(A(r)){var c=r.name?": "+r.name:"";return e.stylize("[Function"+c+"]","special")}if(E(r))return e.stylize(RegExp.prototype.toString.call(r),"regexp");if(S(r))return e.stylize(Date.prototype.toString.call(r),"date");if(x(r))return p(r)}var u,l="",w=!1,O=["{","}"];(h(r)&&(w=!0,O=["[","]"]),A(r))&&(l=" [Function"+(r.name?": "+r.name:"")+"]");return E(r)&&(l=" "+RegExp.prototype.toString.call(r)),S(r)&&(l=" "+Date.prototype.toUTCString.call(r)),x(r)&&(l=" "+p(r)),0!==s.length||w&&0!=r.length?n<0?E(r)?e.stylize(RegExp.prototype.toString.call(r),"regexp"):e.stylize("[Object]","special"):(e.seen.push(r),u=w?function(e,t,r,n,o){for(var i=[],s=0,a=t.length;s<a;++s)R(t,String(s))?i.push(d(e,t,r,n,String(s),!0)):i.push("");return o.forEach((function(o){o.match(/^\d+$/)||i.push(d(e,t,r,n,o,!0))})),i}(e,r,n,a,s):s.map((function(t){return d(e,r,n,a,t,w)})),e.seen.pop(),function(e,t,r){var n=e.reduce((function(e,t){return t.indexOf("\n")>=0&&0,e+t.replace(/\u001b\[\d\d?m/g,"").length+1}),0);if(n>60)return r[0]+(""===t?"":t+"\n ")+" "+e.join(",\n ")+" "+r[1];return r[0]+t+" "+e.join(", ")+" "+r[1]}(u,l,O)):O[0]+l+O[1]}function p(e){return"["+Error.prototype.toString.call(e)+"]"}function d(e,t,r,n,o,i){var s,a,c;if((c=Object.getOwnPropertyDescriptor(t,o)||{value:t[o]}).get?a=c.set?e.stylize("[Getter/Setter]","special"):e.stylize("[Getter]","special"):c.set&&(a=e.stylize("[Setter]","special")),R(n,o)||(s="["+o+"]"),a||(e.seen.indexOf(c.value)<0?(a=y(r)?f(e,c.value,null):f(e,c.value,r-1)).indexOf("\n")>-1&&(a=i?a.split("\n").map((function(e){return" "+e})).join("\n").slice(2):"\n"+a.split("\n").map((function(e){return" "+e})).join("\n")):a=e.stylize("[Circular]","special")),b(s)){if(i&&o.match(/^\d+$/))return a;(s=JSON.stringify(""+o)).match(/^"([a-zA-Z_][a-zA-Z_0-9]*)"$/)?(s=s.slice(1,-1),s=e.stylize(s,"name")):(s=s.replace(/'/g,"\\'").replace(/\\"/g,'"').replace(/(^"|"$)/g,"'"),s=e.stylize(s,"string"))}return s+": "+a}function h(e){return Array.isArray(e)}function g(e){return"boolean"==typeof e}function y(e){return null===e}function m(e){return"number"==typeof e}function v(e){return"string"==typeof e}function b(e){return void 0===e}function E(e){return w(e)&&"[object RegExp]"===O(e)}function w(e){return"object"==typeof e&&null!==e}function S(e){return w(e)&&"[object Date]"===O(e)}function x(e){return w(e)&&("[object Error]"===O(e)||e instanceof Error)}function A(e){return"function"==typeof e}function O(e){return Object.prototype.toString.call(e)}function I(e){return e<10?"0"+e.toString(10):e.toString(10)}a=a.replace(/[|\\{}()[\]^$+?.]/g,"\\$&").replace(/\*/g,".*").replace(/,/g,"$|^").toUpperCase(),s=new RegExp("^"+a+"$","i"),t.debuglog=function(e){if(e=e.toUpperCase(),!i[e])if(s.test(e)){var r=process.pid;i[e]=function(){var n=t.format.apply(t,arguments);console.error("%s %d: %s",e,r,n)}}else i[e]=function(){};return i[e]},t.inspect=c,c.colors={bold:[1,22],italic:[3,23],underline:[4,24],inverse:[7,27],white:[37,39],grey:[90,39],black:[30,39],blue:[34,39],cyan:[36,39],green:[32,39],magenta:[35,39],red:[31,39],yellow:[33,39]},c.styles={special:"cyan",number:"yellow",boolean:"yellow",undefined:"grey",null:"bold",string:"green",date:"magenta",regexp:"red"},t.types=r(813),t.isArray=h,t.isBoolean=g,t.isNull=y,t.isNullOrUndefined=function(e){return null==e},t.isNumber=m,t.isString=v,t.isSymbol=function(e){return"symbol"==typeof e},t.isUndefined=b,t.isRegExp=E,t.types.isRegExp=E,t.isObject=w,t.isDate=S,t.types.isDate=S,t.isError=x,t.types.isNativeError=x,t.isFunction=A,t.isPrimitive=function(e){return null===e||"boolean"==typeof e||"number"==typeof e||"string"==typeof e||"symbol"==typeof e||void 0===e},t.isBuffer=r(5362);var N=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function R(e,t){return Object.prototype.hasOwnProperty.call(e,t)}t.log=function(){var e,r;console.log("%s - %s",(e=new Date,r=[I(e.getHours()),I(e.getMinutes()),I(e.getSeconds())].join(":"),[e.getDate(),N[e.getMonth()],r].join(" ")),t.format.apply(t,arguments))},t.inherits=r(2400),t._extend=function(e,t){if(!t||!w(t))return e;for(var r=Object.keys(t),n=r.length;n--;)e[r[n]]=t[r[n]];return e};var j="undefined"!=typeof Symbol?Symbol("util.promisify.custom"):void 0;function C(e,t){if(!e){var r=new Error("Promise was rejected with a falsy value");r.reason=e,e=r}return t(e)}t.promisify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');if(j&&e[j]){var t;if("function"!=typeof(t=e[j]))throw new TypeError('The "util.promisify.custom" argument must be of type Function');return Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),t}function t(){for(var t,r,n=new Promise((function(e,n){t=e,r=n})),o=[],i=0;i<arguments.length;i++)o.push(arguments[i]);o.push((function(e,n){e?r(e):t(n)}));try{e.apply(this,o)}catch(e){r(e)}return n}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),j&&Object.defineProperty(t,j,{value:t,enumerable:!1,writable:!1,configurable:!0}),Object.defineProperties(t,n(e))},t.promisify.custom=j,t.callbackify=function(e){if("function"!=typeof e)throw new TypeError('The "original" argument must be of type Function');function t(){for(var t=[],r=0;r<arguments.length;r++)t.push(arguments[r]);var n=t.pop();if("function"!=typeof n)throw new TypeError("The last argument must be of type Function");var o=this,i=function(){return n.apply(o,arguments)};e.apply(this,t).then((function(e){process.nextTick(i.bind(null,null,e))}),(function(e){process.nextTick(C.bind(null,e,i))}))}return Object.setPrototypeOf(t,Object.getPrototypeOf(e)),Object.defineProperties(t,n(e)),t}},8469:(e,t,r)=>{"use strict";var n=r(4067),o=r(797),i=r(3734),s=r(1322),a=i("Object.prototype.toString"),c=r(1593)(),u="undefined"==typeof globalThis?r.g:globalThis,l=o(),f=i("String.prototype.slice"),p={},d=Object.getPrototypeOf;c&&s&&d&&n(l,(function(e){if("function"==typeof u[e]){var t=new u[e];if(Symbol.toStringTag in t){var r=d(t),n=s(r,Symbol.toStringTag);if(!n){var o=d(r);n=s(o,Symbol.toStringTag)}p[e]=n.get}}}));var h=r(3459);e.exports=function(e){return!!h(e)&&(c&&Symbol.toStringTag in e?function(e){var t=!1;return n(p,(function(r,n){if(!t)try{var o=r.call(e);o===n&&(t=o)}catch(e){}})),t}(e):f(a(e),8,-1))}},6377:e=>{"use strict";e.exports=function(e){e.prototype[Symbol.iterator]=function*(){for(let e=this.head;e;e=e.next)yield e.value}}},6239:(e,t,r)=>{"use strict";function n(e){var t=this;if(t instanceof n||(t=new n),t.tail=null,t.head=null,t.length=0,e&&"function"==typeof e.forEach)e.forEach((function(e){t.push(e)}));else if(arguments.length>0)for(var r=0,o=arguments.length;r<o;r++)t.push(arguments[r]);return t}function o(e,t,r){var n=t===e.head?new a(r,null,t,e):new a(r,t,t.next,e);return null===n.next&&(e.tail=n),null===n.prev&&(e.head=n),e.length++,n}function i(e,t){e.tail=new a(t,e.tail,null,e),e.head||(e.head=e.tail),e.length++}function s(e,t){e.head=new a(t,null,e.head,e),e.tail||(e.tail=e.head),e.length++}function a(e,t,r,n){if(!(this instanceof a))return new a(e,t,r,n);this.list=n,this.value=e,t?(t.next=this,this.prev=t):this.prev=null,r?(r.prev=this,this.next=r):this.next=null}e.exports=n,n.Node=a,n.create=n,n.prototype.removeNode=function(e){if(e.list!==this)throw new Error("removing node which does not belong to this list");var t=e.next,r=e.prev;return t&&(t.prev=r),r&&(r.next=t),e===this.head&&(this.head=t),e===this.tail&&(this.tail=r),e.list.length--,e.next=null,e.prev=null,e.list=null,t},n.prototype.unshiftNode=function(e){if(e!==this.head){e.list&&e.list.removeNode(e);var t=this.head;e.list=this,e.next=t,t&&(t.prev=e),this.head=e,this.tail||(this.tail=e),this.length++}},n.prototype.pushNode=function(e){if(e!==this.tail){e.list&&e.list.removeNode(e);var t=this.tail;e.list=this,e.prev=t,t&&(t.next=e),this.tail=e,this.head||(this.head=e),this.length++}},n.prototype.push=function(){for(var e=0,t=arguments.length;e<t;e++)i(this,arguments[e]);return this.length},n.prototype.unshift=function(){for(var e=0,t=arguments.length;e<t;e++)s(this,arguments[e]);return this.length},n.prototype.pop=function(){if(this.tail){var e=this.tail.value;return this.tail=this.tail.prev,this.tail?this.tail.next=null:this.head=null,this.length--,e}},n.prototype.shift=function(){if(this.head){var e=this.head.value;return this.head=this.head.next,this.head?this.head.prev=null:this.tail=null,this.length--,e}},n.prototype.forEach=function(e,t){t=t||this;for(var r=this.head,n=0;null!==r;n++)e.call(t,r.value,n,this),r=r.next},n.prototype.forEachReverse=function(e,t){t=t||this;for(var r=this.tail,n=this.length-1;null!==r;n--)e.call(t,r.value,n,this),r=r.prev},n.prototype.get=function(e){for(var t=0,r=this.head;null!==r&&t<e;t++)r=r.next;if(t===e&&null!==r)return r.value},n.prototype.getReverse=function(e){for(var t=0,r=this.tail;null!==r&&t<e;t++)r=r.prev;if(t===e&&null!==r)return r.value},n.prototype.map=function(e,t){t=t||this;for(var r=new n,o=this.head;null!==o;)r.push(e.call(t,o.value,this)),o=o.next;return r},n.prototype.mapReverse=function(e,t){t=t||this;for(var r=new n,o=this.tail;null!==o;)r.push(e.call(t,o.value,this)),o=o.prev;return r},n.prototype.reduce=function(e,t){var r,n=this.head;if(arguments.length>1)r=t;else{if(!this.head)throw new TypeError("Reduce of empty list with no initial value");n=this.head.next,r=this.head.value}for(var o=0;null!==n;o++)r=e(r,n.value,o),n=n.next;return r},n.prototype.reduceReverse=function(e,t){var r,n=this.tail;if(arguments.length>1)r=t;else{if(!this.tail)throw new TypeError("Reduce of empty list with no initial value");n=this.tail.prev,r=this.tail.value}for(var o=this.length-1;null!==n;o--)r=e(r,n.value,o),n=n.prev;return r},n.prototype.toArray=function(){for(var e=new Array(this.length),t=0,r=this.head;null!==r;t++)e[t]=r.value,r=r.next;return e},n.prototype.toArrayReverse=function(){for(var e=new Array(this.length),t=0,r=this.tail;null!==r;t++)e[t]=r.value,r=r.prev;return e},n.prototype.slice=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=0,i=this.head;null!==i&&o<e;o++)i=i.next;for(;null!==i&&o<t;o++,i=i.next)r.push(i.value);return r},n.prototype.sliceReverse=function(e,t){(t=t||this.length)<0&&(t+=this.length),(e=e||0)<0&&(e+=this.length);var r=new n;if(t<e||t<0)return r;e<0&&(e=0),t>this.length&&(t=this.length);for(var o=this.length,i=this.tail;null!==i&&o>t;o--)i=i.prev;for(;null!==i&&o>e;o--,i=i.prev)r.push(i.value);return r},n.prototype.splice=function(e,t,...r){e>this.length&&(e=this.length-1),e<0&&(e=this.length+e);for(var n=0,i=this.head;null!==i&&n<e;n++)i=i.next;var s=[];for(n=0;i&&n<t;n++)s.push(i.value),i=this.removeNode(i);null===i&&(i=this.tail),i!==this.head&&i!==this.tail&&(i=i.prev);for(n=0;n<r.length;n++)i=o(this,i,r[n]);return s},n.prototype.reverse=function(){for(var e=this.head,t=this.tail,r=e;null!==r;r=r.prev){var n=r.prev;r.prev=r.next,r.next=n}return this.head=t,this.tail=e,this};try{r(6377)(n)}catch(e){}},797:(e,t,r)=>{"use strict";var n=["BigInt64Array","BigUint64Array","Float32Array","Float64Array","Int16Array","Int32Array","Int8Array","Uint16Array","Uint32Array","Uint8Array","Uint8ClampedArray"],o="undefined"==typeof globalThis?r.g:globalThis;e.exports=function(){for(var e=[],t=0;t<n.length;t++)"function"==typeof o[n[t]]&&(e[e.length]=n[t]);return e}},6291:(e,t,r)=>{"use strict";r.r(t),r.d(t,{Struct:()=>l,StructError:()=>n,any:()=>O,array:()=>I,assert:()=>f,assign:()=>y,bigint:()=>N,boolean:()=>R,coerce:()=>Y,create:()=>p,date:()=>j,defaulted:()=>Z,define:()=>m,deprecated:()=>v,dynamic:()=>b,empty:()=>Q,enums:()=>C,func:()=>P,instance:()=>T,integer:()=>$,intersection:()=>_,is:()=>h,lazy:()=>E,literal:()=>k,map:()=>F,mask:()=>d,max:()=>te,min:()=>re,never:()=>L,nonempty:()=>ne,nullable:()=>B,number:()=>M,object:()=>D,omit:()=>w,optional:()=>U,partial:()=>S,pattern:()=>oe,pick:()=>x,record:()=>V,refine:()=>se,regexp:()=>G,set:()=>J,size:()=>ie,string:()=>H,struct:()=>A,trimmed:()=>K,tuple:()=>z,type:()=>q,union:()=>W,unknown:()=>X,validate:()=>g});class n extends TypeError{constructor(e,t){let r;const{message:n,explanation:o,...i}=e,{path:s}=e,a=0===s.length?n:`At path: ${s.join(".")} -- ${n}`;super(o??a),null!=o&&(this.cause=a),Object.assign(this,i),this.name=this.constructor.name,this.failures=()=>r??(r=[e,...t()])}}function o(e){return"object"==typeof e&&null!=e}function i(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;const t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function s(e){return"symbol"==typeof e?e.toString():"string"==typeof e?JSON.stringify(e):`${e}`}function a(e,t,r,n){if(!0===e)return;!1===e?e={}:"string"==typeof e&&(e={message:e});const{path:o,branch:i}=t,{type:a}=r,{refinement:c,message:u=`Expected a value of type \`${a}\`${c?` with refinement \`${c}\``:""}, but received: \`${s(n)}\``}=e;return{value:n,type:a,refinement:c,key:o[o.length-1],path:o,branch:i,...e,message:u}}function*c(e,t,r,n){var i;o(i=e)&&"function"==typeof i[Symbol.iterator]||(e=[e]);for(const o of e){const e=a(o,t,r,n);e&&(yield e)}}function*u(e,t,r={}){const{path:n=[],branch:i=[e],coerce:s=!1,mask:a=!1}=r,c={path:n,branch:i};if(s&&(e=t.coercer(e,c),a&&"type"!==t.type&&o(t.schema)&&o(e)&&!Array.isArray(e)))for(const r in e)void 0===t.schema[r]&&delete e[r];let l="valid";for(const n of t.validator(e,c))n.explanation=r.message,l="not_valid",yield[n,void 0];for(let[f,p,d]of t.entries(e,c)){const t=u(p,d,{path:void 0===f?n:[...n,f],branch:void 0===f?i:[...i,p],coerce:s,mask:a,message:r.message});for(const r of t)r[0]?(l=null!=r[0].refinement?"not_refined":"not_valid",yield[r[0],void 0]):s&&(p=r[1],void 0===f?e=p:e instanceof Map?e.set(f,p):e instanceof Set?e.add(p):o(e)&&(void 0!==p||f in e)&&(e[f]=p))}if("not_valid"!==l)for(const n of t.refiner(e,c))n.explanation=r.message,l="not_refined",yield[n,void 0];"valid"===l&&(yield[void 0,e])}class l{constructor(e){const{type:t,schema:r,validator:n,refiner:o,coercer:i=(e=>e),entries:s=function*(){}}=e;this.type=t,this.schema=r,this.entries=s,this.coercer=i,this.validator=n?(e,t)=>c(n(e,t),t,this,e):()=>[],this.refiner=o?(e,t)=>c(o(e,t),t,this,e):()=>[]}assert(e,t){return f(e,this,t)}create(e,t){return p(e,this,t)}is(e){return h(e,this)}mask(e,t){return d(e,this,t)}validate(e,t={}){return g(e,this,t)}}function f(e,t,r){const n=g(e,t,{message:r});if(n[0])throw n[0]}function p(e,t,r){const n=g(e,t,{coerce:!0,message:r});if(n[0])throw n[0];return n[1]}function d(e,t,r){const n=g(e,t,{coerce:!0,mask:!0,message:r});if(n[0])throw n[0];return n[1]}function h(e,t){return!g(e,t)[0]}function g(e,t,r={}){const o=u(e,t,r),i=function(e){const{done:t,value:r}=e.next();return t?void 0:r}(o);if(i[0]){return[new n(i[0],(function*(){for(const e of o)e[0]&&(yield e[0])})),void 0]}return[void 0,i[1]]}function y(...e){const t="type"===e[0].type,r=e.map((e=>e.schema)),n=Object.assign({},...r);return t?q(n):D(n)}function m(e,t){return new l({type:e,schema:null,validator:t})}function v(e,t){return new l({...e,refiner:(t,r)=>void 0===t||e.refiner(t,r),validator:(r,n)=>void 0===r||(t(r,n),e.validator(r,n))})}function b(e){return new l({type:"dynamic",schema:null,*entries(t,r){const n=e(t,r);yield*n.entries(t,r)},validator:(t,r)=>e(t,r).validator(t,r),coercer:(t,r)=>e(t,r).coercer(t,r),refiner:(t,r)=>e(t,r).refiner(t,r)})}function E(e){let t;return new l({type:"lazy",schema:null,*entries(r,n){t??(t=e()),yield*t.entries(r,n)},validator:(r,n)=>(t??(t=e()),t.validator(r,n)),coercer:(r,n)=>(t??(t=e()),t.coercer(r,n)),refiner:(r,n)=>(t??(t=e()),t.refiner(r,n))})}function w(e,t){const{schema:r}=e,n={...r};for(const e of t)delete n[e];return"type"===e.type?q(n):D(n)}function S(e){const t=e instanceof l?{...e.schema}:{...e};for(const e in t)t[e]=U(t[e]);return D(t)}function x(e,t){const{schema:r}=e,n={};for(const e of t)n[e]=r[e];return D(n)}function A(e,t){return console.warn("superstruct@0.11 - The `struct` helper has been renamed to `define`."),m(e,t)}function O(){return m("any",(()=>!0))}function I(e){return new l({type:"array",schema:e,*entries(t){if(e&&Array.isArray(t))for(const[r,n]of t.entries())yield[r,n,e]},coercer:e=>Array.isArray(e)?e.slice():e,validator:e=>Array.isArray(e)||`Expected an array value, but received: ${s(e)}`})}function N(){return m("bigint",(e=>"bigint"==typeof e))}function R(){return m("boolean",(e=>"boolean"==typeof e))}function j(){return m("date",(e=>e instanceof Date&&!isNaN(e.getTime())||`Expected a valid \`Date\` object, but received: ${s(e)}`))}function C(e){const t={},r=e.map((e=>s(e))).join();for(const r of e)t[r]=r;return new l({type:"enums",schema:t,validator:t=>e.includes(t)||`Expected one of \`${r}\`, but received: ${s(t)}`})}function P(){return m("func",(e=>"function"==typeof e||`Expected a function, but received: ${s(e)}`))}function T(e){return m("instance",(t=>t instanceof e||`Expected a \`${e.name}\` instance, but received: ${s(t)}`))}function $(){return m("integer",(e=>"number"==typeof e&&!isNaN(e)&&Number.isInteger(e)||`Expected an integer, but received: ${s(e)}`))}function _(e){return new l({type:"intersection",schema:null,*entries(t,r){for(const n of e)yield*n.entries(t,r)},*validator(t,r){for(const n of e)yield*n.validator(t,r)},*refiner(t,r){for(const n of e)yield*n.refiner(t,r)}})}function k(e){const t=s(e),r=typeof e;return new l({type:"literal",schema:"string"===r||"number"===r||"boolean"===r?e:null,validator:r=>r===e||`Expected the literal \`${t}\`, but received: ${s(r)}`})}function F(e,t){return new l({type:"map",schema:null,*entries(r){if(e&&t&&r instanceof Map)for(const[n,o]of r.entries())yield[n,n,e],yield[n,o,t]},coercer:e=>e instanceof Map?new Map(e):e,validator:e=>e instanceof Map||`Expected a \`Map\` object, but received: ${s(e)}`})}function L(){return m("never",(()=>!1))}function B(e){return new l({...e,validator:(t,r)=>null===t||e.validator(t,r),refiner:(t,r)=>null===t||e.refiner(t,r)})}function M(){return m("number",(e=>"number"==typeof e&&!isNaN(e)||`Expected a number, but received: ${s(e)}`))}function D(e){const t=e?Object.keys(e):[],r=L();return new l({type:"object",schema:e||null,*entries(n){if(e&&o(n)){const o=new Set(Object.keys(n));for(const r of t)o.delete(r),yield[r,n[r],e[r]];for(const e of o)yield[e,n[e],r]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function U(e){return new l({...e,validator:(t,r)=>void 0===t||e.validator(t,r),refiner:(t,r)=>void 0===t||e.refiner(t,r)})}function V(e,t){return new l({type:"record",schema:null,*entries(r){if(o(r))for(const n in r){const o=r[n];yield[n,n,e],yield[n,o,t]}},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`})}function G(){return m("regexp",(e=>e instanceof RegExp))}function J(e){return new l({type:"set",schema:null,*entries(t){if(e&&t instanceof Set)for(const r of t)yield[r,r,e]},coercer:e=>e instanceof Set?new Set(e):e,validator:e=>e instanceof Set||`Expected a \`Set\` object, but received: ${s(e)}`})}function H(){return m("string",(e=>"string"==typeof e||`Expected a string, but received: ${s(e)}`))}function z(e){const t=L();return new l({type:"tuple",schema:null,*entries(r){if(Array.isArray(r)){const n=Math.max(e.length,r.length);for(let o=0;o<n;o++)yield[o,r[o],e[o]||t]}},validator:e=>Array.isArray(e)||`Expected an array, but received: ${s(e)}`})}function q(e){const t=Object.keys(e);return new l({type:"type",schema:e,*entries(r){if(o(r))for(const n of t)yield[n,r[n],e[n]]},validator:e=>o(e)||`Expected an object, but received: ${s(e)}`,coercer:e=>o(e)?{...e}:e})}function W(e){const t=e.map((e=>e.type)).join(" | ");return new l({type:"union",schema:null,coercer(t){for(const r of e){const[e,n]=r.validate(t,{coerce:!0});if(!e)return n}return t},validator(r,n){const o=[];for(const t of e){const[...e]=u(r,t,n),[i]=e;if(!i[0])return[];for(const[t]of e)t&&o.push(t)}return[`Expected the value to satisfy a union of \`${t}\`, but received: ${s(r)}`,...o]}})}function X(){return m("unknown",(()=>!0))}function Y(e,t,r){return new l({...e,coercer:(n,o)=>h(n,t)?e.coercer(r(n,o),o):e.coercer(n,o)})}function Z(e,t,r={}){return Y(e,X(),(e=>{const n="function"==typeof t?t():t;if(void 0===e)return n;if(!r.strict&&i(e)&&i(n)){const t={...e};let r=!1;for(const e in n)void 0===t[e]&&(t[e]=n[e],r=!0);if(r)return t}return e}))}function K(e){return Y(e,H(),(e=>e.trim()))}function Q(e){return se(e,"empty",(t=>{const r=ee(t);return 0===r||`Expected an empty ${e.type} but received one with a size of \`${r}\``}))}function ee(e){return e instanceof Map||e instanceof Set?e.size:e.length}function te(e,t,r={}){const{exclusive:n}=r;return se(e,"max",(r=>n?r<t:r<=t||`Expected a ${e.type} less than ${n?"":"or equal to "}${t} but received \`${r}\``))}function re(e,t,r={}){const{exclusive:n}=r;return se(e,"min",(r=>n?r>t:r>=t||`Expected a ${e.type} greater than ${n?"":"or equal to "}${t} but received \`${r}\``))}function ne(e){return se(e,"nonempty",(t=>ee(t)>0||`Expected a nonempty ${e.type} but received an empty one`))}function oe(e,t){return se(e,"pattern",(r=>t.test(r)||`Expected a ${e.type} matching \`/${t.source}/\` but received "${r}"`))}function ie(e,t,r=t){const n=`Expected a ${e.type}`,o=t===r?`of \`${t}\``:`between \`${t}\` and \`${r}\``;return se(e,"size",(e=>{if("number"==typeof e||e instanceof Date)return t<=e&&e<=r||`${n} ${o} but received \`${e}\``;if(e instanceof Map||e instanceof Set){const{size:i}=e;return t<=i&&i<=r||`${n} with a size ${o} but received one with a size of \`${i}\``}{const{length:i}=e;return t<=i&&i<=r||`${n} with a length ${o} but received one with a length of \`${i}\``}}))}function se(e,t,r){return new l({...e,*refiner(n,o){yield*e.refiner(n,o);const i=c(r(n,o),o,e,n);for(const e of i)yield{...e,refinement:t}}})}}},t={};function r(n){var o=t[n];if(void 0!==o)return o.exports;var i=t[n]={exports:{}};return e[n].call(i.exports,i,i.exports,r),i.exports}r.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return r.d(t,{a:t}),t},r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),r.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};var n={};(()=>{"use strict";r.r(n),r.d(n,{onHomePage:()=>ae,onRpcRequest:()=>se,onTransaction:()=>ce,onUserInput:()=>ue});var e,t=r(9917);!function(e){e.ClearState="clear",e.GetState="get",e.UpdateState="update"}(e||(e={}));var o=(e,t)=>Object.hasOwnProperty.call(e,t);var i,s=((i=s||{})[i.Null=4]="Null",i[i.Comma=1]="Comma",i[i.Wrapper=1]="Wrapper",i[i.True=4]="True",i[i.False=5]="False",i[i.Quote=1]="Quote",i[i.Colon=1]="Colon",i[i.Date=24]="Date",i);var a=r(6291);function c(e){return function(e){return function(e){return"object"==typeof e&&null!==e&&"message"in e}(e)&&"string"==typeof e.message?e.message:null==e?"":String(e)}(e).replace(/\.$/u,"")}function u(e,t){return r=e,Boolean("string"==typeof r?.prototype?.constructor?.name)?new e({message:t}):e({message:t});var r}var l,f=class extends Error{constructor(e){super(e.message),this.code="ERR_ASSERTION"}};function p(e,t="Assertion failed.",r=f){if(!e){if(t instanceof Error)throw t;throw u(r,t)}}function d(e,t,r="Assertion failed",n=f){try{(0,a.assert)(e,t)}catch(e){throw u(n,`${r}: ${c(e)}.`)}}!function(e){e.ButtonClickEvent="ButtonClickEvent",e.FormSubmitEvent="FormSubmitEvent"}(l||(l={}));const h=(0,a.object)({type:(0,a.string)(),name:(0,a.optional)((0,a.string)())}),g=(0,a.assign)(h,(0,a.object)({type:(0,a.literal)(l.ButtonClickEvent)})),y=(0,a.assign)(h,(0,a.object)({type:(0,a.literal)(l.FormSubmitEvent),value:(0,a.record)((0,a.string)(),(0,a.string)()),name:(0,a.string)()}));(0,a.union)([g,y]);function m(e,t,r=[]){return(...n)=>{if(1===n.length&&function(e){if("object"!=typeof e||null===e)return!1;try{let t=e;for(;null!==Object.getPrototypeOf(t);)t=Object.getPrototypeOf(t);return Object.getPrototypeOf(e)===t}catch(e){return!1}}(n[0])){const r={...n[0],type:e};return d(r,t,`Invalid ${e} component`),r}const o=r.reduce(((e,t,r)=>void 0!==n[r]?{...e,[t]:n[r]}:e),{type:e});return d(o,t,`Invalid ${e} component`),o}}var v;!function(e){e.Copyable="copyable",e.Divider="divider",e.Heading="heading",e.Panel="panel",e.Spinner="spinner",e.Text="text",e.Image="image",e.Row="row",e.Address="address",e.Button="button",e.Input="input",e.Form="form"}(v||(v={}));const b=(0,a.object)({type:(0,a.string)()}),E=(0,a.assign)(b,(0,a.object)({value:(0,a.unknown)()})),w=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Address),value:(0,a.pattern)((0,a.string)(),/0x[a-fA-F0-9]{40}/u)})),S=m(v.Address,w,["value"]);function x(e){return t=e,(0,a.define)(JSON.stringify(t),(0,a.literal)(t).validator);var t}var A,O;!function(e){e.Primary="primary",e.Secondary="secondary"}(A||(A={})),function(e){e.Button="button",e.Submit="submit"}(O||(O={}));const I=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Button),value:(0,a.string)(),variant:(0,a.optional)((0,a.union)([x(A.Primary),x(A.Secondary)])),buttonType:(0,a.optional)((0,a.union)([x(O.Button),x(O.Submit)])),name:(0,a.optional)((0,a.string)())})),N=m(v.Button,I,["value","buttonType","name","variant"]),R=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Copyable),value:(0,a.string)(),sensitive:(0,a.optional)((0,a.boolean)())})),j=m(v.Copyable,R,["value","sensitive"]),C=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Divider)}));m(v.Divider,C);var P;!function(e){e.Text="text",e.Number="number",e.Password="password"}(P||(P={}));const T=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Input),value:(0,a.optional)((0,a.string)()),name:(0,a.string)(),inputType:(0,a.optional)((0,a.union)([x(P.Text),x(P.Password),x(P.Number)])),placeholder:(0,a.optional)((0,a.string)()),label:(0,a.optional)((0,a.string)())})),$=m(v.Input,T,["name","inputType","placeholder","value","label"]),_=(0,a.union)([T,I]),k=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Form),children:(0,a.array)(_),name:(0,a.string)()})),F=m(v.Form,k,["name","children"]),L=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Heading),value:(0,a.string)()})),B=m(v.Heading,L,["value"]);var M=r(9525);function D(e){try{const r=e.trim();p(r.length>0);const n=new M.XMLParser({ignoreAttributes:!1,parseAttributeValue:!0}).parse(r,!0);return p(o(n,"svg")),t=n.svg,!Boolean(t)||"object"!=typeof t||Array.isArray(t)?{}:n.svg}catch{throw new Error("Snap icon must be a valid SVG.")}var t}const U=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Image),value:(0,a.refine)((0,a.string)(),"SVG",(e=>!!function(e){try{return D(e),!0}catch{return!1}}(e)||"Value is not a valid SVG."))})),V=(m(v.Image,U,["value"]),(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Text),value:(0,a.string)(),markdown:(0,a.optional)((0,a.boolean)())}))),G=m(v.Text,V,["value","markdown"]);var J;!function(e){e.Default="default",e.Critical="critical",e.Warning="warning"}(J||(J={}));const H=(0,a.union)([U,V,w]),z=(0,a.assign)(E,(0,a.object)({type:(0,a.literal)(v.Row),variant:(0,a.optional)((0,a.union)([x(J.Default),x(J.Critical),x(J.Warning)])),label:(0,a.string)(),value:H})),q=m(v.Row,z,["label","value","variant"]),W=(0,a.assign)(b,(0,a.object)({type:(0,a.literal)(v.Spinner)})),X=(m(v.Spinner,W),(0,a.assign)(b,(0,a.object)({children:(0,a.array)((0,a.lazy)((()=>K)))}))),Y=(0,a.assign)(X,(0,a.object)({type:(0,a.literal)(v.Panel)})),Z=m(v.Panel,Y,["children"]),K=(0,a.union)([R,C,L,U,Y,W,V,z,w,T,k,I]);var Q=r(5247),ee=r.n(Q);!function(){const e=[]}();(0,a.pattern)((0,a.string)(),/^(?:0x)?[0-9a-f]+$/iu),(0,a.pattern)((0,a.string)(),/^0x[0-9a-f]+$/iu),(0,a.pattern)((0,a.string)(),/^0x[0-9a-f]{40}$/u),(0,a.pattern)((0,a.string)(),/^0x[0-9a-fA-F]{40}$/u);function te(e){return e.startsWith("0x")||e.startsWith("0X")?e.substring(2):e}const re=[{name:"ERC-20",signature:"a9059cbb"},{name:"ERC-721",signature:"23b872dd"},{name:"ERC-1155",signature:"f242432a"}];async function ne(){return await snap.request({method:"snap_createInterface",params:{ui:Z([B("Interactive UI Example Snap"),N({value:"Update UI",name:"update"})])}})}async function oe(){var t;const r=await snap.request({method:"snap_manageState",params:{operation:e.GetState}});ee()(null===(t=r)||void 0===t?void 0:t.transaction,"No transaction found in Snap state.");const{from:n,to:o}=r.transaction;return Z([q("From",S(n)),q("To",o?S(o):G("None")),N({value:"See transaction type",name:"transaction-type"})])}async function ie(t){var r;const n=await snap.request({method:"snap_manageState",params:{operation:e.GetState}});ee()(null===(r=n)||void 0===r?void 0:r.transaction,"No transaction found in Snap state.");const o=function(e){if(e&&"string"==typeof e){var t;const r=te(e).slice(0,8);return(null===(t=re.find((e=>e.signature===r)))||void 0===t?void 0:t.name)??"Unknown"}return"Unknown"}(n.transaction.data);await snap.request({method:"snap_updateInterface",params:{id:t,ui:Z([q("Transaction type",G(o)),N({value:"Go back",name:"go-back"})])}})}const se=async({request:r})=>{switch(r.method){case"dialog":try{const t=await ne();return await snap.request({method:"snap_manageState",params:{operation:e.UpdateState,newState:{interfaceId:t},encrypted:!1}}),await snap.request({method:"snap_dialog",params:{type:"confirmation",id:t}})}finally{await snap.request({method:"snap_manageState",params:{operation:e.ClearState,encrypted:!1}})}case"getState":{var n;const t=await snap.request({method:"snap_manageState",params:{operation:e.GetState,encrypted:!1}});p(null===(n=t)||void 0===n?void 0:n.interfaceId,"No interface ID found in state.");return await snap.request({method:"snap_getInterfaceState",params:{id:t.interfaceId}})}default:throw t.PY.methodNotFound({data:{method:r.method}})}},ae=async()=>({id:await ne()}),ce=async({transaction:t})=>{await snap.request({method:"snap_manageState",params:{operation:e.UpdateState,newState:{transaction:t}}});return{id:await snap.request({method:"snap_createInterface",params:{ui:await oe()}})}},ue=async({id:e,event:t})=>{if(t.type===l.ButtonClickEvent)switch(t.name){case"update":await async function(e){await snap.request({method:"snap_updateInterface",params:{id:e,ui:Z([B("Interactive UI Example Snap"),F({name:"example-form",children:[$({name:"example-input",placeholder:"Enter something..."}),N("Submit",O.Submit,"sumbit")]})])}})}(e);break;case"transaction-type":await ie(e);break;case"go-back":await snap.request({method:"snap_updateInterface",params:{id:e,ui:await oe()}})}if(t.type===l.FormSubmitEvent&&"example-form"===t.name){const r=t.value["example-input"];await async function(e,t){await snap.request({method:"snap_updateInterface",params:{id:e,ui:Z([B("Interactive UI Example Snap"),G("The submitted value is:"),j(t)])}})}(e,r)}}})();var o=exports;for(var i in n)o[i]=n[i];n.__esModule&&Object.defineProperty(o,"__esModule",{value:!0})})();
package/package.json ADDED
@@ -0,0 +1,75 @@
1
+ {
2
+ "name": "@metamask/interactive-ui-example-snap",
3
+ "version": "1.0.0",
4
+ "description": "MetaMask example snap demonstrating the use of interactive UI.",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/MetaMask/snaps.git"
8
+ },
9
+ "license": "(MIT-0 OR Apache-2.0)",
10
+ "sideEffects": false,
11
+ "main": "./dist/bundle.js",
12
+ "files": [
13
+ "dist/",
14
+ "snap.manifest.json"
15
+ ],
16
+ "scripts": {
17
+ "build": "mm-snap build",
18
+ "build:clean": "yarn clean && yarn build",
19
+ "clean": "rimraf \"dist\"",
20
+ "lint": "yarn lint:eslint && yarn lint:misc --check && yarn lint:changelog && yarn lint:dependencies",
21
+ "lint:changelog": "../../../../scripts/validate-changelog.sh @metamask/interactive-ui-example-snap",
22
+ "lint:ci": "yarn lint",
23
+ "lint:eslint": "eslint . --cache --ext js,ts,jsx,tsx",
24
+ "lint:fix": "yarn lint:eslint --fix && yarn lint:misc --write",
25
+ "lint:misc": "prettier --no-error-on-unmatched-pattern --loglevel warn \"**/*.json\" \"**/*.md\" \"**/*.html\" \"!CHANGELOG.md\" \"!snap.manifest.json\" --ignore-path ../../../../.gitignore",
26
+ "start": "mm-snap watch",
27
+ "test": "yarn test:e2e",
28
+ "test:e2e": "jest",
29
+ "publish:preview": "yarn npm publish --tag preview",
30
+ "lint:dependencies": "depcheck"
31
+ },
32
+ "dependencies": {
33
+ "@metamask/rpc-errors": "^6.1.0",
34
+ "@metamask/snaps-sdk": "^2.1.0",
35
+ "@metamask/utils": "^8.3.0"
36
+ },
37
+ "devDependencies": {
38
+ "@jest/globals": "^29.5.0",
39
+ "@lavamoat/allow-scripts": "^3.0.2",
40
+ "@metamask/auto-changelog": "^3.4.4",
41
+ "@metamask/eslint-config": "^12.1.0",
42
+ "@metamask/eslint-config-jest": "^12.1.0",
43
+ "@metamask/eslint-config-nodejs": "^12.1.0",
44
+ "@metamask/eslint-config-typescript": "^12.1.0",
45
+ "@metamask/snaps-cli": "^5.1.0",
46
+ "@metamask/snaps-jest": "^5.0.0",
47
+ "@swc/core": "1.3.78",
48
+ "@swc/jest": "^0.2.26",
49
+ "@typescript-eslint/eslint-plugin": "^5.42.1",
50
+ "@typescript-eslint/parser": "^5.42.1",
51
+ "deepmerge": "^4.2.2",
52
+ "depcheck": "^1.4.7",
53
+ "eslint": "^8.27.0",
54
+ "eslint-config-prettier": "^8.5.0",
55
+ "eslint-plugin-import": "^2.26.0",
56
+ "eslint-plugin-jest": "^27.1.5",
57
+ "eslint-plugin-jsdoc": "^39.6.2",
58
+ "eslint-plugin-n": "^15.7.0",
59
+ "eslint-plugin-prettier": "^4.2.1",
60
+ "eslint-plugin-promise": "^6.1.1",
61
+ "jest": "^29.0.2",
62
+ "prettier": "^2.7.1",
63
+ "prettier-plugin-packagejson": "^2.2.11",
64
+ "rimraf": "^4.1.2",
65
+ "ts-node": "^10.9.1",
66
+ "typescript": "~4.8.4"
67
+ },
68
+ "engines": {
69
+ "node": "^18.16 || >=20"
70
+ },
71
+ "publishConfig": {
72
+ "access": "public",
73
+ "registry": "https://registry.npmjs.org/"
74
+ }
75
+ }
@@ -0,0 +1,30 @@
1
+ {
2
+ "version": "1.0.0",
3
+ "description": "MetaMask example snap demonstrating the use of interactive UI",
4
+ "proposedName": "Interactive UI Example Snap",
5
+ "repository": {
6
+ "type": "git",
7
+ "url": "https://github.com/MetaMask/snaps.git"
8
+ },
9
+ "source": {
10
+ "shasum": "GYviPuR6+daL3dTw5GNeb8alDHJYBmc6Jf0JEJVQ5ms=",
11
+ "location": {
12
+ "npm": {
13
+ "filePath": "dist/bundle.js",
14
+ "packageName": "@metamask/interactive-ui-example-snap",
15
+ "registry": "https://registry.npmjs.org/"
16
+ }
17
+ }
18
+ },
19
+ "initialPermissions": {
20
+ "endowment:rpc": {
21
+ "dapps": true,
22
+ "snaps": false
23
+ },
24
+ "snap_dialog": {},
25
+ "endowment:transaction-insight": {},
26
+ "endowment:page-home": {},
27
+ "snap_manageState": {}
28
+ },
29
+ "manifestVersion": "0.1"
30
+ }