@flemo/core 1.22.0 → 1.22.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
|
@@ -163,19 +163,22 @@ var a = 1200, o = 2, s = new class {
|
|
|
163
163
|
rearms: t?.rearms ?? 0
|
|
164
164
|
});
|
|
165
165
|
}
|
|
166
|
-
anchorGate(e) {
|
|
167
|
-
let
|
|
168
|
-
if (
|
|
166
|
+
anchorGate(e, t) {
|
|
167
|
+
let n = this.gatePhases.get(e);
|
|
168
|
+
if (n?.phase === "anchored") return;
|
|
169
169
|
this.gatePhases.set(e, {
|
|
170
170
|
phase: "anchored",
|
|
171
|
-
rearms:
|
|
171
|
+
rearms: n?.rearms ?? 0,
|
|
172
|
+
minLifetimeMs: t ?? n?.minLifetimeMs
|
|
172
173
|
});
|
|
173
|
-
let
|
|
174
|
-
!
|
|
174
|
+
let r = this.tasks.get(e);
|
|
175
|
+
!r || r.status !== "MANUAL_PENDING" && r.status !== "SIGNAL_PENDING" || (r.backstopTimer && (clearTimeout(r.backstopTimer), delete r.backstopTimer), this.armBackstop(r));
|
|
175
176
|
}
|
|
176
177
|
armBackstop(e) {
|
|
177
178
|
let t = e.control?.maxLifetimeMs;
|
|
178
|
-
!t || t <= 0 || typeof setTimeout > "u"
|
|
179
|
+
if (!t || t <= 0 || typeof setTimeout > "u") return;
|
|
180
|
+
let n = Math.max(t, this.gatePhases.get(e.id)?.minLifetimeMs ?? 0);
|
|
181
|
+
e.backstopTimer = setTimeout(() => {
|
|
179
182
|
delete e.backstopTimer;
|
|
180
183
|
let t = this.gatePhases.get(e.id);
|
|
181
184
|
if (t?.phase === "held" && t.rearms < o) {
|
|
@@ -183,7 +186,7 @@ var a = 1200, o = 2, s = new class {
|
|
|
183
186
|
return;
|
|
184
187
|
}
|
|
185
188
|
this.resolveTask(e.id);
|
|
186
|
-
},
|
|
189
|
+
}, n);
|
|
187
190
|
}
|
|
188
191
|
async resolveTask(e) {
|
|
189
192
|
let t = this.tasks.get(e);
|
|
@@ -500,13 +503,13 @@ var S = [], C = !1, w = (e) => {
|
|
|
500
503
|
let n = window.history.state;
|
|
501
504
|
return n ? Object.values(n).some((e) => !!e && typeof e == "object" && e.id === t) : !1;
|
|
502
505
|
};
|
|
503
|
-
function
|
|
506
|
+
function D(e, t) {
|
|
504
507
|
for (let n = S.length - 1; n >= 0; --n) if (S[n].pathname === t) return S[n].raw?.[e] ?? null;
|
|
505
508
|
return null;
|
|
506
509
|
}
|
|
507
|
-
var
|
|
508
|
-
function
|
|
509
|
-
|
|
510
|
+
var O = /* @__PURE__ */ new WeakMap();
|
|
511
|
+
function k(e) {
|
|
512
|
+
O.has(e) || O.set(e, x({
|
|
510
513
|
stores: e,
|
|
511
514
|
driver: e.driver,
|
|
512
515
|
consume: e.consume,
|
|
@@ -515,12 +518,12 @@ function O(e) {
|
|
|
515
518
|
ownsPathname: e.ownsPathname
|
|
516
519
|
}));
|
|
517
520
|
}
|
|
518
|
-
function
|
|
519
|
-
e.persistent || (
|
|
521
|
+
function A(e) {
|
|
522
|
+
e.persistent || (O.get(e)?.(), O.delete(e));
|
|
520
523
|
}
|
|
521
524
|
//#endregion
|
|
522
525
|
//#region src/history/memoryHistoryDriver.ts
|
|
523
|
-
function
|
|
526
|
+
function ee(e) {
|
|
524
527
|
let t = [{
|
|
525
528
|
state: e?.state ?? null,
|
|
526
529
|
url: e?.url ?? "/"
|
|
@@ -562,7 +565,7 @@ function ne(e) {
|
|
|
562
565
|
}
|
|
563
566
|
//#endregion
|
|
564
567
|
//#region src/navigate/store.ts
|
|
565
|
-
function
|
|
568
|
+
function te() {
|
|
566
569
|
return e((e) => ({
|
|
567
570
|
status: "IDLE",
|
|
568
571
|
transitionTaskId: null,
|
|
@@ -572,11 +575,11 @@ function re() {
|
|
|
572
575
|
}
|
|
573
576
|
//#endregion
|
|
574
577
|
//#region src/navigate/createNavigationController.ts
|
|
575
|
-
var
|
|
578
|
+
var j = (e, t, n) => {
|
|
576
579
|
let { regexp: r } = i(e);
|
|
577
580
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
578
581
|
return -1;
|
|
579
|
-
},
|
|
582
|
+
}, M = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, N = async (e, t, n, r) => {
|
|
580
583
|
let i, a = new Promise((t) => {
|
|
581
584
|
i = e.subscribe(() => t(!0));
|
|
582
585
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -584,7 +587,7 @@ var k = (e, t, n) => {
|
|
|
584
587
|
let s = await Promise.race([a, o]);
|
|
585
588
|
i(), s && r();
|
|
586
589
|
};
|
|
587
|
-
function
|
|
590
|
+
function ne(e) {
|
|
588
591
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
589
592
|
let e = r.readState();
|
|
590
593
|
if (!e?.id) return null;
|
|
@@ -610,10 +613,10 @@ function ie(e) {
|
|
|
610
613
|
}
|
|
611
614
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
612
615
|
if (u?.until != null) {
|
|
613
|
-
let e =
|
|
616
|
+
let e = j(u.until, d, f);
|
|
614
617
|
return e < 0 ? 0 : e;
|
|
615
618
|
}
|
|
616
|
-
return Math.min(
|
|
619
|
+
return Math.min(M(u?.skip, 0), Math.max(0, d));
|
|
617
620
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
618
621
|
y("PUSHING"), b(h);
|
|
619
622
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -640,7 +643,7 @@ function ie(e) {
|
|
|
640
643
|
return g({
|
|
641
644
|
...C,
|
|
642
645
|
frameIndex: T + 1
|
|
643
|
-
}), await
|
|
646
|
+
}), await N(r, i, v, () => {
|
|
644
647
|
o(), r.pushState({
|
|
645
648
|
id: h,
|
|
646
649
|
index: T + 1,
|
|
@@ -679,10 +682,10 @@ function ie(e) {
|
|
|
679
682
|
}
|
|
680
683
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
681
684
|
if (u?.until != null) {
|
|
682
|
-
let e =
|
|
685
|
+
let e = j(u.until, d, f);
|
|
683
686
|
return e < 0 ? 0 : e + 1;
|
|
684
687
|
}
|
|
685
|
-
return Math.min(
|
|
688
|
+
return Math.min(M(u?.skip, 0) + 1, d + 1);
|
|
686
689
|
})();
|
|
687
690
|
if (y <= 0) {
|
|
688
691
|
a.abort();
|
|
@@ -714,7 +717,7 @@ function ie(e) {
|
|
|
714
717
|
return v(y - 1), g({
|
|
715
718
|
...w,
|
|
716
719
|
frameIndex: E
|
|
717
|
-
}), y <= d ? await
|
|
720
|
+
}), y <= d ? await N(r, i, y, () => {
|
|
718
721
|
o(), r.pushState({
|
|
719
722
|
id: h,
|
|
720
723
|
index: E,
|
|
@@ -723,7 +726,7 @@ function ie(e) {
|
|
|
723
726
|
transitionName: p,
|
|
724
727
|
layoutId: m
|
|
725
728
|
}, S);
|
|
726
|
-
}) : await
|
|
729
|
+
}) : await N(r, i, d, () => {
|
|
727
730
|
o(), r.replaceState({
|
|
728
731
|
id: h,
|
|
729
732
|
index: E,
|
|
@@ -779,10 +782,10 @@ function ie(e) {
|
|
|
779
782
|
pop: async (e) => {
|
|
780
783
|
await d((t, n) => {
|
|
781
784
|
if (e?.until != null) {
|
|
782
|
-
let r =
|
|
785
|
+
let r = j(e.until, t, n);
|
|
783
786
|
return r < 0 ? 0 : r;
|
|
784
787
|
}
|
|
785
|
-
let r =
|
|
788
|
+
let r = M(e?.skip, 1);
|
|
786
789
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
787
790
|
}, e?.transitionName);
|
|
788
791
|
}
|
|
@@ -790,14 +793,14 @@ function ie(e) {
|
|
|
790
793
|
}
|
|
791
794
|
//#endregion
|
|
792
795
|
//#region src/navigate/createStepController.ts
|
|
793
|
-
var
|
|
796
|
+
var re = (e) => {
|
|
794
797
|
let t = e;
|
|
795
798
|
return t?.step ? t.params ?? {} : null;
|
|
796
|
-
},
|
|
799
|
+
}, ie = (e, t) => {
|
|
797
800
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
798
801
|
return n ? `${e}?${n}` : e;
|
|
799
802
|
};
|
|
800
|
-
function
|
|
803
|
+
function ae(e) {
|
|
801
804
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
802
805
|
return {
|
|
803
806
|
pushStep: async (e) => {
|
|
@@ -855,7 +858,7 @@ function se(e) {
|
|
|
855
858
|
}
|
|
856
859
|
};
|
|
857
860
|
}
|
|
858
|
-
function
|
|
861
|
+
function oe(e, t) {
|
|
859
862
|
return e.subscribe((e) => {
|
|
860
863
|
let n = e.state;
|
|
861
864
|
n?.step && s.addTask(async () => {
|
|
@@ -865,7 +868,7 @@ function ce(e, t) {
|
|
|
865
868
|
}
|
|
866
869
|
//#endregion
|
|
867
870
|
//#region src/transition/store.ts
|
|
868
|
-
function
|
|
871
|
+
function se(t = "cupertino") {
|
|
869
872
|
return e((e) => ({
|
|
870
873
|
defaultTransitionName: t,
|
|
871
874
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -873,12 +876,12 @@ function le(t = "cupertino") {
|
|
|
873
876
|
}
|
|
874
877
|
//#endregion
|
|
875
878
|
//#region src/utils/matchesPathname.ts
|
|
876
|
-
function
|
|
879
|
+
function ce(e, t) {
|
|
877
880
|
return i(e).regexp.test(t);
|
|
878
881
|
}
|
|
879
882
|
//#endregion
|
|
880
883
|
//#region src/screen/store.ts
|
|
881
|
-
function
|
|
884
|
+
function P() {
|
|
882
885
|
return e((e) => ({
|
|
883
886
|
dragStatus: "IDLE",
|
|
884
887
|
replaceTransitionStatus: "IDLE",
|
|
@@ -909,21 +912,21 @@ function de() {
|
|
|
909
912
|
}
|
|
910
913
|
//#endregion
|
|
911
914
|
//#region src/core/createRouterScope.ts
|
|
912
|
-
var
|
|
915
|
+
var le = {
|
|
913
916
|
mark: () => {},
|
|
914
917
|
consume: () => !1
|
|
915
|
-
},
|
|
916
|
-
function
|
|
918
|
+
}, F = /* @__PURE__ */ new Map();
|
|
919
|
+
function ue(e) {
|
|
917
920
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
918
921
|
if (s) {
|
|
919
|
-
let e =
|
|
922
|
+
let e = F.get(s);
|
|
920
923
|
if (e) {
|
|
921
924
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
922
925
|
let t = e.history.getState();
|
|
923
926
|
return t.setPendingIndex(t.index), e;
|
|
924
927
|
}
|
|
925
928
|
}
|
|
926
|
-
let l = d(t, n, r, i), u = (e.routerKey && !f() ?
|
|
929
|
+
let l = d(t, n, r, i), u = (e.routerKey && !f() ? D(e.routerKey, n) : null) ?? (o && !f() ? o.readState() : null), p = u?.id ? {
|
|
927
930
|
...l,
|
|
928
931
|
id: u.id,
|
|
929
932
|
params: u.params ?? l.params,
|
|
@@ -936,7 +939,7 @@ function pe(e) {
|
|
|
936
939
|
index: 0,
|
|
937
940
|
histories: [p]
|
|
938
941
|
}), e.hostedScope;
|
|
939
|
-
let m = a ?
|
|
942
|
+
let m = a ? ee({
|
|
940
943
|
state: {
|
|
941
944
|
id: p.id,
|
|
942
945
|
index: 0,
|
|
@@ -946,25 +949,25 @@ function pe(e) {
|
|
|
946
949
|
layoutId: p.layoutId
|
|
947
950
|
},
|
|
948
951
|
url: p.pathname
|
|
949
|
-
}) : o, h = a ?
|
|
952
|
+
}) : o, h = a ? le : _(), g = {
|
|
950
953
|
history: c([p], 0),
|
|
951
|
-
navigate:
|
|
952
|
-
transition:
|
|
953
|
-
screen:
|
|
954
|
+
navigate: te(),
|
|
955
|
+
transition: se(i),
|
|
956
|
+
screen: P(),
|
|
954
957
|
driver: m,
|
|
955
958
|
markSelfInduced: h.mark,
|
|
956
959
|
consume: h.consume,
|
|
957
960
|
routerKey: e.routerKey,
|
|
958
961
|
zoneEntryId: e.zoneEntryId,
|
|
959
|
-
ownsPathname: (e) =>
|
|
962
|
+
ownsPathname: (e) => ce(t, e),
|
|
960
963
|
persistent: !!s,
|
|
961
964
|
life: { alive: !0 }
|
|
962
965
|
};
|
|
963
|
-
return s &&
|
|
966
|
+
return s && F.set(s, g), g;
|
|
964
967
|
}
|
|
965
968
|
//#endregion
|
|
966
969
|
//#region src/screen/createScreenSelector.ts
|
|
967
|
-
function
|
|
970
|
+
function de(e, t) {
|
|
968
971
|
return e.map((n, r) => ({
|
|
969
972
|
...n,
|
|
970
973
|
isActive: r === t,
|
|
@@ -977,17 +980,17 @@ function me(e, t) {
|
|
|
977
980
|
}
|
|
978
981
|
//#endregion
|
|
979
982
|
//#region src/screen/computeScreenFreeze.ts
|
|
980
|
-
function
|
|
983
|
+
function fe(e) {
|
|
981
984
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
982
985
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
983
986
|
return !e.isActive && t ? "deferred" : "live";
|
|
984
987
|
}
|
|
985
|
-
function
|
|
986
|
-
return
|
|
988
|
+
function pe(e) {
|
|
989
|
+
return fe(e) !== "live";
|
|
987
990
|
}
|
|
988
991
|
//#endregion
|
|
989
992
|
//#region src/transition/createTransition.ts
|
|
990
|
-
function
|
|
993
|
+
function I({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
991
994
|
return {
|
|
992
995
|
name: e,
|
|
993
996
|
initial: t,
|
|
@@ -1008,7 +1011,7 @@ function N({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exit
|
|
|
1008
1011
|
}
|
|
1009
1012
|
//#endregion
|
|
1010
1013
|
//#region src/transition/createRawTransition.ts
|
|
1011
|
-
function
|
|
1014
|
+
function me({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1012
1015
|
return {
|
|
1013
1016
|
name: e,
|
|
1014
1017
|
initial: t,
|
|
@@ -1029,10 +1032,15 @@ function _e({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1029
1032
|
}
|
|
1030
1033
|
//#endregion
|
|
1031
1034
|
//#region src/transition/cupertino.ts
|
|
1032
|
-
var
|
|
1035
|
+
var he = (e, t, n) => {
|
|
1033
1036
|
let [r, i] = t, [a, o] = n;
|
|
1034
1037
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1035
|
-
},
|
|
1038
|
+
}, ge = 30, L = .7, R = [
|
|
1039
|
+
.32,
|
|
1040
|
+
.72,
|
|
1041
|
+
0,
|
|
1042
|
+
1
|
|
1043
|
+
], z = I({
|
|
1036
1044
|
name: "cupertino",
|
|
1037
1045
|
initial: { x: "100%" },
|
|
1038
1046
|
idle: {
|
|
@@ -1042,49 +1050,29 @@ var ve = (e, t, n) => {
|
|
|
1042
1050
|
enter: {
|
|
1043
1051
|
value: { x: 0 },
|
|
1044
1052
|
options: {
|
|
1045
|
-
duration:
|
|
1046
|
-
ease:
|
|
1047
|
-
.32,
|
|
1048
|
-
.72,
|
|
1049
|
-
0,
|
|
1050
|
-
1
|
|
1051
|
-
]
|
|
1053
|
+
duration: L,
|
|
1054
|
+
ease: R
|
|
1052
1055
|
}
|
|
1053
1056
|
},
|
|
1054
1057
|
enterBack: {
|
|
1055
1058
|
value: { x: "100%" },
|
|
1056
1059
|
options: {
|
|
1057
|
-
duration:
|
|
1058
|
-
ease:
|
|
1059
|
-
.32,
|
|
1060
|
-
.72,
|
|
1061
|
-
0,
|
|
1062
|
-
1
|
|
1063
|
-
]
|
|
1060
|
+
duration: L,
|
|
1061
|
+
ease: R
|
|
1064
1062
|
}
|
|
1065
1063
|
},
|
|
1066
1064
|
exit: {
|
|
1067
|
-
value: { x:
|
|
1065
|
+
value: { x: `-${ge}%` },
|
|
1068
1066
|
options: {
|
|
1069
|
-
duration:
|
|
1070
|
-
ease:
|
|
1071
|
-
.32,
|
|
1072
|
-
.72,
|
|
1073
|
-
0,
|
|
1074
|
-
1
|
|
1075
|
-
]
|
|
1067
|
+
duration: L,
|
|
1068
|
+
ease: R
|
|
1076
1069
|
}
|
|
1077
1070
|
},
|
|
1078
1071
|
exitBack: {
|
|
1079
1072
|
value: { x: 0 },
|
|
1080
1073
|
options: {
|
|
1081
|
-
duration:
|
|
1082
|
-
ease:
|
|
1083
|
-
.32,
|
|
1084
|
-
.72,
|
|
1085
|
-
0,
|
|
1086
|
-
1
|
|
1087
|
-
]
|
|
1074
|
+
duration: L,
|
|
1075
|
+
ease: R
|
|
1088
1076
|
}
|
|
1089
1077
|
},
|
|
1090
1078
|
options: {
|
|
@@ -1092,34 +1080,24 @@ var ve = (e, t, n) => {
|
|
|
1092
1080
|
swipeDirection: "x",
|
|
1093
1081
|
onSwipeStart: async () => !0,
|
|
1094
1082
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1095
|
-
let { offset: o } = t, s = o.x, c =
|
|
1096
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-
|
|
1083
|
+
let { offset: o } = t, s = o.x, c = he(s, [0, window.innerWidth], [0, 100]);
|
|
1084
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + ge / 100 * c}%` }, { duration: 0 }), c;
|
|
1097
1085
|
},
|
|
1098
1086
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1099
1087
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1100
1088
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1101
1089
|
duration: .3,
|
|
1102
|
-
ease:
|
|
1103
|
-
|
|
1104
|
-
.72,
|
|
1105
|
-
0,
|
|
1106
|
-
1
|
|
1107
|
-
]
|
|
1108
|
-
}), n(i, { x: c ? 0 : "-35%" }, {
|
|
1090
|
+
ease: R
|
|
1091
|
+
}), n(i, { x: c ? 0 : `-${ge}%` }, {
|
|
1109
1092
|
duration: .3,
|
|
1110
|
-
ease:
|
|
1111
|
-
.32,
|
|
1112
|
-
.72,
|
|
1113
|
-
0,
|
|
1114
|
-
1
|
|
1115
|
-
]
|
|
1093
|
+
ease: R
|
|
1116
1094
|
})]), c;
|
|
1117
1095
|
}
|
|
1118
1096
|
}
|
|
1119
|
-
}),
|
|
1097
|
+
}), _e = (e, t, n) => {
|
|
1120
1098
|
let [r, i] = t, [a, o] = n;
|
|
1121
1099
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1122
|
-
},
|
|
1100
|
+
}, ve = I({
|
|
1123
1101
|
name: "layout",
|
|
1124
1102
|
initial: { opacity: .97 },
|
|
1125
1103
|
idle: {
|
|
@@ -1147,7 +1125,7 @@ var ve = (e, t, n) => {
|
|
|
1147
1125
|
swipeDirection: "y",
|
|
1148
1126
|
onSwipeStart: async () => !0,
|
|
1149
1127
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1150
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1128
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = _e(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);
|
|
1151
1129
|
return i?.(!0, 100), n(r, {
|
|
1152
1130
|
y: f,
|
|
1153
1131
|
opacity: c
|
|
@@ -1164,7 +1142,7 @@ var ve = (e, t, n) => {
|
|
|
1164
1142
|
}, { duration: .3 })]), c;
|
|
1165
1143
|
}
|
|
1166
1144
|
}
|
|
1167
|
-
}),
|
|
1145
|
+
}), B = I({
|
|
1168
1146
|
name: "material",
|
|
1169
1147
|
initial: { y: "100%" },
|
|
1170
1148
|
idle: {
|
|
@@ -1272,7 +1250,7 @@ var ve = (e, t, n) => {
|
|
|
1272
1250
|
})]), c;
|
|
1273
1251
|
}
|
|
1274
1252
|
}
|
|
1275
|
-
}),
|
|
1253
|
+
}), ye = I({
|
|
1276
1254
|
name: "none",
|
|
1277
1255
|
initial: {},
|
|
1278
1256
|
idle: {
|
|
@@ -1295,20 +1273,20 @@ var ve = (e, t, n) => {
|
|
|
1295
1273
|
value: {},
|
|
1296
1274
|
options: { duration: 0 }
|
|
1297
1275
|
}
|
|
1298
|
-
}),
|
|
1299
|
-
["none",
|
|
1300
|
-
["cupertino",
|
|
1301
|
-
["material",
|
|
1302
|
-
["layout",
|
|
1276
|
+
}), V = /* @__PURE__ */ new Map([
|
|
1277
|
+
["none", ye],
|
|
1278
|
+
["cupertino", z],
|
|
1279
|
+
["material", B],
|
|
1280
|
+
["layout", ve]
|
|
1303
1281
|
]);
|
|
1304
1282
|
//#endregion
|
|
1305
1283
|
//#region src/transition/resolveTransition.ts
|
|
1306
|
-
function
|
|
1307
|
-
return
|
|
1284
|
+
function be(e) {
|
|
1285
|
+
return V.get(e) ?? V.get("none");
|
|
1308
1286
|
}
|
|
1309
1287
|
//#endregion
|
|
1310
1288
|
//#region src/transition/decorator/createDecorator.ts
|
|
1311
|
-
function
|
|
1289
|
+
function xe({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1312
1290
|
return {
|
|
1313
1291
|
name: e,
|
|
1314
1292
|
initial: t,
|
|
@@ -1329,7 +1307,7 @@ function Ce({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1329
1307
|
}
|
|
1330
1308
|
//#endregion
|
|
1331
1309
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1332
|
-
function
|
|
1310
|
+
function Se({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1333
1311
|
return {
|
|
1334
1312
|
name: e,
|
|
1335
1313
|
initial: t,
|
|
@@ -1350,42 +1328,42 @@ function we({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1350
1328
|
}
|
|
1351
1329
|
//#endregion
|
|
1352
1330
|
//#region src/transition/decorator/overlay.ts
|
|
1353
|
-
var
|
|
1331
|
+
var Ce = "rgba(0, 0, 0, 0.1)", we = xe({
|
|
1354
1332
|
name: "overlay",
|
|
1355
1333
|
initial: {
|
|
1356
1334
|
opacity: 0,
|
|
1357
|
-
backgroundColor:
|
|
1335
|
+
backgroundColor: Ce
|
|
1358
1336
|
},
|
|
1359
1337
|
idle: {
|
|
1360
1338
|
value: {
|
|
1361
1339
|
opacity: 0,
|
|
1362
|
-
backgroundColor:
|
|
1340
|
+
backgroundColor: Ce
|
|
1363
1341
|
},
|
|
1364
1342
|
options: { duration: 0 }
|
|
1365
1343
|
},
|
|
1366
1344
|
enter: {
|
|
1367
1345
|
value: {
|
|
1368
1346
|
opacity: 1,
|
|
1369
|
-
backgroundColor:
|
|
1347
|
+
backgroundColor: Ce
|
|
1370
1348
|
},
|
|
1371
|
-
options: { duration: .
|
|
1349
|
+
options: { duration: .7 }
|
|
1372
1350
|
},
|
|
1373
1351
|
exit: {
|
|
1374
1352
|
value: {
|
|
1375
1353
|
opacity: 0,
|
|
1376
|
-
backgroundColor:
|
|
1354
|
+
backgroundColor: Ce
|
|
1377
1355
|
},
|
|
1378
|
-
options: { duration: .
|
|
1356
|
+
options: { duration: .7 }
|
|
1379
1357
|
},
|
|
1380
1358
|
options: {
|
|
1381
1359
|
onSwipeStart: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!!e }, { duration: .3 }),
|
|
1382
1360
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1383
1361
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1384
1362
|
}
|
|
1385
|
-
}),
|
|
1363
|
+
}), Te = /* @__PURE__ */ new Map([["overlay", we]]);
|
|
1386
1364
|
//#endregion
|
|
1387
1365
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1388
|
-
function
|
|
1366
|
+
function Ee({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1389
1367
|
return {
|
|
1390
1368
|
name: e,
|
|
1391
1369
|
initial: t,
|
|
@@ -1406,7 +1384,7 @@ function De({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1406
1384
|
}
|
|
1407
1385
|
//#endregion
|
|
1408
1386
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1409
|
-
function
|
|
1387
|
+
function De({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1410
1388
|
return {
|
|
1411
1389
|
name: e,
|
|
1412
1390
|
initial: t,
|
|
@@ -1427,7 +1405,7 @@ function Oe({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1427
1405
|
}
|
|
1428
1406
|
//#endregion
|
|
1429
1407
|
//#region src/transition/partTransition/partTransition.ts
|
|
1430
|
-
var
|
|
1408
|
+
var H = /* @__PURE__ */ new Map(), Oe = {
|
|
1431
1409
|
"IDLE-true": "self",
|
|
1432
1410
|
"IDLE-false": "self",
|
|
1433
1411
|
"PUSHING-true": "initial",
|
|
@@ -1438,14 +1416,14 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1438
1416
|
"POPPING-false": "PUSHING-false",
|
|
1439
1417
|
"COMPLETED-true": "self",
|
|
1440
1418
|
"COMPLETED-false": "self"
|
|
1441
|
-
}, ke = Object.keys(
|
|
1419
|
+
}, ke = Object.keys(Oe), Ae = (e) => {
|
|
1442
1420
|
if (!e) return 0;
|
|
1443
1421
|
let t = e.duration;
|
|
1444
1422
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1445
1423
|
}, je = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Me = (e, t) => {
|
|
1446
|
-
let n =
|
|
1424
|
+
let n = Oe[t];
|
|
1447
1425
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1448
|
-
},
|
|
1426
|
+
}, U = (e, t) => {
|
|
1449
1427
|
let n = Me(e, t);
|
|
1450
1428
|
if (n === null) return null;
|
|
1451
1429
|
let r = e.variants[t], i = Ae(r.options), a = je(r.options);
|
|
@@ -1500,7 +1478,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1500
1478
|
n = r.size > 1;
|
|
1501
1479
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1502
1480
|
return n && a.push("transform"), a;
|
|
1503
|
-
},
|
|
1481
|
+
}, W = (e) => {
|
|
1504
1482
|
if (!Fe(e)) return [];
|
|
1505
1483
|
let t = [], n = !0, r = [];
|
|
1506
1484
|
for (let i of Object.keys(e)) {
|
|
@@ -1514,7 +1492,7 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1514
1492
|
property: "transform",
|
|
1515
1493
|
value: n ? "none" : t.join(" ")
|
|
1516
1494
|
}), r;
|
|
1517
|
-
},
|
|
1495
|
+
}, qe = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), Je = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1518
1496
|
linear: "linear",
|
|
1519
1497
|
easeIn: "ease-in",
|
|
1520
1498
|
easeOut: "ease-out",
|
|
@@ -1524,29 +1502,29 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1524
1502
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1525
1503
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1526
1504
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1527
|
-
}[e] ?? "ease" : "ease",
|
|
1505
|
+
}[e] ?? "ease" : "ease", Ye = (e, t) => {
|
|
1528
1506
|
let [n, r] = t.split("-");
|
|
1529
1507
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1530
|
-
},
|
|
1508
|
+
}, Xe = (e, t) => {
|
|
1531
1509
|
let [n, r] = t.split("-");
|
|
1532
1510
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1533
|
-
},
|
|
1511
|
+
}, Ze = (e, t) => {
|
|
1534
1512
|
let [n, r] = t.split("-");
|
|
1535
1513
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1536
|
-
},
|
|
1514
|
+
}, Qe = (e, t) => {
|
|
1537
1515
|
let [n, r] = t.split("-");
|
|
1538
1516
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1539
|
-
},
|
|
1540
|
-
let o =
|
|
1517
|
+
}, G = (e, t, n) => `flemo-${e}-${Pe(t)}-${n}`, $e = (e, t, n, r, i, a) => {
|
|
1518
|
+
let o = W(r), s = W(i.value), c = Ae(i.options), l = je(i.options), u = Je(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${Ze(t, n)}` : d;
|
|
1541
1519
|
if (s.length === 0 && o.length === 0) return "";
|
|
1542
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1543
|
-
let p =
|
|
1520
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${qe(s)}\n animation: none;\n}`;
|
|
1521
|
+
let p = G(e, t, n), m = [
|
|
1544
1522
|
`@keyframes ${p} {`,
|
|
1545
1523
|
" from {",
|
|
1546
|
-
|
|
1524
|
+
qe(o).replace(/^/gm, " "),
|
|
1547
1525
|
" }",
|
|
1548
1526
|
" to {",
|
|
1549
|
-
|
|
1527
|
+
qe(s).replace(/^/gm, " "),
|
|
1550
1528
|
" }",
|
|
1551
1529
|
"}"
|
|
1552
1530
|
].join("\n"), h = [
|
|
@@ -1556,59 +1534,59 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1556
1534
|
l > 0 ? `${l}s` : null,
|
|
1557
1535
|
"both"
|
|
1558
1536
|
].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(/* @__PURE__ */ 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];
|
|
1559
|
-
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") &&
|
|
1560
|
-
},
|
|
1537
|
+
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") && et(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${qe(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && et(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${qe(s)}\n}` : ""}`;
|
|
1538
|
+
}, et = (e) => {
|
|
1561
1539
|
if (!e) return !1;
|
|
1562
1540
|
if (e.opacity === 0) return !0;
|
|
1563
1541
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1564
1542
|
return t(e.x) || t(e.y);
|
|
1565
|
-
},
|
|
1566
|
-
let i =
|
|
1567
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1568
|
-
},
|
|
1543
|
+
}, tt = (e, t, n, r) => {
|
|
1544
|
+
let i = W(r.value);
|
|
1545
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${qe(i)}\n}`;
|
|
1546
|
+
}, nt = (e, t, n = []) => {
|
|
1569
1547
|
let r = [];
|
|
1570
1548
|
for (let t of e) {
|
|
1571
1549
|
let e = t.name;
|
|
1572
1550
|
for (let n of ke) {
|
|
1573
|
-
let i = t.variants[n], a =
|
|
1551
|
+
let i = t.variants[n], a = Oe[n];
|
|
1574
1552
|
if (a === "self") {
|
|
1575
|
-
r.push(
|
|
1553
|
+
r.push(tt(Ye, e, n, i));
|
|
1576
1554
|
continue;
|
|
1577
1555
|
}
|
|
1578
1556
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1579
|
-
r.push(
|
|
1557
|
+
r.push($e("screen", e, n, o, i, Ye));
|
|
1580
1558
|
}
|
|
1581
1559
|
}
|
|
1582
1560
|
for (let e of t) {
|
|
1583
1561
|
let t = e.name;
|
|
1584
1562
|
for (let n of Ne) {
|
|
1585
|
-
let i = e.variants[n], a =
|
|
1563
|
+
let i = e.variants[n], a = Oe[n];
|
|
1586
1564
|
if (a === "self") {
|
|
1587
|
-
r.push(
|
|
1565
|
+
r.push(tt(Xe, t, n, i));
|
|
1588
1566
|
continue;
|
|
1589
1567
|
}
|
|
1590
1568
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1591
|
-
r.push(
|
|
1569
|
+
r.push($e("decorator", t, n, o, i, Xe));
|
|
1592
1570
|
}
|
|
1593
1571
|
}
|
|
1594
1572
|
for (let e of n) {
|
|
1595
1573
|
let t = e.name;
|
|
1596
1574
|
for (let n of Ne) {
|
|
1597
|
-
let i = e.variants[n], a =
|
|
1575
|
+
let i = e.variants[n], a = Oe[n];
|
|
1598
1576
|
if (a === "self") {
|
|
1599
|
-
r.push(
|
|
1577
|
+
r.push(tt(Qe, t, n, i));
|
|
1600
1578
|
continue;
|
|
1601
1579
|
}
|
|
1602
1580
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1603
|
-
r.push(
|
|
1581
|
+
r.push($e("part", t, n, o, i, Qe));
|
|
1604
1582
|
}
|
|
1605
1583
|
}
|
|
1606
1584
|
return [
|
|
1607
1585
|
...r.filter((e) => e.length > 0),
|
|
1608
|
-
|
|
1609
|
-
|
|
1586
|
+
rt,
|
|
1587
|
+
it
|
|
1610
1588
|
].join("\n\n");
|
|
1611
|
-
},
|
|
1589
|
+
}, rt = [
|
|
1612
1590
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1613
1591
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1614
1592
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1617,45 +1595,45 @@ var R = /* @__PURE__ */ new Map(), z = {
|
|
|
1617
1595
|
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name] {",
|
|
1618
1596
|
" animation-play-state: paused !important;",
|
|
1619
1597
|
"}"
|
|
1620
|
-
].join("\n"),
|
|
1598
|
+
].join("\n"), it = [
|
|
1621
1599
|
"[data-flemo-held-arrival] {",
|
|
1622
1600
|
" display: none !important;",
|
|
1623
1601
|
"}"
|
|
1624
|
-
].join("\n"),
|
|
1625
|
-
let n =
|
|
1602
|
+
].join("\n"), K = (e, t) => {
|
|
1603
|
+
let n = Oe[t];
|
|
1626
1604
|
if (n === "self") return !1;
|
|
1627
1605
|
let r = e.variants[t], i = Ae(r.options), a = je(r.options);
|
|
1628
1606
|
if (i <= 0 && a <= 0) return !1;
|
|
1629
|
-
let o =
|
|
1607
|
+
let o = W(n === "initial" ? e.initial : e.variants[n].value), s = W(r.value);
|
|
1630
1608
|
return o.length > 0 || s.length > 0;
|
|
1631
|
-
},
|
|
1632
|
-
function
|
|
1609
|
+
}, at = "data-flemo";
|
|
1610
|
+
function ot() {
|
|
1633
1611
|
if (f()) return;
|
|
1634
|
-
let e =
|
|
1635
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1612
|
+
let e = nt(V.values(), Te.values(), H.values()), t = document.head.querySelector(`style[${at}]`);
|
|
1613
|
+
t || (t = document.createElement("style"), t.setAttribute(at, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1636
1614
|
}
|
|
1637
1615
|
//#endregion
|
|
1638
1616
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1639
|
-
var
|
|
1617
|
+
var st = /* @__PURE__ */ new Map(), ct = /* @__PURE__ */ new Map(), lt = /* @__PURE__ */ new Map(), ut = (e, t) => {
|
|
1640
1618
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1641
|
-
},
|
|
1619
|
+
}, dt = (e, t) => {
|
|
1642
1620
|
let n = (e.get(t) ?? 1) - 1;
|
|
1643
1621
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1644
1622
|
};
|
|
1645
|
-
function
|
|
1646
|
-
for (let t of e)
|
|
1647
|
-
for (let e of t)
|
|
1648
|
-
for (let e of n)
|
|
1649
|
-
return
|
|
1650
|
-
for (let t of e)
|
|
1651
|
-
for (let e of t)
|
|
1652
|
-
for (let e of n)
|
|
1653
|
-
|
|
1623
|
+
function ft(e, t, n = []) {
|
|
1624
|
+
for (let t of e) V.set(t.name, t), ut(st, t.name);
|
|
1625
|
+
for (let e of t) Te.set(e.name, e), ut(ct, e.name);
|
|
1626
|
+
for (let e of n) H.set(e.name, e), ut(lt, e.name);
|
|
1627
|
+
return ot(), () => {
|
|
1628
|
+
for (let t of e) dt(st, t.name) && V.delete(t.name);
|
|
1629
|
+
for (let e of t) dt(ct, e.name) && Te.delete(e.name);
|
|
1630
|
+
for (let e of n) dt(lt, e.name) && H.delete(e.name);
|
|
1631
|
+
ot();
|
|
1654
1632
|
};
|
|
1655
1633
|
}
|
|
1656
1634
|
//#endregion
|
|
1657
1635
|
//#region src/transition/enteringInitialStyle.ts
|
|
1658
|
-
function
|
|
1636
|
+
function pt(e) {
|
|
1659
1637
|
let { initial: t, isActive: n, status: r } = e;
|
|
1660
1638
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1661
1639
|
let i = {};
|
|
@@ -1663,10 +1641,10 @@ function ft(e) {
|
|
|
1663
1641
|
}
|
|
1664
1642
|
//#endregion
|
|
1665
1643
|
//#region src/transition/settleScrub.ts
|
|
1666
|
-
var
|
|
1644
|
+
var mt = () => ({
|
|
1667
1645
|
request: (e) => requestAnimationFrame(e),
|
|
1668
1646
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1669
|
-
}),
|
|
1647
|
+
}), ht = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), gt = ((e = mt()) => {
|
|
1670
1648
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1671
1649
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1672
1650
|
}, i = (e, n) => {
|
|
@@ -1699,7 +1677,7 @@ var pt = () => ({
|
|
|
1699
1677
|
if (typeof r.animate != "function") return null;
|
|
1700
1678
|
i(r, "current");
|
|
1701
1679
|
let l = {};
|
|
1702
|
-
for (let e of o) l[
|
|
1680
|
+
for (let e of o) l[ht(e.property)] = e.value;
|
|
1703
1681
|
let u;
|
|
1704
1682
|
try {
|
|
1705
1683
|
u = r.animate([l], {
|
|
@@ -1729,56 +1707,56 @@ var pt = () => ({
|
|
|
1729
1707
|
takeover: (e) => i(e, "current"),
|
|
1730
1708
|
cancel: (e) => i(e, "drop")
|
|
1731
1709
|
};
|
|
1732
|
-
})(),
|
|
1710
|
+
})(), _t = "flemo:motion-driver", vt = "flemo:motion-driver-force", yt = !1, bt = () => {
|
|
1733
1711
|
try {
|
|
1734
1712
|
try {
|
|
1735
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1713
|
+
typeof localStorage < "u" && localStorage.removeItem(vt);
|
|
1736
1714
|
} catch {}
|
|
1737
1715
|
if (typeof sessionStorage > "u") return null;
|
|
1738
|
-
let e = sessionStorage.getItem(
|
|
1716
|
+
let e = sessionStorage.getItem(vt);
|
|
1739
1717
|
if (e === null) return null;
|
|
1740
1718
|
let [t, n] = e.split("@"), r = Number(n);
|
|
1741
|
-
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!
|
|
1719
|
+
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!yt && typeof console < "u" && (yt = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${vt}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(vt), null);
|
|
1742
1720
|
} catch {
|
|
1743
1721
|
return null;
|
|
1744
1722
|
}
|
|
1745
|
-
},
|
|
1723
|
+
}, xt = () => ({
|
|
1746
1724
|
read: () => {
|
|
1747
1725
|
try {
|
|
1748
|
-
return typeof localStorage < "u" ? localStorage.getItem(
|
|
1726
|
+
return typeof localStorage < "u" ? localStorage.getItem(_t) : null;
|
|
1749
1727
|
} catch {
|
|
1750
1728
|
return null;
|
|
1751
1729
|
}
|
|
1752
1730
|
},
|
|
1753
1731
|
write: (e) => {
|
|
1754
1732
|
try {
|
|
1755
|
-
typeof localStorage < "u" && localStorage.setItem(
|
|
1733
|
+
typeof localStorage < "u" && localStorage.setItem(_t, e);
|
|
1756
1734
|
} catch {}
|
|
1757
1735
|
}
|
|
1758
|
-
}),
|
|
1736
|
+
}), St = 30, Ct = 2, wt = 2, Tt = () => typeof navigator < "u" && !!navigator.userAgentData, Et = (e = xt(), t = !1, n = !0) => {
|
|
1759
1737
|
let r = n && e.read() === "css", i = r;
|
|
1760
1738
|
r &&= !1;
|
|
1761
1739
|
let a = 0, o = 0, s = [];
|
|
1762
1740
|
return {
|
|
1763
1741
|
playerAllowed: () => {
|
|
1764
|
-
let e =
|
|
1742
|
+
let e = bt();
|
|
1765
1743
|
return e ? e === "raf" : t && !r;
|
|
1766
1744
|
},
|
|
1767
|
-
pinnedDriver:
|
|
1745
|
+
pinnedDriver: bt,
|
|
1768
1746
|
beginRun: () => {
|
|
1769
1747
|
o = 0, s = [];
|
|
1770
1748
|
},
|
|
1771
1749
|
reportGap: (e) => {
|
|
1772
|
-
s.push(e), e >=
|
|
1750
|
+
s.push(e), e >= St && (o += 1);
|
|
1773
1751
|
},
|
|
1774
1752
|
endRun: () => {
|
|
1775
|
-
let t = o >=
|
|
1753
|
+
let t = o >= Ct;
|
|
1776
1754
|
if (t && (a += 1), n) {
|
|
1777
1755
|
if (i) {
|
|
1778
1756
|
i = !1, t ? r = !0 : e.write("raf");
|
|
1779
1757
|
return;
|
|
1780
1758
|
}
|
|
1781
|
-
t && a >=
|
|
1759
|
+
t && a >= wt && !r && (r = !0, e.write("css"));
|
|
1782
1760
|
}
|
|
1783
1761
|
},
|
|
1784
1762
|
stats: () => ({
|
|
@@ -1787,43 +1765,43 @@ var pt = () => ({
|
|
|
1787
1765
|
demoted: r
|
|
1788
1766
|
})
|
|
1789
1767
|
};
|
|
1790
|
-
},
|
|
1791
|
-
let n =
|
|
1792
|
-
n || (n = /* @__PURE__ */ new Set(),
|
|
1793
|
-
},
|
|
1794
|
-
if (
|
|
1795
|
-
let n =
|
|
1768
|
+
}, Dt = Tt() ? Et() : Et(xt(), !0, !1), Ot = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, kt = /* @__PURE__ */ new WeakMap(), q = (e, t) => {
|
|
1769
|
+
let n = kt.get(e);
|
|
1770
|
+
n || (n = /* @__PURE__ */ new Set(), kt.set(e, n)), n.add(t);
|
|
1771
|
+
}, J = (e, t) => {
|
|
1772
|
+
if (gt.cancel(e), e.style.transition = "", e.style.removeProperty("animation-delay"), t) {
|
|
1773
|
+
let n = kt.get(e);
|
|
1796
1774
|
for (let r of t) e.style.removeProperty(r), n?.delete(r);
|
|
1797
1775
|
return;
|
|
1798
1776
|
}
|
|
1799
|
-
let n =
|
|
1777
|
+
let n = kt.get(e);
|
|
1800
1778
|
if (n && n.size > 0) {
|
|
1801
1779
|
for (let t of n) e.style.removeProperty(t);
|
|
1802
1780
|
n.clear();
|
|
1803
1781
|
return;
|
|
1804
1782
|
}
|
|
1805
1783
|
e.style.removeProperty("transform"), e.style.removeProperty("opacity");
|
|
1806
|
-
},
|
|
1807
|
-
if (!
|
|
1808
|
-
let r = e, i =
|
|
1784
|
+
}, Y = (e, t, n = {}) => {
|
|
1785
|
+
if (!Ot(e)) return Promise.resolve();
|
|
1786
|
+
let r = e, i = W(t);
|
|
1809
1787
|
if (i.length === 0) return Promise.resolve();
|
|
1810
|
-
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s =
|
|
1788
|
+
let a = typeof n.duration == "number" ? n.duration : 0, o = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, s = Je(n.ease);
|
|
1811
1789
|
if (a <= 0 && o <= 0) {
|
|
1812
|
-
|
|
1813
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1790
|
+
gt.takeover(r), r.style.transition = "none";
|
|
1791
|
+
for (let e of i) r.style.setProperty(e.property, e.value), q(r, e.property);
|
|
1814
1792
|
return Promise.resolve();
|
|
1815
1793
|
}
|
|
1816
|
-
let c =
|
|
1794
|
+
let c = Dt.playerAllowed() ? gt.settle(r, i, {
|
|
1817
1795
|
durationMs: a * 1e3,
|
|
1818
1796
|
delayMs: o * 1e3,
|
|
1819
1797
|
easing: s
|
|
1820
1798
|
}, (e) => {
|
|
1821
|
-
r.style.setProperty(e.property, e.value),
|
|
1799
|
+
r.style.setProperty(e.property, e.value), q(r, e.property);
|
|
1822
1800
|
}) : null;
|
|
1823
1801
|
if (c) return c;
|
|
1824
1802
|
let l = i.map((e) => `${e.property} ${a}s ${s} ${o}s`).join(", ");
|
|
1825
1803
|
r.style.transition = l, r.offsetWidth;
|
|
1826
|
-
for (let e of i) r.style.setProperty(e.property, e.value),
|
|
1804
|
+
for (let e of i) r.style.setProperty(e.property, e.value), q(r, e.property);
|
|
1827
1805
|
return new Promise((e) => {
|
|
1828
1806
|
let t = !1, n = () => {
|
|
1829
1807
|
t || (t = !0, r.removeEventListener("transitionend", i), e());
|
|
@@ -1832,12 +1810,12 @@ var pt = () => ({
|
|
|
1832
1810
|
};
|
|
1833
1811
|
r.addEventListener("transitionend", i), setTimeout(n, (a + o) * 1e3 + 60);
|
|
1834
1812
|
});
|
|
1835
|
-
},
|
|
1836
|
-
function
|
|
1813
|
+
}, At = "data-flemo-held-arrival";
|
|
1814
|
+
function jt(e) {
|
|
1837
1815
|
if (typeof MutationObserver > "u") return () => {};
|
|
1838
1816
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
1839
1817
|
let n = t instanceof Element ? t : t.parentElement;
|
|
1840
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
1818
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${At}]`) !== null;
|
|
1841
1819
|
}, s = (e, t, n, r) => e ? n === e.glass ? (e.pendingEcho ? e.pendingEcho = !1 : e.latest = n, e) : (e.latest = n, r(e.glass), e.pendingEcho = !0, e) : n === t ? null : (r(t), {
|
|
1842
1820
|
glass: t,
|
|
1843
1821
|
latest: n,
|
|
@@ -1867,12 +1845,12 @@ function kt(e) {
|
|
|
1867
1845
|
if (i.type === "childList") {
|
|
1868
1846
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
1869
1847
|
if (e instanceof Element && t.delete(e)) {
|
|
1870
|
-
e.removeAttribute(
|
|
1848
|
+
e.removeAttribute(At);
|
|
1871
1849
|
continue;
|
|
1872
1850
|
}
|
|
1873
1851
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
1874
1852
|
}
|
|
1875
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
1853
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(At, ""), t.add(e), l(i.target).added.push(e));
|
|
1876
1854
|
}
|
|
1877
1855
|
}
|
|
1878
1856
|
for (let [e, t] of u) {
|
|
@@ -1907,7 +1885,7 @@ function kt(e) {
|
|
|
1907
1885
|
c.disconnect();
|
|
1908
1886
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
1909
1887
|
n.clear();
|
|
1910
|
-
for (let e of t) e.removeAttribute(
|
|
1888
|
+
for (let e of t) e.removeAttribute(At);
|
|
1911
1889
|
t.clear();
|
|
1912
1890
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
1913
1891
|
i.clear();
|
|
@@ -1917,34 +1895,81 @@ function kt(e) {
|
|
|
1917
1895
|
}
|
|
1918
1896
|
//#endregion
|
|
1919
1897
|
//#region src/core/engine/compositorWarmUp.ts
|
|
1920
|
-
var
|
|
1898
|
+
var Mt = "data-flemo-warm", Nt = 3e3, Pt = [{ transform: "translate3d(0, 0, 0)" }, { transform: "translate3d(1px, 0, 0)" }], Ft = {
|
|
1921
1899
|
duration: 500,
|
|
1922
1900
|
iterations: Infinity,
|
|
1923
1901
|
direction: "alternate",
|
|
1924
1902
|
easing: "linear"
|
|
1925
|
-
},
|
|
1926
|
-
|
|
1903
|
+
}, It = "position:fixed;top:0;left:0;width:1px;height:1px;pointer-events:none;opacity:0.02;background:#888;will-change:transform;", X = null, Lt = null, Rt = 0, zt = () => {
|
|
1904
|
+
Rt = 0, Lt?.cancel(), Lt = null, X?.remove(), X = null;
|
|
1927
1905
|
};
|
|
1928
|
-
function
|
|
1906
|
+
function Bt() {
|
|
1929
1907
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
1930
|
-
if (
|
|
1931
|
-
|
|
1908
|
+
if (Rt += 1, !X) {
|
|
1909
|
+
X = document.createElement("div"), X.setAttribute(Mt, ""), X.setAttribute("aria-hidden", "true"), X.setAttribute("style", It), document.body.appendChild(X);
|
|
1932
1910
|
try {
|
|
1933
|
-
|
|
1911
|
+
Lt = X.animate(Pt, Ft);
|
|
1934
1912
|
} catch {
|
|
1935
|
-
|
|
1913
|
+
Lt = null;
|
|
1936
1914
|
}
|
|
1937
1915
|
}
|
|
1938
1916
|
let e = !1, t = setTimeout(() => {
|
|
1939
|
-
e || (e = !0, --
|
|
1940
|
-
},
|
|
1917
|
+
e || (e = !0, --Rt, Rt <= 0 && zt());
|
|
1918
|
+
}, Nt);
|
|
1941
1919
|
return () => {
|
|
1942
|
-
e || (e = !0, clearTimeout(t), --
|
|
1920
|
+
e || (e = !0, clearTimeout(t), --Rt, Rt <= 0 && zt());
|
|
1921
|
+
};
|
|
1922
|
+
}
|
|
1923
|
+
//#endregion
|
|
1924
|
+
//#region src/core/engine/invisibleAnimationHold.ts
|
|
1925
|
+
var Vt = () => {}, Ht = .004, Ut = (e, t) => {
|
|
1926
|
+
let n = e.ownerDocument?.defaultView;
|
|
1927
|
+
if (!n) return !1;
|
|
1928
|
+
let r = e;
|
|
1929
|
+
for (; r;) {
|
|
1930
|
+
if (Number(n.getComputedStyle(r).opacity) <= Ht) return !0;
|
|
1931
|
+
if (r === t) break;
|
|
1932
|
+
r = r.parentElement;
|
|
1933
|
+
}
|
|
1934
|
+
return !1;
|
|
1935
|
+
};
|
|
1936
|
+
function Wt(e) {
|
|
1937
|
+
if (typeof e.getAnimations != "function") return Vt;
|
|
1938
|
+
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
1939
|
+
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
1940
|
+
if (t.size >= 128) return;
|
|
1941
|
+
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
1942
|
+
let r = n.effect?.target;
|
|
1943
|
+
if (r instanceof Element && Ut(r, e)) try {
|
|
1944
|
+
n.pause(), t.add(n);
|
|
1945
|
+
} catch {}
|
|
1946
|
+
}
|
|
1947
|
+
}, r = null, i = () => {
|
|
1948
|
+
if (typeof requestAnimationFrame != "function") {
|
|
1949
|
+
n();
|
|
1950
|
+
return;
|
|
1951
|
+
}
|
|
1952
|
+
r === null && (r = requestAnimationFrame(() => {
|
|
1953
|
+
r = null, n();
|
|
1954
|
+
}));
|
|
1955
|
+
};
|
|
1956
|
+
i();
|
|
1957
|
+
let a = typeof MutationObserver == "function" ? new MutationObserver(i) : null;
|
|
1958
|
+
return a?.observe(e, {
|
|
1959
|
+
subtree: !0,
|
|
1960
|
+
childList: !0,
|
|
1961
|
+
attributes: !0
|
|
1962
|
+
}), () => {
|
|
1963
|
+
a?.disconnect(), r !== null && typeof cancelAnimationFrame == "function" && (cancelAnimationFrame(r), r = null);
|
|
1964
|
+
for (let e of t) try {
|
|
1965
|
+
e.play();
|
|
1966
|
+
} catch {}
|
|
1967
|
+
t.clear();
|
|
1943
1968
|
};
|
|
1944
1969
|
}
|
|
1945
1970
|
//#endregion
|
|
1946
1971
|
//#region src/transition/cubicBezier.ts
|
|
1947
|
-
var
|
|
1972
|
+
var Gt = (e, t, n, r) => {
|
|
1948
1973
|
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;
|
|
1949
1974
|
return (e) => {
|
|
1950
1975
|
if (e <= 0) return 0;
|
|
@@ -1956,7 +1981,7 @@ var Rt = (e, t, n, r) => {
|
|
|
1956
1981
|
}
|
|
1957
1982
|
return a((t + n) / 2);
|
|
1958
1983
|
};
|
|
1959
|
-
},
|
|
1984
|
+
}, Kt = (e) => e, qt = {
|
|
1960
1985
|
ease: [
|
|
1961
1986
|
.25,
|
|
1962
1987
|
.1,
|
|
@@ -2011,20 +2036,20 @@ var Rt = (e, t, n, r) => {
|
|
|
2011
2036
|
.66,
|
|
2012
2037
|
-.56
|
|
2013
2038
|
]
|
|
2014
|
-
},
|
|
2039
|
+
}, Jt = (e) => {
|
|
2015
2040
|
if (Array.isArray(e)) {
|
|
2016
2041
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2017
2042
|
let [t, n, r, i] = e;
|
|
2018
|
-
return
|
|
2043
|
+
return Gt(t, n, r, i);
|
|
2019
2044
|
}
|
|
2020
|
-
return
|
|
2045
|
+
return Kt;
|
|
2021
2046
|
}
|
|
2022
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2023
|
-
},
|
|
2047
|
+
return typeof e == "string" ? e === "linear" ? Kt : Gt(...qt[e] ?? qt.ease) : Gt(...qt.ease);
|
|
2048
|
+
}, Yt = 1 / 255, Xt = 400, Zt = 24, Qt = /* @__PURE__ */ new Set([
|
|
2024
2049
|
"x",
|
|
2025
2050
|
"y",
|
|
2026
2051
|
"opacity"
|
|
2027
|
-
]),
|
|
2052
|
+
]), $t = (e, t, n) => {
|
|
2028
2053
|
if (!e || typeof e != "object") return;
|
|
2029
2054
|
let r = e[t];
|
|
2030
2055
|
if (r === void 0) return;
|
|
@@ -2042,31 +2067,33 @@ var Rt = (e, t, n, r) => {
|
|
|
2042
2067
|
return Number.isNaN(e) ? null : e;
|
|
2043
2068
|
}
|
|
2044
2069
|
return null;
|
|
2045
|
-
},
|
|
2070
|
+
}, en = (e, t, n) => {
|
|
2046
2071
|
let r = /* @__PURE__ */ new Set();
|
|
2047
2072
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2048
2073
|
if (r.size === 0) return null;
|
|
2049
2074
|
let i = Infinity;
|
|
2050
2075
|
for (let a of r) {
|
|
2051
|
-
|
|
2052
|
-
|
|
2053
|
-
if (
|
|
2054
|
-
let s =
|
|
2055
|
-
if (s === 0)
|
|
2056
|
-
let
|
|
2057
|
-
|
|
2076
|
+
let r = e.from && typeof e.from == "object" ? e.from[a] : void 0, o = e.to && typeof e.to == "object" ? e.to[a] : void 0;
|
|
2077
|
+
if (r !== void 0 && r === o) continue;
|
|
2078
|
+
if (!Qt.has(a)) return null;
|
|
2079
|
+
let s = $t(e.from, a, t), c = $t(e.to, a, t);
|
|
2080
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2081
|
+
let l = Math.abs(c - s);
|
|
2082
|
+
if (l === 0) continue;
|
|
2083
|
+
let u = a === "opacity" ? Yt : 1 / Math.max(1, n);
|
|
2084
|
+
i = Math.min(i, u / l);
|
|
2058
2085
|
}
|
|
2059
2086
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2060
|
-
},
|
|
2087
|
+
}, tn = (e, t, n) => {
|
|
2061
2088
|
if (e.duration <= 0) return null;
|
|
2062
|
-
let r =
|
|
2089
|
+
let r = en(e, t, n);
|
|
2063
2090
|
if (r === null) return null;
|
|
2064
|
-
let i =
|
|
2065
|
-
for (let e =
|
|
2091
|
+
let i = Jt(e.ease), a = Xt;
|
|
2092
|
+
for (let e = Xt; e >= 0 && !(Math.abs(1 - i(e / Xt)) > r); --e) a = e;
|
|
2066
2093
|
if (a === 0) return null;
|
|
2067
|
-
let o = (e.delay + e.duration * (a /
|
|
2068
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2069
|
-
},
|
|
2094
|
+
let o = (e.delay + e.duration * (a / Xt)) * 1e3;
|
|
2095
|
+
return (e.delay + e.duration) * 1e3 - o < Zt ? null : o;
|
|
2096
|
+
}, nn = [
|
|
2070
2097
|
"x",
|
|
2071
2098
|
"y",
|
|
2072
2099
|
"z",
|
|
@@ -2077,7 +2104,7 @@ var Rt = (e, t, n, r) => {
|
|
|
2077
2104
|
"rotateX",
|
|
2078
2105
|
"rotateY",
|
|
2079
2106
|
"rotateZ"
|
|
2080
|
-
],
|
|
2107
|
+
], rn = new Set(nn), an = {
|
|
2081
2108
|
x: 0,
|
|
2082
2109
|
y: 0,
|
|
2083
2110
|
z: 0,
|
|
@@ -2088,7 +2115,7 @@ var Rt = (e, t, n, r) => {
|
|
|
2088
2115
|
rotateX: 0,
|
|
2089
2116
|
rotateY: 0,
|
|
2090
2117
|
rotateZ: 0
|
|
2091
|
-
},
|
|
2118
|
+
}, on = (e, t) => {
|
|
2092
2119
|
if (typeof t == "number") return {
|
|
2093
2120
|
value: t,
|
|
2094
2121
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -2107,26 +2134,26 @@ var Rt = (e, t, n, r) => {
|
|
|
2107
2134
|
value: i,
|
|
2108
2135
|
unit: a === "" && i === 0 ? "px" : a
|
|
2109
2136
|
};
|
|
2110
|
-
},
|
|
2111
|
-
let n = e.match(
|
|
2112
|
-
if (n.length !== r.length || e.replace(
|
|
2137
|
+
}, sn = /-?\d*\.?\d+/g, cn = (e, t) => {
|
|
2138
|
+
let n = e.match(sn) ?? [], r = t.match(sn) ?? [];
|
|
2139
|
+
if (n.length !== r.length || e.replace(sn, " ") !== t.replace(sn, " ")) return null;
|
|
2113
2140
|
let i = n.map(Number), a = r.map(Number);
|
|
2114
2141
|
return (t) => {
|
|
2115
2142
|
let n = 0;
|
|
2116
|
-
return e.replace(
|
|
2143
|
+
return e.replace(sn, () => {
|
|
2117
2144
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
2118
2145
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
2119
2146
|
});
|
|
2120
2147
|
};
|
|
2121
|
-
},
|
|
2122
|
-
let n = /* @__PURE__ */ new Set([...
|
|
2148
|
+
}, ln = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), un = (e) => typeof e == "object" && !!e && !Array.isArray(e), dn = (e) => un(e) ? Object.keys(e) : [], fn = (e, t) => un(e) ? e[t] : void 0, pn = (e, t) => {
|
|
2149
|
+
let n = /* @__PURE__ */ new Set([...dn(e.from), ...dn(e.to)]), r = [], i = null, a = [], o = [];
|
|
2123
2150
|
for (let s of n) {
|
|
2124
|
-
let n =
|
|
2125
|
-
if (
|
|
2151
|
+
let n = fn(e.from, s), c = fn(e.to, s);
|
|
2152
|
+
if (rn.has(s)) {
|
|
2126
2153
|
let e = s, i = {
|
|
2127
|
-
value:
|
|
2154
|
+
value: an[e],
|
|
2128
2155
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
2129
|
-
}, a = n === void 0 ? i :
|
|
2156
|
+
}, a = n === void 0 ? i : on(e, n), o = c === void 0 ? i : on(e, c);
|
|
2130
2157
|
if (!a || !o || a.unit !== o.unit && a.value !== 0 && o.value !== 0) return null;
|
|
2131
2158
|
let l = a.value === 0 && a.unit !== o.unit ? o.unit : a.unit, u = l === "%", d = 0;
|
|
2132
2159
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), r.push({
|
|
@@ -2157,15 +2184,15 @@ var Rt = (e, t, n, r) => {
|
|
|
2157
2184
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
2158
2185
|
if (l === u) {
|
|
2159
2186
|
o.push({
|
|
2160
|
-
property:
|
|
2187
|
+
property: ln(s),
|
|
2161
2188
|
value: l
|
|
2162
2189
|
});
|
|
2163
2190
|
continue;
|
|
2164
2191
|
}
|
|
2165
|
-
let d =
|
|
2192
|
+
let d = cn(l, u);
|
|
2166
2193
|
if (!d) return null;
|
|
2167
2194
|
a.push({
|
|
2168
|
-
property:
|
|
2195
|
+
property: ln(s),
|
|
2169
2196
|
mix: d
|
|
2170
2197
|
});
|
|
2171
2198
|
}
|
|
@@ -2175,64 +2202,64 @@ var Rt = (e, t, n, r) => {
|
|
|
2175
2202
|
strings: a,
|
|
2176
2203
|
constants: o
|
|
2177
2204
|
};
|
|
2178
|
-
},
|
|
2179
|
-
if (
|
|
2205
|
+
}, mn = 1, hn, gn = () => {
|
|
2206
|
+
if (hn !== void 0) return hn;
|
|
2180
2207
|
try {
|
|
2181
2208
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:apply") : null;
|
|
2182
|
-
|
|
2209
|
+
hn = e === "scrub" ? e : null;
|
|
2183
2210
|
} catch {
|
|
2184
|
-
|
|
2211
|
+
hn = null;
|
|
2185
2212
|
}
|
|
2186
|
-
return
|
|
2187
|
-
},
|
|
2188
|
-
if (
|
|
2213
|
+
return hn;
|
|
2214
|
+
}, _n, vn = () => {
|
|
2215
|
+
if (_n !== void 0) return _n;
|
|
2189
2216
|
try {
|
|
2190
2217
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:snap") : null;
|
|
2191
|
-
|
|
2218
|
+
_n = e === "always" || e === "off" ? e : null;
|
|
2192
2219
|
} catch {
|
|
2193
|
-
|
|
2220
|
+
_n = null;
|
|
2194
2221
|
}
|
|
2195
|
-
return
|
|
2196
|
-
},
|
|
2222
|
+
return _n;
|
|
2223
|
+
}, yn = (e, t, n, r) => {
|
|
2197
2224
|
let i = 0, a = 0, o = !1, s = [], c = !0;
|
|
2198
|
-
for (let l of
|
|
2225
|
+
for (let l of nn) {
|
|
2199
2226
|
let u = e.find((e) => e.prop === l);
|
|
2200
2227
|
if (!u) continue;
|
|
2201
2228
|
let d = u.from.value + (u.to.value - u.from.value) * t;
|
|
2202
2229
|
if (u.from.unit === "%" && (d *= u.percentBase), l === "x" || l === "y") {
|
|
2203
|
-
let e = l === "x" ? r.x : r.y, t =
|
|
2230
|
+
let e = l === "x" ? r.x : r.y, t = vn(), s = (t === "always" || t !== "off" && (e === null || Math.abs(d - e) * n >= mn)) && n > 0 ? Math.round(d * n) / n : Math.round(d * 1e3) / 1e3;
|
|
2204
2231
|
l === "x" ? (r.x = d, i = s) : (r.y = d, a = s), o = !0, s !== 0 && (c = !1);
|
|
2205
2232
|
continue;
|
|
2206
2233
|
}
|
|
2207
|
-
let f =
|
|
2234
|
+
let f = an[l];
|
|
2208
2235
|
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)`);
|
|
2209
2236
|
}
|
|
2210
2237
|
return !o && s.length === 0 ? "" : c ? "none" : [...o ? [`translate3d(${i}px, ${a}px, 0)`] : [], ...s].join(" ");
|
|
2211
|
-
},
|
|
2238
|
+
}, bn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), xn = (e) => {
|
|
2212
2239
|
let t = {};
|
|
2213
|
-
for (let n of
|
|
2240
|
+
for (let n of W(e)) t[bn(n.property)] = n.value;
|
|
2214
2241
|
return t;
|
|
2215
|
-
},
|
|
2242
|
+
}, Sn = (e, t) => {
|
|
2216
2243
|
if (typeof e.animate != "function") return null;
|
|
2217
2244
|
try {
|
|
2218
|
-
let n = e.animate([
|
|
2245
|
+
let n = e.animate([xn(t.from), xn(t.to)], {
|
|
2219
2246
|
duration: Math.max(0, t.duration * 1e3),
|
|
2220
2247
|
delay: Math.max(0, t.delay * 1e3),
|
|
2221
|
-
easing:
|
|
2248
|
+
easing: Je(t.ease),
|
|
2222
2249
|
fill: "both"
|
|
2223
2250
|
});
|
|
2224
2251
|
return n.pause(), n.currentTime = 0, n;
|
|
2225
2252
|
} catch {
|
|
2226
2253
|
return null;
|
|
2227
2254
|
}
|
|
2228
|
-
},
|
|
2255
|
+
}, Cn = 1e3 / 60 * 2, wn = () => ({
|
|
2229
2256
|
request: (e) => requestAnimationFrame(e),
|
|
2230
2257
|
cancel: (e) => cancelAnimationFrame(e),
|
|
2231
2258
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
2232
|
-
}),
|
|
2259
|
+
}), Tn = ((e = wn()) => {
|
|
2233
2260
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
2234
2261
|
join: (n, r) => {
|
|
2235
|
-
let i =
|
|
2262
|
+
let i = gn() === "scrub" ? null : pn(r.motion, r.element), s = i ? null : Sn(r.element, r.motion);
|
|
2236
2263
|
if (!i && !s) return null;
|
|
2237
2264
|
let c = t.get(n);
|
|
2238
2265
|
c || (c = {
|
|
@@ -2253,14 +2280,14 @@ var Rt = (e, t, n, r) => {
|
|
|
2253
2280
|
y: null
|
|
2254
2281
|
}
|
|
2255
2282
|
};
|
|
2256
|
-
if (c.tracks.push(l), l.element.style.animation = "none",
|
|
2257
|
-
i.transforms.length > 0 &&
|
|
2258
|
-
for (let e of i.strings)
|
|
2259
|
-
for (let e of i.constants)
|
|
2283
|
+
if (c.tracks.push(l), l.element.style.animation = "none", q(l.element, "animation"), i) {
|
|
2284
|
+
i.transforms.length > 0 && q(l.element, "transform"), i.opacity && q(l.element, "opacity");
|
|
2285
|
+
for (let e of i.strings) q(l.element, e.property);
|
|
2286
|
+
for (let e of i.constants) q(l.element, e.property);
|
|
2260
2287
|
a(l, 0);
|
|
2261
2288
|
}
|
|
2262
|
-
return r.role === "active" && !c.started && (c.started = !0,
|
|
2263
|
-
l.detached = !0, l.scrub?.cancel(),
|
|
2289
|
+
return r.role === "active" && !c.started && (c.started = !0, Dt.beginRun(), o(n, c)), () => {
|
|
2290
|
+
l.detached = !0, l.scrub?.cancel(), J(l.element);
|
|
2264
2291
|
let r = t.get(n);
|
|
2265
2292
|
r && (r.tracks = r.tracks.filter((e) => e !== l), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
2266
2293
|
};
|
|
@@ -2275,13 +2302,13 @@ var Rt = (e, t, n, r) => {
|
|
|
2275
2302
|
}
|
|
2276
2303
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
2277
2304
|
let t = r.get(e);
|
|
2278
|
-
return t || (t =
|
|
2305
|
+
return t || (t = Jt(e.motion.ease), r.set(e, t)), t;
|
|
2279
2306
|
};
|
|
2280
2307
|
function a(t, n) {
|
|
2281
2308
|
let { element: r, parsed: i } = t;
|
|
2282
2309
|
if (!(!i || !r.isConnected)) {
|
|
2283
2310
|
if (i.transforms.length > 0) {
|
|
2284
|
-
let a =
|
|
2311
|
+
let a = yn(i.transforms, n, e.devicePixelRatio(), t.snapMemory);
|
|
2285
2312
|
a !== "" && (r.style.transform = a);
|
|
2286
2313
|
}
|
|
2287
2314
|
if (i.opacity) {
|
|
@@ -2301,7 +2328,7 @@ var Rt = (e, t, n, r) => {
|
|
|
2301
2328
|
let c = r.startTime ?? s;
|
|
2302
2329
|
if (r.lastTime !== null) {
|
|
2303
2330
|
let e = s - r.lastTime;
|
|
2304
|
-
|
|
2331
|
+
Dt.reportGap(e), n.onFrameGap?.(e), e > Cn && (c += e - Cn);
|
|
2305
2332
|
}
|
|
2306
2333
|
r.startTime = c, r.lastTime = s;
|
|
2307
2334
|
let l = !0;
|
|
@@ -2317,14 +2344,14 @@ var Rt = (e, t, n, r) => {
|
|
|
2317
2344
|
a(e, i(e)(o)), o >= 1 ? (e.completed = !0, e.onComplete?.()) : l = !1;
|
|
2318
2345
|
}
|
|
2319
2346
|
if (l) {
|
|
2320
|
-
|
|
2347
|
+
Dt.endRun(), t.delete(e);
|
|
2321
2348
|
return;
|
|
2322
2349
|
}
|
|
2323
2350
|
o(e, r);
|
|
2324
2351
|
}
|
|
2325
2352
|
return n;
|
|
2326
2353
|
})();
|
|
2327
|
-
|
|
2354
|
+
Tn.onFrameGap = (e) => {
|
|
2328
2355
|
if (typeof window < "u") {
|
|
2329
2356
|
let t = window.__flemoPlayerGaps ??= [];
|
|
2330
2357
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -2332,10 +2359,10 @@ vn.onFrameGap = (e) => {
|
|
|
2332
2359
|
};
|
|
2333
2360
|
//#endregion
|
|
2334
2361
|
//#region src/core/engine/types.ts
|
|
2335
|
-
var
|
|
2362
|
+
var En = "data-flemo-skip-animation", Dn = 1e3 / 60, On = (e, t) => {
|
|
2336
2363
|
let n = 0, r = !1;
|
|
2337
2364
|
for (let i of ["x", "y"]) {
|
|
2338
|
-
let a =
|
|
2365
|
+
let a = $t(e.from, i, t), o = $t(e.to, i, t);
|
|
2339
2366
|
if (!(a === void 0 && o === void 0)) {
|
|
2340
2367
|
if (a === null || o === null || a === void 0 || o === void 0) return null;
|
|
2341
2368
|
r = !0, n = Math.max(n, Math.abs(o - a));
|
|
@@ -2346,33 +2373,33 @@ var yn = "data-flemo-skip-animation", bn = 1e3 / 60, xn = (e, t) => {
|
|
|
2346
2373
|
/* v8 ignore next 2 -- resolveVariantMotion never yields duration<=0 with a
|
|
2347
2374
|
distance; kept so a hand-built motion cannot divide by zero. */
|
|
2348
2375
|
if (i <= 0) return 0;
|
|
2349
|
-
let a = i /
|
|
2376
|
+
let a = i / Dn, o = Jt(e.ease), s = Math.max(1, Math.min(240, Math.ceil(a))), c = 0, l = o(0);
|
|
2350
2377
|
for (let e = 1; e <= s; e++) {
|
|
2351
2378
|
let t = o(e / s);
|
|
2352
2379
|
c = Math.max(c, Math.abs(t - l)), l = t;
|
|
2353
2380
|
}
|
|
2354
2381
|
return n * c * (s / a);
|
|
2355
|
-
},
|
|
2382
|
+
}, kn = (e, t, n) => {
|
|
2356
2383
|
let r = e.driver;
|
|
2357
2384
|
if (r === "native" || r === "player") return r;
|
|
2358
2385
|
let i = 0;
|
|
2359
2386
|
for (let r of ["true", "false"]) {
|
|
2360
|
-
let a =
|
|
2387
|
+
let a = U(e, `${t}-${r}`);
|
|
2361
2388
|
if (!a) continue;
|
|
2362
|
-
let o =
|
|
2389
|
+
let o = On(a, n);
|
|
2363
2390
|
if (o === null) return "player";
|
|
2364
2391
|
i = Math.max(i, o);
|
|
2365
2392
|
}
|
|
2366
2393
|
return i >= 6 ? "native" : "player";
|
|
2367
|
-
},
|
|
2368
|
-
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree:
|
|
2394
|
+
}, An = 1e3 / 60 * 2, jn = "flemo-", Mn = /* @__PURE__ */ new WeakMap(), Nn = (e, t, n) => {
|
|
2395
|
+
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2369
2396
|
let e = r.animationName;
|
|
2370
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2371
|
-
let
|
|
2372
|
-
typeof
|
|
2397
|
+
if (typeof e != "string" || !e.startsWith(jn) || r.playState !== "running" || Mn.get(r) === n) continue;
|
|
2398
|
+
let i = r.startTime;
|
|
2399
|
+
typeof i == "number" && (r.startTime = i + t, Mn.set(r, n));
|
|
2373
2400
|
}
|
|
2374
2401
|
};
|
|
2375
|
-
function
|
|
2402
|
+
function Pn(e, t) {
|
|
2376
2403
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2377
2404
|
exotic embedders. */
|
|
2378
2405
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2381,10 +2408,9 @@ function En(e, t) {
|
|
|
2381
2408
|
if (r !== null) {
|
|
2382
2409
|
let n = o - r;
|
|
2383
2410
|
if (n > 33.333333333333336) {
|
|
2384
|
-
let r = n -
|
|
2385
|
-
e()
|
|
2386
|
-
|
|
2387
|
-
}), t?.(r);
|
|
2411
|
+
let r = n - An;
|
|
2412
|
+
for (let t of e()) t && Nn(t, r, o);
|
|
2413
|
+
t?.(r);
|
|
2388
2414
|
}
|
|
2389
2415
|
}
|
|
2390
2416
|
r = o, n = requestAnimationFrame(a);
|
|
@@ -2396,23 +2422,23 @@ function En(e, t) {
|
|
|
2396
2422
|
}
|
|
2397
2423
|
//#endregion
|
|
2398
2424
|
//#region src/core/engine/createTransitionEngine.ts
|
|
2399
|
-
var Z = () => {},
|
|
2425
|
+
var Z = () => {}, Fn = 400, In = 4, Ln = 100, Rn = 1500, zn = "data-flemo-part-name", Bn = (e) => {
|
|
2400
2426
|
let t = e.parentElement ?? e;
|
|
2401
|
-
return Array.from(t.querySelectorAll(`[${
|
|
2427
|
+
return Array.from(t.querySelectorAll(`[${zn}]`)).filter((n) => {
|
|
2402
2428
|
let r = n.closest("[data-flemo-screen]");
|
|
2403
2429
|
return !r || r === e || !t.contains(r);
|
|
2404
2430
|
});
|
|
2405
|
-
},
|
|
2431
|
+
}, Vn = (e, t) => {
|
|
2406
2432
|
let [n, r] = t.split("-");
|
|
2407
|
-
return
|
|
2408
|
-
},
|
|
2433
|
+
return Bn(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
2434
|
+
}, Hn = 4, Un = (e) => `${Math.round(e * 1e3) / 1e3}s`, Wn = (e) => {
|
|
2409
2435
|
let { element: t, expectedName: n, motion: r } = e, i = null, a = !1, o = (e) => {
|
|
2410
|
-
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 =
|
|
2436
|
+
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 = Un(e.seconds)), a = !1;
|
|
2411
2437
|
}, s = (e) => {
|
|
2412
2438
|
a || e.target !== t || e.animationName !== n || i === null && (i = performance.now());
|
|
2413
2439
|
}, c = (s) => {
|
|
2414
2440
|
if (a || s.target !== t || s.animationName !== n) return;
|
|
2415
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
2441
|
+
if (!e.isLive() || e.budgetUsed() >= Hn) {
|
|
2416
2442
|
e.onTerminal();
|
|
2417
2443
|
return;
|
|
2418
2444
|
}
|
|
@@ -2442,7 +2468,7 @@ var Z = () => {}, Dn = 400, On = 4, kn = 100, An = "data-flemo-part-name", jn =
|
|
|
2442
2468
|
}
|
|
2443
2469
|
};
|
|
2444
2470
|
};
|
|
2445
|
-
function
|
|
2471
|
+
function Gn(e) {
|
|
2446
2472
|
let t = /* @__PURE__ */ new Map(), n = null, r = null, i = null, a = null, o = () => {
|
|
2447
2473
|
if (!a) return;
|
|
2448
2474
|
let { land: e, cancel: t } = a;
|
|
@@ -2465,9 +2491,9 @@ function In(e) {
|
|
|
2465
2491
|
return {
|
|
2466
2492
|
driveScreenLifecycle: (a) => {
|
|
2467
2493
|
let { getElements: l, transitionName: u, prevTransitionName: d, status: f, isActive: p, animHoldReleased: m } = a, h = f === "PUSHING" || f === "POPPING" || f === "REPLACING";
|
|
2468
|
-
h && (i &&= (clearTimeout(i), null), r ||=
|
|
2494
|
+
h && (i &&= (clearTimeout(i), null), r ||= Bt()), !h && r && !i && (typeof setTimeout == "function" ? i = setTimeout(() => {
|
|
2469
2495
|
i = null, r?.(), r = null;
|
|
2470
|
-
},
|
|
2496
|
+
}, Fn) : (r(), r = null));
|
|
2471
2497
|
let g = h && m && (p ? f === "PUSHING" || f === "REPLACING" : f === "POPPING");
|
|
2472
2498
|
if (!g && n) {
|
|
2473
2499
|
let e = n;
|
|
@@ -2476,21 +2502,26 @@ function In(e) {
|
|
|
2476
2502
|
if (g && !n) {
|
|
2477
2503
|
o();
|
|
2478
2504
|
let { scope: e } = l();
|
|
2479
|
-
|
|
2505
|
+
if (e) {
|
|
2506
|
+
let t = jt(e), r = Wt(e);
|
|
2507
|
+
n = () => {
|
|
2508
|
+
r(), t();
|
|
2509
|
+
};
|
|
2510
|
+
}
|
|
2480
2511
|
}
|
|
2481
2512
|
let _ = (t, n, r) => {
|
|
2482
2513
|
let i = e.getTransitionTaskId();
|
|
2483
|
-
if (!i || s.pendingTaskIds.some((e) => e !== i) || !
|
|
2514
|
+
if (!i || s.pendingTaskIds.some((e) => e !== i) || !Dt.playerAllowed()) return null;
|
|
2484
2515
|
let { scope: a, decorator: o, bars: c } = l();
|
|
2485
2516
|
if (!a) return null;
|
|
2486
|
-
let d =
|
|
2487
|
-
if (
|
|
2517
|
+
let d = be(u);
|
|
2518
|
+
if (Dt.pinnedDriver() !== "raf") {
|
|
2488
2519
|
let e = t.split("-")[0];
|
|
2489
|
-
if (
|
|
2520
|
+
if (kn(d, e, a) === "native") return null;
|
|
2490
2521
|
}
|
|
2491
|
-
let f =
|
|
2522
|
+
let f = U(d, t);
|
|
2492
2523
|
if (!f) return null;
|
|
2493
|
-
let p = [], m =
|
|
2524
|
+
let p = [], m = Tn.join(i, {
|
|
2494
2525
|
element: a,
|
|
2495
2526
|
motion: f,
|
|
2496
2527
|
role: n,
|
|
@@ -2500,7 +2531,7 @@ function In(e) {
|
|
|
2500
2531
|
p.push(m);
|
|
2501
2532
|
for (let e of c ?? []) {
|
|
2502
2533
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2503
|
-
let t =
|
|
2534
|
+
let t = Tn.join(i, {
|
|
2504
2535
|
element: e,
|
|
2505
2536
|
motion: f,
|
|
2506
2537
|
role: "passive"
|
|
@@ -2508,9 +2539,9 @@ function In(e) {
|
|
|
2508
2539
|
t && p.push(t);
|
|
2509
2540
|
}
|
|
2510
2541
|
if (o && d.decoratorName) {
|
|
2511
|
-
let e =
|
|
2542
|
+
let e = Te.get(d.decoratorName), n = e ? U(e, t) : null;
|
|
2512
2543
|
if (n) {
|
|
2513
|
-
let e =
|
|
2544
|
+
let e = Tn.join(i, {
|
|
2514
2545
|
element: o,
|
|
2515
2546
|
motion: n,
|
|
2516
2547
|
role: "passive"
|
|
@@ -2518,10 +2549,10 @@ function In(e) {
|
|
|
2518
2549
|
e && p.push(e);
|
|
2519
2550
|
}
|
|
2520
2551
|
}
|
|
2521
|
-
for (let e of
|
|
2522
|
-
let n =
|
|
2552
|
+
for (let e of Vn(a, t)) {
|
|
2553
|
+
let n = H.get(e.getAttribute(zn)), r = n ? U(n, t) : null;
|
|
2523
2554
|
if (!r) continue;
|
|
2524
|
-
let a =
|
|
2555
|
+
let a = Tn.join(i, {
|
|
2525
2556
|
element: e,
|
|
2526
2557
|
motion: r,
|
|
2527
2558
|
role: "passive"
|
|
@@ -2530,8 +2561,8 @@ function In(e) {
|
|
|
2530
2561
|
}
|
|
2531
2562
|
return () => p.forEach((e) => e());
|
|
2532
2563
|
}, v = (e, t) => {
|
|
2533
|
-
let n = [], { decorator: r, bars: i } = l(), a =
|
|
2534
|
-
let i = 0, a =
|
|
2564
|
+
let n = [], { decorator: r, bars: i } = l(), a = be(u), o = (e, t, r) => {
|
|
2565
|
+
let i = 0, a = Wn({
|
|
2535
2566
|
element: e,
|
|
2536
2567
|
expectedName: t,
|
|
2537
2568
|
motion: r,
|
|
@@ -2543,15 +2574,15 @@ function In(e) {
|
|
|
2543
2574
|
onTerminal: Z
|
|
2544
2575
|
});
|
|
2545
2576
|
a.attach(), n.push(a.detach);
|
|
2546
|
-
}, s =
|
|
2577
|
+
}, s = G("screen", u, t), c = U(a, t);
|
|
2547
2578
|
if (c) for (let e of i ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || o(e, s, c);
|
|
2548
2579
|
if (r && a.decoratorName) {
|
|
2549
|
-
let e =
|
|
2550
|
-
n && o(r,
|
|
2580
|
+
let e = Te.get(a.decoratorName), n = e ? U(e, t) : null;
|
|
2581
|
+
n && o(r, G("decorator", a.decoratorName, t), n);
|
|
2551
2582
|
}
|
|
2552
|
-
for (let n of
|
|
2553
|
-
let e = n.getAttribute(
|
|
2554
|
-
i && o(n,
|
|
2583
|
+
for (let n of Vn(e, t)) {
|
|
2584
|
+
let e = n.getAttribute(zn), r = H.get(e), i = r ? U(r, t) : null;
|
|
2585
|
+
i && o(n, G("part", e, t), i);
|
|
2555
2586
|
}
|
|
2556
2587
|
return n;
|
|
2557
2588
|
};
|
|
@@ -2559,11 +2590,11 @@ function In(e) {
|
|
|
2559
2590
|
if (f === "COMPLETED") {
|
|
2560
2591
|
let { scope: e, decorator: t, bars: n } = l();
|
|
2561
2592
|
if (e) {
|
|
2562
|
-
|
|
2563
|
-
for (let t of
|
|
2593
|
+
J(e);
|
|
2594
|
+
for (let t of Bn(e)) J(t);
|
|
2564
2595
|
}
|
|
2565
|
-
t &&
|
|
2566
|
-
for (let e of n ?? []) e &&
|
|
2596
|
+
t && J(t);
|
|
2597
|
+
for (let e of n ?? []) e && J(e);
|
|
2567
2598
|
return Z;
|
|
2568
2599
|
}
|
|
2569
2600
|
if (f === "REPLACING" && d !== u && e.setReplaceTransitionStatus("PENDING"), h && m) {
|
|
@@ -2571,11 +2602,11 @@ function In(e) {
|
|
|
2571
2602
|
if (t) return t;
|
|
2572
2603
|
let { scope: n } = l();
|
|
2573
2604
|
if (n) {
|
|
2574
|
-
let t =
|
|
2575
|
-
if (
|
|
2576
|
-
let i =
|
|
2605
|
+
let t = be(u), r = [];
|
|
2606
|
+
if (K(t, e)) {
|
|
2607
|
+
let i = U(t, e), a = 0, o = Wn({
|
|
2577
2608
|
element: n,
|
|
2578
|
-
expectedName:
|
|
2609
|
+
expectedName: G("screen", u, e),
|
|
2579
2610
|
motion: i,
|
|
2580
2611
|
isLive: () => n.isConnected && n.getAttribute("data-flemo-skip-animation") !== "true",
|
|
2581
2612
|
budgetUsed: () => a,
|
|
@@ -2595,11 +2626,11 @@ function In(e) {
|
|
|
2595
2626
|
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
2596
2627
|
let { scope: t, decorator: n, bars: r } = l();
|
|
2597
2628
|
if (t) {
|
|
2598
|
-
|
|
2599
|
-
for (let e of
|
|
2629
|
+
J(t), t.removeAttribute(En);
|
|
2630
|
+
for (let e of Bn(t)) J(e);
|
|
2600
2631
|
}
|
|
2601
|
-
n && (
|
|
2602
|
-
for (let e of r ?? []) e && (
|
|
2632
|
+
n && (J(n), n.removeAttribute(En));
|
|
2633
|
+
for (let e of r ?? []) e && (J(e), e.style.removeProperty("will-change"));
|
|
2603
2634
|
return Z;
|
|
2604
2635
|
}
|
|
2605
2636
|
if (f === "IDLE") return Z;
|
|
@@ -2608,101 +2639,96 @@ function In(e) {
|
|
|
2608
2639
|
let b = e.getTransitionTaskId(), x = () => {
|
|
2609
2640
|
let n = e.getTransitionTaskId();
|
|
2610
2641
|
n && s.resolveTask(n), b && t.delete(b);
|
|
2611
|
-
}, S =
|
|
2612
|
-
|
|
2613
|
-
|
|
2614
|
-
|
|
2615
|
-
|
|
2616
|
-
|
|
2617
|
-
|
|
2618
|
-
|
|
2619
|
-
|
|
2620
|
-
|
|
2642
|
+
}, S = be(u), C = `${f}-true`, w = y.getAttribute(En) === "true", T = !w && K(S, C), E = `${f}-false`, D = K(S, E) ? U(S, E) : null, O = [];
|
|
2643
|
+
for (let e of Array.from(y.ownerDocument.querySelectorAll(`[${zn}][data-flemo-status="${f}"]`))) {
|
|
2644
|
+
let t = H.get(e.getAttribute(zn)), n = `${f}-${e.getAttribute("data-flemo-active")}`, r = t && K(t, n) ? U(t, n) : null;
|
|
2645
|
+
r && O.push({
|
|
2646
|
+
element: e,
|
|
2647
|
+
motion: r
|
|
2648
|
+
});
|
|
2649
|
+
}
|
|
2650
|
+
let k = D ? (D.delay + D.duration) * 1e3 : 0;
|
|
2651
|
+
for (let { motion: e } of O) k = Math.max(k, (e.delay + e.duration) * 1e3);
|
|
2652
|
+
if (!T) {
|
|
2653
|
+
if (!w && K(S, E)) {
|
|
2654
|
+
if (!m) return b && s.markGateHeld(b), Z;
|
|
2655
|
+
let e = k + 50;
|
|
2656
|
+
b && s.anchorGate(b, e + Rn);
|
|
2657
|
+
let t = setTimeout(x, e);
|
|
2658
|
+
return () => clearTimeout(t);
|
|
2621
2659
|
}
|
|
2622
2660
|
return queueMicrotask(x), Z;
|
|
2623
2661
|
}
|
|
2624
|
-
|
|
2625
|
-
|
|
2626
|
-
|
|
2627
|
-
|
|
2628
|
-
|
|
2629
|
-
|
|
2662
|
+
let A = U(S, C);
|
|
2663
|
+
if (b) if (m) {
|
|
2664
|
+
let e = (A.delay + A.duration) * 1e3;
|
|
2665
|
+
s.anchorGate(b, Math.max(e, k) + Rn);
|
|
2666
|
+
} else s.markGateHeld(b);
|
|
2667
|
+
let ee = !w && !!A, te = G("screen", u, C), j, M = () => {
|
|
2668
|
+
j !== void 0 && (clearTimeout(j), j = void 0);
|
|
2669
|
+
}, N = 0, ne, re = [], ie, ae = () => {
|
|
2670
|
+
re.forEach((e) => cancelAnimationFrame(e)), re = [], ie !== void 0 && clearTimeout(ie), ie = void 0;
|
|
2671
|
+
}, oe = () => {
|
|
2630
2672
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
2631
2673
|
shields exotic embedders. */
|
|
2632
2674
|
if (typeof requestAnimationFrame != "function") {
|
|
2633
2675
|
x();
|
|
2634
2676
|
return;
|
|
2635
2677
|
}
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
},
|
|
2678
|
+
ie = setTimeout(() => {
|
|
2679
|
+
ae(), x();
|
|
2680
|
+
}, Ln);
|
|
2639
2681
|
let e = (t) => {
|
|
2640
2682
|
if (t <= 0) {
|
|
2641
|
-
|
|
2683
|
+
ae(), x();
|
|
2642
2684
|
return;
|
|
2643
2685
|
}
|
|
2644
2686
|
re.push(requestAnimationFrame(() => e(t - 1)));
|
|
2645
2687
|
};
|
|
2646
|
-
e(
|
|
2647
|
-
},
|
|
2648
|
-
if (
|
|
2649
|
-
|
|
2688
|
+
e(In);
|
|
2689
|
+
}, se = () => {
|
|
2690
|
+
if (N <= 0) {
|
|
2691
|
+
oe();
|
|
2650
2692
|
return;
|
|
2651
2693
|
}
|
|
2652
|
-
ne = setTimeout(
|
|
2653
|
-
},
|
|
2654
|
-
e.target === y && e.animationName ===
|
|
2694
|
+
ne = setTimeout(oe, N);
|
|
2695
|
+
}, ce = Z, P = Z, le = Z, F = (e) => {
|
|
2696
|
+
e.target === y && e.animationName === te && (y.removeEventListener("animationend", F), M(), ce(), se());
|
|
2655
2697
|
};
|
|
2656
|
-
y.addEventListener("animationend",
|
|
2657
|
-
let
|
|
2658
|
-
|
|
2659
|
-
|
|
2660
|
-
r && pe.push({
|
|
2661
|
-
element: e,
|
|
2662
|
-
motion: r
|
|
2663
|
-
});
|
|
2664
|
-
}
|
|
2665
|
-
let me = M ? (M.delay + M.duration) * 1e3 : 0;
|
|
2666
|
-
for (let { motion: e } of pe) me = Math.max(me, (e.delay + e.duration) * 1e3);
|
|
2667
|
-
te = Math.max(0, Math.min(1e3, me - le));
|
|
2668
|
-
let he = le + 250, ge = () => b !== null && e.getTransitionTaskId() === b && y.isConnected && y.getAttribute("data-flemo-skip-animation") !== "true" && W(S, C), N = Fn({
|
|
2698
|
+
y.addEventListener("animationend", F);
|
|
2699
|
+
let ue = ee && m ? _(C, "active", oe) : null, de = (A.delay + A.duration) * 1e3, fe = Math.max(de, k) + 1500, pe = b ? setTimeout(() => void s.resolveTask(b), fe) : void 0;
|
|
2700
|
+
N = Math.max(0, k - de);
|
|
2701
|
+
let I = de + 250, me = () => b !== null && e.getTransitionTaskId() === b && y.isConnected && y.getAttribute("data-flemo-skip-animation") !== "true" && K(S, C), he = Wn({
|
|
2669
2702
|
element: y,
|
|
2670
|
-
expectedName:
|
|
2671
|
-
motion:
|
|
2672
|
-
isLive:
|
|
2703
|
+
expectedName: te,
|
|
2704
|
+
motion: A,
|
|
2705
|
+
isLive: me,
|
|
2673
2706
|
budgetUsed: () => t.get(b) ?? 0,
|
|
2674
2707
|
spendBudget: () => {
|
|
2675
|
-
|
|
2708
|
+
P(), le(), t.set(b, (t.get(b) ?? 0) + 1);
|
|
2676
2709
|
},
|
|
2677
2710
|
onTerminal: x
|
|
2678
2711
|
});
|
|
2679
|
-
|
|
2680
|
-
let
|
|
2681
|
-
|
|
2682
|
-
},
|
|
2683
|
-
if (
|
|
2684
|
-
|
|
2712
|
+
ce = he.detach;
|
|
2713
|
+
let ge = !1, L = () => {
|
|
2714
|
+
M(), j = setTimeout(R, I);
|
|
2715
|
+
}, R = () => {
|
|
2716
|
+
if (M(), me() && !ge) {
|
|
2717
|
+
ge = !0, P(), le(), he.fullRestart(), L();
|
|
2685
2718
|
return;
|
|
2686
2719
|
}
|
|
2687
2720
|
x();
|
|
2688
|
-
},
|
|
2689
|
-
|
|
2690
|
-
let
|
|
2691
|
-
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
e,
|
|
2695
|
-
...t ?? []
|
|
2696
|
-
];
|
|
2697
|
-
}, () => {
|
|
2698
|
-
oe(), b && D !== void 0 && ve();
|
|
2699
|
-
}) : null, F, I = () => {
|
|
2700
|
-
F !== void 0 && (clearTimeout(F), F = void 0);
|
|
2721
|
+
}, z = !ue && m, _e = z ? v(y, C) : [];
|
|
2722
|
+
z && (he.attach(), b && L());
|
|
2723
|
+
let ve = z && !Tt() ? Pn(() => [y.ownerDocument.documentElement], () => {
|
|
2724
|
+
P(), le(), b && j !== void 0 && L();
|
|
2725
|
+
}) : null, B, ye = () => {
|
|
2726
|
+
B !== void 0 && (clearTimeout(B), B = void 0);
|
|
2701
2727
|
};
|
|
2702
|
-
if (
|
|
2703
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
2704
|
-
for (let { element: t, motion: n } of
|
|
2705
|
-
let i =
|
|
2728
|
+
if (P = ye, z && b) {
|
|
2729
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = tn(A, y, e), n = D ? tn(D, y, e) : 0, r = 0;
|
|
2730
|
+
for (let { element: t, motion: n } of O) {
|
|
2731
|
+
let i = tn(n, t, e);
|
|
2706
2732
|
if (i === null) {
|
|
2707
2733
|
r = null;
|
|
2708
2734
|
break;
|
|
@@ -2710,16 +2736,36 @@ function In(e) {
|
|
|
2710
2736
|
r = Math.max(r, i);
|
|
2711
2737
|
}
|
|
2712
2738
|
let i = t !== null && n !== null && r !== null ? Math.max(t, n, r) : null;
|
|
2713
|
-
i !== null && i + 17 <
|
|
2714
|
-
|
|
2739
|
+
i !== null && i + 17 < de + N && (B = setTimeout(() => {
|
|
2740
|
+
B = void 0, me() && (y.removeEventListener("animationend", F), M(), ce(), oe());
|
|
2715
2741
|
}, i + 17));
|
|
2716
2742
|
}
|
|
2743
|
+
let V, xe = () => {
|
|
2744
|
+
V !== void 0 && (clearTimeout(V), V = void 0);
|
|
2745
|
+
};
|
|
2746
|
+
if (le = xe, z && n) {
|
|
2747
|
+
let e = tn(A, y, 1), t = D ? tn(D, y, 1) : 0, r = 0;
|
|
2748
|
+
for (let { element: e, motion: t } of O) {
|
|
2749
|
+
let n = tn(t, e, 1);
|
|
2750
|
+
if (n === null) {
|
|
2751
|
+
r = null;
|
|
2752
|
+
break;
|
|
2753
|
+
}
|
|
2754
|
+
r = Math.max(r, n);
|
|
2755
|
+
}
|
|
2756
|
+
let i = e !== null && t !== null && r !== null ? Math.max(e, t, r) : null;
|
|
2757
|
+
i !== null && (V = setTimeout(() => {
|
|
2758
|
+
V = void 0;
|
|
2759
|
+
let e = n;
|
|
2760
|
+
e && (n = null, e());
|
|
2761
|
+
}, i));
|
|
2762
|
+
}
|
|
2717
2763
|
return () => {
|
|
2718
|
-
if (
|
|
2719
|
-
|
|
2720
|
-
for (let e of
|
|
2764
|
+
if (pe !== void 0 && clearTimeout(pe), ne !== void 0 && clearTimeout(ne), ae(), ve?.(), ye(), xe(), y.removeEventListener("animationend", F), z) {
|
|
2765
|
+
he.detach();
|
|
2766
|
+
for (let e of _e) e();
|
|
2721
2767
|
}
|
|
2722
|
-
|
|
2768
|
+
M(), ue?.(), b && e.getTransitionTaskId() !== b && t.delete(b);
|
|
2723
2769
|
};
|
|
2724
2770
|
},
|
|
2725
2771
|
activeResumeEntryCount: () => t.size
|
|
@@ -2727,20 +2773,20 @@ function In(e) {
|
|
|
2727
2773
|
}
|
|
2728
2774
|
//#endregion
|
|
2729
2775
|
//#region src/utils/findScrollable.ts
|
|
2730
|
-
function
|
|
2731
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
2776
|
+
function Kn(e, t) {
|
|
2777
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = qn(e);
|
|
2732
2778
|
if (!o) return {
|
|
2733
2779
|
element: null,
|
|
2734
2780
|
hasMarker: !1
|
|
2735
2781
|
};
|
|
2736
2782
|
let s = o.closest?.(r);
|
|
2737
|
-
if (s instanceof HTMLElement &&
|
|
2783
|
+
if (s instanceof HTMLElement && Jn(s, n) && (!a || Yn(s, n))) return {
|
|
2738
2784
|
element: s,
|
|
2739
2785
|
hasMarker: !0
|
|
2740
2786
|
};
|
|
2741
2787
|
let c = o, l = 0;
|
|
2742
2788
|
for (; c && l < i;) {
|
|
2743
|
-
if (
|
|
2789
|
+
if (Jn(c, n) && (!a || Yn(c, n))) return {
|
|
2744
2790
|
element: c,
|
|
2745
2791
|
hasMarker: !1
|
|
2746
2792
|
};
|
|
@@ -2751,7 +2797,7 @@ function Ln(e, t) {
|
|
|
2751
2797
|
hasMarker: !1
|
|
2752
2798
|
};
|
|
2753
2799
|
}
|
|
2754
|
-
function
|
|
2800
|
+
function qn(e) {
|
|
2755
2801
|
if (!e) return null;
|
|
2756
2802
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
2757
2803
|
if (n && n.length) {
|
|
@@ -2759,18 +2805,18 @@ function Rn(e) {
|
|
|
2759
2805
|
}
|
|
2760
2806
|
return e instanceof HTMLElement ? e : null;
|
|
2761
2807
|
}
|
|
2762
|
-
function
|
|
2808
|
+
function Jn(e, t) {
|
|
2763
2809
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
2764
2810
|
}
|
|
2765
|
-
function
|
|
2766
|
-
if (!
|
|
2811
|
+
function Yn(e, t) {
|
|
2812
|
+
if (!Jn(e, t) || typeof window > "u") return !1;
|
|
2767
2813
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
2768
2814
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
2769
2815
|
}
|
|
2770
2816
|
//#endregion
|
|
2771
2817
|
//#region src/core/engine/createSwipeController.ts
|
|
2772
|
-
var
|
|
2773
|
-
function
|
|
2818
|
+
var Xn = "data-flemo-skip-animation";
|
|
2819
|
+
function Zn(e) {
|
|
2774
2820
|
let t = null, n = null, r = {
|
|
2775
2821
|
current: [],
|
|
2776
2822
|
prev: []
|
|
@@ -2816,9 +2862,9 @@ function Hn(e) {
|
|
|
2816
2862
|
y: e.clientY
|
|
2817
2863
|
}, u = t;
|
|
2818
2864
|
}, v = (n, i, a) => {
|
|
2819
|
-
let o =
|
|
2820
|
-
if (n === e.getElements().scope) for (let e of r.current)
|
|
2821
|
-
else if (n === t) for (let e of r.prev)
|
|
2865
|
+
let o = Y(n, i, a);
|
|
2866
|
+
if (n === e.getElements().scope) for (let e of r.current) Y(e, i, a);
|
|
2867
|
+
else if (n === t) for (let e of r.prev) Y(e, i, a);
|
|
2822
2868
|
return o;
|
|
2823
2869
|
}, y = (t) => {
|
|
2824
2870
|
let n = e.getPartnerBars(), i = [], { sharedTopBar: a, sharedBottomBar: o } = e.getElements();
|
|
@@ -2836,8 +2882,8 @@ function Hn(e) {
|
|
|
2836
2882
|
for (let e of i) e.style.willChange = c;
|
|
2837
2883
|
for (let e of s) e.style.willChange = c;
|
|
2838
2884
|
}, b = () => {
|
|
2839
|
-
for (let e of r.current)
|
|
2840
|
-
for (let e of r.prev)
|
|
2885
|
+
for (let e of r.current) J(e), e.style.removeProperty("will-change");
|
|
2886
|
+
for (let e of r.prev) J(e), e.style.removeProperty("will-change");
|
|
2841
2887
|
r = {
|
|
2842
2888
|
current: [],
|
|
2843
2889
|
prev: []
|
|
@@ -2850,10 +2896,10 @@ function Hn(e) {
|
|
|
2850
2896
|
};
|
|
2851
2897
|
}, S = (e, t, n) => {
|
|
2852
2898
|
let r = (r, i) => {
|
|
2853
|
-
let a =
|
|
2899
|
+
let a = H.get(r.getAttribute("data-flemo-part-name"));
|
|
2854
2900
|
if (!a) return;
|
|
2855
2901
|
let o = {
|
|
2856
|
-
animate:
|
|
2902
|
+
animate: Y,
|
|
2857
2903
|
element: r,
|
|
2858
2904
|
active: i
|
|
2859
2905
|
};
|
|
@@ -2862,7 +2908,7 @@ function Hn(e) {
|
|
|
2862
2908
|
for (let e of i.current) r(e, !0);
|
|
2863
2909
|
for (let e of i.prev) r(e, !1);
|
|
2864
2910
|
}, C = () => {
|
|
2865
|
-
for (let e of [...i.current, ...i.prev])
|
|
2911
|
+
for (let e of [...i.current, ...i.prev]) J(e);
|
|
2866
2912
|
i = {
|
|
2867
2913
|
current: [],
|
|
2868
2914
|
prev: []
|
|
@@ -2891,7 +2937,7 @@ function Hn(e) {
|
|
|
2891
2937
|
prevScreen: t,
|
|
2892
2938
|
onStart: (e) => {
|
|
2893
2939
|
m?.onSwipeStart?.(e, {
|
|
2894
|
-
animate:
|
|
2940
|
+
animate: Y,
|
|
2895
2941
|
currentDecorator: f,
|
|
2896
2942
|
prevDecorator: n
|
|
2897
2943
|
}), S("start", e, 0);
|
|
@@ -2908,7 +2954,7 @@ function Hn(e) {
|
|
|
2908
2954
|
prevScreen: t,
|
|
2909
2955
|
onProgress: (e, t) => {
|
|
2910
2956
|
c?.onSwipe?.(e, t, {
|
|
2911
|
-
animate:
|
|
2957
|
+
animate: Y,
|
|
2912
2958
|
currentDecorator: o,
|
|
2913
2959
|
prevDecorator: n
|
|
2914
2960
|
}), S("swipe", e, t);
|
|
@@ -2927,15 +2973,15 @@ function Hn(e) {
|
|
|
2927
2973
|
prevScreen: t,
|
|
2928
2974
|
onStart: (e) => {
|
|
2929
2975
|
u?.onSwipeEnd?.(e, {
|
|
2930
|
-
animate:
|
|
2976
|
+
animate: Y,
|
|
2931
2977
|
currentDecorator: l,
|
|
2932
2978
|
prevDecorator: n
|
|
2933
2979
|
}), S("end", e, 0);
|
|
2934
2980
|
}
|
|
2935
2981
|
})) {
|
|
2936
|
-
c?.setAttribute(
|
|
2982
|
+
c?.setAttribute(Xn, "true"), l?.setAttribute(Xn, "true");
|
|
2937
2983
|
for (let e of r.current) e.style.removeProperty("will-change");
|
|
2938
|
-
for (let e of r.prev)
|
|
2984
|
+
for (let e of r.prev) J(e), e.style.removeProperty("will-change");
|
|
2939
2985
|
r = {
|
|
2940
2986
|
current: [],
|
|
2941
2987
|
prev: []
|
|
@@ -2943,14 +2989,14 @@ function Hn(e) {
|
|
|
2943
2989
|
current: [],
|
|
2944
2990
|
prev: []
|
|
2945
2991
|
}, e.back();
|
|
2946
|
-
} else c &&
|
|
2992
|
+
} else c && J(c), t && J(t), l && J(l), n && J(n), b(), C(), e.setDragStatus("IDLE");
|
|
2947
2993
|
};
|
|
2948
2994
|
return {
|
|
2949
2995
|
pointerDown: (t) => {
|
|
2950
|
-
e.isReadyForDrag() && (f =
|
|
2996
|
+
e.isReadyForDrag() && (f = Kn(t.target, {
|
|
2951
2997
|
direction: "x",
|
|
2952
2998
|
verifyByScroll: !0
|
|
2953
|
-
}), p =
|
|
2999
|
+
}), p = Kn(t.target, {
|
|
2954
3000
|
direction: "y",
|
|
2955
3001
|
verifyByScroll: !0
|
|
2956
3002
|
}), m = t.clientX, h = t.clientY, (!f.element && !p.element || f.element || p.element) && (a = !0));
|
|
@@ -2979,7 +3025,7 @@ function Hn(e) {
|
|
|
2979
3025
|
}
|
|
2980
3026
|
//#endregion
|
|
2981
3027
|
//#region src/screen/computeBarRiding.ts
|
|
2982
|
-
function
|
|
3028
|
+
function Qn(e) {
|
|
2983
3029
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? {
|
|
2984
3030
|
app: !1,
|
|
2985
3031
|
nav: !1
|
|
@@ -2990,31 +3036,31 @@ function Un(e) {
|
|
|
2990
3036
|
}
|
|
2991
3037
|
//#endregion
|
|
2992
3038
|
//#region src/screen/pendingNetwork.ts
|
|
2993
|
-
var
|
|
2994
|
-
|
|
2995
|
-
},
|
|
2996
|
-
if (!(
|
|
2997
|
-
if (
|
|
3039
|
+
var $n = 0, er = !1, tr = () => {
|
|
3040
|
+
$n = Math.max(0, $n - 1);
|
|
3041
|
+
}, nr = () => {
|
|
3042
|
+
if (!(er || typeof window > "u")) {
|
|
3043
|
+
if (er = !0, typeof window.fetch == "function") {
|
|
2998
3044
|
let e = window.fetch.bind(window);
|
|
2999
3045
|
window.fetch = (...t) => {
|
|
3000
|
-
|
|
3046
|
+
$n += 1;
|
|
3001
3047
|
let n;
|
|
3002
3048
|
try {
|
|
3003
3049
|
n = e(...t);
|
|
3004
3050
|
} catch (e) {
|
|
3005
|
-
throw
|
|
3051
|
+
throw tr(), e;
|
|
3006
3052
|
}
|
|
3007
|
-
return n.then((e) => (
|
|
3008
|
-
throw
|
|
3053
|
+
return n.then((e) => (tr(), e), (e) => {
|
|
3054
|
+
throw tr(), e;
|
|
3009
3055
|
});
|
|
3010
3056
|
};
|
|
3011
3057
|
}
|
|
3012
3058
|
if (typeof XMLHttpRequest == "function") {
|
|
3013
3059
|
let e = XMLHttpRequest.prototype.send;
|
|
3014
3060
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
3015
|
-
|
|
3061
|
+
$n += 1;
|
|
3016
3062
|
let n = !1, r = () => {
|
|
3017
|
-
n || (n = !0,
|
|
3063
|
+
n || (n = !0, tr());
|
|
3018
3064
|
};
|
|
3019
3065
|
this.addEventListener("loadend", r);
|
|
3020
3066
|
try {
|
|
@@ -3025,28 +3071,28 @@ var Wn = 0, Gn = !1, Kn = () => {
|
|
|
3025
3071
|
};
|
|
3026
3072
|
}
|
|
3027
3073
|
}
|
|
3028
|
-
},
|
|
3074
|
+
}, rr = () => (nr(), $n > 0);
|
|
3029
3075
|
//#endregion
|
|
3030
3076
|
//#region src/screen/animStartAnchor.ts
|
|
3031
|
-
function
|
|
3077
|
+
function ir(e) {
|
|
3032
3078
|
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
3033
3079
|
}
|
|
3034
|
-
var
|
|
3035
|
-
function
|
|
3036
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
3080
|
+
var ar = 300, or = 20;
|
|
3081
|
+
function sr(e) {
|
|
3082
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, or);
|
|
3037
3083
|
}
|
|
3038
|
-
function
|
|
3039
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
3084
|
+
function cr(e) {
|
|
3085
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of sr(e)) t.decode().catch(() => {});
|
|
3040
3086
|
}
|
|
3041
|
-
var
|
|
3087
|
+
var lr = 3, ur = 40, dr = 24, fr = (e) => {
|
|
3042
3088
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
3043
3089
|
let t = e.querySelectorAll("*").length;
|
|
3044
3090
|
/* v8 ignore stop */
|
|
3045
|
-
return t <
|
|
3046
|
-
},
|
|
3091
|
+
return t < dr ? !1 : ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * ur) / t < lr;
|
|
3092
|
+
}, pr = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
3047
3093
|
let t = e.animationName;
|
|
3048
3094
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
3049
|
-
}),
|
|
3095
|
+
}), mr = (e) => {
|
|
3050
3096
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
3051
3097
|
which already requires querySelectorAll. */
|
|
3052
3098
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -3054,12 +3100,12 @@ var er = 3, tr = 40, nr = 24, rr = (e) => {
|
|
|
3054
3100
|
the guard shields exotic embedders. */
|
|
3055
3101
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
3056
3102
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
3057
|
-
if (r >=
|
|
3103
|
+
if (r >= or) break;
|
|
3058
3104
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
3059
3105
|
}
|
|
3060
3106
|
return !1;
|
|
3061
3107
|
};
|
|
3062
|
-
function
|
|
3108
|
+
function hr(e, t = {}) {
|
|
3063
3109
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
3064
3110
|
if (n) return;
|
|
3065
3111
|
let r = t.scope;
|
|
@@ -3067,7 +3113,7 @@ function or(e, t = {}) {
|
|
|
3067
3113
|
e();
|
|
3068
3114
|
return;
|
|
3069
3115
|
}
|
|
3070
|
-
let i =
|
|
3116
|
+
let i = sr(r);
|
|
3071
3117
|
if (i.length === 0) {
|
|
3072
3118
|
e();
|
|
3073
3119
|
return;
|
|
@@ -3084,15 +3130,15 @@ function or(e, t = {}) {
|
|
|
3084
3130
|
e();
|
|
3085
3131
|
return;
|
|
3086
3132
|
}
|
|
3087
|
-
if (!
|
|
3133
|
+
if (!fr(r)) {
|
|
3088
3134
|
e();
|
|
3089
3135
|
return;
|
|
3090
3136
|
}
|
|
3091
3137
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
3092
3138
|
the fallback only shields exotic embedders. */
|
|
3093
|
-
let i = typeof performance < "u" ? performance.now() : 0, o = () => (typeof performance < "u" ? performance.now() : 0) - i, s = [], c = !1, l = !1, u = () =>
|
|
3139
|
+
let i = typeof performance < "u" ? performance.now() : 0, o = () => (typeof performance < "u" ? performance.now() : 0) - i, s = [], c = !1, l = !1, u = () => fr(r) && pr(r), d = () => rr() || mr(r), f = () => {
|
|
3094
3140
|
l || (l = !0, h.disconnect(), clearTimeout(g), clearTimeout(_), clearTimeout(v), s.forEach((e) => cancelAnimationFrame(e)), s = [], e());
|
|
3095
|
-
}, p = () => !
|
|
3141
|
+
}, p = () => !fr(r) && !d() ? 2 : 6, m = () => {
|
|
3096
3142
|
s.forEach((e) => cancelAnimationFrame(e)), s = [];
|
|
3097
3143
|
let e = (t) => {
|
|
3098
3144
|
if (t <= 0) {
|
|
@@ -3150,14 +3196,14 @@ function or(e, t = {}) {
|
|
|
3150
3196
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
3151
3197
|
};
|
|
3152
3198
|
}
|
|
3153
|
-
function
|
|
3154
|
-
let n =
|
|
3199
|
+
function gr(e, t = {}) {
|
|
3200
|
+
let n = hr(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
3155
3201
|
return () => {
|
|
3156
3202
|
n(), clearTimeout(i);
|
|
3157
3203
|
};
|
|
3158
3204
|
}
|
|
3159
|
-
var
|
|
3160
|
-
function
|
|
3205
|
+
var _r = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
3206
|
+
function vr() {
|
|
3161
3207
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
3162
3208
|
clearTimeout(n.backstop), e.delete(t);
|
|
3163
3209
|
let r = [...n.members];
|
|
@@ -3167,14 +3213,14 @@ function lr() {
|
|
|
3167
3213
|
return { join: (r, i, a) => {
|
|
3168
3214
|
let o = e.get(r);
|
|
3169
3215
|
if (o) {
|
|
3170
|
-
let e =
|
|
3216
|
+
let e = _r(a);
|
|
3171
3217
|
if (e > o.backstopMs) {
|
|
3172
3218
|
clearTimeout(o.backstop);
|
|
3173
3219
|
let n = o;
|
|
3174
3220
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
3175
3221
|
}
|
|
3176
3222
|
} else {
|
|
3177
|
-
let n =
|
|
3223
|
+
let n = _r(a), i = {
|
|
3178
3224
|
members: /* @__PURE__ */ new Set(),
|
|
3179
3225
|
backstop: setTimeout(() => t(r, i), n),
|
|
3180
3226
|
backstopMs: n
|
|
@@ -3184,7 +3230,7 @@ function lr() {
|
|
|
3184
3230
|
let s = o, c = {
|
|
3185
3231
|
release: i,
|
|
3186
3232
|
ready: !1,
|
|
3187
|
-
cancelReadiness:
|
|
3233
|
+
cancelReadiness: hr(() => {
|
|
3188
3234
|
c.ready = !0, n(s) && t(r, s);
|
|
3189
3235
|
}, a)
|
|
3190
3236
|
};
|
|
@@ -3201,7 +3247,7 @@ function lr() {
|
|
|
3201
3247
|
}
|
|
3202
3248
|
//#endregion
|
|
3203
3249
|
//#region src/screen/observeBarHeight.ts
|
|
3204
|
-
function
|
|
3250
|
+
function yr(e, t) {
|
|
3205
3251
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
3206
3252
|
let n = new ResizeObserver(([e]) => {
|
|
3207
3253
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -3212,14 +3258,14 @@ function ur(e, t) {
|
|
|
3212
3258
|
}
|
|
3213
3259
|
//#endregion
|
|
3214
3260
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
3215
|
-
var
|
|
3216
|
-
function
|
|
3261
|
+
var br = 0;
|
|
3262
|
+
function xr(e) {
|
|
3217
3263
|
let t = 0, n = () => {
|
|
3218
3264
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
3219
3265
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
3220
3266
|
t = t < 0 ? 0 : t;
|
|
3221
|
-
let n = t -
|
|
3222
|
-
n = n < 0 ? 0 : n,
|
|
3267
|
+
let n = t - br;
|
|
3268
|
+
n = n < 0 ? 0 : n, br ||= t, e(t, n);
|
|
3223
3269
|
});
|
|
3224
3270
|
};
|
|
3225
3271
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -3228,30 +3274,30 @@ function fr(e) {
|
|
|
3228
3274
|
}
|
|
3229
3275
|
//#endregion
|
|
3230
3276
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
3231
|
-
var
|
|
3277
|
+
var Sr = 8, Cr = 2, Q = 96, wr = 15e3, Tr = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", Er = "data-flemo-image-src", Dr = "flemo-image-scale-v1", Or = (e) => {
|
|
3232
3278
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
3233
3279
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
3234
3280
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
3235
|
-
},
|
|
3281
|
+
}, kr = "onmessage = async (e) => {\n const { url, targetWidth, neededArea, ratio } = e.data;\n try {\n const response = await fetch(url);\n if (!response.ok) throw new Error(\"http \" + response.status);\n const blob = await response.blob();\n const full = await createImageBitmap(blob);\n if (full.width * full.height <= neededArea * ratio) {\n full.close();\n postMessage({ url, skip: true });\n return;\n }\n const scale = targetWidth / full.width;\n const canvas = new OffscreenCanvas(targetWidth, Math.max(1, Math.round(full.height * scale)));\n const context = canvas.getContext(\"2d\");\n context.imageSmoothingQuality = \"high\";\n context.drawImage(full, 0, 0, canvas.width, canvas.height);\n full.close();\n const out = await canvas.convertToBlob({ type: \"image/jpeg\", quality: 0.85 });\n postMessage({ url, blob: out });\n } catch (error) {\n postMessage({ url, error: String(error) });\n }\n};", Ar = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", jr = async (e, t) => {
|
|
3236
3282
|
try {
|
|
3237
3283
|
if (typeof caches > "u") return;
|
|
3238
|
-
await (await caches.open(
|
|
3284
|
+
await (await caches.open(Dr)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
3239
3285
|
} catch {}
|
|
3240
|
-
},
|
|
3286
|
+
}, Mr = async (e) => {
|
|
3241
3287
|
try {
|
|
3242
3288
|
if (typeof caches > "u") return null;
|
|
3243
|
-
let t = await (await caches.open(
|
|
3289
|
+
let t = await (await caches.open(Dr)).match(e);
|
|
3244
3290
|
return t ? await t.blob() : null;
|
|
3245
3291
|
} catch {
|
|
3246
3292
|
return null;
|
|
3247
3293
|
}
|
|
3248
3294
|
};
|
|
3249
|
-
function
|
|
3250
|
-
if (!
|
|
3295
|
+
function Nr(e) {
|
|
3296
|
+
if (!Ar()) return () => {};
|
|
3251
3297
|
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new Set(), c = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, l = () => {
|
|
3252
3298
|
if (t) return t;
|
|
3253
3299
|
try {
|
|
3254
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
3300
|
+
t = new Worker(URL.createObjectURL(new Blob([kr])));
|
|
3255
3301
|
} catch {
|
|
3256
3302
|
return null;
|
|
3257
3303
|
}
|
|
@@ -3262,7 +3308,7 @@ function wr(e) {
|
|
|
3262
3308
|
return;
|
|
3263
3309
|
}
|
|
3264
3310
|
let o = URL.createObjectURL(n);
|
|
3265
|
-
s.add(o),
|
|
3311
|
+
s.add(o), jr(t, n), u(t, o);
|
|
3266
3312
|
}, t;
|
|
3267
3313
|
}, u = (e, t) => {
|
|
3268
3314
|
r.has(e) || r.set(e, t);
|
|
@@ -3272,12 +3318,12 @@ function wr(e) {
|
|
|
3272
3318
|
if (n) {
|
|
3273
3319
|
if (a.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
3274
3320
|
if (t && t !== "skip") {
|
|
3275
|
-
e.setAttribute(
|
|
3321
|
+
e.setAttribute(Er, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
3276
3322
|
let r = e.closest("picture");
|
|
3277
3323
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
3278
3324
|
e.src = t;
|
|
3279
3325
|
}
|
|
3280
|
-
} else e.getAttribute("src") ===
|
|
3326
|
+
} else e.getAttribute("src") === Tr && (t && t !== "skip" ? e.src = t : (e.removeAttribute(Er), e.src = n.url));
|
|
3281
3327
|
n.previousVisibility ? e.style.visibility = n.previousVisibility : e.style.removeProperty("visibility");
|
|
3282
3328
|
}
|
|
3283
3329
|
}, f = (e, t, n) => {
|
|
@@ -3285,7 +3331,7 @@ function wr(e) {
|
|
|
3285
3331
|
let a = l();
|
|
3286
3332
|
if (!a) return;
|
|
3287
3333
|
i.add(e);
|
|
3288
|
-
let o = Math.round(Math.max(Q, t * c()) *
|
|
3334
|
+
let o = Math.round(Math.max(Q, t * c()) * Cr), s = Math.max(t * n, Q * Q) * c() ** 2;
|
|
3289
3335
|
a.postMessage({
|
|
3290
3336
|
url: e,
|
|
3291
3337
|
targetWidth: o,
|
|
@@ -3297,13 +3343,13 @@ function wr(e) {
|
|
|
3297
3343
|
let t = {
|
|
3298
3344
|
url: "",
|
|
3299
3345
|
previousVisibility: e.style.visibility,
|
|
3300
|
-
timeout: setTimeout(() => d(e, null),
|
|
3346
|
+
timeout: setTimeout(() => d(e, null), wr),
|
|
3301
3347
|
responsive: !0
|
|
3302
3348
|
}, i = () => {
|
|
3303
3349
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
3304
3350
|
here, so the final fallback arm is unreachable. */
|
|
3305
3351
|
let i = e.currentSrc || e.getAttribute("src") || "", o = e.getBoundingClientRect();
|
|
3306
|
-
if (!(/^https?:/.test(i) &&
|
|
3352
|
+
if (!(/^https?:/.test(i) && Or({
|
|
3307
3353
|
naturalWidth: e.naturalWidth,
|
|
3308
3354
|
naturalHeight: e.naturalHeight,
|
|
3309
3355
|
boxWidth: o.width || Q,
|
|
@@ -3319,7 +3365,7 @@ function wr(e) {
|
|
|
3319
3365
|
d(e, l);
|
|
3320
3366
|
return;
|
|
3321
3367
|
}
|
|
3322
|
-
|
|
3368
|
+
Mr(i).then((t) => {
|
|
3323
3369
|
if (!(n || !a.has(e))) {
|
|
3324
3370
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
3325
3371
|
releases every held element of the url first, so a still-held
|
|
@@ -3358,14 +3404,14 @@ function wr(e) {
|
|
|
3358
3404
|
let i = r.get(t);
|
|
3359
3405
|
if (i !== "skip") {
|
|
3360
3406
|
if (i) {
|
|
3361
|
-
e.setAttribute(
|
|
3407
|
+
e.setAttribute(Er, t), e.src = i;
|
|
3362
3408
|
return;
|
|
3363
3409
|
}
|
|
3364
3410
|
a.set(e, {
|
|
3365
3411
|
url: t,
|
|
3366
3412
|
previousVisibility: e.style.visibility,
|
|
3367
|
-
timeout: setTimeout(() => d(e, null),
|
|
3368
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
3413
|
+
timeout: setTimeout(() => d(e, null), wr)
|
|
3414
|
+
}), e.style.visibility = "hidden", e.setAttribute(Er, t), e.src = Tr, Mr(t).then((i) => {
|
|
3369
3415
|
if (n || r.has(t)) return;
|
|
3370
3416
|
if (i) {
|
|
3371
3417
|
let e = URL.createObjectURL(i);
|
|
@@ -3397,9 +3443,9 @@ function wr(e) {
|
|
|
3397
3443
|
};
|
|
3398
3444
|
}
|
|
3399
3445
|
var $ = null;
|
|
3400
|
-
function
|
|
3446
|
+
function Pr() {
|
|
3401
3447
|
return typeof document > "u" || !document.body ? () => {} : ($ ? $.count += 1 : $ = {
|
|
3402
|
-
dispose:
|
|
3448
|
+
dispose: Nr(document.body),
|
|
3403
3449
|
count: 1
|
|
3404
3450
|
}, () => {
|
|
3405
3451
|
$ && (--$.count, $.count <= 0 && ($.dispose(), $ = null));
|
|
@@ -3407,7 +3453,7 @@ function Tr() {
|
|
|
3407
3453
|
}
|
|
3408
3454
|
//#endregion
|
|
3409
3455
|
//#region src/utils/isOpaqueColor.ts
|
|
3410
|
-
function
|
|
3456
|
+
function Fr(e) {
|
|
3411
3457
|
let t = e.trim().toLowerCase();
|
|
3412
3458
|
if (t === "transparent" || t === "") return !1;
|
|
3413
3459
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -3418,7 +3464,7 @@ function Er(e) {
|
|
|
3418
3464
|
}
|
|
3419
3465
|
//#endregion
|
|
3420
3466
|
//#region src/utils/buildRoutePath.ts
|
|
3421
|
-
function
|
|
3467
|
+
function Ir(e, n) {
|
|
3422
3468
|
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();
|
|
3423
3469
|
return {
|
|
3424
3470
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -3426,4 +3472,4 @@ function Dr(e, n) {
|
|
|
3426
3472
|
};
|
|
3427
3473
|
}
|
|
3428
3474
|
//#endregion
|
|
3429
|
-
export {
|
|
3475
|
+
export { ar as ANIM_HOLD_RELEASE_BACKSTOP_MS, Er as OFFLOADED_SRC_ATTR, Sr as OVERSIZE_AREA_RATIO, En as SKIP_ANIMATION_ATTR, s as TaskManger, ir as animHoldKey, Y as animateInline, G as animationName, ie as appendParamsQuery, ot as applyTransitionStyles, Ir as buildRoutePath, Yn as canProgrammaticallyScroll, J as clearInlineAnimation, Ke as collectAnimatedProperties, nt as compileTransitionStyles, Qn as computeBarRiding, pe as computeScreenFreeze, fe as computeScreenFreezeMode, b as consumeSelfInducedPop, vr as createAnimHoldCoordinator, g as createBrowserHistoryDriver, xe as createDecorator, c as createHistoryStore, x as createHistorySync, Nr as createImageDecodeOffloader, ee as createMemoryHistoryDriver, te as createNavigateStore, ne as createNavigationController, Ee as createPartTransition, Se as createRawDecorator, De as createRawPartTransition, me as createRawTransition, ue as createRouterScope, de as createScreenSelector, P as createScreenStore, _ as createSelfPopGuard, ae as createStepController, Zn as createSwipeController, I as createTransition, Gn as createTransitionEngine, se as createTransitionStore, z as cupertino, Te as decoratorMap, cr as eagerlyDecodeImages, Je as easingToCss, Pr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, pt as enteringInitialStyle, Kn as findScrollable, l as getMatchedPathPattern, u as getParams, Bt as holdCompositorWarm, Fr as isOpaqueColor, f as isServer, ve as layout, y as markSelfInducedPop, ce as matchesPathname, B as material, ye as none, yr as observeBarHeight, xr as observeViewportScrollHeight, Jn as overflowsAxis, we as overlay, H as partTransitionMap, re as readStepParams, ft as registerTransitionDefinitions, A as releaseScopeHistorySync, be as resolveTransition, gr as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, Or as shouldOffloadImage, oe as subscribeStepParamsRestore, W as targetToDecls, V as transitionMap, K as variantHasAnimation };
|