@base-web-kits/base-tools-ts 1.2.5 → 1.2.7

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/index.js CHANGED
@@ -1,6 +1,20 @@
1
1
  var __defProp = Object.defineProperty;
2
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
3
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
4
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
2
5
  var __pow = Math.pow;
3
6
  var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
7
+ var __spreadValues = (a, b) => {
8
+ for (var prop in b || (b = {}))
9
+ if (__hasOwnProp.call(b, prop))
10
+ __defNormalProp(a, prop, b[prop]);
11
+ if (__getOwnPropSymbols)
12
+ for (var prop of __getOwnPropSymbols(b)) {
13
+ if (__propIsEnum.call(b, prop))
14
+ __defNormalProp(a, prop, b[prop]);
15
+ }
16
+ return a;
17
+ };
4
18
  var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
19
  var __async = (__this, __arguments, generator) => {
6
20
  return new Promise((resolve, reject) => {
@@ -358,195 +372,2746 @@ function getAgeByBirthdate(birthdate) {
358
372
  return { age: adjustedMonths, type: "month" };
359
373
  }
360
374
 
361
- // src/ts/es-toolkit/index.ts
362
- import {
363
- AbortError,
364
- Mutex,
365
- Semaphore,
366
- TimeoutError,
367
- after,
368
- ary,
369
- assert,
370
- asyncNoop,
371
- at,
372
- attempt,
373
- attemptAsync,
374
- before,
375
- camelCase,
376
- capitalize,
377
- chunk,
378
- clamp,
379
- clone,
380
- cloneDeep,
381
- cloneDeepWith,
382
- compact,
383
- constantCase,
384
- countBy,
385
- curry,
386
- curryRight,
387
- debounce,
388
- deburr,
389
- delay,
390
- difference,
391
- differenceBy,
392
- differenceWith,
393
- drop,
394
- dropRight,
395
- dropRightWhile,
396
- dropWhile,
397
- escape,
398
- escapeRegExp,
399
- fill,
400
- filterAsync,
401
- findKey,
402
- flatMap,
403
- flatMapAsync,
404
- flatMapDeep,
405
- flatten,
406
- flattenDeep,
407
- flattenObject,
408
- flow,
409
- flowRight,
410
- forEachAsync,
411
- forEachRight,
412
- groupBy,
413
- head,
414
- identity,
415
- inRange,
416
- initial,
417
- intersection,
418
- intersectionBy,
419
- intersectionWith,
420
- invariant,
421
- invert,
422
- isArrayBuffer,
423
- isBlob,
424
- isBoolean,
425
- isBrowser,
426
- isBuffer,
427
- isDate,
428
- isEmptyObject,
429
- isEqual,
430
- isEqualWith,
431
- isError,
432
- isFile,
433
- isFunction,
434
- isJSON,
435
- isJSONArray,
436
- isJSONObject,
437
- isJSONValue,
438
- isLength,
439
- isMap,
440
- isNil,
441
- isNode,
442
- isNotNil,
443
- isNull,
444
- isNumber,
445
- isPlainObject,
446
- isPrimitive,
447
- isPromise,
448
- isRegExp,
449
- isSet,
450
- isString,
451
- isSubset,
452
- isSubsetWith,
453
- isSymbol,
454
- isTypedArray,
455
- isUndefined,
456
- isWeakMap,
457
- isWeakSet,
458
- kebabCase,
459
- keyBy,
460
- last,
461
- limitAsync,
462
- lowerCase,
463
- lowerFirst,
464
- mapAsync,
465
- mapKeys,
466
- mapValues,
467
- maxBy,
468
- mean,
469
- meanBy,
470
- median,
471
- medianBy,
472
- memoize,
473
- merge,
474
- mergeWith,
475
- minBy,
476
- negate,
477
- noop,
478
- omit,
479
- omitBy,
480
- once,
481
- orderBy,
482
- pad,
483
- partial,
484
- partialRight,
485
- partition,
486
- pascalCase,
487
- pick,
488
- pickBy,
489
- pull,
490
- pullAt,
491
- random,
492
- randomInt,
493
- range,
494
- rangeRight,
495
- reduceAsync,
496
- remove,
497
- rest,
498
- retry,
499
- reverseString,
500
- round,
501
- sample,
502
- sampleSize,
503
- shuffle,
504
- snakeCase,
505
- sortBy,
506
- spread,
507
- startCase,
508
- sum,
509
- sumBy,
510
- tail,
511
- take,
512
- takeRight,
513
- takeRightWhile,
514
- takeWhile,
515
- throttle,
516
- timeout,
517
- toCamelCaseKeys,
518
- toFilled,
519
- toMerged,
520
- toSnakeCaseKeys,
521
- trim,
522
- trimEnd,
523
- trimStart,
524
- unary,
525
- unescape as unescape2,
526
- union,
527
- unionBy,
528
- unionWith,
529
- uniq,
530
- uniqBy,
531
- uniqWith,
532
- unzip,
533
- unzipWith,
534
- upperCase,
535
- upperFirst,
536
- windowed,
537
- withTimeout,
538
- without,
539
- words,
540
- xor,
541
- xorBy,
542
- xorWith,
543
- zip,
544
- zipObject,
545
- zipWith
546
- } from "es-toolkit";
375
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/at.mjs
376
+ function at(arr, indices) {
377
+ const result = new Array(indices.length);
378
+ const length = arr.length;
379
+ for (let i = 0; i < indices.length; i++) {
380
+ let index = indices[i];
381
+ index = Number.isInteger(index) ? index : Math.trunc(index) || 0;
382
+ if (index < 0) {
383
+ index += length;
384
+ }
385
+ result[i] = arr[index];
386
+ }
387
+ return result;
388
+ }
389
+
390
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/chunk.mjs
391
+ function chunk(arr, size) {
392
+ if (!Number.isInteger(size) || size <= 0) {
393
+ throw new Error("Size must be an integer greater than zero.");
394
+ }
395
+ const chunkLength = Math.ceil(arr.length / size);
396
+ const result = Array(chunkLength);
397
+ for (let index = 0; index < chunkLength; index++) {
398
+ const start = index * size;
399
+ const end = start + size;
400
+ result[index] = arr.slice(start, end);
401
+ }
402
+ return result;
403
+ }
404
+
405
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/compact.mjs
406
+ function compact(arr) {
407
+ const result = [];
408
+ for (let i = 0; i < arr.length; i++) {
409
+ const item = arr[i];
410
+ if (item) {
411
+ result.push(item);
412
+ }
413
+ }
414
+ return result;
415
+ }
416
+
417
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/countBy.mjs
418
+ function countBy(arr, mapper) {
419
+ var _a;
420
+ const result = {};
421
+ for (let i = 0; i < arr.length; i++) {
422
+ const item = arr[i];
423
+ const key = mapper(item, i, arr);
424
+ result[key] = ((_a = result[key]) != null ? _a : 0) + 1;
425
+ }
426
+ return result;
427
+ }
428
+
429
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/difference.mjs
430
+ function difference(firstArr, secondArr) {
431
+ const secondSet = new Set(secondArr);
432
+ return firstArr.filter((item) => !secondSet.has(item));
433
+ }
434
+
435
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/differenceBy.mjs
436
+ function differenceBy(firstArr, secondArr, mapper) {
437
+ const mappedSecondSet = new Set(secondArr.map((item) => mapper(item)));
438
+ return firstArr.filter((item) => {
439
+ return !mappedSecondSet.has(mapper(item));
440
+ });
441
+ }
442
+
443
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/differenceWith.mjs
444
+ function differenceWith(firstArr, secondArr, areItemsEqual) {
445
+ return firstArr.filter((firstItem) => {
446
+ return secondArr.every((secondItem) => {
447
+ return !areItemsEqual(firstItem, secondItem);
448
+ });
449
+ });
450
+ }
451
+
452
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/drop.mjs
453
+ function drop(arr, itemsCount) {
454
+ itemsCount = Math.max(itemsCount, 0);
455
+ return arr.slice(itemsCount);
456
+ }
457
+
458
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/dropRight.mjs
459
+ function dropRight(arr, itemsCount) {
460
+ itemsCount = Math.min(-itemsCount, 0);
461
+ if (itemsCount === 0) {
462
+ return arr.slice();
463
+ }
464
+ return arr.slice(0, itemsCount);
465
+ }
466
+
467
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/dropRightWhile.mjs
468
+ function dropRightWhile(arr, canContinueDropping) {
469
+ for (let i = arr.length - 1; i >= 0; i--) {
470
+ if (!canContinueDropping(arr[i], i, arr)) {
471
+ return arr.slice(0, i + 1);
472
+ }
473
+ }
474
+ return [];
475
+ }
476
+
477
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/dropWhile.mjs
478
+ function dropWhile(arr, canContinueDropping) {
479
+ const dropEndIndex = arr.findIndex((item, index, arr2) => !canContinueDropping(item, index, arr2));
480
+ if (dropEndIndex === -1) {
481
+ return [];
482
+ }
483
+ return arr.slice(dropEndIndex);
484
+ }
485
+
486
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/fill.mjs
487
+ function fill(array, value, start = 0, end = array.length) {
488
+ const length = array.length;
489
+ const finalStart = Math.max(start >= 0 ? start : length + start, 0);
490
+ const finalEnd = Math.min(end >= 0 ? end : length + end, length);
491
+ for (let i = finalStart; i < finalEnd; i++) {
492
+ array[i] = value;
493
+ }
494
+ return array;
495
+ }
496
+
497
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/promise/semaphore.mjs
498
+ var Semaphore = class {
499
+ constructor(capacity) {
500
+ __publicField(this, "capacity");
501
+ __publicField(this, "available");
502
+ __publicField(this, "deferredTasks", []);
503
+ this.capacity = capacity;
504
+ this.available = capacity;
505
+ }
506
+ acquire() {
507
+ return __async(this, null, function* () {
508
+ if (this.available > 0) {
509
+ this.available--;
510
+ return;
511
+ }
512
+ return new Promise((resolve) => {
513
+ this.deferredTasks.push(resolve);
514
+ });
515
+ });
516
+ }
517
+ release() {
518
+ const deferredTask = this.deferredTasks.shift();
519
+ if (deferredTask != null) {
520
+ deferredTask();
521
+ return;
522
+ }
523
+ if (this.available < this.capacity) {
524
+ this.available++;
525
+ }
526
+ }
527
+ };
528
+
529
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/limitAsync.mjs
530
+ function limitAsync(callback, concurrency) {
531
+ const semaphore = new Semaphore(concurrency);
532
+ return function(...args) {
533
+ return __async(this, null, function* () {
534
+ try {
535
+ yield semaphore.acquire();
536
+ return yield callback.apply(this, args);
537
+ } finally {
538
+ semaphore.release();
539
+ }
540
+ });
541
+ };
542
+ }
543
+
544
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/filterAsync.mjs
545
+ function filterAsync(array, predicate, options) {
546
+ return __async(this, null, function* () {
547
+ if ((options == null ? void 0 : options.concurrency) != null) {
548
+ predicate = limitAsync(predicate, options.concurrency);
549
+ }
550
+ const results = yield Promise.all(array.map(predicate));
551
+ return array.filter((_, index) => results[index]);
552
+ });
553
+ }
554
+
555
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/flatten.mjs
556
+ function flatten(arr, depth = 1) {
557
+ const result = [];
558
+ const flooredDepth = Math.floor(depth);
559
+ const recursive = (arr2, currentDepth) => {
560
+ for (let i = 0; i < arr2.length; i++) {
561
+ const item = arr2[i];
562
+ if (Array.isArray(item) && currentDepth < flooredDepth) {
563
+ recursive(item, currentDepth + 1);
564
+ } else {
565
+ result.push(item);
566
+ }
567
+ }
568
+ };
569
+ recursive(arr, 0);
570
+ return result;
571
+ }
572
+
573
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/flatMap.mjs
574
+ function flatMap(arr, iteratee, depth = 1) {
575
+ return flatten(arr.map((item, index) => iteratee(item, index, arr)), depth);
576
+ }
577
+
578
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/flatMapAsync.mjs
579
+ function flatMapAsync(array, callback, options) {
580
+ return __async(this, null, function* () {
581
+ if ((options == null ? void 0 : options.concurrency) != null) {
582
+ callback = limitAsync(callback, options.concurrency);
583
+ }
584
+ const results = yield Promise.all(array.map(callback));
585
+ return flatten(results);
586
+ });
587
+ }
588
+
589
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/flattenDeep.mjs
590
+ function flattenDeep(arr) {
591
+ return flatten(arr, Infinity);
592
+ }
593
+
594
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/flatMapDeep.mjs
595
+ function flatMapDeep(arr, iteratee) {
596
+ return flattenDeep(arr.map((item, index) => iteratee(item, index, arr)));
597
+ }
598
+
599
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/forEachAsync.mjs
600
+ function forEachAsync(array, callback, options) {
601
+ return __async(this, null, function* () {
602
+ if ((options == null ? void 0 : options.concurrency) != null) {
603
+ callback = limitAsync(callback, options.concurrency);
604
+ }
605
+ yield Promise.all(array.map(callback));
606
+ });
607
+ }
608
+
609
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/forEachRight.mjs
610
+ function forEachRight(arr, callback) {
611
+ for (let i = arr.length - 1; i >= 0; i--) {
612
+ const element = arr[i];
613
+ callback(element, i, arr);
614
+ }
615
+ }
616
+
617
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/groupBy.mjs
618
+ function groupBy(arr, getKeyFromItem) {
619
+ const result = {};
620
+ for (let i = 0; i < arr.length; i++) {
621
+ const item = arr[i];
622
+ const key = getKeyFromItem(item, i, arr);
623
+ if (!Object.hasOwn(result, key)) {
624
+ result[key] = [];
625
+ }
626
+ result[key].push(item);
627
+ }
628
+ return result;
629
+ }
630
+
631
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/head.mjs
632
+ function head(arr) {
633
+ return arr[0];
634
+ }
635
+
636
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/initial.mjs
637
+ function initial(arr) {
638
+ return arr.slice(0, -1);
639
+ }
640
+
641
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/intersection.mjs
642
+ function intersection(firstArr, secondArr) {
643
+ const secondSet = new Set(secondArr);
644
+ return firstArr.filter((item) => secondSet.has(item));
645
+ }
646
+
647
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/intersectionBy.mjs
648
+ function intersectionBy(firstArr, secondArr, mapper) {
649
+ const result = [];
650
+ const mappedSecondSet = new Set(secondArr.map(mapper));
651
+ for (let i = 0; i < firstArr.length; i++) {
652
+ const item = firstArr[i];
653
+ const mappedItem = mapper(item);
654
+ if (mappedSecondSet.has(mappedItem)) {
655
+ result.push(item);
656
+ mappedSecondSet.delete(mappedItem);
657
+ }
658
+ }
659
+ return result;
660
+ }
661
+
662
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/intersectionWith.mjs
663
+ function intersectionWith(firstArr, secondArr, areItemsEqual) {
664
+ return firstArr.filter((firstItem) => {
665
+ return secondArr.some((secondItem) => {
666
+ return areItemsEqual(firstItem, secondItem);
667
+ });
668
+ });
669
+ }
670
+
671
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/isSubset.mjs
672
+ function isSubset(superset, subset) {
673
+ return difference(subset, superset).length === 0;
674
+ }
675
+
676
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/isSubsetWith.mjs
677
+ function isSubsetWith(superset, subset, areItemsEqual) {
678
+ return differenceWith(subset, superset, areItemsEqual).length === 0;
679
+ }
680
+
681
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/keyBy.mjs
682
+ function keyBy(arr, getKeyFromItem) {
683
+ const result = {};
684
+ for (let i = 0; i < arr.length; i++) {
685
+ const item = arr[i];
686
+ const key = getKeyFromItem(item, i, arr);
687
+ result[key] = item;
688
+ }
689
+ return result;
690
+ }
691
+
692
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/last.mjs
693
+ function last(arr) {
694
+ return arr[arr.length - 1];
695
+ }
696
+
697
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/mapAsync.mjs
698
+ function mapAsync(array, callback, options) {
699
+ if ((options == null ? void 0 : options.concurrency) != null) {
700
+ callback = limitAsync(callback, options.concurrency);
701
+ }
702
+ return Promise.all(array.map(callback));
703
+ }
704
+
705
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/maxBy.mjs
706
+ function maxBy(items, getValue) {
707
+ if (items.length === 0) {
708
+ return void 0;
709
+ }
710
+ let maxElement = items[0];
711
+ let max = getValue(maxElement, 0, items);
712
+ for (let i = 1; i < items.length; i++) {
713
+ const element = items[i];
714
+ const value = getValue(element, i, items);
715
+ if (value > max) {
716
+ max = value;
717
+ maxElement = element;
718
+ }
719
+ }
720
+ return maxElement;
721
+ }
722
+
723
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/minBy.mjs
724
+ function minBy(items, getValue) {
725
+ if (items.length === 0) {
726
+ return void 0;
727
+ }
728
+ let minElement = items[0];
729
+ let min = getValue(minElement, 0, items);
730
+ for (let i = 1; i < items.length; i++) {
731
+ const element = items[i];
732
+ const value = getValue(element, i, items);
733
+ if (value < min) {
734
+ min = value;
735
+ minElement = element;
736
+ }
737
+ }
738
+ return minElement;
739
+ }
740
+
741
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/_internal/compareValues.mjs
742
+ function compareValues(a, b, order) {
743
+ if (a < b) {
744
+ return order === "asc" ? -1 : 1;
745
+ }
746
+ if (a > b) {
747
+ return order === "asc" ? 1 : -1;
748
+ }
749
+ return 0;
750
+ }
751
+
752
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/orderBy.mjs
753
+ function orderBy(arr, criteria, orders) {
754
+ return arr.slice().sort((a, b) => {
755
+ const ordersLength = orders.length;
756
+ for (let i = 0; i < criteria.length; i++) {
757
+ const order = ordersLength > i ? orders[i] : orders[ordersLength - 1];
758
+ const criterion = criteria[i];
759
+ const criterionIsFunction = typeof criterion === "function";
760
+ const valueA = criterionIsFunction ? criterion(a) : a[criterion];
761
+ const valueB = criterionIsFunction ? criterion(b) : b[criterion];
762
+ const result = compareValues(valueA, valueB, order);
763
+ if (result !== 0) {
764
+ return result;
765
+ }
766
+ }
767
+ return 0;
768
+ });
769
+ }
770
+
771
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/partition.mjs
772
+ function partition(arr, isInTruthy) {
773
+ const truthy = [];
774
+ const falsy = [];
775
+ for (let i = 0; i < arr.length; i++) {
776
+ const item = arr[i];
777
+ if (isInTruthy(item, i, arr)) {
778
+ truthy.push(item);
779
+ } else {
780
+ falsy.push(item);
781
+ }
782
+ }
783
+ return [truthy, falsy];
784
+ }
785
+
786
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/pull.mjs
787
+ function pull(arr, valuesToRemove) {
788
+ const valuesSet = new Set(valuesToRemove);
789
+ let resultIndex = 0;
790
+ for (let i = 0; i < arr.length; i++) {
791
+ if (valuesSet.has(arr[i])) {
792
+ continue;
793
+ }
794
+ if (!Object.hasOwn(arr, i)) {
795
+ delete arr[resultIndex++];
796
+ continue;
797
+ }
798
+ arr[resultIndex++] = arr[i];
799
+ }
800
+ arr.length = resultIndex;
801
+ return arr;
802
+ }
803
+
804
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/pullAt.mjs
805
+ function pullAt(arr, indicesToRemove) {
806
+ const removed = at(arr, indicesToRemove);
807
+ const indices = new Set(indicesToRemove.slice().sort((x, y) => y - x));
808
+ for (const index of indices) {
809
+ arr.splice(index, 1);
810
+ }
811
+ return removed;
812
+ }
813
+
814
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/reduceAsync.mjs
815
+ function reduceAsync(array, reducer, initialValue) {
816
+ return __async(this, null, function* () {
817
+ let startIndex = 0;
818
+ if (initialValue == null) {
819
+ initialValue = array[0];
820
+ startIndex = 1;
821
+ }
822
+ let accumulator = initialValue;
823
+ for (let i = startIndex; i < array.length; i++) {
824
+ accumulator = yield reducer(accumulator, array[i], i, array);
825
+ }
826
+ return accumulator;
827
+ });
828
+ }
829
+
830
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/remove.mjs
831
+ function remove(arr, shouldRemoveElement) {
832
+ const originalArr = arr.slice();
833
+ const removed = [];
834
+ let resultIndex = 0;
835
+ for (let i = 0; i < arr.length; i++) {
836
+ if (shouldRemoveElement(arr[i], i, originalArr)) {
837
+ removed.push(arr[i]);
838
+ continue;
839
+ }
840
+ if (!Object.hasOwn(arr, i)) {
841
+ delete arr[resultIndex++];
842
+ continue;
843
+ }
844
+ arr[resultIndex++] = arr[i];
845
+ }
846
+ arr.length = resultIndex;
847
+ return removed;
848
+ }
849
+
850
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/sample.mjs
851
+ function sample(arr) {
852
+ const randomIndex = Math.floor(Math.random() * arr.length);
853
+ return arr[randomIndex];
854
+ }
855
+
856
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/random.mjs
857
+ function random(minimum, maximum) {
858
+ if (maximum == null) {
859
+ maximum = minimum;
860
+ minimum = 0;
861
+ }
862
+ if (minimum >= maximum) {
863
+ throw new Error("Invalid input: The maximum value must be greater than the minimum value.");
864
+ }
865
+ return Math.random() * (maximum - minimum) + minimum;
866
+ }
867
+
868
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/randomInt.mjs
869
+ function randomInt(minimum, maximum) {
870
+ return Math.floor(random(minimum, maximum));
871
+ }
872
+
873
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/sampleSize.mjs
874
+ function sampleSize(array, size) {
875
+ if (size > array.length) {
876
+ throw new Error("Size must be less than or equal to the length of array.");
877
+ }
878
+ const result = new Array(size);
879
+ const selected = /* @__PURE__ */ new Set();
880
+ for (let step = array.length - size, resultIndex = 0; step < array.length; step++, resultIndex++) {
881
+ let index = randomInt(0, step + 1);
882
+ if (selected.has(index)) {
883
+ index = step;
884
+ }
885
+ selected.add(index);
886
+ result[resultIndex] = array[index];
887
+ }
888
+ return result;
889
+ }
890
+
891
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/shuffle.mjs
892
+ function shuffle(arr) {
893
+ const result = arr.slice();
894
+ for (let i = result.length - 1; i >= 1; i--) {
895
+ const j = Math.floor(Math.random() * (i + 1));
896
+ [result[i], result[j]] = [result[j], result[i]];
897
+ }
898
+ return result;
899
+ }
900
+
901
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/sortBy.mjs
902
+ function sortBy(arr, criteria) {
903
+ return orderBy(arr, criteria, ["asc"]);
904
+ }
905
+
906
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/tail.mjs
907
+ function tail(arr) {
908
+ return arr.slice(1);
909
+ }
910
+
911
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isSymbol.mjs
912
+ function isSymbol(value) {
913
+ return typeof value === "symbol" || value instanceof Symbol;
914
+ }
915
+
916
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toNumber.mjs
917
+ function toNumber(value) {
918
+ if (isSymbol(value)) {
919
+ return NaN;
920
+ }
921
+ return Number(value);
922
+ }
923
+
924
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toFinite.mjs
925
+ function toFinite(value) {
926
+ if (!value) {
927
+ return value === 0 ? value : 0;
928
+ }
929
+ value = toNumber(value);
930
+ if (value === Infinity || value === -Infinity) {
931
+ const sign = value < 0 ? -1 : 1;
932
+ return sign * Number.MAX_VALUE;
933
+ }
934
+ return value === value ? value : 0;
935
+ }
936
+
937
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toInteger.mjs
938
+ function toInteger(value) {
939
+ const finite = toFinite(value);
940
+ const remainder = finite % 1;
941
+ return remainder ? finite - remainder : finite;
942
+ }
943
+
944
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/take.mjs
945
+ function take(arr, count, guard) {
946
+ count = guard || count === void 0 ? 1 : toInteger(count);
947
+ return arr.slice(0, count);
948
+ }
949
+
950
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/takeRight.mjs
951
+ function takeRight(arr, count, guard) {
952
+ count = guard || count === void 0 ? 1 : toInteger(count);
953
+ if (count <= 0 || arr.length === 0) {
954
+ return [];
955
+ }
956
+ return arr.slice(-count);
957
+ }
958
+
959
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/takeRightWhile.mjs
960
+ function takeRightWhile(arr, shouldContinueTaking) {
961
+ for (let i = arr.length - 1; i >= 0; i--) {
962
+ if (!shouldContinueTaking(arr[i], i, arr)) {
963
+ return arr.slice(i + 1);
964
+ }
965
+ }
966
+ return arr.slice();
967
+ }
968
+
969
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/takeWhile.mjs
970
+ function takeWhile(arr, shouldContinueTaking) {
971
+ const result = [];
972
+ for (let i = 0; i < arr.length; i++) {
973
+ const item = arr[i];
974
+ if (!shouldContinueTaking(item, i, arr)) {
975
+ break;
976
+ }
977
+ result.push(item);
978
+ }
979
+ return result;
980
+ }
981
+
982
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/toFilled.mjs
983
+ function toFilled(arr, value, start = 0, end = arr.length) {
984
+ const length = arr.length;
985
+ const finalStart = Math.max(start >= 0 ? start : length + start, 0);
986
+ const finalEnd = Math.min(end >= 0 ? end : length + end, length);
987
+ const newArr = arr.slice();
988
+ for (let i = finalStart; i < finalEnd; i++) {
989
+ newArr[i] = value;
990
+ }
991
+ return newArr;
992
+ }
993
+
994
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/uniq.mjs
995
+ function uniq(arr) {
996
+ return [...new Set(arr)];
997
+ }
998
+
999
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/union.mjs
1000
+ function union(arr1, arr2) {
1001
+ return uniq(arr1.concat(arr2));
1002
+ }
1003
+
1004
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/uniqBy.mjs
1005
+ function uniqBy(arr, mapper) {
1006
+ const map = /* @__PURE__ */ new Map();
1007
+ for (let i = 0; i < arr.length; i++) {
1008
+ const item = arr[i];
1009
+ const key = mapper(item, i, arr);
1010
+ if (!map.has(key)) {
1011
+ map.set(key, item);
1012
+ }
1013
+ }
1014
+ return Array.from(map.values());
1015
+ }
1016
+
1017
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/unionBy.mjs
1018
+ function unionBy(arr1, arr2, mapper) {
1019
+ return uniqBy(arr1.concat(arr2), mapper);
1020
+ }
1021
+
1022
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/uniqWith.mjs
1023
+ function uniqWith(arr, areItemsEqual) {
1024
+ const result = [];
1025
+ for (let i = 0; i < arr.length; i++) {
1026
+ const item = arr[i];
1027
+ const isUniq = result.every((v) => !areItemsEqual(v, item));
1028
+ if (isUniq) {
1029
+ result.push(item);
1030
+ }
1031
+ }
1032
+ return result;
1033
+ }
1034
+
1035
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/unionWith.mjs
1036
+ function unionWith(arr1, arr2, areItemsEqual) {
1037
+ return uniqWith(arr1.concat(arr2), areItemsEqual);
1038
+ }
1039
+
1040
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/unzip.mjs
1041
+ function unzip(zipped) {
1042
+ let maxLen = 0;
1043
+ for (let i = 0; i < zipped.length; i++) {
1044
+ if (zipped[i].length > maxLen) {
1045
+ maxLen = zipped[i].length;
1046
+ }
1047
+ }
1048
+ const result = new Array(maxLen);
1049
+ for (let i = 0; i < maxLen; i++) {
1050
+ result[i] = new Array(zipped.length);
1051
+ for (let j = 0; j < zipped.length; j++) {
1052
+ result[i][j] = zipped[j][i];
1053
+ }
1054
+ }
1055
+ return result;
1056
+ }
1057
+
1058
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/unzipWith.mjs
1059
+ function unzipWith(target, iteratee) {
1060
+ const maxLength = Math.max(...target.map((innerArray) => innerArray.length));
1061
+ const result = new Array(maxLength);
1062
+ for (let i = 0; i < maxLength; i++) {
1063
+ const group = new Array(target.length);
1064
+ for (let j = 0; j < target.length; j++) {
1065
+ group[j] = target[j][i];
1066
+ }
1067
+ result[i] = iteratee(...group);
1068
+ }
1069
+ return result;
1070
+ }
1071
+
1072
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/windowed.mjs
1073
+ function windowed(arr, size, step = 1, { partialWindows = false } = {}) {
1074
+ if (size <= 0 || !Number.isInteger(size)) {
1075
+ throw new Error("Size must be a positive integer.");
1076
+ }
1077
+ if (step <= 0 || !Number.isInteger(step)) {
1078
+ throw new Error("Step must be a positive integer.");
1079
+ }
1080
+ const result = [];
1081
+ const end = partialWindows ? arr.length : arr.length - size + 1;
1082
+ for (let i = 0; i < end; i += step) {
1083
+ result.push(arr.slice(i, i + size));
1084
+ }
1085
+ return result;
1086
+ }
1087
+
1088
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/without.mjs
1089
+ function without(array, ...values) {
1090
+ return difference(array, values);
1091
+ }
1092
+
1093
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/xor.mjs
1094
+ function xor(arr1, arr2) {
1095
+ return difference(union(arr1, arr2), intersection(arr1, arr2));
1096
+ }
1097
+
1098
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/xorBy.mjs
1099
+ function xorBy(arr1, arr2, mapper) {
1100
+ const union2 = unionBy(arr1, arr2, mapper);
1101
+ const intersection2 = intersectionBy(arr1, arr2, mapper);
1102
+ return differenceBy(union2, intersection2, mapper);
1103
+ }
1104
+
1105
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/xorWith.mjs
1106
+ function xorWith(arr1, arr2, areElementsEqual) {
1107
+ const union2 = unionWith(arr1, arr2, areElementsEqual);
1108
+ const intersection2 = intersectionWith(arr1, arr2, areElementsEqual);
1109
+ return differenceWith(union2, intersection2, areElementsEqual);
1110
+ }
1111
+
1112
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/zip.mjs
1113
+ function zip(...arrs) {
1114
+ let rowCount = 0;
1115
+ for (let i = 0; i < arrs.length; i++) {
1116
+ if (arrs[i].length > rowCount) {
1117
+ rowCount = arrs[i].length;
1118
+ }
1119
+ }
1120
+ const columnCount = arrs.length;
1121
+ const result = Array(rowCount);
1122
+ for (let i = 0; i < rowCount; ++i) {
1123
+ const row = Array(columnCount);
1124
+ for (let j = 0; j < columnCount; ++j) {
1125
+ row[j] = arrs[j][i];
1126
+ }
1127
+ result[i] = row;
1128
+ }
1129
+ return result;
1130
+ }
1131
+
1132
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/zipObject.mjs
1133
+ function zipObject(keys, values) {
1134
+ const result = {};
1135
+ for (let i = 0; i < keys.length; i++) {
1136
+ result[keys[i]] = values[i];
1137
+ }
1138
+ return result;
1139
+ }
1140
+
1141
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/array/zipWith.mjs
1142
+ function zipWith(arr1, ...rest2) {
1143
+ const arrs = [arr1, ...rest2.slice(0, -1)];
1144
+ const combine = rest2[rest2.length - 1];
1145
+ const maxIndex = Math.max(...arrs.map((arr) => arr.length));
1146
+ const result = Array(maxIndex);
1147
+ for (let i = 0; i < maxIndex; i++) {
1148
+ const elements = arrs.map((arr) => arr[i]);
1149
+ result[i] = combine(...elements, i);
1150
+ }
1151
+ return result;
1152
+ }
1153
+
1154
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/error/AbortError.mjs
1155
+ var AbortError = class extends Error {
1156
+ constructor(message = "The operation was aborted") {
1157
+ super(message);
1158
+ this.name = "AbortError";
1159
+ }
1160
+ };
1161
+
1162
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/error/TimeoutError.mjs
1163
+ var TimeoutError = class extends Error {
1164
+ constructor(message = "The operation was timed out") {
1165
+ super(message);
1166
+ this.name = "TimeoutError";
1167
+ }
1168
+ };
1169
+
1170
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/after.mjs
1171
+ function after(n, func) {
1172
+ if (!Number.isInteger(n) || n < 0) {
1173
+ throw new Error(`n must be a non-negative integer.`);
1174
+ }
1175
+ let counter = 0;
1176
+ return (...args) => {
1177
+ if (++counter >= n) {
1178
+ return func(...args);
1179
+ }
1180
+ return void 0;
1181
+ };
1182
+ }
1183
+
1184
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/ary.mjs
1185
+ function ary(func, n) {
1186
+ return function(...args) {
1187
+ return func.apply(this, args.slice(0, n));
1188
+ };
1189
+ }
1190
+
1191
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/asyncNoop.mjs
1192
+ function asyncNoop() {
1193
+ return __async(this, null, function* () {
1194
+ });
1195
+ }
1196
+
1197
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/before.mjs
1198
+ function before(n, func) {
1199
+ if (!Number.isInteger(n) || n < 0) {
1200
+ throw new Error("n must be a non-negative integer.");
1201
+ }
1202
+ let counter = 0;
1203
+ return (...args) => {
1204
+ if (++counter < n) {
1205
+ return func(...args);
1206
+ }
1207
+ return void 0;
1208
+ };
1209
+ }
1210
+
1211
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/curry.mjs
1212
+ function curry(func) {
1213
+ if (func.length === 0 || func.length === 1) {
1214
+ return func;
1215
+ }
1216
+ return function(arg) {
1217
+ return makeCurry(func, func.length, [arg]);
1218
+ };
1219
+ }
1220
+ function makeCurry(origin, argsLength, args) {
1221
+ if (args.length === argsLength) {
1222
+ return origin(...args);
1223
+ } else {
1224
+ const next = function(arg) {
1225
+ return makeCurry(origin, argsLength, [...args, arg]);
1226
+ };
1227
+ return next;
1228
+ }
1229
+ }
1230
+
1231
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/curryRight.mjs
1232
+ function curryRight(func) {
1233
+ if (func.length === 0 || func.length === 1) {
1234
+ return func;
1235
+ }
1236
+ return function(arg) {
1237
+ return makeCurryRight(func, func.length, [arg]);
1238
+ };
1239
+ }
1240
+ function makeCurryRight(origin, argsLength, args) {
1241
+ if (args.length === argsLength) {
1242
+ return origin(...args);
1243
+ } else {
1244
+ const next = function(arg) {
1245
+ return makeCurryRight(origin, argsLength, [arg, ...args]);
1246
+ };
1247
+ return next;
1248
+ }
1249
+ }
1250
+
1251
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/debounce.mjs
1252
+ function debounce(func, debounceMs, { signal, edges } = {}) {
1253
+ let pendingThis = void 0;
1254
+ let pendingArgs = null;
1255
+ const leading = edges != null && edges.includes("leading");
1256
+ const trailing = edges == null || edges.includes("trailing");
1257
+ const invoke = () => {
1258
+ if (pendingArgs !== null) {
1259
+ func.apply(pendingThis, pendingArgs);
1260
+ pendingThis = void 0;
1261
+ pendingArgs = null;
1262
+ }
1263
+ };
1264
+ const onTimerEnd = () => {
1265
+ if (trailing) {
1266
+ invoke();
1267
+ }
1268
+ cancel();
1269
+ };
1270
+ let timeoutId = null;
1271
+ const schedule = () => {
1272
+ if (timeoutId != null) {
1273
+ clearTimeout(timeoutId);
1274
+ }
1275
+ timeoutId = setTimeout(() => {
1276
+ timeoutId = null;
1277
+ onTimerEnd();
1278
+ }, debounceMs);
1279
+ };
1280
+ const cancelTimer = () => {
1281
+ if (timeoutId !== null) {
1282
+ clearTimeout(timeoutId);
1283
+ timeoutId = null;
1284
+ }
1285
+ };
1286
+ const cancel = () => {
1287
+ cancelTimer();
1288
+ pendingThis = void 0;
1289
+ pendingArgs = null;
1290
+ };
1291
+ const flush = () => {
1292
+ invoke();
1293
+ };
1294
+ const debounced = function(...args) {
1295
+ if (signal == null ? void 0 : signal.aborted) {
1296
+ return;
1297
+ }
1298
+ pendingThis = this;
1299
+ pendingArgs = args;
1300
+ const isFirstCall = timeoutId == null;
1301
+ schedule();
1302
+ if (leading && isFirstCall) {
1303
+ invoke();
1304
+ }
1305
+ };
1306
+ debounced.schedule = schedule;
1307
+ debounced.cancel = cancel;
1308
+ debounced.flush = flush;
1309
+ signal == null ? void 0 : signal.addEventListener("abort", cancel, { once: true });
1310
+ return debounced;
1311
+ }
1312
+
1313
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/flow.mjs
1314
+ function flow(...funcs) {
1315
+ return function(...args) {
1316
+ let result = funcs.length ? funcs[0].apply(this, args) : args[0];
1317
+ for (let i = 1; i < funcs.length; i++) {
1318
+ result = funcs[i].call(this, result);
1319
+ }
1320
+ return result;
1321
+ };
1322
+ }
1323
+
1324
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/flowRight.mjs
1325
+ function flowRight(...funcs) {
1326
+ return flow(...funcs.reverse());
1327
+ }
1328
+
1329
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/identity.mjs
1330
+ function identity(x) {
1331
+ return x;
1332
+ }
1333
+
1334
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/memoize.mjs
1335
+ function memoize(fn, options = {}) {
1336
+ const { cache = /* @__PURE__ */ new Map(), getCacheKey } = options;
1337
+ const memoizedFn = function(arg) {
1338
+ const key = getCacheKey ? getCacheKey(arg) : arg;
1339
+ if (cache.has(key)) {
1340
+ return cache.get(key);
1341
+ }
1342
+ const result = fn.call(this, arg);
1343
+ cache.set(key, result);
1344
+ return result;
1345
+ };
1346
+ memoizedFn.cache = cache;
1347
+ return memoizedFn;
1348
+ }
1349
+
1350
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/negate.mjs
1351
+ function negate(func) {
1352
+ return ((...args) => !func(...args));
1353
+ }
1354
+
1355
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/noop.mjs
1356
+ function noop() {
1357
+ }
1358
+
1359
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/once.mjs
1360
+ function once(func) {
1361
+ let called = false;
1362
+ let cache;
1363
+ return function(...args) {
1364
+ if (!called) {
1365
+ called = true;
1366
+ cache = func(...args);
1367
+ }
1368
+ return cache;
1369
+ };
1370
+ }
1371
+
1372
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/partial.mjs
1373
+ function partial(func, ...partialArgs) {
1374
+ return partialImpl(func, placeholderSymbol, ...partialArgs);
1375
+ }
1376
+ function partialImpl(func, placeholder, ...partialArgs) {
1377
+ const partialed = function(...providedArgs) {
1378
+ let providedArgsIndex = 0;
1379
+ const substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
1380
+ const remainingArgs = providedArgs.slice(providedArgsIndex);
1381
+ return func.apply(this, substitutedArgs.concat(remainingArgs));
1382
+ };
1383
+ if (func.prototype) {
1384
+ partialed.prototype = Object.create(func.prototype);
1385
+ }
1386
+ return partialed;
1387
+ }
1388
+ var placeholderSymbol = /* @__PURE__ */ Symbol("partial.placeholder");
1389
+ partial.placeholder = placeholderSymbol;
1390
+
1391
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/partialRight.mjs
1392
+ function partialRight(func, ...partialArgs) {
1393
+ return partialRightImpl(func, placeholderSymbol2, ...partialArgs);
1394
+ }
1395
+ function partialRightImpl(func, placeholder, ...partialArgs) {
1396
+ const partialedRight = function(...providedArgs) {
1397
+ const placeholderLength = partialArgs.filter((arg) => arg === placeholder).length;
1398
+ const rangeLength = Math.max(providedArgs.length - placeholderLength, 0);
1399
+ const remainingArgs = providedArgs.slice(0, rangeLength);
1400
+ let providedArgsIndex = rangeLength;
1401
+ const substitutedArgs = partialArgs.slice().map((arg) => arg === placeholder ? providedArgs[providedArgsIndex++] : arg);
1402
+ return func.apply(this, remainingArgs.concat(substitutedArgs));
1403
+ };
1404
+ if (func.prototype) {
1405
+ partialedRight.prototype = Object.create(func.prototype);
1406
+ }
1407
+ return partialedRight;
1408
+ }
1409
+ var placeholderSymbol2 = /* @__PURE__ */ Symbol("partialRight.placeholder");
1410
+ partialRight.placeholder = placeholderSymbol2;
1411
+
1412
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/rest.mjs
1413
+ function rest(func, startIndex = func.length - 1) {
1414
+ return function(...args) {
1415
+ const rest2 = args.slice(startIndex);
1416
+ const params = args.slice(0, startIndex);
1417
+ while (params.length < startIndex) {
1418
+ params.push(void 0);
1419
+ }
1420
+ return func.apply(this, [...params, rest2]);
1421
+ };
1422
+ }
1423
+
1424
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/promise/delay.mjs
1425
+ function delay(ms, { signal } = {}) {
1426
+ return new Promise((resolve, reject) => {
1427
+ const abortError = () => {
1428
+ reject(new AbortError());
1429
+ };
1430
+ const abortHandler = () => {
1431
+ clearTimeout(timeoutId);
1432
+ abortError();
1433
+ };
1434
+ if (signal == null ? void 0 : signal.aborted) {
1435
+ return abortError();
1436
+ }
1437
+ const timeoutId = setTimeout(() => {
1438
+ signal == null ? void 0 : signal.removeEventListener("abort", abortHandler);
1439
+ resolve();
1440
+ }, ms);
1441
+ signal == null ? void 0 : signal.addEventListener("abort", abortHandler, { once: true });
1442
+ });
1443
+ }
1444
+
1445
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/retry.mjs
1446
+ var DEFAULT_DELAY = 0;
1447
+ var DEFAULT_RETRIES = Number.POSITIVE_INFINITY;
1448
+ var DEFAULT_SHOULD_RETRY = () => true;
1449
+ function retry(func, _options) {
1450
+ return __async(this, null, function* () {
1451
+ var _a, _b, _c;
1452
+ let delay$1;
1453
+ let retries;
1454
+ let signal;
1455
+ let shouldRetry;
1456
+ if (typeof _options === "number") {
1457
+ delay$1 = DEFAULT_DELAY;
1458
+ retries = _options;
1459
+ signal = void 0;
1460
+ shouldRetry = DEFAULT_SHOULD_RETRY;
1461
+ } else {
1462
+ delay$1 = (_a = _options == null ? void 0 : _options.delay) != null ? _a : DEFAULT_DELAY;
1463
+ retries = (_b = _options == null ? void 0 : _options.retries) != null ? _b : DEFAULT_RETRIES;
1464
+ signal = _options == null ? void 0 : _options.signal;
1465
+ shouldRetry = (_c = _options == null ? void 0 : _options.shouldRetry) != null ? _c : DEFAULT_SHOULD_RETRY;
1466
+ }
1467
+ let error;
1468
+ for (let attempts = 0; attempts < retries; attempts++) {
1469
+ if (signal == null ? void 0 : signal.aborted) {
1470
+ throw error != null ? error : new Error(`The retry operation was aborted due to an abort signal.`);
1471
+ }
1472
+ try {
1473
+ return yield func();
1474
+ } catch (err) {
1475
+ error = err;
1476
+ if (!shouldRetry(err, attempts)) {
1477
+ throw err;
1478
+ }
1479
+ const currentDelay = typeof delay$1 === "function" ? delay$1(attempts) : delay$1;
1480
+ yield delay(currentDelay);
1481
+ }
1482
+ }
1483
+ throw error;
1484
+ });
1485
+ }
1486
+
1487
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/spread.mjs
1488
+ function spread(func) {
1489
+ return function(argsArr) {
1490
+ return func.apply(this, argsArr);
1491
+ };
1492
+ }
1493
+
1494
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/throttle.mjs
1495
+ function throttle(func, throttleMs, { signal, edges = ["leading", "trailing"] } = {}) {
1496
+ let pendingAt = null;
1497
+ const debounced = debounce(function(...args) {
1498
+ pendingAt = Date.now();
1499
+ func.apply(this, args);
1500
+ }, throttleMs, { signal, edges });
1501
+ const throttled = function(...args) {
1502
+ if (pendingAt == null) {
1503
+ pendingAt = Date.now();
1504
+ }
1505
+ if (Date.now() - pendingAt >= throttleMs) {
1506
+ pendingAt = Date.now();
1507
+ func.apply(this, args);
1508
+ debounced.cancel();
1509
+ debounced.schedule();
1510
+ return;
1511
+ }
1512
+ debounced.apply(this, args);
1513
+ };
1514
+ throttled.cancel = debounced.cancel;
1515
+ throttled.flush = debounced.flush;
1516
+ return throttled;
1517
+ }
1518
+
1519
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/function/unary.mjs
1520
+ function unary(func) {
1521
+ return ary(func, 1);
1522
+ }
1523
+
1524
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/clamp.mjs
1525
+ function clamp(value, bound1, bound2) {
1526
+ if (bound2 == null) {
1527
+ return Math.min(value, bound1);
1528
+ }
1529
+ return Math.min(Math.max(value, bound1), bound2);
1530
+ }
1531
+
1532
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/inRange.mjs
1533
+ function inRange(value, minimum, maximum) {
1534
+ if (maximum == null) {
1535
+ maximum = minimum;
1536
+ minimum = 0;
1537
+ }
1538
+ if (minimum >= maximum) {
1539
+ throw new Error("The maximum value must be greater than the minimum value.");
1540
+ }
1541
+ return minimum <= value && value < maximum;
1542
+ }
1543
+
1544
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/sum.mjs
1545
+ function sum(nums) {
1546
+ let result = 0;
1547
+ for (let i = 0; i < nums.length; i++) {
1548
+ result += nums[i];
1549
+ }
1550
+ return result;
1551
+ }
1552
+
1553
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/mean.mjs
1554
+ function mean(nums) {
1555
+ return sum(nums) / nums.length;
1556
+ }
1557
+
1558
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/sumBy.mjs
1559
+ function sumBy(items, getValue) {
1560
+ let result = 0;
1561
+ for (let i = 0; i < items.length; i++) {
1562
+ result += getValue(items[i], i);
1563
+ }
1564
+ return result;
1565
+ }
1566
+
1567
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/meanBy.mjs
1568
+ function meanBy(items, getValue) {
1569
+ return sumBy(items, (item) => getValue(item)) / items.length;
1570
+ }
1571
+
1572
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/median.mjs
1573
+ function median(nums) {
1574
+ if (nums.length === 0) {
1575
+ return NaN;
1576
+ }
1577
+ const sorted = nums.slice().sort((a, b) => a - b);
1578
+ const middleIndex = Math.floor(sorted.length / 2);
1579
+ if (sorted.length % 2 === 0) {
1580
+ return (sorted[middleIndex - 1] + sorted[middleIndex]) / 2;
1581
+ } else {
1582
+ return sorted[middleIndex];
1583
+ }
1584
+ }
1585
+
1586
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/medianBy.mjs
1587
+ function medianBy(items, getValue) {
1588
+ const nums = items.map((x) => getValue(x));
1589
+ return median(nums);
1590
+ }
1591
+
1592
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/range.mjs
1593
+ function range(start, end, step = 1) {
1594
+ if (end == null) {
1595
+ end = start;
1596
+ start = 0;
1597
+ }
1598
+ if (!Number.isInteger(step) || step === 0) {
1599
+ throw new Error(`The step value must be a non-zero integer.`);
1600
+ }
1601
+ const length = Math.max(Math.ceil((end - start) / step), 0);
1602
+ const result = new Array(length);
1603
+ for (let i = 0; i < length; i++) {
1604
+ result[i] = start + i * step;
1605
+ }
1606
+ return result;
1607
+ }
1608
+
1609
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/rangeRight.mjs
1610
+ function rangeRight(start, end, step = 1) {
1611
+ if (end == null) {
1612
+ end = start;
1613
+ start = 0;
1614
+ }
1615
+ if (!Number.isInteger(step) || step === 0) {
1616
+ throw new Error(`The step value must be a non-zero integer.`);
1617
+ }
1618
+ const length = Math.max(Math.ceil((end - start) / step), 0);
1619
+ const result = new Array(length);
1620
+ for (let i = 0; i < length; i++) {
1621
+ result[i] = start + (length - i - 1) * step;
1622
+ }
1623
+ return result;
1624
+ }
1625
+
1626
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/math/round.mjs
1627
+ function round(value, precision = 0) {
1628
+ if (!Number.isInteger(precision)) {
1629
+ throw new Error("Precision must be an integer.");
1630
+ }
1631
+ const multiplier = Math.pow(10, precision);
1632
+ return Math.round(value * multiplier) / multiplier;
1633
+ }
1634
+
1635
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPrimitive.mjs
1636
+ function isPrimitive(value) {
1637
+ return value == null || typeof value !== "object" && typeof value !== "function";
1638
+ }
1639
+
1640
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isTypedArray.mjs
1641
+ function isTypedArray(x) {
1642
+ return ArrayBuffer.isView(x) && !(x instanceof DataView);
1643
+ }
1644
+
1645
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/clone.mjs
1646
+ function clone(obj) {
1647
+ if (isPrimitive(obj)) {
1648
+ return obj;
1649
+ }
1650
+ if (Array.isArray(obj) || isTypedArray(obj) || obj instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && obj instanceof SharedArrayBuffer) {
1651
+ return obj.slice(0);
1652
+ }
1653
+ const prototype = Object.getPrototypeOf(obj);
1654
+ if (prototype == null) {
1655
+ return Object.assign(Object.create(prototype), obj);
1656
+ }
1657
+ const Constructor = prototype.constructor;
1658
+ if (obj instanceof Date || obj instanceof Map || obj instanceof Set) {
1659
+ return new Constructor(obj);
1660
+ }
1661
+ if (obj instanceof RegExp) {
1662
+ const newRegExp = new Constructor(obj);
1663
+ newRegExp.lastIndex = obj.lastIndex;
1664
+ return newRegExp;
1665
+ }
1666
+ if (obj instanceof DataView) {
1667
+ return new Constructor(obj.buffer.slice(0));
1668
+ }
1669
+ if (obj instanceof Error) {
1670
+ let newError;
1671
+ if (obj instanceof AggregateError) {
1672
+ newError = new Constructor(obj.errors, obj.message, { cause: obj.cause });
1673
+ } else {
1674
+ newError = new Constructor(obj.message, { cause: obj.cause });
1675
+ }
1676
+ newError.stack = obj.stack;
1677
+ Object.assign(newError, obj);
1678
+ return newError;
1679
+ }
1680
+ if (typeof File !== "undefined" && obj instanceof File) {
1681
+ const newFile = new Constructor([obj], obj.name, { type: obj.type, lastModified: obj.lastModified });
1682
+ return newFile;
1683
+ }
1684
+ if (typeof obj === "object") {
1685
+ const newObject = Object.create(prototype);
1686
+ return Object.assign(newObject, obj);
1687
+ }
1688
+ return obj;
1689
+ }
1690
+
1691
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getSymbols.mjs
1692
+ function getSymbols(object) {
1693
+ return Object.getOwnPropertySymbols(object).filter((symbol) => Object.prototype.propertyIsEnumerable.call(object, symbol));
1694
+ }
1695
+
1696
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/getTag.mjs
1697
+ function getTag(value) {
1698
+ if (value == null) {
1699
+ return value === void 0 ? "[object Undefined]" : "[object Null]";
1700
+ }
1701
+ return Object.prototype.toString.call(value);
1702
+ }
1703
+
1704
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/tags.mjs
1705
+ var regexpTag = "[object RegExp]";
1706
+ var stringTag = "[object String]";
1707
+ var numberTag = "[object Number]";
1708
+ var booleanTag = "[object Boolean]";
1709
+ var argumentsTag = "[object Arguments]";
1710
+ var symbolTag = "[object Symbol]";
1711
+ var dateTag = "[object Date]";
1712
+ var mapTag = "[object Map]";
1713
+ var setTag = "[object Set]";
1714
+ var arrayTag = "[object Array]";
1715
+ var functionTag = "[object Function]";
1716
+ var arrayBufferTag = "[object ArrayBuffer]";
1717
+ var objectTag = "[object Object]";
1718
+ var errorTag = "[object Error]";
1719
+ var dataViewTag = "[object DataView]";
1720
+ var uint8ArrayTag = "[object Uint8Array]";
1721
+ var uint8ClampedArrayTag = "[object Uint8ClampedArray]";
1722
+ var uint16ArrayTag = "[object Uint16Array]";
1723
+ var uint32ArrayTag = "[object Uint32Array]";
1724
+ var bigUint64ArrayTag = "[object BigUint64Array]";
1725
+ var int8ArrayTag = "[object Int8Array]";
1726
+ var int16ArrayTag = "[object Int16Array]";
1727
+ var int32ArrayTag = "[object Int32Array]";
1728
+ var bigInt64ArrayTag = "[object BigInt64Array]";
1729
+ var float32ArrayTag = "[object Float32Array]";
1730
+ var float64ArrayTag = "[object Float64Array]";
1731
+
1732
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeepWith.mjs
1733
+ function cloneDeepWith(obj, cloneValue) {
1734
+ return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), cloneValue);
1735
+ }
1736
+ function cloneDeepWithImpl(valueToClone, keyToClone, objectToClone, stack = /* @__PURE__ */ new Map(), cloneValue = void 0) {
1737
+ const cloned = cloneValue == null ? void 0 : cloneValue(valueToClone, keyToClone, objectToClone, stack);
1738
+ if (cloned !== void 0) {
1739
+ return cloned;
1740
+ }
1741
+ if (isPrimitive(valueToClone)) {
1742
+ return valueToClone;
1743
+ }
1744
+ if (stack.has(valueToClone)) {
1745
+ return stack.get(valueToClone);
1746
+ }
1747
+ if (Array.isArray(valueToClone)) {
1748
+ const result = new Array(valueToClone.length);
1749
+ stack.set(valueToClone, result);
1750
+ for (let i = 0; i < valueToClone.length; i++) {
1751
+ result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
1752
+ }
1753
+ if (Object.hasOwn(valueToClone, "index")) {
1754
+ result.index = valueToClone.index;
1755
+ }
1756
+ if (Object.hasOwn(valueToClone, "input")) {
1757
+ result.input = valueToClone.input;
1758
+ }
1759
+ return result;
1760
+ }
1761
+ if (valueToClone instanceof Date) {
1762
+ return new Date(valueToClone.getTime());
1763
+ }
1764
+ if (valueToClone instanceof RegExp) {
1765
+ const result = new RegExp(valueToClone.source, valueToClone.flags);
1766
+ result.lastIndex = valueToClone.lastIndex;
1767
+ return result;
1768
+ }
1769
+ if (valueToClone instanceof Map) {
1770
+ const result = /* @__PURE__ */ new Map();
1771
+ stack.set(valueToClone, result);
1772
+ for (const [key, value] of valueToClone) {
1773
+ result.set(key, cloneDeepWithImpl(value, key, objectToClone, stack, cloneValue));
1774
+ }
1775
+ return result;
1776
+ }
1777
+ if (valueToClone instanceof Set) {
1778
+ const result = /* @__PURE__ */ new Set();
1779
+ stack.set(valueToClone, result);
1780
+ for (const value of valueToClone) {
1781
+ result.add(cloneDeepWithImpl(value, void 0, objectToClone, stack, cloneValue));
1782
+ }
1783
+ return result;
1784
+ }
1785
+ if (typeof Buffer !== "undefined" && Buffer.isBuffer(valueToClone)) {
1786
+ return valueToClone.subarray();
1787
+ }
1788
+ if (isTypedArray(valueToClone)) {
1789
+ const result = new (Object.getPrototypeOf(valueToClone)).constructor(valueToClone.length);
1790
+ stack.set(valueToClone, result);
1791
+ for (let i = 0; i < valueToClone.length; i++) {
1792
+ result[i] = cloneDeepWithImpl(valueToClone[i], i, objectToClone, stack, cloneValue);
1793
+ }
1794
+ return result;
1795
+ }
1796
+ if (valueToClone instanceof ArrayBuffer || typeof SharedArrayBuffer !== "undefined" && valueToClone instanceof SharedArrayBuffer) {
1797
+ return valueToClone.slice(0);
1798
+ }
1799
+ if (valueToClone instanceof DataView) {
1800
+ const result = new DataView(valueToClone.buffer.slice(0), valueToClone.byteOffset, valueToClone.byteLength);
1801
+ stack.set(valueToClone, result);
1802
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1803
+ return result;
1804
+ }
1805
+ if (typeof File !== "undefined" && valueToClone instanceof File) {
1806
+ const result = new File([valueToClone], valueToClone.name, {
1807
+ type: valueToClone.type
1808
+ });
1809
+ stack.set(valueToClone, result);
1810
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1811
+ return result;
1812
+ }
1813
+ if (typeof Blob !== "undefined" && valueToClone instanceof Blob) {
1814
+ const result = new Blob([valueToClone], { type: valueToClone.type });
1815
+ stack.set(valueToClone, result);
1816
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1817
+ return result;
1818
+ }
1819
+ if (valueToClone instanceof Error) {
1820
+ const result = new valueToClone.constructor();
1821
+ stack.set(valueToClone, result);
1822
+ result.message = valueToClone.message;
1823
+ result.name = valueToClone.name;
1824
+ result.stack = valueToClone.stack;
1825
+ result.cause = valueToClone.cause;
1826
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1827
+ return result;
1828
+ }
1829
+ if (valueToClone instanceof Boolean) {
1830
+ const result = new Boolean(valueToClone.valueOf());
1831
+ stack.set(valueToClone, result);
1832
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1833
+ return result;
1834
+ }
1835
+ if (valueToClone instanceof Number) {
1836
+ const result = new Number(valueToClone.valueOf());
1837
+ stack.set(valueToClone, result);
1838
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1839
+ return result;
1840
+ }
1841
+ if (valueToClone instanceof String) {
1842
+ const result = new String(valueToClone.valueOf());
1843
+ stack.set(valueToClone, result);
1844
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1845
+ return result;
1846
+ }
1847
+ if (typeof valueToClone === "object" && isCloneableObject(valueToClone)) {
1848
+ const result = Object.create(Object.getPrototypeOf(valueToClone));
1849
+ stack.set(valueToClone, result);
1850
+ copyProperties(result, valueToClone, objectToClone, stack, cloneValue);
1851
+ return result;
1852
+ }
1853
+ return valueToClone;
1854
+ }
1855
+ function copyProperties(target, source, objectToClone = target, stack, cloneValue) {
1856
+ const keys = [...Object.keys(source), ...getSymbols(source)];
1857
+ for (let i = 0; i < keys.length; i++) {
1858
+ const key = keys[i];
1859
+ const descriptor = Object.getOwnPropertyDescriptor(target, key);
1860
+ if (descriptor == null || descriptor.writable) {
1861
+ target[key] = cloneDeepWithImpl(source[key], key, objectToClone, stack, cloneValue);
1862
+ }
1863
+ }
1864
+ }
1865
+ function isCloneableObject(object) {
1866
+ switch (getTag(object)) {
1867
+ case argumentsTag:
1868
+ case arrayTag:
1869
+ case arrayBufferTag:
1870
+ case dataViewTag:
1871
+ case booleanTag:
1872
+ case dateTag:
1873
+ case float32ArrayTag:
1874
+ case float64ArrayTag:
1875
+ case int8ArrayTag:
1876
+ case int16ArrayTag:
1877
+ case int32ArrayTag:
1878
+ case mapTag:
1879
+ case numberTag:
1880
+ case objectTag:
1881
+ case regexpTag:
1882
+ case setTag:
1883
+ case stringTag:
1884
+ case symbolTag:
1885
+ case uint8ArrayTag:
1886
+ case uint8ClampedArrayTag:
1887
+ case uint16ArrayTag:
1888
+ case uint32ArrayTag: {
1889
+ return true;
1890
+ }
1891
+ default: {
1892
+ return false;
1893
+ }
1894
+ }
1895
+ }
1896
+
1897
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/cloneDeep.mjs
1898
+ function cloneDeep(obj) {
1899
+ return cloneDeepWithImpl(obj, void 0, obj, /* @__PURE__ */ new Map(), void 0);
1900
+ }
1901
+
1902
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/findKey.mjs
1903
+ function findKey(obj, predicate) {
1904
+ const keys = Object.keys(obj);
1905
+ return keys.find((key) => predicate(obj[key], key, obj));
1906
+ }
1907
+
1908
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPlainObject.mjs
1909
+ function isPlainObject(value) {
1910
+ if (!value || typeof value !== "object") {
1911
+ return false;
1912
+ }
1913
+ const proto = Object.getPrototypeOf(value);
1914
+ const hasObjectPrototype = proto === null || proto === Object.prototype || Object.getPrototypeOf(proto) === null;
1915
+ if (!hasObjectPrototype) {
1916
+ return false;
1917
+ }
1918
+ return Object.prototype.toString.call(value) === "[object Object]";
1919
+ }
1920
+
1921
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/flattenObject.mjs
1922
+ function flattenObject(object, { delimiter = "." } = {}) {
1923
+ return flattenObjectImpl(object, "", delimiter);
1924
+ }
1925
+ function flattenObjectImpl(object, prefix, delimiter) {
1926
+ const result = {};
1927
+ const keys = Object.keys(object);
1928
+ for (let i = 0; i < keys.length; i++) {
1929
+ const key = keys[i];
1930
+ const value = object[key];
1931
+ const prefixedKey = prefix ? `${prefix}${delimiter}${key}` : key;
1932
+ if (isPlainObject(value) && Object.keys(value).length > 0) {
1933
+ Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
1934
+ continue;
1935
+ }
1936
+ if (Array.isArray(value) && value.length > 0) {
1937
+ Object.assign(result, flattenObjectImpl(value, prefixedKey, delimiter));
1938
+ continue;
1939
+ }
1940
+ result[prefixedKey] = value;
1941
+ }
1942
+ return result;
1943
+ }
1944
+
1945
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/invert.mjs
1946
+ function invert(obj) {
1947
+ const result = {};
1948
+ const keys = Object.keys(obj);
1949
+ for (let i = 0; i < keys.length; i++) {
1950
+ const key = keys[i];
1951
+ const value = obj[key];
1952
+ result[value] = key;
1953
+ }
1954
+ return result;
1955
+ }
1956
+
1957
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mapKeys.mjs
1958
+ function mapKeys(object, getNewKey) {
1959
+ const result = {};
1960
+ const keys = Object.keys(object);
1961
+ for (let i = 0; i < keys.length; i++) {
1962
+ const key = keys[i];
1963
+ const value = object[key];
1964
+ result[getNewKey(value, key, object)] = value;
1965
+ }
1966
+ return result;
1967
+ }
1968
+
1969
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mapValues.mjs
1970
+ function mapValues(object, getNewValue) {
1971
+ const result = {};
1972
+ const keys = Object.keys(object);
1973
+ for (let i = 0; i < keys.length; i++) {
1974
+ const key = keys[i];
1975
+ const value = object[key];
1976
+ result[key] = getNewValue(value, key, object);
1977
+ }
1978
+ return result;
1979
+ }
1980
+
1981
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/_internal/isUnsafeProperty.mjs
1982
+ function isUnsafeProperty(key) {
1983
+ return key === "__proto__";
1984
+ }
1985
+
1986
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/merge.mjs
1987
+ function merge(target, source) {
1988
+ const sourceKeys = Object.keys(source);
1989
+ for (let i = 0; i < sourceKeys.length; i++) {
1990
+ const key = sourceKeys[i];
1991
+ if (isUnsafeProperty(key)) {
1992
+ continue;
1993
+ }
1994
+ const sourceValue = source[key];
1995
+ const targetValue = target[key];
1996
+ if (isMergeableValue(sourceValue) && isMergeableValue(targetValue)) {
1997
+ target[key] = merge(targetValue, sourceValue);
1998
+ } else if (Array.isArray(sourceValue)) {
1999
+ target[key] = merge([], sourceValue);
2000
+ } else if (isPlainObject(sourceValue)) {
2001
+ target[key] = merge({}, sourceValue);
2002
+ } else if (targetValue === void 0 || sourceValue !== void 0) {
2003
+ target[key] = sourceValue;
2004
+ }
2005
+ }
2006
+ return target;
2007
+ }
2008
+ function isMergeableValue(value) {
2009
+ return isPlainObject(value) || Array.isArray(value);
2010
+ }
2011
+
2012
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/mergeWith.mjs
2013
+ function mergeWith(target, source, merge2) {
2014
+ const sourceKeys = Object.keys(source);
2015
+ for (let i = 0; i < sourceKeys.length; i++) {
2016
+ const key = sourceKeys[i];
2017
+ if (isUnsafeProperty(key)) {
2018
+ continue;
2019
+ }
2020
+ const sourceValue = source[key];
2021
+ const targetValue = target[key];
2022
+ const merged = merge2(targetValue, sourceValue, key, target, source);
2023
+ if (merged !== void 0) {
2024
+ target[key] = merged;
2025
+ } else if (Array.isArray(sourceValue)) {
2026
+ if (Array.isArray(targetValue)) {
2027
+ target[key] = mergeWith(targetValue, sourceValue, merge2);
2028
+ } else {
2029
+ target[key] = mergeWith([], sourceValue, merge2);
2030
+ }
2031
+ } else if (isPlainObject(sourceValue)) {
2032
+ if (isPlainObject(targetValue)) {
2033
+ target[key] = mergeWith(targetValue, sourceValue, merge2);
2034
+ } else {
2035
+ target[key] = mergeWith({}, sourceValue, merge2);
2036
+ }
2037
+ } else if (targetValue === void 0 || sourceValue !== void 0) {
2038
+ target[key] = sourceValue;
2039
+ }
2040
+ }
2041
+ return target;
2042
+ }
2043
+
2044
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/omit.mjs
2045
+ function omit(obj, keys) {
2046
+ const result = __spreadValues({}, obj);
2047
+ for (let i = 0; i < keys.length; i++) {
2048
+ const key = keys[i];
2049
+ delete result[key];
2050
+ }
2051
+ return result;
2052
+ }
2053
+
2054
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/omitBy.mjs
2055
+ function omitBy(obj, shouldOmit) {
2056
+ const result = {};
2057
+ const keys = Object.keys(obj);
2058
+ for (let i = 0; i < keys.length; i++) {
2059
+ const key = keys[i];
2060
+ const value = obj[key];
2061
+ if (!shouldOmit(value, key)) {
2062
+ result[key] = value;
2063
+ }
2064
+ }
2065
+ return result;
2066
+ }
2067
+
2068
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/pick.mjs
2069
+ function pick(obj, keys) {
2070
+ const result = {};
2071
+ for (let i = 0; i < keys.length; i++) {
2072
+ const key = keys[i];
2073
+ if (Object.hasOwn(obj, key)) {
2074
+ result[key] = obj[key];
2075
+ }
2076
+ }
2077
+ return result;
2078
+ }
2079
+
2080
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/pickBy.mjs
2081
+ function pickBy(obj, shouldPick) {
2082
+ const result = {};
2083
+ const keys = Object.keys(obj);
2084
+ for (let i = 0; i < keys.length; i++) {
2085
+ const key = keys[i];
2086
+ const value = obj[key];
2087
+ if (shouldPick(value, key)) {
2088
+ result[key] = value;
2089
+ }
2090
+ }
2091
+ return result;
2092
+ }
2093
+
2094
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isArray.mjs
2095
+ function isArray(value) {
2096
+ return Array.isArray(value);
2097
+ }
2098
+
2099
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/capitalize.mjs
2100
+ function capitalize(str) {
2101
+ return str.charAt(0).toUpperCase() + str.slice(1).toLowerCase();
2102
+ }
2103
+
2104
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/words.mjs
2105
+ var CASE_SPLIT_PATTERN = new RegExp("\\p{Lu}?\\p{Ll}+|[0-9]+|\\p{Lu}+(?!\\p{Ll})|\\p{Emoji_Presentation}|\\p{Extended_Pictographic}|\\p{L}+", "gu");
2106
+ function words(str) {
2107
+ var _a;
2108
+ return Array.from((_a = str.match(CASE_SPLIT_PATTERN)) != null ? _a : []);
2109
+ }
2110
+
2111
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/camelCase.mjs
2112
+ function camelCase(str) {
2113
+ const words$1 = words(str);
2114
+ if (words$1.length === 0) {
2115
+ return "";
2116
+ }
2117
+ const [first, ...rest2] = words$1;
2118
+ return `${first.toLowerCase()}${rest2.map((word) => capitalize(word)).join("")}`;
2119
+ }
2120
+
2121
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/toCamelCaseKeys.mjs
2122
+ function toCamelCaseKeys(obj) {
2123
+ if (isArray(obj)) {
2124
+ return obj.map((item) => toCamelCaseKeys(item));
2125
+ }
2126
+ if (isPlainObject(obj)) {
2127
+ const result = {};
2128
+ const keys = Object.keys(obj);
2129
+ for (let i = 0; i < keys.length; i++) {
2130
+ const key = keys[i];
2131
+ const camelKey = camelCase(key);
2132
+ const convertedValue = toCamelCaseKeys(obj[key]);
2133
+ result[camelKey] = convertedValue;
2134
+ }
2135
+ return result;
2136
+ }
2137
+ return obj;
2138
+ }
2139
+
2140
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/toMerged.mjs
2141
+ function toMerged(target, source) {
2142
+ return mergeWith(clone(target), source, function mergeRecursively(targetValue, sourceValue) {
2143
+ if (Array.isArray(sourceValue)) {
2144
+ if (Array.isArray(targetValue)) {
2145
+ return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
2146
+ } else {
2147
+ return mergeWith([], sourceValue, mergeRecursively);
2148
+ }
2149
+ } else if (isPlainObject(sourceValue)) {
2150
+ if (isPlainObject(targetValue)) {
2151
+ return mergeWith(clone(targetValue), sourceValue, mergeRecursively);
2152
+ } else {
2153
+ return mergeWith({}, sourceValue, mergeRecursively);
2154
+ }
2155
+ }
2156
+ });
2157
+ }
2158
+
2159
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isPlainObject.mjs
2160
+ function isPlainObject2(object) {
2161
+ var _a;
2162
+ if (typeof object !== "object") {
2163
+ return false;
2164
+ }
2165
+ if (object == null) {
2166
+ return false;
2167
+ }
2168
+ if (Object.getPrototypeOf(object) === null) {
2169
+ return true;
2170
+ }
2171
+ if (Object.prototype.toString.call(object) !== "[object Object]") {
2172
+ const tag = object[Symbol.toStringTag];
2173
+ if (tag == null) {
2174
+ return false;
2175
+ }
2176
+ const isTagReadonly = !((_a = Object.getOwnPropertyDescriptor(object, Symbol.toStringTag)) == null ? void 0 : _a.writable);
2177
+ if (isTagReadonly) {
2178
+ return false;
2179
+ }
2180
+ return object.toString() === `[object ${tag}]`;
2181
+ }
2182
+ let proto = object;
2183
+ while (Object.getPrototypeOf(proto) !== null) {
2184
+ proto = Object.getPrototypeOf(proto);
2185
+ }
2186
+ return Object.getPrototypeOf(object) === proto;
2187
+ }
2188
+
2189
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/snakeCase.mjs
2190
+ function snakeCase(str) {
2191
+ const words$1 = words(str);
2192
+ return words$1.map((word) => word.toLowerCase()).join("_");
2193
+ }
2194
+
2195
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/object/toSnakeCaseKeys.mjs
2196
+ function toSnakeCaseKeys(obj) {
2197
+ if (isArray(obj)) {
2198
+ return obj.map((item) => toSnakeCaseKeys(item));
2199
+ }
2200
+ if (isPlainObject2(obj)) {
2201
+ const result = {};
2202
+ const keys = Object.keys(obj);
2203
+ for (let i = 0; i < keys.length; i++) {
2204
+ const key = keys[i];
2205
+ const snakeKey = snakeCase(key);
2206
+ const convertedValue = toSnakeCaseKeys(obj[key]);
2207
+ result[snakeKey] = convertedValue;
2208
+ }
2209
+ return result;
2210
+ }
2211
+ return obj;
2212
+ }
2213
+
2214
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isArrayBuffer.mjs
2215
+ function isArrayBuffer(value) {
2216
+ return value instanceof ArrayBuffer;
2217
+ }
2218
+
2219
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isBlob.mjs
2220
+ function isBlob(x) {
2221
+ if (typeof Blob === "undefined") {
2222
+ return false;
2223
+ }
2224
+ return x instanceof Blob;
2225
+ }
2226
+
2227
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isBoolean.mjs
2228
+ function isBoolean(x) {
2229
+ return typeof x === "boolean";
2230
+ }
2231
+
2232
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isBrowser.mjs
2233
+ function isBrowser() {
2234
+ return typeof window !== "undefined" && (window == null ? void 0 : window.document) != null;
2235
+ }
2236
+
2237
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isBuffer.mjs
2238
+ function isBuffer(x) {
2239
+ return typeof Buffer !== "undefined" && Buffer.isBuffer(x);
2240
+ }
2241
+
2242
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isDate.mjs
2243
+ function isDate(value) {
2244
+ return value instanceof Date;
2245
+ }
2246
+
2247
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEmptyObject.mjs
2248
+ function isEmptyObject(value) {
2249
+ return isPlainObject(value) && Object.keys(value).length === 0;
2250
+ }
2251
+
2252
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/_internal/isEqualsSameValueZero.mjs
2253
+ function isEqualsSameValueZero(value, other) {
2254
+ return value === other || Number.isNaN(value) && Number.isNaN(other);
2255
+ }
2256
+
2257
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEqualWith.mjs
2258
+ function isEqualWith(a, b, areValuesEqual) {
2259
+ return isEqualWithImpl(a, b, void 0, void 0, void 0, void 0, areValuesEqual);
2260
+ }
2261
+ function isEqualWithImpl(a, b, property, aParent, bParent, stack, areValuesEqual) {
2262
+ const result = areValuesEqual(a, b, property, aParent, bParent, stack);
2263
+ if (result !== void 0) {
2264
+ return result;
2265
+ }
2266
+ if (typeof a === typeof b) {
2267
+ switch (typeof a) {
2268
+ case "bigint":
2269
+ case "string":
2270
+ case "boolean":
2271
+ case "symbol":
2272
+ case "undefined": {
2273
+ return a === b;
2274
+ }
2275
+ case "number": {
2276
+ return a === b || Object.is(a, b);
2277
+ }
2278
+ case "function": {
2279
+ return a === b;
2280
+ }
2281
+ case "object": {
2282
+ return areObjectsEqual(a, b, stack, areValuesEqual);
2283
+ }
2284
+ }
2285
+ }
2286
+ return areObjectsEqual(a, b, stack, areValuesEqual);
2287
+ }
2288
+ function areObjectsEqual(a, b, stack, areValuesEqual) {
2289
+ if (Object.is(a, b)) {
2290
+ return true;
2291
+ }
2292
+ let aTag = getTag(a);
2293
+ let bTag = getTag(b);
2294
+ if (aTag === argumentsTag) {
2295
+ aTag = objectTag;
2296
+ }
2297
+ if (bTag === argumentsTag) {
2298
+ bTag = objectTag;
2299
+ }
2300
+ if (aTag !== bTag) {
2301
+ return false;
2302
+ }
2303
+ switch (aTag) {
2304
+ case stringTag:
2305
+ return a.toString() === b.toString();
2306
+ case numberTag: {
2307
+ const x = a.valueOf();
2308
+ const y = b.valueOf();
2309
+ return isEqualsSameValueZero(x, y);
2310
+ }
2311
+ case booleanTag:
2312
+ case dateTag:
2313
+ case symbolTag:
2314
+ return Object.is(a.valueOf(), b.valueOf());
2315
+ case regexpTag: {
2316
+ return a.source === b.source && a.flags === b.flags;
2317
+ }
2318
+ case functionTag: {
2319
+ return a === b;
2320
+ }
2321
+ }
2322
+ stack = stack != null ? stack : /* @__PURE__ */ new Map();
2323
+ const aStack = stack.get(a);
2324
+ const bStack = stack.get(b);
2325
+ if (aStack != null && bStack != null) {
2326
+ return aStack === b;
2327
+ }
2328
+ stack.set(a, b);
2329
+ stack.set(b, a);
2330
+ try {
2331
+ switch (aTag) {
2332
+ case mapTag: {
2333
+ if (a.size !== b.size) {
2334
+ return false;
2335
+ }
2336
+ for (const [key, value] of a.entries()) {
2337
+ if (!b.has(key) || !isEqualWithImpl(value, b.get(key), key, a, b, stack, areValuesEqual)) {
2338
+ return false;
2339
+ }
2340
+ }
2341
+ return true;
2342
+ }
2343
+ case setTag: {
2344
+ if (a.size !== b.size) {
2345
+ return false;
2346
+ }
2347
+ const aValues = Array.from(a.values());
2348
+ const bValues = Array.from(b.values());
2349
+ for (let i = 0; i < aValues.length; i++) {
2350
+ const aValue = aValues[i];
2351
+ const index = bValues.findIndex((bValue) => {
2352
+ return isEqualWithImpl(aValue, bValue, void 0, a, b, stack, areValuesEqual);
2353
+ });
2354
+ if (index === -1) {
2355
+ return false;
2356
+ }
2357
+ bValues.splice(index, 1);
2358
+ }
2359
+ return true;
2360
+ }
2361
+ case arrayTag:
2362
+ case uint8ArrayTag:
2363
+ case uint8ClampedArrayTag:
2364
+ case uint16ArrayTag:
2365
+ case uint32ArrayTag:
2366
+ case bigUint64ArrayTag:
2367
+ case int8ArrayTag:
2368
+ case int16ArrayTag:
2369
+ case int32ArrayTag:
2370
+ case bigInt64ArrayTag:
2371
+ case float32ArrayTag:
2372
+ case float64ArrayTag: {
2373
+ if (typeof Buffer !== "undefined" && Buffer.isBuffer(a) !== Buffer.isBuffer(b)) {
2374
+ return false;
2375
+ }
2376
+ if (a.length !== b.length) {
2377
+ return false;
2378
+ }
2379
+ for (let i = 0; i < a.length; i++) {
2380
+ if (!isEqualWithImpl(a[i], b[i], i, a, b, stack, areValuesEqual)) {
2381
+ return false;
2382
+ }
2383
+ }
2384
+ return true;
2385
+ }
2386
+ case arrayBufferTag: {
2387
+ if (a.byteLength !== b.byteLength) {
2388
+ return false;
2389
+ }
2390
+ return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
2391
+ }
2392
+ case dataViewTag: {
2393
+ if (a.byteLength !== b.byteLength || a.byteOffset !== b.byteOffset) {
2394
+ return false;
2395
+ }
2396
+ return areObjectsEqual(new Uint8Array(a), new Uint8Array(b), stack, areValuesEqual);
2397
+ }
2398
+ case errorTag: {
2399
+ return a.name === b.name && a.message === b.message;
2400
+ }
2401
+ case objectTag: {
2402
+ const areEqualInstances = areObjectsEqual(a.constructor, b.constructor, stack, areValuesEqual) || isPlainObject(a) && isPlainObject(b);
2403
+ if (!areEqualInstances) {
2404
+ return false;
2405
+ }
2406
+ const aKeys = [...Object.keys(a), ...getSymbols(a)];
2407
+ const bKeys = [...Object.keys(b), ...getSymbols(b)];
2408
+ if (aKeys.length !== bKeys.length) {
2409
+ return false;
2410
+ }
2411
+ for (let i = 0; i < aKeys.length; i++) {
2412
+ const propKey = aKeys[i];
2413
+ const aProp = a[propKey];
2414
+ if (!Object.hasOwn(b, propKey)) {
2415
+ return false;
2416
+ }
2417
+ const bProp = b[propKey];
2418
+ if (!isEqualWithImpl(aProp, bProp, propKey, a, b, stack, areValuesEqual)) {
2419
+ return false;
2420
+ }
2421
+ }
2422
+ return true;
2423
+ }
2424
+ default: {
2425
+ return false;
2426
+ }
2427
+ }
2428
+ } finally {
2429
+ stack.delete(a);
2430
+ stack.delete(b);
2431
+ }
2432
+ }
2433
+
2434
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isEqual.mjs
2435
+ function isEqual(a, b) {
2436
+ return isEqualWith(a, b, noop);
2437
+ }
2438
+
2439
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isError.mjs
2440
+ function isError(value) {
2441
+ return value instanceof Error;
2442
+ }
2443
+
2444
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isFile.mjs
2445
+ function isFile(x) {
2446
+ if (typeof File === "undefined") {
2447
+ return false;
2448
+ }
2449
+ return isBlob(x) && x instanceof File;
2450
+ }
2451
+
2452
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isFunction.mjs
2453
+ function isFunction(value) {
2454
+ return typeof value === "function";
2455
+ }
2456
+
2457
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isJSON.mjs
2458
+ function isJSON(value) {
2459
+ if (typeof value !== "string") {
2460
+ return false;
2461
+ }
2462
+ try {
2463
+ JSON.parse(value);
2464
+ return true;
2465
+ } catch (e) {
2466
+ return false;
2467
+ }
2468
+ }
2469
+
2470
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isJSONValue.mjs
2471
+ function isJSONValue(value) {
2472
+ switch (typeof value) {
2473
+ case "object": {
2474
+ return value === null || isJSONArray(value) || isJSONObject(value);
2475
+ }
2476
+ case "string":
2477
+ case "number":
2478
+ case "boolean": {
2479
+ return true;
2480
+ }
2481
+ default: {
2482
+ return false;
2483
+ }
2484
+ }
2485
+ }
2486
+ function isJSONArray(value) {
2487
+ if (!Array.isArray(value)) {
2488
+ return false;
2489
+ }
2490
+ return value.every((item) => isJSONValue(item));
2491
+ }
2492
+ function isJSONObject(obj) {
2493
+ if (!isPlainObject(obj)) {
2494
+ return false;
2495
+ }
2496
+ const keys = Reflect.ownKeys(obj);
2497
+ for (let i = 0; i < keys.length; i++) {
2498
+ const key = keys[i];
2499
+ const value = obj[key];
2500
+ if (typeof key !== "string") {
2501
+ return false;
2502
+ }
2503
+ if (!isJSONValue(value)) {
2504
+ return false;
2505
+ }
2506
+ }
2507
+ return true;
2508
+ }
2509
+
2510
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isLength.mjs
2511
+ function isLength(value) {
2512
+ return Number.isSafeInteger(value) && value >= 0;
2513
+ }
2514
+
2515
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isMap.mjs
2516
+ function isMap(value) {
2517
+ return value instanceof Map;
2518
+ }
2519
+
2520
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isNil.mjs
2521
+ function isNil(x) {
2522
+ return x == null;
2523
+ }
2524
+
2525
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isNode.mjs
2526
+ function isNode() {
2527
+ var _a;
2528
+ return typeof process !== "undefined" && ((_a = process == null ? void 0 : process.versions) == null ? void 0 : _a.node) != null;
2529
+ }
2530
+
2531
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isNotNil.mjs
2532
+ function isNotNil(x) {
2533
+ return x != null;
2534
+ }
2535
+
2536
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isNull.mjs
2537
+ function isNull(x) {
2538
+ return x === null;
2539
+ }
2540
+
2541
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isNumber.mjs
2542
+ function isNumber(x) {
2543
+ return typeof x === "number" || x instanceof Number;
2544
+ }
2545
+
2546
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isPromise.mjs
2547
+ function isPromise(value) {
2548
+ return value instanceof Promise;
2549
+ }
2550
+
2551
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isRegExp.mjs
2552
+ function isRegExp(value) {
2553
+ return value instanceof RegExp;
2554
+ }
2555
+
2556
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isSet.mjs
2557
+ function isSet(value) {
2558
+ return value instanceof Set;
2559
+ }
2560
+
2561
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isString.mjs
2562
+ function isString(value) {
2563
+ return typeof value === "string";
2564
+ }
2565
+
2566
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isSymbol.mjs
2567
+ function isSymbol2(value) {
2568
+ return typeof value === "symbol";
2569
+ }
2570
+
2571
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isUndefined.mjs
2572
+ function isUndefined(x) {
2573
+ return x === void 0;
2574
+ }
2575
+
2576
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isWeakMap.mjs
2577
+ function isWeakMap(value) {
2578
+ return value instanceof WeakMap;
2579
+ }
2580
+
2581
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/predicate/isWeakSet.mjs
2582
+ function isWeakSet(value) {
2583
+ return value instanceof WeakSet;
2584
+ }
2585
+
2586
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/promise/mutex.mjs
2587
+ var Mutex = class {
2588
+ constructor() {
2589
+ __publicField(this, "semaphore", new Semaphore(1));
2590
+ }
2591
+ get isLocked() {
2592
+ return this.semaphore.available === 0;
2593
+ }
2594
+ acquire() {
2595
+ return __async(this, null, function* () {
2596
+ return this.semaphore.acquire();
2597
+ });
2598
+ }
2599
+ release() {
2600
+ this.semaphore.release();
2601
+ }
2602
+ };
2603
+
2604
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/promise/timeout.mjs
2605
+ function timeout(ms) {
2606
+ return __async(this, null, function* () {
2607
+ yield delay(ms);
2608
+ throw new TimeoutError();
2609
+ });
2610
+ }
2611
+
2612
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/promise/withTimeout.mjs
2613
+ function withTimeout(run, ms) {
2614
+ return __async(this, null, function* () {
2615
+ return Promise.race([run(), timeout(ms)]);
2616
+ });
2617
+ }
2618
+
2619
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/constantCase.mjs
2620
+ function constantCase(str) {
2621
+ const words$1 = words(str);
2622
+ return words$1.map((word) => word.toUpperCase()).join("_");
2623
+ }
2624
+
2625
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/deburr.mjs
2626
+ var deburrMap = /* @__PURE__ */ new Map([
2627
+ ["\xC6", "Ae"],
2628
+ ["\xD0", "D"],
2629
+ ["\xD8", "O"],
2630
+ ["\xDE", "Th"],
2631
+ ["\xDF", "ss"],
2632
+ ["\xE6", "ae"],
2633
+ ["\xF0", "d"],
2634
+ ["\xF8", "o"],
2635
+ ["\xFE", "th"],
2636
+ ["\u0110", "D"],
2637
+ ["\u0111", "d"],
2638
+ ["\u0126", "H"],
2639
+ ["\u0127", "h"],
2640
+ ["\u0131", "i"],
2641
+ ["\u0132", "IJ"],
2642
+ ["\u0133", "ij"],
2643
+ ["\u0138", "k"],
2644
+ ["\u013F", "L"],
2645
+ ["\u0140", "l"],
2646
+ ["\u0141", "L"],
2647
+ ["\u0142", "l"],
2648
+ ["\u0149", "'n"],
2649
+ ["\u014A", "N"],
2650
+ ["\u014B", "n"],
2651
+ ["\u0152", "Oe"],
2652
+ ["\u0153", "oe"],
2653
+ ["\u0166", "T"],
2654
+ ["\u0167", "t"],
2655
+ ["\u017F", "s"]
2656
+ ]);
2657
+ function deburr(str) {
2658
+ var _a;
2659
+ str = str.normalize("NFD");
2660
+ let result = "";
2661
+ for (let i = 0; i < str.length; i++) {
2662
+ const char = str[i];
2663
+ if (char >= "\u0300" && char <= "\u036F" || char >= "\uFE20" && char <= "\uFE23") {
2664
+ continue;
2665
+ }
2666
+ result += (_a = deburrMap.get(char)) != null ? _a : char;
2667
+ }
2668
+ return result;
2669
+ }
2670
+
2671
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/escape.mjs
2672
+ var htmlEscapes = {
2673
+ "&": "&amp;",
2674
+ "<": "&lt;",
2675
+ ">": "&gt;",
2676
+ '"': "&quot;",
2677
+ "'": "&#39;"
2678
+ };
2679
+ function escape(str) {
2680
+ return str.replace(/[&<>"']/g, (match) => htmlEscapes[match]);
2681
+ }
2682
+
2683
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/escapeRegExp.mjs
2684
+ function escapeRegExp(str) {
2685
+ return str.replace(/[\\^$.*+?()[\]{}|]/g, "\\$&");
2686
+ }
2687
+
2688
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/kebabCase.mjs
2689
+ function kebabCase(str) {
2690
+ const words$1 = words(str);
2691
+ return words$1.map((word) => word.toLowerCase()).join("-");
2692
+ }
2693
+
2694
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/lowerCase.mjs
2695
+ function lowerCase(str) {
2696
+ const words$1 = words(str);
2697
+ return words$1.map((word) => word.toLowerCase()).join(" ");
2698
+ }
2699
+
2700
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/lowerFirst.mjs
2701
+ function lowerFirst(str) {
2702
+ return str.substring(0, 1).toLowerCase() + str.substring(1);
2703
+ }
2704
+
2705
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/pad.mjs
2706
+ function pad(str, length, chars = " ") {
2707
+ return str.padStart(Math.floor((length - str.length) / 2) + str.length, chars).padEnd(length, chars);
2708
+ }
2709
+
2710
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/pascalCase.mjs
2711
+ function pascalCase(str) {
2712
+ const words$1 = words(str);
2713
+ return words$1.map((word) => capitalize(word)).join("");
2714
+ }
2715
+
2716
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/reverseString.mjs
2717
+ function reverseString(value) {
2718
+ return [...value].reverse().join("");
2719
+ }
2720
+
2721
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/startCase.mjs
2722
+ function startCase(str) {
2723
+ const words$1 = words(str.trim());
2724
+ let result = "";
2725
+ for (let i = 0; i < words$1.length; i++) {
2726
+ const word = words$1[i];
2727
+ if (result) {
2728
+ result += " ";
2729
+ }
2730
+ result += word[0].toUpperCase() + word.slice(1).toLowerCase();
2731
+ }
2732
+ return result;
2733
+ }
2734
+
2735
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/trimEnd.mjs
2736
+ function trimEnd(str, chars) {
2737
+ if (chars === void 0) {
2738
+ return str.trimEnd();
2739
+ }
2740
+ let endIndex = str.length;
2741
+ switch (typeof chars) {
2742
+ case "string": {
2743
+ if (chars.length !== 1) {
2744
+ throw new Error(`The 'chars' parameter should be a single character string.`);
2745
+ }
2746
+ while (endIndex > 0 && str[endIndex - 1] === chars) {
2747
+ endIndex--;
2748
+ }
2749
+ break;
2750
+ }
2751
+ case "object": {
2752
+ while (endIndex > 0 && chars.includes(str[endIndex - 1])) {
2753
+ endIndex--;
2754
+ }
2755
+ }
2756
+ }
2757
+ return str.substring(0, endIndex);
2758
+ }
2759
+
2760
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/trimStart.mjs
2761
+ function trimStart(str, chars) {
2762
+ if (chars === void 0) {
2763
+ return str.trimStart();
2764
+ }
2765
+ let startIndex = 0;
2766
+ switch (typeof chars) {
2767
+ case "string": {
2768
+ while (startIndex < str.length && str[startIndex] === chars) {
2769
+ startIndex++;
2770
+ }
2771
+ break;
2772
+ }
2773
+ case "object": {
2774
+ while (startIndex < str.length && chars.includes(str[startIndex])) {
2775
+ startIndex++;
2776
+ }
2777
+ }
2778
+ }
2779
+ return str.substring(startIndex);
2780
+ }
2781
+
2782
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/trim.mjs
2783
+ function trim(str, chars) {
2784
+ if (chars === void 0) {
2785
+ return str.trim();
2786
+ }
2787
+ return trimStart(trimEnd(str, chars), chars);
2788
+ }
2789
+
2790
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/unescape.mjs
2791
+ var htmlUnescapes = {
2792
+ "&amp;": "&",
2793
+ "&lt;": "<",
2794
+ "&gt;": ">",
2795
+ "&quot;": '"',
2796
+ "&#39;": "'"
2797
+ };
2798
+ function unescape2(str) {
2799
+ return str.replace(/&(?:amp|lt|gt|quot|#(0+)?39);/g, (match) => htmlUnescapes[match] || "'");
2800
+ }
2801
+
2802
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/upperCase.mjs
2803
+ function upperCase(str) {
2804
+ const words$1 = words(str);
2805
+ let result = "";
2806
+ for (let i = 0; i < words$1.length; i++) {
2807
+ result += words$1[i].toUpperCase();
2808
+ if (i < words$1.length - 1) {
2809
+ result += " ";
2810
+ }
2811
+ }
2812
+ return result;
2813
+ }
2814
+
2815
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/string/upperFirst.mjs
2816
+ function upperFirst(str) {
2817
+ return str.substring(0, 1).toUpperCase() + str.substring(1);
2818
+ }
2819
+
2820
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/util/attempt.mjs
2821
+ function attempt(func) {
2822
+ try {
2823
+ return [null, func()];
2824
+ } catch (error) {
2825
+ return [error, null];
2826
+ }
2827
+ }
2828
+
2829
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/util/attemptAsync.mjs
2830
+ function attemptAsync(func) {
2831
+ return __async(this, null, function* () {
2832
+ try {
2833
+ const result = yield func();
2834
+ return [null, result];
2835
+ } catch (error) {
2836
+ return [error, null];
2837
+ }
2838
+ });
2839
+ }
2840
+
2841
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/util/invariant.mjs
2842
+ function invariant(condition, message) {
2843
+ if (condition) {
2844
+ return;
2845
+ }
2846
+ if (typeof message === "string") {
2847
+ throw new Error(message);
2848
+ }
2849
+ throw message;
2850
+ }
2851
+
2852
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isDeepKey.mjs
2853
+ function isDeepKey(key) {
2854
+ switch (typeof key) {
2855
+ case "number":
2856
+ case "symbol": {
2857
+ return false;
2858
+ }
2859
+ case "string": {
2860
+ return key.includes(".") || key.includes("[") || key.includes("]");
2861
+ }
2862
+ }
2863
+ }
2864
+
2865
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/toKey.mjs
2866
+ function toKey(value) {
2867
+ var _a;
2868
+ if (typeof value === "string" || typeof value === "symbol") {
2869
+ return value;
2870
+ }
2871
+ if (Object.is((_a = value == null ? void 0 : value.valueOf) == null ? void 0 : _a.call(value), -0)) {
2872
+ return "-0";
2873
+ }
2874
+ return String(value);
2875
+ }
2876
+
2877
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toString.mjs
2878
+ function toString(value) {
2879
+ if (value == null) {
2880
+ return "";
2881
+ }
2882
+ if (typeof value === "string") {
2883
+ return value;
2884
+ }
2885
+ if (Array.isArray(value)) {
2886
+ return value.map(toString).join(",");
2887
+ }
2888
+ const result = String(value);
2889
+ if (result === "0" && Object.is(Number(value), -0)) {
2890
+ return "-0";
2891
+ }
2892
+ return result;
2893
+ }
2894
+
2895
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/util/toPath.mjs
2896
+ function toPath(deepKey) {
2897
+ if (Array.isArray(deepKey)) {
2898
+ return deepKey.map(toKey);
2899
+ }
2900
+ if (typeof deepKey === "symbol") {
2901
+ return [deepKey];
2902
+ }
2903
+ deepKey = toString(deepKey);
2904
+ const result = [];
2905
+ const length = deepKey.length;
2906
+ if (length === 0) {
2907
+ return result;
2908
+ }
2909
+ let index = 0;
2910
+ let key = "";
2911
+ let quoteChar = "";
2912
+ let bracket = false;
2913
+ if (deepKey.charCodeAt(0) === 46) {
2914
+ result.push("");
2915
+ index++;
2916
+ }
2917
+ while (index < length) {
2918
+ const char = deepKey[index];
2919
+ if (quoteChar) {
2920
+ if (char === "\\" && index + 1 < length) {
2921
+ index++;
2922
+ key += deepKey[index];
2923
+ } else if (char === quoteChar) {
2924
+ quoteChar = "";
2925
+ } else {
2926
+ key += char;
2927
+ }
2928
+ } else if (bracket) {
2929
+ if (char === '"' || char === "'") {
2930
+ quoteChar = char;
2931
+ } else if (char === "]") {
2932
+ bracket = false;
2933
+ result.push(key);
2934
+ key = "";
2935
+ } else {
2936
+ key += char;
2937
+ }
2938
+ } else {
2939
+ if (char === "[") {
2940
+ bracket = true;
2941
+ if (key) {
2942
+ result.push(key);
2943
+ key = "";
2944
+ }
2945
+ } else if (char === ".") {
2946
+ if (key) {
2947
+ result.push(key);
2948
+ key = "";
2949
+ }
2950
+ } else {
2951
+ key += char;
2952
+ }
2953
+ }
2954
+ index++;
2955
+ }
2956
+ if (key) {
2957
+ result.push(key);
2958
+ }
2959
+ return result;
2960
+ }
2961
+
2962
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/get.mjs
2963
+ function get(object, path, defaultValue) {
2964
+ if (object == null) {
2965
+ return defaultValue;
2966
+ }
2967
+ switch (typeof path) {
2968
+ case "string": {
2969
+ if (isUnsafeProperty(path)) {
2970
+ return defaultValue;
2971
+ }
2972
+ const result = object[path];
2973
+ if (result === void 0) {
2974
+ if (isDeepKey(path)) {
2975
+ return get(object, toPath(path), defaultValue);
2976
+ } else {
2977
+ return defaultValue;
2978
+ }
2979
+ }
2980
+ return result;
2981
+ }
2982
+ case "number":
2983
+ case "symbol": {
2984
+ if (typeof path === "number") {
2985
+ path = toKey(path);
2986
+ }
2987
+ const result = object[path];
2988
+ if (result === void 0) {
2989
+ return defaultValue;
2990
+ }
2991
+ return result;
2992
+ }
2993
+ default: {
2994
+ if (Array.isArray(path)) {
2995
+ return getWithPath(object, path, defaultValue);
2996
+ }
2997
+ if (Object.is(path == null ? void 0 : path.valueOf(), -0)) {
2998
+ path = "-0";
2999
+ } else {
3000
+ path = String(path);
3001
+ }
3002
+ if (isUnsafeProperty(path)) {
3003
+ return defaultValue;
3004
+ }
3005
+ const result = object[path];
3006
+ if (result === void 0) {
3007
+ return defaultValue;
3008
+ }
3009
+ return result;
3010
+ }
3011
+ }
3012
+ }
3013
+ function getWithPath(object, path, defaultValue) {
3014
+ if (path.length === 0) {
3015
+ return defaultValue;
3016
+ }
3017
+ let current = object;
3018
+ for (let index = 0; index < path.length; index++) {
3019
+ if (current == null) {
3020
+ return defaultValue;
3021
+ }
3022
+ if (isUnsafeProperty(path[index])) {
3023
+ return defaultValue;
3024
+ }
3025
+ current = current[path[index]];
3026
+ }
3027
+ if (current === void 0) {
3028
+ return defaultValue;
3029
+ }
3030
+ return current;
3031
+ }
3032
+
3033
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/predicate/isObject.mjs
3034
+ function isObject(value) {
3035
+ return value !== null && (typeof value === "object" || typeof value === "function");
3036
+ }
3037
+
3038
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isIndex.mjs
3039
+ var IS_UNSIGNED_INTEGER = /^(?:0|[1-9]\d*)$/;
3040
+ function isIndex(value, length = Number.MAX_SAFE_INTEGER) {
3041
+ switch (typeof value) {
3042
+ case "number": {
3043
+ return Number.isInteger(value) && value >= 0 && value < length;
3044
+ }
3045
+ case "symbol": {
3046
+ return false;
3047
+ }
3048
+ case "string": {
3049
+ return IS_UNSIGNED_INTEGER.test(value);
3050
+ }
3051
+ }
3052
+ }
3053
+
3054
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/isKey.mjs
3055
+ var regexIsDeepProp = /\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/;
3056
+ var regexIsPlainProp = /^\w*$/;
3057
+ function isKey(value, object) {
3058
+ if (Array.isArray(value)) {
3059
+ return false;
3060
+ }
3061
+ if (typeof value === "number" || typeof value === "boolean" || value == null || isSymbol(value)) {
3062
+ return true;
3063
+ }
3064
+ return typeof value === "string" && (regexIsPlainProp.test(value) || !regexIsDeepProp.test(value)) || object != null && Object.hasOwn(object, value);
3065
+ }
3066
+
3067
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/_internal/assignValue.mjs
3068
+ var assignValue = (object, key, value) => {
3069
+ const objValue = object[key];
3070
+ if (!(Object.hasOwn(object, key) && isEqualsSameValueZero(objValue, value)) || value === void 0 && !(key in object)) {
3071
+ object[key] = value;
3072
+ }
3073
+ };
3074
+
3075
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/updateWith.mjs
3076
+ function updateWith(obj, path, updater, customizer) {
3077
+ if (obj == null && !isObject(obj)) {
3078
+ return obj;
3079
+ }
3080
+ let resolvedPath;
3081
+ if (isKey(path, obj)) {
3082
+ resolvedPath = [path];
3083
+ } else if (Array.isArray(path)) {
3084
+ resolvedPath = path;
3085
+ } else {
3086
+ resolvedPath = toPath(path);
3087
+ }
3088
+ const updateValue = updater(get(obj, resolvedPath));
3089
+ let current = obj;
3090
+ for (let i = 0; i < resolvedPath.length && current != null; i++) {
3091
+ const key = toKey(resolvedPath[i]);
3092
+ if (isUnsafeProperty(key)) {
3093
+ continue;
3094
+ }
3095
+ let newValue;
3096
+ if (i === resolvedPath.length - 1) {
3097
+ newValue = updateValue;
3098
+ } else {
3099
+ const objValue = current[key];
3100
+ const customizerResult = customizer == null ? void 0 : customizer(objValue, key, obj);
3101
+ newValue = customizerResult !== void 0 ? customizerResult : isObject(objValue) ? objValue : isIndex(resolvedPath[i + 1]) ? [] : {};
3102
+ }
3103
+ assignValue(current, key, newValue);
3104
+ current = current[key];
3105
+ }
3106
+ return obj;
3107
+ }
3108
+
3109
+ // node_modules/.pnpm/es-toolkit@1.44.0/node_modules/es-toolkit/dist/compat/object/set.mjs
3110
+ function set(obj, path, value) {
3111
+ return updateWith(obj, path, () => value, () => void 0);
3112
+ }
547
3113
 
548
3114
  // src/ts/object/index.ts
549
- import { get, set } from "es-toolkit/compat";
550
3115
  function getObjectKeys(obj) {
551
3116
  return Object.keys(obj);
552
3117
  }
@@ -1121,7 +3686,7 @@ export {
1121
3686
  appendUrlParam,
1122
3687
  arrayMove,
1123
3688
  ary,
1124
- assert,
3689
+ invariant as assert,
1125
3690
  asyncNoop,
1126
3691
  at,
1127
3692
  attempt,
@@ -1251,7 +3816,7 @@ export {
1251
3816
  isString,
1252
3817
  isSubset,
1253
3818
  isSubsetWith,
1254
- isSymbol,
3819
+ isSymbol2 as isSymbol,
1255
3820
  isTaiwanPermit,
1256
3821
  isTaxID,
1257
3822
  isTypedArray,