flemo 1.3.6 → 1.3.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.mjs +1191 -1369
- package/package.json +3 -5
package/dist/index.mjs
CHANGED
|
@@ -1,12 +1,11 @@
|
|
|
1
|
-
import { jsx as
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
const e = "/", t = (f) => f, n = /^[$_\p{ID_Start}]$/u, s = /^[$\u200c\u200d\p{ID_Continue}]$/u, r = {
|
|
1
|
+
import { jsx as D, jsxs as ct } from "react/jsx-runtime";
|
|
2
|
+
import nt, { useEffect as z, createContext as dt, useContext as pt, useReducer as Ht, Children as It, Suspense as _t, useImperativeHandle as jt, useState as mt, useRef as H, useLayoutEffect as Et } from "react";
|
|
3
|
+
import { transform as ft, useAnimate as Lt, motion as J, useDragControls as Ft, AnimatePresence as Qt, MotionConfig as qt } from "motion/react";
|
|
4
|
+
var _ = {}, wt;
|
|
5
|
+
function Yt() {
|
|
6
|
+
if (wt) return _;
|
|
7
|
+
wt = 1, Object.defineProperty(_, "__esModule", { value: !0 }), _.PathError = _.TokenData = void 0, _.parse = l, _.compile = m, _.match = P, _.pathToRegexp = L, _.stringify = U;
|
|
8
|
+
const n = "/", e = (i) => i, t = /^[$_\p{ID_Start}]$/u, r = /^[$\u200c\u200d\p{ID_Continue}]$/u, s = {
|
|
10
9
|
// Groups.
|
|
11
10
|
"{": "{",
|
|
12
11
|
"}": "}",
|
|
@@ -19,281 +18,283 @@ function Ie() {
|
|
|
19
18
|
"?": "?",
|
|
20
19
|
"!": "!"
|
|
21
20
|
};
|
|
22
|
-
function
|
|
23
|
-
return
|
|
21
|
+
function a(i) {
|
|
22
|
+
return i.replace(/[{}()\[\]+?!:*\\]/g, "\\$&");
|
|
24
23
|
}
|
|
25
|
-
function i
|
|
26
|
-
return
|
|
24
|
+
function o(i) {
|
|
25
|
+
return i.replace(/[.+*?^${}()[\]|/\\]/g, "\\$&");
|
|
27
26
|
}
|
|
28
|
-
class
|
|
29
|
-
constructor(
|
|
30
|
-
this.tokens =
|
|
27
|
+
class c {
|
|
28
|
+
constructor(y, g) {
|
|
29
|
+
this.tokens = y, this.originalPath = g;
|
|
31
30
|
}
|
|
32
31
|
}
|
|
33
|
-
|
|
34
|
-
class
|
|
35
|
-
constructor(
|
|
36
|
-
let
|
|
37
|
-
|
|
32
|
+
_.TokenData = c;
|
|
33
|
+
class h extends TypeError {
|
|
34
|
+
constructor(y, g) {
|
|
35
|
+
let E = y;
|
|
36
|
+
g && (E += `: ${g}`), E += "; visit https://git.new/pathToRegexpError for info", super(E), this.originalPath = g;
|
|
38
37
|
}
|
|
39
38
|
}
|
|
40
|
-
|
|
41
|
-
function
|
|
42
|
-
const { encodePath:
|
|
43
|
-
let
|
|
44
|
-
function
|
|
45
|
-
let
|
|
46
|
-
if (
|
|
39
|
+
_.PathError = h;
|
|
40
|
+
function l(i, y = {}) {
|
|
41
|
+
const { encodePath: g = e } = y, E = [...i], p = [];
|
|
42
|
+
let f = 0, I = 0;
|
|
43
|
+
function T() {
|
|
44
|
+
let S = "";
|
|
45
|
+
if (t.test(E[f]))
|
|
47
46
|
do
|
|
48
|
-
|
|
49
|
-
while (
|
|
50
|
-
else if (
|
|
51
|
-
let
|
|
52
|
-
for (;
|
|
53
|
-
if (
|
|
54
|
-
|
|
47
|
+
S += E[f++];
|
|
48
|
+
while (r.test(E[f]));
|
|
49
|
+
else if (E[f] === '"') {
|
|
50
|
+
let M = f;
|
|
51
|
+
for (; f++ < E.length; ) {
|
|
52
|
+
if (E[f] === '"') {
|
|
53
|
+
f++, M = 0;
|
|
55
54
|
break;
|
|
56
55
|
}
|
|
57
|
-
|
|
56
|
+
E[f] === "\\" && f++, S += E[f];
|
|
58
57
|
}
|
|
59
|
-
if (
|
|
60
|
-
throw new
|
|
58
|
+
if (M)
|
|
59
|
+
throw new h(`Unterminated quote at index ${M}`, i);
|
|
61
60
|
}
|
|
62
|
-
if (!
|
|
63
|
-
throw new
|
|
64
|
-
return
|
|
61
|
+
if (!S)
|
|
62
|
+
throw new h(`Missing parameter name at index ${f}`, i);
|
|
63
|
+
return S;
|
|
65
64
|
}
|
|
66
|
-
for (;
|
|
67
|
-
const
|
|
68
|
-
|
|
65
|
+
for (; f < E.length; ) {
|
|
66
|
+
const S = E[f], M = s[S];
|
|
67
|
+
M ? p.push({ type: M, index: f++, value: S }) : S === "\\" ? p.push({ type: "escape", index: f++, value: E[f++] }) : S === ":" ? p.push({ type: "param", index: f++, value: T() }) : S === "*" ? p.push({ type: "wildcard", index: f++, value: T() }) : p.push({ type: "char", index: f++, value: S });
|
|
69
68
|
}
|
|
70
|
-
|
|
71
|
-
function
|
|
72
|
-
const
|
|
69
|
+
p.push({ type: "end", index: f, value: "" });
|
|
70
|
+
function O(S) {
|
|
71
|
+
const M = [];
|
|
73
72
|
for (; ; ) {
|
|
74
|
-
const
|
|
75
|
-
if (
|
|
73
|
+
const x = p[I++];
|
|
74
|
+
if (x.type === S)
|
|
76
75
|
break;
|
|
77
|
-
if (
|
|
78
|
-
let
|
|
79
|
-
for (;
|
|
80
|
-
|
|
81
|
-
|
|
76
|
+
if (x.type === "char" || x.type === "escape") {
|
|
77
|
+
let C = x.value, b = p[I];
|
|
78
|
+
for (; b.type === "char" || b.type === "escape"; )
|
|
79
|
+
C += b.value, b = p[++I];
|
|
80
|
+
M.push({
|
|
82
81
|
type: "text",
|
|
83
|
-
value:
|
|
82
|
+
value: g(C)
|
|
84
83
|
});
|
|
85
84
|
continue;
|
|
86
85
|
}
|
|
87
|
-
if (
|
|
88
|
-
|
|
89
|
-
type:
|
|
90
|
-
name:
|
|
86
|
+
if (x.type === "param" || x.type === "wildcard") {
|
|
87
|
+
M.push({
|
|
88
|
+
type: x.type,
|
|
89
|
+
name: x.value
|
|
91
90
|
});
|
|
92
91
|
continue;
|
|
93
92
|
}
|
|
94
|
-
if (
|
|
95
|
-
|
|
93
|
+
if (x.type === "{") {
|
|
94
|
+
M.push({
|
|
96
95
|
type: "group",
|
|
97
|
-
tokens:
|
|
96
|
+
tokens: O("}")
|
|
98
97
|
});
|
|
99
98
|
continue;
|
|
100
99
|
}
|
|
101
|
-
throw new
|
|
100
|
+
throw new h(`Unexpected ${x.type} at index ${x.index}, expected ${S}`, i);
|
|
102
101
|
}
|
|
103
|
-
return
|
|
102
|
+
return M;
|
|
104
103
|
}
|
|
105
|
-
return new
|
|
104
|
+
return new c(O("end"), i);
|
|
106
105
|
}
|
|
107
|
-
function
|
|
108
|
-
const { encode:
|
|
109
|
-
return function(
|
|
110
|
-
const [
|
|
111
|
-
if (
|
|
112
|
-
throw new TypeError(`Missing parameters: ${
|
|
113
|
-
return
|
|
106
|
+
function m(i, y = {}) {
|
|
107
|
+
const { encode: g = encodeURIComponent, delimiter: E = n } = y, p = typeof i == "object" ? i : l(i, y), f = d(p.tokens, E, g);
|
|
108
|
+
return function(T = {}) {
|
|
109
|
+
const [O, ...S] = f(T);
|
|
110
|
+
if (S.length)
|
|
111
|
+
throw new TypeError(`Missing parameters: ${S.join(", ")}`);
|
|
112
|
+
return O;
|
|
114
113
|
};
|
|
115
114
|
}
|
|
116
|
-
function
|
|
117
|
-
const
|
|
118
|
-
return (
|
|
119
|
-
const
|
|
120
|
-
for (const
|
|
121
|
-
const [
|
|
122
|
-
|
|
115
|
+
function d(i, y, g) {
|
|
116
|
+
const E = i.map((p) => u(p, y, g));
|
|
117
|
+
return (p) => {
|
|
118
|
+
const f = [""];
|
|
119
|
+
for (const I of E) {
|
|
120
|
+
const [T, ...O] = I(p);
|
|
121
|
+
f[0] += T, f.push(...O);
|
|
123
122
|
}
|
|
124
|
-
return
|
|
123
|
+
return f;
|
|
125
124
|
};
|
|
126
125
|
}
|
|
127
|
-
function
|
|
128
|
-
if (
|
|
129
|
-
return () => [
|
|
130
|
-
if (
|
|
131
|
-
const
|
|
132
|
-
return (
|
|
133
|
-
const [
|
|
134
|
-
return
|
|
126
|
+
function u(i, y, g) {
|
|
127
|
+
if (i.type === "text")
|
|
128
|
+
return () => [i.value];
|
|
129
|
+
if (i.type === "group") {
|
|
130
|
+
const p = d(i.tokens, y, g);
|
|
131
|
+
return (f) => {
|
|
132
|
+
const [I, ...T] = p(f);
|
|
133
|
+
return T.length ? [""] : [I];
|
|
135
134
|
};
|
|
136
135
|
}
|
|
137
|
-
const
|
|
138
|
-
return
|
|
139
|
-
const
|
|
140
|
-
if (
|
|
141
|
-
return ["",
|
|
142
|
-
if (!Array.isArray(
|
|
143
|
-
throw new TypeError(`Expected "${
|
|
136
|
+
const E = g || e;
|
|
137
|
+
return i.type === "wildcard" && g !== !1 ? (p) => {
|
|
138
|
+
const f = p[i.name];
|
|
139
|
+
if (f == null)
|
|
140
|
+
return ["", i.name];
|
|
141
|
+
if (!Array.isArray(f) || f.length === 0)
|
|
142
|
+
throw new TypeError(`Expected "${i.name}" to be a non-empty array`);
|
|
144
143
|
return [
|
|
145
|
-
|
|
146
|
-
if (typeof
|
|
147
|
-
throw new TypeError(`Expected "${
|
|
148
|
-
return
|
|
149
|
-
}).join(
|
|
144
|
+
f.map((I, T) => {
|
|
145
|
+
if (typeof I != "string")
|
|
146
|
+
throw new TypeError(`Expected "${i.name}/${T}" to be a string`);
|
|
147
|
+
return E(I);
|
|
148
|
+
}).join(y)
|
|
150
149
|
];
|
|
151
|
-
} : (
|
|
152
|
-
const
|
|
153
|
-
if (
|
|
154
|
-
return ["",
|
|
155
|
-
if (typeof
|
|
156
|
-
throw new TypeError(`Expected "${
|
|
157
|
-
return [
|
|
150
|
+
} : (p) => {
|
|
151
|
+
const f = p[i.name];
|
|
152
|
+
if (f == null)
|
|
153
|
+
return ["", i.name];
|
|
154
|
+
if (typeof f != "string")
|
|
155
|
+
throw new TypeError(`Expected "${i.name}" to be a string`);
|
|
156
|
+
return [E(f)];
|
|
158
157
|
};
|
|
159
158
|
}
|
|
160
|
-
function
|
|
161
|
-
const { decode:
|
|
162
|
-
return function(
|
|
163
|
-
const
|
|
164
|
-
if (!
|
|
159
|
+
function P(i, y = {}) {
|
|
160
|
+
const { decode: g = decodeURIComponent, delimiter: E = n } = y, { regexp: p, keys: f } = L(i, y), I = f.map((T) => g === !1 ? e : T.type === "param" ? g : (O) => O.split(E).map(g));
|
|
161
|
+
return function(O) {
|
|
162
|
+
const S = p.exec(O);
|
|
163
|
+
if (!S)
|
|
165
164
|
return !1;
|
|
166
|
-
const
|
|
167
|
-
for (let
|
|
168
|
-
if (
|
|
165
|
+
const M = S[0], x = /* @__PURE__ */ Object.create(null);
|
|
166
|
+
for (let C = 1; C < S.length; C++) {
|
|
167
|
+
if (S[C] === void 0)
|
|
169
168
|
continue;
|
|
170
|
-
const
|
|
171
|
-
|
|
169
|
+
const b = f[C - 1], W = I[C - 1];
|
|
170
|
+
x[b.name] = W(S[C]);
|
|
172
171
|
}
|
|
173
|
-
return { path:
|
|
172
|
+
return { path: M, params: x };
|
|
174
173
|
};
|
|
175
174
|
}
|
|
176
|
-
function
|
|
177
|
-
const { delimiter:
|
|
178
|
-
for (const
|
|
179
|
-
const
|
|
180
|
-
for (const
|
|
181
|
-
|
|
175
|
+
function L(i, y = {}) {
|
|
176
|
+
const { delimiter: g = n, end: E = !0, sensitive: p = !1, trailing: f = !0 } = y, I = [], T = p ? "" : "i", O = [];
|
|
177
|
+
for (const x of N(i, [])) {
|
|
178
|
+
const C = typeof x == "object" ? x : l(x, y);
|
|
179
|
+
for (const b of w(C.tokens, 0, []))
|
|
180
|
+
O.push(k(b, g, I, C.originalPath));
|
|
182
181
|
}
|
|
183
|
-
let
|
|
184
|
-
return
|
|
182
|
+
let S = `^(?:${O.join("|")})`;
|
|
183
|
+
return f && (S += `(?:${o(g)}$)?`), S += E ? "$" : `(?=${o(g)}|$)`, { regexp: new RegExp(S, T), keys: I };
|
|
185
184
|
}
|
|
186
|
-
function
|
|
187
|
-
if (Array.isArray(
|
|
188
|
-
for (const
|
|
189
|
-
|
|
185
|
+
function N(i, y) {
|
|
186
|
+
if (Array.isArray(i))
|
|
187
|
+
for (const g of i)
|
|
188
|
+
N(g, y);
|
|
190
189
|
else
|
|
191
|
-
|
|
192
|
-
return
|
|
190
|
+
y.push(i);
|
|
191
|
+
return y;
|
|
193
192
|
}
|
|
194
|
-
function*
|
|
195
|
-
if (
|
|
196
|
-
return yield
|
|
197
|
-
const
|
|
198
|
-
if (
|
|
199
|
-
for (const
|
|
200
|
-
yield*
|
|
193
|
+
function* w(i, y, g) {
|
|
194
|
+
if (y === i.length)
|
|
195
|
+
return yield g;
|
|
196
|
+
const E = i[y];
|
|
197
|
+
if (E.type === "group")
|
|
198
|
+
for (const p of w(E.tokens, 0, g.slice()))
|
|
199
|
+
yield* w(i, y + 1, p);
|
|
201
200
|
else
|
|
202
|
-
|
|
203
|
-
yield*
|
|
201
|
+
g.push(E);
|
|
202
|
+
yield* w(i, y + 1, g);
|
|
204
203
|
}
|
|
205
|
-
function
|
|
206
|
-
let
|
|
207
|
-
for (const
|
|
208
|
-
if (
|
|
209
|
-
|
|
204
|
+
function k(i, y, g, E) {
|
|
205
|
+
let p = "", f = "", I = !0;
|
|
206
|
+
for (const T of i) {
|
|
207
|
+
if (T.type === "text") {
|
|
208
|
+
p += o(T.value), f += T.value, I || (I = T.value.includes(y));
|
|
210
209
|
continue;
|
|
211
210
|
}
|
|
212
|
-
if (
|
|
213
|
-
if (!
|
|
214
|
-
throw new
|
|
215
|
-
|
|
211
|
+
if (T.type === "param" || T.type === "wildcard") {
|
|
212
|
+
if (!I && !f)
|
|
213
|
+
throw new h(`Missing text before "${T.name}" ${T.type}`, E);
|
|
214
|
+
T.type === "param" ? p += `(${F(y, I ? "" : f)}+)` : p += "([\\s\\S]+)", g.push(T), f = "", I = !1;
|
|
216
215
|
continue;
|
|
217
216
|
}
|
|
218
217
|
}
|
|
219
|
-
return
|
|
218
|
+
return p;
|
|
220
219
|
}
|
|
221
|
-
function
|
|
222
|
-
return
|
|
220
|
+
function F(i, y) {
|
|
221
|
+
return y.length < 2 ? i.length < 2 ? `[^${o(i + y)}]` : `(?:(?!${o(i)})[^${o(y)}])` : i.length < 2 ? `(?:(?!${o(y)})[^${o(i)}])` : `(?:(?!${o(y)}|${o(i)})[\\s\\S])`;
|
|
223
222
|
}
|
|
224
|
-
function
|
|
225
|
-
let
|
|
226
|
-
function
|
|
227
|
-
return R(
|
|
223
|
+
function Q(i) {
|
|
224
|
+
let y = "", g = 0;
|
|
225
|
+
function E(p) {
|
|
226
|
+
return R(p) && A(i[g]) ? p : JSON.stringify(p);
|
|
228
227
|
}
|
|
229
|
-
for (;
|
|
230
|
-
const
|
|
231
|
-
if (
|
|
232
|
-
|
|
228
|
+
for (; g < i.length; ) {
|
|
229
|
+
const p = i[g++];
|
|
230
|
+
if (p.type === "text") {
|
|
231
|
+
y += a(p.value);
|
|
233
232
|
continue;
|
|
234
233
|
}
|
|
235
|
-
if (
|
|
236
|
-
|
|
234
|
+
if (p.type === "group") {
|
|
235
|
+
y += `{${Q(p.tokens)}}`;
|
|
237
236
|
continue;
|
|
238
237
|
}
|
|
239
|
-
if (
|
|
240
|
-
|
|
238
|
+
if (p.type === "param") {
|
|
239
|
+
y += `:${E(p.name)}`;
|
|
241
240
|
continue;
|
|
242
241
|
}
|
|
243
|
-
if (
|
|
244
|
-
|
|
242
|
+
if (p.type === "wildcard") {
|
|
243
|
+
y += `*${E(p.name)}`;
|
|
245
244
|
continue;
|
|
246
245
|
}
|
|
247
|
-
throw new TypeError(`Unknown token type: ${
|
|
246
|
+
throw new TypeError(`Unknown token type: ${p.type}`);
|
|
248
247
|
}
|
|
249
|
-
return
|
|
248
|
+
return y;
|
|
250
249
|
}
|
|
251
|
-
function
|
|
252
|
-
return
|
|
250
|
+
function U(i) {
|
|
251
|
+
return Q(i.tokens);
|
|
253
252
|
}
|
|
254
|
-
function R(
|
|
255
|
-
const [
|
|
256
|
-
return
|
|
253
|
+
function R(i) {
|
|
254
|
+
const [y, ...g] = i;
|
|
255
|
+
return t.test(y) && g.every((E) => r.test(E));
|
|
257
256
|
}
|
|
258
|
-
function
|
|
259
|
-
return
|
|
257
|
+
function A(i) {
|
|
258
|
+
return i && i.type === "text" ? !r.test(i.value[0]) : !0;
|
|
260
259
|
}
|
|
261
|
-
return
|
|
260
|
+
return _;
|
|
262
261
|
}
|
|
263
|
-
var
|
|
264
|
-
function
|
|
265
|
-
const
|
|
266
|
-
return
|
|
267
|
-
...r.params,
|
|
268
|
-
...i
|
|
269
|
-
} : {};
|
|
262
|
+
var V = Yt();
|
|
263
|
+
function Bt(n, e, t) {
|
|
264
|
+
const r = Array.isArray(n) ? n.find((c) => V.pathToRegexp(c).regexp.test(e)) || "" : V.pathToRegexp(n).regexp.test(e) ? n : "", s = V.match(r)(e), a = new URLSearchParams(t), o = Object.fromEntries(a.entries());
|
|
265
|
+
return s ? { ...s.params, ...o } : {};
|
|
270
266
|
}
|
|
271
|
-
function
|
|
267
|
+
function St() {
|
|
272
268
|
return typeof document > "u";
|
|
273
269
|
}
|
|
274
|
-
class
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
270
|
+
class Xt {
|
|
271
|
+
tasks = /* @__PURE__ */ new Map();
|
|
272
|
+
instanceId = Date.now().toString();
|
|
273
|
+
isLocked = !1;
|
|
274
|
+
currentTaskId = null;
|
|
275
|
+
taskQueue = Promise.resolve();
|
|
276
|
+
signalListeners = /* @__PURE__ */ new Map();
|
|
277
|
+
pendingTaskQueue = [];
|
|
278
|
+
isProcessingPending = !1;
|
|
279
|
+
async acquireLock(e) {
|
|
280
|
+
for (let s = 0; s < 10; s++) {
|
|
280
281
|
if (!this.isLocked)
|
|
281
|
-
return this.isLocked = !0, this.currentTaskId =
|
|
282
|
-
await new Promise((
|
|
282
|
+
return this.isLocked = !0, this.currentTaskId = e, !0;
|
|
283
|
+
await new Promise((a) => setTimeout(a, 100));
|
|
283
284
|
}
|
|
284
285
|
return !1;
|
|
285
286
|
}
|
|
286
|
-
releaseLock(
|
|
287
|
-
this.currentTaskId ===
|
|
287
|
+
releaseLock(e) {
|
|
288
|
+
this.currentTaskId === e && (this.isLocked = !1, this.currentTaskId = null);
|
|
288
289
|
}
|
|
289
290
|
generateTaskId() {
|
|
290
291
|
return `${this.instanceId}-${Date.now()}-${Math.random().toString(36).substr(2, 9)}`;
|
|
291
292
|
}
|
|
292
|
-
emitSignal(
|
|
293
|
-
const
|
|
294
|
-
|
|
295
|
-
this.resolveTask(
|
|
296
|
-
}), this.signalListeners.delete(
|
|
293
|
+
emitSignal(e) {
|
|
294
|
+
const t = this.signalListeners.get(e);
|
|
295
|
+
t && (t.forEach((r) => {
|
|
296
|
+
this.resolveTask(r);
|
|
297
|
+
}), this.signalListeners.delete(e));
|
|
297
298
|
}
|
|
298
299
|
// 대기 중인 태스크들을 처리하는 메서드
|
|
299
300
|
async processPendingTasks() {
|
|
@@ -301,12 +302,12 @@ class Ne {
|
|
|
301
302
|
this.isProcessingPending = !0;
|
|
302
303
|
try {
|
|
303
304
|
for (; this.pendingTaskQueue.length > 0; ) {
|
|
304
|
-
const
|
|
305
|
-
if (
|
|
305
|
+
const e = this.pendingTaskQueue[0];
|
|
306
|
+
if (e.status === "COMPLETED" || e.status === "FAILED" || e.status === "ROLLEDBACK") {
|
|
306
307
|
this.pendingTaskQueue.shift();
|
|
307
308
|
continue;
|
|
308
309
|
}
|
|
309
|
-
if (
|
|
310
|
+
if (e.status === "MANUAL_PENDING" || e.status === "SIGNAL_PENDING" || e.status === "PROCESSING" || e.status === "PENDING")
|
|
310
311
|
break;
|
|
311
312
|
}
|
|
312
313
|
} finally {
|
|
@@ -316,242 +317,221 @@ class Ne {
|
|
|
316
317
|
}
|
|
317
318
|
// 모든 대기 중인 태스크가 완료될 때까지 대기
|
|
318
319
|
async waitForPendingTasks() {
|
|
319
|
-
return new Promise((
|
|
320
|
-
const
|
|
321
|
-
this.pendingTaskQueue.filter(
|
|
320
|
+
return new Promise((e) => {
|
|
321
|
+
const t = () => {
|
|
322
|
+
this.pendingTaskQueue.filter(
|
|
323
|
+
(s) => s.status === "MANUAL_PENDING" || s.status === "SIGNAL_PENDING"
|
|
324
|
+
).length === 0 ? e() : setTimeout(t, 100);
|
|
322
325
|
};
|
|
323
|
-
|
|
326
|
+
t();
|
|
324
327
|
});
|
|
325
328
|
}
|
|
326
329
|
// 태스크 상태 변경 시 대기 큐 처리
|
|
327
|
-
async onTaskStatusChange(
|
|
328
|
-
(
|
|
330
|
+
async onTaskStatusChange(e, t) {
|
|
331
|
+
(t === "COMPLETED" || t === "FAILED" || t === "ROLLEDBACK") && (this.pendingTaskQueue = this.pendingTaskQueue.filter((r) => r.id !== e), await this.processPendingTasks());
|
|
329
332
|
}
|
|
330
|
-
async addTask(
|
|
331
|
-
const
|
|
332
|
-
return new Promise((
|
|
333
|
+
async addTask(e, t = {}) {
|
|
334
|
+
const r = t.id || this.generateTaskId();
|
|
335
|
+
return new Promise((s, a) => {
|
|
333
336
|
this.taskQueue = this.taskQueue.then(async () => {
|
|
334
337
|
try {
|
|
335
|
-
const {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
rollback: l,
|
|
339
|
-
dependencies: a = [],
|
|
340
|
-
delay: d
|
|
341
|
-
} = n, g = new AbortController(), o = {
|
|
342
|
-
id: s,
|
|
343
|
-
execute: t,
|
|
338
|
+
const { control: o, validate: c, rollback: h, dependencies: l = [], delay: m } = t, d = new AbortController(), u = {
|
|
339
|
+
id: r,
|
|
340
|
+
execute: e,
|
|
344
341
|
timestamp: Date.now(),
|
|
345
342
|
retryCount: 0,
|
|
346
343
|
status: "PENDING",
|
|
347
|
-
dependencies:
|
|
344
|
+
dependencies: l,
|
|
348
345
|
instanceId: this.instanceId,
|
|
349
|
-
validate:
|
|
350
|
-
rollback:
|
|
351
|
-
control:
|
|
352
|
-
abortController:
|
|
346
|
+
validate: c,
|
|
347
|
+
rollback: h,
|
|
348
|
+
control: o,
|
|
349
|
+
abortController: d
|
|
353
350
|
};
|
|
354
|
-
this.tasks.set(
|
|
351
|
+
this.tasks.set(u.id, u), this.pendingTaskQueue.length > 0 && (this.pendingTaskQueue.push(u), await this.waitForPendingTasks(), this.pendingTaskQueue = this.pendingTaskQueue.filter((L) => L.id !== u.id));
|
|
355
352
|
try {
|
|
356
|
-
if (!await this.acquireLock(
|
|
357
|
-
throw
|
|
353
|
+
if (!await this.acquireLock(u.id))
|
|
354
|
+
throw u.status = "FAILED", new Error("FAILED");
|
|
358
355
|
try {
|
|
359
|
-
|
|
360
|
-
for (const
|
|
361
|
-
const
|
|
362
|
-
if (!
|
|
363
|
-
throw
|
|
356
|
+
u.status = "PROCESSING";
|
|
357
|
+
for (const w of u.dependencies) {
|
|
358
|
+
const k = this.tasks.get(w);
|
|
359
|
+
if (!k || k.status !== "COMPLETED")
|
|
360
|
+
throw u.status = "FAILED", new Error("FAILED");
|
|
364
361
|
}
|
|
365
|
-
if (
|
|
366
|
-
throw
|
|
367
|
-
|
|
368
|
-
const
|
|
369
|
-
if (
|
|
370
|
-
|
|
362
|
+
if (u.validate && !await u.validate())
|
|
363
|
+
throw u.status = "FAILED", new Error("FAILED");
|
|
364
|
+
m && m > 0 && await new Promise((w) => setTimeout(w, m));
|
|
365
|
+
const N = await u.execute(u.abortController);
|
|
366
|
+
if (u.abortController.signal.aborted) {
|
|
367
|
+
u.status = "COMPLETED", await this.onTaskStatusChange(u.id, "COMPLETED"), s({
|
|
371
368
|
success: !0,
|
|
372
369
|
result: void 0,
|
|
373
|
-
taskId:
|
|
370
|
+
taskId: u.id,
|
|
374
371
|
timestamp: Date.now(),
|
|
375
372
|
instanceId: this.instanceId
|
|
376
373
|
});
|
|
377
374
|
return;
|
|
378
375
|
}
|
|
379
|
-
if (
|
|
380
|
-
const
|
|
381
|
-
if (
|
|
382
|
-
|
|
383
|
-
resolve: r,
|
|
384
|
-
reject: c,
|
|
385
|
-
result: E
|
|
386
|
-
}, this.pendingTaskQueue.push(o), await this.onTaskStatusChange(o.id, "MANUAL_PENDING");
|
|
376
|
+
if (t.control) {
|
|
377
|
+
const w = t.control;
|
|
378
|
+
if (w.delay && w.delay > 0 && await new Promise((k) => setTimeout(k, w.delay)), w.manual) {
|
|
379
|
+
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: s, reject: a, result: N }, this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "MANUAL_PENDING");
|
|
387
380
|
return;
|
|
388
381
|
}
|
|
389
|
-
if (
|
|
390
|
-
|
|
391
|
-
resolve: r,
|
|
392
|
-
reject: c,
|
|
393
|
-
result: E
|
|
394
|
-
}, this.signalListeners.has(T.signal) || this.signalListeners.set(T.signal, /* @__PURE__ */ new Set()), this.signalListeners.get(T.signal).add(o.id), this.pendingTaskQueue.push(o), await this.onTaskStatusChange(o.id, "SIGNAL_PENDING");
|
|
382
|
+
if (w.signal) {
|
|
383
|
+
u.status = "SIGNAL_PENDING", u.manualResolver = { resolve: s, reject: a, result: N }, this.signalListeners.has(w.signal) || this.signalListeners.set(w.signal, /* @__PURE__ */ new Set()), this.signalListeners.get(w.signal).add(u.id), this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "SIGNAL_PENDING");
|
|
395
384
|
return;
|
|
396
385
|
}
|
|
397
|
-
if (
|
|
398
|
-
|
|
399
|
-
resolve: r,
|
|
400
|
-
reject: c,
|
|
401
|
-
result: E
|
|
402
|
-
}, this.pendingTaskQueue.push(o), await this.onTaskStatusChange(o.id, "MANUAL_PENDING");
|
|
386
|
+
if (w.condition && !await w.condition()) {
|
|
387
|
+
u.status = "MANUAL_PENDING", u.manualResolver = { resolve: s, reject: a, result: N }, this.pendingTaskQueue.push(u), await this.onTaskStatusChange(u.id, "MANUAL_PENDING");
|
|
403
388
|
return;
|
|
404
389
|
}
|
|
405
390
|
}
|
|
406
|
-
|
|
391
|
+
u.status = "COMPLETED", await this.onTaskStatusChange(u.id, "COMPLETED"), s({
|
|
407
392
|
success: !0,
|
|
408
|
-
result:
|
|
409
|
-
taskId:
|
|
393
|
+
result: N,
|
|
394
|
+
taskId: u.id,
|
|
410
395
|
timestamp: Date.now(),
|
|
411
396
|
instanceId: this.instanceId
|
|
412
397
|
});
|
|
413
|
-
} catch (
|
|
414
|
-
if (
|
|
398
|
+
} catch (N) {
|
|
399
|
+
if (u.status = "FAILED", u.rollback)
|
|
415
400
|
try {
|
|
416
|
-
await
|
|
401
|
+
await u.rollback(), u.status = "ROLLEDBACK";
|
|
417
402
|
} catch {
|
|
418
403
|
}
|
|
419
|
-
throw await this.onTaskStatusChange(
|
|
404
|
+
throw await this.onTaskStatusChange(u.id, u.status), N;
|
|
420
405
|
} finally {
|
|
421
|
-
this.releaseLock(
|
|
406
|
+
this.releaseLock(u.id);
|
|
422
407
|
}
|
|
423
|
-
} catch (
|
|
424
|
-
|
|
408
|
+
} catch (L) {
|
|
409
|
+
a(L);
|
|
425
410
|
}
|
|
426
|
-
} catch (
|
|
427
|
-
|
|
411
|
+
} catch (o) {
|
|
412
|
+
a(o);
|
|
428
413
|
}
|
|
429
|
-
}).catch(
|
|
414
|
+
}).catch(a);
|
|
430
415
|
});
|
|
431
416
|
}
|
|
432
|
-
async resolveTask(
|
|
433
|
-
const
|
|
434
|
-
if (!
|
|
417
|
+
async resolveTask(e) {
|
|
418
|
+
const t = this.tasks.get(e);
|
|
419
|
+
if (!t || t.status !== "MANUAL_PENDING")
|
|
435
420
|
return !1;
|
|
436
|
-
if (
|
|
437
|
-
if (
|
|
421
|
+
if (t.manualResolver) {
|
|
422
|
+
if (t.control?.condition && !await t.control.condition())
|
|
438
423
|
return !1;
|
|
439
|
-
|
|
440
|
-
const
|
|
441
|
-
return
|
|
424
|
+
t.status = "COMPLETED";
|
|
425
|
+
const r = t.manualResolver;
|
|
426
|
+
return r.resolve({
|
|
442
427
|
success: !0,
|
|
443
|
-
result:
|
|
444
|
-
taskId:
|
|
428
|
+
result: r.result,
|
|
429
|
+
taskId: t.id,
|
|
445
430
|
timestamp: Date.now(),
|
|
446
431
|
instanceId: this.instanceId
|
|
447
|
-
}), delete
|
|
432
|
+
}), delete t.manualResolver, await this.onTaskStatusChange(e, "COMPLETED"), !0;
|
|
448
433
|
}
|
|
449
434
|
return !1;
|
|
450
435
|
}
|
|
451
436
|
async resolveAllPending() {
|
|
452
|
-
const
|
|
453
|
-
|
|
437
|
+
const e = Array.from(this.tasks.values()).filter(
|
|
438
|
+
(t) => ["PENDING", "MANUAL_PENDING", "SIGNAL_PENDING"].includes(t.status)
|
|
439
|
+
);
|
|
440
|
+
await Promise.all(e.map((t) => this.resolveTask(t.id)));
|
|
454
441
|
}
|
|
455
442
|
}
|
|
456
|
-
const
|
|
457
|
-
let
|
|
458
|
-
const
|
|
459
|
-
const
|
|
460
|
-
if (!Object.is(
|
|
461
|
-
const
|
|
462
|
-
|
|
443
|
+
const q = new Xt(), Pt = (n) => {
|
|
444
|
+
let e;
|
|
445
|
+
const t = /* @__PURE__ */ new Set(), r = (l, m) => {
|
|
446
|
+
const d = typeof l == "function" ? l(e) : l;
|
|
447
|
+
if (!Object.is(d, e)) {
|
|
448
|
+
const u = e;
|
|
449
|
+
e = m ?? (typeof d != "object" || d === null) ? d : Object.assign({}, e, d), t.forEach((P) => P(e, u));
|
|
463
450
|
}
|
|
464
|
-
},
|
|
465
|
-
return
|
|
466
|
-
},
|
|
467
|
-
function
|
|
468
|
-
const
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
|
|
451
|
+
}, s = () => e, c = { setState: r, getState: s, getInitialState: () => h, subscribe: (l) => (t.add(l), () => t.delete(l)) }, h = e = n(r, s, c);
|
|
452
|
+
return c;
|
|
453
|
+
}, Kt = ((n) => n ? Pt(n) : Pt), Vt = (n) => n;
|
|
454
|
+
function zt(n, e = Vt) {
|
|
455
|
+
const t = nt.useSyncExternalStore(
|
|
456
|
+
n.subscribe,
|
|
457
|
+
nt.useCallback(() => e(n.getState()), [n, e]),
|
|
458
|
+
nt.useCallback(() => e(n.getInitialState()), [n, e])
|
|
472
459
|
);
|
|
473
|
-
return
|
|
460
|
+
return nt.useDebugValue(t), t;
|
|
474
461
|
}
|
|
475
|
-
const
|
|
476
|
-
const
|
|
477
|
-
return Object.assign(
|
|
478
|
-
},
|
|
462
|
+
const Tt = (n) => {
|
|
463
|
+
const e = Kt(n), t = (r) => zt(e, r);
|
|
464
|
+
return Object.assign(t, e), t;
|
|
465
|
+
}, st = ((n) => n ? Tt(n) : Tt), Y = st((n) => ({
|
|
479
466
|
index: -1,
|
|
480
467
|
histories: [],
|
|
481
|
-
addHistory: (
|
|
482
|
-
index:
|
|
483
|
-
histories:
|
|
468
|
+
addHistory: (e) => n((t) => ({
|
|
469
|
+
index: t.index + 1,
|
|
470
|
+
histories: t.histories.concat(e)
|
|
484
471
|
})),
|
|
485
|
-
replaceHistory: (
|
|
486
|
-
index:
|
|
487
|
-
histories:
|
|
472
|
+
replaceHistory: (e) => n((t) => (t.histories.splice(e, 1), {
|
|
473
|
+
index: t.index - 1,
|
|
474
|
+
histories: t.histories
|
|
488
475
|
})),
|
|
489
|
-
popHistory: (
|
|
490
|
-
index:
|
|
491
|
-
histories:
|
|
476
|
+
popHistory: (e) => n((t) => ({
|
|
477
|
+
index: t.index - 1,
|
|
478
|
+
histories: t.histories.filter((r, s) => s !== e)
|
|
492
479
|
}))
|
|
493
|
-
})),
|
|
480
|
+
})), j = st((n) => ({
|
|
494
481
|
status: "IDLE",
|
|
495
|
-
setStatus: (
|
|
496
|
-
status: t
|
|
497
|
-
})
|
|
482
|
+
setStatus: (e) => n({ status: e })
|
|
498
483
|
}));
|
|
499
|
-
function
|
|
500
|
-
|
|
501
|
-
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
|
|
509
|
-
}
|
|
510
|
-
|
|
511
|
-
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
|
|
518
|
-
|
|
519
|
-
|
|
520
|
-
|
|
521
|
-
|
|
522
|
-
|
|
523
|
-
|
|
524
|
-
|
|
525
|
-
|
|
526
|
-
|
|
527
|
-
|
|
528
|
-
|
|
529
|
-
|
|
530
|
-
|
|
531
|
-
|
|
532
|
-
|
|
533
|
-
layoutId: u
|
|
534
|
-
})), async () => {
|
|
535
|
-
o && g(s + 1), l("COMPLETED");
|
|
484
|
+
function Wt() {
|
|
485
|
+
return z(() => {
|
|
486
|
+
const n = async (e) => {
|
|
487
|
+
const t = e.state?.id;
|
|
488
|
+
(await q.addTask(
|
|
489
|
+
async (r) => {
|
|
490
|
+
const s = e.state?.index, a = e.state?.status, o = e.state?.params, c = e.state?.transitionName, h = e.state?.layoutId, l = j.getState().setStatus, { index: m, addHistory: d, popHistory: u } = Y.getState(), P = s < m, L = a === "PUSHING" && s > m, N = a === "REPLACING" && s > m, w = window.location.pathname;
|
|
491
|
+
if (!P && !L && !N) {
|
|
492
|
+
r.abort();
|
|
493
|
+
return;
|
|
494
|
+
}
|
|
495
|
+
return P ? l("POPPING") : L ? (l("PUSHING"), d({
|
|
496
|
+
id: t,
|
|
497
|
+
pathname: w,
|
|
498
|
+
params: o,
|
|
499
|
+
transitionName: c,
|
|
500
|
+
layoutId: h
|
|
501
|
+
})) : N && (l("REPLACING"), d({
|
|
502
|
+
id: t,
|
|
503
|
+
pathname: w,
|
|
504
|
+
params: o,
|
|
505
|
+
transitionName: c,
|
|
506
|
+
layoutId: h
|
|
507
|
+
})), async () => {
|
|
508
|
+
P && u(s + 1), l("COMPLETED");
|
|
509
|
+
};
|
|
510
|
+
},
|
|
511
|
+
{
|
|
512
|
+
id: t,
|
|
513
|
+
control: {
|
|
514
|
+
manual: !0
|
|
515
|
+
}
|
|
516
|
+
}
|
|
517
|
+
)).result?.();
|
|
536
518
|
};
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
|
|
540
|
-
|
|
541
|
-
}
|
|
542
|
-
})).result?.();
|
|
519
|
+
return window.addEventListener("popstate", n), () => {
|
|
520
|
+
window.removeEventListener("popstate", n);
|
|
521
|
+
};
|
|
522
|
+
}, []), null;
|
|
543
523
|
}
|
|
544
|
-
const
|
|
524
|
+
const xt = dt({}), Nt = dt(() => {
|
|
545
525
|
});
|
|
546
|
-
function
|
|
547
|
-
switch (
|
|
526
|
+
function Jt(n, e) {
|
|
527
|
+
switch (e.type) {
|
|
548
528
|
case "SET":
|
|
549
|
-
return
|
|
529
|
+
return e.params;
|
|
550
530
|
default:
|
|
551
|
-
return
|
|
531
|
+
return n;
|
|
552
532
|
}
|
|
553
533
|
}
|
|
554
|
-
const
|
|
534
|
+
const kt = dt({
|
|
555
535
|
id: "",
|
|
556
536
|
isActive: !1,
|
|
557
537
|
isRoot: !0,
|
|
@@ -563,93 +543,76 @@ const he = zt({
|
|
|
563
543
|
prevTransitionName: "none",
|
|
564
544
|
layoutId: null
|
|
565
545
|
});
|
|
566
|
-
function
|
|
567
|
-
return
|
|
546
|
+
function tt() {
|
|
547
|
+
return pt(kt);
|
|
568
548
|
}
|
|
569
|
-
function
|
|
570
|
-
const t =
|
|
571
|
-
|
|
572
|
-
|
|
573
|
-
|
|
574
|
-
|
|
575
|
-
} = dt(), [c, i] = we(Ae, r);
|
|
576
|
-
let u, l;
|
|
577
|
-
t[0] !== s ? (u = () => {
|
|
578
|
-
const d = async (g) => {
|
|
579
|
-
g.state?.step && await Y.addTask(async () => {
|
|
580
|
-
i({
|
|
581
|
-
type: "SET",
|
|
582
|
-
params: g.state?.params || {}
|
|
583
|
-
});
|
|
549
|
+
function Zt({ children: n }) {
|
|
550
|
+
const { isActive: e, params: t } = tt(), [r, s] = Ht(Jt, t);
|
|
551
|
+
return z(() => {
|
|
552
|
+
const a = async (o) => {
|
|
553
|
+
o.state?.step && await q.addTask(async () => {
|
|
554
|
+
s({ type: "SET", params: o.state?.params || {} });
|
|
584
555
|
});
|
|
585
556
|
};
|
|
586
|
-
return
|
|
587
|
-
window.removeEventListener("popstate",
|
|
557
|
+
return e && window.addEventListener("popstate", a), () => {
|
|
558
|
+
window.removeEventListener("popstate", a);
|
|
588
559
|
};
|
|
589
|
-
},
|
|
590
|
-
let a;
|
|
591
|
-
return t[3] !== n || t[4] !== c ? (a = /* @__PURE__ */ x(pe.Provider, { value: i, children: /* @__PURE__ */ x(de.Provider, { value: c, children: n }) }), t[3] = n, t[4] = c, t[5] = a) : a = t[5], a;
|
|
560
|
+
}, [e, s]), /* @__PURE__ */ D(Nt.Provider, { value: s, children: /* @__PURE__ */ D(xt.Provider, { value: r, children: n }) });
|
|
592
561
|
}
|
|
593
|
-
function
|
|
594
|
-
const
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
id:
|
|
606
|
-
isActive:
|
|
607
|
-
isRoot:
|
|
608
|
-
isPrev:
|
|
609
|
-
zIndex:
|
|
610
|
-
pathname:
|
|
611
|
-
params:
|
|
612
|
-
transitionName:
|
|
613
|
-
prevTransitionName:
|
|
614
|
-
layoutId:
|
|
615
|
-
},
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
}
|
|
621
|
-
function Oe(e) {
|
|
622
|
-
return e.histories;
|
|
623
|
-
}
|
|
624
|
-
function Ge(e) {
|
|
625
|
-
return e.index;
|
|
562
|
+
function te({ children: n }) {
|
|
563
|
+
const e = Y((r) => r.index), t = Y((r) => r.histories);
|
|
564
|
+
return t.map(
|
|
565
|
+
(r) => It.toArray(n).filter(
|
|
566
|
+
(s) => V.pathToRegexp(s.props.path).regexp.test(
|
|
567
|
+
r.pathname
|
|
568
|
+
)
|
|
569
|
+
)
|
|
570
|
+
).map(([r], s) => /* @__PURE__ */ D(
|
|
571
|
+
kt.Provider,
|
|
572
|
+
{
|
|
573
|
+
value: {
|
|
574
|
+
id: t[s].id,
|
|
575
|
+
isActive: s === e,
|
|
576
|
+
isRoot: s === 0,
|
|
577
|
+
isPrev: s < e - 1,
|
|
578
|
+
zIndex: s,
|
|
579
|
+
pathname: t[s].pathname,
|
|
580
|
+
params: t[s].params,
|
|
581
|
+
transitionName: t[e].transitionName,
|
|
582
|
+
prevTransitionName: t[e - 1]?.transitionName,
|
|
583
|
+
layoutId: t[s].layoutId
|
|
584
|
+
},
|
|
585
|
+
children: /* @__PURE__ */ D(Zt, { children: r })
|
|
586
|
+
},
|
|
587
|
+
t[s].id
|
|
588
|
+
));
|
|
626
589
|
}
|
|
627
|
-
function
|
|
628
|
-
name:
|
|
629
|
-
initial:
|
|
630
|
-
enter:
|
|
631
|
-
exit:
|
|
632
|
-
options:
|
|
590
|
+
function ee({
|
|
591
|
+
name: n,
|
|
592
|
+
initial: e,
|
|
593
|
+
enter: t,
|
|
594
|
+
exit: r,
|
|
595
|
+
options: s
|
|
633
596
|
}) {
|
|
634
597
|
return {
|
|
635
|
-
name:
|
|
636
|
-
initial:
|
|
598
|
+
name: n,
|
|
599
|
+
initial: e,
|
|
637
600
|
variants: {
|
|
638
|
-
"IDLE-true":
|
|
639
|
-
"IDLE-false":
|
|
640
|
-
"PUSHING-false":
|
|
641
|
-
"PUSHING-true":
|
|
642
|
-
"REPLACING-false":
|
|
643
|
-
"REPLACING-true":
|
|
644
|
-
"POPPING-false":
|
|
645
|
-
"POPPING-true":
|
|
646
|
-
"COMPLETED-false":
|
|
647
|
-
"COMPLETED-true":
|
|
601
|
+
"IDLE-true": t,
|
|
602
|
+
"IDLE-false": t,
|
|
603
|
+
"PUSHING-false": r,
|
|
604
|
+
"PUSHING-true": t,
|
|
605
|
+
"REPLACING-false": r,
|
|
606
|
+
"REPLACING-true": t,
|
|
607
|
+
"POPPING-false": t,
|
|
608
|
+
"POPPING-true": t,
|
|
609
|
+
"COMPLETED-false": r,
|
|
610
|
+
"COMPLETED-true": t
|
|
648
611
|
},
|
|
649
|
-
...
|
|
612
|
+
...s
|
|
650
613
|
};
|
|
651
614
|
}
|
|
652
|
-
const
|
|
615
|
+
const ne = ee({
|
|
653
616
|
name: "overlay",
|
|
654
617
|
initial: {
|
|
655
618
|
opacity: 0,
|
|
@@ -674,66 +637,67 @@ const Ue = He({
|
|
|
674
637
|
}
|
|
675
638
|
},
|
|
676
639
|
options: {
|
|
677
|
-
onSwipeStart: (e,
|
|
678
|
-
|
|
679
|
-
|
|
680
|
-
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
685
|
-
|
|
686
|
-
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
692
|
-
|
|
693
|
-
|
|
694
|
-
|
|
695
|
-
|
|
696
|
-
|
|
697
|
-
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
|
|
640
|
+
onSwipeStart: (n, { animate: e, prevDecorator: t }) => e(
|
|
641
|
+
t,
|
|
642
|
+
{
|
|
643
|
+
opacity: n ? 1 : 0
|
|
644
|
+
},
|
|
645
|
+
{
|
|
646
|
+
duration: 0.3
|
|
647
|
+
}
|
|
648
|
+
),
|
|
649
|
+
onSwipe: (n, e, { animate: t, prevDecorator: r }) => t(
|
|
650
|
+
r,
|
|
651
|
+
{
|
|
652
|
+
opacity: Math.max(0, 1 - e / 100)
|
|
653
|
+
},
|
|
654
|
+
{
|
|
655
|
+
duration: 0
|
|
656
|
+
}
|
|
657
|
+
),
|
|
658
|
+
onSwipeEnd: (n, { animate: e, prevDecorator: t }) => e(
|
|
659
|
+
t,
|
|
660
|
+
{
|
|
661
|
+
opacity: n ? 0 : 1
|
|
662
|
+
},
|
|
663
|
+
{
|
|
664
|
+
duration: 0.3
|
|
665
|
+
}
|
|
666
|
+
)
|
|
701
667
|
}
|
|
702
|
-
}),
|
|
668
|
+
}), ht = /* @__PURE__ */ new Map([["overlay", ne]]), ut = st((n) => ({
|
|
703
669
|
defaultTransitionName: "cupertino",
|
|
704
|
-
setDefaultTransitionName: (
|
|
705
|
-
defaultTransitionName: t
|
|
706
|
-
})
|
|
670
|
+
setDefaultTransitionName: (e) => n({ defaultTransitionName: e })
|
|
707
671
|
}));
|
|
708
|
-
function
|
|
709
|
-
name:
|
|
710
|
-
initial:
|
|
711
|
-
idle:
|
|
712
|
-
enter:
|
|
713
|
-
enterBack:
|
|
714
|
-
exit:
|
|
715
|
-
exitBack:
|
|
716
|
-
options:
|
|
672
|
+
function rt({
|
|
673
|
+
name: n,
|
|
674
|
+
initial: e,
|
|
675
|
+
idle: t,
|
|
676
|
+
enter: r,
|
|
677
|
+
enterBack: s,
|
|
678
|
+
exit: a,
|
|
679
|
+
exitBack: o,
|
|
680
|
+
options: c
|
|
717
681
|
}) {
|
|
718
682
|
return {
|
|
719
|
-
name:
|
|
720
|
-
initial:
|
|
683
|
+
name: n,
|
|
684
|
+
initial: e,
|
|
721
685
|
variants: {
|
|
722
|
-
"IDLE-true":
|
|
723
|
-
"IDLE-false":
|
|
724
|
-
"PUSHING-false":
|
|
725
|
-
"PUSHING-true":
|
|
726
|
-
"REPLACING-false":
|
|
727
|
-
"REPLACING-true":
|
|
728
|
-
"POPPING-false":
|
|
729
|
-
"POPPING-true":
|
|
730
|
-
"COMPLETED-false":
|
|
731
|
-
"COMPLETED-true":
|
|
686
|
+
"IDLE-true": t,
|
|
687
|
+
"IDLE-false": t,
|
|
688
|
+
"PUSHING-false": a,
|
|
689
|
+
"PUSHING-true": r,
|
|
690
|
+
"REPLACING-false": a,
|
|
691
|
+
"REPLACING-true": r,
|
|
692
|
+
"POPPING-false": o,
|
|
693
|
+
"POPPING-true": s,
|
|
694
|
+
"COMPLETED-false": a,
|
|
695
|
+
"COMPLETED-true": r
|
|
732
696
|
},
|
|
733
|
-
...
|
|
697
|
+
...c
|
|
734
698
|
};
|
|
735
699
|
}
|
|
736
|
-
const
|
|
700
|
+
const se = rt({
|
|
737
701
|
name: "cupertino",
|
|
738
702
|
initial: {
|
|
739
703
|
x: "100%"
|
|
@@ -786,49 +750,53 @@ const Be = Gt({
|
|
|
786
750
|
decoratorName: "overlay",
|
|
787
751
|
swipeDirection: "x",
|
|
788
752
|
onSwipeStart: async () => !0,
|
|
789
|
-
onSwipe: (e, t, {
|
|
790
|
-
|
|
791
|
-
|
|
792
|
-
|
|
793
|
-
|
|
794
|
-
|
|
795
|
-
|
|
796
|
-
|
|
797
|
-
|
|
798
|
-
|
|
799
|
-
|
|
800
|
-
|
|
801
|
-
|
|
802
|
-
|
|
803
|
-
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
753
|
+
onSwipe: (n, e, { animate: t, currentScreen: r, prevScreen: s, onProgress: a }) => {
|
|
754
|
+
const { offset: o } = e, c = o.x, h = ft(c, [0, window.innerWidth], [0, 100]);
|
|
755
|
+
return a?.(!0, h), t(
|
|
756
|
+
r,
|
|
757
|
+
{
|
|
758
|
+
x: Math.max(0, c)
|
|
759
|
+
},
|
|
760
|
+
{
|
|
761
|
+
duration: 0
|
|
762
|
+
}
|
|
763
|
+
), t(
|
|
764
|
+
s,
|
|
765
|
+
{
|
|
766
|
+
x: -100 + h
|
|
767
|
+
},
|
|
768
|
+
{
|
|
769
|
+
duration: 0
|
|
770
|
+
}
|
|
771
|
+
), h;
|
|
807
772
|
},
|
|
808
|
-
onSwipeEnd: async (e, t, {
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
813
|
-
|
|
814
|
-
|
|
815
|
-
|
|
816
|
-
|
|
817
|
-
|
|
818
|
-
|
|
819
|
-
|
|
820
|
-
|
|
821
|
-
|
|
822
|
-
|
|
823
|
-
|
|
824
|
-
|
|
825
|
-
|
|
826
|
-
|
|
827
|
-
|
|
828
|
-
|
|
773
|
+
onSwipeEnd: async (n, e, { animate: t, currentScreen: r, prevScreen: s, onStart: a }) => {
|
|
774
|
+
const { offset: o, velocity: c } = e, l = o.x > 50 || c.x > 20;
|
|
775
|
+
return a?.(l), await Promise.all([
|
|
776
|
+
t(
|
|
777
|
+
r,
|
|
778
|
+
{
|
|
779
|
+
x: l ? "100%" : 0
|
|
780
|
+
},
|
|
781
|
+
{
|
|
782
|
+
duration: 0.3,
|
|
783
|
+
ease: [0.32, 0.72, 0, 1]
|
|
784
|
+
}
|
|
785
|
+
),
|
|
786
|
+
t(
|
|
787
|
+
s,
|
|
788
|
+
{
|
|
789
|
+
x: l ? 0 : -100
|
|
790
|
+
},
|
|
791
|
+
{
|
|
792
|
+
duration: 0.3,
|
|
793
|
+
ease: [0.32, 0.72, 0, 1]
|
|
794
|
+
}
|
|
795
|
+
)
|
|
796
|
+
]), l;
|
|
829
797
|
}
|
|
830
798
|
}
|
|
831
|
-
}),
|
|
799
|
+
}), re = rt({
|
|
832
800
|
name: "layout",
|
|
833
801
|
initial: {
|
|
834
802
|
opacity: 0.97
|
|
@@ -877,45 +845,46 @@ const Be = Gt({
|
|
|
877
845
|
decoratorName: "overlay",
|
|
878
846
|
swipeDirection: "y",
|
|
879
847
|
onSwipeStart: async () => !0,
|
|
880
|
-
onSwipe: (e, t, {
|
|
881
|
-
|
|
882
|
-
|
|
883
|
-
|
|
884
|
-
|
|
885
|
-
|
|
886
|
-
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
891
|
-
|
|
892
|
-
duration: 0
|
|
893
|
-
}), p;
|
|
848
|
+
onSwipe: (n, e, { animate: t, currentScreen: r, onProgress: s }) => {
|
|
849
|
+
const { offset: a } = e, o = a.y, c = Math.max(0, Math.min(56, o)), h = ft(c, [0, 56], [1, 0.96]), l = Math.max(0, o - 56), m = Math.min(1, l / 160), d = Math.sqrt(m) * 12, u = Math.max(0, c + d), P = Math.min(56, u);
|
|
850
|
+
return s?.(!0, 100), t(
|
|
851
|
+
r,
|
|
852
|
+
{
|
|
853
|
+
y: u,
|
|
854
|
+
opacity: h
|
|
855
|
+
},
|
|
856
|
+
{
|
|
857
|
+
duration: 0
|
|
858
|
+
}
|
|
859
|
+
), P;
|
|
894
860
|
},
|
|
895
|
-
onSwipeEnd: async (e, t, {
|
|
896
|
-
|
|
897
|
-
|
|
898
|
-
|
|
899
|
-
|
|
900
|
-
|
|
901
|
-
|
|
902
|
-
|
|
903
|
-
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
861
|
+
onSwipeEnd: async (n, e, { animate: t, currentScreen: r, prevScreen: s, onStart: a }) => {
|
|
862
|
+
const { offset: o, velocity: c } = e, l = o.y > 56 || c.y > 20;
|
|
863
|
+
return a?.(l), await Promise.all([
|
|
864
|
+
t(
|
|
865
|
+
r,
|
|
866
|
+
{
|
|
867
|
+
y: l ? "100%" : 0,
|
|
868
|
+
opacity: l ? 0.96 : 1
|
|
869
|
+
},
|
|
870
|
+
{
|
|
871
|
+
duration: 0.3
|
|
872
|
+
}
|
|
873
|
+
),
|
|
874
|
+
t(
|
|
875
|
+
s,
|
|
876
|
+
{
|
|
877
|
+
y: 0,
|
|
878
|
+
opacity: l ? 1 : 0.97
|
|
879
|
+
},
|
|
880
|
+
{
|
|
881
|
+
duration: 0.3
|
|
882
|
+
}
|
|
883
|
+
)
|
|
884
|
+
]), l;
|
|
916
885
|
}
|
|
917
886
|
}
|
|
918
|
-
}),
|
|
887
|
+
}), ae = rt({
|
|
919
888
|
name: "material",
|
|
920
889
|
initial: {
|
|
921
890
|
y: "100%",
|
|
@@ -973,53 +942,55 @@ const Be = Gt({
|
|
|
973
942
|
options: {
|
|
974
943
|
swipeDirection: "y",
|
|
975
944
|
onSwipeStart: async () => !0,
|
|
976
|
-
onSwipe: (e, t, {
|
|
977
|
-
|
|
978
|
-
|
|
979
|
-
|
|
980
|
-
|
|
981
|
-
|
|
982
|
-
|
|
983
|
-
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
990
|
-
|
|
991
|
-
|
|
992
|
-
|
|
993
|
-
|
|
994
|
-
|
|
995
|
-
}), w;
|
|
945
|
+
onSwipe: (n, e, { animate: t, currentScreen: r, prevScreen: s, onProgress: a }) => {
|
|
946
|
+
const { offset: o } = e, c = o.y, h = Math.max(0, Math.min(56, c)), l = ft(h, [0, 56], [1, 0.96]), m = Math.max(0, c - 56), d = Math.min(1, m / 160), u = Math.sqrt(d) * 12, P = Math.max(0, h + u), L = Math.min(56, P);
|
|
947
|
+
return a?.(!0, L), t(
|
|
948
|
+
r,
|
|
949
|
+
{
|
|
950
|
+
y: P,
|
|
951
|
+
opacity: l
|
|
952
|
+
},
|
|
953
|
+
{
|
|
954
|
+
duration: 0
|
|
955
|
+
}
|
|
956
|
+
), t(
|
|
957
|
+
s,
|
|
958
|
+
{
|
|
959
|
+
y: -56 + L,
|
|
960
|
+
opacity: L / 56
|
|
961
|
+
},
|
|
962
|
+
{ duration: 0 }
|
|
963
|
+
), L;
|
|
996
964
|
},
|
|
997
|
-
onSwipeEnd: async (e, t, {
|
|
998
|
-
|
|
999
|
-
|
|
1000
|
-
|
|
1001
|
-
|
|
1002
|
-
|
|
1003
|
-
|
|
1004
|
-
|
|
1005
|
-
|
|
1006
|
-
|
|
1007
|
-
|
|
1008
|
-
|
|
1009
|
-
|
|
1010
|
-
|
|
1011
|
-
|
|
1012
|
-
|
|
1013
|
-
|
|
1014
|
-
|
|
1015
|
-
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
965
|
+
onSwipeEnd: async (n, e, { animate: t, currentScreen: r, prevScreen: s, onStart: a }) => {
|
|
966
|
+
const { offset: o, velocity: c } = e, l = o.y > 56 || c.y > 20;
|
|
967
|
+
return a?.(l), await Promise.all([
|
|
968
|
+
t(
|
|
969
|
+
r,
|
|
970
|
+
{
|
|
971
|
+
y: l ? "100%" : 0,
|
|
972
|
+
opacity: l ? 0.96 : 1
|
|
973
|
+
},
|
|
974
|
+
{
|
|
975
|
+
duration: l ? 0.22 : 0.24,
|
|
976
|
+
ease: l ? [0.4, 0, 1, 1] : [0, 0, 0.2, 1]
|
|
977
|
+
}
|
|
978
|
+
),
|
|
979
|
+
t(
|
|
980
|
+
s,
|
|
981
|
+
{
|
|
982
|
+
y: l ? 0 : -56,
|
|
983
|
+
opacity: l ? 1 : 0.96
|
|
984
|
+
},
|
|
985
|
+
{
|
|
986
|
+
duration: l ? 0.22 : 0.24,
|
|
987
|
+
ease: l ? [0, 0, 0.2, 1] : [0.4, 0, 1, 1]
|
|
988
|
+
}
|
|
989
|
+
)
|
|
990
|
+
]), l;
|
|
1020
991
|
}
|
|
1021
992
|
}
|
|
1022
|
-
}),
|
|
993
|
+
}), oe = rt({
|
|
1023
994
|
name: "none",
|
|
1024
995
|
initial: {},
|
|
1025
996
|
idle: {
|
|
@@ -1052,830 +1023,681 @@ const Be = Gt({
|
|
|
1052
1023
|
duration: 0
|
|
1053
1024
|
}
|
|
1054
1025
|
}
|
|
1055
|
-
}),
|
|
1056
|
-
|
|
1057
|
-
|
|
1058
|
-
|
|
1059
|
-
|
|
1060
|
-
|
|
1026
|
+
}), et = /* @__PURE__ */ new Map([
|
|
1027
|
+
["none", oe],
|
|
1028
|
+
["cupertino", se],
|
|
1029
|
+
["material", ae],
|
|
1030
|
+
["layout", re]
|
|
1031
|
+
]), ie = (() => {
|
|
1032
|
+
const n = /* @__PURE__ */ Object.create(null), e = Object.prototype.hasOwnProperty;
|
|
1033
|
+
for (const t of et.values()) {
|
|
1034
|
+
const r = t.variants["IDLE-true"].value;
|
|
1035
|
+
for (const s in r)
|
|
1036
|
+
e.call(r, s) && (n[s] = r[s]);
|
|
1061
1037
|
}
|
|
1062
|
-
return
|
|
1038
|
+
return n;
|
|
1063
1039
|
})();
|
|
1064
|
-
function
|
|
1065
|
-
|
|
1066
|
-
|
|
1067
|
-
|
|
1068
|
-
|
|
1069
|
-
|
|
1070
|
-
|
|
1071
|
-
|
|
1072
|
-
|
|
1073
|
-
|
|
1074
|
-
|
|
1075
|
-
let g;
|
|
1076
|
-
t[2] !== i ? (g = i === void 0 ? [] : i, t[2] = i, t[3] = g) : g = t[3];
|
|
1077
|
-
const o = g, p = ae() ? u || "/" : window.location.pathname, w = ae() ? p.split("?")[1] || "" : window.location.search;
|
|
1078
|
-
Ve().setState({
|
|
1079
|
-
defaultTransitionName: l
|
|
1080
|
-
}), ze().setState({
|
|
1040
|
+
function ye({
|
|
1041
|
+
children: n,
|
|
1042
|
+
initPath: e = "/",
|
|
1043
|
+
defaultTransitionName: t = "cupertino",
|
|
1044
|
+
transitions: r = [],
|
|
1045
|
+
decorators: s = []
|
|
1046
|
+
}) {
|
|
1047
|
+
const a = St() ? e || "/" : window.location.pathname, o = St() ? a.split("?")[1] || "" : window.location.search;
|
|
1048
|
+
return ut.setState({
|
|
1049
|
+
defaultTransitionName: t
|
|
1050
|
+
}), Y.setState({
|
|
1081
1051
|
index: 0,
|
|
1082
|
-
histories: [
|
|
1083
|
-
|
|
1084
|
-
|
|
1085
|
-
|
|
1086
|
-
|
|
1087
|
-
|
|
1088
|
-
|
|
1089
|
-
|
|
1090
|
-
|
|
1091
|
-
|
|
1092
|
-
|
|
1093
|
-
|
|
1094
|
-
|
|
1095
|
-
|
|
1096
|
-
|
|
1097
|
-
|
|
1098
|
-
|
|
1099
|
-
|
|
1100
|
-
|
|
1101
|
-
|
|
1102
|
-
|
|
1103
|
-
|
|
1104
|
-
|
|
1105
|
-
|
|
1106
|
-
|
|
1107
|
-
|
|
1108
|
-
},
|
|
1109
|
-
|
|
1110
|
-
|
|
1111
|
-
|
|
1112
|
-
|
|
1113
|
-
|
|
1114
|
-
|
|
1115
|
-
|
|
1116
|
-
|
|
1117
|
-
|
|
1118
|
-
|
|
1119
|
-
|
|
1120
|
-
|
|
1121
|
-
|
|
1122
|
-
|
|
1123
|
-
|
|
1124
|
-
|
|
1125
|
-
|
|
1126
|
-
|
|
1127
|
-
|
|
1128
|
-
}
|
|
1129
|
-
function Ke(e) {
|
|
1130
|
-
return e.props.path;
|
|
1131
|
-
}
|
|
1132
|
-
function Ve() {
|
|
1133
|
-
return Kt;
|
|
1052
|
+
histories: [
|
|
1053
|
+
{
|
|
1054
|
+
id: "root",
|
|
1055
|
+
pathname: a,
|
|
1056
|
+
params: Bt(
|
|
1057
|
+
It.toArray(n).map((c) => c.props.path).flat(),
|
|
1058
|
+
a,
|
|
1059
|
+
o
|
|
1060
|
+
),
|
|
1061
|
+
transitionName: t,
|
|
1062
|
+
layoutId: null
|
|
1063
|
+
}
|
|
1064
|
+
]
|
|
1065
|
+
}), z(() => {
|
|
1066
|
+
window.history.state?.index || window.history.replaceState(
|
|
1067
|
+
{
|
|
1068
|
+
id: "root",
|
|
1069
|
+
index: 0,
|
|
1070
|
+
status: "IDLE",
|
|
1071
|
+
params: {},
|
|
1072
|
+
transitionName: t,
|
|
1073
|
+
layoutId: null
|
|
1074
|
+
},
|
|
1075
|
+
"",
|
|
1076
|
+
window.location.pathname
|
|
1077
|
+
);
|
|
1078
|
+
}, [t]), z(() => {
|
|
1079
|
+
r.forEach((c) => et.set(c.name, c));
|
|
1080
|
+
}, [r]), z(() => {
|
|
1081
|
+
s.forEach((c) => ht.set(c.name, c));
|
|
1082
|
+
}, [s]), /* @__PURE__ */ ct(
|
|
1083
|
+
"div",
|
|
1084
|
+
{
|
|
1085
|
+
style: {
|
|
1086
|
+
position: "fixed",
|
|
1087
|
+
top: 0,
|
|
1088
|
+
left: 0,
|
|
1089
|
+
width: "100%",
|
|
1090
|
+
height: "100%"
|
|
1091
|
+
},
|
|
1092
|
+
children: [
|
|
1093
|
+
/* @__PURE__ */ D(Wt, {}),
|
|
1094
|
+
/* @__PURE__ */ D(te, { children: n })
|
|
1095
|
+
]
|
|
1096
|
+
}
|
|
1097
|
+
);
|
|
1134
1098
|
}
|
|
1135
|
-
function
|
|
1136
|
-
return
|
|
1099
|
+
function ge({ element: n }) {
|
|
1100
|
+
return n;
|
|
1137
1101
|
}
|
|
1138
|
-
function
|
|
1139
|
-
element: e
|
|
1140
|
-
}) {
|
|
1141
|
-
return e;
|
|
1142
|
-
}
|
|
1143
|
-
function vn() {
|
|
1102
|
+
function me() {
|
|
1144
1103
|
return {
|
|
1145
|
-
push: async (
|
|
1146
|
-
const {
|
|
1147
|
-
|
|
1148
|
-
setStatus: u
|
|
1149
|
-
} = Q.getState();
|
|
1150
|
-
if (i !== "COMPLETED" && i !== "IDLE")
|
|
1104
|
+
push: async (r, s, a = {}) => {
|
|
1105
|
+
const { status: o, setStatus: c } = j.getState();
|
|
1106
|
+
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1151
1107
|
return;
|
|
1152
|
-
const {
|
|
1153
|
-
|
|
1154
|
-
|
|
1155
|
-
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1173
|
-
|
|
1174
|
-
|
|
1175
|
-
|
|
1176
|
-
|
|
1177
|
-
|
|
1178
|
-
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
-
|
|
1108
|
+
const { index: h, addHistory: l } = Y.getState(), m = ut.getState().defaultTransitionName, { transitionName: d = m, layoutId: u = null } = a, P = q.generateTaskId();
|
|
1109
|
+
(await q.addTask(
|
|
1110
|
+
async () => {
|
|
1111
|
+
c("PUSHING");
|
|
1112
|
+
const L = V.compile(r), N = Object.fromEntries(
|
|
1113
|
+
Object.entries(s).map(([R, A]) => [R, String(A)])
|
|
1114
|
+
), w = L(N), k = V.parse(r).tokens.filter((R) => R.type === "param").map((R) => R.name), F = Object.fromEntries(
|
|
1115
|
+
Object.entries(s).filter(([R]) => !k.includes(R))
|
|
1116
|
+
), Q = new URLSearchParams(F).toString(), U = `${w}${Q ? `?${Q}` : ""}`;
|
|
1117
|
+
return window.history.pushState(
|
|
1118
|
+
{
|
|
1119
|
+
id: P,
|
|
1120
|
+
index: h + 1,
|
|
1121
|
+
status: "PUSHING",
|
|
1122
|
+
params: s,
|
|
1123
|
+
transitionName: d,
|
|
1124
|
+
layoutId: u
|
|
1125
|
+
},
|
|
1126
|
+
"",
|
|
1127
|
+
U
|
|
1128
|
+
), l({
|
|
1129
|
+
id: P,
|
|
1130
|
+
pathname: w,
|
|
1131
|
+
params: s,
|
|
1132
|
+
transitionName: d,
|
|
1133
|
+
layoutId: u
|
|
1134
|
+
}), () => {
|
|
1135
|
+
c("COMPLETED");
|
|
1136
|
+
};
|
|
1137
|
+
},
|
|
1138
|
+
{
|
|
1139
|
+
id: P,
|
|
1140
|
+
control: {
|
|
1141
|
+
manual: !0
|
|
1142
|
+
}
|
|
1182
1143
|
}
|
|
1183
|
-
|
|
1144
|
+
)).result?.();
|
|
1184
1145
|
},
|
|
1185
|
-
replace: async (
|
|
1186
|
-
const {
|
|
1187
|
-
|
|
1188
|
-
setStatus: u
|
|
1189
|
-
} = Q.getState();
|
|
1190
|
-
if (i !== "COMPLETED" && i !== "IDLE")
|
|
1146
|
+
replace: async (r, s, a = {}) => {
|
|
1147
|
+
const { status: o, setStatus: c } = j.getState();
|
|
1148
|
+
if (o !== "COMPLETED" && o !== "IDLE")
|
|
1191
1149
|
return;
|
|
1192
|
-
const {
|
|
1193
|
-
|
|
1194
|
-
|
|
1195
|
-
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1217
|
-
|
|
1218
|
-
|
|
1219
|
-
|
|
1220
|
-
|
|
1221
|
-
|
|
1150
|
+
const { index: h, addHistory: l } = Y.getState(), m = Y.getState().replaceHistory, d = ut.getState().defaultTransitionName, { transitionName: u = d, layoutId: P = null } = a, L = q.generateTaskId();
|
|
1151
|
+
(await q.addTask(
|
|
1152
|
+
async () => {
|
|
1153
|
+
c("REPLACING");
|
|
1154
|
+
const N = V.compile(r), w = Object.fromEntries(
|
|
1155
|
+
Object.entries(s).map(([A, i]) => [A, String(i)])
|
|
1156
|
+
), k = N(w), F = V.parse(r).tokens.filter((A) => A.type === "param").map((A) => A.name), Q = Object.fromEntries(
|
|
1157
|
+
Object.entries(s).filter(([A]) => !F.includes(A))
|
|
1158
|
+
), U = new URLSearchParams(Q).toString(), R = `${k}${U ? `?${U}` : ""}`;
|
|
1159
|
+
return window.history.replaceState(
|
|
1160
|
+
{
|
|
1161
|
+
id: L,
|
|
1162
|
+
index: h,
|
|
1163
|
+
status: "REPLACING",
|
|
1164
|
+
params: s,
|
|
1165
|
+
transitionName: u,
|
|
1166
|
+
layoutId: P
|
|
1167
|
+
},
|
|
1168
|
+
"",
|
|
1169
|
+
R
|
|
1170
|
+
), l({
|
|
1171
|
+
id: L,
|
|
1172
|
+
pathname: k,
|
|
1173
|
+
params: s,
|
|
1174
|
+
transitionName: u,
|
|
1175
|
+
layoutId: P
|
|
1176
|
+
}), async () => {
|
|
1177
|
+
m(h), c("COMPLETED");
|
|
1178
|
+
};
|
|
1179
|
+
},
|
|
1180
|
+
{
|
|
1181
|
+
id: L,
|
|
1182
|
+
control: {
|
|
1183
|
+
manual: !0
|
|
1184
|
+
}
|
|
1222
1185
|
}
|
|
1223
|
-
|
|
1186
|
+
)).result?.();
|
|
1224
1187
|
},
|
|
1225
1188
|
pop: () => {
|
|
1226
|
-
const
|
|
1227
|
-
|
|
1189
|
+
const r = j.getState().status;
|
|
1190
|
+
r !== "COMPLETED" && r !== "IDLE" || window.history.back();
|
|
1228
1191
|
}
|
|
1229
1192
|
};
|
|
1230
1193
|
}
|
|
1231
|
-
function
|
|
1232
|
-
const
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
1245
|
-
|
|
1246
|
-
|
|
1247
|
-
|
|
1248
|
-
|
|
1249
|
-
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
1257
|
-
|
|
1258
|
-
|
|
1259
|
-
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
1264
|
-
|
|
1265
|
-
|
|
1266
|
-
|
|
1267
|
-
|
|
1268
|
-
|
|
1269
|
-
|
|
1270
|
-
|
|
1271
|
-
|
|
1272
|
-
|
|
1273
|
-
|
|
1274
|
-
}
|
|
1275
|
-
|
|
1276
|
-
const e = Q.getState().status;
|
|
1277
|
-
e !== "COMPLETED" && e !== "IDLE" || window.history.back();
|
|
1194
|
+
function Ee() {
|
|
1195
|
+
const n = pt(Nt);
|
|
1196
|
+
return {
|
|
1197
|
+
pushStep: async (s) => {
|
|
1198
|
+
const a = j.getState().status;
|
|
1199
|
+
a !== "COMPLETED" && a !== "IDLE" || (await q.addTask(async () => {
|
|
1200
|
+
const o = new URLSearchParams(s).toString(), c = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
1201
|
+
return window.history.state?.step || window.history.replaceState(
|
|
1202
|
+
{
|
|
1203
|
+
...window.history.state,
|
|
1204
|
+
step: !0
|
|
1205
|
+
},
|
|
1206
|
+
"",
|
|
1207
|
+
window.location.pathname
|
|
1208
|
+
), window.history.pushState(
|
|
1209
|
+
{
|
|
1210
|
+
...window.history.state,
|
|
1211
|
+
step: !0,
|
|
1212
|
+
params: s
|
|
1213
|
+
},
|
|
1214
|
+
"",
|
|
1215
|
+
c
|
|
1216
|
+
), async () => n({ type: "SET", params: s });
|
|
1217
|
+
})).result?.();
|
|
1218
|
+
},
|
|
1219
|
+
replaceStep: async (s) => {
|
|
1220
|
+
const a = j.getState().status;
|
|
1221
|
+
a !== "COMPLETED" && a !== "IDLE" || (await q.addTask(async () => {
|
|
1222
|
+
const o = new URLSearchParams(s).toString(), c = `${window.location.pathname}${o ? `?${o}` : ""}`;
|
|
1223
|
+
return window.history.replaceState(
|
|
1224
|
+
{
|
|
1225
|
+
...window.history.state,
|
|
1226
|
+
step: !0,
|
|
1227
|
+
params: s
|
|
1228
|
+
},
|
|
1229
|
+
"",
|
|
1230
|
+
c
|
|
1231
|
+
), async () => n({ type: "SET", params: s });
|
|
1232
|
+
})).result?.();
|
|
1233
|
+
},
|
|
1234
|
+
popStep: () => {
|
|
1235
|
+
const s = j.getState().status;
|
|
1236
|
+
s !== "COMPLETED" && s !== "IDLE" || window.history.back();
|
|
1237
|
+
}
|
|
1238
|
+
};
|
|
1278
1239
|
}
|
|
1279
|
-
function
|
|
1280
|
-
return
|
|
1240
|
+
function we() {
|
|
1241
|
+
return pt(xt);
|
|
1281
1242
|
}
|
|
1282
|
-
function
|
|
1283
|
-
name:
|
|
1284
|
-
initial:
|
|
1285
|
-
idle:
|
|
1286
|
-
pushOnEnter:
|
|
1287
|
-
pushOnExit:
|
|
1288
|
-
replaceOnEnter:
|
|
1289
|
-
replaceOnExit:
|
|
1290
|
-
popOnEnter:
|
|
1291
|
-
popOnExit:
|
|
1292
|
-
completedOnExit:
|
|
1293
|
-
completedOnEnter:
|
|
1294
|
-
options:
|
|
1243
|
+
function Se({
|
|
1244
|
+
name: n,
|
|
1245
|
+
initial: e,
|
|
1246
|
+
idle: t,
|
|
1247
|
+
pushOnEnter: r,
|
|
1248
|
+
pushOnExit: s,
|
|
1249
|
+
replaceOnEnter: a,
|
|
1250
|
+
replaceOnExit: o,
|
|
1251
|
+
popOnEnter: c,
|
|
1252
|
+
popOnExit: h,
|
|
1253
|
+
completedOnExit: l,
|
|
1254
|
+
completedOnEnter: m,
|
|
1255
|
+
options: d
|
|
1295
1256
|
}) {
|
|
1296
1257
|
return {
|
|
1297
|
-
name:
|
|
1298
|
-
initial:
|
|
1258
|
+
name: n,
|
|
1259
|
+
initial: e,
|
|
1299
1260
|
variants: {
|
|
1300
|
-
"IDLE-true":
|
|
1301
|
-
"IDLE-false":
|
|
1302
|
-
"PUSHING-false":
|
|
1303
|
-
"PUSHING-true":
|
|
1304
|
-
"REPLACING-false":
|
|
1305
|
-
"REPLACING-true":
|
|
1306
|
-
"POPPING-false":
|
|
1307
|
-
"POPPING-true":
|
|
1308
|
-
"COMPLETED-false":
|
|
1309
|
-
"COMPLETED-true":
|
|
1261
|
+
"IDLE-true": t,
|
|
1262
|
+
"IDLE-false": t,
|
|
1263
|
+
"PUSHING-false": s,
|
|
1264
|
+
"PUSHING-true": r,
|
|
1265
|
+
"REPLACING-false": o,
|
|
1266
|
+
"REPLACING-true": a,
|
|
1267
|
+
"POPPING-false": h,
|
|
1268
|
+
"POPPING-true": c,
|
|
1269
|
+
"COMPLETED-false": l,
|
|
1270
|
+
"COMPLETED-true": m
|
|
1310
1271
|
},
|
|
1311
|
-
...
|
|
1272
|
+
...d
|
|
1312
1273
|
};
|
|
1313
1274
|
}
|
|
1314
|
-
function
|
|
1315
|
-
name:
|
|
1316
|
-
initial:
|
|
1317
|
-
idle:
|
|
1318
|
-
pushOnEnter:
|
|
1319
|
-
pushOnExit:
|
|
1320
|
-
replaceOnEnter:
|
|
1321
|
-
replaceOnExit:
|
|
1322
|
-
popOnEnter:
|
|
1323
|
-
popOnExit:
|
|
1324
|
-
completedOnEnter:
|
|
1325
|
-
completedOnExit:
|
|
1326
|
-
options:
|
|
1275
|
+
function Pe({
|
|
1276
|
+
name: n,
|
|
1277
|
+
initial: e,
|
|
1278
|
+
idle: t,
|
|
1279
|
+
pushOnEnter: r,
|
|
1280
|
+
pushOnExit: s,
|
|
1281
|
+
replaceOnEnter: a,
|
|
1282
|
+
replaceOnExit: o,
|
|
1283
|
+
popOnEnter: c,
|
|
1284
|
+
popOnExit: h,
|
|
1285
|
+
completedOnEnter: l,
|
|
1286
|
+
completedOnExit: m,
|
|
1287
|
+
options: d
|
|
1327
1288
|
}) {
|
|
1328
1289
|
return {
|
|
1329
|
-
name:
|
|
1330
|
-
initial:
|
|
1290
|
+
name: n,
|
|
1291
|
+
initial: e,
|
|
1331
1292
|
variants: {
|
|
1332
|
-
"IDLE-true":
|
|
1333
|
-
"IDLE-false":
|
|
1334
|
-
"PUSHING-false":
|
|
1335
|
-
"PUSHING-true":
|
|
1336
|
-
"REPLACING-false":
|
|
1337
|
-
"REPLACING-true":
|
|
1338
|
-
"POPPING-false":
|
|
1339
|
-
"POPPING-true":
|
|
1340
|
-
"COMPLETED-false":
|
|
1341
|
-
"COMPLETED-true":
|
|
1293
|
+
"IDLE-true": t,
|
|
1294
|
+
"IDLE-false": t,
|
|
1295
|
+
"PUSHING-false": s,
|
|
1296
|
+
"PUSHING-true": r,
|
|
1297
|
+
"REPLACING-false": o,
|
|
1298
|
+
"REPLACING-true": a,
|
|
1299
|
+
"POPPING-false": h,
|
|
1300
|
+
"POPPING-true": c,
|
|
1301
|
+
"COMPLETED-false": m,
|
|
1302
|
+
"COMPLETED-true": l
|
|
1342
1303
|
},
|
|
1343
|
-
...
|
|
1304
|
+
...d
|
|
1344
1305
|
};
|
|
1345
1306
|
}
|
|
1346
|
-
const
|
|
1347
|
-
|
|
1348
|
-
|
|
1349
|
-
|
|
1350
|
-
|
|
1351
|
-
freeze: e,
|
|
1352
|
-
children: t
|
|
1307
|
+
const ce = { then() {
|
|
1308
|
+
} };
|
|
1309
|
+
function ue({
|
|
1310
|
+
freeze: n,
|
|
1311
|
+
children: e
|
|
1353
1312
|
}) {
|
|
1354
|
-
if (
|
|
1355
|
-
throw
|
|
1356
|
-
return
|
|
1313
|
+
if (n)
|
|
1314
|
+
throw ce;
|
|
1315
|
+
return e;
|
|
1357
1316
|
}
|
|
1358
|
-
function
|
|
1359
|
-
|
|
1360
|
-
freeze: n,
|
|
1361
|
-
children: s,
|
|
1362
|
-
placeholder: r
|
|
1363
|
-
} = e;
|
|
1364
|
-
let c;
|
|
1365
|
-
t[0] !== s || t[1] !== n ? (c = /* @__PURE__ */ x(Ze, { freeze: n, children: s }), t[0] = s, t[1] = n, t[2] = c) : c = t[2];
|
|
1366
|
-
let i;
|
|
1367
|
-
return t[3] !== r || t[4] !== c ? (i = /* @__PURE__ */ x(Ee, { fallback: r, children: c }), t[3] = r, t[4] = c, t[5] = i) : i = t[5], i;
|
|
1317
|
+
function Mt({ freeze: n, children: e, placeholder: t }) {
|
|
1318
|
+
return /* @__PURE__ */ D(_t, { fallback: t, children: /* @__PURE__ */ D(ue, { freeze: n, children: e }) });
|
|
1368
1319
|
}
|
|
1369
|
-
function
|
|
1320
|
+
function vt(n, e) {
|
|
1370
1321
|
const {
|
|
1371
|
-
direction:
|
|
1372
|
-
markerSelector:
|
|
1373
|
-
depthLimit:
|
|
1374
|
-
verifyByScroll:
|
|
1375
|
-
} =
|
|
1376
|
-
if (!
|
|
1377
|
-
|
|
1378
|
-
|
|
1379
|
-
|
|
1380
|
-
|
|
1381
|
-
|
|
1382
|
-
|
|
1383
|
-
element:
|
|
1384
|
-
|
|
1385
|
-
};
|
|
1386
|
-
let l = i, a = 0;
|
|
1387
|
-
for (; l && l !== document.body && a < r; ) {
|
|
1388
|
-
if (Vt(l, n) && (!c || ue(l, n)))
|
|
1389
|
-
return {
|
|
1390
|
-
element: l,
|
|
1391
|
-
hasMarker: !1
|
|
1392
|
-
};
|
|
1393
|
-
l = l.parentElement, a++;
|
|
1322
|
+
direction: t = "x",
|
|
1323
|
+
markerSelector: r = "[data-swipe-at-edge]",
|
|
1324
|
+
depthLimit: s = 24,
|
|
1325
|
+
verifyByScroll: a = !1
|
|
1326
|
+
} = e ?? {}, o = le(n);
|
|
1327
|
+
if (!o) return { element: null, hasMarker: !1 };
|
|
1328
|
+
const c = o.closest?.(r);
|
|
1329
|
+
if (c instanceof HTMLElement && lt(c, t) && (!a || Dt(c, t)))
|
|
1330
|
+
return { element: c, hasMarker: !0 };
|
|
1331
|
+
let h = o, l = 0;
|
|
1332
|
+
for (; h && h !== document.body && l < s; ) {
|
|
1333
|
+
if (lt(h, t) && (!a || Dt(h, t)))
|
|
1334
|
+
return { element: h, hasMarker: !1 };
|
|
1335
|
+
h = h.parentElement, l++;
|
|
1394
1336
|
}
|
|
1395
|
-
return {
|
|
1396
|
-
element: null,
|
|
1397
|
-
hasMarker: !1
|
|
1398
|
-
};
|
|
1337
|
+
return { element: null, hasMarker: !1 };
|
|
1399
1338
|
}
|
|
1400
|
-
function
|
|
1401
|
-
if (!
|
|
1402
|
-
const
|
|
1403
|
-
if (
|
|
1404
|
-
for (const
|
|
1405
|
-
if (
|
|
1339
|
+
function le(n) {
|
|
1340
|
+
if (!n) return null;
|
|
1341
|
+
const e = n, t = typeof e.composedPath == "function" ? e.composedPath() : void 0;
|
|
1342
|
+
if (t && t.length) {
|
|
1343
|
+
for (const r of t)
|
|
1344
|
+
if (r instanceof HTMLElement) return r;
|
|
1406
1345
|
}
|
|
1407
|
-
return
|
|
1346
|
+
return n;
|
|
1408
1347
|
}
|
|
1409
|
-
function
|
|
1410
|
-
return
|
|
1348
|
+
function lt(n, e) {
|
|
1349
|
+
return e === "y" ? n.scrollHeight - n.clientHeight > 1 : n.scrollWidth - n.clientWidth > 1;
|
|
1411
1350
|
}
|
|
1412
|
-
function
|
|
1413
|
-
if (!
|
|
1414
|
-
if (
|
|
1415
|
-
const
|
|
1416
|
-
if (
|
|
1417
|
-
return
|
|
1418
|
-
|
|
1419
|
-
const
|
|
1420
|
-
return
|
|
1351
|
+
function Dt(n, e) {
|
|
1352
|
+
if (!lt(n, e)) return !1;
|
|
1353
|
+
if (e === "y") {
|
|
1354
|
+
const t = n.scrollTop;
|
|
1355
|
+
if (n.scrollTop = t + 1, n.scrollTop !== t)
|
|
1356
|
+
return n.scrollTop = t, !0;
|
|
1357
|
+
n.scrollTop = t - 1;
|
|
1358
|
+
const s = n.scrollTop !== t;
|
|
1359
|
+
return n.scrollTop = t, s;
|
|
1421
1360
|
} else {
|
|
1422
|
-
const
|
|
1423
|
-
if (
|
|
1424
|
-
return
|
|
1425
|
-
|
|
1426
|
-
const
|
|
1427
|
-
return
|
|
1361
|
+
const t = n.scrollLeft;
|
|
1362
|
+
if (n.scrollLeft = t + 1, n.scrollLeft !== t)
|
|
1363
|
+
return n.scrollLeft = t, !0;
|
|
1364
|
+
n.scrollLeft = t - 1;
|
|
1365
|
+
const s = n.scrollLeft !== t;
|
|
1366
|
+
return n.scrollLeft = t, s;
|
|
1428
1367
|
}
|
|
1429
1368
|
}
|
|
1430
|
-
function
|
|
1431
|
-
const
|
|
1432
|
-
|
|
1433
|
-
|
|
1434
|
-
|
|
1435
|
-
|
|
1436
|
-
|
|
1437
|
-
|
|
1438
|
-
|
|
1439
|
-
|
|
1440
|
-
|
|
1441
|
-
|
|
1442
|
-
|
|
1443
|
-
|
|
1444
|
-
|
|
1445
|
-
|
|
1446
|
-
|
|
1447
|
-
|
|
1448
|
-
|
|
1449
|
-
|
|
1450
|
-
|
|
1451
|
-
|
|
1452
|
-
|
|
1453
|
-
}
|
|
1454
|
-
|
|
1455
|
-
} else
|
|
1456
|
-
d = t[6];
|
|
1457
|
-
const {
|
|
1458
|
-
initial: g,
|
|
1459
|
-
variants: o
|
|
1460
|
-
} = d;
|
|
1461
|
-
let p, w;
|
|
1462
|
-
t[7] !== u || t[8] !== r || t[9] !== i || t[10] !== a || t[11] !== o ? (p = () => {
|
|
1463
|
-
if (!i.current)
|
|
1464
|
-
return;
|
|
1465
|
-
const {
|
|
1466
|
-
value: L,
|
|
1467
|
-
options: M
|
|
1468
|
-
} = o[`${a}-${r}`];
|
|
1469
|
-
u(i.current, L, M);
|
|
1470
|
-
}, w = [a, r, u, o, i], t[7] = u, t[8] = r, t[9] = i, t[10] = a, t[11] = o, t[12] = p, t[13] = w) : (p = t[12], w = t[13]), J(p, w);
|
|
1471
|
-
let E;
|
|
1472
|
-
t[14] !== n.style ? (E = {
|
|
1473
|
-
position: "absolute",
|
|
1474
|
-
top: 0,
|
|
1475
|
-
left: 0,
|
|
1476
|
-
width: "100%",
|
|
1477
|
-
height: "100%",
|
|
1478
|
-
pointerEvents: "none",
|
|
1479
|
-
...n.style
|
|
1480
|
-
}, t[14] = n.style, t[15] = E) : E = t[15];
|
|
1481
|
-
let T;
|
|
1482
|
-
return t[16] !== g || t[17] !== i || t[18] !== E ? (T = /* @__PURE__ */ x(Z.div, { ref: i, initial: g, style: E, "data-decorator": !0 }), t[16] = g, t[17] = i, t[18] = E, t[19] = T) : T = t[19], T;
|
|
1483
|
-
}
|
|
1484
|
-
function nn(e) {
|
|
1485
|
-
return e.status;
|
|
1369
|
+
function de({ children: n, ref: e, ...t }) {
|
|
1370
|
+
const { isActive: r, transitionName: s } = tt(), [a, o] = Lt();
|
|
1371
|
+
jt(e, () => a.current);
|
|
1372
|
+
const c = j((u) => u.status), h = et.get(s), { decoratorName: l } = h, { initial: m, variants: d } = ht.get(l);
|
|
1373
|
+
return z(() => {
|
|
1374
|
+
if (!a.current) return;
|
|
1375
|
+
const { value: u, options: P } = d[`${c}-${r}`];
|
|
1376
|
+
o(a.current, u, P);
|
|
1377
|
+
}, [c, r, o, d, a]), /* @__PURE__ */ D(
|
|
1378
|
+
J.div,
|
|
1379
|
+
{
|
|
1380
|
+
ref: a,
|
|
1381
|
+
initial: m,
|
|
1382
|
+
style: {
|
|
1383
|
+
position: "absolute",
|
|
1384
|
+
top: 0,
|
|
1385
|
+
left: 0,
|
|
1386
|
+
width: "100%",
|
|
1387
|
+
height: "100%",
|
|
1388
|
+
pointerEvents: "none",
|
|
1389
|
+
...t.style
|
|
1390
|
+
},
|
|
1391
|
+
"data-decorator": !0
|
|
1392
|
+
}
|
|
1393
|
+
);
|
|
1486
1394
|
}
|
|
1487
|
-
const
|
|
1395
|
+
const Z = st((n) => ({
|
|
1488
1396
|
dragStatus: "IDLE",
|
|
1489
1397
|
replaceTransitionStatus: "IDLE",
|
|
1490
|
-
setDragStatus: (
|
|
1491
|
-
|
|
1492
|
-
}),
|
|
1493
|
-
setReplaceTransitionStatus: (t) => e({
|
|
1494
|
-
replaceTransitionStatus: t
|
|
1495
|
-
})
|
|
1398
|
+
setDragStatus: (e) => n({ dragStatus: e }),
|
|
1399
|
+
setReplaceTransitionStatus: (e) => n({ replaceTransitionStatus: e })
|
|
1496
1400
|
}));
|
|
1497
|
-
function
|
|
1498
|
-
|
|
1499
|
-
|
|
1500
|
-
t
|
|
1501
|
-
|
|
1502
|
-
|
|
1503
|
-
|
|
1504
|
-
|
|
1505
|
-
|
|
1506
|
-
|
|
1507
|
-
|
|
1508
|
-
|
|
1509
|
-
|
|
1510
|
-
...u
|
|
1511
|
-
} = e, t[0] = e, t[1] = n, t[2] = s, t[3] = r, t[4] = c, t[5] = i, t[6] = u, t[7] = l, t[8] = a, t[9] = d, t[10] = g) : (n = t[1], s = t[2], r = t[3], c = t[4], i = t[5], u = t[6], l = t[7], a = t[8], d = t[9], g = t[10]);
|
|
1512
|
-
const [o, p] = fe(), {
|
|
1513
|
-
id: w,
|
|
1514
|
-
isActive: E,
|
|
1515
|
-
isRoot: T,
|
|
1516
|
-
transitionName: L,
|
|
1517
|
-
prevTransitionName: M
|
|
1518
|
-
} = dt(), D = Te(), C = Q(on), R = tt(an), b = tt(rn), f = tt(sn);
|
|
1519
|
-
let m, P, h, S, y;
|
|
1520
|
-
if (t[11] !== L) {
|
|
1521
|
-
m = ht.get(L);
|
|
1522
|
-
const {
|
|
1523
|
-
variants: k,
|
|
1524
|
-
initial: O,
|
|
1525
|
-
swipeDirection: G,
|
|
1526
|
-
decoratorName: q
|
|
1527
|
-
} = m;
|
|
1528
|
-
y = k, P = O, h = G, S = Zt.get(q), t[11] = L, t[12] = m, t[13] = P, t[14] = h, t[15] = S, t[16] = y;
|
|
1529
|
-
} else
|
|
1530
|
-
m = t[12], P = t[13], h = t[14], S = t[15], y = t[16];
|
|
1531
|
-
const v = S, [N, H] = ne(0), [I, _] = ne(0), $ = B(null), A = B(null), U = B(null), et = B(null), K = B(!1), pt = B(!1);
|
|
1532
|
-
let mt;
|
|
1533
|
-
t[17] === Symbol.for("react.memo_cache_sentinel") ? (mt = {
|
|
1534
|
-
element: null,
|
|
1535
|
-
hasMarker: !1
|
|
1536
|
-
}, t[17] = mt) : mt = t[17];
|
|
1537
|
-
const V = B(mt);
|
|
1538
|
-
let yt;
|
|
1539
|
-
t[18] === Symbol.for("react.memo_cache_sentinel") ? (yt = {
|
|
1401
|
+
function Ct({
|
|
1402
|
+
children: n,
|
|
1403
|
+
statusBarHeight: e,
|
|
1404
|
+
statusBarColor: t,
|
|
1405
|
+
systemNavigationBarHeight: r,
|
|
1406
|
+
systemNavigationBarColor: s,
|
|
1407
|
+
appBar: a,
|
|
1408
|
+
navigationBar: o,
|
|
1409
|
+
hideStatusBar: c,
|
|
1410
|
+
hideSystemNavigationBar: h,
|
|
1411
|
+
...l
|
|
1412
|
+
}) {
|
|
1413
|
+
const [m, d] = Lt(), { id: u, isActive: P, isRoot: L, transitionName: N, prevTransitionName: w } = tt(), k = Ft(), F = j((v) => v.status), Q = Z((v) => v.dragStatus), U = Z.getState().setDragStatus, R = Z.getState().setReplaceTransitionStatus, A = et.get(N), { variants: i, initial: y, swipeDirection: g, decoratorName: E } = A, p = ht.get(E), [f, I] = mt(0), [T, O] = mt(0), S = H(null), M = H(null), x = H(null), C = H(null), b = H(!1), W = H(!1), B = H({
|
|
1540
1414
|
element: null,
|
|
1541
1415
|
hasMarker: !1
|
|
1542
|
-
},
|
|
1543
|
-
|
|
1544
|
-
let gt;
|
|
1545
|
-
t[19] !== p || t[20] !== m || t[21] !== v || t[22] !== D || t[23] !== o || t[24] !== b || t[25] !== h ? (gt = async (k, O) => {
|
|
1546
|
-
if (!h)
|
|
1416
|
+
}), X = H({ element: null, hasMarker: !1 }), yt = H(0), gt = H(0), at = H(null), ot = H(null), bt = async (v, G) => {
|
|
1417
|
+
if (!g)
|
|
1547
1418
|
return;
|
|
1548
|
-
const
|
|
1549
|
-
|
|
1550
|
-
const
|
|
1551
|
-
animate:
|
|
1552
|
-
currentScreen:
|
|
1553
|
-
prevScreen:
|
|
1554
|
-
dragControls:
|
|
1555
|
-
onStart: (
|
|
1556
|
-
animate:
|
|
1557
|
-
currentDecorator:
|
|
1558
|
-
prevDecorator:
|
|
1419
|
+
const $ = S.current?.previousSibling;
|
|
1420
|
+
M.current = $?.querySelector("[data-screen]"), C.current = $?.querySelector("[data-decorator]");
|
|
1421
|
+
const K = await A?.onSwipeStart(v, G, {
|
|
1422
|
+
animate: d,
|
|
1423
|
+
currentScreen: m.current,
|
|
1424
|
+
prevScreen: M.current,
|
|
1425
|
+
dragControls: k,
|
|
1426
|
+
onStart: (it) => p?.onSwipeStart?.(it, {
|
|
1427
|
+
animate: d,
|
|
1428
|
+
currentDecorator: x.current,
|
|
1429
|
+
prevDecorator: C.current
|
|
1559
1430
|
})
|
|
1560
1431
|
});
|
|
1561
|
-
|
|
1562
|
-
},
|
|
1563
|
-
|
|
1564
|
-
|
|
1565
|
-
|
|
1566
|
-
|
|
1567
|
-
|
|
1568
|
-
|
|
1569
|
-
|
|
1570
|
-
|
|
1571
|
-
|
|
1572
|
-
animate: p,
|
|
1573
|
-
currentDecorator: U.current,
|
|
1574
|
-
prevDecorator: et.current
|
|
1432
|
+
U(K ? "PENDING" : "IDLE");
|
|
1433
|
+
}, At = (v, G) => {
|
|
1434
|
+
!g || Q !== "PENDING" || A?.onSwipe(v, G, {
|
|
1435
|
+
animate: d,
|
|
1436
|
+
currentScreen: m.current,
|
|
1437
|
+
prevScreen: M.current,
|
|
1438
|
+
dragControls: k,
|
|
1439
|
+
onProgress: ($, K) => p?.onSwipe?.($, K, {
|
|
1440
|
+
animate: d,
|
|
1441
|
+
currentDecorator: x.current,
|
|
1442
|
+
prevDecorator: C.current
|
|
1575
1443
|
})
|
|
1576
1444
|
});
|
|
1577
|
-
},
|
|
1578
|
-
|
|
1579
|
-
let wt;
|
|
1580
|
-
t[35] !== p || t[36] !== m || t[37] !== v || t[38] !== R || t[39] !== o || t[40] !== b || t[41] !== h ? (wt = async (k, O) => {
|
|
1581
|
-
if (!h || R !== "PENDING")
|
|
1445
|
+
}, Rt = async (v, G) => {
|
|
1446
|
+
if (!g || Q !== "PENDING")
|
|
1582
1447
|
return;
|
|
1583
|
-
await
|
|
1584
|
-
animate:
|
|
1585
|
-
currentScreen:
|
|
1586
|
-
prevScreen:
|
|
1587
|
-
onStart: (
|
|
1588
|
-
animate:
|
|
1589
|
-
currentDecorator:
|
|
1590
|
-
prevDecorator:
|
|
1448
|
+
await A?.onSwipeEnd(v, G, {
|
|
1449
|
+
animate: d,
|
|
1450
|
+
currentScreen: m.current,
|
|
1451
|
+
prevScreen: M.current,
|
|
1452
|
+
onStart: (K) => p?.onSwipeEnd?.(K, {
|
|
1453
|
+
animate: d,
|
|
1454
|
+
currentDecorator: x.current,
|
|
1455
|
+
prevDecorator: C.current
|
|
1591
1456
|
})
|
|
1592
|
-
}) ? window.history.back() :
|
|
1593
|
-
},
|
|
1594
|
-
|
|
1595
|
-
let Et;
|
|
1596
|
-
t[43] !== R || t[44] !== E || t[45] !== T || t[46] !== C || t[47] !== h ? (Et = (k) => {
|
|
1597
|
-
if (!(!T && E && C === "COMPLETED" && R === "IDLE" && !!h))
|
|
1457
|
+
}) ? window.history.back() : U("IDLE");
|
|
1458
|
+
}, Ot = (v) => {
|
|
1459
|
+
if (!(!L && P && F === "COMPLETED" && Q === "IDLE" && !!g))
|
|
1598
1460
|
return;
|
|
1599
|
-
|
|
1461
|
+
B.current = vt(v.target, {
|
|
1600
1462
|
direction: "x",
|
|
1601
1463
|
verifyByScroll: !0
|
|
1602
|
-
}),
|
|
1464
|
+
}), X.current = vt(v.target, {
|
|
1603
1465
|
direction: "y",
|
|
1604
1466
|
verifyByScroll: !0
|
|
1605
|
-
}),
|
|
1606
|
-
},
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
K.current = !1,
|
|
1613
|
-
else if (K.current && !O) {
|
|
1614
|
-
const G = k.clientX - te.current, q = k.clientY - ee.current, Yt = z.current.element && z.current.element.scrollTop <= 0 && z.current.hasMarker, Se = V.current.element && V.current.element.scrollLeft <= 0 && V.current.hasMarker;
|
|
1615
|
-
(h === "y" && (Yt || V.current.element) && q > 0 && Math.abs(G) < 4 || h === "x" && (Se || z.current.element) && G > 0 && Math.abs(q) < 4) && (K.current = !1, pt.current = !0, D.start(k));
|
|
1467
|
+
}), yt.current = v.clientX, gt.current = v.clientY, (!B.current.element && !X.current.element || B.current.element || X.current.element) && (b.current = !0);
|
|
1468
|
+
}, Gt = (v) => {
|
|
1469
|
+
const G = !B.current.element && !X.current.element;
|
|
1470
|
+
if (b.current && G)
|
|
1471
|
+
b.current = !1, W.current = !0, k.start(v);
|
|
1472
|
+
else if (b.current && !G) {
|
|
1473
|
+
const $ = v.clientX - yt.current, K = v.clientY - gt.current, it = X.current.element && X.current.element.scrollTop <= 0 && X.current.hasMarker, Ut = B.current.element && B.current.element.scrollLeft <= 0 && B.current.hasMarker;
|
|
1474
|
+
(g === "y" && (it || B.current.element) && K > 0 && Math.abs($) < 4 || g === "x" && (Ut || X.current.element) && $ > 0 && Math.abs(K) < 4) && (b.current = !1, W.current = !0, k.start(v));
|
|
1616
1475
|
}
|
|
1617
|
-
}, t
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
t[53] !== o ? (vt = () => {
|
|
1626
|
-
const k = o.current;
|
|
1627
|
-
if (!k)
|
|
1628
|
-
return;
|
|
1629
|
-
const O = (G) => {
|
|
1630
|
-
pt.current && G.preventDefault(), G.target?.dataset.swipeAtEdgeBar === "true" && G.preventDefault();
|
|
1476
|
+
}, $t = () => {
|
|
1477
|
+
b.current = !1, W.current = !1;
|
|
1478
|
+
};
|
|
1479
|
+
return z(() => {
|
|
1480
|
+
const v = m.current;
|
|
1481
|
+
if (!v) return;
|
|
1482
|
+
const G = ($) => {
|
|
1483
|
+
W.current && $.preventDefault(), $.target?.dataset.swipeAtEdgeBar === "true" && $.preventDefault();
|
|
1631
1484
|
};
|
|
1632
|
-
return
|
|
1485
|
+
return v.addEventListener("touchmove", G, {
|
|
1633
1486
|
passive: !1
|
|
1634
1487
|
}), () => {
|
|
1635
|
-
|
|
1488
|
+
v.removeEventListener("touchmove", G);
|
|
1636
1489
|
};
|
|
1637
|
-
},
|
|
1638
|
-
|
|
1639
|
-
|
|
1640
|
-
|
|
1641
|
-
const {
|
|
1642
|
-
value: k,
|
|
1643
|
-
options: O
|
|
1644
|
-
} = y[`${C}-${E}`];
|
|
1645
|
-
!E && C === "REPLACING" && M !== L && (f("PENDING"), await p(o.current, qe, {
|
|
1490
|
+
}, [m]), z(() => {
|
|
1491
|
+
m.current && (async () => {
|
|
1492
|
+
const { value: v, options: G } = i[`${F}-${P}`];
|
|
1493
|
+
!P && F === "REPLACING" && w !== N && (R("PENDING"), await d(m.current, ie, {
|
|
1646
1494
|
duration: 0.1
|
|
1647
|
-
})),
|
|
1495
|
+
})), P && F === "COMPLETED" && (U("IDLE"), R("IDLE")), await d(m.current, v, G), await q.resolveTask(u);
|
|
1648
1496
|
})();
|
|
1649
|
-
},
|
|
1650
|
-
|
|
1651
|
-
|
|
1652
|
-
|
|
1653
|
-
|
|
1654
|
-
|
|
1655
|
-
|
|
1656
|
-
|
|
1657
|
-
|
|
1658
|
-
|
|
1659
|
-
|
|
1660
|
-
|
|
1661
|
-
|
|
1662
|
-
|
|
1663
|
-
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1672
|
-
|
|
1673
|
-
|
|
1674
|
-
|
|
1675
|
-
|
|
1676
|
-
|
|
1677
|
-
|
|
1678
|
-
|
|
1679
|
-
|
|
1680
|
-
|
|
1681
|
-
|
|
1682
|
-
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1691
|
-
|
|
1692
|
-
|
|
1693
|
-
|
|
1694
|
-
|
|
1695
|
-
|
|
1696
|
-
|
|
1697
|
-
|
|
1698
|
-
|
|
1699
|
-
|
|
1700
|
-
|
|
1701
|
-
|
|
1702
|
-
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1731
|
-
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1735
|
-
|
|
1736
|
-
|
|
1737
|
-
|
|
1738
|
-
|
|
1739
|
-
|
|
1740
|
-
|
|
1741
|
-
|
|
1742
|
-
|
|
1743
|
-
|
|
1744
|
-
|
|
1745
|
-
|
|
1746
|
-
|
|
1747
|
-
|
|
1748
|
-
|
|
1749
|
-
|
|
1750
|
-
|
|
1751
|
-
|
|
1752
|
-
|
|
1753
|
-
|
|
1754
|
-
|
|
1755
|
-
|
|
1756
|
-
|
|
1757
|
-
|
|
1758
|
-
|
|
1759
|
-
|
|
1760
|
-
|
|
1761
|
-
|
|
1762
|
-
|
|
1763
|
-
|
|
1764
|
-
|
|
1765
|
-
|
|
1766
|
-
|
|
1767
|
-
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
|
|
1771
|
-
|
|
1772
|
-
|
|
1773
|
-
|
|
1774
|
-
|
|
1775
|
-
}
|
|
1776
|
-
|
|
1777
|
-
|
|
1778
|
-
}
|
|
1779
|
-
|
|
1780
|
-
|
|
1781
|
-
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
1785
|
-
|
|
1786
|
-
|
|
1787
|
-
|
|
1788
|
-
|
|
1789
|
-
|
|
1790
|
-
|
|
1791
|
-
|
|
1792
|
-
|
|
1793
|
-
|
|
1794
|
-
|
|
1795
|
-
|
|
1796
|
-
|
|
1797
|
-
|
|
1798
|
-
|
|
1799
|
-
|
|
1800
|
-
|
|
1801
|
-
|
|
1802
|
-
|
|
1803
|
-
|
|
1804
|
-
|
|
1805
|
-
|
|
1806
|
-
|
|
1807
|
-
|
|
1808
|
-
|
|
1809
|
-
|
|
1810
|
-
|
|
1811
|
-
function kn(e) {
|
|
1812
|
-
const t = j(14);
|
|
1813
|
-
let n, s;
|
|
1814
|
-
t[0] !== e ? ({
|
|
1815
|
-
children: n,
|
|
1816
|
-
...s
|
|
1817
|
-
} = e, t[0] = e, t[1] = n, t[2] = s) : (n = t[1], s = t[2]);
|
|
1818
|
-
const {
|
|
1819
|
-
isActive: r,
|
|
1820
|
-
isPrev: c,
|
|
1821
|
-
zIndex: i
|
|
1822
|
-
} = dt(), u = X(mn), l = Q(hn), a = tt(pn), d = tt(dn), o = !r && (l === "COMPLETED" && a === "IDLE") || c && u - 2 <= i && d === "IDLE" || c && u - 2 > i;
|
|
1823
|
-
let p;
|
|
1824
|
-
t[3] !== s.style ? (p = {
|
|
1825
|
-
backgroundColor: "transparent",
|
|
1826
|
-
...s.style
|
|
1827
|
-
}, t[3] = s.style, t[4] = p) : p = t[4];
|
|
1828
|
-
let w;
|
|
1829
|
-
t[5] !== n ? (w = /* @__PURE__ */ x(ve, { children: n }), t[5] = n, t[6] = w) : w = t[6];
|
|
1830
|
-
let E;
|
|
1831
|
-
t[7] !== s || t[8] !== p || t[9] !== w ? (E = /* @__PURE__ */ x(ye, { ...s, style: p, children: w }), t[7] = s, t[8] = p, t[9] = w, t[10] = E) : E = t[10];
|
|
1832
|
-
let T;
|
|
1833
|
-
return t[11] !== o || t[12] !== E ? (T = /* @__PURE__ */ x(me, { freeze: o, children: E }), t[11] = o, t[12] = E, t[13] = T) : T = t[13], T;
|
|
1834
|
-
}
|
|
1835
|
-
function dn(e) {
|
|
1836
|
-
return e.replaceTransitionStatus;
|
|
1837
|
-
}
|
|
1838
|
-
function pn(e) {
|
|
1839
|
-
return e.dragStatus;
|
|
1840
|
-
}
|
|
1841
|
-
function hn(e) {
|
|
1842
|
-
return e.status;
|
|
1497
|
+
}, [
|
|
1498
|
+
F,
|
|
1499
|
+
P,
|
|
1500
|
+
u,
|
|
1501
|
+
w,
|
|
1502
|
+
N,
|
|
1503
|
+
d,
|
|
1504
|
+
m,
|
|
1505
|
+
i,
|
|
1506
|
+
U,
|
|
1507
|
+
R
|
|
1508
|
+
]), Et(() => {
|
|
1509
|
+
at.current && I(at.current.offsetHeight);
|
|
1510
|
+
}, [a]), Et(() => {
|
|
1511
|
+
ot.current && O(ot.current.offsetHeight);
|
|
1512
|
+
}, [o]), /* @__PURE__ */ ct(
|
|
1513
|
+
J.div,
|
|
1514
|
+
{
|
|
1515
|
+
ref: S,
|
|
1516
|
+
style: {
|
|
1517
|
+
position: "absolute",
|
|
1518
|
+
top: 0,
|
|
1519
|
+
left: 0,
|
|
1520
|
+
width: "100%",
|
|
1521
|
+
height: "100%",
|
|
1522
|
+
display: "flex",
|
|
1523
|
+
flexDirection: "column",
|
|
1524
|
+
boxSizing: "border-box",
|
|
1525
|
+
isolation: "isolate",
|
|
1526
|
+
contain: "strict",
|
|
1527
|
+
overscrollBehavior: "contain"
|
|
1528
|
+
},
|
|
1529
|
+
children: [
|
|
1530
|
+
/* @__PURE__ */ D(
|
|
1531
|
+
"div",
|
|
1532
|
+
{
|
|
1533
|
+
"data-swipe-at-edge-bar": !0,
|
|
1534
|
+
style: {
|
|
1535
|
+
position: "absolute",
|
|
1536
|
+
top: 0,
|
|
1537
|
+
left: 0,
|
|
1538
|
+
width: 8,
|
|
1539
|
+
height: "100%",
|
|
1540
|
+
zIndex: 1
|
|
1541
|
+
}
|
|
1542
|
+
}
|
|
1543
|
+
),
|
|
1544
|
+
a && /* @__PURE__ */ D(
|
|
1545
|
+
J.div,
|
|
1546
|
+
{
|
|
1547
|
+
ref: at,
|
|
1548
|
+
style: {
|
|
1549
|
+
position: "absolute",
|
|
1550
|
+
top: c ? 0 : e,
|
|
1551
|
+
left: 0,
|
|
1552
|
+
width: "100%"
|
|
1553
|
+
},
|
|
1554
|
+
children: a
|
|
1555
|
+
}
|
|
1556
|
+
),
|
|
1557
|
+
/* @__PURE__ */ ct(
|
|
1558
|
+
J.div,
|
|
1559
|
+
{
|
|
1560
|
+
ref: m,
|
|
1561
|
+
...l,
|
|
1562
|
+
initial: y,
|
|
1563
|
+
drag: g,
|
|
1564
|
+
dragListener: !1,
|
|
1565
|
+
dragControls: k,
|
|
1566
|
+
onDragStart: bt,
|
|
1567
|
+
onDrag: At,
|
|
1568
|
+
onDragEnd: Rt,
|
|
1569
|
+
onPointerDown: Ot,
|
|
1570
|
+
onPointerMove: Gt,
|
|
1571
|
+
onPointerUp: $t,
|
|
1572
|
+
"data-screen": !0,
|
|
1573
|
+
style: {
|
|
1574
|
+
display: "flex",
|
|
1575
|
+
flexDirection: "column",
|
|
1576
|
+
height: "100%",
|
|
1577
|
+
backgroundColor: "white",
|
|
1578
|
+
touchAction: "none",
|
|
1579
|
+
...l.style
|
|
1580
|
+
},
|
|
1581
|
+
children: [
|
|
1582
|
+
!c && e && /* @__PURE__ */ D(
|
|
1583
|
+
J.div,
|
|
1584
|
+
{
|
|
1585
|
+
animate: {
|
|
1586
|
+
backgroundColor: t
|
|
1587
|
+
},
|
|
1588
|
+
style: {
|
|
1589
|
+
width: "100%",
|
|
1590
|
+
minHeight: e
|
|
1591
|
+
}
|
|
1592
|
+
}
|
|
1593
|
+
),
|
|
1594
|
+
a && /* @__PURE__ */ D(
|
|
1595
|
+
"div",
|
|
1596
|
+
{
|
|
1597
|
+
style: {
|
|
1598
|
+
width: "100%",
|
|
1599
|
+
minHeight: f
|
|
1600
|
+
}
|
|
1601
|
+
}
|
|
1602
|
+
),
|
|
1603
|
+
/* @__PURE__ */ D("div", { style: { display: "flex", flexDirection: "column", flexGrow: 1, overflowY: "auto" }, children: n }),
|
|
1604
|
+
o && /* @__PURE__ */ D(
|
|
1605
|
+
"div",
|
|
1606
|
+
{
|
|
1607
|
+
style: {
|
|
1608
|
+
width: "100%",
|
|
1609
|
+
minHeight: T
|
|
1610
|
+
}
|
|
1611
|
+
}
|
|
1612
|
+
),
|
|
1613
|
+
!h && r && /* @__PURE__ */ D(
|
|
1614
|
+
J.div,
|
|
1615
|
+
{
|
|
1616
|
+
animate: {
|
|
1617
|
+
backgroundColor: s
|
|
1618
|
+
},
|
|
1619
|
+
style: {
|
|
1620
|
+
width: "100%",
|
|
1621
|
+
minHeight: r
|
|
1622
|
+
}
|
|
1623
|
+
}
|
|
1624
|
+
)
|
|
1625
|
+
]
|
|
1626
|
+
}
|
|
1627
|
+
),
|
|
1628
|
+
o && /* @__PURE__ */ D(
|
|
1629
|
+
J.div,
|
|
1630
|
+
{
|
|
1631
|
+
ref: ot,
|
|
1632
|
+
style: {
|
|
1633
|
+
position: "absolute",
|
|
1634
|
+
bottom: h ? 0 : r,
|
|
1635
|
+
left: 0,
|
|
1636
|
+
width: "100%"
|
|
1637
|
+
},
|
|
1638
|
+
children: o
|
|
1639
|
+
}
|
|
1640
|
+
),
|
|
1641
|
+
p && /* @__PURE__ */ D(de, { ref: x }),
|
|
1642
|
+
/* @__PURE__ */ D(
|
|
1643
|
+
"div",
|
|
1644
|
+
{
|
|
1645
|
+
"data-swipe-at-edge-bar": !0,
|
|
1646
|
+
style: {
|
|
1647
|
+
position: "absolute",
|
|
1648
|
+
top: 0,
|
|
1649
|
+
right: 0,
|
|
1650
|
+
width: 8,
|
|
1651
|
+
height: "100%",
|
|
1652
|
+
zIndex: 1
|
|
1653
|
+
}
|
|
1654
|
+
}
|
|
1655
|
+
)
|
|
1656
|
+
]
|
|
1657
|
+
}
|
|
1658
|
+
);
|
|
1843
1659
|
}
|
|
1844
|
-
function
|
|
1845
|
-
|
|
1660
|
+
function Te({ children: n, ...e }) {
|
|
1661
|
+
const { isActive: t, isPrev: r, zIndex: s } = tt(), a = Y((d) => d.index), o = j((d) => d.status), c = Z((d) => d.dragStatus), h = Z((d) => d.replaceTransitionStatus), m = !t && (o === "COMPLETED" && c === "IDLE") || r && a - 2 <= s && h === "IDLE" || r && a - 2 > s;
|
|
1662
|
+
return /* @__PURE__ */ D(Mt, { freeze: m, children: /* @__PURE__ */ D(Ct, { ...e, children: n }) });
|
|
1846
1663
|
}
|
|
1847
|
-
function
|
|
1848
|
-
const t = j(
|
|
1849
|
-
|
|
1850
|
-
|
|
1851
|
-
|
|
1852
|
-
|
|
1853
|
-
|
|
1854
|
-
|
|
1855
|
-
|
|
1856
|
-
|
|
1857
|
-
|
|
1858
|
-
|
|
1859
|
-
|
|
1860
|
-
const a = u?.variants[`${i}-${r}`]?.options;
|
|
1861
|
-
let d;
|
|
1862
|
-
return t[5] !== n || t[6] !== s || t[7] !== a ? (d = /* @__PURE__ */ x(De, { transition: a, ...s, children: n }), t[5] = n, t[6] = s, t[7] = a, t[8] = d) : d = t[8], d;
|
|
1664
|
+
function ve({ children: n, ...e }) {
|
|
1665
|
+
const { isActive: t, isPrev: r, zIndex: s } = tt(), a = Y((d) => d.index), o = j((d) => d.status), c = Z((d) => d.dragStatus), h = Z((d) => d.replaceTransitionStatus), m = !t && (o === "COMPLETED" && c === "IDLE") || r && a - 2 <= s && h === "IDLE" || r && a - 2 > s;
|
|
1666
|
+
return /* @__PURE__ */ D(Mt, { freeze: m, children: /* @__PURE__ */ D(
|
|
1667
|
+
Ct,
|
|
1668
|
+
{
|
|
1669
|
+
...e,
|
|
1670
|
+
style: {
|
|
1671
|
+
backgroundColor: "transparent",
|
|
1672
|
+
...e.style
|
|
1673
|
+
},
|
|
1674
|
+
children: /* @__PURE__ */ D(Qt, { children: n })
|
|
1675
|
+
}
|
|
1676
|
+
) });
|
|
1863
1677
|
}
|
|
1864
|
-
function
|
|
1865
|
-
|
|
1678
|
+
function De({ children: n, ...e }) {
|
|
1679
|
+
const { isActive: t, transitionName: r } = tt(), s = j((o) => o.status), a = et.get(r);
|
|
1680
|
+
return /* @__PURE__ */ D(
|
|
1681
|
+
qt,
|
|
1682
|
+
{
|
|
1683
|
+
transition: a?.variants[`${s}-${t}`]?.options,
|
|
1684
|
+
...e,
|
|
1685
|
+
children: n
|
|
1686
|
+
}
|
|
1687
|
+
);
|
|
1866
1688
|
}
|
|
1867
1689
|
export {
|
|
1868
|
-
|
|
1869
|
-
|
|
1870
|
-
|
|
1871
|
-
|
|
1872
|
-
|
|
1873
|
-
|
|
1874
|
-
|
|
1875
|
-
|
|
1876
|
-
|
|
1877
|
-
|
|
1878
|
-
|
|
1879
|
-
|
|
1880
|
-
|
|
1690
|
+
De as LayoutConfig,
|
|
1691
|
+
ve as LayoutScreen,
|
|
1692
|
+
ge as Route,
|
|
1693
|
+
ye as Router,
|
|
1694
|
+
Te as Screen,
|
|
1695
|
+
ee as createDecorator,
|
|
1696
|
+
Pe as createRawDecorator,
|
|
1697
|
+
Se as createRawTransition,
|
|
1698
|
+
rt as createTransition,
|
|
1699
|
+
me as useNavigate,
|
|
1700
|
+
we as useParams,
|
|
1701
|
+
tt as useScreen,
|
|
1702
|
+
Ee as useStep
|
|
1881
1703
|
};
|