@simon_he/pi 0.0.68 → 0.0.71

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (3) hide show
  1. package/dist/index.cjs +768 -722
  2. package/dist/index.js +798 -752
  3. package/package.json +4 -3
package/dist/index.cjs CHANGED
@@ -6,8 +6,8 @@ var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __getProtoOf = Object.getPrototypeOf;
7
7
  var __hasOwnProp = Object.prototype.hasOwnProperty;
8
8
  var __defNormalProp = (obj, key2, value) => key2 in obj ? __defProp(obj, key2, { enumerable: true, configurable: true, writable: true, value }) : obj[key2] = value;
9
- var __commonJS = (cb2, mod) => function __require() {
10
- return mod || (0, cb2[__getOwnPropNames(cb2)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
9
+ var __commonJS = (cb, mod) => function __require() {
10
+ return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports;
11
11
  };
12
12
  var __export = (target, all) => {
13
13
  for (var name in all)
@@ -237,7 +237,7 @@ var require_spark_md5 = __commonJS({
237
237
  return md5blks;
238
238
  }
239
239
  function md51(s) {
240
- var n = s.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo2, hi;
240
+ var n = s.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo, hi;
241
241
  for (i = 64; i <= n; i += 64) {
242
242
  md5cycle(state, md5blk(s.substring(i - 64, i)));
243
243
  }
@@ -256,15 +256,15 @@ var require_spark_md5 = __commonJS({
256
256
  }
257
257
  tmp = n * 8;
258
258
  tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
259
- lo2 = parseInt(tmp[2], 16);
259
+ lo = parseInt(tmp[2], 16);
260
260
  hi = parseInt(tmp[1], 16) || 0;
261
- tail[14] = lo2;
261
+ tail[14] = lo;
262
262
  tail[15] = hi;
263
263
  md5cycle(state, tail);
264
264
  return state;
265
265
  }
266
266
  function md51_array(a) {
267
- var n = a.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo2, hi;
267
+ var n = a.length, state = [1732584193, -271733879, -1732584194, 271733878], i, length, tail, tmp, lo, hi;
268
268
  for (i = 64; i <= n; i += 64) {
269
269
  md5cycle(state, md5blk_array(a.subarray(i - 64, i)));
270
270
  }
@@ -283,9 +283,9 @@ var require_spark_md5 = __commonJS({
283
283
  }
284
284
  tmp = n * 8;
285
285
  tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
286
- lo2 = parseInt(tmp[2], 16);
286
+ lo = parseInt(tmp[2], 16);
287
287
  hi = parseInt(tmp[1], 16) || 0;
288
- tail[14] = lo2;
288
+ tail[14] = lo;
289
289
  tail[15] = hi;
290
290
  md5cycle(state, tail);
291
291
  return state;
@@ -420,7 +420,7 @@ var require_spark_md5 = __commonJS({
420
420
  delete this._length;
421
421
  };
422
422
  SparkMD5.prototype._finish = function(tail, length) {
423
- var i = length, tmp, lo2, hi;
423
+ var i = length, tmp, lo, hi;
424
424
  tail[i >> 2] |= 128 << (i % 4 << 3);
425
425
  if (i > 55) {
426
426
  md5cycle(this._hash, tail);
@@ -430,9 +430,9 @@ var require_spark_md5 = __commonJS({
430
430
  }
431
431
  tmp = this._length * 8;
432
432
  tmp = tmp.toString(16).match(/(.*?)(.{0,8})$/);
433
- lo2 = parseInt(tmp[2], 16);
433
+ lo = parseInt(tmp[2], 16);
434
434
  hi = parseInt(tmp[1], 16) || 0;
435
- tail[14] = lo2;
435
+ tail[14] = lo;
436
436
  tail[15] = hi;
437
437
  md5cycle(this._hash, tail);
438
438
  };
@@ -2518,8 +2518,8 @@ var require_chunkstream = __commonJS({
2518
2518
  if (this._buffers && !this.writable) {
2519
2519
  this._end();
2520
2520
  }
2521
- } catch (ex) {
2522
- this.emit("error", ex);
2521
+ } catch (ex2) {
2522
+ this.emit("error", ex2);
2523
2523
  }
2524
2524
  };
2525
2525
  }
@@ -3347,12 +3347,12 @@ var require_format_normaliser = __commonJS({
3347
3347
  let pxPos = 0;
3348
3348
  for (let y = 0; y < height; y++) {
3349
3349
  for (let x2 = 0; x2 < width; x2++) {
3350
- let color3 = palette[indata[pxPos]];
3351
- if (!color3) {
3350
+ let color4 = palette[indata[pxPos]];
3351
+ if (!color4) {
3352
3352
  throw new Error("index " + indata[pxPos] + " not in palette");
3353
3353
  }
3354
3354
  for (let i = 0; i < 4; i++) {
3355
- outdata[pxPos + i] = color3[i];
3355
+ outdata[pxPos + i] = color4[i];
3356
3356
  }
3357
3357
  pxPos += 4;
3358
3358
  }
@@ -3537,8 +3537,8 @@ var require_parser_async = __commonJS({
3537
3537
  let bitmapData = bitmapper.dataToBitMap(filteredData, this._bitmapInfo);
3538
3538
  normalisedBitmapData = formatNormaliser(bitmapData, this._bitmapInfo);
3539
3539
  bitmapData = null;
3540
- } catch (ex) {
3541
- this._handleError(ex);
3540
+ } catch (ex2) {
3541
+ this._handleError(ex2);
3542
3542
  return;
3543
3543
  }
3544
3544
  this.emit("parsed", normalisedBitmapData);
@@ -4566,38 +4566,38 @@ var require_png2 = __commonJS({
4566
4566
  Utils.qrToImageData(pngImage.data, qrData, opts);
4567
4567
  return pngImage;
4568
4568
  };
4569
- exports.renderToDataURL = function renderToDataURL(qrData, options, cb2) {
4570
- if (typeof cb2 === "undefined") {
4571
- cb2 = options;
4569
+ exports.renderToDataURL = function renderToDataURL(qrData, options, cb) {
4570
+ if (typeof cb === "undefined") {
4571
+ cb = options;
4572
4572
  options = void 0;
4573
4573
  }
4574
4574
  exports.renderToBuffer(qrData, options, function(err, output) {
4575
4575
  if (err)
4576
- cb2(err);
4576
+ cb(err);
4577
4577
  let url = "data:image/png;base64,";
4578
4578
  url += output.toString("base64");
4579
- cb2(null, url);
4579
+ cb(null, url);
4580
4580
  });
4581
4581
  };
4582
- exports.renderToBuffer = function renderToBuffer(qrData, options, cb2) {
4583
- if (typeof cb2 === "undefined") {
4584
- cb2 = options;
4582
+ exports.renderToBuffer = function renderToBuffer(qrData, options, cb) {
4583
+ if (typeof cb === "undefined") {
4584
+ cb = options;
4585
4585
  options = void 0;
4586
4586
  }
4587
4587
  const png = exports.render(qrData, options);
4588
4588
  const buffer = [];
4589
- png.on("error", cb2);
4589
+ png.on("error", cb);
4590
4590
  png.on("data", function(data) {
4591
4591
  buffer.push(data);
4592
4592
  });
4593
4593
  png.on("end", function() {
4594
- cb2(null, Buffer.concat(buffer));
4594
+ cb(null, Buffer.concat(buffer));
4595
4595
  });
4596
4596
  png.pack();
4597
4597
  };
4598
- exports.renderToFile = function renderToFile(path2, qrData, options, cb2) {
4599
- if (typeof cb2 === "undefined") {
4600
- cb2 = options;
4598
+ exports.renderToFile = function renderToFile(path2, qrData, options, cb) {
4599
+ if (typeof cb === "undefined") {
4600
+ cb = options;
4601
4601
  options = void 0;
4602
4602
  }
4603
4603
  let called = false;
@@ -4605,7 +4605,7 @@ var require_png2 = __commonJS({
4605
4605
  if (called)
4606
4606
  return;
4607
4607
  called = true;
4608
- cb2.apply(null, args);
4608
+ cb.apply(null, args);
4609
4609
  };
4610
4610
  const stream = fs.createWriteStream(path2);
4611
4611
  stream.on("error", done);
@@ -4644,7 +4644,7 @@ var require_utf8 = __commonJS({
4644
4644
  return blocks.WB;
4645
4645
  return blocks.WW;
4646
4646
  }
4647
- exports.render = function(qrData, options, cb2) {
4647
+ exports.render = function(qrData, options, cb) {
4648
4648
  const opts = Utils.getOptions(options);
4649
4649
  let blocks = BLOCK_CHAR;
4650
4650
  if (opts.color.dark.hex === "#ffffff" || opts.color.light.hex === "#000000") {
@@ -4667,19 +4667,19 @@ var require_utf8 = __commonJS({
4667
4667
  output += vMargin + "\n";
4668
4668
  }
4669
4669
  output += hMargin.slice(0, -1);
4670
- if (typeof cb2 === "function") {
4671
- cb2(null, output);
4670
+ if (typeof cb === "function") {
4671
+ cb(null, output);
4672
4672
  }
4673
4673
  return output;
4674
4674
  };
4675
- exports.renderToFile = function renderToFile(path2, qrData, options, cb2) {
4676
- if (typeof cb2 === "undefined") {
4677
- cb2 = options;
4675
+ exports.renderToFile = function renderToFile(path2, qrData, options, cb) {
4676
+ if (typeof cb === "undefined") {
4677
+ cb = options;
4678
4678
  options = void 0;
4679
4679
  }
4680
4680
  const fs = require("fs");
4681
4681
  const utf8 = exports.render(qrData, options);
4682
- fs.writeFile(path2, utf8, cb2);
4682
+ fs.writeFile(path2, utf8, cb);
4683
4683
  };
4684
4684
  }
4685
4685
  });
@@ -4687,7 +4687,7 @@ var require_utf8 = __commonJS({
4687
4687
  // node_modules/qrcode/lib/renderer/terminal/terminal.js
4688
4688
  var require_terminal = __commonJS({
4689
4689
  "node_modules/qrcode/lib/renderer/terminal/terminal.js"(exports) {
4690
- exports.render = function(qrData, options, cb2) {
4690
+ exports.render = function(qrData, options, cb) {
4691
4691
  const size = qrData.modules.size;
4692
4692
  const data = qrData.modules.data;
4693
4693
  const black = "\x1B[40m \x1B[0m";
@@ -4704,8 +4704,8 @@ var require_terminal = __commonJS({
4704
4704
  output += vMargin + "\n";
4705
4705
  }
4706
4706
  output += hMargin + "\n";
4707
- if (typeof cb2 === "function") {
4708
- cb2(null, output);
4707
+ if (typeof cb === "function") {
4708
+ cb(null, output);
4709
4709
  }
4710
4710
  return output;
4711
4711
  };
@@ -4748,7 +4748,7 @@ var require_terminal_small = __commonJS({
4748
4748
  var mkCode = function(modules, size, x2, y) {
4749
4749
  return mkCodePixel(modules, size, x2, y) + mkCodePixel(modules, size, x2, y + 1);
4750
4750
  };
4751
- exports.render = function(qrData, options, cb2) {
4751
+ exports.render = function(qrData, options, cb) {
4752
4752
  const size = qrData.modules.size;
4753
4753
  const data = qrData.modules.data;
4754
4754
  const inverse = !!(options && options.inverse);
@@ -4765,8 +4765,8 @@ var require_terminal_small = __commonJS({
4765
4765
  output += palette[mkCode(data, size, size, y)] + newLine;
4766
4766
  }
4767
4767
  output += reset;
4768
- if (typeof cb2 === "function") {
4769
- cb2(null, output);
4768
+ if (typeof cb === "function") {
4769
+ cb(null, output);
4770
4770
  }
4771
4771
  return output;
4772
4772
  };
@@ -4778,11 +4778,11 @@ var require_terminal2 = __commonJS({
4778
4778
  "node_modules/qrcode/lib/renderer/terminal.js"(exports) {
4779
4779
  var big = require_terminal();
4780
4780
  var small = require_terminal_small();
4781
- exports.render = function(qrData, options, cb2) {
4781
+ exports.render = function(qrData, options, cb) {
4782
4782
  if (options && options.small) {
4783
- return small.render(qrData, options, cb2);
4783
+ return small.render(qrData, options, cb);
4784
4784
  }
4785
- return big.render(qrData, options, cb2);
4785
+ return big.render(qrData, options, cb);
4786
4786
  };
4787
4787
  }
4788
4788
  });
@@ -4791,9 +4791,9 @@ var require_terminal2 = __commonJS({
4791
4791
  var require_svg_tag = __commonJS({
4792
4792
  "node_modules/qrcode/lib/renderer/svg-tag.js"(exports) {
4793
4793
  var Utils = require_utils2();
4794
- function getColorAttrib(color3, attrib) {
4795
- const alpha = color3.a / 255;
4796
- const str = attrib + '="' + color3.hex + '"';
4794
+ function getColorAttrib(color4, attrib) {
4795
+ const alpha = color4.a / 255;
4796
+ const str = attrib + '="' + color4.hex + '"';
4797
4797
  return alpha < 1 ? str + " " + attrib + '-opacity="' + alpha.toFixed(2).slice(1) + '"' : str;
4798
4798
  }
4799
4799
  function svgCmd(cmd, x2, y) {
@@ -4829,7 +4829,7 @@ var require_svg_tag = __commonJS({
4829
4829
  }
4830
4830
  return path2;
4831
4831
  }
4832
- exports.render = function render2(qrData, options, cb2) {
4832
+ exports.render = function render2(qrData, options, cb) {
4833
4833
  const opts = Utils.getOptions(options);
4834
4834
  const size = qrData.modules.size;
4835
4835
  const data = qrData.modules.data;
@@ -4839,8 +4839,8 @@ var require_svg_tag = __commonJS({
4839
4839
  const viewBox = 'viewBox="0 0 ' + qrcodesize + " " + qrcodesize + '"';
4840
4840
  const width = !opts.width ? "" : 'width="' + opts.width + '" height="' + opts.width + '" ';
4841
4841
  const svgTag = '<svg xmlns="http://www.w3.org/2000/svg" ' + width + viewBox + ' shape-rendering="crispEdges">' + bg + path2 + "</svg>\n";
4842
- if (typeof cb2 === "function") {
4843
- cb2(null, svgTag);
4842
+ if (typeof cb === "function") {
4843
+ cb(null, svgTag);
4844
4844
  }
4845
4845
  return svgTag;
4846
4846
  };
@@ -4852,15 +4852,15 @@ var require_svg = __commonJS({
4852
4852
  "node_modules/qrcode/lib/renderer/svg.js"(exports) {
4853
4853
  var svgTagRenderer = require_svg_tag();
4854
4854
  exports.render = svgTagRenderer.render;
4855
- exports.renderToFile = function renderToFile(path2, qrData, options, cb2) {
4856
- if (typeof cb2 === "undefined") {
4857
- cb2 = options;
4855
+ exports.renderToFile = function renderToFile(path2, qrData, options, cb) {
4856
+ if (typeof cb === "undefined") {
4857
+ cb = options;
4858
4858
  options = void 0;
4859
4859
  }
4860
4860
  const fs = require("fs");
4861
4861
  const svgTag = exports.render(qrData, options);
4862
4862
  const xmlStr = '<?xml version="1.0" encoding="utf-8"?><!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">' + svgTag;
4863
- fs.writeFile(path2, xmlStr, cb2);
4863
+ fs.writeFile(path2, xmlStr, cb);
4864
4864
  };
4865
4865
  }
4866
4866
  });
@@ -4927,7 +4927,7 @@ var require_browser = __commonJS({
4927
4927
  var QRCode = require_qrcode();
4928
4928
  var CanvasRenderer = require_canvas();
4929
4929
  var SvgRenderer = require_svg_tag();
4930
- function renderCanvas(renderFunc, canvas, text, opts, cb2) {
4930
+ function renderCanvas(renderFunc, canvas, text, opts, cb) {
4931
4931
  const args = [].slice.call(arguments, 1);
4932
4932
  const argsNum = args.length;
4933
4933
  const isLastArgCb = typeof args[argsNum - 1] === "function";
@@ -4939,15 +4939,15 @@ var require_browser = __commonJS({
4939
4939
  throw new Error("Too few arguments provided");
4940
4940
  }
4941
4941
  if (argsNum === 2) {
4942
- cb2 = text;
4942
+ cb = text;
4943
4943
  text = canvas;
4944
4944
  canvas = opts = void 0;
4945
4945
  } else if (argsNum === 3) {
4946
- if (canvas.getContext && typeof cb2 === "undefined") {
4947
- cb2 = opts;
4946
+ if (canvas.getContext && typeof cb === "undefined") {
4947
+ cb = opts;
4948
4948
  opts = void 0;
4949
4949
  } else {
4950
- cb2 = opts;
4950
+ cb = opts;
4951
4951
  opts = text;
4952
4952
  text = canvas;
4953
4953
  canvas = void 0;
@@ -4976,9 +4976,9 @@ var require_browser = __commonJS({
4976
4976
  }
4977
4977
  try {
4978
4978
  const data = QRCode.create(text, opts);
4979
- cb2(null, renderFunc(data, canvas, opts));
4979
+ cb(null, renderFunc(data, canvas, opts));
4980
4980
  } catch (e) {
4981
- cb2(e);
4981
+ cb(e);
4982
4982
  }
4983
4983
  }
4984
4984
  exports.create = QRCode.create;
@@ -4999,25 +4999,25 @@ var require_server = __commonJS({
4999
4999
  var Utf8Renderer = require_utf8();
5000
5000
  var TerminalRenderer = require_terminal2();
5001
5001
  var SvgRenderer = require_svg();
5002
- function checkParams(text, opts, cb2) {
5002
+ function checkParams(text, opts, cb) {
5003
5003
  if (typeof text === "undefined") {
5004
5004
  throw new Error("String required as first argument");
5005
5005
  }
5006
- if (typeof cb2 === "undefined") {
5007
- cb2 = opts;
5006
+ if (typeof cb === "undefined") {
5007
+ cb = opts;
5008
5008
  opts = {};
5009
5009
  }
5010
- if (typeof cb2 !== "function") {
5010
+ if (typeof cb !== "function") {
5011
5011
  if (!canPromise()) {
5012
5012
  throw new Error("Callback required as last argument");
5013
5013
  } else {
5014
- opts = cb2 || {};
5015
- cb2 = null;
5014
+ opts = cb || {};
5015
+ cb = null;
5016
5016
  }
5017
5017
  }
5018
5018
  return {
5019
5019
  opts,
5020
- cb: cb2
5020
+ cb
5021
5021
  };
5022
5022
  }
5023
5023
  function getTypeFromFilename(path2) {
@@ -5069,30 +5069,30 @@ var require_server = __commonJS({
5069
5069
  }
5070
5070
  exports.create = QRCode.create;
5071
5071
  exports.toCanvas = require_browser().toCanvas;
5072
- exports.toString = function toString2(text, opts, cb2) {
5073
- const params = checkParams(text, opts, cb2);
5072
+ exports.toString = function toString2(text, opts, cb) {
5073
+ const params = checkParams(text, opts, cb);
5074
5074
  const type = params.opts ? params.opts.type : void 0;
5075
5075
  const renderer = getStringRendererFromType(type);
5076
5076
  return render2(renderer.render, text, params);
5077
5077
  };
5078
- exports.toDataURL = function toDataURL(text, opts, cb2) {
5079
- const params = checkParams(text, opts, cb2);
5078
+ exports.toDataURL = function toDataURL(text, opts, cb) {
5079
+ const params = checkParams(text, opts, cb);
5080
5080
  const renderer = getRendererFromType(params.opts.type);
5081
5081
  return render2(renderer.renderToDataURL, text, params);
5082
5082
  };
5083
- exports.toBuffer = function toBuffer(text, opts, cb2) {
5084
- const params = checkParams(text, opts, cb2);
5083
+ exports.toBuffer = function toBuffer(text, opts, cb) {
5084
+ const params = checkParams(text, opts, cb);
5085
5085
  const renderer = getRendererFromType(params.opts.type);
5086
5086
  return render2(renderer.renderToBuffer, text, params);
5087
5087
  };
5088
- exports.toFile = function toFile(path2, text, opts, cb2) {
5088
+ exports.toFile = function toFile(path2, text, opts, cb) {
5089
5089
  if (typeof path2 !== "string" || !(typeof text === "string" || typeof text === "object")) {
5090
5090
  throw new Error("Invalid argument");
5091
5091
  }
5092
5092
  if (arguments.length < 3 && !canPromise()) {
5093
5093
  throw new Error("Too few arguments provided");
5094
5094
  }
5095
- const params = checkParams(text, opts, cb2);
5095
+ const params = checkParams(text, opts, cb);
5096
5096
  const type = params.opts.type || getTypeFromFilename(path2);
5097
5097
  const renderer = getRendererFromType(type);
5098
5098
  const renderToFile = renderer.renderToFile.bind(null, path2);
@@ -5272,14 +5272,14 @@ var require_signal_exit = __commonJS({
5272
5272
  assert = require("assert");
5273
5273
  signals = require_signals();
5274
5274
  isWin = /^win/i.test(process12.platform);
5275
- EE2 = require("events");
5276
- if (typeof EE2 !== "function") {
5277
- EE2 = EE2.EventEmitter;
5275
+ EE = require("events");
5276
+ if (typeof EE !== "function") {
5277
+ EE = EE.EventEmitter;
5278
5278
  }
5279
5279
  if (process12.__signal_exit_emitter__) {
5280
5280
  emitter = process12.__signal_exit_emitter__;
5281
5281
  } else {
5282
- emitter = process12.__signal_exit_emitter__ = new EE2();
5282
+ emitter = process12.__signal_exit_emitter__ = new EE();
5283
5283
  emitter.count = 0;
5284
5284
  emitter.emitted = {};
5285
5285
  }
@@ -5287,12 +5287,12 @@ var require_signal_exit = __commonJS({
5287
5287
  emitter.setMaxListeners(Infinity);
5288
5288
  emitter.infinite = true;
5289
5289
  }
5290
- module2.exports = function(cb2, opts) {
5290
+ module2.exports = function(cb, opts) {
5291
5291
  if (!processOk(global.process)) {
5292
5292
  return function() {
5293
5293
  };
5294
5294
  }
5295
- assert.equal(typeof cb2, "function", "a callback must be provided for exit handler");
5295
+ assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
5296
5296
  if (loaded === false) {
5297
5297
  load();
5298
5298
  }
@@ -5301,12 +5301,12 @@ var require_signal_exit = __commonJS({
5301
5301
  ev = "afterexit";
5302
5302
  }
5303
5303
  var remove = function() {
5304
- emitter.removeListener(ev, cb2);
5304
+ emitter.removeListener(ev, cb);
5305
5305
  if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
5306
5306
  unload();
5307
5307
  }
5308
5308
  };
5309
- emitter.on(ev, cb2);
5309
+ emitter.on(ev, cb);
5310
5310
  return remove;
5311
5311
  };
5312
5312
  unload = function unload2() {
@@ -5401,7 +5401,7 @@ var require_signal_exit = __commonJS({
5401
5401
  var assert;
5402
5402
  var signals;
5403
5403
  var isWin;
5404
- var EE2;
5404
+ var EE;
5405
5405
  var emitter;
5406
5406
  var unload;
5407
5407
  var emit;
@@ -7690,13 +7690,13 @@ var require_buffer_list = __commonJS({
7690
7690
  var require_destroy = __commonJS({
7691
7691
  "node_modules/readable-stream/lib/internal/streams/destroy.js"(exports, module2) {
7692
7692
  "use strict";
7693
- function destroy(err, cb2) {
7693
+ function destroy(err, cb) {
7694
7694
  var _this = this;
7695
7695
  var readableDestroyed = this._readableState && this._readableState.destroyed;
7696
7696
  var writableDestroyed = this._writableState && this._writableState.destroyed;
7697
7697
  if (readableDestroyed || writableDestroyed) {
7698
- if (cb2) {
7699
- cb2(err);
7698
+ if (cb) {
7699
+ cb(err);
7700
7700
  } else if (err) {
7701
7701
  if (!this._writableState) {
7702
7702
  process.nextTick(emitErrorNT, this, err);
@@ -7714,7 +7714,7 @@ var require_destroy = __commonJS({
7714
7714
  this._writableState.destroyed = true;
7715
7715
  }
7716
7716
  this._destroy(err || null, function(err2) {
7717
- if (!cb2 && err2) {
7717
+ if (!cb && err2) {
7718
7718
  if (!_this._writableState) {
7719
7719
  process.nextTick(emitErrorAndCloseNT, _this, err2);
7720
7720
  } else if (!_this._writableState.errorEmitted) {
@@ -7723,9 +7723,9 @@ var require_destroy = __commonJS({
7723
7723
  } else {
7724
7724
  process.nextTick(emitCloseNT, _this);
7725
7725
  }
7726
- } else if (cb2) {
7726
+ } else if (cb) {
7727
7727
  process.nextTick(emitCloseNT, _this);
7728
- cb2(err2);
7728
+ cb(err2);
7729
7729
  } else {
7730
7730
  process.nextTick(emitCloseNT, _this);
7731
7731
  }
@@ -8098,12 +8098,12 @@ var require_stream_writable = __commonJS({
8098
8098
  Writable.prototype.pipe = function() {
8099
8099
  errorOrDestroy(this, new ERR_STREAM_CANNOT_PIPE());
8100
8100
  };
8101
- function writeAfterEnd(stream, cb2) {
8101
+ function writeAfterEnd(stream, cb) {
8102
8102
  var er2 = new ERR_STREAM_WRITE_AFTER_END();
8103
8103
  errorOrDestroy(stream, er2);
8104
- process.nextTick(cb2, er2);
8104
+ process.nextTick(cb, er2);
8105
8105
  }
8106
- function validChunk(stream, state, chunk, cb2) {
8106
+ function validChunk(stream, state, chunk, cb) {
8107
8107
  var er2;
8108
8108
  if (chunk === null) {
8109
8109
  er2 = new ERR_STREAM_NULL_VALUES();
@@ -8112,12 +8112,12 @@ var require_stream_writable = __commonJS({
8112
8112
  }
8113
8113
  if (er2) {
8114
8114
  errorOrDestroy(stream, er2);
8115
- process.nextTick(cb2, er2);
8115
+ process.nextTick(cb, er2);
8116
8116
  return false;
8117
8117
  }
8118
8118
  return true;
8119
8119
  }
8120
- Writable.prototype.write = function(chunk, encoding, cb2) {
8120
+ Writable.prototype.write = function(chunk, encoding, cb) {
8121
8121
  var state = this._writableState;
8122
8122
  var ret = false;
8123
8123
  var isBuf = !state.objectMode && _isUint8Array(chunk);
@@ -8125,20 +8125,20 @@ var require_stream_writable = __commonJS({
8125
8125
  chunk = _uint8ArrayToBuffer(chunk);
8126
8126
  }
8127
8127
  if (typeof encoding === "function") {
8128
- cb2 = encoding;
8128
+ cb = encoding;
8129
8129
  encoding = null;
8130
8130
  }
8131
8131
  if (isBuf)
8132
8132
  encoding = "buffer";
8133
8133
  else if (!encoding)
8134
8134
  encoding = state.defaultEncoding;
8135
- if (typeof cb2 !== "function")
8136
- cb2 = nop;
8135
+ if (typeof cb !== "function")
8136
+ cb = nop;
8137
8137
  if (state.ending)
8138
- writeAfterEnd(this, cb2);
8139
- else if (isBuf || validChunk(this, state, chunk, cb2)) {
8138
+ writeAfterEnd(this, cb);
8139
+ else if (isBuf || validChunk(this, state, chunk, cb)) {
8140
8140
  state.pendingcb++;
8141
- ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb2);
8141
+ ret = writeOrBuffer(this, state, isBuf, chunk, encoding, cb);
8142
8142
  }
8143
8143
  return ret;
8144
8144
  };
@@ -8185,7 +8185,7 @@ var require_stream_writable = __commonJS({
8185
8185
  return this._writableState.highWaterMark;
8186
8186
  }
8187
8187
  });
8188
- function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb2) {
8188
+ function writeOrBuffer(stream, state, isBuf, chunk, encoding, cb) {
8189
8189
  if (!isBuf) {
8190
8190
  var newChunk = decodeChunk(state, chunk, encoding);
8191
8191
  if (chunk !== newChunk) {
@@ -8205,7 +8205,7 @@ var require_stream_writable = __commonJS({
8205
8205
  chunk,
8206
8206
  encoding,
8207
8207
  isBuf,
8208
- callback: cb2,
8208
+ callback: cb,
8209
8209
  next: null
8210
8210
  };
8211
8211
  if (last) {
@@ -8215,13 +8215,13 @@ var require_stream_writable = __commonJS({
8215
8215
  }
8216
8216
  state.bufferedRequestCount += 1;
8217
8217
  } else {
8218
- doWrite(stream, state, false, len, chunk, encoding, cb2);
8218
+ doWrite(stream, state, false, len, chunk, encoding, cb);
8219
8219
  }
8220
8220
  return ret;
8221
8221
  }
8222
- function doWrite(stream, state, writev, len, chunk, encoding, cb2) {
8222
+ function doWrite(stream, state, writev, len, chunk, encoding, cb) {
8223
8223
  state.writelen = len;
8224
- state.writecb = cb2;
8224
+ state.writecb = cb;
8225
8225
  state.writing = true;
8226
8226
  state.sync = true;
8227
8227
  if (state.destroyed)
@@ -8232,15 +8232,15 @@ var require_stream_writable = __commonJS({
8232
8232
  stream._write(chunk, encoding, state.onwrite);
8233
8233
  state.sync = false;
8234
8234
  }
8235
- function onwriteError(stream, state, sync, er2, cb2) {
8235
+ function onwriteError(stream, state, sync, er2, cb) {
8236
8236
  --state.pendingcb;
8237
8237
  if (sync) {
8238
- process.nextTick(cb2, er2);
8238
+ process.nextTick(cb, er2);
8239
8239
  process.nextTick(finishMaybe, stream, state);
8240
8240
  stream._writableState.errorEmitted = true;
8241
8241
  errorOrDestroy(stream, er2);
8242
8242
  } else {
8243
- cb2(er2);
8243
+ cb(er2);
8244
8244
  stream._writableState.errorEmitted = true;
8245
8245
  errorOrDestroy(stream, er2);
8246
8246
  finishMaybe(stream, state);
@@ -8255,29 +8255,29 @@ var require_stream_writable = __commonJS({
8255
8255
  function onwrite(stream, er2) {
8256
8256
  var state = stream._writableState;
8257
8257
  var sync = state.sync;
8258
- var cb2 = state.writecb;
8259
- if (typeof cb2 !== "function")
8258
+ var cb = state.writecb;
8259
+ if (typeof cb !== "function")
8260
8260
  throw new ERR_MULTIPLE_CALLBACK();
8261
8261
  onwriteStateUpdate(state);
8262
8262
  if (er2)
8263
- onwriteError(stream, state, sync, er2, cb2);
8263
+ onwriteError(stream, state, sync, er2, cb);
8264
8264
  else {
8265
8265
  var finished = needFinish(state) || stream.destroyed;
8266
8266
  if (!finished && !state.corked && !state.bufferProcessing && state.bufferedRequest) {
8267
8267
  clearBuffer(stream, state);
8268
8268
  }
8269
8269
  if (sync) {
8270
- process.nextTick(afterWrite, stream, state, finished, cb2);
8270
+ process.nextTick(afterWrite, stream, state, finished, cb);
8271
8271
  } else {
8272
- afterWrite(stream, state, finished, cb2);
8272
+ afterWrite(stream, state, finished, cb);
8273
8273
  }
8274
8274
  }
8275
8275
  }
8276
- function afterWrite(stream, state, finished, cb2) {
8276
+ function afterWrite(stream, state, finished, cb) {
8277
8277
  if (!finished)
8278
8278
  onwriteDrain(stream, state);
8279
8279
  state.pendingcb--;
8280
- cb2();
8280
+ cb();
8281
8281
  finishMaybe(stream, state);
8282
8282
  }
8283
8283
  function onwriteDrain(stream, state) {
@@ -8318,9 +8318,9 @@ var require_stream_writable = __commonJS({
8318
8318
  while (entry) {
8319
8319
  var chunk = entry.chunk;
8320
8320
  var encoding = entry.encoding;
8321
- var cb2 = entry.callback;
8321
+ var cb = entry.callback;
8322
8322
  var len = state.objectMode ? 1 : chunk.length;
8323
- doWrite(stream, state, false, len, chunk, encoding, cb2);
8323
+ doWrite(stream, state, false, len, chunk, encoding, cb);
8324
8324
  entry = entry.next;
8325
8325
  state.bufferedRequestCount--;
8326
8326
  if (state.writing) {
@@ -8333,18 +8333,18 @@ var require_stream_writable = __commonJS({
8333
8333
  state.bufferedRequest = entry;
8334
8334
  state.bufferProcessing = false;
8335
8335
  }
8336
- Writable.prototype._write = function(chunk, encoding, cb2) {
8337
- cb2(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
8336
+ Writable.prototype._write = function(chunk, encoding, cb) {
8337
+ cb(new ERR_METHOD_NOT_IMPLEMENTED("_write()"));
8338
8338
  };
8339
8339
  Writable.prototype._writev = null;
8340
- Writable.prototype.end = function(chunk, encoding, cb2) {
8340
+ Writable.prototype.end = function(chunk, encoding, cb) {
8341
8341
  var state = this._writableState;
8342
8342
  if (typeof chunk === "function") {
8343
- cb2 = chunk;
8343
+ cb = chunk;
8344
8344
  chunk = null;
8345
8345
  encoding = null;
8346
8346
  } else if (typeof encoding === "function") {
8347
- cb2 = encoding;
8347
+ cb = encoding;
8348
8348
  encoding = null;
8349
8349
  }
8350
8350
  if (chunk !== null && chunk !== void 0)
@@ -8354,7 +8354,7 @@ var require_stream_writable = __commonJS({
8354
8354
  this.uncork();
8355
8355
  }
8356
8356
  if (!state.ending)
8357
- endWritable(this, state, cb2);
8357
+ endWritable(this, state, cb);
8358
8358
  return this;
8359
8359
  };
8360
8360
  Object.defineProperty(Writable.prototype, "writableLength", {
@@ -8409,14 +8409,14 @@ var require_stream_writable = __commonJS({
8409
8409
  }
8410
8410
  return need;
8411
8411
  }
8412
- function endWritable(stream, state, cb2) {
8412
+ function endWritable(stream, state, cb) {
8413
8413
  state.ending = true;
8414
8414
  finishMaybe(stream, state);
8415
- if (cb2) {
8415
+ if (cb) {
8416
8416
  if (state.finished)
8417
- process.nextTick(cb2);
8417
+ process.nextTick(cb);
8418
8418
  else
8419
- stream.once("finish", cb2);
8419
+ stream.once("finish", cb);
8420
8420
  }
8421
8421
  state.ended = true;
8422
8422
  stream.writable = false;
@@ -8425,9 +8425,9 @@ var require_stream_writable = __commonJS({
8425
8425
  var entry = corkReq.entry;
8426
8426
  corkReq.entry = null;
8427
8427
  while (entry) {
8428
- var cb2 = entry.callback;
8428
+ var cb = entry.callback;
8429
8429
  state.pendingcb--;
8430
- cb2(err);
8430
+ cb(err);
8431
8431
  entry = entry.next;
8432
8432
  }
8433
8433
  state.corkedRequestsFree.next = corkReq;
@@ -8452,8 +8452,8 @@ var require_stream_writable = __commonJS({
8452
8452
  });
8453
8453
  Writable.prototype.destroy = destroyImpl.destroy;
8454
8454
  Writable.prototype._undestroy = destroyImpl.undestroy;
8455
- Writable.prototype._destroy = function(err, cb2) {
8456
- cb2(err);
8455
+ Writable.prototype._destroy = function(err, cb) {
8456
+ cb(err);
8457
8457
  };
8458
8458
  }
8459
8459
  });
@@ -9179,11 +9179,11 @@ var require_from = __commonJS({
9179
9179
  Promise.resolve(value).then(_next, _throw);
9180
9180
  }
9181
9181
  }
9182
- function _asyncToGenerator(fn2) {
9182
+ function _asyncToGenerator(fn) {
9183
9183
  return function() {
9184
9184
  var self2 = this, args = arguments;
9185
9185
  return new Promise(function(resolve, reject) {
9186
- var gen = fn2.apply(self2, args);
9186
+ var gen = fn.apply(self2, args);
9187
9187
  function _next(value) {
9188
9188
  asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
9189
9189
  }
@@ -9294,7 +9294,7 @@ var require_stream_readable = __commonJS({
9294
9294
  module2.exports = Readable;
9295
9295
  var Duplex;
9296
9296
  Readable.ReadableState = ReadableState;
9297
- var EE2 = require("events").EventEmitter;
9297
+ var EE = require("events").EventEmitter;
9298
9298
  var EElistenerCount = function EElistenerCount2(emitter, type) {
9299
9299
  return emitter.listeners(type).length;
9300
9300
  };
@@ -9331,15 +9331,15 @@ var require_stream_readable = __commonJS({
9331
9331
  require_inherits()(Readable, Stream);
9332
9332
  var errorOrDestroy = destroyImpl.errorOrDestroy;
9333
9333
  var kProxyEvents = ["error", "close", "destroy", "pause", "resume"];
9334
- function prependListener(emitter, event, fn2) {
9334
+ function prependListener(emitter, event, fn) {
9335
9335
  if (typeof emitter.prependListener === "function")
9336
- return emitter.prependListener(event, fn2);
9336
+ return emitter.prependListener(event, fn);
9337
9337
  if (!emitter._events || !emitter._events[event])
9338
- emitter.on(event, fn2);
9338
+ emitter.on(event, fn);
9339
9339
  else if (Array.isArray(emitter._events[event]))
9340
- emitter._events[event].unshift(fn2);
9340
+ emitter._events[event].unshift(fn);
9341
9341
  else
9342
- emitter._events[event] = [fn2, emitter._events[event]];
9342
+ emitter._events[event] = [fn, emitter._events[event]];
9343
9343
  }
9344
9344
  function ReadableState(options, stream, isDuplex) {
9345
9345
  Duplex = Duplex || require_stream_duplex();
@@ -9414,8 +9414,8 @@ var require_stream_readable = __commonJS({
9414
9414
  });
9415
9415
  Readable.prototype.destroy = destroyImpl.destroy;
9416
9416
  Readable.prototype._undestroy = destroyImpl.undestroy;
9417
- Readable.prototype._destroy = function(err, cb2) {
9418
- cb2(err);
9417
+ Readable.prototype._destroy = function(err, cb) {
9418
+ cb(err);
9419
9419
  };
9420
9420
  Readable.prototype.push = function(chunk, encoding) {
9421
9421
  var state = this._readableState;
@@ -9833,8 +9833,8 @@ var require_stream_readable = __commonJS({
9833
9833
  dest.emit("unpipe", this, unpipeInfo);
9834
9834
  return this;
9835
9835
  };
9836
- Readable.prototype.on = function(ev, fn2) {
9837
- var res = Stream.prototype.on.call(this, ev, fn2);
9836
+ Readable.prototype.on = function(ev, fn) {
9837
+ var res = Stream.prototype.on.call(this, ev, fn);
9838
9838
  var state = this._readableState;
9839
9839
  if (ev === "data") {
9840
9840
  state.readableListening = this.listenerCount("readable") > 0;
@@ -9856,8 +9856,8 @@ var require_stream_readable = __commonJS({
9856
9856
  return res;
9857
9857
  };
9858
9858
  Readable.prototype.addListener = Readable.prototype.on;
9859
- Readable.prototype.removeListener = function(ev, fn2) {
9860
- var res = Stream.prototype.removeListener.call(this, ev, fn2);
9859
+ Readable.prototype.removeListener = function(ev, fn) {
9860
+ var res = Stream.prototype.removeListener.call(this, ev, fn);
9861
9861
  if (ev === "readable") {
9862
9862
  process.nextTick(updateReadableListening, this);
9863
9863
  }
@@ -10098,15 +10098,15 @@ var require_stream_transform = __commonJS({
10098
10098
  function afterTransform(er2, data) {
10099
10099
  var ts = this._transformState;
10100
10100
  ts.transforming = false;
10101
- var cb2 = ts.writecb;
10102
- if (cb2 === null) {
10101
+ var cb = ts.writecb;
10102
+ if (cb === null) {
10103
10103
  return this.emit("error", new ERR_MULTIPLE_CALLBACK());
10104
10104
  }
10105
10105
  ts.writechunk = null;
10106
10106
  ts.writecb = null;
10107
10107
  if (data != null)
10108
10108
  this.push(data);
10109
- cb2(er2);
10109
+ cb(er2);
10110
10110
  var rs = this._readableState;
10111
10111
  rs.reading = false;
10112
10112
  if (rs.needReadable || rs.length < rs.highWaterMark) {
@@ -10149,12 +10149,12 @@ var require_stream_transform = __commonJS({
10149
10149
  this._transformState.needTransform = false;
10150
10150
  return Duplex.prototype.push.call(this, chunk, encoding);
10151
10151
  };
10152
- Transform.prototype._transform = function(chunk, encoding, cb2) {
10153
- cb2(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
10152
+ Transform.prototype._transform = function(chunk, encoding, cb) {
10153
+ cb(new ERR_METHOD_NOT_IMPLEMENTED("_transform()"));
10154
10154
  };
10155
- Transform.prototype._write = function(chunk, encoding, cb2) {
10155
+ Transform.prototype._write = function(chunk, encoding, cb) {
10156
10156
  var ts = this._transformState;
10157
- ts.writecb = cb2;
10157
+ ts.writecb = cb;
10158
10158
  ts.writechunk = chunk;
10159
10159
  ts.writeencoding = encoding;
10160
10160
  if (!ts.transforming) {
@@ -10172,9 +10172,9 @@ var require_stream_transform = __commonJS({
10172
10172
  ts.needTransform = true;
10173
10173
  }
10174
10174
  };
10175
- Transform.prototype._destroy = function(err, cb2) {
10175
+ Transform.prototype._destroy = function(err, cb) {
10176
10176
  Duplex.prototype._destroy.call(this, err, function(err2) {
10177
- cb2(err2);
10177
+ cb(err2);
10178
10178
  });
10179
10179
  };
10180
10180
  function done(stream, er2, data) {
@@ -10203,8 +10203,8 @@ var require_stream_passthrough = __commonJS({
10203
10203
  return new PassThrough(options);
10204
10204
  Transform.call(this, options);
10205
10205
  }
10206
- PassThrough.prototype._transform = function(chunk, encoding, cb2) {
10207
- cb2(null, chunk);
10206
+ PassThrough.prototype._transform = function(chunk, encoding, cb) {
10207
+ cb(null, chunk);
10208
10208
  };
10209
10209
  }
10210
10210
  });
@@ -10264,8 +10264,8 @@ var require_pipeline = __commonJS({
10264
10264
  callback(err || new ERR_STREAM_DESTROYED("pipe"));
10265
10265
  };
10266
10266
  }
10267
- function call(fn2) {
10268
- fn2();
10267
+ function call(fn) {
10268
+ fn();
10269
10269
  }
10270
10270
  function pipe(from, to) {
10271
10271
  return from.pipe(to);
@@ -10690,10 +10690,10 @@ var require_bl = __commonJS({
10690
10690
  this._callback = null;
10691
10691
  }
10692
10692
  };
10693
- BufferListStream2.prototype._destroy = function _destroy(err, cb2) {
10693
+ BufferListStream2.prototype._destroy = function _destroy(err, cb) {
10694
10694
  this._bufs.length = 0;
10695
10695
  this.length = 0;
10696
- cb2(err);
10696
+ cb(err);
10697
10697
  };
10698
10698
  BufferListStream2.prototype._isBufferList = function _isBufferList(b) {
10699
10699
  return b instanceof BufferListStream2 || b instanceof BufferList || BufferListStream2.isBufferList(b);
@@ -11127,13 +11127,13 @@ function determineBranch(decodeTree, current, nodeIdx, char) {
11127
11127
  const value = char - jumpOffset;
11128
11128
  return value < 0 || value >= branchCount ? -1 : decodeTree[nodeIdx + value] - 1;
11129
11129
  }
11130
- let lo2 = nodeIdx;
11131
- let hi = lo2 + branchCount - 1;
11132
- while (lo2 <= hi) {
11133
- const mid = lo2 + hi >>> 1;
11130
+ let lo = nodeIdx;
11131
+ let hi = lo + branchCount - 1;
11132
+ while (lo <= hi) {
11133
+ const mid = lo + hi >>> 1;
11134
11134
  const midVal = decodeTree[mid];
11135
11135
  if (midVal < char) {
11136
- lo2 = mid + 1;
11136
+ lo = mid + 1;
11137
11137
  } else if (midVal > char) {
11138
11138
  hi = mid - 1;
11139
11139
  } else {
@@ -12039,7 +12039,7 @@ var htmlIntegrationElements = /* @__PURE__ */ new Set([
12039
12039
  var reNameEnd = /\s|\//;
12040
12040
  var Parser = class {
12041
12041
  constructor(cbs, options = {}) {
12042
- var _a2, _b, _c, _d, _e2;
12042
+ var _a2, _b2, _c, _d, _e2;
12043
12043
  this.options = options;
12044
12044
  this.startIndex = 0;
12045
12045
  this.endIndex = 0;
@@ -12056,25 +12056,25 @@ var Parser = class {
12056
12056
  this.ended = false;
12057
12057
  this.cbs = cbs !== null && cbs !== void 0 ? cbs : {};
12058
12058
  this.lowerCaseTagNames = (_a2 = options.lowerCaseTags) !== null && _a2 !== void 0 ? _a2 : !options.xmlMode;
12059
- this.lowerCaseAttributeNames = (_b = options.lowerCaseAttributeNames) !== null && _b !== void 0 ? _b : !options.xmlMode;
12059
+ this.lowerCaseAttributeNames = (_b2 = options.lowerCaseAttributeNames) !== null && _b2 !== void 0 ? _b2 : !options.xmlMode;
12060
12060
  this.tokenizer = new ((_c = options.Tokenizer) !== null && _c !== void 0 ? _c : Tokenizer)(this.options, this);
12061
12061
  (_e2 = (_d = this.cbs).onparserinit) === null || _e2 === void 0 ? void 0 : _e2.call(_d, this);
12062
12062
  }
12063
12063
  // Tokenizer event handlers
12064
12064
  /** @internal */
12065
12065
  ontext(start, endIndex) {
12066
- var _a2, _b;
12066
+ var _a2, _b2;
12067
12067
  const data = this.getSlice(start, endIndex);
12068
12068
  this.endIndex = endIndex - 1;
12069
- (_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, data);
12069
+ (_b2 = (_a2 = this.cbs).ontext) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, data);
12070
12070
  this.startIndex = endIndex;
12071
12071
  }
12072
12072
  /** @internal */
12073
12073
  ontextentity(cp) {
12074
- var _a2, _b;
12074
+ var _a2, _b2;
12075
12075
  const index = this.tokenizer.getSectionStart();
12076
12076
  this.endIndex = index - 1;
12077
- (_b = (_a2 = this.cbs).ontext) === null || _b === void 0 ? void 0 : _b.call(_a2, fromCodePoint(cp));
12077
+ (_b2 = (_a2 = this.cbs).ontext) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, fromCodePoint(cp));
12078
12078
  this.startIndex = index;
12079
12079
  }
12080
12080
  isVoidElement(name) {
@@ -12090,14 +12090,14 @@ var Parser = class {
12090
12090
  this.emitOpenTag(name);
12091
12091
  }
12092
12092
  emitOpenTag(name) {
12093
- var _a2, _b, _c, _d;
12093
+ var _a2, _b2, _c, _d;
12094
12094
  this.openTagStart = this.startIndex;
12095
12095
  this.tagname = name;
12096
12096
  const impliesClose = !this.options.xmlMode && openImpliesClose.get(name);
12097
12097
  if (impliesClose) {
12098
12098
  while (this.stack.length > 0 && impliesClose.has(this.stack[this.stack.length - 1])) {
12099
12099
  const element = this.stack.pop();
12100
- (_b = (_a2 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a2, element, true);
12100
+ (_b2 = (_a2 = this.cbs).onclosetag) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, element, true);
12101
12101
  }
12102
12102
  }
12103
12103
  if (!this.isVoidElement(name)) {
@@ -12113,10 +12113,10 @@ var Parser = class {
12113
12113
  this.attribs = {};
12114
12114
  }
12115
12115
  endOpenTag(isImplied) {
12116
- var _a2, _b;
12116
+ var _a2, _b2;
12117
12117
  this.startIndex = this.openTagStart;
12118
12118
  if (this.attribs) {
12119
- (_b = (_a2 = this.cbs).onopentag) === null || _b === void 0 ? void 0 : _b.call(_a2, this.tagname, this.attribs, isImplied);
12119
+ (_b2 = (_a2 = this.cbs).onopentag) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, this.tagname, this.attribs, isImplied);
12120
12120
  this.attribs = null;
12121
12121
  }
12122
12122
  if (this.cbs.onclosetag && this.isVoidElement(this.tagname)) {
@@ -12132,7 +12132,7 @@ var Parser = class {
12132
12132
  }
12133
12133
  /** @internal */
12134
12134
  onclosetag(start, endIndex) {
12135
- var _a2, _b, _c, _d, _e2, _f;
12135
+ var _a2, _b2, _c, _d, _e2, _f;
12136
12136
  this.endIndex = endIndex;
12137
12137
  let name = this.getSlice(start, endIndex);
12138
12138
  if (this.lowerCaseTagNames) {
@@ -12156,7 +12156,7 @@ var Parser = class {
12156
12156
  this.closeCurrentTag(true);
12157
12157
  }
12158
12158
  } else if (!this.options.xmlMode && name === "br") {
12159
- (_b = (_a2 = this.cbs).onopentagname) === null || _b === void 0 ? void 0 : _b.call(_a2, "br");
12159
+ (_b2 = (_a2 = this.cbs).onopentagname) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, "br");
12160
12160
  (_d = (_c = this.cbs).onopentag) === null || _d === void 0 ? void 0 : _d.call(_c, "br", {}, true);
12161
12161
  (_f = (_e2 = this.cbs).onclosetag) === null || _f === void 0 ? void 0 : _f.call(_e2, "br", false);
12162
12162
  }
@@ -12173,11 +12173,11 @@ var Parser = class {
12173
12173
  }
12174
12174
  }
12175
12175
  closeCurrentTag(isOpenImplied) {
12176
- var _a2, _b;
12176
+ var _a2, _b2;
12177
12177
  const name = this.tagname;
12178
12178
  this.endOpenTag(isOpenImplied);
12179
12179
  if (this.stack[this.stack.length - 1] === name) {
12180
- (_b = (_a2 = this.cbs).onclosetag) === null || _b === void 0 ? void 0 : _b.call(_a2, name, !isOpenImplied);
12180
+ (_b2 = (_a2 = this.cbs).onclosetag) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, name, !isOpenImplied);
12181
12181
  this.stack.pop();
12182
12182
  }
12183
12183
  }
@@ -12197,9 +12197,9 @@ var Parser = class {
12197
12197
  }
12198
12198
  /** @internal */
12199
12199
  onattribend(quote, endIndex) {
12200
- var _a2, _b;
12200
+ var _a2, _b2;
12201
12201
  this.endIndex = endIndex;
12202
- (_b = (_a2 = this.cbs).onattribute) === null || _b === void 0 ? void 0 : _b.call(_a2, this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null);
12202
+ (_b2 = (_a2 = this.cbs).onattribute) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, this.attribname, this.attribvalue, quote === QuoteType.Double ? '"' : quote === QuoteType.Single ? "'" : quote === QuoteType.NoValue ? void 0 : null);
12203
12203
  if (this.attribs && !Object.prototype.hasOwnProperty.call(this.attribs, this.attribname)) {
12204
12204
  this.attribs[this.attribname] = this.attribvalue;
12205
12205
  }
@@ -12235,19 +12235,19 @@ var Parser = class {
12235
12235
  }
12236
12236
  /** @internal */
12237
12237
  oncomment(start, endIndex, offset) {
12238
- var _a2, _b, _c, _d;
12238
+ var _a2, _b2, _c, _d;
12239
12239
  this.endIndex = endIndex;
12240
- (_b = (_a2 = this.cbs).oncomment) === null || _b === void 0 ? void 0 : _b.call(_a2, this.getSlice(start, endIndex - offset));
12240
+ (_b2 = (_a2 = this.cbs).oncomment) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, this.getSlice(start, endIndex - offset));
12241
12241
  (_d = (_c = this.cbs).oncommentend) === null || _d === void 0 ? void 0 : _d.call(_c);
12242
12242
  this.startIndex = endIndex + 1;
12243
12243
  }
12244
12244
  /** @internal */
12245
12245
  oncdata(start, endIndex, offset) {
12246
- var _a2, _b, _c, _d, _e2, _f, _g, _h, _j, _k;
12246
+ var _a2, _b2, _c, _d, _e2, _f, _g, _h, _j, _k;
12247
12247
  this.endIndex = endIndex;
12248
12248
  const value = this.getSlice(start, endIndex - offset);
12249
12249
  if (this.options.xmlMode || this.options.recognizeCDATA) {
12250
- (_b = (_a2 = this.cbs).oncdatastart) === null || _b === void 0 ? void 0 : _b.call(_a2);
12250
+ (_b2 = (_a2 = this.cbs).oncdatastart) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
12251
12251
  (_d = (_c = this.cbs).ontext) === null || _d === void 0 ? void 0 : _d.call(_c, value);
12252
12252
  (_f = (_e2 = this.cbs).oncdataend) === null || _f === void 0 ? void 0 : _f.call(_e2);
12253
12253
  } else {
@@ -12258,20 +12258,20 @@ var Parser = class {
12258
12258
  }
12259
12259
  /** @internal */
12260
12260
  onend() {
12261
- var _a2, _b;
12261
+ var _a2, _b2;
12262
12262
  if (this.cbs.onclosetag) {
12263
12263
  this.endIndex = this.startIndex;
12264
12264
  for (let index = this.stack.length; index > 0; this.cbs.onclosetag(this.stack[--index], true))
12265
12265
  ;
12266
12266
  }
12267
- (_b = (_a2 = this.cbs).onend) === null || _b === void 0 ? void 0 : _b.call(_a2);
12267
+ (_b2 = (_a2 = this.cbs).onend) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
12268
12268
  }
12269
12269
  /**
12270
12270
  * Resets the parser to a blank state, ready to parse a new HTML document
12271
12271
  */
12272
12272
  reset() {
12273
- var _a2, _b, _c, _d;
12274
- (_b = (_a2 = this.cbs).onreset) === null || _b === void 0 ? void 0 : _b.call(_a2);
12273
+ var _a2, _b2, _c, _d;
12274
+ (_b2 = (_a2 = this.cbs).onreset) === null || _b2 === void 0 ? void 0 : _b2.call(_a2);
12275
12275
  this.tokenizer.reset();
12276
12276
  this.tagname = "";
12277
12277
  this.attribname = "";
@@ -12317,9 +12317,9 @@ var Parser = class {
12317
12317
  * @param chunk Chunk to parse.
12318
12318
  */
12319
12319
  write(chunk) {
12320
- var _a2, _b;
12320
+ var _a2, _b2;
12321
12321
  if (this.ended) {
12322
- (_b = (_a2 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a2, new Error(".write() after done!"));
12322
+ (_b2 = (_a2 = this.cbs).onerror) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, new Error(".write() after done!"));
12323
12323
  return;
12324
12324
  }
12325
12325
  this.buffers.push(chunk);
@@ -12334,9 +12334,9 @@ var Parser = class {
12334
12334
  * @param chunk Optional final chunk to parse.
12335
12335
  */
12336
12336
  end(chunk) {
12337
- var _a2, _b;
12337
+ var _a2, _b2;
12338
12338
  if (this.ended) {
12339
- (_b = (_a2 = this.cbs).onerror) === null || _b === void 0 ? void 0 : _b.call(_a2, new Error(".end() after done!"));
12339
+ (_b2 = (_a2 = this.cbs).onerror) === null || _b2 === void 0 ? void 0 : _b2.call(_a2, new Error(".end() after done!"));
12340
12340
  return;
12341
12341
  }
12342
12342
  if (chunk)
@@ -12593,12 +12593,12 @@ var Element = class extends NodeWithChildren {
12593
12593
  }
12594
12594
  get attributes() {
12595
12595
  return Object.keys(this.attribs).map((name) => {
12596
- var _a2, _b;
12596
+ var _a2, _b2;
12597
12597
  return {
12598
12598
  name,
12599
12599
  value: this.attribs[name],
12600
12600
  namespace: (_a2 = this["x-attribsNamespace"]) === null || _a2 === void 0 ? void 0 : _a2[name],
12601
- prefix: (_b = this["x-attribsPrefix"]) === null || _b === void 0 ? void 0 : _b[name]
12601
+ prefix: (_b2 = this["x-attribsPrefix"]) === null || _b2 === void 0 ? void 0 : _b2[name]
12602
12602
  };
12603
12603
  });
12604
12604
  }
@@ -13072,10 +13072,10 @@ function formatAttributes(attributes, opts) {
13072
13072
  return;
13073
13073
  const encode = ((_a2 = opts.encodeEntities) !== null && _a2 !== void 0 ? _a2 : opts.decodeEntities) === false ? replaceQuotes : opts.xmlMode || opts.encodeEntities !== "utf8" ? encodeXML : escapeAttribute;
13074
13074
  return Object.keys(attributes).map((key2) => {
13075
- var _a3, _b;
13075
+ var _a3, _b2;
13076
13076
  const value = (_a3 = attributes[key2]) !== null && _a3 !== void 0 ? _a3 : "";
13077
13077
  if (opts.xmlMode === "foreign") {
13078
- key2 = (_b = attributeNames.get(key2)) !== null && _b !== void 0 ? _b : key2;
13078
+ key2 = (_b2 = attributeNames.get(key2)) !== null && _b2 !== void 0 ? _b2 : key2;
13079
13079
  }
13080
13080
  if (!opts.emptyAttrs && !opts.xmlMode && value === "") {
13081
13081
  return key2;
@@ -13633,8 +13633,8 @@ function getAtomFeed(feedRoot) {
13633
13633
  return feed;
13634
13634
  }
13635
13635
  function getRssFeed(feedRoot) {
13636
- var _a2, _b;
13637
- const childs = (_b = (_a2 = getOneElement("channel", feedRoot.children)) === null || _a2 === void 0 ? void 0 : _a2.children) !== null && _b !== void 0 ? _b : [];
13636
+ var _a2, _b2;
13637
+ const childs = (_b2 = (_a2 = getOneElement("channel", feedRoot.children)) === null || _a2 === void 0 ? void 0 : _a2.children) !== null && _b2 !== void 0 ? _b2 : [];
13638
13638
  const feed = {
13639
13639
  type: feedRoot.name.substr(0, 3),
13640
13640
  id: "",
@@ -13735,11 +13735,11 @@ var import_promises4 = __toESM(require("fs/promises"), 1);
13735
13735
  var import_promises5 = __toESM(require("fs/promises"), 1);
13736
13736
  var import_path8 = __toESM(require("path"), 1);
13737
13737
  var import_process5 = __toESM(require("process"), 1);
13738
- function Gr(e, t, r = { compare: "same", result: "value" }) {
13738
+ function Kr(e, t, r = { compare: "same", result: "value" }) {
13739
13739
  let n = e.filter((a) => t.includes(a)), o = e.filter((a) => !t.includes(a)).concat(t.filter((a) => !e.includes(a))), { compare: i = "same", result: s = "value" } = r;
13740
- return i === "same" ? s === "value" ? n : n.map((a) => e.indexOf(a)) : s === "value" ? zt(o) : o.map((a) => e.indexOf(a)).filter((a) => a >= 0);
13740
+ return i === "same" ? s === "value" ? n : n.map((a) => e.indexOf(a)) : s === "value" ? Ht(o) : o.map((a) => e.indexOf(a)).filter((a) => a >= 0);
13741
13741
  }
13742
- function zt(e) {
13742
+ function Ht(e) {
13743
13743
  if (!e.length)
13744
13744
  return e;
13745
13745
  let t = Math.floor(e.length / 2), r = e.slice(0, t), n = e.slice(t), o = [];
@@ -13750,21 +13750,21 @@ function zt(e) {
13750
13750
  function C(e) {
13751
13751
  return typeof e > "u";
13752
13752
  }
13753
- function tn(e, t) {
13753
+ function nn(e, t) {
13754
13754
  for (let r = 0; r < e.length; r++) {
13755
13755
  let n = t(e[r], r, e);
13756
13756
  if (!C(n))
13757
13757
  return n;
13758
13758
  }
13759
13759
  }
13760
- function nn(e, t = 2) {
13760
+ function sn(e, t = 2) {
13761
13761
  return (e.reduce((r, n) => r + n) / e.length).toFixed(t);
13762
13762
  }
13763
13763
  var M = Array.isArray;
13764
13764
  function W(e) {
13765
13765
  return typeof e < "u";
13766
13766
  }
13767
- function fn(array, key) {
13767
+ function ln(array, key) {
13768
13768
  let reg = /\/[\w._ $]+\/[gims]*/;
13769
13769
  return array.filter((e) => M(key) ? key.some((t) => findItem(e, t)) : findItem(e, key));
13770
13770
  function findItem(item, key) {
@@ -13772,7 +13772,7 @@ function fn(array, key) {
13772
13772
  return C(item[_key]) ? false : W(_value) ? reg.test(_value) ? new RegExp(eval(_value)).test(item[_key]) : _value === item[_key] : /.*/.test(item[key]);
13773
13773
  }
13774
13774
  }
13775
- function dn(e, t) {
13775
+ function xn(e, t) {
13776
13776
  let r = /* @__PURE__ */ new Map();
13777
13777
  return e.forEach((n, o) => r.set(n[t], o)), new be(e, r, t);
13778
13778
  }
@@ -13832,12 +13832,12 @@ function D(e) {
13832
13832
  return typeof e == "function";
13833
13833
  }
13834
13834
  var L = Object.prototype.toString;
13835
- var wn = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm;
13836
- var bn = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm;
13837
- var Mn = /\bexport\s+(?<declaration>(async function|function|let|const|var|class))\s+(?<name>[\w$_]+)/g;
13838
- var En = /\bexport\s+{(?<exports>[^}]+)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13839
- var In = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13840
- var vn = /\bexport\s+default\s+/g;
13835
+ var Mn = /(?<=\s|^|;)import\s*(["'\s]*(?<imports>[\w*${}\n\r\t, /]+)from\s*)?["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][\s;]*/gm;
13836
+ var En = /import\s*\((?<expression>(?:[^)(]+|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gm;
13837
+ var In = /\bexport\s+(?<declaration>(async function|function|let|const|var|class))\s+(?<name>[\w$_]+)/g;
13838
+ var vn = /\bexport\s+{(?<exports>[^}]+)}(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13839
+ var Tn = /\bexport\s*(\*)(\s*as\s+(?<name>[\w$_]+)\s+)?\s*(\s*from\s*["']\s*(?<specifier>(?<="\s*)[^"]*[^"\s](?=\s*")|(?<='\s*)[^']*[^'\s](?=\s*'))\s*["'][^\n]*)?/g;
13840
+ var Cn = /\bexport\s+default\s+/g;
13841
13841
  function T(e) {
13842
13842
  return L.call(e) === "[object Object]";
13843
13843
  }
@@ -13853,7 +13853,7 @@ function ee(e) {
13853
13853
  function Pe(e) {
13854
13854
  return Number.isNaN(e);
13855
13855
  }
13856
- function F(e) {
13856
+ function $(e) {
13857
13857
  return e === null;
13858
13858
  }
13859
13859
  function Fe(e) {
@@ -13880,19 +13880,19 @@ function Ie(e) {
13880
13880
  function V(e, t) {
13881
13881
  if (t = t.toLocaleLowerCase(), !t)
13882
13882
  throw new Error("type is required");
13883
- let r = { str: g, s: g, string: g, fn: D, f: D, function: D, object: T, o: T, array: M, a: M, set: Ne, map: Me, m: Me, reg: ee, r: ee, b: B, boolean: B, n: j, number: j, u: C, undefined: C, null: F, symbol: Fe, nan: Pe, wm: Ee, ws: Ie, promise: $e, weakmap: Ee, weakset: Ie, date: ke };
13883
+ let r = { str: g, s: g, string: g, fn: D, f: D, function: D, object: T, o: T, array: M, a: M, set: Ne, map: Me, m: Me, reg: ee, r: ee, b: B, boolean: B, n: j, number: j, u: C, undefined: C, null: $, symbol: Fe, nan: Pe, wm: Ee, ws: Ie, promise: $e, weakmap: Ee, weakset: Ie, date: ke };
13884
13884
  return t.split("|").some((n) => {
13885
13885
  var o;
13886
13886
  return (o = r[n.trim()]) == null ? void 0 : o.call(r, e);
13887
13887
  });
13888
13888
  }
13889
- function uo(e, t) {
13889
+ function po(e, t) {
13890
13890
  return V(t, "s|n") && (t = [`${t}`]), t.reduce((r, n) => {
13891
13891
  let o = false;
13892
13892
  return n[0] === "-" && (o = true, n = n.slice(1)), r.sort((i, s) => n !== "1" && s[n] === i[n] ? 0 : o ? n === "1" ? s > i ? 1 : -1 : s[n] > i[n] ? 1 : -1 : n === "1" ? i > s ? 1 : -1 : s[n] > i[n] ? -1 : 1);
13893
13893
  }, e);
13894
13894
  }
13895
- function lo(e, t, r) {
13895
+ function ho(e, t, r) {
13896
13896
  if (!t)
13897
13897
  return e;
13898
13898
  let n = [], o, i = r ? r.split(".") : void 0;
@@ -13906,8 +13906,8 @@ function lo(e, t, r) {
13906
13906
  return a ? a.reduce((u, m) => u == null ? void 0 : u[m], c) : c;
13907
13907
  }
13908
13908
  }
13909
- function xo(e) {
13910
- return e.reduce((t, r) => ((V(r, "o|a") && !Ht(t, r) || !t.includes(r)) && t.push(r), t), []);
13909
+ function wo(e) {
13910
+ return e.reduce((t, r) => ((V(r, "o|a") && !Ut(t, r) || !t.includes(r)) && t.push(r), t), []);
13911
13911
  }
13912
13912
  function ze(e, t) {
13913
13913
  if (Object.keys(e).length !== Object.keys(t).length)
@@ -13917,10 +13917,10 @@ function ze(e, t) {
13917
13917
  return false;
13918
13918
  return true;
13919
13919
  }
13920
- function Ht(e, t) {
13920
+ function Ut(e, t) {
13921
13921
  return e.some((r) => V(r, "o|a") && ze(t, r));
13922
13922
  }
13923
- function wo(e, t = 1) {
13923
+ function Mo(e, t = 1) {
13924
13924
  if (t < 1)
13925
13925
  return [];
13926
13926
  let r = [];
@@ -13928,19 +13928,19 @@ function wo(e, t = 1) {
13928
13928
  r.push(e.slice(n, n + t));
13929
13929
  return r;
13930
13930
  }
13931
- function Mo(e, t) {
13931
+ function Io(e, t) {
13932
13932
  return e.reduce((r, n) => {
13933
13933
  let o = t(n);
13934
13934
  return r[o] ? r[o]++ : r[o] = 1, r;
13935
13935
  }, {});
13936
13936
  }
13937
- function Ut(e, t = "children", r = false, n = []) {
13937
+ function Bt(e, t = "children", r = false, n = []) {
13938
13938
  return e = M(e) ? e : [e], e.forEach((o) => {
13939
13939
  let i = o[t];
13940
- r || n.push(o), i ? Ut(i, t, r, n) : r && n.push(o);
13940
+ r || n.push(o), i ? Bt(i, t, r, n) : r && n.push(o);
13941
13941
  }), n;
13942
13942
  }
13943
- function To(e) {
13943
+ function So(e) {
13944
13944
  return e.filter(Boolean);
13945
13945
  }
13946
13946
  var q = class {
@@ -13951,7 +13951,7 @@ var q = class {
13951
13951
  }
13952
13952
  };
13953
13953
  function v(e, t = false, r = document) {
13954
- if (!F(t))
13954
+ if (!$(t))
13955
13955
  return B(t) || (r = t, t = false), M(e) ? e.reduce((n, o) => {
13956
13956
  let i = t ? r.querySelectorAll(o) : r.querySelector(o);
13957
13957
  return i ? n = t ? [...n, ...i] : [...n, i] : n;
@@ -13970,10 +13970,10 @@ function w(...e) {
13970
13970
  }
13971
13971
  }
13972
13972
  }
13973
- function $(e, t, r) {
13974
- return w(e, t, (n, o) => n.insertBefore(o, F(r) ? null : r || n.firstChild));
13973
+ function k(e, t, r) {
13974
+ return w(e, t, (n, o) => n.insertBefore(o, $(r) ? null : r || n.firstChild));
13975
13975
  }
13976
- function k(e) {
13976
+ function z(e) {
13977
13977
  if (g(e) && (e = v(e) || e), g(e))
13978
13978
  throw new Error(`${e} is not a element`);
13979
13979
  let t = e.parentElement;
@@ -14050,13 +14050,13 @@ var He = class {
14050
14050
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
14051
14051
  }
14052
14052
  mount(t) {
14053
- return $(t, this.canvas, null), this.listen(), this;
14053
+ return k(t, this.canvas, null), this.listen(), this;
14054
14054
  }
14055
14055
  setColor(t) {
14056
14056
  this.color = t, this.ctx.strokeStyle = t;
14057
14057
  }
14058
14058
  unmount() {
14059
- k(this.canvas), this.stop.forEach((t) => t());
14059
+ z(this.canvas), this.stop.forEach((t) => t());
14060
14060
  }
14061
14061
  listen() {
14062
14062
  x(this.canvas, "mousedown", () => {
@@ -14186,7 +14186,7 @@ var Ue = class {
14186
14186
  this.originSrc = t, this.color = r, this.fontWeight = n, this.bgColor = o;
14187
14187
  }
14188
14188
  async repaint(t, r, n, o = "#fff") {
14189
- let i = k(this.canvas);
14189
+ let i = z(this.canvas);
14190
14190
  if (this.status = "pending", this.initOptions(t, r, n, o), !i)
14191
14191
  throw new Error("repaint error not found canvas container or has been removed");
14192
14192
  return Object.assign(this, await this.executor()).append(i);
@@ -14195,7 +14195,7 @@ var Ue = class {
14195
14195
  this.ctx.clearRect(0, 0, this.canvas.width, this.canvas.height);
14196
14196
  }
14197
14197
  append(t) {
14198
- return $(t, this.canvas), this;
14198
+ return k(t, this.canvas), this;
14199
14199
  }
14200
14200
  };
14201
14201
  var ie = class {
@@ -14251,7 +14251,7 @@ var ie = class {
14251
14251
  G(o, { callback: () => this.status = "success" });
14252
14252
  }
14253
14253
  repaint(t, r, n, o) {
14254
- let i = k(this.canvas);
14254
+ let i = z(this.canvas);
14255
14255
  if (!i)
14256
14256
  throw new Error("repaint error not found canvas container or has been removed");
14257
14257
  return this.status = "pending", this.originText !== t ? Object.assign(this, new ie(t, r, n, o)).append(i) : (this.fontSize = r, this.color = n, this.fontWeight = o, this.clearCanvas(), this.getCanvas(), this.append(i));
@@ -14261,10 +14261,10 @@ var ie = class {
14261
14261
  (t = this.ctx) == null || t.clearRect(0, 0, this.canvas.width, this.canvas.height);
14262
14262
  }
14263
14263
  append(t) {
14264
- return $(t, this.canvas), this;
14264
+ return k(t, this.canvas), this;
14265
14265
  }
14266
14266
  };
14267
- function Ci(e) {
14267
+ function Ai(e) {
14268
14268
  return new Promise((t, r) => {
14269
14269
  try {
14270
14270
  let n = new Image();
@@ -14277,7 +14277,7 @@ function Ci(e) {
14277
14277
  }
14278
14278
  });
14279
14279
  }
14280
- function Ai(e) {
14280
+ function Li(e) {
14281
14281
  let t = 0, r = {}, n = e[0].length, o = e.length, i = [], s = [];
14282
14282
  for (let u = 0; u < o; u++)
14283
14283
  for (let m = 0; m < n; m++)
@@ -14301,7 +14301,7 @@ function Ai(e) {
14301
14301
  function Be(e) {
14302
14302
  return e.replace(/-(\w)/g, (t, r) => r.toUpperCase());
14303
14303
  }
14304
- function Oi(e) {
14304
+ function ji(e) {
14305
14305
  if (e = (e || window.location.search).split("?")[1], !!e)
14306
14306
  return e.split("&").reduce((t, r) => {
14307
14307
  let [n, o] = r.split("=");
@@ -14311,29 +14311,29 @@ function Oi(e) {
14311
14311
  function se(e) {
14312
14312
  return e.replace(/([A-Z])/g, "-$1").toLowerCase();
14313
14313
  }
14314
- function Ni(e, t = 6) {
14314
+ function Fi(e, t = 6) {
14315
14315
  let r = 0;
14316
14316
  return e = `${e}`, e.match(/[a-z]/g) && r++, e.match(/[A-Z]/g) && r++, e.match(/[0-9]/g) && r++, e.match(/[^a-zA-Z0-9]/g) && r++, e.length < t && (r = 0), r;
14317
14317
  }
14318
14318
  function ae(e, t = "around") {
14319
14319
  return t === "pre" ? e.replace(/(^\s*)/g, "") : t === "post" ? e.replace(/(\s*$)/g, "") : t === "all" ? e.replace(/\s+/g, "") : t === "around" ? e.replace(/(^\s*)|(\s*$)/g, "") : e;
14320
14320
  }
14321
- var Bt = /\s+(?!['"])([\w_\-\$\.]+):/gm;
14322
- var Wt = /:\s*(?!['"])([\w_\-\$\.]+)/gm;
14323
- var Vt = /:\s*("[\w_\-\$\.]+")\s*(?!,)"/gm;
14324
- var Yt = /:\s*("[\w_\-\$\.]+"\s*,)\s*}/gm;
14325
- var Qt = /,(\s*})/gm;
14326
- function $i(e) {
14327
- return JSON.parse(e.replace(Bt, (t, r) => t.replace(r, `"${r}"`)).replace(Wt, (t, r) => t.replace(r, `"${r}"`)).replace(Vt, (t, r) => t.replace(r, `${r},`)).replace(Yt, (t) => t.replace(",", "")).replace(Qt, (t, r) => r));
14321
+ var Wt = /\s+(?!['"])([\w_\-\$\.]+):/gm;
14322
+ var Vt = /:\s*'([^']*)'/g;
14323
+ var Yt = /:\s*("[\w_\-\$\.]+")\s*(?!,)"/gm;
14324
+ var Qt = /:\s*("[\w_\-\$\.]+"\s*,)\s*}/gm;
14325
+ var Zt = /,(\s*})/gm;
14326
+ function zi(e) {
14327
+ return JSON.parse(e.replace(Wt, (t, r) => t.replace(r, `"${r}"`)).replace(Vt, ': "$1"').replace(Yt, (t, r) => t.replace(r, `${r},`)).replace(Qt, (t) => t.replace(",", "")).replace(Zt, (t, r) => r));
14328
14328
  }
14329
- function zi(e, t = " ") {
14329
+ function Ui(e, t = " ") {
14330
14330
  return e.replace(/\s+/g, t);
14331
14331
  }
14332
14332
  function We(e) {
14333
14333
  let t = e.split(":"), r = t.length - 1;
14334
14334
  return t.reduce((n, o, i) => n + +o * 60 ** (r - i), 0);
14335
14335
  }
14336
- function Wi(e) {
14336
+ function Yi(e) {
14337
14337
  return e.split(`
14338
14338
  `).reduce((r, n) => {
14339
14339
  let o = n.split("]"), i = o[0].slice(1);
@@ -14348,7 +14348,7 @@ function Ye(e, t) {
14348
14348
  let s = e[i];
14349
14349
  return o += `${i} { ${Object.keys(s).reduce((a, c) => a += `${se(c)}: ${s[c]};`, "")} }`;
14350
14350
  }, ""), n = E("style", { type: "text/css" }, t ? Ve(r, t) : r);
14351
- return $(document.head, n, null), () => k(n);
14351
+ return k(document.head, n, null), () => z(n);
14352
14352
  }
14353
14353
  function Qe() {
14354
14354
  let e = navigator.userAgent, t = () => {
@@ -14394,7 +14394,7 @@ function Ze(e, t = {}, r) {
14394
14394
  function Te(e = Number.MIN_SAFE_INTEGER, t = Number.MAX_VALUE) {
14395
14395
  return Math.floor(Math.random() * (t - e + 1)) + e;
14396
14396
  }
14397
- async function Es(e, t, r = 42, n) {
14397
+ async function vs(e, t, r = 42, n) {
14398
14398
  if (D(r) && (n = r, r = 42), g(t) && (t = v(t) || t), g(t))
14399
14399
  throw new Error(`${t} is not a HTMLElement`);
14400
14400
  let o = new Image();
@@ -14477,7 +14477,7 @@ var qe = class {
14477
14477
  o.draw([[t, r], [t + i, r], [t + i, r + i], [t, r + i], [t, r]]);
14478
14478
  }
14479
14479
  };
14480
- function Hs(e) {
14480
+ function Bs(e) {
14481
14481
  return [...e.matchAll(/([^{]+){([^}]+)}/gs)].reduce((t, [r, n, o]) => t += `${ae(n).replace(/\s+/g, " ").replace(/\s*,\s*/g, ",")}{${o.replace(/[\n\s]*/g, "")}}`, "");
14482
14482
  }
14483
14483
  function P(e) {
@@ -14489,13 +14489,13 @@ function P(e) {
14489
14489
  }
14490
14490
  return L.call(e) === "[object File]";
14491
14491
  }
14492
- function _s(e, t = {}) {
14492
+ function Xs(e, t = {}) {
14493
14493
  return new Promise((r) => {
14494
14494
  let { quality: n = 0.1, maxWidth: o, maxHeight: i, type: s = "base64" } = t;
14495
- _t(e, r, n, s, o, i);
14495
+ qt(e, r, n, s, o, i);
14496
14496
  });
14497
14497
  }
14498
- function _t(e, t, r, n, o, i) {
14498
+ function qt(e, t, r, n, o, i) {
14499
14499
  if (P(e)) {
14500
14500
  let m = new FileReader();
14501
14501
  m.readAsDataURL(e), m.onload = function(f) {
@@ -14521,69 +14521,71 @@ function _t(e, t, r, n, o, i) {
14521
14521
  t(m.toDataURL("image/jpeg", r));
14522
14522
  }
14523
14523
  }
14524
- var qt = /(<.* class=["']([\w\-\_$ ]*)["'_\-\w$=:\/ ]*\>)/gm;
14525
- function Ks(e, t) {
14524
+ var Xt = /(<.* class=["']([\w\-\_$ ]*)["'_\-\w$=:\/ ]*\>)/gm;
14525
+ function ta(e, t) {
14526
14526
  let r = 0;
14527
- return e.replace(qt, (n, o, i) => n.replace(i, t(i, o, r++)));
14527
+ return e.replace(Xt, (n, o, i) => n.replace(i, t(i, o, r++)));
14528
14528
  }
14529
- function ra(e, t, r) {
14529
+ function oa(e, t, r) {
14530
14530
  return w(e, (n) => r == null ? void 0 : r(getComputedStyle(n).getPropertyValue(t)));
14531
14531
  }
14532
- function oa(e, t) {
14532
+ function sa(e, t) {
14533
14533
  return e.classList.contains(t);
14534
14534
  }
14535
- function aa(e, t) {
14535
+ function ma(e, t) {
14536
14536
  return w(e, (r) => t && Object.keys(t).forEach((n) => r.style.setProperty(n, t[n])));
14537
14537
  }
14538
- var Y = (e, t, r, n, o) => {
14538
+ function Y(e, t, r, n, o) {
14539
14539
  let i = `${e}-${t}`;
14540
14540
  return r && (i += `-${r}`), n && (i += `__${n}`), o && (i += `--${o}`), i;
14541
- };
14542
- var ma = (e) => (t) => {
14543
- let r = e;
14544
- return { namespace: r, b: (l = "") => Y(r, t, l, "", ""), e: (l) => l ? Y(r, t, "", l, "") : "", m: (l) => l ? Y(r, t, "", "", l) : "", be: (l, h) => l && h ? Y(r, t, l, h, "") : "", em: (l, h) => l && h ? Y(r, t, "", l, h) : "", bm: (l, h) => l && h ? Y(r, t, l, "", h) : "", bem: (l, h, b) => l && h && b ? Y(r, t, l, h, b) : "", is: (l, ...h) => {
14545
- let b = h.length >= 1 ? h[0] : true;
14546
- return l && b ? `is-${l}` : "";
14547
- }, cssVar: (l) => {
14548
- let h = {};
14549
- for (let b in l)
14550
- l[b] && (h[`--${r}-${b}`] = l[b]);
14551
- return h;
14552
- }, cssVarName: (l) => `--${r}-${l}`, cssVarBlock: (l) => {
14553
- let h = {};
14554
- for (let b in l)
14555
- l[b] && (h[`--${r}-${t}-${b}`] = l[b]);
14556
- return h;
14557
- }, cssVarBlockName: (l) => `--${r}-${t}-${l}` };
14558
- };
14541
+ }
14542
+ function fa(e) {
14543
+ return (t) => {
14544
+ let r = e;
14545
+ return { namespace: r, b: (l = "") => Y(r, t, l, "", ""), e: (l) => l ? Y(r, t, "", l, "") : "", m: (l) => l ? Y(r, t, "", "", l) : "", be: (l, h) => l && h ? Y(r, t, l, h, "") : "", em: (l, h) => l && h ? Y(r, t, "", l, h) : "", bm: (l, h) => l && h ? Y(r, t, l, "", h) : "", bem: (l, h, b) => l && h && b ? Y(r, t, l, h, b) : "", is: (l, ...h) => {
14546
+ let b = h.length >= 1 ? h[0] : true;
14547
+ return l && b ? `is-${l}` : "";
14548
+ }, cssVar: (l) => {
14549
+ let h = {};
14550
+ for (let b in l)
14551
+ l[b] && (h[`--${r}-${b}`] = l[b]);
14552
+ return h;
14553
+ }, cssVarName: (l) => `--${r}-${l}`, cssVarBlock: (l) => {
14554
+ let h = {};
14555
+ for (let b in l)
14556
+ l[b] && (h[`--${r}-${t}-${b}`] = l[b]);
14557
+ return h;
14558
+ }, cssVarBlockName: (l) => `--${r}-${t}-${l}` };
14559
+ };
14560
+ }
14559
14561
  function Q(e, t = {}) {
14560
14562
  let { sep: r = "&", eq: n = "=", hyp: o = false, px: i = false, encode: s = true } = t;
14561
- return Object.keys(e).map((a) => `${o ? se(a) : a}${n}${Xt(s, i, e, a)}`).join(r);
14563
+ return Object.keys(e).map((a) => `${o ? se(a) : a}${n}${Gt(s, i, e, a)}`).join(r);
14562
14564
  }
14563
- function Xt(e, t, r, n) {
14565
+ function Gt(e, t, r, n) {
14564
14566
  let o = t && j(r[n]) ? `${r[n]}px` : r[n].toString();
14565
14567
  return e ? encodeURI(o) : o;
14566
14568
  }
14567
- function ha(e, t) {
14569
+ function ya(e, t) {
14568
14570
  let r = Q(t, { sep: ";", eq: ":", hyp: true });
14569
14571
  return w(e, (n) => {
14570
14572
  n.style.cssText = n.style.cssText + r;
14571
14573
  });
14572
14574
  }
14573
- function ba(e, t) {
14575
+ function Ea(e, t) {
14574
14576
  let r = M(t) ? t : [t];
14575
14577
  return w(e, (n) => {
14576
14578
  let o = n.style.cssText;
14577
- n.style.cssText = r.reduce((i, s) => i.replace(Gt(s), ""), o).trim();
14579
+ n.style.cssText = r.reduce((i, s) => i.replace(Jt(s), ""), o).trim();
14578
14580
  });
14579
14581
  }
14580
- function Gt(e) {
14582
+ function Jt(e) {
14581
14583
  return new RegExp(`${e}: [\\w()!\\-,.\\s0-9]+;`);
14582
14584
  }
14583
- function Ea(e, t) {
14585
+ function va(e, t) {
14584
14586
  return Reflect.has(e, t);
14585
14587
  }
14586
- var va = Object.assign;
14588
+ var Ca = Object.assign;
14587
14589
  function Xe(e) {
14588
14590
  let t = window.onbeforeunload || function() {
14589
14591
  };
@@ -14591,15 +14593,15 @@ function Xe(e) {
14591
14593
  e == null || e(r), t.call(this, r);
14592
14594
  }, e;
14593
14595
  }
14594
- function Pa(e, t) {
14596
+ function $a(e, t) {
14595
14597
  w(() => {
14596
14598
  document.styleSheets[0].insertRule(e, t);
14597
14599
  });
14598
14600
  }
14599
- function ka(e, t) {
14601
+ function Ha(e, t) {
14600
14602
  return w(e, (r) => r.classList.add(t));
14601
14603
  }
14602
- function Ua(e, t) {
14604
+ function Wa(e, t) {
14603
14605
  return w(e, (r) => r.classList.remove(t));
14604
14606
  }
14605
14607
  function Ge(e, t = "yyyy-MM-dd") {
@@ -14609,7 +14611,7 @@ function Ge(e, t = "yyyy-MM-dd") {
14609
14611
  new RegExp(`(${o})`).test(t) && (t = t.replace(RegExp.$1, RegExp.$1.length === 1 ? r[o] : `00${r[o]}`.substr(`${r[o]}`.length)));
14610
14612
  return t;
14611
14613
  }
14612
- function rc(e, t = 0) {
14614
+ function oc(e, t = 0) {
14613
14615
  let r = e.includes("-") ? "-" : "/", [n, o, i] = e.split(r), s = new Date(+n, +o - 1, +i).getTime(), a = [], c = true;
14614
14616
  t < 0 && (c = false), t = Math.abs(t);
14615
14617
  for (let u = 0; u <= t; u++) {
@@ -14622,13 +14624,13 @@ function Ce(e) {
14622
14624
  let t = /* @__PURE__ */ new Date();
14623
14625
  return t.setMonth(e + 1), t.setDate(0), t.getDate();
14624
14626
  }
14625
- function sc(e) {
14627
+ function cc(e) {
14626
14628
  let t = [], r = /* @__PURE__ */ new Date();
14627
14629
  r.setMonth(e), r.setDate(1);
14628
14630
  let n = 0, o = r.getDay(), i = Ce(e - 1);
14629
14631
  console.log(o);
14630
14632
  for (let s = 0; s < 6; s++) {
14631
- let a = new Array(7);
14633
+ let a = Array.from({ length: 7 });
14632
14634
  if (s === 0)
14633
14635
  for (let c = 0; c < a.length; c++)
14634
14636
  a[c] = c < o ? i - o + c + 1 : ++n;
@@ -14639,15 +14641,15 @@ function sc(e) {
14639
14641
  }
14640
14642
  return t;
14641
14643
  }
14642
- function cc(e, t, r = "-") {
14644
+ function uc(e, t, r = "-") {
14643
14645
  let n = e.split(r), o = t.split(r);
14644
14646
  return n[0] < o[0] ? -1 : n[0] > o[0] ? 1 : n[1] < o[1] ? -1 : n[1] > o[1] ? 1 : n[2] < o[2] ? -1 : n[2] > o[2] ? 1 : 0;
14645
14647
  }
14646
- function uc(e, t) {
14648
+ function pc(e, t) {
14647
14649
  let r = e.split(":"), n = t.split(":");
14648
14650
  return r[0] < n[0] ? -1 : r[0] > n[0] ? 1 : r[1] < n[1] ? -1 : r[1] > n[1] ? 1 : 0;
14649
14651
  }
14650
- function pc() {
14652
+ function gc() {
14651
14653
  let e = /* @__PURE__ */ new Date(), t = e.getDay(), r = t === 0 ? 6 : t - 1, n = new Date(e);
14652
14654
  return n.setDate(n.getDate() - r), n.toISOString().match(/(^[0-9]+-[0-9]+-[0-9]+)/)[1];
14653
14655
  }
@@ -14664,17 +14666,17 @@ function Se(e, t) {
14664
14666
  r == null || r();
14665
14667
  };
14666
14668
  }
14667
- function Ac(e, t) {
14669
+ function Lc(e, t) {
14668
14670
  return w(e, (r) => t == null ? void 0 : t((e = r).getBoundingClientRect())), x(window, "scroll", () => t == null ? void 0 : t(e.getBoundingClientRect()));
14669
14671
  }
14670
- function Rc(e = "body") {
14672
+ function Nc(e = "body") {
14671
14673
  let t = e === "body";
14672
14674
  w(e, (r) => {
14673
14675
  var n;
14674
14676
  (n = v("input", t ? r : r.parentElement)) == null || n.focus();
14675
14677
  });
14676
14678
  }
14677
- function Fc(e, t) {
14679
+ function kc(e, t) {
14678
14680
  let r = false, n = [];
14679
14681
  return w(e, (o) => {
14680
14682
  n.push(x(o, "mouseenter", (i) => t(true, i))), n.push(x(o, "mouseleave", (i) => t(false, i))), r && n.forEach((i) => i());
@@ -14696,13 +14698,13 @@ function Ke(e, t, r) {
14696
14698
  o == null || o();
14697
14699
  };
14698
14700
  }
14699
- function Vc(e, t) {
14701
+ function Qc(e, t) {
14700
14702
  if (!D(e))
14701
14703
  return;
14702
14704
  let r = setInterval(e, t);
14703
14705
  return () => clearInterval(r);
14704
14706
  }
14705
- function Zc(e, t = 0) {
14707
+ function qc(e, t = 0) {
14706
14708
  let r = Date.now();
14707
14709
  return x(window, "mousemove", (n) => {
14708
14710
  Date.now() - r >= t && (r = Date.now(), e(n));
@@ -14721,10 +14723,10 @@ function me(e, t, r = { childList: true }) {
14721
14723
  o == null || o();
14722
14724
  };
14723
14725
  }
14724
- function Kc(e) {
14726
+ function tm(e) {
14725
14727
  return x(window, "resize", () => e == null ? void 0 : e(document.documentElement.clientWidth || document.body.clientWidth, document.documentElement.clientHeight || document.body.clientHeight));
14726
14728
  }
14727
- function rm(e) {
14729
+ function om(e) {
14728
14730
  return x(document, "scroll", () => e == null ? void 0 : e(document.documentElement.scrollLeft || window.pageXOffset || document.body.scrollLeft, document.documentElement.scrollTop || window.pageYOffset || document.body.scrollTop));
14729
14731
  }
14730
14732
  function et(e, t = 0) {
@@ -14733,7 +14735,7 @@ function et(e, t = 0) {
14733
14735
  let r = setTimeout(e, t);
14734
14736
  return () => clearTimeout(r);
14735
14737
  }
14736
- function cm(e, t) {
14738
+ function um(e, t) {
14737
14739
  let r = g(e) ? v(e) : e, n = g(t) ? v(t) : t;
14738
14740
  if (!r || !n)
14739
14741
  return false;
@@ -14747,23 +14749,23 @@ function ue(e, t = "") {
14747
14749
  throw new Error(r);
14748
14750
  }
14749
14751
  }
14750
- function xm(e) {
14752
+ function wm(e) {
14751
14753
  let { title: t, meta: r, script: n, link: o } = e, i = Je();
14752
- return t && (document.title = g(t) ? t : t()), r && r.length && Kt(i, r), n && n.length && er(i, n), o && o.length && Jt(i, o), $(document.head, i), k(i);
14754
+ return t && (document.title = g(t) ? t : t()), r && r.length && er(i, r), n && n.length && tr(i, n), o && o.length && Kt(i, o), k(document.head, i), z(i);
14753
14755
  }
14754
- function Jt(e, t) {
14756
+ function Kt(e, t) {
14755
14757
  e.append(...t.map(({ rel: r, href: n }) => E("link", { rel: r, href: n })));
14756
14758
  }
14757
- function Kt(e, t) {
14759
+ function er(e, t) {
14758
14760
  e.append(...t.map(({ name: r, content: n }) => E("meta", { name: r, content: n })));
14759
14761
  }
14760
- function er(e, t) {
14761
- e.append(...t.map(({ src: r, type: n }) => E("script", Object.assign({ src: r }, tr(n) ? { type: n } : { [n]: "" }))));
14762
+ function tr(e, t) {
14763
+ e.append(...t.map(({ src: r, type: n }) => E("script", Object.assign({ src: r }, rr(n) ? { type: n } : { [n]: "" }))));
14762
14764
  }
14763
- function tr(e) {
14765
+ function rr(e) {
14764
14766
  return e === "module" || e === "nomodule";
14765
14767
  }
14766
- function Em(e, t, r) {
14768
+ function vm(e, t, r) {
14767
14769
  let n = [], o = false;
14768
14770
  return w(e, (i) => {
14769
14771
  let s, a, c = document.createEvent("Event");
@@ -14776,7 +14778,7 @@ function Em(e, t, r) {
14776
14778
  n.length ? n.forEach((i) => i()) : o = true;
14777
14779
  };
14778
14780
  }
14779
- function Cm(e, t) {
14781
+ function Am(e, t) {
14780
14782
  let r = false, n = [], o = false;
14781
14783
  return w(e, (i) => {
14782
14784
  n.push(Se(i, (s) => {
@@ -14793,14 +14795,14 @@ function Cm(e, t) {
14793
14795
  function tt(e) {
14794
14796
  return document.createTextNode(e);
14795
14797
  }
14796
- function Dm(e) {
14798
+ function Om(e) {
14797
14799
  let t = document.createRange();
14798
14800
  return t.setStart(e, 0), t.setEnd(e, 0), t.getBoundingClientRect();
14799
14801
  }
14800
- var rr = ["3g2", "3gp", "aaf", "asf", "avchd", "avi", "drc", "flv", "m2v", "m3u8", "m4p", "m4v", "mkv", "mng", "mov", "mp2", "mp4", "mpe", "mpeg", "mpg", "mpv", "mxf", "nsv", "ogg", "ogv", "qt", "rm", "rmvb", "roq", "svi", "vob", "webm", "wmv", "yuv"];
14802
+ var nr = ["3g2", "3gp", "aaf", "asf", "avchd", "avi", "drc", "flv", "m2v", "m3u8", "m4p", "m4v", "mkv", "mng", "mov", "mp2", "mp4", "mpe", "mpeg", "mpg", "mpv", "mxf", "nsv", "ogg", "ogv", "qt", "rm", "rmvb", "roq", "svi", "vob", "webm", "wmv", "yuv"];
14801
14803
  function fe(e) {
14802
14804
  let t = e.lastIndexOf(".") + 1;
14803
- return rr.includes(e.slice(t, e.length).toLowerCase());
14805
+ return nr.includes(e.slice(t, e.length).toLowerCase());
14804
14806
  }
14805
14807
  function Ae(e, t) {
14806
14808
  let r, n;
@@ -14816,7 +14818,7 @@ function Ae(e, t) {
14816
14818
  return a.src = s, t && a.setAttribute("style", t), a;
14817
14819
  }
14818
14820
  }
14819
- function gu(e, t, r = 200, n = 20) {
14821
+ function hu(e, t, r = 200, n = 20) {
14820
14822
  j(t) && (r = t, t = "body"), t || (t = "body");
14821
14823
  let o = Ae(e, `width:${r}px;position:absolute;`), i = E("div", { id: "simon-waterfall", style: "position:relative;width:100%;height:100%;" });
14822
14824
  x(window, "resize", () => s(t));
@@ -14850,10 +14852,10 @@ function gu(e, t, r = 200, n = 20) {
14850
14852
  return c.removeChild(c.children[u]);
14851
14853
  }
14852
14854
  }
14853
- function yu(e) {
14855
+ function bu(e) {
14854
14856
  return e.replace(/[&<>'"]/g, (t) => ({ "&": "&amp;", "<": "&lt;", ">": "&gt;", "'": "&#39;", '"': "&quot;" })[t] || t);
14855
14857
  }
14856
- function Mu(e = "", t = {}) {
14858
+ function Iu(e = "", t = {}) {
14857
14859
  return new Promise((r, n) => {
14858
14860
  let o = new DomHandler((s, a) => {
14859
14861
  s ? n(new Error(s)) : r(rt(a, t));
@@ -14874,7 +14876,7 @@ function rt(e, t) {
14874
14876
  break;
14875
14877
  }
14876
14878
  }
14877
- r += n.tagName ? `<${n.tagName}${ir(n.attribs)}>${rt(n.children, t)}</${n.tagName}>` : "", o.forEach((p) => p());
14879
+ r += n.tagName ? `<${n.tagName}${sr(n.attribs)}>${rt(n.children, t)}</${n.tagName}>` : "", o.forEach((p) => p());
14878
14880
  }
14879
14881
  if (n.type === "text" && (r += n.data), n.type === "comment") {
14880
14882
  let p = t.comment;
@@ -14895,21 +14897,21 @@ function rt(e, t) {
14895
14897
  }
14896
14898
  }, "");
14897
14899
  }
14898
- function ir(e) {
14900
+ function sr(e) {
14899
14901
  return Object.keys(e).reduce((t, r) => {
14900
14902
  let n = e[r];
14901
14903
  return n === "" ? t += ` ${r}` : n && (t += ` ${r}="${n}"`), t;
14902
14904
  }, "");
14903
14905
  }
14904
- function Iu(e) {
14906
+ function Tu(e) {
14905
14907
  return e.replace(/&amp;|&lt;|&gt;|&#39;|&quot;/g, (t) => ({ "&amp;": "&", "&lt;": "<", "&gt;": ">", "&#39;": "'", "&quot;": '"' })[t] || t);
14906
14908
  }
14907
- var sr = /(<.* style=['"]([ \w$\-\_:;\n]*)['"][\/ "'$\-_\w]*>)/gm;
14908
- function Tu(e, t) {
14909
+ var ar = /(<.* style=['"]([ \w$\-\_:;\n]*)['"][\/ "'$\-_\w]*>)/gm;
14910
+ function Su(e, t) {
14909
14911
  let r = 0;
14910
- return e.replace(sr, (n, o, i) => n.replace(i, t(i, o, r++)));
14912
+ return e.replace(ar, (n, o, i) => n.replace(i, t(i, o, r++)));
14911
14913
  }
14912
- function Ru() {
14914
+ function Nu() {
14913
14915
  location.protocol !== "https:" && location.replace(`https://${location.href.split("//")[1]}`);
14914
14916
  }
14915
14917
  function nt(e) {
@@ -14918,15 +14920,15 @@ function nt(e) {
14918
14920
  function ot(e) {
14919
14921
  return L.call(e) === "[object Blob]";
14920
14922
  }
14921
- function zu(e = 0) {
14923
+ function Uu(e = 0) {
14922
14924
  try {
14923
14925
  return document.documentElement.clientHeight + window.scrollY + e >= (document.documentElement.scrollHeight || document.documentElement.clientHeight);
14924
14926
  } catch (t) {
14925
14927
  throw new Error(t);
14926
14928
  }
14927
14929
  }
14928
- var Bu = () => W(window);
14929
- function Vu(e) {
14930
+ var Vu = () => W(window);
14931
+ function Qu(e) {
14930
14932
  return /[\u4E00-\u9FA5]/.test(e);
14931
14933
  }
14932
14934
  function it(e) {
@@ -14953,26 +14955,26 @@ function pe(e, t) {
14953
14955
  }
14954
14956
  return false;
14955
14957
  }
14956
- function Xu(e) {
14958
+ function Ju(e) {
14957
14959
  return e.__esModule || e[Symbol.toStringTag] === "Module";
14958
14960
  }
14959
- function z(e) {
14961
+ function H(e) {
14960
14962
  return nt(e) ? e : import_path.default.resolve(import_process.default.cwd(), e);
14961
14963
  }
14962
- function of(e) {
14964
+ function af(e) {
14963
14965
  try {
14964
- return import_fs2.default.accessSync(z(e)), true;
14966
+ return import_fs2.default.accessSync(H(e)), true;
14965
14967
  } catch (e2) {
14966
14968
  return false;
14967
14969
  }
14968
14970
  }
14969
- function af(e) {
14971
+ function mf(e) {
14970
14972
  return e === false;
14971
14973
  }
14972
- function mf(e, t) {
14974
+ function ff(e, t) {
14973
14975
  return new RegExp(`\\.${t}(\\?[^.]+)?$`).test(e);
14974
14976
  }
14975
- function H(e, t = [], r = "inherit", n, o) {
14977
+ function F(e, t = [], r = "inherit", n, o) {
14976
14978
  return B(t) ? (n = t, t = [], r = "inherit") : g(t) && (r = t, t = []), M(e) ? e.map((s) => i(s)) : i(e);
14977
14979
  function i(s) {
14978
14980
  var m;
@@ -14980,62 +14982,62 @@ function H(e, t = [], r = "inherit", n, o) {
14980
14982
  return a === 130 ? (o && console.log("\u5DF2\u53D6\u6D88..."), { status: a, result: u }) : (a !== 0 && (o && console.log(u), n && process.exit(1)), { status: a, result: u });
14981
14983
  }
14982
14984
  }
14983
- function yf() {
14984
- let e = process.cwd(), t = import_path2.default.resolve(e, "go.mod"), { result: r } = H(`(test -f "main.go" || test -f "${t}") && echo "0"|| echo "1"`, "pipe");
14985
+ function bf() {
14986
+ let e = process.cwd(), t = import_path2.default.resolve(e, "go.mod"), { result: r } = F(`(test -f "main.go" || test -f "${t}") && echo "0"|| echo "1"`, "pipe");
14985
14987
  return r === "0";
14986
14988
  }
14987
- function bf(e) {
14989
+ function Ef(e) {
14988
14990
  return /^((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$/.test(e);
14989
14991
  }
14990
- function Ef(e) {
14992
+ function vf(e) {
14991
14993
  return /^([\da-fA-F]{1,4}:){6}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^::([\da-fA-F]{1,4}:){0,4}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:):([\da-fA-F]{1,4}:){0,3}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){2}:([\da-fA-F]{1,4}:){0,2}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){3}:([\da-fA-F]{1,4}:){0,1}((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){4}:((25[0-5]|2[0-4]\d|[01]?\d\d?)\.){3}(25[0-5]|2[0-4]\d|[01]?\d\d?)$|^([\da-fA-F]{1,4}:){7}[\da-fA-F]{1,4}$|^:((:[\da-fA-F]{1,4}){1,6}|:)$|^[\da-fA-F]{1,4}:((:[\da-fA-F]{1,4}){1,5}|:)$|^([\da-fA-F]{1,4}:){2}((:[\da-fA-F]{1,4}){1,4}|:)$|^([\da-fA-F]{1,4}:){3}((:[\da-fA-F]{1,4}){1,3}|:)$|^([\da-fA-F]{1,4}:){4}((:[\da-fA-F]{1,4}){1,2}|:)$|^([\da-fA-F]{1,4}:){5}:([\da-fA-F]{1,4})?$|^([\da-fA-F]{1,4}:){6}:$/.test(e);
14992
14994
  }
14993
- function vf(e) {
14995
+ function Cf(e) {
14994
14996
  return /^[1-9]\d{7}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}$|^[1-9]\d{5}[1-9]\d{3}((0\d)|(1[0-2]))(([0|1|2]\d)|3[0-1])\d{3}([0-9]|X)$/.test(e);
14995
14997
  }
14996
- function Cf(e) {
14998
+ function Af(e) {
14997
14999
  return e % 400 === 0 || e % 4 === 0 && e % 100 !== 0;
14998
15000
  }
14999
- function Af(e) {
15001
+ function Lf(e) {
15000
15002
  return /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/.test(e);
15001
15003
  }
15002
- function Lf(e) {
15004
+ function Rf(e) {
15003
15005
  return e == null;
15004
15006
  }
15005
15007
  function Z(e) {
15006
15008
  return typeof e == "object";
15007
15009
  }
15008
- function Pf(e = process.cwd()) {
15009
- let t = import_path3.default.resolve(e.replace(/package.json$/, ""), "package.json"), { result: r } = H(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15010
+ function $f(e = process.cwd()) {
15011
+ let t = import_path3.default.resolve(e.replace(/package.json$/, ""), "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15010
15012
  return r === "0";
15011
15013
  }
15012
- function $f(e) {
15014
+ function zf(e) {
15013
15015
  return /^[1-9][0-9]{5}$/.test(e.toString());
15014
15016
  }
15015
- function zf(e) {
15017
+ function Uf(e) {
15016
15018
  return /^(\.\.\/|\.\/)/.test(e);
15017
15019
  }
15018
- function Wf() {
15019
- let e = process.cwd(), t = import_path4.default.resolve(e, "Cargo.toml"), { result: r } = H(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15020
+ function Yf() {
15021
+ let e = process.cwd(), t = import_path4.default.resolve(e, "Cargo.toml"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15020
15022
  return r === "0";
15021
15023
  }
15022
- function Yf(e, t) {
15024
+ function Zf(e, t) {
15023
15025
  return e.getFullYear() === t.getFullYear() && e.getMonth() === t.getMonth() && e.getDate() === t.getDate();
15024
15026
  }
15025
- function Zf() {
15027
+ function qf() {
15026
15028
  return !!(navigator && (navigator.getUserMedia || navigator.webkitGetUserMedia || navigator.mozGetUserMedia || navigator.msGetUserMedia));
15027
15029
  }
15028
- function qf() {
15030
+ function Gf() {
15029
15031
  try {
15030
15032
  return document.createElement("canvas").toDataURL("image/webp").indexOf("data:image/webp") === 0;
15031
15033
  } catch (e) {
15032
15034
  return false;
15033
15035
  }
15034
15036
  }
15035
- function Gf(e) {
15037
+ function Kf(e) {
15036
15038
  return e === true;
15037
15039
  }
15038
- function Kf(e) {
15040
+ function tp(e) {
15039
15041
  return /^http[s]?:\/\/.*/.test(e);
15040
15042
  }
15041
15043
  function st() {
@@ -15044,68 +15046,72 @@ function st() {
15044
15046
  function at(e) {
15045
15047
  return e.startsWith("ws://") || e.startsWith("wss://");
15046
15048
  }
15047
- function np(e) {
15049
+ function ip(e) {
15048
15050
  return /^\s*data:(?:[a-z]+\/[a-z0-9-+.]+(?:;[a-z-]+=[a-z0-9-]+)?)?(?:;base64)?,([a-z0-9!$&',()*+;=\-._~:@/?%\s]*?)\s*/i.test(e);
15049
15051
  }
15050
- var ip = (e) => /^[GCDZTSPKXLY1-9]\d{1,4}$/.test(e);
15051
- var ap = (e) => /^(?:[\u4E00-\u9FA5·]{2,16})$/.test(e);
15052
- var mp = (e) => /(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/.test(e);
15053
- var fp = (e) => /^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,8})(号?)$/.test(e);
15054
- var gr = /^[0-9]+$/;
15052
+ var ap = (e) => /^[GCDZTSPKXLY1-9]\d{1,4}$/.test(e);
15053
+ var mp = (e) => /^(?:[\u4E00-\u9FA5·]{2,16})$/.test(e);
15054
+ function fp(e) {
15055
+ return /(^[a-zA-Z][a-zA-Z\s]{0,20}[a-zA-Z]$)/.test(e);
15056
+ }
15055
15057
  function lp(e) {
15056
- return e.split(".").every((t) => gr.test(t));
15058
+ return /^[\u4E00-\u9FA5](字第)([0-9a-zA-Z]{4,8})(号?)$/.test(e);
15057
15059
  }
15060
+ var dr = /^[0-9]+$/;
15058
15061
  function dp(e) {
15062
+ return e.split(".").every((t) => dr.test(t));
15063
+ }
15064
+ function xp(e) {
15059
15065
  var t;
15060
15066
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "DIV";
15061
15067
  }
15062
- function xp(e) {
15068
+ function wp(e) {
15063
15069
  var t;
15064
15070
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "IFRAME";
15065
15071
  }
15066
- function wp(e) {
15072
+ function Mp(e) {
15067
15073
  var t;
15068
15074
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "IMG";
15069
15075
  }
15070
- function Ep(e) {
15076
+ function vp(e) {
15071
15077
  return e instanceof Node || j(e == null ? void 0 : e.nodeType);
15072
15078
  }
15073
- function vp(e) {
15079
+ function Cp(e) {
15074
15080
  return toString.call(e) === "[object ProxyDocument]";
15075
15081
  }
15076
- function Cp(e) {
15082
+ function Ap(e) {
15077
15083
  var t;
15078
15084
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "SCRIPT";
15079
15085
  }
15080
- function Ap(e) {
15086
+ function Lp(e) {
15081
15087
  return typeof ShadowRoot < "u" && e instanceof ShadowRoot;
15082
15088
  }
15083
- function Lp(e) {
15089
+ function Rp(e) {
15084
15090
  var t;
15085
15091
  return ((t = e == null ? void 0 : e.tagName) == null ? void 0 : t.toUpperCase()) === "STYLE";
15086
15092
  }
15087
- function Rp(e) {
15093
+ function Np(e) {
15088
15094
  return e.endsWith(".vue");
15089
15095
  }
15090
- function Pp(e) {
15096
+ function $p(e) {
15091
15097
  try {
15092
15098
  return import_fs3.default.accessSync(e, import_fs3.default.constants.W_OK), true;
15093
15099
  } catch (e2) {
15094
15100
  return false;
15095
15101
  }
15096
15102
  }
15097
- function $p(e) {
15103
+ function zp(e) {
15098
15104
  return /<! -{2,}.*?-{2,}>/.test(e);
15099
15105
  }
15100
- function zp() {
15106
+ function Up() {
15101
15107
  return !document.hidden;
15102
15108
  }
15103
- function og(e) {
15109
+ function sg(e) {
15104
15110
  return me(e, () => {
15105
15111
  console.groupCollapsed("childList or sub tree or attributes changed"), console.trace(), console.groupEnd();
15106
15112
  }, { childList: true, subtree: true, attributes: true });
15107
15113
  }
15108
- function ag(e) {
15114
+ function mg(e) {
15109
15115
  try {
15110
15116
  let t = E("textarea", { readonly: "readonly" }, e);
15111
15117
  document.body.appendChild(t), t.select();
@@ -15115,11 +15121,11 @@ function ag(e) {
15115
15121
  throw new Error(t);
15116
15122
  }
15117
15123
  }
15118
- function mg(e) {
15124
+ function fg(e) {
15119
15125
  let t = (...r) => r.length >= e.length ? e(...r) : (...n) => t(...r, ...n);
15120
15126
  return t;
15121
15127
  }
15122
- function fg(e) {
15128
+ function lg(e) {
15123
15129
  return new Promise((t) => setTimeout(t, e));
15124
15130
  }
15125
15131
  function mt(e, t) {
@@ -15134,7 +15140,7 @@ async function ut(e, t) {
15134
15140
  }
15135
15141
  return r;
15136
15142
  }
15137
- var xg = function(t, r, n) {
15143
+ var wg = function(t, r, n) {
15138
15144
  let o, i = ut(t, () => clearTimeout(o)), s = new Promise((a, c) => {
15139
15145
  o = setTimeout(() => c(new Error(n)), r);
15140
15146
  });
@@ -15142,7 +15148,7 @@ var xg = function(t, r, n) {
15142
15148
  };
15143
15149
  function ft() {
15144
15150
  }
15145
- function Mg(...e) {
15151
+ function Ig(...e) {
15146
15152
  return e.length === 0 ? ft : e.length === 1 ? e[0] : function(...t) {
15147
15153
  let r;
15148
15154
  for (let n of e)
@@ -15150,16 +15156,16 @@ function Mg(...e) {
15150
15156
  return r;
15151
15157
  };
15152
15158
  }
15153
- function Tg(e) {
15154
- if (typeof Promise !== void 0)
15159
+ function Sg(e) {
15160
+ if (typeof Promise < "u")
15155
15161
  Promise.resolve().then(e);
15156
- else if (typeof MutationObserver !== void 0) {
15162
+ else if (typeof MutationObserver < "u") {
15157
15163
  let t = tt("0");
15158
15164
  me(t, e, { characterData: true }), t.data = "1";
15159
15165
  } else
15160
15166
  setTimeout(e);
15161
15167
  }
15162
- function Sg(e) {
15168
+ function Dg(e) {
15163
15169
  let t;
15164
15170
  return new Proxy(e, { construct(r, n) {
15165
15171
  return t || (t = new r(...n)), t;
@@ -15169,45 +15175,37 @@ function le(e) {
15169
15175
  let t = new Blob([`(${e.toString()})()`], { type: "text/javascript" });
15170
15176
  return URL.createObjectURL(t);
15171
15177
  }
15172
- function Rg(e) {
15178
+ function Ng(e) {
15173
15179
  let t = new Worker(g(e) ? e : le(e)), r, n, o = (s) => r = s, i = (s) => n = s;
15174
15180
  return t.onerror = (s) => n == null ? void 0 : n(s), t.onmessage = (s) => r == null ? void 0 : r(s.data), { emit: (s) => t.postMessage(s), on: o, error: i };
15175
15181
  }
15176
- function Fg(e, t) {
15182
+ function kg(e, t) {
15177
15183
  return "serviceWorker" in navigator ? navigator.serviceWorker.register(g(e) ? e : le(e), t) : Promise.reject(new Error("ServiceWorker not support"));
15178
15184
  }
15179
- var kg = () => false;
15180
- function Ug(e, t) {
15185
+ var Hg = () => false;
15186
+ function Wg(e, t) {
15181
15187
  let r = null;
15182
15188
  return function(n) {
15183
- F(r) || clearTimeout(r), r = setTimeout(() => {
15189
+ $(r) || clearTimeout(r), r = setTimeout(() => {
15184
15190
  let o = e.call(this, n);
15185
15191
  return r = null, o;
15186
15192
  }, t);
15187
15193
  };
15188
15194
  }
15189
- async function Vg(e, t = 1024 * 100) {
15190
- let { HASH: r, suffix: n } = await c(), o = [], i = t, s = Math.ceil(e.size / i), a = 0;
15191
- for (s > 100 && (s = 100, i = e.size / s); a < s; )
15192
- o.push({ file: e.slice(a * i, (a + 1) * i), filename: `${r}_${a + 1}.${n}` }), a++;
15193
- return o;
15194
- function c() {
15195
- let u = new FileReader();
15196
- return u.readAsArrayBuffer(e), new Promise((m, f) => {
15197
- try {
15198
- u.onload = function(p) {
15199
- let d2 = p == null ? void 0 : p.target.result, y = new import_spark_md5.default.ArrayBuffer();
15200
- y.append(d2);
15201
- let l = y.end(), h = /\.([a-zA-Z0-9]+)$/.exec(e.name)[1], b = `${l}.${h}`;
15202
- m({ HASH: l, suffix: h, filename: b, buffer: d2 });
15203
- };
15204
- } catch (p) {
15205
- f(new Error(p));
15206
- }
15207
- });
15208
- }
15195
+ async function Yg(e) {
15196
+ return new Promise((t) => {
15197
+ let { file: r, chunkSize: n = 5 * 1024 * 1024, callback: o } = e || {}, i = navigator.hardwareConcurrency || 4, s = [], a = Math.ceil(r.size / n), c = Math.ceil(a / i), u = 0;
15198
+ for (let m = 0; m < i; m++) {
15199
+ let f = new Worker("./dist/worker/fileSpliceWorker.js", { type: "module" }), p = m * c, d2 = p + c;
15200
+ d2 > a && (d2 = a), f.postMessage({ file: r, i: m, chunkSize: n, startIndex: p, endIndex: d2 }), f.onmessage = ({ data: y }) => {
15201
+ u++;
15202
+ let l = { ...y, fileName: r.name, type: r.type, size: r.size, lastModified: r.lastModified, isDone: u === i, remaning: i - u };
15203
+ s.push(l), o && o(l), f.terminate(), u === i && t(s);
15204
+ };
15205
+ }
15206
+ });
15209
15207
  }
15210
- function Qg(e = 50) {
15208
+ function Zg(e = 50) {
15211
15209
  return { set(t, r) {
15212
15210
  this.cache.has(t) && this.cache.delete(t), this.cache.set(t, r), this.cache.size > this.max && this.cache.delete(this.cache.keys().next().value);
15213
15211
  }, get(t) {
@@ -15220,7 +15218,7 @@ function Qg(e = 50) {
15220
15218
  } };
15221
15219
  }
15222
15220
  var hr = "data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBzdGFuZGFsb25lPSJubyI/Pgo8IURPQ1RZUEUgc3ZnIFBVQkxJQyAiLS8vVzNDLy9EVEQgU1ZHIDEuMS8vRU4iICJodHRwOi8vd3d3LnczLm9yZy9HcmFwaGljcy9TVkcvMS4xL0RURC9zdmcxMS5kdGQiPgo8c3ZnIHdpZHRoPSI0MHB4IiBoZWlnaHQ9IjQwcHgiIHZpZXdCb3g9IjAgMCA0MCA0MCIgdmVyc2lvbj0iMS4xIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB4bWw6c3BhY2U9InByZXNlcnZlIiBzdHlsZT0iZmlsbC1ydWxlOmV2ZW5vZGQ7Y2xpcC1ydWxlOmV2ZW5vZGQ7c3Ryb2tlLWxpbmVqb2luOnJvdW5kO3N0cm9rZS1taXRlcmxpbWl0OjEuNDE0MjE7IiB4PSIwcHgiIHk9IjBweCI+CiAgICA8ZGVmcz4KICAgICAgICA8c3R5bGUgdHlwZT0idGV4dC9jc3MiPjwhW0NEQVRBWwogICAgICAgICAgICBALXdlYmtpdC1rZXlmcmFtZXMgc3BpbiB7CiAgICAgICAgICAgICAgZnJvbSB7CiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybTogcm90YXRlKDBkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRvIHsKICAgICAgICAgICAgICAgIC13ZWJraXQtdHJhbnNmb3JtOiByb3RhdGUoLTM1OWRlZykKICAgICAgICAgICAgICB9CiAgICAgICAgICAgIH0KICAgICAgICAgICAgQGtleWZyYW1lcyBzcGluIHsKICAgICAgICAgICAgICBmcm9tIHsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKDBkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICAgIHRvIHsKICAgICAgICAgICAgICAgIHRyYW5zZm9ybTogcm90YXRlKC0zNTlkZWcpCiAgICAgICAgICAgICAgfQogICAgICAgICAgICB9CiAgICAgICAgICAgIHN2ZyB7CiAgICAgICAgICAgICAgICAtd2Via2l0LXRyYW5zZm9ybS1vcmlnaW46IDUwJSA1MCU7CiAgICAgICAgICAgICAgICAtd2Via2l0LWFuaW1hdGlvbjogc3BpbiAxLjVzIGxpbmVhciBpbmZpbml0ZTsKICAgICAgICAgICAgICAgIC13ZWJraXQtYmFja2ZhY2UtdmlzaWJpbGl0eTogaGlkZGVuOwogICAgICAgICAgICAgICAgYW5pbWF0aW9uOiBzcGluIDEuNXMgbGluZWFyIGluZmluaXRlOwogICAgICAgICAgICB9CiAgICAgICAgXV0+PC9zdHlsZT4KICAgIDwvZGVmcz4KICAgIDxnIGlkPSJvdXRlciI+CiAgICAgICAgPGc+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCwwQzIyLjIwNTgsMCAyMy45OTM5LDEuNzg4MTMgMjMuOTkzOSwzLjk5MzlDMjMuOTkzOSw2LjE5OTY4IDIyLjIwNTgsNy45ODc4MSAyMCw3Ljk4NzgxQzE3Ljc5NDIsNy45ODc4MSAxNi4wMDYxLDYuMTk5NjggMTYuMDA2MSwzLjk5MzlDMTYuMDA2MSwxLjc4ODEzIDE3Ljc5NDIsMCAyMCwwWiIgc3R5bGU9ImZpbGw6YmxhY2s7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNNS44NTc4Niw1Ljg1Nzg2QzcuNDE3NTgsNC4yOTgxNSA5Ljk0NjM4LDQuMjk4MTUgMTEuNTA2MSw1Ljg1Nzg2QzEzLjA2NTgsNy40MTc1OCAxMy4wNjU4LDkuOTQ2MzggMTEuNTA2MSwxMS41MDYxQzkuOTQ2MzgsMTMuMDY1OCA3LjQxNzU4LDEzLjA2NTggNS44NTc4NiwxMS41MDYxQzQuMjk4MTUsOS45NDYzOCA0LjI5ODE1LDcuNDE3NTggNS44NTc4Niw1Ljg1Nzg2WiIgc3R5bGU9ImZpbGw6cmdiKDIxMCwyMTAsMjEwKTsiLz4KICAgICAgICA8L2c+CiAgICAgICAgPGc+CiAgICAgICAgICAgIDxwYXRoIGQ9Ik0yMCwzMi4wMTIyQzIyLjIwNTgsMzIuMDEyMiAyMy45OTM5LDMzLjgwMDMgMjMuOTkzOSwzNi4wMDYxQzIzLjk5MzksMzguMjExOSAyMi4yMDU4LDQwIDIwLDQwQzE3Ljc5NDIsNDAgMTYuMDA2MSwzOC4yMTE5IDE2LjAwNjEsMzYuMDA2MUMxNi4wMDYxLDMzLjgwMDMgMTcuNzk0MiwzMi4wMTIyIDIwLDMyLjAxMjJaIiBzdHlsZT0iZmlsbDpyZ2IoMTMwLDEzMCwxMzApOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTI4LjQ5MzksMjguNDkzOUMzMC4wNTM2LDI2LjkzNDIgMzIuNTgyNCwyNi45MzQyIDM0LjE0MjEsMjguNDkzOUMzNS43MDE5LDMwLjA1MzYgMzUuNzAxOSwzMi41ODI0IDM0LjE0MjEsMzQuMTQyMUMzMi41ODI0LDM1LjcwMTkgMzAuMDUzNiwzNS43MDE5IDI4LjQ5MzksMzQuMTQyMUMyNi45MzQyLDMyLjU4MjQgMjYuOTM0MiwzMC4wNTM2IDI4LjQ5MzksMjguNDkzOVoiIHN0eWxlPSJmaWxsOnJnYigxMDEsMTAxLDEwMSk7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNMy45OTM5LDE2LjAwNjFDNi4xOTk2OCwxNi4wMDYxIDcuOTg3ODEsMTcuNzk0MiA3Ljk4NzgxLDIwQzcuOTg3ODEsMjIuMjA1OCA2LjE5OTY4LDIzLjk5MzkgMy45OTM5LDIzLjk5MzlDMS43ODgxMywyMy45OTM5IDAsMjIuMjA1OCAwLDIwQzAsMTcuNzk0MiAxLjc4ODEzLDE2LjAwNjEgMy45OTM5LDE2LjAwNjFaIiBzdHlsZT0iZmlsbDpyZ2IoMTg3LDE4NywxODcpOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTUuODU3ODYsMjguNDkzOUM3LjQxNzU4LDI2LjkzNDIgOS45NDYzOCwyNi45MzQyIDExLjUwNjEsMjguNDkzOUMxMy4wNjU4LDMwLjA1MzYgMTMuMDY1OCwzMi41ODI0IDExLjUwNjEsMzQuMTQyMUM5Ljk0NjM4LDM1LjcwMTkgNy40MTc1OCwzNS43MDE5IDUuODU3ODYsMzQuMTQyMUM0LjI5ODE1LDMyLjU4MjQgNC4yOTgxNSwzMC4wNTM2IDUuODU3ODYsMjguNDkzOVoiIHN0eWxlPSJmaWxsOnJnYigxNjQsMTY0LDE2NCk7Ii8+CiAgICAgICAgPC9nPgogICAgICAgIDxnPgogICAgICAgICAgICA8cGF0aCBkPSJNMzYuMDA2MSwxNi4wMDYxQzM4LjIxMTksMTYuMDA2MSA0MCwxNy43OTQyIDQwLDIwQzQwLDIyLjIwNTggMzguMjExOSwyMy45OTM5IDM2LjAwNjEsMjMuOTkzOUMzMy44MDAzLDIzLjk5MzkgMzIuMDEyMiwyMi4yMDU4IDMyLjAxMjIsMjBDMzIuMDEyMiwxNy43OTQyIDMzLjgwMDMsMTYuMDA2MSAzNi4wMDYxLDE2LjAwNjFaIiBzdHlsZT0iZmlsbDpyZ2IoNzQsNzQsNzQpOyIvPgogICAgICAgIDwvZz4KICAgICAgICA8Zz4KICAgICAgICAgICAgPHBhdGggZD0iTTI4LjQ5MzksNS44NTc4NkMzMC4wNTM2LDQuMjk4MTUgMzIuNTgyNCw0LjI5ODE1IDM0LjE0MjEsNS44NTc4NkMzNS43MDE5LDcuNDE3NTggMzUuNzAxOSw5Ljk0NjM4IDM0LjE0MjEsMTEuNTA2MUMzMi41ODI0LDEzLjA2NTggMzAuMDUzNiwxMy4wNjU4IDI4LjQ5MzksMTEuNTA2MUMyNi45MzQyLDkuOTQ2MzggMjYuOTM0Miw3LjQxNzU4IDI4LjQ5MzksNS44NTc4NloiIHN0eWxlPSJmaWxsOnJnYig1MCw1MCw1MCk7Ii8+CiAgICAgICAgPC9nPgogICAgPC9nPgo8L3N2Zz4K";
15223
- function Gg(e, t = hr) {
15221
+ function Jg(e, t = hr) {
15224
15222
  return w(e, (r) => {
15225
15223
  v(["img", "video"], true, r).forEach((n) => {
15226
15224
  let o = n.dataset.src, i = o || n.src;
@@ -15233,7 +15231,7 @@ function Gg(e, t = hr) {
15233
15231
  });
15234
15232
  });
15235
15233
  }
15236
- function rd(e, t = 0) {
15234
+ function nd(e, t = 0) {
15237
15235
  let r = new Image(), n = E("video");
15238
15236
  return G(e.map((o) => fe(o) ? () => {
15239
15237
  n.src = o;
@@ -15267,38 +15265,49 @@ function U(e, t = 0, r = false) {
15267
15265
  }
15268
15266
  }), c;
15269
15267
  }
15270
- function ad(e) {
15268
+ function cd(e) {
15271
15269
  let t = false;
15272
15270
  return function(...r) {
15273
15271
  if (!t)
15274
15272
  return t = true, e.apply(this, r);
15275
15273
  };
15276
15274
  }
15277
- var xr = /<script .*src=["']([\w?=.\/@]+)["']><\/script>/gm;
15275
+ var lt = /* @__PURE__ */ new Map();
15276
+ function fd(e, t, r) {
15277
+ return new Promise((n) => {
15278
+ let o = t * r, i = o + r, s = new import_spark_md5.default.ArrayBuffer(), a = new FileReader();
15279
+ a.onload = (c) => {
15280
+ var f;
15281
+ let u = (f = c.target) == null ? void 0 : f.result, m;
15282
+ lt.has(u) ? m = lt.get(u) : (s.append(u), m = s.end()), n({ start: o, end: i, index: t, hash: m });
15283
+ }, a.readAsArrayBuffer(e.slice(o, i));
15284
+ });
15285
+ }
15286
+ var yr = /<script .*src=["']([\w?=.\/@]+)["']><\/script>/gm;
15278
15287
  var ge;
15279
- function Id(e = 2e3, t) {
15288
+ function Ad(e = 2e3, t) {
15280
15289
  return U(async () => {
15281
- await wr() && (console.log("\u9875\u9762\u6709\u66F4\u65B0"), t == null || t());
15290
+ await br() && (console.log("\u9875\u9762\u6709\u66F4\u65B0"), t == null || t());
15282
15291
  }, e);
15283
15292
  }
15284
- async function yr() {
15293
+ async function wr() {
15285
15294
  let e = await fetch(`/?_timestamp=${Date.now()}`).then((n) => n.text()), t = [], r;
15286
- for (; (r = xr.exec(e)) && !t.includes(r[1]); )
15295
+ for (; (r = yr.exec(e)) && !t.includes(r[1]); )
15287
15296
  t.push(r[1]);
15288
15297
  return t;
15289
15298
  }
15290
- async function wr() {
15291
- let e = await yr();
15299
+ async function br() {
15300
+ let e = await wr();
15292
15301
  return ge ? pe(ge, e) ? false : (ge = e, true) : (ge = e, false);
15293
15302
  }
15294
- async function lt(e) {
15303
+ async function gt(e) {
15295
15304
  if (P(e) || ot(e))
15296
- return await br(e);
15297
- if (g(e))
15298
15305
  return await Mr(e);
15306
+ if (g(e))
15307
+ return await Er(e);
15299
15308
  throw new Error("type must be file or blob or url");
15300
15309
  }
15301
- function br(e) {
15310
+ function Mr(e) {
15302
15311
  return new Promise((t, r) => {
15303
15312
  let n = new FileReader();
15304
15313
  n.readAsDataURL(e);
@@ -15312,7 +15321,7 @@ function br(e) {
15312
15321
  }
15313
15322
  });
15314
15323
  }
15315
- function Mr(e) {
15324
+ function Er(e) {
15316
15325
  return new Promise((t, r) => {
15317
15326
  try {
15318
15327
  let n = document.createElement("canvas"), o = n.getContext("2d"), i = E("img", { src: `${e}?timeStamp=${(/* @__PURE__ */ new Date()).getTime()}`, crossOrigin: "anonymous" });
@@ -15324,10 +15333,10 @@ function Mr(e) {
15324
15333
  }
15325
15334
  });
15326
15335
  }
15327
- async function Od(e) {
15328
- return await lt(new Blob([e], { type: "image/*" }));
15336
+ async function Fd(e) {
15337
+ return await gt(new Blob([e], { type: "image/*" }));
15329
15338
  }
15330
- async function jd(e, t) {
15339
+ async function kd(e, t) {
15331
15340
  let r = "", n = /data: ({.*})/gm;
15332
15341
  for (; ; ) {
15333
15342
  let { done: o, value: i } = await e.read();
@@ -15340,14 +15349,14 @@ async function jd(e, t) {
15340
15349
  }
15341
15350
  return r;
15342
15351
  }
15343
- function Pd(e) {
15352
+ function Hd(e) {
15344
15353
  let t = 0, r = e.length - 1;
15345
15354
  return () => {
15346
15355
  let n = e[t];
15347
15356
  return t++, t > r && (t = 0), n;
15348
15357
  };
15349
15358
  }
15350
- async function $d(e, t) {
15359
+ async function Bd(e, t) {
15351
15360
  try {
15352
15361
  return [void 0, await e];
15353
15362
  } catch (r) {
@@ -15359,19 +15368,20 @@ var de = class extends Error {
15359
15368
  super(t), this.name = "CustomerError";
15360
15369
  }
15361
15370
  };
15362
- function sh(e, t) {
15371
+ function fh(e, t) {
15363
15372
  throw new de(`[${e}] ${t}`);
15364
15373
  }
15365
- function ah(e, t) {
15374
+ function ph(e, t) {
15366
15375
  if (process.env.NODE_ENV !== "production") {
15367
15376
  let r = g(e) ? new de(`[${e}] ${t}`) : e;
15368
15377
  console.warn(r);
15369
15378
  }
15370
15379
  }
15371
- function gt(e, t = {}, r = "log") {
15372
- console[r]("%c%s", g(t) ? t : Q(t, { sep: ";", eq: ":", hyp: true, px: true, encode: false }), e);
15380
+ function dt(e, t) {
15381
+ let { type: r = "log", style: n = "", args: o = [] } = t || {};
15382
+ console[r](`%c${e}`, g(n) ? n : Q(n, { sep: ";", eq: ":", hyp: true, px: true, encode: false }), ...o);
15373
15383
  }
15374
- function gh() {
15384
+ function wh() {
15375
15385
  return x(window, "error", (e) => {
15376
15386
  let { colno: t, lineno: r, error: n, filename: o, message: i } = e;
15377
15387
  if (i.toLowerCase().includes("script error"))
@@ -15381,10 +15391,10 @@ function gh() {
15381
15391
  `, `Line: ${r}
15382
15392
  `, `Column: ${t}
15383
15393
  `, `Error object: ${JSON.stringify(n)}`].join("-");
15384
- return gt(s, { color: "#337ecc", padding: "2px 10px", fontSize: 14, fontWeight: "bold" }, "error"), false;
15394
+ return dt(s, { style: { color: "#337ecc", padding: "2px 10px", fontSize: 14, fontWeight: "bold" }, type: "error" }), false;
15385
15395
  });
15386
15396
  }
15387
- function hh(e) {
15397
+ function Mh(e) {
15388
15398
  return new Promise((t, r) => {
15389
15399
  try {
15390
15400
  t(e());
@@ -15393,7 +15403,7 @@ function hh(e) {
15393
15403
  }
15394
15404
  });
15395
15405
  }
15396
- function Ih() {
15406
+ function Ah() {
15397
15407
  return { data: /* @__PURE__ */ Object.create(null), emit(e, t) {
15398
15408
  (this.data[e] || []).forEach((r) => r(t));
15399
15409
  }, on(e, t) {
@@ -15423,46 +15433,46 @@ function he(e, t) {
15423
15433
  return n.join("");
15424
15434
  }
15425
15435
  var De = "@simon_he/storage";
15426
- function Dh(e) {
15436
+ function Nh(e) {
15427
15437
  return x(window, "storage", (t) => {
15428
15438
  let { key: r, newValue: n, oldValue: o } = t, i = r != null && r.startsWith(De) ? r.slice(De.length) : r;
15429
15439
  e(i, n, o);
15430
15440
  });
15431
15441
  }
15432
- function Lh(e, t) {
15442
+ function Ph(e, t) {
15433
15443
  localStorage.setItem(De + e, JSON.stringify({ value: t, __temp: he(6) }));
15434
15444
  }
15435
- function jh(e, t) {
15445
+ function kh(e, t) {
15436
15446
  e = at(e) ? e : `ws://${e.replace(/^http[s:\/\/]/, "")}`;
15437
15447
  let r = new WebSocket(e, t), n = (a) => r.addEventListener("message", a), o = (a) => r.addEventListener("open", a), i = (a) => r.addEventListener("close", a), s = (a) => r.addEventListener("error", a);
15438
15448
  return { socket: r, receive: n, send: r.send.bind(r), open: o, close: i, error: s };
15439
15449
  }
15440
- function Fh(e) {
15450
+ function Uh(e) {
15441
15451
  let t = new BroadcastChannel(e);
15442
- t.listeners = /* @__PURE__ */ new Set(), t.id = Er(e);
15452
+ t.listeners = /* @__PURE__ */ new Set(), t.id = Ir(e);
15443
15453
  let r = (n, o) => o.postMessage({ id: o.id, msg: n });
15444
15454
  return t.addEventListener("message", (n) => {
15445
15455
  n.data.msg === "open" ? (r("response", t), t.listeners.add(n.data.id)) : n.data.msg === "response" ? t.listeners.add(n.data.id) : n.data.msg === "close" && t.listeners.delete(n.data.id);
15446
15456
  }), x(window, "beforeunload", () => r("close", t)), r("open", t), t;
15447
15457
  }
15448
- function Er(e) {
15458
+ function Ir(e) {
15449
15459
  var _a2;
15450
15460
  let t = `channel-${e}`, r = +((_a2 = localStorage.getItem(t)) != null ? _a2 : 0) + 1;
15451
15461
  return localStorage.setItem(t, r.toString()), r;
15452
15462
  }
15453
- function Vh() {
15463
+ function qh() {
15454
15464
  let e, t = 0;
15455
15465
  return U((r) => {
15456
15466
  t++, e || (e = r), r - e > 1e3 && (console.log("FPS:", Math.round(t * 1e3) / (r - e)), t = 0, e = r);
15457
15467
  }, 0);
15458
15468
  }
15459
- function Ir() {
15469
+ function vr() {
15460
15470
  let e = {};
15461
15471
  try {
15462
15472
  let t = performance.getEntriesByType("navigation")[0];
15463
15473
  if (t.domComplete === 0) {
15464
15474
  setTimeout(() => {
15465
- Ir();
15475
+ vr();
15466
15476
  }, 200);
15467
15477
  return;
15468
15478
  }
@@ -15471,23 +15481,23 @@ function Ir() {
15471
15481
  console.log(e), console.log(performance.timing);
15472
15482
  }
15473
15483
  }
15474
- function Zh(e) {
15484
+ function Jh(e) {
15475
15485
  let t = (/* @__PURE__ */ new Date()).getTime();
15476
15486
  e();
15477
15487
  let n = ((/* @__PURE__ */ new Date()).getTime() - t) / 1e3;
15478
15488
  return console.log(`timeCost: ${n}s`), n;
15479
15489
  }
15480
- function qh(e = false, t = 5e3, r = 0) {
15490
+ function ex(e = false, t = 5e3, r = 0) {
15481
15491
  return new Promise((n, o) => {
15482
- navigator.geolocation ? navigator.geolocation.getCurrentPosition(vr(n), Tr(o), { enableHighAccuracy: e, maximumAge: r, timeout: t }) : o(new Error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u5B9A\u4F4D\u529F\u80FD\uFF01"));
15492
+ navigator.geolocation ? navigator.geolocation.getCurrentPosition(Tr(n), Cr(o), { enableHighAccuracy: e, maximumAge: r, timeout: t }) : o(new Error("\u8BE5\u6D4F\u89C8\u5668\u4E0D\u652F\u6301\u5B9A\u4F4D\u529F\u80FD\uFF01"));
15483
15493
  });
15484
15494
  }
15485
- function vr(e) {
15495
+ function Tr(e) {
15486
15496
  return function(t) {
15487
15497
  e(t.coords);
15488
15498
  };
15489
15499
  }
15490
- function Tr(e) {
15500
+ function Cr(e) {
15491
15501
  return function(r) {
15492
15502
  switch (r.code) {
15493
15503
  case r.PERMISSION_DENIED:
@@ -15501,70 +15511,73 @@ function Tr(e) {
15501
15511
  }
15502
15512
  };
15503
15513
  }
15504
- function ox(e, t) {
15505
- return H(`cp -r {${e.join(",")}} ${t}`, "pipe");
15514
+ function mx(e, t) {
15515
+ return F(`cp -r {${e.join(",")}} ${t}`, "pipe");
15506
15516
  }
15507
- async function mx(e) {
15517
+ async function gx(e) {
15508
15518
  if (/[./]/.test(e))
15509
15519
  throw new Error("module must be a npm module");
15510
15520
  let t = import_path5.default.resolve(import_process2.default.cwd(), "node_modules", e, "package.json"), { module: r, main: n } = JSON.parse(await import_promises.default.readFile(t, "utf-8")), o = import_path5.default.resolve(`./node_modules/${e}`, r || n);
15511
15521
  return import_promises.default.readFile(o, "utf-8");
15512
15522
  }
15513
- function xt(e, t) {
15523
+ function yt(e, t) {
15514
15524
  return t.endsWith(e) ? t : t + e;
15515
15525
  }
15516
- async function yt(e = "./package.json") {
15517
- let t = z(xt("/package.json", e));
15526
+ async function wt(e = "./package.json") {
15527
+ let t = H(yt("/package.json", e));
15518
15528
  if (!P(t))
15519
15529
  throw new Error(`${t} is not a file`);
15520
15530
  return JSON.parse(await import_promises2.default.readFile(t, "utf-8"));
15521
15531
  }
15522
- async function bx() {
15523
- let e = await yt() || {}, { packageManager: t } = e;
15532
+ async function Tx() {
15533
+ let e = await wt() || {}, { packageManager: t } = e;
15524
15534
  if (t) {
15525
15535
  let r = t.split("@")[0].replace(/[\~\^]/, "");
15526
15536
  if (t)
15527
15537
  return r;
15528
15538
  }
15529
15539
  switch (true) {
15530
- case P(z("./bun.lockb")):
15540
+ case P(H("./bun.lockb")):
15531
15541
  return "bun";
15532
- case P(z("./pnpm-lock.yaml")):
15533
- case P(z("./pnpm-workspace.yaml")):
15542
+ case P(H("./pnpm-lock.yaml")):
15543
+ case P(H("./pnpm-workspace.yaml")):
15534
15544
  return "pnpm";
15535
- case P(z("./yarn.lock")):
15536
- case P(z("./lerna.json")):
15545
+ case P(H("./yarn.lock")):
15546
+ case P(H("./lerna.json")):
15537
15547
  return "yarn";
15538
15548
  default:
15539
15549
  return "npm";
15540
15550
  }
15541
15551
  }
15542
- function Ix() {
15552
+ function Ax() {
15543
15553
  var e, t;
15544
15554
  return (t = (e = import_process3.default) == null ? void 0 : e.argv) == null ? void 0 : t.slice(2).reduce((r, n) => {
15545
15555
  let [o, i] = n.split("=");
15546
15556
  return r[o.slice(2)] = i || true, r;
15547
15557
  }, {});
15548
15558
  }
15549
- async function Rx(e, t) {
15550
- let r = "../node_modules/lazy-js-utils/dist/node/useNodeWorkerThread.cjs", n = "./node/useNodeWorkerThread.cjs";
15551
- st() && (r = r.replaceAll("/", "\\"), n = n.replaceAll("/", "\\")), t = t || import_path6.default.resolve(__dirname, n), t.includes("node_modules") || (t = import_path6.default.resolve(__dirname, r));
15552
- let { params: o } = g(e) ? e = { params: e } : e, i = M(o) ? o : o.split("&&"), s = await mt(i, (c) => a(Object.assign(e, { params: c })));
15553
- return setTimeout(import_process4.default.exit), s.length === 1 ? s[0] : s;
15554
- function a(c) {
15555
- let { Worker: u } = import_worker_threads.default;
15556
- return new Promise((m) => {
15557
- let f = new u(t);
15558
- f.on("message", m), f.postMessage(c);
15559
+ var Or = import_process4.default.cwd();
15560
+ async function $x(e, t) {
15561
+ let r = "./node_modules/lazy-js-utils/dist/worker/useNodeWorkerThread.cjs";
15562
+ st() && (r = r.replaceAll("/", "\\")), t = t || import_path6.default.resolve(Or, r);
15563
+ let { params: n } = g(e) ? e = { params: e } : e, o = M(n) ? n : n.split("&&"), i = await mt(o, (a) => s(Object.assign(e, { params: a })));
15564
+ return setTimeout(import_process4.default.exit), i.length === 1 ? i[0] : i;
15565
+ function s(a) {
15566
+ let { Worker: c } = import_worker_threads.default;
15567
+ return new Promise((u) => {
15568
+ let m = new c(t);
15569
+ m.on("message", u), m.postMessage(a);
15559
15570
  });
15560
15571
  }
15561
15572
  }
15562
- function jx(e) {
15573
+ function kx(e) {
15563
15574
  let { parentPort: t } = import_worker_threads.default;
15564
15575
  t.on("message", async (r) => t == null ? void 0 : t.postMessage(await (e == null ? void 0 : e(r)) || (() => "")));
15565
15576
  }
15566
- var Px = (e, t) => Object.assign(t, { displayName: e });
15567
- function zx(e, t, r = "utf-8") {
15577
+ function Hx(e, t) {
15578
+ return Object.assign(t, { displayName: e });
15579
+ }
15580
+ function Vx(e, t, r = "utf-8") {
15568
15581
  g(e) && (e = [e]), e.forEach(async (n, o) => {
15569
15582
  let i = await import_promises3.default.readFile(n, r), s = (t == null ? void 0 : t(i, o)) || i;
15570
15583
  import_promises3.default.writeFile(n, s).catch((a) => {
@@ -15572,20 +15585,28 @@ function zx(e, t, r = "utf-8") {
15572
15585
  });
15573
15586
  });
15574
15587
  }
15575
- function Wx(e) {
15576
- let t = import_path7.default.resolve(e, "package.json"), { result: r } = H(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15588
+ function _x(e) {
15589
+ let t = import_path7.default.resolve(e, "package.json"), { result: r } = F(`test -f "${t}" && echo "0"|| echo "1"`, "pipe");
15577
15590
  return r === "0";
15578
15591
  }
15579
- var ry = { add(...e) {
15580
- return e.reduce((t, r) => Et(+t, +r));
15592
+ function Gx(e) {
15593
+ let { status: t } = F(`if ! command -v ${e} &> /dev/null; then
15594
+ exit 1
15595
+ else
15596
+ exit 0
15597
+ fi`);
15598
+ return t === 0;
15599
+ }
15600
+ var fy = { add(...e) {
15601
+ return e.reduce((t, r) => It(+t, +r));
15581
15602
  }, sub(...e) {
15582
- return e.reduce((t, r) => Et(+t, -r));
15603
+ return e.reduce((t, r) => It(+t, -r));
15583
15604
  }, mul(...e) {
15584
- return e.reduce((t, r) => Or(+t, +r));
15605
+ return e.reduce((t, r) => jr(+t, +r));
15585
15606
  }, div(...e) {
15586
- return e.reduce((t, r) => Rr(+t, +r));
15607
+ return e.reduce((t, r) => Nr(+t, +r));
15587
15608
  } };
15588
- function Et(e, t) {
15609
+ function It(e, t) {
15589
15610
  let r, n;
15590
15611
  try {
15591
15612
  r = e.toString().split(".")[1].length;
@@ -15600,7 +15621,7 @@ function Et(e, t) {
15600
15621
  let o = 10 ** Math.max(r, n);
15601
15622
  return (e * o + t * o) / o;
15602
15623
  }
15603
- function Or(e, t) {
15624
+ function jr(e, t) {
15604
15625
  let r = 0, n = e.toString(), o = t.toString();
15605
15626
  try {
15606
15627
  r += n.split(".")[1].length;
@@ -15612,7 +15633,7 @@ function Or(e, t) {
15612
15633
  }
15613
15634
  return Number(n.replace(".", "")) * Number(o.replace(".", "")) / 10 ** r;
15614
15635
  }
15615
- function Rr(e, t) {
15636
+ function Nr(e, t) {
15616
15637
  let r = 0, n = 0;
15617
15638
  try {
15618
15639
  r = e.toString().split(".")[1].length;
@@ -15625,18 +15646,18 @@ function Rr(e, t) {
15625
15646
  let o = Number(e.toString().replace(".", "")), i = Number(t.toString().replace(".", ""));
15626
15647
  return o / i * 10 ** (n - r);
15627
15648
  }
15628
- function oy(e, t = 2, r = "ceil") {
15649
+ function ly(e, t = 2, r = "ceil") {
15629
15650
  e = `${e}`.replace(/[^0-9+-Ee.]/g, "");
15630
15651
  let n = isFinite(+e) ? +e : 0, o = isFinite(+t) ? Math.abs(t) : 0, i = ",", s = ".", a = (o ? u(n, o) : `${Math.round(n)}`).split("."), c = /(-?\d+)(\d{3})/;
15631
15652
  for (; c.test(a[0]); )
15632
15653
  a[0] = a[0].replace(c, `$1${i}$2`);
15633
- return (a[1] || "").length < o && (a[1] = a[1] || "", a[1] += new Array(o - a[1].length + 1).join("0")), a.join(s);
15654
+ return (a[1] || "").length < o && (a[1] = a[1] || "", a[1] += Array.from({ length: o - a[1].length + 1 }).join("0")), a.join(s);
15634
15655
  function u(m, f) {
15635
15656
  let p = 10 ** f;
15636
15657
  return `${r === "ceil" ? Math.ceil(m * p) / p : Math.floor(m * p) / p}`;
15637
15658
  }
15638
15659
  }
15639
- function sy(e) {
15660
+ function dy(e) {
15640
15661
  let t = ["\u89D2", "\u5206"], r = ["\u96F6", "\u58F9", "\u8D30", "\u53C1", "\u8086", "\u4F0D", "\u9646", "\u67D2", "\u634C", "\u7396"], n = [["\u5143", "\u4E07", "\u4EBF"], ["", "\u62FE", "\u4F70", "\u4EDF"]], o = e < 0 ? "\u6B20" : "";
15641
15662
  e = Math.abs(e);
15642
15663
  let i = "";
@@ -15651,10 +15672,10 @@ function sy(e) {
15651
15672
  }
15652
15673
  return o + i.replace(/(零.)*零元/, "\u5143").replace(/(零.)+/g, "\u96F6").replace(/^整$/, "\u96F6\u5143\u6574");
15653
15674
  }
15654
- function my(e, t) {
15675
+ function yy(e, t) {
15655
15676
  return j(e) ? e * t : e.repeat(t);
15656
15677
  }
15657
- function fy(e) {
15678
+ function by(e) {
15658
15679
  return +e % 2 === 0;
15659
15680
  }
15660
15681
  function J(e, ...t) {
@@ -15668,24 +15689,24 @@ function J(e, ...t) {
15668
15689
  n in e && T(e[n]) && T(r[n]) ? J(e[n], r[n]) : e[n] = r[n];
15669
15690
  }), e;
15670
15691
  }
15671
- var It = /(\w+)\[(\w+)\]/;
15672
- function My(e, t, r) {
15692
+ var vt = /(\w+)\[(\w+)\]/;
15693
+ function Ly(e, t, r) {
15673
15694
  return Object.keys(e).reduce((n, o) => {
15674
15695
  let i = e[o];
15675
- return jr(i[r], n, i[t]);
15696
+ return Pr(i[r], n, i[t]);
15676
15697
  }, {});
15677
15698
  }
15678
- function jr(e, t, r) {
15699
+ function Pr(e, t, r) {
15679
15700
  let n = e.split(".");
15680
15701
  return n.reduce((o, i, s) => {
15681
15702
  var _a2;
15682
15703
  if (s === n.length - 1)
15683
15704
  o[i] = r;
15684
- else if (It.test(i)) {
15705
+ else if (vt.test(i)) {
15685
15706
  let a;
15686
- return i.replace(It, (c, u, m) => {
15687
- var _a3, _b;
15688
- o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b = o[u][m]) != null ? _b : {};
15707
+ return i.replace(vt, (c, u, m) => {
15708
+ var _a3, _b2;
15709
+ o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b2 = o[u][m]) != null ? _b2 : {};
15689
15710
  }), a;
15690
15711
  } else if (s !== n.length - 1)
15691
15712
  return o[i] = (_a2 = o[i]) != null ? _a2 : {};
@@ -15693,8 +15714,8 @@ function jr(e, t, r) {
15693
15714
  }, t), t;
15694
15715
  }
15695
15716
  var K = /(\w+)\[(\w+)\]/;
15696
- function Ty(e, t, r = false) {
15697
- let n = Object.keys(t).reduce((a, c) => (a[t[c]] = Nr(c, e), a), {});
15717
+ function Ny(e, t, r = false) {
15718
+ let n = Object.keys(t).reduce((a, c) => (a[t[c]] = Fr(c, e), a), {});
15698
15719
  if (!r)
15699
15720
  return n;
15700
15721
  let o = Object.keys(t), i = JSON.parse(JSON.stringify(e));
@@ -15711,17 +15732,17 @@ function Ty(e, t, r = false) {
15711
15732
  let s = Le(i);
15712
15733
  return Object.assign(s, n);
15713
15734
  }
15714
- function Cy(e, t, r = false) {
15715
- let n = Object.entries(t).reduce((s, [a, c]) => Pr(a, s, e[c]), {});
15735
+ function Py(e, t, r = false) {
15736
+ let n = Object.entries(t).reduce((s, [a, c]) => $r(a, s, e[c]), {});
15716
15737
  if (!r)
15717
15738
  return n;
15718
15739
  let o = Object.values(t), i = Object.keys(e).filter((s) => !o.includes(s)).reduce((s, a) => (s[a] = e[a], s), {});
15719
15740
  return Object.assign(i, n);
15720
15741
  }
15721
- function Nr(e, t) {
15742
+ function Fr(e, t) {
15722
15743
  return e.split(".").reduce((r, n) => K.test(n) ? JSON.parse(n.replace(K, (o, i, s) => JSON.stringify(r[i][s]))) : r[n], t);
15723
15744
  }
15724
- function Pr(e, t, r) {
15745
+ function $r(e, t, r) {
15725
15746
  let n = e.split(".");
15726
15747
  return n.reduce((o, i, s) => {
15727
15748
  var _a2;
@@ -15730,8 +15751,8 @@ function Pr(e, t, r) {
15730
15751
  else if (K.test(i)) {
15731
15752
  let a;
15732
15753
  return i.replace(K, (c, u, m) => {
15733
- var _a3, _b;
15734
- o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b = o[u][m]) != null ? _b : {};
15754
+ var _a3, _b2;
15755
+ o[u] = (_a3 = o[u]) != null ? _a3 : [], a = o[u][m] = (_b2 = o[u][m]) != null ? _b2 : {};
15735
15756
  }), a;
15736
15757
  } else if (s !== n.length - 1)
15737
15758
  return o[i] = (_a2 = o[i]) != null ? _a2 : {};
@@ -15745,56 +15766,56 @@ function Le(e) {
15745
15766
  }
15746
15767
  return e;
15747
15768
  }
15748
- function Ly(e, t) {
15749
- return Z(e) ? M(e) ? e.map((r) => vt(r, t)) : vt(e, t) : e;
15769
+ function zy(e, t) {
15770
+ return Z(e) ? M(e) ? e.map((r) => Tt(r, t)) : Tt(e, t) : e;
15750
15771
  }
15751
- function vt(e, t) {
15772
+ function Tt(e, t) {
15752
15773
  for (let r in t) {
15753
15774
  let n = "", o = null, i = r.split("."), s = i.reduce((a, c, u) => (u === i.length - 1 && (n = c, o = a), a[c]), e);
15754
15775
  o[t[r]] = s, delete o[n];
15755
15776
  }
15756
15777
  return e;
15757
15778
  }
15758
- function Ny(e, t = {}) {
15759
- return Z(e) && (M(e) ? e.forEach((r, n) => Tt(r, n, t)) : Tt(e, 0, t)), e;
15779
+ function Wy(e, t = {}) {
15780
+ return Z(e) && (M(e) ? e.forEach((r, n) => Ct(r, n, t)) : Ct(e, 0, t)), e;
15760
15781
  }
15761
- function Tt(e, t, r = {}) {
15782
+ function Ct(e, t, r = {}) {
15762
15783
  for (let n in r) {
15763
15784
  let o = n.split(".").reduce((i, s) => i[s], e);
15764
15785
  r[n](o, t, e);
15765
15786
  }
15766
15787
  }
15767
- var Fr = [Set, Map, WeakMap, WeakSet, RegExp, Date];
15788
+ var kr = [Set, Map, WeakMap, WeakSet, RegExp, Date];
15768
15789
  var Oe = /* @__PURE__ */ new WeakMap();
15769
- function $r(e) {
15790
+ function zr(e) {
15770
15791
  if (Oe.has(e))
15771
15792
  return Oe.get(e);
15772
- if (D(e) || F(e))
15793
+ if (D(e) || $(e))
15773
15794
  return e;
15774
- if (Fr.includes(e.constructor))
15795
+ if (kr.includes(e.constructor))
15775
15796
  return new e.constructor(e);
15776
15797
  if (!Z(e))
15777
15798
  return e;
15778
15799
  let t = Object.create(Object.getPrototypeOf(e), Object.getOwnPropertyDescriptors(e));
15779
15800
  Oe.set(e, t);
15780
15801
  for (let r of Reflect.ownKeys(e))
15781
- Z(e[r]) ? t[r] = $r(e[r]) : t[r] = e[r];
15802
+ Z(e[r]) ? t[r] = zr(e[r]) : t[r] = e[r];
15782
15803
  return t;
15783
15804
  }
15784
- function Ct(e, t, r, n = [], o = [], i, s) {
15805
+ function St(e, t, r, n = [], o = [], i, s) {
15785
15806
  if (T(e) && T(t)) {
15786
15807
  let a = Object.keys(e).length >= Object.keys(t).length ? e : t;
15787
15808
  for (let c in a) {
15788
15809
  if (M(r) && r.includes(c) || ee(r) && r.test(c))
15789
15810
  continue;
15790
15811
  let u = e[c], m = t[c], f = i ? `${i}.${c}` : c;
15791
- Ct(u, m, r, n, o, f);
15812
+ St(u, m, r, n, o, f);
15792
15813
  }
15793
15814
  } else if (M(e) && M(t)) {
15794
15815
  let a = e.length >= t.length ? e : t;
15795
15816
  for (let c in a) {
15796
15817
  let u = e[c], m = t[c];
15797
- Ct(u, m, r, n, o, i, c);
15818
+ St(u, m, r, n, o, i, c);
15798
15819
  }
15799
15820
  } else if (e !== t) {
15800
15821
  i = i || "array";
@@ -15803,33 +15824,33 @@ function Ct(e, t, r, n = [], o = [], i, s) {
15803
15824
  }
15804
15825
  return { error: n, errorMsg: o };
15805
15826
  }
15806
- function e0(e, t = {}) {
15827
+ function m0(e, t = {}) {
15807
15828
  let { sep: r = "&", eq: n = "=", camel: o = false } = t;
15808
15829
  return e.split(r).reduce((i, s) => {
15809
15830
  let [a, c] = s.split(n);
15810
15831
  return o ? i[Be(a)] = c : i[a] = c, i;
15811
15832
  }, {});
15812
15833
  }
15813
- function r0(e) {
15834
+ function f0(e) {
15814
15835
  let t = /[\n\s]*([.#][\w\-_ .#\>\+\&]+){[\n\s]*([ :;\w\-\n]*)+}[\n\s]*/gm, r = /\s{2,}/g, n = {};
15815
15836
  return e.replace(t, (o, i, s) => (n[i.replace(r, " ").trim()] = s.replace(/\n\s*/g, ""), o)), n;
15816
15837
  }
15817
- var kr = /^\w+:(\/\/)?/;
15818
- var zr = /^\/\/[^/]+/;
15819
- function Hr(e, t = false) {
15820
- return kr.test(e) || t && zr.test(e);
15838
+ var Hr = /^\w+:(\/\/)?/;
15839
+ var Ur = /^\/\/[^/]+/;
15840
+ function Br(e, t = false) {
15841
+ return Hr.test(e) || t && Ur.test(e);
15821
15842
  }
15822
- function Ur(e = "", t) {
15823
- if (!Hr(e, true))
15824
- return t ? Ur(t + e) : St(e);
15825
- let [r = "", n, o = ""] = (e.replace(/\\/g, "/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/) || []).splice(1), [i = "", s = ""] = (o.match(/([^/?#]*)(.*)?/) || []).splice(1), { pathname: a, search: c, hash: u } = St(s);
15843
+ function Wr(e = "", t) {
15844
+ if (!Br(e, true))
15845
+ return t ? Wr(t + e) : At(e);
15846
+ let [r = "", n, o = ""] = (e.replace(/\\/g, "/").match(/([^:/]+:)?\/\/([^/@]+@)?(.*)/) || []).splice(1), [i = "", s = ""] = (o.match(/([^/?#]*)(.*)?/) || []).splice(1), { pathname: a, search: c, hash: u } = At(s);
15826
15847
  return { protocol: r, auth: n ? n.substr(0, n.length - 1) : "", host: i, pathname: a, search: c, hash: u };
15827
15848
  }
15828
- function St(e = "") {
15849
+ function At(e = "") {
15829
15850
  let [t = "", r = "", n = ""] = (e.match(/([^#?]*)(\?[^#]*)?(#.*)?/) || []).splice(1);
15830
15851
  return { pathname: t, search: r, hash: n };
15831
15852
  }
15832
- function f0(e, t, r) {
15853
+ function b0(e, t, r) {
15833
15854
  return new Promise((n, o) => {
15834
15855
  let i;
15835
15856
  it(e) ? i = "toCanvas" : t ? i = "toDataURL" : i = "toString", import_qrcode.default[i](e, r, (s, a) => {
@@ -15837,17 +15858,17 @@ function f0(e, t, r) {
15837
15858
  });
15838
15859
  });
15839
15860
  }
15840
- function d0(e = "1999/01/1", t) {
15861
+ function v0(e = "1999/01/1", t) {
15841
15862
  let r = /* @__PURE__ */ new Date(), n = e.includes("/") ? "/" : "-", [o, i, s] = (t || "").split(n), a = +o || r.getFullYear(), c = +i || r.getMonth() + 1, u = +s || r.getDate(), [m, f, p] = e.split("/"), d2 = new Date(+m, +f, +p).getTime(), y = new Date(a, c, u).getTime();
15842
15863
  return new Date(d2 + Math.round(Math.random() * (y - d2)));
15843
15864
  }
15844
- function x0() {
15865
+ function C0() {
15845
15866
  return `#${(Math.random() * 1048575 * 1e6).toString(16).slice(0, 6)}`;
15846
15867
  }
15847
- function w0(e = 1) {
15868
+ function A0(e = 1) {
15848
15869
  return `rgba(${Math.random() * 255}, ${Math.random() * 255}, ${Math.random() * 255}, ${e})`;
15849
15870
  }
15850
- function M0(e) {
15871
+ function L0(e) {
15851
15872
  for (let t = e.length - 1; t > 0; t--) {
15852
15873
  let r = Math.floor(Math.random() * (t + 1));
15853
15874
  [e[t], e[r]] = [e[r], e[t]];
@@ -15906,7 +15927,7 @@ var _ = class {
15906
15927
  }
15907
15928
  get(t, r) {
15908
15929
  let { retry: n = 0 } = r || {};
15909
- return At(() => new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "GET" })), n);
15930
+ return Dt(() => new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "GET" })), n);
15910
15931
  }
15911
15932
  post(t, r) {
15912
15933
  return new _(this.config).init(Object.assign(g(t) ? Object.assign(r || {}, { url: t }) : t, { method: "post" }));
@@ -15922,16 +15943,16 @@ function Re(e) {
15922
15943
  let { url: t, method: r, params: n, data: o } = e;
15923
15944
  return `${t}-${r}-${JSON.stringify(r === "get" ? n : o)}`;
15924
15945
  }
15925
- function At(e, t, r = 0, n, o) {
15946
+ function Dt(e, t, r = 0, n, o) {
15926
15947
  return new Promise((i, s) => {
15927
15948
  n = n || i, o = o || s;
15928
15949
  let a = e();
15929
15950
  a.then(n), a.catch((c) => {
15930
- r < t ? (r++, At(e, t, r, n, o)) : o(c);
15951
+ r < t ? (r++, Dt(e, t, r, n, o)) : o(c);
15931
15952
  });
15932
15953
  });
15933
15954
  }
15934
- function N0(e = 4, t) {
15955
+ function W0(e = 4, t) {
15935
15956
  let r = t.length, n = [], o = 0, i = new Array(e).fill(0);
15936
15957
  return i = i.map(() => new Promise((s, a) => {
15937
15958
  let c = () => {
@@ -15945,10 +15966,10 @@ function N0(e = 4, t) {
15945
15966
  c();
15946
15967
  })), Promise.all(i).then(() => n);
15947
15968
  }
15948
- function $0(e, t) {
15969
+ function Q0(e, t) {
15949
15970
  return x(document, "visibilitychange", () => document.visibilityState === "hidden" && navigator.sendBeacon(e, t));
15950
15971
  }
15951
- function W0() {
15972
+ function J0() {
15952
15973
  try {
15953
15974
  let e = parent.documentElement, t = (e == null ? void 0 : e.cancelFullScreen) || (e == null ? void 0 : e.webkitCancelFullScreen) || (e == null ? void 0 : e.mozCancelFullScreen) || (e == null ? void 0 : e.exitFullScreen);
15954
15975
  if (t)
@@ -15959,7 +15980,7 @@ function W0() {
15959
15980
  throw new Error(e);
15960
15981
  }
15961
15982
  }
15962
- function Y0() {
15983
+ function ew() {
15963
15984
  try {
15964
15985
  let e = document.documentElement, t = e.requestFullScreen || e.webkitRequestFullScreen || e.mozRequestFullScreen || e.msRequestFullScreen;
15965
15986
  if (t)
@@ -15970,7 +15991,7 @@ function Y0() {
15970
15991
  throw new Error(e);
15971
15992
  }
15972
15993
  }
15973
- function q0(e) {
15994
+ function ow(e) {
15974
15995
  return async () => {
15975
15996
  if (g(e) && (e = v(e) || e), g(e))
15976
15997
  throw new Error(`${e} is not a HTMLVideoElement`);
@@ -15981,7 +16002,7 @@ function q0(e) {
15981
16002
  }
15982
16003
  };
15983
16004
  }
15984
- function ew(e, t) {
16005
+ function mw(e, t) {
15985
16006
  return new Promise((r, n) => {
15986
16007
  navigator.mediaDevices.getDisplayMedia({ video: true }).then(o, n);
15987
16008
  function o(i) {
@@ -15990,7 +16011,7 @@ function ew(e, t) {
15990
16011
  }
15991
16012
  });
15992
16013
  }
15993
- function iw(e = { width: 640, height: 480 }, t = "video", r) {
16014
+ function gw(e = { width: 640, height: 480 }, t = "video", r) {
15994
16015
  if (!navigator)
15995
16016
  return console.error("Not support navigator");
15996
16017
  B(e) && (r = e, e = { width: 640, height: 480 });
@@ -16001,13 +16022,13 @@ function iw(e = { width: 640, height: 480 }, t = "video", r) {
16001
16022
  n.srcObject = o, r && (n.onloadedmetadata = () => n.play());
16002
16023
  }), () => n ? n.paused ? n.play() : n.pause() : r = true;
16003
16024
  }
16004
- function aw(e = {}) {
16025
+ function hw(e = {}) {
16005
16026
  if (!navigator || !navigator.canShare)
16006
16027
  throw new Error("\u5F53\u524D\u73AF\u5883\u4E0D\u652F\u6301\u5206\u4EAB");
16007
16028
  if (!e.files || navigator.canShare({ files: e.files }))
16008
16029
  return navigator.share(e);
16009
16030
  }
16010
- function fw(e = [], t) {
16031
+ function bw(e = [], t) {
16011
16032
  let r = E("video"), { controls: n = true, width: o, height: i, className: s, style: a } = t, c = t.container;
16012
16033
  return r.controls = n, o && (r.width = o), i && (r.height = i), s && (r.className = s), a && (r.style.cssText = a), x(document, "DOMContentLoaded", m), x(r, "timeupdate", () => r.currentTime >= r.duration && u()), { play() {
16013
16034
  r.paused ? r.play() : r.pause();
@@ -16029,7 +16050,7 @@ function fw(e = [], t) {
16029
16050
  }), c.appendChild(r);
16030
16051
  }
16031
16052
  }
16032
- async function gw(e = String((/* @__PURE__ */ new Date()).getTime())) {
16053
+ async function Iw(e = String((/* @__PURE__ */ new Date()).getTime())) {
16033
16054
  let t = await navigator.mediaDevices.getDisplayMedia({ video: true }), r = await navigator.mediaDevices.getUserMedia({ audio: true }), n = [];
16034
16055
  t.getVideoTracks().forEach((a) => n.push(a)), r.getAudioTracks().forEach((a) => n.push(a));
16035
16056
  let o = new MediaStream(n), i = new MediaRecorder(o), s = [];
@@ -16042,19 +16063,19 @@ async function gw(e = String((/* @__PURE__ */ new Date()).getTime())) {
16042
16063
  ue(m, `${e}.webm`);
16043
16064
  }, i.start(), () => i.stop();
16044
16065
  }
16045
- function Dt(e) {
16066
+ function Lt(e) {
16046
16067
  return M(e) ? e : [e];
16047
16068
  }
16048
- function bw(e, t = "zh") {
16049
- let r = Dt(e).map(Vr).join(`
16069
+ function Dw(e, t = "zh") {
16070
+ let r = Lt(e).map((n) => Qr(n)).join(`
16050
16071
  `);
16051
- Yr(r, t);
16072
+ Zr(r, t);
16052
16073
  }
16053
- function Vr(e) {
16054
- let { start: t, end: r, left: n, top: o, content: i, duration: s } = e, a = Lt(t), c = Lt(r || t + (s != null ? s : 0));
16074
+ function Qr(e) {
16075
+ let { start: t, end: r, left: n, top: o, content: i, duration: s } = e, a = Ot(t), c = Ot(r || t + (s != null ? s : 0));
16055
16076
  return `${a} --> ${c} line:${n}% position:${o}% ${i}`;
16056
16077
  }
16057
- function Lt(e) {
16078
+ function Ot(e) {
16058
16079
  let t = Math.floor(e / 1e3), r = xe(e % 1e3, 3), n = Math.floor(t / 60), o = xe(t % 60, 2), i = xe(Math.floor(n / 60), 2), s = xe(n % 60, 2);
16059
16080
  return `${i}:${s}:${o}.${r}`;
16060
16081
  }
@@ -16064,10 +16085,10 @@ function xe(e, t) {
16064
16085
  let r = t - String(e).length;
16065
16086
  return "0".repeat(r) + e;
16066
16087
  }
16067
- function Yr(e, t) {
16088
+ function Zr(e, t) {
16068
16089
  import_promises4.default.writeFile(`${t}.vtt`, e, "utf-8");
16069
16090
  }
16070
- function Tw(e) {
16091
+ function Nw(e) {
16071
16092
  if (!navigator)
16072
16093
  return console.error("Not support navigator");
16073
16094
  let t = false, r, n;
@@ -16090,7 +16111,7 @@ function Tw(e) {
16090
16111
  return r.state === "recording" ? r.stop() : r.start();
16091
16112
  }
16092
16113
  }
16093
- function Dw(e, t) {
16114
+ function kw(e, t) {
16094
16115
  let { audio: r, fftSize: n = 512 } = e;
16095
16116
  w(r, (o) => {
16096
16117
  let i = false;
@@ -16107,11 +16128,11 @@ function Dw(e, t) {
16107
16128
  };
16108
16129
  });
16109
16130
  }
16110
- function Vw(e) {
16131
+ function Kw(e) {
16111
16132
  let t = E("link", { rel: "stylesheet", href: e, type: "text/css" });
16112
16133
  return document.head.appendChild(t), () => document.head.removeChild(t);
16113
16134
  }
16114
- function Zw(e) {
16135
+ function rb(e) {
16115
16136
  var t;
16116
16137
  try {
16117
16138
  let r = document.getElementsByTagName("script")[0], n = E("script", { type: "text/javascript", src: e, async: "" });
@@ -16123,10 +16144,10 @@ function Zw(e) {
16123
16144
  throw new Error(r);
16124
16145
  }
16125
16146
  }
16126
- function eb(e = window) {
16147
+ function mb(e = window) {
16127
16148
  return { x: e.scrollX, y: e.scrollY };
16128
16149
  }
16129
- function ob() {
16150
+ function lb() {
16130
16151
  try {
16131
16152
  let e, t = U(() => {
16132
16153
  let r = document.documentElement.scrollTop || document.body.scrollTop;
@@ -16136,7 +16157,7 @@ function ob() {
16136
16157
  throw new Error(e);
16137
16158
  }
16138
16159
  }
16139
- function cb(e, t) {
16160
+ function xb(e, t) {
16140
16161
  try {
16141
16162
  if (g(e) && (e = v(e)), !e)
16142
16163
  return;
@@ -16145,18 +16166,18 @@ function cb(e, t) {
16145
16166
  throw new Error(r);
16146
16167
  }
16147
16168
  }
16148
- function pb(e, t = 40) {
16169
+ function Mb(e, t = 40) {
16149
16170
  let r = pt(e, t);
16150
- return x(window, "scroll", () => r(Qr()));
16171
+ return x(window, "scroll", () => r(_r()));
16151
16172
  }
16152
- function Qr() {
16173
+ function _r() {
16153
16174
  let e = document.body.scrollHeight || document.documentElement.scrollHeight, t = document.documentElement.clientHeight || document.body.clientHeight, r = e - t;
16154
16175
  return `${(document.documentElement.scrollTop || document.body.scrollTop) / r * 100}%`;
16155
16176
  }
16156
16177
  var ye;
16157
- var Ot = { text: "", lang: "zh-CN", volume: 1, rate: 1, pitch: 0.5, voice: null };
16158
- function Mb(e) {
16159
- let t = Rt(e), r = true, n = () => speechSynthesis.cancel();
16178
+ var Rt = { text: "", lang: "zh-CN", volume: 1, rate: 1, pitch: 0.5, voice: null };
16179
+ function Lb(e) {
16180
+ let t = jt(e), r = true, n = () => speechSynthesis.cancel();
16160
16181
  return Xe(n), { cancel: n, pause: () => speechSynthesis.pause(), resume: () => speechSynthesis.resume(), speak: (o) => {
16161
16182
  if (g(o)) {
16162
16183
  if (o === t && (r = !r, !r))
@@ -16168,22 +16189,22 @@ function Mb(e) {
16168
16189
  return n();
16169
16190
  t = i;
16170
16191
  }
16171
- o = o || t, o && (Rt(o), speechSynthesis.speak(ye));
16192
+ o = o || t, o && (jt(o), speechSynthesis.speak(ye));
16172
16193
  }, isSpeaking: () => speechSynthesis.speaking };
16173
16194
  }
16174
- function Rt(e) {
16175
- return ye = Object.assign(ye || new SpeechSynthesisUtterance(), g(e) ? { ...Ot, text: e } : { ...Ot, ...e }), ye.text;
16195
+ function jt(e) {
16196
+ return ye = Object.assign(ye || new SpeechSynthesisUtterance(), g(e) ? { ...Rt, text: e } : { ...Rt, ...e }), ye.text;
16176
16197
  }
16177
- var jt = { continuous: true, interimResults: false, lang: "zh-CN", maxAlternatives: 1 };
16178
- function vb(e = jt, t) {
16198
+ var Nt = { continuous: true, interimResults: false, lang: "zh-CN", maxAlternatives: 1 };
16199
+ function jb(e = Nt, t) {
16179
16200
  let r = false;
16180
- D(e) && (t = e, e = jt);
16201
+ D(e) && (t = e, e = Nt);
16181
16202
  let n = window.SpeechRecognition || window.webkitSpeechRecognition, o = new n();
16182
16203
  return Object.assign(o, e), o.onresult = (i) => t == null ? void 0 : t(i.results), { toggle: () => {
16183
16204
  r ? o.stop() : o.start(), r = !r;
16184
16205
  }, abort: () => o.abort() };
16185
16206
  }
16186
- function Db() {
16207
+ function kb() {
16187
16208
  return new Promise((e, t) => {
16188
16209
  let r = window.indexedDB || window.webkitIndexedDB || window.mozIndexedDB || window.msIndexedDB;
16189
16210
  r || t(new Error("\u6D4F\u89C8\u5668\u4E0D\u652F\u6301indexedDB"));
@@ -16242,7 +16263,7 @@ function Db() {
16242
16263
  };
16243
16264
  });
16244
16265
  }
16245
- var Ob = { get(e) {
16266
+ var Hb = { get(e) {
16246
16267
  try {
16247
16268
  let t = `${e}=`, r = document.cookie.split(";");
16248
16269
  for (let n = 0; n < r.length; n++) {
@@ -16266,7 +16287,7 @@ var Ob = { get(e) {
16266
16287
  }, delete(e) {
16267
16288
  this.set(e, "", -1);
16268
16289
  } };
16269
- function Pb() {
16290
+ function Vb() {
16270
16291
  return { set(e, t) {
16271
16292
  T(e) ? Object.keys(e).forEach((r) => localStorage.setItem(r, e[r])) : localStorage.setItem(e, t);
16272
16293
  }, get(e) {
@@ -16277,7 +16298,7 @@ function Pb() {
16277
16298
  localStorage.clear();
16278
16299
  } };
16279
16300
  }
16280
- function zb() {
16301
+ function _b() {
16281
16302
  return { set(e, t) {
16282
16303
  T(e) ? Object.keys(e).forEach((r) => sessionStorage.setItem(r, e[r])) : sessionStorage.setItem(e, t);
16283
16304
  }, get(e) {
@@ -16288,7 +16309,7 @@ function zb() {
16288
16309
  sessionStorage.clear();
16289
16310
  } };
16290
16311
  }
16291
- function qb(e) {
16312
+ function oM(e) {
16292
16313
  let { data: t, filename: r = he(), title: n, filter: o } = e;
16293
16314
  if (!t)
16294
16315
  return;
@@ -16303,7 +16324,7 @@ function qb(e) {
16303
16324
  c += `<td>${m}</td>`;
16304
16325
  else {
16305
16326
  let { value: f, width: p, colspan: d2 = 0, rowspan: y = 0 } = m;
16306
- c += `<td width=${p} colspan=${d2} rowspan=${y} style="${Nt(m)}">${f}</td>`;
16327
+ c += `<td width=${p} colspan=${d2} rowspan=${y} style="${Pt(m)}">${f}</td>`;
16307
16328
  }
16308
16329
  }
16309
16330
  } else {
@@ -16312,22 +16333,22 @@ function qb(e) {
16312
16333
  c += `<td align='center'>${m}</td>`;
16313
16334
  else {
16314
16335
  let { value: f, width: p, colspan: d2 = 0, rowspan: y = 0 } = m;
16315
- c += `<td align='center' width=${p} colspan=${d2} rowspan=${y} style="${Nt(m)}">${f}</td>`;
16336
+ c += `<td align='center' width=${p} colspan=${d2} rowspan=${y} style="${Pt(m)}">${f}</td>`;
16316
16337
  }
16317
16338
  }
16318
16339
  s += `${c}</tr>`;
16319
16340
  }
16320
- s += "</table>", E("a", { href: `data:application/vnd.ms-excel;charset=utf-8,${encodeURIComponent(Zr(s))}`, style: "visibility:hidden", download: `${r}.xls` }).click();
16341
+ s += "</table>", E("a", { href: `data:application/vnd.ms-excel;charset=utf-8,${encodeURIComponent(qr(s))}`, style: "visibility:hidden", download: `${r}.xls` }).click();
16321
16342
  }
16322
- function Nt(e) {
16343
+ function Pt(e) {
16323
16344
  let t = "", { style: r = "", background: n, color: o } = e;
16324
16345
  return n && (t += `background:${n};`), o && (t += `color:${o};`), t += r;
16325
16346
  }
16326
- function Zr(e) {
16347
+ function qr(e) {
16327
16348
  return `<html xmlns:o='urn:schemas-microsoft-com:office:office' xmlns:x='urn:schemas-microsoft-com:office:excel' xmlns='http://www.w3.org/TR/REC-html40'><meta http-equiv="content-type" content="application/vnd.ms-excel; charset=UTF-8">
16328
16349
  <meta http-equiv="content-type" content="application/vnd.ms-excel';charset=UTF-8"><head><!--[if gte mso 9]><xml><x:ExcelWorkbook><x:ExcelWorksheets><x:ExcelWorksheet><x:Name>{worksheet}</x:Name><x:WorksheetOptions><x:DisplayGridlines/></x:WorksheetOptions></x:ExcelWorksheet></x:ExcelWorksheets></x:ExcelWorkbook></xml><![endif]--></head><body>${e}</body></html>`;
16329
16350
  }
16330
- function Jb(e, t = 0, r = {}) {
16351
+ function aM(e, t = 0, r = {}) {
16331
16352
  T(t) && (r = t, t = 0);
16332
16353
  let { id: n = "id", pid: o = "pid", children: i = "children" } = r;
16333
16354
  return s(t)[0];
@@ -16335,38 +16356,38 @@ function Jb(e, t = 0, r = {}) {
16335
16356
  return e.filter((c) => c[o] === a).map((c) => ({ ...c, [i]: s(c[n]) }));
16336
16357
  }
16337
16358
  }
16338
- function eM(e) {
16359
+ function mM(e) {
16339
16360
  var s, a;
16340
16361
  let t = e.split(","), r = (a = (s = t[0]) == null ? void 0 : s.match(/:(.*?);/)) == null ? void 0 : a[1], n = atob(t[1]), o = n.length, i = new Uint8Array(o);
16341
16362
  for (; o--; )
16342
16363
  i[o] = n.charCodeAt(o);
16343
16364
  return new Blob([i], { type: r });
16344
16365
  }
16345
- function rM(e, t) {
16366
+ function fM(e, t) {
16346
16367
  var a, c;
16347
16368
  let r = e.split(","), n = (c = (a = r[0]) == null ? void 0 : a.match(/:(.*?);/)) == null ? void 0 : c[1], o = atob(r[1]), i = o.length, s = new Uint8Array(i);
16348
16369
  for (; i--; )
16349
16370
  s[i] = o.charCodeAt(i);
16350
16371
  return new File([s], t, { type: n });
16351
16372
  }
16352
- function oM(e, t) {
16373
+ function lM(e, t) {
16353
16374
  t = t || 0;
16354
16375
  let r = e.length - t, n = new Array(r);
16355
16376
  for (; r--; )
16356
16377
  n[r] = e[r + t];
16357
16378
  return n;
16358
16379
  }
16359
- function aM(e, t) {
16380
+ function hM(e, t) {
16360
16381
  return e.reduce((r, n) => T(n) ? Object.keys(n).reduce((o, i) => (t && !t.includes(i) || (o[i] || (o[i] = []), o[i].push(n[i])), o), r) : r, {});
16361
16382
  }
16362
- function mM(e = {}, t = "children") {
16383
+ function yM(e = {}, t = "children") {
16363
16384
  let r = [];
16364
- return r.push({ ...e }), e[t].length && Pt(e[t], r), r.filter((n) => delete n[t]);
16385
+ return r.push({ ...e }), e[t].length && Ft(e[t], r), r.filter((n) => delete n[t]);
16365
16386
  }
16366
- function Pt(e, t = []) {
16367
- return e.reduce((r, n) => (r.push({ ...n }), n.children.length ? Pt(n.children, r) : r), t);
16387
+ function Ft(e, t = []) {
16388
+ return e.reduce((r, n) => (r.push({ ...n }), n.children.length ? Ft(n.children, r) : r), t);
16368
16389
  }
16369
- function Ft(e) {
16390
+ function $t(e) {
16370
16391
  return new Promise((t, r) => {
16371
16392
  let n = new FileReader();
16372
16393
  n.onload = function() {
@@ -16375,28 +16396,28 @@ function Ft(e) {
16375
16396
  }, n.onerror = r, n.readAsArrayBuffer(e);
16376
16397
  });
16377
16398
  }
16378
- async function lM(e, t = e.type) {
16379
- let r = await Ft(e);
16399
+ async function EM(e, t = e.type) {
16400
+ let r = await $t(e);
16380
16401
  return new Blob([r], { type: t });
16381
16402
  }
16382
- function dM(e) {
16403
+ function vM(e) {
16383
16404
  return window.URL.createObjectURL(e);
16384
16405
  }
16385
- function yM(e) {
16406
+ function SM(e) {
16386
16407
  let t = /rgb\(([\w\s,]+)\)/, r = e.match(t);
16387
16408
  if (!r)
16388
16409
  return;
16389
16410
  let [n, o] = r, [i, s, a] = ae(o, "all").split(",");
16390
16411
  return `#${((1 << 24) + (+i << 16) + (+s << 8) + +a).toString(16).slice(1)}`;
16391
16412
  }
16392
- function bM(e, t) {
16413
+ function DM(e, t) {
16393
16414
  let r = 7 - e.length;
16394
16415
  if (r > 0 && (e = e + e.slice(-1).repeat(r)), r < 0)
16395
16416
  throw new Error("hex length > 7");
16396
- let n = `${parseInt(`0x${e.slice(1, 3)}`)},${parseInt(`0x${e.slice(3, 5)}`)},${parseInt(`0x${e.slice(5, 7)}`)}`;
16417
+ let n = `${Number.parseInt(`0x${e.slice(1, 3)}`)},${Number.parseInt(`0x${e.slice(3, 5)}`)},${Number.parseInt(`0x${e.slice(5, 7)}`)}`;
16397
16418
  return t ? `rgba(${n},${t})` : `rgb(${n})`;
16398
16419
  }
16399
- async function UM(e) {
16420
+ async function XM(e) {
16400
16421
  let t = await import_promises5.default.readFile(import_path8.default.resolve(import_process5.default.cwd(), e), "utf-8");
16401
16422
  return { name: "vite-plugin-copy-html", writeBundle(r, n) {
16402
16423
  let o = `${r.dir}/index.html`, i = [], s = [];
@@ -16407,139 +16428,141 @@ async function UM(e) {
16407
16428
  </body>`)), import_promises5.default.writeFile(import_path8.default.resolve(o), t, "utf-8");
16408
16429
  } };
16409
16430
  }
16410
- function WM(e) {
16431
+ function JM(e) {
16411
16432
  return { name: "vite-plugin-export", transform(t, r) {
16412
16433
  if (r.endsWith(e))
16413
16434
  return { code: `export default ${JSON.stringify(t)}`, map: null };
16414
16435
  } };
16415
16436
  }
16416
- var qM = (e = {}) => J({ name: "tsup", target: "node14", minify: true, dts: { resolve: true, entry: "./src/index.ts" } }, e);
16417
- function KM(e) {
16437
+ function oE(e = {}) {
16438
+ return J({ name: "tsup", target: "node14", minify: true, dts: { resolve: true, entry: "./src/index.ts" } }, e);
16439
+ }
16440
+ function cE(e) {
16418
16441
  return e * e * ((1.70158 + 1) * e - 1.70158);
16419
16442
  }
16420
- function tE(e) {
16443
+ function uE(e) {
16421
16444
  let t = 2.5949095;
16422
16445
  return (e *= 2) < 1 ? 0.5 * (e * e * ((t + 1) * e - t)) : 0.5 * ((e -= 2) * e * ((t + 1) * e + t) + 2);
16423
16446
  }
16424
- function nE(e) {
16447
+ function pE(e) {
16425
16448
  return --e * e * ((1.70158 + 1) * e + 1.70158) + 1;
16426
16449
  }
16427
16450
  function re(e) {
16428
16451
  let t = 0.36363636363636365, r = 8 / 11, n = 9 / 10, o = 4356 / 361, i = 35442 / 1805, s = 16061 / 1805, a = e * e;
16429
16452
  return e < t ? 7.5625 * a : e < r ? 9.075 * a - 9.9 * e + 3.4 : e < n ? o * a - i * e + s : 10.8 * e * e - 20.52 * e + 10.72;
16430
16453
  }
16431
- function aE(e) {
16454
+ function hE(e) {
16432
16455
  return 1 - re(1 - e);
16433
16456
  }
16434
- function uE(e) {
16457
+ function wE(e) {
16435
16458
  return e < 0.5 ? 0.5 * (1 - re(1 - e * 2)) : 0.5 * re(e * 2 - 1) + 0.5;
16436
16459
  }
16437
- function pE(e) {
16460
+ function ME(e) {
16438
16461
  return 1 - Math.sqrt(1 - e * e);
16439
16462
  }
16440
- function gE(e) {
16463
+ function IE(e) {
16441
16464
  return (e *= 2) < 1 ? -0.5 * (Math.sqrt(1 - e * e) - 1) : 0.5 * (Math.sqrt(1 - (e -= 2) * e) + 1);
16442
16465
  }
16443
- function hE(e) {
16466
+ function TE(e) {
16444
16467
  return Math.sqrt(1 - --e * e);
16445
16468
  }
16446
- function yE(e) {
16469
+ function SE(e) {
16447
16470
  return e * e * e;
16448
16471
  }
16449
- function bE(e) {
16472
+ function DE(e) {
16450
16473
  return e < 0.5 ? 4 * e * e * e : 0.5 * (2 * e - 2) ** 3 + 1;
16451
16474
  }
16452
- function EE(e) {
16475
+ function OE(e) {
16453
16476
  let t = e - 1;
16454
16477
  return t * t * t + 1;
16455
16478
  }
16456
- function vE(e) {
16479
+ function jE(e) {
16457
16480
  return Math.sin(13 * e * Math.PI / 2) * 2 ** (10 * (e - 1));
16458
16481
  }
16459
- function CE(e) {
16482
+ function PE(e) {
16460
16483
  return e < 0.5 ? 0.5 * Math.sin(13 * Math.PI / 2 * 2 * e) * 2 ** (10 * (2 * e - 1)) : 0.5 * Math.sin(-13 * Math.PI / 2 * (2 * e - 1 + 1)) * 2 ** (-10 * (2 * e - 1)) + 1;
16461
16484
  }
16462
- function AE(e) {
16485
+ function $E(e) {
16463
16486
  return Math.sin(-13 * (e + 1) * Math.PI / 2) * 2 ** (-10 * e) + 1;
16464
16487
  }
16465
- function LE(e) {
16488
+ function zE(e) {
16466
16489
  return e === 0 ? e : 2 ** (10 * (e - 1));
16467
16490
  }
16468
- function RE(e) {
16491
+ function UE(e) {
16469
16492
  return e === 0 || e === 1 ? e : e < 0.5 ? 0.5 * 2 ** (20 * e - 10) : -0.5 * 2 ** (10 - e * 20) + 1;
16470
16493
  }
16471
- function NE(e) {
16494
+ function WE(e) {
16472
16495
  return e === 1 ? e : 1 - 2 ** (-10 * e);
16473
16496
  }
16474
- function FE(e) {
16497
+ function YE(e) {
16475
16498
  return e * e;
16476
16499
  }
16477
- function kE(e) {
16500
+ function ZE(e) {
16478
16501
  return e /= 0.5, e < 1 ? 0.5 * e * e : (e--, -0.5 * (e * (e - 2) - 1));
16479
16502
  }
16480
- function HE(e) {
16503
+ function qE(e) {
16481
16504
  return -e * (e - 2);
16482
16505
  }
16483
- function BE(e) {
16506
+ function GE(e) {
16484
16507
  return e ** 4;
16485
16508
  }
16486
- function VE(e) {
16509
+ function KE(e) {
16487
16510
  return e < 0.5 ? 8 * e ** 4 : -8 * (e - 1) ** 4 + 1;
16488
16511
  }
16489
- function QE(e) {
16512
+ function tI(e) {
16490
16513
  return (e - 1) ** 3 * (1 - e) + 1;
16491
16514
  }
16492
- function _E(e) {
16515
+ function nI(e) {
16493
16516
  return e * e * e * e * e;
16494
16517
  }
16495
- function XE(e) {
16518
+ function iI(e) {
16496
16519
  return (e *= 2) < 1 ? 0.5 * e * e * e * e * e : 0.5 * ((e -= 2) * e * e * e * e + 2);
16497
16520
  }
16498
- function JE(e) {
16521
+ function aI(e) {
16499
16522
  return --e * e * e * e * e + 1;
16500
16523
  }
16501
- function eI(e) {
16524
+ function mI(e) {
16502
16525
  let t = Math.cos(e * Math.PI * 0.5);
16503
16526
  return Math.abs(t) < 1e-14 ? 1 : 1 - t;
16504
16527
  }
16505
- function rI(e) {
16528
+ function fI(e) {
16506
16529
  return -0.5 * (Math.cos(Math.PI * e) - 1);
16507
16530
  }
16508
- function oI(e) {
16531
+ function lI(e) {
16509
16532
  return Math.sin(e * Math.PI / 2);
16510
16533
  }
16511
- function aI(e, t, r, n = () => {
16534
+ function hI(e, t, r, n = () => {
16512
16535
  }) {
16513
16536
  let o = t - e, i = Date.now(), s = e;
16514
16537
  n(s);
16515
16538
  let c = U(() => {
16516
- let m = Date.now() - i, f = m / r, p = qr(f), d2 = Math.round(o * p);
16539
+ let m = Date.now() - i, f = m / r, p = Gr(f), d2 = Math.round(o * p);
16517
16540
  if (m >= r)
16518
16541
  return s = t, n(s), c();
16519
16542
  s = e + d2, n(s);
16520
16543
  }, 50);
16521
16544
  }
16522
- function qr(e) {
16545
+ function Gr(e) {
16523
16546
  let t = [{ x: 0, y: 0 }, { x: 0.4, y: 0.8 }, { x: 0.6, y: 1 }, { x: 1, y: 1 }], r = 0, n = t.length - 1;
16524
16547
  for (let o = 0; o <= n; o++) {
16525
- let i = Xr(n, o), s = e ** o * (1 - e) ** (n - o);
16548
+ let i = Jr(n, o), s = e ** o * (1 - e) ** (n - o);
16526
16549
  r += i * t[o].y * s;
16527
16550
  }
16528
16551
  return r;
16529
16552
  }
16530
- function Xr(e, t) {
16553
+ function Jr(e, t) {
16531
16554
  let r = 1;
16532
16555
  for (let n = 1; n <= t; n++)
16533
16556
  r *= (e - n + 1) / n;
16534
16557
  return r;
16535
16558
  }
16536
- function BI(e) {
16559
+ function GI(e) {
16537
16560
  let t = matchMedia("(prefers-color-scheme: dark)");
16538
16561
  return e(t.matches ? "dark" : "light"), x(t, "change", () => e(t.matches ? "dark" : "light"));
16539
16562
  }
16540
16563
 
16541
16564
  // src/index.ts
16542
- var import_picocolors5 = __toESM(require_picocolors(), 1);
16565
+ var import_picocolors6 = __toESM(require_picocolors(), 1);
16543
16566
  var import_fast_glob = __toESM(require("fast-glob"), 1);
16544
16567
 
16545
16568
  // src/utils.ts
@@ -18016,10 +18039,10 @@ var D2 = /\s-D(?!w)/;
18016
18039
  var d = /\s-d(?!w)/;
18017
18040
  var isZh = process.env.PI_Lang === "zh";
18018
18041
  async function getParams(params) {
18019
- var _a2, _b;
18042
+ var _a2, _b2;
18020
18043
  const root = process.cwd();
18021
18044
  try {
18022
- switch (await bx()) {
18045
+ switch (await Tx()) {
18023
18046
  case "pnpm":
18024
18047
  if (!P(import_path9.default.resolve(root, "./pnpm-workspace.yaml"))) {
18025
18048
  if (DW.test(params))
@@ -18046,7 +18069,7 @@ async function getParams(params) {
18046
18069
  return params.replace(W2, " -w");
18047
18070
  return params;
18048
18071
  case "yarn":
18049
- if (!((_a2 = await yt(import_path9.default.resolve(root, "./package.json"))) == null ? void 0 : _a2.workspaces)) {
18072
+ if (!((_a2 = await wt(import_path9.default.resolve(root, "./package.json"))) == null ? void 0 : _a2.workspaces)) {
18050
18073
  if (Dw2.test(params))
18051
18074
  return params.replace(Dw2, " -D");
18052
18075
  if (DW.test(params))
@@ -18056,7 +18079,7 @@ async function getParams(params) {
18056
18079
  if (w2.test(params))
18057
18080
  return params.replace(w2, "");
18058
18081
  }
18059
- if ((_b = await yt()) == null ? void 0 : _b.workspaces) {
18082
+ if ((_b2 = await wt()) == null ? void 0 : _b2.workspaces) {
18060
18083
  if (D2.test(params))
18061
18084
  return params.replace(D2, " -DW");
18062
18085
  if (d.test(params))
@@ -18083,23 +18106,23 @@ async function getParams(params) {
18083
18106
  }
18084
18107
  }
18085
18108
  async function loading(text) {
18086
- const { color: color3, spinner } = await getStyle();
18109
+ const { color: color4, spinner } = await getStyle();
18087
18110
  return ora({
18088
18111
  text,
18089
18112
  spinner,
18090
- color: color3,
18113
+ color: color4,
18091
18114
  discardStdin: true
18092
18115
  }).start();
18093
18116
  }
18094
18117
  async function getStyle() {
18095
- const { PI_COLOR: color3 = "yellow", PI_SPINNER: spinner = "star" } = process.env;
18118
+ const { PI_COLOR: color4 = "yellow", PI_SPINNER: spinner = "star" } = process.env;
18096
18119
  return {
18097
- color: color3,
18120
+ color: color4,
18098
18121
  spinner
18099
18122
  };
18100
18123
  }
18101
18124
  function getLatestVersion(pkg) {
18102
- const { status, result } = H(`npm view ${pkg}`, "pipe");
18125
+ const { status, result } = F(`npm view ${pkg}`, "pipe");
18103
18126
  if (status === 0)
18104
18127
  return result.match(/@([^\s]+)/)[1];
18105
18128
  else
@@ -18107,19 +18130,19 @@ function getLatestVersion(pkg) {
18107
18130
  }
18108
18131
 
18109
18132
  // package.json
18110
- var version = "0.0.68";
18133
+ var version = "0.0.71";
18111
18134
 
18112
18135
  // src/help.ts
18113
18136
  var isZh2 = process.env.PI_Lang === "zh";
18114
18137
  function help(argv) {
18115
18138
  const arg = argv[0];
18116
18139
  if (arg === "-v" || arg === "--version") {
18117
- H(
18140
+ F(
18118
18141
  isZh2 ? `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi \u7248\u672C: ${version}" "\u8BF7\u4E3A\u6211\u7684\u52AA\u529B\u70B9\u4E00\u4E2A\u884C \u{1F31F}" "\u8C22\u8C22 \u{1F91F}"` : `gum style --foreground 212 --border-foreground 212 --border double --align center --width 50 --margin "1 2" --padding "2 4" "pi version: ${version}" "Please give me a \u{1F31F} for my efforts" "Thank you \u{1F91F}"`
18119
18142
  );
18120
18143
  process.exit(0);
18121
18144
  } else if (arg === "-h" || arg === "--help") {
18122
- H(
18145
+ F(
18123
18146
  `gum style --foreground 212 --border-foreground 212 --border double --align left --width 50 --margin "1 2" --padding "1 1" "PI Commands:" "~ pi: install package" "~ pix: npx package" "~ pui: uninstall package" "~ prun: run package script" "~ pinit: package init" "~ pbuild: go build | cargo build" "~ pfind: find monorepo of yarn or pnpm" "~ pa: agent alias" "~ pu: package upgrade" "~ pci: package clean install" "~ pil: package latest install"
18124
18147
  `
18125
18148
  );
@@ -18128,18 +18151,41 @@ function help(argv) {
18128
18151
  }
18129
18152
 
18130
18153
  // src/installDeps.ts
18154
+ var import_picocolors2 = __toESM(require_picocolors(), 1);
18131
18155
  async function installDeps() {
18132
- const { status: hasGum } = H("gum -v", "pipe");
18133
- if (hasGum === 1)
18134
- await H("brew install gum", "pipe");
18135
- const { status: hasNi } = H("ni -v", "pipe");
18136
- if (hasNi === 1)
18137
- await H("npm i -g @antfu/ni", "pipe");
18156
+ if (!Gx("gum")) {
18157
+ console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56gum..."));
18158
+ const { status } = await F("brew install gum", "pipe");
18159
+ if (status === 0) {
18160
+ console.log(import_picocolors2.default.cyan("gum \u5B89\u88C5\u6210\u529F!"));
18161
+ } else {
18162
+ console.log(
18163
+ import_picocolors2.default.red(
18164
+ "gum \u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u4ECE\u5B98\u7F51\u89E3\u51B3\u5B89\u88C5\u95EE\u9898! https://github.com/charmbracelet/gum"
18165
+ )
18166
+ );
18167
+ process.exit(1);
18168
+ }
18169
+ }
18170
+ if (!Gx("ni")) {
18171
+ console.log(import_picocolors2.default.cyan("\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5\u5FC5\u8981\u7684\u4F9D\u8D56ni..."));
18172
+ const { status } = await F("npm i -g @antfu/ni", "pipe");
18173
+ if (status === 0) {
18174
+ console.log(import_picocolors2.default.cyan("ni \u5B89\u88C5\u6210\u529F!"));
18175
+ } else {
18176
+ console.log(
18177
+ import_picocolors2.default.red(
18178
+ "ni \u5B89\u88C5\u5931\u8D25\uFF0C\u8BF7\u5C1D\u8BD5\u4ECE\u5B98\u7F51\u89E3\u51B3\u5B89\u88C5\u95EE\u9898! https://github.com/antfu/ni"
18179
+ )
18180
+ );
18181
+ process.exit(1);
18182
+ }
18183
+ }
18138
18184
  }
18139
18185
 
18140
18186
  // src/pi.ts
18141
18187
  var import_process6 = __toESM(require("process"), 1);
18142
- var import_picocolors2 = __toESM(require_picocolors(), 1);
18188
+ var import_picocolors3 = __toESM(require_picocolors(), 1);
18143
18189
  var isZh3 = import_process6.default.env.PI_Lang === "zh";
18144
18190
  async function pi(params, pkg, executor = "ni") {
18145
18191
  const text = pkg ? `Installing ${pkg} ...` : "Updating dependency ...";
@@ -18157,7 +18203,7 @@ async function pi(params, pkg, executor = "ni") {
18157
18203
  let stdio = "pipe";
18158
18204
  let loading_status;
18159
18205
  const { PI_DEFAULT, PI_MaxSockets: sockets } = import_process6.default.env;
18160
- const pkgTool = await bx();
18206
+ const pkgTool = await Tx();
18161
18207
  const maxSockets = sockets || 4;
18162
18208
  const install = PI_DEFAULT === "yarn" || pkgTool === "yarn" ? newParams ? "add" : "" : "install";
18163
18209
  if (pkgTool === "npm") {
@@ -18173,7 +18219,7 @@ async function pi(params, pkg, executor = "ni") {
18173
18219
  loading_status = await loading(text);
18174
18220
  }
18175
18221
  const runSockets = executor.split(" ")[0] === "npm" ? ` --max-sockets=${maxSockets}` : "";
18176
- const { status, result } = await Rx({
18222
+ const { status, result } = await $x({
18177
18223
  params: `${executor}${newParams ? ` ${newParams}` : runSockets}`,
18178
18224
  stdio
18179
18225
  });
@@ -18181,15 +18227,15 @@ async function pi(params, pkg, executor = "ni") {
18181
18227
  loading_status = await loading("");
18182
18228
  const end = Date.now();
18183
18229
  const costTime = (end - start) / 1e3;
18184
- successMsg += import_picocolors2.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
18230
+ successMsg += import_picocolors3.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
18185
18231
  if (status === 0) {
18186
- loading_status.succeed(import_picocolors2.default.green(successMsg));
18232
+ loading_status.succeed(import_picocolors3.default.green(successMsg));
18187
18233
  } else if (result && result.includes("Not Found - 404")) {
18188
18234
  const _result = isZh3 ? `${pkg} \u5305\u540D\u53EF\u80FD\u6709\u8BEF\uFF0C\u5E76\u4E0D\u80FD\u5728npm\u4E2D\u641C\u7D22\u5230\uFF0C\u8BF7\u68C0\u67E5` : `${pkg} the package name may be wrong, and cannot be found in npm, please check`;
18189
- loading_status.fail(import_picocolors2.default.red(result ? `${failMsg}
18235
+ loading_status.fail(import_picocolors3.default.red(result ? `${failMsg}
18190
18236
  ${_result}` : failMsg));
18191
18237
  } else {
18192
- loading_status.fail(import_picocolors2.default.red(result ? `${failMsg}
18238
+ loading_status.fail(import_picocolors3.default.red(result ? `${failMsg}
18193
18239
  ${result}` : failMsg));
18194
18240
  }
18195
18241
  if (result) {
@@ -18197,7 +18243,7 @@ ${result}` : failMsg));
18197
18243
  const match = result.match(reg2);
18198
18244
  if (match) {
18199
18245
  const dep = match[1];
18200
- H(`pi ${dep}@latest`);
18246
+ F(`pi ${dep}@latest`);
18201
18247
  }
18202
18248
  }
18203
18249
  import_process6.default.exit();
@@ -18205,7 +18251,7 @@ ${result}` : failMsg));
18205
18251
 
18206
18252
  // src/pa.ts
18207
18253
  function pa() {
18208
- return H("na");
18254
+ return F("na");
18209
18255
  }
18210
18256
 
18211
18257
  // src/pci.ts
@@ -18215,7 +18261,7 @@ function pci(params, pkg) {
18215
18261
 
18216
18262
  // src/pfind.ts
18217
18263
  function pfind(params) {
18218
- return H(`ccommand find ${params}`);
18264
+ return F(`ccommand find ${params}`);
18219
18265
  }
18220
18266
 
18221
18267
  // src/pil.ts
@@ -18241,28 +18287,28 @@ function addLatest(params) {
18241
18287
  // src/pinit.ts
18242
18288
  async function pinit() {
18243
18289
  console.log("Initializing project...");
18244
- switch (await bx()) {
18290
+ switch (await Tx()) {
18245
18291
  case "npm":
18246
- H("npm init -y");
18292
+ F("npm init -y");
18247
18293
  return;
18248
18294
  case "yarn":
18249
- H("yarn init -y");
18295
+ F("yarn init -y");
18250
18296
  return;
18251
18297
  case "pnpm":
18252
- H("pnpm init -y");
18298
+ F("pnpm init -y");
18253
18299
  return;
18254
18300
  default:
18255
- H("npm init -y");
18301
+ F("npm init -y");
18256
18302
  }
18257
18303
  }
18258
18304
 
18259
18305
  // src/pix.ts
18260
18306
  async function pix(params) {
18261
- switch (await bx()) {
18307
+ switch (await Tx()) {
18262
18308
  case "bun":
18263
- return H(`bunx ${params}`);
18309
+ return F(`bunx ${params}`);
18264
18310
  default:
18265
- return H(`npx ${params}`);
18311
+ return F(`npx ${params}`);
18266
18312
  }
18267
18313
  }
18268
18314
 
@@ -18274,11 +18320,11 @@ function prun(params) {
18274
18320
 
18275
18321
  // src/pu.ts
18276
18322
  function pu() {
18277
- return H("nu");
18323
+ return F("nu");
18278
18324
  }
18279
18325
 
18280
18326
  // src/pui.ts
18281
- var import_picocolors3 = __toESM(require_picocolors(), 1);
18327
+ var import_picocolors4 = __toESM(require_picocolors(), 1);
18282
18328
  var isZh4 = process.env.PI_Lang === "zh";
18283
18329
  async function pui(params, pkg) {
18284
18330
  const text = `${isZh4 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${pkg} ...`;
@@ -18287,42 +18333,42 @@ async function pui(params, pkg) {
18287
18333
  const failMsg = isZh4 ? `${pkg}\u5378\u8F7D\u5931\u8D25 \u{1F62D}` : `Failed to uninstall ${pkg} \u{1F62D}`;
18288
18334
  if (!pkg) {
18289
18335
  console.log(
18290
- import_picocolors3.default.yellow(
18336
+ import_picocolors4.default.yellow(
18291
18337
  isZh4 ? "\u9700\u8981\u6307\u5B9A\u8981\u5378\u8F7D\u7684\u5305\u540D\uFF01" : "Need to specify an uninstall package name!"
18292
18338
  )
18293
18339
  );
18294
18340
  process.exit(1);
18295
18341
  }
18296
18342
  const loading_status = await loading(text);
18297
- const { status, result } = await Rx(`nun ${params}`);
18343
+ const { status, result } = await $x(`nun ${params}`);
18298
18344
  const end = Date.now();
18299
18345
  const costTime = (end - start) / 1e3;
18300
- successMsg += import_picocolors3.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
18346
+ successMsg += import_picocolors4.default.blue(` ---- \u23F0\uFF1A${costTime}s`);
18301
18347
  if (status === 0)
18302
- loading_status.succeed(import_picocolors3.default.green(successMsg));
18348
+ loading_status.succeed(import_picocolors4.default.green(successMsg));
18303
18349
  else
18304
- loading_status.fail(import_picocolors3.default.red(result ? `${failMsg}
18350
+ loading_status.fail(import_picocolors4.default.red(result ? `${failMsg}
18305
18351
  ${result}` : failMsg));
18306
18352
  process.exit();
18307
18353
  }
18308
18354
 
18309
18355
  // src/pio.ts
18310
18356
  var import_process7 = __toESM(require("process"), 1);
18311
- var import_picocolors4 = __toESM(require_picocolors(), 1);
18357
+ var import_picocolors5 = __toESM(require_picocolors(), 1);
18312
18358
  async function pio(params, pkg, executor = "ni") {
18313
18359
  const successMsg = pkg ? `Installed ${pkg} successfully! \u{1F60A}` : "Updated dependency successfully! \u{1F60A}";
18314
18360
  const failMsg = pkg ? `Failed to install ${pkg} \u{1F62D}` : "Failed to update dependency! \u{1F62D}";
18315
18361
  const offline = "--prefer-offline";
18316
18362
  const newParams = await getParams(params);
18317
- const { status, result } = await Rx({
18363
+ const { status, result } = await $x({
18318
18364
  params: `${executor} ${newParams} ${offline}`,
18319
18365
  stdio: "inherit"
18320
18366
  });
18321
18367
  const loading_status = await loading("");
18322
18368
  if (status === 0)
18323
- loading_status.succeed(import_picocolors4.default.green(successMsg));
18369
+ loading_status.succeed(import_picocolors5.default.green(successMsg));
18324
18370
  else
18325
- loading_status.fail(import_picocolors4.default.red(result ? `${result}
18371
+ loading_status.fail(import_picocolors5.default.red(result ? `${result}
18326
18372
 
18327
18373
  ${failMsg}` : failMsg));
18328
18374
  import_process7.default.exit();
@@ -18356,22 +18402,22 @@ async function setup() {
18356
18402
  }
18357
18403
  const argv = import_process8.default.argv.slice(2);
18358
18404
  help(argv);
18359
- const params = zi(argv.join(" ")).trim();
18360
- if (!Wx(rootPath)) {
18361
- if (yf()) {
18405
+ const params = Ui(argv.join(" ")).trim();
18406
+ if (!_x(rootPath)) {
18407
+ if (bf()) {
18362
18408
  if (exec === "pi") {
18363
18409
  const loading_status = await loading(
18364
18410
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
18365
18411
  `
18366
18412
  );
18367
- const { status } = await Rx(`go get ${params}`);
18413
+ const { status } = await $x(`go get ${params}`);
18368
18414
  if (status === 0) {
18369
18415
  loading_status.succeed(
18370
- import_picocolors5.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
18416
+ import_picocolors6.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
18371
18417
  );
18372
18418
  } else {
18373
18419
  loading_status.fail(
18374
- import_picocolors5.default.red(isZh5 ? "\u5B89\u88C5\u5931\u8D25 \u{1F62D}" : "Failed to install \u{1F62D}")
18420
+ import_picocolors6.default.red(isZh5 ? "\u5B89\u88C5\u5931\u8D25 \u{1F62D}" : "Failed to install \u{1F62D}")
18375
18421
  );
18376
18422
  }
18377
18423
  } else if (exec === "pui") {
@@ -18379,51 +18425,51 @@ async function setup() {
18379
18425
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
18380
18426
  `
18381
18427
  );
18382
- const { status } = await Rx(`go clean ${params}`);
18428
+ const { status } = await $x(`go clean ${params}`);
18383
18429
  if (status === 0) {
18384
18430
  loading_status.succeed(
18385
- import_picocolors5.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
18431
+ import_picocolors6.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
18386
18432
  );
18387
18433
  } else {
18388
18434
  loading_status.fail(
18389
- import_picocolors5.default.red(isZh5 ? "\u5378\u8F7D\u5931\u8D25 \u{1F62D}" : "Failed to uninstall \u{1F62D}")
18435
+ import_picocolors6.default.red(isZh5 ? "\u5378\u8F7D\u5931\u8D25 \u{1F62D}" : "Failed to uninstall \u{1F62D}")
18390
18436
  );
18391
18437
  }
18392
18438
  } else if (exec === "prun") {
18393
18439
  const match = params ? params.endsWith(".go") ? [`**/${params}`] : [`**/${params}.go`, `**/${params}/main.go`] : "main.go";
18394
18440
  const target = (await (0, import_fast_glob.default)(match))[0];
18395
18441
  if (!target) {
18396
- console.log(import_picocolors5.default.red("No such file"));
18442
+ console.log(import_picocolors6.default.red("No such file"));
18397
18443
  import_process8.default.exit(1);
18398
18444
  }
18399
- H(`go run ${target}`);
18445
+ F(`go run ${target}`);
18400
18446
  } else if (exec === "pinit") {
18401
- H(`go mod init ${params}`);
18447
+ F(`go mod init ${params}`);
18402
18448
  } else if (exec === "pbuild") {
18403
- H(`go build ${params}`);
18449
+ F(`go build ${params}`);
18404
18450
  } else {
18405
18451
  console.log(
18406
- import_picocolors5.default.red(
18452
+ import_picocolors6.default.red(
18407
18453
  isZh5 ? "\u5F53\u524D\u6307\u4EE4\u8FD8\u4E0D\u652F\u6301" : "The commands is not supported"
18408
18454
  )
18409
18455
  );
18410
18456
  }
18411
18457
  import_process8.default.exit();
18412
18458
  }
18413
- if (Wf()) {
18459
+ if (Yf()) {
18414
18460
  if (exec === "pi") {
18415
18461
  const loading_status = await loading(
18416
18462
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5B89\u88C5" : "Installing"} ${params} ...
18417
18463
  `
18418
18464
  );
18419
- const { status } = await Rx(`cargo install ${params}`);
18465
+ const { status } = await $x(`cargo install ${params}`);
18420
18466
  if (status === 0) {
18421
18467
  loading_status.succeed(
18422
- import_picocolors5.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
18468
+ import_picocolors6.default.green(isZh5 ? "\u5B89\u88C5\u6210\u529F! \u{1F60A}" : "Installed successfully! \u{1F60A}")
18423
18469
  );
18424
18470
  } else {
18425
18471
  loading_status.fail(
18426
- import_picocolors5.default.red(isZh5 ? "\u5B89\u88C5\u5931\u8D25 \u{1F62D}" : "Failed to install \u{1F62D}")
18472
+ import_picocolors6.default.red(isZh5 ? "\u5B89\u88C5\u5931\u8D25 \u{1F62D}" : "Failed to install \u{1F62D}")
18427
18473
  );
18428
18474
  }
18429
18475
  } else if (exec === "pui") {
@@ -18431,25 +18477,25 @@ async function setup() {
18431
18477
  `${isZh5 ? "\u6B63\u5728\u4E3A\u60A8\u5378\u8F7D" : "Uninstalling"} ${params} ...
18432
18478
  `
18433
18479
  );
18434
- const { status } = await Rx(`cargo uninstall ${params}`);
18480
+ const { status } = await $x(`cargo uninstall ${params}`);
18435
18481
  if (status === 0) {
18436
18482
  loading_status.succeed(
18437
- import_picocolors5.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
18483
+ import_picocolors6.default.green(isZh5 ? "\u5378\u8F7D\u6210\u529F! \u{1F60A}" : "Uninstalled successfully! \u{1F60A}")
18438
18484
  );
18439
18485
  } else {
18440
18486
  loading_status.fail(
18441
- import_picocolors5.default.red(isZh5 ? "\u5378\u8F7D\u5931\u8D25 \u{1F62D}" : "Failed to uninstall \u{1F62D}")
18487
+ import_picocolors6.default.red(isZh5 ? "\u5378\u8F7D\u5931\u8D25 \u{1F62D}" : "Failed to uninstall \u{1F62D}")
18442
18488
  );
18443
18489
  }
18444
18490
  } else if (exec === "prun") {
18445
- H(`cargo run ${params}`);
18491
+ F(`cargo run ${params}`);
18446
18492
  } else if (exec === "pinit") {
18447
- H(`cargo init ${params}`);
18493
+ F(`cargo init ${params}`);
18448
18494
  } else if (exec === "pbuild") {
18449
- H(`cargo build ${params}`);
18495
+ F(`cargo build ${params}`);
18450
18496
  } else {
18451
18497
  console.log(
18452
- import_picocolors5.default.red(
18498
+ import_picocolors6.default.red(
18453
18499
  isZh5 ? "\u5F53\u524D\u6307\u4EE4\u8FD8\u4E0D\u652F\u6301" : "The commands is not supported"
18454
18500
  )
18455
18501
  );
@@ -18458,7 +18504,7 @@ async function setup() {
18458
18504
  }
18459
18505
  if (!runMap[exec]) {
18460
18506
  console.log(
18461
- import_picocolors5.default.yellow(
18507
+ import_picocolors6.default.yellow(
18462
18508
  isZh5 ? "\u547D\u4EE4\u4E0D\u5B58\u5728\uFF0C\u8BF7\u6267\u884Cpi -h\u67E5\u770B\u5E2E\u52A9" : "The command does not exist, please execute pi -h to view the help"
18463
18509
  )
18464
18510
  );