@clicktap/state 0.12.6 → 0.12.9
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/auth/AuthProvider.d.ts +2 -2
- package/index.js +16 -16
- package/index.mjs +314 -310
- package/package.json +1 -1
package/index.mjs
CHANGED
|
@@ -19,7 +19,7 @@ const xo = (e) => {
|
|
|
19
19
|
const t = ko();
|
|
20
20
|
t && t.register(e);
|
|
21
21
|
};
|
|
22
|
-
class
|
|
22
|
+
class Fr {
|
|
23
23
|
constructor(t) {
|
|
24
24
|
this._process = t, this._active = !1, this._current = null, this._last = null;
|
|
25
25
|
}
|
|
@@ -48,7 +48,7 @@ class $r {
|
|
|
48
48
|
this._last = null;
|
|
49
49
|
}
|
|
50
50
|
}
|
|
51
|
-
const
|
|
51
|
+
const hs = ".", Po = "", ps = "", Io = "#", jo = "*", ys = "xstate.init", Do = "xstate.error", Rt = "xstate.stop";
|
|
52
52
|
function $o(e, t) {
|
|
53
53
|
return {
|
|
54
54
|
type: `xstate.after.${e}.${t}`
|
|
@@ -66,15 +66,15 @@ function Fo(e, t) {
|
|
|
66
66
|
output: t
|
|
67
67
|
};
|
|
68
68
|
}
|
|
69
|
-
function
|
|
69
|
+
function ms(e, t) {
|
|
70
70
|
return {
|
|
71
71
|
type: `xstate.error.actor.${e}`,
|
|
72
72
|
error: t
|
|
73
73
|
};
|
|
74
74
|
}
|
|
75
|
-
function
|
|
75
|
+
function vs(e) {
|
|
76
76
|
return {
|
|
77
|
-
type:
|
|
77
|
+
type: ys,
|
|
78
78
|
input: e
|
|
79
79
|
};
|
|
80
80
|
}
|
|
@@ -84,7 +84,7 @@ function Oe(e) {
|
|
|
84
84
|
});
|
|
85
85
|
}
|
|
86
86
|
const Mo = (() => typeof Symbol == "function" && Symbol.observable || "@@observable")();
|
|
87
|
-
function
|
|
87
|
+
function Mr(e, t) {
|
|
88
88
|
return `${e.sessionId}.${t}`;
|
|
89
89
|
}
|
|
90
90
|
let No = 0;
|
|
@@ -98,7 +98,7 @@ function Lo(e, t) {
|
|
|
98
98
|
delay: _,
|
|
99
99
|
id: O,
|
|
100
100
|
startedAt: Date.now()
|
|
101
|
-
}, L =
|
|
101
|
+
}, L = Mr(h, O);
|
|
102
102
|
y._snapshot._scheduledEvents[L] = D;
|
|
103
103
|
const V = u.setTimeout(() => {
|
|
104
104
|
delete a[L], delete y._snapshot._scheduledEvents[L], y._relay(h, E, S);
|
|
@@ -106,7 +106,7 @@ function Lo(e, t) {
|
|
|
106
106
|
a[L] = V;
|
|
107
107
|
},
|
|
108
108
|
cancel: (h, E) => {
|
|
109
|
-
const S =
|
|
109
|
+
const S = Mr(h, E), _ = a[S];
|
|
110
110
|
delete a[S], delete y._snapshot._scheduledEvents[S], u.clearTimeout(_);
|
|
111
111
|
},
|
|
112
112
|
cancelAll: (h) => {
|
|
@@ -179,12 +179,12 @@ function Lo(e, t) {
|
|
|
179
179
|
};
|
|
180
180
|
return y;
|
|
181
181
|
}
|
|
182
|
-
function
|
|
183
|
-
const n =
|
|
184
|
-
return typeof r == "string" ? typeof n == "string" ? r === n : !1 : typeof n == "string" ? n in r : Object.keys(n).every((s) => s in r ?
|
|
182
|
+
function gs(e, t) {
|
|
183
|
+
const n = Nr(e), r = Nr(t);
|
|
184
|
+
return typeof r == "string" ? typeof n == "string" ? r === n : !1 : typeof n == "string" ? n in r : Object.keys(n).every((s) => s in r ? gs(n[s], r[s]) : !1);
|
|
185
185
|
}
|
|
186
|
-
function
|
|
187
|
-
if (
|
|
186
|
+
function Gn(e) {
|
|
187
|
+
if (Es(e))
|
|
188
188
|
return e;
|
|
189
189
|
let t = [], n = "";
|
|
190
190
|
for (let r = 0; r < e.length; r++) {
|
|
@@ -200,12 +200,12 @@ function Kn(e) {
|
|
|
200
200
|
}
|
|
201
201
|
return t.push(n), t;
|
|
202
202
|
}
|
|
203
|
-
function
|
|
203
|
+
function Nr(e) {
|
|
204
204
|
if (mi(e))
|
|
205
205
|
return e.value;
|
|
206
206
|
if (typeof e != "string")
|
|
207
207
|
return e;
|
|
208
|
-
const t =
|
|
208
|
+
const t = Gn(e);
|
|
209
209
|
return Uo(t);
|
|
210
210
|
}
|
|
211
211
|
function Uo(e) {
|
|
@@ -222,7 +222,7 @@ function Uo(e) {
|
|
|
222
222
|
}
|
|
223
223
|
return t;
|
|
224
224
|
}
|
|
225
|
-
function
|
|
225
|
+
function Lr(e, t) {
|
|
226
226
|
const n = {}, r = Object.keys(e);
|
|
227
227
|
for (let s = 0; s < r.length; s++) {
|
|
228
228
|
const i = r[s];
|
|
@@ -230,11 +230,11 @@ function Nr(e, t) {
|
|
|
230
230
|
}
|
|
231
231
|
return n;
|
|
232
232
|
}
|
|
233
|
-
function
|
|
234
|
-
return
|
|
233
|
+
function _s(e) {
|
|
234
|
+
return Es(e) ? e : [e];
|
|
235
235
|
}
|
|
236
236
|
function $e(e) {
|
|
237
|
-
return e === void 0 ? [] :
|
|
237
|
+
return e === void 0 ? [] : _s(e);
|
|
238
238
|
}
|
|
239
239
|
function Un(e, t, n, r) {
|
|
240
240
|
return typeof e == "function" ? e({
|
|
@@ -243,22 +243,22 @@ function Un(e, t, n, r) {
|
|
|
243
243
|
self: r
|
|
244
244
|
}) : e;
|
|
245
245
|
}
|
|
246
|
-
function
|
|
246
|
+
function Es(e) {
|
|
247
247
|
return Array.isArray(e);
|
|
248
248
|
}
|
|
249
249
|
function Bo(e) {
|
|
250
250
|
return e.type.startsWith("xstate.error.actor");
|
|
251
251
|
}
|
|
252
252
|
function it(e) {
|
|
253
|
-
return
|
|
253
|
+
return _s(e).map((t) => typeof t > "u" || typeof t == "string" ? {
|
|
254
254
|
target: t
|
|
255
255
|
} : t);
|
|
256
256
|
}
|
|
257
|
-
function
|
|
257
|
+
function bs(e) {
|
|
258
258
|
if (!(e === void 0 || e === Po))
|
|
259
259
|
return $e(e);
|
|
260
260
|
}
|
|
261
|
-
function
|
|
261
|
+
function Ur(e, t, n) {
|
|
262
262
|
var i, a, u;
|
|
263
263
|
const r = typeof e == "object", s = r ? e : void 0;
|
|
264
264
|
return {
|
|
@@ -267,17 +267,17 @@ function Lr(e, t, n) {
|
|
|
267
267
|
complete: (u = r ? e.complete : n) == null ? void 0 : u.bind(s)
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
function
|
|
270
|
+
function Br(e, t) {
|
|
271
271
|
return `${t}.${e}`;
|
|
272
272
|
}
|
|
273
|
-
function
|
|
273
|
+
function Xn(e, t) {
|
|
274
274
|
const n = t.match(/^xstate\.invoke\.(\d+)\.(.*)/);
|
|
275
275
|
if (!n)
|
|
276
276
|
return e.implementations.actors[t];
|
|
277
277
|
const [, r, s] = n, a = e.getStateNodeById(s).config.invoke;
|
|
278
278
|
return (Array.isArray(a) ? a[r] : a).src;
|
|
279
279
|
}
|
|
280
|
-
const
|
|
280
|
+
const Zn = 1;
|
|
281
281
|
let fe = /* @__PURE__ */ function(e) {
|
|
282
282
|
return e[e.NotStarted = 0] = "NotStarted", e[e.Running = 1] = "Running", e[e.Stopped = 2] = "Stopped", e;
|
|
283
283
|
}({});
|
|
@@ -297,7 +297,7 @@ class Vo {
|
|
|
297
297
|
* @param options Actor options
|
|
298
298
|
*/
|
|
299
299
|
constructor(t, n) {
|
|
300
|
-
this.logic = t, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new
|
|
300
|
+
this.logic = t, this._snapshot = void 0, this.clock = void 0, this.options = void 0, this.id = void 0, this.mailbox = new Fr(this._process.bind(this)), this.observers = /* @__PURE__ */ new Set(), this.eventListeners = /* @__PURE__ */ new Map(), this.logger = void 0, this._processingStatus = fe.NotStarted, this._parent = void 0, this._syncSnapshot = void 0, this.ref = void 0, this._actorScope = void 0, this._systemId = void 0, this.sessionId = void 0, this.system = void 0, this._doneEvent = void 0, this.src = void 0, this._deferred = [];
|
|
301
301
|
const r = {
|
|
302
302
|
...Wo,
|
|
303
303
|
...n
|
|
@@ -312,7 +312,7 @@ class Vo {
|
|
|
312
312
|
} = r;
|
|
313
313
|
this.system = a ? a.system : Lo(this, {
|
|
314
314
|
clock: s
|
|
315
|
-
}), y && !a && this.system.inspect(
|
|
315
|
+
}), y && !a && this.system.inspect(Ur(y)), this.sessionId = this.system._bookId(), this.id = d ?? this.sessionId, this.logger = i, this.clock = s, this._parent = a, this._syncSnapshot = u, this.options = r, this.src = r.src ?? t, this.ref = this, this._actorScope = {
|
|
316
316
|
self: this,
|
|
317
317
|
id: this.id,
|
|
318
318
|
sessionId: this.sessionId,
|
|
@@ -442,7 +442,7 @@ class Vo {
|
|
|
442
442
|
*/
|
|
443
443
|
subscribe(t, n, r) {
|
|
444
444
|
var i;
|
|
445
|
-
const s =
|
|
445
|
+
const s = Ur(t, n, r);
|
|
446
446
|
if (this._processingStatus !== fe.Stopped)
|
|
447
447
|
this.observers.add(s);
|
|
448
448
|
else
|
|
@@ -499,7 +499,7 @@ class Vo {
|
|
|
499
499
|
error: () => {
|
|
500
500
|
}
|
|
501
501
|
}), this.system._register(this.sessionId, this), this._systemId && this.system._set(this._systemId, this), this._processingStatus = fe.Running;
|
|
502
|
-
const t =
|
|
502
|
+
const t = vs(this.options.input);
|
|
503
503
|
switch (this.system._sendInspectionEvent({
|
|
504
504
|
type: "@xstate.event",
|
|
505
505
|
sourceRef: this._parent,
|
|
@@ -586,7 +586,7 @@ class Vo {
|
|
|
586
586
|
this.observers.clear(), n && Oe(t);
|
|
587
587
|
}
|
|
588
588
|
_error(t) {
|
|
589
|
-
this._stopProcedure(), this._reportError(t), this._parent && this.system._relay(this, this._parent,
|
|
589
|
+
this._stopProcedure(), this._reportError(t), this._parent && this.system._relay(this, this._parent, ms(this.id, t));
|
|
590
590
|
}
|
|
591
591
|
// TODO: atm children don't belong entirely to the actor so
|
|
592
592
|
// in a way - it's not even super aware of them
|
|
@@ -594,7 +594,7 @@ class Vo {
|
|
|
594
594
|
// right now, they are being stopped within the machine's transition
|
|
595
595
|
// but that could throw and leave us with "orphaned" active actors
|
|
596
596
|
_stopProcedure() {
|
|
597
|
-
return this._processingStatus !== fe.Running ? this : (this.system.scheduler.cancelAll(this), this.mailbox.clear(), this.mailbox = new
|
|
597
|
+
return this._processingStatus !== fe.Running ? this : (this.system.scheduler.cancelAll(this), this.mailbox.clear(), this.mailbox = new Fr(this._process.bind(this)), this._processingStatus = fe.Stopped, this.system._unregister(this), this);
|
|
598
598
|
}
|
|
599
599
|
/**
|
|
600
600
|
* @internal
|
|
@@ -618,7 +618,7 @@ class Vo {
|
|
|
618
618
|
}
|
|
619
619
|
toJSON() {
|
|
620
620
|
return {
|
|
621
|
-
xstate$$type:
|
|
621
|
+
xstate$$type: Zn,
|
|
622
622
|
id: this.id
|
|
623
623
|
};
|
|
624
624
|
}
|
|
@@ -684,7 +684,7 @@ function Yo(e, t, n, r, {
|
|
|
684
684
|
input: u,
|
|
685
685
|
syncSnapshot: d
|
|
686
686
|
}) {
|
|
687
|
-
const l = typeof a == "string" ?
|
|
687
|
+
const l = typeof a == "string" ? Xn(t.machine, a) : a, y = typeof s == "function" ? s(n) : s;
|
|
688
688
|
let h;
|
|
689
689
|
return l && (h = ut(l, {
|
|
690
690
|
id: y,
|
|
@@ -747,19 +747,19 @@ function Xo(e, t) {
|
|
|
747
747
|
});
|
|
748
748
|
}
|
|
749
749
|
}
|
|
750
|
-
function
|
|
750
|
+
function Ss(e) {
|
|
751
751
|
function t(n, r) {
|
|
752
752
|
}
|
|
753
753
|
return t.type = "xstate.stopChild", t.actorRef = e, t.resolve = Go, t.execute = Xo, t;
|
|
754
754
|
}
|
|
755
|
-
function
|
|
755
|
+
function Qn(e, t, n, r) {
|
|
756
756
|
const {
|
|
757
757
|
machine: s
|
|
758
758
|
} = r, i = typeof e == "function", a = i ? e : s.implementations.guards[typeof e == "string" ? e : e.type];
|
|
759
759
|
if (!i && !a)
|
|
760
760
|
throw new Error(`Guard '${typeof e == "string" ? e : e.type}' is not implemented.'.`);
|
|
761
761
|
if (typeof a != "function")
|
|
762
|
-
return
|
|
762
|
+
return Qn(a, t, n, r);
|
|
763
763
|
const u = {
|
|
764
764
|
context: t,
|
|
765
765
|
event: n
|
|
@@ -774,7 +774,7 @@ function Zn(e, t, n, r) {
|
|
|
774
774
|
// this holds all params
|
|
775
775
|
) : a(u, d);
|
|
776
776
|
}
|
|
777
|
-
const
|
|
777
|
+
const er = (e) => e.type === "atomic" || e.type === "final";
|
|
778
778
|
function ct(e) {
|
|
779
779
|
return Object.values(e.states).filter((t) => t.type !== "history");
|
|
780
780
|
}
|
|
@@ -788,14 +788,14 @@ function Ot(e, t) {
|
|
|
788
788
|
return n;
|
|
789
789
|
}
|
|
790
790
|
function Qt(e) {
|
|
791
|
-
const t = new Set(e), n =
|
|
791
|
+
const t = new Set(e), n = Rs(t);
|
|
792
792
|
for (const r of t)
|
|
793
793
|
if (r.type === "compound" && (!n.get(r) || !n.get(r).length))
|
|
794
|
-
|
|
794
|
+
Wr(r).forEach((s) => t.add(s));
|
|
795
795
|
else if (r.type === "parallel") {
|
|
796
796
|
for (const s of ct(r))
|
|
797
797
|
if (s.type !== "history" && !t.has(s)) {
|
|
798
|
-
const i =
|
|
798
|
+
const i = Wr(s);
|
|
799
799
|
for (const a of i)
|
|
800
800
|
t.add(a);
|
|
801
801
|
}
|
|
@@ -807,35 +807,35 @@ function Qt(e) {
|
|
|
807
807
|
}
|
|
808
808
|
return t;
|
|
809
809
|
}
|
|
810
|
-
function
|
|
810
|
+
function ws(e, t) {
|
|
811
811
|
const n = t.get(e);
|
|
812
812
|
if (!n)
|
|
813
813
|
return {};
|
|
814
814
|
if (e.type === "compound") {
|
|
815
815
|
const s = n[0];
|
|
816
816
|
if (s) {
|
|
817
|
-
if (
|
|
817
|
+
if (er(s))
|
|
818
818
|
return s.key;
|
|
819
819
|
} else
|
|
820
820
|
return {};
|
|
821
821
|
}
|
|
822
822
|
const r = {};
|
|
823
823
|
for (const s of n)
|
|
824
|
-
r[s.key] =
|
|
824
|
+
r[s.key] = ws(s, t);
|
|
825
825
|
return r;
|
|
826
826
|
}
|
|
827
|
-
function
|
|
827
|
+
function Rs(e) {
|
|
828
828
|
const t = /* @__PURE__ */ new Map();
|
|
829
829
|
for (const n of e)
|
|
830
830
|
t.has(n) || t.set(n, []), n.parent && (t.has(n.parent) || t.set(n.parent, []), t.get(n.parent).push(n));
|
|
831
831
|
return t;
|
|
832
832
|
}
|
|
833
|
-
function
|
|
833
|
+
function Ts(e, t) {
|
|
834
834
|
const n = Qt(t);
|
|
835
|
-
return
|
|
835
|
+
return ws(e, Rs(n));
|
|
836
836
|
}
|
|
837
|
-
function
|
|
838
|
-
return t.type === "compound" ? ct(t).some((n) => n.type === "final" && e.has(n)) : t.type === "parallel" ? ct(t).every((n) =>
|
|
837
|
+
function tr(e, t) {
|
|
838
|
+
return t.type === "compound" ? ct(t).some((n) => n.type === "final" && e.has(n)) : t.type === "parallel" ? ct(t).every((n) => tr(e, n)) : t.type === "final";
|
|
839
839
|
}
|
|
840
840
|
const rn = (e) => e[0] === Io;
|
|
841
841
|
function Zo(e, t) {
|
|
@@ -886,7 +886,7 @@ function Qo(e) {
|
|
|
886
886
|
});
|
|
887
887
|
}
|
|
888
888
|
function Ke(e, t, n) {
|
|
889
|
-
const r =
|
|
889
|
+
const r = bs(n.target), s = n.reenter ?? !1, i = ni(e, r), a = {
|
|
890
890
|
...n,
|
|
891
891
|
actions: $e(n.actions),
|
|
892
892
|
guard: n.guard,
|
|
@@ -906,7 +906,7 @@ function ei(e) {
|
|
|
906
906
|
const t = /* @__PURE__ */ new Map();
|
|
907
907
|
if (e.config.on)
|
|
908
908
|
for (const n of Object.keys(e.config.on)) {
|
|
909
|
-
if (n ===
|
|
909
|
+
if (n === ps)
|
|
910
910
|
throw new Error('Null events ("") cannot be specified as a transition key. Use `always: { ... }` instead.');
|
|
911
911
|
const r = e.config.on[n];
|
|
912
912
|
t.set(n, it(r).map((s) => Ke(e, n, s)));
|
|
@@ -960,7 +960,7 @@ function ni(e, t) {
|
|
|
960
960
|
return n;
|
|
961
961
|
if (rn(n))
|
|
962
962
|
return e.machine.getStateNodeById(n);
|
|
963
|
-
const r = n[0] ===
|
|
963
|
+
const r = n[0] === hs;
|
|
964
964
|
if (r && !e.parent)
|
|
965
965
|
return en(e, n.slice(1));
|
|
966
966
|
const s = r ? e.key + n : n;
|
|
@@ -975,8 +975,8 @@ ${i.message}`);
|
|
|
975
975
|
throw new Error(`Invalid target: "${n}" is not a valid target from the root node. Did you mean ".${n}"?`);
|
|
976
976
|
});
|
|
977
977
|
}
|
|
978
|
-
function
|
|
979
|
-
const t =
|
|
978
|
+
function Os(e) {
|
|
979
|
+
const t = bs(e.config.target);
|
|
980
980
|
return t ? {
|
|
981
981
|
target: t.map((n) => typeof n == "string" ? en(e.parent, n) : n)
|
|
982
982
|
} : e.parent.initial;
|
|
@@ -984,14 +984,14 @@ function Ts(e) {
|
|
|
984
984
|
function Ge(e) {
|
|
985
985
|
return e.type === "history";
|
|
986
986
|
}
|
|
987
|
-
function
|
|
988
|
-
const t =
|
|
987
|
+
function Wr(e) {
|
|
988
|
+
const t = Cs(e);
|
|
989
989
|
for (const n of t)
|
|
990
990
|
for (const r of Ot(n, e))
|
|
991
991
|
t.add(r);
|
|
992
992
|
return t;
|
|
993
993
|
}
|
|
994
|
-
function
|
|
994
|
+
function Cs(e) {
|
|
995
995
|
const t = /* @__PURE__ */ new Set();
|
|
996
996
|
function n(r) {
|
|
997
997
|
if (!t.has(r)) {
|
|
@@ -1020,7 +1020,7 @@ function en(e, t) {
|
|
|
1020
1020
|
return e.machine.getStateNodeById(t);
|
|
1021
1021
|
} catch {
|
|
1022
1022
|
}
|
|
1023
|
-
const n =
|
|
1023
|
+
const n = Gn(t).slice();
|
|
1024
1024
|
let r = e;
|
|
1025
1025
|
for (; n.length; ) {
|
|
1026
1026
|
const s = n.shift();
|
|
@@ -1051,7 +1051,7 @@ function ri(e, t, n, r) {
|
|
|
1051
1051
|
return !i || !i.length ? e.next(n, r) : i;
|
|
1052
1052
|
}
|
|
1053
1053
|
function si(e, t, n, r) {
|
|
1054
|
-
const s = Object.keys(t), i = ft(e, s[0]), a =
|
|
1054
|
+
const s = Object.keys(t), i = ft(e, s[0]), a = nr(i, t[s[0]], n, r);
|
|
1055
1055
|
return !a || !a.length ? e.next(n, r) : a;
|
|
1056
1056
|
}
|
|
1057
1057
|
function oi(e, t, n, r) {
|
|
@@ -1060,12 +1060,12 @@ function oi(e, t, n, r) {
|
|
|
1060
1060
|
const a = t[i];
|
|
1061
1061
|
if (!a)
|
|
1062
1062
|
continue;
|
|
1063
|
-
const u = ft(e, i), d =
|
|
1063
|
+
const u = ft(e, i), d = nr(u, a, n, r);
|
|
1064
1064
|
d && s.push(...d);
|
|
1065
1065
|
}
|
|
1066
1066
|
return s.length ? s : e.next(n, r);
|
|
1067
1067
|
}
|
|
1068
|
-
function
|
|
1068
|
+
function nr(e, t, n, r) {
|
|
1069
1069
|
return typeof t == "string" ? ri(e, t, n, r) : Object.keys(t).length === 1 ? si(e, t, n, r) : oi(e, t, n, r);
|
|
1070
1070
|
}
|
|
1071
1071
|
function ii(e) {
|
|
@@ -1087,7 +1087,7 @@ function ai(e, t) {
|
|
|
1087
1087
|
return !0;
|
|
1088
1088
|
return !1;
|
|
1089
1089
|
}
|
|
1090
|
-
function
|
|
1090
|
+
function As(e, t, n) {
|
|
1091
1091
|
const r = /* @__PURE__ */ new Set();
|
|
1092
1092
|
for (const s of e) {
|
|
1093
1093
|
let i = !1;
|
|
@@ -1114,7 +1114,7 @@ function ui(e) {
|
|
|
1114
1114
|
if (n.every((s) => Fe(s, r)))
|
|
1115
1115
|
return r;
|
|
1116
1116
|
}
|
|
1117
|
-
function
|
|
1117
|
+
function rr(e, t) {
|
|
1118
1118
|
if (!e.target)
|
|
1119
1119
|
return [];
|
|
1120
1120
|
const n = /* @__PURE__ */ new Set();
|
|
@@ -1124,14 +1124,14 @@ function nr(e, t) {
|
|
|
1124
1124
|
for (const s of t[r.id])
|
|
1125
1125
|
n.add(s);
|
|
1126
1126
|
else
|
|
1127
|
-
for (const s of
|
|
1127
|
+
for (const s of rr(Os(r), t))
|
|
1128
1128
|
n.add(s);
|
|
1129
1129
|
else
|
|
1130
1130
|
n.add(r);
|
|
1131
1131
|
return [...n];
|
|
1132
1132
|
}
|
|
1133
|
-
function
|
|
1134
|
-
const n =
|
|
1133
|
+
function ks(e, t) {
|
|
1134
|
+
const n = rr(e, t);
|
|
1135
1135
|
if (!n)
|
|
1136
1136
|
return;
|
|
1137
1137
|
if (!e.reenter && n.every((s) => s === e.source || Fe(s, e.source)))
|
|
@@ -1147,7 +1147,7 @@ function Bn(e, t, n) {
|
|
|
1147
1147
|
const r = /* @__PURE__ */ new Set();
|
|
1148
1148
|
for (const i of e)
|
|
1149
1149
|
if ((s = i.target) != null && s.length) {
|
|
1150
|
-
const a =
|
|
1150
|
+
const a = ks(i, n);
|
|
1151
1151
|
i.reenter && i.source === a && r.add(a);
|
|
1152
1152
|
for (const u of t)
|
|
1153
1153
|
Fe(u, a) && r.add(u);
|
|
@@ -1167,7 +1167,7 @@ function Wn(e, t, n, r, s, i) {
|
|
|
1167
1167
|
return t;
|
|
1168
1168
|
const a = new Set(t._nodes);
|
|
1169
1169
|
let u = t.historyValue;
|
|
1170
|
-
const d =
|
|
1170
|
+
const d = As(e, a, u);
|
|
1171
1171
|
let l = t;
|
|
1172
1172
|
s || ([l, u] = hi(l, r, n, d, a, u, i)), l = lt(l, r, n, d.flatMap((h) => h.actions), i), l = li(l, r, n, d, a, i, u, s);
|
|
1173
1173
|
const y = [...a];
|
|
@@ -1208,7 +1208,7 @@ function li(e, t, n, r, s, i, a, u) {
|
|
|
1208
1208
|
if (d = lt(d, t, n, S, i, E.invoke.map((_) => _.id)), E.type === "final") {
|
|
1209
1209
|
const _ = E.parent;
|
|
1210
1210
|
let O = (_ == null ? void 0 : _.type) === "parallel" ? _ : _ == null ? void 0 : _.parent, D = O || E;
|
|
1211
|
-
for ((_ == null ? void 0 : _.type) === "compound" && i.push(Ln(_.id, E.output !== void 0 ? Un(E.output, d.context, t, n.self) : void 0)); (O == null ? void 0 : O.type) === "parallel" && !h.has(O) &&
|
|
1211
|
+
for ((_ == null ? void 0 : _.type) === "compound" && i.push(Ln(_.id, E.output !== void 0 ? Un(E.output, d.context, t, n.self) : void 0)); (O == null ? void 0 : O.type) === "parallel" && !h.has(O) && tr(s, O); )
|
|
1212
1212
|
h.add(O), i.push(Ln(O.id)), D = O, O = O.parent;
|
|
1213
1213
|
if (O)
|
|
1214
1214
|
continue;
|
|
@@ -1222,17 +1222,17 @@ function li(e, t, n, r, s, i, a, u) {
|
|
|
1222
1222
|
}
|
|
1223
1223
|
function di(e, t, n, r) {
|
|
1224
1224
|
for (const s of e) {
|
|
1225
|
-
const i =
|
|
1225
|
+
const i = ks(s, t);
|
|
1226
1226
|
for (const u of s.target || [])
|
|
1227
1227
|
!Ge(u) && // if the target is different than the source then it will *definitely* be entered
|
|
1228
1228
|
(s.source !== u || // we know that the domain can't lie within the source
|
|
1229
1229
|
// if it's different than the source then it's outside of it and it means that the target has to be entered as well
|
|
1230
1230
|
s.source !== i || // reentering transitions always enter the target, even if it's the source itself
|
|
1231
1231
|
s.reenter) && (r.add(u), n.add(u)), at(u, t, n, r);
|
|
1232
|
-
const a =
|
|
1232
|
+
const a = rr(s, t);
|
|
1233
1233
|
for (const u of a) {
|
|
1234
1234
|
const d = Ot(u, i);
|
|
1235
|
-
(i == null ? void 0 : i.type) === "parallel" && d.push(i),
|
|
1235
|
+
(i == null ? void 0 : i.type) === "parallel" && d.push(i), xs(r, t, n, d, !s.source.parent && s.reenter ? void 0 : i);
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
1238
|
}
|
|
@@ -1246,7 +1246,7 @@ function at(e, t, n, r) {
|
|
|
1246
1246
|
for (const a of i)
|
|
1247
1247
|
In(a, e.parent, r, t, n);
|
|
1248
1248
|
} else {
|
|
1249
|
-
const i =
|
|
1249
|
+
const i = Os(e);
|
|
1250
1250
|
for (const a of i.target)
|
|
1251
1251
|
r.add(a), i === ((s = e.parent) == null ? void 0 : s.initial) && n.add(e.parent), at(a, t, n, r);
|
|
1252
1252
|
for (const a of i.target)
|
|
@@ -1259,14 +1259,14 @@ function at(e, t, n, r) {
|
|
|
1259
1259
|
for (const i of ct(e).filter((a) => !Ge(a)))
|
|
1260
1260
|
[...r].some((a) => Fe(a, i)) || (Ge(i) || (r.add(i), n.add(i)), at(i, t, n, r));
|
|
1261
1261
|
}
|
|
1262
|
-
function
|
|
1262
|
+
function xs(e, t, n, r, s) {
|
|
1263
1263
|
for (const i of r)
|
|
1264
1264
|
if ((!s || Fe(i, s)) && e.add(i), i.type === "parallel")
|
|
1265
1265
|
for (const a of ct(i).filter((u) => !Ge(u)))
|
|
1266
1266
|
[...e].some((u) => Fe(u, a)) || (e.add(a), at(a, t, n, e));
|
|
1267
1267
|
}
|
|
1268
1268
|
function In(e, t, n, r, s) {
|
|
1269
|
-
|
|
1269
|
+
xs(n, r, s, Ot(e, t));
|
|
1270
1270
|
}
|
|
1271
1271
|
function hi(e, t, n, r, s, i, a) {
|
|
1272
1272
|
let u = e;
|
|
@@ -1276,15 +1276,15 @@ function hi(e, t, n, r, s, i, a) {
|
|
|
1276
1276
|
for (const y of d)
|
|
1277
1277
|
for (const h of ii(y)) {
|
|
1278
1278
|
let E;
|
|
1279
|
-
h.history === "deep" ? E = (S) =>
|
|
1279
|
+
h.history === "deep" ? E = (S) => er(S) && Fe(S, y) : E = (S) => S.parent === y, l ?? (l = {
|
|
1280
1280
|
...i
|
|
1281
1281
|
}), l[h.id] = Array.from(s).filter(E);
|
|
1282
1282
|
}
|
|
1283
1283
|
for (const y of d)
|
|
1284
|
-
u = lt(u, t, n, [...y.exit, ...y.invoke.map((h) =>
|
|
1284
|
+
u = lt(u, t, n, [...y.exit, ...y.invoke.map((h) => Ss(h.id))], a), s.delete(y);
|
|
1285
1285
|
return [u, l || i];
|
|
1286
1286
|
}
|
|
1287
|
-
function
|
|
1287
|
+
function Ps(e, t, n, r, s, i) {
|
|
1288
1288
|
const {
|
|
1289
1289
|
machine: a
|
|
1290
1290
|
} = e;
|
|
@@ -1332,12 +1332,12 @@ function xs(e, t, n, r, s, i) {
|
|
|
1332
1332
|
// this holds all params
|
|
1333
1333
|
s
|
|
1334
1334
|
);
|
|
1335
|
-
u = O, "retryResolve" in _ && (i == null || i.push([_, D])), "execute" in _ && (n.self._processingStatus === fe.Running ? _.execute(n, D) : n.defer(_.execute.bind(null, n, D))), L && (u =
|
|
1335
|
+
u = O, "retryResolve" in _ && (i == null || i.push([_, D])), "execute" in _ && (n.self._processingStatus === fe.Running ? _.execute(n, D) : n.defer(_.execute.bind(null, n, D))), L && (u = Ps(u, t, n, L, s, i));
|
|
1336
1336
|
}
|
|
1337
1337
|
return u;
|
|
1338
1338
|
}
|
|
1339
1339
|
function lt(e, t, n, r, s, i) {
|
|
1340
|
-
const a = i ? [] : void 0, u =
|
|
1340
|
+
const a = i ? [] : void 0, u = Ps(e, t, n, r, {
|
|
1341
1341
|
internalQueue: s,
|
|
1342
1342
|
deferredActorIds: i
|
|
1343
1343
|
}, a);
|
|
@@ -1358,15 +1358,15 @@ function jn(e, t, n, r = []) {
|
|
|
1358
1358
|
}), i.push(l);
|
|
1359
1359
|
}
|
|
1360
1360
|
if (t.type === Rt)
|
|
1361
|
-
return s = Xe(
|
|
1361
|
+
return s = Xe(Vr(s, t, n), {
|
|
1362
1362
|
status: "stopped"
|
|
1363
1363
|
}), a(s, t, []), {
|
|
1364
1364
|
snapshot: s,
|
|
1365
1365
|
microstates: i
|
|
1366
1366
|
};
|
|
1367
1367
|
let u = t;
|
|
1368
|
-
if (u.type !==
|
|
1369
|
-
const l = u, y = Bo(l), h =
|
|
1368
|
+
if (u.type !== ys) {
|
|
1369
|
+
const l = u, y = Bo(l), h = zr(l, s);
|
|
1370
1370
|
if (y && !h.length)
|
|
1371
1371
|
return s = Xe(e, {
|
|
1372
1372
|
status: "error",
|
|
@@ -1392,44 +1392,44 @@ function jn(e, t, n, r = []) {
|
|
|
1392
1392
|
if (!l.length) {
|
|
1393
1393
|
if (!r.length)
|
|
1394
1394
|
break;
|
|
1395
|
-
u = r.shift(), l =
|
|
1395
|
+
u = r.shift(), l = zr(u, s);
|
|
1396
1396
|
}
|
|
1397
1397
|
s = Wn(l, s, n, u, !1, r), d = s !== y, a(s, u, l);
|
|
1398
1398
|
}
|
|
1399
|
-
return s.status !== "active" &&
|
|
1399
|
+
return s.status !== "active" && Vr(s, u, n), {
|
|
1400
1400
|
snapshot: s,
|
|
1401
1401
|
microstates: i
|
|
1402
1402
|
};
|
|
1403
1403
|
}
|
|
1404
|
-
function
|
|
1405
|
-
return lt(e, t, n, Object.values(e.children).map((r) =>
|
|
1404
|
+
function Vr(e, t, n) {
|
|
1405
|
+
return lt(e, t, n, Object.values(e.children).map((r) => Ss(r)), []);
|
|
1406
1406
|
}
|
|
1407
|
-
function
|
|
1407
|
+
function zr(e, t) {
|
|
1408
1408
|
return t.machine.getTransitionData(t, e);
|
|
1409
1409
|
}
|
|
1410
1410
|
function pi(e, t) {
|
|
1411
|
-
const n = /* @__PURE__ */ new Set(), r = e._nodes.filter(
|
|
1411
|
+
const n = /* @__PURE__ */ new Set(), r = e._nodes.filter(er);
|
|
1412
1412
|
for (const s of r)
|
|
1413
1413
|
e:
|
|
1414
1414
|
for (const i of [s].concat(Ot(s, void 0)))
|
|
1415
1415
|
if (i.always) {
|
|
1416
1416
|
for (const a of i.always)
|
|
1417
|
-
if (a.guard === void 0 ||
|
|
1417
|
+
if (a.guard === void 0 || Qn(a.guard, e.context, t, e)) {
|
|
1418
1418
|
n.add(a);
|
|
1419
1419
|
break e;
|
|
1420
1420
|
}
|
|
1421
1421
|
}
|
|
1422
|
-
return
|
|
1422
|
+
return As(Array.from(n), new Set(e._nodes), e.historyValue);
|
|
1423
1423
|
}
|
|
1424
1424
|
function yi(e, t) {
|
|
1425
1425
|
const n = Qt(tn(e, t));
|
|
1426
|
-
return
|
|
1426
|
+
return Ts(e, [...n]);
|
|
1427
1427
|
}
|
|
1428
1428
|
function mi(e) {
|
|
1429
1429
|
return !!e && typeof e == "object" && "machine" in e && "value" in e;
|
|
1430
1430
|
}
|
|
1431
1431
|
const vi = function(t) {
|
|
1432
|
-
return
|
|
1432
|
+
return gs(t, this.value);
|
|
1433
1433
|
}, gi = function(t) {
|
|
1434
1434
|
return this.tags.has(t);
|
|
1435
1435
|
}, _i = function(t) {
|
|
@@ -1463,7 +1463,7 @@ function Jt(e, t) {
|
|
|
1463
1463
|
machine: t,
|
|
1464
1464
|
context: e.context,
|
|
1465
1465
|
_nodes: e._nodes,
|
|
1466
|
-
value:
|
|
1466
|
+
value: Ts(t.root, e._nodes),
|
|
1467
1467
|
tags: new Set(e._nodes.flatMap((n) => n.tags)),
|
|
1468
1468
|
children: e.children,
|
|
1469
1469
|
historyValue: e.historyValue || {},
|
|
@@ -1505,11 +1505,11 @@ function Si(e, t) {
|
|
|
1505
1505
|
}
|
|
1506
1506
|
return {
|
|
1507
1507
|
...E,
|
|
1508
|
-
context:
|
|
1508
|
+
context: Is(a),
|
|
1509
1509
|
children: S
|
|
1510
1510
|
};
|
|
1511
1511
|
}
|
|
1512
|
-
function
|
|
1512
|
+
function Is(e) {
|
|
1513
1513
|
let t;
|
|
1514
1514
|
for (const n in e) {
|
|
1515
1515
|
const r = e[n];
|
|
@@ -1518,11 +1518,11 @@ function Ps(e) {
|
|
|
1518
1518
|
t ?? (t = Array.isArray(e) ? e.slice() : {
|
|
1519
1519
|
...e
|
|
1520
1520
|
}), t[n] = {
|
|
1521
|
-
xstate$$type:
|
|
1521
|
+
xstate$$type: Zn,
|
|
1522
1522
|
id: r.id
|
|
1523
1523
|
};
|
|
1524
1524
|
else {
|
|
1525
|
-
const s =
|
|
1525
|
+
const s = Is(r);
|
|
1526
1526
|
s !== r && (t ?? (t = Array.isArray(e) ? e.slice() : {
|
|
1527
1527
|
...e
|
|
1528
1528
|
}), t[n] = s);
|
|
@@ -1572,7 +1572,7 @@ function Ti(e, t) {
|
|
|
1572
1572
|
}
|
|
1573
1573
|
return n.type = "xstate.raise", n.event = e, n.id = t == null ? void 0 : t.id, n.delay = t == null ? void 0 : t.delay, n.resolve = wi, n.execute = Ri, n;
|
|
1574
1574
|
}
|
|
1575
|
-
const
|
|
1575
|
+
const Hr = /* @__PURE__ */ new WeakMap();
|
|
1576
1576
|
function Oi(e) {
|
|
1577
1577
|
return {
|
|
1578
1578
|
config: e,
|
|
@@ -1584,7 +1584,7 @@ function Oi(e) {
|
|
|
1584
1584
|
receivers: void 0,
|
|
1585
1585
|
dispose: void 0
|
|
1586
1586
|
};
|
|
1587
|
-
|
|
1587
|
+
Hr.set(s, a), a.dispose = e({
|
|
1588
1588
|
input: n.input,
|
|
1589
1589
|
system: i,
|
|
1590
1590
|
self: s,
|
|
@@ -1598,7 +1598,7 @@ function Oi(e) {
|
|
|
1598
1598
|
},
|
|
1599
1599
|
transition: (n, r, s) => {
|
|
1600
1600
|
var a, u;
|
|
1601
|
-
const i =
|
|
1601
|
+
const i = Hr.get(s.self);
|
|
1602
1602
|
return r.type === Rt ? (n = {
|
|
1603
1603
|
...n,
|
|
1604
1604
|
status: "stopped",
|
|
@@ -1615,7 +1615,7 @@ function Oi(e) {
|
|
|
1615
1615
|
restoreSnapshot: (n) => n
|
|
1616
1616
|
};
|
|
1617
1617
|
}
|
|
1618
|
-
const
|
|
1618
|
+
const qr = "xstate.promise.resolve", Yr = "xstate.promise.reject";
|
|
1619
1619
|
function Dn(e) {
|
|
1620
1620
|
return {
|
|
1621
1621
|
config: e,
|
|
@@ -1623,7 +1623,7 @@ function Dn(e) {
|
|
|
1623
1623
|
if (n.status !== "active")
|
|
1624
1624
|
return n;
|
|
1625
1625
|
switch (r.type) {
|
|
1626
|
-
case
|
|
1626
|
+
case qr: {
|
|
1627
1627
|
const s = r.data;
|
|
1628
1628
|
return {
|
|
1629
1629
|
...n,
|
|
@@ -1632,7 +1632,7 @@ function Dn(e) {
|
|
|
1632
1632
|
input: void 0
|
|
1633
1633
|
};
|
|
1634
1634
|
}
|
|
1635
|
-
case
|
|
1635
|
+
case Yr:
|
|
1636
1636
|
return {
|
|
1637
1637
|
...n,
|
|
1638
1638
|
status: "error",
|
|
@@ -1661,12 +1661,12 @@ function Dn(e) {
|
|
|
1661
1661
|
self: r
|
|
1662
1662
|
})).then((a) => {
|
|
1663
1663
|
r.getSnapshot().status === "active" && s._relay(r, r, {
|
|
1664
|
-
type:
|
|
1664
|
+
type: qr,
|
|
1665
1665
|
data: a
|
|
1666
1666
|
});
|
|
1667
1667
|
}, (a) => {
|
|
1668
1668
|
r.getSnapshot().status === "active" && s._relay(r, r, {
|
|
1669
|
-
type:
|
|
1669
|
+
type: Yr,
|
|
1670
1670
|
data: a
|
|
1671
1671
|
});
|
|
1672
1672
|
});
|
|
@@ -1691,7 +1691,7 @@ function Ci(e, {
|
|
|
1691
1691
|
input: l
|
|
1692
1692
|
} = u;
|
|
1693
1693
|
if (typeof a == "string") {
|
|
1694
|
-
const y =
|
|
1694
|
+
const y = Xn(t, a);
|
|
1695
1695
|
if (!y)
|
|
1696
1696
|
throw new Error(`Actor logic '${a}' not implemented in machine '${t.id}'`);
|
|
1697
1697
|
const h = ut(y, {
|
|
@@ -1758,7 +1758,7 @@ function ge(e) {
|
|
|
1758
1758
|
}
|
|
1759
1759
|
return t.type = "xstate.assign", t.assignment = e, t.resolve = Ai, t;
|
|
1760
1760
|
}
|
|
1761
|
-
let
|
|
1761
|
+
let Jr = /* @__PURE__ */ function(e) {
|
|
1762
1762
|
return e.Parent = "#_parent", e.Internal = "#_internal", e;
|
|
1763
1763
|
}({});
|
|
1764
1764
|
function ki(e, t, n, r, {
|
|
@@ -1781,7 +1781,7 @@ function ki(e, t, n, r, {
|
|
|
1781
1781
|
const E = typeof s == "function" ? s(n, r) : s;
|
|
1782
1782
|
let S;
|
|
1783
1783
|
if (typeof E == "string") {
|
|
1784
|
-
if (E ===
|
|
1784
|
+
if (E === Jr.Parent ? S = e.self._parent : E === Jr.Internal ? S = e.self : E.startsWith("#_") ? S = t.children[E.slice(2)] : S = (_ = d.deferredActorIds) != null && _.includes(E) ? E : t.children[E], !S)
|
|
1785
1785
|
throw new Error(`Unable to send event to actor '${E}' from machine '${t.machine.id}'.`);
|
|
1786
1786
|
} else
|
|
1787
1787
|
S = E || e.self;
|
|
@@ -1812,21 +1812,21 @@ function Pi(e, t) {
|
|
|
1812
1812
|
// at this point, in a deferred task, it should already be mutated by retryResolveSendTo
|
|
1813
1813
|
// if it initially started as a string
|
|
1814
1814
|
n,
|
|
1815
|
-
r.type === Do ?
|
|
1815
|
+
r.type === Do ? ms(e.self.id, r.data) : r
|
|
1816
1816
|
);
|
|
1817
1817
|
});
|
|
1818
1818
|
}
|
|
1819
|
-
function
|
|
1819
|
+
function Kr(e, t, n) {
|
|
1820
1820
|
function r(s, i) {
|
|
1821
1821
|
}
|
|
1822
1822
|
return r.type = "xsnapshot.sendTo", r.to = e, r.event = t, r.id = n == null ? void 0 : n.id, r.delay = n == null ? void 0 : n.delay, r.resolve = ki, r.retryResolve = xi, r.execute = Pi, r;
|
|
1823
1823
|
}
|
|
1824
|
-
const
|
|
1824
|
+
const Gr = /* @__PURE__ */ new WeakMap();
|
|
1825
1825
|
function ot(e, t, n) {
|
|
1826
|
-
let r =
|
|
1826
|
+
let r = Gr.get(e);
|
|
1827
1827
|
return r ? t in r || (r[t] = n()) : (r = {
|
|
1828
1828
|
[t]: n()
|
|
1829
|
-
},
|
|
1829
|
+
}, Gr.set(e, r)), r[t];
|
|
1830
1830
|
}
|
|
1831
1831
|
const Ii = {}, _t = (e) => typeof e == "string" ? {
|
|
1832
1832
|
type: e
|
|
@@ -1835,9 +1835,9 @@ const Ii = {}, _t = (e) => typeof e == "string" ? {
|
|
|
1835
1835
|
} : {
|
|
1836
1836
|
type: e.name
|
|
1837
1837
|
} : e;
|
|
1838
|
-
class
|
|
1838
|
+
class sr {
|
|
1839
1839
|
constructor(t, n) {
|
|
1840
|
-
if (this.config = t, this.key = void 0, this.id = void 0, this.type = void 0, this.path = void 0, this.states = void 0, this.history = void 0, this.entry = void 0, this.exit = void 0, this.parent = void 0, this.machine = void 0, this.meta = void 0, this.output = void 0, this.order = -1, this.description = void 0, this.tags = [], this.transitions = void 0, this.always = void 0, this.parent = n._parent, this.key = n._key, this.machine = n._machine, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.id = this.config.id || [this.machine.id, ...this.path].join(
|
|
1840
|
+
if (this.config = t, this.key = void 0, this.id = void 0, this.type = void 0, this.path = void 0, this.states = void 0, this.history = void 0, this.entry = void 0, this.exit = void 0, this.parent = void 0, this.machine = void 0, this.meta = void 0, this.output = void 0, this.order = -1, this.description = void 0, this.tags = [], this.transitions = void 0, this.always = void 0, this.parent = n._parent, this.key = n._key, this.machine = n._machine, this.path = this.parent ? this.parent.path.concat(this.key) : [], this.id = this.config.id || [this.machine.id, ...this.path].join(hs), this.type = this.config.type || (this.config.states && Object.keys(this.config.states).length ? "compound" : this.config.history ? "history" : "atomic"), this.description = this.config.description, this.order = this.machine.idMap.size, this.machine.idMap.set(this.id, this), this.states = this.config.states ? Lr(this.config.states, (r, s) => new sr(r, {
|
|
1841
1841
|
_parent: this,
|
|
1842
1842
|
_key: s,
|
|
1843
1843
|
_machine: this.machine
|
|
@@ -1847,7 +1847,7 @@ class rr {
|
|
|
1847
1847
|
}
|
|
1848
1848
|
/** @internal */
|
|
1849
1849
|
_initialize() {
|
|
1850
|
-
this.transitions = ei(this), this.config.always && (this.always = it(this.config.always).map((t) => Ke(this,
|
|
1850
|
+
this.transitions = ei(this), this.config.always && (this.always = it(this.config.always).map((t) => Ke(this, ps, t))), Object.keys(this.states).forEach((t) => {
|
|
1851
1851
|
this.states[t]._initialize();
|
|
1852
1852
|
});
|
|
1853
1853
|
}
|
|
@@ -1874,7 +1874,7 @@ class rr {
|
|
|
1874
1874
|
})
|
|
1875
1875
|
} : void 0,
|
|
1876
1876
|
history: this.history,
|
|
1877
|
-
states:
|
|
1877
|
+
states: Lr(this.states, (t) => t.definition),
|
|
1878
1878
|
on: this.on,
|
|
1879
1879
|
transitions: [...this.transitions.values()].flat().map((t) => ({
|
|
1880
1880
|
...t,
|
|
@@ -1902,7 +1902,7 @@ class rr {
|
|
|
1902
1902
|
const {
|
|
1903
1903
|
src: r,
|
|
1904
1904
|
systemId: s
|
|
1905
|
-
} = t, i = t.id ??
|
|
1905
|
+
} = t, i = t.id ?? Br(this.id, n), a = typeof r == "string" ? r : `xstate.invoke.${Br(this.id, n)}`;
|
|
1906
1906
|
return {
|
|
1907
1907
|
...t,
|
|
1908
1908
|
src: a,
|
|
@@ -1947,7 +1947,7 @@ class rr {
|
|
|
1947
1947
|
} = u, l = t.context;
|
|
1948
1948
|
let y = !1;
|
|
1949
1949
|
try {
|
|
1950
|
-
y = !d ||
|
|
1950
|
+
y = !d || Qn(d, l, n, t);
|
|
1951
1951
|
} catch (h) {
|
|
1952
1952
|
const E = typeof d == "string" ? d : typeof d == "object" ? d.type : void 0;
|
|
1953
1953
|
throw new Error(`Unable to evaluate guard ${E ? `'${E}' ` : ""}in transition for event '${r}' in state node '${this.id}':
|
|
@@ -1989,14 +1989,14 @@ ${h.message}`);
|
|
|
1989
1989
|
}
|
|
1990
1990
|
}
|
|
1991
1991
|
const ji = "#";
|
|
1992
|
-
class
|
|
1992
|
+
class or {
|
|
1993
1993
|
constructor(t, n) {
|
|
1994
1994
|
this.config = t, this.version = void 0, this.schemas = void 0, this.implementations = void 0, this.__xstatenode = !0, this.idMap = /* @__PURE__ */ new Map(), this.root = void 0, this.id = void 0, this.states = void 0, this.events = void 0, this.__TResolvedTypesMeta = void 0, this.id = t.id || "(machine)", this.implementations = {
|
|
1995
1995
|
actors: (n == null ? void 0 : n.actors) ?? {},
|
|
1996
1996
|
actions: (n == null ? void 0 : n.actions) ?? {},
|
|
1997
1997
|
delays: (n == null ? void 0 : n.delays) ?? {},
|
|
1998
1998
|
guards: (n == null ? void 0 : n.guards) ?? {}
|
|
1999
|
-
}, this.version = this.config.version, this.schemas = this.config.schemas, this.transition = this.transition.bind(this), this.getInitialSnapshot = this.getInitialSnapshot.bind(this), this.getPersistedSnapshot = this.getPersistedSnapshot.bind(this), this.restoreSnapshot = this.restoreSnapshot.bind(this), this.start = this.start.bind(this), this.root = new
|
|
1999
|
+
}, this.version = this.config.version, this.schemas = this.config.schemas, this.transition = this.transition.bind(this), this.getInitialSnapshot = this.getInitialSnapshot.bind(this), this.getPersistedSnapshot = this.getPersistedSnapshot.bind(this), this.restoreSnapshot = this.restoreSnapshot.bind(this), this.start = this.start.bind(this), this.root = new sr(t, {
|
|
2000
2000
|
_key: this.id,
|
|
2001
2001
|
_machine: this
|
|
2002
2002
|
}), this.root._initialize(), this.states = this.root.states, this.events = this.root.events;
|
|
@@ -2017,7 +2017,7 @@ class sr {
|
|
|
2017
2017
|
actors: s,
|
|
2018
2018
|
delays: i
|
|
2019
2019
|
} = this.implementations;
|
|
2020
|
-
return new
|
|
2020
|
+
return new or(this.config, {
|
|
2021
2021
|
actions: {
|
|
2022
2022
|
...n,
|
|
2023
2023
|
...t.actions
|
|
@@ -2042,7 +2042,7 @@ class sr {
|
|
|
2042
2042
|
_nodes: [...r],
|
|
2043
2043
|
context: t.context || {},
|
|
2044
2044
|
children: {},
|
|
2045
|
-
status:
|
|
2045
|
+
status: tr(r, this.root) ? "done" : t.status || "active",
|
|
2046
2046
|
output: t.output,
|
|
2047
2047
|
error: t.error,
|
|
2048
2048
|
historyValue: t.historyValue
|
|
@@ -2069,7 +2069,7 @@ class sr {
|
|
|
2069
2069
|
return jn(t, n, r).microstates;
|
|
2070
2070
|
}
|
|
2071
2071
|
getTransitionData(t, n) {
|
|
2072
|
-
return
|
|
2072
|
+
return nr(this.root, t.value, t, n) || [];
|
|
2073
2073
|
}
|
|
2074
2074
|
/**
|
|
2075
2075
|
* The initial state _before_ evaluating any microsteps.
|
|
@@ -2098,8 +2098,8 @@ class sr {
|
|
|
2098
2098
|
* Returns the initial `State` instance, with reference to `self` as an `ActorRef`.
|
|
2099
2099
|
*/
|
|
2100
2100
|
getInitialSnapshot(t, n) {
|
|
2101
|
-
const r =
|
|
2102
|
-
target: [...
|
|
2101
|
+
const r = vs(n), s = [], i = this.getPreInitialState(t, r, s), a = Wn([{
|
|
2102
|
+
target: [...Cs(this.root)],
|
|
2103
2103
|
source: this.root,
|
|
2104
2104
|
reenter: !0,
|
|
2105
2105
|
actions: [],
|
|
@@ -2117,7 +2117,7 @@ class sr {
|
|
|
2117
2117
|
});
|
|
2118
2118
|
}
|
|
2119
2119
|
getStateNodeById(t) {
|
|
2120
|
-
const n =
|
|
2120
|
+
const n = Gn(t), r = n.slice(1), s = rn(n[0]) ? n[0].slice(ji.length) : n[0], i = this.idMap.get(s);
|
|
2121
2121
|
if (!i)
|
|
2122
2122
|
throw new Error(`Child state node '#${s}' does not exist on machine '${this.id}'`);
|
|
2123
2123
|
return en(i, r);
|
|
@@ -2134,7 +2134,7 @@ class sr {
|
|
|
2134
2134
|
restoreSnapshot(t, n) {
|
|
2135
2135
|
const r = {}, s = t.children;
|
|
2136
2136
|
Object.keys(s).forEach((d) => {
|
|
2137
|
-
const l = s[d], y = l.snapshot, h = l.src, E = typeof h == "string" ?
|
|
2137
|
+
const l = s[d], y = l.snapshot, h = l.src, E = typeof h == "string" ? Xn(this, h) : h;
|
|
2138
2138
|
if (!E)
|
|
2139
2139
|
return;
|
|
2140
2140
|
const S = ut(E, {
|
|
@@ -2159,7 +2159,7 @@ class sr {
|
|
|
2159
2159
|
for (let y in d) {
|
|
2160
2160
|
const h = d[y];
|
|
2161
2161
|
if (h && typeof h == "object") {
|
|
2162
|
-
if ("xstate$$type" in h && h.xstate$$type ===
|
|
2162
|
+
if ("xstate$$type" in h && h.xstate$$type === Zn) {
|
|
2163
2163
|
d[y] = l[h.id];
|
|
2164
2164
|
continue;
|
|
2165
2165
|
}
|
|
@@ -2172,9 +2172,9 @@ class sr {
|
|
|
2172
2172
|
}
|
|
2173
2173
|
}
|
|
2174
2174
|
function Di(e, t) {
|
|
2175
|
-
return new
|
|
2175
|
+
return new or(e, t);
|
|
2176
2176
|
}
|
|
2177
|
-
function
|
|
2177
|
+
function ir({
|
|
2178
2178
|
schemas: e,
|
|
2179
2179
|
actors: t,
|
|
2180
2180
|
actions: n,
|
|
@@ -2193,27 +2193,27 @@ function or({
|
|
|
2193
2193
|
})
|
|
2194
2194
|
};
|
|
2195
2195
|
}
|
|
2196
|
-
function
|
|
2196
|
+
function js(e, t) {
|
|
2197
2197
|
return function() {
|
|
2198
2198
|
return e.apply(t, arguments);
|
|
2199
2199
|
};
|
|
2200
2200
|
}
|
|
2201
|
-
const { toString: $i } = Object.prototype, { getPrototypeOf:
|
|
2201
|
+
const { toString: $i } = Object.prototype, { getPrototypeOf: ar } = Object, sn = ((e) => (t) => {
|
|
2202
2202
|
const n = $i.call(t);
|
|
2203
2203
|
return e[n] || (e[n] = n.slice(8, -1).toLowerCase());
|
|
2204
2204
|
})(/* @__PURE__ */ Object.create(null)), we = (e) => (e = e.toLowerCase(), (t) => sn(t) === e), on = (e) => (t) => typeof t === e, { isArray: ht } = Array, Tt = on("undefined");
|
|
2205
2205
|
function Fi(e) {
|
|
2206
2206
|
return e !== null && !Tt(e) && e.constructor !== null && !Tt(e.constructor) && ye(e.constructor.isBuffer) && e.constructor.isBuffer(e);
|
|
2207
2207
|
}
|
|
2208
|
-
const
|
|
2208
|
+
const Ds = we("ArrayBuffer");
|
|
2209
2209
|
function Mi(e) {
|
|
2210
2210
|
let t;
|
|
2211
|
-
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer &&
|
|
2211
|
+
return typeof ArrayBuffer < "u" && ArrayBuffer.isView ? t = ArrayBuffer.isView(e) : t = e && e.buffer && Ds(e.buffer), t;
|
|
2212
2212
|
}
|
|
2213
|
-
const Ni = on("string"), ye = on("function"),
|
|
2213
|
+
const Ni = on("string"), ye = on("function"), $s = on("number"), an = (e) => e !== null && typeof e == "object", Li = (e) => e === !0 || e === !1, Kt = (e) => {
|
|
2214
2214
|
if (sn(e) !== "object")
|
|
2215
2215
|
return !1;
|
|
2216
|
-
const t =
|
|
2216
|
+
const t = ar(e);
|
|
2217
2217
|
return (t === null || t === Object.prototype || Object.getPrototypeOf(t) === null) && !(Symbol.toStringTag in e) && !(Symbol.iterator in e);
|
|
2218
2218
|
}, Ui = we("Date"), Bi = we("File"), Wi = we("Blob"), Vi = we("FileList"), zi = (e) => an(e) && ye(e.pipe), Hi = (e) => {
|
|
2219
2219
|
let t;
|
|
@@ -2234,7 +2234,7 @@ function Ct(e, t, { allOwnKeys: n = !1 } = {}) {
|
|
|
2234
2234
|
u = i[r], t.call(null, e[u], u, e);
|
|
2235
2235
|
}
|
|
2236
2236
|
}
|
|
2237
|
-
function
|
|
2237
|
+
function Fs(e, t) {
|
|
2238
2238
|
t = t.toLowerCase();
|
|
2239
2239
|
const n = Object.keys(e);
|
|
2240
2240
|
let r = n.length, s;
|
|
@@ -2243,10 +2243,10 @@ function $s(e, t) {
|
|
|
2243
2243
|
return s;
|
|
2244
2244
|
return null;
|
|
2245
2245
|
}
|
|
2246
|
-
const
|
|
2246
|
+
const Ms = (() => typeof globalThis < "u" ? globalThis : typeof self < "u" ? self : typeof window < "u" ? window : global)(), Ns = (e) => !Tt(e) && e !== Ms;
|
|
2247
2247
|
function Vn() {
|
|
2248
|
-
const { caseless: e } =
|
|
2249
|
-
const i = e &&
|
|
2248
|
+
const { caseless: e } = Ns(this) && this || {}, t = {}, n = (r, s) => {
|
|
2249
|
+
const i = e && Fs(t, s) || s;
|
|
2250
2250
|
Kt(t[i]) && Kt(r) ? t[i] = Vn(t[i], r) : Kt(r) ? t[i] = Vn({}, r) : ht(r) ? t[i] = r.slice() : t[i] = r;
|
|
2251
2251
|
};
|
|
2252
2252
|
for (let r = 0, s = arguments.length; r < s; r++)
|
|
@@ -2254,7 +2254,7 @@ function Vn() {
|
|
|
2254
2254
|
return t;
|
|
2255
2255
|
}
|
|
2256
2256
|
const Ji = (e, t, n, { allOwnKeys: r } = {}) => (Ct(t, (s, i) => {
|
|
2257
|
-
n && ye(s) ? e[i] =
|
|
2257
|
+
n && ye(s) ? e[i] = js(s, n) : e[i] = s;
|
|
2258
2258
|
}, { allOwnKeys: r }), e), Ki = (e) => (e.charCodeAt(0) === 65279 && (e = e.slice(1)), e), Gi = (e, t, n, r) => {
|
|
2259
2259
|
e.prototype = Object.create(t.prototype, r), e.prototype.constructor = e, Object.defineProperty(e, "super", {
|
|
2260
2260
|
value: t.prototype
|
|
@@ -2267,7 +2267,7 @@ const Ji = (e, t, n, { allOwnKeys: r } = {}) => (Ct(t, (s, i) => {
|
|
|
2267
2267
|
do {
|
|
2268
2268
|
for (s = Object.getOwnPropertyNames(e), i = s.length; i-- > 0; )
|
|
2269
2269
|
a = s[i], (!r || r(a, e, t)) && !u[a] && (t[a] = e[a], u[a] = !0);
|
|
2270
|
-
e = n !== !1 &&
|
|
2270
|
+
e = n !== !1 && ar(e);
|
|
2271
2271
|
} while (e && (!n || n(e, t)) && e !== Object.prototype);
|
|
2272
2272
|
return t;
|
|
2273
2273
|
}, Zi = (e, t, n) => {
|
|
@@ -2280,13 +2280,13 @@ const Ji = (e, t, n, { allOwnKeys: r } = {}) => (Ct(t, (s, i) => {
|
|
|
2280
2280
|
if (ht(e))
|
|
2281
2281
|
return e;
|
|
2282
2282
|
let t = e.length;
|
|
2283
|
-
if (
|
|
2283
|
+
if (!$s(t))
|
|
2284
2284
|
return null;
|
|
2285
2285
|
const n = new Array(t);
|
|
2286
2286
|
for (; t-- > 0; )
|
|
2287
2287
|
n[t] = e[t];
|
|
2288
2288
|
return n;
|
|
2289
|
-
}, ea = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" &&
|
|
2289
|
+
}, ea = ((e) => (t) => e && t instanceof e)(typeof Uint8Array < "u" && ar(Uint8Array)), ta = (e, t) => {
|
|
2290
2290
|
const r = (e && e[Symbol.iterator]).call(e);
|
|
2291
2291
|
let s;
|
|
2292
2292
|
for (; (s = r.next()) && !s.done; ) {
|
|
@@ -2304,14 +2304,14 @@ const Ji = (e, t, n, { allOwnKeys: r } = {}) => (Ct(t, (s, i) => {
|
|
|
2304
2304
|
function(n, r, s) {
|
|
2305
2305
|
return r.toUpperCase() + s;
|
|
2306
2306
|
}
|
|
2307
|
-
),
|
|
2307
|
+
), Xr = (({ hasOwnProperty: e }) => (t, n) => e.call(t, n))(Object.prototype), oa = we("RegExp"), Ls = (e, t) => {
|
|
2308
2308
|
const n = Object.getOwnPropertyDescriptors(e), r = {};
|
|
2309
2309
|
Ct(n, (s, i) => {
|
|
2310
2310
|
let a;
|
|
2311
2311
|
(a = t(s, i, e)) !== !1 && (r[i] = a || s);
|
|
2312
2312
|
}), Object.defineProperties(e, r);
|
|
2313
2313
|
}, ia = (e) => {
|
|
2314
|
-
|
|
2314
|
+
Ls(e, (t, n) => {
|
|
2315
2315
|
if (ye(e) && ["arguments", "caller", "callee"].indexOf(n) !== -1)
|
|
2316
2316
|
return !1;
|
|
2317
2317
|
const r = e[n];
|
|
@@ -2333,11 +2333,11 @@ const Ji = (e, t, n, { allOwnKeys: r } = {}) => (Ct(t, (s, i) => {
|
|
|
2333
2333
|
};
|
|
2334
2334
|
return ht(e) ? r(e) : r(String(e).split(t)), n;
|
|
2335
2335
|
}, ua = () => {
|
|
2336
|
-
}, ca = (e, t) => (e = +e, Number.isFinite(e) ? e : t), $n = "abcdefghijklmnopqrstuvwxyz",
|
|
2337
|
-
DIGIT:
|
|
2336
|
+
}, ca = (e, t) => (e = +e, Number.isFinite(e) ? e : t), $n = "abcdefghijklmnopqrstuvwxyz", Zr = "0123456789", Us = {
|
|
2337
|
+
DIGIT: Zr,
|
|
2338
2338
|
ALPHA: $n,
|
|
2339
|
-
ALPHA_DIGIT: $n + $n.toUpperCase() +
|
|
2340
|
-
}, fa = (e = 16, t =
|
|
2339
|
+
ALPHA_DIGIT: $n + $n.toUpperCase() + Zr
|
|
2340
|
+
}, fa = (e = 16, t = Us.ALPHA_DIGIT) => {
|
|
2341
2341
|
let n = "";
|
|
2342
2342
|
const { length: r } = t;
|
|
2343
2343
|
for (; e--; )
|
|
@@ -2366,12 +2366,12 @@ const da = (e) => {
|
|
|
2366
2366
|
return n(e, 0);
|
|
2367
2367
|
}, ha = we("AsyncFunction"), pa = (e) => e && (an(e) || ye(e)) && ye(e.then) && ye(e.catch), g = {
|
|
2368
2368
|
isArray: ht,
|
|
2369
|
-
isArrayBuffer:
|
|
2369
|
+
isArrayBuffer: Ds,
|
|
2370
2370
|
isBuffer: Fi,
|
|
2371
2371
|
isFormData: Hi,
|
|
2372
2372
|
isArrayBufferView: Mi,
|
|
2373
2373
|
isString: Ni,
|
|
2374
|
-
isNumber:
|
|
2374
|
+
isNumber: $s,
|
|
2375
2375
|
isBoolean: Li,
|
|
2376
2376
|
isObject: an,
|
|
2377
2377
|
isPlainObject: Kt,
|
|
@@ -2399,19 +2399,19 @@ const da = (e) => {
|
|
|
2399
2399
|
forEachEntry: ta,
|
|
2400
2400
|
matchAll: na,
|
|
2401
2401
|
isHTMLForm: ra,
|
|
2402
|
-
hasOwnProperty:
|
|
2403
|
-
hasOwnProp:
|
|
2402
|
+
hasOwnProperty: Xr,
|
|
2403
|
+
hasOwnProp: Xr,
|
|
2404
2404
|
// an alias to avoid ESLint no-prototype-builtins detection
|
|
2405
|
-
reduceDescriptors:
|
|
2405
|
+
reduceDescriptors: Ls,
|
|
2406
2406
|
freezeMethods: ia,
|
|
2407
2407
|
toObjectSet: aa,
|
|
2408
2408
|
toCamelCase: sa,
|
|
2409
2409
|
noop: ua,
|
|
2410
2410
|
toFiniteNumber: ca,
|
|
2411
|
-
findKey:
|
|
2412
|
-
global:
|
|
2413
|
-
isContextDefined:
|
|
2414
|
-
ALPHABET:
|
|
2411
|
+
findKey: Fs,
|
|
2412
|
+
global: Ms,
|
|
2413
|
+
isContextDefined: Ns,
|
|
2414
|
+
ALPHABET: Us,
|
|
2415
2415
|
generateString: fa,
|
|
2416
2416
|
isSpecCompliantForm: la,
|
|
2417
2417
|
toJSONObject: da,
|
|
@@ -2442,7 +2442,7 @@ g.inherits(B, Error, {
|
|
|
2442
2442
|
};
|
|
2443
2443
|
}
|
|
2444
2444
|
});
|
|
2445
|
-
const
|
|
2445
|
+
const Bs = B.prototype, Ws = {};
|
|
2446
2446
|
[
|
|
2447
2447
|
"ERR_BAD_OPTION_VALUE",
|
|
2448
2448
|
"ERR_BAD_OPTION",
|
|
@@ -2458,12 +2458,12 @@ const Us = B.prototype, Bs = {};
|
|
|
2458
2458
|
"ERR_INVALID_URL"
|
|
2459
2459
|
// eslint-disable-next-line func-names
|
|
2460
2460
|
].forEach((e) => {
|
|
2461
|
-
|
|
2461
|
+
Ws[e] = { value: e };
|
|
2462
2462
|
});
|
|
2463
|
-
Object.defineProperties(B,
|
|
2464
|
-
Object.defineProperty(
|
|
2463
|
+
Object.defineProperties(B, Ws);
|
|
2464
|
+
Object.defineProperty(Bs, "isAxiosError", { value: !0 });
|
|
2465
2465
|
B.from = (e, t, n, r, s, i) => {
|
|
2466
|
-
const a = Object.create(
|
|
2466
|
+
const a = Object.create(Bs);
|
|
2467
2467
|
return g.toFlatObject(e, a, function(d) {
|
|
2468
2468
|
return d !== Error.prototype;
|
|
2469
2469
|
}, (u) => u !== "isAxiosError"), B.call(a, e.message, t, n, r, s), a.cause = e, a.name = e.name, i && Object.assign(a, i), a;
|
|
@@ -2472,12 +2472,12 @@ const ya = null;
|
|
|
2472
2472
|
function zn(e) {
|
|
2473
2473
|
return g.isPlainObject(e) || g.isArray(e);
|
|
2474
2474
|
}
|
|
2475
|
-
function
|
|
2475
|
+
function Vs(e) {
|
|
2476
2476
|
return g.endsWith(e, "[]") ? e.slice(0, -2) : e;
|
|
2477
2477
|
}
|
|
2478
|
-
function
|
|
2478
|
+
function Qr(e, t, n) {
|
|
2479
2479
|
return e ? e.concat(t).map(function(s, i) {
|
|
2480
|
-
return s =
|
|
2480
|
+
return s = Vs(s), !n && i ? "[" + s + "]" : s;
|
|
2481
2481
|
}).join(n ? "." : "") : t;
|
|
2482
2482
|
}
|
|
2483
2483
|
function ma(e) {
|
|
@@ -2514,15 +2514,15 @@ function un(e, t, n) {
|
|
|
2514
2514
|
if (g.endsWith(O, "{}"))
|
|
2515
2515
|
O = r ? O : O.slice(0, -2), _ = JSON.stringify(_);
|
|
2516
2516
|
else if (g.isArray(_) && ma(_) || (g.isFileList(_) || g.endsWith(O, "[]")) && (L = g.toArray(_)))
|
|
2517
|
-
return O =
|
|
2517
|
+
return O = Vs(O), L.forEach(function(he, pe) {
|
|
2518
2518
|
!(g.isUndefined(he) || he === null) && t.append(
|
|
2519
2519
|
// eslint-disable-next-line no-nested-ternary
|
|
2520
|
-
a === !0 ?
|
|
2520
|
+
a === !0 ? Qr([O], pe, i) : a === null ? O : O + "[]",
|
|
2521
2521
|
l(he)
|
|
2522
2522
|
);
|
|
2523
2523
|
}), !1;
|
|
2524
2524
|
}
|
|
2525
|
-
return zn(_) ? !0 : (t.append(
|
|
2525
|
+
return zn(_) ? !0 : (t.append(Qr(D, O, i), l(_)), !1);
|
|
2526
2526
|
}
|
|
2527
2527
|
const h = [], E = Object.assign(va, {
|
|
2528
2528
|
defaultVisitor: y,
|
|
@@ -2548,7 +2548,7 @@ function un(e, t, n) {
|
|
|
2548
2548
|
throw new TypeError("data must be an object");
|
|
2549
2549
|
return S(e), t;
|
|
2550
2550
|
}
|
|
2551
|
-
function
|
|
2551
|
+
function es(e) {
|
|
2552
2552
|
const t = {
|
|
2553
2553
|
"!": "%21",
|
|
2554
2554
|
"'": "%27",
|
|
@@ -2562,17 +2562,17 @@ function Qr(e) {
|
|
|
2562
2562
|
return t[r];
|
|
2563
2563
|
});
|
|
2564
2564
|
}
|
|
2565
|
-
function
|
|
2565
|
+
function ur(e, t) {
|
|
2566
2566
|
this._pairs = [], e && un(e, this, t);
|
|
2567
2567
|
}
|
|
2568
|
-
const
|
|
2569
|
-
|
|
2568
|
+
const zs = ur.prototype;
|
|
2569
|
+
zs.append = function(t, n) {
|
|
2570
2570
|
this._pairs.push([t, n]);
|
|
2571
2571
|
};
|
|
2572
|
-
|
|
2572
|
+
zs.toString = function(t) {
|
|
2573
2573
|
const n = t ? function(r) {
|
|
2574
|
-
return t.call(this, r,
|
|
2575
|
-
} :
|
|
2574
|
+
return t.call(this, r, es);
|
|
2575
|
+
} : es;
|
|
2576
2576
|
return this._pairs.map(function(s) {
|
|
2577
2577
|
return n(s[0]) + "=" + n(s[1]);
|
|
2578
2578
|
}, "").join("&");
|
|
@@ -2580,12 +2580,12 @@ Vs.toString = function(t) {
|
|
|
2580
2580
|
function ga(e) {
|
|
2581
2581
|
return encodeURIComponent(e).replace(/%3A/gi, ":").replace(/%24/g, "$").replace(/%2C/gi, ",").replace(/%20/g, "+").replace(/%5B/gi, "[").replace(/%5D/gi, "]");
|
|
2582
2582
|
}
|
|
2583
|
-
function
|
|
2583
|
+
function Hs(e, t, n) {
|
|
2584
2584
|
if (!t)
|
|
2585
2585
|
return e;
|
|
2586
2586
|
const r = n && n.encode || ga, s = n && n.serialize;
|
|
2587
2587
|
let i;
|
|
2588
|
-
if (s ? i = s(t, n) : i = g.isURLSearchParams(t) ? t.toString() : new
|
|
2588
|
+
if (s ? i = s(t, n) : i = g.isURLSearchParams(t) ? t.toString() : new ur(t, n).toString(r), i) {
|
|
2589
2589
|
const a = e.indexOf("#");
|
|
2590
2590
|
a !== -1 && (e = e.slice(0, a)), e += (e.indexOf("?") === -1 ? "?" : "&") + i;
|
|
2591
2591
|
}
|
|
@@ -2645,11 +2645,11 @@ class _a {
|
|
|
2645
2645
|
});
|
|
2646
2646
|
}
|
|
2647
2647
|
}
|
|
2648
|
-
const
|
|
2648
|
+
const ts = _a, qs = {
|
|
2649
2649
|
silentJSONParsing: !0,
|
|
2650
2650
|
forcedJSONParsing: !0,
|
|
2651
2651
|
clarifyTimeoutError: !1
|
|
2652
|
-
}, Ea = typeof URLSearchParams < "u" ? URLSearchParams :
|
|
2652
|
+
}, Ea = typeof URLSearchParams < "u" ? URLSearchParams : ur, ba = typeof FormData < "u" ? FormData : null, Sa = typeof Blob < "u" ? Blob : null, wa = (() => {
|
|
2653
2653
|
let e;
|
|
2654
2654
|
return typeof navigator < "u" && ((e = navigator.product) === "ReactNative" || e === "NativeScript" || e === "NS") ? !1 : typeof window < "u" && typeof document < "u";
|
|
2655
2655
|
})(), Ra = (() => typeof WorkerGlobalScope < "u" && // eslint-disable-next-line no-undef
|
|
@@ -2683,7 +2683,7 @@ function Ca(e) {
|
|
|
2683
2683
|
i = n[r], t[i] = e[i];
|
|
2684
2684
|
return t;
|
|
2685
2685
|
}
|
|
2686
|
-
function
|
|
2686
|
+
function Ys(e) {
|
|
2687
2687
|
function t(n, r, s, i) {
|
|
2688
2688
|
let a = n[i++];
|
|
2689
2689
|
const u = Number.isFinite(+a), d = i >= n.length;
|
|
@@ -2707,13 +2707,13 @@ function Aa(e, t, n) {
|
|
|
2707
2707
|
}
|
|
2708
2708
|
return (n || JSON.stringify)(e);
|
|
2709
2709
|
}
|
|
2710
|
-
const
|
|
2711
|
-
transitional:
|
|
2710
|
+
const cr = {
|
|
2711
|
+
transitional: qs,
|
|
2712
2712
|
adapter: _e.isNode ? "http" : "xhr",
|
|
2713
2713
|
transformRequest: [function(t, n) {
|
|
2714
2714
|
const r = n.getContentType() || "", s = r.indexOf("application/json") > -1, i = g.isObject(t);
|
|
2715
2715
|
if (i && g.isHTMLForm(t) && (t = new FormData(t)), g.isFormData(t))
|
|
2716
|
-
return s && s ? JSON.stringify(
|
|
2716
|
+
return s && s ? JSON.stringify(Ys(t)) : t;
|
|
2717
2717
|
if (g.isArrayBuffer(t) || g.isBuffer(t) || g.isStream(t) || g.isFile(t) || g.isBlob(t))
|
|
2718
2718
|
return t;
|
|
2719
2719
|
if (g.isArrayBufferView(t))
|
|
@@ -2736,7 +2736,7 @@ const ur = {
|
|
|
2736
2736
|
return i || s ? (n.setContentType("application/json", !1), Aa(t)) : t;
|
|
2737
2737
|
}],
|
|
2738
2738
|
transformResponse: [function(t) {
|
|
2739
|
-
const n = this.transitional ||
|
|
2739
|
+
const n = this.transitional || cr.transitional, r = n && n.forcedJSONParsing, s = this.responseType === "json";
|
|
2740
2740
|
if (t && g.isString(t) && (r && !this.responseType || s)) {
|
|
2741
2741
|
const a = !(n && n.silentJSONParsing) && s;
|
|
2742
2742
|
try {
|
|
@@ -2772,9 +2772,9 @@ const ur = {
|
|
|
2772
2772
|
}
|
|
2773
2773
|
};
|
|
2774
2774
|
g.forEach(["delete", "get", "head", "post", "put", "patch"], (e) => {
|
|
2775
|
-
|
|
2775
|
+
cr.headers[e] = {};
|
|
2776
2776
|
});
|
|
2777
|
-
const
|
|
2777
|
+
const fr = cr, ka = g.toObjectSet([
|
|
2778
2778
|
"age",
|
|
2779
2779
|
"authorization",
|
|
2780
2780
|
"content-length",
|
|
@@ -2799,7 +2799,7 @@ const cr = ur, ka = g.toObjectSet([
|
|
|
2799
2799
|
`).forEach(function(a) {
|
|
2800
2800
|
s = a.indexOf(":"), n = a.substring(0, s).trim().toLowerCase(), r = a.substring(s + 1).trim(), !(!n || t[n] && ka[n]) && (n === "set-cookie" ? t[n] ? t[n].push(r) : t[n] = [r] : t[n] = t[n] ? t[n] + ", " + r : r);
|
|
2801
2801
|
}), t;
|
|
2802
|
-
},
|
|
2802
|
+
}, ns = Symbol("internals");
|
|
2803
2803
|
function Et(e) {
|
|
2804
2804
|
return e && String(e).trim().toLowerCase();
|
|
2805
2805
|
}
|
|
@@ -2937,7 +2937,7 @@ class cn {
|
|
|
2937
2937
|
return n.forEach((s) => r.set(s)), r;
|
|
2938
2938
|
}
|
|
2939
2939
|
static accessor(t) {
|
|
2940
|
-
const r = (this[
|
|
2940
|
+
const r = (this[ns] = this[ns] = {
|
|
2941
2941
|
accessors: {}
|
|
2942
2942
|
}).accessors, s = this.prototype;
|
|
2943
2943
|
function i(a) {
|
|
@@ -2960,13 +2960,13 @@ g.reduceDescriptors(cn.prototype, ({ value: e }, t) => {
|
|
|
2960
2960
|
g.freezeMethods(cn);
|
|
2961
2961
|
const Ce = cn;
|
|
2962
2962
|
function Mn(e, t) {
|
|
2963
|
-
const n = this ||
|
|
2963
|
+
const n = this || fr, r = t || n, s = Ce.from(r.headers);
|
|
2964
2964
|
let i = r.data;
|
|
2965
2965
|
return g.forEach(e, function(u) {
|
|
2966
2966
|
i = u.call(n, i, s.normalize(), t ? t.status : void 0);
|
|
2967
2967
|
}), s.normalize(), i;
|
|
2968
2968
|
}
|
|
2969
|
-
function
|
|
2969
|
+
function Js(e) {
|
|
2970
2970
|
return !!(e && e.__CANCEL__);
|
|
2971
2971
|
}
|
|
2972
2972
|
function At(e, t, n) {
|
|
@@ -3022,7 +3022,7 @@ function Ma(e) {
|
|
|
3022
3022
|
function Na(e, t) {
|
|
3023
3023
|
return t ? e.replace(/\/+$/, "") + "/" + t.replace(/^\/+/, "") : e;
|
|
3024
3024
|
}
|
|
3025
|
-
function
|
|
3025
|
+
function Ks(e, t) {
|
|
3026
3026
|
return e && !Ma(t) ? Na(e, t) : t;
|
|
3027
3027
|
}
|
|
3028
3028
|
const La = _e.isStandardBrowserEnv ? (
|
|
@@ -3077,7 +3077,7 @@ function Ba(e, t) {
|
|
|
3077
3077
|
return S ? Math.round(E * 1e3 / S) : void 0;
|
|
3078
3078
|
};
|
|
3079
3079
|
}
|
|
3080
|
-
function
|
|
3080
|
+
function rs(e, t) {
|
|
3081
3081
|
let n = 0;
|
|
3082
3082
|
const r = Ba(50, 250);
|
|
3083
3083
|
return (s) => {
|
|
@@ -3109,8 +3109,8 @@ const Wa = typeof XMLHttpRequest < "u", Va = Wa && function(e) {
|
|
|
3109
3109
|
const S = e.auth.username || "", _ = e.auth.password ? unescape(encodeURIComponent(e.auth.password)) : "";
|
|
3110
3110
|
i.set("Authorization", "Basic " + btoa(S + ":" + _));
|
|
3111
3111
|
}
|
|
3112
|
-
const y =
|
|
3113
|
-
l.open(e.method.toUpperCase(),
|
|
3112
|
+
const y = Ks(e.baseURL, e.url);
|
|
3113
|
+
l.open(e.method.toUpperCase(), Hs(y, e.params, e.paramsSerializer), !0), l.timeout = e.timeout;
|
|
3114
3114
|
function h() {
|
|
3115
3115
|
if (!l)
|
|
3116
3116
|
return;
|
|
@@ -3138,7 +3138,7 @@ const Wa = typeof XMLHttpRequest < "u", Va = Wa && function(e) {
|
|
|
3138
3138
|
r(new B("Network Error", B.ERR_NETWORK, e, l)), l = null;
|
|
3139
3139
|
}, l.ontimeout = function() {
|
|
3140
3140
|
let _ = e.timeout ? "timeout of " + e.timeout + "ms exceeded" : "timeout exceeded";
|
|
3141
|
-
const O = e.transitional ||
|
|
3141
|
+
const O = e.transitional || qs;
|
|
3142
3142
|
e.timeoutErrorMessage && (_ = e.timeoutErrorMessage), r(new B(
|
|
3143
3143
|
_,
|
|
3144
3144
|
O.clarifyTimeoutError ? B.ETIMEDOUT : B.ECONNABORTED,
|
|
@@ -3151,7 +3151,7 @@ const Wa = typeof XMLHttpRequest < "u", Va = Wa && function(e) {
|
|
|
3151
3151
|
}
|
|
3152
3152
|
s === void 0 && i.setContentType(null), "setRequestHeader" in l && g.forEach(i.toJSON(), function(_, O) {
|
|
3153
3153
|
l.setRequestHeader(O, _);
|
|
3154
|
-
}), g.isUndefined(e.withCredentials) || (l.withCredentials = !!e.withCredentials), a && a !== "json" && (l.responseType = e.responseType), typeof e.onDownloadProgress == "function" && l.addEventListener("progress",
|
|
3154
|
+
}), g.isUndefined(e.withCredentials) || (l.withCredentials = !!e.withCredentials), a && a !== "json" && (l.responseType = e.responseType), typeof e.onDownloadProgress == "function" && l.addEventListener("progress", rs(e.onDownloadProgress, !0)), typeof e.onUploadProgress == "function" && l.upload && l.upload.addEventListener("progress", rs(e.onUploadProgress)), (e.cancelToken || e.signal) && (u = (S) => {
|
|
3155
3155
|
l && (r(!S || S.type ? new At(null, e, l) : S), l.abort(), l = null);
|
|
3156
3156
|
}, e.cancelToken && e.cancelToken.subscribe(u), e.signal && (e.signal.aborted ? u() : e.signal.addEventListener("abort", u)));
|
|
3157
3157
|
const E = Ua(y);
|
|
@@ -3174,7 +3174,7 @@ g.forEach(Xt, (e, t) => {
|
|
|
3174
3174
|
Object.defineProperty(e, "adapterName", { value: t });
|
|
3175
3175
|
}
|
|
3176
3176
|
});
|
|
3177
|
-
const
|
|
3177
|
+
const Gs = {
|
|
3178
3178
|
getAdapter: (e) => {
|
|
3179
3179
|
e = g.isArray(e) ? e : [e];
|
|
3180
3180
|
const { length: t } = e;
|
|
@@ -3198,25 +3198,25 @@ function Nn(e) {
|
|
|
3198
3198
|
if (e.cancelToken && e.cancelToken.throwIfRequested(), e.signal && e.signal.aborted)
|
|
3199
3199
|
throw new At(null, e);
|
|
3200
3200
|
}
|
|
3201
|
-
function
|
|
3201
|
+
function ss(e) {
|
|
3202
3202
|
return Nn(e), e.headers = Ce.from(e.headers), e.data = Mn.call(
|
|
3203
3203
|
e,
|
|
3204
3204
|
e.transformRequest
|
|
3205
|
-
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1),
|
|
3205
|
+
), ["post", "put", "patch"].indexOf(e.method) !== -1 && e.headers.setContentType("application/x-www-form-urlencoded", !1), Gs.getAdapter(e.adapter || fr.adapter)(e).then(function(r) {
|
|
3206
3206
|
return Nn(e), r.data = Mn.call(
|
|
3207
3207
|
e,
|
|
3208
3208
|
e.transformResponse,
|
|
3209
3209
|
r
|
|
3210
3210
|
), r.headers = Ce.from(r.headers), r;
|
|
3211
3211
|
}, function(r) {
|
|
3212
|
-
return
|
|
3212
|
+
return Js(r) || (Nn(e), r && r.response && (r.response.data = Mn.call(
|
|
3213
3213
|
e,
|
|
3214
3214
|
e.transformResponse,
|
|
3215
3215
|
r.response
|
|
3216
3216
|
), r.response.headers = Ce.from(r.response.headers))), Promise.reject(r);
|
|
3217
3217
|
});
|
|
3218
3218
|
}
|
|
3219
|
-
const
|
|
3219
|
+
const os = (e) => e instanceof Ce ? e.toJSON() : e;
|
|
3220
3220
|
function dt(e, t) {
|
|
3221
3221
|
t = t || {};
|
|
3222
3222
|
const n = {};
|
|
@@ -3275,23 +3275,23 @@ function dt(e, t) {
|
|
|
3275
3275
|
socketPath: a,
|
|
3276
3276
|
responseEncoding: a,
|
|
3277
3277
|
validateStatus: u,
|
|
3278
|
-
headers: (l, y) => s(
|
|
3278
|
+
headers: (l, y) => s(os(l), os(y), !0)
|
|
3279
3279
|
};
|
|
3280
3280
|
return g.forEach(Object.keys(Object.assign({}, e, t)), function(y) {
|
|
3281
3281
|
const h = d[y] || s, E = h(e[y], t[y], y);
|
|
3282
3282
|
g.isUndefined(E) && h !== u || (n[y] = E);
|
|
3283
3283
|
}), n;
|
|
3284
3284
|
}
|
|
3285
|
-
const
|
|
3285
|
+
const Xs = "1.5.0", lr = {};
|
|
3286
3286
|
["object", "boolean", "number", "function", "string", "symbol"].forEach((e, t) => {
|
|
3287
|
-
|
|
3287
|
+
lr[e] = function(r) {
|
|
3288
3288
|
return typeof r === e || "a" + (t < 1 ? "n " : " ") + e;
|
|
3289
3289
|
};
|
|
3290
3290
|
});
|
|
3291
|
-
const
|
|
3292
|
-
|
|
3291
|
+
const is = {};
|
|
3292
|
+
lr.transitional = function(t, n, r) {
|
|
3293
3293
|
function s(i, a) {
|
|
3294
|
-
return "[Axios v" +
|
|
3294
|
+
return "[Axios v" + Xs + "] Transitional option '" + i + "'" + a + (r ? ". " + r : "");
|
|
3295
3295
|
}
|
|
3296
3296
|
return (i, a, u) => {
|
|
3297
3297
|
if (t === !1)
|
|
@@ -3299,7 +3299,7 @@ fr.transitional = function(t, n, r) {
|
|
|
3299
3299
|
s(a, " has been removed" + (n ? " in " + n : "")),
|
|
3300
3300
|
B.ERR_DEPRECATED
|
|
3301
3301
|
);
|
|
3302
|
-
return n && !
|
|
3302
|
+
return n && !is[a] && (is[a] = !0, console.warn(
|
|
3303
3303
|
s(
|
|
3304
3304
|
a,
|
|
3305
3305
|
" has been deprecated since v" + n + " and will be removed in the near future"
|
|
@@ -3326,13 +3326,13 @@ function za(e, t, n) {
|
|
|
3326
3326
|
}
|
|
3327
3327
|
const Hn = {
|
|
3328
3328
|
assertOptions: za,
|
|
3329
|
-
validators:
|
|
3329
|
+
validators: lr
|
|
3330
3330
|
}, De = Hn.validators;
|
|
3331
3331
|
class nn {
|
|
3332
3332
|
constructor(t) {
|
|
3333
3333
|
this.defaults = t, this.interceptors = {
|
|
3334
|
-
request: new
|
|
3335
|
-
response: new
|
|
3334
|
+
request: new ts(),
|
|
3335
|
+
response: new ts()
|
|
3336
3336
|
};
|
|
3337
3337
|
}
|
|
3338
3338
|
/**
|
|
@@ -3377,7 +3377,7 @@ class nn {
|
|
|
3377
3377
|
});
|
|
3378
3378
|
let y, h = 0, E;
|
|
3379
3379
|
if (!d) {
|
|
3380
|
-
const _ = [
|
|
3380
|
+
const _ = [ss.bind(this), void 0];
|
|
3381
3381
|
for (_.unshift.apply(_, u), _.push.apply(_, l), E = _.length, y = Promise.resolve(n); h < E; )
|
|
3382
3382
|
y = y.then(_[h++], _[h++]);
|
|
3383
3383
|
return y;
|
|
@@ -3394,7 +3394,7 @@ class nn {
|
|
|
3394
3394
|
}
|
|
3395
3395
|
}
|
|
3396
3396
|
try {
|
|
3397
|
-
y =
|
|
3397
|
+
y = ss.call(this, S);
|
|
3398
3398
|
} catch (_) {
|
|
3399
3399
|
return Promise.reject(_);
|
|
3400
3400
|
}
|
|
@@ -3404,8 +3404,8 @@ class nn {
|
|
|
3404
3404
|
}
|
|
3405
3405
|
getUri(t) {
|
|
3406
3406
|
t = dt(this.defaults, t);
|
|
3407
|
-
const n =
|
|
3408
|
-
return
|
|
3407
|
+
const n = Ks(t.baseURL, t.url);
|
|
3408
|
+
return Hs(n, t.params, t.paramsSerializer);
|
|
3409
3409
|
}
|
|
3410
3410
|
}
|
|
3411
3411
|
g.forEach(["delete", "get", "head", "options"], function(t) {
|
|
@@ -3433,7 +3433,7 @@ g.forEach(["post", "put", "patch"], function(t) {
|
|
|
3433
3433
|
nn.prototype[t] = n(), nn.prototype[t + "Form"] = n(!0);
|
|
3434
3434
|
});
|
|
3435
3435
|
const Zt = nn;
|
|
3436
|
-
class
|
|
3436
|
+
class dr {
|
|
3437
3437
|
constructor(t) {
|
|
3438
3438
|
if (typeof t != "function")
|
|
3439
3439
|
throw new TypeError("executor must be a function.");
|
|
@@ -3494,14 +3494,14 @@ class lr {
|
|
|
3494
3494
|
static source() {
|
|
3495
3495
|
let t;
|
|
3496
3496
|
return {
|
|
3497
|
-
token: new
|
|
3497
|
+
token: new dr(function(s) {
|
|
3498
3498
|
t = s;
|
|
3499
3499
|
}),
|
|
3500
3500
|
cancel: t
|
|
3501
3501
|
};
|
|
3502
3502
|
}
|
|
3503
3503
|
}
|
|
3504
|
-
const Ha =
|
|
3504
|
+
const Ha = dr;
|
|
3505
3505
|
function qa(e) {
|
|
3506
3506
|
return function(n) {
|
|
3507
3507
|
return e.apply(null, n);
|
|
@@ -3579,18 +3579,18 @@ Object.entries(qn).forEach(([e, t]) => {
|
|
|
3579
3579
|
qn[t] = e;
|
|
3580
3580
|
});
|
|
3581
3581
|
const Ja = qn;
|
|
3582
|
-
function
|
|
3583
|
-
const t = new Zt(e), n =
|
|
3582
|
+
function Zs(e) {
|
|
3583
|
+
const t = new Zt(e), n = js(Zt.prototype.request, t);
|
|
3584
3584
|
return g.extend(n, Zt.prototype, t, { allOwnKeys: !0 }), g.extend(n, t, null, { allOwnKeys: !0 }), n.create = function(s) {
|
|
3585
|
-
return
|
|
3585
|
+
return Zs(dt(e, s));
|
|
3586
3586
|
}, n;
|
|
3587
3587
|
}
|
|
3588
|
-
const re =
|
|
3588
|
+
const re = Zs(fr);
|
|
3589
3589
|
re.Axios = Zt;
|
|
3590
3590
|
re.CanceledError = At;
|
|
3591
3591
|
re.CancelToken = Ha;
|
|
3592
|
-
re.isCancel =
|
|
3593
|
-
re.VERSION =
|
|
3592
|
+
re.isCancel = Js;
|
|
3593
|
+
re.VERSION = Xs;
|
|
3594
3594
|
re.toFormData = un;
|
|
3595
3595
|
re.AxiosError = B;
|
|
3596
3596
|
re.Cancel = re.CanceledError;
|
|
@@ -3601,19 +3601,19 @@ re.spread = qa;
|
|
|
3601
3601
|
re.isAxiosError = Ya;
|
|
3602
3602
|
re.mergeConfig = dt;
|
|
3603
3603
|
re.AxiosHeaders = Ce;
|
|
3604
|
-
re.formToJSON = (e) =>
|
|
3605
|
-
re.getAdapter =
|
|
3604
|
+
re.formToJSON = (e) => Ys(g.isHTMLForm(e) ? new FormData(e) : e);
|
|
3605
|
+
re.getAdapter = Gs.getAdapter;
|
|
3606
3606
|
re.HttpStatusCode = Ja;
|
|
3607
3607
|
re.default = re;
|
|
3608
3608
|
const Ka = re;
|
|
3609
|
-
async function
|
|
3609
|
+
async function as(e, t) {
|
|
3610
3610
|
const n = await fetch(e, t);
|
|
3611
3611
|
return n.status === 200 ? n.json() : Promise.resolve({
|
|
3612
3612
|
message: n.statusText,
|
|
3613
3613
|
success: !1
|
|
3614
3614
|
});
|
|
3615
3615
|
}
|
|
3616
|
-
const
|
|
3616
|
+
const us = ir({
|
|
3617
3617
|
types: {
|
|
3618
3618
|
context: {},
|
|
3619
3619
|
events: {},
|
|
@@ -3710,7 +3710,7 @@ const as = or({
|
|
|
3710
3710
|
throw new Error("Could not complete refresh request (server)");
|
|
3711
3711
|
}
|
|
3712
3712
|
} else {
|
|
3713
|
-
t = await
|
|
3713
|
+
t = await as(
|
|
3714
3714
|
e.context.endpoints.refresh,
|
|
3715
3715
|
{
|
|
3716
3716
|
method: "POST",
|
|
@@ -3740,7 +3740,7 @@ const as = or({
|
|
|
3740
3740
|
}),
|
|
3741
3741
|
authenticate: Dn(async ({ input: e }) => {
|
|
3742
3742
|
var r;
|
|
3743
|
-
const n = await
|
|
3743
|
+
const n = await as(
|
|
3744
3744
|
e.context.endpoints.login,
|
|
3745
3745
|
{
|
|
3746
3746
|
method: "POST",
|
|
@@ -3920,11 +3920,11 @@ var Yn = { exports: {} }, bt = {}, Jn = { exports: {} }, $ = {};
|
|
|
3920
3920
|
* This source code is licensed under the MIT license found in the
|
|
3921
3921
|
* LICENSE file in the root directory of this source tree.
|
|
3922
3922
|
*/
|
|
3923
|
-
var
|
|
3923
|
+
var cs;
|
|
3924
3924
|
function Ga() {
|
|
3925
|
-
if (
|
|
3925
|
+
if (cs)
|
|
3926
3926
|
return $;
|
|
3927
|
-
|
|
3927
|
+
cs = 1;
|
|
3928
3928
|
var e = Symbol.for("react.element"), t = Symbol.for("react.portal"), n = Symbol.for("react.fragment"), r = Symbol.for("react.strict_mode"), s = Symbol.for("react.profiler"), i = Symbol.for("react.provider"), a = Symbol.for("react.context"), u = Symbol.for("react.forward_ref"), d = Symbol.for("react.suspense"), l = Symbol.for("react.memo"), y = Symbol.for("react.lazy"), h = Symbol.iterator;
|
|
3929
3929
|
function E(p) {
|
|
3930
3930
|
return p === null || typeof p != "object" ? null : (p = h && p[h] || p["@@iterator"], typeof p == "function" ? p : null);
|
|
@@ -4148,9 +4148,9 @@ var wt = { exports: {} };
|
|
|
4148
4148
|
* LICENSE file in the root directory of this source tree.
|
|
4149
4149
|
*/
|
|
4150
4150
|
wt.exports;
|
|
4151
|
-
var
|
|
4151
|
+
var fs;
|
|
4152
4152
|
function Xa() {
|
|
4153
|
-
return
|
|
4153
|
+
return fs || (fs = 1, function(e, t) {
|
|
4154
4154
|
process.env.NODE_ENV !== "production" && function() {
|
|
4155
4155
|
typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(new Error());
|
|
4156
4156
|
var n = "18.2.0", r = Symbol.for("react.element"), s = Symbol.for("react.portal"), i = Symbol.for("react.fragment"), a = Symbol.for("react.strict_mode"), u = Symbol.for("react.profiler"), d = Symbol.for("react.provider"), l = Symbol.for("react.context"), y = Symbol.for("react.forward_ref"), h = Symbol.for("react.suspense"), E = Symbol.for("react.suspense_list"), S = Symbol.for("react.memo"), _ = Symbol.for("react.lazy"), O = Symbol.for("react.offscreen"), D = Symbol.iterator, L = "@@iterator";
|
|
@@ -4603,13 +4603,13 @@ function Xa() {
|
|
|
4603
4603
|
else {
|
|
4604
4604
|
var Pn = V(o);
|
|
4605
4605
|
if (typeof Pn == "function") {
|
|
4606
|
-
var
|
|
4607
|
-
Pn ===
|
|
4608
|
-
for (var To = Pn.call(
|
|
4609
|
-
X =
|
|
4606
|
+
var jr = o;
|
|
4607
|
+
Pn === jr.entries && (nt || me("Using Maps as children is not supported. Use an array of keyed ReactElements instead."), nt = !0);
|
|
4608
|
+
for (var To = Pn.call(jr), Dr, Oo = 0; !(Dr = To.next()).done; )
|
|
4609
|
+
X = Dr.value, Q = ae + qe(X, Oo++), ne += Ie(X, c, m, Q, w);
|
|
4610
4610
|
} else if (x === "object") {
|
|
4611
|
-
var
|
|
4612
|
-
throw new Error("Objects are not valid as a React child (found: " + (
|
|
4611
|
+
var $r = String(o);
|
|
4612
|
+
throw new Error("Objects are not valid as a React child (found: " + ($r === "[object Object]" ? "object with keys {" + Object.keys(o).join(", ") + "}" : $r) + "). If you meant to render a collection of children, use an array instead.");
|
|
4613
4613
|
}
|
|
4614
4614
|
}
|
|
4615
4615
|
return ne;
|
|
@@ -4921,18 +4921,18 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
4921
4921
|
var v = C();
|
|
4922
4922
|
return v.useSyncExternalStore(o, c, m);
|
|
4923
4923
|
}
|
|
4924
|
-
var gt = 0,
|
|
4925
|
-
function
|
|
4924
|
+
var gt = 0, hr, pr, yr, mr, vr, gr, _r;
|
|
4925
|
+
function Er() {
|
|
4926
4926
|
}
|
|
4927
|
-
|
|
4927
|
+
Er.__reactDisabledLog = !0;
|
|
4928
4928
|
function oo() {
|
|
4929
4929
|
{
|
|
4930
4930
|
if (gt === 0) {
|
|
4931
|
-
|
|
4931
|
+
hr = console.log, pr = console.info, yr = console.warn, mr = console.error, vr = console.group, gr = console.groupCollapsed, _r = console.groupEnd;
|
|
4932
4932
|
var o = {
|
|
4933
4933
|
configurable: !0,
|
|
4934
4934
|
enumerable: !0,
|
|
4935
|
-
value:
|
|
4935
|
+
value: Er,
|
|
4936
4936
|
writable: !0
|
|
4937
4937
|
};
|
|
4938
4938
|
Object.defineProperties(console, {
|
|
@@ -4958,25 +4958,25 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
4958
4958
|
};
|
|
4959
4959
|
Object.defineProperties(console, {
|
|
4960
4960
|
log: I({}, o, {
|
|
4961
|
-
value:
|
|
4961
|
+
value: hr
|
|
4962
4962
|
}),
|
|
4963
4963
|
info: I({}, o, {
|
|
4964
|
-
value:
|
|
4964
|
+
value: pr
|
|
4965
4965
|
}),
|
|
4966
4966
|
warn: I({}, o, {
|
|
4967
|
-
value:
|
|
4967
|
+
value: yr
|
|
4968
4968
|
}),
|
|
4969
4969
|
error: I({}, o, {
|
|
4970
|
-
value:
|
|
4970
|
+
value: mr
|
|
4971
4971
|
}),
|
|
4972
4972
|
group: I({}, o, {
|
|
4973
|
-
value:
|
|
4973
|
+
value: vr
|
|
4974
4974
|
}),
|
|
4975
4975
|
groupCollapsed: I({}, o, {
|
|
4976
|
-
value:
|
|
4976
|
+
value: gr
|
|
4977
4977
|
}),
|
|
4978
4978
|
groupEnd: I({}, o, {
|
|
4979
|
-
value:
|
|
4979
|
+
value: _r
|
|
4980
4980
|
})
|
|
4981
4981
|
});
|
|
4982
4982
|
}
|
|
@@ -5002,7 +5002,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
5002
5002
|
var ao = typeof WeakMap == "function" ? WeakMap : Map;
|
|
5003
5003
|
Wt = new ao();
|
|
5004
5004
|
}
|
|
5005
|
-
function
|
|
5005
|
+
function br(o, c) {
|
|
5006
5006
|
if (!o || On)
|
|
5007
5007
|
return "";
|
|
5008
5008
|
{
|
|
@@ -5074,7 +5074,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
5074
5074
|
return typeof o == "function" && Wt.set(o, ne), ne;
|
|
5075
5075
|
}
|
|
5076
5076
|
function uo(o, c, m) {
|
|
5077
|
-
return
|
|
5077
|
+
return br(o, !1);
|
|
5078
5078
|
}
|
|
5079
5079
|
function co(o) {
|
|
5080
5080
|
var c = o.prototype;
|
|
@@ -5084,7 +5084,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
5084
5084
|
if (o == null)
|
|
5085
5085
|
return "";
|
|
5086
5086
|
if (typeof o == "function")
|
|
5087
|
-
return
|
|
5087
|
+
return br(o, co(o));
|
|
5088
5088
|
if (typeof o == "string")
|
|
5089
5089
|
return Bt(o);
|
|
5090
5090
|
switch (o) {
|
|
@@ -5109,13 +5109,13 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
5109
5109
|
}
|
|
5110
5110
|
return "";
|
|
5111
5111
|
}
|
|
5112
|
-
var
|
|
5112
|
+
var Sr = {}, wr = oe.ReactDebugCurrentFrame;
|
|
5113
5113
|
function zt(o) {
|
|
5114
5114
|
if (o) {
|
|
5115
5115
|
var c = o._owner, m = Vt(o.type, o._source, c ? c.type : null);
|
|
5116
|
-
|
|
5116
|
+
wr.setExtraStackFrame(m);
|
|
5117
5117
|
} else
|
|
5118
|
-
|
|
5118
|
+
wr.setExtraStackFrame(null);
|
|
5119
5119
|
}
|
|
5120
5120
|
function fo(o, c, m, v, w) {
|
|
5121
5121
|
{
|
|
@@ -5132,7 +5132,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
5132
5132
|
} catch (Y) {
|
|
5133
5133
|
P = Y;
|
|
5134
5134
|
}
|
|
5135
|
-
P && !(P instanceof Error) && (zt(w), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", m, A, typeof P), zt(null)), P instanceof Error && !(P.message in
|
|
5135
|
+
P && !(P instanceof Error) && (zt(w), k("%s: type specification of %s `%s` is invalid; the type checker function must return `null` or an `Error` but returned a %s. You may have forgotten to pass an argument to the type checker creator (arrayOf, instanceOf, objectOf, oneOf, oneOfType, and shape all require an argument).", v || "React class", m, A, typeof P), zt(null)), P instanceof Error && !(P.message in Sr) && (Sr[P.message] = !0, zt(w), k("Failed %s type: %s", m, P.message), zt(null));
|
|
5136
5136
|
}
|
|
5137
5137
|
}
|
|
5138
5138
|
}
|
|
@@ -5145,7 +5145,7 @@ See https://reactjs.org/link/invalid-hook-call for tips about how to debug and f
|
|
|
5145
5145
|
}
|
|
5146
5146
|
var Cn;
|
|
5147
5147
|
Cn = !1;
|
|
5148
|
-
function
|
|
5148
|
+
function Rr() {
|
|
5149
5149
|
if (ue.current) {
|
|
5150
5150
|
var o = Se(ue.current.type);
|
|
5151
5151
|
if (o)
|
|
@@ -5167,9 +5167,9 @@ Check your code at ` + c + ":" + m + ".";
|
|
|
5167
5167
|
function ho(o) {
|
|
5168
5168
|
return o != null ? lo(o.__source) : "";
|
|
5169
5169
|
}
|
|
5170
|
-
var
|
|
5170
|
+
var Tr = {};
|
|
5171
5171
|
function po(o) {
|
|
5172
|
-
var c =
|
|
5172
|
+
var c = Rr();
|
|
5173
5173
|
if (!c) {
|
|
5174
5174
|
var m = typeof o == "string" ? o : o.displayName || o.name;
|
|
5175
5175
|
m && (c = `
|
|
@@ -5178,23 +5178,23 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5178
5178
|
}
|
|
5179
5179
|
return c;
|
|
5180
5180
|
}
|
|
5181
|
-
function
|
|
5181
|
+
function Or(o, c) {
|
|
5182
5182
|
if (!(!o._store || o._store.validated || o.key != null)) {
|
|
5183
5183
|
o._store.validated = !0;
|
|
5184
5184
|
var m = po(c);
|
|
5185
|
-
if (!
|
|
5186
|
-
|
|
5185
|
+
if (!Tr[m]) {
|
|
5186
|
+
Tr[m] = !0;
|
|
5187
5187
|
var v = "";
|
|
5188
5188
|
o && o._owner && o._owner !== ue.current && (v = " It was passed a child from " + Se(o._owner.type) + "."), rt(o), k('Each child in a list should have a unique "key" prop.%s%s See https://reactjs.org/link/warning-keys for more information.', m, v), rt(null);
|
|
5189
5189
|
}
|
|
5190
5190
|
}
|
|
5191
5191
|
}
|
|
5192
|
-
function
|
|
5192
|
+
function Cr(o, c) {
|
|
5193
5193
|
if (typeof o == "object") {
|
|
5194
5194
|
if (Ze(o))
|
|
5195
5195
|
for (var m = 0; m < o.length; m++) {
|
|
5196
5196
|
var v = o[m];
|
|
5197
|
-
Pe(v) &&
|
|
5197
|
+
Pe(v) && Or(v, c);
|
|
5198
5198
|
}
|
|
5199
5199
|
else if (Pe(o))
|
|
5200
5200
|
o._store && (o._store.validated = !0);
|
|
@@ -5202,11 +5202,11 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5202
5202
|
var w = V(o);
|
|
5203
5203
|
if (typeof w == "function" && w !== o.entries)
|
|
5204
5204
|
for (var x = w.call(o), A; !(A = x.next()).done; )
|
|
5205
|
-
Pe(A.value) &&
|
|
5205
|
+
Pe(A.value) && Or(A.value, c);
|
|
5206
5206
|
}
|
|
5207
5207
|
}
|
|
5208
5208
|
}
|
|
5209
|
-
function
|
|
5209
|
+
function Ar(o) {
|
|
5210
5210
|
{
|
|
5211
5211
|
var c = o.type;
|
|
5212
5212
|
if (c == null || typeof c == "string")
|
|
@@ -5243,13 +5243,13 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5243
5243
|
o.ref !== null && (rt(o), k("Invalid attribute `ref` supplied to `React.Fragment`."), rt(null));
|
|
5244
5244
|
}
|
|
5245
5245
|
}
|
|
5246
|
-
function
|
|
5246
|
+
function kr(o, c, m) {
|
|
5247
5247
|
var v = b(o);
|
|
5248
5248
|
if (!v) {
|
|
5249
5249
|
var w = "";
|
|
5250
5250
|
(o === void 0 || typeof o == "object" && o !== null && Object.keys(o).length === 0) && (w += " You likely forgot to export your component from the file it's defined in, or you might have mixed up default and named imports.");
|
|
5251
5251
|
var x = ho(c);
|
|
5252
|
-
x ? w += x : w +=
|
|
5252
|
+
x ? w += x : w += Rr();
|
|
5253
5253
|
var A;
|
|
5254
5254
|
o === null ? A = "null" : Ze(o) ? A = "array" : o !== void 0 && o.$$typeof === r ? (A = "<" + (Se(o.type) || "Unknown") + " />", w = " Did you accidentally export a JSX literal instead of a component?") : A = typeof o, k("React.createElement: type is invalid -- expected a string (for built-in components) or a class/function (for composite components) but got: %s.%s", A, w);
|
|
5255
5255
|
}
|
|
@@ -5258,13 +5258,13 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5258
5258
|
return P;
|
|
5259
5259
|
if (v)
|
|
5260
5260
|
for (var N = 2; N < arguments.length; N++)
|
|
5261
|
-
|
|
5262
|
-
return o === i ? yo(P) :
|
|
5261
|
+
Cr(arguments[N], o);
|
|
5262
|
+
return o === i ? yo(P) : Ar(P), P;
|
|
5263
5263
|
}
|
|
5264
|
-
var
|
|
5264
|
+
var xr = !1;
|
|
5265
5265
|
function mo(o) {
|
|
5266
|
-
var c =
|
|
5267
|
-
return c.type = o,
|
|
5266
|
+
var c = kr.bind(null, o);
|
|
5267
|
+
return c.type = o, xr || (xr = !0, me("React.createFactory() is deprecated and will be removed in a future major release. Consider using JSX or use React.createElement() directly instead.")), Object.defineProperty(c, "type", {
|
|
5268
5268
|
enumerable: !1,
|
|
5269
5269
|
get: function() {
|
|
5270
5270
|
return me("Factory.type is deprecated. Access the class directly before passing it to createFactory."), Object.defineProperty(this, "type", {
|
|
@@ -5275,8 +5275,8 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5275
5275
|
}
|
|
5276
5276
|
function vo(o, c, m) {
|
|
5277
5277
|
for (var v = yn.apply(this, arguments), w = 2; w < arguments.length; w++)
|
|
5278
|
-
|
|
5279
|
-
return
|
|
5278
|
+
Cr(arguments[w], v.type);
|
|
5279
|
+
return Ar(v), v;
|
|
5280
5280
|
}
|
|
5281
5281
|
function go(o, c) {
|
|
5282
5282
|
var m = pe.transition;
|
|
@@ -5292,7 +5292,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5292
5292
|
}
|
|
5293
5293
|
}
|
|
5294
5294
|
}
|
|
5295
|
-
var
|
|
5295
|
+
var Pr = !1, Ht = null;
|
|
5296
5296
|
function _o(o) {
|
|
5297
5297
|
if (Ht === null)
|
|
5298
5298
|
try {
|
|
@@ -5300,14 +5300,14 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5300
5300
|
Ht = m.call(e, "timers").setImmediate;
|
|
5301
5301
|
} catch {
|
|
5302
5302
|
Ht = function(w) {
|
|
5303
|
-
|
|
5303
|
+
Pr === !1 && (Pr = !0, typeof MessageChannel > "u" && k("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));
|
|
5304
5304
|
var x = new MessageChannel();
|
|
5305
5305
|
x.port1.onmessage = w, x.port2.postMessage(void 0);
|
|
5306
5306
|
};
|
|
5307
5307
|
}
|
|
5308
5308
|
return Ht(o);
|
|
5309
5309
|
}
|
|
5310
|
-
var st = 0,
|
|
5310
|
+
var st = 0, Ir = !1;
|
|
5311
5311
|
function Eo(o) {
|
|
5312
5312
|
{
|
|
5313
5313
|
var c = st;
|
|
@@ -5333,9 +5333,9 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5333
5333
|
});
|
|
5334
5334
|
}
|
|
5335
5335
|
};
|
|
5336
|
-
return !
|
|
5336
|
+
return !Ir && typeof Promise < "u" && Promise.resolve().then(function() {
|
|
5337
5337
|
}).then(function() {
|
|
5338
|
-
A || (
|
|
5338
|
+
A || (Ir = !0, k("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"));
|
|
5339
5339
|
}), P;
|
|
5340
5340
|
} else {
|
|
5341
5341
|
var N = v;
|
|
@@ -5397,7 +5397,7 @@ Check the top-level render call using <` + m + ">.");
|
|
|
5397
5397
|
}
|
|
5398
5398
|
}
|
|
5399
5399
|
}
|
|
5400
|
-
var bo =
|
|
5400
|
+
var bo = kr, So = vo, wo = mo, Ro = {
|
|
5401
5401
|
map: Ye,
|
|
5402
5402
|
forEach: Mt,
|
|
5403
5403
|
count: gn,
|
|
@@ -5419,11 +5419,11 @@ var Ae = Jn.exports;
|
|
|
5419
5419
|
* This source code is licensed under the MIT license found in the
|
|
5420
5420
|
* LICENSE file in the root directory of this source tree.
|
|
5421
5421
|
*/
|
|
5422
|
-
var
|
|
5422
|
+
var ls;
|
|
5423
5423
|
function Za() {
|
|
5424
|
-
if (
|
|
5424
|
+
if (ls)
|
|
5425
5425
|
return bt;
|
|
5426
|
-
|
|
5426
|
+
ls = 1;
|
|
5427
5427
|
var e = Ae, t = Symbol.for("react.element"), n = Symbol.for("react.fragment"), r = Object.prototype.hasOwnProperty, s = e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner, i = { key: !0, ref: !0, __self: !0, __source: !0 };
|
|
5428
5428
|
function a(u, d, l) {
|
|
5429
5429
|
var y, h = {}, E = null, S = null;
|
|
@@ -5447,9 +5447,9 @@ var St = {};
|
|
|
5447
5447
|
* This source code is licensed under the MIT license found in the
|
|
5448
5448
|
* LICENSE file in the root directory of this source tree.
|
|
5449
5449
|
*/
|
|
5450
|
-
var
|
|
5450
|
+
var ds;
|
|
5451
5451
|
function Qa() {
|
|
5452
|
-
return
|
|
5452
|
+
return ds || (ds = 1, process.env.NODE_ENV !== "production" && function() {
|
|
5453
5453
|
var e = Ae, t = Symbol.for("react.element"), n = Symbol.for("react.portal"), r = Symbol.for("react.fragment"), s = Symbol.for("react.strict_mode"), i = Symbol.for("react.profiler"), a = Symbol.for("react.provider"), u = Symbol.for("react.context"), d = Symbol.for("react.forward_ref"), l = Symbol.for("react.suspense"), y = Symbol.for("react.suspense_list"), h = Symbol.for("react.memo"), E = Symbol.for("react.lazy"), S = Symbol.for("react.offscreen"), _ = Symbol.iterator, O = "@@iterator";
|
|
5454
5454
|
function D(f) {
|
|
5455
5455
|
if (f === null || typeof f != "object")
|
|
@@ -6035,32 +6035,36 @@ Check the top-level render call using <` + T + ">.");
|
|
|
6035
6035
|
}()), St;
|
|
6036
6036
|
}
|
|
6037
6037
|
process.env.NODE_ENV === "production" ? Yn.exports = Za() : Yn.exports = Qa();
|
|
6038
|
-
var
|
|
6039
|
-
const
|
|
6040
|
-
|
|
6041
|
-
|
|
6038
|
+
var Qs = Yn.exports;
|
|
6039
|
+
const Kn = Ae.createContext(
|
|
6040
|
+
{}
|
|
6041
|
+
), nu = () => {
|
|
6042
|
+
const e = Ae.useContext(Kn);
|
|
6043
|
+
console.log(Kn);
|
|
6044
|
+
const [t, n] = Ae.useState(
|
|
6045
|
+
e.getSnapshot().value === "loggedIn"
|
|
6042
6046
|
);
|
|
6043
6047
|
return Ae.useEffect(() => {
|
|
6044
|
-
const r = e
|
|
6048
|
+
const r = e.subscribe((s) => {
|
|
6045
6049
|
(s.value === "loggedIn" || s.value === "loggedOut") && n(s.value === "loggedIn");
|
|
6046
6050
|
});
|
|
6047
6051
|
return () => {
|
|
6048
6052
|
r == null || r.unsubscribe();
|
|
6049
6053
|
};
|
|
6050
|
-
}, [e]), { authActor: e
|
|
6054
|
+
}, [e]), { authActor: e, isLoggedIn: t };
|
|
6051
6055
|
}, ru = async (e = "", t = {
|
|
6052
6056
|
inspect: void 0,
|
|
6053
6057
|
endpoints: { login: "", logout: "", refresh: "", ssrRefresh: "" }
|
|
6054
6058
|
}) => typeof window < "u" ? (console.warn(
|
|
6055
6059
|
"App.getInitialProps::getAuth should not be run on the frontend. You are probably missing getServerSideProps in your page."
|
|
6056
|
-
), ut(
|
|
6060
|
+
), ut(us, {
|
|
6057
6061
|
inspect: t.inspect,
|
|
6058
6062
|
input: {
|
|
6059
6063
|
initialContext: {
|
|
6060
6064
|
endpoints: t.endpoints
|
|
6061
6065
|
}
|
|
6062
6066
|
}
|
|
6063
|
-
}).start()) : ut(
|
|
6067
|
+
}).start()) : ut(us, {
|
|
6064
6068
|
input: {
|
|
6065
6069
|
initialContext: {
|
|
6066
6070
|
endpoints: t.endpoints,
|
|
@@ -6070,10 +6074,10 @@ const Qs = Ae.createContext(void 0), nu = () => {
|
|
|
6070
6074
|
inspect: t.inspect
|
|
6071
6075
|
}).start();
|
|
6072
6076
|
function su({ actor: e, children: t }) {
|
|
6073
|
-
return /* @__PURE__ */
|
|
6077
|
+
return /* @__PURE__ */ Qs.jsx(Kn.Provider, { value: e, children: t });
|
|
6074
6078
|
}
|
|
6075
6079
|
let eu = (e = 21) => crypto.getRandomValues(new Uint8Array(e)).reduce((t, n) => (n &= 63, n < 36 ? t += n.toString(36) : n < 62 ? t += (n - 26).toString(36).toUpperCase() : n > 62 ? t += "-" : t += "_", t), "");
|
|
6076
|
-
const tu =
|
|
6080
|
+
const tu = ir({
|
|
6077
6081
|
actors: {
|
|
6078
6082
|
tick: Oi(
|
|
6079
6083
|
({ sendBack: e, input: t }) => {
|
|
@@ -6151,7 +6155,7 @@ const tu = or({
|
|
|
6151
6155
|
type: "final"
|
|
6152
6156
|
}
|
|
6153
6157
|
}
|
|
6154
|
-
}), ou =
|
|
6158
|
+
}), ou = ir({
|
|
6155
6159
|
actors: {
|
|
6156
6160
|
timer: tu
|
|
6157
6161
|
},
|
|
@@ -6241,11 +6245,11 @@ const tu = or({
|
|
|
6241
6245
|
target: "idle"
|
|
6242
6246
|
},
|
|
6243
6247
|
RESUME_TIMER: {
|
|
6244
|
-
actions:
|
|
6248
|
+
actions: Kr("timer", { type: "RESUME_TIMER" })
|
|
6245
6249
|
// cond: (context) => context.duration > 0,
|
|
6246
6250
|
},
|
|
6247
6251
|
PAUSE_TIMER: {
|
|
6248
|
-
actions:
|
|
6252
|
+
actions: Kr("timer", { type: "PAUSE_TIMER" })
|
|
6249
6253
|
// cond: (context) => context.duration > 0,
|
|
6250
6254
|
}
|
|
6251
6255
|
}
|
|
@@ -6284,14 +6288,14 @@ function au({
|
|
|
6284
6288
|
children: e,
|
|
6285
6289
|
actor: t
|
|
6286
6290
|
}) {
|
|
6287
|
-
return /* @__PURE__ */
|
|
6291
|
+
return /* @__PURE__ */ Qs.jsx(eo.Provider, { value: t, children: e });
|
|
6288
6292
|
}
|
|
6289
6293
|
export {
|
|
6290
|
-
|
|
6294
|
+
Kn as AuthContext,
|
|
6291
6295
|
su as AuthProvider,
|
|
6292
6296
|
eo as ToastContext,
|
|
6293
6297
|
au as ToastProvider,
|
|
6294
|
-
|
|
6298
|
+
us as authMachine,
|
|
6295
6299
|
ru as getAuth,
|
|
6296
6300
|
tu as timerMachine,
|
|
6297
6301
|
ou as toastMachine,
|