@basmilius/http-client 1.6.0 → 1.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (69) hide show
  1. package/dist/adapter/HttpAdapter.d.ts +3 -3
  2. package/dist/adapter/index.d.ts +1 -1
  3. package/dist/decorator/adapter.d.ts +2 -2
  4. package/dist/decorator/bound.d.ts +1 -1
  5. package/dist/decorator/debounce.d.ts +1 -1
  6. package/dist/decorator/dto/arrayProxy.d.ts +15 -15
  7. package/dist/decorator/dto/classProxy.d.ts +8 -8
  8. package/dist/decorator/dto/clone.d.ts +4 -4
  9. package/dist/decorator/dto/constant.d.ts +7 -7
  10. package/dist/decorator/dto/fill.d.ts +4 -4
  11. package/dist/decorator/dto/helper/areEqual.d.ts +4 -4
  12. package/dist/decorator/dto/helper/assertDto.d.ts +4 -4
  13. package/dist/decorator/dto/helper/circularProtect.d.ts +1 -1
  14. package/dist/decorator/dto/helper/cloneDto.d.ts +3 -3
  15. package/dist/decorator/dto/helper/executeIfDtoDirtyAndMarkClean.d.ts +4 -7
  16. package/dist/decorator/dto/helper/index.d.ts +17 -17
  17. package/dist/decorator/dto/helper/instance.d.ts +2 -2
  18. package/dist/decorator/dto/helper/isDto.d.ts +4 -4
  19. package/dist/decorator/dto/helper/isDtoClean.d.ts +3 -3
  20. package/dist/decorator/dto/helper/isDtoDirty.d.ts +3 -3
  21. package/dist/decorator/dto/helper/markDtoClean.d.ts +3 -3
  22. package/dist/decorator/dto/helper/markDtoDirty.d.ts +3 -3
  23. package/dist/decorator/dto/helper/relateDtoTo.d.ts +4 -4
  24. package/dist/decorator/dto/helper/relateValueTo.d.ts +4 -4
  25. package/dist/decorator/dto/helper/trackDto.d.ts +3 -3
  26. package/dist/decorator/dto/helper/triggerDto.d.ts +4 -3
  27. package/dist/decorator/dto/helper/unrelateDtoFrom.d.ts +4 -4
  28. package/dist/decorator/dto/helper/unrelateValueFrom.d.ts +4 -4
  29. package/dist/decorator/dto/index.d.ts +6 -6
  30. package/dist/decorator/dto/instance.d.ts +29 -0
  31. package/dist/decorator/dto/instanceProxy.d.ts +21 -21
  32. package/dist/decorator/dto/map.d.ts +2 -2
  33. package/dist/decorator/dto/refProxy.d.ts +30 -30
  34. package/dist/decorator/dto/serialize/deserialize.d.ts +1 -1
  35. package/dist/decorator/dto/serialize/deserializeArray.d.ts +1 -1
  36. package/dist/decorator/dto/serialize/deserializeDateTime.d.ts +3 -3
  37. package/dist/decorator/dto/serialize/deserializeDto.d.ts +3 -3
  38. package/dist/decorator/dto/serialize/deserializeObject.d.ts +1 -1
  39. package/dist/decorator/dto/serialize/deserializeUnknown.d.ts +1 -1
  40. package/dist/decorator/dto/serialize/index.d.ts +2 -2
  41. package/dist/decorator/dto/serialize/isSerializedDateTime.d.ts +2 -2
  42. package/dist/decorator/dto/serialize/isSerializedDto.d.ts +2 -2
  43. package/dist/decorator/dto/serialize/serialize.d.ts +1 -1
  44. package/dist/decorator/dto/serialize/serializeArray.d.ts +2 -2
  45. package/dist/decorator/dto/serialize/serializeDateTime.d.ts +3 -3
  46. package/dist/decorator/dto/serialize/serializeDto.d.ts +3 -3
  47. package/dist/decorator/dto/serialize/serializeObject.d.ts +1 -1
  48. package/dist/decorator/dto/serialize/serializeUnknown.d.ts +2 -2
  49. package/dist/decorator/dto/serialize/types.d.ts +3 -0
  50. package/dist/decorator/dto/serialize/uuid.d.ts +1 -1
  51. package/dist/decorator/dto/symbols.d.ts +11 -11
  52. package/dist/decorator/dto/toJSON.d.ts +4 -4
  53. package/dist/decorator/index.d.ts +7 -7
  54. package/dist/dto/BlobResponse.d.ts +4 -4
  55. package/dist/dto/Paginated.d.ts +7 -7
  56. package/dist/dto/index.d.ts +2 -2
  57. package/dist/http/BaseResponse.d.ts +8 -8
  58. package/dist/http/BaseService.d.ts +3 -3
  59. package/dist/http/HttpClient.d.ts +8 -8
  60. package/dist/http/QueryString.d.ts +12 -11
  61. package/dist/http/RequestBuilder.d.ts +29 -31
  62. package/dist/http/RequestError.d.ts +7 -7
  63. package/dist/http/helpers.d.ts +1 -1
  64. package/dist/http/index.d.ts +7 -7
  65. package/dist/http-client.js +15 -2589
  66. package/dist/http-client.js.map +6 -10
  67. package/dist/index.d.ts +5 -5
  68. package/dist/type/index.d.ts +2 -0
  69. package/package.json +5 -4
@@ -56,7 +56,6 @@ function debounce(fn, interval, $this) {
56
56
  }
57
57
 
58
58
  // node_modules/@basmilius/utils/dist/utils.js
59
- import { defineStore, storeToRefs } from "pinia";
60
59
  function getPrototypeChain_default(obj) {
61
60
  const entries = {};
62
61
  do {
@@ -274,2588 +273,8 @@ function unrelateValueFrom_default(dto, value) {
274
273
  // src/decorator/dto/map.ts
275
274
  var DTO_CLASS_MAP = {};
276
275
 
277
- // node_modules/@vue/shared/dist/shared.esm-bundler.js
278
- /*! #__NO_SIDE_EFFECTS__ */
279
- function makeMap(str) {
280
- const map = /* @__PURE__ */ Object.create(null);
281
- for (const key of str.split(","))
282
- map[key] = 1;
283
- return (val) => (val in map);
284
- }
285
- var EMPTY_OBJ = Object.freeze({});
286
- var EMPTY_ARR = Object.freeze([]);
287
- var NOOP = () => {
288
- };
289
- var NO = () => false;
290
- var extend = Object.assign;
291
- var remove = (arr, el) => {
292
- const i = arr.indexOf(el);
293
- if (i > -1) {
294
- arr.splice(i, 1);
295
- }
296
- };
297
- var hasOwnProperty = Object.prototype.hasOwnProperty;
298
- var hasOwn = (val, key) => hasOwnProperty.call(val, key);
299
- var isArray = Array.isArray;
300
- var isMap = (val) => toTypeString(val) === "[object Map]";
301
- var isSet = (val) => toTypeString(val) === "[object Set]";
302
- var isFunction = (val) => typeof val === "function";
303
- var isString = (val) => typeof val === "string";
304
- var isSymbol = (val) => typeof val === "symbol";
305
- var isObject = (val) => val !== null && typeof val === "object";
306
- var isPromise = (val) => {
307
- return (isObject(val) || isFunction(val)) && isFunction(val.then) && isFunction(val.catch);
308
- };
309
- var objectToString = Object.prototype.toString;
310
- var toTypeString = (value) => objectToString.call(value);
311
- var toRawType = (value) => {
312
- return toTypeString(value).slice(8, -1);
313
- };
314
- var isPlainObject = (val) => toTypeString(val) === "[object Object]";
315
- var isIntegerKey = (key) => isString(key) && key !== "NaN" && key[0] !== "-" && "" + parseInt(key, 10) === key;
316
- var cacheStringFunction = (fn) => {
317
- const cache = /* @__PURE__ */ Object.create(null);
318
- return (str) => {
319
- const hit = cache[str];
320
- return hit || (cache[str] = fn(str));
321
- };
322
- };
323
- var camelizeRE = /-(\w)/g;
324
- var camelize = cacheStringFunction((str) => {
325
- return str.replace(camelizeRE, (_, c) => c ? c.toUpperCase() : "");
326
- });
327
- var hyphenateRE = /\B([A-Z])/g;
328
- var hyphenate = cacheStringFunction((str) => str.replace(hyphenateRE, "-$1").toLowerCase());
329
- var capitalize = cacheStringFunction((str) => {
330
- return str.charAt(0).toUpperCase() + str.slice(1);
331
- });
332
- var toHandlerKey = cacheStringFunction((str) => {
333
- const s = str ? `on${capitalize(str)}` : ``;
334
- return s;
335
- });
336
- var hasChanged = (value, oldValue) => !Object.is(value, oldValue);
337
- var def = (obj, key, value, writable = false) => {
338
- Object.defineProperty(obj, key, {
339
- configurable: true,
340
- enumerable: false,
341
- writable,
342
- value
343
- });
344
- };
345
- var _globalThis;
346
- var getGlobalThis = () => {
347
- return _globalThis || (_globalThis = typeof globalThis !== "undefined" ? globalThis : typeof self !== "undefined" ? self : typeof window !== "undefined" ? window : typeof global !== "undefined" ? global : {});
348
- };
349
- var specialBooleanAttrs = `itemscope,allowfullscreen,formnovalidate,ismap,nomodule,novalidate,readonly`;
350
- var isBooleanAttr = /* @__PURE__ */ makeMap(specialBooleanAttrs + `,async,autofocus,autoplay,controls,default,defer,disabled,hidden,inert,loop,open,required,reversed,scoped,seamless,checked,muted,multiple,selected`);
351
-
352
- // node_modules/@vue/reactivity/dist/reactivity.esm-bundler.js
353
- function warn(msg, ...args) {
354
- console.warn(`[Vue warn] ${msg}`, ...args);
355
- }
356
- var activeEffectScope;
357
- function getCurrentScope() {
358
- return activeEffectScope;
359
- }
360
- var activeSub;
361
- var pausedQueueEffects = /* @__PURE__ */ new WeakSet;
362
-
363
- class ReactiveEffect {
364
- constructor(fn) {
365
- this.fn = fn;
366
- this.deps = undefined;
367
- this.depsTail = undefined;
368
- this.flags = 1 | 4;
369
- this.next = undefined;
370
- this.cleanup = undefined;
371
- this.scheduler = undefined;
372
- if (activeEffectScope && activeEffectScope.active) {
373
- activeEffectScope.effects.push(this);
374
- }
375
- }
376
- pause() {
377
- this.flags |= 64;
378
- }
379
- resume() {
380
- if (this.flags & 64) {
381
- this.flags &= ~64;
382
- if (pausedQueueEffects.has(this)) {
383
- pausedQueueEffects.delete(this);
384
- this.trigger();
385
- }
386
- }
387
- }
388
- notify() {
389
- if (this.flags & 2 && !(this.flags & 32)) {
390
- return;
391
- }
392
- if (!(this.flags & 8)) {
393
- batch(this);
394
- }
395
- }
396
- run() {
397
- if (!(this.flags & 1)) {
398
- return this.fn();
399
- }
400
- this.flags |= 2;
401
- cleanupEffect(this);
402
- prepareDeps(this);
403
- const prevEffect = activeSub;
404
- const prevShouldTrack = shouldTrack;
405
- activeSub = this;
406
- shouldTrack = true;
407
- try {
408
- return this.fn();
409
- } finally {
410
- if (activeSub !== this) {
411
- warn("Active effect was not restored correctly - this is likely a Vue internal bug.");
412
- }
413
- cleanupDeps(this);
414
- activeSub = prevEffect;
415
- shouldTrack = prevShouldTrack;
416
- this.flags &= ~2;
417
- }
418
- }
419
- stop() {
420
- if (this.flags & 1) {
421
- for (let link = this.deps;link; link = link.nextDep) {
422
- removeSub(link);
423
- }
424
- this.deps = this.depsTail = undefined;
425
- cleanupEffect(this);
426
- this.onStop && this.onStop();
427
- this.flags &= ~1;
428
- }
429
- }
430
- trigger() {
431
- if (this.flags & 64) {
432
- pausedQueueEffects.add(this);
433
- } else if (this.scheduler) {
434
- this.scheduler();
435
- } else {
436
- this.runIfDirty();
437
- }
438
- }
439
- runIfDirty() {
440
- if (isDirty(this)) {
441
- this.run();
442
- }
443
- }
444
- get dirty() {
445
- return isDirty(this);
446
- }
447
- }
448
- var batchDepth = 0;
449
- var batchedSub;
450
- var batchedComputed;
451
- function batch(sub, isComputed = false) {
452
- sub.flags |= 8;
453
- if (isComputed) {
454
- sub.next = batchedComputed;
455
- batchedComputed = sub;
456
- return;
457
- }
458
- sub.next = batchedSub;
459
- batchedSub = sub;
460
- }
461
- function startBatch() {
462
- batchDepth++;
463
- }
464
- function endBatch() {
465
- if (--batchDepth > 0) {
466
- return;
467
- }
468
- if (batchedComputed) {
469
- let e = batchedComputed;
470
- batchedComputed = undefined;
471
- while (e) {
472
- const next = e.next;
473
- e.next = undefined;
474
- e.flags &= ~8;
475
- e = next;
476
- }
477
- }
478
- let error;
479
- while (batchedSub) {
480
- let e = batchedSub;
481
- batchedSub = undefined;
482
- while (e) {
483
- const next = e.next;
484
- e.next = undefined;
485
- e.flags &= ~8;
486
- if (e.flags & 1) {
487
- try {
488
- e.trigger();
489
- } catch (err) {
490
- if (!error)
491
- error = err;
492
- }
493
- }
494
- e = next;
495
- }
496
- }
497
- if (error)
498
- throw error;
499
- }
500
- function prepareDeps(sub) {
501
- for (let link = sub.deps;link; link = link.nextDep) {
502
- link.version = -1;
503
- link.prevActiveLink = link.dep.activeLink;
504
- link.dep.activeLink = link;
505
- }
506
- }
507
- function cleanupDeps(sub) {
508
- let head;
509
- let tail = sub.depsTail;
510
- let link = tail;
511
- while (link) {
512
- const prev = link.prevDep;
513
- if (link.version === -1) {
514
- if (link === tail)
515
- tail = prev;
516
- removeSub(link);
517
- removeDep(link);
518
- } else {
519
- head = link;
520
- }
521
- link.dep.activeLink = link.prevActiveLink;
522
- link.prevActiveLink = undefined;
523
- link = prev;
524
- }
525
- sub.deps = head;
526
- sub.depsTail = tail;
527
- }
528
- function isDirty(sub) {
529
- for (let link = sub.deps;link; link = link.nextDep) {
530
- if (link.dep.version !== link.version || link.dep.computed && (refreshComputed(link.dep.computed) || link.dep.version !== link.version)) {
531
- return true;
532
- }
533
- }
534
- if (sub._dirty) {
535
- return true;
536
- }
537
- return false;
538
- }
539
- function refreshComputed(computed) {
540
- if (computed.flags & 4 && !(computed.flags & 16)) {
541
- return;
542
- }
543
- computed.flags &= ~16;
544
- if (computed.globalVersion === globalVersion) {
545
- return;
546
- }
547
- computed.globalVersion = globalVersion;
548
- const dep = computed.dep;
549
- computed.flags |= 2;
550
- if (dep.version > 0 && !computed.isSSR && computed.deps && !isDirty(computed)) {
551
- computed.flags &= ~2;
552
- return;
553
- }
554
- const prevSub = activeSub;
555
- const prevShouldTrack = shouldTrack;
556
- activeSub = computed;
557
- shouldTrack = true;
558
- try {
559
- prepareDeps(computed);
560
- const value = computed.fn(computed._value);
561
- if (dep.version === 0 || hasChanged(value, computed._value)) {
562
- computed._value = value;
563
- dep.version++;
564
- }
565
- } catch (err) {
566
- dep.version++;
567
- throw err;
568
- } finally {
569
- activeSub = prevSub;
570
- shouldTrack = prevShouldTrack;
571
- cleanupDeps(computed);
572
- computed.flags &= ~2;
573
- }
574
- }
575
- function removeSub(link, soft = false) {
576
- const { dep, prevSub, nextSub } = link;
577
- if (prevSub) {
578
- prevSub.nextSub = nextSub;
579
- link.prevSub = undefined;
580
- }
581
- if (nextSub) {
582
- nextSub.prevSub = prevSub;
583
- link.nextSub = undefined;
584
- }
585
- if (dep.subsHead === link) {
586
- dep.subsHead = nextSub;
587
- }
588
- if (dep.subs === link) {
589
- dep.subs = prevSub;
590
- if (!prevSub && dep.computed) {
591
- dep.computed.flags &= ~4;
592
- for (let l = dep.computed.deps;l; l = l.nextDep) {
593
- removeSub(l, true);
594
- }
595
- }
596
- }
597
- if (!soft && !--dep.sc && dep.map) {
598
- dep.map.delete(dep.key);
599
- }
600
- }
601
- function removeDep(link) {
602
- const { prevDep, nextDep } = link;
603
- if (prevDep) {
604
- prevDep.nextDep = nextDep;
605
- link.prevDep = undefined;
606
- }
607
- if (nextDep) {
608
- nextDep.prevDep = prevDep;
609
- link.nextDep = undefined;
610
- }
611
- }
612
- var shouldTrack = true;
613
- var trackStack = [];
614
- function pauseTracking() {
615
- trackStack.push(shouldTrack);
616
- shouldTrack = false;
617
- }
618
- function resetTracking() {
619
- const last = trackStack.pop();
620
- shouldTrack = last === undefined ? true : last;
621
- }
622
- function cleanupEffect(e) {
623
- const { cleanup } = e;
624
- e.cleanup = undefined;
625
- if (cleanup) {
626
- const prevSub = activeSub;
627
- activeSub = undefined;
628
- try {
629
- cleanup();
630
- } finally {
631
- activeSub = prevSub;
632
- }
633
- }
634
- }
635
- var globalVersion = 0;
636
-
637
- class Link {
638
- constructor(sub, dep) {
639
- this.sub = sub;
640
- this.dep = dep;
641
- this.version = dep.version;
642
- this.nextDep = this.prevDep = this.nextSub = this.prevSub = this.prevActiveLink = undefined;
643
- }
644
- }
645
-
646
- class Dep {
647
- constructor(computed) {
648
- this.computed = computed;
649
- this.version = 0;
650
- this.activeLink = undefined;
651
- this.subs = undefined;
652
- this.map = undefined;
653
- this.key = undefined;
654
- this.sc = 0;
655
- if (true) {
656
- this.subsHead = undefined;
657
- }
658
- }
659
- track(debugInfo) {
660
- if (!activeSub || !shouldTrack || activeSub === this.computed) {
661
- return;
662
- }
663
- let link = this.activeLink;
664
- if (link === undefined || link.sub !== activeSub) {
665
- link = this.activeLink = new Link(activeSub, this);
666
- if (!activeSub.deps) {
667
- activeSub.deps = activeSub.depsTail = link;
668
- } else {
669
- link.prevDep = activeSub.depsTail;
670
- activeSub.depsTail.nextDep = link;
671
- activeSub.depsTail = link;
672
- }
673
- addSub(link);
674
- } else if (link.version === -1) {
675
- link.version = this.version;
676
- if (link.nextDep) {
677
- const next = link.nextDep;
678
- next.prevDep = link.prevDep;
679
- if (link.prevDep) {
680
- link.prevDep.nextDep = next;
681
- }
682
- link.prevDep = activeSub.depsTail;
683
- link.nextDep = undefined;
684
- activeSub.depsTail.nextDep = link;
685
- activeSub.depsTail = link;
686
- if (activeSub.deps === link) {
687
- activeSub.deps = next;
688
- }
689
- }
690
- }
691
- if (activeSub.onTrack) {
692
- activeSub.onTrack(extend({
693
- effect: activeSub
694
- }, debugInfo));
695
- }
696
- return link;
697
- }
698
- trigger(debugInfo) {
699
- this.version++;
700
- globalVersion++;
701
- this.notify(debugInfo);
702
- }
703
- notify(debugInfo) {
704
- startBatch();
705
- try {
706
- if (true) {
707
- for (let head = this.subsHead;head; head = head.nextSub) {
708
- if (head.sub.onTrigger && !(head.sub.flags & 8)) {
709
- head.sub.onTrigger(extend({
710
- effect: head.sub
711
- }, debugInfo));
712
- }
713
- }
714
- }
715
- for (let link = this.subs;link; link = link.prevSub) {
716
- if (link.sub.notify()) {
717
- link.sub.dep.notify();
718
- }
719
- }
720
- } finally {
721
- endBatch();
722
- }
723
- }
724
- }
725
- function addSub(link) {
726
- link.dep.sc++;
727
- if (link.sub.flags & 4) {
728
- const computed = link.dep.computed;
729
- if (computed && !link.dep.subs) {
730
- computed.flags |= 4 | 16;
731
- for (let l = computed.deps;l; l = l.nextDep) {
732
- addSub(l);
733
- }
734
- }
735
- const currentTail = link.dep.subs;
736
- if (currentTail !== link) {
737
- link.prevSub = currentTail;
738
- if (currentTail)
739
- currentTail.nextSub = link;
740
- }
741
- if (link.dep.subsHead === undefined) {
742
- link.dep.subsHead = link;
743
- }
744
- link.dep.subs = link;
745
- }
746
- }
747
- var targetMap = /* @__PURE__ */ new WeakMap;
748
- var ITERATE_KEY = Symbol("Object iterate");
749
- var MAP_KEY_ITERATE_KEY = Symbol("Map keys iterate");
750
- var ARRAY_ITERATE_KEY = Symbol("Array iterate");
751
- function track(target, type, key) {
752
- if (shouldTrack && activeSub) {
753
- let depsMap = targetMap.get(target);
754
- if (!depsMap) {
755
- targetMap.set(target, depsMap = /* @__PURE__ */ new Map);
756
- }
757
- let dep = depsMap.get(key);
758
- if (!dep) {
759
- depsMap.set(key, dep = new Dep);
760
- dep.map = depsMap;
761
- dep.key = key;
762
- }
763
- if (true) {
764
- dep.track({
765
- target,
766
- type,
767
- key
768
- });
769
- } else {
770
- }
771
- }
772
- }
773
- function trigger(target, type, key, newValue, oldValue, oldTarget) {
774
- const depsMap = targetMap.get(target);
775
- if (!depsMap) {
776
- globalVersion++;
777
- return;
778
- }
779
- const run = (dep) => {
780
- if (dep) {
781
- if (true) {
782
- dep.trigger({
783
- target,
784
- type,
785
- key,
786
- newValue,
787
- oldValue,
788
- oldTarget
789
- });
790
- } else {
791
- }
792
- }
793
- };
794
- startBatch();
795
- if (type === "clear") {
796
- depsMap.forEach(run);
797
- } else {
798
- const targetIsArray = isArray(target);
799
- const isArrayIndex = targetIsArray && isIntegerKey(key);
800
- if (targetIsArray && key === "length") {
801
- const newLength = Number(newValue);
802
- depsMap.forEach((dep, key2) => {
803
- if (key2 === "length" || key2 === ARRAY_ITERATE_KEY || !isSymbol(key2) && key2 >= newLength) {
804
- run(dep);
805
- }
806
- });
807
- } else {
808
- if (key !== undefined || depsMap.has(undefined)) {
809
- run(depsMap.get(key));
810
- }
811
- if (isArrayIndex) {
812
- run(depsMap.get(ARRAY_ITERATE_KEY));
813
- }
814
- switch (type) {
815
- case "add":
816
- if (!targetIsArray) {
817
- run(depsMap.get(ITERATE_KEY));
818
- if (isMap(target)) {
819
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
820
- }
821
- } else if (isArrayIndex) {
822
- run(depsMap.get("length"));
823
- }
824
- break;
825
- case "delete":
826
- if (!targetIsArray) {
827
- run(depsMap.get(ITERATE_KEY));
828
- if (isMap(target)) {
829
- run(depsMap.get(MAP_KEY_ITERATE_KEY));
830
- }
831
- }
832
- break;
833
- case "set":
834
- if (isMap(target)) {
835
- run(depsMap.get(ITERATE_KEY));
836
- }
837
- break;
838
- }
839
- }
840
- }
841
- endBatch();
842
- }
843
- function reactiveReadArray(array) {
844
- const raw = toRaw(array);
845
- if (raw === array)
846
- return raw;
847
- track(raw, "iterate", ARRAY_ITERATE_KEY);
848
- return isShallow(array) ? raw : raw.map(toReactive);
849
- }
850
- function shallowReadArray(arr) {
851
- track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
852
- return arr;
853
- }
854
- var arrayInstrumentations = {
855
- __proto__: null,
856
- [Symbol.iterator]() {
857
- return iterator(this, Symbol.iterator, toReactive);
858
- },
859
- concat(...args) {
860
- return reactiveReadArray(this).concat(...args.map((x) => isArray(x) ? reactiveReadArray(x) : x));
861
- },
862
- entries() {
863
- return iterator(this, "entries", (value) => {
864
- value[1] = toReactive(value[1]);
865
- return value;
866
- });
867
- },
868
- every(fn, thisArg) {
869
- return apply(this, "every", fn, thisArg, undefined, arguments);
870
- },
871
- filter(fn, thisArg) {
872
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
873
- },
874
- find(fn, thisArg) {
875
- return apply(this, "find", fn, thisArg, toReactive, arguments);
876
- },
877
- findIndex(fn, thisArg) {
878
- return apply(this, "findIndex", fn, thisArg, undefined, arguments);
879
- },
880
- findLast(fn, thisArg) {
881
- return apply(this, "findLast", fn, thisArg, toReactive, arguments);
882
- },
883
- findLastIndex(fn, thisArg) {
884
- return apply(this, "findLastIndex", fn, thisArg, undefined, arguments);
885
- },
886
- forEach(fn, thisArg) {
887
- return apply(this, "forEach", fn, thisArg, undefined, arguments);
888
- },
889
- includes(...args) {
890
- return searchProxy(this, "includes", args);
891
- },
892
- indexOf(...args) {
893
- return searchProxy(this, "indexOf", args);
894
- },
895
- join(separator) {
896
- return reactiveReadArray(this).join(separator);
897
- },
898
- lastIndexOf(...args) {
899
- return searchProxy(this, "lastIndexOf", args);
900
- },
901
- map(fn, thisArg) {
902
- return apply(this, "map", fn, thisArg, undefined, arguments);
903
- },
904
- pop() {
905
- return noTracking(this, "pop");
906
- },
907
- push(...args) {
908
- return noTracking(this, "push", args);
909
- },
910
- reduce(fn, ...args) {
911
- return reduce(this, "reduce", fn, args);
912
- },
913
- reduceRight(fn, ...args) {
914
- return reduce(this, "reduceRight", fn, args);
915
- },
916
- shift() {
917
- return noTracking(this, "shift");
918
- },
919
- some(fn, thisArg) {
920
- return apply(this, "some", fn, thisArg, undefined, arguments);
921
- },
922
- splice(...args) {
923
- return noTracking(this, "splice", args);
924
- },
925
- toReversed() {
926
- return reactiveReadArray(this).toReversed();
927
- },
928
- toSorted(comparer) {
929
- return reactiveReadArray(this).toSorted(comparer);
930
- },
931
- toSpliced(...args) {
932
- return reactiveReadArray(this).toSpliced(...args);
933
- },
934
- unshift(...args) {
935
- return noTracking(this, "unshift", args);
936
- },
937
- values() {
938
- return iterator(this, "values", toReactive);
939
- }
940
- };
941
- function iterator(self2, method, wrapValue) {
942
- const arr = shallowReadArray(self2);
943
- const iter = arr[method]();
944
- if (arr !== self2 && !isShallow(self2)) {
945
- iter._next = iter.next;
946
- iter.next = () => {
947
- const result = iter._next();
948
- if (result.value) {
949
- result.value = wrapValue(result.value);
950
- }
951
- return result;
952
- };
953
- }
954
- return iter;
955
- }
956
- var arrayProto = Array.prototype;
957
- function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
958
- const arr = shallowReadArray(self2);
959
- const needsWrap = arr !== self2 && !isShallow(self2);
960
- const methodFn = arr[method];
961
- if (methodFn !== arrayProto[method]) {
962
- const result2 = methodFn.apply(self2, args);
963
- return needsWrap ? toReactive(result2) : result2;
964
- }
965
- let wrappedFn = fn;
966
- if (arr !== self2) {
967
- if (needsWrap) {
968
- wrappedFn = function(item, index) {
969
- return fn.call(this, toReactive(item), index, self2);
970
- };
971
- } else if (fn.length > 2) {
972
- wrappedFn = function(item, index) {
973
- return fn.call(this, item, index, self2);
974
- };
975
- }
976
- }
977
- const result = methodFn.call(arr, wrappedFn, thisArg);
978
- return needsWrap && wrappedRetFn ? wrappedRetFn(result) : result;
979
- }
980
- function reduce(self2, method, fn, args) {
981
- const arr = shallowReadArray(self2);
982
- let wrappedFn = fn;
983
- if (arr !== self2) {
984
- if (!isShallow(self2)) {
985
- wrappedFn = function(acc, item, index) {
986
- return fn.call(this, acc, toReactive(item), index, self2);
987
- };
988
- } else if (fn.length > 3) {
989
- wrappedFn = function(acc, item, index) {
990
- return fn.call(this, acc, item, index, self2);
991
- };
992
- }
993
- }
994
- return arr[method](wrappedFn, ...args);
995
- }
996
- function searchProxy(self2, method, args) {
997
- const arr = toRaw(self2);
998
- track(arr, "iterate", ARRAY_ITERATE_KEY);
999
- const res = arr[method](...args);
1000
- if ((res === -1 || res === false) && isProxy(args[0])) {
1001
- args[0] = toRaw(args[0]);
1002
- return arr[method](...args);
1003
- }
1004
- return res;
1005
- }
1006
- function noTracking(self2, method, args = []) {
1007
- pauseTracking();
1008
- startBatch();
1009
- const res = toRaw(self2)[method].apply(self2, args);
1010
- endBatch();
1011
- resetTracking();
1012
- return res;
1013
- }
1014
- var isNonTrackableKeys = /* @__PURE__ */ makeMap(`__proto__,__v_isRef,__isVue`);
1015
- var builtInSymbols = new Set(/* @__PURE__ */ Object.getOwnPropertyNames(Symbol).filter((key) => key !== "arguments" && key !== "caller").map((key) => Symbol[key]).filter(isSymbol));
1016
- function hasOwnProperty2(key) {
1017
- if (!isSymbol(key))
1018
- key = String(key);
1019
- const obj = toRaw(this);
1020
- track(obj, "has", key);
1021
- return obj.hasOwnProperty(key);
1022
- }
1023
-
1024
- class BaseReactiveHandler {
1025
- constructor(_isReadonly = false, _isShallow = false) {
1026
- this._isReadonly = _isReadonly;
1027
- this._isShallow = _isShallow;
1028
- }
1029
- get(target, key, receiver) {
1030
- if (key === "__v_skip")
1031
- return target["__v_skip"];
1032
- const isReadonly2 = this._isReadonly, isShallow2 = this._isShallow;
1033
- if (key === "__v_isReactive") {
1034
- return !isReadonly2;
1035
- } else if (key === "__v_isReadonly") {
1036
- return isReadonly2;
1037
- } else if (key === "__v_isShallow") {
1038
- return isShallow2;
1039
- } else if (key === "__v_raw") {
1040
- if (receiver === (isReadonly2 ? isShallow2 ? shallowReadonlyMap : readonlyMap : isShallow2 ? shallowReactiveMap : reactiveMap).get(target) || Object.getPrototypeOf(target) === Object.getPrototypeOf(receiver)) {
1041
- return target;
1042
- }
1043
- return;
1044
- }
1045
- const targetIsArray = isArray(target);
1046
- if (!isReadonly2) {
1047
- let fn;
1048
- if (targetIsArray && (fn = arrayInstrumentations[key])) {
1049
- return fn;
1050
- }
1051
- if (key === "hasOwnProperty") {
1052
- return hasOwnProperty2;
1053
- }
1054
- }
1055
- const res = Reflect.get(target, key, isRef(target) ? target : receiver);
1056
- if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
1057
- return res;
1058
- }
1059
- if (!isReadonly2) {
1060
- track(target, "get", key);
1061
- }
1062
- if (isShallow2) {
1063
- return res;
1064
- }
1065
- if (isRef(res)) {
1066
- return targetIsArray && isIntegerKey(key) ? res : res.value;
1067
- }
1068
- if (isObject(res)) {
1069
- return isReadonly2 ? readonly(res) : reactive(res);
1070
- }
1071
- return res;
1072
- }
1073
- }
1074
-
1075
- class MutableReactiveHandler extends BaseReactiveHandler {
1076
- constructor(isShallow2 = false) {
1077
- super(false, isShallow2);
1078
- }
1079
- set(target, key, value, receiver) {
1080
- let oldValue = target[key];
1081
- if (!this._isShallow) {
1082
- const isOldValueReadonly = isReadonly(oldValue);
1083
- if (!isShallow(value) && !isReadonly(value)) {
1084
- oldValue = toRaw(oldValue);
1085
- value = toRaw(value);
1086
- }
1087
- if (!isArray(target) && isRef(oldValue) && !isRef(value)) {
1088
- if (isOldValueReadonly) {
1089
- return false;
1090
- } else {
1091
- oldValue.value = value;
1092
- return true;
1093
- }
1094
- }
1095
- }
1096
- const hadKey = isArray(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
1097
- const result = Reflect.set(target, key, value, isRef(target) ? target : receiver);
1098
- if (target === toRaw(receiver)) {
1099
- if (!hadKey) {
1100
- trigger(target, "add", key, value);
1101
- } else if (hasChanged(value, oldValue)) {
1102
- trigger(target, "set", key, value, oldValue);
1103
- }
1104
- }
1105
- return result;
1106
- }
1107
- deleteProperty(target, key) {
1108
- const hadKey = hasOwn(target, key);
1109
- const oldValue = target[key];
1110
- const result = Reflect.deleteProperty(target, key);
1111
- if (result && hadKey) {
1112
- trigger(target, "delete", key, undefined, oldValue);
1113
- }
1114
- return result;
1115
- }
1116
- has(target, key) {
1117
- const result = Reflect.has(target, key);
1118
- if (!isSymbol(key) || !builtInSymbols.has(key)) {
1119
- track(target, "has", key);
1120
- }
1121
- return result;
1122
- }
1123
- ownKeys(target) {
1124
- track(target, "iterate", isArray(target) ? "length" : ITERATE_KEY);
1125
- return Reflect.ownKeys(target);
1126
- }
1127
- }
1128
-
1129
- class ReadonlyReactiveHandler extends BaseReactiveHandler {
1130
- constructor(isShallow2 = false) {
1131
- super(true, isShallow2);
1132
- }
1133
- set(target, key) {
1134
- if (true) {
1135
- warn(`Set operation on key "${String(key)}" failed: target is readonly.`, target);
1136
- }
1137
- return true;
1138
- }
1139
- deleteProperty(target, key) {
1140
- if (true) {
1141
- warn(`Delete operation on key "${String(key)}" failed: target is readonly.`, target);
1142
- }
1143
- return true;
1144
- }
1145
- }
1146
- var mutableHandlers = /* @__PURE__ */ new MutableReactiveHandler;
1147
- var readonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler;
1148
- var shallowReadonlyHandlers = /* @__PURE__ */ new ReadonlyReactiveHandler(true);
1149
- var toShallow = (value) => value;
1150
- var getProto = (v) => Reflect.getPrototypeOf(v);
1151
- function createIterableMethod(method, isReadonly2, isShallow2) {
1152
- return function(...args) {
1153
- const target = this["__v_raw"];
1154
- const rawTarget = toRaw(target);
1155
- const targetIsMap = isMap(rawTarget);
1156
- const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
1157
- const isKeyOnly = method === "keys" && targetIsMap;
1158
- const innerIterator = target[method](...args);
1159
- const wrap = isShallow2 ? toShallow : isReadonly2 ? toReadonly : toReactive;
1160
- !isReadonly2 && track(rawTarget, "iterate", isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY);
1161
- return {
1162
- next() {
1163
- const { value, done } = innerIterator.next();
1164
- return done ? { value, done } : {
1165
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
1166
- done
1167
- };
1168
- },
1169
- [Symbol.iterator]() {
1170
- return this;
1171
- }
1172
- };
1173
- };
1174
- }
1175
- function createReadonlyMethod(type) {
1176
- return function(...args) {
1177
- if (true) {
1178
- const key = args[0] ? `on key "${args[0]}" ` : ``;
1179
- warn(`${capitalize(type)} operation ${key}failed: target is readonly.`, toRaw(this));
1180
- }
1181
- return type === "delete" ? false : type === "clear" ? undefined : this;
1182
- };
1183
- }
1184
- function createInstrumentations(readonly, shallow) {
1185
- const instrumentations = {
1186
- get(key) {
1187
- const target = this["__v_raw"];
1188
- const rawTarget = toRaw(target);
1189
- const rawKey = toRaw(key);
1190
- if (!readonly) {
1191
- if (hasChanged(key, rawKey)) {
1192
- track(rawTarget, "get", key);
1193
- }
1194
- track(rawTarget, "get", rawKey);
1195
- }
1196
- const { has } = getProto(rawTarget);
1197
- const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1198
- if (has.call(rawTarget, key)) {
1199
- return wrap(target.get(key));
1200
- } else if (has.call(rawTarget, rawKey)) {
1201
- return wrap(target.get(rawKey));
1202
- } else if (target !== rawTarget) {
1203
- target.get(key);
1204
- }
1205
- },
1206
- get size() {
1207
- const target = this["__v_raw"];
1208
- !readonly && track(toRaw(target), "iterate", ITERATE_KEY);
1209
- return Reflect.get(target, "size", target);
1210
- },
1211
- has(key) {
1212
- const target = this["__v_raw"];
1213
- const rawTarget = toRaw(target);
1214
- const rawKey = toRaw(key);
1215
- if (!readonly) {
1216
- if (hasChanged(key, rawKey)) {
1217
- track(rawTarget, "has", key);
1218
- }
1219
- track(rawTarget, "has", rawKey);
1220
- }
1221
- return key === rawKey ? target.has(key) : target.has(key) || target.has(rawKey);
1222
- },
1223
- forEach(callback, thisArg) {
1224
- const observed = this;
1225
- const target = observed["__v_raw"];
1226
- const rawTarget = toRaw(target);
1227
- const wrap = shallow ? toShallow : readonly ? toReadonly : toReactive;
1228
- !readonly && track(rawTarget, "iterate", ITERATE_KEY);
1229
- return target.forEach((value, key) => {
1230
- return callback.call(thisArg, wrap(value), wrap(key), observed);
1231
- });
1232
- }
1233
- };
1234
- extend(instrumentations, readonly ? {
1235
- add: createReadonlyMethod("add"),
1236
- set: createReadonlyMethod("set"),
1237
- delete: createReadonlyMethod("delete"),
1238
- clear: createReadonlyMethod("clear")
1239
- } : {
1240
- add(value) {
1241
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
1242
- value = toRaw(value);
1243
- }
1244
- const target = toRaw(this);
1245
- const proto = getProto(target);
1246
- const hadKey = proto.has.call(target, value);
1247
- if (!hadKey) {
1248
- target.add(value);
1249
- trigger(target, "add", value, value);
1250
- }
1251
- return this;
1252
- },
1253
- set(key, value) {
1254
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
1255
- value = toRaw(value);
1256
- }
1257
- const target = toRaw(this);
1258
- const { has, get } = getProto(target);
1259
- let hadKey = has.call(target, key);
1260
- if (!hadKey) {
1261
- key = toRaw(key);
1262
- hadKey = has.call(target, key);
1263
- } else if (true) {
1264
- checkIdentityKeys(target, has, key);
1265
- }
1266
- const oldValue = get.call(target, key);
1267
- target.set(key, value);
1268
- if (!hadKey) {
1269
- trigger(target, "add", key, value);
1270
- } else if (hasChanged(value, oldValue)) {
1271
- trigger(target, "set", key, value, oldValue);
1272
- }
1273
- return this;
1274
- },
1275
- delete(key) {
1276
- const target = toRaw(this);
1277
- const { has, get } = getProto(target);
1278
- let hadKey = has.call(target, key);
1279
- if (!hadKey) {
1280
- key = toRaw(key);
1281
- hadKey = has.call(target, key);
1282
- } else if (true) {
1283
- checkIdentityKeys(target, has, key);
1284
- }
1285
- const oldValue = get ? get.call(target, key) : undefined;
1286
- const result = target.delete(key);
1287
- if (hadKey) {
1288
- trigger(target, "delete", key, undefined, oldValue);
1289
- }
1290
- return result;
1291
- },
1292
- clear() {
1293
- const target = toRaw(this);
1294
- const hadItems = target.size !== 0;
1295
- const oldTarget = isMap(target) ? new Map(target) : new Set(target);
1296
- const result = target.clear();
1297
- if (hadItems) {
1298
- trigger(target, "clear", undefined, undefined, oldTarget);
1299
- }
1300
- return result;
1301
- }
1302
- });
1303
- const iteratorMethods = [
1304
- "keys",
1305
- "values",
1306
- "entries",
1307
- Symbol.iterator
1308
- ];
1309
- iteratorMethods.forEach((method) => {
1310
- instrumentations[method] = createIterableMethod(method, readonly, shallow);
1311
- });
1312
- return instrumentations;
1313
- }
1314
- function createInstrumentationGetter(isReadonly2, shallow) {
1315
- const instrumentations = createInstrumentations(isReadonly2, shallow);
1316
- return (target, key, receiver) => {
1317
- if (key === "__v_isReactive") {
1318
- return !isReadonly2;
1319
- } else if (key === "__v_isReadonly") {
1320
- return isReadonly2;
1321
- } else if (key === "__v_raw") {
1322
- return target;
1323
- }
1324
- return Reflect.get(hasOwn(instrumentations, key) && key in target ? instrumentations : target, key, receiver);
1325
- };
1326
- }
1327
- var mutableCollectionHandlers = {
1328
- get: /* @__PURE__ */ createInstrumentationGetter(false, false)
1329
- };
1330
- var readonlyCollectionHandlers = {
1331
- get: /* @__PURE__ */ createInstrumentationGetter(true, false)
1332
- };
1333
- var shallowReadonlyCollectionHandlers = {
1334
- get: /* @__PURE__ */ createInstrumentationGetter(true, true)
1335
- };
1336
- function checkIdentityKeys(target, has, key) {
1337
- const rawKey = toRaw(key);
1338
- if (rawKey !== key && has.call(target, rawKey)) {
1339
- const type = toRawType(target);
1340
- warn(`Reactive ${type} contains both the raw and reactive versions of the same object${type === `Map` ? ` as keys` : ``}, which can lead to inconsistencies. Avoid differentiating between the raw and reactive versions of an object and only use the reactive version if possible.`);
1341
- }
1342
- }
1343
- var reactiveMap = /* @__PURE__ */ new WeakMap;
1344
- var shallowReactiveMap = /* @__PURE__ */ new WeakMap;
1345
- var readonlyMap = /* @__PURE__ */ new WeakMap;
1346
- var shallowReadonlyMap = /* @__PURE__ */ new WeakMap;
1347
- function targetTypeMap(rawType) {
1348
- switch (rawType) {
1349
- case "Object":
1350
- case "Array":
1351
- return 1;
1352
- case "Map":
1353
- case "Set":
1354
- case "WeakMap":
1355
- case "WeakSet":
1356
- return 2;
1357
- default:
1358
- return 0;
1359
- }
1360
- }
1361
- function getTargetType(value) {
1362
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
1363
- }
1364
- function reactive(target) {
1365
- if (isReadonly(target)) {
1366
- return target;
1367
- }
1368
- return createReactiveObject(target, false, mutableHandlers, mutableCollectionHandlers, reactiveMap);
1369
- }
1370
- function readonly(target) {
1371
- return createReactiveObject(target, true, readonlyHandlers, readonlyCollectionHandlers, readonlyMap);
1372
- }
1373
- function shallowReadonly(target) {
1374
- return createReactiveObject(target, true, shallowReadonlyHandlers, shallowReadonlyCollectionHandlers, shallowReadonlyMap);
1375
- }
1376
- function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandlers, proxyMap) {
1377
- if (!isObject(target)) {
1378
- if (true) {
1379
- warn(`value cannot be made ${isReadonly2 ? "readonly" : "reactive"}: ${String(target)}`);
1380
- }
1381
- return target;
1382
- }
1383
- if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
1384
- return target;
1385
- }
1386
- const existingProxy = proxyMap.get(target);
1387
- if (existingProxy) {
1388
- return existingProxy;
1389
- }
1390
- const targetType = getTargetType(target);
1391
- if (targetType === 0) {
1392
- return target;
1393
- }
1394
- const proxy = new Proxy(target, targetType === 2 ? collectionHandlers : baseHandlers);
1395
- proxyMap.set(target, proxy);
1396
- return proxy;
1397
- }
1398
- function isReactive(value) {
1399
- if (isReadonly(value)) {
1400
- return isReactive(value["__v_raw"]);
1401
- }
1402
- return !!(value && value["__v_isReactive"]);
1403
- }
1404
- function isReadonly(value) {
1405
- return !!(value && value["__v_isReadonly"]);
1406
- }
1407
- function isShallow(value) {
1408
- return !!(value && value["__v_isShallow"]);
1409
- }
1410
- function isProxy(value) {
1411
- return value ? !!value["__v_raw"] : false;
1412
- }
1413
- function toRaw(observed) {
1414
- const raw = observed && observed["__v_raw"];
1415
- return raw ? toRaw(raw) : observed;
1416
- }
1417
- function markRaw(value) {
1418
- if (!hasOwn(value, "__v_skip") && Object.isExtensible(value)) {
1419
- def(value, "__v_skip", true);
1420
- }
1421
- return value;
1422
- }
1423
- var toReactive = (value) => isObject(value) ? reactive(value) : value;
1424
- var toReadonly = (value) => isObject(value) ? readonly(value) : value;
1425
- function isRef(r) {
1426
- return r ? r["__v_isRef"] === true : false;
1427
- }
1428
- function unref(ref2) {
1429
- return isRef(ref2) ? ref2.value : ref2;
1430
- }
1431
- var shallowUnwrapHandlers = {
1432
- get: (target, key, receiver) => key === "__v_raw" ? target : unref(Reflect.get(target, key, receiver)),
1433
- set: (target, key, value, receiver) => {
1434
- const oldValue = target[key];
1435
- if (isRef(oldValue) && !isRef(value)) {
1436
- oldValue.value = value;
1437
- return true;
1438
- } else {
1439
- return Reflect.set(target, key, value, receiver);
1440
- }
1441
- }
1442
- };
1443
- function proxyRefs(objectWithRefs) {
1444
- return isReactive(objectWithRefs) ? objectWithRefs : new Proxy(objectWithRefs, shallowUnwrapHandlers);
1445
- }
1446
-
1447
- class CustomRefImpl {
1448
- constructor(factory) {
1449
- this["__v_isRef"] = true;
1450
- this._value = undefined;
1451
- const dep = this.dep = new Dep;
1452
- const { get, set } = factory(dep.track.bind(dep), dep.trigger.bind(dep));
1453
- this._get = get;
1454
- this._set = set;
1455
- }
1456
- get value() {
1457
- return this._value = this._get();
1458
- }
1459
- set value(newVal) {
1460
- this._set(newVal);
1461
- }
1462
- }
1463
- function customRef(factory) {
1464
- return new CustomRefImpl(factory);
1465
- }
1466
- var INITIAL_WATCHER_VALUE = {};
1467
- var cleanupMap = /* @__PURE__ */ new WeakMap;
1468
- var activeWatcher = undefined;
1469
- function onWatcherCleanup(cleanupFn, failSilently = false, owner = activeWatcher) {
1470
- if (owner) {
1471
- let cleanups = cleanupMap.get(owner);
1472
- if (!cleanups)
1473
- cleanupMap.set(owner, cleanups = []);
1474
- cleanups.push(cleanupFn);
1475
- } else if (!failSilently) {
1476
- warn(`onWatcherCleanup() was called when there was no active watcher to associate with.`);
1477
- }
1478
- }
1479
- function watch(source, cb, options = EMPTY_OBJ) {
1480
- const { immediate, deep, once, scheduler, augmentJob, call } = options;
1481
- const warnInvalidSource = (s) => {
1482
- (options.onWarn || warn)(`Invalid watch source: `, s, `A watch source can only be a getter/effect function, a ref, a reactive object, or an array of these types.`);
1483
- };
1484
- const reactiveGetter = (source2) => {
1485
- if (deep)
1486
- return source2;
1487
- if (isShallow(source2) || deep === false || deep === 0)
1488
- return traverse(source2, 1);
1489
- return traverse(source2);
1490
- };
1491
- let effect;
1492
- let getter;
1493
- let cleanup;
1494
- let boundCleanup;
1495
- let forceTrigger = false;
1496
- let isMultiSource = false;
1497
- if (isRef(source)) {
1498
- getter = () => source.value;
1499
- forceTrigger = isShallow(source);
1500
- } else if (isReactive(source)) {
1501
- getter = () => reactiveGetter(source);
1502
- forceTrigger = true;
1503
- } else if (isArray(source)) {
1504
- isMultiSource = true;
1505
- forceTrigger = source.some((s) => isReactive(s) || isShallow(s));
1506
- getter = () => source.map((s) => {
1507
- if (isRef(s)) {
1508
- return s.value;
1509
- } else if (isReactive(s)) {
1510
- return reactiveGetter(s);
1511
- } else if (isFunction(s)) {
1512
- return call ? call(s, 2) : s();
1513
- } else {
1514
- warnInvalidSource(s);
1515
- }
1516
- });
1517
- } else if (isFunction(source)) {
1518
- if (cb) {
1519
- getter = call ? () => call(source, 2) : source;
1520
- } else {
1521
- getter = () => {
1522
- if (cleanup) {
1523
- pauseTracking();
1524
- try {
1525
- cleanup();
1526
- } finally {
1527
- resetTracking();
1528
- }
1529
- }
1530
- const currentEffect = activeWatcher;
1531
- activeWatcher = effect;
1532
- try {
1533
- return call ? call(source, 3, [boundCleanup]) : source(boundCleanup);
1534
- } finally {
1535
- activeWatcher = currentEffect;
1536
- }
1537
- };
1538
- }
1539
- } else {
1540
- getter = NOOP;
1541
- warnInvalidSource(source);
1542
- }
1543
- if (cb && deep) {
1544
- const baseGetter = getter;
1545
- const depth = deep === true ? Infinity : deep;
1546
- getter = () => traverse(baseGetter(), depth);
1547
- }
1548
- const scope = getCurrentScope();
1549
- const watchHandle = () => {
1550
- effect.stop();
1551
- if (scope && scope.active) {
1552
- remove(scope.effects, effect);
1553
- }
1554
- };
1555
- if (once && cb) {
1556
- const _cb = cb;
1557
- cb = (...args) => {
1558
- _cb(...args);
1559
- watchHandle();
1560
- };
1561
- }
1562
- let oldValue = isMultiSource ? new Array(source.length).fill(INITIAL_WATCHER_VALUE) : INITIAL_WATCHER_VALUE;
1563
- const job = (immediateFirstRun) => {
1564
- if (!(effect.flags & 1) || !effect.dirty && !immediateFirstRun) {
1565
- return;
1566
- }
1567
- if (cb) {
1568
- const newValue = effect.run();
1569
- if (deep || forceTrigger || (isMultiSource ? newValue.some((v, i) => hasChanged(v, oldValue[i])) : hasChanged(newValue, oldValue))) {
1570
- if (cleanup) {
1571
- cleanup();
1572
- }
1573
- const currentWatcher = activeWatcher;
1574
- activeWatcher = effect;
1575
- try {
1576
- const args = [
1577
- newValue,
1578
- oldValue === INITIAL_WATCHER_VALUE ? undefined : isMultiSource && oldValue[0] === INITIAL_WATCHER_VALUE ? [] : oldValue,
1579
- boundCleanup
1580
- ];
1581
- call ? call(cb, 3, args) : cb(...args);
1582
- oldValue = newValue;
1583
- } finally {
1584
- activeWatcher = currentWatcher;
1585
- }
1586
- }
1587
- } else {
1588
- effect.run();
1589
- }
1590
- };
1591
- if (augmentJob) {
1592
- augmentJob(job);
1593
- }
1594
- effect = new ReactiveEffect(getter);
1595
- effect.scheduler = scheduler ? () => scheduler(job, false) : job;
1596
- boundCleanup = (fn) => onWatcherCleanup(fn, false, effect);
1597
- cleanup = effect.onStop = () => {
1598
- const cleanups = cleanupMap.get(effect);
1599
- if (cleanups) {
1600
- if (call) {
1601
- call(cleanups, 4);
1602
- } else {
1603
- for (const cleanup2 of cleanups)
1604
- cleanup2();
1605
- }
1606
- cleanupMap.delete(effect);
1607
- }
1608
- };
1609
- if (true) {
1610
- effect.onTrack = options.onTrack;
1611
- effect.onTrigger = options.onTrigger;
1612
- }
1613
- if (cb) {
1614
- if (immediate) {
1615
- job(true);
1616
- } else {
1617
- oldValue = effect.run();
1618
- }
1619
- } else if (scheduler) {
1620
- scheduler(job.bind(null, true), true);
1621
- } else {
1622
- effect.run();
1623
- }
1624
- watchHandle.pause = effect.pause.bind(effect);
1625
- watchHandle.resume = effect.resume.bind(effect);
1626
- watchHandle.stop = watchHandle;
1627
- return watchHandle;
1628
- }
1629
- function traverse(value, depth = Infinity, seen) {
1630
- if (depth <= 0 || !isObject(value) || value["__v_skip"]) {
1631
- return value;
1632
- }
1633
- seen = seen || /* @__PURE__ */ new Set;
1634
- if (seen.has(value)) {
1635
- return value;
1636
- }
1637
- seen.add(value);
1638
- depth--;
1639
- if (isRef(value)) {
1640
- traverse(value.value, depth, seen);
1641
- } else if (isArray(value)) {
1642
- for (let i = 0;i < value.length; i++) {
1643
- traverse(value[i], depth, seen);
1644
- }
1645
- } else if (isSet(value) || isMap(value)) {
1646
- value.forEach((v) => {
1647
- traverse(v, depth, seen);
1648
- });
1649
- } else if (isPlainObject(value)) {
1650
- for (const key in value) {
1651
- traverse(value[key], depth, seen);
1652
- }
1653
- for (const key of Object.getOwnPropertySymbols(value)) {
1654
- if (Object.prototype.propertyIsEnumerable.call(value, key)) {
1655
- traverse(value[key], depth, seen);
1656
- }
1657
- }
1658
- }
1659
- return value;
1660
- }
1661
- // node_modules/@vue/runtime-core/dist/runtime-core.esm-bundler.js
1662
- var stack = [];
1663
- function pushWarningContext(vnode) {
1664
- stack.push(vnode);
1665
- }
1666
- function popWarningContext() {
1667
- stack.pop();
1668
- }
1669
- var isWarning = false;
1670
- function warn$1(msg, ...args) {
1671
- if (isWarning)
1672
- return;
1673
- isWarning = true;
1674
- pauseTracking();
1675
- const instance = stack.length ? stack[stack.length - 1].component : null;
1676
- const appWarnHandler = instance && instance.appContext.config.warnHandler;
1677
- const trace = getComponentTrace();
1678
- if (appWarnHandler) {
1679
- callWithErrorHandling(appWarnHandler, instance, 11, [
1680
- msg + args.map((a) => {
1681
- var _a, _b;
1682
- return (_b = (_a = a.toString) == null ? undefined : _a.call(a)) != null ? _b : JSON.stringify(a);
1683
- }).join(""),
1684
- instance && instance.proxy,
1685
- trace.map(({ vnode }) => `at <${formatComponentName(instance, vnode.type)}>`).join(`
1686
- `),
1687
- trace
1688
- ]);
1689
- } else {
1690
- const warnArgs = [`[Vue warn]: ${msg}`, ...args];
1691
- if (trace.length && true) {
1692
- warnArgs.push(`
1693
- `, ...formatTrace(trace));
1694
- }
1695
- console.warn(...warnArgs);
1696
- }
1697
- resetTracking();
1698
- isWarning = false;
1699
- }
1700
- function getComponentTrace() {
1701
- let currentVNode = stack[stack.length - 1];
1702
- if (!currentVNode) {
1703
- return [];
1704
- }
1705
- const normalizedStack = [];
1706
- while (currentVNode) {
1707
- const last = normalizedStack[0];
1708
- if (last && last.vnode === currentVNode) {
1709
- last.recurseCount++;
1710
- } else {
1711
- normalizedStack.push({
1712
- vnode: currentVNode,
1713
- recurseCount: 0
1714
- });
1715
- }
1716
- const parentInstance = currentVNode.component && currentVNode.component.parent;
1717
- currentVNode = parentInstance && parentInstance.vnode;
1718
- }
1719
- return normalizedStack;
1720
- }
1721
- function formatTrace(trace) {
1722
- const logs = [];
1723
- trace.forEach((entry, i) => {
1724
- logs.push(...i === 0 ? [] : [`
1725
- `], ...formatTraceEntry(entry));
1726
- });
1727
- return logs;
1728
- }
1729
- function formatTraceEntry({ vnode, recurseCount }) {
1730
- const postfix = recurseCount > 0 ? `... (${recurseCount} recursive calls)` : ``;
1731
- const isRoot = vnode.component ? vnode.component.parent == null : false;
1732
- const open = ` at <${formatComponentName(vnode.component, vnode.type, isRoot)}`;
1733
- const close = `>` + postfix;
1734
- return vnode.props ? [open, ...formatProps(vnode.props), close] : [open + close];
1735
- }
1736
- function formatProps(props) {
1737
- const res = [];
1738
- const keys = Object.keys(props);
1739
- keys.slice(0, 3).forEach((key) => {
1740
- res.push(...formatProp(key, props[key]));
1741
- });
1742
- if (keys.length > 3) {
1743
- res.push(` ...`);
1744
- }
1745
- return res;
1746
- }
1747
- function formatProp(key, value, raw) {
1748
- if (isString(value)) {
1749
- value = JSON.stringify(value);
1750
- return raw ? value : [`${key}=${value}`];
1751
- } else if (typeof value === "number" || typeof value === "boolean" || value == null) {
1752
- return raw ? value : [`${key}=${value}`];
1753
- } else if (isRef(value)) {
1754
- value = formatProp(key, toRaw(value.value), true);
1755
- return raw ? value : [`${key}=Ref<`, value, `>`];
1756
- } else if (isFunction(value)) {
1757
- return [`${key}=fn${value.name ? `<${value.name}>` : ``}`];
1758
- } else {
1759
- value = toRaw(value);
1760
- return raw ? value : [`${key}=`, value];
1761
- }
1762
- }
1763
- var ErrorTypeStrings$1 = {
1764
- ["sp"]: "serverPrefetch hook",
1765
- ["bc"]: "beforeCreate hook",
1766
- ["c"]: "created hook",
1767
- ["bm"]: "beforeMount hook",
1768
- ["m"]: "mounted hook",
1769
- ["bu"]: "beforeUpdate hook",
1770
- ["u"]: "updated",
1771
- ["bum"]: "beforeUnmount hook",
1772
- ["um"]: "unmounted hook",
1773
- ["a"]: "activated hook",
1774
- ["da"]: "deactivated hook",
1775
- ["ec"]: "errorCaptured hook",
1776
- ["rtc"]: "renderTracked hook",
1777
- ["rtg"]: "renderTriggered hook",
1778
- [0]: "setup function",
1779
- [1]: "render function",
1780
- [2]: "watcher getter",
1781
- [3]: "watcher callback",
1782
- [4]: "watcher cleanup function",
1783
- [5]: "native event handler",
1784
- [6]: "component event handler",
1785
- [7]: "vnode hook",
1786
- [8]: "directive hook",
1787
- [9]: "transition hook",
1788
- [10]: "app errorHandler",
1789
- [11]: "app warnHandler",
1790
- [12]: "ref function",
1791
- [13]: "async component loader",
1792
- [14]: "scheduler flush",
1793
- [15]: "component update",
1794
- [16]: "app unmount cleanup function"
1795
- };
1796
- function callWithErrorHandling(fn, instance, type, args) {
1797
- try {
1798
- return args ? fn(...args) : fn();
1799
- } catch (err) {
1800
- handleError(err, instance, type);
1801
- }
1802
- }
1803
- function callWithAsyncErrorHandling(fn, instance, type, args) {
1804
- if (isFunction(fn)) {
1805
- const res = callWithErrorHandling(fn, instance, type, args);
1806
- if (res && isPromise(res)) {
1807
- res.catch((err) => {
1808
- handleError(err, instance, type);
1809
- });
1810
- }
1811
- return res;
1812
- }
1813
- if (isArray(fn)) {
1814
- const values = [];
1815
- for (let i = 0;i < fn.length; i++) {
1816
- values.push(callWithAsyncErrorHandling(fn[i], instance, type, args));
1817
- }
1818
- return values;
1819
- } else if (true) {
1820
- warn$1(`Invalid value type passed to callWithAsyncErrorHandling(): ${typeof fn}`);
1821
- }
1822
- }
1823
- function handleError(err, instance, type, throwInDev = true) {
1824
- const contextVNode = instance ? instance.vnode : null;
1825
- const { errorHandler, throwUnhandledErrorInProduction } = instance && instance.appContext.config || EMPTY_OBJ;
1826
- if (instance) {
1827
- let cur = instance.parent;
1828
- const exposedInstance = instance.proxy;
1829
- const errorInfo = ErrorTypeStrings$1[type];
1830
- while (cur) {
1831
- const errorCapturedHooks = cur.ec;
1832
- if (errorCapturedHooks) {
1833
- for (let i = 0;i < errorCapturedHooks.length; i++) {
1834
- if (errorCapturedHooks[i](err, exposedInstance, errorInfo) === false) {
1835
- return;
1836
- }
1837
- }
1838
- }
1839
- cur = cur.parent;
1840
- }
1841
- if (errorHandler) {
1842
- pauseTracking();
1843
- callWithErrorHandling(errorHandler, null, 10, [
1844
- err,
1845
- exposedInstance,
1846
- errorInfo
1847
- ]);
1848
- resetTracking();
1849
- return;
1850
- }
1851
- }
1852
- logError(err, type, contextVNode, throwInDev, throwUnhandledErrorInProduction);
1853
- }
1854
- function logError(err, type, contextVNode, throwInDev = true, throwInProd = false) {
1855
- if (true) {
1856
- const info = ErrorTypeStrings$1[type];
1857
- if (contextVNode) {
1858
- pushWarningContext(contextVNode);
1859
- }
1860
- warn$1(`Unhandled error${info ? ` during execution of ${info}` : ``}`);
1861
- if (contextVNode) {
1862
- popWarningContext();
1863
- }
1864
- if (throwInDev) {
1865
- throw err;
1866
- } else {
1867
- console.error(err);
1868
- }
1869
- } else
1870
- ;
1871
- }
1872
- var queue = [];
1873
- var flushIndex = -1;
1874
- var pendingPostFlushCbs = [];
1875
- var activePostFlushCbs = null;
1876
- var postFlushIndex = 0;
1877
- var resolvedPromise = /* @__PURE__ */ Promise.resolve();
1878
- var currentFlushPromise = null;
1879
- var RECURSION_LIMIT = 100;
1880
- function nextTick(fn) {
1881
- const p = currentFlushPromise || resolvedPromise;
1882
- return fn ? p.then(this ? fn.bind(this) : fn) : p;
1883
- }
1884
- function findInsertionIndex(id) {
1885
- let start = flushIndex + 1;
1886
- let end = queue.length;
1887
- while (start < end) {
1888
- const middle = start + end >>> 1;
1889
- const middleJob = queue[middle];
1890
- const middleJobId = getId(middleJob);
1891
- if (middleJobId < id || middleJobId === id && middleJob.flags & 2) {
1892
- start = middle + 1;
1893
- } else {
1894
- end = middle;
1895
- }
1896
- }
1897
- return start;
1898
- }
1899
- function queueJob(job) {
1900
- if (!(job.flags & 1)) {
1901
- const jobId = getId(job);
1902
- const lastJob = queue[queue.length - 1];
1903
- if (!lastJob || !(job.flags & 2) && jobId >= getId(lastJob)) {
1904
- queue.push(job);
1905
- } else {
1906
- queue.splice(findInsertionIndex(jobId), 0, job);
1907
- }
1908
- job.flags |= 1;
1909
- queueFlush();
1910
- }
1911
- }
1912
- function queueFlush() {
1913
- if (!currentFlushPromise) {
1914
- currentFlushPromise = resolvedPromise.then(flushJobs);
1915
- }
1916
- }
1917
- function queuePostFlushCb(cb) {
1918
- if (!isArray(cb)) {
1919
- if (activePostFlushCbs && cb.id === -1) {
1920
- activePostFlushCbs.splice(postFlushIndex + 1, 0, cb);
1921
- } else if (!(cb.flags & 1)) {
1922
- pendingPostFlushCbs.push(cb);
1923
- cb.flags |= 1;
1924
- }
1925
- } else {
1926
- pendingPostFlushCbs.push(...cb);
1927
- }
1928
- queueFlush();
1929
- }
1930
- function flushPostFlushCbs(seen) {
1931
- if (pendingPostFlushCbs.length) {
1932
- const deduped = [...new Set(pendingPostFlushCbs)].sort((a, b) => getId(a) - getId(b));
1933
- pendingPostFlushCbs.length = 0;
1934
- if (activePostFlushCbs) {
1935
- activePostFlushCbs.push(...deduped);
1936
- return;
1937
- }
1938
- activePostFlushCbs = deduped;
1939
- if (true) {
1940
- seen = seen || /* @__PURE__ */ new Map;
1941
- }
1942
- for (postFlushIndex = 0;postFlushIndex < activePostFlushCbs.length; postFlushIndex++) {
1943
- const cb = activePostFlushCbs[postFlushIndex];
1944
- if (checkRecursiveUpdates(seen, cb)) {
1945
- continue;
1946
- }
1947
- if (cb.flags & 4) {
1948
- cb.flags &= ~1;
1949
- }
1950
- if (!(cb.flags & 8))
1951
- cb();
1952
- cb.flags &= ~1;
1953
- }
1954
- activePostFlushCbs = null;
1955
- postFlushIndex = 0;
1956
- }
1957
- }
1958
- var getId = (job) => job.id == null ? job.flags & 2 ? -1 : Infinity : job.id;
1959
- function flushJobs(seen) {
1960
- if (true) {
1961
- seen = seen || /* @__PURE__ */ new Map;
1962
- }
1963
- const check = (job) => checkRecursiveUpdates(seen, job);
1964
- try {
1965
- for (flushIndex = 0;flushIndex < queue.length; flushIndex++) {
1966
- const job = queue[flushIndex];
1967
- if (job && !(job.flags & 8)) {
1968
- if (check(job)) {
1969
- continue;
1970
- }
1971
- if (job.flags & 4) {
1972
- job.flags &= ~1;
1973
- }
1974
- callWithErrorHandling(job, job.i, job.i ? 15 : 14);
1975
- if (!(job.flags & 4)) {
1976
- job.flags &= ~1;
1977
- }
1978
- }
1979
- }
1980
- } finally {
1981
- for (;flushIndex < queue.length; flushIndex++) {
1982
- const job = queue[flushIndex];
1983
- if (job) {
1984
- job.flags &= ~1;
1985
- }
1986
- }
1987
- flushIndex = -1;
1988
- queue.length = 0;
1989
- flushPostFlushCbs(seen);
1990
- currentFlushPromise = null;
1991
- if (queue.length || pendingPostFlushCbs.length) {
1992
- flushJobs(seen);
1993
- }
1994
- }
1995
- }
1996
- function checkRecursiveUpdates(seen, fn) {
1997
- const count = seen.get(fn) || 0;
1998
- if (count > RECURSION_LIMIT) {
1999
- const instance = fn.i;
2000
- const componentName = instance && getComponentName(instance.type);
2001
- handleError(`Maximum recursive updates exceeded${componentName ? ` in component <${componentName}>` : ``}. This means you have a reactive effect that is mutating its own dependencies and thus recursively triggering itself. Possible sources include component template, render function, updated hook or watcher source function.`, null, 10);
2002
- return true;
2003
- }
2004
- seen.set(fn, count + 1);
2005
- return false;
2006
- }
2007
- var isHmrUpdating = false;
2008
- var hmrDirtyComponents = /* @__PURE__ */ new Map;
2009
- if (true) {
2010
- getGlobalThis().__VUE_HMR_RUNTIME__ = {
2011
- createRecord: tryWrap(createRecord),
2012
- rerender: tryWrap(rerender),
2013
- reload: tryWrap(reload)
2014
- };
2015
- }
2016
- var map = /* @__PURE__ */ new Map;
2017
- function createRecord(id, initialDef) {
2018
- if (map.has(id)) {
2019
- return false;
2020
- }
2021
- map.set(id, {
2022
- initialDef: normalizeClassComponent(initialDef),
2023
- instances: /* @__PURE__ */ new Set
2024
- });
2025
- return true;
2026
- }
2027
- function normalizeClassComponent(component) {
2028
- return isClassComponent(component) ? component.__vccOpts : component;
2029
- }
2030
- function rerender(id, newRender) {
2031
- const record = map.get(id);
2032
- if (!record) {
2033
- return;
2034
- }
2035
- record.initialDef.render = newRender;
2036
- [...record.instances].forEach((instance) => {
2037
- if (newRender) {
2038
- instance.render = newRender;
2039
- normalizeClassComponent(instance.type).render = newRender;
2040
- }
2041
- instance.renderCache = [];
2042
- isHmrUpdating = true;
2043
- instance.update();
2044
- isHmrUpdating = false;
2045
- });
2046
- }
2047
- function reload(id, newComp) {
2048
- const record = map.get(id);
2049
- if (!record)
2050
- return;
2051
- newComp = normalizeClassComponent(newComp);
2052
- updateComponentDef(record.initialDef, newComp);
2053
- const instances = [...record.instances];
2054
- for (let i = 0;i < instances.length; i++) {
2055
- const instance = instances[i];
2056
- const oldComp = normalizeClassComponent(instance.type);
2057
- let dirtyInstances = hmrDirtyComponents.get(oldComp);
2058
- if (!dirtyInstances) {
2059
- if (oldComp !== record.initialDef) {
2060
- updateComponentDef(oldComp, newComp);
2061
- }
2062
- hmrDirtyComponents.set(oldComp, dirtyInstances = /* @__PURE__ */ new Set);
2063
- }
2064
- dirtyInstances.add(instance);
2065
- instance.appContext.propsCache.delete(instance.type);
2066
- instance.appContext.emitsCache.delete(instance.type);
2067
- instance.appContext.optionsCache.delete(instance.type);
2068
- if (instance.ceReload) {
2069
- dirtyInstances.add(instance);
2070
- instance.ceReload(newComp.styles);
2071
- dirtyInstances.delete(instance);
2072
- } else if (instance.parent) {
2073
- queueJob(() => {
2074
- isHmrUpdating = true;
2075
- instance.parent.update();
2076
- isHmrUpdating = false;
2077
- dirtyInstances.delete(instance);
2078
- });
2079
- } else if (instance.appContext.reload) {
2080
- instance.appContext.reload();
2081
- } else if (typeof window !== "undefined") {
2082
- window.location.reload();
2083
- } else {
2084
- console.warn("[HMR] Root or manually mounted instance modified. Full reload required.");
2085
- }
2086
- if (instance.root.ce && instance !== instance.root) {
2087
- instance.root.ce._removeChildStyle(oldComp);
2088
- }
2089
- }
2090
- queuePostFlushCb(() => {
2091
- hmrDirtyComponents.clear();
2092
- });
2093
- }
2094
- function updateComponentDef(oldComp, newComp) {
2095
- extend(oldComp, newComp);
2096
- for (const key in oldComp) {
2097
- if (key !== "__file" && !(key in newComp)) {
2098
- delete oldComp[key];
2099
- }
2100
- }
2101
- }
2102
- function tryWrap(fn) {
2103
- return (id, arg) => {
2104
- try {
2105
- return fn(id, arg);
2106
- } catch (e) {
2107
- console.error(e);
2108
- console.warn(`[HMR] Something went wrong during Vue component hot-reload. Full reload required.`);
2109
- }
2110
- };
2111
- }
2112
- /*! #__NO_SIDE_EFFECTS__ */
2113
- var currentRenderingInstance = null;
2114
- var TeleportEndKey = Symbol("_vte");
2115
- var leaveCbKey = Symbol("_leaveCb");
2116
- var enterCbKey = Symbol("_enterCb");
2117
- /*! #__NO_SIDE_EFFECTS__ */
2118
- var requestIdleCallback = getGlobalThis().requestIdleCallback || ((cb) => setTimeout(cb, 1));
2119
- var cancelIdleCallback = getGlobalThis().cancelIdleCallback || ((id) => clearTimeout(id));
2120
- /*! #__NO_SIDE_EFFECTS__ */
2121
- function injectHook(type, hook, target = currentInstance, prepend = false) {
2122
- if (target) {
2123
- const hooks = target[type] || (target[type] = []);
2124
- const wrappedHook = hook.__weh || (hook.__weh = (...args) => {
2125
- pauseTracking();
2126
- const reset = setCurrentInstance(target);
2127
- const res = callWithAsyncErrorHandling(hook, target, type, args);
2128
- reset();
2129
- resetTracking();
2130
- return res;
2131
- });
2132
- if (prepend) {
2133
- hooks.unshift(wrappedHook);
2134
- } else {
2135
- hooks.push(wrappedHook);
2136
- }
2137
- return wrappedHook;
2138
- } else if (true) {
2139
- const apiName = toHandlerKey(ErrorTypeStrings$1[type].replace(/ hook$/, ""));
2140
- warn$1(`${apiName} is called when there is no active component instance to be associated with. Lifecycle injection APIs can only be used during execution of setup().` + ` If you are using async setup(), make sure to register lifecycle hooks before the first await statement.`);
2141
- }
2142
- }
2143
- var createHook = (lifecycle) => (hook, target = currentInstance) => {
2144
- if (!isInSSRComponentSetup || lifecycle === "sp") {
2145
- injectHook(lifecycle, (...args) => hook(...args), target);
2146
- }
2147
- };
2148
- var onBeforeMount = createHook("bm");
2149
- var onMounted = createHook("m");
2150
- var onBeforeUpdate = createHook("bu");
2151
- var onUpdated = createHook("u");
2152
- var onBeforeUnmount = createHook("bum");
2153
- var onUnmounted = createHook("um");
2154
- var onServerPrefetch = createHook("sp");
2155
- var onRenderTriggered = createHook("rtg");
2156
- var onRenderTracked = createHook("rtc");
2157
- var NULL_DYNAMIC_COMPONENT = Symbol.for("v-ndc");
2158
- var getPublicInstance = (i) => {
2159
- if (!i)
2160
- return null;
2161
- if (isStatefulComponent(i))
2162
- return getComponentPublicInstance(i);
2163
- return getPublicInstance(i.parent);
2164
- };
2165
- var publicPropertiesMap = /* @__PURE__ */ extend(/* @__PURE__ */ Object.create(null), {
2166
- $: (i) => i,
2167
- $el: (i) => i.vnode.el,
2168
- $data: (i) => i.data,
2169
- $props: (i) => shallowReadonly(i.props),
2170
- $attrs: (i) => shallowReadonly(i.attrs),
2171
- $slots: (i) => shallowReadonly(i.slots),
2172
- $refs: (i) => shallowReadonly(i.refs),
2173
- $parent: (i) => getPublicInstance(i.parent),
2174
- $root: (i) => getPublicInstance(i.root),
2175
- $host: (i) => i.ce,
2176
- $emit: (i) => i.emit,
2177
- $options: (i) => __VUE_OPTIONS_API__ ? resolveMergedOptions(i) : i.type,
2178
- $forceUpdate: (i) => i.f || (i.f = () => {
2179
- queueJob(i.update);
2180
- }),
2181
- $nextTick: (i) => i.n || (i.n = nextTick.bind(i.proxy)),
2182
- $watch: (i) => __VUE_OPTIONS_API__ ? instanceWatch.bind(i) : NOOP
2183
- });
2184
- var isReservedPrefix = (key) => key === "_" || key === "$";
2185
- var hasSetupBinding = (state, key) => state !== EMPTY_OBJ && !state.__isScriptSetup && hasOwn(state, key);
2186
- var PublicInstanceProxyHandlers = {
2187
- get({ _: instance }, key) {
2188
- if (key === "__v_skip") {
2189
- return true;
2190
- }
2191
- const { ctx, setupState, data, props, accessCache, type, appContext } = instance;
2192
- if (key === "__isVue") {
2193
- return true;
2194
- }
2195
- let normalizedProps;
2196
- if (key[0] !== "$") {
2197
- const n = accessCache[key];
2198
- if (n !== undefined) {
2199
- switch (n) {
2200
- case 1:
2201
- return setupState[key];
2202
- case 2:
2203
- return data[key];
2204
- case 4:
2205
- return ctx[key];
2206
- case 3:
2207
- return props[key];
2208
- }
2209
- } else if (hasSetupBinding(setupState, key)) {
2210
- accessCache[key] = 1;
2211
- return setupState[key];
2212
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
2213
- accessCache[key] = 2;
2214
- return data[key];
2215
- } else if ((normalizedProps = instance.propsOptions[0]) && hasOwn(normalizedProps, key)) {
2216
- accessCache[key] = 3;
2217
- return props[key];
2218
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
2219
- accessCache[key] = 4;
2220
- return ctx[key];
2221
- } else if (!__VUE_OPTIONS_API__ || shouldCacheAccess) {
2222
- accessCache[key] = 0;
2223
- }
2224
- }
2225
- const publicGetter = publicPropertiesMap[key];
2226
- let cssModule, globalProperties;
2227
- if (publicGetter) {
2228
- if (key === "$attrs") {
2229
- track(instance.attrs, "get", "");
2230
- markAttrsAccessed();
2231
- } else if (key === "$slots") {
2232
- track(instance, "get", key);
2233
- }
2234
- return publicGetter(instance);
2235
- } else if ((cssModule = type.__cssModules) && (cssModule = cssModule[key])) {
2236
- return cssModule;
2237
- } else if (ctx !== EMPTY_OBJ && hasOwn(ctx, key)) {
2238
- accessCache[key] = 4;
2239
- return ctx[key];
2240
- } else if (globalProperties = appContext.config.globalProperties, hasOwn(globalProperties, key)) {
2241
- {
2242
- return globalProperties[key];
2243
- }
2244
- } else if (currentRenderingInstance && (!isString(key) || key.indexOf("__v") !== 0)) {
2245
- if (data !== EMPTY_OBJ && isReservedPrefix(key[0]) && hasOwn(data, key)) {
2246
- warn$1(`Property ${JSON.stringify(key)} must be accessed via $data because it starts with a reserved character ("$" or "_") and is not proxied on the render context.`);
2247
- } else if (instance === currentRenderingInstance) {
2248
- warn$1(`Property ${JSON.stringify(key)} was accessed during render but is not defined on instance.`);
2249
- }
2250
- }
2251
- },
2252
- set({ _: instance }, key, value) {
2253
- const { data, setupState, ctx } = instance;
2254
- if (hasSetupBinding(setupState, key)) {
2255
- setupState[key] = value;
2256
- return true;
2257
- } else if (setupState.__isScriptSetup && hasOwn(setupState, key)) {
2258
- warn$1(`Cannot mutate <script setup> binding "${key}" from Options API.`);
2259
- return false;
2260
- } else if (data !== EMPTY_OBJ && hasOwn(data, key)) {
2261
- data[key] = value;
2262
- return true;
2263
- } else if (hasOwn(instance.props, key)) {
2264
- warn$1(`Attempting to mutate prop "${key}". Props are readonly.`);
2265
- return false;
2266
- }
2267
- if (key[0] === "$" && key.slice(1) in instance) {
2268
- warn$1(`Attempting to mutate public property "${key}". Properties starting with $ are reserved and readonly.`);
2269
- return false;
2270
- } else {
2271
- if (key in instance.appContext.config.globalProperties) {
2272
- Object.defineProperty(ctx, key, {
2273
- enumerable: true,
2274
- configurable: true,
2275
- value
2276
- });
2277
- } else {
2278
- ctx[key] = value;
2279
- }
2280
- }
2281
- return true;
2282
- },
2283
- has({
2284
- _: { data, setupState, accessCache, ctx, appContext, propsOptions }
2285
- }, key) {
2286
- let normalizedProps;
2287
- return !!accessCache[key] || data !== EMPTY_OBJ && hasOwn(data, key) || hasSetupBinding(setupState, key) || (normalizedProps = propsOptions[0]) && hasOwn(normalizedProps, key) || hasOwn(ctx, key) || hasOwn(publicPropertiesMap, key) || hasOwn(appContext.config.globalProperties, key);
2288
- },
2289
- defineProperty(target, key, descriptor) {
2290
- if (descriptor.get != null) {
2291
- target._.accessCache[key] = 0;
2292
- } else if (hasOwn(descriptor, "value")) {
2293
- this.set(target, key, descriptor.value, null);
2294
- }
2295
- return Reflect.defineProperty(target, key, descriptor);
2296
- }
2297
- };
2298
- if (true) {
2299
- PublicInstanceProxyHandlers.ownKeys = (target) => {
2300
- warn$1(`Avoid app logic that relies on enumerating keys on a component instance. The keys will be empty in production mode to avoid performance overhead.`);
2301
- return Reflect.ownKeys(target);
2302
- };
2303
- }
2304
- function normalizePropsOrEmits(props) {
2305
- return isArray(props) ? props.reduce((normalized, p) => (normalized[p] = null, normalized), {}) : props;
2306
- }
2307
- var shouldCacheAccess = true;
2308
- function resolveMergedOptions(instance) {
2309
- const base = instance.type;
2310
- const { mixins, extends: extendsOptions } = base;
2311
- const {
2312
- mixins: globalMixins,
2313
- optionsCache: cache,
2314
- config: { optionMergeStrategies }
2315
- } = instance.appContext;
2316
- const cached = cache.get(base);
2317
- let resolved;
2318
- if (cached) {
2319
- resolved = cached;
2320
- } else if (!globalMixins.length && !mixins && !extendsOptions) {
2321
- {
2322
- resolved = base;
2323
- }
2324
- } else {
2325
- resolved = {};
2326
- if (globalMixins.length) {
2327
- globalMixins.forEach((m) => mergeOptions(resolved, m, optionMergeStrategies, true));
2328
- }
2329
- mergeOptions(resolved, base, optionMergeStrategies);
2330
- }
2331
- if (isObject(base)) {
2332
- cache.set(base, resolved);
2333
- }
2334
- return resolved;
2335
- }
2336
- function mergeOptions(to, from, strats, asMixin = false) {
2337
- const { mixins, extends: extendsOptions } = from;
2338
- if (extendsOptions) {
2339
- mergeOptions(to, extendsOptions, strats, true);
2340
- }
2341
- if (mixins) {
2342
- mixins.forEach((m) => mergeOptions(to, m, strats, true));
2343
- }
2344
- for (const key in from) {
2345
- if (asMixin && key === "expose") {
2346
- warn$1(`"expose" option is ignored when declared in mixins or extends. It should only be declared in the base component itself.`);
2347
- } else {
2348
- const strat = internalOptionMergeStrats[key] || strats && strats[key];
2349
- to[key] = strat ? strat(to[key], from[key]) : from[key];
2350
- }
2351
- }
2352
- return to;
2353
- }
2354
- var internalOptionMergeStrats = {
2355
- data: mergeDataFn,
2356
- props: mergeEmitsOrPropsOptions,
2357
- emits: mergeEmitsOrPropsOptions,
2358
- methods: mergeObjectOptions,
2359
- computed: mergeObjectOptions,
2360
- beforeCreate: mergeAsArray,
2361
- created: mergeAsArray,
2362
- beforeMount: mergeAsArray,
2363
- mounted: mergeAsArray,
2364
- beforeUpdate: mergeAsArray,
2365
- updated: mergeAsArray,
2366
- beforeDestroy: mergeAsArray,
2367
- beforeUnmount: mergeAsArray,
2368
- destroyed: mergeAsArray,
2369
- unmounted: mergeAsArray,
2370
- activated: mergeAsArray,
2371
- deactivated: mergeAsArray,
2372
- errorCaptured: mergeAsArray,
2373
- serverPrefetch: mergeAsArray,
2374
- components: mergeObjectOptions,
2375
- directives: mergeObjectOptions,
2376
- watch: mergeWatchOptions,
2377
- provide: mergeDataFn,
2378
- inject: mergeInject
2379
- };
2380
- function mergeDataFn(to, from) {
2381
- if (!from) {
2382
- return to;
2383
- }
2384
- if (!to) {
2385
- return from;
2386
- }
2387
- return function mergedDataFn() {
2388
- return extend(isFunction(to) ? to.call(this, this) : to, isFunction(from) ? from.call(this, this) : from);
2389
- };
2390
- }
2391
- function mergeInject(to, from) {
2392
- return mergeObjectOptions(normalizeInject(to), normalizeInject(from));
2393
- }
2394
- function normalizeInject(raw) {
2395
- if (isArray(raw)) {
2396
- const res = {};
2397
- for (let i = 0;i < raw.length; i++) {
2398
- res[raw[i]] = raw[i];
2399
- }
2400
- return res;
2401
- }
2402
- return raw;
2403
- }
2404
- function mergeAsArray(to, from) {
2405
- return to ? [...new Set([].concat(to, from))] : from;
2406
- }
2407
- function mergeObjectOptions(to, from) {
2408
- return to ? extend(/* @__PURE__ */ Object.create(null), to, from) : from;
2409
- }
2410
- function mergeEmitsOrPropsOptions(to, from) {
2411
- if (to) {
2412
- if (isArray(to) && isArray(from)) {
2413
- return [.../* @__PURE__ */ new Set([...to, ...from])];
2414
- }
2415
- return extend(/* @__PURE__ */ Object.create(null), normalizePropsOrEmits(to), normalizePropsOrEmits(from != null ? from : {}));
2416
- } else {
2417
- return from;
2418
- }
2419
- }
2420
- function mergeWatchOptions(to, from) {
2421
- if (!to)
2422
- return from;
2423
- if (!from)
2424
- return to;
2425
- const merged = extend(/* @__PURE__ */ Object.create(null), to);
2426
- for (const key in from) {
2427
- merged[key] = mergeAsArray(to[key], from[key]);
2428
- }
2429
- return merged;
2430
- }
2431
- function createAppContext() {
2432
- return {
2433
- app: null,
2434
- config: {
2435
- isNativeTag: NO,
2436
- performance: false,
2437
- globalProperties: {},
2438
- optionMergeStrategies: {},
2439
- errorHandler: undefined,
2440
- warnHandler: undefined,
2441
- compilerOptions: {}
2442
- },
2443
- mixins: [],
2444
- components: {},
2445
- directives: {},
2446
- provides: /* @__PURE__ */ Object.create(null),
2447
- optionsCache: /* @__PURE__ */ new WeakMap,
2448
- propsCache: /* @__PURE__ */ new WeakMap,
2449
- emitsCache: /* @__PURE__ */ new WeakMap
2450
- };
2451
- }
2452
- var currentApp = null;
2453
- function inject(key, defaultValue, treatDefaultAsFactory = false) {
2454
- const instance = currentInstance || currentRenderingInstance;
2455
- if (instance || currentApp) {
2456
- const provides = currentApp ? currentApp._context.provides : instance ? instance.parent == null ? instance.vnode.appContext && instance.vnode.appContext.provides : instance.parent.provides : undefined;
2457
- if (provides && key in provides) {
2458
- return provides[key];
2459
- } else if (arguments.length > 1) {
2460
- return treatDefaultAsFactory && isFunction(defaultValue) ? defaultValue.call(instance && instance.proxy) : defaultValue;
2461
- } else if (true) {
2462
- warn$1(`injection "${String(key)}" not found.`);
2463
- }
2464
- } else if (true) {
2465
- warn$1(`inject() can only be used inside setup() or functional components.`);
2466
- }
2467
- }
2468
- var queuePostRenderEffect = queueEffectWithSuspense;
2469
- var ssrContextKey = Symbol.for("v-scx");
2470
- var useSSRContext = () => {
2471
- {
2472
- const ctx = inject(ssrContextKey);
2473
- if (!ctx) {
2474
- warn$1(`Server rendering context not provided. Make sure to only call useSSRContext() conditionally in the server build.`);
2475
- }
2476
- return ctx;
2477
- }
2478
- };
2479
- function doWatch(source, cb, options = EMPTY_OBJ) {
2480
- const { immediate, deep, flush, once } = options;
2481
- if (!cb) {
2482
- if (immediate !== undefined) {
2483
- warn$1(`watch() "immediate" option is only respected when using the watch(source, callback, options?) signature.`);
2484
- }
2485
- if (deep !== undefined) {
2486
- warn$1(`watch() "deep" option is only respected when using the watch(source, callback, options?) signature.`);
2487
- }
2488
- if (once !== undefined) {
2489
- warn$1(`watch() "once" option is only respected when using the watch(source, callback, options?) signature.`);
2490
- }
2491
- }
2492
- const baseWatchOptions = extend({}, options);
2493
- if (true)
2494
- baseWatchOptions.onWarn = warn$1;
2495
- const runsImmediately = cb && immediate || !cb && flush !== "post";
2496
- let ssrCleanup;
2497
- if (isInSSRComponentSetup) {
2498
- if (flush === "sync") {
2499
- const ctx = useSSRContext();
2500
- ssrCleanup = ctx.__watcherHandles || (ctx.__watcherHandles = []);
2501
- } else if (!runsImmediately) {
2502
- const watchStopHandle = () => {
2503
- };
2504
- watchStopHandle.stop = NOOP;
2505
- watchStopHandle.resume = NOOP;
2506
- watchStopHandle.pause = NOOP;
2507
- return watchStopHandle;
2508
- }
2509
- }
2510
- const instance = currentInstance;
2511
- baseWatchOptions.call = (fn, type, args) => callWithAsyncErrorHandling(fn, instance, type, args);
2512
- let isPre = false;
2513
- if (flush === "post") {
2514
- baseWatchOptions.scheduler = (job) => {
2515
- queuePostRenderEffect(job, instance && instance.suspense);
2516
- };
2517
- } else if (flush !== "sync") {
2518
- isPre = true;
2519
- baseWatchOptions.scheduler = (job, isFirstRun) => {
2520
- if (isFirstRun) {
2521
- job();
2522
- } else {
2523
- queueJob(job);
2524
- }
2525
- };
2526
- }
2527
- baseWatchOptions.augmentJob = (job) => {
2528
- if (cb) {
2529
- job.flags |= 4;
2530
- }
2531
- if (isPre) {
2532
- job.flags |= 2;
2533
- if (instance) {
2534
- job.id = instance.uid;
2535
- job.i = instance;
2536
- }
2537
- }
2538
- };
2539
- const watchHandle = watch(source, cb, baseWatchOptions);
2540
- if (isInSSRComponentSetup) {
2541
- if (ssrCleanup) {
2542
- ssrCleanup.push(watchHandle);
2543
- } else if (runsImmediately) {
2544
- watchHandle();
2545
- }
2546
- }
2547
- return watchHandle;
2548
- }
2549
- function instanceWatch(source, value, options) {
2550
- const publicThis = this.proxy;
2551
- const getter = isString(source) ? source.includes(".") ? createPathGetter(publicThis, source) : () => publicThis[source] : source.bind(publicThis, publicThis);
2552
- let cb;
2553
- if (isFunction(value)) {
2554
- cb = value;
2555
- } else {
2556
- cb = value.handler;
2557
- options = value;
2558
- }
2559
- const reset = setCurrentInstance(this);
2560
- const res = doWatch(getter, cb.bind(publicThis), options);
2561
- reset();
2562
- return res;
2563
- }
2564
- function createPathGetter(ctx, path) {
2565
- const segments = path.split(".");
2566
- return () => {
2567
- let cur = ctx;
2568
- for (let i = 0;i < segments.length && cur; i++) {
2569
- cur = cur[segments[i]];
2570
- }
2571
- return cur;
2572
- };
2573
- }
2574
- var accessedAttrs = false;
2575
- function markAttrsAccessed() {
2576
- accessedAttrs = true;
2577
- }
2578
- function queueEffectWithSuspense(fn, suspense) {
2579
- if (suspense && suspense.pendingBranch) {
2580
- if (isArray(fn)) {
2581
- suspense.effects.push(...fn);
2582
- } else {
2583
- suspense.effects.push(fn);
2584
- }
2585
- } else {
2586
- queuePostFlushCb(fn);
2587
- }
2588
- }
2589
- var Fragment = Symbol.for("v-fgt");
2590
- var Text = Symbol.for("v-txt");
2591
- var Comment = Symbol.for("v-cmt");
2592
- var Static = Symbol.for("v-stc");
2593
- var emptyAppContext = createAppContext();
2594
- var currentInstance = null;
2595
- var internalSetCurrentInstance;
2596
- var setInSSRSetupState;
2597
- {
2598
- const g = getGlobalThis();
2599
- const registerGlobalSetter = (key, setter) => {
2600
- let setters;
2601
- if (!(setters = g[key]))
2602
- setters = g[key] = [];
2603
- setters.push(setter);
2604
- return (v) => {
2605
- if (setters.length > 1)
2606
- setters.forEach((set) => set(v));
2607
- else
2608
- setters[0](v);
2609
- };
2610
- };
2611
- internalSetCurrentInstance = registerGlobalSetter(`__VUE_INSTANCE_SETTERS__`, (v) => currentInstance = v);
2612
- setInSSRSetupState = registerGlobalSetter(`__VUE_SSR_SETTERS__`, (v) => isInSSRComponentSetup = v);
2613
- }
2614
- var setCurrentInstance = (instance) => {
2615
- const prev = currentInstance;
2616
- internalSetCurrentInstance(instance);
2617
- instance.scope.on();
2618
- return () => {
2619
- instance.scope.off();
2620
- internalSetCurrentInstance(prev);
2621
- };
2622
- };
2623
- function isStatefulComponent(instance) {
2624
- return instance.vnode.shapeFlag & 4;
2625
- }
2626
- var isInSSRComponentSetup = false;
2627
- function getComponentPublicInstance(instance) {
2628
- if (instance.exposed) {
2629
- return instance.exposeProxy || (instance.exposeProxy = new Proxy(proxyRefs(markRaw(instance.exposed)), {
2630
- get(target, key) {
2631
- if (key in target) {
2632
- return target[key];
2633
- } else if (key in publicPropertiesMap) {
2634
- return publicPropertiesMap[key](instance);
2635
- }
2636
- },
2637
- has(target, key) {
2638
- return key in target || key in publicPropertiesMap;
2639
- }
2640
- }));
2641
- } else {
2642
- return instance.proxy;
2643
- }
2644
- }
2645
- var classifyRE = /(?:^|[-_])(\w)/g;
2646
- var classify = (str) => str.replace(classifyRE, (c) => c.toUpperCase()).replace(/[-_]/g, "");
2647
- function getComponentName(Component, includeInferred = true) {
2648
- return isFunction(Component) ? Component.displayName || Component.name : Component.name || includeInferred && Component.__name;
2649
- }
2650
- function formatComponentName(instance, Component, isRoot = false) {
2651
- let name = getComponentName(Component);
2652
- if (!name && Component.__file) {
2653
- const match = Component.__file.match(/([^/\\]+)\.\w+$/);
2654
- if (match) {
2655
- name = match[1];
2656
- }
2657
- }
2658
- if (!name && instance && instance.parent) {
2659
- const inferFromRegistry = (registry) => {
2660
- for (const key in registry) {
2661
- if (registry[key] === Component) {
2662
- return key;
2663
- }
2664
- }
2665
- };
2666
- name = inferFromRegistry(instance.components || instance.parent.type.components) || inferFromRegistry(instance.appContext.components);
2667
- }
2668
- return name ? classify(name) : isRoot ? `App` : `Anonymous`;
2669
- }
2670
- function isClassComponent(value) {
2671
- return isFunction(value) && "__vccOpts" in value;
2672
- }
2673
- function initCustomFormatter() {
2674
- if (typeof window === "undefined") {
2675
- return;
2676
- }
2677
- const vueStyle = { style: "color:#3ba776" };
2678
- const numberStyle = { style: "color:#1677ff" };
2679
- const stringStyle = { style: "color:#f5222d" };
2680
- const keywordStyle = { style: "color:#eb2f96" };
2681
- const formatter = {
2682
- __vue_custom_formatter: true,
2683
- header(obj) {
2684
- if (!isObject(obj)) {
2685
- return null;
2686
- }
2687
- if (obj.__isVue) {
2688
- return ["div", vueStyle, `VueInstance`];
2689
- } else if (isRef(obj)) {
2690
- return [
2691
- "div",
2692
- {},
2693
- ["span", vueStyle, genRefFlag(obj)],
2694
- "<",
2695
- formatValue("_value" in obj ? obj._value : obj),
2696
- `>`
2697
- ];
2698
- } else if (isReactive(obj)) {
2699
- return [
2700
- "div",
2701
- {},
2702
- ["span", vueStyle, isShallow(obj) ? "ShallowReactive" : "Reactive"],
2703
- "<",
2704
- formatValue(obj),
2705
- `>${isReadonly(obj) ? ` (readonly)` : ``}`
2706
- ];
2707
- } else if (isReadonly(obj)) {
2708
- return [
2709
- "div",
2710
- {},
2711
- ["span", vueStyle, isShallow(obj) ? "ShallowReadonly" : "Readonly"],
2712
- "<",
2713
- formatValue(obj),
2714
- ">"
2715
- ];
2716
- }
2717
- return null;
2718
- },
2719
- hasBody(obj) {
2720
- return obj && obj.__isVue;
2721
- },
2722
- body(obj) {
2723
- if (obj && obj.__isVue) {
2724
- return [
2725
- "div",
2726
- {},
2727
- ...formatInstance(obj.$)
2728
- ];
2729
- }
2730
- }
2731
- };
2732
- function formatInstance(instance) {
2733
- const blocks = [];
2734
- if (instance.type.props && instance.props) {
2735
- blocks.push(createInstanceBlock("props", toRaw(instance.props)));
2736
- }
2737
- if (instance.setupState !== EMPTY_OBJ) {
2738
- blocks.push(createInstanceBlock("setup", instance.setupState));
2739
- }
2740
- if (instance.data !== EMPTY_OBJ) {
2741
- blocks.push(createInstanceBlock("data", toRaw(instance.data)));
2742
- }
2743
- const computed2 = extractKeys(instance, "computed");
2744
- if (computed2) {
2745
- blocks.push(createInstanceBlock("computed", computed2));
2746
- }
2747
- const injected = extractKeys(instance, "inject");
2748
- if (injected) {
2749
- blocks.push(createInstanceBlock("injected", injected));
2750
- }
2751
- blocks.push([
2752
- "div",
2753
- {},
2754
- [
2755
- "span",
2756
- {
2757
- style: keywordStyle.style + ";opacity:0.66"
2758
- },
2759
- "$ (internal): "
2760
- ],
2761
- ["object", { object: instance }]
2762
- ]);
2763
- return blocks;
2764
- }
2765
- function createInstanceBlock(type, target) {
2766
- target = extend({}, target);
2767
- if (!Object.keys(target).length) {
2768
- return ["span", {}];
2769
- }
2770
- return [
2771
- "div",
2772
- { style: "line-height:1.25em;margin-bottom:0.6em" },
2773
- [
2774
- "div",
2775
- {
2776
- style: "color:#476582"
2777
- },
2778
- type
2779
- ],
2780
- [
2781
- "div",
2782
- {
2783
- style: "padding-left:1.25em"
2784
- },
2785
- ...Object.keys(target).map((key) => {
2786
- return [
2787
- "div",
2788
- {},
2789
- ["span", keywordStyle, key + ": "],
2790
- formatValue(target[key], false)
2791
- ];
2792
- })
2793
- ]
2794
- ];
2795
- }
2796
- function formatValue(v, asRaw = true) {
2797
- if (typeof v === "number") {
2798
- return ["span", numberStyle, v];
2799
- } else if (typeof v === "string") {
2800
- return ["span", stringStyle, JSON.stringify(v)];
2801
- } else if (typeof v === "boolean") {
2802
- return ["span", keywordStyle, v];
2803
- } else if (isObject(v)) {
2804
- return ["object", { object: asRaw ? toRaw(v) : v }];
2805
- } else {
2806
- return ["span", stringStyle, String(v)];
2807
- }
2808
- }
2809
- function extractKeys(instance, type) {
2810
- const Comp = instance.type;
2811
- if (isFunction(Comp)) {
2812
- return;
2813
- }
2814
- const extracted = {};
2815
- for (const key in instance.ctx) {
2816
- if (isKeyOfType(Comp, key, type)) {
2817
- extracted[key] = instance.ctx[key];
2818
- }
2819
- }
2820
- return extracted;
2821
- }
2822
- function isKeyOfType(Comp, key, type) {
2823
- const opts = Comp[type];
2824
- if (isArray(opts) && opts.includes(key) || isObject(opts) && key in opts) {
2825
- return true;
2826
- }
2827
- if (Comp.extends && isKeyOfType(Comp.extends, key, type)) {
2828
- return true;
2829
- }
2830
- if (Comp.mixins && Comp.mixins.some((m) => isKeyOfType(m, key, type))) {
2831
- return true;
2832
- }
2833
- }
2834
- function genRefFlag(v) {
2835
- if (isShallow(v)) {
2836
- return `ShallowRef`;
2837
- }
2838
- if (v.effect) {
2839
- return `ComputedRef`;
2840
- }
2841
- return `Ref`;
2842
- }
2843
- if (window.devtoolsFormatters) {
2844
- window.devtoolsFormatters.push(formatter);
2845
- } else {
2846
- window.devtoolsFormatters = [formatter];
2847
- }
2848
- }
2849
-
2850
- // node_modules/vue/dist/vue.runtime.esm-bundler.js
2851
- function initDev() {
2852
- {
2853
- initCustomFormatter();
2854
- }
2855
- }
2856
- if (true) {
2857
- initDev();
2858
- }
276
+ // src/decorator/dto/classProxy.ts
277
+ import { customRef, markRaw } from "vue";
2859
278
 
2860
279
  // src/decorator/dto/arrayProxy.ts
2861
280
  var arrayProxy_default = {
@@ -2981,16 +400,16 @@ var classProxy_default = {
2981
400
  }
2982
401
  return new Proxy(arg, arrayProxy_default);
2983
402
  });
2984
- const ref2 = customRef((track2, trigger2) => {
403
+ const ref = customRef((track, trigger) => {
2985
404
  const instance = markRaw(Reflect.construct(target, argsArray, newTarget));
2986
405
  instance[ARGS] = argsArray;
2987
406
  instance[DIRTY] = false;
2988
- instance[TRACK] = track2;
2989
- instance[TRIGGER] = trigger2;
407
+ instance[TRACK] = track;
408
+ instance[TRIGGER] = trigger;
2990
409
  const proxied = new Proxy(instance, instanceProxy_default);
2991
410
  return {
2992
411
  get: () => {
2993
- track2();
412
+ track();
2994
413
  return proxied;
2995
414
  },
2996
415
  set: () => {
@@ -2998,7 +417,7 @@ var classProxy_default = {
2998
417
  }
2999
418
  };
3000
419
  });
3001
- return new Proxy(ref2, refProxy_default);
420
+ return new Proxy(ref, refProxy_default);
3002
421
  }
3003
422
  };
3004
423
 
@@ -3165,6 +584,9 @@ function serializeDateTime_default(obj) {
3165
584
  })];
3166
585
  }
3167
586
 
587
+ // src/decorator/dto/serialize/serializeDto.ts
588
+ import { toRaw } from "vue";
589
+
3168
590
  // src/decorator/dto/serialize/serializeObject.ts
3169
591
  function serializeObject_default(obj) {
3170
592
  return Object.fromEntries(Object.entries(obj).map(([key, value]) => [key, serializeUnknown_default(value)]).filter(([, value]) => value !== undefined));
@@ -3455,6 +877,10 @@ class RequestBuilder {
3455
877
  this.#query = queryString;
3456
878
  return this;
3457
879
  }
880
+ signal(signal = null) {
881
+ this.#options.signal = signal;
882
+ return this;
883
+ }
3458
884
  async fetch() {
3459
885
  return this.#execute().then((r) => r.json());
3460
886
  }
@@ -3635,5 +1061,5 @@ export {
3635
1061
  BaseResponse
3636
1062
  };
3637
1063
 
3638
- //# debugId=F0BB74B8B3687CB464756E2164756E21
1064
+ //# debugId=FD73A560BEC553C364756E2164756E21
3639
1065
  //# sourceMappingURL=http-client.js.map