@everymatrix/loyalty-shop 0.2.9 → 0.2.11
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/components/{LoyaltyPagination-Cw2snZwZ.js → LoyaltyPagination-BNBJcXKk.js} +1993 -2000
- package/components/{LoyaltyPagination-CyjgdUPo.js → LoyaltyPagination-BP3AxeDj.js} +465 -470
- package/components/LoyaltyPagination-BpErkHgK.cjs +14 -0
- package/components/LoyaltyPagination-CnoIs1uw.cjs +14 -0
- package/components/{LoyaltyPointsCard-njx77PMq.cjs → LoyaltyPointsCard-C16D2R5K.cjs} +1 -1
- package/components/{LoyaltyPointsCard-Xb627em8.cjs → LoyaltyPointsCard-C5qTjR-v.cjs} +1 -1
- package/components/{LoyaltyPointsCard-CFk3DpjI.js → LoyaltyPointsCard-DmE0ayL6.js} +1 -1
- package/components/{LoyaltyPointsCard-DTOQlcMH.js → LoyaltyPointsCard-Dz8Tgtc6.js} +1 -1
- package/components/{LoyaltyShop-BKubFlFr.js → LoyaltyShop-BR3Bcw_U.js} +7 -7
- package/components/{LoyaltyShop-D_Oyu_cp.cjs → LoyaltyShop-Bvon_isa.cjs} +5 -5
- package/components/{LoyaltyShop-8d3N_F-0.cjs → LoyaltyShop-C4Jmxgps.cjs} +5 -5
- package/components/{LoyaltyShop-Dfybp9ut.js → LoyaltyShop-FyZaT4Go.js} +7 -7
- package/components/{LoyaltyShopItem-DEz9OVzD.cjs → LoyaltyShopItem-C8gpofzS.cjs} +1 -1
- package/components/{LoyaltyShopItem-BXrrNl9f.js → LoyaltyShopItem-D_INMfUe.js} +3 -3
- package/components/{LoyaltyShopItem-CqY63kaT.js → LoyaltyShopItem-DkUT2Hhc.js} +3 -3
- package/components/{LoyaltyShopItem-CGOptttz.cjs → LoyaltyShopItem-Dy7fBUI9.cjs} +1 -1
- package/es2015/loyalty-shop.cjs +1 -1
- package/es2015/loyalty-shop.js +2 -2
- package/esnext/loyalty-shop.cjs +1 -1
- package/esnext/loyalty-shop.js +2 -2
- package/package.json +1 -1
- package/components/LoyaltyPagination-B7JqsoUi.cjs +0 -14
- package/components/LoyaltyPagination-BRav_RW5.cjs +0 -14
|
@@ -19,7 +19,7 @@ function fi() {
|
|
|
19
19
|
});
|
|
20
20
|
return { promise: r, resolve: e, reject: t };
|
|
21
21
|
}
|
|
22
|
-
const ee = 2, vt = 4, Vt = 8, hi = 1 << 24, be = 16, we = 32, Ce = 64, Ur = 128, ln = 256, xe = 512, Q = 1024,
|
|
22
|
+
const ee = 2, vt = 4, Vt = 8, hi = 1 << 24, be = 16, we = 32, Ce = 64, Ur = 128, ln = 256, xe = 512, Q = 1024, F = 2048, ce = 4096, se = 8192, K = 16384, nt = 32768, Ft = 1 << 25, _t = 65536, nr = 1 << 17, ks = 1 << 18, it = 1 << 19, ci = 1 << 20, Me = 1 << 25, ir = 1 << 21, ht = 1 << 22, Ve = 1 << 23, Jt = Symbol("$state"), di = Symbol("component"), js = Symbol("legacy props"), Vs = Symbol(""), pi = Symbol("attributes"), Fr = Symbol("class"), Xs = Symbol("style"), Gr = Symbol("text"), Xt = new class extends Error {
|
|
23
23
|
name = "StaleReactionError";
|
|
24
24
|
message = "The reaction that called `getAbortSignal()` was re-run or destroyed";
|
|
25
25
|
}(), Ws = (
|
|
@@ -147,7 +147,7 @@ function hn(e, t = !1, r) {
|
|
|
147
147
|
x: null,
|
|
148
148
|
r: (
|
|
149
149
|
/** @type {Effect} */
|
|
150
|
-
|
|
150
|
+
O
|
|
151
151
|
),
|
|
152
152
|
l: null
|
|
153
153
|
};
|
|
@@ -189,17 +189,17 @@ function ua() {
|
|
|
189
189
|
bi();
|
|
190
190
|
}
|
|
191
191
|
const la = -7169;
|
|
192
|
-
function
|
|
192
|
+
function z(e, t) {
|
|
193
193
|
e.f = e.f & la | t;
|
|
194
194
|
}
|
|
195
195
|
function pn(e) {
|
|
196
|
-
e.f & xe || e.deps === null ?
|
|
196
|
+
e.f & xe || e.deps === null ? z(e, Q) : z(e, ce);
|
|
197
197
|
}
|
|
198
|
-
function yi(e, t
|
|
199
|
-
e.f &
|
|
198
|
+
function yi(e, t) {
|
|
199
|
+
e.f & F ? t.set(e, F) : e.f & ce && t.get(e) !== F && t.set(e, ce), z(e, Q);
|
|
200
200
|
}
|
|
201
201
|
function mr(e) {
|
|
202
|
-
var t =
|
|
202
|
+
var t = M, r = O;
|
|
203
203
|
ge(null), Pe(null);
|
|
204
204
|
try {
|
|
205
205
|
return e();
|
|
@@ -216,7 +216,7 @@ function fa(e, t, r, n) {
|
|
|
216
216
|
}
|
|
217
217
|
var o = (
|
|
218
218
|
/** @type {Effect} */
|
|
219
|
-
|
|
219
|
+
O
|
|
220
220
|
), u = ha(), l = s.length === 1 ? s[0].promise : s.length > 1 ? Promise.all(s.map((d) => d.promise)) : null;
|
|
221
221
|
function f(d) {
|
|
222
222
|
if (!(o.f & K)) {
|
|
@@ -248,8 +248,8 @@ function fa(e, t, r, n) {
|
|
|
248
248
|
function ha() {
|
|
249
249
|
var e = (
|
|
250
250
|
/** @type {Effect} */
|
|
251
|
-
|
|
252
|
-
), t =
|
|
251
|
+
O
|
|
252
|
+
), t = M, r = ae, n = (
|
|
253
253
|
/** @type {Batch} */
|
|
254
254
|
I
|
|
255
255
|
);
|
|
@@ -263,7 +263,7 @@ function ar(e = !0) {
|
|
|
263
263
|
function Ei() {
|
|
264
264
|
var e = (
|
|
265
265
|
/** @type {Effect} */
|
|
266
|
-
|
|
266
|
+
O
|
|
267
267
|
), t = e.b, r = (
|
|
268
268
|
/** @type {Batch} */
|
|
269
269
|
I
|
|
@@ -274,8 +274,8 @@ function Ei() {
|
|
|
274
274
|
}
|
|
275
275
|
// @__NO_SIDE_EFFECTS__
|
|
276
276
|
function gr(e) {
|
|
277
|
-
var t = ee |
|
|
278
|
-
return
|
|
277
|
+
var t = ee | F;
|
|
278
|
+
return O !== null && (O.f |= it), {
|
|
279
279
|
ctx: ae,
|
|
280
280
|
deps: null,
|
|
281
281
|
effects: null,
|
|
@@ -289,7 +289,7 @@ function gr(e) {
|
|
|
289
289
|
J
|
|
290
290
|
),
|
|
291
291
|
wv: 0,
|
|
292
|
-
parent:
|
|
292
|
+
parent: O,
|
|
293
293
|
ac: null
|
|
294
294
|
};
|
|
295
295
|
}
|
|
@@ -298,7 +298,7 @@ const Pt = Symbol("obsolete");
|
|
|
298
298
|
function ca(e, t, r) {
|
|
299
299
|
let n = (
|
|
300
300
|
/** @type {Effect | null} */
|
|
301
|
-
|
|
301
|
+
O
|
|
302
302
|
);
|
|
303
303
|
n === null && qs();
|
|
304
304
|
var i = (
|
|
@@ -308,11 +308,11 @@ function ca(e, t, r) {
|
|
|
308
308
|
), s = rt(
|
|
309
309
|
/** @type {V} */
|
|
310
310
|
J
|
|
311
|
-
), a = !
|
|
311
|
+
), a = !M, o = /* @__PURE__ */ new Set();
|
|
312
312
|
return Ta(() => {
|
|
313
313
|
var u = (
|
|
314
314
|
/** @type {Effect} */
|
|
315
|
-
|
|
315
|
+
O
|
|
316
316
|
), l = fi();
|
|
317
317
|
i = l.promise;
|
|
318
318
|
try {
|
|
@@ -378,7 +378,7 @@ function pa(e) {
|
|
|
378
378
|
}
|
|
379
379
|
}
|
|
380
380
|
function vn(e) {
|
|
381
|
-
var t, r =
|
|
381
|
+
var t, r = O, n = e.parent;
|
|
382
382
|
if (!De && n !== null && e.v !== J && // if it was never evaluated before, it's guaranteed to fail downstream, so we try to execute instead
|
|
383
383
|
n.f & (K | se))
|
|
384
384
|
return Ys(), e.v;
|
|
@@ -393,7 +393,7 @@ function vn(e) {
|
|
|
393
393
|
function xi(e) {
|
|
394
394
|
var t = vn(e);
|
|
395
395
|
if (!e.equals(t) && (e.wv = Vi(), (!I?.is_fork || e.deps === null) && (I !== null ? (I.capture(e, t, !0), ct?.capture(e, t, !0)) : e.v = t, e.deps === null))) {
|
|
396
|
-
|
|
396
|
+
z(e, Q);
|
|
397
397
|
return;
|
|
398
398
|
}
|
|
399
399
|
De || (ye !== null ? (En() || I?.is_fork) && ye.set(e, t) : pn(e));
|
|
@@ -416,24 +416,24 @@ let _a = 1;
|
|
|
416
416
|
class Re {
|
|
417
417
|
id = _a++;
|
|
418
418
|
/** True as soon as `#process` was called */
|
|
419
|
-
|
|
419
|
+
started = !1;
|
|
420
420
|
linked = !0;
|
|
421
421
|
/** @type {Batch | null} */
|
|
422
|
-
|
|
422
|
+
prev = null;
|
|
423
423
|
/** @type {Batch | null} */
|
|
424
|
-
|
|
424
|
+
next = null;
|
|
425
425
|
/** @type {Map<Effect, ReturnType<typeof deferred<any>>>} */
|
|
426
426
|
async_deriveds = /* @__PURE__ */ new Map();
|
|
427
427
|
/**
|
|
428
428
|
* The current values of any signals that are updated in this batch.
|
|
429
429
|
* Tuple format: [value, is_derived] (note: is_derived is false for deriveds, too, if they were overridden via assignment)
|
|
430
|
-
*
|
|
430
|
+
* The keys of this map are identical to `this.previous`
|
|
431
431
|
* @type {Map<Value, [any, boolean]>}
|
|
432
432
|
*/
|
|
433
433
|
current = /* @__PURE__ */ new Map();
|
|
434
434
|
/**
|
|
435
435
|
* The values of any signals (sources and deriveds) that are updated in this batch _before_ those updates took place.
|
|
436
|
-
*
|
|
436
|
+
* The keys of this map are identical to `this.current`
|
|
437
437
|
* @type {Map<Value, any>}
|
|
438
438
|
*/
|
|
439
439
|
previous = /* @__PURE__ */ new Map();
|
|
@@ -442,27 +442,27 @@ class Re {
|
|
|
442
442
|
* and append new ones by calling the functions added inside (if/each/key/etc) blocks
|
|
443
443
|
* @type {Set<(batch: Batch) => void>}
|
|
444
444
|
*/
|
|
445
|
-
#
|
|
445
|
+
#e = /* @__PURE__ */ new Set();
|
|
446
446
|
/**
|
|
447
447
|
* If a fork is discarded, we need to destroy any effects that are no longer needed
|
|
448
448
|
* @type {Set<(batch: Batch) => void>}
|
|
449
449
|
*/
|
|
450
|
-
#
|
|
450
|
+
#t = /* @__PURE__ */ new Set();
|
|
451
451
|
/**
|
|
452
452
|
* The number of async effects that are currently in flight
|
|
453
453
|
*/
|
|
454
|
-
#
|
|
454
|
+
#r = 0;
|
|
455
455
|
/**
|
|
456
456
|
* Async effects that are currently in flight, _not_ inside a pending boundary
|
|
457
457
|
* @type {Map<Effect, number>}
|
|
458
458
|
*/
|
|
459
|
-
#
|
|
459
|
+
#o = /* @__PURE__ */ new Map();
|
|
460
460
|
/**
|
|
461
461
|
* A deferred that resolves when the batch is committed, used with `settled()`
|
|
462
462
|
* TODO replace with Promise.withResolvers once supported widely enough
|
|
463
463
|
* @type {{ promise: Promise<void>, resolve: (value?: any) => void, reject: (reason: unknown) => void } | null}
|
|
464
464
|
*/
|
|
465
|
-
#
|
|
465
|
+
#n = null;
|
|
466
466
|
/**
|
|
467
467
|
* Effects that were scheduled in this batch but not yet 'resolved' into the
|
|
468
468
|
* root effects that need to be flushed. Resolving — the upwards traversal that
|
|
@@ -474,22 +474,17 @@ class Re {
|
|
|
474
474
|
* May contain duplicates — deduplication happens during resolving
|
|
475
475
|
* @type {Effect[]}
|
|
476
476
|
*/
|
|
477
|
-
#
|
|
477
|
+
#i = [];
|
|
478
478
|
/**
|
|
479
479
|
* Effects created while this batch was active.
|
|
480
480
|
* @type {Effect[]}
|
|
481
481
|
*/
|
|
482
|
-
#
|
|
483
|
-
/**
|
|
484
|
-
* Deferred effects (which run after async work has completed) that are DIRTY
|
|
485
|
-
* @type {Set<Effect>}
|
|
486
|
-
*/
|
|
487
|
-
#l = /* @__PURE__ */ new Set();
|
|
482
|
+
#a = [];
|
|
488
483
|
/**
|
|
489
|
-
* Deferred effects
|
|
490
|
-
* @type {
|
|
484
|
+
* Deferred effects (which run after async work has completed) and their status (DIRTY or MAYBE_DIRTY)
|
|
485
|
+
* @type {Map<Effect, number>}
|
|
491
486
|
*/
|
|
492
|
-
#
|
|
487
|
+
#s = /* @__PURE__ */ new Map();
|
|
493
488
|
/**
|
|
494
489
|
* A map of branches that still exist, but will be destroyed when this batch
|
|
495
490
|
* is committed — we skip over these during `process`.
|
|
@@ -497,30 +492,34 @@ class Re {
|
|
|
497
492
|
* so they can be rescheduled if the branch survives.
|
|
498
493
|
* @type {Map<Effect, { d: Effect[], m: Effect[] }>}
|
|
499
494
|
*/
|
|
500
|
-
#
|
|
495
|
+
#u = /* @__PURE__ */ new Map();
|
|
501
496
|
/**
|
|
502
497
|
* Inverse of #skipped_branches which we need to tell prior batches to unskip them when committing
|
|
503
498
|
* @type {Set<Effect>}
|
|
504
499
|
*/
|
|
505
|
-
#
|
|
500
|
+
#d = /* @__PURE__ */ new Set();
|
|
506
501
|
is_fork = !1;
|
|
507
|
-
#
|
|
502
|
+
#l = !1;
|
|
508
503
|
constructor() {
|
|
509
|
-
ot === null ? Sr = ot = this : (ot
|
|
504
|
+
ot === null ? Sr = ot = this : (ot.next = this, this.prev = ot), ot = this;
|
|
510
505
|
}
|
|
511
|
-
#
|
|
506
|
+
#v() {
|
|
512
507
|
if (this.is_fork) return !0;
|
|
513
|
-
for (const
|
|
514
|
-
|
|
515
|
-
if (this.#c.has(t)) {
|
|
516
|
-
r = !0;
|
|
517
|
-
break;
|
|
518
|
-
}
|
|
519
|
-
t = t.parent;
|
|
520
|
-
}
|
|
521
|
-
if (!r)
|
|
508
|
+
for (const t of this.#o.keys())
|
|
509
|
+
if (!this.#m(t))
|
|
522
510
|
return !0;
|
|
523
|
-
|
|
511
|
+
return !1;
|
|
512
|
+
}
|
|
513
|
+
/**
|
|
514
|
+
* Whether `effect` is inside a branch that this batch skips
|
|
515
|
+
* @param {Effect} effect
|
|
516
|
+
*/
|
|
517
|
+
#m(t) {
|
|
518
|
+
for (var r = (
|
|
519
|
+
/** @type {Effect | null} */
|
|
520
|
+
t
|
|
521
|
+
); r !== null; r = r.parent)
|
|
522
|
+
if (this.#u.has(r)) return !0;
|
|
524
523
|
return !1;
|
|
525
524
|
}
|
|
526
525
|
/**
|
|
@@ -528,7 +527,7 @@ class Re {
|
|
|
528
527
|
* @param {Effect} effect
|
|
529
528
|
*/
|
|
530
529
|
skip_effect(t) {
|
|
531
|
-
this.#
|
|
530
|
+
this.#u.has(t) || this.#u.set(t, { d: [], m: [] }), this.#d.delete(t);
|
|
532
531
|
}
|
|
533
532
|
/**
|
|
534
533
|
* Remove an effect from the #skipped_branches map and reschedule
|
|
@@ -537,15 +536,15 @@ class Re {
|
|
|
537
536
|
* @param {(e: Effect) => void} callback
|
|
538
537
|
*/
|
|
539
538
|
unskip_effect(t, r = (n) => this.schedule(n)) {
|
|
540
|
-
var n = this.#
|
|
539
|
+
var n = this.#u.get(t);
|
|
541
540
|
if (n) {
|
|
542
|
-
this.#
|
|
541
|
+
this.#u.delete(t);
|
|
543
542
|
for (var i of n.d)
|
|
544
|
-
|
|
543
|
+
z(i, F), r(i);
|
|
545
544
|
for (i of n.m)
|
|
546
|
-
|
|
545
|
+
z(i, ce), r(i);
|
|
547
546
|
}
|
|
548
|
-
this.#
|
|
547
|
+
this.#d.add(t);
|
|
549
548
|
}
|
|
550
549
|
/**
|
|
551
550
|
* Convert the effects that were scheduled in this batch into the root effects
|
|
@@ -556,10 +555,10 @@ class Re {
|
|
|
556
555
|
* a single traversal — scheduling into other batches can never observe them
|
|
557
556
|
* @returns {Effect[]}
|
|
558
557
|
*/
|
|
559
|
-
#
|
|
558
|
+
#f() {
|
|
560
559
|
var t = [];
|
|
561
|
-
for (const s of this.#
|
|
562
|
-
if (!(s.f & K || !(s.f & (
|
|
560
|
+
for (const s of this.#i)
|
|
561
|
+
if (!(s.f & K || !(s.f & (F | ce)))) {
|
|
563
562
|
for (var r = s, n = !1; r.parent !== null; ) {
|
|
564
563
|
r = r.parent;
|
|
565
564
|
var i = r.f;
|
|
@@ -573,22 +572,20 @@ class Re {
|
|
|
573
572
|
}
|
|
574
573
|
n || t.push(r);
|
|
575
574
|
}
|
|
576
|
-
return this.#
|
|
575
|
+
return this.#i = [], t;
|
|
577
576
|
}
|
|
578
|
-
#
|
|
579
|
-
this
|
|
580
|
-
for (const o of this.#
|
|
581
|
-
|
|
582
|
-
for (const o of this.#f)
|
|
583
|
-
W(o, _e), this.schedule(o);
|
|
577
|
+
#_() {
|
|
578
|
+
this.started = !0;
|
|
579
|
+
for (const [o, u] of this.#s)
|
|
580
|
+
z(o, u), this.schedule(o);
|
|
584
581
|
this.apply();
|
|
585
|
-
for (var t = Ct = [], r = [], n = Qt = []; this.#
|
|
586
|
-
$n++ > 1e3 && (this.#
|
|
587
|
-
for (const o of this.#
|
|
582
|
+
for (var t = Ct = [], r = [], n = Qt = []; this.#i.length > 0; ) {
|
|
583
|
+
$n++ > 1e3 && (this.#c(), ma());
|
|
584
|
+
for (const o of this.#f())
|
|
588
585
|
try {
|
|
589
|
-
this.#
|
|
586
|
+
this.#g(o, t, r);
|
|
590
587
|
} catch (u) {
|
|
591
|
-
throw Ai(o), this.#
|
|
588
|
+
throw Ai(o), this.#v() || this.discard(), u;
|
|
592
589
|
}
|
|
593
590
|
}
|
|
594
591
|
if (I = null, n.length > 0) {
|
|
@@ -596,35 +593,28 @@ class Re {
|
|
|
596
593
|
for (const o of n)
|
|
597
594
|
i.schedule(o);
|
|
598
595
|
}
|
|
599
|
-
if (Ct = null, Qt = null, this.#
|
|
596
|
+
if (Ct = null, Qt = null, this.#v()) {
|
|
600
597
|
this.#p(r), this.#p(t);
|
|
601
|
-
for (const [o, u] of this.#
|
|
598
|
+
for (const [o, u] of this.#u)
|
|
602
599
|
Si(o, u);
|
|
603
600
|
n.length > 0 && /** @type {unknown} */
|
|
604
|
-
I.#
|
|
601
|
+
I.#_();
|
|
605
602
|
return;
|
|
606
603
|
}
|
|
607
|
-
const s = this.#
|
|
604
|
+
const s = this.#y();
|
|
608
605
|
if (s) {
|
|
609
|
-
this.#p(r), this.#p(t), s.#
|
|
606
|
+
this.#p(r), this.#p(t), s.#h(this);
|
|
610
607
|
return;
|
|
611
608
|
}
|
|
612
|
-
this.#
|
|
613
|
-
for (const o of this.#
|
|
614
|
-
this.#
|
|
609
|
+
this.#s.clear();
|
|
610
|
+
for (const o of this.#e) o(this);
|
|
611
|
+
this.#e.clear(), ct = this, In(r), In(t), ct = null, this.#n?.resolve();
|
|
615
612
|
var a = (
|
|
616
613
|
/** @type {Batch | null} */
|
|
617
614
|
/** @type {unknown} */
|
|
618
615
|
I
|
|
619
616
|
);
|
|
620
|
-
|
|
621
|
-
if (a !== null) {
|
|
622
|
-
for (const o of this.#s)
|
|
623
|
-
a.#s.push(o);
|
|
624
|
-
this.#s = [];
|
|
625
|
-
} else
|
|
626
|
-
a = this;
|
|
627
|
-
a !== null && (Oe.clear(), a.#g());
|
|
617
|
+
this.#r === 0 && (this.#i.length === 0 || a !== null) && this.#c(), a !== null && (Oe.clear(), a.#_());
|
|
628
618
|
}
|
|
629
619
|
/**
|
|
630
620
|
* Traverse the effect tree, executing effects or stashing
|
|
@@ -633,12 +623,12 @@ class Re {
|
|
|
633
623
|
* @param {Effect[]} effects
|
|
634
624
|
* @param {Effect[]} render_effects
|
|
635
625
|
*/
|
|
636
|
-
#
|
|
626
|
+
#g(t, r, n) {
|
|
637
627
|
t.f ^= Q;
|
|
638
628
|
for (var i = t.first; i !== null; ) {
|
|
639
|
-
var s = i.f, a = (s & (we | Ce)) !== 0, o = a && (s & Q) !== 0, u = o || (s & se) !== 0 || this.#
|
|
629
|
+
var s = i.f, a = (s & (we | Ce)) !== 0, o = a && (s & Q) !== 0, u = o || (s & se) !== 0 || this.#u.has(i);
|
|
640
630
|
if (!u && i.fn !== null) {
|
|
641
|
-
a ? i.f ^= Q : s & vt ? r.push(i) : Yt(i) && (s & be && this
|
|
631
|
+
a ? i.f ^= Q : s & vt ? r.push(i) : Yt(i) && (s & be && this.add_dirty_reaction(i, ce), bt(i));
|
|
642
632
|
var l = i.first;
|
|
643
633
|
if (l !== null) {
|
|
644
634
|
i = l;
|
|
@@ -655,31 +645,32 @@ class Re {
|
|
|
655
645
|
}
|
|
656
646
|
}
|
|
657
647
|
}
|
|
658
|
-
#
|
|
659
|
-
for (var t = this
|
|
660
|
-
if (!t.is_fork)
|
|
661
|
-
for (const [r, [, n]] of this.current)
|
|
662
|
-
if (t.current.has(r) && !n)
|
|
663
|
-
return t;
|
|
664
|
-
}
|
|
665
|
-
t = t.#t;
|
|
666
|
-
}
|
|
648
|
+
#y() {
|
|
649
|
+
for (var t = this.prev; t !== null; t = t.prev)
|
|
650
|
+
if (!t.is_fork && this.#b(t)) return t;
|
|
667
651
|
return null;
|
|
668
652
|
}
|
|
653
|
+
/** @param {Batch} batch */
|
|
654
|
+
#b(t) {
|
|
655
|
+
for (const [r, [, n]] of this.current)
|
|
656
|
+
if (!n && t.current.has(r))
|
|
657
|
+
return !0;
|
|
658
|
+
return !1;
|
|
659
|
+
}
|
|
669
660
|
/**
|
|
670
661
|
* @param {Batch} batch
|
|
671
662
|
*/
|
|
672
|
-
#
|
|
663
|
+
#h(t) {
|
|
673
664
|
for (const [n, i] of t.current)
|
|
674
665
|
!this.previous.has(n) && t.previous.has(n) && this.previous.set(n, t.previous.get(n)), this.current.set(n, i);
|
|
675
666
|
for (const [n, i] of t.async_deriveds) {
|
|
676
667
|
const s = this.async_deriveds.get(n);
|
|
677
668
|
s && i.promise.then(s.resolve).catch(s.reject);
|
|
678
669
|
}
|
|
679
|
-
t.async_deriveds.clear(), this.
|
|
670
|
+
t.async_deriveds.clear(), this.transfer_reactions(t.#s);
|
|
680
671
|
const r = (n) => {
|
|
681
672
|
var i = n.reactions;
|
|
682
|
-
if (i !== null && !(n.f & ee && !(n.f & (
|
|
673
|
+
if (i !== null && !(n.f & ee && !(n.f & (F | ce))))
|
|
683
674
|
for (const o of i) {
|
|
684
675
|
var s = o.f;
|
|
685
676
|
if (s & ee)
|
|
@@ -692,20 +683,20 @@ class Re {
|
|
|
692
683
|
/** @type {Effect} */
|
|
693
684
|
o
|
|
694
685
|
);
|
|
695
|
-
s & (ht | be) && !this.async_deriveds.has(a) && (this.#
|
|
686
|
+
s & (ht | be) && !this.async_deriveds.has(a) && (this.#s.delete(a), z(a, F), this.schedule(a));
|
|
696
687
|
}
|
|
697
688
|
}
|
|
698
689
|
};
|
|
699
690
|
for (const n of this.current.keys())
|
|
700
691
|
r(n);
|
|
701
|
-
this.oncommit(() => t.discard()), t.#
|
|
692
|
+
this.oncommit(() => t.discard()), t.#c(), I = this, this.#_();
|
|
702
693
|
}
|
|
703
694
|
/**
|
|
704
695
|
* @param {Effect[]} effects
|
|
705
696
|
*/
|
|
706
697
|
#p(t) {
|
|
707
698
|
for (var r = 0; r < t.length; r += 1)
|
|
708
|
-
yi(t[r], this.#
|
|
699
|
+
yi(t[r], this.#s);
|
|
709
700
|
}
|
|
710
701
|
/**
|
|
711
702
|
* Associate a change to a given source with the current
|
|
@@ -725,26 +716,26 @@ class Re {
|
|
|
725
716
|
}
|
|
726
717
|
flush() {
|
|
727
718
|
try {
|
|
728
|
-
Ar = !0, I = this, this.#
|
|
719
|
+
Ar = !0, I = this, this.#_();
|
|
729
720
|
} finally {
|
|
730
721
|
$n = 0, jr = null, Ct = null, Qt = null, Ar = !1, I = null, ye = null, Oe.clear();
|
|
731
722
|
}
|
|
732
723
|
}
|
|
733
724
|
discard() {
|
|
734
|
-
for (const t of this.#
|
|
735
|
-
this.#
|
|
725
|
+
for (const t of this.#t) t(this);
|
|
726
|
+
this.#t.clear();
|
|
736
727
|
for (const t of this.async_deriveds.values())
|
|
737
728
|
t.reject(Pt);
|
|
738
|
-
this.#
|
|
729
|
+
this.#c(), this.#n?.resolve();
|
|
739
730
|
}
|
|
740
731
|
/**
|
|
741
732
|
* @param {Effect} effect
|
|
742
733
|
*/
|
|
743
734
|
register_created_effect(t) {
|
|
744
|
-
this.#
|
|
735
|
+
this.#a.push(t);
|
|
745
736
|
}
|
|
746
|
-
#
|
|
747
|
-
for (let h = Sr; h !== null; h = h
|
|
737
|
+
#E() {
|
|
738
|
+
for (let h = Sr; h !== null; h = h.next) {
|
|
748
739
|
var t = h.id < this.id, r = [];
|
|
749
740
|
for (const [c, [d, p]] of this.current) {
|
|
750
741
|
if (h.current.has(c)) {
|
|
@@ -768,13 +759,13 @@ class Re {
|
|
|
768
759
|
(c) => !/** @type {[any, boolean]} */
|
|
769
760
|
h.current.get(c)[1]
|
|
770
761
|
);
|
|
771
|
-
if (!(!h
|
|
762
|
+
if (!(!h.started || i.length === 0)) {
|
|
772
763
|
var s = i.filter((c) => !this.current.has(c));
|
|
773
764
|
if (s.length === 0)
|
|
774
765
|
t && h.discard();
|
|
775
766
|
else if (r.length > 0) {
|
|
776
767
|
if (t)
|
|
777
|
-
for (const c of this.#
|
|
768
|
+
for (const c of this.#d)
|
|
778
769
|
h.unskip_effect(c, (d) => {
|
|
779
770
|
d.f & (be | ht) ? h.schedule(d) : h.#p([d]);
|
|
780
771
|
});
|
|
@@ -788,12 +779,12 @@ class Re {
|
|
|
788
779
|
return p ? p[0] !== d[0] || p[1] !== d[1] : !0;
|
|
789
780
|
}).map(([c]) => c);
|
|
790
781
|
if (l.length > 0)
|
|
791
|
-
for (const c of this.#
|
|
792
|
-
!(c.f & (K | se | nr)) && _n(c, l, o) && (c.f & (ht | be) ? (
|
|
793
|
-
if (h.#
|
|
782
|
+
for (const c of this.#a)
|
|
783
|
+
!(c.f & (K | se | nr)) && _n(c, l, o) && (c.f & (ht | be) ? (z(c, F), h.schedule(c)) : h.add_dirty_reaction(c, F));
|
|
784
|
+
if (h.#i.length > 0 && !h.#l) {
|
|
794
785
|
h.apply();
|
|
795
|
-
for (var f of h.#
|
|
796
|
-
h.#
|
|
786
|
+
for (var f of h.#f())
|
|
787
|
+
h.#g(f, [], []);
|
|
797
788
|
}
|
|
798
789
|
h.deactivate();
|
|
799
790
|
}
|
|
@@ -805,9 +796,9 @@ class Re {
|
|
|
805
796
|
* @param {Effect} effect
|
|
806
797
|
*/
|
|
807
798
|
increment(t, r) {
|
|
808
|
-
if (this.#
|
|
809
|
-
let n = this.#
|
|
810
|
-
this.#
|
|
799
|
+
if (this.#r += 1, t) {
|
|
800
|
+
let n = this.#o.get(r) ?? 0;
|
|
801
|
+
this.#o.set(r, n + 1);
|
|
811
802
|
}
|
|
812
803
|
}
|
|
813
804
|
/**
|
|
@@ -815,41 +806,45 @@ class Re {
|
|
|
815
806
|
* @param {Effect} effect
|
|
816
807
|
*/
|
|
817
808
|
decrement(t, r) {
|
|
818
|
-
if (this.#
|
|
819
|
-
let n = this.#
|
|
820
|
-
n === 1 ? this.#
|
|
809
|
+
if (this.#r -= 1, t) {
|
|
810
|
+
let n = this.#o.get(r) ?? 0;
|
|
811
|
+
n === 1 ? this.#o.delete(r) : this.#o.set(r, n - 1);
|
|
821
812
|
}
|
|
822
|
-
this.#
|
|
823
|
-
this.#
|
|
813
|
+
this.#l || (this.#l = !0, ke(() => {
|
|
814
|
+
this.#l = !1, this.linked && this.flush();
|
|
824
815
|
}));
|
|
825
816
|
}
|
|
826
817
|
/**
|
|
827
|
-
* @param {
|
|
828
|
-
|
|
818
|
+
* @param {Map<Effect, number>} dirty_reactions
|
|
819
|
+
*/
|
|
820
|
+
transfer_reactions(t) {
|
|
821
|
+
for (const [r, n] of t)
|
|
822
|
+
this.add_dirty_reaction(r, n);
|
|
823
|
+
t.clear();
|
|
824
|
+
}
|
|
825
|
+
/**
|
|
826
|
+
* @param {Effect} effect
|
|
827
|
+
* @param {number} status
|
|
829
828
|
*/
|
|
830
|
-
|
|
831
|
-
|
|
832
|
-
this.#l.add(n);
|
|
833
|
-
for (const n of r)
|
|
834
|
-
this.#f.add(n);
|
|
835
|
-
t.clear(), r.clear();
|
|
829
|
+
add_dirty_reaction(t, r) {
|
|
830
|
+
(r === F || this.#s.get(t) !== F) && this.#s.set(t, r);
|
|
836
831
|
}
|
|
837
832
|
/** @param {(batch: Batch) => void} fn */
|
|
838
833
|
oncommit(t) {
|
|
839
|
-
this.#
|
|
834
|
+
this.#e.add(t);
|
|
840
835
|
}
|
|
841
836
|
/** @param {(batch: Batch) => void} fn */
|
|
842
837
|
ondiscard(t) {
|
|
843
|
-
this.#
|
|
838
|
+
this.#t.add(t);
|
|
844
839
|
}
|
|
845
840
|
settled() {
|
|
846
|
-
return (this.#
|
|
841
|
+
return (this.#n ??= fi()).promise;
|
|
847
842
|
}
|
|
848
843
|
static ensure() {
|
|
849
844
|
if (I === null) {
|
|
850
845
|
const t = I = new Re();
|
|
851
846
|
!Ar && !Lt && ke(() => {
|
|
852
|
-
t
|
|
847
|
+
t.started || t.flush();
|
|
853
848
|
});
|
|
854
849
|
}
|
|
855
850
|
return I;
|
|
@@ -869,16 +864,16 @@ class Re {
|
|
|
869
864
|
t.b.defer_effect(t);
|
|
870
865
|
return;
|
|
871
866
|
}
|
|
872
|
-
this.#
|
|
867
|
+
this.#i.push(t);
|
|
873
868
|
}
|
|
874
|
-
#
|
|
869
|
+
#c() {
|
|
875
870
|
if (this.linked) {
|
|
876
|
-
var t = this
|
|
877
|
-
t === null ? Sr = r : t
|
|
871
|
+
var t = this.prev, r = this.next;
|
|
872
|
+
t === null ? Sr = r : t.next = r, r === null ? ot = t : r.prev = t, this.linked = !1;
|
|
878
873
|
}
|
|
879
874
|
}
|
|
880
875
|
}
|
|
881
|
-
function
|
|
876
|
+
function _e(e) {
|
|
882
877
|
var t = Lt, r = ct;
|
|
883
878
|
ct = null, Lt = !0;
|
|
884
879
|
try {
|
|
@@ -936,7 +931,7 @@ function Ti(e, t, r, n) {
|
|
|
936
931
|
t,
|
|
937
932
|
r,
|
|
938
933
|
n
|
|
939
|
-
) : s & (ht | be) && !(s &
|
|
934
|
+
) : s & (ht | be) && !(s & F) && _n(i, t, n) && (z(i, F), mn(
|
|
940
935
|
/** @type {Effect} */
|
|
941
936
|
i
|
|
942
937
|
));
|
|
@@ -968,13 +963,13 @@ function mn(e) {
|
|
|
968
963
|
}
|
|
969
964
|
function Si(e, t) {
|
|
970
965
|
if (!(e.f & we && e.f & Q)) {
|
|
971
|
-
e.f &
|
|
966
|
+
e.f & F ? t.d.push(e) : e.f & ce && t.m.push(e), z(e, Q);
|
|
972
967
|
for (var r = e.first; r !== null; )
|
|
973
968
|
Si(r, t), r = r.next;
|
|
974
969
|
}
|
|
975
970
|
}
|
|
976
971
|
function Ai(e) {
|
|
977
|
-
|
|
972
|
+
z(e, Q);
|
|
978
973
|
for (var t = e.first; t !== null; )
|
|
979
974
|
Ai(t), t = t.next;
|
|
980
975
|
}
|
|
@@ -984,7 +979,6 @@ let Hi = !1;
|
|
|
984
979
|
function rt(e, t) {
|
|
985
980
|
var r = {
|
|
986
981
|
f: 0,
|
|
987
|
-
// TODO ideally we could skip this altogether, but it causes type errors
|
|
988
982
|
v: e,
|
|
989
983
|
reactions: null,
|
|
990
984
|
equals: vi,
|
|
@@ -1004,9 +998,9 @@ function gn(e, t = !1, r = !0) {
|
|
|
1004
998
|
return t || (n.equals = mi), n;
|
|
1005
999
|
}
|
|
1006
1000
|
function q(e, t, r = !1) {
|
|
1007
|
-
|
|
1001
|
+
M !== null && // since we are untracking the function inside `$inspect.with` we need to add this check
|
|
1008
1002
|
// to ensure we error if state is set inside an inspect effect
|
|
1009
|
-
(!Ee ||
|
|
1003
|
+
(!Ee || M.f & nr) && gi() && M.f & (ee | be | ht | nr) && (Ne === null || !Ne.has(e)) && sa();
|
|
1010
1004
|
let n = r ? $t(t) : t;
|
|
1011
1005
|
return gt(e, n, Qt);
|
|
1012
1006
|
}
|
|
@@ -1020,16 +1014,16 @@ function gt(e, t, r = null) {
|
|
|
1020
1014
|
/** @type {Derived} */
|
|
1021
1015
|
e
|
|
1022
1016
|
);
|
|
1023
|
-
e.f &
|
|
1017
|
+
e.f & F && vn(i), ye === null && pn(i);
|
|
1024
1018
|
}
|
|
1025
|
-
e.wv = Vi(), Je = null, Vr = 0, Mi(e,
|
|
1019
|
+
e.wv = Vi(), Je = null, Vr = 0, Mi(e, F, r), Je = null, O !== null && O.f & Q && !(O.f & (we | Ce)) && (pe === null ? Ha([e]) : pe.push(e)), !n.is_fork && or.size > 0 && !Hi && ga();
|
|
1026
1020
|
}
|
|
1027
1021
|
return t;
|
|
1028
1022
|
}
|
|
1029
1023
|
function ga() {
|
|
1030
1024
|
Hi = !1;
|
|
1031
1025
|
for (const e of or) {
|
|
1032
|
-
e.f & Q &&
|
|
1026
|
+
e.f & Q && z(e, ce);
|
|
1033
1027
|
let t;
|
|
1034
1028
|
try {
|
|
1035
1029
|
t = Yt(e);
|
|
@@ -1052,8 +1046,8 @@ function Mi(e, t, r) {
|
|
|
1052
1046
|
Je.add(e);
|
|
1053
1047
|
}
|
|
1054
1048
|
for (var s = 0; s < i; s++) {
|
|
1055
|
-
var a = n[s], o = a.f, u = (o &
|
|
1056
|
-
if (u &&
|
|
1049
|
+
var a = n[s], o = a.f, u = (o & F) === 0;
|
|
1050
|
+
if (u && z(a, t), o & nr)
|
|
1057
1051
|
or.add(
|
|
1058
1052
|
/** @type {Effect} */
|
|
1059
1053
|
a
|
|
@@ -1063,7 +1057,7 @@ function Mi(e, t, r) {
|
|
|
1063
1057
|
/** @type {Derived} */
|
|
1064
1058
|
a
|
|
1065
1059
|
);
|
|
1066
|
-
ye?.delete(l), Mi(l,
|
|
1060
|
+
ye?.delete(l), Mi(l, ce, r);
|
|
1067
1061
|
} else if (u) {
|
|
1068
1062
|
var f = (
|
|
1069
1063
|
/** @type {Effect} */
|
|
@@ -1083,7 +1077,7 @@ function $t(e) {
|
|
|
1083
1077
|
var r = /* @__PURE__ */ new Map(), n = oi(e), i = /* @__PURE__ */ ie(0), s = tt, a = (o) => {
|
|
1084
1078
|
if (tt === s)
|
|
1085
1079
|
return o();
|
|
1086
|
-
var u =
|
|
1080
|
+
var u = M, l = tt;
|
|
1087
1081
|
ge(null), Dn(s);
|
|
1088
1082
|
var f = o();
|
|
1089
1083
|
return ge(u), Dn(l), f;
|
|
@@ -1150,7 +1144,7 @@ function $t(e) {
|
|
|
1150
1144
|
if (u === Jt)
|
|
1151
1145
|
return !0;
|
|
1152
1146
|
var l = r.get(u), f = l !== void 0 && l.v !== J || Reflect.has(o, u);
|
|
1153
|
-
if (l !== void 0 || M !== null && (!f || ft(o, u)?.writable)) {
|
|
1147
|
+
if (l !== void 0 || (O !== null || M !== null) && (!f || ft(o, u)?.writable)) {
|
|
1154
1148
|
l === void 0 && (l = a(() => {
|
|
1155
1149
|
var c = f ? $t(o[u]) : J, d = /* @__PURE__ */ ie(c);
|
|
1156
1150
|
return d;
|
|
@@ -1311,9 +1305,9 @@ function yn(e) {
|
|
|
1311
1305
|
t.nodeValue, t = e.nextSibling;
|
|
1312
1306
|
}
|
|
1313
1307
|
function ya(e) {
|
|
1314
|
-
var t =
|
|
1308
|
+
var t = O;
|
|
1315
1309
|
if (t === null)
|
|
1316
|
-
return
|
|
1310
|
+
return M.f |= Ve, e;
|
|
1317
1311
|
if (!(t.f & nt) && !(t.f & vt))
|
|
1318
1312
|
throw e;
|
|
1319
1313
|
Se(e, t);
|
|
@@ -1339,20 +1333,20 @@ function Se(e, t) {
|
|
|
1339
1333
|
}
|
|
1340
1334
|
}
|
|
1341
1335
|
function Bi(e) {
|
|
1342
|
-
|
|
1336
|
+
O === null && (M === null && ea(), Ks()), De && Qs();
|
|
1343
1337
|
}
|
|
1344
1338
|
function Ea(e, t) {
|
|
1345
1339
|
var r = t.last;
|
|
1346
1340
|
r === null ? t.last = t.first = e : (r.next = e, e.prev = r, t.last = e);
|
|
1347
1341
|
}
|
|
1348
1342
|
function Te(e, t) {
|
|
1349
|
-
var r =
|
|
1343
|
+
var r = O;
|
|
1350
1344
|
r !== null && r.f & se && (e |= se);
|
|
1351
1345
|
var n = {
|
|
1352
1346
|
ctx: ae,
|
|
1353
1347
|
deps: null,
|
|
1354
1348
|
nodes: null,
|
|
1355
|
-
f: e |
|
|
1349
|
+
f: e | F | xe,
|
|
1356
1350
|
first: null,
|
|
1357
1351
|
fn: t,
|
|
1358
1352
|
last: null,
|
|
@@ -1377,28 +1371,28 @@ function Te(e, t) {
|
|
|
1377
1371
|
i.deps === null && i.teardown === null && i.nodes === null && i.first === i.last && // either `null`, or a singular child
|
|
1378
1372
|
!(i.f & it) && (i = i.first, e & be && e & _t && i !== null && (i.f |= _t));
|
|
1379
1373
|
}
|
|
1380
|
-
if (i !== null && (i.parent = r, r !== null && Ea(i, r),
|
|
1374
|
+
if (i !== null && (i.parent = r, r !== null && Ea(i, r), M !== null && M.f & ee && !(e & Ce))) {
|
|
1381
1375
|
var s = (
|
|
1382
1376
|
/** @type {Derived} */
|
|
1383
|
-
|
|
1377
|
+
M
|
|
1384
1378
|
);
|
|
1385
1379
|
(s.effects ??= []).push(i);
|
|
1386
1380
|
}
|
|
1387
1381
|
return n;
|
|
1388
1382
|
}
|
|
1389
1383
|
function En() {
|
|
1390
|
-
return
|
|
1384
|
+
return M !== null && !Ee;
|
|
1391
1385
|
}
|
|
1392
1386
|
function Li(e) {
|
|
1393
1387
|
const t = Te(Vt, null);
|
|
1394
|
-
return
|
|
1388
|
+
return z(t, Q), t.teardown = e, t;
|
|
1395
1389
|
}
|
|
1396
1390
|
function ur(e) {
|
|
1397
1391
|
Bi();
|
|
1398
1392
|
var t = (
|
|
1399
1393
|
/** @type {Effect} */
|
|
1400
|
-
|
|
1401
|
-
), r = !
|
|
1394
|
+
O.f
|
|
1395
|
+
), r = !M && (t & we) !== 0 && ae !== null && !ae.i;
|
|
1402
1396
|
if (r) {
|
|
1403
1397
|
var n = (
|
|
1404
1398
|
/** @type {ComponentContext} */
|
|
@@ -1450,13 +1444,13 @@ function wn(e, t = 0) {
|
|
|
1450
1444
|
var r = Te(be | t, e);
|
|
1451
1445
|
return r;
|
|
1452
1446
|
}
|
|
1453
|
-
function
|
|
1447
|
+
function ve(e) {
|
|
1454
1448
|
return Te(we | it, e);
|
|
1455
1449
|
}
|
|
1456
1450
|
function Di(e) {
|
|
1457
1451
|
var t = e.teardown;
|
|
1458
1452
|
if (t !== null) {
|
|
1459
|
-
const r = De, n =
|
|
1453
|
+
const r = De, n = M;
|
|
1460
1454
|
Rn(!0), ge(null);
|
|
1461
1455
|
try {
|
|
1462
1456
|
t.call(null);
|
|
@@ -1547,7 +1541,7 @@ function lr(e) {
|
|
|
1547
1541
|
}
|
|
1548
1542
|
function Gi(e, t) {
|
|
1549
1543
|
if (!(e.f & ln) && e.f & se) {
|
|
1550
|
-
e.f ^= se, e.f & Q || (
|
|
1544
|
+
e.f ^= se, e.f & Q || (z(e, F), Re.ensure().schedule(e));
|
|
1551
1545
|
for (var r = e.first; r !== null; ) {
|
|
1552
1546
|
var n = r.next, i = (r.f & _t) !== 0 || (r.f & we) !== 0;
|
|
1553
1547
|
Gi(r, i ? t : !1), r = n;
|
|
@@ -1569,21 +1563,21 @@ let De = !1;
|
|
|
1569
1563
|
function Rn(e) {
|
|
1570
1564
|
De = e;
|
|
1571
1565
|
}
|
|
1572
|
-
let
|
|
1566
|
+
let M = null, Ee = !1;
|
|
1573
1567
|
function ge(e) {
|
|
1574
|
-
|
|
1568
|
+
M = e;
|
|
1575
1569
|
}
|
|
1576
|
-
let
|
|
1570
|
+
let O = null;
|
|
1577
1571
|
function Pe(e) {
|
|
1578
|
-
|
|
1572
|
+
O = e;
|
|
1579
1573
|
}
|
|
1580
1574
|
let Ne = null;
|
|
1581
1575
|
function ki(e) {
|
|
1582
|
-
|
|
1576
|
+
M !== null && (M.f & ir || M.f & ee) && (Ne ??= /* @__PURE__ */ new Set()).add(e);
|
|
1583
1577
|
}
|
|
1584
|
-
let le = null, he = 0,
|
|
1578
|
+
let le = null, he = 0, pe = null;
|
|
1585
1579
|
function Ha(e) {
|
|
1586
|
-
|
|
1580
|
+
pe = e;
|
|
1587
1581
|
}
|
|
1588
1582
|
let ji = 1, Ke = 0, tt = Ke;
|
|
1589
1583
|
function Dn(e) {
|
|
@@ -1594,9 +1588,9 @@ function Vi() {
|
|
|
1594
1588
|
}
|
|
1595
1589
|
function Yt(e) {
|
|
1596
1590
|
var t = e.f;
|
|
1597
|
-
if (t &
|
|
1591
|
+
if (t & F)
|
|
1598
1592
|
return !0;
|
|
1599
|
-
if (t &
|
|
1593
|
+
if (t & ce) {
|
|
1600
1594
|
for (var r = (
|
|
1601
1595
|
/** @type {Value[]} */
|
|
1602
1596
|
e.deps
|
|
@@ -1613,7 +1607,7 @@ function Yt(e) {
|
|
|
1613
1607
|
}
|
|
1614
1608
|
t & xe && // During time traveling we don't want to reset the status so that
|
|
1615
1609
|
// traversal of the graph in the other batches still happens
|
|
1616
|
-
ye === null &&
|
|
1610
|
+
ye === null && z(e, Q);
|
|
1617
1611
|
}
|
|
1618
1612
|
return !1;
|
|
1619
1613
|
}
|
|
@@ -1627,16 +1621,16 @@ function Xi(e, t, r = !0) {
|
|
|
1627
1621
|
s,
|
|
1628
1622
|
t,
|
|
1629
1623
|
!1
|
|
1630
|
-
) : t === s && (r ?
|
|
1624
|
+
) : t === s && (r ? z(s, F) : s.f & Q && z(s, ce), mn(
|
|
1631
1625
|
/** @type {Effect} */
|
|
1632
1626
|
s
|
|
1633
1627
|
));
|
|
1634
1628
|
}
|
|
1635
1629
|
}
|
|
1636
1630
|
function Wi(e) {
|
|
1637
|
-
var t = le, r = he, n =
|
|
1631
|
+
var t = le, r = he, n = pe, i = M, s = Ne, a = ae, o = Ee, u = tt, l = e.f;
|
|
1638
1632
|
le = /** @type {null | Value[]} */
|
|
1639
|
-
null, he = 0,
|
|
1633
|
+
null, he = 0, pe = null, M = l & (we | Ce) ? null : e, Ne = null, mt(e.ctx), Ee = !1, tt = ++Ke, e.ac !== null && (mr(() => {
|
|
1640
1634
|
e.ac.abort(Xt);
|
|
1641
1635
|
}), e.ac = null);
|
|
1642
1636
|
try {
|
|
@@ -1647,11 +1641,11 @@ function Wi(e) {
|
|
|
1647
1641
|
), h = f();
|
|
1648
1642
|
e.f |= nt;
|
|
1649
1643
|
var c = Un(e);
|
|
1650
|
-
if (gi() &&
|
|
1644
|
+
if (gi() && pe !== null && !Ee && c !== null && !(e.f & (ee | ce | F)))
|
|
1651
1645
|
for (var d = 0; d < /** @type {Source[]} */
|
|
1652
|
-
|
|
1646
|
+
pe.length; d++)
|
|
1653
1647
|
Xi(
|
|
1654
|
-
|
|
1648
|
+
pe[d],
|
|
1655
1649
|
/** @type {Effect} */
|
|
1656
1650
|
e
|
|
1657
1651
|
);
|
|
@@ -1662,14 +1656,14 @@ function Wi(e) {
|
|
|
1662
1656
|
if (t !== null)
|
|
1663
1657
|
for (const p of t)
|
|
1664
1658
|
p.rv = Ke;
|
|
1665
|
-
|
|
1666
|
-
|
|
1659
|
+
pe !== null && (n === null ? n = pe : n.push(.../** @type {Source[]} */
|
|
1660
|
+
pe));
|
|
1667
1661
|
}
|
|
1668
1662
|
return e.f & Ve && (e.f ^= Ve), h;
|
|
1669
1663
|
} catch (p) {
|
|
1670
1664
|
return Un(e), ya(p);
|
|
1671
1665
|
} finally {
|
|
1672
|
-
e.f ^= ir, le = t, he = r,
|
|
1666
|
+
e.f ^= ir, le = t, he = r, pe = n, M = i, Ne = s, mt(a), Ee = o, tt = u;
|
|
1673
1667
|
}
|
|
1674
1668
|
}
|
|
1675
1669
|
function Un(e) {
|
|
@@ -1705,7 +1699,7 @@ function Ma(e, t) {
|
|
|
1705
1699
|
t
|
|
1706
1700
|
);
|
|
1707
1701
|
s.f & xe && (s.f ^= xe), s.v !== J && pn(s), s.ac !== null && mr(() => {
|
|
1708
|
-
s.ac.abort(Xt), s.ac = null,
|
|
1702
|
+
s.ac.abort(Xt), s.ac = null, z(s, F);
|
|
1709
1703
|
}), va(s), Gt(s, 0);
|
|
1710
1704
|
}
|
|
1711
1705
|
}
|
|
@@ -1718,35 +1712,35 @@ function Gt(e, t) {
|
|
|
1718
1712
|
function bt(e) {
|
|
1719
1713
|
var t = e.f;
|
|
1720
1714
|
if (!(t & K)) {
|
|
1721
|
-
|
|
1722
|
-
var r =
|
|
1723
|
-
|
|
1715
|
+
z(e, Q);
|
|
1716
|
+
var r = O;
|
|
1717
|
+
O = e;
|
|
1724
1718
|
try {
|
|
1725
1719
|
t & (be | hi) ? Sa(e) : Tn(e), Di(e);
|
|
1726
1720
|
var n = Wi(e);
|
|
1727
1721
|
e.teardown = typeof n == "function" ? n : null, e.wv = ji;
|
|
1728
1722
|
var i;
|
|
1729
|
-
ai && oa && e.f &
|
|
1723
|
+
ai && oa && e.f & F && e.deps;
|
|
1730
1724
|
} finally {
|
|
1731
|
-
|
|
1725
|
+
O = r;
|
|
1732
1726
|
}
|
|
1733
1727
|
}
|
|
1734
1728
|
}
|
|
1735
1729
|
async function Oa() {
|
|
1736
|
-
await Promise.resolve(),
|
|
1730
|
+
await Promise.resolve(), _e();
|
|
1737
1731
|
}
|
|
1738
1732
|
function w(e) {
|
|
1739
1733
|
var t = e.f, r = (t & ee) !== 0;
|
|
1740
|
-
if (
|
|
1741
|
-
var n =
|
|
1734
|
+
if (M !== null && !Ee) {
|
|
1735
|
+
var n = O !== null && (O.f & K) !== 0;
|
|
1742
1736
|
if (!n && (Ne === null || !Ne.has(e))) {
|
|
1743
|
-
var i =
|
|
1744
|
-
if (
|
|
1737
|
+
var i = M.deps;
|
|
1738
|
+
if (M.f & ir)
|
|
1745
1739
|
e.rv < Ke && (e.rv = Ke, le === null && i !== null && i[he] === e ? he++ : le === null ? le = [e] : le.push(e));
|
|
1746
1740
|
else {
|
|
1747
|
-
|
|
1741
|
+
M.deps ??= [], Ut.call(M.deps, e) || M.deps.push(e);
|
|
1748
1742
|
var s = e.reactions;
|
|
1749
|
-
s === null ? e.reactions = [
|
|
1743
|
+
s === null ? e.reactions = [M] : Ut.call(s, M) || s.push(M);
|
|
1750
1744
|
}
|
|
1751
1745
|
}
|
|
1752
1746
|
}
|
|
@@ -1761,7 +1755,7 @@ function w(e) {
|
|
|
1761
1755
|
var o = a.v;
|
|
1762
1756
|
return (!(a.f & Q) && a.reactions !== null || zi(a)) && (o = vn(a)), Oe.set(a, o), o;
|
|
1763
1757
|
}
|
|
1764
|
-
var u = (a.f & xe) === 0 && !Ee &&
|
|
1758
|
+
var u = (a.f & xe) === 0 && !Ee && M !== null && (M.f & xe) !== 0, l = (a.f & nt) === 0;
|
|
1765
1759
|
Yt(a) && (u && (a.f |= xe), xi(a)), u && !l && (wi(a), Yi(a));
|
|
1766
1760
|
}
|
|
1767
1761
|
if (ye?.has(e))
|
|
@@ -1845,7 +1839,7 @@ function Fn(e) {
|
|
|
1845
1839
|
return s || r;
|
|
1846
1840
|
}
|
|
1847
1841
|
});
|
|
1848
|
-
var f =
|
|
1842
|
+
var f = M, h = O;
|
|
1849
1843
|
ge(null), Pe(null);
|
|
1850
1844
|
try {
|
|
1851
1845
|
for (var c, d = []; s !== null && s !== t; ) {
|
|
@@ -1896,7 +1890,7 @@ function Ia(e) {
|
|
|
1896
1890
|
function dt(e, t) {
|
|
1897
1891
|
var r = (
|
|
1898
1892
|
/** @type {Effect} */
|
|
1899
|
-
|
|
1893
|
+
O
|
|
1900
1894
|
);
|
|
1901
1895
|
r.nodes === null && (r.nodes = { start: e, end: t, a: null, t: null });
|
|
1902
1896
|
}
|
|
@@ -1936,7 +1930,7 @@ function lt(e, t) {
|
|
|
1936
1930
|
if (C) {
|
|
1937
1931
|
var r = (
|
|
1938
1932
|
/** @type {Effect & { nodes: EffectNodes }} */
|
|
1939
|
-
|
|
1933
|
+
O
|
|
1940
1934
|
);
|
|
1941
1935
|
(!(r.f & nt) || r.nodes.end === null) && (r.nodes.end = L), _r();
|
|
1942
1936
|
return;
|
|
@@ -1981,24 +1975,22 @@ class Fa {
|
|
|
1981
1975
|
/** @type {BoundaryProps} */
|
|
1982
1976
|
#r;
|
|
1983
1977
|
/** @type {((anchor: Node) => void)} */
|
|
1984
|
-
#
|
|
1978
|
+
#o;
|
|
1985
1979
|
/** @type {Effect} */
|
|
1986
|
-
#
|
|
1980
|
+
#n;
|
|
1987
1981
|
/** @type {Effect | null} */
|
|
1988
|
-
#
|
|
1982
|
+
#i = null;
|
|
1989
1983
|
/** @type {Effect | null} */
|
|
1990
|
-
#
|
|
1984
|
+
#a = null;
|
|
1991
1985
|
/** @type {Effect | null} */
|
|
1992
|
-
#o = null;
|
|
1993
|
-
/** @type {DocumentFragment | null} */
|
|
1994
1986
|
#s = null;
|
|
1995
|
-
|
|
1987
|
+
/** @type {DocumentFragment | null} */
|
|
1988
|
+
#u = null;
|
|
1989
|
+
#d = 0;
|
|
1996
1990
|
#l = 0;
|
|
1997
|
-
#
|
|
1998
|
-
/** @type {
|
|
1999
|
-
#
|
|
2000
|
-
/** @type {Set<Effect>} */
|
|
2001
|
-
#m = /* @__PURE__ */ new Set();
|
|
1991
|
+
#v = !1;
|
|
1992
|
+
/** @type {Map<Effect, number>} */
|
|
1993
|
+
#m = /* @__PURE__ */ new Map();
|
|
2002
1994
|
/**
|
|
2003
1995
|
* A source containing the number of pending async deriveds/expressions.
|
|
2004
1996
|
* Only created if `$effect.pending()` is used inside the boundary,
|
|
@@ -2006,9 +1998,9 @@ class Fa {
|
|
|
2006
1998
|
* calls followed by no-op flushes
|
|
2007
1999
|
* @type {Source<number> | null}
|
|
2008
2000
|
*/
|
|
2009
|
-
#
|
|
2010
|
-
#
|
|
2011
|
-
this.#
|
|
2001
|
+
#f = null;
|
|
2002
|
+
#_ = Ra(() => (this.#f = rt(this.#d), () => {
|
|
2003
|
+
this.#f = null;
|
|
2012
2004
|
}));
|
|
2013
2005
|
/**
|
|
2014
2006
|
* @param {TemplateNode} node
|
|
@@ -2017,14 +2009,14 @@ class Fa {
|
|
|
2017
2009
|
* @param {((error: unknown) => unknown) | undefined} [transform_error]
|
|
2018
2010
|
*/
|
|
2019
2011
|
constructor(t, r, n, i) {
|
|
2020
|
-
this.#e = t, this.#r = r, this.#
|
|
2012
|
+
this.#e = t, this.#r = r, this.#o = (s) => {
|
|
2021
2013
|
var a = (
|
|
2022
2014
|
/** @type {Effect} */
|
|
2023
|
-
|
|
2015
|
+
O
|
|
2024
2016
|
);
|
|
2025
2017
|
a.b = this, a.f |= Ur, n(s);
|
|
2026
2018
|
}, this.parent = /** @type {Effect} */
|
|
2027
|
-
|
|
2019
|
+
O.b, this.transform_error = i ?? this.parent?.transform_error ?? ((s) => s), this.#n = wn(() => {
|
|
2028
2020
|
if (C) {
|
|
2029
2021
|
const s = fn(
|
|
2030
2022
|
/** @type {TemplateNode} */
|
|
@@ -2034,15 +2026,15 @@ class Fa {
|
|
|
2034
2026
|
const a = s === on;
|
|
2035
2027
|
if (s.startsWith(Nn)) {
|
|
2036
2028
|
const u = JSON.parse(s.slice(Nn.length));
|
|
2037
|
-
this.#
|
|
2038
|
-
} else a ? this.#
|
|
2029
|
+
this.#y(u);
|
|
2030
|
+
} else a ? this.#p() : this.#g();
|
|
2039
2031
|
} else
|
|
2040
|
-
this.#
|
|
2032
|
+
this.#E();
|
|
2041
2033
|
}, Da), C && (this.#e = L);
|
|
2042
2034
|
}
|
|
2043
|
-
#
|
|
2035
|
+
#g() {
|
|
2044
2036
|
try {
|
|
2045
|
-
this.#
|
|
2037
|
+
this.#i = ve(() => this.#o(this.#e));
|
|
2046
2038
|
} catch (t) {
|
|
2047
2039
|
this.error(t);
|
|
2048
2040
|
}
|
|
@@ -2050,9 +2042,9 @@ class Fa {
|
|
|
2050
2042
|
/**
|
|
2051
2043
|
* @param {unknown} error The deserialized error from the server's hydration comment
|
|
2052
2044
|
*/
|
|
2053
|
-
#
|
|
2045
|
+
#y(t) {
|
|
2054
2046
|
const r = this.#r.failed, { reset: n, invoke_onerror: i } = this.#b(t);
|
|
2055
|
-
ke(i), r && (this.#
|
|
2047
|
+
ke(i), r && (this.#s = ve(() => {
|
|
2056
2048
|
r(
|
|
2057
2049
|
this.#e,
|
|
2058
2050
|
() => t,
|
|
@@ -2069,80 +2061,80 @@ class Fa {
|
|
|
2069
2061
|
#b(t) {
|
|
2070
2062
|
var r = !1, n = !1;
|
|
2071
2063
|
const i = () => {
|
|
2072
|
-
if (!this.#
|
|
2064
|
+
if (!this.#h()) {
|
|
2073
2065
|
if (r) {
|
|
2074
2066
|
zs();
|
|
2075
2067
|
return;
|
|
2076
2068
|
}
|
|
2077
|
-
r = !0, n && aa(), this.#
|
|
2078
|
-
this.#
|
|
2079
|
-
}), this.#
|
|
2080
|
-
this.#
|
|
2069
|
+
r = !0, n && aa(), this.#s !== null && et(this.#s, () => {
|
|
2070
|
+
this.#s = null;
|
|
2071
|
+
}), this.#x(() => {
|
|
2072
|
+
this.#E();
|
|
2081
2073
|
});
|
|
2082
2074
|
}
|
|
2083
2075
|
};
|
|
2084
2076
|
return { reset: i, invoke_onerror: () => {
|
|
2085
|
-
if (!this.#
|
|
2077
|
+
if (!this.#h())
|
|
2086
2078
|
try {
|
|
2087
2079
|
n = !0, this.#r.onerror?.(t, i), n = !1;
|
|
2088
2080
|
} catch (a) {
|
|
2089
|
-
Se(a, this.#
|
|
2081
|
+
Se(a, this.#n && this.#n.parent);
|
|
2090
2082
|
}
|
|
2091
2083
|
} };
|
|
2092
2084
|
}
|
|
2093
|
-
#
|
|
2094
|
-
return (this.#
|
|
2085
|
+
#h() {
|
|
2086
|
+
return (this.#n.f & (K | Ft)) !== 0;
|
|
2095
2087
|
}
|
|
2096
|
-
#
|
|
2088
|
+
#p() {
|
|
2097
2089
|
const t = this.#r.pending;
|
|
2098
|
-
t && (this.is_pending = !0, this.#
|
|
2099
|
-
if (!this.#
|
|
2100
|
-
var r = this.#
|
|
2101
|
-
if (r.append(n), this.#
|
|
2090
|
+
t && (this.is_pending = !0, this.#a = ve(() => t(this.#e)), ke(() => {
|
|
2091
|
+
if (!this.#h()) {
|
|
2092
|
+
var r = this.#u = document.createDocumentFragment(), n = me(), i = !1;
|
|
2093
|
+
if (r.append(n), this.#i = this.#x(() => {
|
|
2102
2094
|
try {
|
|
2103
|
-
return
|
|
2095
|
+
return ve(() => this.#o(n));
|
|
2104
2096
|
} catch (s) {
|
|
2105
2097
|
try {
|
|
2106
2098
|
this.error(s), i = !0;
|
|
2107
2099
|
} catch (a) {
|
|
2108
|
-
Se(a, this.#
|
|
2100
|
+
Se(a, this.#n.parent);
|
|
2109
2101
|
}
|
|
2110
2102
|
return null;
|
|
2111
2103
|
}
|
|
2112
|
-
}), this.#
|
|
2113
|
-
this.#
|
|
2104
|
+
}), this.#i === null) {
|
|
2105
|
+
this.#u = null, i && this.#c(
|
|
2114
2106
|
/** @type {Batch} */
|
|
2115
2107
|
I
|
|
2116
2108
|
);
|
|
2117
2109
|
return;
|
|
2118
2110
|
}
|
|
2119
|
-
this.#l === 0 && (this.#e.before(r), this.#
|
|
2111
|
+
this.#l === 0 && (this.#e.before(r), this.#u = null, et(
|
|
2120
2112
|
/** @type {Effect} */
|
|
2121
|
-
this.#
|
|
2113
|
+
this.#a,
|
|
2122
2114
|
() => {
|
|
2123
|
-
this.#
|
|
2115
|
+
this.#a = null;
|
|
2124
2116
|
}
|
|
2125
|
-
), this.#
|
|
2117
|
+
), this.#c(
|
|
2126
2118
|
/** @type {Batch} */
|
|
2127
2119
|
I
|
|
2128
2120
|
));
|
|
2129
2121
|
}
|
|
2130
2122
|
}));
|
|
2131
2123
|
}
|
|
2132
|
-
#
|
|
2124
|
+
#E() {
|
|
2133
2125
|
try {
|
|
2134
|
-
if (this.is_pending = this.has_pending_snippet(), this.#l = 0, this.#
|
|
2135
|
-
this.#
|
|
2126
|
+
if (this.is_pending = this.has_pending_snippet(), this.#l = 0, this.#d = 0, this.#i = ve(() => {
|
|
2127
|
+
this.#o(this.#e);
|
|
2136
2128
|
}), this.#l > 0) {
|
|
2137
|
-
var t = this.#
|
|
2138
|
-
Sn(this.#
|
|
2129
|
+
var t = this.#u = document.createDocumentFragment();
|
|
2130
|
+
Sn(this.#i, t);
|
|
2139
2131
|
const r = (
|
|
2140
2132
|
/** @type {(anchor: Node) => void} */
|
|
2141
2133
|
this.#r.pending
|
|
2142
2134
|
);
|
|
2143
|
-
this.#
|
|
2135
|
+
this.#a = ve(() => r(this.#e));
|
|
2144
2136
|
} else
|
|
2145
|
-
this.#
|
|
2137
|
+
this.#c(
|
|
2146
2138
|
/** @type {Batch} */
|
|
2147
2139
|
I
|
|
2148
2140
|
);
|
|
@@ -2153,15 +2145,15 @@ class Fa {
|
|
|
2153
2145
|
/**
|
|
2154
2146
|
* @param {Batch} batch
|
|
2155
2147
|
*/
|
|
2156
|
-
#
|
|
2157
|
-
this.is_pending = !1, t.
|
|
2148
|
+
#c(t) {
|
|
2149
|
+
this.is_pending = !1, t.transfer_reactions(this.#m);
|
|
2158
2150
|
}
|
|
2159
2151
|
/**
|
|
2160
2152
|
* Defer an effect inside a pending boundary until the boundary resolves
|
|
2161
2153
|
* @param {Effect} effect
|
|
2162
2154
|
*/
|
|
2163
2155
|
defer_effect(t) {
|
|
2164
|
-
yi(t, this.#
|
|
2156
|
+
yi(t, this.#m);
|
|
2165
2157
|
}
|
|
2166
2158
|
/**
|
|
2167
2159
|
* Returns `false` if the effect exists inside a boundary whose pending snippet is shown
|
|
@@ -2177,9 +2169,9 @@ class Fa {
|
|
|
2177
2169
|
* @template T
|
|
2178
2170
|
* @param {() => T} fn
|
|
2179
2171
|
*/
|
|
2180
|
-
#
|
|
2181
|
-
var r =
|
|
2182
|
-
Pe(this.#
|
|
2172
|
+
#x(t) {
|
|
2173
|
+
var r = O, n = M, i = ae;
|
|
2174
|
+
Pe(this.#n), ge(this.#n), mt(this.#n.ctx);
|
|
2183
2175
|
try {
|
|
2184
2176
|
return Re.ensure(), t();
|
|
2185
2177
|
} finally {
|
|
@@ -2192,14 +2184,14 @@ class Fa {
|
|
|
2192
2184
|
* @param {1 | -1} d
|
|
2193
2185
|
* @param {Batch} batch
|
|
2194
2186
|
*/
|
|
2195
|
-
#
|
|
2187
|
+
#w(t, r) {
|
|
2196
2188
|
if (!this.has_pending_snippet()) {
|
|
2197
|
-
this.parent && this.parent.#
|
|
2189
|
+
this.parent && this.parent.#w(t, r);
|
|
2198
2190
|
return;
|
|
2199
2191
|
}
|
|
2200
|
-
this.#l += t, this.#l === 0 && (this.#
|
|
2201
|
-
this.#
|
|
2202
|
-
}), this.#
|
|
2192
|
+
this.#l += t, this.#l === 0 && (this.#c(r), this.#a && et(this.#a, () => {
|
|
2193
|
+
this.#a = null;
|
|
2194
|
+
}), this.#u && (this.#e.before(this.#u), this.#u = null));
|
|
2203
2195
|
}
|
|
2204
2196
|
/**
|
|
2205
2197
|
* Update the source that powers `$effect.pending()` inside this boundary,
|
|
@@ -2209,42 +2201,42 @@ class Fa {
|
|
|
2209
2201
|
* @param {Batch} batch
|
|
2210
2202
|
*/
|
|
2211
2203
|
update_pending_count(t, r) {
|
|
2212
|
-
this.#
|
|
2213
|
-
this.#
|
|
2204
|
+
this.#w(t, r), this.#d += t, !(!this.#f || this.#v) && (this.#v = !0, ke(() => {
|
|
2205
|
+
this.#v = !1, this.#f && gt(this.#f, this.#d);
|
|
2214
2206
|
}));
|
|
2215
2207
|
}
|
|
2216
2208
|
get_effect_pending() {
|
|
2217
|
-
return this.#
|
|
2209
|
+
return this.#_(), w(
|
|
2218
2210
|
/** @type {Source<number>} */
|
|
2219
|
-
this.#
|
|
2211
|
+
this.#f
|
|
2220
2212
|
);
|
|
2221
2213
|
}
|
|
2222
2214
|
/** @param {unknown} error */
|
|
2223
2215
|
error(t) {
|
|
2224
2216
|
if (t === Xe || !this.#r.onerror && !this.#r.failed)
|
|
2225
2217
|
throw t;
|
|
2226
|
-
I?.is_fork ? (this.#
|
|
2227
|
-
this.#
|
|
2228
|
-
})) : this.#
|
|
2218
|
+
I?.is_fork ? (this.#i && I.skip_effect(this.#i), this.#a && I.skip_effect(this.#a), this.#s && I.skip_effect(this.#s), I.oncommit(() => {
|
|
2219
|
+
this.#h() || this.#T(t);
|
|
2220
|
+
})) : this.#T(t);
|
|
2229
2221
|
}
|
|
2230
2222
|
/**
|
|
2231
2223
|
* @param {unknown} error
|
|
2232
2224
|
*/
|
|
2233
|
-
#
|
|
2234
|
-
this.#
|
|
2225
|
+
#T(t) {
|
|
2226
|
+
this.#i && (oe(this.#i), this.#i = null), this.#a && (oe(this.#a), this.#a = null), this.#s && (oe(this.#s), this.#s = null), C && (fe(
|
|
2235
2227
|
/** @type {TemplateNode} */
|
|
2236
2228
|
this.#t
|
|
2237
2229
|
), Zs(), fe(sr()));
|
|
2238
2230
|
let r = this.#r.failed;
|
|
2239
2231
|
const n = (i) => {
|
|
2240
|
-
if (this.#
|
|
2232
|
+
if (this.#h()) return;
|
|
2241
2233
|
const { reset: s, invoke_onerror: a } = this.#b(i);
|
|
2242
|
-
a(), r && !this.#
|
|
2234
|
+
a(), r && !this.#h() && (this.#s = this.#x(() => {
|
|
2243
2235
|
try {
|
|
2244
|
-
return
|
|
2236
|
+
return ve(() => {
|
|
2245
2237
|
var o = (
|
|
2246
2238
|
/** @type {Effect} */
|
|
2247
|
-
|
|
2239
|
+
O
|
|
2248
2240
|
);
|
|
2249
2241
|
o.b = this, o.f |= Ur, r(
|
|
2250
2242
|
this.#e,
|
|
@@ -2256,25 +2248,25 @@ class Fa {
|
|
|
2256
2248
|
return Se(
|
|
2257
2249
|
o,
|
|
2258
2250
|
/** @type {Effect} */
|
|
2259
|
-
this.#
|
|
2251
|
+
this.#n.parent
|
|
2260
2252
|
), null;
|
|
2261
2253
|
}
|
|
2262
2254
|
}));
|
|
2263
2255
|
};
|
|
2264
2256
|
ke(() => {
|
|
2265
|
-
if (!this.#
|
|
2257
|
+
if (!this.#h()) {
|
|
2266
2258
|
var i;
|
|
2267
2259
|
try {
|
|
2268
2260
|
i = this.transform_error(t);
|
|
2269
2261
|
} catch (s) {
|
|
2270
|
-
Se(s, this.#
|
|
2262
|
+
Se(s, this.#n && this.#n.parent);
|
|
2271
2263
|
return;
|
|
2272
2264
|
}
|
|
2273
2265
|
i !== null && typeof i == "object" && typeof /** @type {any} */
|
|
2274
2266
|
i.then == "function" ? i.then(
|
|
2275
2267
|
n,
|
|
2276
2268
|
/** @param {unknown} e */
|
|
2277
|
-
(s) => Se(s, this.#
|
|
2269
|
+
(s) => Se(s, this.#n && this.#n.parent)
|
|
2278
2270
|
) : n(i);
|
|
2279
2271
|
}
|
|
2280
2272
|
});
|
|
@@ -2335,7 +2327,7 @@ function Ji(e, { target: t, anchor: r, props: n = {}, events: i, context: s, int
|
|
|
2335
2327
|
/** @type {TemplateNode} */
|
|
2336
2328
|
d,
|
|
2337
2329
|
null
|
|
2338
|
-
), u = e(d, n) || dn(), C && (
|
|
2330
|
+
), u = e(d, n) || dn(), C && (O.nodes.end = L, L === null || L.nodeType !== Wt || /** @type {Comment} */
|
|
2339
2331
|
L.data !== un))
|
|
2340
2332
|
throw vr(), Xe;
|
|
2341
2333
|
cn();
|
|
@@ -2409,30 +2401,30 @@ class ja {
|
|
|
2409
2401
|
* Keys of effects that are currently outroing
|
|
2410
2402
|
* @type {Set<Key>}
|
|
2411
2403
|
*/
|
|
2412
|
-
#
|
|
2404
|
+
#o = /* @__PURE__ */ new Set();
|
|
2413
2405
|
/**
|
|
2414
2406
|
* Whether to pause (i.e. outro) on change, or destroy immediately.
|
|
2415
2407
|
* This is necessary for `<svelte:element>`
|
|
2416
2408
|
*/
|
|
2417
|
-
#
|
|
2409
|
+
#n = !0;
|
|
2418
2410
|
/**
|
|
2419
2411
|
* @param {TemplateNode} anchor
|
|
2420
2412
|
* @param {boolean} transition
|
|
2421
2413
|
*/
|
|
2422
2414
|
constructor(t, r = !0) {
|
|
2423
|
-
this.anchor = t, this.#
|
|
2415
|
+
this.anchor = t, this.#n = r;
|
|
2424
2416
|
}
|
|
2425
2417
|
/**
|
|
2426
2418
|
* @param {Batch} batch
|
|
2427
2419
|
*/
|
|
2428
|
-
#
|
|
2420
|
+
#i = (t) => {
|
|
2429
2421
|
if (this.#e.has(t)) {
|
|
2430
2422
|
var r = (
|
|
2431
2423
|
/** @type {Key} */
|
|
2432
2424
|
this.#e.get(t)
|
|
2433
2425
|
), n = this.#t.get(r);
|
|
2434
2426
|
if (n)
|
|
2435
|
-
lr(n), this.#
|
|
2427
|
+
lr(n), this.#o.delete(r);
|
|
2436
2428
|
else {
|
|
2437
2429
|
var i = this.#r.get(r);
|
|
2438
2430
|
i && (lr(i.effect), this.#t.set(r, i.effect), this.#r.delete(r), i.fragment.lastChild.remove(), this.anchor.before(i.fragment), n = i.effect);
|
|
@@ -2444,23 +2436,23 @@ class ja {
|
|
|
2444
2436
|
o && (oe(o.effect), this.#r.delete(a));
|
|
2445
2437
|
}
|
|
2446
2438
|
for (const [s, a] of this.#t) {
|
|
2447
|
-
if (s === r || this.#
|
|
2439
|
+
if (s === r || this.#o.has(s)) continue;
|
|
2448
2440
|
const o = () => {
|
|
2449
2441
|
if (Array.from(this.#e.values()).includes(s)) {
|
|
2450
2442
|
var l = document.createDocumentFragment();
|
|
2451
2443
|
Sn(a, l), l.append(me()), this.#r.set(s, { effect: a, fragment: l });
|
|
2452
2444
|
} else
|
|
2453
2445
|
oe(a);
|
|
2454
|
-
this.#
|
|
2446
|
+
this.#o.delete(s), this.#t.delete(s);
|
|
2455
2447
|
};
|
|
2456
|
-
this.#
|
|
2448
|
+
this.#n || !n ? (this.#o.add(s), et(a, o, !1)) : o();
|
|
2457
2449
|
}
|
|
2458
2450
|
}
|
|
2459
2451
|
};
|
|
2460
2452
|
/**
|
|
2461
2453
|
* @param {Batch} batch
|
|
2462
2454
|
*/
|
|
2463
|
-
#
|
|
2455
|
+
#a = (t) => {
|
|
2464
2456
|
this.#e.delete(t);
|
|
2465
2457
|
const r = Array.from(this.#e.values());
|
|
2466
2458
|
for (const [n, i] of this.#r)
|
|
@@ -2480,22 +2472,22 @@ class ja {
|
|
|
2480
2472
|
if (i) {
|
|
2481
2473
|
var s = document.createDocumentFragment(), a = me();
|
|
2482
2474
|
s.append(a), this.#r.set(t, {
|
|
2483
|
-
effect:
|
|
2475
|
+
effect: ve(() => r(a)),
|
|
2484
2476
|
fragment: s
|
|
2485
2477
|
});
|
|
2486
2478
|
} else
|
|
2487
2479
|
this.#t.set(
|
|
2488
2480
|
t,
|
|
2489
|
-
|
|
2481
|
+
ve(() => r(this.anchor))
|
|
2490
2482
|
);
|
|
2491
2483
|
if (this.#e.set(n, t), i) {
|
|
2492
2484
|
for (const [o, u] of this.#t)
|
|
2493
2485
|
o === t ? n.unskip_effect(u) : n.skip_effect(u);
|
|
2494
2486
|
for (const [o, u] of this.#r)
|
|
2495
2487
|
o === t ? n.unskip_effect(u.effect) : n.skip_effect(u.effect);
|
|
2496
|
-
n.oncommit(this.#
|
|
2488
|
+
n.oncommit(this.#i), n.ondiscard(this.#a);
|
|
2497
2489
|
} else
|
|
2498
|
-
C && (this.anchor = L), this.#
|
|
2490
|
+
C && (this.anchor = L), this.#i(n);
|
|
2499
2491
|
}
|
|
2500
2492
|
}
|
|
2501
2493
|
function Gn(e, t, r = !1) {
|
|
@@ -2621,20 +2613,20 @@ function Wa(e, t, r, n, i, s = null) {
|
|
|
2621
2613
|
/** @type {V[]} */
|
|
2622
2614
|
w(h)
|
|
2623
2615
|
), P = B.length;
|
|
2624
|
-
let
|
|
2616
|
+
let X = !1;
|
|
2625
2617
|
if (C) {
|
|
2626
2618
|
var Z = fn(a) === on;
|
|
2627
|
-
Z !== (P === 0) && (a = sr(), fe(a), Be(!1),
|
|
2619
|
+
Z !== (P === 0) && (a = sr(), fe(a), Be(!1), X = !0);
|
|
2628
2620
|
}
|
|
2629
2621
|
for (var D = /* @__PURE__ */ new Set(), Y = (
|
|
2630
2622
|
/** @type {Batch} */
|
|
2631
2623
|
I
|
|
2632
|
-
),
|
|
2624
|
+
), de = Ii(), te = 0; te < P; te += 1) {
|
|
2633
2625
|
C && L.nodeType === Wt && /** @type {Comment} */
|
|
2634
2626
|
L.data === un && (a = /** @type {Comment} */
|
|
2635
|
-
L,
|
|
2636
|
-
var b = B[te], T = n(b, te),
|
|
2637
|
-
|
|
2627
|
+
L, X = !0, Be(!1));
|
|
2628
|
+
var b = B[te], T = n(b, te), k = d ? null : o.get(T);
|
|
2629
|
+
k ? (k.v && gt(k.v, b), k.i && gt(k.i, te), de && Y.unskip_effect(k.e)) : (k = za(
|
|
2638
2630
|
o,
|
|
2639
2631
|
d ? a : kn ??= me(),
|
|
2640
2632
|
b,
|
|
@@ -2643,16 +2635,16 @@ function Wa(e, t, r, n, i, s = null) {
|
|
|
2643
2635
|
i,
|
|
2644
2636
|
t,
|
|
2645
2637
|
r
|
|
2646
|
-
), d || (
|
|
2638
|
+
), d || (k.e.f |= Me), o.set(T, k)), D.add(T);
|
|
2647
2639
|
}
|
|
2648
|
-
if (P === 0 && s && !f && (d ? f =
|
|
2649
|
-
if (c.set(Y, D),
|
|
2640
|
+
if (P === 0 && s && !f && (d ? f = ve(() => s(a)) : (f = ve(() => s(kn ??= me())), f.f |= Me)), P > D.size && Js(), C && P > 0 && fe(sr()), !d)
|
|
2641
|
+
if (c.set(Y, D), de) {
|
|
2650
2642
|
for (const [ze, x] of o)
|
|
2651
2643
|
D.has(ze) || Y.skip_effect(x.e);
|
|
2652
2644
|
Y.oncommit(p), Y.ondiscard(E);
|
|
2653
2645
|
} else
|
|
2654
2646
|
p(Y);
|
|
2655
|
-
|
|
2647
|
+
X && Be(!0), w(h);
|
|
2656
2648
|
}), S = { effect: m, items: o, pending: c, outrogroups: null, fallback: f };
|
|
2657
2649
|
d = !1, C && (a = L);
|
|
2658
2650
|
}
|
|
@@ -2683,13 +2675,13 @@ function Ya(e, t, r, n, i) {
|
|
|
2683
2675
|
if (m !== u) {
|
|
2684
2676
|
if (l !== void 0 && l.has(m)) {
|
|
2685
2677
|
if (c.length < d.length) {
|
|
2686
|
-
var P = d[0],
|
|
2678
|
+
var P = d[0], X;
|
|
2687
2679
|
f = P.prev;
|
|
2688
2680
|
var Z = c[0], D = c[c.length - 1];
|
|
2689
|
-
for (
|
|
2690
|
-
Bt(c[
|
|
2691
|
-
for (
|
|
2692
|
-
l.delete(d[
|
|
2681
|
+
for (X = 0; X < c.length; X += 1)
|
|
2682
|
+
Bt(c[X], P, r);
|
|
2683
|
+
for (X = 0; X < d.length; X += 1)
|
|
2684
|
+
l.delete(d[X]);
|
|
2693
2685
|
Ge(e, Z.prev, D.next), Ge(e, f, Z), Ge(e, D, P), u = P, f = D, S -= 1, c = [], d = [];
|
|
2694
2686
|
} else
|
|
2695
2687
|
l.delete(m), Bt(m, u, r), Ge(e, m.prev, m.next), Ge(e, m, f === null ? e.effect.first : f.next), Ge(e, f, m), f = m;
|
|
@@ -2714,13 +2706,13 @@ function Ya(e, t, r, n, i) {
|
|
|
2714
2706
|
m.f & se || Y.push(m);
|
|
2715
2707
|
for (; u !== null; )
|
|
2716
2708
|
!(u.f & se) && u !== e.fallback && Y.push(u), u = Ot(u.next);
|
|
2717
|
-
var
|
|
2718
|
-
if (
|
|
2709
|
+
var de = Y.length;
|
|
2710
|
+
if (de > 0) {
|
|
2719
2711
|
var te = n & ii && a === 0 ? r : null;
|
|
2720
2712
|
if (s) {
|
|
2721
|
-
for (S = 0; S <
|
|
2713
|
+
for (S = 0; S < de; S += 1)
|
|
2722
2714
|
Y[S].nodes?.a?.measure();
|
|
2723
|
-
for (S = 0; S <
|
|
2715
|
+
for (S = 0; S < de; S += 1)
|
|
2724
2716
|
Y[S].nodes?.a?.fix();
|
|
2725
2717
|
}
|
|
2726
2718
|
Xa(e, Y, te);
|
|
@@ -2737,7 +2729,7 @@ function za(e, t, r, n, i, s, a, o) {
|
|
|
2737
2729
|
return {
|
|
2738
2730
|
v: u,
|
|
2739
2731
|
i: l,
|
|
2740
|
-
e:
|
|
2732
|
+
e: ve(() => (s(t, u ?? r, l ?? i, o), () => {
|
|
2741
2733
|
e.delete(n);
|
|
2742
2734
|
}))
|
|
2743
2735
|
};
|
|
@@ -2762,7 +2754,7 @@ function Ge(e, t, r) {
|
|
|
2762
2754
|
}
|
|
2763
2755
|
function Za(e, t) {
|
|
2764
2756
|
Ri(() => {
|
|
2765
|
-
e =
|
|
2757
|
+
e = O?.parent?.nodes?.start ?? e;
|
|
2766
2758
|
var r = e.getRootNode(), n = (
|
|
2767
2759
|
/** @type {ShadowRoot} */
|
|
2768
2760
|
r.host ? (
|
|
@@ -2814,7 +2806,10 @@ function Ja(e, t, r, n, i, s) {
|
|
|
2814
2806
|
const Qa = Symbol("is custom element"), Ka = Symbol("is html"), eo = Ws ? "link" : "LINK";
|
|
2815
2807
|
function ml(e, t, r, n) {
|
|
2816
2808
|
var i = to(e);
|
|
2817
|
-
C && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === eo)
|
|
2809
|
+
if (!(C && (i[t] = e.getAttribute(t), t === "src" || t === "srcset" || t === "href" && e.nodeName === eo))) {
|
|
2810
|
+
var s = i[t];
|
|
2811
|
+
s !== (i[t] = r) && (t === "loading" && (e[Vs] = r), r == null ? e.removeAttribute(t) : typeof r != "string" && ro(e).has(t) ? e[t] = r : C && (typeof r == "number" || typeof r == "boolean") && s === String(r) || e.setAttribute(t, r));
|
|
2812
|
+
}
|
|
2818
2813
|
}
|
|
2819
2814
|
function to(e) {
|
|
2820
2815
|
return (
|
|
@@ -2849,7 +2844,7 @@ function gl(e = dn(), t, r, n) {
|
|
|
2849
2844
|
ae.r
|
|
2850
2845
|
), s = (
|
|
2851
2846
|
/** @type {Effect} */
|
|
2852
|
-
|
|
2847
|
+
O
|
|
2853
2848
|
);
|
|
2854
2849
|
return Ri(() => {
|
|
2855
2850
|
var a, o;
|
|
@@ -3005,7 +3000,7 @@ function Ae(e, t, r, n) {
|
|
|
3005
3000
|
};
|
|
3006
3001
|
var l = !1, f = /* @__PURE__ */ gr(() => (l = !1, u())), h = (
|
|
3007
3002
|
/** @type {Effect} */
|
|
3008
|
-
|
|
3003
|
+
O
|
|
3009
3004
|
);
|
|
3010
3005
|
return (
|
|
3011
3006
|
/** @type {() => V} */
|
|
@@ -3058,7 +3053,7 @@ class uo {
|
|
|
3058
3053
|
intro: t.intro ?? !1,
|
|
3059
3054
|
recover: t.recover,
|
|
3060
3055
|
transformError: t.transformError
|
|
3061
|
-
}), (!t?.props?.$$host || t.sync === !1) &&
|
|
3056
|
+
}), (!t?.props?.$$host || t.sync === !1) && _e(), this.#e = i.$$events;
|
|
3062
3057
|
for (const s of Object.keys(this.#t))
|
|
3063
3058
|
s === "$set" || s === "$destroy" || s === "$on" || pt(this, s, {
|
|
3064
3059
|
get() {
|
|
@@ -3358,7 +3353,7 @@ var ns = { exports: {} };
|
|
|
3358
3353
|
} }, P = function(x, g, v) {
|
|
3359
3354
|
var y = String(x);
|
|
3360
3355
|
return !y || y.length >= g ? x : "" + Array(g + 1 - y.length).join(v) + x;
|
|
3361
|
-
},
|
|
3356
|
+
}, X = { s: P, z: function(x) {
|
|
3362
3357
|
var g = -x.utcOffset(), v = Math.abs(g), y = Math.floor(v / 60), _ = v % 60;
|
|
3363
3358
|
return (g <= 0 ? "+" : "-") + P(y, 2, "0") + ":" + P(_, 2, "0");
|
|
3364
3359
|
}, m: function x(g, v) {
|
|
@@ -3373,8 +3368,8 @@ var ns = { exports: {} };
|
|
|
3373
3368
|
return x === void 0;
|
|
3374
3369
|
} }, Z = "en", D = {};
|
|
3375
3370
|
D[Z] = B;
|
|
3376
|
-
var Y = "$isDayjsObject",
|
|
3377
|
-
return x instanceof
|
|
3371
|
+
var Y = "$isDayjsObject", de = function(x) {
|
|
3372
|
+
return x instanceof k || !(!x || !x[Y]);
|
|
3378
3373
|
}, te = function x(g, v, y) {
|
|
3379
3374
|
var _;
|
|
3380
3375
|
if (!g) return Z;
|
|
@@ -3389,14 +3384,14 @@ var ns = { exports: {} };
|
|
|
3389
3384
|
}
|
|
3390
3385
|
return !y && _ && (Z = _), _ || !y && Z;
|
|
3391
3386
|
}, b = function(x, g) {
|
|
3392
|
-
if (
|
|
3387
|
+
if (de(x)) return x.clone();
|
|
3393
3388
|
var v = typeof g == "object" ? g : {};
|
|
3394
|
-
return v.date = x, v.args = arguments, new
|
|
3395
|
-
}, T =
|
|
3396
|
-
T.l = te, T.i =
|
|
3389
|
+
return v.date = x, v.args = arguments, new k(v);
|
|
3390
|
+
}, T = X;
|
|
3391
|
+
T.l = te, T.i = de, T.w = function(x, g) {
|
|
3397
3392
|
return b(x, { locale: g.$L, utc: g.$u, x: g.$x, $offset: g.$offset });
|
|
3398
3393
|
};
|
|
3399
|
-
var
|
|
3394
|
+
var k = function() {
|
|
3400
3395
|
function x(v) {
|
|
3401
3396
|
this.$L = te(v.locale, null, !0), this.parse(v), this.$x = this.$x || v.x || {}, this[Y] = !0;
|
|
3402
3397
|
}
|
|
@@ -3410,8 +3405,8 @@ var ns = { exports: {} };
|
|
|
3410
3405
|
if (typeof _ == "string" && !/Z$/i.test(_)) {
|
|
3411
3406
|
var H = _.match(m);
|
|
3412
3407
|
if (H) {
|
|
3413
|
-
var R = H[2] - 1 || 0,
|
|
3414
|
-
return A ? new Date(Date.UTC(H[1], R, H[3] || 1, H[4] || 0, H[5] || 0, H[6] || 0,
|
|
3408
|
+
var R = H[2] - 1 || 0, j = (H[7] || "0").substring(0, 3);
|
|
3409
|
+
return A ? new Date(Date.UTC(H[1], R, H[3] || 1, H[4] || 0, H[5] || 0, H[6] || 0, j)) : new Date(H[1], R, H[3] || 1, H[4] || 0, H[5] || 0, H[6] || 0, j);
|
|
3415
3410
|
}
|
|
3416
3411
|
}
|
|
3417
3412
|
return new Date(_);
|
|
@@ -3440,37 +3435,37 @@ var ns = { exports: {} };
|
|
|
3440
3435
|
var _ = this, A = !!T.u(y) || y, H = T.p(v), R = function(qe, ue) {
|
|
3441
3436
|
var Fe = T.w(_.$u ? Date.UTC(_.$y, ue, qe) : new Date(_.$y, ue, qe), _);
|
|
3442
3437
|
return A ? Fe : Fe.endOf(l);
|
|
3443
|
-
},
|
|
3438
|
+
}, j = function(qe, ue) {
|
|
3444
3439
|
return T.w(_.toDate()[qe].apply(_.toDate("s"), (A ? [0, 0, 0, 0] : [23, 59, 59, 999]).slice(ue)), _);
|
|
3445
|
-
}, U = this.$W,
|
|
3440
|
+
}, U = this.$W, V = this.$M, re = this.$D, Ue = "set" + (this.$u ? "UTC" : "");
|
|
3446
3441
|
switch (H) {
|
|
3447
3442
|
case d:
|
|
3448
3443
|
return A ? R(1, 0) : R(31, 11);
|
|
3449
3444
|
case h:
|
|
3450
|
-
return A ? R(1,
|
|
3445
|
+
return A ? R(1, V) : R(0, V + 1);
|
|
3451
3446
|
case f:
|
|
3452
3447
|
var Ze = this.$locale().weekStart || 0, Ht = (U < Ze ? U + 7 : U) - Ze;
|
|
3453
|
-
return R(A ? re - Ht : re + (6 - Ht),
|
|
3448
|
+
return R(A ? re - Ht : re + (6 - Ht), V);
|
|
3454
3449
|
case l:
|
|
3455
3450
|
case p:
|
|
3456
|
-
return
|
|
3451
|
+
return j(Ue + "Hours", 0);
|
|
3457
3452
|
case u:
|
|
3458
|
-
return
|
|
3453
|
+
return j(Ue + "Minutes", 1);
|
|
3459
3454
|
case o:
|
|
3460
|
-
return
|
|
3455
|
+
return j(Ue + "Seconds", 2);
|
|
3461
3456
|
case a:
|
|
3462
|
-
return
|
|
3457
|
+
return j(Ue + "Milliseconds", 3);
|
|
3463
3458
|
default:
|
|
3464
3459
|
return this.clone();
|
|
3465
3460
|
}
|
|
3466
3461
|
}, g.endOf = function(v) {
|
|
3467
3462
|
return this.startOf(v, !1);
|
|
3468
3463
|
}, g.$set = function(v, y) {
|
|
3469
|
-
var _, A = T.p(v), H = "set" + (this.$u ? "UTC" : ""), R = (_ = {}, _[l] = H + "Date", _[p] = H + "Date", _[h] = H + "Month", _[d] = H + "FullYear", _[u] = H + "Hours", _[o] = H + "Minutes", _[a] = H + "Seconds", _[s] = H + "Milliseconds", _)[A],
|
|
3464
|
+
var _, A = T.p(v), H = "set" + (this.$u ? "UTC" : ""), R = (_ = {}, _[l] = H + "Date", _[p] = H + "Date", _[h] = H + "Month", _[d] = H + "FullYear", _[u] = H + "Hours", _[o] = H + "Minutes", _[a] = H + "Seconds", _[s] = H + "Milliseconds", _)[A], j = A === l ? this.$D + (y - this.$W) : y;
|
|
3470
3465
|
if (A === h || A === d) {
|
|
3471
3466
|
var U = this.clone().set(p, 1);
|
|
3472
|
-
U.$d[R](
|
|
3473
|
-
} else R && this.$d[R](
|
|
3467
|
+
U.$d[R](j), U.init(), this.$d = U.set(p, Math.min(this.$D, U.daysInMonth())).$d;
|
|
3468
|
+
} else R && this.$d[R](j);
|
|
3474
3469
|
return this.init(), this;
|
|
3475
3470
|
}, g.set = function(v, y) {
|
|
3476
3471
|
return this.clone().$set(v, y);
|
|
@@ -3479,22 +3474,22 @@ var ns = { exports: {} };
|
|
|
3479
3474
|
}, g.add = function(v, y) {
|
|
3480
3475
|
var _, A = this;
|
|
3481
3476
|
v = Number(v);
|
|
3482
|
-
var H = T.p(y), R = function(
|
|
3477
|
+
var H = T.p(y), R = function(V) {
|
|
3483
3478
|
var re = b(A);
|
|
3484
|
-
return T.w(re.date(re.date() + Math.round(
|
|
3479
|
+
return T.w(re.date(re.date() + Math.round(V * v)), A);
|
|
3485
3480
|
};
|
|
3486
3481
|
if (H === h) return this.set(h, this.$M + v);
|
|
3487
3482
|
if (H === d) return this.set(d, this.$y + v);
|
|
3488
3483
|
if (H === l) return R(1);
|
|
3489
3484
|
if (H === f) return R(7);
|
|
3490
|
-
var
|
|
3485
|
+
var j = (_ = {}, _[o] = n, _[u] = i, _[a] = r, _)[H] || 1, U = this.$d.getTime() + v * j;
|
|
3491
3486
|
return T.w(U, this);
|
|
3492
3487
|
}, g.subtract = function(v, y) {
|
|
3493
3488
|
return this.add(-1 * v, y);
|
|
3494
3489
|
}, g.format = function(v) {
|
|
3495
3490
|
var y = this, _ = this.$locale();
|
|
3496
3491
|
if (!this.isValid()) return _.invalidDate || E;
|
|
3497
|
-
var A = v || "YYYY-MM-DDTHH:mm:ssZ", H = T.z(this), R = this.$H,
|
|
3492
|
+
var A = v || "YYYY-MM-DDTHH:mm:ssZ", H = T.z(this), R = this.$H, j = this.$m, U = this.$M, V = _.weekdays, re = _.months, Ue = _.meridiem, Ze = function(ue, Fe, Mt, zt) {
|
|
3498
3493
|
return ue && (ue[Fe] || ue(y, A)) || Mt[Fe].slice(0, zt);
|
|
3499
3494
|
}, Ht = function(ue) {
|
|
3500
3495
|
return T.s(R % 12 || 12, ue, "0");
|
|
@@ -3524,11 +3519,11 @@ var ns = { exports: {} };
|
|
|
3524
3519
|
case "d":
|
|
3525
3520
|
return String(y.$W);
|
|
3526
3521
|
case "dd":
|
|
3527
|
-
return Ze(_.weekdaysMin, y.$W,
|
|
3522
|
+
return Ze(_.weekdaysMin, y.$W, V, 2);
|
|
3528
3523
|
case "ddd":
|
|
3529
|
-
return Ze(_.weekdaysShort, y.$W,
|
|
3524
|
+
return Ze(_.weekdaysShort, y.$W, V, 3);
|
|
3530
3525
|
case "dddd":
|
|
3531
|
-
return
|
|
3526
|
+
return V[y.$W];
|
|
3532
3527
|
case "H":
|
|
3533
3528
|
return String(R);
|
|
3534
3529
|
case "HH":
|
|
@@ -3538,13 +3533,13 @@ var ns = { exports: {} };
|
|
|
3538
3533
|
case "hh":
|
|
3539
3534
|
return Ht(2);
|
|
3540
3535
|
case "a":
|
|
3541
|
-
return qe(R,
|
|
3536
|
+
return qe(R, j, !0);
|
|
3542
3537
|
case "A":
|
|
3543
|
-
return qe(R,
|
|
3538
|
+
return qe(R, j, !1);
|
|
3544
3539
|
case "m":
|
|
3545
|
-
return String(
|
|
3540
|
+
return String(j);
|
|
3546
3541
|
case "mm":
|
|
3547
|
-
return T.s(
|
|
3542
|
+
return T.s(j, 2, "0");
|
|
3548
3543
|
case "s":
|
|
3549
3544
|
return String(y.$s);
|
|
3550
3545
|
case "ss":
|
|
@@ -3560,8 +3555,8 @@ var ns = { exports: {} };
|
|
|
3560
3555
|
}, g.utcOffset = function() {
|
|
3561
3556
|
return 15 * -Math.round(this.$d.getTimezoneOffset() / 15);
|
|
3562
3557
|
}, g.diff = function(v, y, _) {
|
|
3563
|
-
var A, H = this, R = T.p(y),
|
|
3564
|
-
return T.m(H,
|
|
3558
|
+
var A, H = this, R = T.p(y), j = b(v), U = (j.utcOffset() - this.utcOffset()) * n, V = this - j, re = function() {
|
|
3559
|
+
return T.m(H, j);
|
|
3565
3560
|
};
|
|
3566
3561
|
switch (R) {
|
|
3567
3562
|
case d:
|
|
@@ -3574,22 +3569,22 @@ var ns = { exports: {} };
|
|
|
3574
3569
|
A = re() / 3;
|
|
3575
3570
|
break;
|
|
3576
3571
|
case f:
|
|
3577
|
-
A = (
|
|
3572
|
+
A = (V - U) / 6048e5;
|
|
3578
3573
|
break;
|
|
3579
3574
|
case l:
|
|
3580
|
-
A = (
|
|
3575
|
+
A = (V - U) / 864e5;
|
|
3581
3576
|
break;
|
|
3582
3577
|
case u:
|
|
3583
|
-
A =
|
|
3578
|
+
A = V / i;
|
|
3584
3579
|
break;
|
|
3585
3580
|
case o:
|
|
3586
|
-
A =
|
|
3581
|
+
A = V / n;
|
|
3587
3582
|
break;
|
|
3588
3583
|
case a:
|
|
3589
|
-
A =
|
|
3584
|
+
A = V / r;
|
|
3590
3585
|
break;
|
|
3591
3586
|
default:
|
|
3592
|
-
A =
|
|
3587
|
+
A = V;
|
|
3593
3588
|
}
|
|
3594
3589
|
return _ ? A : T.a(A);
|
|
3595
3590
|
}, g.daysInMonth = function() {
|
|
@@ -3611,14 +3606,14 @@ var ns = { exports: {} };
|
|
|
3611
3606
|
}, g.toString = function() {
|
|
3612
3607
|
return this.$d.toUTCString();
|
|
3613
3608
|
}, x;
|
|
3614
|
-
}(), ze =
|
|
3609
|
+
}(), ze = k.prototype;
|
|
3615
3610
|
return b.prototype = ze, [["$ms", s], ["$s", a], ["$m", o], ["$H", u], ["$W", l], ["$M", h], ["$y", d], ["$D", p]].forEach(function(x) {
|
|
3616
3611
|
ze[x[1]] = function(g) {
|
|
3617
3612
|
return this.$g(g, x[0], x[1]);
|
|
3618
3613
|
};
|
|
3619
3614
|
}), b.extend = function(x, g) {
|
|
3620
|
-
return x.$i || (x(g,
|
|
3621
|
-
}, b.locale = te, b.isDayjs =
|
|
3615
|
+
return x.$i || (x(g, k, b), x.$i = !0), b;
|
|
3616
|
+
}, b.locale = te, b.isDayjs = de, b.unix = function(x) {
|
|
3622
3617
|
return b(1e3 * x);
|
|
3623
3618
|
}, b.en = D[Z], b.Ls = D, b.p = {}, b;
|
|
3624
3619
|
});
|
|
@@ -3804,44 +3799,44 @@ var Do = function() {
|
|
|
3804
3799
|
return t;
|
|
3805
3800
|
}, fr.apply(this, arguments);
|
|
3806
3801
|
};
|
|
3807
|
-
var
|
|
3802
|
+
var N;
|
|
3808
3803
|
(function(e) {
|
|
3809
3804
|
e[e.EXPECT_ARGUMENT_CLOSING_BRACE = 1] = "EXPECT_ARGUMENT_CLOSING_BRACE", e[e.EMPTY_ARGUMENT = 2] = "EMPTY_ARGUMENT", e[e.MALFORMED_ARGUMENT = 3] = "MALFORMED_ARGUMENT", e[e.EXPECT_ARGUMENT_TYPE = 4] = "EXPECT_ARGUMENT_TYPE", e[e.INVALID_ARGUMENT_TYPE = 5] = "INVALID_ARGUMENT_TYPE", e[e.EXPECT_ARGUMENT_STYLE = 6] = "EXPECT_ARGUMENT_STYLE", e[e.INVALID_NUMBER_SKELETON = 7] = "INVALID_NUMBER_SKELETON", e[e.INVALID_DATE_TIME_SKELETON = 8] = "INVALID_DATE_TIME_SKELETON", e[e.EXPECT_NUMBER_SKELETON = 9] = "EXPECT_NUMBER_SKELETON", e[e.EXPECT_DATE_TIME_SKELETON = 10] = "EXPECT_DATE_TIME_SKELETON", e[e.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE = 11] = "UNCLOSED_QUOTE_IN_ARGUMENT_STYLE", e[e.EXPECT_SELECT_ARGUMENT_OPTIONS = 12] = "EXPECT_SELECT_ARGUMENT_OPTIONS", e[e.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE = 13] = "EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE = 14] = "INVALID_PLURAL_ARGUMENT_OFFSET_VALUE", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR = 15] = "EXPECT_SELECT_ARGUMENT_SELECTOR", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR = 16] = "EXPECT_PLURAL_ARGUMENT_SELECTOR", e[e.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT = 17] = "EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT", e[e.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT = 18] = "EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT", e[e.INVALID_PLURAL_ARGUMENT_SELECTOR = 19] = "INVALID_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_PLURAL_ARGUMENT_SELECTOR = 20] = "DUPLICATE_PLURAL_ARGUMENT_SELECTOR", e[e.DUPLICATE_SELECT_ARGUMENT_SELECTOR = 21] = "DUPLICATE_SELECT_ARGUMENT_SELECTOR", e[e.MISSING_OTHER_CLAUSE = 22] = "MISSING_OTHER_CLAUSE", e[e.INVALID_TAG = 23] = "INVALID_TAG", e[e.INVALID_TAG_NAME = 25] = "INVALID_TAG_NAME", e[e.UNMATCHED_CLOSING_TAG = 26] = "UNMATCHED_CLOSING_TAG", e[e.UNCLOSED_TAG = 27] = "UNCLOSED_TAG";
|
|
3810
|
-
})(
|
|
3811
|
-
var
|
|
3805
|
+
})(N || (N = {}));
|
|
3806
|
+
var G;
|
|
3812
3807
|
(function(e) {
|
|
3813
3808
|
e[e.literal = 0] = "literal", e[e.argument = 1] = "argument", e[e.number = 2] = "number", e[e.date = 3] = "date", e[e.time = 4] = "time", e[e.select = 5] = "select", e[e.plural = 6] = "plural", e[e.pound = 7] = "pound", e[e.tag = 8] = "tag";
|
|
3814
|
-
})(
|
|
3809
|
+
})(G || (G = {}));
|
|
3815
3810
|
var Et;
|
|
3816
3811
|
(function(e) {
|
|
3817
3812
|
e[e.number = 0] = "number", e[e.dateTime = 1] = "dateTime";
|
|
3818
3813
|
})(Et || (Et = {}));
|
|
3819
3814
|
function Wn(e) {
|
|
3820
|
-
return e.type ===
|
|
3815
|
+
return e.type === G.literal;
|
|
3821
3816
|
}
|
|
3822
3817
|
function Go(e) {
|
|
3823
|
-
return e.type ===
|
|
3818
|
+
return e.type === G.argument;
|
|
3824
3819
|
}
|
|
3825
3820
|
function os(e) {
|
|
3826
|
-
return e.type ===
|
|
3821
|
+
return e.type === G.number;
|
|
3827
3822
|
}
|
|
3828
3823
|
function us(e) {
|
|
3829
|
-
return e.type ===
|
|
3824
|
+
return e.type === G.date;
|
|
3830
3825
|
}
|
|
3831
3826
|
function ls(e) {
|
|
3832
|
-
return e.type ===
|
|
3827
|
+
return e.type === G.time;
|
|
3833
3828
|
}
|
|
3834
3829
|
function fs(e) {
|
|
3835
|
-
return e.type ===
|
|
3830
|
+
return e.type === G.select;
|
|
3836
3831
|
}
|
|
3837
3832
|
function hs(e) {
|
|
3838
|
-
return e.type ===
|
|
3833
|
+
return e.type === G.plural;
|
|
3839
3834
|
}
|
|
3840
3835
|
function ko(e) {
|
|
3841
|
-
return e.type ===
|
|
3836
|
+
return e.type === G.pound;
|
|
3842
3837
|
}
|
|
3843
3838
|
function cs(e) {
|
|
3844
|
-
return e.type ===
|
|
3839
|
+
return e.type === G.tag;
|
|
3845
3840
|
}
|
|
3846
3841
|
function ds(e) {
|
|
3847
3842
|
return !!(e && typeof e == "object" && e.type === Et.number);
|
|
@@ -3941,14 +3936,14 @@ function Vo(e) {
|
|
|
3941
3936
|
return "";
|
|
3942
3937
|
}), t;
|
|
3943
3938
|
}
|
|
3944
|
-
var
|
|
3945
|
-
return
|
|
3939
|
+
var W = function() {
|
|
3940
|
+
return W = Object.assign || function(t) {
|
|
3946
3941
|
for (var r, n = 1, i = arguments.length; n < i; n++) {
|
|
3947
3942
|
r = arguments[n];
|
|
3948
3943
|
for (var s in r) Object.prototype.hasOwnProperty.call(r, s) && (t[s] = r[s]);
|
|
3949
3944
|
}
|
|
3950
3945
|
return t;
|
|
3951
|
-
},
|
|
3946
|
+
}, W.apply(this, arguments);
|
|
3952
3947
|
};
|
|
3953
3948
|
var Xo = /[\t-\r \x85\u200E\u200F\u2028\u2029]/i;
|
|
3954
3949
|
function Wo(e) {
|
|
@@ -4072,13 +4067,13 @@ function qo(e) {
|
|
|
4072
4067
|
t.notation = "compact", t.compactDisplay = "long";
|
|
4073
4068
|
continue;
|
|
4074
4069
|
case "scientific":
|
|
4075
|
-
t =
|
|
4076
|
-
return
|
|
4070
|
+
t = W(W(W({}, t), { notation: "scientific" }), i.options.reduce(function(u, l) {
|
|
4071
|
+
return W(W({}, u), Zn(l));
|
|
4077
4072
|
}, {}));
|
|
4078
4073
|
continue;
|
|
4079
4074
|
case "engineering":
|
|
4080
|
-
t =
|
|
4081
|
-
return
|
|
4075
|
+
t = W(W(W({}, t), { notation: "engineering" }), i.options.reduce(function(u, l) {
|
|
4076
|
+
return W(W({}, u), Zn(l));
|
|
4082
4077
|
}, {}));
|
|
4083
4078
|
continue;
|
|
4084
4079
|
case "notation-simple":
|
|
@@ -4147,17 +4142,17 @@ function qo(e) {
|
|
|
4147
4142
|
return f === "*" ? t.minimumFractionDigits = l.length : h && h[0] === "#" ? t.maximumFractionDigits = h.length : c && d ? (t.minimumFractionDigits = c.length, t.maximumFractionDigits = c.length + d.length) : (t.minimumFractionDigits = l.length, t.maximumFractionDigits = l.length), "";
|
|
4148
4143
|
});
|
|
4149
4144
|
var s = i.options[0];
|
|
4150
|
-
s === "w" ? t =
|
|
4145
|
+
s === "w" ? t = W(W({}, t), { trailingZeroDisplay: "stripIfInteger" }) : s && (t = W(W({}, t), zn(s)));
|
|
4151
4146
|
continue;
|
|
4152
4147
|
}
|
|
4153
4148
|
if (vs.test(i.stem)) {
|
|
4154
|
-
t =
|
|
4149
|
+
t = W(W({}, t), zn(i.stem));
|
|
4155
4150
|
continue;
|
|
4156
4151
|
}
|
|
4157
4152
|
var a = ms(i.stem);
|
|
4158
|
-
a && (t =
|
|
4153
|
+
a && (t = W(W({}, t), a));
|
|
4159
4154
|
var o = Zo(i.stem);
|
|
4160
|
-
o && (t =
|
|
4155
|
+
o && (t = W(W({}, t), o));
|
|
4161
4156
|
}
|
|
4162
4157
|
return t;
|
|
4163
4158
|
}
|
|
@@ -5741,13 +5736,13 @@ var cu = (
|
|
|
5741
5736
|
if (s === 35 && (r === "plural" || r === "selectordinal")) {
|
|
5742
5737
|
var o = this.clonePosition();
|
|
5743
5738
|
this.bump(), i.push({
|
|
5744
|
-
type:
|
|
5739
|
+
type: G.pound,
|
|
5745
5740
|
location: $(o, this.clonePosition())
|
|
5746
5741
|
});
|
|
5747
5742
|
} else if (s === 60 && !this.ignoreTag && this.peek() === 47) {
|
|
5748
5743
|
if (n)
|
|
5749
5744
|
break;
|
|
5750
|
-
return this.error(
|
|
5745
|
+
return this.error(N.UNMATCHED_CLOSING_TAG, $(this.clonePosition(), this.clonePosition()));
|
|
5751
5746
|
} else if (s === 60 && !this.ignoreTag && rn(this.peek() || 0)) {
|
|
5752
5747
|
var a = this.parseTag(t, r);
|
|
5753
5748
|
if (a.err)
|
|
@@ -5769,7 +5764,7 @@ var cu = (
|
|
|
5769
5764
|
if (this.bumpSpace(), this.bumpIf("/>"))
|
|
5770
5765
|
return {
|
|
5771
5766
|
val: {
|
|
5772
|
-
type:
|
|
5767
|
+
type: G.literal,
|
|
5773
5768
|
value: "<".concat(i, "/>"),
|
|
5774
5769
|
location: $(n, this.clonePosition())
|
|
5775
5770
|
},
|
|
@@ -5782,21 +5777,21 @@ var cu = (
|
|
|
5782
5777
|
var a = s.val, o = this.clonePosition();
|
|
5783
5778
|
if (this.bumpIf("</")) {
|
|
5784
5779
|
if (this.isEOF() || !rn(this.char()))
|
|
5785
|
-
return this.error(
|
|
5780
|
+
return this.error(N.INVALID_TAG, $(o, this.clonePosition()));
|
|
5786
5781
|
var u = this.clonePosition(), l = this.parseTagName();
|
|
5787
|
-
return i !== l ? this.error(
|
|
5782
|
+
return i !== l ? this.error(N.UNMATCHED_CLOSING_TAG, $(u, this.clonePosition())) : (this.bumpSpace(), this.bumpIf(">") ? {
|
|
5788
5783
|
val: {
|
|
5789
|
-
type:
|
|
5784
|
+
type: G.tag,
|
|
5790
5785
|
value: i,
|
|
5791
5786
|
children: a,
|
|
5792
5787
|
location: $(n, this.clonePosition())
|
|
5793
5788
|
},
|
|
5794
5789
|
err: null
|
|
5795
|
-
} : this.error(
|
|
5790
|
+
} : this.error(N.INVALID_TAG, $(o, this.clonePosition())));
|
|
5796
5791
|
} else
|
|
5797
|
-
return this.error(
|
|
5792
|
+
return this.error(N.UNCLOSED_TAG, $(n, this.clonePosition()));
|
|
5798
5793
|
} else
|
|
5799
|
-
return this.error(
|
|
5794
|
+
return this.error(N.INVALID_TAG, $(n, this.clonePosition()));
|
|
5800
5795
|
}, e.prototype.parseTagName = function() {
|
|
5801
5796
|
var t = this.offset();
|
|
5802
5797
|
for (this.bump(); !this.isEOF() && pu(this.char()); )
|
|
@@ -5823,7 +5818,7 @@ var cu = (
|
|
|
5823
5818
|
}
|
|
5824
5819
|
var u = $(n, this.clonePosition());
|
|
5825
5820
|
return {
|
|
5826
|
-
val: { type:
|
|
5821
|
+
val: { type: G.literal, value: i, location: u },
|
|
5827
5822
|
err: null
|
|
5828
5823
|
};
|
|
5829
5824
|
}, e.prototype.tryParseLeftAngleBracket = function() {
|
|
@@ -5871,19 +5866,19 @@ var cu = (
|
|
|
5871
5866
|
}, e.prototype.parseArgument = function(t, r) {
|
|
5872
5867
|
var n = this.clonePosition();
|
|
5873
5868
|
if (this.bump(), this.bumpSpace(), this.isEOF())
|
|
5874
|
-
return this.error(
|
|
5869
|
+
return this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE, $(n, this.clonePosition()));
|
|
5875
5870
|
if (this.char() === 125)
|
|
5876
|
-
return this.bump(), this.error(
|
|
5871
|
+
return this.bump(), this.error(N.EMPTY_ARGUMENT, $(n, this.clonePosition()));
|
|
5877
5872
|
var i = this.parseIdentifierIfPossible().value;
|
|
5878
5873
|
if (!i)
|
|
5879
|
-
return this.error(
|
|
5874
|
+
return this.error(N.MALFORMED_ARGUMENT, $(n, this.clonePosition()));
|
|
5880
5875
|
if (this.bumpSpace(), this.isEOF())
|
|
5881
|
-
return this.error(
|
|
5876
|
+
return this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE, $(n, this.clonePosition()));
|
|
5882
5877
|
switch (this.char()) {
|
|
5883
5878
|
case 125:
|
|
5884
5879
|
return this.bump(), {
|
|
5885
5880
|
val: {
|
|
5886
|
-
type:
|
|
5881
|
+
type: G.argument,
|
|
5887
5882
|
// value does not include the opening and closing braces.
|
|
5888
5883
|
value: i,
|
|
5889
5884
|
location: $(n, this.clonePosition())
|
|
@@ -5891,9 +5886,9 @@ var cu = (
|
|
|
5891
5886
|
err: null
|
|
5892
5887
|
};
|
|
5893
5888
|
case 44:
|
|
5894
|
-
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(
|
|
5889
|
+
return this.bump(), this.bumpSpace(), this.isEOF() ? this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE, $(n, this.clonePosition())) : this.parseArgumentOptions(t, r, i, n);
|
|
5895
5890
|
default:
|
|
5896
|
-
return this.error(
|
|
5891
|
+
return this.error(N.MALFORMED_ARGUMENT, $(n, this.clonePosition()));
|
|
5897
5892
|
}
|
|
5898
5893
|
}, e.prototype.parseIdentifierIfPossible = function() {
|
|
5899
5894
|
var t = this.clonePosition(), r = this.offset(), n = tn(this.message, r), i = r + n.length;
|
|
@@ -5904,7 +5899,7 @@ var cu = (
|
|
|
5904
5899
|
var s, a = this.clonePosition(), o = this.parseIdentifierIfPossible().value, u = this.clonePosition();
|
|
5905
5900
|
switch (o) {
|
|
5906
5901
|
case "":
|
|
5907
|
-
return this.error(
|
|
5902
|
+
return this.error(N.EXPECT_ARGUMENT_TYPE, $(a, u));
|
|
5908
5903
|
case "number":
|
|
5909
5904
|
case "date":
|
|
5910
5905
|
case "time": {
|
|
@@ -5917,7 +5912,7 @@ var cu = (
|
|
|
5917
5912
|
return h;
|
|
5918
5913
|
var c = hu(h.val);
|
|
5919
5914
|
if (c.length === 0)
|
|
5920
|
-
return this.error(
|
|
5915
|
+
return this.error(N.EXPECT_ARGUMENT_STYLE, $(this.clonePosition(), this.clonePosition()));
|
|
5921
5916
|
var d = $(f, this.clonePosition());
|
|
5922
5917
|
l = { style: c, styleLocation: d };
|
|
5923
5918
|
}
|
|
@@ -5930,12 +5925,12 @@ var cu = (
|
|
|
5930
5925
|
if (o === "number") {
|
|
5931
5926
|
var h = this.parseNumberSkeletonFromString(m, l.styleLocation);
|
|
5932
5927
|
return h.err ? h : {
|
|
5933
|
-
val: { type:
|
|
5928
|
+
val: { type: G.number, value: n, location: E, style: h.val },
|
|
5934
5929
|
err: null
|
|
5935
5930
|
};
|
|
5936
5931
|
} else {
|
|
5937
5932
|
if (m.length === 0)
|
|
5938
|
-
return this.error(
|
|
5933
|
+
return this.error(N.EXPECT_DATE_TIME_SKELETON, E);
|
|
5939
5934
|
var S = m;
|
|
5940
5935
|
this.locale && (S = Jo(m, this.locale));
|
|
5941
5936
|
var c = {
|
|
@@ -5943,7 +5938,7 @@ var cu = (
|
|
|
5943
5938
|
pattern: S,
|
|
5944
5939
|
location: l.styleLocation,
|
|
5945
5940
|
parsedOptions: this.shouldParseSkeletons ? Vo(S) : {}
|
|
5946
|
-
}, B = o === "date" ?
|
|
5941
|
+
}, B = o === "date" ? G.date : G.time;
|
|
5947
5942
|
return {
|
|
5948
5943
|
val: { type: B, value: n, location: E, style: c },
|
|
5949
5944
|
err: null
|
|
@@ -5952,7 +5947,7 @@ var cu = (
|
|
|
5952
5947
|
}
|
|
5953
5948
|
return {
|
|
5954
5949
|
val: {
|
|
5955
|
-
type: o === "number" ?
|
|
5950
|
+
type: o === "number" ? G.number : o === "date" ? G.date : G.time,
|
|
5956
5951
|
value: n,
|
|
5957
5952
|
location: E,
|
|
5958
5953
|
style: (s = l?.style) !== null && s !== void 0 ? s : null
|
|
@@ -5965,19 +5960,19 @@ var cu = (
|
|
|
5965
5960
|
case "select": {
|
|
5966
5961
|
var P = this.clonePosition();
|
|
5967
5962
|
if (this.bumpSpace(), !this.bumpIf(","))
|
|
5968
|
-
return this.error(
|
|
5963
|
+
return this.error(N.EXPECT_SELECT_ARGUMENT_OPTIONS, $(P, fr({}, P)));
|
|
5969
5964
|
this.bumpSpace();
|
|
5970
|
-
var
|
|
5971
|
-
if (o !== "select" &&
|
|
5965
|
+
var X = this.parseIdentifierIfPossible(), Z = 0;
|
|
5966
|
+
if (o !== "select" && X.value === "offset") {
|
|
5972
5967
|
if (!this.bumpIf(":"))
|
|
5973
|
-
return this.error(
|
|
5968
|
+
return this.error(N.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, $(this.clonePosition(), this.clonePosition()));
|
|
5974
5969
|
this.bumpSpace();
|
|
5975
|
-
var h = this.tryParseDecimalInteger(
|
|
5970
|
+
var h = this.tryParseDecimalInteger(N.EXPECT_PLURAL_ARGUMENT_OFFSET_VALUE, N.INVALID_PLURAL_ARGUMENT_OFFSET_VALUE);
|
|
5976
5971
|
if (h.err)
|
|
5977
5972
|
return h;
|
|
5978
|
-
this.bumpSpace(),
|
|
5973
|
+
this.bumpSpace(), X = this.parseIdentifierIfPossible(), Z = h.val;
|
|
5979
5974
|
}
|
|
5980
|
-
var D = this.tryParsePluralOrSelectOptions(t, o, r,
|
|
5975
|
+
var D = this.tryParsePluralOrSelectOptions(t, o, r, X);
|
|
5981
5976
|
if (D.err)
|
|
5982
5977
|
return D;
|
|
5983
5978
|
var p = this.tryParseArgumentClose(i);
|
|
@@ -5986,7 +5981,7 @@ var cu = (
|
|
|
5986
5981
|
var Y = $(i, this.clonePosition());
|
|
5987
5982
|
return o === "select" ? {
|
|
5988
5983
|
val: {
|
|
5989
|
-
type:
|
|
5984
|
+
type: G.select,
|
|
5990
5985
|
value: n,
|
|
5991
5986
|
options: Jn(D.val),
|
|
5992
5987
|
location: Y
|
|
@@ -5994,7 +5989,7 @@ var cu = (
|
|
|
5994
5989
|
err: null
|
|
5995
5990
|
} : {
|
|
5996
5991
|
val: {
|
|
5997
|
-
type:
|
|
5992
|
+
type: G.plural,
|
|
5998
5993
|
value: n,
|
|
5999
5994
|
options: Jn(D.val),
|
|
6000
5995
|
offset: Z,
|
|
@@ -6005,10 +6000,10 @@ var cu = (
|
|
|
6005
6000
|
};
|
|
6006
6001
|
}
|
|
6007
6002
|
default:
|
|
6008
|
-
return this.error(
|
|
6003
|
+
return this.error(N.INVALID_ARGUMENT_TYPE, $(a, u));
|
|
6009
6004
|
}
|
|
6010
6005
|
}, e.prototype.tryParseArgumentClose = function(t) {
|
|
6011
|
-
return this.isEOF() || this.char() !== 125 ? this.error(
|
|
6006
|
+
return this.isEOF() || this.char() !== 125 ? this.error(N.EXPECT_ARGUMENT_CLOSING_BRACE, $(t, this.clonePosition())) : (this.bump(), { val: !0, err: null });
|
|
6012
6007
|
}, e.prototype.parseSimpleArgStyleIfPossible = function() {
|
|
6013
6008
|
for (var t = 0, r = this.clonePosition(); !this.isEOF(); ) {
|
|
6014
6009
|
var n = this.char();
|
|
@@ -6017,7 +6012,7 @@ var cu = (
|
|
|
6017
6012
|
this.bump();
|
|
6018
6013
|
var i = this.clonePosition();
|
|
6019
6014
|
if (!this.bumpUntil("'"))
|
|
6020
|
-
return this.error(
|
|
6015
|
+
return this.error(N.UNCLOSED_QUOTE_IN_ARGUMENT_STYLE, $(i, this.clonePosition()));
|
|
6021
6016
|
this.bump();
|
|
6022
6017
|
break;
|
|
6023
6018
|
}
|
|
@@ -6049,7 +6044,7 @@ var cu = (
|
|
|
6049
6044
|
try {
|
|
6050
6045
|
n = Wo(t);
|
|
6051
6046
|
} catch {
|
|
6052
|
-
return this.error(
|
|
6047
|
+
return this.error(N.INVALID_NUMBER_SKELETON, r);
|
|
6053
6048
|
}
|
|
6054
6049
|
return {
|
|
6055
6050
|
val: {
|
|
@@ -6065,7 +6060,7 @@ var cu = (
|
|
|
6065
6060
|
if (l.length === 0) {
|
|
6066
6061
|
var h = this.clonePosition();
|
|
6067
6062
|
if (r !== "select" && this.bumpIf("=")) {
|
|
6068
|
-
var c = this.tryParseDecimalInteger(
|
|
6063
|
+
var c = this.tryParseDecimalInteger(N.EXPECT_PLURAL_ARGUMENT_SELECTOR, N.INVALID_PLURAL_ARGUMENT_SELECTOR);
|
|
6069
6064
|
if (c.err)
|
|
6070
6065
|
return c;
|
|
6071
6066
|
f = $(h, this.clonePosition()), l = this.message.slice(h.offset, this.offset());
|
|
@@ -6073,11 +6068,11 @@ var cu = (
|
|
|
6073
6068
|
break;
|
|
6074
6069
|
}
|
|
6075
6070
|
if (u.has(l))
|
|
6076
|
-
return this.error(r === "select" ?
|
|
6071
|
+
return this.error(r === "select" ? N.DUPLICATE_SELECT_ARGUMENT_SELECTOR : N.DUPLICATE_PLURAL_ARGUMENT_SELECTOR, f);
|
|
6077
6072
|
l === "other" && (a = !0), this.bumpSpace();
|
|
6078
6073
|
var d = this.clonePosition();
|
|
6079
6074
|
if (!this.bumpIf("{"))
|
|
6080
|
-
return this.error(r === "select" ?
|
|
6075
|
+
return this.error(r === "select" ? N.EXPECT_SELECT_ARGUMENT_SELECTOR_FRAGMENT : N.EXPECT_PLURAL_ARGUMENT_SELECTOR_FRAGMENT, $(this.clonePosition(), this.clonePosition()));
|
|
6081
6076
|
var p = this.parseMessage(t + 1, r, n);
|
|
6082
6077
|
if (p.err)
|
|
6083
6078
|
return p;
|
|
@@ -6092,7 +6087,7 @@ var cu = (
|
|
|
6092
6087
|
}
|
|
6093
6088
|
]), u.add(l), this.bumpSpace(), s = this.parseIdentifierIfPossible(), l = s.value, f = s.location;
|
|
6094
6089
|
}
|
|
6095
|
-
return o.length === 0 ? this.error(r === "select" ?
|
|
6090
|
+
return o.length === 0 ? this.error(r === "select" ? N.EXPECT_SELECT_ARGUMENT_SELECTOR : N.EXPECT_PLURAL_ARGUMENT_SELECTOR, $(this.clonePosition(), this.clonePosition())) : this.requiresOtherClause && !a ? this.error(N.MISSING_OTHER_CLAUSE, $(this.clonePosition(), this.clonePosition())) : { val: o, err: null };
|
|
6096
6091
|
}, e.prototype.tryParseDecimalInteger = function(t, r) {
|
|
6097
6092
|
var n = 1, i = this.clonePosition();
|
|
6098
6093
|
this.bumpIf("+") || this.bumpIf("-") && (n = -1);
|
|
@@ -6197,7 +6192,7 @@ function _u(e, t) {
|
|
|
6197
6192
|
t === void 0 && (t = {}), t = fr({ shouldParseSkeletons: !0, requiresOtherClause: !0 }, t);
|
|
6198
6193
|
var r = new cu(e, t).parse();
|
|
6199
6194
|
if (r.err) {
|
|
6200
|
-
var n = SyntaxError(
|
|
6195
|
+
var n = SyntaxError(N[r.err.kind]);
|
|
6201
6196
|
throw n.location = r.err.location, n.originalMessage = r.err.message, n;
|
|
6202
6197
|
}
|
|
6203
6198
|
return t?.captureLocation || nn(r.val), r.val;
|
|
@@ -6345,8 +6340,8 @@ function er(e, t, r, n, i, s, a) {
|
|
|
6345
6340
|
throw new xr(`Intl.PluralRules is not available in this environment.
|
|
6346
6341
|
Try polyfilling it using "@formatjs/intl-pluralrules"
|
|
6347
6342
|
`, xt.MISSING_INTL_API, a);
|
|
6348
|
-
var
|
|
6349
|
-
P = f.options[
|
|
6343
|
+
var X = r.getPluralRules(t, { type: f.pluralType }).select(c - (f.offset || 0));
|
|
6344
|
+
P = f.options[X] || f.options.other;
|
|
6350
6345
|
}
|
|
6351
6346
|
if (!P)
|
|
6352
6347
|
throw new Kn(f.value, c, Object.keys(f.options), a);
|
|
@@ -6948,66 +6943,66 @@ function Ms(e, t) {
|
|
|
6948
6943
|
const f = /* @__PURE__ */ at(() => Number(s()) || 0), h = /* @__PURE__ */ at(() => Number(a()) || Dt), c = /* @__PURE__ */ at(() => Number(o()) || 0), d = /* @__PURE__ */ at(() => Math.max(1, Math.ceil(w(c) / Math.max(1, w(h))))), p = /* @__PURE__ */ at(() => w(h) > 0 ? Math.floor(w(f) / w(h)) : 0);
|
|
6949
6944
|
let E = /* @__PURE__ */ ie(!1);
|
|
6950
6945
|
ur(() => {
|
|
6951
|
-
const b = window.matchMedia("(max-width: 767px)"), T = (
|
|
6952
|
-
q(E,
|
|
6946
|
+
const b = window.matchMedia("(max-width: 767px)"), T = (k) => {
|
|
6947
|
+
q(E, k.matches, !0);
|
|
6953
6948
|
};
|
|
6954
6949
|
return q(E, b.matches, !0), b.addEventListener("change", T), () => b.removeEventListener("change", T);
|
|
6955
6950
|
});
|
|
6956
|
-
const m = (b, T,
|
|
6951
|
+
const m = (b, T, k) => b <= (k ? ll : ul) ? Array.from({ length: b }, (v, y) => y) : T <= 1 || T >= b - 2 ? [0, 1, "ellipsis", b - 2, b - 1] : [0, "ellipsis", T, "ellipsis", b - 1], S = /* @__PURE__ */ at(() => m(w(d), w(p), w(E))), B = (b) => u()(b * w(h)), P = () => u()(Math.max(0, w(p) - 1) * w(h)), X = () => u()(Math.min(w(d) - 1, w(p) + 1) * w(h));
|
|
6957
6952
|
var Z = {
|
|
6958
6953
|
get offset() {
|
|
6959
6954
|
return s();
|
|
6960
6955
|
},
|
|
6961
6956
|
set offset(b = 0) {
|
|
6962
|
-
s(b),
|
|
6957
|
+
s(b), _e();
|
|
6963
6958
|
},
|
|
6964
6959
|
get limit() {
|
|
6965
6960
|
return a();
|
|
6966
6961
|
},
|
|
6967
6962
|
set limit(b = Dt) {
|
|
6968
|
-
a(b),
|
|
6963
|
+
a(b), _e();
|
|
6969
6964
|
},
|
|
6970
6965
|
get total() {
|
|
6971
6966
|
return o();
|
|
6972
6967
|
},
|
|
6973
6968
|
set total(b = 0) {
|
|
6974
|
-
o(b),
|
|
6969
|
+
o(b), _e();
|
|
6975
6970
|
},
|
|
6976
6971
|
get onPageChange() {
|
|
6977
6972
|
return u();
|
|
6978
6973
|
},
|
|
6979
6974
|
set onPageChange(b = (T) => {
|
|
6980
6975
|
}) {
|
|
6981
|
-
u(b),
|
|
6976
|
+
u(b), _e();
|
|
6982
6977
|
},
|
|
6983
6978
|
get locale() {
|
|
6984
6979
|
return l();
|
|
6985
6980
|
},
|
|
6986
6981
|
set locale(b = "en") {
|
|
6987
|
-
l(b),
|
|
6982
|
+
l(b), _e();
|
|
6988
6983
|
}
|
|
6989
6984
|
}, D = dl(), Y = Wr(D);
|
|
6990
6985
|
{
|
|
6991
|
-
var
|
|
6992
|
-
var T = cl(),
|
|
6986
|
+
var de = (b) => {
|
|
6987
|
+
var T = cl(), k = Wr(T), ze = Hr(k, !0), x = Ln(k, 2);
|
|
6993
6988
|
Wa(x, 17, () => w(S), Va, (y, _) => {
|
|
6994
6989
|
var A = Ba(), H = ba(A);
|
|
6995
6990
|
{
|
|
6996
6991
|
var R = (U) => {
|
|
6997
|
-
var
|
|
6998
|
-
lt(U,
|
|
6999
|
-
},
|
|
7000
|
-
var
|
|
6992
|
+
var V = fl();
|
|
6993
|
+
lt(U, V);
|
|
6994
|
+
}, j = (U) => {
|
|
6995
|
+
var V = hl();
|
|
7001
6996
|
let re;
|
|
7002
|
-
var Ue = Hr(
|
|
6997
|
+
var Ue = Hr(V, !0);
|
|
7003
6998
|
Cn(() => {
|
|
7004
|
-
re = Ja(
|
|
6999
|
+
re = Ja(V, 1, "loyalty-pagination__btn", null, re, {
|
|
7005
7000
|
"loyalty-pagination__btn--active": w(_) === w(p)
|
|
7006
7001
|
}), Pr(Ue, w(_) + 1);
|
|
7007
|
-
}), Mr("click",
|
|
7002
|
+
}), Mr("click", V, () => B(w(_))), lt(U, V);
|
|
7008
7003
|
};
|
|
7009
7004
|
Gn(H, (U) => {
|
|
7010
|
-
w(_) === "ellipsis" ? U(R) : U(
|
|
7005
|
+
w(_) === "ellipsis" ? U(R) : U(j, -1);
|
|
7011
7006
|
});
|
|
7012
7007
|
}
|
|
7013
7008
|
lt(y, A);
|
|
@@ -7015,13 +7010,13 @@ function Ms(e, t) {
|
|
|
7015
7010
|
var g = Ln(x, 2), v = Hr(g, !0);
|
|
7016
7011
|
kr(T), Cn(
|
|
7017
7012
|
(y, _) => {
|
|
7018
|
-
|
|
7013
|
+
k.disabled = w(p) <= 0, Pr(ze, y), g.disabled = w(p) >= w(d) - 1, Pr(v, _);
|
|
7019
7014
|
},
|
|
7020
7015
|
[() => r()("prev"), () => r()("next")]
|
|
7021
|
-
), Mr("click",
|
|
7016
|
+
), Mr("click", k, P), Mr("click", g, X), lt(b, T);
|
|
7022
7017
|
};
|
|
7023
7018
|
Gn(Y, (b) => {
|
|
7024
|
-
w(d) > 1 && b(
|
|
7019
|
+
w(d) > 1 && b(de);
|
|
7025
7020
|
});
|
|
7026
7021
|
}
|
|
7027
7022
|
kr(D), lt(e, D);
|
|
@@ -7050,31 +7045,31 @@ function Os(e, t) {
|
|
|
7050
7045
|
return r();
|
|
7051
7046
|
},
|
|
7052
7047
|
set offset(u = 0) {
|
|
7053
|
-
r(u),
|
|
7048
|
+
r(u), _e();
|
|
7054
7049
|
},
|
|
7055
7050
|
get limit() {
|
|
7056
7051
|
return n();
|
|
7057
7052
|
},
|
|
7058
7053
|
set limit(u = Dt) {
|
|
7059
|
-
n(u),
|
|
7054
|
+
n(u), _e();
|
|
7060
7055
|
},
|
|
7061
7056
|
get total() {
|
|
7062
7057
|
return i();
|
|
7063
7058
|
},
|
|
7064
7059
|
set total(u = 0) {
|
|
7065
|
-
i(u),
|
|
7060
|
+
i(u), _e();
|
|
7066
7061
|
},
|
|
7067
7062
|
get onPageChange() {
|
|
7068
7063
|
return s();
|
|
7069
7064
|
},
|
|
7070
7065
|
set onPageChange(u) {
|
|
7071
|
-
s(u),
|
|
7066
|
+
s(u), _e();
|
|
7072
7067
|
},
|
|
7073
7068
|
get locale() {
|
|
7074
7069
|
return a();
|
|
7075
7070
|
},
|
|
7076
7071
|
set locale(u = "en") {
|
|
7077
|
-
a(u),
|
|
7072
|
+
a(u), _e();
|
|
7078
7073
|
}
|
|
7079
7074
|
};
|
|
7080
7075
|
return Ms(e, {
|
|
@@ -7149,7 +7144,7 @@ export {
|
|
|
7149
7144
|
lt as h,
|
|
7150
7145
|
Gn as i,
|
|
7151
7146
|
cn as j,
|
|
7152
|
-
|
|
7147
|
+
_e as k,
|
|
7153
7148
|
ao as l,
|
|
7154
7149
|
w as m,
|
|
7155
7150
|
Wr as n,
|