evm-chains-info 0.0.9 → 0.0.12

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/README.md CHANGED
@@ -48,6 +48,10 @@ It is written and depends on the
48
48
  https://github.com/themartiancompany/crash-js)
49
49
  library.
50
50
 
51
+ The GNU Bash implementation is at
52
+ [`themartiancompany/evm-chains-info`](
53
+ https://github.com/themartiancompany/evm-chains-info).
54
+
51
55
  ## Installation
52
56
 
53
57
  The program in this source repo
@@ -58,7 +62,7 @@ make \
58
62
  install
59
63
  ```
60
64
 
61
- It has officially published on the
65
+ It has officially been published on the
62
66
  the uncensorable
63
67
  [Ur](
64
68
  https://github.com/themartiancompany/ur)
@@ -76,17 +80,23 @@ ur \
76
80
  evm-chains-info
77
81
  ```
78
82
 
79
- A censorable HTTP Github mirror of the recipe published there,
80
- containing a full list of the software dependencies needed to run the
81
- tools is hosted on
82
- [evm-chains-info-ur](
83
- https://github.com/themartiancompany/encoding-tools-ur).
84
- Be aware the mirror could go offline any time as Github and more
85
- in general all HTTP resources are inherently unstable and censorable.
83
+ A censorable HTTP Github mirror (
84
+ [`gur`](
85
+ https://github.com/themartiancompany/gur)
86
+ of the
87
+ [universal recipe](
88
+ https://github.com/themartiancompany/ur/blob/master/docs/UniversalRecipes.md)
89
+ published there is hosted on
90
+ [themartiancompany/evm-chains-info-ur](
91
+ https://github.com/themartiancompany/evm-chains-info-ur).
92
+ Be aware it could go offline any time.
86
93
 
87
94
  The package has also been published
88
- on the NPM Registry as `evm-chains-info`
89
- and so it can be installed from there by typing
95
+ on the NPM Registry as
96
+ [NPM Registry](
97
+ https://www.npmjs.com/package/evm-chains-info)
98
+ as `evm-chains-info` and so it can be installed
99
+ from there by typing
90
100
 
91
101
  ```bash
92
102
  npm \
@@ -94,6 +104,15 @@ npm \
94
104
  "evm-chains-info"
95
105
  ```
96
106
 
107
+ # Documentation
108
+
109
+ The manual can be consulted with
110
+
111
+ ```bash
112
+ man \
113
+ evm-chains-info
114
+ ```
115
+
97
116
  ## License
98
117
 
99
118
  This program is released by Pellegrino Prevete under the terms
package/evm-chains-info CHANGED
@@ -353,6 +353,7 @@ function
353
353
  if ( _help_display ) {
354
354
  quiet =
355
355
  "n";
356
+ _overrides_set();
356
357
  _usage(
357
358
  0);
358
359
  }
@@ -158,10 +158,6 @@ function
158
158
  const
159
159
  _home_dir =
160
160
  _homedir_get();
161
- _msg =
162
- `Home directory: '${_home_dir}'`;
163
- _msg_info(
164
- _msg);
165
161
  _db_path =
166
162
  _path_join(
167
163
  [ _home_dir,
@@ -197,7 +193,7 @@ function
197
193
  else if ( _user == "n" ) {
198
194
  const
199
195
  _lib =
200
- _lib_get();
196
+ await _lib_get();
201
197
  _db_path =
202
198
  _path_join(
203
199
  [ _lib,
@@ -226,10 +222,18 @@ function
226
222
  _chain_info,
227
223
  _data,
228
224
  _msg;
225
+ if ( typeof(
226
+ _db_types) == "undefined" ||
227
+ _db_types == [] ) {
228
+ _db_types = [
229
+ "node",
230
+ "system"
231
+ ];
232
+ }
229
233
  if ( typeof(
230
234
  _user_level) == "undefined" ) {
231
235
  _user_level =
232
- false;
236
+ "n";
233
237
  }
234
238
  if ( typeof(
235
239
  _format) == "undefined" ) {
@@ -244,14 +248,38 @@ function
244
248
  _chain_id,
245
249
  _format);
246
250
  }
247
- const
248
- _db_exists =
249
- _file_exists(
250
- _db_path);
251
- if ( _db_exists == false ) {
252
- if ( typeof window === 'undefined' &&
253
- ( typeof global !== 'undefined' && global.global === global ) &&
254
- typeof __webpack_require__ !== 'function' ) {
251
+ for ( _db_type of _db_types ) {
252
+ if ( _db_type == "system" ) {
253
+ const
254
+ _db_exists =
255
+ _file_exists(
256
+ _db_path);
257
+ const
258
+ _db =
259
+ _json_read(
260
+ _db_path);
261
+ _msg =
262
+ `Displaying data for ` +
263
+ `chain '${_chain_id}' `+
264
+ `of type '${_db_types}'.`;
265
+ _msg_info(
266
+ _msg);
267
+ for ( _chain_info of _db) {
268
+ if ( _chain_info["chainId"] == _chain_id ) {
269
+ return _chain_info;
270
+ }
271
+ }
272
+ _msg =
273
+ `Network '${_chain_id}' not found.`;
274
+ _msg_error(
275
+ _msg,
276
+ 1);
277
+ }
278
+ else if ( _db_type == "node" ) {
279
+ _msg =
280
+ `Getting data from 'ethereum-data' module.`;
281
+ _msg_info(
282
+ _msg);
255
283
  _data =
256
284
  _data_get(
257
285
  _chain_id);
@@ -263,34 +291,13 @@ function
263
291
  _msg);
264
292
  console.log(
265
293
  _data);
266
- }
267
- // _msg_error(
268
- // "Database file does not exists.",
269
- // 1);
270
- }
271
- const
272
- _db =
273
- _json_read(
274
- _db_path);
275
- // _data =
276
- // _data_get(
277
- // _chain_id);
278
- _msg =
279
- `Displaying data for ` +
280
- `chain '${_chain_id}' `+
281
- `of type '${_db_types}'.`;
282
- _msg_info(
283
- _msg);
284
- // console.log(
285
- // _db);
286
- for ( _chain_info of _db) {
287
- if ( _chain_info["chainId"] == _chain_id ) {
288
- return _chain_info;
294
+ for ( _chain_info of _db) {
295
+ if ( _chain_info["chainId"] == _chain_id ) {
296
+ return _chain_info;
297
+ }
298
+ }
289
299
  }
290
300
  }
291
- _msg_error(
292
- `Network '${_chain_id}' not found.`,
293
- 1);
294
301
  }
295
302
 
296
303
  function
@@ -300,8 +307,11 @@ function
300
307
  _db_path,
301
308
  _user_level,
302
309
  _db_types) {
310
+ let
311
+ _msg;
303
312
  if ( typeof(
304
- _network_chain_id) == "undefined" ) {
313
+ _network_chain_id) == "undefined" ||
314
+ _network_chain_id == "" ) {
305
315
  const
306
316
  _msg =
307
317
  "Network's ChainID not specified.";
@@ -310,15 +320,17 @@ function
310
320
  1);
311
321
  }
312
322
  if ( typeof(
313
- _selection_method) == "undefined" ) {
323
+ _selection_method) == "undefined" ||
324
+ _selection_method == "" ) {
314
325
  _selection_method =
315
326
  "kirsh";
316
327
  }
317
328
  if ( typeof(
318
- _db_path) == "undefined" ) {
329
+ _db_path) == "undefined" ||
330
+ _db_path == "" ) {
319
331
  _db_path =
320
332
  _evm_chains_db_path_get(
321
- false);
333
+ "n");
322
334
  }
323
335
  if ( typeof(
324
336
  _db_types) == "undefined" ) {
@@ -329,7 +341,7 @@ function
329
341
  }
330
342
  if ( _user_level == undefined ) {
331
343
  _user_level =
332
- true;
344
+ "y";
333
345
  }
334
346
  const
335
347
  _chain_id =
@@ -343,11 +355,15 @@ function
343
355
  _user_level,
344
356
  _db_types);
345
357
  if ( _selection_method == "kirsh" ) {
346
- return _chain_info["rpc"][0];
358
+ return _chain_info[
359
+ "rpc"][
360
+ 0];
347
361
  }
348
362
  else {
363
+ _msg =
364
+ "Unknown selection method.";
349
365
  _msg_error(
350
- "Unknown selection method.",
366
+ _msg,
351
367
  1);
352
368
  }
353
369
  }
@@ -367,7 +383,7 @@ function _rpc_backends_get(
367
383
  if ( _db_path == undefined ) {
368
384
  _db_path =
369
385
  _evm_chains_db_path_get(
370
- false);
386
+ "n");
371
387
  }
372
388
  const
373
389
  _rpcs =
@@ -544,15 +560,15 @@ function
544
560
  _msg;
545
561
  if ( user_level == "y" ) {
546
562
  _type_primary =
547
- true;
563
+ "y";
548
564
  _type_fallback =
549
- false;
565
+ "n";
550
566
  }
551
567
  else if ( user_level == "n" ) {
552
568
  _type_primary =
553
- true;
569
+ "n";
554
570
  _type_fallback =
555
- false;
571
+ "y";
556
572
  }
557
573
  const
558
574
  _db =
@@ -609,6 +625,12 @@ function
609
625
  _db) ) {
610
626
  db_paths.push(
611
627
  _db);
628
+ _msg =
629
+ `Found database ` +
630
+ `'${_db}', ` +
631
+ `adding.`;
632
+ _msg_info(
633
+ _msg);
612
634
  }
613
635
  else {
614
636
  _msg =
@@ -622,6 +644,12 @@ function
622
644
  _db_fallback_split) ) {
623
645
  db_paths.push(
624
646
  _db_fallback_split);
647
+ _msg =
648
+ `Found database ` +
649
+ `'${_db_fallback_split}', ` +
650
+ `adding.`;
651
+ _msg_info(
652
+ _msg);
625
653
  }
626
654
  else {
627
655
  _msg =
@@ -635,15 +663,27 @@ function
635
663
  _db_fallback) ) {
636
664
  db_paths.push(
637
665
  _db_fallback);
666
+ _msg =
667
+ `Found database ` +
668
+ `'${_db_fallback}', ` +
669
+ `adding.`;
670
+ _msg_info(
671
+ _msg);
638
672
  }
639
673
  else {
640
674
  _msg =
641
675
  `Fallback database ` +
642
676
  `'${_db_fallback_split}' ` +
643
- `not found too!`;
677
+ `not info.`;
644
678
  _msg_error(
645
679
  _msg,
646
- 1);
680
+ 0);
681
+ }
682
+ if ( db_paths.length == 0 ) {
683
+ _msg =
684
+ "Found no databases!";
685
+ _msg_info(
686
+ _msg);
647
687
  }
648
688
  }
649
689
 
package/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name":
3
3
  "evm-chains-info",
4
4
  "version":
5
- "0.0.9",
5
+ "0.0.12",
6
6
  "description":
7
7
  "Returns information about Ethereum Virtual Machine (EVM) blockchains.",
8
8
  "funding": {
@@ -77,7 +77,7 @@
77
77
  },
78
78
  "dependencies": {
79
79
  "crash-js":
80
- "^0.1.96",
80
+ "^0.1.98",
81
81
  "ethereum-data":
82
82
  "^0.0.3",
83
83
  "yargs":
@@ -87,9 +87,12 @@
87
87
  "commonjs",
88
88
  "main":
89
89
  "libevm-chains-info",
90
- "bin":
91
- { "evm-chains-info.js":
92
- "evm-chains-info" },
90
+ "bin": {
91
+ "evm-chain-info":
92
+ "evm-chains-info",
93
+ "evm-chains-info.js":
94
+ "evm-chains-info"
95
+ },
93
96
  "scripts": {
94
97
  "build-fs-worker":
95
98
  "npx webpack --mode 'production' --config 'fs-worker.webpack.config.cjs' --stats-error-details",
@@ -1,2 +0,0 @@
1
- /*! For license information please see evm-chains-info.js.LICENSE.txt */
2
- (()=>{var e={495(e,t,r){const n=r(368);_homedir_get=n._homedir_get,_file_exists=n._file_exists,_json_read=n._json_read,_lib_get=n._lib_get,_msg_info=n._msg_info,_msg_error=n._msg_error,_path_join=n._path_join,_range=n._range;const i=r(511)._data_get;function o(e,t,r){let n,i,o;if(void 0!==e&&""!=e||(e="n"),void 0!==t&&""!=t||(t=""),void 0!==r&&""!=r||(""!=t?r="split":""==t&&(r="unified")),o=`Getting path for chain with chain id '${t}' with privilege user set to '${e}' in format '${r}'.`,_msg_info(o),"unified"==r?n="chains.json":"split"==r&&(n=`${t}.json`),"y"==e){const e=_homedir_get();o=`Home directory: '${e}'`,_msg_info(o),i=_path_join([e,".config","evm-chains",n]);const t=_file_exists(i);1==t?(o=`Found database '${i}'.`,_msg_info(o)):0==t?(o=`Database '${i}' not found`,_msg_info(o)):(o="wat",_msg_error(o))}else if("n"==e){const e=_lib_get();i=_path_join([e,"evm-chains",n])}else o=`Input variable '_user' must be a boolean. _user value is '${e}'.`,_msg_error(o,0);return i}function a(e,t,n,i,a){void 0===e&&_msg_error("Network's ChainID not specified.",1),void 0===t&&(t="kirsh"),void 0===n&&(n=o(!1)),void 0===a&&(a=["node","system"]),null==i&&(i=!0);const s=function(e,t,n,i){let a,s;void 0===n&&(n=!1),void 0===i&&(i="split"),void 0===t&&(t=o(n,e,i)),0==_file_exists(t)&&"undefined"==typeof window&&void 0!==r.g&&(r.g.global,r.g);const u=_json_read(t);for(a of(s=`Displaying data for chain '${e}' of type 'undefined'.`,_msg_info(s),u))if(a.chainId==e)return a;_msg_error(`Network '${e}' not found.`,1)}(Number(e),n,i,a);if("kirsh"==t)return s.rpc[0];_msg_error("Unknown selection method.",1)}function s(e){_file_exists(e)||_msg_error(`Database at '${e}' does not exist.`,1)}function u(e,t,r,n,i,o,a){let s,u,l,f,c,h,d,p;if(c=r,"id"==t?(f="chainId",h=a,p=`Getting data for filter key: '${f}' and value '${h}'.`,_msg_info(p)):"testnet"==t&&(p="Like I have to agg a tag.",_msg_info(p)),"id"==r?c="chainId":"rpc"==r&&(c=r),"y"==o)return l=function(e){console.log(e)}(c),p=`Showing results for all networks with filter '${l}'.`,_msg_info(p),s=_json_read(e),p=`Showing results for all networks with filter '${l}'.`,_msg_info(p),s;if("n"==o){for(u of(d=[],p=`Showing results for chain '${a}' in database '${e}' with filter '${c}'.`,_msg_info(p),s=_json_read(e),p=`Database '${e}' contains '${s.length}' items.`,_msg_info(p),s))if(u[f]==a&&(d.push(u),"kirsh"==n))break;return p=`Total results returned for '${e}' are '${d.length}'.`,_msg_info(p),d}}function l(e,t,r,n,i,o,a,l){let f,c,h,d,p;if(p=0,"offline"==t){for(c of(d=`Getting data from databases '${l}'`,_msg_info(d),l))if(d=`Looking in '${c}'.`,_msg_info(d),s(c),"amount"!=r){if(f=u(c,r,n,i,0,a,e),"kirsh"==i)break}else"amount"==r&&(f=_json_read(c),p=f.length);if("amount"!=r){p=f.length,0==f.length&&(d=`No results found for network '${e}'.`,_msg_error(d,0));const t=[];for(h of f)if(h.chainId==e&&(t.push(h[n]),"all"!=i))break;f=t,d=`Found '${p}' networks in database '${c}'.`,_msg_info(d)}else if("amount"==r)return d=`Found '${p}' networks.`,_msg_info(d),p}else"online"==t&&(d="About to implement it probably.",_msg_error(d,1));return f}function f(e){"id"==e&&_msg_info(`Setting value for type '${e}'.`)}e.exports={_data_get:i,_db_paths_auto_detect:function(e){let t,r,n;("y"==user_level||"n"==user_level)&&(t=!0,r=!1);const i=o(t,"","unified"),a=o(t,e,"split"),s=o(r,"","unified"),u=o(r,e,"split");_file_exists(a)?(db_paths.push(a),n=`Found database '${a}', adding.`,_msg_info(n)):_file_exists(a)?(n="wat",_msg_error(n,1)):(n=`Default per-network database '${a}' not found, trying '${i}'.`,_msg_info(n)),_file_exists(i)?db_paths.push(i):(n=`Default unified database '${a}' not found, trying '${i}'.`,_msg_info(n)),_file_exists(u)?db_paths.push(u):(n=`Fallback per-network database '${u}' not found, trying '${s}'.`,_msg_info(n)),_file_exists(s)?db_paths.push(s):(n=`Fallback database '${u}' not found too!`,_msg_error(n,1))},_evm_chains_db_path_get:o,_evm_chains_info:function(e,t,r,n,i,o,a,s,u){let c,h,d;if("get"==e){const e=[],a=l(s,n,t,r,i,0,o,u);if("rpc"==r){for(h of a)for(d of h)if(e.push(d),"kirsh"==i)break;return e}if("name"==r)return a;if("id"==r)return a;if("explorers"==r){for(h of a)for(c of h)if(e.push(c.url),"kirsh"==i)break;return e}}else"set"==e?f(t):_msg_error(`Unknown command '${e}'.`,1)},_evm_chains_info_get:l,_evm_chains_info_set:f,_input_type_auto_detect:function(){""==input_type&&(isNaN(target_chain)?input_type="name":input_type="id")},_rpc_backend_get:a,_rpc_backends_get:function(e,t,r){let n,i,s;null==t&&(t="kirsh"),null==r&&(r=o(!1));const u=[];for(n of e)i=[n,t,r],s=a.apply(null,i),u.push(s);return u}}},526(e,t){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],l=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),f=0,c=u>0?a-4:a;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],l[f++]=t>>16&255,l[f++]=t>>8&255,l[f++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,l[f++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,l[f++]=t>>8&255,l[f++]=255&t),l},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(l(e,s,s+a>u?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function l(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287(e,t,r){"use strict";const n=r(526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return l(e,t,r)}function l(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||q(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function f(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return f(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,r);case"utf8":case"utf-8":return k(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function w(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function l(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(l(e,o)===l(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(l(e,o+n)!==l(t,n)){r=!1;break}if(r)return o}return-1}function v(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(q(n))return a;e[r+a]=n}return a}function _(e,t,r,n){return V(G(t,e.length-r),e,r,n)}function E(e,t,r,n){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return V(H(t),e,r,n)}function A(e,t,r,n){return V(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function R(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function k(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=T)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=T));return r}(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return l(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return f(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)w(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?k(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),l=this.slice(n,i),f=e.slice(t,r);for(let e=0;e<s;++e)if(l[e]!==f[e]){o=l[e],a=f[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const T=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function x(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=J[e[n]];return i}function L(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function U(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function j(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function B(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function $(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function M(e,t,r,n,o){return t=+t,r>>>=0,o||$(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function P(e,t,r,n,o){return t=+t,r>>>=0,o||$(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||U(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=K(function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=K(function(e,t=0){return B(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);U(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||U(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=K(function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=K(function(e,t=0){return B(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return M(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return M(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const F={};function N(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,i,o)}function Z(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw Z(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}N("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),N("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),N("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=D(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},368(e,t,r){const n=r(70),i=n._argv_get,o=n._argv_url_get,a=(0,n._process_exit_get)(),s=(0,n._process_cwd_get)(),u=s,l=n._yargv_get,f=r(314),c=f._basename,h=f._stat;function d(e,t){return`[${e}] ${t}: {_msg}`}function p(e){let t;"n"==quiet&&(_template=d(app_name,"INFO"),t=_template.replaceAll("{_msg}",e),console.log(t))}function g(e,t){let r,n;t=String(t),r=d(app_name,"ERROR"),n=r.replaceAll("{_msg}",e),console.error(n),"1"===t&&a(1)}function y(e,t){let r;return void 0===t&&(t=e,e=0),r=t-e,r<0&&(_msg="Second argument 'end' must be greater than first argument 'start'.",g(_msg,1)),Array(r).keys().map(t=>t+e)}e.exports={_argv_get:i,_argv_url_get:o,_app_name_get:function(){let e;return e=c("/index.js"),e},_basename:f._basename,_cat:f._cat,_cmdline_check:function(e){let t,r,n;return"undefined"==typeof window&&(t=i(),r=t[1],void 0===r&&(r=t.$0),n=c(r),n==e)},_dirname:f._dirname,_echo:function(e){console.log(e)},_error_display:function(e){let t;"object"==typeof error?(t="error"in e&&null!=e.error&&"message"in e.error?e.error.message:"shortMessage"in e?e.shortMessage:e,console.error(e)):(t=e,console.error(e)),g(t,0)},_ext_rm:f._ext_rm,_file_exists:f._file_exists,_file_read:f._file_read,_file_write:f._file_write,_fs_worker_new:f._fs_worker_new,_fs_worker_start:f._fs_worker_start,_get_date_human:function(){const e=new Date;return`${e.getFullYear()}-${e.getMonth()}-${e.getDay()}T${e.getHours()}:${e.getMinutes()}+0000`},_homedir_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&(r.g.global,r.g),"undefined"!=typeof window&&(e="/"),e},_json_display:f._json_display,_json_read:f._json_read,_lib_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e="/usr/lib"),e},_ls:f._ls,_mkdir:f._mkdir,_msg_info:p,_msg_error:g,_msg_info_obj:function(e,t){let r;r=`${e}: '${t}'`,p(r)},_mv:f._mv,_path_join:f._path_join,_printf:function(e){"undefined"==typeof window&&(_stdout=process.stdout),"undefined"!=typeof window&&(_stdout=r(310)),_stdout.write(e)},_process_exit:a,_process_cwd:s,_pwd:u,_range:y,_rm:f._rm,_seq:function(e,t){let r,n;for(r of(t<start&&(_msg="Second argument 'end' must be greater than first argument 'start'.",g(_msg,1)),n=[],void 0===t&&(t=e,e=1),y(e,t+1)))n.push(r);return n},_sleep:function(e){return new Promise(t=>setTimeout(t,e))},_stat:h,_yargv_get:l}},314(e,t,r){const n=r(816),i=n.fsWorkerNew,o=n.fsWorkerStart,a=n.statSync,s=JSON.parse,u=JSON.stringify,l=r(503),f=l.basename,c=l.dirname,h=l.join,d=l.parse;function p(e){let t,r;return t={encoding:"utf8",flag:"r"},r=n.readFileSync(e,t),r}function g(e){let t;return t=h.apply(null,e),t}e.exports={_basename:function(e){let t;return t=f(e),t},_cat:p,_dirname:function(e){let t;return t=c(e),t},_ext_rm:function(e){let t,r,n;return t=d(e).dir,r=d(e).name,n=[t,r],g(n)},_file_exists:function(e){let t,r;return r=!1,t=n.existsSync(e),t&&(r=!0),r},_file_read:p,_file_write:function(e,t){n.writeFileSync(e,t)},_fs_worker_new:i,_fs_worker_start:o,_json_display:u,_json_read:function(e){let t,r;return t=p(e),r=s(t),r},_ls:function(e){let t,r;return void 0===n.readdirSync?(t=n.readDirSync,r=t.apply(null,[e]).unwrap()):(t=n.readdirSync,r=t.apply(null,[e])),r},_mkdir:n.mkdirSync,_mv:function(e){let t,r;return void 0===n.renameSync?(t=n.moveSync,r=t.apply(null,e).unwrap()):(t=n.renameSync,r=t.apply(null,e)),r},_path_join:g,_rm:function(e){let t,r;return void 0===n.rmSync?(t=n.removeSync,r=t.apply(null,e).unwrap()):(t=n.rmSync,r=t.apply(null,e)),r},_stat:a}},70(e,t,r){function n(e){let t,r,n,i,o,a,s,u,l;void 0===e&&(s="Getting all values.",_msg_info("Getting all values."),e=""),t=[],a=window.location,u=a.search.substring(1),n=u.split("&");for(let a=0;a<n.length;a++)r=n[a],o=r.split("="),i=o[0],i!=e&&""!=e||(l=o[1],t.push(l));return t}e.exports={_argv_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=n()),e},_argv_url_get:n,_process_exit_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=function(e){return e}),e},_process_cwd_get:function(){let e;return e="undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"==typeof r?process.cwd:function(){return"."},e},_yargv_get:function(){let e,t,n;if("undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g)return t=r(Object(function(){var e=new Error("Cannot find module 'yargs'");throw e.code="MODULE_NOT_FOUND",e}())),_yargs_helpers_module=r(Object(function(){var e=new Error("Cannot find module 'yargs/helpers'");throw e.code="MODULE_NOT_FOUND",e}())),e=_yargs_helpers_module.hideBin,n=t(e(process.argv)),n.parse()}}},511(e,t,r){const n=r(368);function i(e){const t=_path_join(["chains",`${e}.json`]);return _json_read(t)}function o(){const e=_path_join(["chains","chains.json"]);return _json_read(e)}_json_read=n._json_read,_path_join=n._path_join,e.exports={_data_get:function(e){let t;return t=void 0===e||""==e?o():i(e),t},_data_split_get:i,_data_unified_get:o}},7(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function l(e,t,r,n){var i,o,a,l;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var f=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");f.name="MaxListenersExceededWarning",f.emitter=e,f.type=t,f.count=a.length,l=f,console&&console.warn&&console.warn(l)}return e}function f(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=f.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var l=u.length,f=p(u,l);for(r=0;r<l;++r)n(f[r],this,t)}return!0},o.prototype.addListener=function(e,t){return l(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return l(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},816(e,t,r){function n(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=function(){let e;try{e=r(10)}catch(e){console.log(e);const t="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(t),e}return e}()),e}const i=n();e.exports=i,e.exports.getModule=function(e){let t;if(""==_module_name||"undefined"==typeof _module_name)t=n();else if("opfs"==_module_name)t=r(10);else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}t=r(816)}return t}},251(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,l=u>>1,f=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-f)-1,d>>=-f,f+=s;f>0;o=256*o+e[t+c],c+=h,f-=8);for(a=o&(1<<-f)-1,o>>=-f,f+=n;f>0;a=256*a+e[t+c],c+=h,f-=8);if(0===o)o=1-l;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=l}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,l=8*o-i-1,f=(1<<l)-1,c=f>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=f):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=f?(s=0,a=f):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,l+=i;l>0;e[r+d]=255&a,d+=p,a/=256,l-=8);e[r+d-p]|=128*g}},698(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}}},10(e,t,r){const n=r(805),i=r(866),o=r(12);function a(e){let t;return void 0===e&&(e="fs-worker.js"),t=new i(e),t}_file=o.file,_read_stream_create=function(e,t){return _file(e).createReader()},e.exports=n,e.exports.fsWorkerNew=a,e.exports.fsWorkerStart=async function(e,t,r){let n,i,o,s;return void 0===e&&(e="fs-worker.js"),"Number"!=typeof t&&(t=10485760),"Number"!=typeof t&&(r=10485760),i=_fs.connectSyncAgent,s=a(e),o={worker:s,bufferLength:t,opTimeout:r},n=i(o),n},e.exports.createReadStream=_read_stream_create,e.exports.createWriteStream=function(e,t){return _file(e).createWriter()}},48(e){"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(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))}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,a;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(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-9,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";a='The "'.concat(e,'" ').concat(s," ").concat(i," ").concat(n(t,"type"))}return a+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},382(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=l;var i=r(412),o=r(708);r(698)(l,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];l.prototype[u]||(l.prototype[u]=o.prototype[u])}function l(e){if(!(this instanceof l))return new l(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",f)))}function f(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(l.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(l.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(l.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(l.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},600(e,t,r){"use strict";e.exports=i;var n=r(610);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(698)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},412(e,t,r){"use strict";var n;e.exports=A,A.ReadableState=S,r(7).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},a=r(345),s=r(287).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(838);i=l&&l.debuglog?l.debuglog("stream"):function(){};var f,c,h,d=r(726),p=r(896),g=r(291).getHighWaterMark,y=r(48).F,w=y.ERR_INVALID_ARG_TYPE,m=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(698)(A,a);var _=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(382),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(f||(f=r(141).I),this.decoder=new f(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(382),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function R(e,t,r,n,o){i("readableAddChunk",t);var a,l=e._readableState;if(null===t)l.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,x(e)))}}(e,l);else if(o||(a=function(e,t){var r,n;return n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new w("chunk",["string","Buffer","Uint8Array"],t)),r}(l,t)),a)_(e,a);else if(l.objectMode||t&&t.length>0)if("string"==typeof t||l.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)l.endEmitted?_(e,new v):k(e,l,t,!0);else if(l.ended)_(e,new m);else{if(l.destroyed)return!1;l.reading=!1,l.decoder&&!r?(t=l.decoder.write(t),l.objectMode||0!==t.length?k(e,l,t,!1):L(e,l)):k(e,l,t,!1)}else n||(l.reading=!1,L(e,l));return!l.ended&&(l.length<l.highWaterMark||0===l.length)}function k(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&C(e)),L(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=p.destroy,A.prototype._undestroy=p.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},A.prototype.unshift=function(e){return R(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){f||(f=r(141).I);var t=new f(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var T=1073741824;function O(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=T?e=T:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(x,e))}function x(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,$(e)}function L(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function U(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function j(e){i("readable nexttick read 0"),e.read(0)}function B(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),$(e),t.flowing&&!t.reading&&e.read(0)}function $(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function M(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function P(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(F,t,e))}function F(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?P(this):C(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&P(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=O(r,t))),null===(n=e>0?M(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&P(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){_(this,new b("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?p:s;function s(){i("onend"),e.end()}n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",function t(o,a){i("onunpipe"),o===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",c),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",p),r.removeListener("data",f),l=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())});var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,$(e))}}(r);e.on("drain",u);var l=!1;function f(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!l&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(t){i("onerror",t),p(),e.removeListener("error",c),0===o(e,"error")&&_(e,t)}function h(){e.removeListener("finish",d),p()}function d(){i("onfinish"),e.removeListener("close",h),p()}function p(){i("unpipe"),r.unpipe(e)}return r.on("data",f),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",h),e.once("finish",d),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=N(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?C(this):n.reading||process.nextTick(j,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(U,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(U,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(B,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(955)),c(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=M,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===h&&(h=r(157)),h(A,e,t)})},610(e,t,r){"use strict";e.exports=f;var n=r(48).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(382);function l(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function f(e){if(!(this instanceof f))return new f(e);u.call(this,e),this._transformState={afterTransform:l.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(698)(f,u),f.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},f.prototype._transform=function(e,t,r){r(new i("_transform()"))},f.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},f.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},f.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},708(e,t,r){"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=A,A.WritableState=S;var o,a={deprecate:r(643)},s=r(345),u=r(287).Buffer,l=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(896),c=r(291).getHighWaterMark,h=r(48).F,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,w=h.ERR_STREAM_DESTROYED,m=h.ERR_STREAM_NULL_VALUES,b=h.ERR_STREAM_WRITE_AFTER_END,v=h.ERR_UNKNOWN_ENCODING,_=f.errorOrDestroy;function E(){}function S(e,t,o){i=i||r(382),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(x,e,t),e._writableState.errorEmitted=!0,_(e,n)):(i(n),e._writableState.errorEmitted=!0,_(e,n),x(e,t))}(e,r,n,t,i);else{var o=O(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||T(e,r),n?process.nextTick(k,e,r,o,i):k(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function A(e){var t=this instanceof(i=i||r(382));if(!t&&!o.call(A,this))return new A(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function R(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new w("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function k(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function T(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,R(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var l=r.chunk,f=r.encoding,c=r.callback;if(R(e,t,!1,t.objectMode?1:l.length,l,f,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var r=O(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(698)(A,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===A&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},A.prototype.pipe=function(){_(this,new y)},A.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof l);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new b;_(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new m:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(_(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var l=t.length<t.highWaterMark;if(l||(t.needDrain=!0),t.writing||t.corked){var f=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},f?f.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,s,n,i,o);return l}(this,i,a,e,t,r)),o},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||T(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new p("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=f.destroy,A.prototype._undestroy=f.undestroy,A.prototype._destroy=function(e,t){t(e)}},955(e,t,r){"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(238),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),l=Symbol("ended"),f=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[f]=null,e[a]=null,e[s]=null,t(d(r,!1)))}}function g(e){process.nextTick(p,e)}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[l])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(t,r){process.nextTick(function(){e[u]?r(e[u]):t(d(void 0,!0))})});var r,n=this[f];if(n)r=new Promise(function(e,t){return function(r,n){e.then(function(){t[l]?r(d(void 0,!0)):t[c](r,n)},n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[f]=r,r}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),n),y);e.exports=function(e){var t,r=Object.create(w,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,l,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[h].read();n?(r[f]=null,r[a]=null,r[s]=null,e(d(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[f]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[f]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[f]=null,r[a]=null,r[s]=null,n(d(void 0,!0))),r[l]=!0}),e.on("readable",g.bind(null,r)),r}},726(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(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,s(n.key),n)}}function s(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(287).Buffer,l=r(340).inspect,f=l&&l.custom||"inspect";function c(e,t,r){u.prototype.copy.call(e,t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)c(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:f,value:function(e,t){return l(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},896(e){"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},238(e,t,r){"use strict";var n=r(48).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||f()},l=t._writableState&&t._writableState.finished,f=function(){s=!1,l=!0,a||o.call(t)},c=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,c=!0,s||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return a&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!l?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",f)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",f),t.on("abort",p),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",f),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",f),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",f),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",f),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},157(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},758(e,t,r){"use strict";var n,i=r(48).F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function l(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var f,c=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map(function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",function(){s=!0}),void 0===n&&(n=r(238)),n(e,{readable:t,writable:i},function(e){if(e)return o(e);s=!0,o()});var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,function(e){f||(f=e),e&&h.forEach(u),o||(h.forEach(u),c(f))})});return t.reduce(l)}},291(e,t,r){"use strict";var n=r(48).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},345(e,t,r){e.exports=r(7).EventEmitter},861(e,t,r){var n=r(287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},310(e,t,r){e.exports=i;var n=r(7).EventEmitter;function i(){n.call(this)}r(698)(i,n),i.Readable=r(412),i.Writable=r(708),i.Duplex=r(382),i.Transform=r(610),i.PassThrough=r(600),i.finished=r(238),i.pipeline=r(758),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function l(e){if(f(),0===n.listenerCount(this,"error"))throw e}function f(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",l),e.removeListener("error",l),r.removeListener("end",f),r.removeListener("close",f),e.removeListener("close",f)}return r.on("error",l),e.on("error",l),r.on("end",f),r.on("close",f),e.on("close",f),e.emit("pipe",r),e}},141(e,t,r){"use strict";var n=r(861).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=l,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=f,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function l(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function f(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},643(e,t,r){function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},866(){},340(){},838(){},12(e,t){!function(e){"use strict";var t,r,n,i,o,a,s,u,l,f,c,h,d=e=>{throw TypeError(e)},p=(e,t,r)=>t.has(e)||d("Cannot "+r),g=(e,t,r)=>(p(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),w=(e,t,r,n)=>(p(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);const m="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",b=typeof self<"u"&&self.Blob&&new Blob([(v=m,Uint8Array.from(atob(v),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var v;function _(e){let t;try{if(t=b&&(self.URL||self.webkitURL).createObjectURL(b),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+m,{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}async function E(e,t,r){const n=function(){if(S.length<3){const t=e();return S.push(t),t}{const e=S[A];return A=(A+1)%S.length,e}function e(){const e=new _;let t=0,r={};return e.onmessage=({data:e})=>{var t,n;"callback"===e.evtType?null==(t=r[e.cbId])||t.resolve(e.returnVal):"throwError"===e.evtType&&(null==(n=r[e.cbId])||n.reject(Error(e.errMsg))),delete r[e.cbId]},async function(n,i,o=[]){t+=1;const a=new Promise((e,n)=>{r[t]={resolve:e,reject:n}});return e.postMessage({cbId:t,evtType:n,args:i},o),a}}}();return await n("register",{fileId:e,filePath:t,mode:r}),{read:async(t,r)=>await n("read",{fileId:e,offset:t,size:r}),write:async(t,r)=>await n("write",{fileId:e,data:t,opts:r},[ArrayBuffer.isView(t)?t.buffer:t]),close:async()=>await n("close",{fileId:e}),truncate:async t=>await n("truncate",{fileId:e,newSize:t}),getSize:async()=>await n("getSize",{fileId:e}),flush:async()=>await n("flush",{fileId:e})}}const S=[];let A=0;function R(e){if("/"===e)return{parent:null,name:""};const t=e.split("/").filter(e=>e.length>0);if(0===t.length)throw Error("Invalid path");return{name:t[t.length-1],parent:"/"+t.slice(0,-1).join("/")}}async function k(e,t){const{parent:r,name:n}=R(e);if(null==r)return await navigator.storage.getDirectory();const i=r.split("/").filter(e=>e.length>0);try{let e=await navigator.storage.getDirectory();for(const r of i)e=await e.getDirectoryHandle(r,{create:t.create});return t.isFile?await e.getFileHandle(n,{create:t.create}):await e.getDirectoryHandle(n,{create:t.create})}catch(e){if("NotFoundError"===e.name)return null;throw e}}async function T(e){const{parent:t,name:r}=R(e);if(null==t){const e=await navigator.storage.getDirectory();for await(const t of e.keys())await e.removeEntry(t,{recursive:!0});return}const n=await k(t,{create:!1,isFile:!1});if(null!=n)try{await n.removeEntry(r,{recursive:!0})}catch(e){if("NotFoundError"===e.name)return;throw e}}function O(e,t){return`${e}/${t}`.replace("//","/")}function C(e){return new x(e)}t=new WeakMap,r=new WeakMap,n=new WeakMap;let x=class e{constructor(e){y(this,t),y(this,r),y(this,n),w(this,t,e);const{parent:i,name:o}=R(e);w(this,r,o),w(this,n,i)}get kind(){return"dir"}get name(){return g(this,r)}get path(){return g(this,t)}get parent(){return null==g(this,n)?null:C(g(this,n))}async create(){return await k(g(this,t),{create:!0,isFile:!1}),C(g(this,t))}async exists(){return await k(g(this,t),{create:!1,isFile:!1})instanceof FileSystemDirectoryHandle}async remove(e={}){for(const t of await this.children())try{await t.remove(e)}catch(e){console.warn(e)}try{await T(g(this,t))}catch(e){console.warn(e)}}async children(){const e=await k(g(this,t),{create:!1,isFile:!1});if(null==e)return[];const r=[];for await(const n of e.values())r.push(("file"===n.kind?I:C)(O(g(this,t),n.name)));return r}async copyTo(t){if(!await this.exists())throw Error(`dir ${this.path} not exists`);if(t instanceof e){const e=await t.exists()?C(O(t.path,this.name)):t;return await e.create(),await Promise.all((await this.children()).map(t=>t.copyTo(e))),e}if(t instanceof FileSystemDirectoryHandle)return await Promise.all((await this.children()).map(async e=>{"file"===e.kind?await e.copyTo(await t.getFileHandle(e.name,{create:!0})):await e.copyTo(await t.getDirectoryHandle(e.name,{create:!0}))})),null;throw Error("Illegal target type")}async moveTo(e){const t=await this.copyTo(e);return await this.remove(),t}};const L=new Map;function I(e,t="rw"){if("rw"===t){const r=L.get(e)??new B(e,t);return L.set(e,r),r}return new B(e,t)}async function U(e,t,r={overwrite:!0}){if(t instanceof B)return void await U(e,await t.stream(),r);const n=await(e instanceof B?e:I(e,"rw")).createWriter();try{if(r.overwrite&&await n.truncate(0),t instanceof ReadableStream){const e=t.getReader();for(;;){const{done:t,value:r}=await e.read();if(t)break;await n.write(r)}}else await n.write(t)}catch(e){throw e}finally{await n.close()}}let j=0;i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,l=new WeakMap,f=new WeakMap,c=new WeakMap,h=new WeakMap;let B=class e{constructor(e,t){y(this,i),y(this,o),y(this,a),y(this,s),y(this,u),y(this,l,0),y(this,f,async()=>{}),y(this,c,(()=>{let e=null;return()=>(w(this,l,g(this,l)+1),null!=e||(e=new Promise(async(t,r)=>{try{const r=await E(g(this,u),g(this,i),g(this,s));w(this,f,async()=>{null!=e&&(e=null,w(this,l,0),await r.close().catch(console.error))}),t([r,async()=>{w(this,l,g(this,l)-1),!(g(this,l)>0)&&(e=null,await r.close())}])}catch(e){r(e)}})),e)})()),y(this,h,!1),w(this,u,++j),w(this,i,e),w(this,s,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[t]);const{parent:r,name:n}=R(e);if(null==r)throw Error("Invalid path");w(this,a,n),w(this,o,r)}get kind(){return"file"}get path(){return g(this,i)}get name(){return g(this,a)}get parent(){return null==g(this,o)?null:C(g(this,o))}async createWriter(){if("read-only"===g(this,s))throw Error("file is read-only");if(g(this,h))throw Error("Other writer have not been closed");w(this,h,!0);try{const e=new TextEncoder,[t,r]=await g(this,c).call(this);let n=await t.getSize(),i=!1;return{write:async(r,o={})=>{if(i)throw Error("Writer is closed");const a="string"==typeof r?e.encode(r):r,s=o.at??n,u=a.byteLength;return n=s+u,await t.write(a,{at:s})},truncate:async e=>{if(i)throw Error("Writer is closed");await t.truncate(e),n>e&&(n=e)},flush:async()=>{if(i)throw Error("Writer is closed");await t.flush()},close:async()=>{if(i)throw Error("Writer is closed");i=!0,w(this,h,!1),await r()}}}catch(e){throw w(this,h,!1),e}}async createReader(){const[e,t]=await g(this,c).call(this);let r=!1,n=0;return{read:async(t,i={})=>{if(r)throw Error("Reader is closed");const o=i.at??n,a=await e.read(o,t);return n=o+a.byteLength,a},getSize:async()=>{if(r)throw Error("Reader is closed");return await e.getSize()},close:async()=>{r||(r=!0,await t())}}}async text(){return(new TextDecoder).decode(await this.arrayBuffer())}async arrayBuffer(){const e=await k(g(this,i),{create:!1,isFile:!0});return null==e?new ArrayBuffer(0):(await e.getFile()).arrayBuffer()}async stream(){const e=await this.getOriginFile();return null==e?new ReadableStream({pull:e=>{e.close()}}):e.stream()}async getOriginFile(){var e;return null==(e=await k(g(this,i),{create:!1,isFile:!0}))?void 0:e.getFile()}async getSize(){const e=await k(g(this,i),{create:!1,isFile:!0});return null==e?0:(await e.getFile()).size}async exists(){return await k(g(this,i),{create:!1,isFile:!0})instanceof FileSystemFileHandle}async remove(e={}){if(!0===e.force)return await g(this,f).call(this),await T(g(this,i)),void L.delete(g(this,i));if(g(this,l)>0)throw Error("exists unclosed reader/writer");await T(g(this,i))}async copyTo(t){if(t instanceof e)return t.path===this.path?this:(await U(t,this),t);if(t instanceof x){if(!await this.exists())throw Error(`file ${this.path} not exists`);return await this.copyTo(I(O(t.path,this.name)))}if(t instanceof FileSystemFileHandle)return await(await this.stream()).pipeTo(await t.createWritable()),null;throw Error("Illegal target type")}async moveTo(e){const t=await this.copyTo(e);return await this.remove(),t}};const $="/.opfs-tools-temp-dir";async function M(e){try{if("file"===e.kind){if(!await e.exists())return!0;const t=await e.createWriter();await t.truncate(0),await t.close(),await e.remove()}else await e.remove();return!0}catch(e){return console.warn(e),!1}}const P=[];let F=!1;(async function(){var e;!0!==globalThis.__opfs_tools_tmpfile_init__&&(globalThis.__opfs_tools_tmpfile_init__=!0,null!=globalThis.FileSystemDirectoryHandle&&null!=globalThis.FileSystemFileHandle&&null!=(null==(e=globalThis.navigator)?void 0:e.storage.getDirectory)&&(setInterval(async()=>{for(const e of await C($).children()){const t=/^\d+-(\d+)$/.exec(e.name);(null==t||Date.now()-Number(t[1])>2592e5)&&await M(e)}},6e4),await async function(){if(null==globalThis.localStorage)return;const e="OPFS_TOOLS_EXPIRES_TMP_FILES";F||(F=!0,globalThis.addEventListener("unload",()=>{0!==P.length&&localStorage.setItem(e,`${localStorage.getItem(e)??""},${P.join(",")}`)}));let t=localStorage.getItem(e)??"";for(const e of t.split(","))0!==e.length&&await M(I(`${$}/${e}`))&&(t=t.replace(e,""));localStorage.setItem(e,t.replace(/,{2,}/g,","))}()))})(),e.dir=C,e.file=I,e.rollfile=function(e,t){let r=I(e),n=0,i=r.createWriter(),o=r.createReader();return{append:async e=>{const r=await i;n+=await r.write(e),n>=t&&await(async e=>{const t=await(await o).read(n,{at:Math.round(.3*n)});n=await e.write(t,{at:0}),await e.truncate(n)})(r)},text:r.text.bind(r),remove:async()=>{await(await o).close(),await(await i).close(),await r.remove()},getSize:async()=>n}},e.tmpfile=function(){const e=`${Math.random().toString().slice(2)}-${Date.now()}`;return P.push(e),I(`${$}/${e}`)},e.write=U,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)},805(e,t,r){"use strict";r.r(t),r.d(t,{ABORT_ERROR:()=>k,CURRENT_DIR:()=>qe,NOT_FOUND_ERROR:()=>Ve,ROOT_DIR:()=>Xe,TIMEOUT_ERROR:()=>T,TMP_DIR:()=>Je,appendFile:()=>Rt,appendFileSync:()=>mr,assertAbsolutePath:()=>Ke,assertFileUrl:()=>Qe,connectSyncAgent:()=>or,copy:()=>kt,copySync:()=>br,createFile:()=>gt,createFileSync:()=>lr,deleteTemp:()=>jt,deleteTempSync:()=>Er,downloadFile:()=>Et,emptyDir:()=>Tt,emptyDirSync:()=>vr,exists:()=>Ot,existsSync:()=>_r,generateTempPath:()=>ut,getFileDataByHandle:()=>pt,getSyncMessenger:()=>ar,isDirectoryHandle:()=>ht,isFileHandle:()=>ct,isFileHandleLike:()=>dt,isOPFSSupported:()=>Zt,isTempPath:()=>lt,mkTemp:()=>Ut,mkTempSync:()=>Sr,mkdir:()=>yt,mkdirSync:()=>fr,move:()=>Ct,moveSync:()=>cr,pruneTemp:()=>Bt,pruneTempSync:()=>Ar,readBlobFile:()=>xt,readBlobFileSync:()=>Rr,readDir:()=>wt,readDirSync:()=>hr,readFile:()=>mt,readFileSync:()=>dr,readJsonFile:()=>Lt,readJsonFileSync:()=>kr,readTextFile:()=>It,readTextFileSync:()=>Tr,remove:()=>bt,removeSync:()=>pr,setSyncMessenger:()=>sr,startSyncAgent:()=>ir,stat:()=>vt,statSync:()=>gr,toFileSystemHandleLike:()=>ft,unzip:()=>Mt,unzipFromUrl:()=>Pt,unzipSync:()=>Or,uploadFile:()=>Ft,writeFile:()=>_t,writeFileSync:()=>wr,zip:()=>Dt,zipFromUrl:()=>Wt,zipSync:()=>Cr});function n(e,t){if(!e)throw new Error("Invariant failed")}function i(e){if("string"!=typeof e)throw new TypeError(`Path must be a string, received "${JSON.stringify(e)}"`)}function o(e){return e=function(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function a(e,t){if(e.length<=1)return e;let r=e.length;for(let n=e.length-1;n>0&&t(e.charCodeAt(n));n--)r=n;return e.slice(0,r)}function s(e){return 47===e}function u(e,t=""){e instanceof URL&&(e=o(e)),function(e,t){if(i(e),0===e.length)return e;if("string"!=typeof t)throw new TypeError(`Suffix must be a string, received "${JSON.stringify(t)}"`)}(e,t);const r=function(e,t,r=0){let n=!1,i=e.length;for(let o=e.length-1;o>=r;--o)if(t(e.charCodeAt(o))){if(n){r=o+1;break}}else n||(n=!0,i=o+1);return e.slice(r,i)}(e,s),n=a(r,s);return t?function(e,t){if(t.length>=e.length)return e;const r=e.length-t.length;for(let n=t.length-1;n>=0;--n)if(e.charCodeAt(r+n)!==t.charCodeAt(n))return e;return e.slice(0,-t.length)}(n,t):n}function l(e){e instanceof URL&&(e=o(e)),function(e){i(e),e.length}(e);let t=-1,r=!1;for(let n=e.length-1;n>=1;--n)if(s(e.charCodeAt(n))){if(r){t=n;break}}else r=!0;return-1===t?s(e.charCodeAt(0))?"/":".":a(e.slice(0,t),s)}function f(e){e instanceof URL&&(e=o(e)),i(e);let t=-1,r=0,n=-1,a=!0,u=0;for(let i=e.length-1;i>=0;--i){const o=e.charCodeAt(i);if(s(o)){if(!a){r=i+1;break}}else-1===n&&(a=!1,n=i+1),46===o?-1===t?t=i:1!==u&&(u=1):-1!==t&&(u=-1)}return-1===t||-1===n||0===u||1===u&&t===n-1&&t===r+1?"":e.slice(t,n)}function c(e,...t){if(void 0===e)return".";e instanceof URL&&(e=o(e)),(t=e?[e,...t]:t).forEach(e=>i(e));const r=t.filter(e=>e.length>0).join("/");return""===r?".":function(e){e instanceof URL&&(e=o(e)),function(e){i(e),e.length}(e);const t=s(e.charCodeAt(0)),r=s(e.charCodeAt(e.length-1));return e=function(e,t,r,n){let i,o="",a=0,s=-1,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)i=e.charCodeAt(l);else{if(n(i))break;i=47}if(n(i)){if(s===l-1||1===u);else if(s!==l-1&&2===u){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2)){if(o.length>2){const e=o.lastIndexOf(r);-1===e?(o="",a=0):(o=o.slice(0,e),a=o.length-1-o.lastIndexOf(r)),s=l,u=0;continue}if(2===o.length||1===o.length){o="",a=0,s=l,u=0;continue}}t&&(o.length>0?o+=`${r}..`:o="..",a=2)}else o.length>0?o+=r+e.slice(s+1,l):o=e.slice(s+1,l),a=l-s-1;s=l,u=0}else 46===i&&-1!==u?++u:u=-1}return o}(e,!t,"/",s),0!==e.length||t||(e="."),e.length>0&&r&&(e+="/"),t?`/${e}`:e}(r)}const h=Symbol("Option kind"),d=Symbol("Result kind"),p=Promise.resolve(!0),g=Promise.resolve(!1);function y(e){const t=Object.freeze({[Symbol.toStringTag]:"Option",[h]:"Some",*[Symbol.iterator](){yield e},toString:()=>`Some(${e})`,isSome:()=>!0,isNone:()=>!1,isSomeAnd:t=>t(e),isSomeAndAsync:t=>Promise.resolve(t(e)),isNoneOr:t=>t(e),isNoneOrAsync:t=>Promise.resolve(t(e)),expect:t=>e,unwrap:()=>e,unwrapOr:t=>e,unwrapOrElse:t=>e,unwrapOrElseAsync:t=>Promise.resolve(e),okOr:t=>b(e),okOrElse:t=>b(e),transpose:()=>(S(e),e.isOk()?b(y(e.unwrap())):v(e.unwrapErr())),filter:r=>r(e)?t:w,flatten:()=>(E(e),e),map:t=>y(t(e)),mapOr:(t,r)=>r(e),mapOrElse:(t,r)=>r(e),zip:t=>(E(t),t.isSome()?y([e,t.unwrap()]):w),zipWith:(t,r)=>(E(t),t.isSome()?y(r(e,t.unwrap())):w),unzip(){const t=e;if(!Array.isArray(t)||2!==t.length)throw new TypeError("Option::unzip() requires a 2-element tuple, received "+(Array.isArray(t)?`array with ${t.length} elements`:typeof t));const[r,n]=t;return[y(r),y(n)]},reduce:(r,n)=>(E(r),r.isSome()?y(n(e,r.unwrap())):t),and:e=>(E(e),e),andThen:t=>t(e),andThenAsync:t=>Promise.resolve(t(e)),or:e=>t,orElse:e=>t,orElseAsync:e=>Promise.resolve(t),xor:e=>(E(e),e.isSome()?w:t),inspect:r=>(r(e),t),eq:t=>(E(t),t.isSome()&&t.unwrap()===e)});return t}const w=Object.freeze({[Symbol.toStringTag]:"Option",[h]:"None",*[Symbol.iterator](){},toString:()=>"None",isSome:()=>!1,isNone:()=>!0,isSomeAnd:e=>!1,isSomeAndAsync:e=>g,isNoneOr:e=>!0,isNoneOrAsync:e=>p,expect(e){throw new TypeError(e)},unwrap(){throw new TypeError("Option::unwrap() called on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),unwrapOrElseAsync:e=>Promise.resolve(e()),okOr:e=>v(e),okOrElse:e=>v(e()),transpose:()=>b(w),filter:e=>w,flatten:()=>w,map:e=>w,mapOr:(e,t)=>e,mapOrElse:(e,t)=>e(),zip:e=>w,zipWith:(e,t)=>w,unzip:()=>[w,w],reduce:(e,t)=>(E(e),e),and:e=>w,andThen:e=>w,andThenAsync:e=>m,or:e=>(E(e),e),orElse:e=>e(),orElseAsync:e=>Promise.resolve(e()),xor:e=>(E(e),e.isSome()?e:w),inspect:e=>w,eq:e=>(E(e),e===w)}),m=Promise.resolve(w);function b(e){const t=Object.freeze({[Symbol.toStringTag]:"Result",[d]:"Ok",*[Symbol.iterator](){yield e},toString:()=>`Ok(${e})`,isOk:()=>!0,isErr:()=>!1,isOkAnd:t=>t(e),isOkAndAsync:t=>Promise.resolve(t(e)),isErrAnd:e=>!1,isErrAndAsync:e=>g,expect:t=>e,unwrap:()=>e,unwrapOr:t=>e,unwrapOrElse:t=>e,unwrapOrElseAsync:t=>Promise.resolve(e),expectErr(t){throw new TypeError(`${t}: ${e}`)},unwrapErr(){throw new TypeError("Result::unwrapErr() called on an `Ok` value")},intoOk:()=>e,intoErr(){throw new TypeError("Result::intoErr() called on an `Ok` value")},ok:()=>y(e),err:()=>w,transpose:()=>(E(e),e.isSome()?y(b(e.unwrap())):w),map:t=>b(t(e)),mapErr:e=>t,mapOr:(t,r)=>r(e),mapOrElse:(t,r)=>r(e),flatten:()=>(S(e),e),and:e=>(S(e),e),or:e=>t,andThen:t=>t(e),andThenAsync:t=>Promise.resolve(t(e)),orElse:e=>t,orElseAsync:e=>Promise.resolve(t),inspect:r=>(r(e),t),inspectErr:e=>t,eq:t=>(S(t),t.isOk()&&t.unwrap()===e),asOk:()=>t,asErr(){throw new TypeError("Result::asErr() called on an `Ok` value")},andTryAsync(t){try{const r=t(e);return Promise.resolve(r).then(b,v)}catch(e){return Promise.resolve(v(e))}},orTryAsync:e=>Promise.resolve(t)});return t}function v(e){const t=Object.freeze({[Symbol.toStringTag]:"Result",[d]:"Err",*[Symbol.iterator](){},toString:()=>`Err(${e})`,isOk:()=>!1,isErr:()=>!0,isOkAnd:e=>!1,isOkAndAsync:e=>g,isErrAnd:t=>t(e),isErrAndAsync:t=>Promise.resolve(t(e)),expect(t){throw new TypeError(`${t}: ${e}`)},unwrap(){throw new TypeError("Result::unwrap() called on an `Err` value")},unwrapOr:e=>e,unwrapOrElse:t=>t(e),unwrapOrElseAsync:t=>Promise.resolve(t(e)),expectErr:t=>e,unwrapErr:()=>e,intoOk(){throw new TypeError("Result::intoOk() called on an `Err` value")},intoErr:()=>e,ok:()=>w,err:()=>y(e),transpose:()=>y(t),map:e=>t,mapErr:t=>v(t(e)),mapOr:(e,t)=>e,mapOrElse:(t,r)=>t(e),flatten:()=>t,and:e=>t,or:e=>(S(e),e),andThen:e=>t,andThenAsync:e=>Promise.resolve(t),orElse:t=>t(e),orElseAsync:t=>Promise.resolve(t(e)),inspect:e=>t,inspectErr:r=>(r(e),t),eq:t=>(S(t),t.isErr()&&t.unwrapErr()===e),asOk(){throw new TypeError("Result::asOk() called on an `Err` value")},asErr:()=>t,andTryAsync:e=>Promise.resolve(t),orTryAsync(t){try{const r=t(e);return Promise.resolve(r).then(b,v)}catch(e){return Promise.resolve(v(e))}}});return t}function _(e){try{return null===e?"null":void 0===e?"undefined":"object"==typeof e?Object.prototype.toString.call(e):String(e)}catch{return"[unable to stringify]"}}function E(e){if(!function(e){return null!=e&&"object"==typeof e&&h in e}(e))throw new TypeError(`Expected an Option, but received: ${_(e)}`)}function S(e){if(!function(e){return null!=e&&"object"==typeof e&&d in e}(e))throw new TypeError(`Expected a Result, but received: ${_(e)}`)}const A=b(!1),R=b(),k="AbortError",T="TimeoutError";class O extends Error{name="FetchError";status;constructor(e,t){super(e),this.status=t}}function C(e,t){const r=function(e){if(e instanceof URL)return e;try{const t="undefined"!=typeof location?location.href:void 0;return new URL(e,t)}catch{throw new TypeError(`Invalid URL: ${e}`)}}(e),n=t??{},{retries:i,delay:o,when:a,onRetry:s}=function(e){const{responseType:t,timeout:r,retry:n=0,onProgress:i,onChunk:o}=e;if(null!=t){const e=["text","arraybuffer","blob","json","bytes","stream"];if(!e.includes(t))throw new TypeError(`responseType must be one of ${e.join(", ")} but received ${t}`)}if(null!=r){if("number"!=typeof r)throw new TypeError("timeout must be a number but received "+typeof r);if(r<=0)throw new Error(`timeout must be a number greater than 0 but received ${r}`)}if(null!=i&&"function"!=typeof i)throw new TypeError("onProgress callback must be a function but received "+typeof i);if(null!=o&&"function"!=typeof o)throw new TypeError("onChunk callback must be a function but received "+typeof o);let a,s,u=0,l=0;if("number"==typeof n?u=n:n&&"object"==typeof n&&(u=n.retries??0,l=n.delay??0,a=n.when,s=n.onRetry),!Number.isInteger(u))throw new TypeError(`Retry count must be an integer but received ${u}`);if(u<0)throw new Error(`Retry count must be non-negative but received ${u}`);if("number"==typeof l){if(l<0)throw new Error(`Retry delay must be a non-negative number but received ${l}`)}else if("function"!=typeof l)throw new TypeError("Retry delay must be a number or a function but received "+typeof l);if(null!=a&&!Array.isArray(a)&&"function"!=typeof a)throw new TypeError("Retry when condition must be an array of status codes or a function but received "+typeof a);if(null!=s&&"function"!=typeof s)throw new TypeError("Retry onRetry callback must be a function but received "+typeof s);return{retries:u,delay:l,when:a,onRetry:s}}(n),{abortable:u=!1,responseType:l,timeout:f,onProgress:c,onChunk:h,...d}=n,p=d.signal;let g;u&&(g=new AbortController);const y=(e,t)=>e.name!==k&&(a?Array.isArray(a)?e instanceof O&&a.includes(e.status):a(e,t):!(e instanceof O)),w=e=>"function"==typeof o?o(e):o,m=async()=>{(()=>{const e=[];p&&e.push(p),g&&e.push(g.signal),"number"==typeof f&&e.push(AbortSignal.timeout(f)),e.length>0&&(d.signal=1===e.length?e[0]:AbortSignal.any(e))})();try{const e=await fetch(r,d);return e.ok?await _(e):(e.body?.cancel().catch(()=>{}),v(new O(e.statusText,e.status)))}catch(e){return v(e instanceof Error?e:L(e))}},_=async e=>{switch(e.body&&(c||h)&&(async e=>{let t,r=0;if(c){const r=e.headers.get("content-length");if(null==r)try{c(v(new Error("No content-length in response headers")))}catch{}else t=Number.parseInt(r,10)}const n=e.clone().body;try{for await(const e of n){if(h)try{h(e)}catch{}if(c&&null!=t){r+=e.byteLength;try{c(b({totalByteLength:t,completedByteLength:r}))}catch{}}}}catch{}})(e),l){case"json":if(null==e.body)return b(null);try{return b(await e.json())}catch{return v(new Error("Response is invalid json while responseType is json"))}case"text":return b(await e.text());case"bytes":return"function"==typeof e.bytes?b(await e.bytes()):b(new Uint8Array(await e.arrayBuffer()));case"arraybuffer":return b(await e.arrayBuffer());case"blob":return b(await e.blob());case"stream":return b(e.body);default:return b(e)}},E=(async()=>{let e,t=0;do{if(t>0){if(g?.signal.aborted)return v(g.signal.reason);const r=w(t);if(r>0&&(await x(r),g?.signal.aborted))return v(g.signal.reason);try{s?.(e,t)}catch{}}const r=await m();if(r.isOk())return r;e=r.unwrapErr(),t++}while(t<=i&&y(e,t));return v(e)})();return u&&g?{abort(e){e instanceof Error?g.abort(e):null!=e?g.abort(L(e)):g.abort()},get aborted(){return g.signal.aborted},get result(){return E}}:E}function x(e){return new Promise(t=>setTimeout(t,e))}function L(e){const t=new Error("string"==typeof e?e:String(e));return t.name=k,t.cause=e,t}var I={},U=Uint8Array,j=Uint16Array,B=Int32Array,$=new U([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),M=new U([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),P=new U([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),F=function(e,t){for(var r=new j(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var i=new B(r[30]);for(n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return{b:r,r:i}},N=F($,2),D=N.b,W=N.r;D[28]=258,W[258]=28;for(var Z=F(M,0),z=Z.b,Y=Z.r,G=new j(32768),H=0;H<32768;++H){var V=(43690&H)>>1|(21845&H)<<1;V=(61680&(V=(52428&V)>>2|(13107&V)<<2))>>4|(3855&V)<<4,G[H]=((65280&V)>>8|(255&V)<<8)>>1}var X=function(e,t,r){for(var n=e.length,i=0,o=new j(t);i<n;++i)e[i]&&++o[e[i]-1];var a,s=new j(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(r){a=new j(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var l=i<<4|e[i],f=t-e[i],c=s[e[i]-1]++<<f,h=c|(1<<f)-1;c<=h;++c)a[G[c]>>u]=l}else for(a=new j(n),i=0;i<n;++i)e[i]&&(a[i]=G[s[e[i]-1]++]>>15-e[i]);return a},q=new U(288);for(H=0;H<144;++H)q[H]=8;for(H=144;H<256;++H)q[H]=9;for(H=256;H<280;++H)q[H]=7;for(H=280;H<288;++H)q[H]=8;var J=new U(32);for(H=0;H<32;++H)J[H]=5;var K=X(q,9,0),Q=X(q,9,1),ee=X(J,5,0),te=X(J,5,1),re=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},ne=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},ie=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},oe=function(e){return(e+7)/8|0},ae=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new U(e.subarray(t,r))},se=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ue=function(e,t,r){var n=new Error(t||se[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,ue),!r)throw n;return n},le=function(e,t,r,n){var i=e.length,o=n?n.length:0;if(!i||t.f&&!t.l)return r||new U(0);var a=!r,s=a||2!=t.i,u=t.i;a&&(r=new U(3*i));var l=function(e){var t=r.length;if(e>t){var n=new U(Math.max(2*t,e));n.set(r),r=n}},f=t.f||0,c=t.p||0,h=t.b||0,d=t.l,p=t.d,g=t.m,y=t.n,w=8*i;do{if(!d){f=ne(e,c,1);var m=ne(e,c+1,3);if(c+=3,!m){var b=e[(x=oe(c)+4)-4]|e[x-3]<<8,v=x+b;if(v>i){u&&ue(0);break}s&&l(h+b),r.set(e.subarray(x,v),h),t.b=h+=b,t.p=c=8*v,t.f=f;continue}if(1==m)d=Q,p=te,g=9,y=5;else if(2==m){var _=ne(e,c,31)+257,E=ne(e,c+10,15)+4,S=_+ne(e,c+5,31)+1;c+=14;for(var A=new U(S),R=new U(19),k=0;k<E;++k)R[P[k]]=ne(e,c+3*k,7);c+=3*E;var T=re(R),O=(1<<T)-1,C=X(R,T,1);for(k=0;k<S;){var x,L=C[ne(e,c,O)];if(c+=15&L,(x=L>>4)<16)A[k++]=x;else{var I=0,j=0;for(16==x?(j=3+ne(e,c,3),c+=2,I=A[k-1]):17==x?(j=3+ne(e,c,7),c+=3):18==x&&(j=11+ne(e,c,127),c+=7);j--;)A[k++]=I}}var B=A.subarray(0,_),F=A.subarray(_);g=re(B),y=re(F),d=X(B,g,1),p=X(F,y,1)}else ue(1);if(c>w){u&&ue(0);break}}s&&l(h+131072);for(var N=(1<<g)-1,W=(1<<y)-1,Z=c;;Z=c){var Y=(I=d[ie(e,c)&N])>>4;if((c+=15&I)>w){u&&ue(0);break}if(I||ue(2),Y<256)r[h++]=Y;else{if(256==Y){Z=c,d=null;break}var G=Y-254;if(Y>264){var H=$[k=Y-257];G=ne(e,c,(1<<H)-1)+D[k],c+=H}var V=p[ie(e,c)&W],q=V>>4;if(V||ue(3),c+=15&V,F=z[q],q>3&&(H=M[q],F+=ie(e,c)&(1<<H)-1,c+=H),c>w){u&&ue(0);break}s&&l(h+131072);var J=h+G;if(h<F){var K=o-F,ee=Math.min(F,J);for(K+h<0&&ue(3);h<ee;++h)r[h]=n[K+h]}for(;h<J;++h)r[h]=r[h-F]}}t.l=d,t.p=Z,t.b=h,t.f=f,d&&(f=1,t.m=g,t.d=p,t.n=y)}while(!f);return h!=r.length&&a?ae(r,0,h):r.subarray(0,h)},fe=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},ce=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},he=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,o=r.slice();if(!i)return{t:be,l:0};if(1==i){var a=new U(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var s=r[0],u=r[1],l=0,f=1,c=2;for(r[0]={s:-1,f:s.f+u.f,l:s,r:u};f!=i-1;)s=r[r[l].f<r[c].f?l++:c++],u=r[l!=f&&r[l].f<r[c].f?l++:c++],r[f++]={s:-1,f:s.f+u.f,l:s,r:u};var h=o[0].s;for(n=1;n<i;++n)o[n].s>h&&(h=o[n].s);var d=new j(h+1),p=de(r[f-1],d,0);if(p>t){n=0;var g=0,y=p-t,w=1<<y;for(o.sort(function(e,t){return d[t.s]-d[e.s]||e.f-t.f});n<i;++n){var m=o[n].s;if(!(d[m]>t))break;g+=w-(1<<p-d[m]),d[m]=t}for(g>>=y;g>0;){var b=o[n].s;d[b]<t?g-=1<<t-d[b]++-1:++n}for(;n>=0&&g;--n){var v=o[n].s;d[v]==t&&(--d[v],++g)}p=t}return{t:new U(d),l:p}},de=function(e,t,r){return-1==e.s?Math.max(de(e.l,t,r+1),de(e.r,t,r+1)):t[e.s]=r},pe=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new j(++t),n=0,i=e[0],o=1,a=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return{c:r.subarray(0,n),n:t}},ge=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},ye=function(e,t,r){var n=r.length,i=oe(t+2);e[i]=255&n,e[i+1]=n>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<n;++o)e[i+o+4]=r[o];return 8*(i+4+n)},we=function(e,t,r,n,i,o,a,s,u,l,f){fe(t,f++,r),++i[256];for(var c=he(i,15),h=c.t,d=c.l,p=he(o,15),g=p.t,y=p.l,w=pe(h),m=w.c,b=w.n,v=pe(g),_=v.c,E=v.n,S=new j(19),A=0;A<m.length;++A)++S[31&m[A]];for(A=0;A<_.length;++A)++S[31&_[A]];for(var R=he(S,7),k=R.t,T=R.l,O=19;O>4&&!k[P[O-1]];--O);var C,x,L,I,U=l+5<<3,B=ge(i,q)+ge(o,J)+a,F=ge(i,h)+ge(o,g)+a+14+3*O+ge(S,k)+2*S[16]+3*S[17]+7*S[18];if(u>=0&&U<=B&&U<=F)return ye(t,f,e.subarray(u,u+l));if(fe(t,f,1+(F<B)),f+=2,F<B){C=X(h,d,0),x=h,L=X(g,y,0),I=g;var N=X(k,T,0);for(fe(t,f,b-257),fe(t,f+5,E-1),fe(t,f+10,O-4),f+=14,A=0;A<O;++A)fe(t,f+3*A,k[P[A]]);f+=3*O;for(var D=[m,_],W=0;W<2;++W){var Z=D[W];for(A=0;A<Z.length;++A){var z=31&Z[A];fe(t,f,N[z]),f+=k[z],z>15&&(fe(t,f,Z[A]>>5&127),f+=Z[A]>>12)}}}else C=K,x=q,L=ee,I=J;for(A=0;A<s;++A){var Y=n[A];if(Y>255){ce(t,f,C[257+(z=Y>>18&31)]),f+=x[z+257],z>7&&(fe(t,f,Y>>23&31),f+=$[z]);var G=31&Y;ce(t,f,L[G]),f+=I[G],G>3&&(ce(t,f,Y>>5&8191),f+=M[G])}else ce(t,f,C[Y]),f+=x[Y]}return ce(t,f,C[256]),f+x[256]},me=new B([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),be=new U(0),ve=function(e,t,r,n,i,o){var a=o.z||e.length,s=new U(n+a+5*(1+Math.ceil(a/7e3))+i),u=s.subarray(n,s.length-i),l=o.l,f=7&(o.r||0);if(t){f&&(u[0]=o.r>>3);for(var c=me[t-1],h=c>>13,d=8191&c,p=(1<<r)-1,g=o.p||new j(32768),y=o.h||new j(p+1),w=Math.ceil(r/3),m=2*w,b=function(t){return(e[t]^e[t+1]<<w^e[t+2]<<m)&p},v=new B(25e3),_=new j(288),E=new j(32),S=0,A=0,R=o.i||0,k=0,T=o.w||0,O=0;R+2<a;++R){var C=b(R),x=32767&R,L=y[C];if(g[x]=L,y[C]=x,T<=R){var I=a-R;if((S>7e3||k>24576)&&(I>423||!l)){f=we(e,u,0,v,_,E,A,k,O,R-O,f),k=S=A=0,O=R;for(var P=0;P<286;++P)_[P]=0;for(P=0;P<30;++P)E[P]=0}var F=2,N=0,D=d,Z=x-L&32767;if(I>2&&C==b(R-Z))for(var z=Math.min(h,I)-1,G=Math.min(32767,R),H=Math.min(258,I);Z<=G&&--D&&x!=L;){if(e[R+F]==e[R+F-Z]){for(var V=0;V<H&&e[R+V]==e[R+V-Z];++V);if(V>F){if(F=V,N=Z,V>z)break;var X=Math.min(Z,V-2),q=0;for(P=0;P<X;++P){var J=R-Z+P&32767,K=J-g[J]&32767;K>q&&(q=K,L=J)}}}Z+=(x=L)-(L=g[x])&32767}if(N){v[k++]=268435456|W[F]<<18|Y[N];var Q=31&W[F],ee=31&Y[N];A+=$[Q]+M[ee],++_[257+Q],++E[ee],T=R+F,++S}else v[k++]=e[R],++_[e[R]]}}for(R=Math.max(R,T);R<a;++R)v[k++]=e[R],++_[e[R]];f=we(e,u,l,v,_,E,A,k,O,R-O,f),l||(o.r=7&f|u[f/8|0]<<3,f-=7,o.h=y,o.p=g,o.i=R,o.w=T)}else{for(R=o.w||0;R<a+l;R+=65535){var te=R+65535;te>=a&&(u[f/8|0]=l,te=a),f=ye(u,f+1,e.subarray(R,te))}o.i=a}return ae(s,0,n+oe(f)+i)},_e=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),Ee=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),a=new U(o.length+e.length);a.set(o),a.set(e,o.length),e=a,i.w=o.length}return ve(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,i)},Se=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},Ae=function(e,t,r){for(var n=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var s=n[a],u=o[a];if("function"==typeof s){t+=";"+u+"=";var l=s.toString();if(s.prototype)if(-1!=l.indexOf("[native code]")){var f=l.indexOf(" ",8)+1;t+=l.slice(f,l.indexOf("(",f))}else for(var c in t+=l,s.prototype)t+=";"+u+".prototype."+c+"="+s.prototype[c].toString();else t+=l}else r[u]=s}return t},Re=[],ke=function(){return[U,j,B,$,M,P,D,z,Q,te,G,se,X,re,ne,ie,oe,ae,ue,le,$e,Oe,Ce]},Te=function(){return[U,j,B,$,M,P,W,Y,K,q,ee,J,G,me,be,X,fe,ce,he,de,pe,ge,ye,we,oe,ae,ve,Ee,Be,Oe]},Oe=function(e){return postMessage(e,[e.buffer])},Ce=function(e){return e&&{out:e.size&&new U(e.size),dictionary:e.dictionary}},xe=function(e,t,r,n,i,o){var a=function(e,t,r,n){if(!Re[r]){for(var i="",o={},a=e.length-1,s=0;s<a;++s)i=Ae(e[s],i,o);Re[r]={c:Ae(e[a],i,o),e:o}}var u=Se({},Re[r].e);return function(e,t,r,n,i){var o=new Worker(I[t]||(I[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,r=t.$e$;if(r){var n=new Error(r[0]);n.code=r[1],n.stack=r[2],i(n,null)}else i(null,t)},o.postMessage(r,n),o}(Re[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,u,function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t}(u),n)}(r,n,i,function(e,t){a.terminate(),o(e,t)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},Le=function(e,t){return e[t]|e[t+1]<<8},Ie=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Ue=function(e,t){return Ie(e,t)+4294967296*Ie(e,t+4)},je=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function Be(e,t){return Ee(e,t||{},0,0)}function $e(e,t){return le(e,{i:2},t&&t.out,t&&t.dictionary)}var Me=function(e,t,r,n){for(var i in e){var o=e[i],a=t+i,s=n;Array.isArray(o)&&(s=Se(n,o[1]),o=o[0]),o instanceof U?r[a]=[o,s]:(r[a+="/"]=[new U(0),s],Me(o,a,r,n))}},Pe="undefined"!=typeof TextEncoder&&new TextEncoder,Fe="undefined"!=typeof TextDecoder&&new TextDecoder;try{Fe.decode(be,{stream:!0})}catch(e){}function Ne(e,t){if(t){for(var r=new U(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if(Pe)return Pe.encode(e);var i=e.length,o=new U(e.length+(e.length>>1)),a=0,s=function(e){o[a++]=e};for(n=0;n<i;++n){if(a+5>o.length){var u=new U(a+8+(i-n<<1));u.set(o),o=u}var l=e.charCodeAt(n);l<128||t?s(l):l<2048?(s(192|l>>6),s(128|63&l)):l>55295&&l<57344?(s(240|(l=65536+(1047552&l)|1023&e.charCodeAt(++n))>>18),s(128|l>>12&63),s(128|l>>6&63),s(128|63&l)):(s(224|l>>12),s(128|l>>6&63),s(128|63&l))}return ae(o,0,a)}function De(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}if(Fe)return Fe.decode(e);var i=function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:ae(e,r-1)};i?3==i?(n=((15&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n)):t+=1&i?String.fromCharCode((31&n)<<6|63&e[r++]):String.fromCharCode((15&n)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(n)}}(e),o=i.s;return(r=i.r).length&&ue(8),o}var We=function(e,t){for(;1!=Le(e,t);t+=4+Le(e,t+2));return[Ue(e,t+12),Ue(e,t+4),Ue(e,t+20)]},Ze=function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&ue(9),t+=n+4}return t},ze=function(e,t,r,n,i,o,a,s){var u=n.length,l=r.extra,f=s&&s.length,c=Ze(l);je(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&r.compression,e[t++]=r.compression>>8;var h=new Date(null==r.mtime?Date.now():r.mtime),d=h.getFullYear()-1980;if((d<0||d>119)&&ue(10),je(e,t,d<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),t+=4,-1!=o&&(je(e,t,r.crc),je(e,t+4,o<0?-o-2:o),je(e,t+8,r.size)),je(e,t+12,u),je(e,t+14,c),t+=16,null!=a&&(je(e,t,f),je(e,t+6,r.attrs),je(e,t+10,a),t+=14),e.set(n,t),t+=u,c)for(var p in l){var g=l[p],y=g.length;je(e,t,+p),je(e,t+2,y),e.set(g,t+4),t+=4+y}return f&&(e.set(s,t),t+=f),t};function Ye(e,t,r){r||(r=t,t={}),"function"!=typeof r&&ue(7);var n={};Me(e,"",n,t);var i=Object.keys(n),o=i.length,a=0,s=0,u=o,l=new Array(o),f=[],c=function(){for(var e=0;e<f.length;++e)f[e]()},h=function(e,t){Ge(function(){r(e,t)})};Ge(function(){h=r});var d=function(){var e=new U(s+22),t=a,r=s-a;s=0;for(var n=0;n<u;++n){var i=l[n];try{var o=i.c.length;ze(e,s,i,i.f,i.u,o);var f=30+i.f.length+Ze(i.extra),c=s+f;e.set(i.c,c),ze(e,a,i,i.f,i.u,o,s,i.m),a+=16+f+(i.m?i.m.length:0),s=c+o}catch(e){return h(e,null)}}(function(e,t,r,n,i){je(e,t,101010256),je(e,t+8,r),je(e,t+10,r),je(e,t+12,n),je(e,t+16,i)})(e,a,l.length,r,t),h(null,e)};o||d();for(var p=function(e){var t=i[e],r=n[t],u=r[0],p=r[1],g=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=_e[255&r^t[n]]^r>>>8;e=r},d:function(){return~e}}}(),y=u.length;g.p(u);var w=Ne(t),m=w.length,b=p.comment,v=b&&Ne(b),_=v&&v.length,E=Ze(p.extra),S=0==p.level?0:8,A=function(r,n){if(r)c(),h(r,null);else{var i=n.length;l[e]=Se(p,{size:y,crc:g.d(),c:n,f:w,m:v,u:m!=t.length||v&&b.length!=_,compression:S}),a+=30+m+E+i,s+=76+2*(m+E)+(_||0)+i,--o||d()}};if(m>65535&&A(ue(11,0,1),null),S)if(y<16e4)try{A(null,Be(u,p))}catch(e){A(e,null)}else f.push(function(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&ue(7),xe(e,t,[Te],function(e){return Oe(Be(e.data[0],e.data[1]))},0,r)}(u,p,A));else A(null,u)},g=0;g<u;++g)p(g);return c}var Ge="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};class He{resolve;reject;promise;constructor(){if("function"==typeof Promise.withResolvers){const{promise:e,resolve:t,reject:r}=Promise.withResolvers();this.promise=e,this.resolve=t,this.reject=r}else this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const Ve="NotFoundError",Xe="/",qe=".",Je="/tmp";function Ke(e){n("string"==typeof e),n(e[0]===Xe)}function Qe(e){n("string"==typeof e)}let et;function tt(e){return e===Xe}async function rt(e,t,r){try{return b(await e.getDirectoryHandle(t,r))}catch(r){const n=r,i=new Error(`${n.name}: ${n.message} When get child directory '${t}' from directory '${e.name||Xe}'.`);return i.name=n.name,v(i)}}async function nt(e,t){let r=await async function(){return et??=await navigator.storage.getDirectory(),et}();if(tt(e))return b(r);let n=e.slice(1);for(;n;){let e="";const i=n.indexOf("/");if(-1===i)e=n,n="";else if(e=n.slice(0,i),n=n.slice(i+1),0===i)continue;const o=await rt(r,e,t);if(o.isErr())return o;r=o.unwrap()}return b(r)}async function it(e,t){const r=t?.create??!1,n=l(e),i=u(e);return(await nt(n,{create:r})).andThenAsync(e=>async function(e,t,r){try{return b(await e.getFileHandle(t,r))}catch(r){const n=r,i=new Error(`${n.name}: ${n.message} When get child file '${t}' from directory '${e.name||Xe}'.`);return i.name=n.name,v(i)}}(e,i,{create:r}))}function ot(e){return e.name===Ve}async function at(e){const t=(await Promise.all(e)).find(e=>e.isErr());return t??R}function st(){const e=new Error;return e.name=k,e}function ut(e){const{isDirectory:t=!1,basename:r="tmp",extname:n=""}=e??{},i=t?"":n;return c(Je,`${r?`${r}-`:""}${crypto.randomUUID()}${i}`)}function lt(e){return e.startsWith(`${Je}/`)}async function ft(e){const{name:t,kind:r}=e;if(ct(e)){const n=await e.getFile(),{size:i,lastModified:o,type:a}=n;return{name:t,kind:r,type:a,size:i,lastModified:o}}return{name:t,kind:r}}function ct(e){return"file"===e.kind}function ht(e){return"directory"===e.kind}function dt(e){return"file"===e.kind}async function pt(e){const t=await e.getFile(),r=await t.arrayBuffer();return new Uint8Array(r)}async function gt(e){return Ke(e),(await it(e,{create:!0})).and(R)}async function yt(e){return Ke(e),(await nt(e,{create:!0})).and(R)}async function wt(e,t){async function*r(n,i){const o=n.entries();for await(const[a,s]of o){const o=i===e?a:c(i,a);yield{path:o,handle:s},ht(s)&&t?.recursive&&(yield*r(await n.getDirectoryHandle(a),o))}}return Ke(e),(await nt(e)).andThen(t=>b(r(t,e)))}async function mt(e,t){return Ke(e),(await it(e)).andThenAsync(async e=>{const r=await e.getFile();switch(t?.encoding){case"blob":return b(r);case"utf8":return b(await r.text());default:return b(await r.arrayBuffer())}})}async function bt(e){Ke(e);const t=l(e),r=u(e),n=await nt(t);return(await n.andThenAsync(async e=>{try{tt(t)&&tt(r)?await e.remove({recursive:!0}):await e.removeEntry(r,{recursive:!0})}catch(e){return v(e)}return R})).orElse(e=>ot(e)?R:v(e))}async function vt(e){Ke(e);const t=l(e),r=u(e),n=await nt(t);return r?n.andThenAsync(async t=>{for await(const[e,n]of t.entries())if(e===r)return b(n);const n=new Error(`${Ve}: '${r}' does not exist. Full path is '${e}'.`);return n.name=Ve,v(n)}):n}async function _t(e,t,r){Ke(e);const{append:n=!1,create:i=!0}=r??{};return(await it(e,{create:i})).andThenAsync(async e=>{const r=await e.createWritable({keepExistingData:n}),i={type:"write",data:t};if(n){const{size:t}=await e.getFile();i.position=t}return await r.write(i),await r.close(),R})}function Et(e,t,r){let n,i;Qe(e),i=!1,"string"==typeof t?Ke(t):(r=t,t=ut({extname:f(e)}),i=!0),n=!1;const o=C(e,{redirect:"follow",...r,abortable:!0}),a=(async()=>(await o.response).andThenAsync(async e=>{const r=await e.blob();return n?v(st()):(await _t(t,r)).and(b(e))}))();return{abort(e){n=!0,o.abort(e)},get aborted(){return n},get response(){return i?a.then(e=>e.map(e=>({tempFilePath:t,rawResponse:e}))):a}}}async function St(e,t){const r=l(t);return(await nt(r,{create:!0})).andThenAsync(async r=>{const n=u(t);try{return await e.move(r,n),R}catch(e){return v(e)}})}async function At(e,t,r,n=!0){return Ke(t),(await vt(e)).andThenAsync(async i=>{let o;o=!1;const a=await vt(t);if(a.isErr()){if(!ot(a.unwrapErr()))return a.asErr()}else{o=!0;const e=a.unwrap();if(!(ct(i)&&ct(e)||ht(i)&&ht(e)))return v(new Error("Both 'srcPath' and 'destPath' must both be a file or directory."))}return ct(i)?n||!o?await r(i,t):R:(await wt(e,{recursive:!0})).andThenAsync(async e=>{const i=[yt(t)];for await(const{path:a,handle:s}of e){const e=c(t,a);let u=!1;if(o){const t=await Ot(e);if(t.isErr()){i.push(Promise.resolve(t.asErr()));continue}u=t.unwrap()}const l=ct(s)?n||!u?r(s,e):Promise.resolve(R):yt(e);i.push(l)}return at(i)})})}function Rt(e,t){return _t(e,t,{append:!0})}async function kt(e,t,r){const{overwrite:n=!0}=r??{};return At(e,t,async(e,t)=>await _t(t,await e.getFile()),n)}async function Tt(e){const t=await wt(e);if(t.isErr())return ot(t.unwrapErr())?yt(e):t.asErr();const r=[];for await(const{path:n}of t.unwrap())r.push(bt(c(e,n)));return at(r)}async function Ot(e,t){const{isDirectory:r=!1,isFile:i=!1}=t??{};n(!(r&&i));const o=await vt(e);return o.andThen(e=>b(!(r&&ct(e)||i&&ht(e)))).orElse(e=>ot(e)?A:o.asErr())}async function Ct(e,t,r){const{overwrite:n=!0}=r??{};return(await At(e,t,St,n)).andThenAsync(()=>bt(e))}function xt(e){return mt(e,{encoding:"blob"})}async function Lt(e){return(await It(e)).andThenAsync(async e=>{try{return b(JSON.parse(e))}catch(e){return v(e)}})}function It(e){return mt(e,{encoding:"utf8"})}async function Ut(e){const{isDirectory:t=!1}=e??{},r=ut(e);return(await(t?yt:gt)(r)).and(b(r))}function jt(){return bt(Je)}async function Bt(e){return n(e instanceof Date),(await wt(Je,{recursive:!0})).andThenAsync(async t=>{try{for await(const{handle:r}of t)ct(r)&&(await r.getFile()).lastModified<=e.getTime()&&await r.remove()}catch(e){return v(e)}return R})}async function $t(e,t){const r=new Uint8Array(e),n=new He;return function(e,t,r){r||(r=t,t={}),"function"!=typeof r&&ue(7);var n=[],i=function(){for(var e=0;e<n.length;++e)n[e]()},o={},a=function(e,t){Ge(function(){r(e,t)})};Ge(function(){a=r});for(var s=e.length-22;101010256!=Ie(e,s);--s)if(!s||e.length-s>65558)return a(ue(13,0,1),null),i;var u=Le(e,s+8);if(u){var l=u,f=Ie(e,s+16),c=4294967295==f||65535==l;if(c){var h=Ie(e,s-12);(c=101075792==Ie(e,h))&&(l=u=Ie(e,h+32),f=Ie(e,h+48))}for(var d=t&&t.filter,p=function(t){var r=function(e,t,r){var n=Le(e,t+28),i=De(e.subarray(t+46,t+46+n),!(2048&Le(e,t+8))),o=t+46+n,a=Ie(e,t+20),s=r&&4294967295==a?We(e,o):[a,Ie(e,t+24),Ie(e,t+42)],u=s[0],l=s[1],f=s[2];return[Le(e,t+10),u,l,i,o+Le(e,t+30)+Le(e,t+32),f]}(e,f,c),s=r[0],l=r[1],h=r[2],p=r[3],g=r[4],y=r[5],w=function(e,t){return t+30+Le(e,t+26)+Le(e,t+28)}(e,y);f=g;var m=function(e,t){e?(i(),a(e,null)):(t&&(o[p]=t),--u||a(null,o))};if(!d||d({name:p,size:l,originalSize:h,compression:s}))if(s)if(8==s){var b=e.subarray(w,w+l);if(h<524288||l>.8*h)try{m(null,$e(b,{out:new U(h)}))}catch(e){m(e,null)}else n.push(function(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&ue(7),xe(e,t,[ke],function(e){return Oe($e(e.data[0],Ce(e.data[1])))},1,r)}(b,{size:h},m))}else m(ue(14,"unknown compression type "+s,1),null);else m(null,ae(e,w,w+l));else m(null,null)},g=0;g<l;++g)p()}else a(null,{})}(r,async(e,r)=>{if(e)return void n.resolve(v(e));const i=[];for(const e in r)"/"!==e.at(-1)&&i.push(_t(c(t,e),r[e]));n.resolve(at(i))}),await n.promise}async function Mt(e,t){return Ke(t),(await mt(e)).andThenAsync(e=>$t(e,t))}async function Pt(e,t,r){return Qe(e),Ke(t),(await C(e,{redirect:"follow",...r,responseType:"arraybuffer",abortable:!1})).andThenAsync(e=>$t(e,t))}function Ft(e,t,r){let n,i;Qe(t),n=!1;const o=(async()=>(await xt(e)).andThenAsync(async o=>{if(n)return v(st());const{filename:a=u(e),...s}=r??{},l=new FormData;return l.append(a,o,a),i=C(t,{method:"POST",...s,abortable:!0,body:l}),i.response}))();return{abort(e){n=!0,i?.abort(e)},get aborted(){return n},get response(){return o}}}async function Nt(e,t){const r=new He;return Ye(e,{consume:!0},async(e,n)=>{if(e)r.resolve(v(e));else if(t){const e=await _t(t,n);r.resolve(e)}else r.resolve(b(n))}),await r.promise}async function Dt(e,t,r){return"string"==typeof t?Ke(t):(r=t,t=void 0),(await vt(e)).andThenAsync(async n=>{const i=u(e),o={};if(ct(n)){const e=await pt(n);o[i]=e}else{const t=await wt(e,{recursive:!0});if(t.isErr())return t.asErr();const n=r?.preserveRoot??!0;for await(const{path:e,handle:r}of t.unwrap())if(ct(r)){const t=n?c(i,e):e,a=await pt(r);o[t]=a}}return Nt(o,t)})}async function Wt(e,t,r){return Qe(e),"string"==typeof t?Ke(t):(r=t,t=void 0),(await C(e,{redirect:"follow",...r,responseType:"arraybuffer",abortable:!1})).andThenAsync(r=>{const n={};return n[u(e)]=new Uint8Array(r),Nt(n,t)})}function Zt(){return"function"==typeof navigator?.storage?.getDirectory}function zt(e){return e?{name:e.name,message:e.message}:e}async function Yt(e){const t=await e.arrayBuffer();return{name:e.name,type:e.type,lastModified:e.lastModified,size:t.byteLength,data:t}}let Gt=1e3;var Ht=(e=>(e[e.createFile=0]="createFile",e[e.mkdir=1]="mkdir",e[e.move=2]="move",e[e.readDir=3]="readDir",e[e.remove=4]="remove",e[e.stat=5]="stat",e[e.writeFile=6]="writeFile",e[e.appendFile=7]="appendFile",e[e.copy=8]="copy",e[e.emptyDir=9]="emptyDir",e[e.exists=10]="exists",e[e.deleteTemp=11]="deleteTemp",e[e.mkTemp=12]="mkTemp",e[e.pruneTemp=13]="pruneTemp",e[e.readBlobFile=14]="readBlobFile",e[e.unzip=15]="unzip",e[e.zip=16]="zip",e))(Ht||{});let Vt,Xt;function qt(e){const t=JSON.stringify(e);return(Vt??=new TextEncoder,Vt).encode(t)}function Jt(e){const t=Kt(e);return JSON.parse(t)}function Kt(e){return(Xt??=new TextDecoder,Xt).decode(e)}class Qt{i32a;u8a;headerLength=16;maxDataLength;constructor(e){this.i32a=new Int32Array(e),this.u8a=new Uint8Array(e),this.maxDataLength=e.byteLength-this.headerLength}}async function er(e,t){const{i32a:r,u8a:n,headerLength:i,maxDataLength:o}=e;for(;1!==Atomics.load(r,1););const a=r[2],s=n.slice(i,i+a);let u=await t(s);const l=u.byteLength;if(l>o){const e=`Response is too large: ${l} > ${o}. Consider grow the size of SharedArrayBuffer.`;if(u=qt([{name:"RangeError",message:e}]),u.byteLength>o)throw Atomics.store(r,1,0),new RangeError(e)}r[2]=u.byteLength,n.set(u,i),Atomics.store(r,1,0),Atomics.store(r,0,0)}const tr={[Ht.createFile]:gt,[Ht.mkdir]:yt,[Ht.move]:Ct,[Ht.readDir]:wt,[Ht.remove]:bt,[Ht.stat]:vt,[Ht.writeFile]:_t,[Ht.appendFile]:Rt,[Ht.copy]:kt,[Ht.emptyDir]:Tt,[Ht.exists]:Ot,[Ht.deleteTemp]:jt,[Ht.mkTemp]:Ut,[Ht.pruneTemp]:Bt,[Ht.readBlobFile]:xt,[Ht.unzip]:Mt,[Ht.zip]:Dt};let rr,nr;function ir(){if("undefined"!=typeof window)throw new Error("Only can use in worker");if(rr)throw new Error("Worker messenger already started");addEventListener("message",e=>{const t=e.data;if(!(t instanceof SharedArrayBuffer))throw new TypeError("Only can post SharedArrayBuffer to Worker");rr=new Qt(t),postMessage(!0),async function(){for(;;)try{await er(rr,async e=>{const[t,...r]=Jt(e);let n;t===Ht.writeFile||t===Ht.appendFile?Array.isArray(r[1])&&(r[1]=new Uint8Array(r[1])):t===Ht.pruneTemp&&(r[0]=new Date(r[0]));const i=tr[t];try{const e=await i(...r);if(e.isErr())n=qt([zt(e.unwrapErr())]);else{let r;if(t===Ht.readBlobFile){const t=e.unwrap(),n=await Yt(t);r={...n,data:[...new Uint8Array(n.data)]}}else if(t===Ht.readDir){const t=e.unwrap(),n=[];for await(const{path:e,handle:r}of t){const t=await ft(r);n.push({path:e,handle:t})}r=n}else if(t===Ht.stat){const t=e.unwrap();r=await ft(t)}else if(t===Ht.zip){const t=e.unwrap();r=t instanceof Uint8Array?[...t]:t}else r=e.unwrap();n=qt([null,r])}}catch(e){n=qt([zt(e)])}return n})}catch(e){console.error(e instanceof Error?e.stack:e)}}()})}function or(e){if("undefined"==typeof window)throw new Error("Only can use in main thread");if(nr)throw new Error("Main messenger already started");return new Promise(t=>{const{worker:r,bufferLength:i=1048576,opTimeout:o=1e3}=e;n(r instanceof Worker||r instanceof URL||"string"==typeof r&&r),n(i>16&&i%4==0),n(Number.isInteger(o)&&o>0),Gt=o;const a=r instanceof Worker?r:new Worker(r),s=new SharedArrayBuffer(i);a.addEventListener("message",e=>{e.data&&(nr=new Qt(s),t())}),a.postMessage(s)})}function ar(){return nr}function sr(e){n(null!=e),nr=e}function ur(e,...t){if(!nr)return v(new Error("Worker not initialized. Come back later."));const r=qt([e,...t]);try{const e=Jt(function(e,t){const{i32a:r,u8a:n,headerLength:i,maxDataLength:o}=e,a=t.byteLength;if(a>o)throw new RangeError(`Request is too large: ${a} > ${o}. Consider grow the size of SharedArrayBuffer.`);Atomics.store(r,0,1),r[2]=a,n.set(t,i),Atomics.store(r,1,1),function(e){const t=Date.now();for(;!e();)if(Date.now()-t>Gt){const e=new Error("Operating Timeout");throw e.name=T,e}}(()=>0===Atomics.load(r,0));const s=r[2];return n.slice(i,i+s)}(nr,r)),t=e[0],n=t?v(function(e){const t=new Error(e.message);return t.name=e.name,t}(t)):b(e[1]??void 0);return n}catch(e){return v(e)}}function lr(e){return ur(Ht.createFile,e)}function fr(e){return ur(Ht.mkdir,e)}function cr(e,t,r){return ur(Ht.move,e,t,r)}function hr(e,t){return ur(Ht.readDir,e,t)}function dr(e,t){return ur(Ht.readBlobFile,e).map(e=>{const r=new Uint8Array(e.data);switch(e.data=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),t?.encoding){case"blob":return e;case"utf8":return Kt(new Uint8Array(e.data));default:return e.data}})}function pr(e){return ur(Ht.remove,e)}function gr(e){return ur(Ht.stat,e)}function yr(e){return e instanceof ArrayBuffer?[...new Uint8Array(e)]:ArrayBuffer.isView(e)?[...new Uint8Array(e.buffer)]:e}function wr(e,t,r){return ur(Ht.writeFile,e,yr(t),r)}function mr(e,t){return ur(Ht.appendFile,e,yr(t))}function br(e,t,r){return ur(Ht.copy,e,t,r)}function vr(e){return ur(Ht.emptyDir,e)}function _r(e,t){return ur(Ht.exists,e,t)}function Er(){return ur(Ht.deleteTemp)}function Sr(e){return ur(Ht.mkTemp,e)}function Ar(e){return ur(Ht.pruneTemp,e)}function Rr(e){return dr(e,{encoding:"blob"})}function kr(e){return Tr(e).andThen(e=>{try{return b(JSON.parse(e))}catch(e){return v(e)}})}function Tr(e){return dr(e,{encoding:"utf8"})}function Or(e,t){return ur(Ht.unzip,e,t)}function Cr(e,t,r){return ur(Ht.zip,e,t,r).map(e=>e?new Uint8Array(e):e)}},503(e,t,r){"use strict";r.r(t),r.d(t,{DELIMITER:()=>v,SEPARATOR:()=>_,SEPARATOR_PATTERN:()=>E,basename:()=>b,common:()=>J,dirname:()=>A,extname:()=>R,format:()=>O,fromFileUrl:()=>C,globToRegExp:()=>ne,isAbsolute:()=>I,isGlob:()=>ie,join:()=>F,joinGlobs:()=>le,normalize:()=>N,normalizeGlob:()=>fe,parse:()=>D,relative:()=>Y,resolve:()=>G,toFileUrl:()=>X,toNamespacedPath:()=>q});const n=function(){const e=globalThis,t=e.Deno?.build?.os;return"string"==typeof t?"windows"===t:e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}();function i(e){if("string"!=typeof e)throw new TypeError(`Path must be a string, received "${JSON.stringify(e)}"`)}function o(e,t){if(t.length>=e.length)return e;const r=e.length-t.length;for(let n=t.length-1;n>=0;--n)if(e.charCodeAt(r+n)!==t.charCodeAt(n))return e;return e.slice(0,-t.length)}function a(e,t,r=0){let n=!1,i=e.length;for(let o=e.length-1;o>=r;--o)if(t(e.charCodeAt(o))){if(n){r=o+1;break}}else n||(n=!0,i=o+1);return e.slice(r,i)}function s(e,t){if(i(e),0===e.length)return e;if("string"!=typeof t)throw new TypeError(`Suffix must be a string, received "${JSON.stringify(t)}"`)}function u(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function l(e){return e=u(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function f(e,t){if(e.length<=1)return e;let r=e.length;for(let n=e.length-1;n>0&&t(e.charCodeAt(n));n--)r=n;return e.slice(0,r)}const c=46,h=92,d=58;function p(e){return 47===e}function g(e){return 47===e}function y(e){return 47===e||e===h}function w(e){return e>=97&&e<=122||e>=65&&e<=90}function m(e){e=u(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return""!==e.hostname&&(t=`\\\\${e.hostname}${t}`),t}function b(e,t=""){return n?function(e,t=""){e instanceof URL&&(e=m(e)),s(e,t);let r=0;e.length>=2&&w(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(r=2);const n=f(a(e,y,r),y);return t?o(n,t):n}(e,t):function(e,t=""){e instanceof URL&&(e=l(e)),s(e,t);const r=f(a(e,p),p);return t?o(r,t):r}(e,t)}const v=n?";":":",_=n?"\\":"/",E=n?/[\\/]+/:/\/+/;function S(e){if(i(e),0===e.length)return"."}function A(e){return n?function(e){e instanceof URL&&(e=m(e)),S(e);const t=e.length;let r=-1,n=-1,i=!0,o=0;const a=e.charCodeAt(0);if(t>1)if(y(a)){if(r=o=1,y(e.charCodeAt(1))){let n=2,i=n;for(;n<t&&!y(e.charCodeAt(n));++n);if(n<t&&n!==i){for(i=n;n<t&&y(e.charCodeAt(n));++n);if(n<t&&n!==i){for(i=n;n<t&&!y(e.charCodeAt(n));++n);if(n===t)return e;n!==i&&(r=o=n+1)}}}}else w(a)&&e.charCodeAt(1)===d&&(r=o=2,t>2&&y(e.charCodeAt(2))&&(r=o=3));else if(y(a))return e;for(let r=t-1;r>=o;--r)if(y(e.charCodeAt(r))){if(!i){n=r;break}}else i=!1;if(-1===n){if(-1===r)return".";n=r}return f(e.slice(0,n),g)}(e):function(e){e instanceof URL&&(e=l(e)),S(e);let t=-1,r=!1;for(let n=e.length-1;n>=1;--n)if(p(e.charCodeAt(n))){if(r){t=n;break}}else r=!0;return-1===t?p(e.charCodeAt(0))?"/":".":f(e.slice(0,t),p)}(e)}function R(e){return n?function(e){e instanceof URL&&(e=m(e)),i(e);let t=0,r=-1,n=0,o=-1,a=!0,s=0;e.length>=2&&e.charCodeAt(1)===d&&w(e.charCodeAt(0))&&(t=n=2);for(let i=e.length-1;i>=t;--i){const t=e.charCodeAt(i);if(y(t)){if(!a){n=i+1;break}}else-1===o&&(a=!1,o=i+1),t===c?-1===r?r=i:1!==s&&(s=1):-1!==r&&(s=-1)}return-1===r||-1===o||0===s||1===s&&r===o-1&&r===n+1?"":e.slice(r,o)}(e):function(e){e instanceof URL&&(e=l(e)),i(e);let t=-1,r=0,n=-1,o=!0,a=0;for(let i=e.length-1;i>=0;--i){const s=e.charCodeAt(i);if(p(s)){if(!o){r=i+1;break}}else-1===n&&(o=!1,n=i+1),s===c?-1===t?t=i:1!==a&&(a=1):-1!==t&&(a=-1)}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)}(e)}function k(e,t){const r=t.dir||t.root,n=t.base||(t.name??"")+(t.ext??"");return r?n===e?r:r===t.root?r+n:r+e+n:n}function T(e){if(null===e||"object"!=typeof e)throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof e}"`)}function O(e){return n?function(e){return T(e),k("\\",e)}(e):function(e){return T(e),k("/",e)}(e)}function C(e){return n?m(e):l(e)}function x(e){return i(e),e.length>0&&p(e.charCodeAt(0))}function L(e){i(e);const t=e.length;if(0===t)return!1;const r=e.charCodeAt(0);return!!y(r)||!!(w(r)&&t>2&&e.charCodeAt(1)===d&&y(e.charCodeAt(2)))}function I(e){return n?L(e):x(e)}function U(e){if(i(e),0===e.length)return"."}function j(e,t,r,n){let i,o="",a=0,s=-1,u=0;for(let l=0;l<=e.length;++l){if(l<e.length)i=e.charCodeAt(l);else{if(n(i))break;i=47}if(n(i)){if(s===l-1||1===u);else if(s!==l-1&&2===u){if(o.length<2||2!==a||o.charCodeAt(o.length-1)!==c||o.charCodeAt(o.length-2)!==c){if(o.length>2){const e=o.lastIndexOf(r);-1===e?(o="",a=0):(o=o.slice(0,e),a=o.length-1-o.lastIndexOf(r)),s=l,u=0;continue}if(2===o.length||1===o.length){o="",a=0,s=l,u=0;continue}}t&&(o.length>0?o+=`${r}..`:o="..",a=2)}else o.length>0?o+=r+e.slice(s+1,l):o=e.slice(s+1,l),a=l-s-1;s=l,u=0}else i===c&&-1!==u?++u:u=-1}return o}function B(e){e instanceof URL&&(e=l(e)),U(e);const t=p(e.charCodeAt(0)),r=p(e.charCodeAt(e.length-1));return 0!==(e=j(e,!t,"/",p)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?`/${e}`:e}function $(e,...t){if(void 0===e)return".";e instanceof URL&&(e=l(e)),(t=e?[e,...t]:t).forEach(e=>i(e));const r=t.filter(e=>e.length>0).join("/");return""===r?".":B(r)}function M(e){e instanceof URL&&(e=m(e)),U(e);const t=e.length;let r,n=0,i=!1;const o=e.charCodeAt(0);if(t>1)if(y(o))if(i=!0,y(e.charCodeAt(1))){let i=2,o=i;for(;i<t&&!y(e.charCodeAt(i));++i);if(i<t&&i!==o){const a=e.slice(o,i);for(o=i;i<t&&y(e.charCodeAt(i));++i);if(i<t&&i!==o){for(o=i;i<t&&!y(e.charCodeAt(i));++i);if(i===t)return`\\\\${a}\\${e.slice(o)}\\`;i!==o&&(r=`\\\\${a}\\${e.slice(o,i)}`,n=i)}}}else n=1;else w(o)&&e.charCodeAt(1)===d&&(r=e.slice(0,2),n=2,t>2&&y(e.charCodeAt(2))&&(i=!0,n=3));else if(y(o))return"\\";let a;return a=n<t?j(e.slice(n),!i,"\\",y):"",0!==a.length||i||(a="."),a.length>0&&y(e.charCodeAt(t-1))&&(a+="\\"),void 0===r?i?a.length>0?`\\${a}`:"\\":a:i?a.length>0?`${r}\\${a}`:`${r}\\`:r+a}function P(e,...t){if(e instanceof URL&&(e=m(e)),(t=e?[e,...t]:t).forEach(e=>i(e)),t=t.filter(e=>e.length>0),0===t.length)return".";let r=!0,n=0;const o=t[0];if(y(o.charCodeAt(0))){++n;const e=o.length;e>1&&y(o.charCodeAt(1))&&(++n,e>2&&(y(o.charCodeAt(2))?++n:r=!1))}let a=t.join("\\");if(r){for(;n<a.length&&y(a.charCodeAt(n));++n);n>=2&&(a=`\\${a.slice(n)}`)}return M(a)}function F(e,...t){return n?P(e,...t):$(e,...t)}function N(e){return n?M(e):B(e)}function D(e){return n?function(e){i(e);const t={root:"",dir:"",base:"",ext:"",name:""},r=e.length;if(0===r)return t;let n=0,o=e.charCodeAt(0);if(r>1){if(y(o)){if(n=1,y(e.charCodeAt(1))){let t=2,i=t;for(;t<r&&!y(e.charCodeAt(t));++t);if(t<r&&t!==i){for(i=t;t<r&&y(e.charCodeAt(t));++t);if(t<r&&t!==i){for(i=t;t<r&&!y(e.charCodeAt(t));++t);t===r?n=t:t!==i&&(n=t+1)}}}}else if(w(o)&&e.charCodeAt(1)===d){if(n=2,!(r>2))return t.root=t.dir=e,t;if(y(e.charCodeAt(2))){if(3===r)return t.root=t.dir=e,t.base="\\",t;n=3}}}else if(y(o))return t.root=t.dir=e,t.base="\\",t;n>0&&(t.root=e.slice(0,n));let a=-1,s=n,u=-1,l=!0,f=e.length-1,h=0;for(;f>=n;--f)if(o=e.charCodeAt(f),y(o)){if(!l){s=f+1;break}}else-1===u&&(l=!1,u=f+1),o===c?-1===a?a=f:1!==h&&(h=1):-1!==a&&(h=-1);return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=e.slice(s,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u),t.ext=e.slice(a,u)),t.base=t.base||"\\",t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t}(e):function(e){i(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const r=p(e.charCodeAt(0));let n;r?(t.root="/",n=1):n=0;let o=-1,a=0,s=-1,u=!0,l=e.length-1,h=0;for(;l>=n;--l){const t=e.charCodeAt(l);if(p(t)){if(!u){a=l+1;break}}else-1===s&&(u=!1,s=l+1),t===c?-1===o?o=l:1!==h&&(h=1):-1!==o&&(h=-1)}return-1===o||-1===s||0===h||1===h&&o===s-1&&o===a+1?(-1!==s&&(t.base=t.name=0===a&&r?e.slice(1,s):e.slice(a,s)),t.base=t.base||"/"):(0===a&&r?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(a,o),t.base=e.slice(a,s)),t.ext=e.slice(o,s)),a>0?t.dir=f(e.slice(0,a-1),p):r&&(t.dir="/"),t}(e)}function W(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let o;if(n>=0)o=e[n];else{const{Deno:e}=globalThis;if("function"!=typeof e?.cwd)throw new TypeError("Resolved a relative path without a current working directory (CWD)");o=e.cwd()}i(o),0!==o.length&&(t=`${o}/${t}`,r=p(o.charCodeAt(0)))}return t=j(t,!r,"/",p),r?t.length>0?`/${t}`:"/":t.length>0?t:"."}function Z(e,t){if(i(e),i(t),e===t)return""}function z(...e){let t="",r="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;const{Deno:s}=globalThis;if(o>=0)a=e[o];else if(t){if("function"!=typeof s?.env?.get||"function"!=typeof s?.cwd)throw new TypeError("Resolved a relative path without a current working directory (CWD)");a=s.cwd(),void 0!==a&&a.slice(0,3).toLowerCase()===`${t.toLowerCase()}\\`||(a=`${t}\\`)}else{if("function"!=typeof s?.cwd)throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)");a=s.cwd()}i(a);const u=a.length;if(0===u)continue;let l=0,f="",c=!1;const h=a.charCodeAt(0);if(u>1)if(y(h))if(c=!0,y(a.charCodeAt(1))){let e=2,t=e;for(;e<u&&!y(a.charCodeAt(e));++e);if(e<u&&e!==t){const r=a.slice(t,e);for(t=e;e<u&&y(a.charCodeAt(e));++e);if(e<u&&e!==t){for(t=e;e<u&&!y(a.charCodeAt(e));++e);e===u?(f=`\\\\${r}\\${a.slice(t)}`,l=e):e!==t&&(f=`\\\\${r}\\${a.slice(t,e)}`,l=e)}}}else l=1;else w(h)&&a.charCodeAt(1)===d&&(f=a.slice(0,2),l=2,u>2&&y(a.charCodeAt(2))&&(c=!0,l=3));else y(h)&&(l=1,c=!0);if(!(f.length>0&&t.length>0&&f.toLowerCase()!==t.toLowerCase())&&(0===t.length&&f.length>0&&(t=f),n||(r=`${a.slice(l)}\\${r}`,n=c),n&&t.length>0))break}return r=j(r,!n,"\\",y),t+(n?"\\":"")+r||"."}function Y(e,t){return n?function(e,t){Z(e,t);const r=z(e),n=z(t);if(r===n)return"";if((e=r.toLowerCase())===(t=n.toLowerCase()))return"";let i=0,o=e.length;for(;i<o&&e.charCodeAt(i)===h;++i);for(;o-1>i&&e.charCodeAt(o-1)===h;--o);const a=o-i;let s=0,u=t.length;for(;s<u&&t.charCodeAt(s)===h;++s);for(;u-1>s&&t.charCodeAt(u-1)===h;--u);const l=u-s,f=a<l?a:l;let c=-1,d=0;for(;d<=f;++d){if(d===f){if(l>f){if(t.charCodeAt(s+d)===h)return n.slice(s+d+1);if(2===d)return n.slice(s+d)}a>f&&(e.charCodeAt(i+d)===h?c=d:2===d&&(c=3));break}const r=e.charCodeAt(i+d);if(r!==t.charCodeAt(s+d))break;r===h&&(c=d)}if(d!==f&&-1===c)return n;let p="";for(-1===c&&(c=0),d=i+c+1;d<=o;++d)d!==o&&e.charCodeAt(d)!==h||(0===p.length?p+="..":p+="\\..");return p.length>0?p+n.slice(s+c,u):(s+=c,n.charCodeAt(s)===h&&++s,n.slice(s,u))}(e,t):function(e,t){if(Z(e,t),(e=W(e))===(t=W(t)))return"";let r=1;const n=e.length;for(;r<n&&p(e.charCodeAt(r));++r);const i=n-r;let o=1;const a=t.length;for(;o<a&&p(t.charCodeAt(o));++o);const s=a-o,u=i<s?i:s;let l=-1,f=0;for(;f<=u;++f){if(f===u){if(s>u){if(p(t.charCodeAt(o+f)))return t.slice(o+f+1);if(0===f)return t.slice(o+f)}else i>u&&(p(e.charCodeAt(r+f))?l=f:0===f&&(l=0));break}const n=e.charCodeAt(r+f);if(n!==t.charCodeAt(o+f))break;p(n)&&(l=f)}let c="";for(f=r+l+1;f<=n;++f)(f===n||p(e.charCodeAt(f)))&&(0===c.length?c+="..":c+="/..");return c.length>0?c+t.slice(o+l):(o+=l,p(t.charCodeAt(o))&&++o,t.slice(o))}(e,t)}function G(...e){return n?z(...e):W(...e)}const H={"\t":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D"," ":"%20"};function V(e){return e.replaceAll(/[\s]/g,e=>H[e]??e)}function X(e){return n?function(e){if(!L(e))throw new TypeError(`Path must be absolute: received "${e}"`);const[,t,r]=e.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/),n=new URL("file:///");if(n.pathname=V(r.replace(/%/g,"%25")),void 0!==t&&"localhost"!==t&&(n.hostname=t,!n.hostname))throw new TypeError(`Invalid hostname: "${n.hostname}"`);return n}(e):function(e){if(!x(e))throw new TypeError(`Path must be absolute: received "${e}"`);const t=new URL("file:///");return t.pathname=V(e.replace(/%/g,"%25").replace(/\\/g,"%5C")),t}(e)}function q(e){return n?function(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=z(e);if(t.length>=3)if(t.charCodeAt(0)===h){if(t.charCodeAt(1)===h){const e=t.charCodeAt(2);if(63!==e&&e!==c)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(w(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===h)return`\\\\?\\${t}`;return e}(e):e}function J(e){return function(e,t){const[r="",...n]=e,i=r.split(t);let o=i.length,a="";for(const e of n){const r=e.split(t);r.length<=o&&(o=r.length,a="");for(let e=0;e<o;e++)if(r[e]!==i[e]){o=e,a=0===e?"":t;break}}return i.slice(0,o).join(t)+a}(e,_)}const K=["!","$","(",")","*","+",".","=","?","[","\\","^","{","|"],Q=["-","\\","]"];function ee(e,t,{extended:r=!0,globstar:n=!0,caseInsensitive:i=!1}={}){if(""===t)return/(?!)/;let o=t.length;for(;o>1&&e.seps.includes(t[o-1]);o--);t=t.slice(0,o);let a="";for(let i=0;i<t.length;){let o="";const s=[];let u=!1,l=!1,f=!1,c=i;for(;c<t.length&&!e.seps.includes(t[c]);c++)if(l)l=!1,o+=(u?Q:K).includes(t[c])?`\\${t[c]}`:t[c];else if(t[c]!==e.escapePrefix){if("["===t[c]){if(!u){u=!0,o+="[","!"===t[c+1]?(c++,o+="^"):"^"===t[c+1]&&(c++,o+="\\^");continue}if(":"===t[c+1]){let e=c+1,r="";for(;void 0!==t[e+1]&&":"!==t[e+1];)r+=t[e+1],e++;if(":"===t[e+1]&&"]"===t[e+2]){c=e+2,"alnum"===r?o+="\\dA-Za-z":"alpha"===r?o+="A-Za-z":"ascii"===r?o+="\0-":"blank"===r?o+="\t ":"cntrl"===r?o+="\0-":"digit"===r?o+="\\d":"graph"===r?o+="!-~":"lower"===r?o+="a-z":"print"===r?o+=" -~":"punct"===r?o+="!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~":"space"===r?o+="\\s\v":"upper"===r?o+="A-Z":"word"===r?o+="\\w":"xdigit"===r&&(o+="\\dA-Fa-f");continue}}}if("]"===t[c]&&u)u=!1,o+="]";else if(u)o+=t[c];else{if(")"===t[c]&&s.length>0&&"BRACE"!==s[s.length-1]){o+=")";const t=s.pop();"!"===t?o+=e.wildcard:"@"!==t&&(o+=t);continue}if("|"===t[c]&&s.length>0&&"BRACE"!==s[s.length-1])o+="|";else if("+"===t[c]&&r&&"("===t[c+1])c++,s.push("+"),o+="(?:";else if("@"===t[c]&&r&&"("===t[c+1])c++,s.push("@"),o+="(?:";else if("?"!==t[c])if("!"===t[c]&&r&&"("===t[c+1])c++,s.push("!"),o+="(?!";else if("{"!==t[c])if("}"!==t[c]||"BRACE"!==s[s.length-1])if(","!==t[c]||"BRACE"!==s[s.length-1])if("*"!==t[c])o+=K.includes(t[c])?`\\${t[c]}`:t[c];else if(r&&"("===t[c+1])c++,s.push("*"),o+="(?:";else{const r=t[c-1];let i=1;for(;"*"===t[c+1];)c++,i++;const a=t[c+1];n&&2===i&&[...e.seps,void 0].includes(r)&&[...e.seps,void 0].includes(a)?(o+=e.globstar,f=!0):o+=e.wildcard}else o+="|";else s.pop(),o+=")";else s.push("BRACE"),o+="(?:";else r&&"("===t[c+1]?(c++,s.push("?"),o+="(?:"):o+="."}}else l=!0;if(s.length>0||u||l){o="";for(const e of t.slice(i,c))o+=K.includes(e)?`\\${e}`:e,f=!1}for(a+=o,f||(a+=c<t.length?e.sep:e.sepMaybe,f=!0);e.seps.includes(t[c]);)c++;i=c}return a=`^${a}$`,new RegExp(a,i?"i":"")}const te={sep:"/+",sepMaybe:"/*",seps:["/"],globstar:"(?:[^/]*(?:/|$)+)*",wildcard:"[^/]*",escapePrefix:"\\"},re={sep:"(?:\\\\|/)+",sepMaybe:"(?:\\\\|/)*",seps:["\\","/"],globstar:"(?:[^\\\\/]*(?:\\\\|/|$)+)*",wildcard:"[^\\\\/]*",escapePrefix:"`"};function ne(e,t={}){return n?function(e,t={}){return ee(re,e,t)}(e,t):function(e,t={}){return ee(te,e,t)}(e,t)}function ie(e){const t={"{":"}","(":")","[":"]"},r=/\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\))/;if(""===e)return!1;let n;for(;n=r.exec(e);){if(n[2])return!0;let r=n.index+n[0].length;const i=n[1],o=i?t[i]:null;if(i&&o){const t=e.indexOf(o,r);-1!==t&&(r=t+1)}e=e.slice(r)}return!1}const oe=/\/+/;function ae(e,t={}){const{globstar:r=!1}=t;if(e.match(/\0/g))throw new Error(`Glob contains invalid characters: "${e}"`);if(!r)return B(e);const n=oe.source,i=new RegExp(`(?<=(${n}|^)\\*\\*${n})\\.\\.(?=${n}|$)`,"g");return B(e.replace(i,"\0")).replace(/\0/g,"..")}const se=/[\\/]+/;function ue(e,t={}){const{globstar:r=!1}=t;if(e.match(/\0/g))throw new Error(`Glob contains invalid characters: "${e}"`);if(!r)return M(e);const n=se.source,i=new RegExp(`(?<=(${n}|^)\\*\\*${n})\\.\\.(?=${n}|$)`,"g");return M(e.replace(i,"\0")).replace(/\0/g,"..")}function le(e,t={}){return n?function(e,t={}){const{globstar:r=!1}=t;if(!r||0===e.length)return P(...e);let n;for(const t of e){const e=t;e.length>0&&(n?n+=`\\${e}`:n=e)}return n?ue(n,{globstar:r}):"."}(e,t):function(e,t={}){const{globstar:r=!1}=t;if(!r||0===e.length)return $(...e);let n;for(const t of e){const e=t;e.length>0&&(n?n+=`/${e}`:n=e)}return n?ae(n,{globstar:r}):"."}(e,t)}function fe(e,t={}){return n?ue(e,t):ae(e,t)}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}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})};const n=r(368),i=n._argv_get,o=n._argv_url_get,a=n._cmdline_check,s=n._get_date_human,u=n._msg_info,l=n._msg_error,f=n._process_exit,c=r(495),h=(c._evm_chains_db_path_get,c._evm_chain_info_get,c._rpc_backend_get,c._evm_chains_info),d=c._db_paths_auto_detect,p=c._input_type_auto_detect;function g(e){let t;const r=["Returns info about EVM blockchains.","","Usage:",""," evm-chains-info.js"," [options]"," <target-chain>",""," options:",""," -C --command Target command. Can be 'get' or 'set'.",` <target-command> Default: '${target_command}`,""," -i --input-type Input type. It can be 'id' or 'name'.",` <input-type> Default: '${input_type}'`,""," -o --output-type Output type. It can be 'id', 'name',"," <output-type> 'rpc', 'explorers'.",` Default: '${output_type}'`,""," -m --retrieval-mode It can be 'offline'.",` <retrieval-mode> Default: '${retrieval_mode}'`,""," -u --user-level It can be 'y' or 'n'.",` <user-level> Default: '${user_level}'`,""," -d --db-path Path of the chains' info json file"," <db-path> to be used for 'offline' retrieval.",` Default: '${db_paths}'`,""," -s --selection-method When output type is 'rpc',"," <selection-method> selection criterion to use when"," more than one is available."," It can be 'kirsh', 'random' or 'all'.",` Default: '${selection_method}'`,""," -k If selected, when output type is 'rpc',"," includes the ones requiring an API key.",` Default: '${api_key}'`," -a --all Whether to show results for all networks.",` Default: '${networks_all}'`,""," -h --help This message."," -v --verbose Enable verbose output."];for(t of r)console.log(t);f(e)}app_name="evm-chains-info.js",app_opts=[],runtime_environment="",call_date="",target_command="",input_type="",output_type="",retrieval_mode="",user_level="",db_paths=[],selection_method="",api_key="",target_chain="",networks_all="",quiet="",verbose="",1==a("evm-chains-info.js")||1==a("evm-chains-info")?function(){let e,t;const r=i(),n=r._;quiet="y",e=!1,runtime_environment="node","h"in r&&(e=!0),"help"in r&&(e=!0),(n.indexOf("--help")>-1||n.indexOf("-h")>-1)&&(e=!0),e&&(quiet="n",g(0)),void 0===r||r._.length<1&&0==e?(t="Target chain argument required.",l("Target chain argument required.",0),g(1)):1==e&&g(0),target_chain=r._[0],"C"in r&&(target_command=r.C),"command"in r&&(target_command=r.command),"i"in r&&(input_type=r.i),"input-type"in r&&(input_type=r["input-type"]),"o"in r&&(output_type=r.o),"output-type"in r&&(output_type=r["output-type"]),"m"in r&&(retrieval_mode=r.m),"retrieval-mode"in r&&(retrieval_mode=r["retrieval-mode"]),"u"in r&&(user_level=r.u),"user-level"in r&&(user_level=r["user-level"]),"d"in r&&db_paths.push(r.d),"db-path"in r&&db_paths.push(r["user-level"]),"s"in r&&(selection_method=r.s),"selection-method"in r&&(selection_method=r["selection-method"]),"k"in r&&(api_key="y"),"api-key"in r&&(api_key="y"),"a"in r&&(networks_all="y"),"networks-all"in r&&(networks_all="y"),"v"in r&&(verbose=r.v),"verbose"in r&&(verbose=r.verbose),verbose&&(quiet="n")}():(runtime_environment="browser",target_chain=o("chain")[0],target_command=o("command")[0],input_type=o("input_type")[0],output_type=o("output_type")[0],input_type=o("input_type")[0],retrieval_mode=o("retrieval_mode")[0],user_level=o("user_level")[0],db_paths.push(o("db_path")[0]),selection_method=o("selection_method")[0],api_key=o("api_key")[0],networks_all=o("networks_all")[0],quiet=o("quiet"),0===quiet.length&&(quiet="n")),""==call_date&&(call_date=s()),""==target_command&&(target_command="get"),p(),""==output_type&&(output_type="name"),""==retrieval_mode&&(retrieval_mode="offline"),""==selection_method&&(selection_method="kirsh"),""==api_key&&(api_key="n"),""==user_level&&(user_level="y"),""==networks_all&&(networks_all="n"),d(target_chain),function(){let e;const t=[`${app_name} configuration:`,` Call date: ${call_date}`,` Runtime environment: ${runtime_environment}`,` Target command: ${target_command}`,` Input type: ${input_type}`,` Output type: ${output_type}`,` Retrieval mode: ${retrieval_mode}`,` User-level database: ${user_level}`,` API key: ${api_key}`,` RPC selection method: ${selection_method}`,` All networks: ${networks_all}`,` Target chain: ${target_chain}`,` Database paths: ${db_paths}`];for(e of t)u(e)}(),app_opts=[target_command,input_type,output_type,retrieval_mode,selection_method,api_key,networks_all,target_chain,db_paths],function(){let e;const t=h.apply(null,app_opts);for(e of t)console.log(e)}(app_opts)})();
package/fs-worker.js DELETED
@@ -1 +0,0 @@
1
- (()=>{var e={816(e,o,n){function t(){let e;return"undefined"==typeof window&&void 0!==n.g&&n.g.global===n.g&&"function"!=typeof n||(e=function(){let e;try{e=n(816)}catch(e){console.log(e);const o="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(o),e}return e}()),e}const r=t();e.exports=r,e.exports.getModule=function(e){let o;if(""==_module_name||"undefined"==typeof _module_name)o=t();else if("opfs"==_module_name)o=n(816);else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}o=n(816)}return o}},314(e,o,n){const t=n(816);_sync_agent=t.startSyncAgent,e.exports={_sync_agent},_sync_agent()}},o={};function n(t){var r=o[t];if(void 0!==r)return r.exports;var s=o[t]={exports:{}};return e[t](s,s.exports,n),s.exports}n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n(314)})();
@@ -1,2 +0,0 @@
1
- /*! For license information please see libevm-chains-info.js.LICENSE.txt */
2
- (()=>{var e={495(e,t,r){const n=r(368);_homedir_get=n._homedir_get,_file_exists=n._file_exists,_json_read=n._json_read,_lib_get=n._lib_get,_msg_info=n._msg_info,_msg_error=n._msg_error,_path_join=n._path_join,_range=n._range;const i=r(511)._data_get;function o(e,t,r){let n,i,o;if(void 0!==e&&""!=e||(e="n"),void 0!==t&&""!=t||(t=""),void 0!==r&&""!=r||(""!=t?r="split":""==t&&(r="unified")),o=`Getting path for chain with chain id '${t}' with privilege user set to '${e}' in format '${r}'.`,_msg_info(o),"unified"==r?n="chains.json":"split"==r&&(n=`${t}.json`),"y"==e){const e=_homedir_get();o=`Home directory: '${e}'`,_msg_info(o),i=_path_join([e,".config","evm-chains",n]);const t=_file_exists(i);1==t?(o=`Found database '${i}'.`,_msg_info(o)):0==t?(o=`Database '${i}' not found`,_msg_info(o)):(o="wat",_msg_error(o))}else if("n"==e){const e=_lib_get();i=_path_join([e,"evm-chains",n])}else o=`Input variable '_user' must be a boolean. _user value is '${e}'.`,_msg_error(o,0);return i}function a(e,t,n,i,a){void 0===e&&_msg_error("Network's ChainID not specified.",1),void 0===t&&(t="kirsh"),void 0===n&&(n=o(!1)),void 0===a&&(a=["node","system"]),null==i&&(i=!0);const s=function(e,t,n,i){let a,s;void 0===n&&(n=!1),void 0===i&&(i="split"),void 0===t&&(t=o(n,e,i)),0==_file_exists(t)&&"undefined"==typeof window&&void 0!==r.g&&(r.g.global,r.g);const u=_json_read(t);for(a of(s=`Displaying data for chain '${e}' of type 'undefined'.`,_msg_info(s),u))if(a.chainId==e)return a;_msg_error(`Network '${e}' not found.`,1)}(Number(e),n,i,a);if("kirsh"==t)return s.rpc[0];_msg_error("Unknown selection method.",1)}function s(e){_file_exists(e)||_msg_error(`Database at '${e}' does not exist.`,1)}function u(e,t,r,n,i,o,a){let s,u,f,l,c,h,d,p;if(c=r,"id"==t?(l="chainId",h=a,p=`Getting data for filter key: '${l}' and value '${h}'.`,_msg_info(p)):"testnet"==t&&(p="Like I have to agg a tag.",_msg_info(p)),"id"==r?c="chainId":"rpc"==r&&(c=r),"y"==o)return f=function(e){console.log(e)}(c),p=`Showing results for all networks with filter '${f}'.`,_msg_info(p),s=_json_read(e),p=`Showing results for all networks with filter '${f}'.`,_msg_info(p),s;if("n"==o){for(u of(d=[],p=`Showing results for chain '${a}' in database '${e}' with filter '${c}'.`,_msg_info(p),s=_json_read(e),p=`Database '${e}' contains '${s.length}' items.`,_msg_info(p),s))if(u[l]==a&&(d.push(u),"kirsh"==n))break;return p=`Total results returned for '${e}' are '${d.length}'.`,_msg_info(p),d}}function f(e,t,r,n,i,o,a,f){let l,c,h,d,p;if(p=0,"offline"==t){for(c of(d=`Getting data from databases '${f}'`,_msg_info(d),f))if(d=`Looking in '${c}'.`,_msg_info(d),s(c),"amount"!=r){if(l=u(c,r,n,i,0,a,e),"kirsh"==i)break}else"amount"==r&&(l=_json_read(c),p=l.length);if("amount"!=r){p=l.length,0==l.length&&(d=`No results found for network '${e}'.`,_msg_error(d,0));const t=[];for(h of l)if(h.chainId==e&&(t.push(h[n]),"all"!=i))break;l=t,d=`Found '${p}' networks in database '${c}'.`,_msg_info(d)}else if("amount"==r)return d=`Found '${p}' networks.`,_msg_info(d),p}else"online"==t&&(d="About to implement it probably.",_msg_error(d,1));return l}function l(e){"id"==e&&_msg_info(`Setting value for type '${e}'.`)}e.exports={_data_get:i,_db_paths_auto_detect:function(e){let t,r,n;("y"==user_level||"n"==user_level)&&(t=!0,r=!1);const i=o(t,"","unified"),a=o(t,e,"split"),s=o(r,"","unified"),u=o(r,e,"split");_file_exists(a)?(db_paths.push(a),n=`Found database '${a}', adding.`,_msg_info(n)):_file_exists(a)?(n="wat",_msg_error(n,1)):(n=`Default per-network database '${a}' not found, trying '${i}'.`,_msg_info(n)),_file_exists(i)?db_paths.push(i):(n=`Default unified database '${a}' not found, trying '${i}'.`,_msg_info(n)),_file_exists(u)?db_paths.push(u):(n=`Fallback per-network database '${u}' not found, trying '${s}'.`,_msg_info(n)),_file_exists(s)?db_paths.push(s):(n=`Fallback database '${u}' not found too!`,_msg_error(n,1))},_evm_chains_db_path_get:o,_evm_chains_info:function(e,t,r,n,i,o,a,s,u){let c,h,d;if("get"==e){const e=[],a=f(s,n,t,r,i,0,o,u);if("rpc"==r){for(h of a)for(d of h)if(e.push(d),"kirsh"==i)break;return e}if("name"==r)return a;if("id"==r)return a;if("explorers"==r){for(h of a)for(c of h)if(e.push(c.url),"kirsh"==i)break;return e}}else"set"==e?l(t):_msg_error(`Unknown command '${e}'.`,1)},_evm_chains_info_get:f,_evm_chains_info_set:l,_input_type_auto_detect:function(){""==input_type&&(isNaN(target_chain)?input_type="name":input_type="id")},_rpc_backend_get:a,_rpc_backends_get:function(e,t,r){let n,i,s;null==t&&(t="kirsh"),null==r&&(r=o(!1));const u=[];for(n of e)i=[n,t,r],s=a.apply(null,i),u.push(s);return u}}},526(e,t){"use strict";t.byteLength=function(e){var t=s(e),r=t[0],n=t[1];return 3*(r+n)/4-n},t.toByteArray=function(e){var t,r,o=s(e),a=o[0],u=o[1],f=new i(function(e,t,r){return 3*(t+r)/4-r}(0,a,u)),l=0,c=u>0?a-4:a;for(r=0;r<c;r+=4)t=n[e.charCodeAt(r)]<<18|n[e.charCodeAt(r+1)]<<12|n[e.charCodeAt(r+2)]<<6|n[e.charCodeAt(r+3)],f[l++]=t>>16&255,f[l++]=t>>8&255,f[l++]=255&t;return 2===u&&(t=n[e.charCodeAt(r)]<<2|n[e.charCodeAt(r+1)]>>4,f[l++]=255&t),1===u&&(t=n[e.charCodeAt(r)]<<10|n[e.charCodeAt(r+1)]<<4|n[e.charCodeAt(r+2)]>>2,f[l++]=t>>8&255,f[l++]=255&t),f},t.fromByteArray=function(e){for(var t,n=e.length,i=n%3,o=[],a=16383,s=0,u=n-i;s<u;s+=a)o.push(f(e,s,s+a>u?u:s+a));return 1===i?(t=e[n-1],o.push(r[t>>2]+r[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],o.push(r[t>>10]+r[t>>4&63]+r[t<<2&63]+"=")),o.join("")};for(var r=[],n=[],i="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",a=0;a<64;++a)r[a]=o[a],n[o.charCodeAt(a)]=a;function s(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var r=e.indexOf("=");return-1===r&&(r=t),[r,r===t?0:4-r%4]}function u(e){return r[e>>18&63]+r[e>>12&63]+r[e>>6&63]+r[63&e]}function f(e,t,r){for(var n,i=[],o=t;o<r;o+=3)n=(e[o]<<16&16711680)+(e[o+1]<<8&65280)+(255&e[o+2]),i.push(u(n));return i.join("")}n["-".charCodeAt(0)]=62,n["_".charCodeAt(0)]=63},287(e,t,r){"use strict";const n=r(526),i=r(251),o="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;t.Buffer=u,t.SlowBuffer=function(e){return+e!=e&&(e=0),u.alloc(+e)},t.INSPECT_MAX_BYTES=50;const a=2147483647;function s(e){if(e>a)throw new RangeError('The value "'+e+'" is invalid for option "size"');const t=new Uint8Array(e);return Object.setPrototypeOf(t,u.prototype),t}function u(e,t,r){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return c(e)}return f(e,t,r)}function f(e,t,r){if("string"==typeof e)return function(e,t){if("string"==typeof t&&""!==t||(t="utf8"),!u.isEncoding(t))throw new TypeError("Unknown encoding: "+t);const r=0|g(e,t);let n=s(r);const i=n.write(e,t);return i!==r&&(n=n.slice(0,i)),n}(e,t);if(ArrayBuffer.isView(e))return function(e){if(X(e,Uint8Array)){const t=new Uint8Array(e);return d(t.buffer,t.byteOffset,t.byteLength)}return h(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(X(e,ArrayBuffer)||e&&X(e.buffer,ArrayBuffer))return d(e,t,r);if("undefined"!=typeof SharedArrayBuffer&&(X(e,SharedArrayBuffer)||e&&X(e.buffer,SharedArrayBuffer)))return d(e,t,r);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');const n=e.valueOf&&e.valueOf();if(null!=n&&n!==e)return u.from(n,t,r);const i=function(e){if(u.isBuffer(e)){const t=0|p(e.length),r=s(t);return 0===r.length||e.copy(r,0,0,t),r}return void 0!==e.length?"number"!=typeof e.length||q(e.length)?s(0):h(e):"Buffer"===e.type&&Array.isArray(e.data)?h(e.data):void 0}(e);if(i)return i;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return u.from(e[Symbol.toPrimitive]("string"),t,r);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function l(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function c(e){return l(e),s(e<0?0:0|p(e))}function h(e){const t=e.length<0?0:0|p(e.length),r=s(t);for(let n=0;n<t;n+=1)r[n]=255&e[n];return r}function d(e,t,r){if(t<0||e.byteLength<t)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<t+(r||0))throw new RangeError('"length" is outside of buffer bounds');let n;return n=void 0===t&&void 0===r?new Uint8Array(e):void 0===r?new Uint8Array(e,t):new Uint8Array(e,t,r),Object.setPrototypeOf(n,u.prototype),n}function p(e){if(e>=a)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+a.toString(16)+" bytes");return 0|e}function g(e,t){if(u.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||X(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);const r=e.length,n=arguments.length>2&&!0===arguments[2];if(!n&&0===r)return 0;let i=!1;for(;;)switch(t){case"ascii":case"latin1":case"binary":return r;case"utf8":case"utf-8":return G(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*r;case"hex":return r>>>1;case"base64":return H(e).length;default:if(i)return n?-1:G(e).length;t=(""+t).toLowerCase(),i=!0}}function y(e,t,r){let n=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===r||r>this.length)&&(r=this.length),r<=0)return"";if((r>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return x(this,t,r);case"utf8":case"utf-8":return T(this,t,r);case"ascii":return O(this,t,r);case"latin1":case"binary":return C(this,t,r);case"base64":return R(this,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,r);default:if(n)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),n=!0}}function w(e,t,r){const n=e[t];e[t]=e[r],e[r]=n}function m(e,t,r,n,i){if(0===e.length)return-1;if("string"==typeof r?(n=r,r=0):r>2147483647?r=2147483647:r<-2147483648&&(r=-2147483648),q(r=+r)&&(r=i?0:e.length-1),r<0&&(r=e.length+r),r>=e.length){if(i)return-1;r=e.length-1}else if(r<0){if(!i)return-1;r=0}if("string"==typeof t&&(t=u.from(t,n)),u.isBuffer(t))return 0===t.length?-1:b(e,t,r,n,i);if("number"==typeof t)return t&=255,"function"==typeof Uint8Array.prototype.indexOf?i?Uint8Array.prototype.indexOf.call(e,t,r):Uint8Array.prototype.lastIndexOf.call(e,t,r):b(e,[t],r,n,i);throw new TypeError("val must be string, number or Buffer")}function b(e,t,r,n,i){let o,a=1,s=e.length,u=t.length;if(void 0!==n&&("ucs2"===(n=String(n).toLowerCase())||"ucs-2"===n||"utf16le"===n||"utf-16le"===n)){if(e.length<2||t.length<2)return-1;a=2,s/=2,u/=2,r/=2}function f(e,t){return 1===a?e[t]:e.readUInt16BE(t*a)}if(i){let n=-1;for(o=r;o<s;o++)if(f(e,o)===f(t,-1===n?0:o-n)){if(-1===n&&(n=o),o-n+1===u)return n*a}else-1!==n&&(o-=o-n),n=-1}else for(r+u>s&&(r=s-u),o=r;o>=0;o--){let r=!0;for(let n=0;n<u;n++)if(f(e,o+n)!==f(t,n)){r=!1;break}if(r)return o}return-1}function v(e,t,r,n){r=Number(r)||0;const i=e.length-r;n?(n=Number(n))>i&&(n=i):n=i;const o=t.length;let a;for(n>o/2&&(n=o/2),a=0;a<n;++a){const n=parseInt(t.substr(2*a,2),16);if(q(n))return a;e[r+a]=n}return a}function _(e,t,r,n){return V(G(t,e.length-r),e,r,n)}function E(e,t,r,n){return V(function(e){const t=[];for(let r=0;r<e.length;++r)t.push(255&e.charCodeAt(r));return t}(t),e,r,n)}function S(e,t,r,n){return V(H(t),e,r,n)}function A(e,t,r,n){return V(function(e,t){let r,n,i;const o=[];for(let a=0;a<e.length&&!((t-=2)<0);++a)r=e.charCodeAt(a),n=r>>8,i=r%256,o.push(i),o.push(n);return o}(t,e.length-r),e,r,n)}function R(e,t,r){return 0===t&&r===e.length?n.fromByteArray(e):n.fromByteArray(e.slice(t,r))}function T(e,t,r){r=Math.min(e.length,r);const n=[];let i=t;for(;i<r;){const t=e[i];let o=null,a=t>239?4:t>223?3:t>191?2:1;if(i+a<=r){let r,n,s,u;switch(a){case 1:t<128&&(o=t);break;case 2:r=e[i+1],128==(192&r)&&(u=(31&t)<<6|63&r,u>127&&(o=u));break;case 3:r=e[i+1],n=e[i+2],128==(192&r)&&128==(192&n)&&(u=(15&t)<<12|(63&r)<<6|63&n,u>2047&&(u<55296||u>57343)&&(o=u));break;case 4:r=e[i+1],n=e[i+2],s=e[i+3],128==(192&r)&&128==(192&n)&&128==(192&s)&&(u=(15&t)<<18|(63&r)<<12|(63&n)<<6|63&s,u>65535&&u<1114112&&(o=u))}}null===o?(o=65533,a=1):o>65535&&(o-=65536,n.push(o>>>10&1023|55296),o=56320|1023&o),n.push(o),i+=a}return function(e){const t=e.length;if(t<=k)return String.fromCharCode.apply(String,e);let r="",n=0;for(;n<t;)r+=String.fromCharCode.apply(String,e.slice(n,n+=k));return r}(n)}t.kMaxLength=a,u.TYPED_ARRAY_SUPPORT=function(){try{const e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),u.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(u.prototype,"parent",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.buffer}}),Object.defineProperty(u.prototype,"offset",{enumerable:!0,get:function(){if(u.isBuffer(this))return this.byteOffset}}),u.poolSize=8192,u.from=function(e,t,r){return f(e,t,r)},Object.setPrototypeOf(u.prototype,Uint8Array.prototype),Object.setPrototypeOf(u,Uint8Array),u.alloc=function(e,t,r){return function(e,t,r){return l(e),e<=0?s(e):void 0!==t?"string"==typeof r?s(e).fill(t,r):s(e).fill(t):s(e)}(e,t,r)},u.allocUnsafe=function(e){return c(e)},u.allocUnsafeSlow=function(e){return c(e)},u.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==u.prototype},u.compare=function(e,t){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),X(t,Uint8Array)&&(t=u.from(t,t.offset,t.byteLength)),!u.isBuffer(e)||!u.isBuffer(t))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===t)return 0;let r=e.length,n=t.length;for(let i=0,o=Math.min(r,n);i<o;++i)if(e[i]!==t[i]){r=e[i],n=t[i];break}return r<n?-1:n<r?1:0},u.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},u.concat=function(e,t){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return u.alloc(0);let r;if(void 0===t)for(t=0,r=0;r<e.length;++r)t+=e[r].length;const n=u.allocUnsafe(t);let i=0;for(r=0;r<e.length;++r){let t=e[r];if(X(t,Uint8Array))i+t.length>n.length?(u.isBuffer(t)||(t=u.from(t)),t.copy(n,i)):Uint8Array.prototype.set.call(n,t,i);else{if(!u.isBuffer(t))throw new TypeError('"list" argument must be an Array of Buffers');t.copy(n,i)}i+=t.length}return n},u.byteLength=g,u.prototype._isBuffer=!0,u.prototype.swap16=function(){const e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(let t=0;t<e;t+=2)w(this,t,t+1);return this},u.prototype.swap32=function(){const e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(let t=0;t<e;t+=4)w(this,t,t+3),w(this,t+1,t+2);return this},u.prototype.swap64=function(){const e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(let t=0;t<e;t+=8)w(this,t,t+7),w(this,t+1,t+6),w(this,t+2,t+5),w(this,t+3,t+4);return this},u.prototype.toString=function(){const e=this.length;return 0===e?"":0===arguments.length?T(this,0,e):y.apply(this,arguments)},u.prototype.toLocaleString=u.prototype.toString,u.prototype.equals=function(e){if(!u.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===u.compare(this,e)},u.prototype.inspect=function(){let e="";const r=t.INSPECT_MAX_BYTES;return e=this.toString("hex",0,r).replace(/(.{2})/g,"$1 ").trim(),this.length>r&&(e+=" ... "),"<Buffer "+e+">"},o&&(u.prototype[o]=u.prototype.inspect),u.prototype.compare=function(e,t,r,n,i){if(X(e,Uint8Array)&&(e=u.from(e,e.offset,e.byteLength)),!u.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===t&&(t=0),void 0===r&&(r=e?e.length:0),void 0===n&&(n=0),void 0===i&&(i=this.length),t<0||r>e.length||n<0||i>this.length)throw new RangeError("out of range index");if(n>=i&&t>=r)return 0;if(n>=i)return-1;if(t>=r)return 1;if(this===e)return 0;let o=(i>>>=0)-(n>>>=0),a=(r>>>=0)-(t>>>=0);const s=Math.min(o,a),f=this.slice(n,i),l=e.slice(t,r);for(let e=0;e<s;++e)if(f[e]!==l[e]){o=f[e],a=l[e];break}return o<a?-1:a<o?1:0},u.prototype.includes=function(e,t,r){return-1!==this.indexOf(e,t,r)},u.prototype.indexOf=function(e,t,r){return m(this,e,t,r,!0)},u.prototype.lastIndexOf=function(e,t,r){return m(this,e,t,r,!1)},u.prototype.write=function(e,t,r,n){if(void 0===t)n="utf8",r=this.length,t=0;else if(void 0===r&&"string"==typeof t)n=t,r=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(r)?(r>>>=0,void 0===n&&(n="utf8")):(n=r,r=void 0)}const i=this.length-t;if((void 0===r||r>i)&&(r=i),e.length>0&&(r<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");n||(n="utf8");let o=!1;for(;;)switch(n){case"hex":return v(this,e,t,r);case"utf8":case"utf-8":return _(this,e,t,r);case"ascii":case"latin1":case"binary":return E(this,e,t,r);case"base64":return S(this,e,t,r);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return A(this,e,t,r);default:if(o)throw new TypeError("Unknown encoding: "+n);n=(""+n).toLowerCase(),o=!0}},u.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};const k=4096;function O(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(127&e[i]);return n}function C(e,t,r){let n="";r=Math.min(e.length,r);for(let i=t;i<r;++i)n+=String.fromCharCode(e[i]);return n}function x(e,t,r){const n=e.length;(!t||t<0)&&(t=0),(!r||r<0||r>n)&&(r=n);let i="";for(let n=t;n<r;++n)i+=J[e[n]];return i}function L(e,t,r){const n=e.slice(t,r);let i="";for(let e=0;e<n.length-1;e+=2)i+=String.fromCharCode(n[e]+256*n[e+1]);return i}function I(e,t,r){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>r)throw new RangeError("Trying to access beyond buffer length")}function B(e,t,r,n,i,o){if(!u.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(t>i||t<o)throw new RangeError('"value" argument is out of bounds');if(r+n>e.length)throw new RangeError("Index out of range")}function U(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o,o>>=8,e[r++]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,a>>=8,e[r++]=a,r}function j(e,t,r,n,i){W(t,n,i,e,r,7);let o=Number(t&BigInt(4294967295));e[r+7]=o,o>>=8,e[r+6]=o,o>>=8,e[r+5]=o,o>>=8,e[r+4]=o;let a=Number(t>>BigInt(32)&BigInt(4294967295));return e[r+3]=a,a>>=8,e[r+2]=a,a>>=8,e[r+1]=a,a>>=8,e[r]=a,r+8}function M(e,t,r,n,i,o){if(r+n>e.length)throw new RangeError("Index out of range");if(r<0)throw new RangeError("Index out of range")}function P(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,4),i.write(e,t,r,n,23,4),r+4}function $(e,t,r,n,o){return t=+t,r>>>=0,o||M(e,0,r,8),i.write(e,t,r,n,52,8),r+8}u.prototype.slice=function(e,t){const r=this.length;(e=~~e)<0?(e+=r)<0&&(e=0):e>r&&(e=r),(t=void 0===t?r:~~t)<0?(t+=r)<0&&(t=0):t>r&&(t=r),t<e&&(t=e);const n=this.subarray(e,t);return Object.setPrototypeOf(n,u.prototype),n},u.prototype.readUintLE=u.prototype.readUIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return n},u.prototype.readUintBE=u.prototype.readUIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e+--t],i=1;for(;t>0&&(i*=256);)n+=this[e+--t]*i;return n},u.prototype.readUint8=u.prototype.readUInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),this[e]},u.prototype.readUint16LE=u.prototype.readUInt16LE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]|this[e+1]<<8},u.prototype.readUint16BE=u.prototype.readUInt16BE=function(e,t){return e>>>=0,t||I(e,2,this.length),this[e]<<8|this[e+1]},u.prototype.readUint32LE=u.prototype.readUInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},u.prototype.readUint32BE=u.prototype.readUInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},u.prototype.readBigUInt64LE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t+256*this[++e]+65536*this[++e]+this[++e]*2**24,i=this[++e]+256*this[++e]+65536*this[++e]+r*2**24;return BigInt(n)+(BigInt(i)<<BigInt(32))}),u.prototype.readBigUInt64BE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=t*2**24+65536*this[++e]+256*this[++e]+this[++e],i=this[++e]*2**24+65536*this[++e]+256*this[++e]+r;return(BigInt(n)<<BigInt(32))+BigInt(i)}),u.prototype.readIntLE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=this[e],i=1,o=0;for(;++o<t&&(i*=256);)n+=this[e+o]*i;return i*=128,n>=i&&(n-=Math.pow(2,8*t)),n},u.prototype.readIntBE=function(e,t,r){e>>>=0,t>>>=0,r||I(e,t,this.length);let n=t,i=1,o=this[e+--n];for(;n>0&&(i*=256);)o+=this[e+--n]*i;return i*=128,o>=i&&(o-=Math.pow(2,8*t)),o},u.prototype.readInt8=function(e,t){return e>>>=0,t||I(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},u.prototype.readInt16LE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e]|this[e+1]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt16BE=function(e,t){e>>>=0,t||I(e,2,this.length);const r=this[e+1]|this[e]<<8;return 32768&r?4294901760|r:r},u.prototype.readInt32LE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},u.prototype.readInt32BE=function(e,t){return e>>>=0,t||I(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},u.prototype.readBigInt64LE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=this[e+4]+256*this[e+5]+65536*this[e+6]+(r<<24);return(BigInt(n)<<BigInt(32))+BigInt(t+256*this[++e]+65536*this[++e]+this[++e]*2**24)}),u.prototype.readBigInt64BE=K(function(e){Z(e>>>=0,"offset");const t=this[e],r=this[e+7];void 0!==t&&void 0!==r||z(e,this.length-8);const n=(t<<24)+65536*this[++e]+256*this[++e]+this[++e];return(BigInt(n)<<BigInt(32))+BigInt(this[++e]*2**24+65536*this[++e]+256*this[++e]+r)}),u.prototype.readFloatLE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!0,23,4)},u.prototype.readFloatBE=function(e,t){return e>>>=0,t||I(e,4,this.length),i.read(this,e,!1,23,4)},u.prototype.readDoubleLE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!0,52,8)},u.prototype.readDoubleBE=function(e,t){return e>>>=0,t||I(e,8,this.length),i.read(this,e,!1,52,8)},u.prototype.writeUintLE=u.prototype.writeUIntLE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||B(this,e,t,r,Math.pow(2,8*r)-1,0);let i=1,o=0;for(this[t]=255&e;++o<r&&(i*=256);)this[t+o]=e/i&255;return t+r},u.prototype.writeUintBE=u.prototype.writeUIntBE=function(e,t,r,n){e=+e,t>>>=0,r>>>=0,n||B(this,e,t,r,Math.pow(2,8*r)-1,0);let i=r-1,o=1;for(this[t+i]=255&e;--i>=0&&(o*=256);)this[t+i]=e/o&255;return t+r},u.prototype.writeUint8=u.prototype.writeUInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,255,0),this[t]=255&e,t+1},u.prototype.writeUint16LE=u.prototype.writeUInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeUint16BE=u.prototype.writeUInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeUint32LE=u.prototype.writeUInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},u.prototype.writeUint32BE=u.prototype.writeUInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigUInt64LE=K(function(e,t=0){return U(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeBigUInt64BE=K(function(e,t=0){return j(this,e,t,BigInt(0),BigInt("0xffffffffffffffff"))}),u.prototype.writeIntLE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,e,t,r,n-1,-n)}let i=0,o=1,a=0;for(this[t]=255&e;++i<r&&(o*=256);)e<0&&0===a&&0!==this[t+i-1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeIntBE=function(e,t,r,n){if(e=+e,t>>>=0,!n){const n=Math.pow(2,8*r-1);B(this,e,t,r,n-1,-n)}let i=r-1,o=1,a=0;for(this[t+i]=255&e;--i>=0&&(o*=256);)e<0&&0===a&&0!==this[t+i+1]&&(a=1),this[t+i]=(e/o|0)-a&255;return t+r},u.prototype.writeInt8=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},u.prototype.writeInt16LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},u.prototype.writeInt16BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},u.prototype.writeInt32LE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},u.prototype.writeInt32BE=function(e,t,r){return e=+e,t>>>=0,r||B(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},u.prototype.writeBigInt64LE=K(function(e,t=0){return U(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeBigInt64BE=K(function(e,t=0){return j(this,e,t,-BigInt("0x8000000000000000"),BigInt("0x7fffffffffffffff"))}),u.prototype.writeFloatLE=function(e,t,r){return P(this,e,t,!0,r)},u.prototype.writeFloatBE=function(e,t,r){return P(this,e,t,!1,r)},u.prototype.writeDoubleLE=function(e,t,r){return $(this,e,t,!0,r)},u.prototype.writeDoubleBE=function(e,t,r){return $(this,e,t,!1,r)},u.prototype.copy=function(e,t,r,n){if(!u.isBuffer(e))throw new TypeError("argument should be a Buffer");if(r||(r=0),n||0===n||(n=this.length),t>=e.length&&(t=e.length),t||(t=0),n>0&&n<r&&(n=r),n===r)return 0;if(0===e.length||0===this.length)return 0;if(t<0)throw new RangeError("targetStart out of bounds");if(r<0||r>=this.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("sourceEnd out of bounds");n>this.length&&(n=this.length),e.length-t<n-r&&(n=e.length-t+r);const i=n-r;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(t,r,n):Uint8Array.prototype.set.call(e,this.subarray(r,n),t),i},u.prototype.fill=function(e,t,r,n){if("string"==typeof e){if("string"==typeof t?(n=t,t=0,r=this.length):"string"==typeof r&&(n=r,r=this.length),void 0!==n&&"string"!=typeof n)throw new TypeError("encoding must be a string");if("string"==typeof n&&!u.isEncoding(n))throw new TypeError("Unknown encoding: "+n);if(1===e.length){const t=e.charCodeAt(0);("utf8"===n&&t<128||"latin1"===n)&&(e=t)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(t<0||this.length<t||this.length<r)throw new RangeError("Out of range index");if(r<=t)return this;let i;if(t>>>=0,r=void 0===r?this.length:r>>>0,e||(e=0),"number"==typeof e)for(i=t;i<r;++i)this[i]=e;else{const o=u.isBuffer(e)?e:u.from(e,n),a=o.length;if(0===a)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(i=0;i<r-t;++i)this[i+t]=o[i%a]}return this};const F={};function N(e,t,r){F[e]=class extends r{constructor(){super(),Object.defineProperty(this,"message",{value:t.apply(this,arguments),writable:!0,configurable:!0}),this.name=`${this.name} [${e}]`,this.stack,delete this.name}get code(){return e}set code(e){Object.defineProperty(this,"code",{configurable:!0,enumerable:!0,value:e,writable:!0})}toString(){return`${this.name} [${e}]: ${this.message}`}}}function D(e){let t="",r=e.length;const n="-"===e[0]?1:0;for(;r>=n+4;r-=3)t=`_${e.slice(r-3,r)}${t}`;return`${e.slice(0,r)}${t}`}function W(e,t,r,n,i,o){if(e>r||e<t){const n="bigint"==typeof t?"n":"";let i;throw i=o>3?0===t||t===BigInt(0)?`>= 0${n} and < 2${n} ** ${8*(o+1)}${n}`:`>= -(2${n} ** ${8*(o+1)-1}${n}) and < 2 ** ${8*(o+1)-1}${n}`:`>= ${t}${n} and <= ${r}${n}`,new F.ERR_OUT_OF_RANGE("value",i,e)}!function(e,t,r){Z(t,"offset"),void 0!==e[t]&&void 0!==e[t+r]||z(t,e.length-(r+1))}(n,i,o)}function Z(e,t){if("number"!=typeof e)throw new F.ERR_INVALID_ARG_TYPE(t,"number",e)}function z(e,t,r){if(Math.floor(e)!==e)throw Z(e,r),new F.ERR_OUT_OF_RANGE(r||"offset","an integer",e);if(t<0)throw new F.ERR_BUFFER_OUT_OF_BOUNDS;throw new F.ERR_OUT_OF_RANGE(r||"offset",`>= ${r?1:0} and <= ${t}`,e)}N("ERR_BUFFER_OUT_OF_BOUNDS",function(e){return e?`${e} is outside of buffer bounds`:"Attempt to access memory outside buffer bounds"},RangeError),N("ERR_INVALID_ARG_TYPE",function(e,t){return`The "${e}" argument must be of type number. Received type ${typeof t}`},TypeError),N("ERR_OUT_OF_RANGE",function(e,t,r){let n=`The value of "${e}" is out of range.`,i=r;return Number.isInteger(r)&&Math.abs(r)>2**32?i=D(String(r)):"bigint"==typeof r&&(i=String(r),(r>BigInt(2)**BigInt(32)||r<-(BigInt(2)**BigInt(32)))&&(i=D(i)),i+="n"),n+=` It must be ${t}. Received ${i}`,n},RangeError);const Y=/[^+/0-9A-Za-z-_]/g;function G(e,t){let r;t=t||1/0;const n=e.length;let i=null;const o=[];for(let a=0;a<n;++a){if(r=e.charCodeAt(a),r>55295&&r<57344){if(!i){if(r>56319){(t-=3)>-1&&o.push(239,191,189);continue}if(a+1===n){(t-=3)>-1&&o.push(239,191,189);continue}i=r;continue}if(r<56320){(t-=3)>-1&&o.push(239,191,189),i=r;continue}r=65536+(i-55296<<10|r-56320)}else i&&(t-=3)>-1&&o.push(239,191,189);if(i=null,r<128){if((t-=1)<0)break;o.push(r)}else if(r<2048){if((t-=2)<0)break;o.push(r>>6|192,63&r|128)}else if(r<65536){if((t-=3)<0)break;o.push(r>>12|224,r>>6&63|128,63&r|128)}else{if(!(r<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;o.push(r>>18|240,r>>12&63|128,r>>6&63|128,63&r|128)}}return o}function H(e){return n.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(Y,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function V(e,t,r,n){let i;for(i=0;i<n&&!(i+r>=t.length||i>=e.length);++i)t[i+r]=e[i];return i}function X(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function q(e){return e!=e}const J=function(){const e="0123456789abcdef",t=new Array(256);for(let r=0;r<16;++r){const n=16*r;for(let i=0;i<16;++i)t[n+i]=e[r]+e[i]}return t}();function K(e){return"undefined"==typeof BigInt?Q:e}function Q(){throw new Error("BigInt not supported")}},368(e,t,r){const n=r(70),i=n._argv_get,o=n._argv_url_get,a=(0,n._process_exit_get)(),s=(0,n._process_cwd_get)(),u=s,f=n._yargv_get,l=r(314),c=l._basename,h=l._stat;function d(e,t){return`[${e}] ${t}: {_msg}`}function p(e){let t;"n"==quiet&&(_template=d(app_name,"INFO"),t=_template.replaceAll("{_msg}",e),console.log(t))}function g(e,t){let r,n;t=String(t),r=d(app_name,"ERROR"),n=r.replaceAll("{_msg}",e),console.error(n),"1"===t&&a(1)}function y(e,t){let r;return void 0===t&&(t=e,e=0),r=t-e,r<0&&(_msg="Second argument 'end' must be greater than first argument 'start'.",g(_msg,1)),Array(r).keys().map(t=>t+e)}e.exports={_argv_get:i,_argv_url_get:o,_app_name_get:function(){let e;return e=c("/index.js"),e},_basename:l._basename,_cat:l._cat,_cmdline_check:function(e){let t,r,n;return"undefined"==typeof window&&(t=i(),r=t[1],void 0===r&&(r=t.$0),n=c(r),n==e)},_dirname:l._dirname,_echo:function(e){console.log(e)},_error_display:function(e){let t;"object"==typeof error?(t="error"in e&&null!=e.error&&"message"in e.error?e.error.message:"shortMessage"in e?e.shortMessage:e,console.error(e)):(t=e,console.error(e)),g(t,0)},_ext_rm:l._ext_rm,_file_exists:l._file_exists,_file_read:l._file_read,_file_write:l._file_write,_fs_worker_new:l._fs_worker_new,_fs_worker_start:l._fs_worker_start,_get_date_human:function(){const e=new Date;return`${e.getFullYear()}-${e.getMonth()}-${e.getDay()}T${e.getHours()}:${e.getMinutes()}+0000`},_homedir_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&(r.g.global,r.g),"undefined"!=typeof window&&(e="/"),e},_json_display:l._json_display,_json_read:l._json_read,_lib_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e="/usr/lib"),e},_ls:l._ls,_mkdir:l._mkdir,_msg_info:p,_msg_error:g,_msg_info_obj:function(e,t){let r;r=`${e}: '${t}'`,p(r)},_mv:l._mv,_path_join:l._path_join,_printf:function(e){"undefined"==typeof window&&(_stdout=process.stdout),"undefined"!=typeof window&&(_stdout=r(310)),_stdout.write(e)},_process_exit:a,_process_cwd:s,_pwd:u,_range:y,_rm:l._rm,_seq:function(e,t){let r,n;for(r of(t<start&&(_msg="Second argument 'end' must be greater than first argument 'start'.",g(_msg,1)),n=[],void 0===t&&(t=e,e=1),y(e,t+1)))n.push(r);return n},_sleep:function(e){return new Promise(t=>setTimeout(t,e))},_stat:h,_yargv_get:f}},314(e,t,r){const n=r(816),i=n.fsWorkerNew,o=n.fsWorkerStart,a=n.statSync,s=JSON.parse,u=JSON.stringify,f=r(503),l=f.basename,c=f.dirname,h=f.join,d=f.parse;function p(e){let t,r;return t={encoding:"utf8",flag:"r"},r=n.readFileSync(e,t),r}function g(e){let t;return t=h.apply(null,e),t}e.exports={_basename:function(e){let t;return t=l(e),t},_cat:p,_dirname:function(e){let t;return t=c(e),t},_ext_rm:function(e){let t,r,n;return t=d(e).dir,r=d(e).name,n=[t,r],g(n)},_file_exists:function(e){let t,r;return r=!1,t=n.existsSync(e),t&&(r=!0),r},_file_read:p,_file_write:function(e,t){n.writeFileSync(e,t)},_fs_worker_new:i,_fs_worker_start:o,_json_display:u,_json_read:function(e){let t,r;return t=p(e),r=s(t),r},_ls:function(e){let t,r;return void 0===n.readdirSync?(t=n.readDirSync,r=t.apply(null,[e]).unwrap()):(t=n.readdirSync,r=t.apply(null,[e])),r},_mkdir:n.mkdirSync,_mv:function(e){let t,r;return void 0===n.renameSync?(t=n.moveSync,r=t.apply(null,e).unwrap()):(t=n.renameSync,r=t.apply(null,e)),r},_path_join:g,_rm:function(e){let t,r;return void 0===n.rmSync?(t=n.removeSync,r=t.apply(null,e).unwrap()):(t=n.rmSync,r=t.apply(null,e)),r},_stat:a}},70(e,t,r){function n(e){let t,r,n,i,o,a,s,u,f;void 0===e&&(s="Getting all values.",_msg_info("Getting all values."),e=""),t=[],a=window.location,u=a.search.substring(1),n=u.split("&");for(let a=0;a<n.length;a++)r=n[a],o=r.split("="),i=o[0],i!=e&&""!=e||(f=o[1],t.push(f));return t}e.exports={_argv_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=n()),e},_argv_url_get:n,_process_exit_get:function(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=function(e){return e}),e},_process_cwd_get:function(){let e;return e="undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"==typeof r?process.cwd:function(){return"."},e},_yargv_get:function(){let e,t,n;if("undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g)return t=r(Object(function(){var e=new Error("Cannot find module 'yargs'");throw e.code="MODULE_NOT_FOUND",e}())),_yargs_helpers_module=r(Object(function(){var e=new Error("Cannot find module 'yargs/helpers'");throw e.code="MODULE_NOT_FOUND",e}())),e=_yargs_helpers_module.hideBin,n=t(e(process.argv)),n.parse()}}},511(e,t,r){const n=r(368);function i(e){const t=_path_join(["chains",`${e}.json`]);return _json_read(t)}function o(){const e=_path_join(["chains","chains.json"]);return _json_read(e)}_json_read=n._json_read,_path_join=n._path_join,e.exports={_data_get:function(e){let t;return t=void 0===e||""==e?o():i(e),t},_data_split_get:i,_data_unified_get:o}},7(e){"use strict";var t,r="object"==typeof Reflect?Reflect:null,n=r&&"function"==typeof r.apply?r.apply:function(e,t,r){return Function.prototype.apply.call(e,t,r)};t=r&&"function"==typeof r.ownKeys?r.ownKeys:Object.getOwnPropertySymbols?function(e){return Object.getOwnPropertyNames(e).concat(Object.getOwnPropertySymbols(e))}:function(e){return Object.getOwnPropertyNames(e)};var i=Number.isNaN||function(e){return e!=e};function o(){o.init.call(this)}e.exports=o,e.exports.once=function(e,t){return new Promise(function(r,n){function i(r){e.removeListener(t,o),n(r)}function o(){"function"==typeof e.removeListener&&e.removeListener("error",i),r([].slice.call(arguments))}g(e,t,o,{once:!0}),"error"!==t&&function(e,t){"function"==typeof e.on&&g(e,"error",t,{once:!0})}(e,i)})},o.EventEmitter=o,o.prototype._events=void 0,o.prototype._eventsCount=0,o.prototype._maxListeners=void 0;var a=10;function s(e){if("function"!=typeof e)throw new TypeError('The "listener" argument must be of type Function. Received type '+typeof e)}function u(e){return void 0===e._maxListeners?o.defaultMaxListeners:e._maxListeners}function f(e,t,r,n){var i,o,a,f;if(s(r),void 0===(o=e._events)?(o=e._events=Object.create(null),e._eventsCount=0):(void 0!==o.newListener&&(e.emit("newListener",t,r.listener?r.listener:r),o=e._events),a=o[t]),void 0===a)a=o[t]=r,++e._eventsCount;else if("function"==typeof a?a=o[t]=n?[r,a]:[a,r]:n?a.unshift(r):a.push(r),(i=u(e))>0&&a.length>i&&!a.warned){a.warned=!0;var l=new Error("Possible EventEmitter memory leak detected. "+a.length+" "+String(t)+" listeners added. Use emitter.setMaxListeners() to increase limit");l.name="MaxListenersExceededWarning",l.emitter=e,l.type=t,l.count=a.length,f=l,console&&console.warn&&console.warn(f)}return e}function l(){if(!this.fired)return this.target.removeListener(this.type,this.wrapFn),this.fired=!0,0===arguments.length?this.listener.call(this.target):this.listener.apply(this.target,arguments)}function c(e,t,r){var n={fired:!1,wrapFn:void 0,target:e,type:t,listener:r},i=l.bind(n);return i.listener=r,n.wrapFn=i,i}function h(e,t,r){var n=e._events;if(void 0===n)return[];var i=n[t];return void 0===i?[]:"function"==typeof i?r?[i.listener||i]:[i]:r?function(e){for(var t=new Array(e.length),r=0;r<t.length;++r)t[r]=e[r].listener||e[r];return t}(i):p(i,i.length)}function d(e){var t=this._events;if(void 0!==t){var r=t[e];if("function"==typeof r)return 1;if(void 0!==r)return r.length}return 0}function p(e,t){for(var r=new Array(t),n=0;n<t;++n)r[n]=e[n];return r}function g(e,t,r,n){if("function"==typeof e.on)n.once?e.once(t,r):e.on(t,r);else{if("function"!=typeof e.addEventListener)throw new TypeError('The "emitter" argument must be of type EventEmitter. Received type '+typeof e);e.addEventListener(t,function i(o){n.once&&e.removeEventListener(t,i),r(o)})}}Object.defineProperty(o,"defaultMaxListeners",{enumerable:!0,get:function(){return a},set:function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "defaultMaxListeners" is out of range. It must be a non-negative number. Received '+e+".");a=e}}),o.init=function(){void 0!==this._events&&this._events!==Object.getPrototypeOf(this)._events||(this._events=Object.create(null),this._eventsCount=0),this._maxListeners=this._maxListeners||void 0},o.prototype.setMaxListeners=function(e){if("number"!=typeof e||e<0||i(e))throw new RangeError('The value of "n" is out of range. It must be a non-negative number. Received '+e+".");return this._maxListeners=e,this},o.prototype.getMaxListeners=function(){return u(this)},o.prototype.emit=function(e){for(var t=[],r=1;r<arguments.length;r++)t.push(arguments[r]);var i="error"===e,o=this._events;if(void 0!==o)i=i&&void 0===o.error;else if(!i)return!1;if(i){var a;if(t.length>0&&(a=t[0]),a instanceof Error)throw a;var s=new Error("Unhandled error."+(a?" ("+a.message+")":""));throw s.context=a,s}var u=o[e];if(void 0===u)return!1;if("function"==typeof u)n(u,this,t);else{var f=u.length,l=p(u,f);for(r=0;r<f;++r)n(l[r],this,t)}return!0},o.prototype.addListener=function(e,t){return f(this,e,t,!1)},o.prototype.on=o.prototype.addListener,o.prototype.prependListener=function(e,t){return f(this,e,t,!0)},o.prototype.once=function(e,t){return s(t),this.on(e,c(this,e,t)),this},o.prototype.prependOnceListener=function(e,t){return s(t),this.prependListener(e,c(this,e,t)),this},o.prototype.removeListener=function(e,t){var r,n,i,o,a;if(s(t),void 0===(n=this._events))return this;if(void 0===(r=n[e]))return this;if(r===t||r.listener===t)0===--this._eventsCount?this._events=Object.create(null):(delete n[e],n.removeListener&&this.emit("removeListener",e,r.listener||t));else if("function"!=typeof r){for(i=-1,o=r.length-1;o>=0;o--)if(r[o]===t||r[o].listener===t){a=r[o].listener,i=o;break}if(i<0)return this;0===i?r.shift():function(e,t){for(;t+1<e.length;t++)e[t]=e[t+1];e.pop()}(r,i),1===r.length&&(n[e]=r[0]),void 0!==n.removeListener&&this.emit("removeListener",e,a||t)}return this},o.prototype.off=o.prototype.removeListener,o.prototype.removeAllListeners=function(e){var t,r,n;if(void 0===(r=this._events))return this;if(void 0===r.removeListener)return 0===arguments.length?(this._events=Object.create(null),this._eventsCount=0):void 0!==r[e]&&(0===--this._eventsCount?this._events=Object.create(null):delete r[e]),this;if(0===arguments.length){var i,o=Object.keys(r);for(n=0;n<o.length;++n)"removeListener"!==(i=o[n])&&this.removeAllListeners(i);return this.removeAllListeners("removeListener"),this._events=Object.create(null),this._eventsCount=0,this}if("function"==typeof(t=r[e]))this.removeListener(e,t);else if(void 0!==t)for(n=t.length-1;n>=0;n--)this.removeListener(e,t[n]);return this},o.prototype.listeners=function(e){return h(this,e,!0)},o.prototype.rawListeners=function(e){return h(this,e,!1)},o.listenerCount=function(e,t){return"function"==typeof e.listenerCount?e.listenerCount(t):d.call(e,t)},o.prototype.listenerCount=d,o.prototype.eventNames=function(){return this._eventsCount>0?t(this._events):[]}},816(e,t,r){function n(){let e;return"undefined"==typeof window&&void 0!==r.g&&r.g.global===r.g&&"function"!=typeof r||(e=function(){let e;try{e=r(10)}catch(e){console.log(e);const t="Error importing the '@themartiancompany/opfs' module as 'opfs'. If you got this error while bundling a webpack for a project depending on this module double check its 'webpack.config.js' file or whether the 'opfs' module is listed in developer dependencies and install them.I'm sorry for this inconvenience but Node packagement system does not currently distinguish 'development' from 'build' dependencies.";throw console.error(t),e}return e}()),e}const i=n();e.exports=i,e.exports.getModule=function(e){let t;if(""==_module_name||"undefined"==typeof _module_name)t=n();else if("opfs"==_module_name)t=r(10);else{if("fs"!=_module_name){const e="Unknown file system module "+`'${_module_name}'.`.const;throw _error={msg:e},console.error(e),_error}t=r(816)}return t}},251(e,t){t.read=function(e,t,r,n,i){var o,a,s=8*i-n-1,u=(1<<s)-1,f=u>>1,l=-7,c=r?i-1:0,h=r?-1:1,d=e[t+c];for(c+=h,o=d&(1<<-l)-1,d>>=-l,l+=s;l>0;o=256*o+e[t+c],c+=h,l-=8);for(a=o&(1<<-l)-1,o>>=-l,l+=n;l>0;a=256*a+e[t+c],c+=h,l-=8);if(0===o)o=1-f;else{if(o===u)return a?NaN:1/0*(d?-1:1);a+=Math.pow(2,n),o-=f}return(d?-1:1)*a*Math.pow(2,o-n)},t.write=function(e,t,r,n,i,o){var a,s,u,f=8*o-i-1,l=(1<<f)-1,c=l>>1,h=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,d=n?0:o-1,p=n?1:-1,g=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,a=l):(a=Math.floor(Math.log(t)/Math.LN2),t*(u=Math.pow(2,-a))<1&&(a--,u*=2),(t+=a+c>=1?h/u:h*Math.pow(2,1-c))*u>=2&&(a++,u/=2),a+c>=l?(s=0,a=l):a+c>=1?(s=(t*u-1)*Math.pow(2,i),a+=c):(s=t*Math.pow(2,c-1)*Math.pow(2,i),a=0));i>=8;e[r+d]=255&s,d+=p,s/=256,i-=8);for(a=a<<i|s,f+=i;f>0;e[r+d]=255&a,d+=p,a/=256,f-=8);e[r+d-p]|=128*g}},698(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}}},10(e,t,r){const n=r(805),i=r(866),o=r(12);function a(e){let t;return void 0===e&&(e="fs-worker.js"),t=new i(e),t}_file=o.file,_read_stream_create=function(e,t){return _file(e).createReader()},e.exports=n,e.exports.fsWorkerNew=a,e.exports.fsWorkerStart=async function(e,t,r){let n,i,o,s;return void 0===e&&(e="fs-worker.js"),"Number"!=typeof t&&(t=10485760),"Number"!=typeof t&&(r=10485760),i=_fs.connectSyncAgent,s=a(e),o={worker:s,bufferLength:t,opTimeout:r},n=i(o),n},e.exports.createReadStream=_read_stream_create,e.exports.createWriteStream=function(e,t){return _file(e).createWriter()}},48(e){"use strict";var t={};function r(e,r,n){n||(n=Error);var i=function(e){var t,n;function i(t,n,i){return e.call(this,function(e,t,n){return"string"==typeof r?r:r(e,t,n)}(t,n,i))||this}return n=e,(t=i).prototype=Object.create(n.prototype),t.prototype.constructor=t,t.__proto__=n,i}(n);i.prototype.name=n.name,i.prototype.code=e,t[e]=i}function n(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))}r("ERR_INVALID_OPT_VALUE",function(e,t){return'The value "'+t+'" is invalid for option "'+e+'"'},TypeError),r("ERR_INVALID_ARG_TYPE",function(e,t,r){var i,o,a;if("string"==typeof t&&(o="not ",t.substr(0,4)===o)?(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-9,r)===t}(e," argument"))a="The ".concat(e," ").concat(i," ").concat(n(t,"type"));else{var s=function(e,t,r){return"number"!=typeof r&&(r=0),!(r+1>e.length)&&-1!==e.indexOf(".",r)}(e)?"property":"argument";a='The "'.concat(e,'" ').concat(s," ").concat(i," ").concat(n(t,"type"))}return a+". Received type ".concat(typeof r)},TypeError),r("ERR_STREAM_PUSH_AFTER_EOF","stream.push() after EOF"),r("ERR_METHOD_NOT_IMPLEMENTED",function(e){return"The "+e+" method is not implemented"}),r("ERR_STREAM_PREMATURE_CLOSE","Premature close"),r("ERR_STREAM_DESTROYED",function(e){return"Cannot call "+e+" after a stream was destroyed"}),r("ERR_MULTIPLE_CALLBACK","Callback called multiple times"),r("ERR_STREAM_CANNOT_PIPE","Cannot pipe, not readable"),r("ERR_STREAM_WRITE_AFTER_END","write after end"),r("ERR_STREAM_NULL_VALUES","May not write null values to stream",TypeError),r("ERR_UNKNOWN_ENCODING",function(e){return"Unknown encoding: "+e},TypeError),r("ERR_STREAM_UNSHIFT_AFTER_END_EVENT","stream.unshift() after end event"),e.exports.F=t},382(e,t,r){"use strict";var n=Object.keys||function(e){var t=[];for(var r in e)t.push(r);return t};e.exports=f;var i=r(412),o=r(708);r(698)(f,i);for(var a=n(o.prototype),s=0;s<a.length;s++){var u=a[s];f.prototype[u]||(f.prototype[u]=o.prototype[u])}function f(e){if(!(this instanceof f))return new f(e);i.call(this,e),o.call(this,e),this.allowHalfOpen=!0,e&&(!1===e.readable&&(this.readable=!1),!1===e.writable&&(this.writable=!1),!1===e.allowHalfOpen&&(this.allowHalfOpen=!1,this.once("end",l)))}function l(){this._writableState.ended||process.nextTick(c,this)}function c(e){e.end()}Object.defineProperty(f.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),Object.defineProperty(f.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(f.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(f.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&void 0!==this._writableState&&this._readableState.destroyed&&this._writableState.destroyed},set:function(e){void 0!==this._readableState&&void 0!==this._writableState&&(this._readableState.destroyed=e,this._writableState.destroyed=e)}})},600(e,t,r){"use strict";e.exports=i;var n=r(610);function i(e){if(!(this instanceof i))return new i(e);n.call(this,e)}r(698)(i,n),i.prototype._transform=function(e,t,r){r(null,e)}},412(e,t,r){"use strict";var n;e.exports=A,A.ReadableState=S,r(7).EventEmitter;var i,o=function(e,t){return e.listeners(t).length},a=r(345),s=r(287).Buffer,u=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},f=r(838);i=f&&f.debuglog?f.debuglog("stream"):function(){};var l,c,h,d=r(726),p=r(896),g=r(291).getHighWaterMark,y=r(48).F,w=y.ERR_INVALID_ARG_TYPE,m=y.ERR_STREAM_PUSH_AFTER_EOF,b=y.ERR_METHOD_NOT_IMPLEMENTED,v=y.ERR_STREAM_UNSHIFT_AFTER_END_EVENT;r(698)(A,a);var _=p.errorOrDestroy,E=["error","close","destroy","pause","resume"];function S(e,t,i){n=n||r(382),e=e||{},"boolean"!=typeof i&&(i=t instanceof n),this.objectMode=!!e.objectMode,i&&(this.objectMode=this.objectMode||!!e.readableObjectMode),this.highWaterMark=g(this,e,"readableHighWaterMark",i),this.buffer=new d,this.length=0,this.pipes=null,this.pipesCount=0,this.flowing=null,this.ended=!1,this.endEmitted=!1,this.reading=!1,this.sync=!0,this.needReadable=!1,this.emittedReadable=!1,this.readableListening=!1,this.resumeScheduled=!1,this.paused=!0,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.destroyed=!1,this.defaultEncoding=e.defaultEncoding||"utf8",this.awaitDrain=0,this.readingMore=!1,this.decoder=null,this.encoding=null,e.encoding&&(l||(l=r(141).I),this.decoder=new l(e.encoding),this.encoding=e.encoding)}function A(e){if(n=n||r(382),!(this instanceof A))return new A(e);var t=this instanceof n;this._readableState=new S(e,this,t),this.readable=!0,e&&("function"==typeof e.read&&(this._read=e.read),"function"==typeof e.destroy&&(this._destroy=e.destroy)),a.call(this)}function R(e,t,r,n,o){i("readableAddChunk",t);var a,f=e._readableState;if(null===t)f.reading=!1,function(e,t){if(i("onEofChunk"),!t.ended){if(t.decoder){var r=t.decoder.end();r&&r.length&&(t.buffer.push(r),t.length+=t.objectMode?1:r.length)}t.ended=!0,t.sync?C(e):(t.needReadable=!1,t.emittedReadable||(t.emittedReadable=!0,x(e)))}}(e,f);else if(o||(a=function(e,t){var r,n;return n=t,s.isBuffer(n)||n instanceof u||"string"==typeof t||void 0===t||e.objectMode||(r=new w("chunk",["string","Buffer","Uint8Array"],t)),r}(f,t)),a)_(e,a);else if(f.objectMode||t&&t.length>0)if("string"==typeof t||f.objectMode||Object.getPrototypeOf(t)===s.prototype||(t=function(e){return s.from(e)}(t)),n)f.endEmitted?_(e,new v):T(e,f,t,!0);else if(f.ended)_(e,new m);else{if(f.destroyed)return!1;f.reading=!1,f.decoder&&!r?(t=f.decoder.write(t),f.objectMode||0!==t.length?T(e,f,t,!1):L(e,f)):T(e,f,t,!1)}else n||(f.reading=!1,L(e,f));return!f.ended&&(f.length<f.highWaterMark||0===f.length)}function T(e,t,r,n){t.flowing&&0===t.length&&!t.sync?(t.awaitDrain=0,e.emit("data",r)):(t.length+=t.objectMode?1:r.length,n?t.buffer.unshift(r):t.buffer.push(r),t.needReadable&&C(e)),L(e,t)}Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._readableState&&this._readableState.destroyed},set:function(e){this._readableState&&(this._readableState.destroyed=e)}}),A.prototype.destroy=p.destroy,A.prototype._undestroy=p.undestroy,A.prototype._destroy=function(e,t){t(e)},A.prototype.push=function(e,t){var r,n=this._readableState;return n.objectMode?r=!0:"string"==typeof e&&((t=t||n.defaultEncoding)!==n.encoding&&(e=s.from(e,t),t=""),r=!0),R(this,e,t,!1,r)},A.prototype.unshift=function(e){return R(this,e,null,!0,!1)},A.prototype.isPaused=function(){return!1===this._readableState.flowing},A.prototype.setEncoding=function(e){l||(l=r(141).I);var t=new l(e);this._readableState.decoder=t,this._readableState.encoding=this._readableState.decoder.encoding;for(var n=this._readableState.buffer.head,i="";null!==n;)i+=t.write(n.data),n=n.next;return this._readableState.buffer.clear(),""!==i&&this._readableState.buffer.push(i),this._readableState.length=i.length,this};var k=1073741824;function O(e,t){return e<=0||0===t.length&&t.ended?0:t.objectMode?1:e!=e?t.flowing&&t.length?t.buffer.head.data.length:t.length:(e>t.highWaterMark&&(t.highWaterMark=function(e){return e>=k?e=k:(e--,e|=e>>>1,e|=e>>>2,e|=e>>>4,e|=e>>>8,e|=e>>>16,e++),e}(e)),e<=t.length?e:t.ended?t.length:(t.needReadable=!0,0))}function C(e){var t=e._readableState;i("emitReadable",t.needReadable,t.emittedReadable),t.needReadable=!1,t.emittedReadable||(i("emitReadable",t.flowing),t.emittedReadable=!0,process.nextTick(x,e))}function x(e){var t=e._readableState;i("emitReadable_",t.destroyed,t.length,t.ended),t.destroyed||!t.length&&!t.ended||(e.emit("readable"),t.emittedReadable=!1),t.needReadable=!t.flowing&&!t.ended&&t.length<=t.highWaterMark,M(e)}function L(e,t){t.readingMore||(t.readingMore=!0,process.nextTick(I,e,t))}function I(e,t){for(;!t.reading&&!t.ended&&(t.length<t.highWaterMark||t.flowing&&0===t.length);){var r=t.length;if(i("maybeReadMore read 0"),e.read(0),r===t.length)break}t.readingMore=!1}function B(e){var t=e._readableState;t.readableListening=e.listenerCount("readable")>0,t.resumeScheduled&&!t.paused?t.flowing=!0:e.listenerCount("data")>0&&e.resume()}function U(e){i("readable nexttick read 0"),e.read(0)}function j(e,t){i("resume",t.reading),t.reading||e.read(0),t.resumeScheduled=!1,e.emit("resume"),M(e),t.flowing&&!t.reading&&e.read(0)}function M(e){var t=e._readableState;for(i("flow",t.flowing);t.flowing&&null!==e.read(););}function P(e,t){return 0===t.length?null:(t.objectMode?r=t.buffer.shift():!e||e>=t.length?(r=t.decoder?t.buffer.join(""):1===t.buffer.length?t.buffer.first():t.buffer.concat(t.length),t.buffer.clear()):r=t.buffer.consume(e,t.decoder),r);var r}function $(e){var t=e._readableState;i("endReadable",t.endEmitted),t.endEmitted||(t.ended=!0,process.nextTick(F,t,e))}function F(e,t){if(i("endReadableNT",e.endEmitted,e.length),!e.endEmitted&&0===e.length&&(e.endEmitted=!0,t.readable=!1,t.emit("end"),e.autoDestroy)){var r=t._writableState;(!r||r.autoDestroy&&r.finished)&&t.destroy()}}function N(e,t){for(var r=0,n=e.length;r<n;r++)if(e[r]===t)return r;return-1}A.prototype.read=function(e){i("read",e),e=parseInt(e,10);var t=this._readableState,r=e;if(0!==e&&(t.emittedReadable=!1),0===e&&t.needReadable&&((0!==t.highWaterMark?t.length>=t.highWaterMark:t.length>0)||t.ended))return i("read: emitReadable",t.length,t.ended),0===t.length&&t.ended?$(this):C(this),null;if(0===(e=O(e,t))&&t.ended)return 0===t.length&&$(this),null;var n,o=t.needReadable;return i("need readable",o),(0===t.length||t.length-e<t.highWaterMark)&&i("length less than watermark",o=!0),t.ended||t.reading?i("reading or ended",o=!1):o&&(i("do read"),t.reading=!0,t.sync=!0,0===t.length&&(t.needReadable=!0),this._read(t.highWaterMark),t.sync=!1,t.reading||(e=O(r,t))),null===(n=e>0?P(e,t):null)?(t.needReadable=t.length<=t.highWaterMark,e=0):(t.length-=e,t.awaitDrain=0),0===t.length&&(t.ended||(t.needReadable=!0),r!==e&&t.ended&&$(this)),null!==n&&this.emit("data",n),n},A.prototype._read=function(e){_(this,new b("_read()"))},A.prototype.pipe=function(e,t){var r=this,n=this._readableState;switch(n.pipesCount){case 0:n.pipes=e;break;case 1:n.pipes=[n.pipes,e];break;default:n.pipes.push(e)}n.pipesCount+=1,i("pipe count=%d opts=%j",n.pipesCount,t);var a=t&&!1===t.end||e===process.stdout||e===process.stderr?p:s;function s(){i("onend"),e.end()}n.endEmitted?process.nextTick(a):r.once("end",a),e.on("unpipe",function t(o,a){i("onunpipe"),o===r&&a&&!1===a.hasUnpiped&&(a.hasUnpiped=!0,i("cleanup"),e.removeListener("close",h),e.removeListener("finish",d),e.removeListener("drain",u),e.removeListener("error",c),e.removeListener("unpipe",t),r.removeListener("end",s),r.removeListener("end",p),r.removeListener("data",l),f=!0,!n.awaitDrain||e._writableState&&!e._writableState.needDrain||u())});var u=function(e){return function(){var t=e._readableState;i("pipeOnDrain",t.awaitDrain),t.awaitDrain&&t.awaitDrain--,0===t.awaitDrain&&o(e,"data")&&(t.flowing=!0,M(e))}}(r);e.on("drain",u);var f=!1;function l(t){i("ondata");var o=e.write(t);i("dest.write",o),!1===o&&((1===n.pipesCount&&n.pipes===e||n.pipesCount>1&&-1!==N(n.pipes,e))&&!f&&(i("false write response, pause",n.awaitDrain),n.awaitDrain++),r.pause())}function c(t){i("onerror",t),p(),e.removeListener("error",c),0===o(e,"error")&&_(e,t)}function h(){e.removeListener("finish",d),p()}function d(){i("onfinish"),e.removeListener("close",h),p()}function p(){i("unpipe"),r.unpipe(e)}return r.on("data",l),function(e,t,r){if("function"==typeof e.prependListener)return e.prependListener(t,r);e._events&&e._events[t]?Array.isArray(e._events[t])?e._events[t].unshift(r):e._events[t]=[r,e._events[t]]:e.on(t,r)}(e,"error",c),e.once("close",h),e.once("finish",d),e.emit("pipe",r),n.flowing||(i("pipe resume"),r.resume()),e},A.prototype.unpipe=function(e){var t=this._readableState,r={hasUnpiped:!1};if(0===t.pipesCount)return this;if(1===t.pipesCount)return e&&e!==t.pipes||(e||(e=t.pipes),t.pipes=null,t.pipesCount=0,t.flowing=!1,e&&e.emit("unpipe",this,r)),this;if(!e){var n=t.pipes,i=t.pipesCount;t.pipes=null,t.pipesCount=0,t.flowing=!1;for(var o=0;o<i;o++)n[o].emit("unpipe",this,{hasUnpiped:!1});return this}var a=N(t.pipes,e);return-1===a||(t.pipes.splice(a,1),t.pipesCount-=1,1===t.pipesCount&&(t.pipes=t.pipes[0]),e.emit("unpipe",this,r)),this},A.prototype.on=function(e,t){var r=a.prototype.on.call(this,e,t),n=this._readableState;return"data"===e?(n.readableListening=this.listenerCount("readable")>0,!1!==n.flowing&&this.resume()):"readable"===e&&(n.endEmitted||n.readableListening||(n.readableListening=n.needReadable=!0,n.flowing=!1,n.emittedReadable=!1,i("on readable",n.length,n.reading),n.length?C(this):n.reading||process.nextTick(U,this))),r},A.prototype.addListener=A.prototype.on,A.prototype.removeListener=function(e,t){var r=a.prototype.removeListener.call(this,e,t);return"readable"===e&&process.nextTick(B,this),r},A.prototype.removeAllListeners=function(e){var t=a.prototype.removeAllListeners.apply(this,arguments);return"readable"!==e&&void 0!==e||process.nextTick(B,this),t},A.prototype.resume=function(){var e=this._readableState;return e.flowing||(i("resume"),e.flowing=!e.readableListening,function(e,t){t.resumeScheduled||(t.resumeScheduled=!0,process.nextTick(j,e,t))}(this,e)),e.paused=!1,this},A.prototype.pause=function(){return i("call pause flowing=%j",this._readableState.flowing),!1!==this._readableState.flowing&&(i("pause"),this._readableState.flowing=!1,this.emit("pause")),this._readableState.paused=!0,this},A.prototype.wrap=function(e){var t=this,r=this._readableState,n=!1;for(var o in e.on("end",function(){if(i("wrapped end"),r.decoder&&!r.ended){var e=r.decoder.end();e&&e.length&&t.push(e)}t.push(null)}),e.on("data",function(o){i("wrapped data"),r.decoder&&(o=r.decoder.write(o)),r.objectMode&&null==o||(r.objectMode||o&&o.length)&&(t.push(o)||(n=!0,e.pause()))}),e)void 0===this[o]&&"function"==typeof e[o]&&(this[o]=function(t){return function(){return e[t].apply(e,arguments)}}(o));for(var a=0;a<E.length;a++)e.on(E[a],this.emit.bind(this,E[a]));return this._read=function(t){i("wrapped _read",t),n&&(n=!1,e.resume())},this},"function"==typeof Symbol&&(A.prototype[Symbol.asyncIterator]=function(){return void 0===c&&(c=r(955)),c(this)}),Object.defineProperty(A.prototype,"readableHighWaterMark",{enumerable:!1,get:function(){return this._readableState.highWaterMark}}),Object.defineProperty(A.prototype,"readableBuffer",{enumerable:!1,get:function(){return this._readableState&&this._readableState.buffer}}),Object.defineProperty(A.prototype,"readableFlowing",{enumerable:!1,get:function(){return this._readableState.flowing},set:function(e){this._readableState&&(this._readableState.flowing=e)}}),A._fromList=P,Object.defineProperty(A.prototype,"readableLength",{enumerable:!1,get:function(){return this._readableState.length}}),"function"==typeof Symbol&&(A.from=function(e,t){return void 0===h&&(h=r(157)),h(A,e,t)})},610(e,t,r){"use strict";e.exports=l;var n=r(48).F,i=n.ERR_METHOD_NOT_IMPLEMENTED,o=n.ERR_MULTIPLE_CALLBACK,a=n.ERR_TRANSFORM_ALREADY_TRANSFORMING,s=n.ERR_TRANSFORM_WITH_LENGTH_0,u=r(382);function f(e,t){var r=this._transformState;r.transforming=!1;var n=r.writecb;if(null===n)return this.emit("error",new o);r.writechunk=null,r.writecb=null,null!=t&&this.push(t),n(e);var i=this._readableState;i.reading=!1,(i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}function l(e){if(!(this instanceof l))return new l(e);u.call(this,e),this._transformState={afterTransform:f.bind(this),needTransform:!1,transforming:!1,writecb:null,writechunk:null,writeencoding:null},this._readableState.needReadable=!0,this._readableState.sync=!1,e&&("function"==typeof e.transform&&(this._transform=e.transform),"function"==typeof e.flush&&(this._flush=e.flush)),this.on("prefinish",c)}function c(){var e=this;"function"!=typeof this._flush||this._readableState.destroyed?h(this,null,null):this._flush(function(t,r){h(e,t,r)})}function h(e,t,r){if(t)return e.emit("error",t);if(null!=r&&e.push(r),e._writableState.length)throw new s;if(e._transformState.transforming)throw new a;return e.push(null)}r(698)(l,u),l.prototype.push=function(e,t){return this._transformState.needTransform=!1,u.prototype.push.call(this,e,t)},l.prototype._transform=function(e,t,r){r(new i("_transform()"))},l.prototype._write=function(e,t,r){var n=this._transformState;if(n.writecb=r,n.writechunk=e,n.writeencoding=t,!n.transforming){var i=this._readableState;(n.needTransform||i.needReadable||i.length<i.highWaterMark)&&this._read(i.highWaterMark)}},l.prototype._read=function(e){var t=this._transformState;null===t.writechunk||t.transforming?t.needTransform=!0:(t.transforming=!0,this._transform(t.writechunk,t.writeencoding,t.afterTransform))},l.prototype._destroy=function(e,t){u.prototype._destroy.call(this,e,function(e){t(e)})}},708(e,t,r){"use strict";function n(e){var t=this;this.next=null,this.entry=null,this.finish=function(){!function(e,t){var r=e.entry;for(e.entry=null;r;){var n=r.callback;t.pendingcb--,n(void 0),r=r.next}t.corkedRequestsFree.next=e}(t,e)}}var i;e.exports=A,A.WritableState=S;var o,a={deprecate:r(643)},s=r(345),u=r(287).Buffer,f=(void 0!==r.g?r.g:"undefined"!=typeof window?window:"undefined"!=typeof self?self:{}).Uint8Array||function(){},l=r(896),c=r(291).getHighWaterMark,h=r(48).F,d=h.ERR_INVALID_ARG_TYPE,p=h.ERR_METHOD_NOT_IMPLEMENTED,g=h.ERR_MULTIPLE_CALLBACK,y=h.ERR_STREAM_CANNOT_PIPE,w=h.ERR_STREAM_DESTROYED,m=h.ERR_STREAM_NULL_VALUES,b=h.ERR_STREAM_WRITE_AFTER_END,v=h.ERR_UNKNOWN_ENCODING,_=l.errorOrDestroy;function E(){}function S(e,t,o){i=i||r(382),e=e||{},"boolean"!=typeof o&&(o=t instanceof i),this.objectMode=!!e.objectMode,o&&(this.objectMode=this.objectMode||!!e.writableObjectMode),this.highWaterMark=c(this,e,"writableHighWaterMark",o),this.finalCalled=!1,this.needDrain=!1,this.ending=!1,this.ended=!1,this.finished=!1,this.destroyed=!1;var a=!1===e.decodeStrings;this.decodeStrings=!a,this.defaultEncoding=e.defaultEncoding||"utf8",this.length=0,this.writing=!1,this.corked=0,this.sync=!0,this.bufferProcessing=!1,this.onwrite=function(e){!function(e,t){var r=e._writableState,n=r.sync,i=r.writecb;if("function"!=typeof i)throw new g;if(function(e){e.writing=!1,e.writecb=null,e.length-=e.writelen,e.writelen=0}(r),t)!function(e,t,r,n,i){--t.pendingcb,r?(process.nextTick(i,n),process.nextTick(x,e,t),e._writableState.errorEmitted=!0,_(e,n)):(i(n),e._writableState.errorEmitted=!0,_(e,n),x(e,t))}(e,r,n,t,i);else{var o=O(r)||e.destroyed;o||r.corked||r.bufferProcessing||!r.bufferedRequest||k(e,r),n?process.nextTick(T,e,r,o,i):T(e,r,o,i)}}(t,e)},this.writecb=null,this.writelen=0,this.bufferedRequest=null,this.lastBufferedRequest=null,this.pendingcb=0,this.prefinished=!1,this.errorEmitted=!1,this.emitClose=!1!==e.emitClose,this.autoDestroy=!!e.autoDestroy,this.bufferedRequestCount=0,this.corkedRequestsFree=new n(this)}function A(e){var t=this instanceof(i=i||r(382));if(!t&&!o.call(A,this))return new A(e);this._writableState=new S(e,this,t),this.writable=!0,e&&("function"==typeof e.write&&(this._write=e.write),"function"==typeof e.writev&&(this._writev=e.writev),"function"==typeof e.destroy&&(this._destroy=e.destroy),"function"==typeof e.final&&(this._final=e.final)),s.call(this)}function R(e,t,r,n,i,o,a){t.writelen=n,t.writecb=a,t.writing=!0,t.sync=!0,t.destroyed?t.onwrite(new w("write")):r?e._writev(i,t.onwrite):e._write(i,o,t.onwrite),t.sync=!1}function T(e,t,r,n){r||function(e,t){0===t.length&&t.needDrain&&(t.needDrain=!1,e.emit("drain"))}(e,t),t.pendingcb--,n(),x(e,t)}function k(e,t){t.bufferProcessing=!0;var r=t.bufferedRequest;if(e._writev&&r&&r.next){var i=t.bufferedRequestCount,o=new Array(i),a=t.corkedRequestsFree;a.entry=r;for(var s=0,u=!0;r;)o[s]=r,r.isBuf||(u=!1),r=r.next,s+=1;o.allBuffers=u,R(e,t,!0,t.length,o,"",a.finish),t.pendingcb++,t.lastBufferedRequest=null,a.next?(t.corkedRequestsFree=a.next,a.next=null):t.corkedRequestsFree=new n(t),t.bufferedRequestCount=0}else{for(;r;){var f=r.chunk,l=r.encoding,c=r.callback;if(R(e,t,!1,t.objectMode?1:f.length,f,l,c),r=r.next,t.bufferedRequestCount--,t.writing)break}null===r&&(t.lastBufferedRequest=null)}t.bufferedRequest=r,t.bufferProcessing=!1}function O(e){return e.ending&&0===e.length&&null===e.bufferedRequest&&!e.finished&&!e.writing}function C(e,t){e._final(function(r){t.pendingcb--,r&&_(e,r),t.prefinished=!0,e.emit("prefinish"),x(e,t)})}function x(e,t){var r=O(t);if(r&&(function(e,t){t.prefinished||t.finalCalled||("function"!=typeof e._final||t.destroyed?(t.prefinished=!0,e.emit("prefinish")):(t.pendingcb++,t.finalCalled=!0,process.nextTick(C,e,t)))}(e,t),0===t.pendingcb&&(t.finished=!0,e.emit("finish"),t.autoDestroy))){var n=e._readableState;(!n||n.autoDestroy&&n.endEmitted)&&e.destroy()}return r}r(698)(A,s),S.prototype.getBuffer=function(){for(var e=this.bufferedRequest,t=[];e;)t.push(e),e=e.next;return t},function(){try{Object.defineProperty(S.prototype,"buffer",{get:a.deprecate(function(){return this.getBuffer()},"_writableState.buffer is deprecated. Use _writableState.getBuffer instead.","DEP0003")})}catch(e){}}(),"function"==typeof Symbol&&Symbol.hasInstance&&"function"==typeof Function.prototype[Symbol.hasInstance]?(o=Function.prototype[Symbol.hasInstance],Object.defineProperty(A,Symbol.hasInstance,{value:function(e){return!!o.call(this,e)||this===A&&e&&e._writableState instanceof S}})):o=function(e){return e instanceof this},A.prototype.pipe=function(){_(this,new y)},A.prototype.write=function(e,t,r){var n,i=this._writableState,o=!1,a=!i.objectMode&&(n=e,u.isBuffer(n)||n instanceof f);return a&&!u.isBuffer(e)&&(e=function(e){return u.from(e)}(e)),"function"==typeof t&&(r=t,t=null),a?t="buffer":t||(t=i.defaultEncoding),"function"!=typeof r&&(r=E),i.ending?function(e,t){var r=new b;_(e,r),process.nextTick(t,r)}(this,r):(a||function(e,t,r,n){var i;return null===r?i=new m:"string"==typeof r||t.objectMode||(i=new d("chunk",["string","Buffer"],r)),!i||(_(e,i),process.nextTick(n,i),!1)}(this,i,e,r))&&(i.pendingcb++,o=function(e,t,r,n,i,o){if(!r){var a=function(e,t,r){return e.objectMode||!1===e.decodeStrings||"string"!=typeof t||(t=u.from(t,r)),t}(t,n,i);n!==a&&(r=!0,i="buffer",n=a)}var s=t.objectMode?1:n.length;t.length+=s;var f=t.length<t.highWaterMark;if(f||(t.needDrain=!0),t.writing||t.corked){var l=t.lastBufferedRequest;t.lastBufferedRequest={chunk:n,encoding:i,isBuf:r,callback:o,next:null},l?l.next=t.lastBufferedRequest:t.bufferedRequest=t.lastBufferedRequest,t.bufferedRequestCount+=1}else R(e,t,!1,s,n,i,o);return f}(this,i,a,e,t,r)),o},A.prototype.cork=function(){this._writableState.corked++},A.prototype.uncork=function(){var e=this._writableState;e.corked&&(e.corked--,e.writing||e.corked||e.bufferProcessing||!e.bufferedRequest||k(this,e))},A.prototype.setDefaultEncoding=function(e){if("string"==typeof e&&(e=e.toLowerCase()),!(["hex","utf8","utf-8","ascii","binary","base64","ucs2","ucs-2","utf16le","utf-16le","raw"].indexOf((e+"").toLowerCase())>-1))throw new v(e);return this._writableState.defaultEncoding=e,this},Object.defineProperty(A.prototype,"writableBuffer",{enumerable:!1,get:function(){return this._writableState&&this._writableState.getBuffer()}}),Object.defineProperty(A.prototype,"writableHighWaterMark",{enumerable:!1,get:function(){return this._writableState.highWaterMark}}),A.prototype._write=function(e,t,r){r(new p("_write()"))},A.prototype._writev=null,A.prototype.end=function(e,t,r){var n=this._writableState;return"function"==typeof e?(r=e,e=null,t=null):"function"==typeof t&&(r=t,t=null),null!=e&&this.write(e,t),n.corked&&(n.corked=1,this.uncork()),n.ending||function(e,t,r){t.ending=!0,x(e,t),r&&(t.finished?process.nextTick(r):e.once("finish",r)),t.ended=!0,e.writable=!1}(this,n,r),this},Object.defineProperty(A.prototype,"writableLength",{enumerable:!1,get:function(){return this._writableState.length}}),Object.defineProperty(A.prototype,"destroyed",{enumerable:!1,get:function(){return void 0!==this._writableState&&this._writableState.destroyed},set:function(e){this._writableState&&(this._writableState.destroyed=e)}}),A.prototype.destroy=l.destroy,A.prototype._undestroy=l.undestroy,A.prototype._destroy=function(e,t){t(e)}},955(e,t,r){"use strict";var n;function i(e,t,r){return(t=function(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}var o=r(238),a=Symbol("lastResolve"),s=Symbol("lastReject"),u=Symbol("error"),f=Symbol("ended"),l=Symbol("lastPromise"),c=Symbol("handlePromise"),h=Symbol("stream");function d(e,t){return{value:e,done:t}}function p(e){var t=e[a];if(null!==t){var r=e[h].read();null!==r&&(e[l]=null,e[a]=null,e[s]=null,t(d(r,!1)))}}function g(e){process.nextTick(p,e)}var y=Object.getPrototypeOf(function(){}),w=Object.setPrototypeOf((i(n={get stream(){return this[h]},next:function(){var e=this,t=this[u];if(null!==t)return Promise.reject(t);if(this[f])return Promise.resolve(d(void 0,!0));if(this[h].destroyed)return new Promise(function(t,r){process.nextTick(function(){e[u]?r(e[u]):t(d(void 0,!0))})});var r,n=this[l];if(n)r=new Promise(function(e,t){return function(r,n){e.then(function(){t[f]?r(d(void 0,!0)):t[c](r,n)},n)}}(n,this));else{var i=this[h].read();if(null!==i)return Promise.resolve(d(i,!1));r=new Promise(this[c])}return this[l]=r,r}},Symbol.asyncIterator,function(){return this}),i(n,"return",function(){var e=this;return new Promise(function(t,r){e[h].destroy(null,function(e){e?r(e):t(d(void 0,!0))})})}),n),y);e.exports=function(e){var t,r=Object.create(w,(i(t={},h,{value:e,writable:!0}),i(t,a,{value:null,writable:!0}),i(t,s,{value:null,writable:!0}),i(t,u,{value:null,writable:!0}),i(t,f,{value:e._readableState.endEmitted,writable:!0}),i(t,c,{value:function(e,t){var n=r[h].read();n?(r[l]=null,r[a]=null,r[s]=null,e(d(n,!1))):(r[a]=e,r[s]=t)},writable:!0}),t));return r[l]=null,o(e,function(e){if(e&&"ERR_STREAM_PREMATURE_CLOSE"!==e.code){var t=r[s];return null!==t&&(r[l]=null,r[a]=null,r[s]=null,t(e)),void(r[u]=e)}var n=r[a];null!==n&&(r[l]=null,r[a]=null,r[s]=null,n(d(void 0,!0))),r[f]=!0}),e.on("readable",g.bind(null,r)),r}},726(e,t,r){"use strict";function n(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),r.push.apply(r,n)}return r}function i(e){for(var t=1;t<arguments.length;t++){var r=null!=arguments[t]?arguments[t]:{};t%2?n(Object(r),!0).forEach(function(t){o(e,t,r[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(r)):n(Object(r)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(r,t))})}return e}function o(e,t,r){return(t=s(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function a(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,s(n.key),n)}}function s(e){var t=function(e){if("object"!=typeof e||null===e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,"string");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(e)}(e);return"symbol"==typeof t?t:String(t)}var u=r(287).Buffer,f=r(340).inspect,l=f&&f.custom||"inspect";function c(e,t,r){u.prototype.copy.call(e,t,r)}e.exports=function(){function e(){!function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,e),this.head=null,this.tail=null,this.length=0}var t,r;return t=e,(r=[{key:"push",value:function(e){var t={data:e,next:null};this.length>0?this.tail.next=t:this.head=t,this.tail=t,++this.length}},{key:"unshift",value:function(e){var t={data:e,next:this.head};0===this.length&&(this.tail=t),this.head=t,++this.length}},{key:"shift",value:function(){if(0!==this.length){var e=this.head.data;return 1===this.length?this.head=this.tail=null:this.head=this.head.next,--this.length,e}}},{key:"clear",value:function(){this.head=this.tail=null,this.length=0}},{key:"join",value:function(e){if(0===this.length)return"";for(var t=this.head,r=""+t.data;t=t.next;)r+=e+t.data;return r}},{key:"concat",value:function(e){if(0===this.length)return u.alloc(0);for(var t=u.allocUnsafe(e>>>0),r=this.head,n=0;r;)c(r.data,t,n),n+=r.data.length,r=r.next;return t}},{key:"consume",value:function(e,t){var r;return e<this.head.data.length?(r=this.head.data.slice(0,e),this.head.data=this.head.data.slice(e)):r=e===this.head.data.length?this.shift():t?this._getString(e):this._getBuffer(e),r}},{key:"first",value:function(){return this.head.data}},{key:"_getString",value:function(e){var t=this.head,r=1,n=t.data;for(e-=n.length;t=t.next;){var i=t.data,o=e>i.length?i.length:e;if(o===i.length?n+=i:n+=i.slice(0,e),0===(e-=o)){o===i.length?(++r,t.next?this.head=t.next:this.head=this.tail=null):(this.head=t,t.data=i.slice(o));break}++r}return this.length-=r,n}},{key:"_getBuffer",value:function(e){var t=u.allocUnsafe(e),r=this.head,n=1;for(r.data.copy(t),e-=r.data.length;r=r.next;){var i=r.data,o=e>i.length?i.length:e;if(i.copy(t,t.length-e,0,o),0===(e-=o)){o===i.length?(++n,r.next?this.head=r.next:this.head=this.tail=null):(this.head=r,r.data=i.slice(o));break}++n}return this.length-=n,t}},{key:l,value:function(e,t){return f(this,i(i({},t),{},{depth:0,customInspect:!1}))}}])&&a(t.prototype,r),Object.defineProperty(t,"prototype",{writable:!1}),e}()},896(e){"use strict";function t(e,t){n(e,t),r(e)}function r(e){e._writableState&&!e._writableState.emitClose||e._readableState&&!e._readableState.emitClose||e.emit("close")}function n(e,t){e.emit("error",t)}e.exports={destroy:function(e,i){var o=this,a=this._readableState&&this._readableState.destroyed,s=this._writableState&&this._writableState.destroyed;return a||s?(i?i(e):e&&(this._writableState?this._writableState.errorEmitted||(this._writableState.errorEmitted=!0,process.nextTick(n,this,e)):process.nextTick(n,this,e)),this):(this._readableState&&(this._readableState.destroyed=!0),this._writableState&&(this._writableState.destroyed=!0),this._destroy(e||null,function(e){!i&&e?o._writableState?o._writableState.errorEmitted?process.nextTick(r,o):(o._writableState.errorEmitted=!0,process.nextTick(t,o,e)):process.nextTick(t,o,e):i?(process.nextTick(r,o),i(e)):process.nextTick(r,o)}),this)},undestroy:function(){this._readableState&&(this._readableState.destroyed=!1,this._readableState.reading=!1,this._readableState.ended=!1,this._readableState.endEmitted=!1),this._writableState&&(this._writableState.destroyed=!1,this._writableState.ended=!1,this._writableState.ending=!1,this._writableState.finalCalled=!1,this._writableState.prefinished=!1,this._writableState.finished=!1,this._writableState.errorEmitted=!1)},errorOrDestroy:function(e,t){var r=e._readableState,n=e._writableState;r&&r.autoDestroy||n&&n.autoDestroy?e.destroy(t):e.emit("error",t)}}},238(e,t,r){"use strict";var n=r(48).F.ERR_STREAM_PREMATURE_CLOSE;function i(){}e.exports=function e(t,r,o){if("function"==typeof r)return e(t,null,r);r||(r={}),o=function(e){var t=!1;return function(){if(!t){t=!0;for(var r=arguments.length,n=new Array(r),i=0;i<r;i++)n[i]=arguments[i];e.apply(this,n)}}}(o||i);var a=r.readable||!1!==r.readable&&t.readable,s=r.writable||!1!==r.writable&&t.writable,u=function(){t.writable||l()},f=t._writableState&&t._writableState.finished,l=function(){s=!1,f=!0,a||o.call(t)},c=t._readableState&&t._readableState.endEmitted,h=function(){a=!1,c=!0,s||o.call(t)},d=function(e){o.call(t,e)},p=function(){var e;return a&&!c?(t._readableState&&t._readableState.ended||(e=new n),o.call(t,e)):s&&!f?(t._writableState&&t._writableState.ended||(e=new n),o.call(t,e)):void 0},g=function(){t.req.on("finish",l)};return function(e){return e.setHeader&&"function"==typeof e.abort}(t)?(t.on("complete",l),t.on("abort",p),t.req?g():t.on("request",g)):s&&!t._writableState&&(t.on("end",u),t.on("close",u)),t.on("end",h),t.on("finish",l),!1!==r.error&&t.on("error",d),t.on("close",p),function(){t.removeListener("complete",l),t.removeListener("abort",p),t.removeListener("request",g),t.req&&t.req.removeListener("finish",l),t.removeListener("end",u),t.removeListener("close",u),t.removeListener("finish",l),t.removeListener("end",h),t.removeListener("error",d),t.removeListener("close",p)}}},157(e){e.exports=function(){throw new Error("Readable.from is not available in the browser")}},758(e,t,r){"use strict";var n,i=r(48).F,o=i.ERR_MISSING_ARGS,a=i.ERR_STREAM_DESTROYED;function s(e){if(e)throw e}function u(e){e()}function f(e,t){return e.pipe(t)}e.exports=function(){for(var e=arguments.length,t=new Array(e),i=0;i<e;i++)t[i]=arguments[i];var l,c=function(e){return e.length?"function"!=typeof e[e.length-1]?s:e.pop():s}(t);if(Array.isArray(t[0])&&(t=t[0]),t.length<2)throw new o("streams");var h=t.map(function(e,i){var o=i<t.length-1;return function(e,t,i,o){o=function(e){var t=!1;return function(){t||(t=!0,e.apply(void 0,arguments))}}(o);var s=!1;e.on("close",function(){s=!0}),void 0===n&&(n=r(238)),n(e,{readable:t,writable:i},function(e){if(e)return o(e);s=!0,o()});var u=!1;return function(t){if(!s&&!u)return u=!0,function(e){return e.setHeader&&"function"==typeof e.abort}(e)?e.abort():"function"==typeof e.destroy?e.destroy():void o(t||new a("pipe"))}}(e,o,i>0,function(e){l||(l=e),e&&h.forEach(u),o||(h.forEach(u),c(l))})});return t.reduce(f)}},291(e,t,r){"use strict";var n=r(48).F.ERR_INVALID_OPT_VALUE;e.exports={getHighWaterMark:function(e,t,r,i){var o=function(e,t,r){return null!=e.highWaterMark?e.highWaterMark:t?e[r]:null}(t,i,r);if(null!=o){if(!isFinite(o)||Math.floor(o)!==o||o<0)throw new n(i?r:"highWaterMark",o);return Math.floor(o)}return e.objectMode?16:16384}}},345(e,t,r){e.exports=r(7).EventEmitter},861(e,t,r){var n=r(287),i=n.Buffer;function o(e,t){for(var r in e)t[r]=e[r]}function a(e,t,r){return i(e,t,r)}i.from&&i.alloc&&i.allocUnsafe&&i.allocUnsafeSlow?e.exports=n:(o(n,t),t.Buffer=a),a.prototype=Object.create(i.prototype),o(i,a),a.from=function(e,t,r){if("number"==typeof e)throw new TypeError("Argument must not be a number");return i(e,t,r)},a.alloc=function(e,t,r){if("number"!=typeof e)throw new TypeError("Argument must be a number");var n=i(e);return void 0!==t?"string"==typeof r?n.fill(t,r):n.fill(t):n.fill(0),n},a.allocUnsafe=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return i(e)},a.allocUnsafeSlow=function(e){if("number"!=typeof e)throw new TypeError("Argument must be a number");return n.SlowBuffer(e)}},310(e,t,r){e.exports=i;var n=r(7).EventEmitter;function i(){n.call(this)}r(698)(i,n),i.Readable=r(412),i.Writable=r(708),i.Duplex=r(382),i.Transform=r(610),i.PassThrough=r(600),i.finished=r(238),i.pipeline=r(758),i.Stream=i,i.prototype.pipe=function(e,t){var r=this;function i(t){e.writable&&!1===e.write(t)&&r.pause&&r.pause()}function o(){r.readable&&r.resume&&r.resume()}r.on("data",i),e.on("drain",o),e._isStdio||t&&!1===t.end||(r.on("end",s),r.on("close",u));var a=!1;function s(){a||(a=!0,e.end())}function u(){a||(a=!0,"function"==typeof e.destroy&&e.destroy())}function f(e){if(l(),0===n.listenerCount(this,"error"))throw e}function l(){r.removeListener("data",i),e.removeListener("drain",o),r.removeListener("end",s),r.removeListener("close",u),r.removeListener("error",f),e.removeListener("error",f),r.removeListener("end",l),r.removeListener("close",l),e.removeListener("close",l)}return r.on("error",f),e.on("error",f),r.on("end",l),r.on("close",l),e.on("close",l),e.emit("pipe",r),e}},141(e,t,r){"use strict";var n=r(861).Buffer,i=n.isEncoding||function(e){switch((e=""+e)&&e.toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":case"raw":return!0;default:return!1}};function o(e){var t;switch(this.encoding=function(e){var t=function(e){if(!e)return"utf8";for(var t;;)switch(e){case"utf8":case"utf-8":return"utf8";case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return"utf16le";case"latin1":case"binary":return"latin1";case"base64":case"ascii":case"hex":return e;default:if(t)return;e=(""+e).toLowerCase(),t=!0}}(e);if("string"!=typeof t&&(n.isEncoding===i||!i(e)))throw new Error("Unknown encoding: "+e);return t||e}(e),this.encoding){case"utf16le":this.text=u,this.end=f,t=4;break;case"utf8":this.fillLast=s,t=4;break;case"base64":this.text=l,this.end=c,t=3;break;default:return this.write=h,void(this.end=d)}this.lastNeed=0,this.lastTotal=0,this.lastChar=n.allocUnsafe(t)}function a(e){return e<=127?0:e>>5==6?2:e>>4==14?3:e>>3==30?4:e>>6==2?-1:-2}function s(e){var t=this.lastTotal-this.lastNeed,r=function(e,t){if(128!=(192&t[0]))return e.lastNeed=0,"�";if(e.lastNeed>1&&t.length>1){if(128!=(192&t[1]))return e.lastNeed=1,"�";if(e.lastNeed>2&&t.length>2&&128!=(192&t[2]))return e.lastNeed=2,"�"}}(this,e);return void 0!==r?r:this.lastNeed<=e.length?(e.copy(this.lastChar,t,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal)):(e.copy(this.lastChar,t,0,e.length),void(this.lastNeed-=e.length))}function u(e,t){if((e.length-t)%2==0){var r=e.toString("utf16le",t);if(r){var n=r.charCodeAt(r.length-1);if(n>=55296&&n<=56319)return this.lastNeed=2,this.lastTotal=4,this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1],r.slice(0,-1)}return r}return this.lastNeed=1,this.lastTotal=2,this.lastChar[0]=e[e.length-1],e.toString("utf16le",t,e.length-1)}function f(e){var t=e&&e.length?this.write(e):"";if(this.lastNeed){var r=this.lastTotal-this.lastNeed;return t+this.lastChar.toString("utf16le",0,r)}return t}function l(e,t){var r=(e.length-t)%3;return 0===r?e.toString("base64",t):(this.lastNeed=3-r,this.lastTotal=3,1===r?this.lastChar[0]=e[e.length-1]:(this.lastChar[0]=e[e.length-2],this.lastChar[1]=e[e.length-1]),e.toString("base64",t,e.length-r))}function c(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+this.lastChar.toString("base64",0,3-this.lastNeed):t}function h(e){return e.toString(this.encoding)}function d(e){return e&&e.length?this.write(e):""}t.I=o,o.prototype.write=function(e){if(0===e.length)return"";var t,r;if(this.lastNeed){if(void 0===(t=this.fillLast(e)))return"";r=this.lastNeed,this.lastNeed=0}else r=0;return r<e.length?t?t+this.text(e,r):this.text(e,r):t||""},o.prototype.end=function(e){var t=e&&e.length?this.write(e):"";return this.lastNeed?t+"�":t},o.prototype.text=function(e,t){var r=function(e,t,r){var n=t.length-1;if(n<r)return 0;var i=a(t[n]);return i>=0?(i>0&&(e.lastNeed=i-1),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(e.lastNeed=i-2),i):--n<r||-2===i?0:(i=a(t[n]))>=0?(i>0&&(2===i?i=0:e.lastNeed=i-3),i):0}(this,e,t);if(!this.lastNeed)return e.toString("utf8",t);this.lastTotal=r;var n=e.length-(r-this.lastNeed);return e.copy(this.lastChar,0,n),e.toString("utf8",t,n)},o.prototype.fillLast=function(e){if(this.lastNeed<=e.length)return e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,this.lastNeed),this.lastChar.toString(this.encoding,0,this.lastTotal);e.copy(this.lastChar,this.lastTotal-this.lastNeed,0,e.length),this.lastNeed-=e.length}},643(e,t,r){function n(e){try{if(!r.g.localStorage)return!1}catch(e){return!1}var t=r.g.localStorage[e];return null!=t&&"true"===String(t).toLowerCase()}e.exports=function(e,t){if(n("noDeprecation"))return e;var r=!1;return function(){if(!r){if(n("throwDeprecation"))throw new Error(t);n("traceDeprecation")?console.trace(t):console.warn(t),r=!0}return e.apply(this,arguments)}}},866(){},340(){},838(){},12(e,t){!function(e){"use strict";var t,r,n,i,o,a,s,u,f,l,c,h,d=e=>{throw TypeError(e)},p=(e,t,r)=>t.has(e)||d("Cannot "+r),g=(e,t,r)=>(p(e,t,"read from private field"),r?r.call(e):t.get(e)),y=(e,t,r)=>t.has(e)?d("Cannot add the same private member more than once"):t instanceof WeakSet?t.add(e):t.set(e,r),w=(e,t,r,n)=>(p(e,t,"write to private field"),n?n.call(e,r):t.set(e,r),r);const m="KGZ1bmN0aW9uKCl7InVzZSBzdHJpY3QiO2Z1bmN0aW9uIHUobil7aWYobj09PSIvIilyZXR1cm57cGFyZW50Om51bGwsbmFtZToiIn07Y29uc3QgZT1uLnNwbGl0KCIvIikuZmlsdGVyKGk9PmkubGVuZ3RoPjApO2lmKGUubGVuZ3RoPT09MCl0aHJvdyBFcnJvcigiSW52YWxpZCBwYXRoIik7Y29uc3QgYT1lW2UubGVuZ3RoLTFdLHI9Ii8iK2Uuc2xpY2UoMCwtMSkuam9pbigiLyIpO3JldHVybntuYW1lOmEscGFyZW50OnJ9fWFzeW5jIGZ1bmN0aW9uIHcobixlKXtjb25zdHtwYXJlbnQ6YSxuYW1lOnJ9PXUobik7aWYoYT09bnVsbClyZXR1cm4gYXdhaXQgbmF2aWdhdG9yLnN0b3JhZ2UuZ2V0RGlyZWN0b3J5KCk7Y29uc3QgaT1hLnNwbGl0KCIvIikuZmlsdGVyKHQ9PnQubGVuZ3RoPjApO3RyeXtsZXQgdD1hd2FpdCBuYXZpZ2F0b3Iuc3RvcmFnZS5nZXREaXJlY3RvcnkoKTtmb3IoY29uc3QgcyBvZiBpKXQ9YXdhaXQgdC5nZXREaXJlY3RvcnlIYW5kbGUocyx7Y3JlYXRlOmUuY3JlYXRlfSk7aWYoZS5pc0ZpbGUpcmV0dXJuIGF3YWl0IHQuZ2V0RmlsZUhhbmRsZShyLHtjcmVhdGU6ZS5jcmVhdGV9KX1jYXRjaCh0KXtpZih0Lm5hbWU9PT0iTm90Rm91bmRFcnJvciIpcmV0dXJuIG51bGw7dGhyb3cgdH19Y29uc3QgZj17fTtzZWxmLm9ubWVzc2FnZT1hc3luYyBuPT57dmFyIGk7Y29uc3R7ZXZ0VHlwZTplLGFyZ3M6YX09bi5kYXRhO2xldCByPWZbYS5maWxlSWRdO3RyeXtsZXQgdDtjb25zdCBzPVtdO2lmKGU9PT0icmVnaXN0ZXIiKXtjb25zdCBsPWF3YWl0IHcoYS5maWxlUGF0aCx7Y3JlYXRlOiEwLGlzRmlsZTohMH0pO2lmKGw9PW51bGwpdGhyb3cgRXJyb3IoYG5vdCBmb3VuZCBmaWxlOiAke2EuZmlsZUlkfWApO3I9YXdhaXQgbC5jcmVhdGVTeW5jQWNjZXNzSGFuZGxlKHttb2RlOmEubW9kZX0pLGZbYS5maWxlSWRdPXJ9ZWxzZSBpZihlPT09ImNsb3NlIilhd2FpdCByLmNsb3NlKCksZGVsZXRlIGZbYS5maWxlSWRdO2Vsc2UgaWYoZT09PSJ0cnVuY2F0ZSIpYXdhaXQgci50cnVuY2F0ZShhLm5ld1NpemUpO2Vsc2UgaWYoZT09PSJ3cml0ZSIpe2NvbnN0e2RhdGE6bCxvcHRzOm99PW4uZGF0YS5hcmdzO3Q9YXdhaXQgci53cml0ZShsLG8pfWVsc2UgaWYoZT09PSJyZWFkIil7Y29uc3R7b2Zmc2V0Omwsc2l6ZTpvfT1uLmRhdGEuYXJncyxnPW5ldyBVaW50OEFycmF5KG8pLGQ9YXdhaXQgci5yZWFkKGcse2F0Omx9KSxjPWcuYnVmZmVyO3Q9ZD09PW8/YzooKGk9Yy50cmFuc2Zlcik9PW51bGw/dm9pZCAwOmkuY2FsbChjLGQpKT8/Yy5zbGljZSgwLGQpLHMucHVzaCh0KX1lbHNlIGU9PT0iZ2V0U2l6ZSI/dD1hd2FpdCByLmdldFNpemUoKTplPT09ImZsdXNoIiYmYXdhaXQgci5mbHVzaCgpO3NlbGYucG9zdE1lc3NhZ2Uoe2V2dFR5cGU6ImNhbGxiYWNrIixjYklkOm4uZGF0YS5jYklkLHJldHVyblZhbDp0fSxzKX1jYXRjaCh0KXtjb25zdCBzPXQ7c2VsZi5wb3N0TWVzc2FnZSh7ZXZ0VHlwZToidGhyb3dFcnJvciIsY2JJZDpuLmRhdGEuY2JJZCxlcnJNc2c6cy5uYW1lKyI6ICIrcy5tZXNzYWdlK2AKYCtKU09OLnN0cmluZ2lmeShuLmRhdGEpfSl9fX0pKCk7Ci8vIyBzb3VyY2VNYXBwaW5nVVJMPW9wZnMtd29ya2VyLUY0UldscWNfLmpzLm1hcAo=",b=typeof self<"u"&&self.Blob&&new Blob([(v=m,Uint8Array.from(atob(v),e=>e.charCodeAt(0)))],{type:"text/javascript;charset=utf-8"});var v;function _(e){let t;try{if(t=b&&(self.URL||self.webkitURL).createObjectURL(b),!t)throw"";const r=new Worker(t,{name:null==e?void 0:e.name});return r.addEventListener("error",()=>{(self.URL||self.webkitURL).revokeObjectURL(t)}),r}catch{return new Worker("data:text/javascript;base64,"+m,{name:null==e?void 0:e.name})}finally{t&&(self.URL||self.webkitURL).revokeObjectURL(t)}}async function E(e,t,r){const n=function(){if(S.length<3){const t=e();return S.push(t),t}{const e=S[A];return A=(A+1)%S.length,e}function e(){const e=new _;let t=0,r={};return e.onmessage=({data:e})=>{var t,n;"callback"===e.evtType?null==(t=r[e.cbId])||t.resolve(e.returnVal):"throwError"===e.evtType&&(null==(n=r[e.cbId])||n.reject(Error(e.errMsg))),delete r[e.cbId]},async function(n,i,o=[]){t+=1;const a=new Promise((e,n)=>{r[t]={resolve:e,reject:n}});return e.postMessage({cbId:t,evtType:n,args:i},o),a}}}();return await n("register",{fileId:e,filePath:t,mode:r}),{read:async(t,r)=>await n("read",{fileId:e,offset:t,size:r}),write:async(t,r)=>await n("write",{fileId:e,data:t,opts:r},[ArrayBuffer.isView(t)?t.buffer:t]),close:async()=>await n("close",{fileId:e}),truncate:async t=>await n("truncate",{fileId:e,newSize:t}),getSize:async()=>await n("getSize",{fileId:e}),flush:async()=>await n("flush",{fileId:e})}}const S=[];let A=0;function R(e){if("/"===e)return{parent:null,name:""};const t=e.split("/").filter(e=>e.length>0);if(0===t.length)throw Error("Invalid path");return{name:t[t.length-1],parent:"/"+t.slice(0,-1).join("/")}}async function T(e,t){const{parent:r,name:n}=R(e);if(null==r)return await navigator.storage.getDirectory();const i=r.split("/").filter(e=>e.length>0);try{let e=await navigator.storage.getDirectory();for(const r of i)e=await e.getDirectoryHandle(r,{create:t.create});return t.isFile?await e.getFileHandle(n,{create:t.create}):await e.getDirectoryHandle(n,{create:t.create})}catch(e){if("NotFoundError"===e.name)return null;throw e}}async function k(e){const{parent:t,name:r}=R(e);if(null==t){const e=await navigator.storage.getDirectory();for await(const t of e.keys())await e.removeEntry(t,{recursive:!0});return}const n=await T(t,{create:!1,isFile:!1});if(null!=n)try{await n.removeEntry(r,{recursive:!0})}catch(e){if("NotFoundError"===e.name)return;throw e}}function O(e,t){return`${e}/${t}`.replace("//","/")}function C(e){return new x(e)}t=new WeakMap,r=new WeakMap,n=new WeakMap;let x=class e{constructor(e){y(this,t),y(this,r),y(this,n),w(this,t,e);const{parent:i,name:o}=R(e);w(this,r,o),w(this,n,i)}get kind(){return"dir"}get name(){return g(this,r)}get path(){return g(this,t)}get parent(){return null==g(this,n)?null:C(g(this,n))}async create(){return await T(g(this,t),{create:!0,isFile:!1}),C(g(this,t))}async exists(){return await T(g(this,t),{create:!1,isFile:!1})instanceof FileSystemDirectoryHandle}async remove(e={}){for(const t of await this.children())try{await t.remove(e)}catch(e){console.warn(e)}try{await k(g(this,t))}catch(e){console.warn(e)}}async children(){const e=await T(g(this,t),{create:!1,isFile:!1});if(null==e)return[];const r=[];for await(const n of e.values())r.push(("file"===n.kind?I:C)(O(g(this,t),n.name)));return r}async copyTo(t){if(!await this.exists())throw Error(`dir ${this.path} not exists`);if(t instanceof e){const e=await t.exists()?C(O(t.path,this.name)):t;return await e.create(),await Promise.all((await this.children()).map(t=>t.copyTo(e))),e}if(t instanceof FileSystemDirectoryHandle)return await Promise.all((await this.children()).map(async e=>{"file"===e.kind?await e.copyTo(await t.getFileHandle(e.name,{create:!0})):await e.copyTo(await t.getDirectoryHandle(e.name,{create:!0}))})),null;throw Error("Illegal target type")}async moveTo(e){const t=await this.copyTo(e);return await this.remove(),t}};const L=new Map;function I(e,t="rw"){if("rw"===t){const r=L.get(e)??new j(e,t);return L.set(e,r),r}return new j(e,t)}async function B(e,t,r={overwrite:!0}){if(t instanceof j)return void await B(e,await t.stream(),r);const n=await(e instanceof j?e:I(e,"rw")).createWriter();try{if(r.overwrite&&await n.truncate(0),t instanceof ReadableStream){const e=t.getReader();for(;;){const{done:t,value:r}=await e.read();if(t)break;await n.write(r)}}else await n.write(t)}catch(e){throw e}finally{await n.close()}}let U=0;i=new WeakMap,o=new WeakMap,a=new WeakMap,s=new WeakMap,u=new WeakMap,f=new WeakMap,l=new WeakMap,c=new WeakMap,h=new WeakMap;let j=class e{constructor(e,t){y(this,i),y(this,o),y(this,a),y(this,s),y(this,u),y(this,f,0),y(this,l,async()=>{}),y(this,c,(()=>{let e=null;return()=>(w(this,f,g(this,f)+1),null!=e||(e=new Promise(async(t,r)=>{try{const r=await E(g(this,u),g(this,i),g(this,s));w(this,l,async()=>{null!=e&&(e=null,w(this,f,0),await r.close().catch(console.error))}),t([r,async()=>{w(this,f,g(this,f)-1),!(g(this,f)>0)&&(e=null,await r.close())}])}catch(e){r(e)}})),e)})()),y(this,h,!1),w(this,u,++U),w(this,i,e),w(this,s,{r:"read-only",rw:"readwrite","rw-unsafe":"readwrite-unsafe"}[t]);const{parent:r,name:n}=R(e);if(null==r)throw Error("Invalid path");w(this,a,n),w(this,o,r)}get kind(){return"file"}get path(){return g(this,i)}get name(){return g(this,a)}get parent(){return null==g(this,o)?null:C(g(this,o))}async createWriter(){if("read-only"===g(this,s))throw Error("file is read-only");if(g(this,h))throw Error("Other writer have not been closed");w(this,h,!0);try{const e=new TextEncoder,[t,r]=await g(this,c).call(this);let n=await t.getSize(),i=!1;return{write:async(r,o={})=>{if(i)throw Error("Writer is closed");const a="string"==typeof r?e.encode(r):r,s=o.at??n,u=a.byteLength;return n=s+u,await t.write(a,{at:s})},truncate:async e=>{if(i)throw Error("Writer is closed");await t.truncate(e),n>e&&(n=e)},flush:async()=>{if(i)throw Error("Writer is closed");await t.flush()},close:async()=>{if(i)throw Error("Writer is closed");i=!0,w(this,h,!1),await r()}}}catch(e){throw w(this,h,!1),e}}async createReader(){const[e,t]=await g(this,c).call(this);let r=!1,n=0;return{read:async(t,i={})=>{if(r)throw Error("Reader is closed");const o=i.at??n,a=await e.read(o,t);return n=o+a.byteLength,a},getSize:async()=>{if(r)throw Error("Reader is closed");return await e.getSize()},close:async()=>{r||(r=!0,await t())}}}async text(){return(new TextDecoder).decode(await this.arrayBuffer())}async arrayBuffer(){const e=await T(g(this,i),{create:!1,isFile:!0});return null==e?new ArrayBuffer(0):(await e.getFile()).arrayBuffer()}async stream(){const e=await this.getOriginFile();return null==e?new ReadableStream({pull:e=>{e.close()}}):e.stream()}async getOriginFile(){var e;return null==(e=await T(g(this,i),{create:!1,isFile:!0}))?void 0:e.getFile()}async getSize(){const e=await T(g(this,i),{create:!1,isFile:!0});return null==e?0:(await e.getFile()).size}async exists(){return await T(g(this,i),{create:!1,isFile:!0})instanceof FileSystemFileHandle}async remove(e={}){if(!0===e.force)return await g(this,l).call(this),await k(g(this,i)),void L.delete(g(this,i));if(g(this,f)>0)throw Error("exists unclosed reader/writer");await k(g(this,i))}async copyTo(t){if(t instanceof e)return t.path===this.path?this:(await B(t,this),t);if(t instanceof x){if(!await this.exists())throw Error(`file ${this.path} not exists`);return await this.copyTo(I(O(t.path,this.name)))}if(t instanceof FileSystemFileHandle)return await(await this.stream()).pipeTo(await t.createWritable()),null;throw Error("Illegal target type")}async moveTo(e){const t=await this.copyTo(e);return await this.remove(),t}};const M="/.opfs-tools-temp-dir";async function P(e){try{if("file"===e.kind){if(!await e.exists())return!0;const t=await e.createWriter();await t.truncate(0),await t.close(),await e.remove()}else await e.remove();return!0}catch(e){return console.warn(e),!1}}const $=[];let F=!1;(async function(){var e;!0!==globalThis.__opfs_tools_tmpfile_init__&&(globalThis.__opfs_tools_tmpfile_init__=!0,null!=globalThis.FileSystemDirectoryHandle&&null!=globalThis.FileSystemFileHandle&&null!=(null==(e=globalThis.navigator)?void 0:e.storage.getDirectory)&&(setInterval(async()=>{for(const e of await C(M).children()){const t=/^\d+-(\d+)$/.exec(e.name);(null==t||Date.now()-Number(t[1])>2592e5)&&await P(e)}},6e4),await async function(){if(null==globalThis.localStorage)return;const e="OPFS_TOOLS_EXPIRES_TMP_FILES";F||(F=!0,globalThis.addEventListener("unload",()=>{0!==$.length&&localStorage.setItem(e,`${localStorage.getItem(e)??""},${$.join(",")}`)}));let t=localStorage.getItem(e)??"";for(const e of t.split(","))0!==e.length&&await P(I(`${M}/${e}`))&&(t=t.replace(e,""));localStorage.setItem(e,t.replace(/,{2,}/g,","))}()))})(),e.dir=C,e.file=I,e.rollfile=function(e,t){let r=I(e),n=0,i=r.createWriter(),o=r.createReader();return{append:async e=>{const r=await i;n+=await r.write(e),n>=t&&await(async e=>{const t=await(await o).read(n,{at:Math.round(.3*n)});n=await e.write(t,{at:0}),await e.truncate(n)})(r)},text:r.text.bind(r),remove:async()=>{await(await o).close(),await(await i).close(),await r.remove()},getSize:async()=>n}},e.tmpfile=function(){const e=`${Math.random().toString().slice(2)}-${Date.now()}`;return $.push(e),I(`${M}/${e}`)},e.write=B,Object.defineProperty(e,Symbol.toStringTag,{value:"Module"})}(t)},805(e,t,r){"use strict";r.r(t),r.d(t,{ABORT_ERROR:()=>T,CURRENT_DIR:()=>qe,NOT_FOUND_ERROR:()=>Ve,ROOT_DIR:()=>Xe,TIMEOUT_ERROR:()=>k,TMP_DIR:()=>Je,appendFile:()=>Rt,appendFileSync:()=>mr,assertAbsolutePath:()=>Ke,assertFileUrl:()=>Qe,connectSyncAgent:()=>or,copy:()=>Tt,copySync:()=>br,createFile:()=>gt,createFileSync:()=>fr,deleteTemp:()=>Ut,deleteTempSync:()=>Er,downloadFile:()=>Et,emptyDir:()=>kt,emptyDirSync:()=>vr,exists:()=>Ot,existsSync:()=>_r,generateTempPath:()=>ut,getFileDataByHandle:()=>pt,getSyncMessenger:()=>ar,isDirectoryHandle:()=>ht,isFileHandle:()=>ct,isFileHandleLike:()=>dt,isOPFSSupported:()=>Zt,isTempPath:()=>ft,mkTemp:()=>Bt,mkTempSync:()=>Sr,mkdir:()=>yt,mkdirSync:()=>lr,move:()=>Ct,moveSync:()=>cr,pruneTemp:()=>jt,pruneTempSync:()=>Ar,readBlobFile:()=>xt,readBlobFileSync:()=>Rr,readDir:()=>wt,readDirSync:()=>hr,readFile:()=>mt,readFileSync:()=>dr,readJsonFile:()=>Lt,readJsonFileSync:()=>Tr,readTextFile:()=>It,readTextFileSync:()=>kr,remove:()=>bt,removeSync:()=>pr,setSyncMessenger:()=>sr,startSyncAgent:()=>ir,stat:()=>vt,statSync:()=>gr,toFileSystemHandleLike:()=>lt,unzip:()=>Pt,unzipFromUrl:()=>$t,unzipSync:()=>Or,uploadFile:()=>Ft,writeFile:()=>_t,writeFileSync:()=>wr,zip:()=>Dt,zipFromUrl:()=>Wt,zipSync:()=>Cr});function n(e,t){if(!e)throw new Error("Invariant failed")}function i(e){if("string"!=typeof e)throw new TypeError(`Path must be a string, received "${JSON.stringify(e)}"`)}function o(e){return e=function(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function a(e,t){if(e.length<=1)return e;let r=e.length;for(let n=e.length-1;n>0&&t(e.charCodeAt(n));n--)r=n;return e.slice(0,r)}function s(e){return 47===e}function u(e,t=""){e instanceof URL&&(e=o(e)),function(e,t){if(i(e),0===e.length)return e;if("string"!=typeof t)throw new TypeError(`Suffix must be a string, received "${JSON.stringify(t)}"`)}(e,t);const r=function(e,t,r=0){let n=!1,i=e.length;for(let o=e.length-1;o>=r;--o)if(t(e.charCodeAt(o))){if(n){r=o+1;break}}else n||(n=!0,i=o+1);return e.slice(r,i)}(e,s),n=a(r,s);return t?function(e,t){if(t.length>=e.length)return e;const r=e.length-t.length;for(let n=t.length-1;n>=0;--n)if(e.charCodeAt(r+n)!==t.charCodeAt(n))return e;return e.slice(0,-t.length)}(n,t):n}function f(e){e instanceof URL&&(e=o(e)),function(e){i(e),e.length}(e);let t=-1,r=!1;for(let n=e.length-1;n>=1;--n)if(s(e.charCodeAt(n))){if(r){t=n;break}}else r=!0;return-1===t?s(e.charCodeAt(0))?"/":".":a(e.slice(0,t),s)}function l(e){e instanceof URL&&(e=o(e)),i(e);let t=-1,r=0,n=-1,a=!0,u=0;for(let i=e.length-1;i>=0;--i){const o=e.charCodeAt(i);if(s(o)){if(!a){r=i+1;break}}else-1===n&&(a=!1,n=i+1),46===o?-1===t?t=i:1!==u&&(u=1):-1!==t&&(u=-1)}return-1===t||-1===n||0===u||1===u&&t===n-1&&t===r+1?"":e.slice(t,n)}function c(e,...t){if(void 0===e)return".";e instanceof URL&&(e=o(e)),(t=e?[e,...t]:t).forEach(e=>i(e));const r=t.filter(e=>e.length>0).join("/");return""===r?".":function(e){e instanceof URL&&(e=o(e)),function(e){i(e),e.length}(e);const t=s(e.charCodeAt(0)),r=s(e.charCodeAt(e.length-1));return e=function(e,t,r,n){let i,o="",a=0,s=-1,u=0;for(let f=0;f<=e.length;++f){if(f<e.length)i=e.charCodeAt(f);else{if(n(i))break;i=47}if(n(i)){if(s===f-1||1===u);else if(s!==f-1&&2===u){if(o.length<2||2!==a||46!==o.charCodeAt(o.length-1)||46!==o.charCodeAt(o.length-2)){if(o.length>2){const e=o.lastIndexOf(r);-1===e?(o="",a=0):(o=o.slice(0,e),a=o.length-1-o.lastIndexOf(r)),s=f,u=0;continue}if(2===o.length||1===o.length){o="",a=0,s=f,u=0;continue}}t&&(o.length>0?o+=`${r}..`:o="..",a=2)}else o.length>0?o+=r+e.slice(s+1,f):o=e.slice(s+1,f),a=f-s-1;s=f,u=0}else 46===i&&-1!==u?++u:u=-1}return o}(e,!t,"/",s),0!==e.length||t||(e="."),e.length>0&&r&&(e+="/"),t?`/${e}`:e}(r)}const h=Symbol("Option kind"),d=Symbol("Result kind"),p=Promise.resolve(!0),g=Promise.resolve(!1);function y(e){const t=Object.freeze({[Symbol.toStringTag]:"Option",[h]:"Some",*[Symbol.iterator](){yield e},toString:()=>`Some(${e})`,isSome:()=>!0,isNone:()=>!1,isSomeAnd:t=>t(e),isSomeAndAsync:t=>Promise.resolve(t(e)),isNoneOr:t=>t(e),isNoneOrAsync:t=>Promise.resolve(t(e)),expect:t=>e,unwrap:()=>e,unwrapOr:t=>e,unwrapOrElse:t=>e,unwrapOrElseAsync:t=>Promise.resolve(e),okOr:t=>b(e),okOrElse:t=>b(e),transpose:()=>(S(e),e.isOk()?b(y(e.unwrap())):v(e.unwrapErr())),filter:r=>r(e)?t:w,flatten:()=>(E(e),e),map:t=>y(t(e)),mapOr:(t,r)=>r(e),mapOrElse:(t,r)=>r(e),zip:t=>(E(t),t.isSome()?y([e,t.unwrap()]):w),zipWith:(t,r)=>(E(t),t.isSome()?y(r(e,t.unwrap())):w),unzip(){const t=e;if(!Array.isArray(t)||2!==t.length)throw new TypeError("Option::unzip() requires a 2-element tuple, received "+(Array.isArray(t)?`array with ${t.length} elements`:typeof t));const[r,n]=t;return[y(r),y(n)]},reduce:(r,n)=>(E(r),r.isSome()?y(n(e,r.unwrap())):t),and:e=>(E(e),e),andThen:t=>t(e),andThenAsync:t=>Promise.resolve(t(e)),or:e=>t,orElse:e=>t,orElseAsync:e=>Promise.resolve(t),xor:e=>(E(e),e.isSome()?w:t),inspect:r=>(r(e),t),eq:t=>(E(t),t.isSome()&&t.unwrap()===e)});return t}const w=Object.freeze({[Symbol.toStringTag]:"Option",[h]:"None",*[Symbol.iterator](){},toString:()=>"None",isSome:()=>!1,isNone:()=>!0,isSomeAnd:e=>!1,isSomeAndAsync:e=>g,isNoneOr:e=>!0,isNoneOrAsync:e=>p,expect(e){throw new TypeError(e)},unwrap(){throw new TypeError("Option::unwrap() called on a `None` value")},unwrapOr:e=>e,unwrapOrElse:e=>e(),unwrapOrElseAsync:e=>Promise.resolve(e()),okOr:e=>v(e),okOrElse:e=>v(e()),transpose:()=>b(w),filter:e=>w,flatten:()=>w,map:e=>w,mapOr:(e,t)=>e,mapOrElse:(e,t)=>e(),zip:e=>w,zipWith:(e,t)=>w,unzip:()=>[w,w],reduce:(e,t)=>(E(e),e),and:e=>w,andThen:e=>w,andThenAsync:e=>m,or:e=>(E(e),e),orElse:e=>e(),orElseAsync:e=>Promise.resolve(e()),xor:e=>(E(e),e.isSome()?e:w),inspect:e=>w,eq:e=>(E(e),e===w)}),m=Promise.resolve(w);function b(e){const t=Object.freeze({[Symbol.toStringTag]:"Result",[d]:"Ok",*[Symbol.iterator](){yield e},toString:()=>`Ok(${e})`,isOk:()=>!0,isErr:()=>!1,isOkAnd:t=>t(e),isOkAndAsync:t=>Promise.resolve(t(e)),isErrAnd:e=>!1,isErrAndAsync:e=>g,expect:t=>e,unwrap:()=>e,unwrapOr:t=>e,unwrapOrElse:t=>e,unwrapOrElseAsync:t=>Promise.resolve(e),expectErr(t){throw new TypeError(`${t}: ${e}`)},unwrapErr(){throw new TypeError("Result::unwrapErr() called on an `Ok` value")},intoOk:()=>e,intoErr(){throw new TypeError("Result::intoErr() called on an `Ok` value")},ok:()=>y(e),err:()=>w,transpose:()=>(E(e),e.isSome()?y(b(e.unwrap())):w),map:t=>b(t(e)),mapErr:e=>t,mapOr:(t,r)=>r(e),mapOrElse:(t,r)=>r(e),flatten:()=>(S(e),e),and:e=>(S(e),e),or:e=>t,andThen:t=>t(e),andThenAsync:t=>Promise.resolve(t(e)),orElse:e=>t,orElseAsync:e=>Promise.resolve(t),inspect:r=>(r(e),t),inspectErr:e=>t,eq:t=>(S(t),t.isOk()&&t.unwrap()===e),asOk:()=>t,asErr(){throw new TypeError("Result::asErr() called on an `Ok` value")},andTryAsync(t){try{const r=t(e);return Promise.resolve(r).then(b,v)}catch(e){return Promise.resolve(v(e))}},orTryAsync:e=>Promise.resolve(t)});return t}function v(e){const t=Object.freeze({[Symbol.toStringTag]:"Result",[d]:"Err",*[Symbol.iterator](){},toString:()=>`Err(${e})`,isOk:()=>!1,isErr:()=>!0,isOkAnd:e=>!1,isOkAndAsync:e=>g,isErrAnd:t=>t(e),isErrAndAsync:t=>Promise.resolve(t(e)),expect(t){throw new TypeError(`${t}: ${e}`)},unwrap(){throw new TypeError("Result::unwrap() called on an `Err` value")},unwrapOr:e=>e,unwrapOrElse:t=>t(e),unwrapOrElseAsync:t=>Promise.resolve(t(e)),expectErr:t=>e,unwrapErr:()=>e,intoOk(){throw new TypeError("Result::intoOk() called on an `Err` value")},intoErr:()=>e,ok:()=>w,err:()=>y(e),transpose:()=>y(t),map:e=>t,mapErr:t=>v(t(e)),mapOr:(e,t)=>e,mapOrElse:(t,r)=>t(e),flatten:()=>t,and:e=>t,or:e=>(S(e),e),andThen:e=>t,andThenAsync:e=>Promise.resolve(t),orElse:t=>t(e),orElseAsync:t=>Promise.resolve(t(e)),inspect:e=>t,inspectErr:r=>(r(e),t),eq:t=>(S(t),t.isErr()&&t.unwrapErr()===e),asOk(){throw new TypeError("Result::asOk() called on an `Err` value")},asErr:()=>t,andTryAsync:e=>Promise.resolve(t),orTryAsync(t){try{const r=t(e);return Promise.resolve(r).then(b,v)}catch(e){return Promise.resolve(v(e))}}});return t}function _(e){try{return null===e?"null":void 0===e?"undefined":"object"==typeof e?Object.prototype.toString.call(e):String(e)}catch{return"[unable to stringify]"}}function E(e){if(!function(e){return null!=e&&"object"==typeof e&&h in e}(e))throw new TypeError(`Expected an Option, but received: ${_(e)}`)}function S(e){if(!function(e){return null!=e&&"object"==typeof e&&d in e}(e))throw new TypeError(`Expected a Result, but received: ${_(e)}`)}const A=b(!1),R=b(),T="AbortError",k="TimeoutError";class O extends Error{name="FetchError";status;constructor(e,t){super(e),this.status=t}}function C(e,t){const r=function(e){if(e instanceof URL)return e;try{const t="undefined"!=typeof location?location.href:void 0;return new URL(e,t)}catch{throw new TypeError(`Invalid URL: ${e}`)}}(e),n=t??{},{retries:i,delay:o,when:a,onRetry:s}=function(e){const{responseType:t,timeout:r,retry:n=0,onProgress:i,onChunk:o}=e;if(null!=t){const e=["text","arraybuffer","blob","json","bytes","stream"];if(!e.includes(t))throw new TypeError(`responseType must be one of ${e.join(", ")} but received ${t}`)}if(null!=r){if("number"!=typeof r)throw new TypeError("timeout must be a number but received "+typeof r);if(r<=0)throw new Error(`timeout must be a number greater than 0 but received ${r}`)}if(null!=i&&"function"!=typeof i)throw new TypeError("onProgress callback must be a function but received "+typeof i);if(null!=o&&"function"!=typeof o)throw new TypeError("onChunk callback must be a function but received "+typeof o);let a,s,u=0,f=0;if("number"==typeof n?u=n:n&&"object"==typeof n&&(u=n.retries??0,f=n.delay??0,a=n.when,s=n.onRetry),!Number.isInteger(u))throw new TypeError(`Retry count must be an integer but received ${u}`);if(u<0)throw new Error(`Retry count must be non-negative but received ${u}`);if("number"==typeof f){if(f<0)throw new Error(`Retry delay must be a non-negative number but received ${f}`)}else if("function"!=typeof f)throw new TypeError("Retry delay must be a number or a function but received "+typeof f);if(null!=a&&!Array.isArray(a)&&"function"!=typeof a)throw new TypeError("Retry when condition must be an array of status codes or a function but received "+typeof a);if(null!=s&&"function"!=typeof s)throw new TypeError("Retry onRetry callback must be a function but received "+typeof s);return{retries:u,delay:f,when:a,onRetry:s}}(n),{abortable:u=!1,responseType:f,timeout:l,onProgress:c,onChunk:h,...d}=n,p=d.signal;let g;u&&(g=new AbortController);const y=(e,t)=>e.name!==T&&(a?Array.isArray(a)?e instanceof O&&a.includes(e.status):a(e,t):!(e instanceof O)),w=e=>"function"==typeof o?o(e):o,m=async()=>{(()=>{const e=[];p&&e.push(p),g&&e.push(g.signal),"number"==typeof l&&e.push(AbortSignal.timeout(l)),e.length>0&&(d.signal=1===e.length?e[0]:AbortSignal.any(e))})();try{const e=await fetch(r,d);return e.ok?await _(e):(e.body?.cancel().catch(()=>{}),v(new O(e.statusText,e.status)))}catch(e){return v(e instanceof Error?e:L(e))}},_=async e=>{switch(e.body&&(c||h)&&(async e=>{let t,r=0;if(c){const r=e.headers.get("content-length");if(null==r)try{c(v(new Error("No content-length in response headers")))}catch{}else t=Number.parseInt(r,10)}const n=e.clone().body;try{for await(const e of n){if(h)try{h(e)}catch{}if(c&&null!=t){r+=e.byteLength;try{c(b({totalByteLength:t,completedByteLength:r}))}catch{}}}}catch{}})(e),f){case"json":if(null==e.body)return b(null);try{return b(await e.json())}catch{return v(new Error("Response is invalid json while responseType is json"))}case"text":return b(await e.text());case"bytes":return"function"==typeof e.bytes?b(await e.bytes()):b(new Uint8Array(await e.arrayBuffer()));case"arraybuffer":return b(await e.arrayBuffer());case"blob":return b(await e.blob());case"stream":return b(e.body);default:return b(e)}},E=(async()=>{let e,t=0;do{if(t>0){if(g?.signal.aborted)return v(g.signal.reason);const r=w(t);if(r>0&&(await x(r),g?.signal.aborted))return v(g.signal.reason);try{s?.(e,t)}catch{}}const r=await m();if(r.isOk())return r;e=r.unwrapErr(),t++}while(t<=i&&y(e,t));return v(e)})();return u&&g?{abort(e){e instanceof Error?g.abort(e):null!=e?g.abort(L(e)):g.abort()},get aborted(){return g.signal.aborted},get result(){return E}}:E}function x(e){return new Promise(t=>setTimeout(t,e))}function L(e){const t=new Error("string"==typeof e?e:String(e));return t.name=T,t.cause=e,t}var I={},B=Uint8Array,U=Uint16Array,j=Int32Array,M=new B([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0,0,0,0]),P=new B([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13,0,0]),$=new B([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),F=function(e,t){for(var r=new U(31),n=0;n<31;++n)r[n]=t+=1<<e[n-1];var i=new j(r[30]);for(n=1;n<30;++n)for(var o=r[n];o<r[n+1];++o)i[o]=o-r[n]<<5|n;return{b:r,r:i}},N=F(M,2),D=N.b,W=N.r;D[28]=258,W[258]=28;for(var Z=F(P,0),z=Z.b,Y=Z.r,G=new U(32768),H=0;H<32768;++H){var V=(43690&H)>>1|(21845&H)<<1;V=(61680&(V=(52428&V)>>2|(13107&V)<<2))>>4|(3855&V)<<4,G[H]=((65280&V)>>8|(255&V)<<8)>>1}var X=function(e,t,r){for(var n=e.length,i=0,o=new U(t);i<n;++i)e[i]&&++o[e[i]-1];var a,s=new U(t);for(i=1;i<t;++i)s[i]=s[i-1]+o[i-1]<<1;if(r){a=new U(1<<t);var u=15-t;for(i=0;i<n;++i)if(e[i])for(var f=i<<4|e[i],l=t-e[i],c=s[e[i]-1]++<<l,h=c|(1<<l)-1;c<=h;++c)a[G[c]>>u]=f}else for(a=new U(n),i=0;i<n;++i)e[i]&&(a[i]=G[s[e[i]-1]++]>>15-e[i]);return a},q=new B(288);for(H=0;H<144;++H)q[H]=8;for(H=144;H<256;++H)q[H]=9;for(H=256;H<280;++H)q[H]=7;for(H=280;H<288;++H)q[H]=8;var J=new B(32);for(H=0;H<32;++H)J[H]=5;var K=X(q,9,0),Q=X(q,9,1),ee=X(J,5,0),te=X(J,5,1),re=function(e){for(var t=e[0],r=1;r<e.length;++r)e[r]>t&&(t=e[r]);return t},ne=function(e,t,r){var n=t/8|0;return(e[n]|e[n+1]<<8)>>(7&t)&r},ie=function(e,t){var r=t/8|0;return(e[r]|e[r+1]<<8|e[r+2]<<16)>>(7&t)},oe=function(e){return(e+7)/8|0},ae=function(e,t,r){return(null==t||t<0)&&(t=0),(null==r||r>e.length)&&(r=e.length),new B(e.subarray(t,r))},se=["unexpected EOF","invalid block type","invalid length/literal","invalid distance","stream finished","no stream handler",,"no callback","invalid UTF-8 data","extra field too long","date not in range 1980-2099","filename too long","stream finishing","invalid zip data"],ue=function(e,t,r){var n=new Error(t||se[e]);if(n.code=e,Error.captureStackTrace&&Error.captureStackTrace(n,ue),!r)throw n;return n},fe=function(e,t,r,n){var i=e.length,o=n?n.length:0;if(!i||t.f&&!t.l)return r||new B(0);var a=!r,s=a||2!=t.i,u=t.i;a&&(r=new B(3*i));var f=function(e){var t=r.length;if(e>t){var n=new B(Math.max(2*t,e));n.set(r),r=n}},l=t.f||0,c=t.p||0,h=t.b||0,d=t.l,p=t.d,g=t.m,y=t.n,w=8*i;do{if(!d){l=ne(e,c,1);var m=ne(e,c+1,3);if(c+=3,!m){var b=e[(x=oe(c)+4)-4]|e[x-3]<<8,v=x+b;if(v>i){u&&ue(0);break}s&&f(h+b),r.set(e.subarray(x,v),h),t.b=h+=b,t.p=c=8*v,t.f=l;continue}if(1==m)d=Q,p=te,g=9,y=5;else if(2==m){var _=ne(e,c,31)+257,E=ne(e,c+10,15)+4,S=_+ne(e,c+5,31)+1;c+=14;for(var A=new B(S),R=new B(19),T=0;T<E;++T)R[$[T]]=ne(e,c+3*T,7);c+=3*E;var k=re(R),O=(1<<k)-1,C=X(R,k,1);for(T=0;T<S;){var x,L=C[ne(e,c,O)];if(c+=15&L,(x=L>>4)<16)A[T++]=x;else{var I=0,U=0;for(16==x?(U=3+ne(e,c,3),c+=2,I=A[T-1]):17==x?(U=3+ne(e,c,7),c+=3):18==x&&(U=11+ne(e,c,127),c+=7);U--;)A[T++]=I}}var j=A.subarray(0,_),F=A.subarray(_);g=re(j),y=re(F),d=X(j,g,1),p=X(F,y,1)}else ue(1);if(c>w){u&&ue(0);break}}s&&f(h+131072);for(var N=(1<<g)-1,W=(1<<y)-1,Z=c;;Z=c){var Y=(I=d[ie(e,c)&N])>>4;if((c+=15&I)>w){u&&ue(0);break}if(I||ue(2),Y<256)r[h++]=Y;else{if(256==Y){Z=c,d=null;break}var G=Y-254;if(Y>264){var H=M[T=Y-257];G=ne(e,c,(1<<H)-1)+D[T],c+=H}var V=p[ie(e,c)&W],q=V>>4;if(V||ue(3),c+=15&V,F=z[q],q>3&&(H=P[q],F+=ie(e,c)&(1<<H)-1,c+=H),c>w){u&&ue(0);break}s&&f(h+131072);var J=h+G;if(h<F){var K=o-F,ee=Math.min(F,J);for(K+h<0&&ue(3);h<ee;++h)r[h]=n[K+h]}for(;h<J;++h)r[h]=r[h-F]}}t.l=d,t.p=Z,t.b=h,t.f=l,d&&(l=1,t.m=g,t.d=p,t.n=y)}while(!l);return h!=r.length&&a?ae(r,0,h):r.subarray(0,h)},le=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8},ce=function(e,t,r){r<<=7&t;var n=t/8|0;e[n]|=r,e[n+1]|=r>>8,e[n+2]|=r>>16},he=function(e,t){for(var r=[],n=0;n<e.length;++n)e[n]&&r.push({s:n,f:e[n]});var i=r.length,o=r.slice();if(!i)return{t:be,l:0};if(1==i){var a=new B(r[0].s+1);return a[r[0].s]=1,{t:a,l:1}}r.sort(function(e,t){return e.f-t.f}),r.push({s:-1,f:25001});var s=r[0],u=r[1],f=0,l=1,c=2;for(r[0]={s:-1,f:s.f+u.f,l:s,r:u};l!=i-1;)s=r[r[f].f<r[c].f?f++:c++],u=r[f!=l&&r[f].f<r[c].f?f++:c++],r[l++]={s:-1,f:s.f+u.f,l:s,r:u};var h=o[0].s;for(n=1;n<i;++n)o[n].s>h&&(h=o[n].s);var d=new U(h+1),p=de(r[l-1],d,0);if(p>t){n=0;var g=0,y=p-t,w=1<<y;for(o.sort(function(e,t){return d[t.s]-d[e.s]||e.f-t.f});n<i;++n){var m=o[n].s;if(!(d[m]>t))break;g+=w-(1<<p-d[m]),d[m]=t}for(g>>=y;g>0;){var b=o[n].s;d[b]<t?g-=1<<t-d[b]++-1:++n}for(;n>=0&&g;--n){var v=o[n].s;d[v]==t&&(--d[v],++g)}p=t}return{t:new B(d),l:p}},de=function(e,t,r){return-1==e.s?Math.max(de(e.l,t,r+1),de(e.r,t,r+1)):t[e.s]=r},pe=function(e){for(var t=e.length;t&&!e[--t];);for(var r=new U(++t),n=0,i=e[0],o=1,a=function(e){r[n++]=e},s=1;s<=t;++s)if(e[s]==i&&s!=t)++o;else{if(!i&&o>2){for(;o>138;o-=138)a(32754);o>2&&(a(o>10?o-11<<5|28690:o-3<<5|12305),o=0)}else if(o>3){for(a(i),--o;o>6;o-=6)a(8304);o>2&&(a(o-3<<5|8208),o=0)}for(;o--;)a(i);o=1,i=e[s]}return{c:r.subarray(0,n),n:t}},ge=function(e,t){for(var r=0,n=0;n<t.length;++n)r+=e[n]*t[n];return r},ye=function(e,t,r){var n=r.length,i=oe(t+2);e[i]=255&n,e[i+1]=n>>8,e[i+2]=255^e[i],e[i+3]=255^e[i+1];for(var o=0;o<n;++o)e[i+o+4]=r[o];return 8*(i+4+n)},we=function(e,t,r,n,i,o,a,s,u,f,l){le(t,l++,r),++i[256];for(var c=he(i,15),h=c.t,d=c.l,p=he(o,15),g=p.t,y=p.l,w=pe(h),m=w.c,b=w.n,v=pe(g),_=v.c,E=v.n,S=new U(19),A=0;A<m.length;++A)++S[31&m[A]];for(A=0;A<_.length;++A)++S[31&_[A]];for(var R=he(S,7),T=R.t,k=R.l,O=19;O>4&&!T[$[O-1]];--O);var C,x,L,I,B=f+5<<3,j=ge(i,q)+ge(o,J)+a,F=ge(i,h)+ge(o,g)+a+14+3*O+ge(S,T)+2*S[16]+3*S[17]+7*S[18];if(u>=0&&B<=j&&B<=F)return ye(t,l,e.subarray(u,u+f));if(le(t,l,1+(F<j)),l+=2,F<j){C=X(h,d,0),x=h,L=X(g,y,0),I=g;var N=X(T,k,0);for(le(t,l,b-257),le(t,l+5,E-1),le(t,l+10,O-4),l+=14,A=0;A<O;++A)le(t,l+3*A,T[$[A]]);l+=3*O;for(var D=[m,_],W=0;W<2;++W){var Z=D[W];for(A=0;A<Z.length;++A){var z=31&Z[A];le(t,l,N[z]),l+=T[z],z>15&&(le(t,l,Z[A]>>5&127),l+=Z[A]>>12)}}}else C=K,x=q,L=ee,I=J;for(A=0;A<s;++A){var Y=n[A];if(Y>255){ce(t,l,C[257+(z=Y>>18&31)]),l+=x[z+257],z>7&&(le(t,l,Y>>23&31),l+=M[z]);var G=31&Y;ce(t,l,L[G]),l+=I[G],G>3&&(ce(t,l,Y>>5&8191),l+=P[G])}else ce(t,l,C[Y]),l+=x[Y]}return ce(t,l,C[256]),l+x[256]},me=new j([65540,131080,131088,131104,262176,1048704,1048832,2114560,2117632]),be=new B(0),ve=function(e,t,r,n,i,o){var a=o.z||e.length,s=new B(n+a+5*(1+Math.ceil(a/7e3))+i),u=s.subarray(n,s.length-i),f=o.l,l=7&(o.r||0);if(t){l&&(u[0]=o.r>>3);for(var c=me[t-1],h=c>>13,d=8191&c,p=(1<<r)-1,g=o.p||new U(32768),y=o.h||new U(p+1),w=Math.ceil(r/3),m=2*w,b=function(t){return(e[t]^e[t+1]<<w^e[t+2]<<m)&p},v=new j(25e3),_=new U(288),E=new U(32),S=0,A=0,R=o.i||0,T=0,k=o.w||0,O=0;R+2<a;++R){var C=b(R),x=32767&R,L=y[C];if(g[x]=L,y[C]=x,k<=R){var I=a-R;if((S>7e3||T>24576)&&(I>423||!f)){l=we(e,u,0,v,_,E,A,T,O,R-O,l),T=S=A=0,O=R;for(var $=0;$<286;++$)_[$]=0;for($=0;$<30;++$)E[$]=0}var F=2,N=0,D=d,Z=x-L&32767;if(I>2&&C==b(R-Z))for(var z=Math.min(h,I)-1,G=Math.min(32767,R),H=Math.min(258,I);Z<=G&&--D&&x!=L;){if(e[R+F]==e[R+F-Z]){for(var V=0;V<H&&e[R+V]==e[R+V-Z];++V);if(V>F){if(F=V,N=Z,V>z)break;var X=Math.min(Z,V-2),q=0;for($=0;$<X;++$){var J=R-Z+$&32767,K=J-g[J]&32767;K>q&&(q=K,L=J)}}}Z+=(x=L)-(L=g[x])&32767}if(N){v[T++]=268435456|W[F]<<18|Y[N];var Q=31&W[F],ee=31&Y[N];A+=M[Q]+P[ee],++_[257+Q],++E[ee],k=R+F,++S}else v[T++]=e[R],++_[e[R]]}}for(R=Math.max(R,k);R<a;++R)v[T++]=e[R],++_[e[R]];l=we(e,u,f,v,_,E,A,T,O,R-O,l),f||(o.r=7&l|u[l/8|0]<<3,l-=7,o.h=y,o.p=g,o.i=R,o.w=k)}else{for(R=o.w||0;R<a+f;R+=65535){var te=R+65535;te>=a&&(u[l/8|0]=f,te=a),l=ye(u,l+1,e.subarray(R,te))}o.i=a}return ae(s,0,n+oe(l)+i)},_e=function(){for(var e=new Int32Array(256),t=0;t<256;++t){for(var r=t,n=9;--n;)r=(1&r&&-306674912)^r>>>1;e[t]=r}return e}(),Ee=function(e,t,r,n,i){if(!i&&(i={l:1},t.dictionary)){var o=t.dictionary.subarray(-32768),a=new B(o.length+e.length);a.set(o),a.set(e,o.length),e=a,i.w=o.length}return ve(e,null==t.level?6:t.level,null==t.mem?i.l?Math.ceil(1.5*Math.max(8,Math.min(13,Math.log(e.length)))):20:12+t.mem,r,n,i)},Se=function(e,t){var r={};for(var n in e)r[n]=e[n];for(var n in t)r[n]=t[n];return r},Ae=function(e,t,r){for(var n=e(),i=e.toString(),o=i.slice(i.indexOf("[")+1,i.lastIndexOf("]")).replace(/\s+/g,"").split(","),a=0;a<n.length;++a){var s=n[a],u=o[a];if("function"==typeof s){t+=";"+u+"=";var f=s.toString();if(s.prototype)if(-1!=f.indexOf("[native code]")){var l=f.indexOf(" ",8)+1;t+=f.slice(l,f.indexOf("(",l))}else for(var c in t+=f,s.prototype)t+=";"+u+".prototype."+c+"="+s.prototype[c].toString();else t+=f}else r[u]=s}return t},Re=[],Te=function(){return[B,U,j,M,P,$,D,z,Q,te,G,se,X,re,ne,ie,oe,ae,ue,fe,Me,Oe,Ce]},ke=function(){return[B,U,j,M,P,$,W,Y,K,q,ee,J,G,me,be,X,le,ce,he,de,pe,ge,ye,we,oe,ae,ve,Ee,je,Oe]},Oe=function(e){return postMessage(e,[e.buffer])},Ce=function(e){return e&&{out:e.size&&new B(e.size),dictionary:e.dictionary}},xe=function(e,t,r,n,i,o){var a=function(e,t,r,n){if(!Re[r]){for(var i="",o={},a=e.length-1,s=0;s<a;++s)i=Ae(e[s],i,o);Re[r]={c:Ae(e[a],i,o),e:o}}var u=Se({},Re[r].e);return function(e,t,r,n,i){var o=new Worker(I[t]||(I[t]=URL.createObjectURL(new Blob([e+';addEventListener("error",function(e){e=e.error;postMessage({$e$:[e.message,e.code,e.stack]})})'],{type:"text/javascript"}))));return o.onmessage=function(e){var t=e.data,r=t.$e$;if(r){var n=new Error(r[0]);n.code=r[1],n.stack=r[2],i(n,null)}else i(null,t)},o.postMessage(r,n),o}(Re[r].c+";onmessage=function(e){for(var k in e.data)self[k]=e.data[k];onmessage="+t.toString()+"}",r,u,function(e){var t=[];for(var r in e)e[r].buffer&&t.push((e[r]=new e[r].constructor(e[r])).buffer);return t}(u),n)}(r,n,i,function(e,t){a.terminate(),o(e,t)});return a.postMessage([e,t],t.consume?[e.buffer]:[]),function(){a.terminate()}},Le=function(e,t){return e[t]|e[t+1]<<8},Ie=function(e,t){return(e[t]|e[t+1]<<8|e[t+2]<<16|e[t+3]<<24)>>>0},Be=function(e,t){return Ie(e,t)+4294967296*Ie(e,t+4)},Ue=function(e,t,r){for(;r;++t)e[t]=r,r>>>=8};function je(e,t){return Ee(e,t||{},0,0)}function Me(e,t){return fe(e,{i:2},t&&t.out,t&&t.dictionary)}var Pe=function(e,t,r,n){for(var i in e){var o=e[i],a=t+i,s=n;Array.isArray(o)&&(s=Se(n,o[1]),o=o[0]),o instanceof B?r[a]=[o,s]:(r[a+="/"]=[new B(0),s],Pe(o,a,r,n))}},$e="undefined"!=typeof TextEncoder&&new TextEncoder,Fe="undefined"!=typeof TextDecoder&&new TextDecoder;try{Fe.decode(be,{stream:!0})}catch(e){}function Ne(e,t){if(t){for(var r=new B(e.length),n=0;n<e.length;++n)r[n]=e.charCodeAt(n);return r}if($e)return $e.encode(e);var i=e.length,o=new B(e.length+(e.length>>1)),a=0,s=function(e){o[a++]=e};for(n=0;n<i;++n){if(a+5>o.length){var u=new B(a+8+(i-n<<1));u.set(o),o=u}var f=e.charCodeAt(n);f<128||t?s(f):f<2048?(s(192|f>>6),s(128|63&f)):f>55295&&f<57344?(s(240|(f=65536+(1047552&f)|1023&e.charCodeAt(++n))>>18),s(128|f>>12&63),s(128|f>>6&63),s(128|63&f)):(s(224|f>>12),s(128|f>>6&63),s(128|63&f))}return ae(o,0,a)}function De(e,t){if(t){for(var r="",n=0;n<e.length;n+=16384)r+=String.fromCharCode.apply(null,e.subarray(n,n+16384));return r}if(Fe)return Fe.decode(e);var i=function(e){for(var t="",r=0;;){var n=e[r++],i=(n>127)+(n>223)+(n>239);if(r+i>e.length)return{s:t,r:ae(e,r-1)};i?3==i?(n=((15&n)<<18|(63&e[r++])<<12|(63&e[r++])<<6|63&e[r++])-65536,t+=String.fromCharCode(55296|n>>10,56320|1023&n)):t+=1&i?String.fromCharCode((31&n)<<6|63&e[r++]):String.fromCharCode((15&n)<<12|(63&e[r++])<<6|63&e[r++]):t+=String.fromCharCode(n)}}(e),o=i.s;return(r=i.r).length&&ue(8),o}var We=function(e,t){for(;1!=Le(e,t);t+=4+Le(e,t+2));return[Be(e,t+12),Be(e,t+4),Be(e,t+20)]},Ze=function(e){var t=0;if(e)for(var r in e){var n=e[r].length;n>65535&&ue(9),t+=n+4}return t},ze=function(e,t,r,n,i,o,a,s){var u=n.length,f=r.extra,l=s&&s.length,c=Ze(f);Ue(e,t,null!=a?33639248:67324752),t+=4,null!=a&&(e[t++]=20,e[t++]=r.os),e[t]=20,t+=2,e[t++]=r.flag<<1|(o<0&&8),e[t++]=i&&8,e[t++]=255&r.compression,e[t++]=r.compression>>8;var h=new Date(null==r.mtime?Date.now():r.mtime),d=h.getFullYear()-1980;if((d<0||d>119)&&ue(10),Ue(e,t,d<<25|h.getMonth()+1<<21|h.getDate()<<16|h.getHours()<<11|h.getMinutes()<<5|h.getSeconds()>>1),t+=4,-1!=o&&(Ue(e,t,r.crc),Ue(e,t+4,o<0?-o-2:o),Ue(e,t+8,r.size)),Ue(e,t+12,u),Ue(e,t+14,c),t+=16,null!=a&&(Ue(e,t,l),Ue(e,t+6,r.attrs),Ue(e,t+10,a),t+=14),e.set(n,t),t+=u,c)for(var p in f){var g=f[p],y=g.length;Ue(e,t,+p),Ue(e,t+2,y),e.set(g,t+4),t+=4+y}return l&&(e.set(s,t),t+=l),t};function Ye(e,t,r){r||(r=t,t={}),"function"!=typeof r&&ue(7);var n={};Pe(e,"",n,t);var i=Object.keys(n),o=i.length,a=0,s=0,u=o,f=new Array(o),l=[],c=function(){for(var e=0;e<l.length;++e)l[e]()},h=function(e,t){Ge(function(){r(e,t)})};Ge(function(){h=r});var d=function(){var e=new B(s+22),t=a,r=s-a;s=0;for(var n=0;n<u;++n){var i=f[n];try{var o=i.c.length;ze(e,s,i,i.f,i.u,o);var l=30+i.f.length+Ze(i.extra),c=s+l;e.set(i.c,c),ze(e,a,i,i.f,i.u,o,s,i.m),a+=16+l+(i.m?i.m.length:0),s=c+o}catch(e){return h(e,null)}}(function(e,t,r,n,i){Ue(e,t,101010256),Ue(e,t+8,r),Ue(e,t+10,r),Ue(e,t+12,n),Ue(e,t+16,i)})(e,a,f.length,r,t),h(null,e)};o||d();for(var p=function(e){var t=i[e],r=n[t],u=r[0],p=r[1],g=function(){var e=-1;return{p:function(t){for(var r=e,n=0;n<t.length;++n)r=_e[255&r^t[n]]^r>>>8;e=r},d:function(){return~e}}}(),y=u.length;g.p(u);var w=Ne(t),m=w.length,b=p.comment,v=b&&Ne(b),_=v&&v.length,E=Ze(p.extra),S=0==p.level?0:8,A=function(r,n){if(r)c(),h(r,null);else{var i=n.length;f[e]=Se(p,{size:y,crc:g.d(),c:n,f:w,m:v,u:m!=t.length||v&&b.length!=_,compression:S}),a+=30+m+E+i,s+=76+2*(m+E)+(_||0)+i,--o||d()}};if(m>65535&&A(ue(11,0,1),null),S)if(y<16e4)try{A(null,je(u,p))}catch(e){A(e,null)}else l.push(function(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&ue(7),xe(e,t,[ke],function(e){return Oe(je(e.data[0],e.data[1]))},0,r)}(u,p,A));else A(null,u)},g=0;g<u;++g)p(g);return c}var Ge="function"==typeof queueMicrotask?queueMicrotask:"function"==typeof setTimeout?setTimeout:function(e){e()};class He{resolve;reject;promise;constructor(){if("function"==typeof Promise.withResolvers){const{promise:e,resolve:t,reject:r}=Promise.withResolvers();this.promise=e,this.resolve=t,this.reject=r}else this.promise=new Promise((e,t)=>{this.resolve=e,this.reject=t})}}const Ve="NotFoundError",Xe="/",qe=".",Je="/tmp";function Ke(e){n("string"==typeof e),n(e[0]===Xe)}function Qe(e){n("string"==typeof e)}let et;function tt(e){return e===Xe}async function rt(e,t,r){try{return b(await e.getDirectoryHandle(t,r))}catch(r){const n=r,i=new Error(`${n.name}: ${n.message} When get child directory '${t}' from directory '${e.name||Xe}'.`);return i.name=n.name,v(i)}}async function nt(e,t){let r=await async function(){return et??=await navigator.storage.getDirectory(),et}();if(tt(e))return b(r);let n=e.slice(1);for(;n;){let e="";const i=n.indexOf("/");if(-1===i)e=n,n="";else if(e=n.slice(0,i),n=n.slice(i+1),0===i)continue;const o=await rt(r,e,t);if(o.isErr())return o;r=o.unwrap()}return b(r)}async function it(e,t){const r=t?.create??!1,n=f(e),i=u(e);return(await nt(n,{create:r})).andThenAsync(e=>async function(e,t,r){try{return b(await e.getFileHandle(t,r))}catch(r){const n=r,i=new Error(`${n.name}: ${n.message} When get child file '${t}' from directory '${e.name||Xe}'.`);return i.name=n.name,v(i)}}(e,i,{create:r}))}function ot(e){return e.name===Ve}async function at(e){const t=(await Promise.all(e)).find(e=>e.isErr());return t??R}function st(){const e=new Error;return e.name=T,e}function ut(e){const{isDirectory:t=!1,basename:r="tmp",extname:n=""}=e??{},i=t?"":n;return c(Je,`${r?`${r}-`:""}${crypto.randomUUID()}${i}`)}function ft(e){return e.startsWith(`${Je}/`)}async function lt(e){const{name:t,kind:r}=e;if(ct(e)){const n=await e.getFile(),{size:i,lastModified:o,type:a}=n;return{name:t,kind:r,type:a,size:i,lastModified:o}}return{name:t,kind:r}}function ct(e){return"file"===e.kind}function ht(e){return"directory"===e.kind}function dt(e){return"file"===e.kind}async function pt(e){const t=await e.getFile(),r=await t.arrayBuffer();return new Uint8Array(r)}async function gt(e){return Ke(e),(await it(e,{create:!0})).and(R)}async function yt(e){return Ke(e),(await nt(e,{create:!0})).and(R)}async function wt(e,t){async function*r(n,i){const o=n.entries();for await(const[a,s]of o){const o=i===e?a:c(i,a);yield{path:o,handle:s},ht(s)&&t?.recursive&&(yield*r(await n.getDirectoryHandle(a),o))}}return Ke(e),(await nt(e)).andThen(t=>b(r(t,e)))}async function mt(e,t){return Ke(e),(await it(e)).andThenAsync(async e=>{const r=await e.getFile();switch(t?.encoding){case"blob":return b(r);case"utf8":return b(await r.text());default:return b(await r.arrayBuffer())}})}async function bt(e){Ke(e);const t=f(e),r=u(e),n=await nt(t);return(await n.andThenAsync(async e=>{try{tt(t)&&tt(r)?await e.remove({recursive:!0}):await e.removeEntry(r,{recursive:!0})}catch(e){return v(e)}return R})).orElse(e=>ot(e)?R:v(e))}async function vt(e){Ke(e);const t=f(e),r=u(e),n=await nt(t);return r?n.andThenAsync(async t=>{for await(const[e,n]of t.entries())if(e===r)return b(n);const n=new Error(`${Ve}: '${r}' does not exist. Full path is '${e}'.`);return n.name=Ve,v(n)}):n}async function _t(e,t,r){Ke(e);const{append:n=!1,create:i=!0}=r??{};return(await it(e,{create:i})).andThenAsync(async e=>{const r=await e.createWritable({keepExistingData:n}),i={type:"write",data:t};if(n){const{size:t}=await e.getFile();i.position=t}return await r.write(i),await r.close(),R})}function Et(e,t,r){let n,i;Qe(e),i=!1,"string"==typeof t?Ke(t):(r=t,t=ut({extname:l(e)}),i=!0),n=!1;const o=C(e,{redirect:"follow",...r,abortable:!0}),a=(async()=>(await o.response).andThenAsync(async e=>{const r=await e.blob();return n?v(st()):(await _t(t,r)).and(b(e))}))();return{abort(e){n=!0,o.abort(e)},get aborted(){return n},get response(){return i?a.then(e=>e.map(e=>({tempFilePath:t,rawResponse:e}))):a}}}async function St(e,t){const r=f(t);return(await nt(r,{create:!0})).andThenAsync(async r=>{const n=u(t);try{return await e.move(r,n),R}catch(e){return v(e)}})}async function At(e,t,r,n=!0){return Ke(t),(await vt(e)).andThenAsync(async i=>{let o;o=!1;const a=await vt(t);if(a.isErr()){if(!ot(a.unwrapErr()))return a.asErr()}else{o=!0;const e=a.unwrap();if(!(ct(i)&&ct(e)||ht(i)&&ht(e)))return v(new Error("Both 'srcPath' and 'destPath' must both be a file or directory."))}return ct(i)?n||!o?await r(i,t):R:(await wt(e,{recursive:!0})).andThenAsync(async e=>{const i=[yt(t)];for await(const{path:a,handle:s}of e){const e=c(t,a);let u=!1;if(o){const t=await Ot(e);if(t.isErr()){i.push(Promise.resolve(t.asErr()));continue}u=t.unwrap()}const f=ct(s)?n||!u?r(s,e):Promise.resolve(R):yt(e);i.push(f)}return at(i)})})}function Rt(e,t){return _t(e,t,{append:!0})}async function Tt(e,t,r){const{overwrite:n=!0}=r??{};return At(e,t,async(e,t)=>await _t(t,await e.getFile()),n)}async function kt(e){const t=await wt(e);if(t.isErr())return ot(t.unwrapErr())?yt(e):t.asErr();const r=[];for await(const{path:n}of t.unwrap())r.push(bt(c(e,n)));return at(r)}async function Ot(e,t){const{isDirectory:r=!1,isFile:i=!1}=t??{};n(!(r&&i));const o=await vt(e);return o.andThen(e=>b(!(r&&ct(e)||i&&ht(e)))).orElse(e=>ot(e)?A:o.asErr())}async function Ct(e,t,r){const{overwrite:n=!0}=r??{};return(await At(e,t,St,n)).andThenAsync(()=>bt(e))}function xt(e){return mt(e,{encoding:"blob"})}async function Lt(e){return(await It(e)).andThenAsync(async e=>{try{return b(JSON.parse(e))}catch(e){return v(e)}})}function It(e){return mt(e,{encoding:"utf8"})}async function Bt(e){const{isDirectory:t=!1}=e??{},r=ut(e);return(await(t?yt:gt)(r)).and(b(r))}function Ut(){return bt(Je)}async function jt(e){return n(e instanceof Date),(await wt(Je,{recursive:!0})).andThenAsync(async t=>{try{for await(const{handle:r}of t)ct(r)&&(await r.getFile()).lastModified<=e.getTime()&&await r.remove()}catch(e){return v(e)}return R})}async function Mt(e,t){const r=new Uint8Array(e),n=new He;return function(e,t,r){r||(r=t,t={}),"function"!=typeof r&&ue(7);var n=[],i=function(){for(var e=0;e<n.length;++e)n[e]()},o={},a=function(e,t){Ge(function(){r(e,t)})};Ge(function(){a=r});for(var s=e.length-22;101010256!=Ie(e,s);--s)if(!s||e.length-s>65558)return a(ue(13,0,1),null),i;var u=Le(e,s+8);if(u){var f=u,l=Ie(e,s+16),c=4294967295==l||65535==f;if(c){var h=Ie(e,s-12);(c=101075792==Ie(e,h))&&(f=u=Ie(e,h+32),l=Ie(e,h+48))}for(var d=t&&t.filter,p=function(t){var r=function(e,t,r){var n=Le(e,t+28),i=De(e.subarray(t+46,t+46+n),!(2048&Le(e,t+8))),o=t+46+n,a=Ie(e,t+20),s=r&&4294967295==a?We(e,o):[a,Ie(e,t+24),Ie(e,t+42)],u=s[0],f=s[1],l=s[2];return[Le(e,t+10),u,f,i,o+Le(e,t+30)+Le(e,t+32),l]}(e,l,c),s=r[0],f=r[1],h=r[2],p=r[3],g=r[4],y=r[5],w=function(e,t){return t+30+Le(e,t+26)+Le(e,t+28)}(e,y);l=g;var m=function(e,t){e?(i(),a(e,null)):(t&&(o[p]=t),--u||a(null,o))};if(!d||d({name:p,size:f,originalSize:h,compression:s}))if(s)if(8==s){var b=e.subarray(w,w+f);if(h<524288||f>.8*h)try{m(null,Me(b,{out:new B(h)}))}catch(e){m(e,null)}else n.push(function(e,t,r){return r||(r=t,t={}),"function"!=typeof r&&ue(7),xe(e,t,[Te],function(e){return Oe(Me(e.data[0],Ce(e.data[1])))},1,r)}(b,{size:h},m))}else m(ue(14,"unknown compression type "+s,1),null);else m(null,ae(e,w,w+f));else m(null,null)},g=0;g<f;++g)p()}else a(null,{})}(r,async(e,r)=>{if(e)return void n.resolve(v(e));const i=[];for(const e in r)"/"!==e.at(-1)&&i.push(_t(c(t,e),r[e]));n.resolve(at(i))}),await n.promise}async function Pt(e,t){return Ke(t),(await mt(e)).andThenAsync(e=>Mt(e,t))}async function $t(e,t,r){return Qe(e),Ke(t),(await C(e,{redirect:"follow",...r,responseType:"arraybuffer",abortable:!1})).andThenAsync(e=>Mt(e,t))}function Ft(e,t,r){let n,i;Qe(t),n=!1;const o=(async()=>(await xt(e)).andThenAsync(async o=>{if(n)return v(st());const{filename:a=u(e),...s}=r??{},f=new FormData;return f.append(a,o,a),i=C(t,{method:"POST",...s,abortable:!0,body:f}),i.response}))();return{abort(e){n=!0,i?.abort(e)},get aborted(){return n},get response(){return o}}}async function Nt(e,t){const r=new He;return Ye(e,{consume:!0},async(e,n)=>{if(e)r.resolve(v(e));else if(t){const e=await _t(t,n);r.resolve(e)}else r.resolve(b(n))}),await r.promise}async function Dt(e,t,r){return"string"==typeof t?Ke(t):(r=t,t=void 0),(await vt(e)).andThenAsync(async n=>{const i=u(e),o={};if(ct(n)){const e=await pt(n);o[i]=e}else{const t=await wt(e,{recursive:!0});if(t.isErr())return t.asErr();const n=r?.preserveRoot??!0;for await(const{path:e,handle:r}of t.unwrap())if(ct(r)){const t=n?c(i,e):e,a=await pt(r);o[t]=a}}return Nt(o,t)})}async function Wt(e,t,r){return Qe(e),"string"==typeof t?Ke(t):(r=t,t=void 0),(await C(e,{redirect:"follow",...r,responseType:"arraybuffer",abortable:!1})).andThenAsync(r=>{const n={};return n[u(e)]=new Uint8Array(r),Nt(n,t)})}function Zt(){return"function"==typeof navigator?.storage?.getDirectory}function zt(e){return e?{name:e.name,message:e.message}:e}async function Yt(e){const t=await e.arrayBuffer();return{name:e.name,type:e.type,lastModified:e.lastModified,size:t.byteLength,data:t}}let Gt=1e3;var Ht=(e=>(e[e.createFile=0]="createFile",e[e.mkdir=1]="mkdir",e[e.move=2]="move",e[e.readDir=3]="readDir",e[e.remove=4]="remove",e[e.stat=5]="stat",e[e.writeFile=6]="writeFile",e[e.appendFile=7]="appendFile",e[e.copy=8]="copy",e[e.emptyDir=9]="emptyDir",e[e.exists=10]="exists",e[e.deleteTemp=11]="deleteTemp",e[e.mkTemp=12]="mkTemp",e[e.pruneTemp=13]="pruneTemp",e[e.readBlobFile=14]="readBlobFile",e[e.unzip=15]="unzip",e[e.zip=16]="zip",e))(Ht||{});let Vt,Xt;function qt(e){const t=JSON.stringify(e);return(Vt??=new TextEncoder,Vt).encode(t)}function Jt(e){const t=Kt(e);return JSON.parse(t)}function Kt(e){return(Xt??=new TextDecoder,Xt).decode(e)}class Qt{i32a;u8a;headerLength=16;maxDataLength;constructor(e){this.i32a=new Int32Array(e),this.u8a=new Uint8Array(e),this.maxDataLength=e.byteLength-this.headerLength}}async function er(e,t){const{i32a:r,u8a:n,headerLength:i,maxDataLength:o}=e;for(;1!==Atomics.load(r,1););const a=r[2],s=n.slice(i,i+a);let u=await t(s);const f=u.byteLength;if(f>o){const e=`Response is too large: ${f} > ${o}. Consider grow the size of SharedArrayBuffer.`;if(u=qt([{name:"RangeError",message:e}]),u.byteLength>o)throw Atomics.store(r,1,0),new RangeError(e)}r[2]=u.byteLength,n.set(u,i),Atomics.store(r,1,0),Atomics.store(r,0,0)}const tr={[Ht.createFile]:gt,[Ht.mkdir]:yt,[Ht.move]:Ct,[Ht.readDir]:wt,[Ht.remove]:bt,[Ht.stat]:vt,[Ht.writeFile]:_t,[Ht.appendFile]:Rt,[Ht.copy]:Tt,[Ht.emptyDir]:kt,[Ht.exists]:Ot,[Ht.deleteTemp]:Ut,[Ht.mkTemp]:Bt,[Ht.pruneTemp]:jt,[Ht.readBlobFile]:xt,[Ht.unzip]:Pt,[Ht.zip]:Dt};let rr,nr;function ir(){if("undefined"!=typeof window)throw new Error("Only can use in worker");if(rr)throw new Error("Worker messenger already started");addEventListener("message",e=>{const t=e.data;if(!(t instanceof SharedArrayBuffer))throw new TypeError("Only can post SharedArrayBuffer to Worker");rr=new Qt(t),postMessage(!0),async function(){for(;;)try{await er(rr,async e=>{const[t,...r]=Jt(e);let n;t===Ht.writeFile||t===Ht.appendFile?Array.isArray(r[1])&&(r[1]=new Uint8Array(r[1])):t===Ht.pruneTemp&&(r[0]=new Date(r[0]));const i=tr[t];try{const e=await i(...r);if(e.isErr())n=qt([zt(e.unwrapErr())]);else{let r;if(t===Ht.readBlobFile){const t=e.unwrap(),n=await Yt(t);r={...n,data:[...new Uint8Array(n.data)]}}else if(t===Ht.readDir){const t=e.unwrap(),n=[];for await(const{path:e,handle:r}of t){const t=await lt(r);n.push({path:e,handle:t})}r=n}else if(t===Ht.stat){const t=e.unwrap();r=await lt(t)}else if(t===Ht.zip){const t=e.unwrap();r=t instanceof Uint8Array?[...t]:t}else r=e.unwrap();n=qt([null,r])}}catch(e){n=qt([zt(e)])}return n})}catch(e){console.error(e instanceof Error?e.stack:e)}}()})}function or(e){if("undefined"==typeof window)throw new Error("Only can use in main thread");if(nr)throw new Error("Main messenger already started");return new Promise(t=>{const{worker:r,bufferLength:i=1048576,opTimeout:o=1e3}=e;n(r instanceof Worker||r instanceof URL||"string"==typeof r&&r),n(i>16&&i%4==0),n(Number.isInteger(o)&&o>0),Gt=o;const a=r instanceof Worker?r:new Worker(r),s=new SharedArrayBuffer(i);a.addEventListener("message",e=>{e.data&&(nr=new Qt(s),t())}),a.postMessage(s)})}function ar(){return nr}function sr(e){n(null!=e),nr=e}function ur(e,...t){if(!nr)return v(new Error("Worker not initialized. Come back later."));const r=qt([e,...t]);try{const e=Jt(function(e,t){const{i32a:r,u8a:n,headerLength:i,maxDataLength:o}=e,a=t.byteLength;if(a>o)throw new RangeError(`Request is too large: ${a} > ${o}. Consider grow the size of SharedArrayBuffer.`);Atomics.store(r,0,1),r[2]=a,n.set(t,i),Atomics.store(r,1,1),function(e){const t=Date.now();for(;!e();)if(Date.now()-t>Gt){const e=new Error("Operating Timeout");throw e.name=k,e}}(()=>0===Atomics.load(r,0));const s=r[2];return n.slice(i,i+s)}(nr,r)),t=e[0],n=t?v(function(e){const t=new Error(e.message);return t.name=e.name,t}(t)):b(e[1]??void 0);return n}catch(e){return v(e)}}function fr(e){return ur(Ht.createFile,e)}function lr(e){return ur(Ht.mkdir,e)}function cr(e,t,r){return ur(Ht.move,e,t,r)}function hr(e,t){return ur(Ht.readDir,e,t)}function dr(e,t){return ur(Ht.readBlobFile,e).map(e=>{const r=new Uint8Array(e.data);switch(e.data=r.buffer.slice(r.byteOffset,r.byteOffset+r.byteLength),t?.encoding){case"blob":return e;case"utf8":return Kt(new Uint8Array(e.data));default:return e.data}})}function pr(e){return ur(Ht.remove,e)}function gr(e){return ur(Ht.stat,e)}function yr(e){return e instanceof ArrayBuffer?[...new Uint8Array(e)]:ArrayBuffer.isView(e)?[...new Uint8Array(e.buffer)]:e}function wr(e,t,r){return ur(Ht.writeFile,e,yr(t),r)}function mr(e,t){return ur(Ht.appendFile,e,yr(t))}function br(e,t,r){return ur(Ht.copy,e,t,r)}function vr(e){return ur(Ht.emptyDir,e)}function _r(e,t){return ur(Ht.exists,e,t)}function Er(){return ur(Ht.deleteTemp)}function Sr(e){return ur(Ht.mkTemp,e)}function Ar(e){return ur(Ht.pruneTemp,e)}function Rr(e){return dr(e,{encoding:"blob"})}function Tr(e){return kr(e).andThen(e=>{try{return b(JSON.parse(e))}catch(e){return v(e)}})}function kr(e){return dr(e,{encoding:"utf8"})}function Or(e,t){return ur(Ht.unzip,e,t)}function Cr(e,t,r){return ur(Ht.zip,e,t,r).map(e=>e?new Uint8Array(e):e)}},503(e,t,r){"use strict";r.r(t),r.d(t,{DELIMITER:()=>v,SEPARATOR:()=>_,SEPARATOR_PATTERN:()=>E,basename:()=>b,common:()=>J,dirname:()=>A,extname:()=>R,format:()=>O,fromFileUrl:()=>C,globToRegExp:()=>ne,isAbsolute:()=>I,isGlob:()=>ie,join:()=>F,joinGlobs:()=>fe,normalize:()=>N,normalizeGlob:()=>le,parse:()=>D,relative:()=>Y,resolve:()=>G,toFileUrl:()=>X,toNamespacedPath:()=>q});const n=function(){const e=globalThis,t=e.Deno?.build?.os;return"string"==typeof t?"windows"===t:e.navigator?.platform?.startsWith("Win")??e.process?.platform?.startsWith("win")??!1}();function i(e){if("string"!=typeof e)throw new TypeError(`Path must be a string, received "${JSON.stringify(e)}"`)}function o(e,t){if(t.length>=e.length)return e;const r=e.length-t.length;for(let n=t.length-1;n>=0;--n)if(e.charCodeAt(r+n)!==t.charCodeAt(n))return e;return e.slice(0,-t.length)}function a(e,t,r=0){let n=!1,i=e.length;for(let o=e.length-1;o>=r;--o)if(t(e.charCodeAt(o))){if(n){r=o+1;break}}else n||(n=!0,i=o+1);return e.slice(r,i)}function s(e,t){if(i(e),0===e.length)return e;if("string"!=typeof t)throw new TypeError(`Suffix must be a string, received "${JSON.stringify(t)}"`)}function u(e){if("file:"!==(e=e instanceof URL?e:new URL(e)).protocol)throw new TypeError(`URL must be a file URL: received "${e.protocol}"`);return e}function f(e){return e=u(e),decodeURIComponent(e.pathname.replace(/%(?![0-9A-Fa-f]{2})/g,"%25"))}function l(e,t){if(e.length<=1)return e;let r=e.length;for(let n=e.length-1;n>0&&t(e.charCodeAt(n));n--)r=n;return e.slice(0,r)}const c=46,h=92,d=58;function p(e){return 47===e}function g(e){return 47===e}function y(e){return 47===e||e===h}function w(e){return e>=97&&e<=122||e>=65&&e<=90}function m(e){e=u(e);let t=decodeURIComponent(e.pathname.replace(/\//g,"\\").replace(/%(?![0-9A-Fa-f]{2})/g,"%25")).replace(/^\\*([A-Za-z]:)(\\|$)/,"$1\\");return""!==e.hostname&&(t=`\\\\${e.hostname}${t}`),t}function b(e,t=""){return n?function(e,t=""){e instanceof URL&&(e=m(e)),s(e,t);let r=0;e.length>=2&&w(e.charCodeAt(0))&&e.charCodeAt(1)===d&&(r=2);const n=l(a(e,y,r),y);return t?o(n,t):n}(e,t):function(e,t=""){e instanceof URL&&(e=f(e)),s(e,t);const r=l(a(e,p),p);return t?o(r,t):r}(e,t)}const v=n?";":":",_=n?"\\":"/",E=n?/[\\/]+/:/\/+/;function S(e){if(i(e),0===e.length)return"."}function A(e){return n?function(e){e instanceof URL&&(e=m(e)),S(e);const t=e.length;let r=-1,n=-1,i=!0,o=0;const a=e.charCodeAt(0);if(t>1)if(y(a)){if(r=o=1,y(e.charCodeAt(1))){let n=2,i=n;for(;n<t&&!y(e.charCodeAt(n));++n);if(n<t&&n!==i){for(i=n;n<t&&y(e.charCodeAt(n));++n);if(n<t&&n!==i){for(i=n;n<t&&!y(e.charCodeAt(n));++n);if(n===t)return e;n!==i&&(r=o=n+1)}}}}else w(a)&&e.charCodeAt(1)===d&&(r=o=2,t>2&&y(e.charCodeAt(2))&&(r=o=3));else if(y(a))return e;for(let r=t-1;r>=o;--r)if(y(e.charCodeAt(r))){if(!i){n=r;break}}else i=!1;if(-1===n){if(-1===r)return".";n=r}return l(e.slice(0,n),g)}(e):function(e){e instanceof URL&&(e=f(e)),S(e);let t=-1,r=!1;for(let n=e.length-1;n>=1;--n)if(p(e.charCodeAt(n))){if(r){t=n;break}}else r=!0;return-1===t?p(e.charCodeAt(0))?"/":".":l(e.slice(0,t),p)}(e)}function R(e){return n?function(e){e instanceof URL&&(e=m(e)),i(e);let t=0,r=-1,n=0,o=-1,a=!0,s=0;e.length>=2&&e.charCodeAt(1)===d&&w(e.charCodeAt(0))&&(t=n=2);for(let i=e.length-1;i>=t;--i){const t=e.charCodeAt(i);if(y(t)){if(!a){n=i+1;break}}else-1===o&&(a=!1,o=i+1),t===c?-1===r?r=i:1!==s&&(s=1):-1!==r&&(s=-1)}return-1===r||-1===o||0===s||1===s&&r===o-1&&r===n+1?"":e.slice(r,o)}(e):function(e){e instanceof URL&&(e=f(e)),i(e);let t=-1,r=0,n=-1,o=!0,a=0;for(let i=e.length-1;i>=0;--i){const s=e.charCodeAt(i);if(p(s)){if(!o){r=i+1;break}}else-1===n&&(o=!1,n=i+1),s===c?-1===t?t=i:1!==a&&(a=1):-1!==t&&(a=-1)}return-1===t||-1===n||0===a||1===a&&t===n-1&&t===r+1?"":e.slice(t,n)}(e)}function T(e,t){const r=t.dir||t.root,n=t.base||(t.name??"")+(t.ext??"");return r?n===e?r:r===t.root?r+n:r+e+n:n}function k(e){if(null===e||"object"!=typeof e)throw new TypeError(`The "pathObject" argument must be of type Object, received type "${typeof e}"`)}function O(e){return n?function(e){return k(e),T("\\",e)}(e):function(e){return k(e),T("/",e)}(e)}function C(e){return n?m(e):f(e)}function x(e){return i(e),e.length>0&&p(e.charCodeAt(0))}function L(e){i(e);const t=e.length;if(0===t)return!1;const r=e.charCodeAt(0);return!!y(r)||!!(w(r)&&t>2&&e.charCodeAt(1)===d&&y(e.charCodeAt(2)))}function I(e){return n?L(e):x(e)}function B(e){if(i(e),0===e.length)return"."}function U(e,t,r,n){let i,o="",a=0,s=-1,u=0;for(let f=0;f<=e.length;++f){if(f<e.length)i=e.charCodeAt(f);else{if(n(i))break;i=47}if(n(i)){if(s===f-1||1===u);else if(s!==f-1&&2===u){if(o.length<2||2!==a||o.charCodeAt(o.length-1)!==c||o.charCodeAt(o.length-2)!==c){if(o.length>2){const e=o.lastIndexOf(r);-1===e?(o="",a=0):(o=o.slice(0,e),a=o.length-1-o.lastIndexOf(r)),s=f,u=0;continue}if(2===o.length||1===o.length){o="",a=0,s=f,u=0;continue}}t&&(o.length>0?o+=`${r}..`:o="..",a=2)}else o.length>0?o+=r+e.slice(s+1,f):o=e.slice(s+1,f),a=f-s-1;s=f,u=0}else i===c&&-1!==u?++u:u=-1}return o}function j(e){e instanceof URL&&(e=f(e)),B(e);const t=p(e.charCodeAt(0)),r=p(e.charCodeAt(e.length-1));return 0!==(e=U(e,!t,"/",p)).length||t||(e="."),e.length>0&&r&&(e+="/"),t?`/${e}`:e}function M(e,...t){if(void 0===e)return".";e instanceof URL&&(e=f(e)),(t=e?[e,...t]:t).forEach(e=>i(e));const r=t.filter(e=>e.length>0).join("/");return""===r?".":j(r)}function P(e){e instanceof URL&&(e=m(e)),B(e);const t=e.length;let r,n=0,i=!1;const o=e.charCodeAt(0);if(t>1)if(y(o))if(i=!0,y(e.charCodeAt(1))){let i=2,o=i;for(;i<t&&!y(e.charCodeAt(i));++i);if(i<t&&i!==o){const a=e.slice(o,i);for(o=i;i<t&&y(e.charCodeAt(i));++i);if(i<t&&i!==o){for(o=i;i<t&&!y(e.charCodeAt(i));++i);if(i===t)return`\\\\${a}\\${e.slice(o)}\\`;i!==o&&(r=`\\\\${a}\\${e.slice(o,i)}`,n=i)}}}else n=1;else w(o)&&e.charCodeAt(1)===d&&(r=e.slice(0,2),n=2,t>2&&y(e.charCodeAt(2))&&(i=!0,n=3));else if(y(o))return"\\";let a;return a=n<t?U(e.slice(n),!i,"\\",y):"",0!==a.length||i||(a="."),a.length>0&&y(e.charCodeAt(t-1))&&(a+="\\"),void 0===r?i?a.length>0?`\\${a}`:"\\":a:i?a.length>0?`${r}\\${a}`:`${r}\\`:r+a}function $(e,...t){if(e instanceof URL&&(e=m(e)),(t=e?[e,...t]:t).forEach(e=>i(e)),t=t.filter(e=>e.length>0),0===t.length)return".";let r=!0,n=0;const o=t[0];if(y(o.charCodeAt(0))){++n;const e=o.length;e>1&&y(o.charCodeAt(1))&&(++n,e>2&&(y(o.charCodeAt(2))?++n:r=!1))}let a=t.join("\\");if(r){for(;n<a.length&&y(a.charCodeAt(n));++n);n>=2&&(a=`\\${a.slice(n)}`)}return P(a)}function F(e,...t){return n?$(e,...t):M(e,...t)}function N(e){return n?P(e):j(e)}function D(e){return n?function(e){i(e);const t={root:"",dir:"",base:"",ext:"",name:""},r=e.length;if(0===r)return t;let n=0,o=e.charCodeAt(0);if(r>1){if(y(o)){if(n=1,y(e.charCodeAt(1))){let t=2,i=t;for(;t<r&&!y(e.charCodeAt(t));++t);if(t<r&&t!==i){for(i=t;t<r&&y(e.charCodeAt(t));++t);if(t<r&&t!==i){for(i=t;t<r&&!y(e.charCodeAt(t));++t);t===r?n=t:t!==i&&(n=t+1)}}}}else if(w(o)&&e.charCodeAt(1)===d){if(n=2,!(r>2))return t.root=t.dir=e,t;if(y(e.charCodeAt(2))){if(3===r)return t.root=t.dir=e,t.base="\\",t;n=3}}}else if(y(o))return t.root=t.dir=e,t.base="\\",t;n>0&&(t.root=e.slice(0,n));let a=-1,s=n,u=-1,f=!0,l=e.length-1,h=0;for(;l>=n;--l)if(o=e.charCodeAt(l),y(o)){if(!f){s=l+1;break}}else-1===u&&(f=!1,u=l+1),o===c?-1===a?a=l:1!==h&&(h=1):-1!==a&&(h=-1);return-1===a||-1===u||0===h||1===h&&a===u-1&&a===s+1?-1!==u&&(t.base=t.name=e.slice(s,u)):(t.name=e.slice(s,a),t.base=e.slice(s,u),t.ext=e.slice(a,u)),t.base=t.base||"\\",t.dir=s>0&&s!==n?e.slice(0,s-1):t.root,t}(e):function(e){i(e);const t={root:"",dir:"",base:"",ext:"",name:""};if(0===e.length)return t;const r=p(e.charCodeAt(0));let n;r?(t.root="/",n=1):n=0;let o=-1,a=0,s=-1,u=!0,f=e.length-1,h=0;for(;f>=n;--f){const t=e.charCodeAt(f);if(p(t)){if(!u){a=f+1;break}}else-1===s&&(u=!1,s=f+1),t===c?-1===o?o=f:1!==h&&(h=1):-1!==o&&(h=-1)}return-1===o||-1===s||0===h||1===h&&o===s-1&&o===a+1?(-1!==s&&(t.base=t.name=0===a&&r?e.slice(1,s):e.slice(a,s)),t.base=t.base||"/"):(0===a&&r?(t.name=e.slice(1,o),t.base=e.slice(1,s)):(t.name=e.slice(a,o),t.base=e.slice(a,s)),t.ext=e.slice(o,s)),a>0?t.dir=l(e.slice(0,a-1),p):r&&(t.dir="/"),t}(e)}function W(...e){let t="",r=!1;for(let n=e.length-1;n>=-1&&!r;n--){let o;if(n>=0)o=e[n];else{const{Deno:e}=globalThis;if("function"!=typeof e?.cwd)throw new TypeError("Resolved a relative path without a current working directory (CWD)");o=e.cwd()}i(o),0!==o.length&&(t=`${o}/${t}`,r=p(o.charCodeAt(0)))}return t=U(t,!r,"/",p),r?t.length>0?`/${t}`:"/":t.length>0?t:"."}function Z(e,t){if(i(e),i(t),e===t)return""}function z(...e){let t="",r="",n=!1;for(let o=e.length-1;o>=-1;o--){let a;const{Deno:s}=globalThis;if(o>=0)a=e[o];else if(t){if("function"!=typeof s?.env?.get||"function"!=typeof s?.cwd)throw new TypeError("Resolved a relative path without a current working directory (CWD)");a=s.cwd(),void 0!==a&&a.slice(0,3).toLowerCase()===`${t.toLowerCase()}\\`||(a=`${t}\\`)}else{if("function"!=typeof s?.cwd)throw new TypeError("Resolved a drive-letter-less path without a current working directory (CWD)");a=s.cwd()}i(a);const u=a.length;if(0===u)continue;let f=0,l="",c=!1;const h=a.charCodeAt(0);if(u>1)if(y(h))if(c=!0,y(a.charCodeAt(1))){let e=2,t=e;for(;e<u&&!y(a.charCodeAt(e));++e);if(e<u&&e!==t){const r=a.slice(t,e);for(t=e;e<u&&y(a.charCodeAt(e));++e);if(e<u&&e!==t){for(t=e;e<u&&!y(a.charCodeAt(e));++e);e===u?(l=`\\\\${r}\\${a.slice(t)}`,f=e):e!==t&&(l=`\\\\${r}\\${a.slice(t,e)}`,f=e)}}}else f=1;else w(h)&&a.charCodeAt(1)===d&&(l=a.slice(0,2),f=2,u>2&&y(a.charCodeAt(2))&&(c=!0,f=3));else y(h)&&(f=1,c=!0);if(!(l.length>0&&t.length>0&&l.toLowerCase()!==t.toLowerCase())&&(0===t.length&&l.length>0&&(t=l),n||(r=`${a.slice(f)}\\${r}`,n=c),n&&t.length>0))break}return r=U(r,!n,"\\",y),t+(n?"\\":"")+r||"."}function Y(e,t){return n?function(e,t){Z(e,t);const r=z(e),n=z(t);if(r===n)return"";if((e=r.toLowerCase())===(t=n.toLowerCase()))return"";let i=0,o=e.length;for(;i<o&&e.charCodeAt(i)===h;++i);for(;o-1>i&&e.charCodeAt(o-1)===h;--o);const a=o-i;let s=0,u=t.length;for(;s<u&&t.charCodeAt(s)===h;++s);for(;u-1>s&&t.charCodeAt(u-1)===h;--u);const f=u-s,l=a<f?a:f;let c=-1,d=0;for(;d<=l;++d){if(d===l){if(f>l){if(t.charCodeAt(s+d)===h)return n.slice(s+d+1);if(2===d)return n.slice(s+d)}a>l&&(e.charCodeAt(i+d)===h?c=d:2===d&&(c=3));break}const r=e.charCodeAt(i+d);if(r!==t.charCodeAt(s+d))break;r===h&&(c=d)}if(d!==l&&-1===c)return n;let p="";for(-1===c&&(c=0),d=i+c+1;d<=o;++d)d!==o&&e.charCodeAt(d)!==h||(0===p.length?p+="..":p+="\\..");return p.length>0?p+n.slice(s+c,u):(s+=c,n.charCodeAt(s)===h&&++s,n.slice(s,u))}(e,t):function(e,t){if(Z(e,t),(e=W(e))===(t=W(t)))return"";let r=1;const n=e.length;for(;r<n&&p(e.charCodeAt(r));++r);const i=n-r;let o=1;const a=t.length;for(;o<a&&p(t.charCodeAt(o));++o);const s=a-o,u=i<s?i:s;let f=-1,l=0;for(;l<=u;++l){if(l===u){if(s>u){if(p(t.charCodeAt(o+l)))return t.slice(o+l+1);if(0===l)return t.slice(o+l)}else i>u&&(p(e.charCodeAt(r+l))?f=l:0===l&&(f=0));break}const n=e.charCodeAt(r+l);if(n!==t.charCodeAt(o+l))break;p(n)&&(f=l)}let c="";for(l=r+f+1;l<=n;++l)(l===n||p(e.charCodeAt(l)))&&(0===c.length?c+="..":c+="/..");return c.length>0?c+t.slice(o+f):(o+=f,p(t.charCodeAt(o))&&++o,t.slice(o))}(e,t)}function G(...e){return n?z(...e):W(...e)}const H={"\t":"%09","\n":"%0A","\v":"%0B","\f":"%0C","\r":"%0D"," ":"%20"};function V(e){return e.replaceAll(/[\s]/g,e=>H[e]??e)}function X(e){return n?function(e){if(!L(e))throw new TypeError(`Path must be absolute: received "${e}"`);const[,t,r]=e.match(/^(?:[/\\]{2}([^/\\]+)(?=[/\\](?:[^/\\]|$)))?(.*)/),n=new URL("file:///");if(n.pathname=V(r.replace(/%/g,"%25")),void 0!==t&&"localhost"!==t&&(n.hostname=t,!n.hostname))throw new TypeError(`Invalid hostname: "${n.hostname}"`);return n}(e):function(e){if(!x(e))throw new TypeError(`Path must be absolute: received "${e}"`);const t=new URL("file:///");return t.pathname=V(e.replace(/%/g,"%25").replace(/\\/g,"%5C")),t}(e)}function q(e){return n?function(e){if("string"!=typeof e)return e;if(0===e.length)return"";const t=z(e);if(t.length>=3)if(t.charCodeAt(0)===h){if(t.charCodeAt(1)===h){const e=t.charCodeAt(2);if(63!==e&&e!==c)return`\\\\?\\UNC\\${t.slice(2)}`}}else if(w(t.charCodeAt(0))&&t.charCodeAt(1)===d&&t.charCodeAt(2)===h)return`\\\\?\\${t}`;return e}(e):e}function J(e){return function(e,t){const[r="",...n]=e,i=r.split(t);let o=i.length,a="";for(const e of n){const r=e.split(t);r.length<=o&&(o=r.length,a="");for(let e=0;e<o;e++)if(r[e]!==i[e]){o=e,a=0===e?"":t;break}}return i.slice(0,o).join(t)+a}(e,_)}const K=["!","$","(",")","*","+",".","=","?","[","\\","^","{","|"],Q=["-","\\","]"];function ee(e,t,{extended:r=!0,globstar:n=!0,caseInsensitive:i=!1}={}){if(""===t)return/(?!)/;let o=t.length;for(;o>1&&e.seps.includes(t[o-1]);o--);t=t.slice(0,o);let a="";for(let i=0;i<t.length;){let o="";const s=[];let u=!1,f=!1,l=!1,c=i;for(;c<t.length&&!e.seps.includes(t[c]);c++)if(f)f=!1,o+=(u?Q:K).includes(t[c])?`\\${t[c]}`:t[c];else if(t[c]!==e.escapePrefix){if("["===t[c]){if(!u){u=!0,o+="[","!"===t[c+1]?(c++,o+="^"):"^"===t[c+1]&&(c++,o+="\\^");continue}if(":"===t[c+1]){let e=c+1,r="";for(;void 0!==t[e+1]&&":"!==t[e+1];)r+=t[e+1],e++;if(":"===t[e+1]&&"]"===t[e+2]){c=e+2,"alnum"===r?o+="\\dA-Za-z":"alpha"===r?o+="A-Za-z":"ascii"===r?o+="\0-":"blank"===r?o+="\t ":"cntrl"===r?o+="\0-":"digit"===r?o+="\\d":"graph"===r?o+="!-~":"lower"===r?o+="a-z":"print"===r?o+=" -~":"punct"===r?o+="!\"#$%&'()*+,\\-./:;<=>?@[\\\\\\]^_‘{|}~":"space"===r?o+="\\s\v":"upper"===r?o+="A-Z":"word"===r?o+="\\w":"xdigit"===r&&(o+="\\dA-Fa-f");continue}}}if("]"===t[c]&&u)u=!1,o+="]";else if(u)o+=t[c];else{if(")"===t[c]&&s.length>0&&"BRACE"!==s[s.length-1]){o+=")";const t=s.pop();"!"===t?o+=e.wildcard:"@"!==t&&(o+=t);continue}if("|"===t[c]&&s.length>0&&"BRACE"!==s[s.length-1])o+="|";else if("+"===t[c]&&r&&"("===t[c+1])c++,s.push("+"),o+="(?:";else if("@"===t[c]&&r&&"("===t[c+1])c++,s.push("@"),o+="(?:";else if("?"!==t[c])if("!"===t[c]&&r&&"("===t[c+1])c++,s.push("!"),o+="(?!";else if("{"!==t[c])if("}"!==t[c]||"BRACE"!==s[s.length-1])if(","!==t[c]||"BRACE"!==s[s.length-1])if("*"!==t[c])o+=K.includes(t[c])?`\\${t[c]}`:t[c];else if(r&&"("===t[c+1])c++,s.push("*"),o+="(?:";else{const r=t[c-1];let i=1;for(;"*"===t[c+1];)c++,i++;const a=t[c+1];n&&2===i&&[...e.seps,void 0].includes(r)&&[...e.seps,void 0].includes(a)?(o+=e.globstar,l=!0):o+=e.wildcard}else o+="|";else s.pop(),o+=")";else s.push("BRACE"),o+="(?:";else r&&"("===t[c+1]?(c++,s.push("?"),o+="(?:"):o+="."}}else f=!0;if(s.length>0||u||f){o="";for(const e of t.slice(i,c))o+=K.includes(e)?`\\${e}`:e,l=!1}for(a+=o,l||(a+=c<t.length?e.sep:e.sepMaybe,l=!0);e.seps.includes(t[c]);)c++;i=c}return a=`^${a}$`,new RegExp(a,i?"i":"")}const te={sep:"/+",sepMaybe:"/*",seps:["/"],globstar:"(?:[^/]*(?:/|$)+)*",wildcard:"[^/]*",escapePrefix:"\\"},re={sep:"(?:\\\\|/)+",sepMaybe:"(?:\\\\|/)*",seps:["\\","/"],globstar:"(?:[^\\\\/]*(?:\\\\|/|$)+)*",wildcard:"[^\\\\/]*",escapePrefix:"`"};function ne(e,t={}){return n?function(e,t={}){return ee(re,e,t)}(e,t):function(e,t={}){return ee(te,e,t)}(e,t)}function ie(e){const t={"{":"}","(":")","[":"]"},r=/\\(.)|(^!|\*|\?|[\].+)]\?|\[[^[\\\]]+\]|\{[^{\\}]+\}|\(\?[:!=][^\\)]+\)|\([^(|]+\|[^\\)]+\))/;if(""===e)return!1;let n;for(;n=r.exec(e);){if(n[2])return!0;let r=n.index+n[0].length;const i=n[1],o=i?t[i]:null;if(i&&o){const t=e.indexOf(o,r);-1!==t&&(r=t+1)}e=e.slice(r)}return!1}const oe=/\/+/;function ae(e,t={}){const{globstar:r=!1}=t;if(e.match(/\0/g))throw new Error(`Glob contains invalid characters: "${e}"`);if(!r)return j(e);const n=oe.source,i=new RegExp(`(?<=(${n}|^)\\*\\*${n})\\.\\.(?=${n}|$)`,"g");return j(e.replace(i,"\0")).replace(/\0/g,"..")}const se=/[\\/]+/;function ue(e,t={}){const{globstar:r=!1}=t;if(e.match(/\0/g))throw new Error(`Glob contains invalid characters: "${e}"`);if(!r)return P(e);const n=se.source,i=new RegExp(`(?<=(${n}|^)\\*\\*${n})\\.\\.(?=${n}|$)`,"g");return P(e.replace(i,"\0")).replace(/\0/g,"..")}function fe(e,t={}){return n?function(e,t={}){const{globstar:r=!1}=t;if(!r||0===e.length)return $(...e);let n;for(const t of e){const e=t;e.length>0&&(n?n+=`\\${e}`:n=e)}return n?ue(n,{globstar:r}):"."}(e,t):function(e,t={}){const{globstar:r=!1}=t;if(!r||0===e.length)return M(...e);let n;for(const t of e){const e=t;e.length>0&&(n?n+=`/${e}`:n=e)}return n?ae(n,{globstar:r}):"."}(e,t)}function le(e,t={}){return n?ue(e,t):ae(e,t)}}},t={};function r(n){var i=t[n];if(void 0!==i)return i.exports;var o=t[n]={exports:{}};return e[n].call(o.exports,o,o.exports,r),o.exports}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})},r(495)})();