@flemo/core 1.28.0 → 1.28.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/core/engine/__tests__/createSwipeController.revealHold.test.d.ts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.mjs +660 -686
- package/dist/transition/__tests__/swipeSettle.test.d.ts +1 -0
- package/dist/transition/animateInline.d.ts +1 -0
- package/dist/transition/swipeSettle.d.ts +9 -0
- package/package.json +1 -1
- package/dist/transition/settleScrub.d.ts +0 -19
- /package/dist/{transition/__tests__/settleScrub.test.d.ts → core/engine/__tests__/createSwipeController.releaseClock.test.d.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -587,7 +587,7 @@ var M = (e, t, n) => {
|
|
|
587
587
|
let s = await Promise.race([a, o]);
|
|
588
588
|
i(), s && r();
|
|
589
589
|
};
|
|
590
|
-
function
|
|
590
|
+
function F(e) {
|
|
591
591
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
592
592
|
let e = r.readState();
|
|
593
593
|
if (!e?.id) return null;
|
|
@@ -784,14 +784,14 @@ function te(e) {
|
|
|
784
784
|
}
|
|
785
785
|
//#endregion
|
|
786
786
|
//#region src/navigate/createStepController.ts
|
|
787
|
-
var
|
|
787
|
+
var te = (e) => {
|
|
788
788
|
let t = e;
|
|
789
789
|
return t?.step ? t.params ?? {} : null;
|
|
790
|
-
},
|
|
790
|
+
}, ne = (e, t) => {
|
|
791
791
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
792
792
|
return n ? `${e}?${n}` : e;
|
|
793
793
|
};
|
|
794
|
-
function
|
|
794
|
+
function re(e) {
|
|
795
795
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
796
796
|
return {
|
|
797
797
|
pushStep: async (e) => {
|
|
@@ -849,7 +849,7 @@ function ie(e) {
|
|
|
849
849
|
}
|
|
850
850
|
};
|
|
851
851
|
}
|
|
852
|
-
function
|
|
852
|
+
function ie(e, t) {
|
|
853
853
|
return e.subscribe((e) => {
|
|
854
854
|
let n = e.state;
|
|
855
855
|
n?.step && s.addTask(async () => {
|
|
@@ -859,7 +859,7 @@ function ae(e, t) {
|
|
|
859
859
|
}
|
|
860
860
|
//#endregion
|
|
861
861
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
862
|
+
function I(t = "cupertino") {
|
|
863
863
|
return e((e) => ({
|
|
864
864
|
defaultTransitionName: t,
|
|
865
865
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +867,18 @@ function oe(t = "cupertino") {
|
|
|
867
867
|
}
|
|
868
868
|
//#endregion
|
|
869
869
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
870
|
+
function ae(e, t) {
|
|
871
871
|
return i(e).regexp.test(t);
|
|
872
872
|
}
|
|
873
873
|
//#endregion
|
|
874
874
|
//#region src/screen/store.ts
|
|
875
|
-
var
|
|
875
|
+
var oe = (e, t) => {
|
|
876
876
|
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
877
877
|
...e,
|
|
878
878
|
height: t?.height
|
|
879
879
|
};
|
|
880
880
|
};
|
|
881
|
-
function
|
|
881
|
+
function se() {
|
|
882
882
|
return e((e) => ({
|
|
883
883
|
dragStatus: "IDLE",
|
|
884
884
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +892,8 @@ function le() {
|
|
|
892
892
|
topBar: n.topBar ? {} : void 0,
|
|
893
893
|
bottomBar: n.bottomBar ? {} : void 0
|
|
894
894
|
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
895
|
-
topBar:
|
|
896
|
-
bottomBar:
|
|
895
|
+
topBar: oe(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: oe(i.bottomBar, o?.bottomBar)
|
|
897
897
|
}, c = a?.topBar === n.topBar && a?.bottomBar === n.bottomBar, l = o?.topBar?.id === s.topBar?.id && o?.topBar?.height === s.topBar?.height && o?.bottomBar?.id === s.bottomBar?.id && o?.bottomBar?.height === s.bottomBar?.height && !!o?.topBar == !!s.topBar && !!o?.bottomBar == !!s.bottomBar;
|
|
898
898
|
return c && l ? e : {
|
|
899
899
|
sharedBars: {
|
|
@@ -942,14 +942,14 @@ function le() {
|
|
|
942
942
|
}
|
|
943
943
|
//#endregion
|
|
944
944
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
945
|
+
var ce = {
|
|
946
946
|
mark: () => {},
|
|
947
947
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
948
|
+
}, le = /* @__PURE__ */ new Map();
|
|
949
|
+
function ue(e) {
|
|
950
950
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
951
951
|
if (s) {
|
|
952
|
-
let e =
|
|
952
|
+
let e = le.get(s);
|
|
953
953
|
if (e) {
|
|
954
954
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
955
955
|
let t = e.history.getState();
|
|
@@ -979,25 +979,25 @@ function fe(e) {
|
|
|
979
979
|
layoutId: p.layoutId
|
|
980
980
|
},
|
|
981
981
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? ce : _(), g = {
|
|
983
983
|
history: c([p], 0),
|
|
984
984
|
navigate: ee(),
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
985
|
+
transition: I(i),
|
|
986
|
+
screen: se(),
|
|
987
987
|
driver: m,
|
|
988
988
|
markSelfInduced: h.mark,
|
|
989
989
|
consume: h.consume,
|
|
990
990
|
routerKey: e.routerKey,
|
|
991
991
|
zoneEntryId: e.zoneEntryId,
|
|
992
|
-
ownsPathname: (e) =>
|
|
992
|
+
ownsPathname: (e) => ae(t, e),
|
|
993
993
|
persistent: !!s,
|
|
994
994
|
life: { alive: !0 }
|
|
995
995
|
};
|
|
996
|
-
return s &&
|
|
996
|
+
return s && le.set(s, g), g;
|
|
997
997
|
}
|
|
998
998
|
//#endregion
|
|
999
999
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1000
|
+
function de(e, t) {
|
|
1001
1001
|
return e.map((n, r) => ({
|
|
1002
1002
|
...n,
|
|
1003
1003
|
isActive: r === t,
|
|
@@ -1010,82 +1010,82 @@ function pe(e, t) {
|
|
|
1010
1010
|
}
|
|
1011
1011
|
//#endregion
|
|
1012
1012
|
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
-
var
|
|
1013
|
+
var fe = "flemo:motion-driver-force", pe = !1, me = () => {
|
|
1014
1014
|
try {
|
|
1015
1015
|
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(fe);
|
|
1017
1017
|
} catch {}
|
|
1018
1018
|
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(
|
|
1019
|
+
let e = sessionStorage.getItem(fe);
|
|
1020
1020
|
if (e === null) return null;
|
|
1021
1021
|
let [t, n] = e.split("@"), r = Number(n);
|
|
1022
|
-
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!
|
|
1022
|
+
return (t === "css" || t === "raf") && n !== void 0 && Number.isFinite(r) && Math.abs(Date.now() - r) < 864e5 ? (!pe && typeof console < "u" && (pe = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${fe}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(fe), null);
|
|
1023
1023
|
} catch {
|
|
1024
1024
|
return null;
|
|
1025
1025
|
}
|
|
1026
|
-
},
|
|
1026
|
+
}, L = () => {
|
|
1027
1027
|
if (typeof navigator > "u") return !1;
|
|
1028
1028
|
let e = navigator.userAgentData?.brands;
|
|
1029
1029
|
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1030
1030
|
let t = navigator.userAgent ?? "";
|
|
1031
1031
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1032
|
-
},
|
|
1032
|
+
}, he = () => {
|
|
1033
1033
|
if (typeof navigator > "u") return !1;
|
|
1034
1034
|
let e = navigator.userAgentData?.brands;
|
|
1035
1035
|
if (Array.isArray(e)) return !1;
|
|
1036
1036
|
let t = navigator.userAgent ?? "";
|
|
1037
1037
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t) && (navigator.maxTouchPoints ?? 0) > 0;
|
|
1038
|
-
},
|
|
1038
|
+
}, ge = () => typeof navigator > "u" ? !1 : !L() && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform), _e = () => L() && typeof navigator < "u" && navigator.maxTouchPoints === 0, ve = ((e = !1) => ({
|
|
1039
1039
|
playerAllowed: () => {
|
|
1040
|
-
let t =
|
|
1040
|
+
let t = me();
|
|
1041
1041
|
return t ? t === "raf" : e;
|
|
1042
1042
|
},
|
|
1043
|
-
pinnedDriver:
|
|
1044
|
-
}))(!0),
|
|
1043
|
+
pinnedDriver: me
|
|
1044
|
+
}))(!0), ye = 28, be = 42, xe = 8, Se = 20, Ce = 6, we = 400, Te = 8, Ee = "flemo:lpm", De = () => !L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && typeof requestAnimationFrame == "function", Oe = () => {
|
|
1045
1045
|
try {
|
|
1046
|
-
return typeof sessionStorage < "u" && sessionStorage.getItem(
|
|
1046
|
+
return typeof sessionStorage < "u" && sessionStorage.getItem(Ee) === "1";
|
|
1047
1047
|
} catch {
|
|
1048
1048
|
return !1;
|
|
1049
1049
|
}
|
|
1050
|
-
},
|
|
1050
|
+
}, ke = (e) => {
|
|
1051
1051
|
try {
|
|
1052
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1052
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Ee, e ? "1" : "0");
|
|
1053
1053
|
} catch {}
|
|
1054
|
-
},
|
|
1055
|
-
if (Le || !
|
|
1054
|
+
}, Ae = !1, je = !1, Me = !1, Ne = 12, Pe = 8, Fe = [], Ie = null, Le = !1, Re = !1, ze = !1, Be = () => {
|
|
1055
|
+
if (Le || !De()) return;
|
|
1056
1056
|
Le = !0;
|
|
1057
1057
|
let e = (t) => {
|
|
1058
|
-
if (
|
|
1059
|
-
let e = [...
|
|
1060
|
-
t[t.length - 1] - t[0] <=
|
|
1058
|
+
if (Ie !== null && (Fe.push(t - Ie), Fe.length > Ne && Fe.shift(), Fe.length >= Pe)) {
|
|
1059
|
+
let e = [...Fe].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
+
t[t.length - 1] - t[0] <= xe && (Re = n >= ye && n <= be, ze = !0);
|
|
1061
1061
|
}
|
|
1062
|
-
|
|
1062
|
+
Ie = t, requestAnimationFrame(e);
|
|
1063
1063
|
};
|
|
1064
1064
|
requestAnimationFrame(e);
|
|
1065
|
-
}, Ve = () =>
|
|
1066
|
-
if (
|
|
1067
|
-
|
|
1065
|
+
}, Ve = () => Ae || ze && Re, He = () => De(), Ue = (e = 0) => {
|
|
1066
|
+
if (je || !De()) return;
|
|
1067
|
+
je = !0;
|
|
1068
1068
|
let t = [], n = null, r = (i) => {
|
|
1069
|
-
if (n !== null && t.push(i - n), n = i, t.length <
|
|
1069
|
+
if (n !== null && t.push(i - n), n = i, t.length < Ce) {
|
|
1070
1070
|
requestAnimationFrame(r);
|
|
1071
1071
|
return;
|
|
1072
1072
|
}
|
|
1073
|
-
|
|
1074
|
-
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >=
|
|
1073
|
+
je = !1;
|
|
1074
|
+
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >= ye && o[o.length - 1] <= be && o[o.length - 1] - o[0] <= xe, c = o[o.length - 1] <= Se;
|
|
1075
1075
|
if (s || c) {
|
|
1076
|
-
|
|
1076
|
+
Ae = s, s && o[Math.floor(o.length / 2)], ke(Ae);
|
|
1077
1077
|
return;
|
|
1078
1078
|
}
|
|
1079
1079
|
/* v8 ignore next 3 -- setTimeout exists in every runtime under test. */
|
|
1080
|
-
e + 1 <
|
|
1080
|
+
e + 1 < Te && typeof setTimeout == "function" && setTimeout(() => Ue(e + 1), we);
|
|
1081
1081
|
};
|
|
1082
1082
|
requestAnimationFrame(r);
|
|
1083
1083
|
}, We = () => {
|
|
1084
|
-
Be(), Ue(), !(
|
|
1084
|
+
Be(), Ue(), !(Me || typeof document > "u" || typeof document.addEventListener != "function") && (Me = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
1085
|
document.visibilityState === "visible" && Ue();
|
|
1086
1086
|
}));
|
|
1087
1087
|
};
|
|
1088
|
-
|
|
1088
|
+
De() && (Ae = Oe(), Be(), Ue());
|
|
1089
1089
|
var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
1090
1090
|
try {
|
|
1091
1091
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(Ye) : null;
|
|
@@ -1109,7 +1109,7 @@ var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
|
1109
1109
|
}
|
|
1110
1110
|
e < Ge && (et = 0, $e || Ze("0"));
|
|
1111
1111
|
}
|
|
1112
|
-
}, rt = () => !$e && et >= qe, it = () => rt() &&
|
|
1112
|
+
}, rt = () => !$e && et >= qe, it = () => rt() && L() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= Je, R = (e) => {
|
|
1113
1113
|
try {
|
|
1114
1114
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
1115
|
} catch {
|
|
@@ -1118,16 +1118,16 @@ var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
|
1118
1118
|
}, at = () => R("flemo:landing-snap") === "on", ot = () => {
|
|
1119
1119
|
let e = R("flemo:imghold");
|
|
1120
1120
|
return e === "on" || e === "off" ? e : null;
|
|
1121
|
-
}, st = () =>
|
|
1121
|
+
}, st = () => L() && (navigator.maxTouchPoints ?? 0) > 0, ct = () => {
|
|
1122
1122
|
try {
|
|
1123
1123
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
-
return e === "on" ? !0 : e === "off" ? !1 : He() || it() || st() ||
|
|
1124
|
+
return e === "on" ? !0 : e === "off" ? !1 : He() || it() || st() || ge();
|
|
1125
1125
|
} catch {
|
|
1126
1126
|
return !1;
|
|
1127
1127
|
}
|
|
1128
1128
|
}, lt = () => R("flemo:handoff") === "on", ut = () => R("flemo:arrivalhold") !== "off", dt = () => {
|
|
1129
1129
|
let e = R("flemo:deskflip");
|
|
1130
|
-
return e === "on" || e !== "off" &&
|
|
1130
|
+
return e === "on" || e !== "off" && ge();
|
|
1131
1131
|
}, ft = () => {
|
|
1132
1132
|
let e = R("flemo:creep");
|
|
1133
1133
|
return e === "on" || e !== "off" && He();
|
|
@@ -1136,7 +1136,7 @@ var Ge = 14, Ke = 22, qe = 2, Je = 1.5, Ye = "flemo:sixty", Xe = () => {
|
|
|
1136
1136
|
return e === "defer" || e !== "sync" && He();
|
|
1137
1137
|
}, mt = () => {
|
|
1138
1138
|
let e = R("flemo:deskhead");
|
|
1139
|
-
return e === "on" || e !== "off" &&
|
|
1139
|
+
return e === "on" || e !== "off" && ge();
|
|
1140
1140
|
}, ht = () => R("flemo:preraster") === "on", gt = () => ht(), _t = () => {
|
|
1141
1141
|
let e = R("flemo:imgoffload");
|
|
1142
1142
|
return e === "on" || e === "off" ? e : null;
|
|
@@ -1269,10 +1269,10 @@ var It = (e, t, n) => {
|
|
|
1269
1269
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1270
1270
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1271
1271
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1272
|
-
duration:
|
|
1272
|
+
duration: Rt,
|
|
1273
1273
|
ease: zt
|
|
1274
1274
|
}), n(i, { x: c ? 0 : `-${Lt}%` }, {
|
|
1275
|
-
duration:
|
|
1275
|
+
duration: Rt,
|
|
1276
1276
|
ease: zt
|
|
1277
1277
|
})]), c;
|
|
1278
1278
|
}
|
|
@@ -1543,10 +1543,10 @@ var Yt = "rgba(0, 0, 0, 0.1)", Xt = qt({
|
|
|
1543
1543
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1544
1544
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1545
1545
|
}
|
|
1546
|
-
}),
|
|
1546
|
+
}), Zt = /* @__PURE__ */ new Map([["overlay", Xt]]);
|
|
1547
1547
|
//#endregion
|
|
1548
1548
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1549
|
-
function
|
|
1549
|
+
function Qt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1550
1550
|
return {
|
|
1551
1551
|
name: e,
|
|
1552
1552
|
initial: t,
|
|
@@ -1567,7 +1567,7 @@ function Zt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1567
1567
|
}
|
|
1568
1568
|
//#endregion
|
|
1569
1569
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1570
|
-
function
|
|
1570
|
+
function $t({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1571
1571
|
return {
|
|
1572
1572
|
name: e,
|
|
1573
1573
|
initial: t,
|
|
@@ -1588,7 +1588,7 @@ function Qt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1588
1588
|
}
|
|
1589
1589
|
//#endregion
|
|
1590
1590
|
//#region src/transition/partTransition/partTransition.ts
|
|
1591
|
-
var
|
|
1591
|
+
var z = /* @__PURE__ */ new Map(), en = {
|
|
1592
1592
|
"IDLE-true": "self",
|
|
1593
1593
|
"IDLE-false": "self",
|
|
1594
1594
|
"PUSHING-true": "initial",
|
|
@@ -1599,17 +1599,17 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1599
1599
|
"POPPING-false": "PUSHING-false",
|
|
1600
1600
|
"COMPLETED-true": "self",
|
|
1601
1601
|
"COMPLETED-false": "self"
|
|
1602
|
-
},
|
|
1602
|
+
}, tn = Object.keys(en), nn = (e) => {
|
|
1603
1603
|
if (!e) return 0;
|
|
1604
1604
|
let t = e.duration;
|
|
1605
1605
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1606
|
-
},
|
|
1607
|
-
let n =
|
|
1606
|
+
}, rn = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, an = (e, t) => {
|
|
1607
|
+
let n = en[t];
|
|
1608
1608
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1609
|
-
},
|
|
1610
|
-
let n =
|
|
1609
|
+
}, B = (e, t) => {
|
|
1610
|
+
let n = an(e, t);
|
|
1611
1611
|
if (n === null) return null;
|
|
1612
|
-
let r = e.variants[t], i =
|
|
1612
|
+
let r = e.variants[t], i = nn(r.options), a = rn(r.options);
|
|
1613
1613
|
return i <= 0 && a <= 0 ? null : {
|
|
1614
1614
|
from: n,
|
|
1615
1615
|
to: r.value,
|
|
@@ -1617,7 +1617,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1617
1617
|
delay: a,
|
|
1618
1618
|
ease: r.options?.ease
|
|
1619
1619
|
};
|
|
1620
|
-
},
|
|
1620
|
+
}, on = tn, sn = "translateZ(0.02px)", cn = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), ln = (e) => typeof e == "object" && !!e && !Array.isArray(e), un = /* @__PURE__ */ new Set(/* @__PURE__ */ "opacity.scale.scaleX.scaleY.scaleZ.aspectRatio.columnCount.columns.flex.flexGrow.flexShrink.fontWeight.gridArea.gridColumn.gridColumnEnd.gridColumnStart.gridRow.gridRowEnd.gridRowStart.lineHeight.lineClamp.order.orphans.tabSize.widows.zIndex.zoom.fillOpacity.floodOpacity.stopOpacity.strokeOpacity.strokeDasharray.strokeDashoffset.strokeMiterlimit.strokeWidth".split(".")), dn = (e, t) => t.startsWith("--") || un.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, fn = (e, t) => typeof t == "number" ? dn(t, e) : typeof t == "string" ? t : "", pn = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), mn = /* @__PURE__ */ new Set([
|
|
1621
1621
|
"x",
|
|
1622
1622
|
"y",
|
|
1623
1623
|
"z",
|
|
@@ -1628,7 +1628,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1628
1628
|
"rotateX",
|
|
1629
1629
|
"rotateY",
|
|
1630
1630
|
"rotateZ"
|
|
1631
|
-
]),
|
|
1631
|
+
]), hn = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, gn = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, _n = /^1(\.0+)?$/, vn = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && _n.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && gn.test(t.trim()) : t === 0 || typeof t == "string" && hn.test(t.trim()), yn = (e, t) => {
|
|
1632
1632
|
switch (e) {
|
|
1633
1633
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1634
1634
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1642,16 +1642,16 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1642
1642
|
case "rotateY": return `rotateY(${t})`;
|
|
1643
1643
|
default: return "";
|
|
1644
1644
|
}
|
|
1645
|
-
},
|
|
1645
|
+
}, bn = (e) => {
|
|
1646
1646
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1647
|
-
if (!
|
|
1647
|
+
if (!ln(e)) return;
|
|
1648
1648
|
let n = [];
|
|
1649
1649
|
for (let r of Object.keys(e)) {
|
|
1650
|
-
let i = e[r], a =
|
|
1651
|
-
if (a !== "") if (
|
|
1650
|
+
let i = e[r], a = fn(r, i);
|
|
1651
|
+
if (a !== "") if (mn.has(r)) n.push(`${r}:${a}`);
|
|
1652
1652
|
else {
|
|
1653
|
-
let e = t.get(
|
|
1654
|
-
e.add(a), t.set(
|
|
1653
|
+
let e = t.get(pn(r)) ?? /* @__PURE__ */ new Set();
|
|
1654
|
+
e.add(a), t.set(pn(r), e);
|
|
1655
1655
|
}
|
|
1656
1656
|
}
|
|
1657
1657
|
r.add(n.sort().join("|"));
|
|
@@ -1661,13 +1661,13 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1661
1661
|
n = r.size > 1;
|
|
1662
1662
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1663
1663
|
return n && a.push("transform"), a;
|
|
1664
|
-
},
|
|
1665
|
-
if (!
|
|
1664
|
+
}, xn = (e) => {
|
|
1665
|
+
if (!ln(e)) return [];
|
|
1666
1666
|
let t = [], n = !0, r = [];
|
|
1667
1667
|
for (let i of Object.keys(e)) {
|
|
1668
|
-
let a = e[i], o =
|
|
1669
|
-
o !== "" && (
|
|
1670
|
-
property:
|
|
1668
|
+
let a = e[i], o = fn(i, a);
|
|
1669
|
+
o !== "" && (mn.has(i) ? (t.push(yn(i, o)), vn(i, a) || (n = !1)) : r.push({
|
|
1670
|
+
property: pn(i),
|
|
1671
1671
|
value: o
|
|
1672
1672
|
}));
|
|
1673
1673
|
}
|
|
@@ -1675,7 +1675,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1675
1675
|
property: "transform",
|
|
1676
1676
|
value: n ? "none" : t.join(" ")
|
|
1677
1677
|
}), r;
|
|
1678
|
-
},
|
|
1678
|
+
}, V = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), Sn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1679
1679
|
linear: "linear",
|
|
1680
1680
|
easeIn: "ease-in",
|
|
1681
1681
|
easeOut: "ease-out",
|
|
@@ -1685,33 +1685,33 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1685
1685
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1686
1686
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1687
1687
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1688
|
-
}[e] ?? "ease" : "ease",
|
|
1688
|
+
}[e] ?? "ease" : "ease", Cn = (e, t) => {
|
|
1689
1689
|
let [n, r] = t.split("-");
|
|
1690
1690
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1691
|
-
},
|
|
1691
|
+
}, wn = (e, t) => {
|
|
1692
1692
|
let [n, r] = t.split("-");
|
|
1693
1693
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1694
|
-
},
|
|
1694
|
+
}, Tn = (e, t) => {
|
|
1695
1695
|
let [n, r] = t.split("-");
|
|
1696
1696
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1697
|
-
},
|
|
1697
|
+
}, En = (e, t) => {
|
|
1698
1698
|
let [n, r] = t.split("-");
|
|
1699
1699
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1700
|
-
},
|
|
1700
|
+
}, Dn = (e, t, n) => `flemo-${e}-${cn(t)}-${n}`, On = [
|
|
1701
1701
|
"-lpm",
|
|
1702
1702
|
"-deskhead",
|
|
1703
1703
|
"-lpmcreep"
|
|
1704
|
-
],
|
|
1705
|
-
let o =
|
|
1704
|
+
], kn = (e, t) => e === t || On.some((n) => e === `${t}${n}`), An = (e, t, n, r, i, a) => {
|
|
1705
|
+
let o = xn(r), s = xn(i.value), c = new Set(o.filter((e) => s.some((t) => t.property === e.property && t.value === e.value)).map((e) => e.property)), l = o.filter((e) => c.has(e.property)), u = o.filter((e) => !c.has(e.property)), d = s.filter((e) => !c.has(e.property)), f = nn(i.options), p = rn(i.options), m = Sn(i.options?.ease), h = a(t, n), g = e === "screen" ? `${h},\n${Tn(t, n)}` : h;
|
|
1706
1706
|
if (s.length === 0 && o.length === 0) return "";
|
|
1707
|
-
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${
|
|
1708
|
-
let _ =
|
|
1707
|
+
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${V(s)}\n animation: none;\n}`;
|
|
1708
|
+
let _ = Dn(e, t, n), v = [
|
|
1709
1709
|
`@keyframes ${_} {`,
|
|
1710
1710
|
" from {",
|
|
1711
|
-
|
|
1711
|
+
V(u).replace(/^/gm, " "),
|
|
1712
1712
|
" }",
|
|
1713
1713
|
" to {",
|
|
1714
|
-
|
|
1714
|
+
V(d).replace(/^/gm, " "),
|
|
1715
1715
|
" }",
|
|
1716
1716
|
"}"
|
|
1717
1717
|
].join("\n"), y = [
|
|
@@ -1723,7 +1723,7 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1723
1723
|
].filter(Boolean).join(" "), b = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, x = (e) => e.startsWith("REPLACING") || e.startsWith("PUSHING") ? .033 : e.startsWith("POPPING") ? .017 : 0, S = (t, n, r, i) => {
|
|
1724
1724
|
if (e === "part" || r <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1725
1725
|
let a = f + r, c = (r / a * 100).toFixed(3), l = `${_}-${n}`, m = g.split(",\n").map((e) => `:root[${t}] ${e}`).join(",\n");
|
|
1726
|
-
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${
|
|
1726
|
+
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${V(u).replace(/^/gm, " ")}\n }\n 100% {\n${V(d).replace(/^/gm, " ")}\n }\n}\n${m} {\n animation-name: ${l};\n animation-duration: ${a.toFixed(3)}s;\n animation-delay: ${(i ? p + r : p).toFixed(3)}s;\n}`;
|
|
1727
1727
|
}, C = (t, n) => e !== "part" || n <= 0 || f <= 0 ? "" : `\n${((e = "") => g.split(",\n").map((n) => `:root[${t}]${e} ${n}`).join(",\n"))()} {\n animation-delay: ${(p + n).toFixed(3)}s;\n}`, w = (() => {
|
|
1728
1728
|
/* v8 ignore next */
|
|
1729
1729
|
if (e === "part") return "";
|
|
@@ -1735,69 +1735,69 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1735
1735
|
let e = u.find((e) => e.property === "transform");
|
|
1736
1736
|
if (!e) return [...u, {
|
|
1737
1737
|
property: "transform",
|
|
1738
|
-
value:
|
|
1738
|
+
value: sn
|
|
1739
1739
|
}];
|
|
1740
1740
|
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1741
1741
|
return u.map((e) => e.property === "transform" ? {
|
|
1742
1742
|
property: "transform",
|
|
1743
|
-
value: `${t}${
|
|
1743
|
+
value: `${t}${sn}`
|
|
1744
1744
|
} : e);
|
|
1745
1745
|
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-lpmcreep`, l = g.split(",\n").map((e) => `:root[data-flemo-lpm][data-flemo-creep] ${e}`).join(",\n");
|
|
1746
|
-
return `\n@keyframes ${c} {\n 0% {\n${
|
|
1746
|
+
return `\n@keyframes ${c} {\n 0% {\n${V(u).replace(/^/gm, " ")}\n }\n ${a}% {\n${V(r).replace(/^/gm, " ")}\n }\n 100% {\n${V(d).replace(/^/gm, " ")}\n }\n}\n${l} {\n animation-name: ${c};\n animation-duration: ${i.toFixed(3)}s;\n animation-delay: ${(p + t).toFixed(3)}s;\n}`;
|
|
1747
1747
|
})(), T = S("data-flemo-lpm", "lpm", b(n), !0), E = C("data-flemo-lpm", b(n)), D = S("data-flemo-desk-head", "deskhead", x(n), !1), O = C("data-flemo-desk-head", x(n)), k = new Map(u.map((e) => [e.property, e.value])), A = new Map(d.map((e) => [e.property, e.value])), j = Array.from(/* @__PURE__ */ new Set([...k.keys(), ...A.keys()])).filter((e) => k.get(e) !== A.get(e)), ee = j.length > 0 ? ` will-change: ${j.join(", ")};\n` : "", M = n.split("-")[0], N = M === "PUSHING" || M === "REPLACING" ? " contain: layout;\n" : "";
|
|
1748
|
-
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${
|
|
1749
|
-
},
|
|
1748
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${V(l)}\n` : ""}${ee}${N}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && jn(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && jn(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${V(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && jn(r) && s.length > 0 ? `\n${h}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${V(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1749
|
+
}, jn = (e) => {
|
|
1750
1750
|
if (!e) return !1;
|
|
1751
1751
|
if (e.opacity === 0) return !0;
|
|
1752
1752
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1753
1753
|
return t(e.x) || t(e.y);
|
|
1754
|
-
},
|
|
1755
|
-
let i =
|
|
1756
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1757
|
-
},
|
|
1754
|
+
}, Mn = (e, t, n, r) => {
|
|
1755
|
+
let i = xn(r.value);
|
|
1756
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${V(i)}\n}`;
|
|
1757
|
+
}, Nn = (e, t, n = []) => {
|
|
1758
1758
|
let r = [];
|
|
1759
1759
|
for (let t of e) {
|
|
1760
1760
|
let e = t.name;
|
|
1761
|
-
for (let n of
|
|
1762
|
-
let i = t.variants[n], a =
|
|
1761
|
+
for (let n of tn) {
|
|
1762
|
+
let i = t.variants[n], a = en[n];
|
|
1763
1763
|
if (a === "self") {
|
|
1764
|
-
r.push(
|
|
1764
|
+
r.push(Mn(Cn, e, n, i));
|
|
1765
1765
|
continue;
|
|
1766
1766
|
}
|
|
1767
1767
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1768
|
-
r.push(
|
|
1768
|
+
r.push(An("screen", e, n, o, i, Cn));
|
|
1769
1769
|
}
|
|
1770
1770
|
}
|
|
1771
1771
|
for (let e of t) {
|
|
1772
1772
|
let t = e.name;
|
|
1773
|
-
for (let n of
|
|
1774
|
-
let i = e.variants[n], a =
|
|
1773
|
+
for (let n of on) {
|
|
1774
|
+
let i = e.variants[n], a = en[n];
|
|
1775
1775
|
if (a === "self") {
|
|
1776
|
-
r.push(
|
|
1776
|
+
r.push(Mn(wn, t, n, i));
|
|
1777
1777
|
continue;
|
|
1778
1778
|
}
|
|
1779
1779
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1780
|
-
r.push(
|
|
1780
|
+
r.push(An("decorator", t, n, o, i, wn));
|
|
1781
1781
|
}
|
|
1782
1782
|
}
|
|
1783
1783
|
for (let e of n) {
|
|
1784
1784
|
let t = e.name;
|
|
1785
|
-
for (let n of
|
|
1786
|
-
let i = e.variants[n], a =
|
|
1785
|
+
for (let n of on) {
|
|
1786
|
+
let i = e.variants[n], a = en[n];
|
|
1787
1787
|
if (a === "self") {
|
|
1788
|
-
r.push(
|
|
1788
|
+
r.push(Mn(En, t, n, i));
|
|
1789
1789
|
continue;
|
|
1790
1790
|
}
|
|
1791
1791
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1792
|
-
r.push(
|
|
1792
|
+
r.push(An("part", t, n, o, i, En));
|
|
1793
1793
|
}
|
|
1794
1794
|
}
|
|
1795
1795
|
return [
|
|
1796
1796
|
...r.filter((e) => e.length > 0),
|
|
1797
|
-
|
|
1798
|
-
|
|
1797
|
+
Pn,
|
|
1798
|
+
Fn
|
|
1799
1799
|
].join("\n\n");
|
|
1800
|
-
},
|
|
1800
|
+
}, Pn = [
|
|
1801
1801
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1802
1802
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1803
1803
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
@@ -1808,145 +1808,73 @@ var B = /* @__PURE__ */ new Map(), $t = {
|
|
|
1808
1808
|
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1809
1809
|
" animation-play-state: paused !important;",
|
|
1810
1810
|
"}"
|
|
1811
|
-
].join("\n"),
|
|
1811
|
+
].join("\n"), Fn = [
|
|
1812
1812
|
"[data-flemo-held-arrival] {",
|
|
1813
1813
|
" display: none !important;",
|
|
1814
1814
|
"}"
|
|
1815
|
-
].join("\n"),
|
|
1816
|
-
let n =
|
|
1815
|
+
].join("\n"), H = (e, t) => {
|
|
1816
|
+
let n = en[t];
|
|
1817
1817
|
if (n === "self") return !1;
|
|
1818
|
-
let r = e.variants[t], i =
|
|
1818
|
+
let r = e.variants[t], i = nn(r.options), a = rn(r.options);
|
|
1819
1819
|
if (i <= 0 && a <= 0) return !1;
|
|
1820
|
-
let o =
|
|
1820
|
+
let o = xn(n === "initial" ? e.initial : e.variants[n].value), s = xn(r.value);
|
|
1821
1821
|
return o.length > 0 || s.length > 0;
|
|
1822
|
-
},
|
|
1822
|
+
}, In = {
|
|
1823
1823
|
REPLACING: 33,
|
|
1824
1824
|
PUSHING: 33,
|
|
1825
1825
|
POPPING: 17
|
|
1826
|
-
},
|
|
1826
|
+
}, Ln = {
|
|
1827
1827
|
REPLACING: 180,
|
|
1828
1828
|
PUSHING: 100,
|
|
1829
1829
|
POPPING: 80
|
|
1830
|
-
},
|
|
1831
|
-
function
|
|
1830
|
+
}, Rn = "data-flemo";
|
|
1831
|
+
function zn() {
|
|
1832
1832
|
if (f()) return;
|
|
1833
|
-
let e =
|
|
1834
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1833
|
+
let e = Nn(Gt.values(), Zt.values(), z.values()), t = document.head.querySelector(`style[${Rn}]`);
|
|
1834
|
+
t || (t = document.createElement("style"), t.setAttribute(Rn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1835
1835
|
}
|
|
1836
1836
|
//#endregion
|
|
1837
1837
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1838
|
-
var
|
|
1838
|
+
var Bn = /* @__PURE__ */ new Map(), Vn = /* @__PURE__ */ new Map(), Hn = /* @__PURE__ */ new Map(), Un = (e, t) => {
|
|
1839
1839
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1840
|
-
},
|
|
1840
|
+
}, Wn = (e, t) => {
|
|
1841
1841
|
let n = (e.get(t) ?? 1) - 1;
|
|
1842
1842
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1843
1843
|
};
|
|
1844
|
-
function
|
|
1845
|
-
for (let t of e) Gt.set(t.name, t),
|
|
1846
|
-
for (let e of t)
|
|
1847
|
-
for (let e of n)
|
|
1848
|
-
return
|
|
1849
|
-
for (let t of e)
|
|
1850
|
-
for (let e of t)
|
|
1851
|
-
for (let e of n) Hn
|
|
1852
|
-
|
|
1844
|
+
function Gn(e, t, n = []) {
|
|
1845
|
+
for (let t of e) Gt.set(t.name, t), Un(Bn, t.name);
|
|
1846
|
+
for (let e of t) Zt.set(e.name, e), Un(Vn, e.name);
|
|
1847
|
+
for (let e of n) z.set(e.name, e), Un(Hn, e.name);
|
|
1848
|
+
return zn(), () => {
|
|
1849
|
+
for (let t of e) Wn(Bn, t.name) && Gt.delete(t.name);
|
|
1850
|
+
for (let e of t) Wn(Vn, e.name) && Zt.delete(e.name);
|
|
1851
|
+
for (let e of n) Wn(Hn, e.name) && z.delete(e.name);
|
|
1852
|
+
zn();
|
|
1853
1853
|
};
|
|
1854
1854
|
}
|
|
1855
1855
|
//#endregion
|
|
1856
1856
|
//#region src/transition/enteringInitialStyle.ts
|
|
1857
|
-
function
|
|
1857
|
+
function Kn(e) {
|
|
1858
1858
|
let { initial: t, isActive: n, status: r } = e;
|
|
1859
1859
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1860
1860
|
let i = {};
|
|
1861
1861
|
return typeof t.x == "number" && (i.transform = `translate3d(${t.x}px, 0, 0)`), typeof t.x == "string" && (i.transform = `translate3d(${t.x}, 0, 0)`), typeof t.y == "number" && (i.transform = `translate3d(0, ${t.y}px, 0)`), typeof t.y == "string" && (i.transform = `translate3d(0, ${t.y}, 0)`), typeof t.opacity == "number" && (i.opacity = `${t.opacity}`), i;
|
|
1862
1862
|
}
|
|
1863
1863
|
//#endregion
|
|
1864
|
-
//#region src/transition/
|
|
1865
|
-
var
|
|
1866
|
-
|
|
1867
|
-
|
|
1868
|
-
}), Kn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), qn = ((e = Gn()) => {
|
|
1869
|
-
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1870
|
-
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1871
|
-
}, i = (e, n) => {
|
|
1872
|
-
let i = t.get(e);
|
|
1873
|
-
if (i) {
|
|
1874
|
-
if (t.delete(e), clearTimeout(i.backstop), e.isConnected && n !== "drop") if (n === "end") for (let e of i.decls) i.writeFinal(e);
|
|
1875
|
-
else {
|
|
1876
|
-
let t = getComputedStyle(e);
|
|
1877
|
-
for (let e of i.decls) {
|
|
1878
|
-
let n = t.getPropertyValue(e.property);
|
|
1879
|
-
n !== "" && i.writeFinal({
|
|
1880
|
-
property: e.property,
|
|
1881
|
-
value: n
|
|
1882
|
-
});
|
|
1883
|
-
}
|
|
1884
|
-
}
|
|
1885
|
-
i.animation.cancel(), i.resolve(), r();
|
|
1886
|
-
}
|
|
1887
|
-
}, a = (r) => {
|
|
1888
|
-
n = null;
|
|
1889
|
-
for (let e of [...t.values()]) {
|
|
1890
|
-
e.startTime === null && (e.startTime = r);
|
|
1891
|
-
let t = r - e.startTime;
|
|
1892
|
-
t >= e.totalMs ? i(e.element, "end") : e.animation.currentTime = Math.max(0, t);
|
|
1893
|
-
}
|
|
1894
|
-
t.size > 0 && (n = e.request(a));
|
|
1895
|
-
};
|
|
1896
|
-
return {
|
|
1897
|
-
settle: (r, o, s, c, l) => {
|
|
1898
|
-
if (typeof r.animate != "function") return null;
|
|
1899
|
-
i(r, "current");
|
|
1900
|
-
let u = {};
|
|
1901
|
-
for (let e of o) u[Kn(e.property)] = e.value;
|
|
1902
|
-
let d;
|
|
1903
|
-
try {
|
|
1904
|
-
d = r.animate([u], {
|
|
1905
|
-
duration: Math.max(0, s.durationMs),
|
|
1906
|
-
delay: Math.max(0, s.delayMs),
|
|
1907
|
-
easing: s.easing,
|
|
1908
|
-
fill: "forwards"
|
|
1909
|
-
}), d.pause(), d.currentTime = 0;
|
|
1910
|
-
} catch {
|
|
1911
|
-
return null;
|
|
1912
|
-
}
|
|
1913
|
-
let f = Math.max(0, s.durationMs) + Math.max(0, s.delayMs);
|
|
1914
|
-
return new Promise((s) => {
|
|
1915
|
-
let u = {
|
|
1916
|
-
element: r,
|
|
1917
|
-
animation: d,
|
|
1918
|
-
decls: o,
|
|
1919
|
-
totalMs: f,
|
|
1920
|
-
startTime: null,
|
|
1921
|
-
writeFinal: c,
|
|
1922
|
-
resolve: s,
|
|
1923
|
-
backstop: setTimeout(() => i(r, "end"), f + 60),
|
|
1924
|
-
owner: l
|
|
1925
|
-
};
|
|
1926
|
-
t.set(r, u), n === null && (n = e.request(a));
|
|
1927
|
-
});
|
|
1928
|
-
},
|
|
1929
|
-
takeover: (e, n) => {
|
|
1930
|
-
let r = t.get(e);
|
|
1931
|
-
r && (n === void 0 || r.owner === n) && i(e, "current");
|
|
1932
|
-
},
|
|
1933
|
-
cancel: (e, n) => {
|
|
1934
|
-
let r = t.get(e);
|
|
1935
|
-
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1936
|
-
}
|
|
1937
|
-
};
|
|
1938
|
-
})(), Jn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Yn = /* @__PURE__ */ new WeakMap(), Xn = Symbol("flemo-inline-writer"), Zn = /* @__PURE__ */ new WeakMap(), G = (e, t, n = Xn) => {
|
|
1939
|
-
let r = Yn.get(e);
|
|
1940
|
-
r || (r = /* @__PURE__ */ new Map(), Yn.set(e, r));
|
|
1864
|
+
//#region src/transition/animateInline.ts
|
|
1865
|
+
var qn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Jn = /* @__PURE__ */ new WeakMap(), Yn = Symbol("flemo-inline-writer"), Xn = /* @__PURE__ */ new WeakMap(), U = (e, t, n = Yn) => {
|
|
1866
|
+
let r = Jn.get(e);
|
|
1867
|
+
r || (r = /* @__PURE__ */ new Map(), Jn.set(e, r));
|
|
1941
1868
|
let i = r.get(t);
|
|
1942
1869
|
i || (i = {
|
|
1943
1870
|
original: e.style.getPropertyValue(t),
|
|
1944
1871
|
owners: /* @__PURE__ */ new Set()
|
|
1945
1872
|
}, r.set(t, i)), i.owners.add(n);
|
|
1946
|
-
},
|
|
1947
|
-
qn.
|
|
1948
|
-
|
|
1949
|
-
|
|
1873
|
+
}, Zn = (e, t) => {
|
|
1874
|
+
qn(e) && (U(e, "transition", t), e.style.transition = "none", Xn.set(e, t));
|
|
1875
|
+
}, W = (e, t, n) => {
|
|
1876
|
+
let r = Jn.get(e);
|
|
1877
|
+
(!n || Xn.get(e) === n) && (e.style.transition = "", Xn.delete(e));
|
|
1950
1878
|
let i = (t) => {
|
|
1951
1879
|
let i = r?.get(t);
|
|
1952
1880
|
if (!i) {
|
|
@@ -1964,27 +1892,19 @@ var Gn = () => ({
|
|
|
1964
1892
|
return;
|
|
1965
1893
|
}
|
|
1966
1894
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1967
|
-
},
|
|
1968
|
-
if (!
|
|
1969
|
-
let i = e, a =
|
|
1895
|
+
}, G = (e, t, n = {}, r) => {
|
|
1896
|
+
if (!qn(e)) return Promise.resolve();
|
|
1897
|
+
let i = e, a = xn(t);
|
|
1970
1898
|
if (a.length === 0) return Promise.resolve();
|
|
1971
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1899
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = Sn(n.ease);
|
|
1972
1900
|
if (o <= 0 && s <= 0) {
|
|
1973
|
-
|
|
1974
|
-
for (let e of a)
|
|
1901
|
+
i.style.transition = "none", Xn.set(i, r);
|
|
1902
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1975
1903
|
return Promise.resolve();
|
|
1976
1904
|
}
|
|
1977
|
-
let l =
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
easing: c
|
|
1981
|
-
}, (e) => {
|
|
1982
|
-
G(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1983
|
-
}, r) : null;
|
|
1984
|
-
if (l) return l;
|
|
1985
|
-
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1986
|
-
i.style.transition = u, Zn.set(i, r), i.offsetWidth;
|
|
1987
|
-
for (let e of a) G(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1905
|
+
let l = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1906
|
+
i.style.transition = l, Xn.set(i, r), i.offsetWidth;
|
|
1907
|
+
for (let e of a) U(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1988
1908
|
return new Promise((e) => {
|
|
1989
1909
|
let t = !1, n = () => {
|
|
1990
1910
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1993,65 +1913,65 @@ var Gn = () => ({
|
|
|
1993
1913
|
};
|
|
1994
1914
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1995
1915
|
});
|
|
1996
|
-
},
|
|
1916
|
+
}, Qn = (e) => {
|
|
1997
1917
|
if (typeof e.querySelectorAll == "function") {
|
|
1998
1918
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1999
1919
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
2000
1920
|
}
|
|
2001
|
-
},
|
|
2002
|
-
function
|
|
2003
|
-
let e =
|
|
2004
|
-
if (
|
|
1921
|
+
}, $n = 0, er = [], tr = [];
|
|
1922
|
+
function nr() {
|
|
1923
|
+
let e = $n === 0;
|
|
1924
|
+
if ($n += 1, e) for (let e of tr) e();
|
|
2005
1925
|
let t = !1;
|
|
2006
1926
|
return () => {
|
|
2007
|
-
if (t || (t = !0,
|
|
2008
|
-
let e =
|
|
2009
|
-
|
|
1927
|
+
if (t || (t = !0, --$n, $n > 0)) return;
|
|
1928
|
+
let e = er;
|
|
1929
|
+
er = [];
|
|
2010
1930
|
for (let t of e) t();
|
|
2011
1931
|
};
|
|
2012
1932
|
}
|
|
2013
|
-
var
|
|
2014
|
-
function
|
|
2015
|
-
return
|
|
2016
|
-
|
|
1933
|
+
var rr = () => $n > 0;
|
|
1934
|
+
function ir(e) {
|
|
1935
|
+
return tr.push(e), () => {
|
|
1936
|
+
tr = tr.filter((t) => t !== e);
|
|
2017
1937
|
};
|
|
2018
1938
|
}
|
|
2019
|
-
function
|
|
2020
|
-
|
|
1939
|
+
function ar(e) {
|
|
1940
|
+
$n === 0 ? e() : er.push(e);
|
|
2021
1941
|
}
|
|
2022
1942
|
//#endregion
|
|
2023
1943
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
2024
|
-
var
|
|
1944
|
+
var or = 8, sr = 2, K = 96, cr = 15e3, lr = 3e3, ur = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", q = "data-flemo-image-src", dr = "flemo-image-scale-v1", fr = /* @__PURE__ */ new Set([
|
|
2025
1945
|
"PUSHING",
|
|
2026
1946
|
"POPPING",
|
|
2027
1947
|
"REPLACING"
|
|
2028
|
-
]),
|
|
1948
|
+
]), pr = (e) => {
|
|
2029
1949
|
let t = e.closest("[data-flemo-screen]");
|
|
2030
|
-
return !!t &&
|
|
2031
|
-
},
|
|
1950
|
+
return !!t && fr.has(t.getAttribute("data-flemo-status") ?? "");
|
|
1951
|
+
}, mr = (e) => {
|
|
2032
1952
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
2033
1953
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
2034
1954
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
2035
|
-
},
|
|
1955
|
+
}, hr = "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};", gr = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", _r = async (e, t) => {
|
|
2036
1956
|
try {
|
|
2037
1957
|
if (typeof caches > "u") return;
|
|
2038
|
-
await (await caches.open(
|
|
1958
|
+
await (await caches.open(dr)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
2039
1959
|
} catch {}
|
|
2040
|
-
},
|
|
1960
|
+
}, vr = async (e) => {
|
|
2041
1961
|
try {
|
|
2042
1962
|
if (typeof caches > "u") return null;
|
|
2043
|
-
let t = await (await caches.open(
|
|
1963
|
+
let t = await (await caches.open(dr)).match(e);
|
|
2044
1964
|
return t ? await t.blob() : null;
|
|
2045
1965
|
} catch {
|
|
2046
1966
|
return null;
|
|
2047
1967
|
}
|
|
2048
1968
|
};
|
|
2049
|
-
function
|
|
2050
|
-
if (!
|
|
1969
|
+
function yr(e) {
|
|
1970
|
+
if (!gr()) return () => {};
|
|
2051
1971
|
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = (e) => !!e && e !== "skip" && e !== "opaque", a = /* @__PURE__ */ new Set(), o = /* @__PURE__ */ new Set(), s = /* @__PURE__ */ new Map(), c = /* @__PURE__ */ new WeakSet(), l = /* @__PURE__ */ new Set(), u = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, d = () => {
|
|
2052
1972
|
if (t) return t;
|
|
2053
1973
|
try {
|
|
2054
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
1974
|
+
t = new Worker(URL.createObjectURL(new Blob([hr])));
|
|
2055
1975
|
} catch {
|
|
2056
1976
|
return null;
|
|
2057
1977
|
}
|
|
@@ -2066,7 +1986,7 @@ function br(e) {
|
|
|
2066
1986
|
return;
|
|
2067
1987
|
}
|
|
2068
1988
|
let a = URL.createObjectURL(n);
|
|
2069
|
-
l.add(a),
|
|
1989
|
+
l.add(a), _r(t, n), f(t, a);
|
|
2070
1990
|
}, t;
|
|
2071
1991
|
}, f = (e, t) => {
|
|
2072
1992
|
r.has(e) || r.set(e, t);
|
|
@@ -2075,21 +1995,21 @@ function br(e) {
|
|
|
2075
1995
|
let n = () => {
|
|
2076
1996
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
2077
1997
|
};
|
|
2078
|
-
if (!
|
|
1998
|
+
if (!rr()) {
|
|
2079
1999
|
n();
|
|
2080
2000
|
return;
|
|
2081
2001
|
}
|
|
2082
2002
|
let r = !1, i = () => {
|
|
2083
2003
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2084
|
-
}, o = setTimeout(i,
|
|
2085
|
-
a.add(i),
|
|
2004
|
+
}, o = setTimeout(i, lr);
|
|
2005
|
+
a.add(i), ar(i);
|
|
2086
2006
|
}, m = (e, t) => {
|
|
2087
2007
|
let n = () => {
|
|
2088
|
-
if (
|
|
2089
|
-
|
|
2008
|
+
if (rr()) {
|
|
2009
|
+
ar(t);
|
|
2090
2010
|
return;
|
|
2091
2011
|
}
|
|
2092
|
-
if (!
|
|
2012
|
+
if (!pr(e) || typeof requestAnimationFrame != "function") {
|
|
2093
2013
|
t();
|
|
2094
2014
|
return;
|
|
2095
2015
|
}
|
|
@@ -2101,10 +2021,10 @@ function br(e) {
|
|
|
2101
2021
|
e.style.visibility = "hidden";
|
|
2102
2022
|
let r = !1, i = () => {
|
|
2103
2023
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2104
|
-
}, o = setTimeout(i,
|
|
2024
|
+
}, o = setTimeout(i, lr);
|
|
2105
2025
|
a.add(i), m(e, i);
|
|
2106
|
-
}, g = (e, t) => !
|
|
2107
|
-
e.setAttribute(
|
|
2026
|
+
}, g = (e, t) => !rr() && !pr(e) ? !1 : (e.setAttribute(q, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2027
|
+
e.setAttribute(q, t), e.src = a, h(e, () => {
|
|
2108
2028
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2109
2029
|
if (n) return;
|
|
2110
2030
|
let a = r.get(t);
|
|
@@ -2115,12 +2035,12 @@ function br(e) {
|
|
|
2115
2035
|
if (n) {
|
|
2116
2036
|
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2117
2037
|
if (i(t)) {
|
|
2118
|
-
e.setAttribute(
|
|
2038
|
+
e.setAttribute(q, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2119
2039
|
let r = e.closest("picture");
|
|
2120
2040
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2121
2041
|
e.src = t;
|
|
2122
2042
|
}
|
|
2123
|
-
} else e.getAttribute("src") ===
|
|
2043
|
+
} else e.getAttribute("src") === ur && (i(t) ? e.src = t : (e.removeAttribute(q), e.src = n.url));
|
|
2124
2044
|
p(e, n.previousVisibility);
|
|
2125
2045
|
}
|
|
2126
2046
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2129,14 +2049,14 @@ function br(e) {
|
|
|
2129
2049
|
y.clear();
|
|
2130
2050
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2131
2051
|
}, S = () => {
|
|
2132
|
-
b || (b = !0,
|
|
2052
|
+
b || (b = !0, ar(() => {
|
|
2133
2053
|
if (n) return;
|
|
2134
2054
|
let e = globalThis.requestIdleCallback;
|
|
2135
2055
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2136
2056
|
}));
|
|
2137
2057
|
}, C = (e, t, n) => {
|
|
2138
2058
|
if (r.has(e) || o.has(e)) return;
|
|
2139
|
-
if (
|
|
2059
|
+
if (rr() && L()) {
|
|
2140
2060
|
y.has(e) || y.set(e, {
|
|
2141
2061
|
boxWidth: t,
|
|
2142
2062
|
boxHeight: n
|
|
@@ -2146,28 +2066,28 @@ function br(e) {
|
|
|
2146
2066
|
let i = d();
|
|
2147
2067
|
if (!i) return;
|
|
2148
2068
|
o.add(e);
|
|
2149
|
-
let a = Math.round(Math.max(
|
|
2069
|
+
let a = Math.round(Math.max(K, t * u()) * sr), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2150
2070
|
i.postMessage({
|
|
2151
2071
|
url: e,
|
|
2152
2072
|
targetWidth: a,
|
|
2153
2073
|
neededArea: s,
|
|
2154
2074
|
ratio: 8
|
|
2155
2075
|
});
|
|
2156
|
-
}, w =
|
|
2157
|
-
if (
|
|
2076
|
+
}, w = ir(() => {
|
|
2077
|
+
if (L() && !(!t || o.size === 0)) {
|
|
2158
2078
|
t.terminate(), t = null;
|
|
2159
2079
|
for (let e of o) {
|
|
2160
2080
|
if (y.has(e)) continue;
|
|
2161
2081
|
let t = {
|
|
2162
|
-
boxWidth:
|
|
2163
|
-
boxHeight:
|
|
2082
|
+
boxWidth: K,
|
|
2083
|
+
boxHeight: K
|
|
2164
2084
|
};
|
|
2165
2085
|
for (let [n, r] of s) {
|
|
2166
2086
|
if (r.url !== e) continue;
|
|
2167
2087
|
let i = n.getBoundingClientRect();
|
|
2168
2088
|
t = {
|
|
2169
|
-
boxWidth: i.width ||
|
|
2170
|
-
boxHeight: i.height ||
|
|
2089
|
+
boxWidth: i.width || K,
|
|
2090
|
+
boxHeight: i.height || K
|
|
2171
2091
|
};
|
|
2172
2092
|
break;
|
|
2173
2093
|
}
|
|
@@ -2181,17 +2101,17 @@ function br(e) {
|
|
|
2181
2101
|
let a = {
|
|
2182
2102
|
url: "",
|
|
2183
2103
|
previousVisibility: e.style.visibility,
|
|
2184
|
-
timeout: setTimeout(() => v(e, null),
|
|
2104
|
+
timeout: setTimeout(() => v(e, null), cr),
|
|
2185
2105
|
responsive: !0
|
|
2186
2106
|
}, o = () => {
|
|
2187
2107
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2188
2108
|
here, so the final fallback arm is unreachable. */
|
|
2189
2109
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2190
|
-
if (!(/^https?:/.test(t) &&
|
|
2110
|
+
if (!(/^https?:/.test(t) && mr({
|
|
2191
2111
|
naturalWidth: e.naturalWidth,
|
|
2192
2112
|
naturalHeight: e.naturalHeight,
|
|
2193
|
-
boxWidth: i.width ||
|
|
2194
|
-
boxHeight: i.height ||
|
|
2113
|
+
boxWidth: i.width || K,
|
|
2114
|
+
boxHeight: i.height || K,
|
|
2195
2115
|
devicePixelRatio: u()
|
|
2196
2116
|
}))) {
|
|
2197
2117
|
v(e, null);
|
|
@@ -2203,7 +2123,7 @@ function br(e) {
|
|
|
2203
2123
|
v(e, o);
|
|
2204
2124
|
return;
|
|
2205
2125
|
}
|
|
2206
|
-
|
|
2126
|
+
vr(t).then((a) => {
|
|
2207
2127
|
if (!(n || !s.has(e))) {
|
|
2208
2128
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2209
2129
|
releases every held element of the url first, so a still-held
|
|
@@ -2219,7 +2139,7 @@ function br(e) {
|
|
|
2219
2139
|
l.add(e), f(t, e);
|
|
2220
2140
|
return;
|
|
2221
2141
|
}
|
|
2222
|
-
C(t, i.width ||
|
|
2142
|
+
C(t, i.width || K, i.height || K);
|
|
2223
2143
|
}
|
|
2224
2144
|
});
|
|
2225
2145
|
};
|
|
@@ -2242,20 +2162,20 @@ function br(e) {
|
|
|
2242
2162
|
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2243
2163
|
if (!t) {
|
|
2244
2164
|
let t = e.getBoundingClientRect();
|
|
2245
|
-
C(a, t.width ||
|
|
2165
|
+
C(a, t.width || K, t.height || K);
|
|
2246
2166
|
return;
|
|
2247
2167
|
}
|
|
2248
2168
|
let n = e.getBoundingClientRect();
|
|
2249
|
-
if (!
|
|
2169
|
+
if (!mr({
|
|
2250
2170
|
naturalWidth: e.naturalWidth,
|
|
2251
2171
|
naturalHeight: e.naturalHeight,
|
|
2252
|
-
boxWidth: n.width ||
|
|
2253
|
-
boxHeight: n.height ||
|
|
2172
|
+
boxWidth: n.width || K,
|
|
2173
|
+
boxHeight: n.height || K,
|
|
2254
2174
|
devicePixelRatio: u()
|
|
2255
2175
|
})) return;
|
|
2256
2176
|
let o = r.get(a);
|
|
2257
2177
|
if (i(o)) {
|
|
2258
|
-
|
|
2178
|
+
rr() || pr(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2259
2179
|
return;
|
|
2260
2180
|
}
|
|
2261
2181
|
if (o === "opaque") {
|
|
@@ -2271,14 +2191,14 @@ function br(e) {
|
|
|
2271
2191
|
return;
|
|
2272
2192
|
}
|
|
2273
2193
|
if (o) {
|
|
2274
|
-
|
|
2194
|
+
rr() || pr(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2275
2195
|
return;
|
|
2276
2196
|
}
|
|
2277
2197
|
s.set(e, {
|
|
2278
2198
|
url: a,
|
|
2279
2199
|
previousVisibility: e.style.visibility,
|
|
2280
|
-
timeout: setTimeout(() => v(e, null),
|
|
2281
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
2200
|
+
timeout: setTimeout(() => v(e, null), cr)
|
|
2201
|
+
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src = ur, vr(a).then((t) => {
|
|
2282
2202
|
if (n || r.has(a)) return;
|
|
2283
2203
|
if (t) {
|
|
2284
2204
|
let e = URL.createObjectURL(t);
|
|
@@ -2288,7 +2208,7 @@ function br(e) {
|
|
|
2288
2208
|
let i = () => {
|
|
2289
2209
|
if (n) return;
|
|
2290
2210
|
let t = e.getBoundingClientRect();
|
|
2291
|
-
C(a, t.width ||
|
|
2211
|
+
C(a, t.width || K, t.height || K);
|
|
2292
2212
|
};
|
|
2293
2213
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2294
2214
|
});
|
|
@@ -2305,21 +2225,21 @@ function br(e) {
|
|
|
2305
2225
|
let k = (e) => {
|
|
2306
2226
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2307
2227
|
if (n && !n.responsive) {
|
|
2308
|
-
t === n.url && (e.src =
|
|
2228
|
+
t === n.url && (e.src = ur);
|
|
2309
2229
|
return;
|
|
2310
2230
|
}
|
|
2311
|
-
let a = e.getAttribute(
|
|
2231
|
+
let a = e.getAttribute(q);
|
|
2312
2232
|
if (a) if (t === a) {
|
|
2313
2233
|
let t = r.get(a);
|
|
2314
2234
|
i(t) && (e.src = t);
|
|
2315
|
-
} else t !==
|
|
2235
|
+
} else t !== ur && !t.startsWith("blob:") && e.removeAttribute(q);
|
|
2316
2236
|
}, A = !1, j = new MutationObserver((t) => {
|
|
2317
2237
|
if (!n) {
|
|
2318
|
-
if (
|
|
2238
|
+
if (rr()) {
|
|
2319
2239
|
if (A) return;
|
|
2320
|
-
A = !0,
|
|
2240
|
+
A = !0, ar(() => {
|
|
2321
2241
|
if (A = !1, !n) {
|
|
2322
|
-
for (let t of Array.from(e.querySelectorAll(`img[${
|
|
2242
|
+
for (let t of Array.from(e.querySelectorAll(`img[${q}]`))) k(t);
|
|
2323
2243
|
for (let e of [...s.keys()]) k(e);
|
|
2324
2244
|
}
|
|
2325
2245
|
});
|
|
@@ -2341,23 +2261,23 @@ function br(e) {
|
|
|
2341
2261
|
l.clear();
|
|
2342
2262
|
};
|
|
2343
2263
|
}
|
|
2344
|
-
var
|
|
2345
|
-
function
|
|
2346
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2347
|
-
dispose:
|
|
2264
|
+
var br = null;
|
|
2265
|
+
function xr() {
|
|
2266
|
+
return typeof document > "u" || !document.body ? () => {} : (br ? br.count += 1 : br = {
|
|
2267
|
+
dispose: yr(document.body),
|
|
2348
2268
|
count: 1
|
|
2349
2269
|
}, () => {
|
|
2350
|
-
|
|
2270
|
+
br && (--br.count, br.count <= 0 && (br.dispose(), br = null));
|
|
2351
2271
|
});
|
|
2352
2272
|
}
|
|
2353
2273
|
//#endregion
|
|
2354
2274
|
//#region src/core/engine/arrivalHold.ts
|
|
2355
|
-
var
|
|
2356
|
-
function
|
|
2275
|
+
var Sr = "data-flemo-held-arrival";
|
|
2276
|
+
function Cr(e) {
|
|
2357
2277
|
if (typeof MutationObserver > "u") return () => {};
|
|
2358
2278
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2359
2279
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2360
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2280
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${Sr}], [${q}]`) !== null;
|
|
2361
2281
|
}, 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), {
|
|
2362
2282
|
glass: t,
|
|
2363
2283
|
latest: n,
|
|
@@ -2387,12 +2307,12 @@ function wr(e) {
|
|
|
2387
2307
|
if (i.type === "childList") {
|
|
2388
2308
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2389
2309
|
if (e instanceof Element && t.delete(e)) {
|
|
2390
|
-
e.removeAttribute(
|
|
2310
|
+
e.removeAttribute(Sr);
|
|
2391
2311
|
continue;
|
|
2392
2312
|
}
|
|
2393
2313
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2394
2314
|
}
|
|
2395
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2315
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(Sr, ""), t.add(e), l(i.target).added.push(e));
|
|
2396
2316
|
}
|
|
2397
2317
|
}
|
|
2398
2318
|
for (let [e, t] of u) {
|
|
@@ -2427,7 +2347,7 @@ function wr(e) {
|
|
|
2427
2347
|
c.disconnect();
|
|
2428
2348
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2429
2349
|
n.clear();
|
|
2430
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2350
|
+
for (let e of t) e instanceof HTMLElement && Qn(e), e.removeAttribute(Sr);
|
|
2431
2351
|
t.clear();
|
|
2432
2352
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2433
2353
|
i.clear();
|
|
@@ -2437,36 +2357,36 @@ function wr(e) {
|
|
|
2437
2357
|
}
|
|
2438
2358
|
//#endregion
|
|
2439
2359
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2440
|
-
var
|
|
2360
|
+
var wr = "data-flemo-warm", Tr = 3e3, Er = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], Dr = {
|
|
2441
2361
|
duration: 500,
|
|
2442
2362
|
iterations: Infinity,
|
|
2443
2363
|
direction: "alternate",
|
|
2444
2364
|
easing: "linear"
|
|
2445
|
-
},
|
|
2446
|
-
Nr = 0, Mr?.cancel(), Mr = null,
|
|
2365
|
+
}, Or = "position:fixed;top:0;left:0;width:48px;height:48px;pointer-events:none;opacity:0.02;background-image:linear-gradient(90deg,#808080 0 24px,#909090 24px 48px);background-repeat:repeat;background-size:48px 48px;", kr = "data:video/webm;base64,GkXfo59ChoEBQveBAULygQRC84EIQoKEd2VibUKHgQJChYECGFOAZwEAAAAAAAeuEU2bdLpNu4tTq4QVSalmU6yBoU27i1OrhBZUrmtTrIHWTbuMU6uEElTDZ1OsggExTbuMU6uEHFO7a1Osggdg7AEAAAAAAABZAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAVSalmsCrXsYMPQkBNgIxMYXZmNjMuMS4xMDBXQYxMYXZmNjMuMS4xMDBEiYhAj0AAAAAAABZUrmvWrgEAAAAAAABN14EBc8WIPqUZMMrLeHecgQAitZyDdW5kiIEAhoVWX1ZQOIOBASPjg4P+UCrgkLCBCLqBCJqBAlWwhFW5gQFV7oEA7AEAAAAAAAACAAASVMNn+nNzn2PAgGfImUWjh0VOQ09ERVJEh4xMYXZmNjMuMS4xMDBzc9VjwItjxYg+pRkwyst4d2fIoEWjh0VOQ09ERVJEh5NMYXZjNjMuMS4xMDAgbGlidnB4Z8ihRaOIRFVSQVRJT05Eh5MwMDowMDowMS4wMDAwMDAwMDAAH0O2dUWq54EAo5+BAACAEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5WBABEAsQEAARAQABgAGG/0DAAEAACjlYEAIQCxAQABEBAAGAAYb/QMAAQAAKOVgQAyALEBAAEQEAAYABhv9AwABAAAo5WBAEMAsQEAARAQABgAGG/0DAAEAACjlYEAUwCxAQABEBAAGAAYb/QMAAQAAKOVgQBkALEBAAEQEAAYABhv9AwABAAAo5SBAHUAkQEAARAQFGAAYb/QMAAQAKOXgQCFALEBAAEQEAAYADA/9AwAAAD+aACjlYEAlgCxAQABEBAAGAAYb/QMAAQAAKOXgQCnALEBAAEQEAAYADA/9AwAAAD+aACjlYEAtwCxAQABEBAAGAAYb/QMAAQAAKOXgQDIALEBAAEQEAAYADA/9AwAAAD+aACjl4EA2QCxAQABEBAAGAAwP/QMAAAA/mgAo5WBAOkAsQEAARAQFGAAYWC/0AAgAACjn4EA+oAQAgCdASoIAAgAAEcIhYWIhYSIAgIABhloAACjl4EBCwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBARsAsQEAARAQABgAGG/0DAAEAACjl4EBLACxAQABEBAAGAAwP/QMAAAA/mgAo5WBAT0AsQEAARAQABgAGG/0DAAEAACjl4EBTQCxAQABEBAAGAAwP/QMAAAA/mgAo5eBAV4AsQEAARAQABgAMD/0DAAAAP5oAKOVgQFvALEBAAEQEBRgAGFgv9AAIAAAo5+BAX+AEAIAnQEqCAAIAABHCIWFiIWEiAICAAYZaAAAo5eBAZAAsQEAARAQABgAMD/0DAAAAP5oAKOVgQGhALEBAAEQEAAYABhv9AwABAAAo5WBAbEAsQEAARAQABgAGG/0DAAEAACjlYEBwgCxAQABEBAAGAAYb/QMAAQAAKOXgQHTALEBAAEQEAAYADA/9AwAAAD+aACjlYEB4wCxAQABEBAAGAAYb/QMAAQAAKOWgQH0AJEBAAEQEBRgAMD/0DAAAP5oAKOVgQIFALEBAAEQEAAYABhv9AwABAAAo5WBAhUAsQEAARAQABgAGFgYL+gMAACjlYECJgCxAQABEBAAGAAYWBgv6AwAAKOVgQI3ALEBAAEQEAAYABhYGC/oDAAAo5WBAkcAsQEAARAQABgAGFgYL+gMAACjlYECWACxAQABEBAAGAAYWBgv6AwAAKOfgQJpgBACAJ0BKggACAAARwiFhYiFhIgCAgAGGWgAAKOXgQJ5ALEBAAEQEAAYADA/9AwAAAD+aACjlYECigCxAQABEBAAGAAYb/QMAAQAAKOXgQKbALEBAAEQEAAYADA/9AwAAAD+aACjl4ECqwCxAQABEBAAGAAwP/QMAAAA/mgAo5WBArwAsQEAARAQABgAGG/0DAAEAACjlYECzQCxAQABEBAAGAAYb/QMAAQAAKOWgQLdAJEBAAEQEBRgAMD/0DAAAP5oAKOVgQLuALEBAAEQEAAYABhv9AwABAAAo5WBAv8AsQEAARAQABgAGFgYL+gMAACjlYEDDwCxAQABEBAAGAAYWBgv6AwAAKOVgQMgALEBAAEQEAAYABhYGC/oDAAAo5WBAzEAsQEAARAQABgAGFgYGBgQAACjlYEDQQCxAQABEBAAGAAYWC/0AAgAAKOVgQNSALEBAAEQEBRgAGFgv9AAIAAAo5WBA2MAsQEAARAQABgAGFgv9AAIAACjlYEDcwCxAQABEBAAGAAYWC/0AAgAAKOVgQOEALEBAAEQEAAYABhYGBgYEAAAo5WBA5UAsQEAARAQABgAGFgYL+gMAACjlYEDpQCxAQABEBAAGAAYWBgYGBAAAKOVgQO2ALEBAAEQEAAYABhYGC/oDAAAo5WBA8cAsQEAARAQABgAGFgYGBgQAACjlYED1wCxAQABEBAAGAAYWBgv6AwAABxTu2vJu4+zgQC3iveBAfGCAbDwgQO7kLOB+reL94EB8YIBsPCCAW27kbOCAX+3i/eBAfGCAbDwggI3u5GzggJpt4v3gQHxggGw8IIDiA==", J = null, Ar = null, jr = null, Mr = null, Nr = 0, Pr = () => {
|
|
2366
|
+
Nr = 0, Mr?.cancel(), Mr = null, jr?.remove(), jr = null;
|
|
2447
2367
|
};
|
|
2448
2368
|
function Fr() {
|
|
2449
2369
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2450
|
-
if (Nr += 1, !
|
|
2451
|
-
|
|
2370
|
+
if (Nr += 1, !jr) {
|
|
2371
|
+
jr = document.createElement("div"), jr.setAttribute(wr, ""), jr.setAttribute("aria-hidden", "true"), jr.setAttribute("style", Or), document.body.appendChild(jr);
|
|
2452
2372
|
try {
|
|
2453
|
-
Mr =
|
|
2373
|
+
Mr = jr.animate(Er, Dr);
|
|
2454
2374
|
} catch {
|
|
2455
2375
|
Mr = null;
|
|
2456
2376
|
}
|
|
2457
|
-
if (!
|
|
2458
|
-
|
|
2459
|
-
let e =
|
|
2460
|
-
|
|
2377
|
+
if (!J && it()) try {
|
|
2378
|
+
J = document.createElement("video"), J.muted = !0, J.loop = !0, J.playsInline = !0, J.setAttribute("aria-hidden", "true"), J.setAttribute("data-flemo-warm-video", ""), J.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), J.src = kr, document.body.appendChild(J), J.play()?.catch?.(() => {});
|
|
2379
|
+
let e = J;
|
|
2380
|
+
Ar = () => {
|
|
2461
2381
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2462
|
-
}, document.addEventListener("visibilitychange",
|
|
2382
|
+
}, document.addEventListener("visibilitychange", Ar);
|
|
2463
2383
|
} catch {
|
|
2464
|
-
|
|
2384
|
+
J = null;
|
|
2465
2385
|
}
|
|
2466
2386
|
}
|
|
2467
2387
|
let e = !1, t = setTimeout(() => {
|
|
2468
2388
|
e || (e = !0, --Nr, Nr <= 0 && Pr());
|
|
2469
|
-
},
|
|
2389
|
+
}, Tr);
|
|
2470
2390
|
return () => {
|
|
2471
2391
|
e || (e = !0, clearTimeout(t), --Nr, Nr <= 0 && Pr());
|
|
2472
2392
|
};
|
|
@@ -2478,7 +2398,7 @@ var Ir = () => {
|
|
|
2478
2398
|
let e = navigator.platform ?? "";
|
|
2479
2399
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2480
2400
|
}, Lr = !1, Rr = () => {
|
|
2481
|
-
Lr || !
|
|
2401
|
+
Lr || !L() || !Ir() || (Lr = !0, console.warn("[flemo] DevTools device emulation detected. The emulated view is composited through an extra scaling pass, so transitions can show text shimmer and settle flashes that do NOT exist in a plain window or on a real device. Judge motion quality outside device emulation."));
|
|
2482
2402
|
}, zr = "data-flemo-img-hold", Br = (e) => !(e.complete && e.naturalWidth > 0), Vr = 4, Hr = (e) => {
|
|
2483
2403
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2484
2404
|
let t = e.getBoundingClientRect(), n = typeof devicePixelRatio == "number" && devicePixelRatio > 0 ? devicePixelRatio : 1, r = Math.max(1, t.width * n) * Math.max(1, t.height * n);
|
|
@@ -2682,7 +2602,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2682
2602
|
if (a === 0) return null;
|
|
2683
2603
|
let o = (e.delay + e.duration * (a / ei)) * 1e3;
|
|
2684
2604
|
return (e.delay + e.duration) * 1e3 - o < ti ? null : o;
|
|
2685
|
-
}, oi = 1e3 / 120, si = 4,
|
|
2605
|
+
}, oi = 1e3 / 120, si = 4, Y = 400, ci = 4, X = (e) => {
|
|
2686
2606
|
let t = +e.toFixed(5);
|
|
2687
2607
|
return Object.is(t, -0) ? 0 : t;
|
|
2688
2608
|
}, li = (e, t, n) => {
|
|
@@ -2700,30 +2620,30 @@ var Yr = (e, t, n, r) => {
|
|
|
2700
2620
|
}
|
|
2701
2621
|
if (a < si) return null;
|
|
2702
2622
|
let o = Qr(e.ease), s = Array(401);
|
|
2703
|
-
for (let e = 0; e <=
|
|
2704
|
-
let c = e.duration * 1e3 /
|
|
2623
|
+
for (let e = 0; e <= Y; e += 1) s[e] = o(e / Y);
|
|
2624
|
+
let c = e.duration * 1e3 / Y, l = 40 / a * c / oi, u = Y, d = 0;
|
|
2705
2625
|
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2706
|
-
for (let e = u; e <
|
|
2626
|
+
for (let e = u; e < Y; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2707
2627
|
let f = (1 - s[u]) * a;
|
|
2708
2628
|
if (f <= 1) return null;
|
|
2709
2629
|
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2710
2630
|
let t = 1 - e / a;
|
|
2711
|
-
for (; m <
|
|
2631
|
+
for (; m < Y && s[m] < t;) m += 1;
|
|
2712
2632
|
if (m === 0) return 0;
|
|
2713
2633
|
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2714
|
-
return (m - 1 + i) /
|
|
2634
|
+
return (m - 1 + i) / Y * 100;
|
|
2715
2635
|
}, g = h(p), _ = [];
|
|
2716
|
-
for (let e = 0; 100 /
|
|
2636
|
+
for (let e = 0; 100 / Y * e < g; e += ci) _.push(`${X(s[e])} ${X(e / Y * 100)}%`);
|
|
2717
2637
|
let v = g;
|
|
2718
2638
|
for (let e = p; e >= 2; --e) {
|
|
2719
2639
|
let t = h(e - 1);
|
|
2720
2640
|
if (t > v) {
|
|
2721
|
-
let n =
|
|
2722
|
-
_.push(`${n} ${
|
|
2641
|
+
let n = X(1 - e / a);
|
|
2642
|
+
_.push(`${n} ${X(v)}%`, `${n} ${X(t)}%`);
|
|
2723
2643
|
}
|
|
2724
2644
|
v = t;
|
|
2725
2645
|
}
|
|
2726
|
-
return _.push(`1 ${
|
|
2646
|
+
return _.push(`1 ${X(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2727
2647
|
}, ui = 12, di = (e, t, n, r) => {
|
|
2728
2648
|
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2729
2649
|
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
@@ -2739,18 +2659,18 @@ var Yr = (e, t, n, r) => {
|
|
|
2739
2659
|
}
|
|
2740
2660
|
if (o < ui) return null;
|
|
2741
2661
|
let s = Qr(e.ease), c = Array(401);
|
|
2742
|
-
for (let e = 0; e <=
|
|
2743
|
-
let l = e.duration * 1e3, u = l /
|
|
2662
|
+
for (let e = 0; e <= Y; e += 1) c[e] = s(e / Y);
|
|
2663
|
+
let l = e.duration * 1e3, u = l / Y, d = 1 / o * (u / r), f = Y, p = 0;
|
|
2744
2664
|
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2745
|
-
if (f === 0 || f >=
|
|
2746
|
-
for (let e = f; e <
|
|
2665
|
+
if (f === 0 || f >= Y) return null;
|
|
2666
|
+
for (let e = f; e < Y; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2747
2667
|
let m = (1 - c[f]) * o;
|
|
2748
2668
|
if (m <= 1 || m > ui) return null;
|
|
2749
|
-
let h = f /
|
|
2669
|
+
let h = f / Y * 100, g = m * r / l * 100;
|
|
2750
2670
|
if (h + g >= 100) return null;
|
|
2751
2671
|
let _ = [];
|
|
2752
|
-
for (let e = 0; e <= f; e += ci) _.push(`${
|
|
2753
|
-
return _.push(`${
|
|
2672
|
+
for (let e = 0; e <= f; e += ci) _.push(`${X(c[e])} ${X(e / Y * 100)}%`);
|
|
2673
|
+
return _.push(`${X(c[f])} ${X(h)}%`), _.push(`1 ${X(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2754
2674
|
}, fi = /* @__PURE__ */ new WeakMap(), pi = Symbol("flemo-layer-owner"), mi = (e, t) => {
|
|
2755
2675
|
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2756
2676
|
}, hi = (e, t) => {
|
|
@@ -2769,8 +2689,8 @@ var Yr = (e, t, n, r) => {
|
|
|
2769
2689
|
e.style.willChange = [...n].join(", ");
|
|
2770
2690
|
let i = hi(t.contain, r);
|
|
2771
2691
|
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2772
|
-
},
|
|
2773
|
-
let i =
|
|
2692
|
+
}, Z = (e, t, n = !1, r = pi) => {
|
|
2693
|
+
let i = bn(t), a = fi.get(e);
|
|
2774
2694
|
if (i.length === 0) {
|
|
2775
2695
|
if (!a) return;
|
|
2776
2696
|
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), mi(e, a), fi.delete(e)) : gi(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), mi(e, a), fi.delete(e));
|
|
@@ -2786,7 +2706,7 @@ var Yr = (e, t, n, r) => {
|
|
|
2786
2706
|
properties: i,
|
|
2787
2707
|
containment: n
|
|
2788
2708
|
}), a.settleOwner = null, gi(e, a);
|
|
2789
|
-
},
|
|
2709
|
+
}, Q = (e, t = pi) => {
|
|
2790
2710
|
let n = fi.get(e);
|
|
2791
2711
|
if (!(!n || !n.owners.has(t))) {
|
|
2792
2712
|
if (n.owners.delete(t), n.owners.size > 0) {
|
|
@@ -2804,30 +2724,30 @@ var Yr = (e, t, n, r) => {
|
|
|
2804
2724
|
mi(e, n), fi.delete(e);
|
|
2805
2725
|
return;
|
|
2806
2726
|
}
|
|
2807
|
-
|
|
2727
|
+
_i(e, n);
|
|
2808
2728
|
}
|
|
2809
|
-
},
|
|
2729
|
+
}, _i = (e, t) => {
|
|
2810
2730
|
t.pending = setTimeout(() => {
|
|
2811
|
-
if (t.pending = null,
|
|
2812
|
-
|
|
2813
|
-
fi.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null &&
|
|
2731
|
+
if (t.pending = null, rr()) {
|
|
2732
|
+
ar(() => {
|
|
2733
|
+
fi.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && _i(e, t);
|
|
2814
2734
|
});
|
|
2815
2735
|
return;
|
|
2816
2736
|
}
|
|
2817
2737
|
mi(e, t), fi.delete(e);
|
|
2818
2738
|
}, 300);
|
|
2819
|
-
},
|
|
2739
|
+
}, vi = (e, t, n) => {
|
|
2820
2740
|
let r = e.driver;
|
|
2821
2741
|
return r === "native" || r === "player" ? r : "player";
|
|
2822
|
-
},
|
|
2742
|
+
}, yi = 1e3 / 60 * 2, bi = "flemo-", xi = /* @__PURE__ */ new WeakMap(), Si = (e, t, n) => {
|
|
2823
2743
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2824
2744
|
let e = r.animationName;
|
|
2825
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2745
|
+
if (typeof e != "string" || !e.startsWith(bi) || r.playState !== "running" || xi.get(r) === n) continue;
|
|
2826
2746
|
let i = r.startTime;
|
|
2827
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2747
|
+
typeof i == "number" && (r.startTime = i + t, xi.set(r, n));
|
|
2828
2748
|
}
|
|
2829
|
-
},
|
|
2830
|
-
function
|
|
2749
|
+
}, Ci = /* @__PURE__ */ new WeakSet(), wi = 1e3, Ti = 3e3;
|
|
2750
|
+
function Ei(e, t, n) {
|
|
2831
2751
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2832
2752
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2833
2753
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2841,7 +2761,7 @@ function Oi(e, t, n) {
|
|
|
2841
2761
|
i = !0, m.disconnect();
|
|
2842
2762
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2843
2763
|
let e = t.animationName;
|
|
2844
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2764
|
+
if (typeof e != "string" || !e.startsWith(bi) || t.playState !== "running" || Ci.has(t)) continue;
|
|
2845
2765
|
let n = t.currentTime;
|
|
2846
2766
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2847
2767
|
try {
|
|
@@ -2849,18 +2769,18 @@ function Oi(e, t, n) {
|
|
|
2849
2769
|
} catch {
|
|
2850
2770
|
continue;
|
|
2851
2771
|
}
|
|
2852
|
-
|
|
2772
|
+
Ci.add(t), c.push(t);
|
|
2853
2773
|
}
|
|
2854
2774
|
}
|
|
2855
2775
|
if (c.length === 0) return;
|
|
2856
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2857
|
-
let e =
|
|
2776
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, wi));
|
|
2777
|
+
let e = ji(t, () => {
|
|
2858
2778
|
a || n?.();
|
|
2859
2779
|
});
|
|
2860
2780
|
if (l = e, typeof setTimeout == "function") {
|
|
2861
2781
|
let t = setTimeout(() => {
|
|
2862
2782
|
l === e && (l = null), e();
|
|
2863
|
-
},
|
|
2783
|
+
}, Ti), n = e;
|
|
2864
2784
|
l = () => {
|
|
2865
2785
|
clearTimeout(t), n();
|
|
2866
2786
|
};
|
|
@@ -2875,16 +2795,16 @@ function Oi(e, t, n) {
|
|
|
2875
2795
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2876
2796
|
};
|
|
2877
2797
|
}
|
|
2878
|
-
var
|
|
2879
|
-
function
|
|
2798
|
+
var Di = 150, Oi = 4e3, ki = 400;
|
|
2799
|
+
function Ai(e, t, n = !0, r = !1) {
|
|
2880
2800
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2881
2801
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2882
2802
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2883
2803
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2884
2804
|
let t = e.animationName;
|
|
2885
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2805
|
+
if (typeof t != "string" || !t.startsWith(bi) || e.playState !== "running" || Ci.has(e)) continue;
|
|
2886
2806
|
let n = e.currentTime;
|
|
2887
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2807
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Ci.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2888
2808
|
}
|
|
2889
2809
|
if (i.length === 0) return () => {};
|
|
2890
2810
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2897,7 +2817,7 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2897
2817
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2898
2818
|
let o = (a.get(n) ?? 0) + e;
|
|
2899
2819
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2900
|
-
let s = r +
|
|
2820
|
+
let s = r + Oi;
|
|
2901
2821
|
t = Math.max(t, s - o);
|
|
2902
2822
|
}
|
|
2903
2823
|
return t;
|
|
@@ -2905,7 +2825,7 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2905
2825
|
if (c) return;
|
|
2906
2826
|
if (d === null && (d = e), f !== null) {
|
|
2907
2827
|
let t = e - f;
|
|
2908
|
-
p += Math.min(Math.max(0, t),
|
|
2828
|
+
p += Math.min(Math.max(0, t), yi);
|
|
2909
2829
|
}
|
|
2910
2830
|
if (f = e, !l) {
|
|
2911
2831
|
if (l = !0, r) {
|
|
@@ -2917,7 +2837,7 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2917
2837
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2918
2838
|
let i = a.get(t) ?? 0;
|
|
2919
2839
|
if (n <= i + 33.333333333333336) continue;
|
|
2920
|
-
let o = n - (i +
|
|
2840
|
+
let o = n - (i + yi);
|
|
2921
2841
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2922
2842
|
}
|
|
2923
2843
|
e > 0 && t?.(e);
|
|
@@ -2931,13 +2851,13 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2931
2851
|
if (e.playState !== "running") continue;
|
|
2932
2852
|
let t = e.startTime;
|
|
2933
2853
|
if (typeof t == "number") {
|
|
2934
|
-
e.startTime = t +
|
|
2854
|
+
e.startTime = t + Oi;
|
|
2935
2855
|
continue;
|
|
2936
2856
|
}
|
|
2937
2857
|
let n = e.timeline?.currentTime;
|
|
2938
|
-
typeof n == "number" && (e.startTime = n +
|
|
2858
|
+
typeof n == "number" && (e.startTime = n + Oi);
|
|
2939
2859
|
}
|
|
2940
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2860
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + yi), ki)), o = requestAnimationFrame(h);
|
|
2941
2861
|
return;
|
|
2942
2862
|
}
|
|
2943
2863
|
if (!u) {
|
|
@@ -2960,13 +2880,13 @@ function Mi(e, t, n = !0, r = !1) {
|
|
|
2960
2880
|
t?.(g);
|
|
2961
2881
|
return;
|
|
2962
2882
|
}
|
|
2963
|
-
e - d <
|
|
2883
|
+
e - d < Di && (o = requestAnimationFrame(h));
|
|
2964
2884
|
};
|
|
2965
2885
|
return o = requestAnimationFrame(h), () => {
|
|
2966
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2886
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + yi);
|
|
2967
2887
|
};
|
|
2968
2888
|
}
|
|
2969
|
-
function
|
|
2889
|
+
function ji(e, t) {
|
|
2970
2890
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2971
2891
|
exotic embedders. */
|
|
2972
2892
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2975,8 +2895,8 @@ function Ni(e, t) {
|
|
|
2975
2895
|
if (r !== null) {
|
|
2976
2896
|
let n = o - r;
|
|
2977
2897
|
if (n > 33.333333333333336) {
|
|
2978
|
-
let r = n -
|
|
2979
|
-
for (let t of e()) t &&
|
|
2898
|
+
let r = n - yi;
|
|
2899
|
+
for (let t of e()) t && Si(t, r, o);
|
|
2980
2900
|
t?.(r);
|
|
2981
2901
|
}
|
|
2982
2902
|
}
|
|
@@ -2987,29 +2907,29 @@ function Ni(e, t) {
|
|
|
2987
2907
|
i = !0, cancelAnimationFrame(n);
|
|
2988
2908
|
};
|
|
2989
2909
|
}
|
|
2990
|
-
var
|
|
2991
|
-
function
|
|
2910
|
+
var Mi = /* @__PURE__ */ new WeakMap();
|
|
2911
|
+
function Ni(e, t, n, r = !0, i = !1) {
|
|
2992
2912
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2993
|
-
let a =
|
|
2994
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
2913
|
+
let a = Mi.get(e);
|
|
2914
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => Pi(e);
|
|
2995
2915
|
let o = null, s = !1, c = !1, l = () => {
|
|
2996
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
2916
|
+
s || c || (s = !0, u.disconnect(), o = Ai(t, n, r, i));
|
|
2997
2917
|
}, u = new MutationObserver(() => {
|
|
2998
2918
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2999
2919
|
});
|
|
3000
2920
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
3001
2921
|
attributes: !0,
|
|
3002
2922
|
attributeFilter: ["data-flemo-anim-hold"]
|
|
3003
|
-
}),
|
|
2923
|
+
}), Mi.set(e, {
|
|
3004
2924
|
refs: 1,
|
|
3005
2925
|
pendingDrop: null,
|
|
3006
2926
|
dispose: () => {
|
|
3007
|
-
c = !0, u.disconnect(), o?.(),
|
|
2927
|
+
c = !0, u.disconnect(), o?.(), Mi.delete(e);
|
|
3008
2928
|
}
|
|
3009
|
-
}), () =>
|
|
2929
|
+
}), () => Pi(e);
|
|
3010
2930
|
}
|
|
3011
|
-
var
|
|
3012
|
-
let t =
|
|
2931
|
+
var Pi = (e) => {
|
|
2932
|
+
let t = Mi.get(e);
|
|
3013
2933
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
3014
2934
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
3015
2935
|
if (typeof setTimeout != "function") {
|
|
@@ -3018,36 +2938,36 @@ var Ii = (e) => {
|
|
|
3018
2938
|
}
|
|
3019
2939
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
3020
2940
|
}
|
|
3021
|
-
},
|
|
3022
|
-
let e =
|
|
3023
|
-
|
|
2941
|
+
}, Fi = !1, Ii = 0, Li = [], Ri = () => {
|
|
2942
|
+
let e = Li;
|
|
2943
|
+
Li = [];
|
|
3024
2944
|
for (let t of e) t();
|
|
3025
|
-
},
|
|
3026
|
-
if (
|
|
3027
|
-
|
|
2945
|
+
}, zi = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), Bi = () => {
|
|
2946
|
+
if (Fi || typeof window > "u" || typeof window.fetch != "function") return;
|
|
2947
|
+
Fi = !0;
|
|
3028
2948
|
let e = window.fetch.bind(window);
|
|
3029
|
-
window.fetch = (...t) => e(...t).then((e) =>
|
|
3030
|
-
|
|
2949
|
+
window.fetch = (...t) => e(...t).then((e) => Ii <= 0 || zi(e) ? e : new Promise((t) => {
|
|
2950
|
+
Li.push(() => t(e));
|
|
3031
2951
|
}), (e) => {
|
|
3032
|
-
if (
|
|
2952
|
+
if (Ii <= 0) throw e;
|
|
3033
2953
|
return new Promise((t, n) => {
|
|
3034
|
-
|
|
2954
|
+
Li.push(() => n(e));
|
|
3035
2955
|
});
|
|
3036
2956
|
});
|
|
3037
|
-
},
|
|
3038
|
-
function
|
|
2957
|
+
}, Vi = 2e3;
|
|
2958
|
+
function Hi(e = Vi) {
|
|
3039
2959
|
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
3040
|
-
if (
|
|
3041
|
-
|
|
2960
|
+
if (Bi(), !Fi) return () => {};
|
|
2961
|
+
Ii += 1;
|
|
3042
2962
|
let t = !1, n = null, r = () => {
|
|
3043
|
-
t || (t = !0, n !== null && clearTimeout(n),
|
|
2963
|
+
t || (t = !0, n !== null && clearTimeout(n), Ii = Math.max(0, Ii - 1), Ii === 0 && Ri());
|
|
3044
2964
|
};
|
|
3045
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(
|
|
2965
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(Vi, e))), r;
|
|
3046
2966
|
}
|
|
3047
|
-
|
|
2967
|
+
Bi();
|
|
3048
2968
|
//#endregion
|
|
3049
2969
|
//#region src/core/engine/transitionPlayer.ts
|
|
3050
|
-
var
|
|
2970
|
+
var Ui = [
|
|
3051
2971
|
"x",
|
|
3052
2972
|
"y",
|
|
3053
2973
|
"z",
|
|
@@ -3058,7 +2978,7 @@ var Gi = [
|
|
|
3058
2978
|
"rotateX",
|
|
3059
2979
|
"rotateY",
|
|
3060
2980
|
"rotateZ"
|
|
3061
|
-
],
|
|
2981
|
+
], Wi = new Set(Ui), Gi = {
|
|
3062
2982
|
x: 0,
|
|
3063
2983
|
y: 0,
|
|
3064
2984
|
z: 0,
|
|
@@ -3069,7 +2989,7 @@ var Gi = [
|
|
|
3069
2989
|
rotateX: 0,
|
|
3070
2990
|
rotateY: 0,
|
|
3071
2991
|
rotateZ: 0
|
|
3072
|
-
},
|
|
2992
|
+
}, Ki = (e, t) => {
|
|
3073
2993
|
if (typeof t == "number") return {
|
|
3074
2994
|
value: t,
|
|
3075
2995
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -3088,18 +3008,18 @@ var Gi = [
|
|
|
3088
3008
|
value: i,
|
|
3089
3009
|
unit: a === "" && i === 0 ? "px" : a
|
|
3090
3010
|
};
|
|
3091
|
-
},
|
|
3092
|
-
let n = e.match(
|
|
3093
|
-
if (n.length !== r.length || e.replace(
|
|
3011
|
+
}, qi = /-?\d*\.?\d+/g, Ji = (e, t) => {
|
|
3012
|
+
let n = e.match(qi) ?? [], r = t.match(qi) ?? [];
|
|
3013
|
+
if (n.length !== r.length || e.replace(qi, " ") !== t.replace(qi, " ")) return null;
|
|
3094
3014
|
let i = n.map(Number), a = r.map(Number);
|
|
3095
3015
|
return (t) => {
|
|
3096
3016
|
let n = 0;
|
|
3097
|
-
return e.replace(
|
|
3017
|
+
return e.replace(qi, () => {
|
|
3098
3018
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
3099
3019
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
3100
3020
|
});
|
|
3101
3021
|
};
|
|
3102
|
-
},
|
|
3022
|
+
}, Yi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Xi = (e) => typeof e == "object" && !!e && !Array.isArray(e), Zi = (e) => Xi(e) ? Object.keys(e) : [], Qi = (e, t) => Xi(e) ? e[t] : void 0, $i = {
|
|
3103
3023
|
x: 0,
|
|
3104
3024
|
y: 0,
|
|
3105
3025
|
z: 0,
|
|
@@ -3110,41 +3030,41 @@ var Gi = [
|
|
|
3110
3030
|
rotateX: 2,
|
|
3111
3031
|
rotateY: 2,
|
|
3112
3032
|
rotateZ: 2
|
|
3113
|
-
},
|
|
3033
|
+
}, ea = (e) => {
|
|
3114
3034
|
let t = 0, n = -1;
|
|
3115
3035
|
for (let r of e) {
|
|
3116
|
-
if (!
|
|
3117
|
-
let e =
|
|
3036
|
+
if (!Wi.has(r)) continue;
|
|
3037
|
+
let e = $i[r];
|
|
3118
3038
|
if (e < t) return !1;
|
|
3119
3039
|
if (t = e, e === 2) {
|
|
3120
|
-
let e =
|
|
3040
|
+
let e = Ui.indexOf(r);
|
|
3121
3041
|
if (e < n) return !1;
|
|
3122
3042
|
n = e;
|
|
3123
3043
|
}
|
|
3124
3044
|
}
|
|
3125
3045
|
return !0;
|
|
3126
|
-
},
|
|
3046
|
+
}, ta = (e) => {
|
|
3127
3047
|
let t = [];
|
|
3128
3048
|
for (let n of e) {
|
|
3129
|
-
if (!
|
|
3130
|
-
let e =
|
|
3049
|
+
if (!Wi.has(n)) continue;
|
|
3050
|
+
let e = $i[n] === 0 ? "T" : n;
|
|
3131
3051
|
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3132
3052
|
}
|
|
3133
3053
|
return t;
|
|
3134
|
-
},
|
|
3135
|
-
let n =
|
|
3054
|
+
}, na = (e, t) => {
|
|
3055
|
+
let n = ta(e), r = ta(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3136
3056
|
return i.every((e, t) => a[t] === e);
|
|
3137
|
-
},
|
|
3138
|
-
let n =
|
|
3139
|
-
if (!
|
|
3057
|
+
}, ra = (e, t) => {
|
|
3058
|
+
let n = Zi(e.from), r = Zi(e.to);
|
|
3059
|
+
if (!ea(n) || !ea(r) || !na(n, r)) return null;
|
|
3140
3060
|
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3141
3061
|
for (let n of i) {
|
|
3142
|
-
let r =
|
|
3143
|
-
if (
|
|
3062
|
+
let r = Qi(e.from, n), i = Qi(e.to, n);
|
|
3063
|
+
if (Wi.has(n)) {
|
|
3144
3064
|
let e = n, o = {
|
|
3145
|
-
value:
|
|
3065
|
+
value: Gi[e],
|
|
3146
3066
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3147
|
-
}, s = r === void 0 ? o :
|
|
3067
|
+
}, s = r === void 0 ? o : Ki(e, r), c = i === void 0 ? o : Ki(e, i);
|
|
3148
3068
|
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3149
3069
|
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3150
3070
|
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
@@ -3175,15 +3095,15 @@ var Gi = [
|
|
|
3175
3095
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
3176
3096
|
if (l === u) {
|
|
3177
3097
|
c.push({
|
|
3178
|
-
property:
|
|
3098
|
+
property: Yi(n),
|
|
3179
3099
|
value: l
|
|
3180
3100
|
});
|
|
3181
3101
|
continue;
|
|
3182
3102
|
}
|
|
3183
|
-
let d =
|
|
3103
|
+
let d = Ji(l, u);
|
|
3184
3104
|
if (!d) return null;
|
|
3185
3105
|
s.push({
|
|
3186
|
-
property:
|
|
3106
|
+
property: Yi(n),
|
|
3187
3107
|
mix: d
|
|
3188
3108
|
});
|
|
3189
3109
|
}
|
|
@@ -3193,26 +3113,26 @@ var Gi = [
|
|
|
3193
3113
|
strings: s,
|
|
3194
3114
|
constants: c
|
|
3195
3115
|
};
|
|
3196
|
-
},
|
|
3116
|
+
}, ia = 1, aa = 1e3 / 60, oa = (e) => !L() && e > 0 && e < 3, sa = .6, ca = 600, la = (e, t) => {
|
|
3197
3117
|
if (!it()) return !1;
|
|
3198
3118
|
for (let n of e.transforms) {
|
|
3199
3119
|
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3200
3120
|
let e = Math.abs(n.to.value - n.from.value);
|
|
3201
3121
|
if (n.from.unit === "%") {
|
|
3202
|
-
if (e / 100 >=
|
|
3203
|
-
} else if (e * Math.max(1, t) >=
|
|
3122
|
+
if (e / 100 >= sa) return !1;
|
|
3123
|
+
} else if (e * Math.max(1, t) >= ca) return !1;
|
|
3204
3124
|
}
|
|
3205
3125
|
return !0;
|
|
3206
|
-
},
|
|
3126
|
+
}, ua = 12, da = (e, t, n, r, i = aa) => {
|
|
3207
3127
|
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3208
|
-
for (let u of
|
|
3128
|
+
for (let u of Ui) {
|
|
3209
3129
|
let d = e.find((e) => e.prop === u);
|
|
3210
3130
|
if (!d) continue;
|
|
3211
3131
|
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3212
3132
|
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3213
|
-
let e = u === "x" ? r.x : r.y, t = Ct(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null &&
|
|
3133
|
+
let e = u === "x" ? r.x : r.y, t = Ct(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && oa(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= Tt() : e === null || c * aa / Math.max(1, i) >= ia, h = d.to.value;
|
|
3214
3134
|
d.from.unit === "%" && (h *= d.percentBase);
|
|
3215
|
-
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <=
|
|
3135
|
+
let g = u === "x" ? "landingX" : "landingY", _ = r[g], v = Math.abs(f - h) * n, y = e === null ? Infinity : Math.abs(f - e) * n, b = !p && n > 0 && (_ != null || y < 1 && v <= ua), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3216
3136
|
if (b) {
|
|
3217
3137
|
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3218
3138
|
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
@@ -3220,42 +3140,42 @@ var Gi = [
|
|
|
3220
3140
|
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
3221
3141
|
continue;
|
|
3222
3142
|
}
|
|
3223
|
-
let p =
|
|
3143
|
+
let p = Gi[u];
|
|
3224
3144
|
f !== p && (l = !1), u === "z" ? c.push(`translateZ(${f}px)`) : u === "scale" ? c.push(`scale(${f})`) : u === "scaleX" ? c.push(`scaleX(${f})`) : u === "scaleY" ? c.push(`scaleY(${f})`) : u === "rotate" || u === "rotateZ" ? c.push(`rotate(${f}deg)`) : u === "rotateX" ? c.push(`rotateX(${f}deg)`) : u === "rotateY" && c.push(`rotateY(${f}deg)`);
|
|
3225
3145
|
}
|
|
3226
3146
|
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3227
|
-
},
|
|
3147
|
+
}, fa = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), pa = (e) => {
|
|
3228
3148
|
let t = {};
|
|
3229
|
-
for (let n of
|
|
3149
|
+
for (let n of xn(e)) t[fa(n.property)] = n.value;
|
|
3230
3150
|
return t;
|
|
3231
|
-
},
|
|
3151
|
+
}, ma = (e, t) => {
|
|
3232
3152
|
if (typeof e.animate != "function") return null;
|
|
3233
3153
|
try {
|
|
3234
|
-
let n = e.animate([
|
|
3154
|
+
let n = e.animate([pa(t.from), pa(t.to)], {
|
|
3235
3155
|
duration: Math.max(0, t.duration * 1e3),
|
|
3236
3156
|
delay: Math.max(0, t.delay * 1e3),
|
|
3237
|
-
easing:
|
|
3157
|
+
easing: Sn(t.ease),
|
|
3238
3158
|
fill: "both"
|
|
3239
3159
|
});
|
|
3240
3160
|
return n.pause(), n.currentTime = 0, n;
|
|
3241
3161
|
} catch {
|
|
3242
3162
|
return null;
|
|
3243
3163
|
}
|
|
3244
|
-
},
|
|
3245
|
-
Number.isFinite(e) && (e <
|
|
3246
|
-
},
|
|
3164
|
+
}, ha = 1.6, ga = 1e3 / 600, _a = 28, va = 42, ya = aa, ba = () => ya, xa = (e) => {
|
|
3165
|
+
Number.isFinite(e) && (e < ga || e > va || (ya = Math.min(aa, Math.max(ga, e))));
|
|
3166
|
+
}, Sa = () => ({
|
|
3247
3167
|
request: (e) => requestAnimationFrame(e),
|
|
3248
3168
|
cancel: (e) => cancelAnimationFrame(e),
|
|
3249
3169
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
3250
|
-
}),
|
|
3170
|
+
}), Ca = ((e = Sa()) => {
|
|
3251
3171
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
3252
3172
|
join: (n, r) => {
|
|
3253
|
-
let i = yt() === "scrub", s = !i && !
|
|
3173
|
+
let i = yt() === "scrub", s = !i && !L() && xt() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : ra(r.motion, r.element), l = !c || s ? ma(r.element, r.motion) : null, u = l ? null : c;
|
|
3254
3174
|
if (!u && !l) return null;
|
|
3255
3175
|
let d = t.get(n);
|
|
3256
3176
|
d || (d = {
|
|
3257
3177
|
tracks: [],
|
|
3258
|
-
frameIntervalMs:
|
|
3178
|
+
frameIntervalMs: ya,
|
|
3259
3179
|
recentGaps: [],
|
|
3260
3180
|
navCutMs: null,
|
|
3261
3181
|
navComplete: null,
|
|
@@ -3279,19 +3199,19 @@ var Gi = [
|
|
|
3279
3199
|
snapMemory: {
|
|
3280
3200
|
x: null,
|
|
3281
3201
|
y: null,
|
|
3282
|
-
glide: u ?
|
|
3202
|
+
glide: u ? la(u, e.devicePixelRatio() || 1) : !1
|
|
3283
3203
|
}
|
|
3284
3204
|
};
|
|
3285
3205
|
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3286
3206
|
let m = Symbol("flemo-player-track");
|
|
3287
|
-
if (
|
|
3288
|
-
u.transforms.length > 0 &&
|
|
3289
|
-
for (let e of u.strings)
|
|
3290
|
-
for (let e of u.constants)
|
|
3207
|
+
if (Zn(p.element, m), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3208
|
+
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3209
|
+
for (let e of u.strings) U(p.element, e.property, m);
|
|
3210
|
+
for (let e of u.constants) U(p.element, e.property, m);
|
|
3291
3211
|
a(p, 0);
|
|
3292
3212
|
}
|
|
3293
3213
|
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3294
|
-
p.detached = !0, p.scrub?.cancel(),
|
|
3214
|
+
p.detached = !0, p.scrub?.cancel(), W(p.element, void 0, m);
|
|
3295
3215
|
let r = t.get(n);
|
|
3296
3216
|
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
3297
3217
|
};
|
|
@@ -3312,7 +3232,7 @@ var Gi = [
|
|
|
3312
3232
|
let { element: i, parsed: a } = t;
|
|
3313
3233
|
if (!(!a || !i.isConnected)) {
|
|
3314
3234
|
if (a.transforms.length > 0) {
|
|
3315
|
-
let o =
|
|
3235
|
+
let o = da(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3316
3236
|
o !== "" && (i.style.transform = o);
|
|
3317
3237
|
}
|
|
3318
3238
|
if (a.opacity) {
|
|
@@ -3333,10 +3253,10 @@ var Gi = [
|
|
|
3333
3253
|
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3334
3254
|
let d;
|
|
3335
3255
|
try {
|
|
3336
|
-
d = o.animate([
|
|
3256
|
+
d = o.animate([pa(r.motion.from), pa(r.motion.to)], {
|
|
3337
3257
|
duration: c,
|
|
3338
3258
|
delay: -u,
|
|
3339
|
-
easing:
|
|
3259
|
+
easing: Sn(r.motion.ease),
|
|
3340
3260
|
fill: "both"
|
|
3341
3261
|
});
|
|
3342
3262
|
} catch {
|
|
@@ -3350,12 +3270,12 @@ var Gi = [
|
|
|
3350
3270
|
let l = r.startTime ?? c;
|
|
3351
3271
|
if (r.lastTime !== null) {
|
|
3352
3272
|
let e = c - r.lastTime;
|
|
3353
|
-
if (n.onFrameGap?.(e), e >=
|
|
3273
|
+
if (n.onFrameGap?.(e), e >= ga && e <= va) {
|
|
3354
3274
|
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
3355
|
-
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >=
|
|
3356
|
-
r.frameIntervalMs = Math.min(i ?
|
|
3275
|
+
let t = [...r.recentGaps].sort((e, t) => e - t), n = t[Math.floor(t.length / 2)], i = r.recentGaps.length >= 4 && r.recentGaps.every((e) => e >= _a);
|
|
3276
|
+
r.frameIntervalMs = Math.min(i ? va : aa, Math.max(ga, n)), ya = r.frameIntervalMs, n < 12 && nt(n, t[t.length - 1]);
|
|
3357
3277
|
}
|
|
3358
|
-
e >
|
|
3278
|
+
e > ha * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3359
3279
|
}
|
|
3360
3280
|
r.startTime = l, r.lastTime = c;
|
|
3361
3281
|
let u = !0, d = !1;
|
|
@@ -3394,7 +3314,7 @@ var Gi = [
|
|
|
3394
3314
|
}
|
|
3395
3315
|
return n;
|
|
3396
3316
|
})();
|
|
3397
|
-
|
|
3317
|
+
Ca.onFrameGap = (e) => {
|
|
3398
3318
|
if (typeof window < "u") {
|
|
3399
3319
|
let t = window.__flemoPlayerGaps ??= [];
|
|
3400
3320
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -3402,102 +3322,102 @@ Ta.onFrameGap = (e) => {
|
|
|
3402
3322
|
};
|
|
3403
3323
|
//#endregion
|
|
3404
3324
|
//#region src/core/engine/types.ts
|
|
3405
|
-
var
|
|
3325
|
+
var wa = "data-flemo-skip-animation", $ = () => {}, Ta = 400, Ea = 4, Da = 100, Oa = 1500, ka = "data-flemo-part-name", Aa = /* @__PURE__ */ new WeakMap(), ja = "data-flemo-anim-hold", Ma = (e) => {
|
|
3406
3326
|
let t = e.parentElement ?? e;
|
|
3407
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3327
|
+
return Array.from(t.querySelectorAll(`[${ka}]`)).filter((n) => {
|
|
3408
3328
|
let r = n.closest("[data-flemo-screen]");
|
|
3409
3329
|
return !r || r === e || !t.contains(r);
|
|
3410
3330
|
});
|
|
3411
|
-
},
|
|
3331
|
+
}, Na = (e, t) => {
|
|
3412
3332
|
let [n, r] = t.split("-");
|
|
3413
|
-
return
|
|
3414
|
-
},
|
|
3333
|
+
return Ma(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3334
|
+
}, Pa = (e, t) => {
|
|
3415
3335
|
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3416
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3336
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ka}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3417
3337
|
if (n === null) return !0;
|
|
3418
3338
|
let t = e.closest("[data-flemo-router]");
|
|
3419
3339
|
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3420
3340
|
});
|
|
3421
|
-
},
|
|
3341
|
+
}, Fa = (e, t) => Pa(e, t).filter((e) => e.parentElement?.closest(`[${ja}]`) == null), Ia = (e) => {
|
|
3422
3342
|
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3423
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${
|
|
3424
|
-
if (e.parentElement?.closest(`[${
|
|
3343
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ka}][${ja}]`)).filter((e) => {
|
|
3344
|
+
if (e.parentElement?.closest(`[${ja}]`) != null) return !1;
|
|
3425
3345
|
if (t === null) return !0;
|
|
3426
3346
|
let n = e.closest("[data-flemo-router]");
|
|
3427
3347
|
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3428
3348
|
});
|
|
3429
|
-
},
|
|
3349
|
+
}, La = (e, t, n) => {
|
|
3430
3350
|
let r = 0;
|
|
3431
3351
|
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3432
|
-
if (!
|
|
3433
|
-
let n =
|
|
3352
|
+
if (!H(t, e)) continue;
|
|
3353
|
+
let n = B(t, e);
|
|
3434
3354
|
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3435
3355
|
}
|
|
3436
|
-
for (let t of
|
|
3437
|
-
let e =
|
|
3438
|
-
if (!e || !
|
|
3439
|
-
let a =
|
|
3356
|
+
for (let t of Pa(e, n)) {
|
|
3357
|
+
let e = z.get(t.getAttribute(ka)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3358
|
+
if (!e || !H(e, i)) continue;
|
|
3359
|
+
let a = B(e, i);
|
|
3440
3360
|
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3441
3361
|
}
|
|
3442
|
-
let i = t.decoratorName ?
|
|
3362
|
+
let i = t.decoratorName ? Zt.get(t.decoratorName) : void 0;
|
|
3443
3363
|
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3444
|
-
if (!
|
|
3445
|
-
let t =
|
|
3364
|
+
if (!H(i, e)) continue;
|
|
3365
|
+
let t = B(i, e);
|
|
3446
3366
|
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3447
3367
|
}
|
|
3448
3368
|
return r;
|
|
3449
|
-
},
|
|
3450
|
-
|
|
3451
|
-
},
|
|
3452
|
-
|
|
3453
|
-
},
|
|
3454
|
-
if (
|
|
3455
|
-
|
|
3456
|
-
let e = ++
|
|
3457
|
-
if (e !==
|
|
3458
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length <
|
|
3369
|
+
}, Ra = (e) => e === "POPPING" && !lt() || e === "PUSHING" && ct() && !lt(), za = 12, Ba = null, Va = () => {
|
|
3370
|
+
Ba = typeof requestAnimationFrame == "function" ? requestAnimationFrame(Va) : null;
|
|
3371
|
+
}, Ha = () => (Ba === null && typeof requestAnimationFrame == "function" && (Ba = requestAnimationFrame(Va)), $), Ua = !1, Wa = 0, Ga = () => {
|
|
3372
|
+
Ua &&= (Wa += 1, !1);
|
|
3373
|
+
}, Ka = 2, qa = 8, Ja = () => {
|
|
3374
|
+
if (Ua || typeof requestAnimationFrame != "function") return;
|
|
3375
|
+
Ua = !0;
|
|
3376
|
+
let e = ++Wa, t = [], n = Ka, r = null, i = (a) => {
|
|
3377
|
+
if (e !== Wa) return;
|
|
3378
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < qa) {
|
|
3459
3379
|
requestAnimationFrame(i);
|
|
3460
3380
|
return;
|
|
3461
3381
|
}
|
|
3462
|
-
|
|
3382
|
+
Ua = !1;
|
|
3463
3383
|
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3464
|
-
|
|
3384
|
+
xa(s), nt(s, o[o.length - 1]);
|
|
3465
3385
|
};
|
|
3466
3386
|
requestAnimationFrame(i);
|
|
3467
|
-
},
|
|
3468
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l =
|
|
3469
|
-
if (
|
|
3470
|
-
|
|
3471
|
-
let e = f(
|
|
3472
|
-
e && (
|
|
3473
|
-
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (
|
|
3387
|
+
}, Ya = (e, t, n, r) => {
|
|
3388
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = L() && at(), u = !l && L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ba() < za, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? li(e, t, d) : u ? di(e, t, d, ba()) : null : null;
|
|
3389
|
+
if (H(t, n)) {
|
|
3390
|
+
Z(i, t, c, r);
|
|
3391
|
+
let e = f(B(t, n) ?? null, i);
|
|
3392
|
+
e && (U(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3393
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (Z(n, t, c, r), e && (U(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3474
3394
|
}
|
|
3475
3395
|
if (a && t.decoratorName) {
|
|
3476
|
-
let e =
|
|
3477
|
-
e &&
|
|
3396
|
+
let e = Zt.get(t.decoratorName);
|
|
3397
|
+
e && H(e, n) && Z(a, e, c, r);
|
|
3478
3398
|
}
|
|
3479
|
-
for (let e of
|
|
3480
|
-
let t =
|
|
3481
|
-
if (t &&
|
|
3482
|
-
|
|
3483
|
-
let i = f(
|
|
3484
|
-
i && (
|
|
3399
|
+
for (let e of Na(i, n)) {
|
|
3400
|
+
let t = z.get(e.getAttribute(ka));
|
|
3401
|
+
if (t && H(t, n)) {
|
|
3402
|
+
Z(e, t, c, r);
|
|
3403
|
+
let i = f(B(t, n) ?? null, e);
|
|
3404
|
+
i && (U(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3485
3405
|
}
|
|
3486
3406
|
}
|
|
3487
|
-
},
|
|
3407
|
+
}, Xa = (e, t) => {
|
|
3488
3408
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3489
3409
|
if (n) {
|
|
3490
|
-
|
|
3491
|
-
for (let e of
|
|
3410
|
+
Q(n, t);
|
|
3411
|
+
for (let e of Ma(n)) Q(e, t);
|
|
3492
3412
|
}
|
|
3493
|
-
r &&
|
|
3494
|
-
for (let e of i ?? []) e &&
|
|
3495
|
-
},
|
|
3413
|
+
r && Q(r, t);
|
|
3414
|
+
for (let e of i ?? []) e && Q(e, t);
|
|
3415
|
+
}, Za = 4, Qa = (e) => `${Math.round(e * 1e3) / 1e3}s`, $a = (e) => {
|
|
3496
3416
|
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
3497
|
-
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (
|
|
3417
|
+
i = !0, t.style.animation = "none", t.offsetWidth, t.style.removeProperty("animation"), n.mode === "clear" ? (t.style.removeProperty("animation-delay"), a = !1) : n.mode === "set" && (U(t, "animation-delay", e.writer), t.style.animationDelay = Qa(n.seconds), a = !0), i = !1;
|
|
3498
3418
|
}, s = (a) => {
|
|
3499
|
-
if (i || a.target !== t || !
|
|
3500
|
-
if (!e.isLive() || e.budgetUsed() >=
|
|
3419
|
+
if (i || a.target !== t || !kn(a.animationName, n)) return;
|
|
3420
|
+
if (!e.isLive() || e.budgetUsed() >= Za) {
|
|
3501
3421
|
e.onTerminal();
|
|
3502
3422
|
return;
|
|
3503
3423
|
}
|
|
@@ -3520,14 +3440,14 @@ var Ea = "data-flemo-skip-animation", $ = () => {}, Da = 400, Oa = 4, ka = 100,
|
|
|
3520
3440
|
t.addEventListener("animationcancel", s);
|
|
3521
3441
|
},
|
|
3522
3442
|
detach: () => {
|
|
3523
|
-
t.removeEventListener("animationcancel", s), a &&= (
|
|
3443
|
+
t.removeEventListener("animationcancel", s), a &&= (W(t, ["animation-delay"], e.writer), !1);
|
|
3524
3444
|
},
|
|
3525
3445
|
fullRestart: () => {
|
|
3526
3446
|
o({ mode: "clear" });
|
|
3527
3447
|
}
|
|
3528
3448
|
};
|
|
3529
3449
|
};
|
|
3530
|
-
function
|
|
3450
|
+
function eo(e) {
|
|
3531
3451
|
We();
|
|
3532
3452
|
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3533
3453
|
if (!c) return;
|
|
@@ -3553,20 +3473,20 @@ function no(e) {
|
|
|
3553
3473
|
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3554
3474
|
if (h) {
|
|
3555
3475
|
let { scope: e } = d();
|
|
3556
|
-
if (e) if (_ && !g) for (let t of
|
|
3557
|
-
else for (let t of
|
|
3476
|
+
if (e) if (_ && !g) for (let t of Fa(e, m)) t.setAttribute(ja, "true");
|
|
3477
|
+
else for (let t of Ia(e)) t.removeAttribute(ja);
|
|
3558
3478
|
}
|
|
3559
3479
|
if (_) {
|
|
3560
3480
|
let { scope: e, bars: n } = d();
|
|
3561
3481
|
if (e) {
|
|
3562
|
-
|
|
3563
|
-
for (let n of
|
|
3564
|
-
for (let e of n ?? []) e &&
|
|
3482
|
+
Qn(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3483
|
+
for (let n of Ma(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3484
|
+
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3565
3485
|
}
|
|
3566
3486
|
}
|
|
3567
3487
|
_ && (Rr(), o &&= (clearTimeout(o), null), a ||= Fr()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3568
3488
|
o = null, a?.(), a = null;
|
|
3569
|
-
},
|
|
3489
|
+
}, Ta) : (a(), a = null));
|
|
3570
3490
|
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3571
3491
|
if (!y && i) {
|
|
3572
3492
|
let e = i;
|
|
@@ -3580,8 +3500,8 @@ function no(e) {
|
|
|
3580
3500
|
l();
|
|
3581
3501
|
let { scope: e } = d();
|
|
3582
3502
|
if (e) {
|
|
3583
|
-
|
|
3584
|
-
let t =
|
|
3503
|
+
Zn(e);
|
|
3504
|
+
let t = Cr(e), n = Jr(e), i = La(e, Kt(f), m), a = Hi(i + Oa), o = ot() === "on" ? Wr(e, i + Oa) : $, s = nr();
|
|
3585
3505
|
r = () => {
|
|
3586
3506
|
a(), o(), n(), t(), s();
|
|
3587
3507
|
};
|
|
@@ -3590,25 +3510,25 @@ function no(e) {
|
|
|
3590
3510
|
if (y && !i && ut()) {
|
|
3591
3511
|
l();
|
|
3592
3512
|
let { scope: e } = d();
|
|
3593
|
-
e && ot() === "on" && (i = Wr(e,
|
|
3513
|
+
e && ot() === "on" && (i = Wr(e, La(e, Kt(f), m) + Oa, !0));
|
|
3594
3514
|
}
|
|
3595
3515
|
let b = (t, n, r) => {
|
|
3596
3516
|
let i = e.getTransitionTaskId();
|
|
3597
|
-
if (!i || (
|
|
3598
|
-
if (
|
|
3599
|
-
if (
|
|
3600
|
-
if (!
|
|
3601
|
-
if (!
|
|
3517
|
+
if (!i || (ve.pinnedDriver(), L() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3518
|
+
if (L() && ve.pinnedDriver() !== "raf") return Ja(), null;
|
|
3519
|
+
if (ge() || !L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ra(t.split("-")[0])) return null;
|
|
3520
|
+
if (!L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return Ue(), null;
|
|
3521
|
+
if (!ve.playerAllowed()) return null;
|
|
3602
3522
|
let { scope: a, decorator: o, bars: c } = d();
|
|
3603
3523
|
if (!a) return null;
|
|
3604
3524
|
let l = Kt(f);
|
|
3605
|
-
if (
|
|
3525
|
+
if (ve.pinnedDriver() !== "raf") {
|
|
3606
3526
|
let e = t.split("-")[0];
|
|
3607
|
-
if (
|
|
3527
|
+
if (vi(l, e, a) === "native") return null;
|
|
3608
3528
|
}
|
|
3609
|
-
let u =
|
|
3529
|
+
let u = B(l, t);
|
|
3610
3530
|
if (!u) return null;
|
|
3611
|
-
let p = [], h =
|
|
3531
|
+
let p = [], h = Ca.join(i, {
|
|
3612
3532
|
element: a,
|
|
3613
3533
|
motion: u,
|
|
3614
3534
|
role: n,
|
|
@@ -3619,7 +3539,7 @@ function no(e) {
|
|
|
3619
3539
|
p.push(h);
|
|
3620
3540
|
for (let e of c ?? []) {
|
|
3621
3541
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3622
|
-
let n =
|
|
3542
|
+
let n = Ca.join(i, {
|
|
3623
3543
|
element: e,
|
|
3624
3544
|
motion: u,
|
|
3625
3545
|
role: "passive",
|
|
@@ -3628,9 +3548,9 @@ function no(e) {
|
|
|
3628
3548
|
n && p.push(n);
|
|
3629
3549
|
}
|
|
3630
3550
|
if (o && l.decoratorName) {
|
|
3631
|
-
let e =
|
|
3551
|
+
let e = Zt.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3632
3552
|
if (n) {
|
|
3633
|
-
let e =
|
|
3553
|
+
let e = Ca.join(i, {
|
|
3634
3554
|
element: o,
|
|
3635
3555
|
motion: n,
|
|
3636
3556
|
role: "passive",
|
|
@@ -3639,10 +3559,10 @@ function no(e) {
|
|
|
3639
3559
|
e && p.push(e);
|
|
3640
3560
|
}
|
|
3641
3561
|
}
|
|
3642
|
-
for (let e of
|
|
3643
|
-
let n =
|
|
3562
|
+
for (let e of Na(a, t)) {
|
|
3563
|
+
let n = z.get(e.getAttribute(ka)), r = n ? B(n, t) : null;
|
|
3644
3564
|
if (!r) continue;
|
|
3645
|
-
let a =
|
|
3565
|
+
let a = Ca.join(i, {
|
|
3646
3566
|
element: e,
|
|
3647
3567
|
motion: r,
|
|
3648
3568
|
role: "passive"
|
|
@@ -3652,7 +3572,7 @@ function no(e) {
|
|
|
3652
3572
|
return () => p.forEach((e) => e());
|
|
3653
3573
|
}, x = (e, n) => {
|
|
3654
3574
|
let r = [], { decorator: i, bars: a } = d(), o = Kt(f), s = (e, n, i) => {
|
|
3655
|
-
let a = 0, o =
|
|
3575
|
+
let a = 0, o = $a({
|
|
3656
3576
|
element: e,
|
|
3657
3577
|
expectedName: n,
|
|
3658
3578
|
motion: i,
|
|
@@ -3665,15 +3585,15 @@ function no(e) {
|
|
|
3665
3585
|
onTerminal: $
|
|
3666
3586
|
});
|
|
3667
3587
|
o.attach(), r.push(o.detach);
|
|
3668
|
-
}, c =
|
|
3588
|
+
}, c = Dn("screen", f, n), l = B(o, n);
|
|
3669
3589
|
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3670
3590
|
if (i && o.decoratorName) {
|
|
3671
|
-
let e =
|
|
3672
|
-
t && s(i,
|
|
3591
|
+
let e = Zt.get(o.decoratorName), t = e ? B(e, n) : null;
|
|
3592
|
+
t && s(i, Dn("decorator", o.decoratorName, n), t);
|
|
3673
3593
|
}
|
|
3674
|
-
for (let t of
|
|
3675
|
-
let e = t.getAttribute(
|
|
3676
|
-
i && s(t,
|
|
3594
|
+
for (let t of Na(e, n)) {
|
|
3595
|
+
let e = t.getAttribute(ka), r = z.get(e), i = r ? B(r, n) : null;
|
|
3596
|
+
i && s(t, Dn("part", e, n), i);
|
|
3677
3597
|
}
|
|
3678
3598
|
return r;
|
|
3679
3599
|
};
|
|
@@ -3681,12 +3601,12 @@ function no(e) {
|
|
|
3681
3601
|
if (m === "COMPLETED") {
|
|
3682
3602
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3683
3603
|
if (e) {
|
|
3684
|
-
|
|
3685
|
-
for (let t of
|
|
3604
|
+
W(e);
|
|
3605
|
+
for (let t of Ma(e)) W(t);
|
|
3686
3606
|
}
|
|
3687
|
-
n &&
|
|
3688
|
-
for (let e of r ?? []) e &&
|
|
3689
|
-
return
|
|
3607
|
+
n && W(n);
|
|
3608
|
+
for (let e of r ?? []) e && W(e, void 0, t);
|
|
3609
|
+
return Xa({
|
|
3690
3610
|
scope: e,
|
|
3691
3611
|
decorator: n,
|
|
3692
3612
|
bars: r ?? []
|
|
@@ -3694,7 +3614,7 @@ function no(e) {
|
|
|
3694
3614
|
}
|
|
3695
3615
|
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3696
3616
|
let { scope: e, decorator: n, bars: r } = d();
|
|
3697
|
-
e &&
|
|
3617
|
+
e && Ya({
|
|
3698
3618
|
scope: e,
|
|
3699
3619
|
decorator: n,
|
|
3700
3620
|
bars: r ?? []
|
|
@@ -3706,10 +3626,10 @@ function no(e) {
|
|
|
3706
3626
|
let { scope: r } = d();
|
|
3707
3627
|
if (r) {
|
|
3708
3628
|
let n = Kt(f), i = [];
|
|
3709
|
-
if (
|
|
3710
|
-
let a =
|
|
3629
|
+
if (H(n, e)) {
|
|
3630
|
+
let a = B(n, e), o = 0, s = $a({
|
|
3711
3631
|
element: r,
|
|
3712
|
-
expectedName:
|
|
3632
|
+
expectedName: Dn("screen", f, e),
|
|
3713
3633
|
motion: a,
|
|
3714
3634
|
writer: t,
|
|
3715
3635
|
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
@@ -3727,15 +3647,15 @@ function no(e) {
|
|
|
3727
3647
|
return $;
|
|
3728
3648
|
}
|
|
3729
3649
|
if (m === "COMPLETED") {
|
|
3730
|
-
|
|
3650
|
+
Ga(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3731
3651
|
let { scope: n, decorator: r, bars: i } = d();
|
|
3732
3652
|
if (n) {
|
|
3733
|
-
|
|
3734
|
-
for (let e of
|
|
3653
|
+
W(n), W(n, ["transform", "opacity"]), n.removeAttribute(wa);
|
|
3654
|
+
for (let e of Ma(n)) W(e);
|
|
3735
3655
|
}
|
|
3736
|
-
r && (
|
|
3737
|
-
for (let e of i ?? []) e &&
|
|
3738
|
-
return
|
|
3656
|
+
r && (W(r), r.removeAttribute(wa));
|
|
3657
|
+
for (let e of i ?? []) e && W(e, void 0, t);
|
|
3658
|
+
return Xa({
|
|
3739
3659
|
scope: n,
|
|
3740
3660
|
decorator: r,
|
|
3741
3661
|
bars: i ?? []
|
|
@@ -3746,19 +3666,19 @@ function no(e) {
|
|
|
3746
3666
|
if (!S) return $;
|
|
3747
3667
|
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3748
3668
|
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3749
|
-
}, E = Kt(f), D = `${m}-true`, O = S.getAttribute(
|
|
3669
|
+
}, E = Kt(f), D = `${m}-true`, O = S.getAttribute(wa) === "true", k = !O && H(E, D);
|
|
3750
3670
|
if (!O) {
|
|
3751
3671
|
let { decorator: e, bars: n } = d();
|
|
3752
|
-
|
|
3672
|
+
Ya({
|
|
3753
3673
|
scope: S,
|
|
3754
3674
|
decorator: e,
|
|
3755
3675
|
bars: n ?? []
|
|
3756
3676
|
}, E, D, t);
|
|
3757
3677
|
}
|
|
3758
|
-
k &&
|
|
3759
|
-
let A = `${m}-false`, j =
|
|
3760
|
-
for (let e of
|
|
3761
|
-
let t =
|
|
3678
|
+
k && L() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || ba() < za) && (w = Ha());
|
|
3679
|
+
let A = `${m}-false`, j = H(E, A) ? B(E, A) : null, ee = [];
|
|
3680
|
+
for (let e of Pa(S, m)) {
|
|
3681
|
+
let t = z.get(e.getAttribute(ka)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && H(t, n) ? B(t, n) : null;
|
|
3762
3682
|
r && ee.push({
|
|
3763
3683
|
element: e,
|
|
3764
3684
|
motion: r
|
|
@@ -3768,10 +3688,10 @@ function no(e) {
|
|
|
3768
3688
|
for (let { motion: e } of ee) M = Math.max(M, (e.delay + e.duration) * 1e3);
|
|
3769
3689
|
let N = [];
|
|
3770
3690
|
{
|
|
3771
|
-
let e = E.decoratorName ?
|
|
3691
|
+
let e = E.decoratorName ? Zt.get(E.decoratorName) : void 0;
|
|
3772
3692
|
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3773
|
-
if (!
|
|
3774
|
-
let n =
|
|
3693
|
+
if (!H(e, t)) continue;
|
|
3694
|
+
let n = B(e, t);
|
|
3775
3695
|
n && (N.push(n), M = Math.max(M, (n.delay + n.duration) * 1e3));
|
|
3776
3696
|
}
|
|
3777
3697
|
}
|
|
@@ -3779,91 +3699,91 @@ function no(e) {
|
|
|
3779
3699
|
if (!O && M > 0) {
|
|
3780
3700
|
if (!g) return C && s.markGateHeld(C), $;
|
|
3781
3701
|
let e = M + 50;
|
|
3782
|
-
C && s.anchorGate(C, e +
|
|
3702
|
+
C && s.anchorGate(C, e + Oa);
|
|
3783
3703
|
let t = setTimeout(T, e);
|
|
3784
3704
|
return () => clearTimeout(t);
|
|
3785
3705
|
}
|
|
3786
3706
|
return queueMicrotask(T), $;
|
|
3787
3707
|
}
|
|
3788
|
-
let P =
|
|
3708
|
+
let P = B(E, D);
|
|
3789
3709
|
if (C) if (g) {
|
|
3790
3710
|
let e = (P.delay + P.duration) * 1e3;
|
|
3791
|
-
s.anchorGate(C, Math.max(e, M) +
|
|
3711
|
+
s.anchorGate(C, Math.max(e, M) + Oa);
|
|
3792
3712
|
} else s.markGateHeld(C);
|
|
3793
|
-
let
|
|
3794
|
-
|
|
3795
|
-
let
|
|
3713
|
+
let F = !O && !!P, te = E.driver === "native" && !L(), ne = !L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && He(), re = L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && he(), ie = !L() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ra(m), I = ne || re || ie, ae = ge() && mt(), oe = null;
|
|
3714
|
+
F && !L() && !te && !ne && !ie && !ae && (oe = Ni(S, () => [S.ownerDocument.documentElement], () => Aa.get(S)?.(), !1));
|
|
3715
|
+
let se = I ? Ln[m] ?? 0 : ae ? In[m] ?? 0 : 0, ce = ne && (m === "PUSHING" || m === "POPPING");
|
|
3796
3716
|
{
|
|
3797
3717
|
let e = S.ownerDocument.documentElement;
|
|
3798
|
-
|
|
3718
|
+
I && ft() ? e.setAttribute("data-flemo-creep", "true") : e.removeAttribute("data-flemo-creep"), I ? e.setAttribute("data-flemo-lpm", "true") : e.removeAttribute("data-flemo-lpm"), ae ? e.setAttribute("data-flemo-desk-head", "true") : e.removeAttribute("data-flemo-desk-head");
|
|
3799
3719
|
}
|
|
3800
|
-
let
|
|
3801
|
-
|
|
3802
|
-
let
|
|
3803
|
-
|
|
3804
|
-
},
|
|
3805
|
-
|
|
3806
|
-
},
|
|
3720
|
+
let le = null;
|
|
3721
|
+
F && te && (le = Ei(S, () => [S.ownerDocument.documentElement], () => Aa.get(S)?.()));
|
|
3722
|
+
let ue = Dn("screen", f, D), de, fe = () => {
|
|
3723
|
+
de !== void 0 && (clearTimeout(de), de = void 0);
|
|
3724
|
+
}, pe = 0, me, _e = [], ye, be = () => {
|
|
3725
|
+
_e.forEach((e) => cancelAnimationFrame(e)), _e = [], ye !== void 0 && clearTimeout(ye), ye = void 0;
|
|
3726
|
+
}, xe = () => {
|
|
3807
3727
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3808
3728
|
shields exotic embedders. */
|
|
3809
3729
|
if (typeof requestAnimationFrame != "function") {
|
|
3810
3730
|
T();
|
|
3811
3731
|
return;
|
|
3812
3732
|
}
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
},
|
|
3733
|
+
ye = setTimeout(() => {
|
|
3734
|
+
be(), T();
|
|
3735
|
+
}, Da);
|
|
3816
3736
|
let e = (t) => {
|
|
3817
3737
|
if (t <= 0) {
|
|
3818
|
-
|
|
3738
|
+
be(), T();
|
|
3819
3739
|
return;
|
|
3820
3740
|
}
|
|
3821
|
-
|
|
3741
|
+
_e.push(requestAnimationFrame(() => e(t - 1)));
|
|
3822
3742
|
};
|
|
3823
|
-
e(
|
|
3824
|
-
},
|
|
3825
|
-
if (
|
|
3826
|
-
|
|
3743
|
+
e(Ea);
|
|
3744
|
+
}, Se = () => {
|
|
3745
|
+
if (pe <= 0) {
|
|
3746
|
+
xe();
|
|
3827
3747
|
return;
|
|
3828
3748
|
}
|
|
3829
|
-
|
|
3830
|
-
},
|
|
3831
|
-
e.target === S &&
|
|
3749
|
+
me = setTimeout(xe, pe);
|
|
3750
|
+
}, Ce = $, we = $, Te = (e) => {
|
|
3751
|
+
e.target === S && kn(e.animationName, ue) && (S.removeEventListener("animationend", Te), fe(), Ce(), Se());
|
|
3832
3752
|
};
|
|
3833
|
-
S.addEventListener("animationend",
|
|
3834
|
-
let
|
|
3835
|
-
|
|
3836
|
-
let
|
|
3753
|
+
S.addEventListener("animationend", Te);
|
|
3754
|
+
let Ee = F && g ? b(D, "active", xe) : null, De = (P.delay + P.duration) * 1e3, Oe = Math.max(De, M) + 1500, ke = C ? setTimeout(() => void s.resolveTask(C), Oe) : void 0;
|
|
3755
|
+
pe = Math.max(0, M - De);
|
|
3756
|
+
let Ae = De * 1 + se + 250, je = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && H(E, D), Me = $a({
|
|
3837
3757
|
element: S,
|
|
3838
|
-
expectedName:
|
|
3758
|
+
expectedName: ue,
|
|
3839
3759
|
motion: P,
|
|
3840
3760
|
writer: t,
|
|
3841
|
-
isLive:
|
|
3761
|
+
isLive: je,
|
|
3842
3762
|
budgetUsed: () => n.get(C) ?? 0,
|
|
3843
3763
|
spendBudget: () => {
|
|
3844
|
-
|
|
3764
|
+
we(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
3845
3765
|
},
|
|
3846
3766
|
onTerminal: T
|
|
3847
3767
|
});
|
|
3848
|
-
|
|
3849
|
-
let
|
|
3850
|
-
|
|
3851
|
-
},
|
|
3852
|
-
if (
|
|
3853
|
-
|
|
3768
|
+
Ce = Me.detach;
|
|
3769
|
+
let Ne = !1, Pe = () => {
|
|
3770
|
+
fe(), de = setTimeout(Fe, Ae);
|
|
3771
|
+
}, Fe = () => {
|
|
3772
|
+
if (fe(), je() && !Ne) {
|
|
3773
|
+
Ne = !0, we(), Me.fullRestart(), Pe();
|
|
3854
3774
|
return;
|
|
3855
3775
|
}
|
|
3856
3776
|
T();
|
|
3857
|
-
},
|
|
3858
|
-
|
|
3859
|
-
|
|
3777
|
+
}, Ie = !Ee && g, Le = Ie ? x(S, D) : [];
|
|
3778
|
+
Ie && (Me.attach(), C && Pe()), Ie && (te || ne) && Aa.set(S, () => {
|
|
3779
|
+
we(), C && de !== void 0 && Pe();
|
|
3860
3780
|
});
|
|
3861
|
-
let Re =
|
|
3862
|
-
|
|
3781
|
+
let Re = Ie && te ? ji(() => [S.ownerDocument.documentElement], () => {
|
|
3782
|
+
we(), C && de !== void 0 && Pe();
|
|
3863
3783
|
}) : null, ze, Be = () => {
|
|
3864
3784
|
ze !== void 0 && (clearTimeout(ze), ze = void 0);
|
|
3865
3785
|
};
|
|
3866
|
-
if (
|
|
3786
|
+
if (we = Be, Ie && C && !ce && !ie) {
|
|
3867
3787
|
let e = typeof window < "u" && window.devicePixelRatio || 1, t = ai(P, S, e), n = j ? ai(j, S, e) : 0, r = 0;
|
|
3868
3788
|
for (let { element: t, motion: n } of ee) {
|
|
3869
3789
|
let i = ai(n, t, e);
|
|
@@ -3886,22 +3806,30 @@ function no(e) {
|
|
|
3886
3806
|
}
|
|
3887
3807
|
}
|
|
3888
3808
|
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3889
|
-
a !== null && a + 17 <
|
|
3890
|
-
ze = void 0,
|
|
3891
|
-
}, a * 1 + 17 +
|
|
3809
|
+
a !== null && a + 17 < De + pe && (ze = setTimeout(() => {
|
|
3810
|
+
ze = void 0, je() && (S.removeEventListener("animationend", Te), fe(), Ce(), xe());
|
|
3811
|
+
}, a * 1 + 17 + se));
|
|
3892
3812
|
}
|
|
3893
3813
|
return () => {
|
|
3894
|
-
if (w(),
|
|
3895
|
-
|
|
3814
|
+
if (w(), ke !== void 0 && clearTimeout(ke), me !== void 0 && clearTimeout(me), be(), le?.(), oe?.(), Re?.(), Be(), S.removeEventListener("animationend", Te), Ie) {
|
|
3815
|
+
Me.detach();
|
|
3896
3816
|
for (let e of Le) e();
|
|
3897
3817
|
}
|
|
3898
|
-
|
|
3818
|
+
fe(), Ee?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
3899
3819
|
};
|
|
3900
3820
|
},
|
|
3901
3821
|
activeResumeEntryCount: () => n.size
|
|
3902
3822
|
};
|
|
3903
3823
|
}
|
|
3904
3824
|
//#endregion
|
|
3825
|
+
//#region src/transition/swipeSettle.ts
|
|
3826
|
+
var to = .12, no = ({ remainingPx: e, spanPx: t, velocityPxPerSecond: n, authoredSeconds: r, minSeconds: i = to }) => {
|
|
3827
|
+
let a = Math.abs(e);
|
|
3828
|
+
if (a <= .5) return 0;
|
|
3829
|
+
let o = Math.abs(t), s = o > 0 ? r * Math.min(1, a / o) : r, c = Math.abs(n), l = c > 0 ? a / c : Infinity;
|
|
3830
|
+
return Math.min(r, Math.max(i, Math.min(s, l)));
|
|
3831
|
+
};
|
|
3832
|
+
//#endregion
|
|
3905
3833
|
//#region src/utils/findScrollable.ts
|
|
3906
3834
|
function ro(e, t) {
|
|
3907
3835
|
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = io(e);
|
|
@@ -4011,9 +3939,9 @@ function uo(e) {
|
|
|
4011
3939
|
y: e.clientY
|
|
4012
3940
|
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4013
3941
|
}, w = (r, a, o) => {
|
|
4014
|
-
let s =
|
|
4015
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
4016
|
-
else if (r === n) for (let e of i.prev)
|
|
3942
|
+
let s = G(r, a, o, t);
|
|
3943
|
+
if (r === e.getElements().scope) for (let e of i.current) G(e, a, o, t);
|
|
3944
|
+
else if (r === n) for (let e of i.prev) G(e, a, o, t);
|
|
4017
3945
|
return s;
|
|
4018
3946
|
}, T = (e, t) => {
|
|
4019
3947
|
if (!e) return null;
|
|
@@ -4034,16 +3962,24 @@ function uo(e) {
|
|
|
4034
3962
|
current: p,
|
|
4035
3963
|
prev: g
|
|
4036
3964
|
};
|
|
4037
|
-
for (let n of p)
|
|
4038
|
-
for (let n of g)
|
|
3965
|
+
for (let n of p) Z(n, e.getTransition(), !1, t);
|
|
3966
|
+
for (let n of g) Z(n, e.getTransition(), !1, t);
|
|
4039
3967
|
}, D = () => {
|
|
4040
|
-
|
|
4041
|
-
|
|
3968
|
+
let { scope: i, decorator: a } = e.getElements(), o = e.getTransition();
|
|
3969
|
+
i && Z(i, o, !1, t), n && Z(n, o, !1, t);
|
|
3970
|
+
let s = e.getDecorator();
|
|
3971
|
+
s && (a && Z(a, s, !1, t), r && Z(r, s, !1, t));
|
|
3972
|
+
}, O = () => {
|
|
3973
|
+
let { scope: i, decorator: a } = e.getElements();
|
|
3974
|
+
i && Q(i, t), n && Q(n, t), a && Q(a, t), r && Q(r, t);
|
|
3975
|
+
}, k = () => {
|
|
3976
|
+
for (let e of i.current) W(e, void 0, t), Q(e, t);
|
|
3977
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4042
3978
|
i = {
|
|
4043
3979
|
current: [],
|
|
4044
3980
|
prev: []
|
|
4045
3981
|
};
|
|
4046
|
-
},
|
|
3982
|
+
}, A = (t) => {
|
|
4047
3983
|
let { screenContainer: n } = e.getElements(), r = (e) => {
|
|
4048
3984
|
let t = T(e, "[data-flemo-screen]");
|
|
4049
3985
|
return Array.from(e.querySelectorAll("[data-flemo-part-name]")).filter((e) => {
|
|
@@ -4055,26 +3991,26 @@ function uo(e) {
|
|
|
4055
3991
|
current: r(n),
|
|
4056
3992
|
prev: r(t)
|
|
4057
3993
|
};
|
|
4058
|
-
},
|
|
4059
|
-
let
|
|
4060
|
-
let
|
|
4061
|
-
if (!
|
|
4062
|
-
let
|
|
4063
|
-
animate: (e, n, r) =>
|
|
4064
|
-
element:
|
|
4065
|
-
active:
|
|
3994
|
+
}, j = (e, n, r, i) => {
|
|
3995
|
+
let o = (a, o) => {
|
|
3996
|
+
let s = z.get(a.getAttribute("data-flemo-part-name"));
|
|
3997
|
+
if (!s) return;
|
|
3998
|
+
let c = {
|
|
3999
|
+
animate: i ?? ((e, n, r) => G(e, n, r, t)),
|
|
4000
|
+
element: a,
|
|
4001
|
+
active: o
|
|
4066
4002
|
};
|
|
4067
|
-
e === "swipe" ?
|
|
4003
|
+
e === "swipe" ? s.onSwipe?.(n, r, c) : e === "start" ? s.onSwipeStart?.(n, c) : s.onSwipeEnd?.(n, c);
|
|
4068
4004
|
};
|
|
4069
|
-
for (let e of a.current)
|
|
4070
|
-
for (let e of a.prev)
|
|
4071
|
-
},
|
|
4072
|
-
for (let e of [...a.current, ...a.prev])
|
|
4005
|
+
for (let e of a.current) o(e, !0);
|
|
4006
|
+
for (let e of a.prev) o(e, !1);
|
|
4007
|
+
}, ee = () => {
|
|
4008
|
+
for (let e of [...a.current, ...a.prev]) W(e, void 0, t);
|
|
4073
4009
|
a = {
|
|
4074
4010
|
current: [],
|
|
4075
4011
|
prev: []
|
|
4076
4012
|
};
|
|
4077
|
-
},
|
|
4013
|
+
}, M = async (t) => {
|
|
4078
4014
|
let i = e.getTransition();
|
|
4079
4015
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
4080
4016
|
s = !1;
|
|
@@ -4090,7 +4026,7 @@ function uo(e) {
|
|
|
4090
4026
|
s = !1;
|
|
4091
4027
|
return;
|
|
4092
4028
|
}
|
|
4093
|
-
c = !0, x = 0, f = {
|
|
4029
|
+
c = !0, re = ie(), I = 0, ne = (typeof performance > "u" ? Date.now() : performance.now()) + te, x = 0, f = {
|
|
4094
4030
|
x: t.clientX,
|
|
4095
4031
|
y: t.clientY
|
|
4096
4032
|
}, p = {
|
|
@@ -4099,29 +4035,50 @@ function uo(e) {
|
|
|
4099
4035
|
}, m = t.timeStamp, h = {
|
|
4100
4036
|
x: 0,
|
|
4101
4037
|
y: 0
|
|
4102
|
-
}, a.setPointerCapture(t.pointerId), E(u),
|
|
4038
|
+
}, a.setPointerCapture(t.pointerId), E(u), A(u), D();
|
|
4103
4039
|
let g = e.getDecorator(), _ = await i.onSwipeStart(t, b(t), {
|
|
4104
4040
|
animate: w,
|
|
4105
4041
|
currentScreen: a,
|
|
4106
4042
|
prevScreen: n,
|
|
4107
4043
|
onStart: (e) => {
|
|
4108
4044
|
g?.onSwipeStart?.(e, {
|
|
4109
|
-
animate:
|
|
4045
|
+
animate: G,
|
|
4110
4046
|
currentDecorator: l,
|
|
4111
4047
|
prevDecorator: r
|
|
4112
|
-
}),
|
|
4048
|
+
}), j("start", e, 0);
|
|
4113
4049
|
}
|
|
4114
4050
|
});
|
|
4115
|
-
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t),
|
|
4116
|
-
},
|
|
4117
|
-
let t =
|
|
4051
|
+
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t), k(), O(), ee());
|
|
4052
|
+
}, N = (e) => {
|
|
4053
|
+
let t = M(e);
|
|
4118
4054
|
u = t, t.finally(() => {
|
|
4119
4055
|
u = null;
|
|
4120
4056
|
});
|
|
4121
|
-
},
|
|
4057
|
+
}, P = null, F = 0, te = 200, ne = 0, re = !0, ie = () => {
|
|
4058
|
+
let e = n?.parentElement;
|
|
4059
|
+
return !e || !e.isConnected || typeof getComputedStyle != "function" || getComputedStyle(e).display !== "none";
|
|
4060
|
+
}, I = 0, ae = (e) => re ? !0 : e >= ne ? (re = !0, !0) : ie() ? I ? (re = !0, !0) : (I = e, !1) : (I = 0, !1), oe = () => {
|
|
4061
|
+
F && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(F), F = 0, re = !0;
|
|
4062
|
+
let e = P;
|
|
4063
|
+
P = null, e && le(e);
|
|
4064
|
+
}, se = (e = typeof performance > "u" ? Date.now() : performance.now()) => {
|
|
4065
|
+
if (F = 0, !ae(e)) {
|
|
4066
|
+
P && typeof requestAnimationFrame == "function" && (F = requestAnimationFrame(se));
|
|
4067
|
+
return;
|
|
4068
|
+
}
|
|
4069
|
+
let t = P;
|
|
4070
|
+
P = null, t && le(t);
|
|
4071
|
+
}, ce = (e) => {
|
|
4072
|
+
if (P = e, !F) {
|
|
4073
|
+
if (typeof requestAnimationFrame != "function") {
|
|
4074
|
+
se();
|
|
4075
|
+
return;
|
|
4076
|
+
}
|
|
4077
|
+
F = requestAnimationFrame(se);
|
|
4078
|
+
}
|
|
4079
|
+
}, le = (t) => {
|
|
4122
4080
|
let i = e.getTransition();
|
|
4123
4081
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4124
|
-
C(t);
|
|
4125
4082
|
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
4126
4083
|
i.onSwipe(t, b(t), {
|
|
4127
4084
|
animate: w,
|
|
@@ -4129,23 +4086,20 @@ function uo(e) {
|
|
|
4129
4086
|
prevScreen: n,
|
|
4130
4087
|
onProgress: (e, t) => {
|
|
4131
4088
|
s?.onSwipe?.(e, t, {
|
|
4132
|
-
animate:
|
|
4089
|
+
animate: G,
|
|
4133
4090
|
currentDecorator: o,
|
|
4134
4091
|
prevDecorator: r
|
|
4135
|
-
}),
|
|
4092
|
+
}), j("swipe", e, t);
|
|
4136
4093
|
}
|
|
4137
4094
|
});
|
|
4138
|
-
},
|
|
4095
|
+
}, ue = async (o, s = !1) => {
|
|
4139
4096
|
u && await u;
|
|
4140
4097
|
let l = e.getTransition();
|
|
4141
4098
|
if (!l.swipeDirection || !c) return;
|
|
4142
|
-
c = !1;
|
|
4099
|
+
oe(), c = !1;
|
|
4143
4100
|
let { scope: d, decorator: f } = e.getElements();
|
|
4144
4101
|
S(o);
|
|
4145
|
-
let p = e.getDecorator(), m = s || x < 6
|
|
4146
|
-
...n,
|
|
4147
|
-
duration: 0
|
|
4148
|
-
}) : w, h = s ? {
|
|
4102
|
+
let p = e.getDecorator(), m = s || x < 6, h = s ? {
|
|
4149
4103
|
point: {
|
|
4150
4104
|
x: o.clientX,
|
|
4151
4105
|
y: o.clientY
|
|
@@ -4162,23 +4116,43 @@ function uo(e) {
|
|
|
4162
4116
|
x: 0,
|
|
4163
4117
|
y: 0
|
|
4164
4118
|
}
|
|
4165
|
-
} : b(o), g =
|
|
4166
|
-
|
|
4119
|
+
} : b(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y = Math.abs(g === "y" ? h.offset.y : h.offset.x), C = Math.abs(g === "y" ? h.velocity.y : h.velocity.x), T = !1, E = (e) => ((t, n, r) => {
|
|
4120
|
+
let i = typeof r?.duration == "number" ? r.duration : 0;
|
|
4121
|
+
return i <= 0 ? e(t, n, r) : e(t, n, {
|
|
4122
|
+
...r,
|
|
4123
|
+
duration: no({
|
|
4124
|
+
remainingPx: T ? v - y : y,
|
|
4125
|
+
spanPx: v,
|
|
4126
|
+
velocityPxPerSecond: C,
|
|
4127
|
+
authoredSeconds: i
|
|
4128
|
+
})
|
|
4129
|
+
});
|
|
4130
|
+
}), D = m ? (e, t, n) => w(e, t, {
|
|
4131
|
+
...n,
|
|
4132
|
+
duration: 0
|
|
4133
|
+
}) : E(w), A = m ? (e, t, n) => G(e, t, {
|
|
4134
|
+
...n,
|
|
4135
|
+
duration: 0
|
|
4136
|
+
}) : E(G), M = m ? (e, n, r) => G(e, n, {
|
|
4137
|
+
...r,
|
|
4138
|
+
duration: 0
|
|
4139
|
+
}, t) : E((e, n, r) => G(e, n, r, t)), N = await l.onSwipeEnd(o, h, {
|
|
4140
|
+
animate: D,
|
|
4167
4141
|
currentScreen: d,
|
|
4168
4142
|
prevScreen: n,
|
|
4169
4143
|
onStart: (e) => {
|
|
4170
4144
|
let t = !s && e;
|
|
4171
|
-
p?.onSwipeEnd?.(t, {
|
|
4172
|
-
animate:
|
|
4145
|
+
T = t, p?.onSwipeEnd?.(t, {
|
|
4146
|
+
animate: A,
|
|
4173
4147
|
currentDecorator: f,
|
|
4174
4148
|
prevDecorator: r
|
|
4175
|
-
}),
|
|
4149
|
+
}), j("end", t, 0, M);
|
|
4176
4150
|
}
|
|
4177
4151
|
});
|
|
4178
|
-
if (!s &&
|
|
4152
|
+
if (!s && N) {
|
|
4179
4153
|
d?.setAttribute(lo, "true"), f?.setAttribute(lo, "true");
|
|
4180
|
-
for (let e of i.current)
|
|
4181
|
-
for (let e of i.prev)
|
|
4154
|
+
for (let e of i.current) Q(e, t);
|
|
4155
|
+
for (let e of i.prev) W(e, void 0, t), Q(e, t);
|
|
4182
4156
|
i = {
|
|
4183
4157
|
current: [],
|
|
4184
4158
|
prev: []
|
|
@@ -4186,7 +4160,7 @@ function uo(e) {
|
|
|
4186
4160
|
current: [],
|
|
4187
4161
|
prev: []
|
|
4188
4162
|
}, e.back();
|
|
4189
|
-
} else d &&
|
|
4163
|
+
} else d && W(d, void 0, t), n && W(n, void 0, t), f && W(f), r && W(r), k(), O(), ee(), e.setDragStatus("IDLE");
|
|
4190
4164
|
};
|
|
4191
4165
|
return {
|
|
4192
4166
|
pointerDown: (t) => {
|
|
@@ -4201,7 +4175,7 @@ function uo(e) {
|
|
|
4201
4175
|
pointerMove: (t) => {
|
|
4202
4176
|
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4203
4177
|
if (c) {
|
|
4204
|
-
|
|
4178
|
+
C(t), ce(t);
|
|
4205
4179
|
return;
|
|
4206
4180
|
}
|
|
4207
4181
|
if (!o) return;
|
|
@@ -4215,17 +4189,17 @@ function uo(e) {
|
|
|
4215
4189
|
return;
|
|
4216
4190
|
}
|
|
4217
4191
|
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4218
|
-
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0,
|
|
4192
|
+
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0, N(t);
|
|
4219
4193
|
else {
|
|
4220
4194
|
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4221
|
-
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0,
|
|
4195
|
+
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, N(t));
|
|
4222
4196
|
}
|
|
4223
4197
|
},
|
|
4224
4198
|
pointerUp: (e) => {
|
|
4225
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c &&
|
|
4199
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && ue(e));
|
|
4226
4200
|
},
|
|
4227
4201
|
pointerCancel: (e) => {
|
|
4228
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c &&
|
|
4202
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && ue(e, !0));
|
|
4229
4203
|
},
|
|
4230
4204
|
shouldPreventTouch: () => s
|
|
4231
4205
|
};
|
|
@@ -4495,7 +4469,7 @@ function Bo(e) {
|
|
|
4495
4469
|
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4496
4470
|
var Vo = () => {}, Ho = "data-flemo-gpu-prewarm", Uo = 2e3, Wo = 1200, Go = 120, Ko = 3, qo = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Jo = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", Yo = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Xo = "cold", Zo = 0, Qo = null;
|
|
4497
4471
|
function $o() {
|
|
4498
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !
|
|
4472
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !L()) return Vo;
|
|
4499
4473
|
if (Zo += 1, Xo === "cold") {
|
|
4500
4474
|
Xo = "scheduled";
|
|
4501
4475
|
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
@@ -4575,4 +4549,4 @@ function ts(e, n) {
|
|
|
4575
4549
|
};
|
|
4576
4550
|
}
|
|
4577
4551
|
//#endregion
|
|
4578
|
-
export { vo as ANIM_HOLD_RELEASE_BACKSTOP_MS,
|
|
4552
|
+
export { vo as ANIM_HOLD_RELEASE_BACKSTOP_MS, to as MIN_SETTLE_SECONDS, q as OFFLOADED_SRC_ATTR, or as OVERSIZE_AREA_RATIO, wa as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, _o as animHoldKey, G as animateInline, Dn as animationName, ne as appendParamsQuery, zn as applyTransitionStyles, ts as buildRoutePath, oo as canProgrammaticallyScroll, W as clearInlineAnimation, bn as collectAnimatedProperties, Nn as compileTransitionStyles, co as computeBarRiding, Nt as computeScreenFreeze, Mt as computeScreenFreezeMode, b as consumeSelfInducedPop, Ao as createAnimHoldCoordinator, g as createBrowserHistoryDriver, qt as createDecorator, c as createHistoryStore, x as createHistorySync, yr as createImageDecodeOffloader, j as createMemoryHistoryDriver, ee as createNavigateStore, F as createNavigationController, Qt as createPartTransition, Jt as createRawDecorator, $t as createRawPartTransition, Ft as createRawTransition, ue as createRouterScope, de as createScreenSelector, se as createScreenStore, _ as createSelfPopGuard, re as createStepController, uo as createSwipeController, Pt as createTransition, eo as createTransitionEngine, I as createTransitionStore, Bt as cupertino, Zt as decoratorMap, L as detectBlinkEngine, xo as eagerlyDecodeImages, Sn as easingToCss, $o as ensureGpuPipelinePrewarm, xr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Kn as enteringInitialStyle, ro as findScrollable, l as getMatchedPathPattern, u as getParams, He as governedCompiledActive, Fr as holdCompositorWarm, _e as isDesktopBlink, he as isLegacyAndroidBlink, es as isOpaqueColor, f as isServer, Ht as layout, Ve as lowPowerCadenceActive, y as markSelfInducedPop, ae as matchesPathname, Ut as material, Wt as none, jo as observeBarHeight, Bo as observeViewportScrollHeight, ao as overflowsAxis, Xt as overlay, z as partTransitionMap, pt as readDeferReleaseCommitFlag, dt as readDesktopReleaseFlipFlag, _t as readImageOffloadOverride, ht as readPrerasterFlag, gt as readRestLayerPromotionFlag, ct as readSettleGateFlag, te as readStepParams, Gn as registerTransitionDefinitions, A as releaseScopeHistorySync, Kt as resolveTransition, Oo as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, so as sharedBarsMatch, mr as shouldOffloadImage, it as steadySixtyPlayerEligible, ie as subscribeStepParamsRestore, no as swipeSettleSeconds, xn as targetToDecls, Gt as transitionMap, H as variantHasAnimation };
|