@flemo/core 1.18.0 → 1.18.1
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
CHANGED
|
@@ -496,7 +496,7 @@ function te(e) {
|
|
|
496
496
|
}
|
|
497
497
|
//#endregion
|
|
498
498
|
//#region src/history/memoryHistoryDriver.ts
|
|
499
|
-
function
|
|
499
|
+
function ne(e) {
|
|
500
500
|
let t = [{
|
|
501
501
|
state: e?.state ?? null,
|
|
502
502
|
url: e?.url ?? "/"
|
|
@@ -538,7 +538,7 @@ function O(e) {
|
|
|
538
538
|
}
|
|
539
539
|
//#endregion
|
|
540
540
|
//#region src/navigate/store.ts
|
|
541
|
-
function
|
|
541
|
+
function O() {
|
|
542
542
|
return e((e) => ({
|
|
543
543
|
status: "IDLE",
|
|
544
544
|
transitionTaskId: null,
|
|
@@ -548,11 +548,11 @@ function k() {
|
|
|
548
548
|
}
|
|
549
549
|
//#endregion
|
|
550
550
|
//#region src/navigate/createNavigationController.ts
|
|
551
|
-
var
|
|
551
|
+
var k = (e, t, n) => {
|
|
552
552
|
let { regexp: r } = i(e);
|
|
553
553
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
554
554
|
return -1;
|
|
555
|
-
},
|
|
555
|
+
}, A = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, j = async (e, t, n, r) => {
|
|
556
556
|
let i, a = new Promise((t) => {
|
|
557
557
|
i = e.subscribe(() => t(!0));
|
|
558
558
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -560,7 +560,7 @@ var A = (e, t, n) => {
|
|
|
560
560
|
let s = await Promise.race([a, o]);
|
|
561
561
|
i(), s && r();
|
|
562
562
|
};
|
|
563
|
-
function
|
|
563
|
+
function re(e) {
|
|
564
564
|
let { stores: t, buildPathname: n, driver: r = h(), markSelfInduced: i = v } = e, s = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
565
565
|
let e = r.readState();
|
|
566
566
|
if (!e?.id) return null;
|
|
@@ -586,10 +586,10 @@ function ie(e) {
|
|
|
586
586
|
}
|
|
587
587
|
let o = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
588
588
|
if (u?.until != null) {
|
|
589
|
-
let e =
|
|
589
|
+
let e = k(u.until, d, f);
|
|
590
590
|
return e < 0 ? 0 : e;
|
|
591
591
|
}
|
|
592
|
-
return Math.min(
|
|
592
|
+
return Math.min(A(u?.skip, 0), Math.max(0, d));
|
|
593
593
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
594
594
|
y("PUSHING"), b(h);
|
|
595
595
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -616,7 +616,7 @@ function ie(e) {
|
|
|
616
616
|
return g({
|
|
617
617
|
...C,
|
|
618
618
|
frameIndex: T + 1
|
|
619
|
-
}), await
|
|
619
|
+
}), await j(r, i, v, () => {
|
|
620
620
|
s(), r.pushState({
|
|
621
621
|
id: h,
|
|
622
622
|
index: T + 1,
|
|
@@ -646,10 +646,10 @@ function ie(e) {
|
|
|
646
646
|
}
|
|
647
647
|
let o = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
648
648
|
if (u?.until != null) {
|
|
649
|
-
let e =
|
|
649
|
+
let e = k(u.until, d, f);
|
|
650
650
|
return e < 0 ? 0 : e + 1;
|
|
651
651
|
}
|
|
652
|
-
return Math.min(
|
|
652
|
+
return Math.min(A(u?.skip, 0) + 1, d + 1);
|
|
653
653
|
})();
|
|
654
654
|
if (y <= 0) {
|
|
655
655
|
a.abort();
|
|
@@ -681,7 +681,7 @@ function ie(e) {
|
|
|
681
681
|
return v(y - 1), g({
|
|
682
682
|
...w,
|
|
683
683
|
frameIndex: E
|
|
684
|
-
}), y <= d ? await
|
|
684
|
+
}), y <= d ? await j(r, i, y, () => {
|
|
685
685
|
s(), r.pushState({
|
|
686
686
|
id: h,
|
|
687
687
|
index: E,
|
|
@@ -690,7 +690,7 @@ function ie(e) {
|
|
|
690
690
|
transitionName: p,
|
|
691
691
|
layoutId: m
|
|
692
692
|
}, S);
|
|
693
|
-
}) : await
|
|
693
|
+
}) : await j(r, i, d, () => {
|
|
694
694
|
s(), r.replaceState({
|
|
695
695
|
id: h,
|
|
696
696
|
index: E,
|
|
@@ -746,10 +746,10 @@ function ie(e) {
|
|
|
746
746
|
pop: async (e) => {
|
|
747
747
|
await d((t, n) => {
|
|
748
748
|
if (e?.until != null) {
|
|
749
|
-
let r =
|
|
749
|
+
let r = k(e.until, t, n);
|
|
750
750
|
return r < 0 ? 0 : r;
|
|
751
751
|
}
|
|
752
|
-
let r =
|
|
752
|
+
let r = A(e?.skip, 1);
|
|
753
753
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
754
754
|
}, e?.transitionName);
|
|
755
755
|
}
|
|
@@ -757,14 +757,14 @@ function ie(e) {
|
|
|
757
757
|
}
|
|
758
758
|
//#endregion
|
|
759
759
|
//#region src/navigate/createStepController.ts
|
|
760
|
-
var
|
|
760
|
+
var M = (e) => {
|
|
761
761
|
let t = e;
|
|
762
762
|
return t?.step ? t.params ?? {} : null;
|
|
763
|
-
},
|
|
763
|
+
}, ie = (e, t) => {
|
|
764
764
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
765
765
|
return n ? `${e}?${n}` : e;
|
|
766
766
|
};
|
|
767
|
-
function
|
|
767
|
+
function ae(e) {
|
|
768
768
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: s } = e;
|
|
769
769
|
return {
|
|
770
770
|
pushStep: async (e) => {
|
|
@@ -822,7 +822,7 @@ function se(e) {
|
|
|
822
822
|
}
|
|
823
823
|
};
|
|
824
824
|
}
|
|
825
|
-
function
|
|
825
|
+
function oe(e, t) {
|
|
826
826
|
return e.subscribe((e) => {
|
|
827
827
|
let n = e.state;
|
|
828
828
|
n?.step && o.addTask(async () => {
|
|
@@ -832,7 +832,7 @@ function ce(e, t) {
|
|
|
832
832
|
}
|
|
833
833
|
//#endregion
|
|
834
834
|
//#region src/transition/store.ts
|
|
835
|
-
function
|
|
835
|
+
function se(t = "cupertino") {
|
|
836
836
|
return e((e) => ({
|
|
837
837
|
defaultTransitionName: t,
|
|
838
838
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -840,12 +840,12 @@ function le(t = "cupertino") {
|
|
|
840
840
|
}
|
|
841
841
|
//#endregion
|
|
842
842
|
//#region src/utils/matchesPathname.ts
|
|
843
|
-
function
|
|
843
|
+
function ce(e, t) {
|
|
844
844
|
return i(e).regexp.test(t);
|
|
845
845
|
}
|
|
846
846
|
//#endregion
|
|
847
847
|
//#region src/screen/store.ts
|
|
848
|
-
function
|
|
848
|
+
function le() {
|
|
849
849
|
return e((e) => ({
|
|
850
850
|
dragStatus: "IDLE",
|
|
851
851
|
replaceTransitionStatus: "IDLE",
|
|
@@ -876,14 +876,14 @@ function de() {
|
|
|
876
876
|
}
|
|
877
877
|
//#endregion
|
|
878
878
|
//#region src/core/createRouterScope.ts
|
|
879
|
-
var
|
|
879
|
+
var ue = {
|
|
880
880
|
mark: () => {},
|
|
881
881
|
consume: () => !1
|
|
882
|
-
},
|
|
883
|
-
function
|
|
882
|
+
}, de = /* @__PURE__ */ new Map();
|
|
883
|
+
function fe(e) {
|
|
884
884
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, c = d() ? void 0 : e.persistKey;
|
|
885
885
|
if (c) {
|
|
886
|
-
let e =
|
|
886
|
+
let e = de.get(c);
|
|
887
887
|
if (e) {
|
|
888
888
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
889
889
|
let t = e.history.getState();
|
|
@@ -903,7 +903,7 @@ function me(e) {
|
|
|
903
903
|
index: 0,
|
|
904
904
|
histories: [p]
|
|
905
905
|
}), e.hostedScope;
|
|
906
|
-
let m = a ?
|
|
906
|
+
let m = a ? ne({
|
|
907
907
|
state: {
|
|
908
908
|
id: p.id,
|
|
909
909
|
index: 0,
|
|
@@ -913,25 +913,25 @@ function me(e) {
|
|
|
913
913
|
layoutId: p.layoutId
|
|
914
914
|
},
|
|
915
915
|
url: p.pathname
|
|
916
|
-
}) : o, h = a ?
|
|
916
|
+
}) : o, h = a ? ue : g(), _ = {
|
|
917
917
|
history: s([p], 0),
|
|
918
|
-
navigate:
|
|
919
|
-
transition:
|
|
920
|
-
screen:
|
|
918
|
+
navigate: O(),
|
|
919
|
+
transition: se(i),
|
|
920
|
+
screen: le(),
|
|
921
921
|
driver: m,
|
|
922
922
|
markSelfInduced: h.mark,
|
|
923
923
|
consume: h.consume,
|
|
924
924
|
routerKey: e.routerKey,
|
|
925
925
|
zoneEntryId: e.zoneEntryId,
|
|
926
|
-
ownsPathname: (e) =>
|
|
926
|
+
ownsPathname: (e) => ce(t, e),
|
|
927
927
|
persistent: !!c,
|
|
928
928
|
life: { alive: !0 }
|
|
929
929
|
};
|
|
930
|
-
return c &&
|
|
930
|
+
return c && de.set(c, _), _;
|
|
931
931
|
}
|
|
932
932
|
//#endregion
|
|
933
933
|
//#region src/screen/createScreenSelector.ts
|
|
934
|
-
function
|
|
934
|
+
function pe(e, t) {
|
|
935
935
|
return e.map((n, r) => ({
|
|
936
936
|
...n,
|
|
937
937
|
isActive: r === t,
|
|
@@ -944,13 +944,13 @@ function he(e, t) {
|
|
|
944
944
|
}
|
|
945
945
|
//#endregion
|
|
946
946
|
//#region src/screen/computeScreenFreeze.ts
|
|
947
|
-
function
|
|
947
|
+
function me(e) {
|
|
948
948
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
949
949
|
return !e.isActive && t || e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex;
|
|
950
950
|
}
|
|
951
951
|
//#endregion
|
|
952
952
|
//#region src/transition/createTransition.ts
|
|
953
|
-
function
|
|
953
|
+
function N({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
954
954
|
return {
|
|
955
955
|
name: e,
|
|
956
956
|
initial: t,
|
|
@@ -971,7 +971,7 @@ function j({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exit
|
|
|
971
971
|
}
|
|
972
972
|
//#endregion
|
|
973
973
|
//#region src/transition/createRawTransition.ts
|
|
974
|
-
function
|
|
974
|
+
function he({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
975
975
|
return {
|
|
976
976
|
name: e,
|
|
977
977
|
initial: t,
|
|
@@ -992,10 +992,10 @@ function _e({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
992
992
|
}
|
|
993
993
|
//#endregion
|
|
994
994
|
//#region src/transition/cupertino.ts
|
|
995
|
-
var
|
|
995
|
+
var ge = (e, t, n) => {
|
|
996
996
|
let [r, i] = t, [a, o] = n;
|
|
997
997
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
998
|
-
},
|
|
998
|
+
}, _e = N({
|
|
999
999
|
name: "cupertino",
|
|
1000
1000
|
initial: { x: "100%" },
|
|
1001
1001
|
idle: {
|
|
@@ -1055,7 +1055,7 @@ var ve = (e, t, n) => {
|
|
|
1055
1055
|
swipeDirection: "x",
|
|
1056
1056
|
onSwipeStart: async () => !0,
|
|
1057
1057
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1058
|
-
let { offset: o } = t, s = o.x, c =
|
|
1058
|
+
let { offset: o } = t, s = o.x, c = ge(s, [0, window.innerWidth], [0, 100]);
|
|
1059
1059
|
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-35 + c * .35}%` }, { duration: 0 }), c;
|
|
1060
1060
|
},
|
|
1061
1061
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
@@ -1079,10 +1079,10 @@ var ve = (e, t, n) => {
|
|
|
1079
1079
|
})]), c;
|
|
1080
1080
|
}
|
|
1081
1081
|
}
|
|
1082
|
-
}),
|
|
1082
|
+
}), ve = (e, t, n) => {
|
|
1083
1083
|
let [r, i] = t, [a, o] = n;
|
|
1084
1084
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1085
|
-
},
|
|
1085
|
+
}, ye = N({
|
|
1086
1086
|
name: "layout",
|
|
1087
1087
|
initial: { opacity: .97 },
|
|
1088
1088
|
idle: {
|
|
@@ -1110,7 +1110,7 @@ var ve = (e, t, n) => {
|
|
|
1110
1110
|
swipeDirection: "y",
|
|
1111
1111
|
onSwipeStart: async () => !0,
|
|
1112
1112
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1113
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1113
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = ve(s, [0, 56], [1, .96]), l = Math.max(0, o - 56), u = Math.min(1, l / 160), d = Math.sqrt(u) * 12, f = Math.max(0, s + d), p = Math.min(56, f);
|
|
1114
1114
|
return i?.(!0, 100), n(r, {
|
|
1115
1115
|
y: f,
|
|
1116
1116
|
opacity: c
|
|
@@ -1127,7 +1127,7 @@ var ve = (e, t, n) => {
|
|
|
1127
1127
|
}, { duration: .3 })]), c;
|
|
1128
1128
|
}
|
|
1129
1129
|
}
|
|
1130
|
-
}),
|
|
1130
|
+
}), be = N({
|
|
1131
1131
|
name: "material",
|
|
1132
1132
|
initial: { y: "100%" },
|
|
1133
1133
|
idle: {
|
|
@@ -1235,7 +1235,7 @@ var ve = (e, t, n) => {
|
|
|
1235
1235
|
})]), c;
|
|
1236
1236
|
}
|
|
1237
1237
|
}
|
|
1238
|
-
}),
|
|
1238
|
+
}), xe = N({
|
|
1239
1239
|
name: "none",
|
|
1240
1240
|
initial: {},
|
|
1241
1241
|
idle: {
|
|
@@ -1258,20 +1258,20 @@ var ve = (e, t, n) => {
|
|
|
1258
1258
|
value: {},
|
|
1259
1259
|
options: { duration: 0 }
|
|
1260
1260
|
}
|
|
1261
|
-
}),
|
|
1262
|
-
["none",
|
|
1263
|
-
["cupertino",
|
|
1264
|
-
["material",
|
|
1265
|
-
["layout",
|
|
1261
|
+
}), P = new Map([
|
|
1262
|
+
["none", xe],
|
|
1263
|
+
["cupertino", _e],
|
|
1264
|
+
["material", be],
|
|
1265
|
+
["layout", ye]
|
|
1266
1266
|
]);
|
|
1267
1267
|
//#endregion
|
|
1268
1268
|
//#region src/transition/resolveTransition.ts
|
|
1269
|
-
function
|
|
1270
|
-
return
|
|
1269
|
+
function F(e) {
|
|
1270
|
+
return P.get(e) ?? P.get("none");
|
|
1271
1271
|
}
|
|
1272
1272
|
//#endregion
|
|
1273
1273
|
//#region src/transition/decorator/createDecorator.ts
|
|
1274
|
-
function
|
|
1274
|
+
function Se({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1275
1275
|
return {
|
|
1276
1276
|
name: e,
|
|
1277
1277
|
initial: t,
|
|
@@ -1292,7 +1292,7 @@ function Te({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1292
1292
|
}
|
|
1293
1293
|
//#endregion
|
|
1294
1294
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1295
|
-
function
|
|
1295
|
+
function Ce({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1296
1296
|
return {
|
|
1297
1297
|
name: e,
|
|
1298
1298
|
initial: t,
|
|
@@ -1313,30 +1313,30 @@ function Ee({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1313
1313
|
}
|
|
1314
1314
|
//#endregion
|
|
1315
1315
|
//#region src/transition/decorator/overlay.ts
|
|
1316
|
-
var
|
|
1316
|
+
var I = "rgba(0, 0, 0, 0.2)", we = Se({
|
|
1317
1317
|
name: "overlay",
|
|
1318
1318
|
initial: {
|
|
1319
1319
|
opacity: 0,
|
|
1320
|
-
backgroundColor:
|
|
1320
|
+
backgroundColor: I
|
|
1321
1321
|
},
|
|
1322
1322
|
idle: {
|
|
1323
1323
|
value: {
|
|
1324
1324
|
opacity: 0,
|
|
1325
|
-
backgroundColor:
|
|
1325
|
+
backgroundColor: I
|
|
1326
1326
|
},
|
|
1327
1327
|
options: { duration: 0 }
|
|
1328
1328
|
},
|
|
1329
1329
|
enter: {
|
|
1330
1330
|
value: {
|
|
1331
1331
|
opacity: 1,
|
|
1332
|
-
backgroundColor:
|
|
1332
|
+
backgroundColor: I
|
|
1333
1333
|
},
|
|
1334
1334
|
options: { duration: .6 }
|
|
1335
1335
|
},
|
|
1336
1336
|
exit: {
|
|
1337
1337
|
value: {
|
|
1338
1338
|
opacity: 0,
|
|
1339
|
-
backgroundColor:
|
|
1339
|
+
backgroundColor: I
|
|
1340
1340
|
},
|
|
1341
1341
|
options: { duration: .6 }
|
|
1342
1342
|
},
|
|
@@ -1345,10 +1345,10 @@ var N = "rgba(0, 0, 0, 0.2)", De = Te({
|
|
|
1345
1345
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1346
1346
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1347
1347
|
}
|
|
1348
|
-
}),
|
|
1348
|
+
}), L = new Map([["overlay", we]]);
|
|
1349
1349
|
//#endregion
|
|
1350
1350
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1351
|
-
function
|
|
1351
|
+
function Te({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1352
1352
|
return {
|
|
1353
1353
|
name: e,
|
|
1354
1354
|
initial: t,
|
|
@@ -1369,7 +1369,7 @@ function Oe({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1369
1369
|
}
|
|
1370
1370
|
//#endregion
|
|
1371
1371
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1372
|
-
function
|
|
1372
|
+
function Ee({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1373
1373
|
return {
|
|
1374
1374
|
name: e,
|
|
1375
1375
|
initial: t,
|
|
@@ -1390,7 +1390,7 @@ function ke({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1390
1390
|
}
|
|
1391
1391
|
//#endregion
|
|
1392
1392
|
//#region src/transition/partTransition/partTransition.ts
|
|
1393
|
-
var
|
|
1393
|
+
var R = /* @__PURE__ */ new Map(), z = {
|
|
1394
1394
|
"IDLE-true": "self",
|
|
1395
1395
|
"IDLE-false": "self",
|
|
1396
1396
|
"PUSHING-true": "initial",
|
|
@@ -1401,17 +1401,17 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1401
1401
|
"POPPING-false": "PUSHING-false",
|
|
1402
1402
|
"COMPLETED-true": "self",
|
|
1403
1403
|
"COMPLETED-false": "self"
|
|
1404
|
-
},
|
|
1404
|
+
}, De = Object.keys(z), Oe = (e) => {
|
|
1405
1405
|
if (!e) return 0;
|
|
1406
1406
|
let t = e.duration;
|
|
1407
1407
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1408
|
-
},
|
|
1409
|
-
let n =
|
|
1408
|
+
}, ke = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Ae = (e, t) => {
|
|
1409
|
+
let n = z[t];
|
|
1410
1410
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1411
|
-
},
|
|
1412
|
-
let n =
|
|
1411
|
+
}, B = (e, t) => {
|
|
1412
|
+
let n = Ae(e, t);
|
|
1413
1413
|
if (n === null) return null;
|
|
1414
|
-
let r = e.variants[t], i =
|
|
1414
|
+
let r = e.variants[t], i = Oe(r.options), a = ke(r.options);
|
|
1415
1415
|
return i <= 0 && a <= 0 ? null : {
|
|
1416
1416
|
from: n,
|
|
1417
1417
|
to: r.value,
|
|
@@ -1419,7 +1419,7 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1419
1419
|
delay: a,
|
|
1420
1420
|
ease: r.options?.ease
|
|
1421
1421
|
};
|
|
1422
|
-
},
|
|
1422
|
+
}, je = De, Me = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Ne = (e) => typeof e == "object" && !!e && !Array.isArray(e), Pe = new Set(/* @__PURE__ */ "opacity.scale.scaleX.scaleY.scaleZ.aspectRatio.columnCount.columns.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineHeight.lineClamp.order.orphans.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeWidth".split(".")), Fe = (e, t) => t.startsWith("--") || Pe.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, Ie = (e, t) => typeof t == "number" ? Fe(t, e) : typeof t == "string" ? t : "", Le = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Re = new Set([
|
|
1423
1423
|
"x",
|
|
1424
1424
|
"y",
|
|
1425
1425
|
"z",
|
|
@@ -1430,7 +1430,7 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1430
1430
|
"rotateX",
|
|
1431
1431
|
"rotateY",
|
|
1432
1432
|
"rotateZ"
|
|
1433
|
-
]),
|
|
1433
|
+
]), ze = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, Be = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, Ve = /^1(\.0+)?$/, He = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 ? !0 : typeof t == "string" ? Ve.test(t.trim()) : !1 : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 ? !0 : typeof t == "string" ? Be.test(t.trim()) : !1 : t === 0 ? !0 : typeof t == "string" ? ze.test(t.trim()) : !1, Ue = (e, t) => {
|
|
1434
1434
|
switch (e) {
|
|
1435
1435
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1436
1436
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1444,16 +1444,16 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1444
1444
|
case "rotateY": return `rotateY(${t})`;
|
|
1445
1445
|
default: return "";
|
|
1446
1446
|
}
|
|
1447
|
-
},
|
|
1447
|
+
}, We = (e) => {
|
|
1448
1448
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1449
|
-
if (!
|
|
1449
|
+
if (!Ne(e)) return;
|
|
1450
1450
|
let n = [];
|
|
1451
1451
|
for (let r of Object.keys(e)) {
|
|
1452
|
-
let i = e[r], a =
|
|
1453
|
-
if (a !== "") if (
|
|
1452
|
+
let i = e[r], a = Ie(r, i);
|
|
1453
|
+
if (a !== "") if (Re.has(r)) n.push(`${r}:${a}`);
|
|
1454
1454
|
else {
|
|
1455
|
-
let e = t.get(
|
|
1456
|
-
e.add(a), t.set(
|
|
1455
|
+
let e = t.get(Le(r)) ?? /* @__PURE__ */ new Set();
|
|
1456
|
+
e.add(a), t.set(Le(r), e);
|
|
1457
1457
|
}
|
|
1458
1458
|
}
|
|
1459
1459
|
r.add(n.sort().join("|"));
|
|
@@ -1463,13 +1463,13 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1463
1463
|
n = r.size > 1;
|
|
1464
1464
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1465
1465
|
return n && a.push("transform"), a;
|
|
1466
|
-
},
|
|
1467
|
-
if (!
|
|
1466
|
+
}, V = (e) => {
|
|
1467
|
+
if (!Ne(e)) return [];
|
|
1468
1468
|
let t = [], n = !0, r = [];
|
|
1469
1469
|
for (let i of Object.keys(e)) {
|
|
1470
|
-
let a = e[i], o =
|
|
1471
|
-
o !== "" && (
|
|
1472
|
-
property:
|
|
1470
|
+
let a = e[i], o = Ie(i, a);
|
|
1471
|
+
o !== "" && (Re.has(i) ? (t.push(Ue(i, o)), He(i, a) || (n = !1)) : r.push({
|
|
1472
|
+
property: Le(i),
|
|
1473
1473
|
value: o
|
|
1474
1474
|
}));
|
|
1475
1475
|
}
|
|
@@ -1477,7 +1477,7 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1477
1477
|
property: "transform",
|
|
1478
1478
|
value: n ? "none" : t.join(" ")
|
|
1479
1479
|
}), r;
|
|
1480
|
-
},
|
|
1480
|
+
}, H = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), U = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1481
1481
|
linear: "linear",
|
|
1482
1482
|
easeIn: "ease-in",
|
|
1483
1483
|
easeOut: "ease-out",
|
|
@@ -1487,29 +1487,29 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1487
1487
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1488
1488
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1489
1489
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1490
|
-
}[e] ?? "ease" : "ease",
|
|
1490
|
+
}[e] ?? "ease" : "ease", Ge = (e, t) => {
|
|
1491
1491
|
let [n, r] = t.split("-");
|
|
1492
1492
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1493
|
-
},
|
|
1493
|
+
}, Ke = (e, t) => {
|
|
1494
1494
|
let [n, r] = t.split("-");
|
|
1495
1495
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1496
|
-
},
|
|
1496
|
+
}, qe = (e, t) => {
|
|
1497
1497
|
let [n, r] = t.split("-");
|
|
1498
1498
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1499
|
-
},
|
|
1499
|
+
}, Je = (e, t) => {
|
|
1500
1500
|
let [n, r] = t.split("-");
|
|
1501
1501
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1502
|
-
},
|
|
1503
|
-
let o =
|
|
1502
|
+
}, W = (e, t, n) => `flemo-${e}-${Me(t)}-${n}`, Ye = (e, t, n, r, i, a) => {
|
|
1503
|
+
let o = V(r), s = V(i.value), c = Oe(i.options), l = ke(i.options), u = U(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${qe(t, n)}` : d;
|
|
1504
1504
|
if (s.length === 0 && o.length === 0) return "";
|
|
1505
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1506
|
-
let p =
|
|
1505
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${H(s)}\n animation: none;\n}`;
|
|
1506
|
+
let p = W(e, t, n), m = [
|
|
1507
1507
|
`@keyframes ${p} {`,
|
|
1508
1508
|
" from {",
|
|
1509
|
-
|
|
1509
|
+
H(o).replace(/^/gm, " "),
|
|
1510
1510
|
" }",
|
|
1511
1511
|
" to {",
|
|
1512
|
-
|
|
1512
|
+
H(s).replace(/^/gm, " "),
|
|
1513
1513
|
" }",
|
|
1514
1514
|
"}"
|
|
1515
1515
|
].join("\n"), h = [
|
|
@@ -1519,55 +1519,55 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1519
1519
|
l > 0 ? `${l}s` : null,
|
|
1520
1520
|
"both"
|
|
1521
1521
|
].filter(Boolean).join(" "), g = new Map(o.map((e) => [e.property, e.value])), _ = new Map(s.map((e) => [e.property, e.value])), v = Array.from(new Set([...g.keys(), ..._.keys()])).filter((e) => g.get(e) !== _.get(e)), y = v.length > 0 ? ` will-change: ${v.join(", ")};\n` : "", b = n.split("-")[0];
|
|
1522
|
-
return `${m}\n${`${f} {\n animation: ${h};\n${y}${b === "PUSHING" || b === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}${e === "screen" && n.endsWith("-false") &&
|
|
1523
|
-
},
|
|
1522
|
+
return `${m}\n${`${f} {\n animation: ${h};\n${y}${b === "PUSHING" || b === "REPLACING" ? " contain: layout;\n pointer-events: none;\n" : ""}}`}${e === "screen" && n.endsWith("-false") && Xe(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${H(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && Xe(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${H(s)}\n}` : ""}`;
|
|
1523
|
+
}, Xe = (e) => {
|
|
1524
1524
|
if (!e) return !1;
|
|
1525
1525
|
if (e.opacity === 0) return !0;
|
|
1526
1526
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1527
1527
|
return t(e.x) || t(e.y);
|
|
1528
|
-
},
|
|
1529
|
-
let i =
|
|
1530
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1531
|
-
},
|
|
1528
|
+
}, Ze = (e, t, n, r) => {
|
|
1529
|
+
let i = V(r.value);
|
|
1530
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${H(i)}\n}`;
|
|
1531
|
+
}, Qe = (e, t, n = []) => {
|
|
1532
1532
|
let r = [];
|
|
1533
1533
|
for (let t of e) {
|
|
1534
1534
|
let e = t.name;
|
|
1535
|
-
for (let n of
|
|
1536
|
-
let i = t.variants[n], a =
|
|
1535
|
+
for (let n of De) {
|
|
1536
|
+
let i = t.variants[n], a = z[n];
|
|
1537
1537
|
if (a === "self") {
|
|
1538
|
-
r.push(
|
|
1538
|
+
r.push(Ze(Ge, e, n, i));
|
|
1539
1539
|
continue;
|
|
1540
1540
|
}
|
|
1541
1541
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1542
|
-
r.push(
|
|
1542
|
+
r.push(Ye("screen", e, n, o, i, Ge));
|
|
1543
1543
|
}
|
|
1544
1544
|
}
|
|
1545
1545
|
for (let e of t) {
|
|
1546
1546
|
let t = e.name;
|
|
1547
|
-
for (let n of
|
|
1548
|
-
let i = e.variants[n], a =
|
|
1547
|
+
for (let n of je) {
|
|
1548
|
+
let i = e.variants[n], a = z[n];
|
|
1549
1549
|
if (a === "self") {
|
|
1550
|
-
r.push(
|
|
1550
|
+
r.push(Ze(Ke, t, n, i));
|
|
1551
1551
|
continue;
|
|
1552
1552
|
}
|
|
1553
1553
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1554
|
-
r.push(
|
|
1554
|
+
r.push(Ye("decorator", t, n, o, i, Ke));
|
|
1555
1555
|
}
|
|
1556
1556
|
}
|
|
1557
1557
|
for (let e of n) {
|
|
1558
1558
|
let t = e.name;
|
|
1559
|
-
for (let n of
|
|
1560
|
-
let i = e.variants[n], a =
|
|
1559
|
+
for (let n of je) {
|
|
1560
|
+
let i = e.variants[n], a = z[n];
|
|
1561
1561
|
if (a === "self") {
|
|
1562
|
-
r.push(
|
|
1562
|
+
r.push(Ze(Je, t, n, i));
|
|
1563
1563
|
continue;
|
|
1564
1564
|
}
|
|
1565
1565
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1566
|
-
r.push(
|
|
1566
|
+
r.push(Ye("part", t, n, o, i, Je));
|
|
1567
1567
|
}
|
|
1568
1568
|
}
|
|
1569
|
-
return [...r.filter((e) => e.length > 0),
|
|
1570
|
-
},
|
|
1569
|
+
return [...r.filter((e) => e.length > 0), $e].join("\n\n");
|
|
1570
|
+
}, $e = [
|
|
1571
1571
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1572
1572
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1573
1573
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1576,41 +1576,41 @@ var F = /* @__PURE__ */ new Map(), I = {
|
|
|
1576
1576
|
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name] {",
|
|
1577
1577
|
" animation-play-state: paused !important;",
|
|
1578
1578
|
"}"
|
|
1579
|
-
].join("\n"),
|
|
1580
|
-
let n =
|
|
1579
|
+
].join("\n"), G = (e, t) => {
|
|
1580
|
+
let n = z[t];
|
|
1581
1581
|
if (n === "self") return !1;
|
|
1582
|
-
let r = e.variants[t], i =
|
|
1582
|
+
let r = e.variants[t], i = Oe(r.options), a = ke(r.options);
|
|
1583
1583
|
if (i <= 0 && a <= 0) return !1;
|
|
1584
|
-
let o =
|
|
1584
|
+
let o = V(n === "initial" ? e.initial : e.variants[n].value), s = V(r.value);
|
|
1585
1585
|
return o.length > 0 || s.length > 0;
|
|
1586
|
-
},
|
|
1587
|
-
function
|
|
1586
|
+
}, et = "data-flemo";
|
|
1587
|
+
function tt() {
|
|
1588
1588
|
if (d()) return;
|
|
1589
|
-
let e =
|
|
1590
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1589
|
+
let e = Qe(P.values(), L.values(), R.values()), t = document.head.querySelector(`style[${et}]`);
|
|
1590
|
+
t || (t = document.createElement("style"), t.setAttribute(et, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1591
1591
|
}
|
|
1592
1592
|
//#endregion
|
|
1593
1593
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1594
|
-
var
|
|
1594
|
+
var nt = /* @__PURE__ */ new Map(), rt = /* @__PURE__ */ new Map(), it = /* @__PURE__ */ new Map(), at = (e, t) => {
|
|
1595
1595
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1596
|
-
},
|
|
1596
|
+
}, ot = (e, t) => {
|
|
1597
1597
|
let n = (e.get(t) ?? 1) - 1;
|
|
1598
1598
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1599
1599
|
};
|
|
1600
|
-
function
|
|
1601
|
-
for (let t of e)
|
|
1602
|
-
for (let e of t)
|
|
1603
|
-
for (let e of n)
|
|
1604
|
-
return
|
|
1605
|
-
for (let t of e)
|
|
1606
|
-
for (let e of t)
|
|
1607
|
-
for (let e of n)
|
|
1608
|
-
|
|
1600
|
+
function st(e, t, n = []) {
|
|
1601
|
+
for (let t of e) P.set(t.name, t), at(nt, t.name);
|
|
1602
|
+
for (let e of t) L.set(e.name, e), at(rt, e.name);
|
|
1603
|
+
for (let e of n) R.set(e.name, e), at(it, e.name);
|
|
1604
|
+
return tt(), () => {
|
|
1605
|
+
for (let t of e) ot(nt, t.name) && P.delete(t.name);
|
|
1606
|
+
for (let e of t) ot(rt, e.name) && L.delete(e.name);
|
|
1607
|
+
for (let e of n) ot(it, e.name) && R.delete(e.name);
|
|
1608
|
+
tt();
|
|
1609
1609
|
};
|
|
1610
1610
|
}
|
|
1611
1611
|
//#endregion
|
|
1612
1612
|
//#region src/transition/enteringInitialStyle.ts
|
|
1613
|
-
function
|
|
1613
|
+
function ct(e) {
|
|
1614
1614
|
let { initial: t, isActive: n, status: r } = e;
|
|
1615
1615
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1616
1616
|
let i = {};
|
|
@@ -1618,10 +1618,10 @@ function dt(e) {
|
|
|
1618
1618
|
}
|
|
1619
1619
|
//#endregion
|
|
1620
1620
|
//#region src/transition/settleScrub.ts
|
|
1621
|
-
var
|
|
1621
|
+
var lt = () => ({
|
|
1622
1622
|
request: (e) => requestAnimationFrame(e),
|
|
1623
1623
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1624
|
-
}),
|
|
1624
|
+
}), ut = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), dt = ((e = lt()) => {
|
|
1625
1625
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1626
1626
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1627
1627
|
}, i = (e, n) => {
|
|
@@ -1654,7 +1654,7 @@ var ft = () => ({
|
|
|
1654
1654
|
if (typeof r.animate != "function") return null;
|
|
1655
1655
|
i(r, "current");
|
|
1656
1656
|
let l = {};
|
|
1657
|
-
for (let e of o) l[
|
|
1657
|
+
for (let e of o) l[ut(e.property)] = e.value;
|
|
1658
1658
|
let u;
|
|
1659
1659
|
try {
|
|
1660
1660
|
u = r.animate([l], {
|
|
@@ -1684,49 +1684,49 @@ var ft = () => ({
|
|
|
1684
1684
|
takeover: (e) => i(e, "current"),
|
|
1685
1685
|
cancel: (e) => i(e, "drop")
|
|
1686
1686
|
};
|
|
1687
|
-
})(),
|
|
1687
|
+
})(), ft = "flemo:motion-driver", pt = "flemo:motion-driver-force", mt = !1, ht = () => {
|
|
1688
1688
|
try {
|
|
1689
1689
|
if (typeof localStorage > "u") return null;
|
|
1690
|
-
let e = localStorage.getItem(
|
|
1691
|
-
return e !== "css" && e !== "raf" ? null : (!
|
|
1690
|
+
let e = localStorage.getItem(pt);
|
|
1691
|
+
return e !== "css" && e !== "raf" ? null : (!mt && typeof console < "u" && (mt = !0, console.warn(`[flemo] motion driver pinned to "${e}" via localStorage ${pt}; remove the key to restore automatic selection.`)), e);
|
|
1692
1692
|
} catch {
|
|
1693
1693
|
return null;
|
|
1694
1694
|
}
|
|
1695
|
-
},
|
|
1695
|
+
}, gt = () => ({
|
|
1696
1696
|
read: () => {
|
|
1697
1697
|
try {
|
|
1698
|
-
return typeof localStorage < "u" ? localStorage.getItem(
|
|
1698
|
+
return typeof localStorage < "u" ? localStorage.getItem(ft) : null;
|
|
1699
1699
|
} catch {
|
|
1700
1700
|
return null;
|
|
1701
1701
|
}
|
|
1702
1702
|
},
|
|
1703
1703
|
write: (e) => {
|
|
1704
1704
|
try {
|
|
1705
|
-
typeof localStorage < "u" && localStorage.setItem(
|
|
1705
|
+
typeof localStorage < "u" && localStorage.setItem(ft, e);
|
|
1706
1706
|
} catch {}
|
|
1707
1707
|
}
|
|
1708
|
-
}),
|
|
1708
|
+
}), _t = 30, vt = 2, yt = 2, bt = () => typeof navigator < "u" && !!navigator.userAgentData, K = ((e = gt(), t = bt()) => {
|
|
1709
1709
|
let n = e.read() === "css", r = n;
|
|
1710
1710
|
n &&= !1;
|
|
1711
1711
|
let i = 0, a = 0, o = [];
|
|
1712
1712
|
return {
|
|
1713
1713
|
playerAllowed: () => {
|
|
1714
|
-
let e =
|
|
1714
|
+
let e = ht();
|
|
1715
1715
|
return e ? e === "raf" : t && !n;
|
|
1716
1716
|
},
|
|
1717
1717
|
beginRun: () => {
|
|
1718
1718
|
a = 0, o = [];
|
|
1719
1719
|
},
|
|
1720
1720
|
reportGap: (e) => {
|
|
1721
|
-
o.push(e), e >=
|
|
1721
|
+
o.push(e), e >= _t && (a += 1);
|
|
1722
1722
|
},
|
|
1723
1723
|
endRun: () => {
|
|
1724
|
-
let t = a >=
|
|
1724
|
+
let t = a >= vt;
|
|
1725
1725
|
if (r) {
|
|
1726
1726
|
r = !1, t ? n = !0 : e.write("raf");
|
|
1727
1727
|
return;
|
|
1728
1728
|
}
|
|
1729
|
-
t && (i += 1, i >=
|
|
1729
|
+
t && (i += 1, i >= yt && !n && (n = !0, e.write("css")));
|
|
1730
1730
|
},
|
|
1731
1731
|
stats: () => ({
|
|
1732
1732
|
runGaps: [...o],
|
|
@@ -1734,43 +1734,43 @@ var ft = () => ({
|
|
|
1734
1734
|
demoted: n
|
|
1735
1735
|
})
|
|
1736
1736
|
};
|
|
1737
|
-
})(),
|
|
1738
|
-
let n =
|
|
1739
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1740
|
-
},
|
|
1741
|
-
if (
|
|
1742
|
-
let n =
|
|
1737
|
+
})(), xt = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, q = /* @__PURE__ */ new WeakMap(), J = (e, t) => {
|
|
1738
|
+
let n = q.get(e);
|
|
1739
|
+
n || (n = /* @__PURE__ */ new Set(), q.set(e, n)), n.add(t);
|
|
1740
|
+
}, Y = (e, t) => {
|
|
1741
|
+
if (dt.cancel(e), e.style.transition = "", e.style.removeProperty("animation-delay"), t) {
|
|
1742
|
+
let n = q.get(e);
|
|
1743
1743
|
for (let r of t) e.style.removeProperty(r), n?.delete(r);
|
|
1744
1744
|
return;
|
|
1745
1745
|
}
|
|
1746
|
-
let n =
|
|
1746
|
+
let n = q.get(e);
|
|
1747
1747
|
if (n && n.size > 0) {
|
|
1748
1748
|
for (let t of n) e.style.removeProperty(t);
|
|
1749
1749
|
n.clear();
|
|
1750
1750
|
return;
|
|
1751
1751
|
}
|
|
1752
1752
|
e.style.removeProperty("transform"), e.style.removeProperty("opacity");
|
|
1753
|
-
},
|
|
1754
|
-
if (!
|
|
1755
|
-
let r = e, i =
|
|
1753
|
+
}, X = (e, t, n = {}) => {
|
|
1754
|
+
if (!xt(e)) return Promise.resolve();
|
|
1755
|
+
let r = e, i = V(t);
|
|
1756
1756
|
if (i.length === 0) return Promise.resolve();
|
|
1757
|
-
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s =
|
|
1757
|
+
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s = U(n.ease);
|
|
1758
1758
|
if (a <= 0 && o <= 0) {
|
|
1759
|
-
|
|
1760
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1759
|
+
dt.takeover(r), r.style.transition = "none";
|
|
1760
|
+
for (let e of i) r.style.setProperty(e.property, e.value), J(r, e.property);
|
|
1761
1761
|
return Promise.resolve();
|
|
1762
1762
|
}
|
|
1763
|
-
let c =
|
|
1763
|
+
let c = K.playerAllowed() ? dt.settle(r, i, {
|
|
1764
1764
|
durationMs: a * 1e3,
|
|
1765
1765
|
delayMs: o * 1e3,
|
|
1766
1766
|
easing: s
|
|
1767
1767
|
}, (e) => {
|
|
1768
|
-
r.style.setProperty(e.property, e.value),
|
|
1768
|
+
r.style.setProperty(e.property, e.value), J(r, e.property);
|
|
1769
1769
|
}) : null;
|
|
1770
1770
|
if (c) return c;
|
|
1771
1771
|
let l = i.map((e) => `${e.property} ${a}s ${s} ${o}s`).join(", ");
|
|
1772
1772
|
r.style.transition = l, r.offsetWidth;
|
|
1773
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1773
|
+
for (let e of i) r.style.setProperty(e.property, e.value), J(r, e.property);
|
|
1774
1774
|
return new Promise((e) => {
|
|
1775
1775
|
let t = !1, n = () => {
|
|
1776
1776
|
t || (t = !0, r.removeEventListener("transitionend", i), e());
|
|
@@ -1779,7 +1779,7 @@ var ft = () => ({
|
|
|
1779
1779
|
};
|
|
1780
1780
|
r.addEventListener("transitionend", i), setTimeout(n, (a + o) * 1e3 + 60);
|
|
1781
1781
|
});
|
|
1782
|
-
},
|
|
1782
|
+
}, St = (e, t, n, r) => {
|
|
1783
1783
|
let i = (t) => 3 * (1 - t) * (1 - t) * t * e + 3 * (1 - t) * t * t * n + t ** 3, a = (e) => 3 * (1 - e) * (1 - e) * e * t + 3 * (1 - e) * e * e * r + e ** 3;
|
|
1784
1784
|
return (e) => {
|
|
1785
1785
|
if (e <= 0) return 0;
|
|
@@ -1791,7 +1791,7 @@ var ft = () => ({
|
|
|
1791
1791
|
}
|
|
1792
1792
|
return a((t + n) / 2);
|
|
1793
1793
|
};
|
|
1794
|
-
},
|
|
1794
|
+
}, Ct = (e) => e, wt = {
|
|
1795
1795
|
ease: [
|
|
1796
1796
|
.25,
|
|
1797
1797
|
.1,
|
|
@@ -1846,16 +1846,16 @@ var ft = () => ({
|
|
|
1846
1846
|
.66,
|
|
1847
1847
|
-.56
|
|
1848
1848
|
]
|
|
1849
|
-
},
|
|
1849
|
+
}, Tt = (e) => {
|
|
1850
1850
|
if (Array.isArray(e)) {
|
|
1851
1851
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
1852
1852
|
let [t, n, r, i] = e;
|
|
1853
|
-
return
|
|
1853
|
+
return St(t, n, r, i);
|
|
1854
1854
|
}
|
|
1855
|
-
return
|
|
1855
|
+
return Ct;
|
|
1856
1856
|
}
|
|
1857
|
-
return typeof e == "string" ? e === "linear" ?
|
|
1858
|
-
},
|
|
1857
|
+
return typeof e == "string" ? e === "linear" ? Ct : St(...wt[e] ?? wt.ease) : St(...wt.ease);
|
|
1858
|
+
}, Et = [
|
|
1859
1859
|
"x",
|
|
1860
1860
|
"y",
|
|
1861
1861
|
"z",
|
|
@@ -1866,7 +1866,7 @@ var ft = () => ({
|
|
|
1866
1866
|
"rotateX",
|
|
1867
1867
|
"rotateY",
|
|
1868
1868
|
"rotateZ"
|
|
1869
|
-
],
|
|
1869
|
+
], Dt = new Set(Et), Ot = {
|
|
1870
1870
|
x: 0,
|
|
1871
1871
|
y: 0,
|
|
1872
1872
|
z: 0,
|
|
@@ -1877,7 +1877,7 @@ var ft = () => ({
|
|
|
1877
1877
|
rotateX: 0,
|
|
1878
1878
|
rotateY: 0,
|
|
1879
1879
|
rotateZ: 0
|
|
1880
|
-
},
|
|
1880
|
+
}, kt = (e, t) => {
|
|
1881
1881
|
if (typeof t == "number") return {
|
|
1882
1882
|
value: t,
|
|
1883
1883
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -1896,26 +1896,26 @@ var ft = () => ({
|
|
|
1896
1896
|
value: i,
|
|
1897
1897
|
unit: a === "" && i === 0 ? "px" : a
|
|
1898
1898
|
};
|
|
1899
|
-
},
|
|
1900
|
-
let n = e.match(
|
|
1901
|
-
if (n.length !== r.length || e.replace(
|
|
1899
|
+
}, Z = /-?\d*\.?\d+/g, At = (e, t) => {
|
|
1900
|
+
let n = e.match(Z) ?? [], r = t.match(Z) ?? [];
|
|
1901
|
+
if (n.length !== r.length || e.replace(Z, " ") !== t.replace(Z, " ")) return null;
|
|
1902
1902
|
let i = n.map(Number), a = r.map(Number);
|
|
1903
1903
|
return (t) => {
|
|
1904
1904
|
let n = 0;
|
|
1905
|
-
return e.replace(
|
|
1905
|
+
return e.replace(Z, () => {
|
|
1906
1906
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
1907
1907
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
1908
1908
|
});
|
|
1909
1909
|
};
|
|
1910
|
-
},
|
|
1911
|
-
let n = new Set([...
|
|
1910
|
+
}, jt = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Mt = (e) => typeof e == "object" && !!e && !Array.isArray(e), Nt = (e) => Mt(e) ? Object.keys(e) : [], Pt = (e, t) => Mt(e) ? e[t] : void 0, Ft = (e, t) => {
|
|
1911
|
+
let n = new Set([...Nt(e.from), ...Nt(e.to)]), r = [], i = null, a = [], o = [];
|
|
1912
1912
|
for (let s of n) {
|
|
1913
|
-
let n =
|
|
1914
|
-
if (
|
|
1913
|
+
let n = Pt(e.from, s), c = Pt(e.to, s);
|
|
1914
|
+
if (Dt.has(s)) {
|
|
1915
1915
|
let e = s, i = {
|
|
1916
|
-
value:
|
|
1916
|
+
value: Ot[e],
|
|
1917
1917
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
1918
|
-
}, a = n === void 0 ? i :
|
|
1918
|
+
}, a = n === void 0 ? i : kt(e, n), o = c === void 0 ? i : kt(e, c);
|
|
1919
1919
|
if (!a || !o || a.unit !== o.unit && a.value !== 0 && o.value !== 0) return null;
|
|
1920
1920
|
let l = a.value === 0 && a.unit !== o.unit ? o.unit : a.unit, u = l === "%", d = 0;
|
|
1921
1921
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), r.push({
|
|
@@ -1946,15 +1946,15 @@ var ft = () => ({
|
|
|
1946
1946
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
1947
1947
|
if (l === u) {
|
|
1948
1948
|
o.push({
|
|
1949
|
-
property:
|
|
1949
|
+
property: jt(s),
|
|
1950
1950
|
value: l
|
|
1951
1951
|
});
|
|
1952
1952
|
continue;
|
|
1953
1953
|
}
|
|
1954
|
-
let d =
|
|
1954
|
+
let d = At(l, u);
|
|
1955
1955
|
if (!d) return null;
|
|
1956
1956
|
a.push({
|
|
1957
|
-
property:
|
|
1957
|
+
property: jt(s),
|
|
1958
1958
|
mix: d
|
|
1959
1959
|
});
|
|
1960
1960
|
}
|
|
@@ -1964,46 +1964,46 @@ var ft = () => ({
|
|
|
1964
1964
|
strings: a,
|
|
1965
1965
|
constants: o
|
|
1966
1966
|
};
|
|
1967
|
-
},
|
|
1967
|
+
}, It = 1, Lt = (e, t, n, r) => {
|
|
1968
1968
|
let i = 0, a = 0, o = !1, s = [], c = !0;
|
|
1969
|
-
for (let l of
|
|
1969
|
+
for (let l of Et) {
|
|
1970
1970
|
let u = e.find((e) => e.prop === l);
|
|
1971
1971
|
if (!u) continue;
|
|
1972
1972
|
let d = u.from.value + (u.to.value - u.from.value) * t;
|
|
1973
1973
|
if (u.from.unit === "%" && (d *= u.percentBase), l === "x" || l === "y") {
|
|
1974
|
-
let e = l === "x" ? r.x : r.y, t = (e === null || Math.abs(d - e) * n >=
|
|
1974
|
+
let e = l === "x" ? r.x : r.y, t = (e === null || Math.abs(d - e) * n >= It) && n > 0 ? Math.round(d * n) / n : Math.round(d * 1e3) / 1e3;
|
|
1975
1975
|
l === "x" ? (r.x = d, i = t) : (r.y = d, a = t), o = !0, t !== 0 && (c = !1);
|
|
1976
1976
|
continue;
|
|
1977
1977
|
}
|
|
1978
|
-
let f =
|
|
1978
|
+
let f = Ot[l];
|
|
1979
1979
|
d !== f && (c = !1), l === "z" ? s.push(`translateZ(${d}px)`) : l === "scale" ? s.push(`scale(${d})`) : l === "scaleX" ? s.push(`scaleX(${d})`) : l === "scaleY" ? s.push(`scaleY(${d})`) : l === "rotate" || l === "rotateZ" ? s.push(`rotate(${d}deg)`) : l === "rotateX" ? s.push(`rotateX(${d}deg)`) : l === "rotateY" && s.push(`rotateY(${d}deg)`);
|
|
1980
1980
|
}
|
|
1981
1981
|
return !o && s.length === 0 ? "" : c ? "none" : [...o ? [`translate3d(${i}px, ${a}px, 0)`] : [], ...s].join(" ");
|
|
1982
|
-
},
|
|
1982
|
+
}, Rt = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), zt = (e) => {
|
|
1983
1983
|
let t = {};
|
|
1984
|
-
for (let n of
|
|
1984
|
+
for (let n of V(e)) t[Rt(n.property)] = n.value;
|
|
1985
1985
|
return t;
|
|
1986
|
-
},
|
|
1986
|
+
}, Bt = (e, t) => {
|
|
1987
1987
|
if (typeof e.animate != "function") return null;
|
|
1988
1988
|
try {
|
|
1989
|
-
let n = e.animate([
|
|
1989
|
+
let n = e.animate([zt(t.from), zt(t.to)], {
|
|
1990
1990
|
duration: Math.max(0, t.duration * 1e3),
|
|
1991
1991
|
delay: Math.max(0, t.delay * 1e3),
|
|
1992
|
-
easing:
|
|
1992
|
+
easing: U(t.ease),
|
|
1993
1993
|
fill: "both"
|
|
1994
1994
|
});
|
|
1995
1995
|
return n.pause(), n.currentTime = 0, n;
|
|
1996
1996
|
} catch {
|
|
1997
1997
|
return null;
|
|
1998
1998
|
}
|
|
1999
|
-
},
|
|
1999
|
+
}, Vt = () => ({
|
|
2000
2000
|
request: (e) => requestAnimationFrame(e),
|
|
2001
2001
|
cancel: (e) => cancelAnimationFrame(e),
|
|
2002
2002
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
2003
|
-
}),
|
|
2003
|
+
}), Q = ((e = Vt()) => {
|
|
2004
2004
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
2005
2005
|
join: (n, r) => {
|
|
2006
|
-
let i =
|
|
2006
|
+
let i = Ft(r.motion, r.element), s = i ? null : Bt(r.element, r.motion);
|
|
2007
2007
|
if (!i && !s) return null;
|
|
2008
2008
|
let c = t.get(n);
|
|
2009
2009
|
c || (c = {
|
|
@@ -2024,14 +2024,14 @@ var ft = () => ({
|
|
|
2024
2024
|
y: null
|
|
2025
2025
|
}
|
|
2026
2026
|
};
|
|
2027
|
-
if (c.tracks.push(l), l.element.style.animation = "none",
|
|
2028
|
-
i.transforms.length > 0 &&
|
|
2029
|
-
for (let e of i.strings)
|
|
2030
|
-
for (let e of i.constants)
|
|
2027
|
+
if (c.tracks.push(l), l.element.style.animation = "none", J(l.element, "animation"), i) {
|
|
2028
|
+
i.transforms.length > 0 && J(l.element, "transform"), i.opacity && J(l.element, "opacity");
|
|
2029
|
+
for (let e of i.strings) J(l.element, e.property);
|
|
2030
|
+
for (let e of i.constants) J(l.element, e.property);
|
|
2031
2031
|
a(l, 0);
|
|
2032
2032
|
}
|
|
2033
|
-
return r.role === "active" && !c.started && (c.started = !0,
|
|
2034
|
-
l.detached = !0, l.scrub?.cancel(),
|
|
2033
|
+
return r.role === "active" && !c.started && (c.started = !0, K.beginRun(), o(n, c)), () => {
|
|
2034
|
+
l.detached = !0, l.scrub?.cancel(), Y(l.element);
|
|
2035
2035
|
let r = t.get(n);
|
|
2036
2036
|
r && (r.tracks = r.tracks.filter((e) => e !== l), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
2037
2037
|
};
|
|
@@ -2046,13 +2046,13 @@ var ft = () => ({
|
|
|
2046
2046
|
}
|
|
2047
2047
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
2048
2048
|
let t = r.get(e);
|
|
2049
|
-
return t || (t =
|
|
2049
|
+
return t || (t = Tt(e.motion.ease), r.set(e, t)), t;
|
|
2050
2050
|
};
|
|
2051
2051
|
function a(t, n) {
|
|
2052
2052
|
let { element: r, parsed: i } = t;
|
|
2053
2053
|
if (!(!i || !r.isConnected)) {
|
|
2054
2054
|
if (i.transforms.length > 0) {
|
|
2055
|
-
let a =
|
|
2055
|
+
let a = Lt(i.transforms, n, e.devicePixelRatio(), t.snapMemory);
|
|
2056
2056
|
a !== "" && (r.style.transform = a);
|
|
2057
2057
|
}
|
|
2058
2058
|
if (i.opacity) {
|
|
@@ -2069,7 +2069,7 @@ var ft = () => ({
|
|
|
2069
2069
|
});
|
|
2070
2070
|
}
|
|
2071
2071
|
function s(e, r, s) {
|
|
2072
|
-
r.startTime === null && (r.startTime = s), r.lastTime !== null && (
|
|
2072
|
+
r.startTime === null && (r.startTime = s), r.lastTime !== null && (K.reportGap(s - r.lastTime), n.onFrameGap?.(s - r.lastTime)), r.lastTime = s;
|
|
2073
2073
|
let c = !0;
|
|
2074
2074
|
for (let e of r.tracks) {
|
|
2075
2075
|
if (e.completed || e.detached) continue;
|
|
@@ -2083,14 +2083,14 @@ var ft = () => ({
|
|
|
2083
2083
|
a(e, i(e)(l)), l >= 1 ? (e.completed = !0, e.onComplete?.()) : c = !1;
|
|
2084
2084
|
}
|
|
2085
2085
|
if (c) {
|
|
2086
|
-
|
|
2086
|
+
K.endRun(), t.delete(e);
|
|
2087
2087
|
return;
|
|
2088
2088
|
}
|
|
2089
2089
|
o(e, r);
|
|
2090
2090
|
}
|
|
2091
2091
|
return n;
|
|
2092
2092
|
})();
|
|
2093
|
-
|
|
2093
|
+
Q.onFrameGap = (e) => {
|
|
2094
2094
|
if (typeof window < "u") {
|
|
2095
2095
|
let t = window.__flemoPlayerGaps ??= [];
|
|
2096
2096
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -2098,142 +2098,237 @@ Y.onFrameGap = (e) => {
|
|
|
2098
2098
|
};
|
|
2099
2099
|
//#endregion
|
|
2100
2100
|
//#region src/core/engine/types.ts
|
|
2101
|
-
var
|
|
2101
|
+
var Ht = "data-flemo-skip-animation", $ = () => {}, Ut = "data-flemo-part-name", Wt = (e) => {
|
|
2102
2102
|
let t = e.parentElement ?? e;
|
|
2103
|
-
return Array.from(t.querySelectorAll(`[${
|
|
2103
|
+
return Array.from(t.querySelectorAll(`[${Ut}]`)).filter((n) => {
|
|
2104
2104
|
let r = n.closest("[data-flemo-screen]");
|
|
2105
2105
|
return !r || r === e || !t.contains(r);
|
|
2106
2106
|
});
|
|
2107
|
-
},
|
|
2107
|
+
}, Gt = (e, t) => {
|
|
2108
2108
|
let [n, r] = t.split("-");
|
|
2109
|
-
return
|
|
2109
|
+
return Wt(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
2110
|
+
}, Kt = 4, qt = (e) => `${Math.round(e * 1e3) / 1e3}s`, Jt = (e) => {
|
|
2111
|
+
let { element: t, expectedName: n, motion: r } = e, i = null, a = !1, o = (e) => {
|
|
2112
|
+
a = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), e.mode === "clear" ? t.style.removeProperty("animation-delay") : e.mode === "set" && (t.style.animationDelay = qt(e.seconds)), a = !1;
|
|
2113
|
+
}, s = (e) => {
|
|
2114
|
+
a || e.target !== t || e.animationName !== n || i === null && (i = performance.now());
|
|
2115
|
+
}, c = (s) => {
|
|
2116
|
+
if (a || s.target !== t || s.animationName !== n) return;
|
|
2117
|
+
if (!e.isLive() || e.budgetUsed() >= Kt) {
|
|
2118
|
+
e.onTerminal();
|
|
2119
|
+
return;
|
|
2120
|
+
}
|
|
2121
|
+
if (i === null) {
|
|
2122
|
+
e.spendBudget(), o({ mode: "keep" });
|
|
2123
|
+
return;
|
|
2124
|
+
}
|
|
2125
|
+
let c = performance.now() - i;
|
|
2126
|
+
if (c >= (r.delay + r.duration) * 1e3) {
|
|
2127
|
+
e.onTerminal();
|
|
2128
|
+
return;
|
|
2129
|
+
}
|
|
2130
|
+
e.spendBudget(), o({
|
|
2131
|
+
mode: "set",
|
|
2132
|
+
seconds: r.delay - c / 1e3
|
|
2133
|
+
});
|
|
2134
|
+
};
|
|
2135
|
+
return {
|
|
2136
|
+
attach: () => {
|
|
2137
|
+
t.addEventListener("animationstart", s), t.addEventListener("animationcancel", c);
|
|
2138
|
+
},
|
|
2139
|
+
detach: () => {
|
|
2140
|
+
t.removeEventListener("animationstart", s), t.removeEventListener("animationcancel", c);
|
|
2141
|
+
},
|
|
2142
|
+
fullRestart: () => {
|
|
2143
|
+
i = null, o({ mode: "clear" });
|
|
2144
|
+
}
|
|
2145
|
+
};
|
|
2110
2146
|
};
|
|
2111
|
-
function
|
|
2112
|
-
let t = /* @__PURE__ */ new
|
|
2113
|
-
return {
|
|
2114
|
-
|
|
2115
|
-
let s =
|
|
2116
|
-
|
|
2117
|
-
|
|
2118
|
-
|
|
2119
|
-
|
|
2120
|
-
|
|
2121
|
-
|
|
2122
|
-
|
|
2123
|
-
|
|
2124
|
-
role: n,
|
|
2125
|
-
onComplete: a
|
|
2126
|
-
});
|
|
2127
|
-
if (!m) return null;
|
|
2128
|
-
p.push(m);
|
|
2129
|
-
for (let e of u ?? []) {
|
|
2130
|
-
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2131
|
-
let t = Y.join(s, {
|
|
2132
|
-
element: e,
|
|
2147
|
+
function Yt(e) {
|
|
2148
|
+
let t = /* @__PURE__ */ new Map();
|
|
2149
|
+
return {
|
|
2150
|
+
driveScreenLifecycle: (n) => {
|
|
2151
|
+
let { getElements: r, transitionName: i, prevTransitionName: a, status: s, isActive: c, animHoldReleased: l } = n, u = s === "PUSHING" || s === "POPPING" || s === "REPLACING", d = (t, n, a) => {
|
|
2152
|
+
let s = e.getTransitionTaskId();
|
|
2153
|
+
if (!s || o.pendingTaskIds.some((e) => e !== s) || !K.playerAllowed()) return null;
|
|
2154
|
+
let { scope: c, decorator: l, bars: u } = r();
|
|
2155
|
+
if (!c) return null;
|
|
2156
|
+
let d = F(i), f = B(d, t);
|
|
2157
|
+
if (!f) return null;
|
|
2158
|
+
let p = [], m = Q.join(s, {
|
|
2159
|
+
element: c,
|
|
2133
2160
|
motion: f,
|
|
2134
|
-
role:
|
|
2161
|
+
role: n,
|
|
2162
|
+
onComplete: a
|
|
2135
2163
|
});
|
|
2136
|
-
|
|
2137
|
-
|
|
2138
|
-
|
|
2139
|
-
|
|
2140
|
-
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
motion: n,
|
|
2164
|
+
if (!m) return null;
|
|
2165
|
+
p.push(m);
|
|
2166
|
+
for (let e of u ?? []) {
|
|
2167
|
+
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2168
|
+
let t = Q.join(s, {
|
|
2169
|
+
element: e,
|
|
2170
|
+
motion: f,
|
|
2144
2171
|
role: "passive"
|
|
2145
2172
|
});
|
|
2146
|
-
|
|
2173
|
+
t && p.push(t);
|
|
2147
2174
|
}
|
|
2175
|
+
if (l && d.decoratorName) {
|
|
2176
|
+
let e = L.get(d.decoratorName), n = e ? B(e, t) : null;
|
|
2177
|
+
if (n) {
|
|
2178
|
+
let e = Q.join(s, {
|
|
2179
|
+
element: l,
|
|
2180
|
+
motion: n,
|
|
2181
|
+
role: "passive"
|
|
2182
|
+
});
|
|
2183
|
+
e && p.push(e);
|
|
2184
|
+
}
|
|
2185
|
+
}
|
|
2186
|
+
for (let e of Gt(c, t)) {
|
|
2187
|
+
let n = R.get(e.getAttribute(Ut)), r = n ? B(n, t) : null;
|
|
2188
|
+
if (!r) continue;
|
|
2189
|
+
let i = Q.join(s, {
|
|
2190
|
+
element: e,
|
|
2191
|
+
motion: r,
|
|
2192
|
+
role: "passive"
|
|
2193
|
+
});
|
|
2194
|
+
i && p.push(i);
|
|
2195
|
+
}
|
|
2196
|
+
return () => p.forEach((e) => e());
|
|
2197
|
+
}, f = (e, t) => {
|
|
2198
|
+
let n = [], { decorator: a, bars: o } = r(), s = F(i), c = (e, t, r) => {
|
|
2199
|
+
let i = 0, a = Jt({
|
|
2200
|
+
element: e,
|
|
2201
|
+
expectedName: t,
|
|
2202
|
+
motion: r,
|
|
2203
|
+
isLive: () => e.isConnected,
|
|
2204
|
+
budgetUsed: () => i,
|
|
2205
|
+
spendBudget: () => {
|
|
2206
|
+
i += 1;
|
|
2207
|
+
},
|
|
2208
|
+
onTerminal: $
|
|
2209
|
+
});
|
|
2210
|
+
a.attach(), n.push(a.detach);
|
|
2211
|
+
}, l = W("screen", i, t), u = B(s, t);
|
|
2212
|
+
if (u) for (let e of o ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || c(e, l, u);
|
|
2213
|
+
if (a && s.decoratorName) {
|
|
2214
|
+
let e = L.get(s.decoratorName), n = e ? B(e, t) : null;
|
|
2215
|
+
n && c(a, W("decorator", s.decoratorName, t), n);
|
|
2216
|
+
}
|
|
2217
|
+
for (let n of Gt(e, t)) {
|
|
2218
|
+
let e = n.getAttribute(Ut), r = R.get(e), i = r ? B(r, t) : null;
|
|
2219
|
+
i && c(n, W("part", e, t), i);
|
|
2220
|
+
}
|
|
2221
|
+
return n;
|
|
2222
|
+
};
|
|
2223
|
+
if (!c) {
|
|
2224
|
+
if (s === "COMPLETED") {
|
|
2225
|
+
let { scope: e, decorator: t, bars: n } = r();
|
|
2226
|
+
if (e) {
|
|
2227
|
+
Y(e);
|
|
2228
|
+
for (let t of Wt(e)) Y(t);
|
|
2229
|
+
}
|
|
2230
|
+
t && Y(t);
|
|
2231
|
+
for (let e of n ?? []) e && Y(e);
|
|
2232
|
+
return $;
|
|
2233
|
+
}
|
|
2234
|
+
if (s === "REPLACING" && a !== i && e.setReplaceTransitionStatus("PENDING"), u && l) {
|
|
2235
|
+
let e = `${s}-false`, t = d(e, "passive");
|
|
2236
|
+
if (t) return t;
|
|
2237
|
+
let { scope: n } = r();
|
|
2238
|
+
if (n) {
|
|
2239
|
+
let t = F(i), r = [];
|
|
2240
|
+
if (G(t, e)) {
|
|
2241
|
+
let a = B(t, e), o = 0, s = Jt({
|
|
2242
|
+
element: n,
|
|
2243
|
+
expectedName: W("screen", i, e),
|
|
2244
|
+
motion: a,
|
|
2245
|
+
isLive: () => n.isConnected && n.getAttribute("data-flemo-skip-animation") !== "true",
|
|
2246
|
+
budgetUsed: () => o,
|
|
2247
|
+
spendBudget: () => {
|
|
2248
|
+
o += 1;
|
|
2249
|
+
},
|
|
2250
|
+
onTerminal: $
|
|
2251
|
+
});
|
|
2252
|
+
s.attach(), r.push(s.detach);
|
|
2253
|
+
}
|
|
2254
|
+
if (r.push(...f(n, e)), r.length > 0) return () => r.forEach((e) => e());
|
|
2255
|
+
}
|
|
2256
|
+
}
|
|
2257
|
+
return $;
|
|
2148
2258
|
}
|
|
2149
|
-
for (let e of Kt(c, t)) {
|
|
2150
|
-
let n = F.get(e.getAttribute(Gt)), r = n ? R(n, t) : null;
|
|
2151
|
-
if (!r) continue;
|
|
2152
|
-
let i = Y.join(s, {
|
|
2153
|
-
element: e,
|
|
2154
|
-
motion: r,
|
|
2155
|
-
role: "passive"
|
|
2156
|
-
});
|
|
2157
|
-
i && p.push(i);
|
|
2158
|
-
}
|
|
2159
|
-
return () => p.forEach((e) => e());
|
|
2160
|
-
};
|
|
2161
|
-
if (!c) {
|
|
2162
2259
|
if (s === "COMPLETED") {
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2260
|
+
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
2261
|
+
let { scope: t, decorator: n, bars: i } = r();
|
|
2262
|
+
if (t) {
|
|
2263
|
+
Y(t), t.removeAttribute(Ht);
|
|
2264
|
+
for (let e of Wt(t)) Y(e);
|
|
2167
2265
|
}
|
|
2168
|
-
|
|
2169
|
-
for (let e of
|
|
2170
|
-
return
|
|
2266
|
+
n && (Y(n), n.removeAttribute(Ht));
|
|
2267
|
+
for (let e of i ?? []) e && (Y(e), e.style.removeProperty("will-change"));
|
|
2268
|
+
return $;
|
|
2171
2269
|
}
|
|
2172
|
-
if (s === "
|
|
2173
|
-
|
|
2174
|
-
|
|
2175
|
-
|
|
2176
|
-
|
|
2177
|
-
|
|
2178
|
-
|
|
2179
|
-
|
|
2180
|
-
let
|
|
2181
|
-
|
|
2182
|
-
|
|
2183
|
-
|
|
2184
|
-
}
|
|
2185
|
-
|
|
2186
|
-
|
|
2187
|
-
|
|
2188
|
-
|
|
2189
|
-
|
|
2190
|
-
|
|
2191
|
-
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
let C = v && l ? d(h, "active", p) : null, w = e.getTransitionTaskId(), T = (_.delay + _.duration) * 1e3, E = T + 1500, D = w ? setTimeout(() => void o.resolveTask(w), E) : void 0, ee = T + 250, te = () => {
|
|
2204
|
-
x(), b = setTimeout(O, ee);
|
|
2205
|
-
}, O = () => {
|
|
2206
|
-
if (x(), w) {
|
|
2207
|
-
if (e.getTransitionTaskId() === w && f.isConnected && f.getAttribute("data-flemo-skip-animation") !== "true" && nt(m, h) && !t.has(w)) {
|
|
2208
|
-
t.add(w), f.style.animation = "none", f.offsetWidth, f.style.removeProperty("animation"), te();
|
|
2270
|
+
if (s === "IDLE") return $;
|
|
2271
|
+
let { scope: p } = r();
|
|
2272
|
+
if (!p) return $;
|
|
2273
|
+
let m = e.getTransitionTaskId(), h = () => {
|
|
2274
|
+
let n = e.getTransitionTaskId();
|
|
2275
|
+
n && o.resolveTask(n), m && t.delete(m);
|
|
2276
|
+
}, g = F(i), _ = `${s}-true`, v = p.getAttribute(Ht) === "true";
|
|
2277
|
+
if (!(!v && G(g, _))) return queueMicrotask(h), $;
|
|
2278
|
+
let y = B(g, _), b = !v && !!y, x = W("screen", i, _), S, C = () => {
|
|
2279
|
+
S !== void 0 && (clearTimeout(S), S = void 0);
|
|
2280
|
+
}, w = $, T = (e) => {
|
|
2281
|
+
e.target === p && e.animationName === x && (p.removeEventListener("animationend", T), C(), w(), h());
|
|
2282
|
+
};
|
|
2283
|
+
p.addEventListener("animationend", T);
|
|
2284
|
+
let E = b && l ? d(_, "active", h) : null, D = (y.delay + y.duration) * 1e3, ee = D + 1500, te = m ? setTimeout(() => void o.resolveTask(m), ee) : void 0, ne = D + 250, O = () => m !== null && e.getTransitionTaskId() === m && p.isConnected && p.getAttribute("data-flemo-skip-animation") !== "true" && G(g, _), k = Jt({
|
|
2285
|
+
element: p,
|
|
2286
|
+
expectedName: x,
|
|
2287
|
+
motion: y,
|
|
2288
|
+
isLive: O,
|
|
2289
|
+
budgetUsed: () => t.get(m) ?? 0,
|
|
2290
|
+
spendBudget: () => {
|
|
2291
|
+
t.set(m, (t.get(m) ?? 0) + 1);
|
|
2292
|
+
},
|
|
2293
|
+
onTerminal: h
|
|
2294
|
+
});
|
|
2295
|
+
w = k.detach;
|
|
2296
|
+
let A = !1, j = () => {
|
|
2297
|
+
C(), S = setTimeout(re, ne);
|
|
2298
|
+
}, re = () => {
|
|
2299
|
+
if (C(), O() && !A) {
|
|
2300
|
+
A = !0, k.fullRestart(), j();
|
|
2209
2301
|
return;
|
|
2210
2302
|
}
|
|
2211
|
-
|
|
2212
|
-
}
|
|
2213
|
-
|
|
2214
|
-
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2303
|
+
h();
|
|
2304
|
+
}, M = !E && l, ie = M ? f(p, _) : [];
|
|
2305
|
+
return M && (k.attach(), m && j()), () => {
|
|
2306
|
+
if (te !== void 0 && clearTimeout(te), p.removeEventListener("animationend", T), M) {
|
|
2307
|
+
k.detach();
|
|
2308
|
+
for (let e of ie) e();
|
|
2309
|
+
}
|
|
2310
|
+
C(), E?.(), m && e.getTransitionTaskId() !== m && t.delete(m);
|
|
2311
|
+
};
|
|
2312
|
+
},
|
|
2313
|
+
activeResumeEntryCount: () => t.size
|
|
2314
|
+
};
|
|
2220
2315
|
}
|
|
2221
2316
|
//#endregion
|
|
2222
2317
|
//#region src/utils/findScrollable.ts
|
|
2223
|
-
function
|
|
2224
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
2318
|
+
function Xt(e, t) {
|
|
2319
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Zt(e);
|
|
2225
2320
|
if (!o) return {
|
|
2226
2321
|
element: null,
|
|
2227
2322
|
hasMarker: !1
|
|
2228
2323
|
};
|
|
2229
2324
|
let s = o.closest?.(r);
|
|
2230
|
-
if (s instanceof HTMLElement &&
|
|
2325
|
+
if (s instanceof HTMLElement && Qt(s, n) && (!a || $t(s, n))) return {
|
|
2231
2326
|
element: s,
|
|
2232
2327
|
hasMarker: !0
|
|
2233
2328
|
};
|
|
2234
2329
|
let c = o, l = 0;
|
|
2235
2330
|
for (; c && l < i;) {
|
|
2236
|
-
if (
|
|
2331
|
+
if (Qt(c, n) && (!a || $t(c, n))) return {
|
|
2237
2332
|
element: c,
|
|
2238
2333
|
hasMarker: !1
|
|
2239
2334
|
};
|
|
@@ -2244,7 +2339,7 @@ function Jt(e, t) {
|
|
|
2244
2339
|
hasMarker: !1
|
|
2245
2340
|
};
|
|
2246
2341
|
}
|
|
2247
|
-
function
|
|
2342
|
+
function Zt(e) {
|
|
2248
2343
|
if (!e) return null;
|
|
2249
2344
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
2250
2345
|
if (n && n.length) {
|
|
@@ -2252,18 +2347,18 @@ function Yt(e) {
|
|
|
2252
2347
|
}
|
|
2253
2348
|
return e instanceof HTMLElement ? e : null;
|
|
2254
2349
|
}
|
|
2255
|
-
function
|
|
2350
|
+
function Qt(e, t) {
|
|
2256
2351
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
2257
2352
|
}
|
|
2258
|
-
function
|
|
2259
|
-
if (
|
|
2353
|
+
function $t(e, t) {
|
|
2354
|
+
if (!Qt(e, t) || typeof window > "u") return !1;
|
|
2260
2355
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
2261
2356
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
2262
2357
|
}
|
|
2263
2358
|
//#endregion
|
|
2264
2359
|
//#region src/core/engine/createSwipeController.ts
|
|
2265
|
-
var
|
|
2266
|
-
function
|
|
2360
|
+
var en = "data-flemo-skip-animation";
|
|
2361
|
+
function tn(e) {
|
|
2267
2362
|
let t = null, n = null, r = {
|
|
2268
2363
|
current: [],
|
|
2269
2364
|
prev: []
|
|
@@ -2309,9 +2404,9 @@ function Qt(e) {
|
|
|
2309
2404
|
y: e.clientY
|
|
2310
2405
|
}, u = t;
|
|
2311
2406
|
}, v = (n, i, a) => {
|
|
2312
|
-
let o =
|
|
2313
|
-
if (n === e.getElements().scope) for (let e of r.current)
|
|
2314
|
-
else if (n === t) for (let e of r.prev)
|
|
2407
|
+
let o = X(n, i, a);
|
|
2408
|
+
if (n === e.getElements().scope) for (let e of r.current) X(e, i, a);
|
|
2409
|
+
else if (n === t) for (let e of r.prev) X(e, i, a);
|
|
2315
2410
|
return o;
|
|
2316
2411
|
}, y = (t) => {
|
|
2317
2412
|
let n = e.getPartnerBars(), i = [], { sharedTopBar: a, sharedBottomBar: o } = e.getElements();
|
|
@@ -2325,12 +2420,12 @@ function Qt(e) {
|
|
|
2325
2420
|
current: i,
|
|
2326
2421
|
prev: s
|
|
2327
2422
|
};
|
|
2328
|
-
let c =
|
|
2423
|
+
let c = We(e.getTransition()).join(", ");
|
|
2329
2424
|
for (let e of i) e.style.willChange = c;
|
|
2330
2425
|
for (let e of s) e.style.willChange = c;
|
|
2331
2426
|
}, b = () => {
|
|
2332
|
-
for (let e of r.current)
|
|
2333
|
-
for (let e of r.prev)
|
|
2427
|
+
for (let e of r.current) Y(e), e.style.removeProperty("will-change");
|
|
2428
|
+
for (let e of r.prev) Y(e), e.style.removeProperty("will-change");
|
|
2334
2429
|
r = {
|
|
2335
2430
|
current: [],
|
|
2336
2431
|
prev: []
|
|
@@ -2343,10 +2438,10 @@ function Qt(e) {
|
|
|
2343
2438
|
};
|
|
2344
2439
|
}, S = (e, t, n) => {
|
|
2345
2440
|
let r = (r, i) => {
|
|
2346
|
-
let a =
|
|
2441
|
+
let a = R.get(r.getAttribute("data-flemo-part-name"));
|
|
2347
2442
|
if (!a) return;
|
|
2348
2443
|
let o = {
|
|
2349
|
-
animate:
|
|
2444
|
+
animate: X,
|
|
2350
2445
|
element: r,
|
|
2351
2446
|
active: i
|
|
2352
2447
|
};
|
|
@@ -2355,7 +2450,7 @@ function Qt(e) {
|
|
|
2355
2450
|
for (let e of i.current) r(e, !0);
|
|
2356
2451
|
for (let e of i.prev) r(e, !1);
|
|
2357
2452
|
}, C = () => {
|
|
2358
|
-
for (let e of [...i.current, ...i.prev])
|
|
2453
|
+
for (let e of [...i.current, ...i.prev]) Y(e);
|
|
2359
2454
|
i = {
|
|
2360
2455
|
current: [],
|
|
2361
2456
|
prev: []
|
|
@@ -2384,7 +2479,7 @@ function Qt(e) {
|
|
|
2384
2479
|
prevScreen: t,
|
|
2385
2480
|
onStart: (e) => {
|
|
2386
2481
|
m?.onSwipeStart?.(e, {
|
|
2387
|
-
animate:
|
|
2482
|
+
animate: X,
|
|
2388
2483
|
currentDecorator: f,
|
|
2389
2484
|
prevDecorator: n
|
|
2390
2485
|
}), S("start", e, 0);
|
|
@@ -2401,7 +2496,7 @@ function Qt(e) {
|
|
|
2401
2496
|
prevScreen: t,
|
|
2402
2497
|
onProgress: (e, t) => {
|
|
2403
2498
|
c?.onSwipe?.(e, t, {
|
|
2404
|
-
animate:
|
|
2499
|
+
animate: X,
|
|
2405
2500
|
currentDecorator: o,
|
|
2406
2501
|
prevDecorator: n
|
|
2407
2502
|
}), S("swipe", e, t);
|
|
@@ -2420,15 +2515,15 @@ function Qt(e) {
|
|
|
2420
2515
|
prevScreen: t,
|
|
2421
2516
|
onStart: (e) => {
|
|
2422
2517
|
u?.onSwipeEnd?.(e, {
|
|
2423
|
-
animate:
|
|
2518
|
+
animate: X,
|
|
2424
2519
|
currentDecorator: l,
|
|
2425
2520
|
prevDecorator: n
|
|
2426
2521
|
}), S("end", e, 0);
|
|
2427
2522
|
}
|
|
2428
2523
|
})) {
|
|
2429
|
-
c?.setAttribute(
|
|
2524
|
+
c?.setAttribute(en, "true"), l?.setAttribute(en, "true");
|
|
2430
2525
|
for (let e of r.current) e.style.removeProperty("will-change");
|
|
2431
|
-
for (let e of r.prev)
|
|
2526
|
+
for (let e of r.prev) Y(e), e.style.removeProperty("will-change");
|
|
2432
2527
|
r = {
|
|
2433
2528
|
current: [],
|
|
2434
2529
|
prev: []
|
|
@@ -2436,14 +2531,14 @@ function Qt(e) {
|
|
|
2436
2531
|
current: [],
|
|
2437
2532
|
prev: []
|
|
2438
2533
|
}, e.back();
|
|
2439
|
-
} else c &&
|
|
2534
|
+
} else c && Y(c), t && Y(t), l && Y(l), n && Y(n), b(), C(), e.setDragStatus("IDLE");
|
|
2440
2535
|
};
|
|
2441
2536
|
return {
|
|
2442
2537
|
pointerDown: (t) => {
|
|
2443
|
-
e.isReadyForDrag() && (f =
|
|
2538
|
+
e.isReadyForDrag() && (f = Xt(t.target, {
|
|
2444
2539
|
direction: "x",
|
|
2445
2540
|
verifyByScroll: !0
|
|
2446
|
-
}), p =
|
|
2541
|
+
}), p = Xt(t.target, {
|
|
2447
2542
|
direction: "y",
|
|
2448
2543
|
verifyByScroll: !0
|
|
2449
2544
|
}), m = t.clientX, h = t.clientY, (!f.element && !p.element || f.element || p.element) && (a = !0));
|
|
@@ -2472,7 +2567,7 @@ function Qt(e) {
|
|
|
2472
2567
|
}
|
|
2473
2568
|
//#endregion
|
|
2474
2569
|
//#region src/screen/computeBarRiding.ts
|
|
2475
|
-
function
|
|
2570
|
+
function nn(e) {
|
|
2476
2571
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? {
|
|
2477
2572
|
app: !1,
|
|
2478
2573
|
nav: !1
|
|
@@ -2483,24 +2578,24 @@ function $t(e) {
|
|
|
2483
2578
|
}
|
|
2484
2579
|
//#endregion
|
|
2485
2580
|
//#region src/screen/animStartAnchor.ts
|
|
2486
|
-
function
|
|
2581
|
+
function rn(e) {
|
|
2487
2582
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
2488
2583
|
}
|
|
2489
|
-
var
|
|
2490
|
-
function
|
|
2491
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
2584
|
+
var an = 300, on = 20;
|
|
2585
|
+
function sn(e) {
|
|
2586
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, on);
|
|
2492
2587
|
}
|
|
2493
|
-
function
|
|
2494
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
2588
|
+
function cn(e) {
|
|
2589
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of sn(e)) t.decode().catch(() => {});
|
|
2495
2590
|
}
|
|
2496
|
-
function
|
|
2591
|
+
function ln(e, t = {}) {
|
|
2497
2592
|
let n = !1, r = 0, i = [], a = () => {
|
|
2498
2593
|
let r = t.scope;
|
|
2499
2594
|
if (t.decodeWait === !1 || !r || typeof r.querySelectorAll != "function") {
|
|
2500
2595
|
e();
|
|
2501
2596
|
return;
|
|
2502
2597
|
}
|
|
2503
|
-
let i =
|
|
2598
|
+
let i = sn(r);
|
|
2504
2599
|
if (i.length === 0) {
|
|
2505
2600
|
e();
|
|
2506
2601
|
return;
|
|
@@ -2524,13 +2619,13 @@ function on(e, t = {}) {
|
|
|
2524
2619
|
n = !0, cancelAnimationFrame(s), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e));
|
|
2525
2620
|
};
|
|
2526
2621
|
}
|
|
2527
|
-
function
|
|
2528
|
-
let n =
|
|
2622
|
+
function un(e, t = {}) {
|
|
2623
|
+
let n = ln(e, t), r = setTimeout(e, 300);
|
|
2529
2624
|
return () => {
|
|
2530
2625
|
n(), clearTimeout(r);
|
|
2531
2626
|
};
|
|
2532
2627
|
}
|
|
2533
|
-
function
|
|
2628
|
+
function dn() {
|
|
2534
2629
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
2535
2630
|
clearTimeout(n.backstop), e.delete(t);
|
|
2536
2631
|
let r = [...n.members];
|
|
@@ -2549,7 +2644,7 @@ function cn() {
|
|
|
2549
2644
|
let s = o, c = {
|
|
2550
2645
|
release: i,
|
|
2551
2646
|
ready: !1,
|
|
2552
|
-
cancelReadiness:
|
|
2647
|
+
cancelReadiness: ln(() => {
|
|
2553
2648
|
c.ready = !0, n(s) && t(r, s);
|
|
2554
2649
|
}, a)
|
|
2555
2650
|
};
|
|
@@ -2566,7 +2661,7 @@ function cn() {
|
|
|
2566
2661
|
}
|
|
2567
2662
|
//#endregion
|
|
2568
2663
|
//#region src/screen/observeBarHeight.ts
|
|
2569
|
-
function
|
|
2664
|
+
function fn(e, t) {
|
|
2570
2665
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
2571
2666
|
let n = new ResizeObserver(([e]) => {
|
|
2572
2667
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -2577,14 +2672,14 @@ function ln(e, t) {
|
|
|
2577
2672
|
}
|
|
2578
2673
|
//#endregion
|
|
2579
2674
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
2580
|
-
var
|
|
2581
|
-
function
|
|
2675
|
+
var pn = 0;
|
|
2676
|
+
function mn(e) {
|
|
2582
2677
|
let t = 0, n = () => {
|
|
2583
2678
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
2584
2679
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
2585
2680
|
t = t < 0 ? 0 : t;
|
|
2586
|
-
let n = t -
|
|
2587
|
-
n = n < 0 ? 0 : n,
|
|
2681
|
+
let n = t - pn;
|
|
2682
|
+
n = n < 0 ? 0 : n, pn ||= t, e(t, n);
|
|
2588
2683
|
});
|
|
2589
2684
|
};
|
|
2590
2685
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -2593,7 +2688,7 @@ function dn(e) {
|
|
|
2593
2688
|
}
|
|
2594
2689
|
//#endregion
|
|
2595
2690
|
//#region src/utils/isOpaqueColor.ts
|
|
2596
|
-
function
|
|
2691
|
+
function hn(e) {
|
|
2597
2692
|
let t = e.trim().toLowerCase();
|
|
2598
2693
|
if (t === "transparent" || t === "") return !1;
|
|
2599
2694
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -2604,7 +2699,7 @@ function fn(e) {
|
|
|
2604
2699
|
}
|
|
2605
2700
|
//#endregion
|
|
2606
2701
|
//#region src/utils/buildRoutePath.ts
|
|
2607
|
-
function
|
|
2702
|
+
function gn(e, n) {
|
|
2608
2703
|
let i = n ?? {}, a = t(e)(Object.fromEntries(Object.entries(i).map(([e, t]) => [e, String(t)]))), o = (typeof e == "string" ? r(e) : e).tokens.filter((e) => e.type === "param").map((e) => e.name), s = Object.fromEntries(Object.entries(i).filter(([e]) => !o.includes(e))), c = new URLSearchParams(s).toString();
|
|
2609
2704
|
return {
|
|
2610
2705
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -2612,4 +2707,4 @@ function pn(e, n) {
|
|
|
2612
2707
|
};
|
|
2613
2708
|
}
|
|
2614
2709
|
//#endregion
|
|
2615
|
-
export {
|
|
2710
|
+
export { an as ANIM_HOLD_RELEASE_BACKSTOP_MS, Ht as SKIP_ANIMATION_ATTR, o as TaskManger, rn as animHoldKey, X as animateInline, W as animationName, ie as appendParamsQuery, tt as applyTransitionStyles, gn as buildRoutePath, $t as canProgrammaticallyScroll, Y as clearInlineAnimation, We as collectAnimatedProperties, Qe as compileTransitionStyles, nn as computeBarRiding, me as computeScreenFreeze, y as consumeSelfInducedPop, dn as createAnimHoldCoordinator, h as createBrowserHistoryDriver, Se as createDecorator, s as createHistoryStore, b as createHistorySync, ne as createMemoryHistoryDriver, O as createNavigateStore, re as createNavigationController, Te as createPartTransition, Ce as createRawDecorator, Ee as createRawPartTransition, he as createRawTransition, fe as createRouterScope, pe as createScreenSelector, le as createScreenStore, g as createSelfPopGuard, ae as createStepController, tn as createSwipeController, N as createTransition, Yt as createTransitionEngine, se as createTransitionStore, _e as cupertino, L as decoratorMap, cn as eagerlyDecodeImages, U as easingToCss, ee as ensureScopeHistorySync, f as ensureWindowHistoryState, ct as enteringInitialStyle, Xt as findScrollable, c as getMatchedPathPattern, l as getParams, hn as isOpaqueColor, d as isServer, ye as layout, v as markSelfInducedPop, ce as matchesPathname, be as material, xe as none, fn as observeBarHeight, mn as observeViewportScrollHeight, Qt as overflowsAxis, we as overlay, R as partTransitionMap, M as readStepParams, st as registerTransitionDefinitions, te as releaseScopeHistorySync, F as resolveTransition, un as scheduleAnimHoldRelease, u as seedInitialHistory, p as seedRouterEntry, oe as subscribeStepParamsRestore, V as targetToDecls, P as transitionMap, G as variantHasAnimation };
|