@kevisual/cli 0.1.39 → 0.1.40

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -4,43 +4,25 @@ var __getProtoOf = Object.getPrototypeOf;
4
4
  var __defProp = Object.defineProperty;
5
5
  var __getOwnPropNames = Object.getOwnPropertyNames;
6
6
  var __hasOwnProp = Object.prototype.hasOwnProperty;
7
- function __accessProp(key) {
8
- return this[key];
9
- }
10
- var __toESMCache_node;
11
- var __toESMCache_esm;
12
7
  var __toESM = (mod, isNodeMode, target) => {
13
- var canCache = mod != null && typeof mod === "object";
14
- if (canCache) {
15
- var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
16
- var cached = cache.get(mod);
17
- if (cached)
18
- return cached;
19
- }
20
8
  target = mod != null ? __create(__getProtoOf(mod)) : {};
21
9
  const to = isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target;
22
10
  for (let key of __getOwnPropNames(mod))
23
11
  if (!__hasOwnProp.call(to, key))
24
12
  __defProp(to, key, {
25
- get: __accessProp.bind(mod, key),
13
+ get: () => mod[key],
26
14
  enumerable: true
27
15
  });
28
- if (canCache)
29
- cache.set(mod, to);
30
16
  return to;
31
17
  };
32
18
  var __commonJS = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
33
- var __returnValue = (v) => v;
34
- function __exportSetter(name, newValue) {
35
- this[name] = __returnValue.bind(null, newValue);
36
- }
37
19
  var __export = (target, all) => {
38
20
  for (var name in all)
39
21
  __defProp(target, name, {
40
22
  get: all[name],
41
23
  enumerable: true,
42
24
  configurable: true,
43
- set: __exportSetter.bind(all, name)
25
+ set: (newValue) => all[name] = () => newValue
44
26
  });
45
27
  };
46
28
  var __require = /* @__PURE__ */ createRequire(import.meta.url);
@@ -10493,15 +10475,15 @@ ${itemIndentStr}`);
10493
10475
  }
10494
10476
  let sumChunks = [chunks.shift()];
10495
10477
  let sumWidth = this.displayWidth(sumChunks[0]);
10496
- chunks.forEach((chunk2) => {
10497
- const visibleWidth = this.displayWidth(chunk2);
10478
+ chunks.forEach((chunk) => {
10479
+ const visibleWidth = this.displayWidth(chunk);
10498
10480
  if (sumWidth + visibleWidth <= width) {
10499
- sumChunks.push(chunk2);
10481
+ sumChunks.push(chunk);
10500
10482
  sumWidth += visibleWidth;
10501
10483
  return;
10502
10484
  }
10503
10485
  wrappedLines.push(sumChunks.join(""));
10504
- const nextChunk = chunk2.trimStart();
10486
+ const nextChunk = chunk.trimStart();
10505
10487
  sumChunks = [nextChunk];
10506
10488
  sumWidth = this.displayWidth(nextChunk);
10507
10489
  });
@@ -21585,7 +21567,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21585
21567
  var max = require_max();
21586
21568
  var min = require_min();
21587
21569
  var pow = require_pow();
21588
- var round2 = require_round();
21570
+ var round = require_round();
21589
21571
  var sign2 = require_sign2();
21590
21572
  var $Function = Function;
21591
21573
  var getEvalledConstructor = function(expressionSyntax) {
@@ -21697,7 +21679,7 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21697
21679
  "%Math.max%": max,
21698
21680
  "%Math.min%": min,
21699
21681
  "%Math.pow%": pow,
21700
- "%Math.round%": round2,
21682
+ "%Math.round%": round,
21701
21683
  "%Math.sign%": sign2,
21702
21684
  "%Reflect.getPrototypeOf%": $ReflectGPO
21703
21685
  };
@@ -21797,10 +21779,10 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21797
21779
  var reEscapeChar = /\\(\\)?/g;
21798
21780
  var stringToPath = function stringToPath2(string5) {
21799
21781
  var first = $strSlice(string5, 0, 1);
21800
- var last2 = $strSlice(string5, -1);
21801
- if (first === "%" && last2 !== "%") {
21782
+ var last = $strSlice(string5, -1);
21783
+ if (first === "%" && last !== "%") {
21802
21784
  throw new $SyntaxError("invalid intrinsic syntax, expected closing `%`");
21803
- } else if (last2 === "%" && first !== "%") {
21785
+ } else if (last === "%" && first !== "%") {
21804
21786
  throw new $SyntaxError("invalid intrinsic syntax, expected opening `%`");
21805
21787
  }
21806
21788
  var result = [];
@@ -21856,8 +21838,8 @@ var require_get_intrinsic = __commonJS((exports, module) => {
21856
21838
  for (var i = 1, isOwn = true;i < parts.length; i += 1) {
21857
21839
  var part = parts[i];
21858
21840
  var first = $strSlice(part, 0, 1);
21859
- var last2 = $strSlice(part, -1);
21860
- if ((first === '"' || first === "'" || first === "`" || (last2 === '"' || last2 === "'" || last2 === "`")) && first !== last2) {
21841
+ var last = $strSlice(part, -1);
21842
+ if ((first === '"' || first === "'" || first === "`" || (last === '"' || last === "'" || last === "`")) && first !== last) {
21861
21843
  throw new $SyntaxError("property names with quotes must have matching quotes");
21862
21844
  }
21863
21845
  if (part === "constructor" || !isOwn) {
@@ -22279,13 +22261,13 @@ var require_kind_of = __commonJS((exports, module) => {
22279
22261
  }
22280
22262
  if (isArray(val))
22281
22263
  return "array";
22282
- if (isBuffer2(val))
22264
+ if (isBuffer(val))
22283
22265
  return "buffer";
22284
22266
  if (isArguments(val))
22285
22267
  return "arguments";
22286
- if (isDate3(val))
22268
+ if (isDate(val))
22287
22269
  return "date";
22288
- if (isError2(val))
22270
+ if (isError(val))
22289
22271
  return "error";
22290
22272
  if (isRegexp(val))
22291
22273
  return "regexp";
@@ -22347,10 +22329,10 @@ var require_kind_of = __commonJS((exports, module) => {
22347
22329
  return Array.isArray(val);
22348
22330
  return val instanceof Array;
22349
22331
  }
22350
- function isError2(val) {
22332
+ function isError(val) {
22351
22333
  return val instanceof Error || typeof val.message === "string" && val.constructor && typeof val.constructor.stackTraceLimit === "number";
22352
22334
  }
22353
- function isDate3(val) {
22335
+ function isDate(val) {
22354
22336
  if (val instanceof Date)
22355
22337
  return true;
22356
22338
  return typeof val.toDateString === "function" && typeof val.getDate === "function" && typeof val.setDate === "function";
@@ -22378,7 +22360,7 @@ var require_kind_of = __commonJS((exports, module) => {
22378
22360
  }
22379
22361
  return false;
22380
22362
  }
22381
- function isBuffer2(val) {
22363
+ function isBuffer(val) {
22382
22364
  if (val.constructor && typeof val.constructor.isBuffer === "function") {
22383
22365
  return val.constructor.isBuffer(val);
22384
22366
  }
@@ -22436,7 +22418,7 @@ var require_section_matter = __commonJS((exports, module) => {
22436
22418
  options2 = { parse: options2 };
22437
22419
  }
22438
22420
  var file3 = toObject(input);
22439
- var defaults = { section_delimiter: "---", parse: identity2 };
22421
+ var defaults = { section_delimiter: "---", parse: identity };
22440
22422
  var opts = extend3({}, defaults, options2);
22441
22423
  var delim = opts.section_delimiter;
22442
22424
  var lines = file3.content.split(/\r?\n/);
@@ -22512,7 +22494,7 @@ var require_section_matter = __commonJS((exports, module) => {
22512
22494
  if (typeOf(input) !== "object") {
22513
22495
  input = { content: input };
22514
22496
  }
22515
- if (typeof input.content !== "string" && !isBuffer2(input.content)) {
22497
+ if (typeof input.content !== "string" && !isBuffer(input.content)) {
22516
22498
  throw new TypeError("expected a buffer or string");
22517
22499
  }
22518
22500
  input.content = input.content.toString();
@@ -22525,10 +22507,10 @@ var require_section_matter = __commonJS((exports, module) => {
22525
22507
  function createSection() {
22526
22508
  return { key: "", data: "", content: "" };
22527
22509
  }
22528
- function identity2(val) {
22510
+ function identity(val) {
22529
22511
  return val;
22530
22512
  }
22531
- function isBuffer2(val) {
22513
+ function isBuffer(val) {
22532
22514
  if (val && val.constructor && typeof val.constructor.isBuffer === "function") {
22533
22515
  return val.constructor.isBuffer(val);
22534
22516
  }
@@ -22596,10 +22578,10 @@ var require_exception = __commonJS((exports, module) => {
22596
22578
  }
22597
22579
  YAMLException.prototype = Object.create(Error.prototype);
22598
22580
  YAMLException.prototype.constructor = YAMLException;
22599
- YAMLException.prototype.toString = function toString(compact2) {
22581
+ YAMLException.prototype.toString = function toString(compact) {
22600
22582
  var result = this.name + ": ";
22601
22583
  result += this.reason || "(unknown reason)";
22602
- if (!compact2 && this.mark) {
22584
+ if (!compact && this.mark) {
22603
22585
  result += " " + this.mark.toString();
22604
22586
  }
22605
22587
  return result;
@@ -22618,44 +22600,44 @@ var require_mark = __commonJS((exports, module) => {
22618
22600
  this.column = column;
22619
22601
  }
22620
22602
  Mark.prototype.getSnippet = function getSnippet(indent, maxLength) {
22621
- var head2, start, tail2, end, snippet;
22603
+ var head, start, tail, end, snippet;
22622
22604
  if (!this.buffer)
22623
22605
  return null;
22624
22606
  indent = indent || 4;
22625
22607
  maxLength = maxLength || 75;
22626
- head2 = "";
22608
+ head = "";
22627
22609
  start = this.position;
22628
22610
  while (start > 0 && `\x00\r
22629
22611
  …\u2028\u2029`.indexOf(this.buffer.charAt(start - 1)) === -1) {
22630
22612
  start -= 1;
22631
22613
  if (this.position - start > maxLength / 2 - 1) {
22632
- head2 = " ... ";
22614
+ head = " ... ";
22633
22615
  start += 5;
22634
22616
  break;
22635
22617
  }
22636
22618
  }
22637
- tail2 = "";
22619
+ tail = "";
22638
22620
  end = this.position;
22639
22621
  while (end < this.buffer.length && `\x00\r
22640
22622
  …\u2028\u2029`.indexOf(this.buffer.charAt(end)) === -1) {
22641
22623
  end += 1;
22642
22624
  if (end - this.position > maxLength / 2 - 1) {
22643
- tail2 = " ... ";
22625
+ tail = " ... ";
22644
22626
  end -= 5;
22645
22627
  break;
22646
22628
  }
22647
22629
  }
22648
22630
  snippet = this.buffer.slice(start, end);
22649
- return common2.repeat(" ", indent) + head2 + snippet + tail2 + `
22650
- ` + common2.repeat(" ", indent + this.position - start + head2.length) + "^";
22631
+ return common2.repeat(" ", indent) + head + snippet + tail + `
22632
+ ` + common2.repeat(" ", indent + this.position - start + head.length) + "^";
22651
22633
  };
22652
- Mark.prototype.toString = function toString(compact2) {
22634
+ Mark.prototype.toString = function toString(compact) {
22653
22635
  var snippet, where = "";
22654
22636
  if (this.name) {
22655
22637
  where += 'in "' + this.name + '" ';
22656
22638
  }
22657
22639
  where += "at line " + (this.line + 1) + ", column " + (this.column + 1);
22658
- if (!compact2) {
22640
+ if (!compact) {
22659
22641
  snippet = this.getSnippet();
22660
22642
  if (snippet) {
22661
22643
  where += `:
@@ -22865,14 +22847,14 @@ var require_null = __commonJS((exports, module) => {
22865
22847
  function constructYamlNull() {
22866
22848
  return null;
22867
22849
  }
22868
- function isNull2(object3) {
22850
+ function isNull(object3) {
22869
22851
  return object3 === null;
22870
22852
  }
22871
22853
  module.exports = new Type("tag:yaml.org,2002:null", {
22872
22854
  kind: "scalar",
22873
22855
  resolve: resolveYamlNull,
22874
22856
  construct: constructYamlNull,
22875
- predicate: isNull2,
22857
+ predicate: isNull,
22876
22858
  represent: {
22877
22859
  canonical: function() {
22878
22860
  return "~";
@@ -22903,14 +22885,14 @@ var require_bool = __commonJS((exports, module) => {
22903
22885
  function constructYamlBoolean(data) {
22904
22886
  return data === "true" || data === "True" || data === "TRUE";
22905
22887
  }
22906
- function isBoolean2(object3) {
22888
+ function isBoolean(object3) {
22907
22889
  return Object.prototype.toString.call(object3) === "[object Boolean]";
22908
22890
  }
22909
22891
  module.exports = new Type("tag:yaml.org,2002:bool", {
22910
22892
  kind: "scalar",
22911
22893
  resolve: resolveYamlBoolean,
22912
22894
  construct: constructYamlBoolean,
22913
- predicate: isBoolean2,
22895
+ predicate: isBoolean,
22914
22896
  represent: {
22915
22897
  lowercase: function(object3) {
22916
22898
  return object3 ? "true" : "false";
@@ -23312,7 +23294,7 @@ var require_binary = __commonJS((exports, module) => {
23312
23294
  return result;
23313
23295
  }
23314
23296
  function representYamlBinary(object3) {
23315
- var result = "", bits = 0, idx, tail2, max = object3.length, map3 = BASE64_MAP;
23297
+ var result = "", bits = 0, idx, tail, max = object3.length, map3 = BASE64_MAP;
23316
23298
  for (idx = 0;idx < max; idx++) {
23317
23299
  if (idx % 3 === 0 && idx) {
23318
23300
  result += map3[bits >> 18 & 63];
@@ -23322,18 +23304,18 @@ var require_binary = __commonJS((exports, module) => {
23322
23304
  }
23323
23305
  bits = (bits << 8) + object3[idx];
23324
23306
  }
23325
- tail2 = max % 3;
23326
- if (tail2 === 0) {
23307
+ tail = max % 3;
23308
+ if (tail === 0) {
23327
23309
  result += map3[bits >> 18 & 63];
23328
23310
  result += map3[bits >> 12 & 63];
23329
23311
  result += map3[bits >> 6 & 63];
23330
23312
  result += map3[bits & 63];
23331
- } else if (tail2 === 2) {
23313
+ } else if (tail === 2) {
23332
23314
  result += map3[bits >> 10 & 63];
23333
23315
  result += map3[bits >> 4 & 63];
23334
23316
  result += map3[bits << 2 & 63];
23335
23317
  result += map3[64];
23336
- } else if (tail2 === 1) {
23318
+ } else if (tail === 1) {
23337
23319
  result += map3[bits >> 2 & 63];
23338
23320
  result += map3[bits << 4 & 63];
23339
23321
  result += map3[64];
@@ -23491,14 +23473,14 @@ var require_undefined = __commonJS((exports, module) => {
23491
23473
  function representJavascriptUndefined() {
23492
23474
  return "";
23493
23475
  }
23494
- function isUndefined2(object3) {
23476
+ function isUndefined(object3) {
23495
23477
  return typeof object3 === "undefined";
23496
23478
  }
23497
23479
  module.exports = new Type("tag:yaml.org,2002:js/undefined", {
23498
23480
  kind: "scalar",
23499
23481
  resolve: resolveJavascriptUndefined,
23500
23482
  construct: constructJavascriptUndefined,
23501
- predicate: isUndefined2,
23483
+ predicate: isUndefined,
23502
23484
  represent: representJavascriptUndefined
23503
23485
  });
23504
23486
  });
@@ -23511,10 +23493,10 @@ var require_regexp = __commonJS((exports, module) => {
23511
23493
  return false;
23512
23494
  if (data.length === 0)
23513
23495
  return false;
23514
- var regexp = data, tail2 = /\/([gim]*)$/.exec(data), modifiers = "";
23496
+ var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
23515
23497
  if (regexp[0] === "/") {
23516
- if (tail2)
23517
- modifiers = tail2[1];
23498
+ if (tail)
23499
+ modifiers = tail[1];
23518
23500
  if (modifiers.length > 3)
23519
23501
  return false;
23520
23502
  if (regexp[regexp.length - modifiers.length - 1] !== "/")
@@ -23523,10 +23505,10 @@ var require_regexp = __commonJS((exports, module) => {
23523
23505
  return true;
23524
23506
  }
23525
23507
  function constructJavascriptRegExp(data) {
23526
- var regexp = data, tail2 = /\/([gim]*)$/.exec(data), modifiers = "";
23508
+ var regexp = data, tail = /\/([gim]*)$/.exec(data), modifiers = "";
23527
23509
  if (regexp[0] === "/") {
23528
- if (tail2)
23529
- modifiers = tail2[1];
23510
+ if (tail)
23511
+ modifiers = tail[1];
23530
23512
  regexp = regexp.slice(1, regexp.length - modifiers.length - 1);
23531
23513
  }
23532
23514
  return new RegExp(regexp, modifiers);
@@ -23541,14 +23523,14 @@ var require_regexp = __commonJS((exports, module) => {
23541
23523
  result += "i";
23542
23524
  return result;
23543
23525
  }
23544
- function isRegExp2(object3) {
23526
+ function isRegExp(object3) {
23545
23527
  return Object.prototype.toString.call(object3) === "[object RegExp]";
23546
23528
  }
23547
23529
  module.exports = new Type("tag:yaml.org,2002:js/regexp", {
23548
23530
  kind: "scalar",
23549
23531
  resolve: resolveJavascriptRegExp,
23550
23532
  construct: constructJavascriptRegExp,
23551
- predicate: isRegExp2,
23533
+ predicate: isRegExp,
23552
23534
  represent: representJavascriptRegExp
23553
23535
  });
23554
23536
  });
@@ -23595,14 +23577,14 @@ var require_function = __commonJS((exports, module) => {
23595
23577
  function representJavascriptFunction(object3) {
23596
23578
  return object3.toString();
23597
23579
  }
23598
- function isFunction2(object3) {
23580
+ function isFunction(object3) {
23599
23581
  return Object.prototype.toString.call(object3) === "[object Function]";
23600
23582
  }
23601
23583
  module.exports = new Type("tag:yaml.org,2002:js/function", {
23602
23584
  kind: "scalar",
23603
23585
  resolve: resolveJavascriptFunction,
23604
23586
  construct: constructJavascriptFunction,
23605
- predicate: isFunction2,
23587
+ predicate: isFunction,
23606
23588
  represent: representJavascriptFunction
23607
23589
  });
23608
23590
  });
@@ -25092,11 +25074,11 @@ var require_dumper = __commonJS((exports, module) => {
25092
25074
  state.tag = _tag;
25093
25075
  state.dump = "[" + _result + "]";
25094
25076
  }
25095
- function writeBlockSequence(state, level2, object3, compact2) {
25077
+ function writeBlockSequence(state, level2, object3, compact) {
25096
25078
  var _result = "", _tag = state.tag, index, length;
25097
25079
  for (index = 0, length = object3.length;index < length; index += 1) {
25098
25080
  if (writeNode(state, level2 + 1, object3[index], true, true)) {
25099
- if (!compact2 || index !== 0) {
25081
+ if (!compact || index !== 0) {
25100
25082
  _result += generateNextLine(state, level2);
25101
25083
  }
25102
25084
  if (state.dump && CHAR_LINE_FEED === state.dump.charCodeAt(0)) {
@@ -25135,7 +25117,7 @@ var require_dumper = __commonJS((exports, module) => {
25135
25117
  state.tag = _tag;
25136
25118
  state.dump = "{" + _result + "}";
25137
25119
  }
25138
- function writeBlockMapping(state, level2, object3, compact2) {
25120
+ function writeBlockMapping(state, level2, object3, compact) {
25139
25121
  var _result = "", _tag = state.tag, objectKeyList = Object.keys(object3), index, length, objectKey, objectValue, explicitPair, pairBuffer;
25140
25122
  if (state.sortKeys === true) {
25141
25123
  objectKeyList.sort();
@@ -25146,7 +25128,7 @@ var require_dumper = __commonJS((exports, module) => {
25146
25128
  }
25147
25129
  for (index = 0, length = objectKeyList.length;index < length; index += 1) {
25148
25130
  pairBuffer = "";
25149
- if (!compact2 || index !== 0) {
25131
+ if (!compact || index !== 0) {
25150
25132
  pairBuffer += generateNextLine(state, level2);
25151
25133
  }
25152
25134
  objectKey = objectKeyList[index];
@@ -25203,7 +25185,7 @@ var require_dumper = __commonJS((exports, module) => {
25203
25185
  }
25204
25186
  return false;
25205
25187
  }
25206
- function writeNode(state, level2, object3, block, compact2, iskey) {
25188
+ function writeNode(state, level2, object3, block, compact, iskey) {
25207
25189
  state.tag = null;
25208
25190
  state.dump = object3;
25209
25191
  if (!detectType(state, object3, false)) {
@@ -25219,7 +25201,7 @@ var require_dumper = __commonJS((exports, module) => {
25219
25201
  duplicate = duplicateIndex !== -1;
25220
25202
  }
25221
25203
  if (state.tag !== null && state.tag !== "?" || duplicate || state.indent !== 2 && level2 > 0) {
25222
- compact2 = false;
25204
+ compact = false;
25223
25205
  }
25224
25206
  if (duplicate && state.usedDuplicates[duplicateIndex]) {
25225
25207
  state.dump = "*ref_" + duplicateIndex;
@@ -25229,7 +25211,7 @@ var require_dumper = __commonJS((exports, module) => {
25229
25211
  }
25230
25212
  if (type === "[object Object]") {
25231
25213
  if (block && Object.keys(state.dump).length !== 0) {
25232
- writeBlockMapping(state, level2, state.dump, compact2);
25214
+ writeBlockMapping(state, level2, state.dump, compact);
25233
25215
  if (duplicate) {
25234
25216
  state.dump = "&ref_" + duplicateIndex + state.dump;
25235
25217
  }
@@ -25242,7 +25224,7 @@ var require_dumper = __commonJS((exports, module) => {
25242
25224
  } else if (type === "[object Array]") {
25243
25225
  var arrayLevel = state.noArrayIndent && level2 > 0 ? level2 - 1 : level2;
25244
25226
  if (block && state.dump.length !== 0) {
25245
- writeBlockSequence(state, arrayLevel, state.dump, compact2);
25227
+ writeBlockSequence(state, arrayLevel, state.dump, compact);
25246
25228
  if (duplicate) {
25247
25229
  state.dump = "&ref_" + duplicateIndex + state.dump;
25248
25230
  }
@@ -25742,15 +25724,15 @@ var __getProtoOf2 = Object.getPrototypeOf;
25742
25724
  var __defProp2 = Object.defineProperty;
25743
25725
  var __getOwnPropNames2 = Object.getOwnPropertyNames;
25744
25726
  var __hasOwnProp2 = Object.prototype.hasOwnProperty;
25745
- function __accessProp2(key) {
25727
+ function __accessProp(key) {
25746
25728
  return this[key];
25747
25729
  }
25748
- var __toESMCache_node2;
25749
- var __toESMCache_esm2;
25730
+ var __toESMCache_node;
25731
+ var __toESMCache_esm;
25750
25732
  var __toESM2 = (mod, isNodeMode, target) => {
25751
25733
  var canCache = mod != null && typeof mod === "object";
25752
25734
  if (canCache) {
25753
- var cache = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
25735
+ var cache = isNodeMode ? __toESMCache_node ??= new WeakMap : __toESMCache_esm ??= new WeakMap;
25754
25736
  var cached = cache.get(mod);
25755
25737
  if (cached)
25756
25738
  return cached;
@@ -25760,7 +25742,7 @@ var __toESM2 = (mod, isNodeMode, target) => {
25760
25742
  for (let key of __getOwnPropNames2(mod))
25761
25743
  if (!__hasOwnProp2.call(to, key))
25762
25744
  __defProp2(to, key, {
25763
- get: __accessProp2.bind(mod, key),
25745
+ get: __accessProp.bind(mod, key),
25764
25746
  enumerable: true
25765
25747
  });
25766
25748
  if (canCache)
@@ -25768,9 +25750,9 @@ var __toESM2 = (mod, isNodeMode, target) => {
25768
25750
  return to;
25769
25751
  };
25770
25752
  var __commonJS2 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
25771
- var __returnValue2 = (v) => v;
25772
- function __exportSetter2(name, newValue) {
25773
- this[name] = __returnValue2.bind(null, newValue);
25753
+ var __returnValue = (v) => v;
25754
+ function __exportSetter(name, newValue) {
25755
+ this[name] = __returnValue.bind(null, newValue);
25774
25756
  }
25775
25757
  var __export2 = (target, all) => {
25776
25758
  for (var name in all)
@@ -25778,7 +25760,7 @@ var __export2 = (target, all) => {
25778
25760
  get: all[name],
25779
25761
  enumerable: true,
25780
25762
  configurable: true,
25781
- set: __exportSetter2.bind(all, name)
25763
+ set: __exportSetter.bind(all, name)
25782
25764
  });
25783
25765
  };
25784
25766
  var __require2 = /* @__PURE__ */ createRequire2(import.meta.url);
@@ -44452,7 +44434,7 @@ class App extends QueryRouterServer {
44452
44434
  }
44453
44435
  }
44454
44436
 
44455
- // node_modules/.pnpm/@kevisual+context@0.0.8/node_modules/@kevisual/context/dist/app.js
44437
+ // node_modules/.pnpm/@kevisual+context@0.0.10/node_modules/@kevisual/context/dist/app.js
44456
44438
  var isBrowser = typeof window !== "undefined" && typeof document !== "undefined";
44457
44439
  var isBrowser22 = typeof window !== "undefined" && typeof window.document !== "undefined";
44458
44440
  function getDefaultExportFromCjs(x) {
@@ -59991,7 +59973,7 @@ import os3 from "os";
59991
59973
  import path2 from "path";
59992
59974
  import fs2 from "fs";
59993
59975
 
59994
- // node_modules/.pnpm/@kevisual+use-config@1.0.30_dotenv@17.3.1/node_modules/@kevisual/use-config/dist/app.js
59976
+ // node_modules/.pnpm/@kevisual+use-config@1.0.30_dotenv@17.4.1/node_modules/@kevisual/use-config/dist/app.js
59995
59977
  import { createRequire as createRequire3 } from "node:module";
59996
59978
  import fs from "node:fs";
59997
59979
  import path from "node:path";
@@ -61405,7 +61387,7 @@ class BaseQuery {
61405
61387
  }
61406
61388
  }
61407
61389
 
61408
- // node_modules/.pnpm/@kevisual+api@0.0.66_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/login-cache.ts
61390
+ // node_modules/.pnpm/@kevisual+api@0.0.67_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/login-cache.ts
61409
61391
  var defaultCacheData = {
61410
61392
  loginUsers: [],
61411
61393
  user: undefined,
@@ -61976,7 +61958,7 @@ class BaseLoad3 {
61976
61958
  // node_modules/.pnpm/eventemitter3@5.0.4/node_modules/eventemitter3/index.mjs
61977
61959
  var import__2 = __toESM(require_eventemitter32(), 1);
61978
61960
 
61979
- // node_modules/.pnpm/@kevisual+api@0.0.66_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/query-login.ts
61961
+ // node_modules/.pnpm/@kevisual+api@0.0.67_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/query-login.ts
61980
61962
  class QueryLogin extends BaseQuery {
61981
61963
  cacheStore;
61982
61964
  isBrowser;
@@ -62388,7 +62370,7 @@ class QueryLogin extends BaseQuery {
62388
62370
  }
62389
62371
  }
62390
62372
 
62391
- // node_modules/.pnpm/@kevisual+api@0.0.66_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/login-node-cache.ts
62373
+ // node_modules/.pnpm/@kevisual+api@0.0.67_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/login-node-cache.ts
62392
62374
  import { homedir } from "node:os";
62393
62375
  import { join, dirname } from "node:path";
62394
62376
  import fs3 from "node:fs";
@@ -62532,7 +62514,7 @@ class LoginNodeCache {
62532
62514
  }
62533
62515
  }
62534
62516
 
62535
- // node_modules/.pnpm/@kevisual+api@0.0.66_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/query-login-node.ts
62517
+ // node_modules/.pnpm/@kevisual+api@0.0.67_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/query/query-login/query-login-node.ts
62536
62518
  var cache = new LoginNodeCache;
62537
62519
 
62538
62520
  class QueryLoginNode extends QueryLogin {
@@ -62640,14 +62622,15 @@ var normalizeScriptPath = (scriptPath) => {
62640
62622
 
62641
62623
  // src/module/download/install.ts
62642
62624
  var import_fast_glob = __toESM(require_out4(), 1);
62643
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/key.js
62625
+
62626
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/key.js
62644
62627
  var isUpKey = (key, keybindings = []) => key.name === "up" || keybindings.includes("vim") && key.name === "k" || keybindings.includes("emacs") && key.ctrl && key.name === "p";
62645
62628
  var isDownKey = (key, keybindings = []) => key.name === "down" || keybindings.includes("vim") && key.name === "j" || keybindings.includes("emacs") && key.ctrl && key.name === "n";
62646
62629
  var isBackspaceKey = (key) => key.name === "backspace";
62647
62630
  var isTabKey = (key) => key.name === "tab";
62648
62631
  var isNumberKey = (key) => "1234567890".includes(key.name);
62649
62632
  var isEnterKey = (key) => key.name === "enter" || key.name === "return";
62650
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/errors.js
62633
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/errors.js
62651
62634
  class AbortPromptError extends Error {
62652
62635
  name = "AbortPromptError";
62653
62636
  message = "Prompt was aborted";
@@ -62673,10 +62656,10 @@ class HookError extends Error {
62673
62656
  class ValidationError extends Error {
62674
62657
  name = "ValidationError";
62675
62658
  }
62676
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-state.js
62659
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-state.js
62677
62660
  import { AsyncResource as AsyncResource2 } from "node:async_hooks";
62678
62661
 
62679
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/hook-engine.js
62662
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/hook-engine.js
62680
62663
  import { AsyncLocalStorage, AsyncResource } from "node:async_hooks";
62681
62664
  var hookStorage = new AsyncLocalStorage;
62682
62665
  function createStore(rl) {
@@ -62781,7 +62764,7 @@ var effectScheduler = {
62781
62764
  }
62782
62765
  };
62783
62766
 
62784
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-state.js
62767
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-state.js
62785
62768
  function isFactory(value) {
62786
62769
  return typeof value === "function";
62787
62770
  }
@@ -62802,7 +62785,7 @@ function useState(defaultValue) {
62802
62785
  });
62803
62786
  }
62804
62787
 
62805
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-effect.js
62788
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-effect.js
62806
62789
  function useEffect(cb, depArray) {
62807
62790
  withPointer((pointer) => {
62808
62791
  const oldDeps = pointer.get();
@@ -62814,7 +62797,7 @@ function useEffect(cb, depArray) {
62814
62797
  });
62815
62798
  }
62816
62799
 
62817
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/theme.js
62800
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/theme.js
62818
62801
  import { styleText } from "node:util";
62819
62802
 
62820
62803
  // node_modules/.pnpm/@inquirer+figures@2.0.5/node_modules/@inquirer/figures/dist/index.js
@@ -63106,7 +63089,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
63106
63089
  var dist_default = figures;
63107
63090
  var replacements = Object.entries(specialMainSymbols);
63108
63091
 
63109
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/theme.js
63092
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/theme.js
63110
63093
  var defaultTheme = {
63111
63094
  prefix: {
63112
63095
  idle: styleText("blue", "?"),
@@ -63127,7 +63110,7 @@ var defaultTheme = {
63127
63110
  }
63128
63111
  };
63129
63112
 
63130
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/make-theme.js
63113
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/make-theme.js
63131
63114
  function isPlainObject4(value) {
63132
63115
  if (typeof value !== "object" || value === null)
63133
63116
  return false;
@@ -63155,7 +63138,7 @@ function makeTheme(...themes) {
63155
63138
  return deepMerge(...themesToMerge);
63156
63139
  }
63157
63140
 
63158
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-prefix.js
63141
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-prefix.js
63159
63142
  function usePrefix({ status = "idle", theme }) {
63160
63143
  const [showLoader, setShowLoader] = useState(false);
63161
63144
  const [tick, setTick] = useState(0);
@@ -63185,7 +63168,7 @@ function usePrefix({ status = "idle", theme }) {
63185
63168
  const iconName = status === "loading" ? "idle" : status;
63186
63169
  return typeof prefix === "string" ? prefix : prefix[iconName] ?? prefix["idle"];
63187
63170
  }
63188
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-memo.js
63171
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-memo.js
63189
63172
  function useMemo(fn, dependencies) {
63190
63173
  return withPointer((pointer) => {
63191
63174
  const prev = pointer.get();
@@ -63197,11 +63180,11 @@ function useMemo(fn, dependencies) {
63197
63180
  return prev.value;
63198
63181
  });
63199
63182
  }
63200
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-ref.js
63183
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-ref.js
63201
63184
  function useRef(val) {
63202
63185
  return useState({ current: val })[0];
63203
63186
  }
63204
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/use-keypress.js
63187
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/use-keypress.js
63205
63188
  function useKeypress(userHandler) {
63206
63189
  const signal = useRef(userHandler);
63207
63190
  signal.current = userHandler;
@@ -63219,7 +63202,7 @@ function useKeypress(userHandler) {
63219
63202
  };
63220
63203
  }, []);
63221
63204
  }
63222
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/utils.js
63205
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/utils.js
63223
63206
  var import_cli_width = __toESM(require_cli_width(), 1);
63224
63207
 
63225
63208
  // node_modules/.pnpm/fast-string-truncated-width@3.0.3/node_modules/fast-string-truncated-width/dist/utils.js
@@ -63563,7 +63546,7 @@ function wrapAnsi(string5, columns, options2) {
63563
63546
  `);
63564
63547
  }
63565
63548
 
63566
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/utils.js
63549
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/utils.js
63567
63550
  function breakLines(content, width) {
63568
63551
  return content.split(`
63569
63552
  `).flatMap((line) => wrapAnsi(line, width, { trim: false, hard: true }).split(`
@@ -63574,7 +63557,7 @@ function readlineWidth() {
63574
63557
  return import_cli_width.default({ defaultWidth: 80, output: readline().output });
63575
63558
  }
63576
63559
 
63577
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
63560
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/pagination/use-pagination.js
63578
63561
  function usePointerPosition({ active, renderedItems, pageSize, loop }) {
63579
63562
  const state = useRef({
63580
63563
  lastPointer: active,
@@ -63640,7 +63623,7 @@ function usePagination({ items, active, renderItem, pageSize, loop = true }) {
63640
63623
  return pageBuffer.filter((line) => typeof line === "string").join(`
63641
63624
  `);
63642
63625
  }
63643
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/create-prompt.js
63626
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
63644
63627
  var import_mute_stream = __toESM(require_lib(), 1);
63645
63628
  import * as readline2 from "node:readline";
63646
63629
  import { AsyncResource as AsyncResource3 } from "node:async_hooks";
@@ -63853,7 +63836,7 @@ var {
63853
63836
  unload
63854
63837
  } = signalExitWrap(processOk(process8) ? new SignalExit(process8) : new SignalExitFallback);
63855
63838
 
63856
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/screen-manager.js
63839
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
63857
63840
  import { stripVTControlCharacters } from "node:util";
63858
63841
 
63859
63842
  // node_modules/.pnpm/@inquirer+ansi@2.0.5/node_modules/@inquirer/ansi/dist/index.js
@@ -63872,7 +63855,7 @@ var cursorTo = (x, y) => {
63872
63855
  var eraseLine = ESC2 + "2K";
63873
63856
  var eraseLines = (lines) => lines > 0 ? (eraseLine + cursorUp(1)).repeat(lines - 1) + eraseLine + cursorLeft : "";
63874
63857
 
63875
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/screen-manager.js
63858
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/screen-manager.js
63876
63859
  var height = (content) => content.split(`
63877
63860
  `).length;
63878
63861
  var lastLine = (content) => content.split(`
@@ -63937,7 +63920,7 @@ class ScreenManager {
63937
63920
  }
63938
63921
  }
63939
63922
 
63940
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
63923
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/promise-polyfill.js
63941
63924
  class PromisePolyfill extends Promise {
63942
63925
  static withResolver() {
63943
63926
  let resolve;
@@ -63950,7 +63933,7 @@ class PromisePolyfill extends Promise {
63950
63933
  }
63951
63934
  }
63952
63935
 
63953
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/create-prompt.js
63936
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/create-prompt.js
63954
63937
  import path3 from "node:path";
63955
63938
  var nativeSetImmediate = globalThis.setImmediate;
63956
63939
  function getCallSites() {
@@ -64061,7 +64044,7 @@ function createPrompt(view) {
64061
64044
  };
64062
64045
  return prompt;
64063
64046
  }
64064
- // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.5.2/node_modules/@inquirer/core/dist/lib/Separator.js
64047
+ // node_modules/.pnpm/@inquirer+core@11.1.8_@types+node@25.6.0/node_modules/@inquirer/core/dist/lib/Separator.js
64065
64048
  import { styleText as styleText2 } from "node:util";
64066
64049
  class Separator {
64067
64050
  separator = styleText2("dim", Array.from({ length: 15 }).join(dist_default.line));
@@ -64075,7 +64058,7 @@ class Separator {
64075
64058
  return Boolean(choice && typeof choice === "object" && "type" in choice && choice.type === "separator");
64076
64059
  }
64077
64060
  }
64078
- // node_modules/.pnpm/@inquirer+confirm@6.0.11_@types+node@25.5.2/node_modules/@inquirer/confirm/dist/index.js
64061
+ // node_modules/.pnpm/@inquirer+confirm@6.0.11_@types+node@25.6.0/node_modules/@inquirer/confirm/dist/index.js
64079
64062
  function getBooleanValue(value, defaultValue) {
64080
64063
  let answer = defaultValue !== false;
64081
64064
  if (/^(y|yes)/i.test(value))
@@ -64120,7 +64103,7 @@ var dist_default4 = createPrompt((config4, done) => {
64120
64103
  const message = theme.style.message(config4.message, status);
64121
64104
  return `${prefix} ${message}${defaultValue} ${formattedValue}`;
64122
64105
  });
64123
- // node_modules/.pnpm/@inquirer+input@5.0.11_@types+node@25.5.2/node_modules/@inquirer/input/dist/index.js
64106
+ // node_modules/.pnpm/@inquirer+input@5.0.11_@types+node@25.6.0/node_modules/@inquirer/input/dist/index.js
64124
64107
  var inputTheme = {
64125
64108
  validationFailureMode: "keep"
64126
64109
  };
@@ -64204,7 +64187,7 @@ var dist_default5 = createPrompt((config4, done) => {
64204
64187
  error49
64205
64188
  ];
64206
64189
  });
64207
- // node_modules/.pnpm/@inquirer+password@5.0.11_@types+node@25.5.2/node_modules/@inquirer/password/dist/index.js
64190
+ // node_modules/.pnpm/@inquirer+password@5.0.11_@types+node@25.6.0/node_modules/@inquirer/password/dist/index.js
64208
64191
  var passwordTheme = {
64209
64192
  style: {
64210
64193
  maskedText: "[input is masked]"
@@ -64257,7 +64240,7 @@ var dist_default6 = createPrompt((config4, done) => {
64257
64240
  }
64258
64241
  return [[prefix, message, config4.mask ? formattedValue : helpTip].join(" "), error49];
64259
64242
  });
64260
- // node_modules/.pnpm/@inquirer+select@5.1.3_@types+node@25.5.2/node_modules/@inquirer/select/dist/index.js
64243
+ // node_modules/.pnpm/@inquirer+select@5.1.3_@types+node@25.6.0/node_modules/@inquirer/select/dist/index.js
64261
64244
  import { styleText as styleText3 } from "node:util";
64262
64245
  var selectTheme = {
64263
64246
  icon: { cursor: dist_default.pointer },
@@ -67967,6 +67950,17 @@ var loginInCommand = async () => {
67967
67950
 
67968
67951
  // src/routes/login.ts
67969
67952
  import util2 from "util";
67953
+
67954
+ // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
67955
+ function isPrimitive(value) {
67956
+ return value == null || typeof value !== "object" && typeof value !== "function";
67957
+ }
67958
+
67959
+ // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
67960
+ function isTypedArray(x) {
67961
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
67962
+ }
67963
+
67970
67964
  // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
67971
67965
  function getSymbols(object3) {
67972
67966
  return Object.getOwnPropertySymbols(object3).filter((symbol3) => Object.prototype.propertyIsEnumerable.call(object3, symbol3));
@@ -68004,16 +67998,6 @@ var int32ArrayTag = "[object Int32Array]";
68004
67998
  var float32ArrayTag = "[object Float32Array]";
68005
67999
  var float64ArrayTag = "[object Float64Array]";
68006
68000
 
68007
- // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
68008
- function isPrimitive(value) {
68009
- return value == null || typeof value !== "object" && typeof value !== "function";
68010
- }
68011
-
68012
- // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
68013
- function isTypedArray(x) {
68014
- return ArrayBuffer.isView(x) && !(x instanceof DataView);
68015
- }
68016
-
68017
68001
  // node_modules/.pnpm/es-toolkit@1.45.1/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
68018
68002
  function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = new Map, cloneValue = undefined) {
68019
68003
  const cloned = cloneValue?.(valueToClone, keyToClone, objectToClone, stack);
@@ -68393,27 +68377,21 @@ app.route({
68393
68377
  }
68394
68378
  }).addTo(app);
68395
68379
 
68396
- // node_modules/.pnpm/@kevisual+api@0.0.66_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-config.js
68380
+ // node_modules/.pnpm/@kevisual+api@0.0.67_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-config.js
68397
68381
  var isTextForContentType3 = (contentType) => {
68398
68382
  if (!contentType)
68399
68383
  return false;
68400
- const textTypes = ["text/", "xml", "html", "javascript", "css", "csv", "plain", "x-www-form-urlencoded", "md"];
68384
+ const textTypes = ["text/", "xml", "html", "javascript", "css", "csv", "plain", "x-www-form-urlencoded", "md", "json"];
68401
68385
  return textTypes.some((type) => contentType.includes(type));
68402
68386
  };
68403
68387
  var adapter3 = async (opts = {}, overloadOpts) => {
68404
68388
  const controller = new AbortController;
68405
68389
  const signal = controller.signal;
68406
68390
  const isPostFile = opts.isPostFile || false;
68407
- let responseType = opts.responseType || "json";
68408
- if (opts.isBlob) {
68409
- responseType = "blob";
68410
- } else if (opts.isText) {
68411
- responseType = "text";
68412
- }
68413
- const timeout2 = opts.timeout || 60000 * 3;
68391
+ const timeout = opts.timeout || 60000 * 3;
68414
68392
  const timer = setTimeout(() => {
68415
68393
  controller.abort();
68416
- }, timeout2);
68394
+ }, timeout);
68417
68395
  let method = overloadOpts?.method || opts?.method || "POST";
68418
68396
  let headers = { ...opts?.headers, ...overloadOpts?.headers };
68419
68397
  let origin = "";
@@ -68421,13 +68399,13 @@ var adapter3 = async (opts = {}, overloadOpts) => {
68421
68399
  if (opts?.url?.startsWith("http")) {
68422
68400
  url4 = new URL(opts.url);
68423
68401
  } else {
68424
- origin = window?.location?.origin || "http://localhost:51515";
68425
- url4 = new URL(opts.url, origin);
68402
+ origin = globalThis?.location?.origin || "http://localhost:51515";
68403
+ url4 = new URL(opts?.url || "", origin);
68426
68404
  }
68427
68405
  const isGet = method === "GET";
68428
68406
  const oldSearchParams = url4.searchParams;
68429
68407
  if (isGet) {
68430
- let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts.body });
68408
+ let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts?.params, ...opts?.body });
68431
68409
  url4.search = searchParams.toString();
68432
68410
  } else {
68433
68411
  const params = {
@@ -68452,11 +68430,13 @@ var adapter3 = async (opts = {}, overloadOpts) => {
68452
68430
  } else if (isPostFile) {
68453
68431
  body = opts.body;
68454
68432
  } else {
68455
- headers = {
68456
- "Content-Type": "application/json",
68457
- ...headers
68458
- };
68459
- body = JSON.stringify(opts.body);
68433
+ if (opts.body && typeof opts.body === "object" && !(opts.body instanceof FormData)) {
68434
+ headers = {
68435
+ "Content-Type": "application/json",
68436
+ ...headers
68437
+ };
68438
+ body = JSON.stringify(opts.body);
68439
+ }
68460
68440
  }
68461
68441
  return fetch(url4, {
68462
68442
  method: method.toUpperCase(),
@@ -68466,21 +68446,31 @@ var adapter3 = async (opts = {}, overloadOpts) => {
68466
68446
  headers
68467
68447
  }).then(async (response) => {
68468
68448
  const contentType = response.headers.get("Content-Type");
68469
- if (responseType === "blob") {
68470
- return await response.blob();
68471
- }
68472
- const isText = responseType === "text";
68473
68449
  const isJson = contentType && contentType.includes("application/json");
68474
- if (isJson && !isText) {
68475
- return await response.json();
68450
+ const isSuccess = response.ok;
68451
+ if (isJson) {
68452
+ const json3 = await response.json();
68453
+ if (json3?.code) {
68454
+ return json3;
68455
+ }
68456
+ return {
68457
+ code: isSuccess ? 200 : response.status,
68458
+ status: response.status,
68459
+ data: json3
68460
+ };
68476
68461
  } else if (isTextForContentType3(contentType)) {
68477
68462
  return {
68478
- code: response.status,
68463
+ code: isSuccess ? 200 : response.status,
68479
68464
  status: response.status,
68480
68465
  data: await response.text()
68481
68466
  };
68482
68467
  } else {
68483
- return response;
68468
+ return {
68469
+ code: isSuccess ? 200 : response.status,
68470
+ status: response.status,
68471
+ data: "非文本非JSON响应, 请手动处理response。",
68472
+ response
68473
+ };
68484
68474
  }
68485
68475
  }).catch((err) => {
68486
68476
  if (err.name === "AbortError") {
@@ -68500,16 +68490,14 @@ var adapter3 = async (opts = {}, overloadOpts) => {
68500
68490
  var wrapperError3 = ({ code, message: message2 }) => {
68501
68491
  const result = {
68502
68492
  code: code || 500,
68503
- success: false,
68504
- message: message2 || "api request error",
68505
- showError: (fn) => {},
68506
- noMsg: true
68493
+ message: message2 || "请求错误"
68507
68494
  };
68508
68495
  return result;
68509
68496
  };
68510
68497
 
68511
68498
  class Query3 {
68512
68499
  adapter;
68500
+ baseURL;
68513
68501
  url;
68514
68502
  beforeRequest;
68515
68503
  afterResponse;
@@ -68517,20 +68505,29 @@ class Query3 {
68517
68505
  timeout;
68518
68506
  stop;
68519
68507
  qws;
68520
- isClient = false;
68508
+ tokenName;
68509
+ storage;
68510
+ token;
68521
68511
  constructor(opts) {
68522
68512
  this.adapter = opts?.adapter || adapter3;
68513
+ this.tokenName = opts?.tokenName || "token";
68514
+ this.storage = opts?.storage || globalThis?.localStorage;
68523
68515
  const defaultURL = opts?.isClient ? "/client/router" : "/api/router";
68524
68516
  this.url = opts?.url || defaultURL;
68517
+ if (this.url.startsWith("http")) {
68518
+ const urlObj = new URL(this.url);
68519
+ this.baseURL = urlObj.origin;
68520
+ }
68521
+ this.baseURL = opts?.baseURL || this.baseURL;
68525
68522
  this.headers = opts?.headers || {
68526
68523
  "Content-Type": "application/json"
68527
68524
  };
68528
68525
  this.timeout = opts?.timeout || 60000 * 3;
68529
- if (opts.beforeRequest) {
68526
+ if (opts?.beforeRequest) {
68530
68527
  this.beforeRequest = opts.beforeRequest;
68531
68528
  } else {
68532
68529
  this.beforeRequest = async (opts2) => {
68533
- const token = globalThis?.localStorage?.getItem("token");
68530
+ const token = this.token || this.storage?.getItem?.(this.tokenName);
68534
68531
  if (token) {
68535
68532
  opts2.headers = {
68536
68533
  ...opts2.headers,
@@ -68552,26 +68549,33 @@ class Query3 {
68552
68549
  }
68553
68550
  async post(body, options2) {
68554
68551
  const url4 = options2?.url || this.url;
68555
- const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options2 || {};
68552
+ const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout, ...rest } = options2 || {};
68556
68553
  const _headers = { ...this.headers, ...headers };
68557
68554
  const _adapter = adapter22 || this.adapter;
68558
68555
  const _beforeRequest = beforeRequest || this.beforeRequest;
68559
68556
  const _afterResponse = afterResponse || this.afterResponse;
68560
- const _timeout = timeout2 || this.timeout;
68557
+ const _timeout = timeout || this.timeout;
68561
68558
  const req = {
68562
68559
  url: url4,
68563
68560
  headers: _headers,
68564
68561
  body,
68565
68562
  timeout: _timeout,
68566
- ...rest2
68563
+ ...rest
68567
68564
  };
68565
+ const isStartsWithHttp = req.url.startsWith("http");
68566
+ if (!isStartsWithHttp) {
68567
+ if (this.baseURL) {
68568
+ const baseURL2 = new URL(this.baseURL || globalThis?.location?.origin).origin;
68569
+ req.url = baseURL2 + req.url;
68570
+ }
68571
+ }
68568
68572
  try {
68569
68573
  if (_beforeRequest) {
68570
68574
  const res = await _beforeRequest(req);
68571
68575
  if (res === false) {
68572
68576
  return wrapperError3({
68573
68577
  code: 500,
68574
- message: "request is cancel",
68578
+ message: "请求取消",
68575
68579
  req
68576
68580
  });
68577
68581
  }
@@ -68580,12 +68584,13 @@ class Query3 {
68580
68584
  console.error("request beforeFn error", e, req);
68581
68585
  return wrapperError3({
68582
68586
  code: 500,
68583
- message: "api request beforeFn error"
68587
+ message: "请求在请求前处理时发生错误",
68588
+ req
68584
68589
  });
68585
68590
  }
68586
68591
  if (this.stop && !options2?.noStop) {
68587
68592
  const that = this;
68588
- await new Promise((resolve) => {
68593
+ const res = await new Promise((resolve) => {
68589
68594
  let timer = 0;
68590
68595
  const detect = setInterval(() => {
68591
68596
  if (!that.stop) {
@@ -68593,11 +68598,20 @@ class Query3 {
68593
68598
  resolve(true);
68594
68599
  }
68595
68600
  timer++;
68596
- if (timer > 30) {
68597
- console.error("request stop: timeout", req.url, timer);
68601
+ if (timer > 5) {
68602
+ console.error("等待请求失败:", req.url, timer);
68603
+ clearInterval(detect);
68604
+ resolve(false);
68598
68605
  }
68599
68606
  }, 1000);
68600
68607
  });
68608
+ if (!res) {
68609
+ return wrapperError3({
68610
+ code: 500,
68611
+ message: "请求取消,可能是因为用户未登录或者token过期",
68612
+ req
68613
+ });
68614
+ }
68601
68615
  }
68602
68616
  return _adapter(req).then(async (res) => {
68603
68617
  try {
@@ -68610,10 +68624,11 @@ class Query3 {
68610
68624
  }
68611
68625
  return res;
68612
68626
  } catch (e) {
68613
- console.error("request afterFn error", e, req);
68627
+ console.error("请求在响应后处理时发生错误", e, req);
68614
68628
  return wrapperError3({
68615
68629
  code: 500,
68616
- message: "api request afterFn error"
68630
+ message: "请求在响应后处理时发生错误",
68631
+ req
68617
68632
  });
68618
68633
  }
68619
68634
  });
@@ -68833,27 +68848,21 @@ app.route({
68833
68848
  console.log("Delete Config Result:", showMore(res));
68834
68849
  }).addTo(app);
68835
68850
 
68836
- // node_modules/.pnpm/@kevisual+api@0.0.66_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-secret.js
68851
+ // node_modules/.pnpm/@kevisual+api@0.0.67_react-dom@19.2.4_react@19.2.4__react@19.2.4/node_modules/@kevisual/api/dist/query-secret.js
68837
68852
  var isTextForContentType4 = (contentType) => {
68838
68853
  if (!contentType)
68839
68854
  return false;
68840
- const textTypes = ["text/", "xml", "html", "javascript", "css", "csv", "plain", "x-www-form-urlencoded", "md"];
68855
+ const textTypes = ["text/", "xml", "html", "javascript", "css", "csv", "plain", "x-www-form-urlencoded", "md", "json"];
68841
68856
  return textTypes.some((type) => contentType.includes(type));
68842
68857
  };
68843
68858
  var adapter4 = async (opts = {}, overloadOpts) => {
68844
68859
  const controller = new AbortController;
68845
68860
  const signal = controller.signal;
68846
68861
  const isPostFile = opts.isPostFile || false;
68847
- let responseType = opts.responseType || "json";
68848
- if (opts.isBlob) {
68849
- responseType = "blob";
68850
- } else if (opts.isText) {
68851
- responseType = "text";
68852
- }
68853
- const timeout2 = opts.timeout || 60000 * 3;
68862
+ const timeout = opts.timeout || 60000 * 3;
68854
68863
  const timer = setTimeout(() => {
68855
68864
  controller.abort();
68856
- }, timeout2);
68865
+ }, timeout);
68857
68866
  let method = overloadOpts?.method || opts?.method || "POST";
68858
68867
  let headers = { ...opts?.headers, ...overloadOpts?.headers };
68859
68868
  let origin = "";
@@ -68861,13 +68870,13 @@ var adapter4 = async (opts = {}, overloadOpts) => {
68861
68870
  if (opts?.url?.startsWith("http")) {
68862
68871
  url4 = new URL(opts.url);
68863
68872
  } else {
68864
- origin = window?.location?.origin || "http://localhost:51515";
68865
- url4 = new URL(opts.url, origin);
68873
+ origin = globalThis?.location?.origin || "http://localhost:51515";
68874
+ url4 = new URL(opts?.url || "", origin);
68866
68875
  }
68867
68876
  const isGet = method === "GET";
68868
68877
  const oldSearchParams = url4.searchParams;
68869
68878
  if (isGet) {
68870
- let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts.body });
68879
+ let searchParams = new URLSearchParams({ ...Object.fromEntries(oldSearchParams), ...opts?.params, ...opts?.body });
68871
68880
  url4.search = searchParams.toString();
68872
68881
  } else {
68873
68882
  const params = {
@@ -68892,11 +68901,13 @@ var adapter4 = async (opts = {}, overloadOpts) => {
68892
68901
  } else if (isPostFile) {
68893
68902
  body = opts.body;
68894
68903
  } else {
68895
- headers = {
68896
- "Content-Type": "application/json",
68897
- ...headers
68898
- };
68899
- body = JSON.stringify(opts.body);
68904
+ if (opts.body && typeof opts.body === "object" && !(opts.body instanceof FormData)) {
68905
+ headers = {
68906
+ "Content-Type": "application/json",
68907
+ ...headers
68908
+ };
68909
+ body = JSON.stringify(opts.body);
68910
+ }
68900
68911
  }
68901
68912
  return fetch(url4, {
68902
68913
  method: method.toUpperCase(),
@@ -68906,21 +68917,31 @@ var adapter4 = async (opts = {}, overloadOpts) => {
68906
68917
  headers
68907
68918
  }).then(async (response) => {
68908
68919
  const contentType = response.headers.get("Content-Type");
68909
- if (responseType === "blob") {
68910
- return await response.blob();
68911
- }
68912
- const isText = responseType === "text";
68913
68920
  const isJson = contentType && contentType.includes("application/json");
68914
- if (isJson && !isText) {
68915
- return await response.json();
68921
+ const isSuccess = response.ok;
68922
+ if (isJson) {
68923
+ const json3 = await response.json();
68924
+ if (json3?.code) {
68925
+ return json3;
68926
+ }
68927
+ return {
68928
+ code: isSuccess ? 200 : response.status,
68929
+ status: response.status,
68930
+ data: json3
68931
+ };
68916
68932
  } else if (isTextForContentType4(contentType)) {
68917
68933
  return {
68918
- code: response.status,
68934
+ code: isSuccess ? 200 : response.status,
68919
68935
  status: response.status,
68920
68936
  data: await response.text()
68921
68937
  };
68922
68938
  } else {
68923
- return response;
68939
+ return {
68940
+ code: isSuccess ? 200 : response.status,
68941
+ status: response.status,
68942
+ data: "非文本非JSON响应, 请手动处理response。",
68943
+ response
68944
+ };
68924
68945
  }
68925
68946
  }).catch((err) => {
68926
68947
  if (err.name === "AbortError") {
@@ -68940,16 +68961,14 @@ var adapter4 = async (opts = {}, overloadOpts) => {
68940
68961
  var wrapperError4 = ({ code, message: message2 }) => {
68941
68962
  const result = {
68942
68963
  code: code || 500,
68943
- success: false,
68944
- message: message2 || "api request error",
68945
- showError: (fn) => {},
68946
- noMsg: true
68964
+ message: message2 || "请求错误"
68947
68965
  };
68948
68966
  return result;
68949
68967
  };
68950
68968
 
68951
68969
  class Query4 {
68952
68970
  adapter;
68971
+ baseURL;
68953
68972
  url;
68954
68973
  beforeRequest;
68955
68974
  afterResponse;
@@ -68957,20 +68976,29 @@ class Query4 {
68957
68976
  timeout;
68958
68977
  stop;
68959
68978
  qws;
68960
- isClient = false;
68979
+ tokenName;
68980
+ storage;
68981
+ token;
68961
68982
  constructor(opts) {
68962
68983
  this.adapter = opts?.adapter || adapter4;
68984
+ this.tokenName = opts?.tokenName || "token";
68985
+ this.storage = opts?.storage || globalThis?.localStorage;
68963
68986
  const defaultURL = opts?.isClient ? "/client/router" : "/api/router";
68964
68987
  this.url = opts?.url || defaultURL;
68988
+ if (this.url.startsWith("http")) {
68989
+ const urlObj = new URL(this.url);
68990
+ this.baseURL = urlObj.origin;
68991
+ }
68992
+ this.baseURL = opts?.baseURL || this.baseURL;
68965
68993
  this.headers = opts?.headers || {
68966
68994
  "Content-Type": "application/json"
68967
68995
  };
68968
68996
  this.timeout = opts?.timeout || 60000 * 3;
68969
- if (opts.beforeRequest) {
68997
+ if (opts?.beforeRequest) {
68970
68998
  this.beforeRequest = opts.beforeRequest;
68971
68999
  } else {
68972
69000
  this.beforeRequest = async (opts2) => {
68973
- const token = globalThis?.localStorage?.getItem("token");
69001
+ const token = this.token || this.storage?.getItem?.(this.tokenName);
68974
69002
  if (token) {
68975
69003
  opts2.headers = {
68976
69004
  ...opts2.headers,
@@ -68992,26 +69020,33 @@ class Query4 {
68992
69020
  }
68993
69021
  async post(body, options2) {
68994
69022
  const url4 = options2?.url || this.url;
68995
- const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout: timeout2, ...rest2 } = options2 || {};
69023
+ const { headers, adapter: adapter22, beforeRequest, afterResponse, timeout, ...rest } = options2 || {};
68996
69024
  const _headers = { ...this.headers, ...headers };
68997
69025
  const _adapter = adapter22 || this.adapter;
68998
69026
  const _beforeRequest = beforeRequest || this.beforeRequest;
68999
69027
  const _afterResponse = afterResponse || this.afterResponse;
69000
- const _timeout = timeout2 || this.timeout;
69028
+ const _timeout = timeout || this.timeout;
69001
69029
  const req = {
69002
69030
  url: url4,
69003
69031
  headers: _headers,
69004
69032
  body,
69005
69033
  timeout: _timeout,
69006
- ...rest2
69034
+ ...rest
69007
69035
  };
69036
+ const isStartsWithHttp = req.url.startsWith("http");
69037
+ if (!isStartsWithHttp) {
69038
+ if (this.baseURL) {
69039
+ const baseURL2 = new URL(this.baseURL || globalThis?.location?.origin).origin;
69040
+ req.url = baseURL2 + req.url;
69041
+ }
69042
+ }
69008
69043
  try {
69009
69044
  if (_beforeRequest) {
69010
69045
  const res = await _beforeRequest(req);
69011
69046
  if (res === false) {
69012
69047
  return wrapperError4({
69013
69048
  code: 500,
69014
- message: "request is cancel",
69049
+ message: "请求取消",
69015
69050
  req
69016
69051
  });
69017
69052
  }
@@ -69020,12 +69055,13 @@ class Query4 {
69020
69055
  console.error("request beforeFn error", e, req);
69021
69056
  return wrapperError4({
69022
69057
  code: 500,
69023
- message: "api request beforeFn error"
69058
+ message: "请求在请求前处理时发生错误",
69059
+ req
69024
69060
  });
69025
69061
  }
69026
69062
  if (this.stop && !options2?.noStop) {
69027
69063
  const that = this;
69028
- await new Promise((resolve) => {
69064
+ const res = await new Promise((resolve) => {
69029
69065
  let timer = 0;
69030
69066
  const detect = setInterval(() => {
69031
69067
  if (!that.stop) {
@@ -69033,11 +69069,20 @@ class Query4 {
69033
69069
  resolve(true);
69034
69070
  }
69035
69071
  timer++;
69036
- if (timer > 30) {
69037
- console.error("request stop: timeout", req.url, timer);
69072
+ if (timer > 5) {
69073
+ console.error("等待请求失败:", req.url, timer);
69074
+ clearInterval(detect);
69075
+ resolve(false);
69038
69076
  }
69039
69077
  }, 1000);
69040
69078
  });
69079
+ if (!res) {
69080
+ return wrapperError4({
69081
+ code: 500,
69082
+ message: "请求取消,可能是因为用户未登录或者token过期",
69083
+ req
69084
+ });
69085
+ }
69041
69086
  }
69042
69087
  return _adapter(req).then(async (res) => {
69043
69088
  try {
@@ -69050,10 +69095,11 @@ class Query4 {
69050
69095
  }
69051
69096
  return res;
69052
69097
  } catch (e) {
69053
- console.error("request afterFn error", e, req);
69098
+ console.error("请求在响应后处理时发生错误", e, req);
69054
69099
  return wrapperError4({
69055
69100
  code: 500,
69056
- message: "api request afterFn error"
69101
+ message: "请求在响应后处理时发生错误",
69102
+ req
69057
69103
  });
69058
69104
  }
69059
69105
  });
@@ -69319,7 +69365,7 @@ app.route({
69319
69365
  }
69320
69366
  }
69321
69367
  }).define(async (ctx) => {
69322
- let { add, remove: remove2, set: set3, list, clear } = ctx.args;
69368
+ let { add, remove, set: set3, list, clear } = ctx.args;
69323
69369
  let config4 = getConfig2();
69324
69370
  let baseList = config4.baseURLList || [];
69325
69371
  if (!config4.baseURL) {
@@ -69351,8 +69397,8 @@ app.route({
69351
69397
  showList(baseList);
69352
69398
  }
69353
69399
  }
69354
- if (remove2 !== undefined) {
69355
- const index = remove2 - 1;
69400
+ if (remove !== undefined) {
69401
+ const index = remove - 1;
69356
69402
  if (index < 0 || index >= baseList.length) {
69357
69403
  console.log("index out of range");
69358
69404
  return;
@@ -69365,8 +69411,8 @@ app.route({
69365
69411
  return;
69366
69412
  }
69367
69413
  if (set3 !== undefined) {
69368
- const isNumber2 = isNumeric(String(set3));
69369
- if (isNumber2) {
69414
+ const isNumber = isNumeric(String(set3));
69415
+ if (isNumber) {
69370
69416
  const index = Number(set3) - 1;
69371
69417
  if (index < 0 || index >= baseList.length) {
69372
69418
  console.log("index out of range");
@@ -69431,8 +69477,8 @@ app.route({
69431
69477
  return;
69432
69478
  }
69433
69479
  if (set3) {
69434
- const isNumber2 = isNumeric(set3);
69435
- if (isNumber2) {
69480
+ const isNumber = isNumeric(set3);
69481
+ if (isNumber) {
69436
69482
  const index = Number(set3) - 1;
69437
69483
  if (index < 0 || index >= defaultRegistry.length) {
69438
69484
  console.log("index out of range");
@@ -69630,7 +69676,7 @@ function fillPool2(bytes) {
69630
69676
  }
69631
69677
  poolOffset2 += bytes;
69632
69678
  }
69633
- function random3(bytes) {
69679
+ function random(bytes) {
69634
69680
  fillPool2(bytes |= 0);
69635
69681
  return pool2.subarray(poolOffset2 - bytes, poolOffset2);
69636
69682
  }
@@ -69653,7 +69699,7 @@ function customRandom2(alphabet, defaultSize, getRandom) {
69653
69699
  };
69654
69700
  }
69655
69701
  function customAlphabet2(alphabet, size = 21) {
69656
- return customRandom2(alphabet, size, random3);
69702
+ return customRandom2(alphabet, size, random);
69657
69703
  }
69658
69704
 
69659
69705
  // src/routes/id.ts
@@ -69686,6 +69732,63 @@ var import_fast_glob2 = __toESM(require_out4(), 1);
69686
69732
  import path12 from "node:path";
69687
69733
  import fs14 from "node:fs";
69688
69734
  import crypto5 from "node:crypto";
69735
+
69736
+ // node_modules/.pnpm/@kevisual+cnb@0.0.75_dotenv@17.4.1_idb-keyval@6.2.2/node_modules/@kevisual/cnb/src/repo/download.ts
69737
+ var downloadByCNBApi = async (url4, opts) => {
69738
+ const hash3 = opts?.hash;
69739
+ const headers = {
69740
+ Accept: "application/vnd.cnb.api+json",
69741
+ ...opts?.token ? { Authorization: `${opts.token}` } : {},
69742
+ ...opts?.headers
69743
+ };
69744
+ const res = await fetch(url4, {
69745
+ headers
69746
+ });
69747
+ let resJson;
69748
+ try {
69749
+ resJson = await res.json();
69750
+ } catch (e) {
69751
+ console.error(`下载失败 ${url4}: ${res.statusText}`, e);
69752
+ return { code: res.status, buffer: null };
69753
+ }
69754
+ if (res.ok) {
69755
+ if (resJson.size === 0) {
69756
+ return { code: 200, buffer: Buffer.from("") };
69757
+ }
69758
+ if (resJson.type === "blob" && resJson.encoding === "base64") {
69759
+ if (resJson.content) {
69760
+ if (hash3 && resJson.sha === hash3) {
69761
+ return { code: 304, buffer: null };
69762
+ }
69763
+ const buffer = Buffer.from(resJson.content, "base64");
69764
+ return { code: 200, buffer };
69765
+ }
69766
+ }
69767
+ if (resJson.type === "lfs") {
69768
+ const lfs_download_url = resJson.lfs_download_url;
69769
+ if (lfs_download_url) {
69770
+ const lfsRes = await fetch(lfs_download_url, {
69771
+ headers
69772
+ });
69773
+ if (lfsRes.ok) {
69774
+ const etag = lfsRes.headers.get("ETag");
69775
+ if (hash3 && etag === hash3) {
69776
+ return { code: 304, buffer: null };
69777
+ }
69778
+ const arrayBuffer = await lfsRes.arrayBuffer();
69779
+ return { code: 200, buffer: Buffer.from(arrayBuffer) };
69780
+ }
69781
+ }
69782
+ }
69783
+ console.error(`下载失败 ${url4}: 内容为空`, resJson);
69784
+ return { code: 200, buffer: null };
69785
+ } else {
69786
+ console.error(`下载失败 ${url4}: ${res.statusText}`, resJson);
69787
+ return { code: res.status, buffer: null };
69788
+ }
69789
+ };
69790
+
69791
+ // src/routes/pod/modules/pod.ts
69689
69792
  var gitBlobHashContent = (content) => {
69690
69793
  const bytes = Buffer.isBuffer(content) ? content : Buffer.from(content);
69691
69794
  const header = "blob " + bytes.length + "\x00";
@@ -69988,32 +70091,6 @@ var downloadResource = async (url4, opts) => {
69988
70091
  return { code: res.status, buffer: null };
69989
70092
  }
69990
70093
  };
69991
- var downloadByCNBApi = async (url4, opts) => {
69992
- const hash3 = opts?.hash;
69993
- const res = await fetch(url4, {
69994
- headers: {
69995
- Accept: "application/vnd.cnb.api+json",
69996
- ...opts?.headers
69997
- }
69998
- });
69999
- let resJson;
70000
- try {
70001
- resJson = await res.json();
70002
- } catch (e) {
70003
- console.error(`下载失败 ${url4}: ${res.statusText}`, e);
70004
- return { code: res.status, buffer: null };
70005
- }
70006
- if (res.ok && resJson.type === "blob" && resJson.encoding === "base64" && resJson.content) {
70007
- if (hash3 && resJson.sha === hash3) {
70008
- return { code: 304, buffer: null };
70009
- }
70010
- const buffer = Buffer.from(resJson.content, "base64");
70011
- return { code: 200, buffer };
70012
- } else {
70013
- console.error(`下载失败 ${url4}: ${res.statusText}`, resJson);
70014
- return { code: res.status, buffer: null };
70015
- }
70016
- };
70017
70094
  var getRootIgnore = async (dir) => {
70018
70095
  const cnbIgnorePath = path12.join(dir, ".cnbignore");
70019
70096
  const gitIgnorePath = path12.join(dir, ".gitignore");
@@ -70118,7 +70195,8 @@ app.route({
70118
70195
  key: "fetch",
70119
70196
  middleware: ["auth-admin"]
70120
70197
  }).define(async (ctx) => {
70121
- const url4 = "https://api.cnb.cool/xzzlwl/httpecho/-/git/contents/package.json";
70198
+ const url4 = "https://api.cnb.cool/zxj.im/beads-base/-/git/contents/docs/main-gen.png";
70199
+ const filename = new URL(url4).pathname.split("/").pop() || "downloaded_file";
70122
70200
  const CNB_API_KEY = useKey("CNB_API_KEY");
70123
70201
  console.log("CNB_API_KEY", CNB_API_KEY);
70124
70202
  const res = await downloadByCNBApi(url4, {
@@ -70127,7 +70205,7 @@ app.route({
70127
70205
  }
70128
70206
  });
70129
70207
  if (res.code === 200 && res.buffer) {
70130
- fs15.writeFileSync("./test.json", res.buffer);
70208
+ fs15.writeFileSync(`./${filename}`, res.buffer);
70131
70209
  } else {
70132
70210
  console.error(`下载失败 ${url4}: ${res.code}`);
70133
70211
  }
@@ -70338,8 +70416,8 @@ var handleResponse = async (err, res, opts) => {
70338
70416
  return;
70339
70417
  }
70340
70418
  let body = "";
70341
- res.on("data", (chunk2) => {
70342
- body += chunk2;
70419
+ res.on("data", (chunk) => {
70420
+ body += chunk;
70343
70421
  });
70344
70422
  res.on("end", () => {
70345
70423
  if (noResponse) {
@@ -70501,7 +70579,7 @@ var command2 = new Command("deploy").description("把前端文件传到服务器
70501
70579
  console.error(source_default.red("查询应用版本失败"), res2.message, key);
70502
70580
  return;
70503
70581
  }
70504
- const { id, data, ...rest2 } = res2.data || {};
70582
+ const { id, data, ...rest } = res2.data || {};
70505
70583
  if (id && !update) {
70506
70584
  if (!org) {
70507
70585
  console.log(source_default.green(`更新为最新版本: envision deploy-load ${id}`));
@@ -70782,7 +70860,7 @@ var npmrc = new Command("set").description("set .npmrc").option("-f <force>").ac
70782
70860
  }
70783
70861
  });
70784
70862
  command3.addCommand(npmrc);
70785
- var remove2 = new Command("remove").description("remove .npmrc").action(async () => {
70863
+ var remove = new Command("remove").description("remove .npmrc").action(async () => {
70786
70864
  const execPath = process.cwd();
70787
70865
  const npmrcPath = path14.resolve(execPath, ".npmrc");
70788
70866
  if (fileIsExist2(npmrcPath)) {
@@ -70792,7 +70870,7 @@ var remove2 = new Command("remove").description("remove .npmrc").action(async ()
70792
70870
  console.log(chalk2.green(".npmrc success"));
70793
70871
  }
70794
70872
  });
70795
- command3.addCommand(remove2);
70873
+ command3.addCommand(remove);
70796
70874
  var install = new Command("install").option("-n, --noproxy", "no proxy").description("npm install 使用 proxy代理去下载").action(async (options2) => {
70797
70875
  const cwd = process.cwd();
70798
70876
  const config4 = getConfig2();
@@ -70992,7 +71070,7 @@ var pack = async (opts) => {
70992
71070
  allFiles.forEach((file3) => {
70993
71071
  logger.debug(`${file3.size}B ${file3.path}`);
70994
71072
  });
70995
- const totalSize = allFiles.reduce((sum2, file3) => sum2 + file3.size, 0);
71073
+ const totalSize = allFiles.reduce((sum, file3) => sum + file3.size, 0);
70996
71074
  collection.files = allFiles;
70997
71075
  collection.packageJson = packageJson;
70998
71076
  collection.totalSize = totalSize;
@@ -71634,7 +71712,7 @@ var syncCreateList = new Command("create").option("-d --dir <dir>", "配置目
71634
71712
  logger.info(newJson);
71635
71713
  }
71636
71714
  });
71637
- var clone5 = new Command("clone").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-i --link <link>", "克隆链接, 比 kevisual.json 优先级更高").option("-l --local", "值对sync的列表进行clone处理,只对sync列表处理").description("检查目录").action(async (opts) => {
71715
+ var clone3 = new Command("clone").option("-d --dir <dir>", "配置目录").option("-c --config <config>", "配置文件的名字", "kevisual.json").option("-i --link <link>", "克隆链接, 比 kevisual.json 优先级更高").option("-l --local", "值对sync的列表进行clone处理,只对sync列表处理").description("检查目录").action(async (opts) => {
71638
71716
  let link = opts.link || "";
71639
71717
  const local = opts.local || false;
71640
71718
  const sync = new SyncBase({ dir: opts.dir, baseURL, configFilename: opts.config });
@@ -71728,7 +71806,7 @@ command4.addCommand(syncUpload);
71728
71806
  command4.addCommand(syncDownload);
71729
71807
  command4.addCommand(syncList);
71730
71808
  command4.addCommand(syncCreateList);
71731
- command4.addCommand(clone5);
71809
+ command4.addCommand(clone3);
71732
71810
  program.addCommand(command4);
71733
71811
 
71734
71812
  // src/command/coding-plan/cc.ts
@@ -72269,15 +72347,15 @@ var __getProtoOf4 = Object.getPrototypeOf;
72269
72347
  var __defProp5 = Object.defineProperty;
72270
72348
  var __getOwnPropNames4 = Object.getOwnPropertyNames;
72271
72349
  var __hasOwnProp4 = Object.prototype.hasOwnProperty;
72272
- function __accessProp3(key) {
72350
+ function __accessProp2(key) {
72273
72351
  return this[key];
72274
72352
  }
72275
- var __toESMCache_node3;
72276
- var __toESMCache_esm3;
72353
+ var __toESMCache_node2;
72354
+ var __toESMCache_esm2;
72277
72355
  var __toESM4 = (mod, isNodeMode, target) => {
72278
72356
  var canCache = mod != null && typeof mod === "object";
72279
72357
  if (canCache) {
72280
- var cache3 = isNodeMode ? __toESMCache_node3 ??= new WeakMap : __toESMCache_esm3 ??= new WeakMap;
72358
+ var cache3 = isNodeMode ? __toESMCache_node2 ??= new WeakMap : __toESMCache_esm2 ??= new WeakMap;
72281
72359
  var cached3 = cache3.get(mod);
72282
72360
  if (cached3)
72283
72361
  return cached3;
@@ -72287,7 +72365,7 @@ var __toESM4 = (mod, isNodeMode, target) => {
72287
72365
  for (let key of __getOwnPropNames4(mod))
72288
72366
  if (!__hasOwnProp4.call(to, key))
72289
72367
  __defProp5(to, key, {
72290
- get: __accessProp3.bind(mod, key),
72368
+ get: __accessProp2.bind(mod, key),
72291
72369
  enumerable: true
72292
72370
  });
72293
72371
  if (canCache)
@@ -72295,9 +72373,9 @@ var __toESM4 = (mod, isNodeMode, target) => {
72295
72373
  return to;
72296
72374
  };
72297
72375
  var __commonJS4 = (cb, mod) => () => (mod || cb((mod = { exports: {} }).exports, mod), mod.exports);
72298
- var __returnValue3 = (v) => v;
72299
- function __exportSetter3(name, newValue) {
72300
- this[name] = __returnValue3.bind(null, newValue);
72376
+ var __returnValue2 = (v) => v;
72377
+ function __exportSetter2(name, newValue) {
72378
+ this[name] = __returnValue2.bind(null, newValue);
72301
72379
  }
72302
72380
  var __export4 = (target, all) => {
72303
72381
  for (var name in all)
@@ -72305,7 +72383,7 @@ var __export4 = (target, all) => {
72305
72383
  get: all[name],
72306
72384
  enumerable: true,
72307
72385
  configurable: true,
72308
- set: __exportSetter3.bind(all, name)
72386
+ set: __exportSetter2.bind(all, name)
72309
72387
  });
72310
72388
  };
72311
72389
  var __require4 = /* @__PURE__ */ createRequire4(import.meta.url);
@@ -72740,15 +72818,15 @@ ${itemIndentStr}`);
72740
72818
  }
72741
72819
  let sumChunks = [chunks.shift()];
72742
72820
  let sumWidth = this.displayWidth(sumChunks[0]);
72743
- chunks.forEach((chunk2) => {
72744
- const visibleWidth = this.displayWidth(chunk2);
72821
+ chunks.forEach((chunk) => {
72822
+ const visibleWidth = this.displayWidth(chunk);
72745
72823
  if (sumWidth + visibleWidth <= width) {
72746
- sumChunks.push(chunk2);
72824
+ sumChunks.push(chunk);
72747
72825
  sumWidth += visibleWidth;
72748
72826
  return;
72749
72827
  }
72750
72828
  wrappedLines.push(sumChunks.join(""));
72751
- const nextChunk = chunk2.trimStart();
72829
+ const nextChunk = chunk.trimStart();
72752
72830
  sumChunks = [nextChunk];
72753
72831
  sumWidth = this.displayWidth(nextChunk);
72754
72832
  });
@@ -74429,16 +74507,16 @@ var require_eventemitter33 = __commonJS22((exports, module) => {
74429
74507
  if (!new Events().__proto__)
74430
74508
  prefix = false;
74431
74509
  }
74432
- function EE(fn, context, once2) {
74510
+ function EE(fn, context, once) {
74433
74511
  this.fn = fn;
74434
74512
  this.context = context;
74435
- this.once = once2 || false;
74513
+ this.once = once || false;
74436
74514
  }
74437
- function addListener(emitter, event, fn, context, once2) {
74515
+ function addListener(emitter, event, fn, context, once) {
74438
74516
  if (typeof fn !== "function") {
74439
74517
  throw new TypeError("The listener must be a function");
74440
74518
  }
74441
- var listener = new EE(fn, context || emitter, once2), evt = prefix ? prefix + event : event;
74519
+ var listener = new EE(fn, context || emitter, once), evt = prefix ? prefix + event : event;
74442
74520
  if (!emitter._events[evt])
74443
74521
  emitter._events[evt] = listener, emitter._eventsCount++;
74444
74522
  else if (!emitter._events[evt].fn)
@@ -74547,10 +74625,10 @@ var require_eventemitter33 = __commonJS22((exports, module) => {
74547
74625
  EventEmitter5.prototype.on = function on(event, fn, context) {
74548
74626
  return addListener(this, event, fn, context, false);
74549
74627
  };
74550
- EventEmitter5.prototype.once = function once2(event, fn, context) {
74628
+ EventEmitter5.prototype.once = function once(event, fn, context) {
74551
74629
  return addListener(this, event, fn, context, true);
74552
74630
  };
74553
- EventEmitter5.prototype.removeListener = function removeListener(event, fn, context, once2) {
74631
+ EventEmitter5.prototype.removeListener = function removeListener(event, fn, context, once) {
74554
74632
  var evt = prefix ? prefix + event : event;
74555
74633
  if (!this._events[evt])
74556
74634
  return this;
@@ -74560,12 +74638,12 @@ var require_eventemitter33 = __commonJS22((exports, module) => {
74560
74638
  }
74561
74639
  var listeners = this._events[evt];
74562
74640
  if (listeners.fn) {
74563
- if (listeners.fn === fn && (!once2 || listeners.once) && (!context || listeners.context === context)) {
74641
+ if (listeners.fn === fn && (!once || listeners.once) && (!context || listeners.context === context)) {
74564
74642
  clearEvent(this, evt);
74565
74643
  }
74566
74644
  } else {
74567
74645
  for (var i = 0, events = [], length = listeners.length;i < length; i++) {
74568
- if (listeners[i].fn !== fn || once2 && !listeners[i].once || context && listeners[i].context !== context) {
74646
+ if (listeners[i].fn !== fn || once && !listeners[i].once || context && listeners[i].context !== context) {
74569
74647
  events.push(listeners[i]);
74570
74648
  }
74571
74649
  }
@@ -74653,12 +74731,12 @@ class RemoteApp {
74653
74731
  console.log(`远程应用 ${this.id} 正在重连中...`);
74654
74732
  }
74655
74733
  return new Promise((resolve) => {
74656
- const timeout2 = setTimeout(() => {
74734
+ const timeout = setTimeout(() => {
74657
74735
  resolve(false);
74658
74736
  that.emitter.off("open", listenOnce);
74659
74737
  }, 5000);
74660
74738
  const listenOnce = () => {
74661
- clearTimeout(timeout2);
74739
+ clearTimeout(timeout);
74662
74740
  that.isConnected = true;
74663
74741
  that.remoteIsConnected = true;
74664
74742
  resolve(true);
@@ -74758,8 +74836,8 @@ class RemoteApp {
74758
74836
  if (!this.enableBackoff) {
74759
74837
  return this.reconnectDelay;
74760
74838
  }
74761
- const delay2 = this.reconnectDelay * Math.pow(2, this.reconnectAttempts);
74762
- return Math.min(delay2, this.maxReconnectDelay);
74839
+ const delay = this.reconnectDelay * Math.pow(2, this.reconnectAttempts);
74840
+ return Math.min(delay, this.maxReconnectDelay);
74763
74841
  }
74764
74842
  scheduleReconnect() {
74765
74843
  if (this.reconnectAttempts >= this.maxReconnectAttempts) {
@@ -74770,9 +74848,9 @@ class RemoteApp {
74770
74848
  if (this.reconnectTimer) {
74771
74849
  clearTimeout(this.reconnectTimer);
74772
74850
  }
74773
- const delay2 = this.calculateReconnectDelay();
74851
+ const delay = this.calculateReconnectDelay();
74774
74852
  this.reconnectAttempts++;
74775
- console.log(`远程应用 ${this.id} 将在 ${delay2}ms 后尝试第 ${this.reconnectAttempts} 次重连`);
74853
+ console.log(`远程应用 ${this.id} 将在 ${delay}ms 后尝试第 ${this.reconnectAttempts} 次重连`);
74776
74854
  this.reconnectTimer = setTimeout(() => {
74777
74855
  this.reconnectTimer = null;
74778
74856
  try {
@@ -74782,7 +74860,7 @@ class RemoteApp {
74782
74860
  this.emitter.emit("reconnectFailed", { id: this.id, attempt: this.reconnectAttempts, error: error49 });
74783
74861
  this.scheduleReconnect();
74784
74862
  }
74785
- }, delay2);
74863
+ }, delay);
74786
74864
  }
74787
74865
  disconnect() {
74788
74866
  this.isManuallyClosed = true;
@@ -74887,7 +74965,7 @@ class RemoteApp {
74887
74965
  }
74888
74966
  var exports_external3 = {};
74889
74967
  __export4(exports_external3, {
74890
- xor: () => xor5,
74968
+ xor: () => xor3,
74891
74969
  xid: () => xid22,
74892
74970
  void: () => _void22,
74893
74971
  uuidv7: () => uuidv73,
@@ -74898,7 +74976,7 @@ __export4(exports_external3, {
74898
74976
  url: () => url5,
74899
74977
  uppercase: () => _uppercase3,
74900
74978
  unknown: () => unknown3,
74901
- union: () => union5,
74979
+ union: () => union3,
74902
74980
  undefined: () => _undefined32,
74903
74981
  ulid: () => ulid22,
74904
74982
  uint64: () => uint643,
@@ -74986,7 +75064,7 @@ __export4(exports_external3, {
74986
75064
  iso: () => exports_iso3,
74987
75065
  ipv6: () => ipv622,
74988
75066
  ipv4: () => ipv422,
74989
- intersection: () => intersection5,
75067
+ intersection: () => intersection3,
74990
75068
  int64: () => int643,
74991
75069
  int32: () => int323,
74992
75070
  int: () => int3,
@@ -75028,7 +75106,7 @@ __export4(exports_external3, {
75028
75106
  config: () => config4,
75029
75107
  coerce: () => exports_coerce3,
75030
75108
  codec: () => codec3,
75031
- clone: () => clone6,
75109
+ clone: () => clone5,
75032
75110
  cidrv6: () => cidrv622,
75033
75111
  cidrv4: () => cidrv422,
75034
75112
  check: () => check3,
@@ -75163,7 +75241,7 @@ __export4(exports_core22, {
75163
75241
  createToJSONSchemaMethod: () => createToJSONSchemaMethod3,
75164
75242
  createStandardJSONSchemaMethod: () => createStandardJSONSchemaMethod3,
75165
75243
  config: () => config4,
75166
- clone: () => clone6,
75244
+ clone: () => clone5,
75167
75245
  _xor: () => _xor3,
75168
75246
  _xid: () => _xid3,
75169
75247
  _void: () => _void6,
@@ -75492,20 +75570,20 @@ __export4(exports_util3, {
75492
75570
  primitiveTypes: () => primitiveTypes3,
75493
75571
  prefixIssues: () => prefixIssues3,
75494
75572
  pick: () => pick7,
75495
- partial: () => partial5,
75573
+ partial: () => partial3,
75496
75574
  parsedType: () => parsedType3,
75497
75575
  optionalKeys: () => optionalKeys3,
75498
- omit: () => omit5,
75576
+ omit: () => omit3,
75499
75577
  objectClone: () => objectClone3,
75500
75578
  numKeys: () => numKeys3,
75501
75579
  nullish: () => nullish6,
75502
75580
  normalizeParams: () => normalizeParams3,
75503
75581
  mergeDefs: () => mergeDefs3,
75504
- merge: () => merge6,
75582
+ merge: () => merge5,
75505
75583
  jsonStringifyReplacer: () => jsonStringifyReplacer3,
75506
75584
  joinValues: () => joinValues3,
75507
75585
  issue: () => issue3,
75508
- isPlainObject: () => isPlainObject7,
75586
+ isPlainObject: () => isPlainObject6,
75509
75587
  isObject: () => isObject4,
75510
75588
  hexToUint8Array: () => hexToUint8Array3,
75511
75589
  getSizableOrigin: () => getSizableOrigin3,
@@ -75521,7 +75599,7 @@ __export4(exports_util3, {
75521
75599
  defineLazy: () => defineLazy3,
75522
75600
  createTransparentProxy: () => createTransparentProxy3,
75523
75601
  cloneDef: () => cloneDef3,
75524
- clone: () => clone6,
75602
+ clone: () => clone5,
75525
75603
  cleanRegex: () => cleanRegex3,
75526
75604
  cleanEnum: () => cleanEnum3,
75527
75605
  captureStackTrace: () => captureStackTrace3,
@@ -75690,7 +75768,7 @@ var allowsEval3 = cached3(() => {
75690
75768
  return false;
75691
75769
  }
75692
75770
  });
75693
- function isPlainObject7(o) {
75771
+ function isPlainObject6(o) {
75694
75772
  if (isObject4(o) === false)
75695
75773
  return false;
75696
75774
  const ctor = o.constructor;
@@ -75707,7 +75785,7 @@ function isPlainObject7(o) {
75707
75785
  return true;
75708
75786
  }
75709
75787
  function shallowClone3(o) {
75710
- if (isPlainObject7(o))
75788
+ if (isPlainObject6(o))
75711
75789
  return { ...o };
75712
75790
  if (Array.isArray(o))
75713
75791
  return [...o];
@@ -75771,7 +75849,7 @@ var primitiveTypes3 = new Set(["string", "number", "bigint", "boolean", "symbol"
75771
75849
  function escapeRegex3(str2) {
75772
75850
  return str2.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
75773
75851
  }
75774
- function clone6(inst, def, params) {
75852
+ function clone5(inst, def, params) {
75775
75853
  const cl = new inst._zod.constr(def ?? inst._zod.def);
75776
75854
  if (!def || params?.parent)
75777
75855
  cl._zod.parent = inst;
@@ -75872,9 +75950,9 @@ function pick7(schema, mask) {
75872
75950
  },
75873
75951
  checks: []
75874
75952
  });
75875
- return clone6(schema, def);
75953
+ return clone5(schema, def);
75876
75954
  }
75877
- function omit5(schema, mask) {
75955
+ function omit3(schema, mask) {
75878
75956
  const currDef = schema._zod.def;
75879
75957
  const checks3 = currDef.checks;
75880
75958
  const hasChecks = checks3 && checks3.length > 0;
@@ -75897,10 +75975,10 @@ function omit5(schema, mask) {
75897
75975
  },
75898
75976
  checks: []
75899
75977
  });
75900
- return clone6(schema, def);
75978
+ return clone5(schema, def);
75901
75979
  }
75902
75980
  function extend3(schema, shape) {
75903
- if (!isPlainObject7(shape)) {
75981
+ if (!isPlainObject6(shape)) {
75904
75982
  throw new Error("Invalid input to extend: expected a plain object");
75905
75983
  }
75906
75984
  const checks3 = schema._zod.def.checks;
@@ -75920,10 +75998,10 @@ function extend3(schema, shape) {
75920
75998
  return _shape;
75921
75999
  }
75922
76000
  });
75923
- return clone6(schema, def);
76001
+ return clone5(schema, def);
75924
76002
  }
75925
76003
  function safeExtend3(schema, shape) {
75926
- if (!isPlainObject7(shape)) {
76004
+ if (!isPlainObject6(shape)) {
75927
76005
  throw new Error("Invalid input to safeExtend: expected a plain object");
75928
76006
  }
75929
76007
  const def = mergeDefs3(schema._zod.def, {
@@ -75933,9 +76011,9 @@ function safeExtend3(schema, shape) {
75933
76011
  return _shape;
75934
76012
  }
75935
76013
  });
75936
- return clone6(schema, def);
76014
+ return clone5(schema, def);
75937
76015
  }
75938
- function merge6(a, b) {
76016
+ function merge5(a, b) {
75939
76017
  const def = mergeDefs3(a._zod.def, {
75940
76018
  get shape() {
75941
76019
  const _shape = { ...a._zod.def.shape, ...b._zod.def.shape };
@@ -75947,9 +76025,9 @@ function merge6(a, b) {
75947
76025
  },
75948
76026
  checks: []
75949
76027
  });
75950
- return clone6(a, def);
76028
+ return clone5(a, def);
75951
76029
  }
75952
- function partial5(Class3, schema, mask) {
76030
+ function partial3(Class3, schema, mask) {
75953
76031
  const currDef = schema._zod.def;
75954
76032
  const checks3 = currDef.checks;
75955
76033
  const hasChecks = checks3 && checks3.length > 0;
@@ -75985,7 +76063,7 @@ function partial5(Class3, schema, mask) {
75985
76063
  },
75986
76064
  checks: []
75987
76065
  });
75988
- return clone6(schema, def);
76066
+ return clone5(schema, def);
75989
76067
  }
75990
76068
  function required3(Class3, schema, mask) {
75991
76069
  const def = mergeDefs3(schema._zod.def, {
@@ -76016,7 +76094,7 @@ function required3(Class3, schema, mask) {
76016
76094
  return shape;
76017
76095
  }
76018
76096
  });
76019
- return clone6(schema, def);
76097
+ return clone5(schema, def);
76020
76098
  }
76021
76099
  function aborted3(x, startIndex = 0) {
76022
76100
  if (x.aborted === true)
@@ -77693,15 +77771,15 @@ var $ZodDate3 = /* @__PURE__ */ $constructor3("$ZodDate", (inst, def) => {
77693
77771
  } catch (_err) {}
77694
77772
  }
77695
77773
  const input = payload.value;
77696
- const isDate3 = input instanceof Date;
77697
- const isValidDate = isDate3 && !Number.isNaN(input.getTime());
77774
+ const isDate = input instanceof Date;
77775
+ const isValidDate = isDate && !Number.isNaN(input.getTime());
77698
77776
  if (isValidDate)
77699
77777
  return payload;
77700
77778
  payload.issues.push({
77701
77779
  expected: "date",
77702
77780
  code: "invalid_type",
77703
77781
  input,
77704
- ...isDate3 ? { received: "Invalid Date" } : {},
77782
+ ...isDate ? { received: "Invalid Date" } : {},
77705
77783
  inst
77706
77784
  });
77707
77785
  return payload;
@@ -78181,7 +78259,7 @@ function mergeValues3(a, b) {
78181
78259
  if (a instanceof Date && b instanceof Date && +a === +b) {
78182
78260
  return { valid: true, data: a };
78183
78261
  }
78184
- if (isPlainObject7(a) && isPlainObject7(b)) {
78262
+ if (isPlainObject6(a) && isPlainObject6(b)) {
78185
78263
  const bKeys = Object.keys(b);
78186
78264
  const sharedKeys = Object.keys(a).filter((key) => bKeys.indexOf(key) !== -1);
78187
78265
  const newObj = { ...a, ...b };
@@ -78306,8 +78384,8 @@ var $ZodTuple3 = /* @__PURE__ */ $constructor3("$ZodTuple", (inst, def) => {
78306
78384
  }
78307
78385
  }
78308
78386
  if (def.rest) {
78309
- const rest2 = input.slice(items.length);
78310
- for (const el of rest2) {
78387
+ const rest = input.slice(items.length);
78388
+ for (const el of rest) {
78311
78389
  i++;
78312
78390
  const result = def.rest._zod.run({
78313
78391
  value: el,
@@ -78335,7 +78413,7 @@ var $ZodRecord3 = /* @__PURE__ */ $constructor3("$ZodRecord", (inst, def) => {
78335
78413
  $ZodType3.init(inst, def);
78336
78414
  inst._zod.parse = (payload, ctx) => {
78337
78415
  const input = payload.value;
78338
- if (!isPlainObject7(input)) {
78416
+ if (!isPlainObject6(input)) {
78339
78417
  payload.issues.push({
78340
78418
  expected: "record",
78341
78419
  code: "invalid_type",
@@ -82033,11 +82111,11 @@ var capitalizeFirstCharacter3 = (text) => {
82033
82111
  };
82034
82112
  function getUnitTypeFromNumber3(number22) {
82035
82113
  const abs = Math.abs(number22);
82036
- const last2 = abs % 10;
82037
- const last22 = abs % 100;
82038
- if (last22 >= 11 && last22 <= 19 || last2 === 0)
82114
+ const last = abs % 10;
82115
+ const last2 = abs % 100;
82116
+ if (last2 >= 11 && last2 <= 19 || last === 0)
82039
82117
  return "many";
82040
- if (last2 === 1)
82118
+ if (last === 1)
82041
82119
  return "one";
82042
82120
  return "few";
82043
82121
  }
@@ -85238,11 +85316,11 @@ function _intersection3(Class22, left, right) {
85238
85316
  function _tuple3(Class22, items, _paramsOrRest, _params) {
85239
85317
  const hasRest = _paramsOrRest instanceof $ZodType3;
85240
85318
  const params = hasRest ? _params : _paramsOrRest;
85241
- const rest2 = hasRest ? _paramsOrRest : null;
85319
+ const rest = hasRest ? _paramsOrRest : null;
85242
85320
  return new Class22({
85243
85321
  type: "tuple",
85244
85322
  items,
85245
- rest: rest2,
85323
+ rest,
85246
85324
  ...normalizeParams3(params)
85247
85325
  });
85248
85326
  }
@@ -86180,30 +86258,30 @@ var tupleProcessor3 = (schema, ctx, _json, params) => {
86180
86258
  ...params,
86181
86259
  path: [...params.path, prefixPath, i]
86182
86260
  }));
86183
- const rest2 = def.rest ? process22(def.rest, ctx, {
86261
+ const rest = def.rest ? process22(def.rest, ctx, {
86184
86262
  ...params,
86185
86263
  path: [...params.path, restPath, ...ctx.target === "openapi-3.0" ? [def.items.length] : []]
86186
86264
  }) : null;
86187
86265
  if (ctx.target === "draft-2020-12") {
86188
86266
  json3.prefixItems = prefixItems;
86189
- if (rest2) {
86190
- json3.items = rest2;
86267
+ if (rest) {
86268
+ json3.items = rest;
86191
86269
  }
86192
86270
  } else if (ctx.target === "openapi-3.0") {
86193
86271
  json3.items = {
86194
86272
  anyOf: prefixItems
86195
86273
  };
86196
- if (rest2) {
86197
- json3.items.anyOf.push(rest2);
86274
+ if (rest) {
86275
+ json3.items.anyOf.push(rest);
86198
86276
  }
86199
86277
  json3.minItems = prefixItems.length;
86200
- if (!rest2) {
86278
+ if (!rest) {
86201
86279
  json3.maxItems = prefixItems.length;
86202
86280
  }
86203
86281
  } else {
86204
86282
  json3.items = prefixItems;
86205
- if (rest2) {
86206
- json3.additionalItems = rest2;
86283
+ if (rest) {
86284
+ json3.additionalItems = rest;
86207
86285
  }
86208
86286
  }
86209
86287
  const { minimum, maximum } = schema._zod.bag;
@@ -86462,7 +86540,7 @@ class JSONSchemaGenerator3 {
86462
86540
  var exports_json_schema3 = {};
86463
86541
  var exports_schemas22 = {};
86464
86542
  __export4(exports_schemas22, {
86465
- xor: () => xor5,
86543
+ xor: () => xor3,
86466
86544
  xid: () => xid22,
86467
86545
  void: () => _void22,
86468
86546
  uuidv7: () => uuidv73,
@@ -86471,7 +86549,7 @@ __export4(exports_schemas22, {
86471
86549
  uuid: () => uuid22,
86472
86550
  url: () => url5,
86473
86551
  unknown: () => unknown3,
86474
- union: () => union5,
86552
+ union: () => union3,
86475
86553
  undefined: () => _undefined32,
86476
86554
  ulid: () => ulid22,
86477
86555
  uint64: () => uint643,
@@ -86519,7 +86597,7 @@ __export4(exports_schemas22, {
86519
86597
  json: () => json3,
86520
86598
  ipv6: () => ipv622,
86521
86599
  ipv4: () => ipv422,
86522
- intersection: () => intersection5,
86600
+ intersection: () => intersection3,
86523
86601
  int64: () => int643,
86524
86602
  int32: () => int323,
86525
86603
  int: () => int3,
@@ -86766,7 +86844,7 @@ var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => {
86766
86844
  });
86767
86845
  };
86768
86846
  inst.with = inst.check;
86769
- inst.clone = (def2, params) => clone6(inst, def2, params);
86847
+ inst.clone = (def2, params) => clone5(inst, def2, params);
86770
86848
  inst.brand = () => inst;
86771
86849
  inst.register = (reg, meta22) => {
86772
86850
  reg.add(inst, meta22);
@@ -86794,8 +86872,8 @@ var ZodType3 = /* @__PURE__ */ $constructor3("ZodType", (inst, def) => {
86794
86872
  inst.nullish = () => optional3(nullable3(inst));
86795
86873
  inst.nonoptional = (params) => nonoptional3(inst, params);
86796
86874
  inst.array = () => array3(inst);
86797
- inst.or = (arg) => union5([inst, arg]);
86798
- inst.and = (arg) => intersection5(inst, arg);
86875
+ inst.or = (arg) => union3([inst, arg]);
86876
+ inst.and = (arg) => intersection3(inst, arg);
86799
86877
  inst.transform = (tx) => pipe3(inst, transform3(tx));
86800
86878
  inst.default = (def2) => _default22(inst, def2);
86801
86879
  inst.prefault = (def2) => prefault3(inst, def2);
@@ -87298,7 +87376,7 @@ var ZodUnion3 = /* @__PURE__ */ $constructor3("ZodUnion", (inst, def) => {
87298
87376
  inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor3(inst, ctx, json3, params);
87299
87377
  inst.options = def.options;
87300
87378
  });
87301
- function union5(options2, params) {
87379
+ function union3(options2, params) {
87302
87380
  return new ZodUnion3({
87303
87381
  type: "union",
87304
87382
  options: options2,
@@ -87311,7 +87389,7 @@ var ZodXor3 = /* @__PURE__ */ $constructor3("ZodXor", (inst, def) => {
87311
87389
  inst._zod.processJSONSchema = (ctx, json3, params) => unionProcessor3(inst, ctx, json3, params);
87312
87390
  inst.options = def.options;
87313
87391
  });
87314
- function xor5(options2, params) {
87392
+ function xor3(options2, params) {
87315
87393
  return new ZodXor3({
87316
87394
  type: "union",
87317
87395
  options: options2,
@@ -87336,7 +87414,7 @@ var ZodIntersection3 = /* @__PURE__ */ $constructor3("ZodIntersection", (inst, d
87336
87414
  ZodType3.init(inst, def);
87337
87415
  inst._zod.processJSONSchema = (ctx, json3, params) => intersectionProcessor3(inst, ctx, json3, params);
87338
87416
  });
87339
- function intersection5(left, right) {
87417
+ function intersection3(left, right) {
87340
87418
  return new ZodIntersection3({
87341
87419
  type: "intersection",
87342
87420
  left,
@@ -87347,19 +87425,19 @@ var ZodTuple3 = /* @__PURE__ */ $constructor3("ZodTuple", (inst, def) => {
87347
87425
  $ZodTuple3.init(inst, def);
87348
87426
  ZodType3.init(inst, def);
87349
87427
  inst._zod.processJSONSchema = (ctx, json3, params) => tupleProcessor3(inst, ctx, json3, params);
87350
- inst.rest = (rest2) => inst.clone({
87428
+ inst.rest = (rest) => inst.clone({
87351
87429
  ...inst._zod.def,
87352
- rest: rest2
87430
+ rest
87353
87431
  });
87354
87432
  });
87355
87433
  function tuple3(items, _paramsOrRest, _params) {
87356
87434
  const hasRest = _paramsOrRest instanceof $ZodType3;
87357
87435
  const params = hasRest ? _params : _paramsOrRest;
87358
- const rest2 = hasRest ? _paramsOrRest : null;
87436
+ const rest = hasRest ? _paramsOrRest : null;
87359
87437
  return new ZodTuple3({
87360
87438
  type: "tuple",
87361
87439
  items,
87362
- rest: rest2,
87440
+ rest,
87363
87441
  ...exports_util3.normalizeParams(params)
87364
87442
  });
87365
87443
  }
@@ -87379,7 +87457,7 @@ function record3(keyType, valueType, params) {
87379
87457
  });
87380
87458
  }
87381
87459
  function partialRecord3(keyType, valueType, params) {
87382
- const k = clone6(keyType);
87460
+ const k = clone5(keyType);
87383
87461
  k._zod.values = undefined;
87384
87462
  return new ZodRecord3({
87385
87463
  type: "record",
@@ -87811,7 +87889,7 @@ var stringbool3 = (...args) => _stringbool3({
87811
87889
  }, ...args);
87812
87890
  function json3(params) {
87813
87891
  const jsonSchema = lazy3(() => {
87814
- return union5([string22(params), number22(), boolean22(), _null32(), array3(jsonSchema), record3(string22(), jsonSchema)]);
87892
+ return union3([string22(params), number22(), boolean22(), _null32(), array3(jsonSchema), record3(string22(), jsonSchema)]);
87815
87893
  });
87816
87894
  return jsonSchema;
87817
87895
  }
@@ -88176,9 +88254,9 @@ function convertBaseSchema3(schema, ctx) {
88176
88254
  const items = schema.items;
88177
88255
  if (prefixItems && Array.isArray(prefixItems)) {
88178
88256
  const tupleItems = prefixItems.map((item) => convertSchema3(item, ctx));
88179
- const rest2 = items && typeof items === "object" && !Array.isArray(items) ? convertSchema3(items, ctx) : undefined;
88180
- if (rest2) {
88181
- zodSchema = z3.tuple(tupleItems).rest(rest2);
88257
+ const rest = items && typeof items === "object" && !Array.isArray(items) ? convertSchema3(items, ctx) : undefined;
88258
+ if (rest) {
88259
+ zodSchema = z3.tuple(tupleItems).rest(rest);
88182
88260
  } else {
88183
88261
  zodSchema = z3.tuple(tupleItems);
88184
88262
  }
@@ -88190,9 +88268,9 @@ function convertBaseSchema3(schema, ctx) {
88190
88268
  }
88191
88269
  } else if (Array.isArray(items)) {
88192
88270
  const tupleItems = items.map((item) => convertSchema3(item, ctx));
88193
- const rest2 = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema3(schema.additionalItems, ctx) : undefined;
88194
- if (rest2) {
88195
- zodSchema = z3.tuple(tupleItems).rest(rest2);
88271
+ const rest = schema.additionalItems && typeof schema.additionalItems === "object" ? convertSchema3(schema.additionalItems, ctx) : undefined;
88272
+ if (rest) {
88273
+ zodSchema = z3.tuple(tupleItems).rest(rest);
88196
88274
  } else {
88197
88275
  zodSchema = z3.tuple(tupleItems);
88198
88276
  }
@@ -88707,19 +88785,19 @@ import * as fs25 from "fs";
88707
88785
 
88708
88786
  // assistant/src/module/assistant/proxy/utils.ts
88709
88787
  var isBun2 = typeof Bun !== "undefined" && Bun?.version != null;
88710
- var isNode3 = typeof process !== "undefined" && process?.versions != null && process.versions?.node != null;
88788
+ var isNode = typeof process !== "undefined" && process?.versions != null && process.versions?.node != null;
88711
88789
  var isDeno2 = typeof Deno !== "undefined" && Deno?.version != null && Deno?.version?.deno != null;
88712
88790
 
88713
88791
  // node_modules/.pnpm/@kevisual+logger@0.0.4/node_modules/@kevisual/logger/dist/logger.mjs
88714
88792
  var showTime2 = (time4, format = "hh:mm:ss") => {
88715
88793
  const date6 = new Date(time4);
88716
- const pad2 = (n) => n.toString().padStart(2, "0");
88794
+ const pad = (n) => n.toString().padStart(2, "0");
88717
88795
  const year2 = date6.getFullYear();
88718
- const month = pad2(date6.getMonth() + 1);
88719
- const day2 = pad2(date6.getDate());
88720
- const hours = pad2(date6.getHours());
88721
- const minutes = pad2(date6.getMinutes());
88722
- const seconds = pad2(date6.getSeconds());
88796
+ const month = pad(date6.getMonth() + 1);
88797
+ const day2 = pad(date6.getDate());
88798
+ const hours = pad(date6.getHours());
88799
+ const minutes = pad(date6.getMinutes());
88800
+ const seconds = pad(date6.getSeconds());
88723
88801
  if (format === "YYYY-MM-DD hh:mm:ss") {
88724
88802
  return `${year2}-${month}-${day2} ${hours}:${minutes}:${seconds}`;
88725
88803
  }