@rebilly/instruments 16.175.1 → 16.176.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.
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  /**
2
- * @vue/shared v3.5.22
2
+ * @vue/shared v3.5.41
3
3
  * (c) 2018-present Yuxi (Evan) You and Vue contributors
4
4
  * @license MIT
5
5
  **/
@@ -103,13 +103,13 @@ class Dep {
103
103
  }
104
104
  }
105
105
  const targetMap = /* @__PURE__ */ new WeakMap();
106
- const ITERATE_KEY = Symbol(
106
+ const ITERATE_KEY = /* @__PURE__ */ Symbol(
107
107
  ""
108
108
  );
109
- const MAP_KEY_ITERATE_KEY = Symbol(
109
+ const MAP_KEY_ITERATE_KEY = /* @__PURE__ */ Symbol(
110
110
  ""
111
111
  );
112
- const ARRAY_ITERATE_KEY = Symbol(
112
+ const ARRAY_ITERATE_KEY = /* @__PURE__ */ Symbol(
113
113
  ""
114
114
  );
115
115
  function track(target, type, key) {
@@ -191,19 +191,25 @@ function trigger(target, type, key, newValue, oldValue, oldTarget) {
191
191
  endBatch();
192
192
  }
193
193
  function reactiveReadArray(array) {
194
- const raw = toRaw(array);
194
+ const raw = /* @__PURE__ */ toRaw(array);
195
195
  if (raw === array) return raw;
196
196
  track(raw, "iterate", ARRAY_ITERATE_KEY);
197
- return isShallow(array) ? raw : raw.map(toReactive);
197
+ return /* @__PURE__ */ isShallow(array) ? raw : raw.map(toReactive);
198
198
  }
199
199
  function shallowReadArray(arr) {
200
- track(arr = toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
200
+ track(arr = /* @__PURE__ */ toRaw(arr), "iterate", ARRAY_ITERATE_KEY);
201
201
  return arr;
202
202
  }
203
+ function toWrapped(target, item) {
204
+ if (/* @__PURE__ */ isReadonly(target)) {
205
+ return /* @__PURE__ */ isReactive(target) ? toReadonly(toReactive(item)) : toReadonly(item);
206
+ }
207
+ return toReactive(item);
208
+ }
203
209
  const arrayInstrumentations = {
204
210
  __proto__: null,
205
211
  [Symbol.iterator]() {
206
- return iterator$1(this, Symbol.iterator, toReactive);
212
+ return iterator$1(this, Symbol.iterator, (item) => toWrapped(this, item));
207
213
  },
208
214
  concat(...args) {
209
215
  return reactiveReadArray(this).concat(
@@ -212,7 +218,7 @@ const arrayInstrumentations = {
212
218
  },
213
219
  entries() {
214
220
  return iterator$1(this, "entries", (value) => {
215
- value[1] = toReactive(value[1]);
221
+ value[1] = toWrapped(this, value[1]);
216
222
  return value;
217
223
  });
218
224
  },
@@ -220,16 +226,37 @@ const arrayInstrumentations = {
220
226
  return apply(this, "every", fn, thisArg, void 0, arguments);
221
227
  },
222
228
  filter(fn, thisArg) {
223
- return apply(this, "filter", fn, thisArg, (v) => v.map(toReactive), arguments);
229
+ return apply(
230
+ this,
231
+ "filter",
232
+ fn,
233
+ thisArg,
234
+ (v) => v.map((item) => toWrapped(this, item)),
235
+ arguments
236
+ );
224
237
  },
225
238
  find(fn, thisArg) {
226
- return apply(this, "find", fn, thisArg, toReactive, arguments);
239
+ return apply(
240
+ this,
241
+ "find",
242
+ fn,
243
+ thisArg,
244
+ (item) => toWrapped(this, item),
245
+ arguments
246
+ );
227
247
  },
228
248
  findIndex(fn, thisArg) {
229
249
  return apply(this, "findIndex", fn, thisArg, void 0, arguments);
230
250
  },
231
251
  findLast(fn, thisArg) {
232
- return apply(this, "findLast", fn, thisArg, toReactive, arguments);
252
+ return apply(
253
+ this,
254
+ "findLast",
255
+ fn,
256
+ thisArg,
257
+ (item) => toWrapped(this, item),
258
+ arguments
259
+ );
233
260
  },
234
261
  findLastIndex(fn, thisArg) {
235
262
  return apply(this, "findLastIndex", fn, thisArg, void 0, arguments);
@@ -289,13 +316,13 @@ const arrayInstrumentations = {
289
316
  return noTracking(this, "unshift", args);
290
317
  },
291
318
  values() {
292
- return iterator$1(this, "values", toReactive);
319
+ return iterator$1(this, "values", (item) => toWrapped(this, item));
293
320
  }
294
321
  };
295
322
  function iterator$1(self2, method, wrapValue) {
296
323
  const arr = shallowReadArray(self2);
297
324
  const iter = arr[method]();
298
- if (arr !== self2 && !isShallow(self2)) {
325
+ if (arr !== self2 && !/* @__PURE__ */ isShallow(self2)) {
299
326
  iter._next = iter.next;
300
327
  iter.next = () => {
301
328
  const result = iter._next();
@@ -310,7 +337,7 @@ function iterator$1(self2, method, wrapValue) {
310
337
  const arrayProto = Array.prototype;
311
338
  function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
312
339
  const arr = shallowReadArray(self2);
313
- const needsWrap = arr !== self2 && !isShallow(self2);
340
+ const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
314
341
  const methodFn = arr[method];
315
342
  if (methodFn !== arrayProto[method]) {
316
343
  const result2 = methodFn.apply(self2, args);
@@ -320,7 +347,7 @@ function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
320
347
  if (arr !== self2) {
321
348
  if (needsWrap) {
322
349
  wrappedFn = function(item, index2) {
323
- return fn.call(this, toReactive(item), index2, self2);
350
+ return fn.call(this, toWrapped(self2, item), index2, self2);
324
351
  };
325
352
  } else if (fn.length > 2) {
326
353
  wrappedFn = function(item, index2) {
@@ -333,11 +360,18 @@ function apply(self2, method, fn, thisArg, wrappedRetFn, args) {
333
360
  }
334
361
  function reduce(self2, method, fn, args) {
335
362
  const arr = shallowReadArray(self2);
363
+ const needsWrap = arr !== self2 && !/* @__PURE__ */ isShallow(self2);
336
364
  let wrappedFn = fn;
365
+ let wrapInitialAccumulator = false;
337
366
  if (arr !== self2) {
338
- if (!isShallow(self2)) {
367
+ if (needsWrap) {
368
+ wrapInitialAccumulator = args.length === 0;
339
369
  wrappedFn = function(acc, item, index2) {
340
- return fn.call(this, acc, toReactive(item), index2, self2);
370
+ if (wrapInitialAccumulator) {
371
+ wrapInitialAccumulator = false;
372
+ acc = toWrapped(self2, acc);
373
+ }
374
+ return fn.call(this, acc, toWrapped(self2, item), index2, self2);
341
375
  };
342
376
  } else if (fn.length > 3) {
343
377
  wrappedFn = function(acc, item, index2) {
@@ -345,14 +379,15 @@ function reduce(self2, method, fn, args) {
345
379
  };
346
380
  }
347
381
  }
348
- return arr[method](wrappedFn, ...args);
382
+ const result = arr[method](wrappedFn, ...args);
383
+ return wrapInitialAccumulator ? toWrapped(self2, result) : result;
349
384
  }
350
385
  function searchProxy(self2, method, args) {
351
- const arr = toRaw(self2);
386
+ const arr = /* @__PURE__ */ toRaw(self2);
352
387
  track(arr, "iterate", ARRAY_ITERATE_KEY);
353
388
  const res = arr[method](...args);
354
- if ((res === -1 || res === false) && isProxy(args[0])) {
355
- args[0] = toRaw(args[0]);
389
+ if ((res === -1 || res === false) && /* @__PURE__ */ isProxy(args[0])) {
390
+ args[0] = /* @__PURE__ */ toRaw(args[0]);
356
391
  return arr[method](...args);
357
392
  }
358
393
  return res;
@@ -360,7 +395,7 @@ function searchProxy(self2, method, args) {
360
395
  function noTracking(self2, method, args = []) {
361
396
  pauseTracking();
362
397
  startBatch();
363
- const res = toRaw(self2)[method].apply(self2, args);
398
+ const res = (/* @__PURE__ */ toRaw(self2))[method].apply(self2, args);
364
399
  endBatch();
365
400
  resetTracking();
366
401
  return res;
@@ -371,7 +406,7 @@ const builtInSymbols = new Set(
371
406
  );
372
407
  function hasOwnProperty$1(key) {
373
408
  if (!isSymbol(key)) key = String(key);
374
- const obj = toRaw(this);
409
+ const obj = /* @__PURE__ */ toRaw(this);
375
410
  track(obj, "has", key);
376
411
  return obj.hasOwnProperty(key);
377
412
  }
@@ -413,7 +448,7 @@ class BaseReactiveHandler {
413
448
  // if this is a proxy wrapping a ref, return methods using the raw ref
414
449
  // as receiver so that we don't have to call `toRaw` on the ref in all
415
450
  // its class methods
416
- isRef(target) ? target : receiver
451
+ /* @__PURE__ */ isRef(target) ? target : receiver
417
452
  );
418
453
  if (isSymbol(key) ? builtInSymbols.has(key) : isNonTrackableKeys(key)) {
419
454
  return res;
@@ -424,12 +459,12 @@ class BaseReactiveHandler {
424
459
  if (isShallow2) {
425
460
  return res;
426
461
  }
427
- if (isRef(res)) {
462
+ if (/* @__PURE__ */ isRef(res)) {
428
463
  const value = targetIsArray && isIntegerKey(key) ? res : res.value;
429
- return isReadonly2 && isObject$2(value) ? readonly(value) : value;
464
+ return isReadonly2 && isObject$2(value) ? /* @__PURE__ */ readonly(value) : value;
430
465
  }
431
466
  if (isObject$2(res)) {
432
- return isReadonly2 ? readonly(res) : reactive(res);
467
+ return isReadonly2 ? /* @__PURE__ */ readonly(res) : /* @__PURE__ */ reactive(res);
433
468
  }
434
469
  return res;
435
470
  }
@@ -440,13 +475,14 @@ class MutableReactiveHandler extends BaseReactiveHandler {
440
475
  }
441
476
  set(target, key, value, receiver) {
442
477
  let oldValue = target[key];
478
+ const isArrayWithIntegerKey = isArray$1(target) && isIntegerKey(key);
443
479
  if (!this._isShallow) {
444
- const isOldValueReadonly = isReadonly(oldValue);
445
- if (!isShallow(value) && !isReadonly(value)) {
446
- oldValue = toRaw(oldValue);
447
- value = toRaw(value);
480
+ const isOldValueReadonly = /* @__PURE__ */ isReadonly(oldValue);
481
+ if (!/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
482
+ oldValue = /* @__PURE__ */ toRaw(oldValue);
483
+ value = /* @__PURE__ */ toRaw(value);
448
484
  }
449
- if (!isArray$1(target) && isRef(oldValue) && !isRef(value)) {
485
+ if (!isArrayWithIntegerKey && /* @__PURE__ */ isRef(oldValue) && !/* @__PURE__ */ isRef(value)) {
450
486
  if (isOldValueReadonly) {
451
487
  return true;
452
488
  } else {
@@ -455,14 +491,14 @@ class MutableReactiveHandler extends BaseReactiveHandler {
455
491
  }
456
492
  }
457
493
  }
458
- const hadKey = isArray$1(target) && isIntegerKey(key) ? Number(key) < target.length : hasOwn(target, key);
494
+ const hadKey = isArrayWithIntegerKey ? Number(key) < target.length : hasOwn(target, key);
459
495
  const result = Reflect.set(
460
496
  target,
461
497
  key,
462
498
  value,
463
- isRef(target) ? target : receiver
499
+ /* @__PURE__ */ isRef(target) ? target : receiver
464
500
  );
465
- if (target === toRaw(receiver)) {
501
+ if (target === /* @__PURE__ */ toRaw(receiver) && result) {
466
502
  if (!hadKey) {
467
503
  trigger(target, "add", key, value);
468
504
  } else if (hasChanged(value, oldValue)) {
@@ -514,7 +550,7 @@ const getProto = (v) => Reflect.getPrototypeOf(v);
514
550
  function createIterableMethod(method, isReadonly2, isShallow2) {
515
551
  return function(...args) {
516
552
  const target = this["__v_raw"];
517
- const rawTarget = toRaw(target);
553
+ const rawTarget = /* @__PURE__ */ toRaw(target);
518
554
  const targetIsMap = isMap(rawTarget);
519
555
  const isPair = method === "entries" || method === Symbol.iterator && targetIsMap;
520
556
  const isKeyOnly = method === "keys" && targetIsMap;
@@ -525,20 +561,20 @@ function createIterableMethod(method, isReadonly2, isShallow2) {
525
561
  "iterate",
526
562
  isKeyOnly ? MAP_KEY_ITERATE_KEY : ITERATE_KEY
527
563
  );
528
- return {
529
- // iterator protocol
530
- next() {
531
- const { value, done } = innerIterator.next();
532
- return done ? { value, done } : {
533
- value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
534
- done
535
- };
536
- },
537
- // iterable protocol
538
- [Symbol.iterator]() {
539
- return this;
564
+ return extend$1(
565
+ // inheriting all iterator properties
566
+ Object.create(innerIterator),
567
+ {
568
+ // iterator protocol
569
+ next() {
570
+ const { value, done } = innerIterator.next();
571
+ return done ? { value, done } : {
572
+ value: isPair ? [wrap(value[0]), wrap(value[1])] : wrap(value),
573
+ done
574
+ };
575
+ }
540
576
  }
541
- };
577
+ );
542
578
  };
543
579
  }
544
580
  function createReadonlyMethod(type) {
@@ -550,8 +586,8 @@ function createInstrumentations(readonly2, shallow) {
550
586
  const instrumentations = {
551
587
  get(key) {
552
588
  const target = this["__v_raw"];
553
- const rawTarget = toRaw(target);
554
- const rawKey = toRaw(key);
589
+ const rawTarget = /* @__PURE__ */ toRaw(target);
590
+ const rawKey = /* @__PURE__ */ toRaw(key);
555
591
  if (!readonly2) {
556
592
  if (hasChanged(key, rawKey)) {
557
593
  track(rawTarget, "get", key);
@@ -570,13 +606,13 @@ function createInstrumentations(readonly2, shallow) {
570
606
  },
571
607
  get size() {
572
608
  const target = this["__v_raw"];
573
- !readonly2 && track(toRaw(target), "iterate", ITERATE_KEY);
609
+ !readonly2 && track(/* @__PURE__ */ toRaw(target), "iterate", ITERATE_KEY);
574
610
  return target.size;
575
611
  },
576
612
  has(key) {
577
613
  const target = this["__v_raw"];
578
- const rawTarget = toRaw(target);
579
- const rawKey = toRaw(key);
614
+ const rawTarget = /* @__PURE__ */ toRaw(target);
615
+ const rawKey = /* @__PURE__ */ toRaw(key);
580
616
  if (!readonly2) {
581
617
  if (hasChanged(key, rawKey)) {
582
618
  track(rawTarget, "has", key);
@@ -588,7 +624,7 @@ function createInstrumentations(readonly2, shallow) {
588
624
  forEach(callback, thisArg) {
589
625
  const observed = this;
590
626
  const target = observed["__v_raw"];
591
- const rawTarget = toRaw(target);
627
+ const rawTarget = /* @__PURE__ */ toRaw(target);
592
628
  const wrap = shallow ? toShallow : readonly2 ? toReadonly : toReactive;
593
629
  !readonly2 && track(rawTarget, "iterate", ITERATE_KEY);
594
630
  return target.forEach((value, key) => {
@@ -605,27 +641,26 @@ function createInstrumentations(readonly2, shallow) {
605
641
  clear: createReadonlyMethod("clear")
606
642
  } : {
607
643
  add(value) {
608
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
609
- value = toRaw(value);
610
- }
611
- const target = toRaw(this);
644
+ const target = /* @__PURE__ */ toRaw(this);
612
645
  const proto = getProto(target);
613
- const hadKey = proto.has.call(target, value);
646
+ const rawValue = /* @__PURE__ */ toRaw(value);
647
+ const valueToAdd = !shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value) ? rawValue : value;
648
+ const hadKey = proto.has.call(target, valueToAdd) || hasChanged(value, valueToAdd) && proto.has.call(target, value) || hasChanged(rawValue, valueToAdd) && proto.has.call(target, rawValue);
614
649
  if (!hadKey) {
615
- target.add(value);
616
- trigger(target, "add", value, value);
650
+ target.add(valueToAdd);
651
+ trigger(target, "add", valueToAdd, valueToAdd);
617
652
  }
618
653
  return this;
619
654
  },
620
655
  set(key, value) {
621
- if (!shallow && !isShallow(value) && !isReadonly(value)) {
622
- value = toRaw(value);
656
+ if (!shallow && !/* @__PURE__ */ isShallow(value) && !/* @__PURE__ */ isReadonly(value)) {
657
+ value = /* @__PURE__ */ toRaw(value);
623
658
  }
624
- const target = toRaw(this);
659
+ const target = /* @__PURE__ */ toRaw(this);
625
660
  const { has, get } = getProto(target);
626
661
  let hadKey = has.call(target, key);
627
662
  if (!hadKey) {
628
- key = toRaw(key);
663
+ key = /* @__PURE__ */ toRaw(key);
629
664
  hadKey = has.call(target, key);
630
665
  }
631
666
  const oldValue = get.call(target, key);
@@ -638,11 +673,11 @@ function createInstrumentations(readonly2, shallow) {
638
673
  return this;
639
674
  },
640
675
  delete(key) {
641
- const target = toRaw(this);
676
+ const target = /* @__PURE__ */ toRaw(this);
642
677
  const { has, get } = getProto(target);
643
678
  let hadKey = has.call(target, key);
644
679
  if (!hadKey) {
645
- key = toRaw(key);
680
+ key = /* @__PURE__ */ toRaw(key);
646
681
  hadKey = has.call(target, key);
647
682
  }
648
683
  get ? get.call(target, key) : void 0;
@@ -653,7 +688,7 @@ function createInstrumentations(readonly2, shallow) {
653
688
  return result;
654
689
  },
655
690
  clear() {
656
- const target = toRaw(this);
691
+ const target = /* @__PURE__ */ toRaw(this);
657
692
  const hadItems = target.size !== 0;
658
693
  const result = target.clear();
659
694
  if (hadItems) {
@@ -720,11 +755,9 @@ function targetTypeMap(rawType) {
720
755
  return 0;
721
756
  }
722
757
  }
723
- function getTargetType(value) {
724
- return value["__v_skip"] || !Object.isExtensible(value) ? 0 : targetTypeMap(toRawType(value));
725
- }
758
+ // @__NO_SIDE_EFFECTS__
726
759
  function reactive(target) {
727
- if (isReadonly(target)) {
760
+ if (/* @__PURE__ */ isReadonly(target)) {
728
761
  return target;
729
762
  }
730
763
  return createReactiveObject(
@@ -735,6 +768,7 @@ function reactive(target) {
735
768
  reactiveMap
736
769
  );
737
770
  }
771
+ // @__NO_SIDE_EFFECTS__
738
772
  function readonly(target) {
739
773
  return createReactiveObject(
740
774
  target,
@@ -751,14 +785,17 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
751
785
  if (target["__v_raw"] && !(isReadonly2 && target["__v_isReactive"])) {
752
786
  return target;
753
787
  }
754
- const targetType = getTargetType(target);
755
- if (targetType === 0) {
788
+ if (target["__v_skip"] || !Object.isExtensible(target)) {
756
789
  return target;
757
790
  }
758
791
  const existingProxy = proxyMap.get(target);
759
792
  if (existingProxy) {
760
793
  return existingProxy;
761
794
  }
795
+ const targetType = targetTypeMap(toRawType(target));
796
+ if (targetType === 0) {
797
+ return target;
798
+ }
762
799
  const proxy = new Proxy(
763
800
  target,
764
801
  targetType === 2 ? collectionHandlers : baseHandlers
@@ -766,21 +803,33 @@ function createReactiveObject(target, isReadonly2, baseHandlers, collectionHandl
766
803
  proxyMap.set(target, proxy);
767
804
  return proxy;
768
805
  }
806
+ // @__NO_SIDE_EFFECTS__
807
+ function isReactive(value) {
808
+ if (/* @__PURE__ */ isReadonly(value)) {
809
+ return /* @__PURE__ */ isReactive(value["__v_raw"]);
810
+ }
811
+ return !!(value && value["__v_isReactive"]);
812
+ }
813
+ // @__NO_SIDE_EFFECTS__
769
814
  function isReadonly(value) {
770
815
  return !!(value && value["__v_isReadonly"]);
771
816
  }
817
+ // @__NO_SIDE_EFFECTS__
772
818
  function isShallow(value) {
773
819
  return !!(value && value["__v_isShallow"]);
774
820
  }
821
+ // @__NO_SIDE_EFFECTS__
775
822
  function isProxy(value) {
776
823
  return value ? !!value["__v_raw"] : false;
777
824
  }
825
+ // @__NO_SIDE_EFFECTS__
778
826
  function toRaw(observed) {
779
827
  const raw = observed && observed["__v_raw"];
780
- return raw ? toRaw(raw) : observed;
828
+ return raw ? /* @__PURE__ */ toRaw(raw) : observed;
781
829
  }
782
- const toReactive = (value) => isObject$2(value) ? reactive(value) : value;
783
- const toReadonly = (value) => isObject$2(value) ? readonly(value) : value;
830
+ const toReactive = (value) => isObject$2(value) ? /* @__PURE__ */ reactive(value) : value;
831
+ const toReadonly = (value) => isObject$2(value) ? /* @__PURE__ */ readonly(value) : value;
832
+ // @__NO_SIDE_EFFECTS__
784
833
  function isRef(r) {
785
834
  return r ? r["__v_isRef"] === true : false;
786
835
  }
@@ -1309,14 +1358,14 @@ const state = (() => {
1309
1358
  },
1310
1359
  reset() {
1311
1360
  if (state2 !== null) {
1312
- state2 = reactive({ ...defaultState });
1361
+ state2 = /* @__PURE__ */ reactive({ ...defaultState });
1313
1362
  }
1314
1363
  }
1315
1364
  };
1316
1365
  return {
1317
1366
  getInstance() {
1318
1367
  if (state2 === null) {
1319
- state2 = reactive({ ...defaultState });
1368
+ state2 = /* @__PURE__ */ reactive({ ...defaultState });
1320
1369
  }
1321
1370
  return state2;
1322
1371
  }
@@ -5889,30 +5938,30 @@ function st$1() {
5889
5938
  }
5890
5939
  return h2.slice(8, -1).toLowerCase().replace(/\s/g, "");
5891
5940
  };
5892
- function t(a) {
5893
- return typeof a.constructor == "function" ? a.constructor.name : null;
5941
+ function t(g) {
5942
+ return typeof g.constructor == "function" ? g.constructor.name : null;
5894
5943
  }
5895
- function s(a) {
5896
- return Array.isArray ? Array.isArray(a) : a instanceof Array;
5944
+ function s(g) {
5945
+ return Array.isArray ? Array.isArray(g) : g instanceof Array;
5897
5946
  }
5898
- function r(a) {
5899
- return a instanceof Error || typeof a.message == "string" && a.constructor && typeof a.constructor.stackTraceLimit == "number";
5947
+ function r(g) {
5948
+ return g instanceof Error || typeof g.message == "string" && g.constructor && typeof g.constructor.stackTraceLimit == "number";
5900
5949
  }
5901
- function n(a) {
5902
- return a instanceof Date ? true : typeof a.toDateString == "function" && typeof a.getDate == "function" && typeof a.setDate == "function";
5950
+ function n(g) {
5951
+ return g instanceof Date ? true : typeof g.toDateString == "function" && typeof g.getDate == "function" && typeof g.setDate == "function";
5903
5952
  }
5904
- function u(a) {
5905
- return a instanceof RegExp ? true : typeof a.flags == "string" && typeof a.ignoreCase == "boolean" && typeof a.multiline == "boolean" && typeof a.global == "boolean";
5953
+ function u(g) {
5954
+ return g instanceof RegExp ? true : typeof g.flags == "string" && typeof g.ignoreCase == "boolean" && typeof g.multiline == "boolean" && typeof g.global == "boolean";
5906
5955
  }
5907
- function o(a, p) {
5908
- return t(a) === "GeneratorFunction";
5956
+ function o(g, p) {
5957
+ return t(g) === "GeneratorFunction";
5909
5958
  }
5910
- function l(a) {
5911
- return typeof a.throw == "function" && typeof a.return == "function" && typeof a.next == "function";
5959
+ function l(g) {
5960
+ return typeof g.throw == "function" && typeof g.return == "function" && typeof g.next == "function";
5912
5961
  }
5913
- function i(a) {
5962
+ function i(g) {
5914
5963
  try {
5915
- if (typeof a.length == "number" && typeof a.callee == "function")
5964
+ if (typeof g.length == "number" && typeof g.callee == "function")
5916
5965
  return true;
5917
5966
  } catch (p) {
5918
5967
  if (p.message.indexOf("callee") !== -1)
@@ -5920,8 +5969,8 @@ function st$1() {
5920
5969
  }
5921
5970
  return false;
5922
5971
  }
5923
- function f(a) {
5924
- return a.constructor && typeof a.constructor.isBuffer == "function" ? a.constructor.isBuffer(a) : false;
5972
+ function f(g) {
5973
+ return g.constructor && typeof g.constructor.isBuffer == "function" ? g.constructor.isBuffer(g) : false;
5925
5974
  }
5926
5975
  return x$1;
5927
5976
  }
@@ -5973,8 +6022,8 @@ function St$1() {
5973
6022
  }
5974
6023
  }
5975
6024
  function r(i) {
5976
- const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, a = new i.constructor(i.source, f);
5977
- return a.lastIndex = i.lastIndex, a;
6025
+ const f = i.flags !== void 0 ? i.flags : /\w+$/.exec(i) || void 0, g = new i.constructor(i.source, f);
6026
+ return g.lastIndex = i.lastIndex, g;
5978
6027
  }
5979
6028
  function n(i) {
5980
6029
  const f = new i.constructor(i.byteLength);
@@ -5984,8 +6033,8 @@ function St$1() {
5984
6033
  return new i.constructor(i.buffer, i.byteOffset, i.length);
5985
6034
  }
5986
6035
  function o(i) {
5987
- const f = i.length, a = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
5988
- return i.copy(a), a;
6036
+ const f = i.length, g = Buffer.allocUnsafe ? Buffer.allocUnsafe(f) : Buffer.from(f);
6037
+ return i.copy(g), g;
5989
6038
  }
5990
6039
  function l(i) {
5991
6040
  return e ? Object(e.call(i)) : {};
@@ -6174,10 +6223,10 @@ function O$1({ options: e }) {
6174
6223
  return e.apiVersion && (c = `${c}/${e.apiVersion}`), e.organizationId && (c = `${c}/organizations/${e.organizationId}`), `${c}`;
6175
6224
  }
6176
6225
  function o() {
6177
- const g = {
6178
- "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m2) => m2).join("/")}@478cde4`
6226
+ const a = {
6227
+ "REB-API-CONSUMER": `${["Rebilly", e.appName, "js-sdk"].filter((m2) => m2).join("/")}@cfea33f`
6179
6228
  };
6180
- return e.apiKey && (g["REB-APIKEY"] = e.apiKey), g;
6229
+ return e.apiKey && (a["REB-APIKEY"] = e.apiKey), a;
6181
6230
  }
6182
6231
  function l() {
6183
6232
  return Dt$1(t.defaults.headers);
@@ -6186,38 +6235,38 @@ function O$1({ options: e }) {
6186
6235
  e.requestTimeout = Number(c), t.defaults.timeout = e.requestTimeout;
6187
6236
  }
6188
6237
  function f(c = e.jwt) {
6189
- const g = l();
6190
- e.apiKey = null, e.jwt = c, delete g.common["REB-APIKEY"], g.common.Authorization = `Bearer ${c}`, t.defaults.headers = g;
6238
+ const a = l();
6239
+ e.apiKey = null, e.jwt = c, delete a.common["REB-APIKEY"], a.common.Authorization = `Bearer ${c}`, t.defaults.headers = a;
6191
6240
  }
6192
- function a(c = e.publishableKey) {
6193
- const g = l();
6194
- e.publishableKey = c, g.common.Authorization = `${c}`, t.defaults.headers = g;
6241
+ function g(c = e.publishableKey) {
6242
+ const a = l();
6243
+ e.publishableKey = c, a.common.Authorization = `${c}`, t.defaults.headers = a;
6195
6244
  }
6196
- function p({ host: c, port: g, auth: m2 }) {
6245
+ function p({ host: c, port: a, auth: m2 }) {
6197
6246
  t.defaults.proxy = {
6198
6247
  host: c,
6199
- port: g,
6248
+ port: a,
6200
6249
  auth: m2
6201
6250
  };
6202
6251
  }
6203
- function h2({ live: c = null, sandbox: g = null }) {
6204
- c && (e.apiEndpoints.live = c), g && (e.apiEndpoints.sandbox = g), t.defaults.baseURL = u();
6252
+ function h2({ live: c = null, sandbox: a = null }) {
6253
+ c && (e.apiEndpoints.live = c), a && (e.apiEndpoints.sandbox = a), t.defaults.baseURL = u();
6205
6254
  }
6206
- function K2(c, { thenDelegate: g, catchDelegate: m2 = () => {
6255
+ function K2(c, { thenDelegate: a, catchDelegate: m2 = () => {
6207
6256
  } }) {
6208
6257
  return tt$1(c) && t.interceptors[w[c]].use(
6209
- g,
6258
+ a,
6210
6259
  m2
6211
6260
  );
6212
6261
  }
6213
- function N2(c, g) {
6214
- return tt$1(c) && t.interceptors[w[c]].eject(g);
6262
+ function N2(c, a) {
6263
+ return tt$1(c) && t.interceptors[w[c]].eject(a);
6215
6264
  }
6216
- function rt2({ thenDelegate: c, catchDelegate: g = () => {
6265
+ function rt2({ thenDelegate: c, catchDelegate: a = () => {
6217
6266
  } }) {
6218
6267
  return K2(w.request, {
6219
6268
  thenDelegate: c,
6220
- catchDelegate: g
6269
+ catchDelegate: a
6221
6270
  });
6222
6271
  }
6223
6272
  function nt2(c) {
@@ -6225,18 +6274,18 @@ function O$1({ options: e }) {
6225
6274
  }
6226
6275
  function ut2({
6227
6276
  thenDelegate: c,
6228
- catchDelegate: g = () => {
6277
+ catchDelegate: a = () => {
6229
6278
  }
6230
6279
  }) {
6231
6280
  return K2(w.response, {
6232
6281
  thenDelegate: c,
6233
- catchDelegate: g
6282
+ catchDelegate: a
6234
6283
  });
6235
6284
  }
6236
6285
  function ot2(c) {
6237
6286
  N2(w.response, c);
6238
6287
  }
6239
- function v({ request: c, isCollection: g, config: m2 }) {
6288
+ function v({ request: c, isCollection: a, config: m2 }) {
6240
6289
  const $2 = z2(m2), { id: b, cancelToken: $t2 } = q$1.save();
6241
6290
  $2.cancelToken = $t2;
6242
6291
  const G2 = (async function() {
@@ -6244,7 +6293,7 @@ function O$1({ options: e }) {
6244
6293
  const T = await c($2);
6245
6294
  return lt2({
6246
6295
  response: T,
6247
- isCollection: g,
6296
+ isCollection: a,
6248
6297
  config: $2
6249
6298
  });
6250
6299
  } catch (T) {
@@ -6255,8 +6304,8 @@ function O$1({ options: e }) {
6255
6304
  })();
6256
6305
  return G2.cancel = (T) => I$1.cancelById(b, T), G2;
6257
6306
  }
6258
- function lt2({ response: c, isCollection: g, config: m2 }) {
6259
- return g ? new yt$1(c, m2) : new et$1(c, m2);
6307
+ function lt2({ response: c, isCollection: a, config: m2 }) {
6308
+ return a ? new yt$1(c, m2) : new et$1(c, m2);
6260
6309
  }
6261
6310
  function L2({ error: c }) {
6262
6311
  if (axios.isCancel(c))
@@ -6280,61 +6329,61 @@ function O$1({ options: e }) {
6280
6329
  }
6281
6330
  function ct2(c) {
6282
6331
  return c.params !== void 0 && (c.params = Object.keys(c.params).filter(
6283
- (g) => {
6332
+ (a) => {
6284
6333
  var m2;
6285
- return c.params[g] !== null && c.params[g] !== "" && !(g === "sort" && ((m2 = c.params[g]) == null ? void 0 : m2.length) === 0);
6334
+ return c.params[a] !== null && c.params[a] !== "" && !(a === "sort" && ((m2 = c.params[a]) == null ? void 0 : m2.length) === 0);
6286
6335
  }
6287
- ).reduce((g, m2) => {
6336
+ ).reduce((a, m2) => {
6288
6337
  const $2 = c.params[m2];
6289
- return g[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, g;
6338
+ return a[m2] = m2 === "sort" && Array.isArray($2) ? $2.join(",") : $2, a;
6290
6339
  }, {})), c;
6291
6340
  }
6292
6341
  function z2(c = {}) {
6293
6342
  return { ...ct2(c) };
6294
6343
  }
6295
- function U2(c, g = {}) {
6344
+ function U2(c, a = {}) {
6296
6345
  return v({
6297
6346
  request: (m2) => t.get(c, m2),
6298
- config: { params: g }
6347
+ config: { params: a }
6299
6348
  });
6300
6349
  }
6301
- function it2(c, g) {
6350
+ function it2(c, a) {
6302
6351
  return v({
6303
6352
  request: (m2) => t.get(c, m2),
6304
- config: { params: g },
6353
+ config: { params: a },
6305
6354
  isCollection: true
6306
6355
  });
6307
6356
  }
6308
- function V2(c, g, m2 = {}) {
6357
+ function V2(c, a, m2 = {}) {
6309
6358
  let $2 = {};
6310
6359
  return m2.authenticate === false && ($2 = { headers: l() }, delete $2.headers.common["REB-APIKEY"], delete $2.headers.common.Authorization), m2.params && ($2.params = { ...m2.params }), v({
6311
- request: (b) => t.post(c, g, b),
6360
+ request: (b) => t.post(c, a, b),
6312
6361
  config: $2
6313
6362
  });
6314
6363
  }
6315
- function J2(c, g, m2 = {}) {
6364
+ function J2(c, a, m2 = {}) {
6316
6365
  return v({
6317
- request: ($2) => t.put(c, g, $2),
6366
+ request: ($2) => t.put(c, a, $2),
6318
6367
  config: { params: m2 }
6319
6368
  });
6320
6369
  }
6321
- function gt2(c, g) {
6370
+ function at2(c, a) {
6322
6371
  return v({
6323
- request: (m2) => t.patch(c, g, m2),
6372
+ request: (m2) => t.patch(c, a, m2),
6324
6373
  config: {}
6325
6374
  });
6326
6375
  }
6327
- function W2(c, g = null) {
6376
+ function W2(c, a = null) {
6328
6377
  return v({
6329
6378
  request: (m2) => t.delete(c, m2),
6330
- config: g != null ? { data: g } : {}
6379
+ config: a != null ? { data: a } : {}
6331
6380
  });
6332
6381
  }
6333
- function at2(c, g) {
6334
- return W2(c, g);
6382
+ function gt2(c, a) {
6383
+ return W2(c, a);
6335
6384
  }
6336
- async function mt2(c, g, m2, $2 = {}) {
6337
- if (g === "")
6385
+ async function mt2(c, a, m2, $2 = {}) {
6386
+ if (a === "")
6338
6387
  return V2(c, m2, { params: $2 });
6339
6388
  try {
6340
6389
  if ((await U2(c)).response.status === 200)
@@ -6347,8 +6396,8 @@ function O$1({ options: e }) {
6347
6396
  throw b;
6348
6397
  }
6349
6398
  }
6350
- async function ft2(c, g) {
6351
- const m2 = z2(g);
6399
+ async function ft2(c, a) {
6400
+ const m2 = z2(a);
6352
6401
  try {
6353
6402
  const $2 = await t.get(c, m2);
6354
6403
  return new At$1($2, m2);
@@ -6365,15 +6414,15 @@ function O$1({ options: e }) {
6365
6414
  setTimeout: i,
6366
6415
  setProxyAgent: p,
6367
6416
  setSessionToken: f,
6368
- setPublishableKey: a,
6417
+ setPublishableKey: g,
6369
6418
  setEndpoints: h2,
6370
6419
  get: U2,
6371
6420
  getAll: it2,
6372
6421
  post: V2,
6373
6422
  put: J2,
6374
- patch: gt2,
6423
+ patch: at2,
6375
6424
  delete: W2,
6376
- deleteAll: at2,
6425
+ deleteAll: gt2,
6377
6426
  create: mt2,
6378
6427
  download: ft2
6379
6428
  };
@@ -7405,7 +7454,7 @@ function ie$1({ apiHandler: e }) {
7405
7454
  }
7406
7455
  };
7407
7456
  }
7408
- function ge({ apiHandler: e }) {
7457
+ function ae$1({ apiHandler: e }) {
7409
7458
  return {
7410
7459
  /**
7411
7460
  * @param { rebilly.GetEmailNotificationCollectionRequest } request
@@ -7417,7 +7466,7 @@ function ge({ apiHandler: e }) {
7417
7466
  }
7418
7467
  };
7419
7468
  }
7420
- function ae$1({ apiHandler: e }) {
7469
+ function ge({ apiHandler: e }) {
7421
7470
  return {
7422
7471
  /**
7423
7472
  * @param { rebilly.GetEventCollectionRequest } request
@@ -7722,7 +7771,7 @@ function pe$1({ apiHandler: e }) {
7722
7771
  const o = this.getAllAttachments(s);
7723
7772
  r.push(o);
7724
7773
  const i = (await o).items.map(
7725
- (a) => this.detach({ id: a.fields.id })
7774
+ (g) => this.detach({ id: g.fields.id })
7726
7775
  );
7727
7776
  r = [...r, i], await Promise.all(i);
7728
7777
  const f = e.delete(`files/${t}`);
@@ -9792,7 +9841,7 @@ function is({ apiHandler: e }) {
9792
9841
  }
9793
9842
  };
9794
9843
  }
9795
- function gs({ apiHandler: e }) {
9844
+ function as({ apiHandler: e }) {
9796
9845
  return {
9797
9846
  /**
9798
9847
  * @param { rebilly.GetUsageCollectionRequest } request
@@ -9822,7 +9871,7 @@ function gs({ apiHandler: e }) {
9822
9871
  }
9823
9872
  };
9824
9873
  }
9825
- function as({ apiHandler: e }) {
9874
+ function gs({ apiHandler: e }) {
9826
9875
  return {
9827
9876
  /**
9828
9877
  * @param { rebilly.GetUserCollectionRequest } request
@@ -9945,7 +9994,7 @@ class $s {
9945
9994
  apiHandler: t
9946
9995
  }), this.account = Bt$1({ apiHandler: t }), this.allowlists = Kt$1({ apiHandler: t }), this.amlChecks = Nt$1({ apiHandler: t }), this.amlSettings = Lt$1({ apiHandler: t }), this.apiKeys = zt$1({ apiHandler: t }), this.applicationInstances = Ut$1({ apiHandler: t }), this.applications = Vt$1({ apiHandler: t }), this.balanceTransactions = Jt$1({ apiHandler: t }), this.billingPortals = Wt$1({ apiHandler: t }), this.blocklists = Gt$1({ apiHandler: t }), this.broadcastMessages = Yt$1({ apiHandler: t }), this.cashiers = Qt$1({ apiHandler: t }), this.checkoutForms = Xt$1({ apiHandler: t }), this.coupons = Zt$1({ apiHandler: t }), this.creditMemos = _t$1({ apiHandler: t }), this.customDomains = Ht$1({ apiHandler: t }), this.customFields = te$1({ apiHandler: t }), this.customerAuthentication = ee$1({ apiHandler: t }), this.customers = se$1({ apiHandler: t }), this.depositCustomPropertySets = re$1({
9947
9996
  apiHandler: t
9948
- }), this.depositRequests = ne$1({ apiHandler: t }), this.depositStrategies = ue$1({ apiHandler: t }), this.digitalWallets = oe$1({ apiHandler: t }), this.disputes = le$1({ apiHandler: t }), this.emailDeliverySettings = ce$1({ apiHandler: t }), this.emailMessages = ie$1({ apiHandler: t }), this.emailNotifications = ge({ apiHandler: t }), this.events = ae$1({ apiHandler: t }), this.externalIdentifiers = me$1({ apiHandler: t }), this.externalServicesSettings = fe$1({
9997
+ }), this.depositRequests = ne$1({ apiHandler: t }), this.depositStrategies = ue$1({ apiHandler: t }), this.digitalWallets = oe$1({ apiHandler: t }), this.disputes = le$1({ apiHandler: t }), this.emailDeliverySettings = ce$1({ apiHandler: t }), this.emailMessages = ie$1({ apiHandler: t }), this.emailNotifications = ae$1({ apiHandler: t }), this.events = ge({ apiHandler: t }), this.externalIdentifiers = me$1({ apiHandler: t }), this.externalServicesSettings = fe$1({
9949
9998
  apiHandler: t
9950
9999
  }), this.fees = $e$1({ apiHandler: t }), this.files = pe$1({ apiHandler: t }), this.gatewayAccounts = he$1({ apiHandler: t }), this.integrations = ye$1({ apiHandler: t }), this.invoices = Ae$1({ apiHandler: t }), this.journalAccounts = be({ apiHandler: t }), this.journalEntries = Re$1({ apiHandler: t }), this.journalRecords = we$1({ apiHandler: t }), this.kycDocuments = ke$1({ apiHandler: t }), this.kycRequests = ve$1({ apiHandler: t }), this.kycSettings = qe$1({ apiHandler: t }), this.lists = Te$1({ apiHandler: t }), this.memberships = de$1({ apiHandler: t }), this.orderCancellations = Ie$1({ apiHandler: t }), this.orderPauses = Se$1({ apiHandler: t }), this.orderReactivations = Ee$1({ apiHandler: t }), this.orders = xe$1({ apiHandler: t }), this.organizationExports = Pe$1({ apiHandler: t }), this.organizations = Ce$1({ apiHandler: t }), this.paymentCardsBankNames = De$1({ apiHandler: t }), this.paymentInstruments = je$1({ apiHandler: t }), this.paymentMethods = Me$1({ apiHandler: t }), this.paymentTokens = Oe$1({ apiHandler: t }), this.payoutRequestAllocations = Fe$1({
9951
10000
  apiHandler: t
@@ -9953,7 +10002,7 @@ class $s {
9953
10002
  apiHandler: t
9954
10003
  }), this.subscriptionPauses = rs({ apiHandler: t }), this.subscriptionReactivations = ns({
9955
10004
  apiHandler: t
9956
- }), this.subscriptions = us({ apiHandler: t }), this.tags = os({ apiHandler: t }), this.tagsRules = ls({ apiHandler: t }), this.tracking = cs({ apiHandler: t }), this.transactions = is({ apiHandler: t }), this.usages = gs({ apiHandler: t }), this.users = as({ apiHandler: t }), this.webhooks = ms({ apiHandler: t }), this.websites = fs({ apiHandler: t }), this.addRequestInterceptor = t.addRequestInterceptor, this.removeRequestInterceptor = t.removeRequestInterceptor, this.addResponseInterceptor = t.addResponseInterceptor, this.removeResponseInterceptor = t.removeResponseInterceptor, this.setTimeout = t.setTimeout, this.setProxyAgent = t.setProxyAgent, this.setSessionToken = t.setSessionToken, this.setPublishableKey = t.setPublishableKey, this.setEndpoints = t.setEndpoints, this.getCancellationToken = t.getCancellationToken, this.generateSignature = t.generateSignature;
10005
+ }), this.subscriptions = us({ apiHandler: t }), this.tags = os({ apiHandler: t }), this.tagsRules = ls({ apiHandler: t }), this.tracking = cs({ apiHandler: t }), this.transactions = is({ apiHandler: t }), this.usages = as({ apiHandler: t }), this.users = gs({ apiHandler: t }), this.webhooks = ms({ apiHandler: t }), this.websites = fs({ apiHandler: t }), this.addRequestInterceptor = t.addRequestInterceptor, this.removeRequestInterceptor = t.removeRequestInterceptor, this.addResponseInterceptor = t.addResponseInterceptor, this.removeResponseInterceptor = t.removeResponseInterceptor, this.setTimeout = t.setTimeout, this.setProxyAgent = t.setProxyAgent, this.setSessionToken = t.setSessionToken, this.setPublishableKey = t.setPublishableKey, this.setEndpoints = t.setEndpoints, this.getCancellationToken = t.getCancellationToken, this.generateSignature = t.generateSignature;
9957
10006
  }
9958
10007
  }
9959
10008
  function ps({ apiHandler: e }) {
@@ -10360,7 +10409,7 @@ function As({ apiHandler: e }) {
10360
10409
  filter: i = null,
10361
10410
  criteria: f = null
10362
10411
  }) {
10363
- const a = {
10412
+ const g = {
10364
10413
  aggregationField: t,
10365
10414
  aggregationPeriod: s,
10366
10415
  includeSwitchedSubscriptions: r,
@@ -10371,7 +10420,7 @@ function As({ apiHandler: e }) {
10371
10420
  filter: i,
10372
10421
  criteria: f
10373
10422
  };
10374
- return e.get("reports/retention-percentage", a);
10423
+ return e.get("reports/retention-percentage", g);
10375
10424
  },
10376
10425
  /**
10377
10426
  * @returns { rebilly.GetRetentionValueReportResponsePromise } response
@@ -10386,7 +10435,7 @@ function As({ apiHandler: e }) {
10386
10435
  limit: l = null,
10387
10436
  offset: i = null,
10388
10437
  filter: f = null,
10389
- sort: a = null,
10438
+ sort: g = null,
10390
10439
  criteria: p = null
10391
10440
  }) {
10392
10441
  const h2 = {
@@ -10399,7 +10448,7 @@ function As({ apiHandler: e }) {
10399
10448
  limit: l,
10400
10449
  offset: i,
10401
10450
  filter: f,
10402
- sort: a,
10451
+ sort: g,
10403
10452
  criteria: p
10404
10453
  };
10405
10454
  return e.get("reports/retention-value", h2);
@@ -11264,7 +11313,7 @@ function mapItemsQuantities(items) {
11264
11313
  function createQuantitiesMap(items) {
11265
11314
  return items.reduce((map, item) => {
11266
11315
  if (!item.planId || !item.quantity) return map;
11267
- map.set(item.planId, toRaw(item.quantity));
11316
+ map.set(item.planId, /* @__PURE__ */ toRaw(item.quantity));
11268
11317
  return map;
11269
11318
  }, /* @__PURE__ */ new Map());
11270
11319
  }