@flemo/core 1.22.1 → 1.24.0
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__/createTransitionEngine.steadySixty.test.d.ts +1 -0
- package/dist/core/engine/__tests__/diagnosticFlags.test.d.ts +1 -0
- package/dist/core/engine/__tests__/documentedDefaults.test.d.ts +1 -0
- package/dist/core/engine/__tests__/emulationNotice.test.d.ts +1 -0
- package/dist/core/engine/__tests__/flightWindow.test.d.ts +1 -0
- package/dist/core/engine/__tests__/gpuPipelinePrewarm.test.d.ts +1 -0
- package/dist/core/engine/__tests__/imageDecodeHygiene.test.d.ts +1 -0
- package/dist/core/engine/__tests__/imageRevealHold.test.d.ts +1 -0
- package/dist/core/engine/__tests__/landingPixelSnap.test.d.ts +1 -0
- package/dist/core/engine/__tests__/layerSettleHold.test.d.ts +1 -0
- package/dist/core/engine/__tests__/lowPowerCadence.test.d.ts +1 -0
- package/dist/core/engine/__tests__/responseHold.test.d.ts +1 -0
- package/dist/core/engine/__tests__/steadySixtyCadence.test.d.ts +1 -0
- package/dist/core/engine/compositorWarmUp.d.ts +1 -0
- package/dist/core/engine/createSwipeController.d.ts +7 -4
- package/dist/core/engine/createTransitionEngine.d.ts +1 -0
- package/dist/core/engine/diagnosticFlags.d.ts +19 -0
- package/dist/core/engine/driverPolicy.d.ts +2 -13
- package/dist/core/engine/emulationNotice.d.ts +3 -0
- package/dist/core/engine/flightWindow.d.ts +5 -0
- package/dist/core/engine/gpuPipelinePrewarm.d.ts +4 -0
- package/dist/core/engine/imageDecodeHygiene.d.ts +1 -0
- package/dist/core/engine/imageRevealHold.d.ts +2 -0
- package/dist/core/engine/landingPixelSnap.d.ts +10 -0
- package/dist/core/engine/layerSettleHold.d.ts +5 -0
- package/dist/core/engine/lowPowerCadence.d.ts +6 -0
- package/dist/core/engine/motionDriverKind.d.ts +1 -1
- package/dist/core/engine/nativeStallAnchor.d.ts +3 -0
- package/dist/core/engine/responseHold.d.ts +4 -0
- package/dist/core/engine/steadySixtyCadence.d.ts +5 -0
- package/dist/core/engine/transitionPlayer.d.ts +10 -1
- package/dist/index.d.ts +8 -3
- package/dist/index.mjs +2209 -1111
- package/dist/screen/animStartAnchor.d.ts +1 -0
- package/dist/screen/computeBarRiding.d.ts +9 -1
- package/dist/screen/computeScreenFreeze.d.ts +1 -0
- package/dist/screen/store.d.ts +12 -1
- package/dist/transition/__tests__/resolveTransition.test.d.ts +1 -0
- package/dist/transition/animateInline.d.ts +3 -3
- package/dist/transition/compileTransitionStyles.d.ts +3 -1
- package/dist/transition/settleScrub.d.ts +3 -3
- package/package.json +5 -5
- package/dist/transition/__tests__/coverageBranches.test.d.ts +0 -6
- /package/dist/core/{__tests__/taskManagerBranches.test.d.ts → engine/__tests__/createTransitionEngine.flightImageHold.test.d.ts} +0 -0
- /package/dist/{history/__tests__/historyDriverBranches.test.d.ts → core/engine/__tests__/createTransitionEngine.governedHead.test.d.ts} +0 -0
- /package/dist/{transition/__tests__/swipe.test.d.ts → core/engine/__tests__/createTransitionEngine.outerPartHold.test.d.ts} +0 -0
package/dist/index.mjs
CHANGED
|
@@ -274,10 +274,10 @@ function l(e, t) {
|
|
|
274
274
|
//#endregion
|
|
275
275
|
//#region src/utils/getParams.ts
|
|
276
276
|
function u(e, t, r) {
|
|
277
|
-
let i =
|
|
278
|
-
return
|
|
279
|
-
...
|
|
280
|
-
...
|
|
277
|
+
let i = l(e, t), a = n(i)(t), o = new URLSearchParams(r), s = Object.fromEntries(o.entries());
|
|
278
|
+
return a ? {
|
|
279
|
+
...a.params,
|
|
280
|
+
...s
|
|
281
281
|
} : {};
|
|
282
282
|
}
|
|
283
283
|
//#endregion
|
|
@@ -377,7 +377,7 @@ function _() {
|
|
|
377
377
|
e += 1;
|
|
378
378
|
},
|
|
379
379
|
consume() {
|
|
380
|
-
return e > 0
|
|
380
|
+
return e > 0 && (--e, !0);
|
|
381
381
|
}
|
|
382
382
|
};
|
|
383
383
|
}
|
|
@@ -518,12 +518,12 @@ function k(e) {
|
|
|
518
518
|
ownsPathname: e.ownsPathname
|
|
519
519
|
}));
|
|
520
520
|
}
|
|
521
|
-
function
|
|
521
|
+
function ee(e) {
|
|
522
522
|
e.persistent || (O.get(e)?.(), O.delete(e));
|
|
523
523
|
}
|
|
524
524
|
//#endregion
|
|
525
525
|
//#region src/history/memoryHistoryDriver.ts
|
|
526
|
-
function
|
|
526
|
+
function A(e) {
|
|
527
527
|
let t = [{
|
|
528
528
|
state: e?.state ?? null,
|
|
529
529
|
url: e?.url ?? "/"
|
|
@@ -664,16 +664,7 @@ function ne(e) {
|
|
|
664
664
|
})).result?.();
|
|
665
665
|
}, u = async (e, l, u) => {
|
|
666
666
|
let { status: d } = t.navigate.getState();
|
|
667
|
-
if (d !== "COMPLETED" && d !== "IDLE")
|
|
668
|
-
await s.resolveAllPending();
|
|
669
|
-
for (let e = 0; e < 5; e++) {
|
|
670
|
-
let { status: e } = t.navigate.getState();
|
|
671
|
-
if (e === "COMPLETED" || e === "IDLE") break;
|
|
672
|
-
await new Promise((e) => setTimeout(e, 0));
|
|
673
|
-
}
|
|
674
|
-
let { status: e } = t.navigate.getState();
|
|
675
|
-
if (e !== "COMPLETED" && e !== "IDLE") return;
|
|
676
|
-
}
|
|
667
|
+
if (d !== "COMPLETED" && d !== "IDLE") return;
|
|
677
668
|
let f = t.transition.getState().defaultTransitionName, { transitionName: p = f, layoutId: m = null } = u ?? {}, h = s.generateTaskId();
|
|
678
669
|
(await s.addTask(async (a) => {
|
|
679
670
|
if (t.life && !t.life.alive) {
|
|
@@ -881,21 +872,60 @@ function ce(e, t) {
|
|
|
881
872
|
}
|
|
882
873
|
//#endregion
|
|
883
874
|
//#region src/screen/store.ts
|
|
884
|
-
|
|
875
|
+
var le = (e, t) => {
|
|
876
|
+
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
877
|
+
...e,
|
|
878
|
+
height: t?.height
|
|
879
|
+
};
|
|
880
|
+
};
|
|
881
|
+
function ue() {
|
|
885
882
|
return e((e) => ({
|
|
886
883
|
dragStatus: "IDLE",
|
|
887
884
|
replaceTransitionStatus: "IDLE",
|
|
888
885
|
sharedBars: {},
|
|
886
|
+
sharedBarMetadata: {},
|
|
889
887
|
screenSurfaces: {},
|
|
890
888
|
setDragStatus: (t) => e({ dragStatus: t }),
|
|
891
889
|
setReplaceTransitionStatus: (t) => e({ replaceTransitionStatus: t }),
|
|
892
|
-
registerSharedBars: (t, n) => e((e) =>
|
|
893
|
-
|
|
894
|
-
|
|
895
|
-
|
|
890
|
+
registerSharedBars: (t, n, r) => e((e) => {
|
|
891
|
+
let i = r ?? {
|
|
892
|
+
topBar: n.topBar ? {} : void 0,
|
|
893
|
+
bottomBar: n.bottomBar ? {} : void 0
|
|
894
|
+
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
895
|
+
topBar: le(i.topBar, o?.topBar),
|
|
896
|
+
bottomBar: le(i.bottomBar, o?.bottomBar)
|
|
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
|
+
return c && l ? e : {
|
|
899
|
+
sharedBars: {
|
|
900
|
+
...e.sharedBars,
|
|
901
|
+
[t]: n
|
|
902
|
+
},
|
|
903
|
+
sharedBarMetadata: {
|
|
904
|
+
...e.sharedBarMetadata,
|
|
905
|
+
[t]: s
|
|
906
|
+
}
|
|
907
|
+
};
|
|
908
|
+
}),
|
|
909
|
+
updateSharedBarHeight: (t, n, r) => e((e) => {
|
|
910
|
+
if (r <= 0) return e;
|
|
911
|
+
let i = e.sharedBarMetadata[t], a = i?.[n];
|
|
912
|
+
return !i || !a || a.height === r ? e : { sharedBarMetadata: {
|
|
913
|
+
...e.sharedBarMetadata,
|
|
914
|
+
[t]: {
|
|
915
|
+
...i,
|
|
916
|
+
[n]: {
|
|
917
|
+
...a,
|
|
918
|
+
height: r
|
|
919
|
+
}
|
|
920
|
+
}
|
|
921
|
+
} };
|
|
922
|
+
}),
|
|
896
923
|
unregisterSharedBars: (t) => e((e) => {
|
|
897
|
-
let n = { ...e.sharedBars };
|
|
898
|
-
return delete n[t],
|
|
924
|
+
let n = { ...e.sharedBars }, r = { ...e.sharedBarMetadata };
|
|
925
|
+
return delete n[t], delete r[t], {
|
|
926
|
+
sharedBars: n,
|
|
927
|
+
sharedBarMetadata: r
|
|
928
|
+
};
|
|
899
929
|
}),
|
|
900
930
|
registerScreenSurface: (t, n) => e((e) => {
|
|
901
931
|
let r = e.screenSurfaces[t];
|
|
@@ -912,14 +942,14 @@ function P() {
|
|
|
912
942
|
}
|
|
913
943
|
//#endregion
|
|
914
944
|
//#region src/core/createRouterScope.ts
|
|
915
|
-
var
|
|
945
|
+
var de = {
|
|
916
946
|
mark: () => {},
|
|
917
947
|
consume: () => !1
|
|
918
|
-
},
|
|
919
|
-
function
|
|
948
|
+
}, fe = /* @__PURE__ */ new Map();
|
|
949
|
+
function pe(e) {
|
|
920
950
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
921
951
|
if (s) {
|
|
922
|
-
let e =
|
|
952
|
+
let e = fe.get(s);
|
|
923
953
|
if (e) {
|
|
924
954
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
925
955
|
let t = e.history.getState();
|
|
@@ -939,7 +969,7 @@ function ue(e) {
|
|
|
939
969
|
index: 0,
|
|
940
970
|
histories: [p]
|
|
941
971
|
}), e.hostedScope;
|
|
942
|
-
let m = a ?
|
|
972
|
+
let m = a ? A({
|
|
943
973
|
state: {
|
|
944
974
|
id: p.id,
|
|
945
975
|
index: 0,
|
|
@@ -949,11 +979,11 @@ function ue(e) {
|
|
|
949
979
|
layoutId: p.layoutId
|
|
950
980
|
},
|
|
951
981
|
url: p.pathname
|
|
952
|
-
}) : o, h = a ?
|
|
982
|
+
}) : o, h = a ? de : _(), g = {
|
|
953
983
|
history: c([p], 0),
|
|
954
984
|
navigate: te(),
|
|
955
985
|
transition: se(i),
|
|
956
|
-
screen:
|
|
986
|
+
screen: ue(),
|
|
957
987
|
driver: m,
|
|
958
988
|
markSelfInduced: h.mark,
|
|
959
989
|
consume: h.consume,
|
|
@@ -963,11 +993,11 @@ function ue(e) {
|
|
|
963
993
|
persistent: !!s,
|
|
964
994
|
life: { alive: !0 }
|
|
965
995
|
};
|
|
966
|
-
return s &&
|
|
996
|
+
return s && fe.set(s, g), g;
|
|
967
997
|
}
|
|
968
998
|
//#endregion
|
|
969
999
|
//#region src/screen/createScreenSelector.ts
|
|
970
|
-
function
|
|
1000
|
+
function me(e, t) {
|
|
971
1001
|
return e.map((n, r) => ({
|
|
972
1002
|
...n,
|
|
973
1003
|
isActive: r === t,
|
|
@@ -979,18 +1009,163 @@ function de(e, t) {
|
|
|
979
1009
|
}));
|
|
980
1010
|
}
|
|
981
1011
|
//#endregion
|
|
982
|
-
//#region src/
|
|
983
|
-
|
|
1012
|
+
//#region src/core/engine/driverPolicy.ts
|
|
1013
|
+
var he = "flemo:motion-driver-force", ge = !1, _e = () => {
|
|
1014
|
+
try {
|
|
1015
|
+
try {
|
|
1016
|
+
typeof localStorage < "u" && localStorage.removeItem(he);
|
|
1017
|
+
} catch {}
|
|
1018
|
+
if (typeof sessionStorage > "u") return null;
|
|
1019
|
+
let e = sessionStorage.getItem(he);
|
|
1020
|
+
if (e === null) return null;
|
|
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 ? (!ge && typeof console < "u" && (ge = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${he}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(he), null);
|
|
1023
|
+
} catch {
|
|
1024
|
+
return null;
|
|
1025
|
+
}
|
|
1026
|
+
}, P = () => {
|
|
1027
|
+
if (typeof navigator > "u") return !1;
|
|
1028
|
+
let e = navigator.userAgentData?.brands;
|
|
1029
|
+
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1030
|
+
let t = navigator.userAgent ?? "";
|
|
1031
|
+
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1032
|
+
}, ve = () => {
|
|
1033
|
+
if (typeof navigator > "u") return !1;
|
|
1034
|
+
let e = navigator.userAgentData?.brands;
|
|
1035
|
+
if (Array.isArray(e)) return !1;
|
|
1036
|
+
let t = navigator.userAgent ?? "";
|
|
1037
|
+
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t) && (navigator.maxTouchPoints ?? 0) > 0;
|
|
1038
|
+
}, ye = ((e = !1) => ({
|
|
1039
|
+
playerAllowed: () => {
|
|
1040
|
+
let t = _e();
|
|
1041
|
+
return t ? t === "raf" : e;
|
|
1042
|
+
},
|
|
1043
|
+
pinnedDriver: _e
|
|
1044
|
+
}))(!0), be = 28, xe = 42, Se = 8, Ce = 20, we = 6, Te = 400, Ee = 8, De = "flemo:lpm", Oe = () => !P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && typeof requestAnimationFrame == "function", ke = () => {
|
|
1045
|
+
try {
|
|
1046
|
+
return typeof sessionStorage < "u" && sessionStorage.getItem(De) === "1";
|
|
1047
|
+
} catch {
|
|
1048
|
+
return !1;
|
|
1049
|
+
}
|
|
1050
|
+
}, Ae = (e) => {
|
|
1051
|
+
try {
|
|
1052
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(De, e ? "1" : "0");
|
|
1053
|
+
} catch {}
|
|
1054
|
+
}, je = !1, Me = !1, Ne = !1, Pe = 12, Fe = 8, F = [], Ie = null, I = !1, Le = !1, Re = !1, ze = () => {
|
|
1055
|
+
if (I || !Oe()) return;
|
|
1056
|
+
I = !0;
|
|
1057
|
+
let e = (t) => {
|
|
1058
|
+
if (Ie !== null && (F.push(t - Ie), F.length > Pe && F.shift(), F.length >= Fe)) {
|
|
1059
|
+
let e = [...F].sort((e, t) => e - t), t = e.slice(1, e.length - 1), n = t[t.length >> 1];
|
|
1060
|
+
t[t.length - 1] - t[0] <= Se && (Le = n >= be && n <= xe, Re = !0);
|
|
1061
|
+
}
|
|
1062
|
+
Ie = t, requestAnimationFrame(e);
|
|
1063
|
+
};
|
|
1064
|
+
requestAnimationFrame(e);
|
|
1065
|
+
}, Be = () => je || Re && Le, Ve = () => Oe(), He = (e = 0) => {
|
|
1066
|
+
if (Me || !Oe()) return;
|
|
1067
|
+
Me = !0;
|
|
1068
|
+
let t = [], n = null, r = (i) => {
|
|
1069
|
+
if (n !== null && t.push(i - n), n = i, t.length < we) {
|
|
1070
|
+
requestAnimationFrame(r);
|
|
1071
|
+
return;
|
|
1072
|
+
}
|
|
1073
|
+
Me = !1;
|
|
1074
|
+
let a = [...t].sort((e, t) => e - t), o = a.slice(0, a.length - 1), s = o[0] >= be && o[o.length - 1] <= xe && o[o.length - 1] - o[0] <= Se, c = o[o.length - 1] <= Ce;
|
|
1075
|
+
if (s || c) {
|
|
1076
|
+
je = s, s && o[Math.floor(o.length / 2)], Ae(je);
|
|
1077
|
+
return;
|
|
1078
|
+
}
|
|
1079
|
+
/* v8 ignore next 3 -- setTimeout exists in every runtime under test. */
|
|
1080
|
+
e + 1 < Ee && typeof setTimeout == "function" && setTimeout(() => He(e + 1), Te);
|
|
1081
|
+
};
|
|
1082
|
+
requestAnimationFrame(r);
|
|
1083
|
+
}, Ue = () => {
|
|
1084
|
+
ze(), He(), !(Ne || typeof document > "u" || typeof document.addEventListener != "function") && (Ne = !0, document.addEventListener("visibilitychange", () => {
|
|
1085
|
+
document.visibilityState === "visible" && He();
|
|
1086
|
+
}));
|
|
1087
|
+
};
|
|
1088
|
+
Oe() && (je = ke(), ze(), He());
|
|
1089
|
+
var We = 14, Ge = 22, Ke = 2, qe = 1.5, Je = "flemo:sixty", Ye = () => {
|
|
1090
|
+
try {
|
|
1091
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(Je) : null;
|
|
1092
|
+
} catch {
|
|
1093
|
+
return null;
|
|
1094
|
+
}
|
|
1095
|
+
}, Xe = (e) => {
|
|
1096
|
+
try {
|
|
1097
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Je, e);
|
|
1098
|
+
} catch {}
|
|
1099
|
+
}, Ze = Ye(), Qe = Ze === "high", $e = Ze !== null && Ze !== "high" ? Math.min(Ke, Math.max(0, parseInt(Ze, 10) || 0)) : 0, et = (e, t) => {
|
|
1100
|
+
if (!(!Number.isFinite(e) || e <= 0)) {
|
|
1101
|
+
if (e < 12) {
|
|
1102
|
+
if (t !== void 0 && t > 24) return;
|
|
1103
|
+
Qe = !0, $e = 0, Xe("high");
|
|
1104
|
+
return;
|
|
1105
|
+
}
|
|
1106
|
+
if (e >= We && e <= Ge) {
|
|
1107
|
+
$e = Math.min(Ke, $e + 1), Qe || Xe(String($e));
|
|
1108
|
+
return;
|
|
1109
|
+
}
|
|
1110
|
+
e < We && ($e = 0, Qe || Xe("0"));
|
|
1111
|
+
}
|
|
1112
|
+
}, tt = () => !Qe && $e >= Ke, nt = () => tt() && P() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= qe, L = (e) => {
|
|
1113
|
+
try {
|
|
1114
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1115
|
+
} catch {
|
|
1116
|
+
return null;
|
|
1117
|
+
}
|
|
1118
|
+
}, rt = () => L("flemo:landing-snap") === "on", it = () => {
|
|
1119
|
+
let e = L("flemo:imghold");
|
|
1120
|
+
return e === "on" || e === "off" ? e : null;
|
|
1121
|
+
}, at = () => P() && (navigator.maxTouchPoints ?? 0) > 0, ot = () => {
|
|
1122
|
+
try {
|
|
1123
|
+
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1124
|
+
return e === "on" ? !0 : e === "off" ? !1 : Ve() || nt() || at();
|
|
1125
|
+
} catch {
|
|
1126
|
+
return !1;
|
|
1127
|
+
}
|
|
1128
|
+
}, st = () => L("flemo:handoff") === "on", ct = () => L("flemo:arrivalhold") !== "off", lt = () => L("flemo:preraster") === "on", ut = () => {
|
|
1129
|
+
let e = L("flemo:imgoffload");
|
|
1130
|
+
return e === "on" || e === "off" ? e : null;
|
|
1131
|
+
}, dt, ft = () => {
|
|
1132
|
+
if (dt !== void 0) return dt;
|
|
1133
|
+
let e = L("flemo:apply");
|
|
1134
|
+
return dt = e === "scrub" ? e : null, dt;
|
|
1135
|
+
}, pt, mt = () => {
|
|
1136
|
+
if (pt !== void 0) return pt;
|
|
1137
|
+
let e = L("flemo:handoff");
|
|
1138
|
+
return pt = e === "on" ? e : null, pt;
|
|
1139
|
+
}, ht, gt = () => {
|
|
1140
|
+
if (ht !== void 0) return ht;
|
|
1141
|
+
let e = L("flemo:snap");
|
|
1142
|
+
return ht = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, ht;
|
|
1143
|
+
}, _t, vt = () => {
|
|
1144
|
+
if (_t !== void 0) return _t;
|
|
1145
|
+
let e = L("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1146
|
+
return _t = Number.isFinite(t) && t > 0 ? t : 4, _t;
|
|
1147
|
+
}, yt, bt = () => {
|
|
1148
|
+
if (yt !== void 0) return yt;
|
|
1149
|
+
let e = L("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1150
|
+
return yt = Number.isFinite(t) && t >= 0 ? t : 100, yt;
|
|
1151
|
+
}, xt, St = () => (xt === void 0 && (xt = L("flemo:layers") === "resident"), xt), Ct, wt = () => (Ct === void 0 && (Ct = L("flemo:freeze") === "shallow"), Ct);
|
|
1152
|
+
(() => {
|
|
1153
|
+
try {
|
|
1154
|
+
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
1155
|
+
/[?&]flemo-freeze=shallow\b/.test(location.search) ? sessionStorage.setItem("flemo:freeze", "shallow") : /[?&]flemo-freeze=off\b/.test(location.search) && sessionStorage.removeItem("flemo:freeze");
|
|
1156
|
+
} catch {}
|
|
1157
|
+
})();
|
|
1158
|
+
function Tt(e) {
|
|
984
1159
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
985
1160
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
986
|
-
return !e.isActive && t ? "deferred" : "live";
|
|
1161
|
+
return !e.isActive && t ? wt() ? "live" : "deferred" : "live";
|
|
987
1162
|
}
|
|
988
|
-
function
|
|
989
|
-
return
|
|
1163
|
+
function Et(e) {
|
|
1164
|
+
return Tt(e) !== "live";
|
|
990
1165
|
}
|
|
991
1166
|
//#endregion
|
|
992
1167
|
//#region src/transition/createTransition.ts
|
|
993
|
-
function
|
|
1168
|
+
function Dt({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
994
1169
|
return {
|
|
995
1170
|
name: e,
|
|
996
1171
|
initial: t,
|
|
@@ -1011,7 +1186,7 @@ function I({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exit
|
|
|
1011
1186
|
}
|
|
1012
1187
|
//#endregion
|
|
1013
1188
|
//#region src/transition/createRawTransition.ts
|
|
1014
|
-
function
|
|
1189
|
+
function Ot({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1015
1190
|
return {
|
|
1016
1191
|
name: e,
|
|
1017
1192
|
initial: t,
|
|
@@ -1032,15 +1207,15 @@ function me({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1032
1207
|
}
|
|
1033
1208
|
//#endregion
|
|
1034
1209
|
//#region src/transition/cupertino.ts
|
|
1035
|
-
var
|
|
1210
|
+
var kt = (e, t, n) => {
|
|
1036
1211
|
let [r, i] = t, [a, o] = n;
|
|
1037
1212
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1038
|
-
},
|
|
1213
|
+
}, At = 30, jt = .7, Mt = [
|
|
1039
1214
|
.32,
|
|
1040
1215
|
.72,
|
|
1041
1216
|
0,
|
|
1042
1217
|
1
|
|
1043
|
-
],
|
|
1218
|
+
], Nt = Dt({
|
|
1044
1219
|
name: "cupertino",
|
|
1045
1220
|
initial: { x: "100%" },
|
|
1046
1221
|
idle: {
|
|
@@ -1050,29 +1225,29 @@ var he = (e, t, n) => {
|
|
|
1050
1225
|
enter: {
|
|
1051
1226
|
value: { x: 0 },
|
|
1052
1227
|
options: {
|
|
1053
|
-
duration:
|
|
1054
|
-
ease:
|
|
1228
|
+
duration: jt,
|
|
1229
|
+
ease: Mt
|
|
1055
1230
|
}
|
|
1056
1231
|
},
|
|
1057
1232
|
enterBack: {
|
|
1058
1233
|
value: { x: "100%" },
|
|
1059
1234
|
options: {
|
|
1060
|
-
duration:
|
|
1061
|
-
ease:
|
|
1235
|
+
duration: jt,
|
|
1236
|
+
ease: Mt
|
|
1062
1237
|
}
|
|
1063
1238
|
},
|
|
1064
1239
|
exit: {
|
|
1065
|
-
value: { x: `-${
|
|
1240
|
+
value: { x: `-${At}%` },
|
|
1066
1241
|
options: {
|
|
1067
|
-
duration:
|
|
1068
|
-
ease:
|
|
1242
|
+
duration: jt,
|
|
1243
|
+
ease: Mt
|
|
1069
1244
|
}
|
|
1070
1245
|
},
|
|
1071
1246
|
exitBack: {
|
|
1072
1247
|
value: { x: 0 },
|
|
1073
1248
|
options: {
|
|
1074
|
-
duration:
|
|
1075
|
-
ease:
|
|
1249
|
+
duration: jt,
|
|
1250
|
+
ease: Mt
|
|
1076
1251
|
}
|
|
1077
1252
|
},
|
|
1078
1253
|
options: {
|
|
@@ -1080,24 +1255,24 @@ var he = (e, t, n) => {
|
|
|
1080
1255
|
swipeDirection: "x",
|
|
1081
1256
|
onSwipeStart: async () => !0,
|
|
1082
1257
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1083
|
-
let { offset: o } = t, s = o.x, c =
|
|
1084
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1258
|
+
let { offset: o } = t, s = o.x, c = kt(s, [0, window.innerWidth], [0, 100]);
|
|
1259
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + At / 100 * c}%` }, { duration: 0 }), c;
|
|
1085
1260
|
},
|
|
1086
1261
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1087
1262
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1088
1263
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1089
1264
|
duration: .3,
|
|
1090
|
-
ease:
|
|
1091
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1265
|
+
ease: Mt
|
|
1266
|
+
}), n(i, { x: c ? 0 : `-${At}%` }, {
|
|
1092
1267
|
duration: .3,
|
|
1093
|
-
ease:
|
|
1268
|
+
ease: Mt
|
|
1094
1269
|
})]), c;
|
|
1095
1270
|
}
|
|
1096
1271
|
}
|
|
1097
|
-
}),
|
|
1272
|
+
}), Pt = (e, t, n) => {
|
|
1098
1273
|
let [r, i] = t, [a, o] = n;
|
|
1099
1274
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1100
|
-
},
|
|
1275
|
+
}, Ft = Dt({
|
|
1101
1276
|
name: "layout",
|
|
1102
1277
|
initial: { opacity: .97 },
|
|
1103
1278
|
idle: {
|
|
@@ -1125,7 +1300,7 @@ var he = (e, t, n) => {
|
|
|
1125
1300
|
swipeDirection: "y",
|
|
1126
1301
|
onSwipeStart: async () => !0,
|
|
1127
1302
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1128
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1303
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = Pt(s, [0, 56], [1, .96]), l = Math.max(0, o - 56), u = Math.min(1, l / 160), d = Math.sqrt(u) * 12, f = Math.max(0, s + d), p = Math.min(56, f);
|
|
1129
1304
|
return i?.(!0, 100), n(r, {
|
|
1130
1305
|
y: f,
|
|
1131
1306
|
opacity: c
|
|
@@ -1142,7 +1317,7 @@ var he = (e, t, n) => {
|
|
|
1142
1317
|
}, { duration: .3 })]), c;
|
|
1143
1318
|
}
|
|
1144
1319
|
}
|
|
1145
|
-
}),
|
|
1320
|
+
}), It = Dt({
|
|
1146
1321
|
name: "material",
|
|
1147
1322
|
initial: { y: "100%" },
|
|
1148
1323
|
idle: {
|
|
@@ -1250,7 +1425,7 @@ var he = (e, t, n) => {
|
|
|
1250
1425
|
})]), c;
|
|
1251
1426
|
}
|
|
1252
1427
|
}
|
|
1253
|
-
}),
|
|
1428
|
+
}), Lt = Dt({
|
|
1254
1429
|
name: "none",
|
|
1255
1430
|
initial: {},
|
|
1256
1431
|
idle: {
|
|
@@ -1273,20 +1448,20 @@ var he = (e, t, n) => {
|
|
|
1273
1448
|
value: {},
|
|
1274
1449
|
options: { duration: 0 }
|
|
1275
1450
|
}
|
|
1276
|
-
}),
|
|
1277
|
-
["none",
|
|
1278
|
-
["cupertino",
|
|
1279
|
-
["material",
|
|
1280
|
-
["layout",
|
|
1451
|
+
}), Rt = /* @__PURE__ */ new Map([
|
|
1452
|
+
["none", Lt],
|
|
1453
|
+
["cupertino", Nt],
|
|
1454
|
+
["material", It],
|
|
1455
|
+
["layout", Ft]
|
|
1281
1456
|
]);
|
|
1282
1457
|
//#endregion
|
|
1283
1458
|
//#region src/transition/resolveTransition.ts
|
|
1284
|
-
function
|
|
1285
|
-
return
|
|
1459
|
+
function R(e) {
|
|
1460
|
+
return Rt.get(e) ?? Rt.get("none");
|
|
1286
1461
|
}
|
|
1287
1462
|
//#endregion
|
|
1288
1463
|
//#region src/transition/decorator/createDecorator.ts
|
|
1289
|
-
function
|
|
1464
|
+
function zt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1290
1465
|
return {
|
|
1291
1466
|
name: e,
|
|
1292
1467
|
initial: t,
|
|
@@ -1307,7 +1482,7 @@ function xe({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1307
1482
|
}
|
|
1308
1483
|
//#endregion
|
|
1309
1484
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1310
|
-
function
|
|
1485
|
+
function Bt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1311
1486
|
return {
|
|
1312
1487
|
name: e,
|
|
1313
1488
|
initial: t,
|
|
@@ -1328,30 +1503,30 @@ function Se({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1328
1503
|
}
|
|
1329
1504
|
//#endregion
|
|
1330
1505
|
//#region src/transition/decorator/overlay.ts
|
|
1331
|
-
var
|
|
1506
|
+
var Vt = "rgba(0, 0, 0, 0.1)", Ht = zt({
|
|
1332
1507
|
name: "overlay",
|
|
1333
1508
|
initial: {
|
|
1334
1509
|
opacity: 0,
|
|
1335
|
-
backgroundColor:
|
|
1510
|
+
backgroundColor: Vt
|
|
1336
1511
|
},
|
|
1337
1512
|
idle: {
|
|
1338
1513
|
value: {
|
|
1339
1514
|
opacity: 0,
|
|
1340
|
-
backgroundColor:
|
|
1515
|
+
backgroundColor: Vt
|
|
1341
1516
|
},
|
|
1342
1517
|
options: { duration: 0 }
|
|
1343
1518
|
},
|
|
1344
1519
|
enter: {
|
|
1345
1520
|
value: {
|
|
1346
1521
|
opacity: 1,
|
|
1347
|
-
backgroundColor:
|
|
1522
|
+
backgroundColor: Vt
|
|
1348
1523
|
},
|
|
1349
1524
|
options: { duration: .7 }
|
|
1350
1525
|
},
|
|
1351
1526
|
exit: {
|
|
1352
1527
|
value: {
|
|
1353
1528
|
opacity: 0,
|
|
1354
|
-
backgroundColor:
|
|
1529
|
+
backgroundColor: Vt
|
|
1355
1530
|
},
|
|
1356
1531
|
options: { duration: .7 }
|
|
1357
1532
|
},
|
|
@@ -1360,10 +1535,10 @@ var Ce = "rgba(0, 0, 0, 0.1)", we = xe({
|
|
|
1360
1535
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1361
1536
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1362
1537
|
}
|
|
1363
|
-
}),
|
|
1538
|
+
}), z = /* @__PURE__ */ new Map([["overlay", Ht]]);
|
|
1364
1539
|
//#endregion
|
|
1365
1540
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1366
|
-
function
|
|
1541
|
+
function Ut({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1367
1542
|
return {
|
|
1368
1543
|
name: e,
|
|
1369
1544
|
initial: t,
|
|
@@ -1384,7 +1559,7 @@ function Ee({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1384
1559
|
}
|
|
1385
1560
|
//#endregion
|
|
1386
1561
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1387
|
-
function
|
|
1562
|
+
function Wt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1388
1563
|
return {
|
|
1389
1564
|
name: e,
|
|
1390
1565
|
initial: t,
|
|
@@ -1405,7 +1580,7 @@ function De({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1405
1580
|
}
|
|
1406
1581
|
//#endregion
|
|
1407
1582
|
//#region src/transition/partTransition/partTransition.ts
|
|
1408
|
-
var
|
|
1583
|
+
var B = /* @__PURE__ */ new Map(), Gt = {
|
|
1409
1584
|
"IDLE-true": "self",
|
|
1410
1585
|
"IDLE-false": "self",
|
|
1411
1586
|
"PUSHING-true": "initial",
|
|
@@ -1416,17 +1591,17 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1416
1591
|
"POPPING-false": "PUSHING-false",
|
|
1417
1592
|
"COMPLETED-true": "self",
|
|
1418
1593
|
"COMPLETED-false": "self"
|
|
1419
|
-
},
|
|
1594
|
+
}, Kt = Object.keys(Gt), qt = (e) => {
|
|
1420
1595
|
if (!e) return 0;
|
|
1421
1596
|
let t = e.duration;
|
|
1422
1597
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1423
|
-
},
|
|
1424
|
-
let n =
|
|
1598
|
+
}, Jt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, Yt = (e, t) => {
|
|
1599
|
+
let n = Gt[t];
|
|
1425
1600
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1426
|
-
},
|
|
1427
|
-
let n =
|
|
1601
|
+
}, V = (e, t) => {
|
|
1602
|
+
let n = Yt(e, t);
|
|
1428
1603
|
if (n === null) return null;
|
|
1429
|
-
let r = e.variants[t], i =
|
|
1604
|
+
let r = e.variants[t], i = qt(r.options), a = Jt(r.options);
|
|
1430
1605
|
return i <= 0 && a <= 0 ? null : {
|
|
1431
1606
|
from: n,
|
|
1432
1607
|
to: r.value,
|
|
@@ -1434,7 +1609,7 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1434
1609
|
delay: a,
|
|
1435
1610
|
ease: r.options?.ease
|
|
1436
1611
|
};
|
|
1437
|
-
},
|
|
1612
|
+
}, Xt = Kt, Zt = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), Qt = (e) => typeof e == "object" && !!e && !Array.isArray(e), $t = /* @__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(".")), en = (e, t) => t.startsWith("--") || $t.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, tn = (e, t) => typeof t == "number" ? en(t, e) : typeof t == "string" ? t : "", nn = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), rn = /* @__PURE__ */ new Set([
|
|
1438
1613
|
"x",
|
|
1439
1614
|
"y",
|
|
1440
1615
|
"z",
|
|
@@ -1445,7 +1620,7 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1445
1620
|
"rotateX",
|
|
1446
1621
|
"rotateY",
|
|
1447
1622
|
"rotateZ"
|
|
1448
|
-
]),
|
|
1623
|
+
]), an = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, on = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, sn = /^1(\.0+)?$/, cn = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && sn.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && on.test(t.trim()) : t === 0 || typeof t == "string" && an.test(t.trim()), ln = (e, t) => {
|
|
1449
1624
|
switch (e) {
|
|
1450
1625
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1451
1626
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1459,16 +1634,16 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1459
1634
|
case "rotateY": return `rotateY(${t})`;
|
|
1460
1635
|
default: return "";
|
|
1461
1636
|
}
|
|
1462
|
-
},
|
|
1637
|
+
}, un = (e) => {
|
|
1463
1638
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1464
|
-
if (!
|
|
1639
|
+
if (!Qt(e)) return;
|
|
1465
1640
|
let n = [];
|
|
1466
1641
|
for (let r of Object.keys(e)) {
|
|
1467
|
-
let i = e[r], a =
|
|
1468
|
-
if (a !== "") if (
|
|
1642
|
+
let i = e[r], a = tn(r, i);
|
|
1643
|
+
if (a !== "") if (rn.has(r)) n.push(`${r}:${a}`);
|
|
1469
1644
|
else {
|
|
1470
|
-
let e = t.get(
|
|
1471
|
-
e.add(a), t.set(
|
|
1645
|
+
let e = t.get(nn(r)) ?? /* @__PURE__ */ new Set();
|
|
1646
|
+
e.add(a), t.set(nn(r), e);
|
|
1472
1647
|
}
|
|
1473
1648
|
}
|
|
1474
1649
|
r.add(n.sort().join("|"));
|
|
@@ -1478,13 +1653,13 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1478
1653
|
n = r.size > 1;
|
|
1479
1654
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1480
1655
|
return n && a.push("transform"), a;
|
|
1481
|
-
},
|
|
1482
|
-
if (!
|
|
1656
|
+
}, dn = (e) => {
|
|
1657
|
+
if (!Qt(e)) return [];
|
|
1483
1658
|
let t = [], n = !0, r = [];
|
|
1484
1659
|
for (let i of Object.keys(e)) {
|
|
1485
|
-
let a = e[i], o =
|
|
1486
|
-
o !== "" && (
|
|
1487
|
-
property:
|
|
1660
|
+
let a = e[i], o = tn(i, a);
|
|
1661
|
+
o !== "" && (rn.has(i) ? (t.push(ln(i, o)), cn(i, a) || (n = !1)) : r.push({
|
|
1662
|
+
property: nn(i),
|
|
1488
1663
|
value: o
|
|
1489
1664
|
}));
|
|
1490
1665
|
}
|
|
@@ -1492,7 +1667,7 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1492
1667
|
property: "transform",
|
|
1493
1668
|
value: n ? "none" : t.join(" ")
|
|
1494
1669
|
}), r;
|
|
1495
|
-
},
|
|
1670
|
+
}, H = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), fn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1496
1671
|
linear: "linear",
|
|
1497
1672
|
easeIn: "ease-in",
|
|
1498
1673
|
easeOut: "ease-out",
|
|
@@ -1502,29 +1677,29 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1502
1677
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1503
1678
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1504
1679
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1505
|
-
}[e] ?? "ease" : "ease",
|
|
1680
|
+
}[e] ?? "ease" : "ease", pn = (e, t) => {
|
|
1506
1681
|
let [n, r] = t.split("-");
|
|
1507
1682
|
return `[data-flemo-screen][data-flemo-transition="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1508
|
-
},
|
|
1683
|
+
}, mn = (e, t) => {
|
|
1509
1684
|
let [n, r] = t.split("-");
|
|
1510
1685
|
return `[data-flemo-decorator][data-flemo-decorator-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1511
|
-
},
|
|
1686
|
+
}, hn = (e, t) => {
|
|
1512
1687
|
let [n, r] = t.split("-");
|
|
1513
1688
|
return `[data-flemo-bar][data-flemo-bar-transition="${e}"][data-flemo-bar-status="${n}"][data-flemo-bar-active="${r}"][data-flemo-bar-riding="true"]`;
|
|
1514
|
-
},
|
|
1689
|
+
}, gn = (e, t) => {
|
|
1515
1690
|
let [n, r] = t.split("-");
|
|
1516
1691
|
return `[data-flemo-part-name="${e}"][data-flemo-status="${n}"][data-flemo-active="${r}"]`;
|
|
1517
|
-
},
|
|
1518
|
-
let o =
|
|
1692
|
+
}, _n = (e, t, n) => `flemo-${e}-${Zt(t)}-${n}`, vn = (e, t, n, r, i, a) => {
|
|
1693
|
+
let o = dn(r), s = dn(i.value), c = qt(i.options), l = Jt(i.options), u = fn(i.options?.ease), d = a(t, n), f = e === "screen" ? `${d},\n${hn(t, n)}` : d;
|
|
1519
1694
|
if (s.length === 0 && o.length === 0) return "";
|
|
1520
|
-
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${
|
|
1521
|
-
let p =
|
|
1695
|
+
if (c <= 0 && l <= 0) return s.length === 0 ? "" : `${f} {\n${H(s)}\n animation: none;\n}`;
|
|
1696
|
+
let p = _n(e, t, n), m = [
|
|
1522
1697
|
`@keyframes ${p} {`,
|
|
1523
1698
|
" from {",
|
|
1524
|
-
|
|
1699
|
+
H(o).replace(/^/gm, " "),
|
|
1525
1700
|
" }",
|
|
1526
1701
|
" to {",
|
|
1527
|
-
|
|
1702
|
+
H(s).replace(/^/gm, " "),
|
|
1528
1703
|
" }",
|
|
1529
1704
|
"}"
|
|
1530
1705
|
].join("\n"), h = [
|
|
@@ -1533,107 +1708,123 @@ var H = /* @__PURE__ */ new Map(), Oe = {
|
|
|
1533
1708
|
u,
|
|
1534
1709
|
l > 0 ? `${l}s` : null,
|
|
1535
1710
|
"both"
|
|
1536
|
-
].filter(Boolean).join(" "), g =
|
|
1537
|
-
|
|
1538
|
-
|
|
1711
|
+
].filter(Boolean).join(" "), g = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, _ = (() => {
|
|
1712
|
+
if (e === "part") return "";
|
|
1713
|
+
let t = g(n);
|
|
1714
|
+
if (t <= 0 || c <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1715
|
+
let r = c + t, i = (t / r * 100).toFixed(3), a = `${p}-lpm`, u = f.split(",\n").map((e) => `:root[data-flemo-lpm] ${e}`).join(",\n");
|
|
1716
|
+
return `\n@keyframes ${a} {\n 0%, ${i}% {\n${H(o).replace(/^/gm, " ")}\n }\n 100% {\n${H(s).replace(/^/gm, " ")}\n }\n}\n${u} {\n animation-name: ${a};\n animation-duration: ${r.toFixed(3)}s;\n animation-delay: ${(l + t).toFixed(3)}s;\n}`;
|
|
1717
|
+
})(), v = (() => {
|
|
1718
|
+
if (e !== "part") return "";
|
|
1719
|
+
let t = g(n);
|
|
1720
|
+
return t <= 0 || c <= 0 ? "" : `\n${f.split(",\n").map((e) => `:root[data-flemo-lpm] ${e}`).join(",\n")} {\n animation-delay: ${(l + t).toFixed(3)}s;\n}`;
|
|
1721
|
+
})(), y = new Map(o.map((e) => [e.property, e.value])), b = new Map(s.map((e) => [e.property, e.value])), x = Array.from(/* @__PURE__ */ new Set([...y.keys(), ...b.keys()])).filter((e) => y.get(e) !== b.get(e)), S = x.length > 0 ? ` will-change: ${x.join(", ")};\n` : "", C = n.split("-")[0];
|
|
1722
|
+
return `${m}\n${`${f} {\n animation: ${h};\n${S}${C === "PUSHING" || C === "REPLACING" ? " contain: layout;\n" : ""}}`}${_}${v}${e === "screen" && n.endsWith("-false") && yn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park"] {\n animation: none;\n${H(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && yn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-under"] {\n animation: none;\n${H(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && yn(r) && s.length > 0 ? `\n${d}[data-flemo-anim-hold="park-over"] {\n animation: none;\n${H(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1723
|
+
}, yn = (e) => {
|
|
1539
1724
|
if (!e) return !1;
|
|
1540
1725
|
if (e.opacity === 0) return !0;
|
|
1541
1726
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1542
1727
|
return t(e.x) || t(e.y);
|
|
1543
|
-
},
|
|
1544
|
-
let i =
|
|
1545
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1546
|
-
},
|
|
1728
|
+
}, bn = (e, t, n, r) => {
|
|
1729
|
+
let i = dn(r.value);
|
|
1730
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${H(i)}\n}`;
|
|
1731
|
+
}, xn = (e, t, n = []) => {
|
|
1547
1732
|
let r = [];
|
|
1548
1733
|
for (let t of e) {
|
|
1549
1734
|
let e = t.name;
|
|
1550
|
-
for (let n of
|
|
1551
|
-
let i = t.variants[n], a =
|
|
1735
|
+
for (let n of Kt) {
|
|
1736
|
+
let i = t.variants[n], a = Gt[n];
|
|
1552
1737
|
if (a === "self") {
|
|
1553
|
-
r.push(
|
|
1738
|
+
r.push(bn(pn, e, n, i));
|
|
1554
1739
|
continue;
|
|
1555
1740
|
}
|
|
1556
1741
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1557
|
-
r.push(
|
|
1742
|
+
r.push(vn("screen", e, n, o, i, pn));
|
|
1558
1743
|
}
|
|
1559
1744
|
}
|
|
1560
1745
|
for (let e of t) {
|
|
1561
1746
|
let t = e.name;
|
|
1562
|
-
for (let n of
|
|
1563
|
-
let i = e.variants[n], a =
|
|
1747
|
+
for (let n of Xt) {
|
|
1748
|
+
let i = e.variants[n], a = Gt[n];
|
|
1564
1749
|
if (a === "self") {
|
|
1565
|
-
r.push(
|
|
1750
|
+
r.push(bn(mn, t, n, i));
|
|
1566
1751
|
continue;
|
|
1567
1752
|
}
|
|
1568
1753
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1569
|
-
r.push(
|
|
1754
|
+
r.push(vn("decorator", t, n, o, i, mn));
|
|
1570
1755
|
}
|
|
1571
1756
|
}
|
|
1572
1757
|
for (let e of n) {
|
|
1573
1758
|
let t = e.name;
|
|
1574
|
-
for (let n of
|
|
1575
|
-
let i = e.variants[n], a =
|
|
1759
|
+
for (let n of Xt) {
|
|
1760
|
+
let i = e.variants[n], a = Gt[n];
|
|
1576
1761
|
if (a === "self") {
|
|
1577
|
-
r.push(
|
|
1762
|
+
r.push(bn(gn, t, n, i));
|
|
1578
1763
|
continue;
|
|
1579
1764
|
}
|
|
1580
1765
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1581
|
-
r.push(
|
|
1766
|
+
r.push(vn("part", t, n, o, i, gn));
|
|
1582
1767
|
}
|
|
1583
1768
|
}
|
|
1584
1769
|
return [
|
|
1585
1770
|
...r.filter((e) => e.length > 0),
|
|
1586
|
-
|
|
1587
|
-
|
|
1771
|
+
Sn,
|
|
1772
|
+
Cn
|
|
1588
1773
|
].join("\n\n");
|
|
1589
|
-
},
|
|
1774
|
+
}, Sn = [
|
|
1590
1775
|
"[data-flemo-anim-hold=\"true\"],",
|
|
1591
1776
|
"[data-flemo-anim-hold=\"park\"],",
|
|
1592
1777
|
"[data-flemo-anim-hold=\"park-under\"],",
|
|
1778
|
+
"[data-flemo-anim-hold=\"park-over\"],",
|
|
1593
1779
|
"[data-flemo-anim-hold=\"true\"] [data-flemo-part-name],",
|
|
1594
1780
|
"[data-flemo-anim-hold=\"park\"] [data-flemo-part-name],",
|
|
1595
|
-
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name]
|
|
1781
|
+
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name],",
|
|
1782
|
+
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1596
1783
|
" animation-play-state: paused !important;",
|
|
1597
1784
|
"}"
|
|
1598
|
-
].join("\n"),
|
|
1785
|
+
].join("\n"), Cn = [
|
|
1599
1786
|
"[data-flemo-held-arrival] {",
|
|
1600
1787
|
" display: none !important;",
|
|
1601
1788
|
"}"
|
|
1602
|
-
].join("\n"),
|
|
1603
|
-
let n =
|
|
1789
|
+
].join("\n"), U = (e, t) => {
|
|
1790
|
+
let n = Gt[t];
|
|
1604
1791
|
if (n === "self") return !1;
|
|
1605
|
-
let r = e.variants[t], i =
|
|
1792
|
+
let r = e.variants[t], i = qt(r.options), a = Jt(r.options);
|
|
1606
1793
|
if (i <= 0 && a <= 0) return !1;
|
|
1607
|
-
let o =
|
|
1794
|
+
let o = dn(n === "initial" ? e.initial : e.variants[n].value), s = dn(r.value);
|
|
1608
1795
|
return o.length > 0 || s.length > 0;
|
|
1609
|
-
},
|
|
1610
|
-
|
|
1796
|
+
}, wn = {
|
|
1797
|
+
REPLACING: 180,
|
|
1798
|
+
PUSHING: 100,
|
|
1799
|
+
POPPING: 80
|
|
1800
|
+
}, Tn = "data-flemo";
|
|
1801
|
+
function En() {
|
|
1611
1802
|
if (f()) return;
|
|
1612
|
-
let e =
|
|
1613
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1803
|
+
let e = xn(Rt.values(), z.values(), B.values()), t = document.head.querySelector(`style[${Tn}]`);
|
|
1804
|
+
t || (t = document.createElement("style"), t.setAttribute(Tn, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1614
1805
|
}
|
|
1615
1806
|
//#endregion
|
|
1616
1807
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1617
|
-
var
|
|
1808
|
+
var Dn = /* @__PURE__ */ new Map(), On = /* @__PURE__ */ new Map(), kn = /* @__PURE__ */ new Map(), An = (e, t) => {
|
|
1618
1809
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1619
|
-
},
|
|
1810
|
+
}, jn = (e, t) => {
|
|
1620
1811
|
let n = (e.get(t) ?? 1) - 1;
|
|
1621
1812
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1622
1813
|
};
|
|
1623
|
-
function
|
|
1624
|
-
for (let t of e)
|
|
1625
|
-
for (let e of t)
|
|
1626
|
-
for (let e of n)
|
|
1627
|
-
return
|
|
1628
|
-
for (let t of e)
|
|
1629
|
-
for (let e of t)
|
|
1630
|
-
for (let e of n)
|
|
1631
|
-
|
|
1814
|
+
function Mn(e, t, n = []) {
|
|
1815
|
+
for (let t of e) Rt.set(t.name, t), An(Dn, t.name);
|
|
1816
|
+
for (let e of t) z.set(e.name, e), An(On, e.name);
|
|
1817
|
+
for (let e of n) B.set(e.name, e), An(kn, e.name);
|
|
1818
|
+
return En(), () => {
|
|
1819
|
+
for (let t of e) jn(Dn, t.name) && Rt.delete(t.name);
|
|
1820
|
+
for (let e of t) jn(On, e.name) && z.delete(e.name);
|
|
1821
|
+
for (let e of n) jn(kn, e.name) && B.delete(e.name);
|
|
1822
|
+
En();
|
|
1632
1823
|
};
|
|
1633
1824
|
}
|
|
1634
1825
|
//#endregion
|
|
1635
1826
|
//#region src/transition/enteringInitialStyle.ts
|
|
1636
|
-
function
|
|
1827
|
+
function Nn(e) {
|
|
1637
1828
|
let { initial: t, isActive: n, status: r } = e;
|
|
1638
1829
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1639
1830
|
let i = {};
|
|
@@ -1641,10 +1832,10 @@ function pt(e) {
|
|
|
1641
1832
|
}
|
|
1642
1833
|
//#endregion
|
|
1643
1834
|
//#region src/transition/settleScrub.ts
|
|
1644
|
-
var
|
|
1835
|
+
var Pn = () => ({
|
|
1645
1836
|
request: (e) => requestAnimationFrame(e),
|
|
1646
1837
|
cancel: (e) => cancelAnimationFrame(e)
|
|
1647
|
-
}),
|
|
1838
|
+
}), Fn = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), In = ((e = Pn()) => {
|
|
1648
1839
|
let t = /* @__PURE__ */ new Map(), n = null, r = () => {
|
|
1649
1840
|
t.size === 0 && n !== null && (e.cancel(n), n = null);
|
|
1650
1841
|
}, i = (e, n) => {
|
|
@@ -1673,149 +1864,470 @@ var mt = () => ({
|
|
|
1673
1864
|
t.size > 0 && (n = e.request(a));
|
|
1674
1865
|
};
|
|
1675
1866
|
return {
|
|
1676
|
-
settle: (r, o, s, c) => {
|
|
1867
|
+
settle: (r, o, s, c, l) => {
|
|
1677
1868
|
if (typeof r.animate != "function") return null;
|
|
1678
1869
|
i(r, "current");
|
|
1679
|
-
let
|
|
1680
|
-
for (let e of o)
|
|
1681
|
-
let
|
|
1870
|
+
let u = {};
|
|
1871
|
+
for (let e of o) u[Fn(e.property)] = e.value;
|
|
1872
|
+
let d;
|
|
1682
1873
|
try {
|
|
1683
|
-
|
|
1874
|
+
d = r.animate([u], {
|
|
1684
1875
|
duration: Math.max(0, s.durationMs),
|
|
1685
1876
|
delay: Math.max(0, s.delayMs),
|
|
1686
1877
|
easing: s.easing,
|
|
1687
1878
|
fill: "forwards"
|
|
1688
|
-
}),
|
|
1879
|
+
}), d.pause(), d.currentTime = 0;
|
|
1689
1880
|
} catch {
|
|
1690
1881
|
return null;
|
|
1691
1882
|
}
|
|
1692
|
-
let
|
|
1883
|
+
let f = Math.max(0, s.durationMs) + Math.max(0, s.delayMs);
|
|
1693
1884
|
return new Promise((s) => {
|
|
1694
|
-
let
|
|
1885
|
+
let u = {
|
|
1695
1886
|
element: r,
|
|
1696
|
-
animation:
|
|
1887
|
+
animation: d,
|
|
1697
1888
|
decls: o,
|
|
1698
|
-
totalMs:
|
|
1889
|
+
totalMs: f,
|
|
1699
1890
|
startTime: null,
|
|
1700
1891
|
writeFinal: c,
|
|
1701
1892
|
resolve: s,
|
|
1702
|
-
backstop: setTimeout(() => i(r, "end"),
|
|
1893
|
+
backstop: setTimeout(() => i(r, "end"), f + 60),
|
|
1894
|
+
owner: l
|
|
1703
1895
|
};
|
|
1704
|
-
t.set(r,
|
|
1896
|
+
t.set(r, u), n === null && (n = e.request(a));
|
|
1705
1897
|
});
|
|
1706
1898
|
},
|
|
1707
|
-
takeover: (e) =>
|
|
1708
|
-
|
|
1899
|
+
takeover: (e, n) => {
|
|
1900
|
+
let r = t.get(e);
|
|
1901
|
+
r && (n === void 0 || r.owner === n) && i(e, "current");
|
|
1902
|
+
},
|
|
1903
|
+
cancel: (e, n) => {
|
|
1904
|
+
let r = t.get(e);
|
|
1905
|
+
r && (n === void 0 || r.owner === n) && i(e, "drop");
|
|
1906
|
+
}
|
|
1709
1907
|
};
|
|
1710
|
-
})(),
|
|
1711
|
-
|
|
1712
|
-
|
|
1713
|
-
|
|
1714
|
-
|
|
1715
|
-
|
|
1716
|
-
|
|
1717
|
-
|
|
1718
|
-
|
|
1719
|
-
|
|
1720
|
-
|
|
1721
|
-
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
return
|
|
1727
|
-
} catch {
|
|
1728
|
-
return null;
|
|
1908
|
+
})(), Ln = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Rn = /* @__PURE__ */ new WeakMap(), zn = Symbol("flemo-inline-writer"), Bn = /* @__PURE__ */ new WeakMap(), W = (e, t, n = zn) => {
|
|
1909
|
+
let r = Rn.get(e);
|
|
1910
|
+
r || (r = /* @__PURE__ */ new Map(), Rn.set(e, r));
|
|
1911
|
+
let i = r.get(t);
|
|
1912
|
+
i || (i = {
|
|
1913
|
+
original: e.style.getPropertyValue(t),
|
|
1914
|
+
owners: /* @__PURE__ */ new Set()
|
|
1915
|
+
}, r.set(t, i)), i.owners.add(n);
|
|
1916
|
+
}, G = (e, t, n) => {
|
|
1917
|
+
In.cancel(e, n);
|
|
1918
|
+
let r = Rn.get(e);
|
|
1919
|
+
(!n || Bn.get(e) === n) && (e.style.transition = "", Bn.delete(e));
|
|
1920
|
+
let i = (t) => {
|
|
1921
|
+
let i = r?.get(t);
|
|
1922
|
+
if (!i) {
|
|
1923
|
+
n || e.style.removeProperty(t);
|
|
1924
|
+
return;
|
|
1729
1925
|
}
|
|
1730
|
-
|
|
1731
|
-
write: (e) => {
|
|
1732
|
-
try {
|
|
1733
|
-
typeof localStorage < "u" && localStorage.setItem(_t, e);
|
|
1734
|
-
} catch {}
|
|
1735
|
-
}
|
|
1736
|
-
}), St = 30, Ct = 2, wt = 2, Tt = () => typeof navigator < "u" && !!navigator.userAgentData, Et = (e = xt(), t = !1, n = !0) => {
|
|
1737
|
-
let r = n && e.read() === "css", i = r;
|
|
1738
|
-
r &&= !1;
|
|
1739
|
-
let a = 0, o = 0, s = [];
|
|
1740
|
-
return {
|
|
1741
|
-
playerAllowed: () => {
|
|
1742
|
-
let e = bt();
|
|
1743
|
-
return e ? e === "raf" : t && !r;
|
|
1744
|
-
},
|
|
1745
|
-
pinnedDriver: bt,
|
|
1746
|
-
beginRun: () => {
|
|
1747
|
-
o = 0, s = [];
|
|
1748
|
-
},
|
|
1749
|
-
reportGap: (e) => {
|
|
1750
|
-
s.push(e), e >= St && (o += 1);
|
|
1751
|
-
},
|
|
1752
|
-
endRun: () => {
|
|
1753
|
-
let t = o >= Ct;
|
|
1754
|
-
if (t && (a += 1), n) {
|
|
1755
|
-
if (i) {
|
|
1756
|
-
i = !1, t ? r = !0 : e.write("raf");
|
|
1757
|
-
return;
|
|
1758
|
-
}
|
|
1759
|
-
t && a >= wt && !r && (r = !0, e.write("css"));
|
|
1760
|
-
}
|
|
1761
|
-
},
|
|
1762
|
-
stats: () => ({
|
|
1763
|
-
runGaps: [...s],
|
|
1764
|
-
strikes: a,
|
|
1765
|
-
demoted: r
|
|
1766
|
-
})
|
|
1926
|
+
n && (i.owners.delete(n), i.owners.size > 0) || (i.original ? e.style.setProperty(t, i.original) : e.style.removeProperty(t), r.delete(t));
|
|
1767
1927
|
};
|
|
1768
|
-
|
|
1769
|
-
|
|
1770
|
-
n || (n = /* @__PURE__ */ new Set(), kt.set(e, n)), n.add(t);
|
|
1771
|
-
}, J = (e, t) => {
|
|
1772
|
-
if (gt.cancel(e), e.style.transition = "", e.style.removeProperty("animation-delay"), t) {
|
|
1773
|
-
let n = kt.get(e);
|
|
1774
|
-
for (let r of t) e.style.removeProperty(r), n?.delete(r);
|
|
1928
|
+
if (t) {
|
|
1929
|
+
for (let e of t) i(e);
|
|
1775
1930
|
return;
|
|
1776
1931
|
}
|
|
1777
|
-
|
|
1778
|
-
|
|
1779
|
-
for (let t of n) e.style.removeProperty(t);
|
|
1780
|
-
n.clear();
|
|
1932
|
+
if (r && r.size > 0) {
|
|
1933
|
+
for (let e of [...r.keys()]) i(e);
|
|
1781
1934
|
return;
|
|
1782
1935
|
}
|
|
1783
|
-
e.style.removeProperty("transform"), e.style.removeProperty("opacity");
|
|
1784
|
-
},
|
|
1785
|
-
if (!
|
|
1786
|
-
let
|
|
1787
|
-
if (
|
|
1788
|
-
let
|
|
1789
|
-
if (
|
|
1790
|
-
|
|
1791
|
-
for (let e of i)
|
|
1936
|
+
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1937
|
+
}, Vn = (e, t, n = {}, r) => {
|
|
1938
|
+
if (!Ln(e)) return Promise.resolve();
|
|
1939
|
+
let i = e, a = dn(t);
|
|
1940
|
+
if (a.length === 0) return Promise.resolve();
|
|
1941
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = fn(n.ease);
|
|
1942
|
+
if (o <= 0 && s <= 0) {
|
|
1943
|
+
In.takeover(i, r), i.style.transition = "none", Bn.set(i, r);
|
|
1944
|
+
for (let e of a) W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1792
1945
|
return Promise.resolve();
|
|
1793
1946
|
}
|
|
1794
|
-
let
|
|
1795
|
-
durationMs:
|
|
1796
|
-
delayMs:
|
|
1797
|
-
easing:
|
|
1947
|
+
let l = ye.playerAllowed() ? In.settle(i, a, {
|
|
1948
|
+
durationMs: o * 1e3,
|
|
1949
|
+
delayMs: s * 1e3,
|
|
1950
|
+
easing: c
|
|
1798
1951
|
}, (e) => {
|
|
1799
|
-
r.style.setProperty(e.property, e.value)
|
|
1800
|
-
}) : null;
|
|
1801
|
-
if (
|
|
1802
|
-
let
|
|
1803
|
-
|
|
1804
|
-
for (let e of i)
|
|
1952
|
+
W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1953
|
+
}, r) : null;
|
|
1954
|
+
if (l) return l;
|
|
1955
|
+
let u = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1956
|
+
i.style.transition = u, Bn.set(i, r), i.offsetWidth;
|
|
1957
|
+
for (let e of a) W(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1805
1958
|
return new Promise((e) => {
|
|
1806
1959
|
let t = !1, n = () => {
|
|
1807
|
-
t || (t = !0,
|
|
1808
|
-
},
|
|
1809
|
-
e.target ===
|
|
1960
|
+
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
1961
|
+
}, r = (e) => {
|
|
1962
|
+
e.target === i && n();
|
|
1963
|
+
};
|
|
1964
|
+
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1965
|
+
});
|
|
1966
|
+
}, Hn = (e) => {
|
|
1967
|
+
if (typeof e.querySelectorAll == "function") {
|
|
1968
|
+
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1969
|
+
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1970
|
+
}
|
|
1971
|
+
}, Un = 0, Wn = [], Gn = [];
|
|
1972
|
+
function Kn() {
|
|
1973
|
+
let e = Un === 0;
|
|
1974
|
+
if (Un += 1, e) for (let e of Gn) e();
|
|
1975
|
+
let t = !1;
|
|
1976
|
+
return () => {
|
|
1977
|
+
if (t || (t = !0, --Un, Un > 0)) return;
|
|
1978
|
+
let e = Wn;
|
|
1979
|
+
Wn = [];
|
|
1980
|
+
for (let t of e) t();
|
|
1981
|
+
};
|
|
1982
|
+
}
|
|
1983
|
+
var qn = () => Un > 0;
|
|
1984
|
+
function Jn(e) {
|
|
1985
|
+
return Gn.push(e), () => {
|
|
1986
|
+
Gn = Gn.filter((t) => t !== e);
|
|
1987
|
+
};
|
|
1988
|
+
}
|
|
1989
|
+
function Yn(e) {
|
|
1990
|
+
Un === 0 ? e() : Wn.push(e);
|
|
1991
|
+
}
|
|
1992
|
+
//#endregion
|
|
1993
|
+
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1994
|
+
var Xn = 8, Zn = 2, K = 96, Qn = 15e3, $n = 3e3, er = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", q = "data-flemo-image-src", tr = "flemo-image-scale-v1", nr = /* @__PURE__ */ new Set([
|
|
1995
|
+
"PUSHING",
|
|
1996
|
+
"POPPING",
|
|
1997
|
+
"REPLACING"
|
|
1998
|
+
]), rr = (e) => {
|
|
1999
|
+
let t = e.closest("[data-flemo-screen]");
|
|
2000
|
+
return !!t && nr.has(t.getAttribute("data-flemo-status") ?? "");
|
|
2001
|
+
}, ir = (e) => {
|
|
2002
|
+
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
2003
|
+
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
2004
|
+
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
2005
|
+
}, ar = "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};", or = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", sr = async (e, t) => {
|
|
2006
|
+
try {
|
|
2007
|
+
if (typeof caches > "u") return;
|
|
2008
|
+
await (await caches.open(tr)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
2009
|
+
} catch {}
|
|
2010
|
+
}, cr = async (e) => {
|
|
2011
|
+
try {
|
|
2012
|
+
if (typeof caches > "u") return null;
|
|
2013
|
+
let t = await (await caches.open(tr)).match(e);
|
|
2014
|
+
return t ? await t.blob() : null;
|
|
2015
|
+
} catch {
|
|
2016
|
+
return null;
|
|
2017
|
+
}
|
|
2018
|
+
};
|
|
2019
|
+
function lr(e) {
|
|
2020
|
+
if (!or()) return () => {};
|
|
2021
|
+
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 = () => {
|
|
2022
|
+
if (t) return t;
|
|
2023
|
+
try {
|
|
2024
|
+
t = new Worker(URL.createObjectURL(new Blob([ar])));
|
|
2025
|
+
} catch {
|
|
2026
|
+
return null;
|
|
2027
|
+
}
|
|
2028
|
+
return t.onmessage = (e) => {
|
|
2029
|
+
let { url: t, blob: n, error: r, skip: i } = e.data;
|
|
2030
|
+
if (o.delete(t), r) {
|
|
2031
|
+
f(t, "opaque");
|
|
2032
|
+
return;
|
|
2033
|
+
}
|
|
2034
|
+
if (i || !n) {
|
|
2035
|
+
f(t, "skip");
|
|
2036
|
+
return;
|
|
2037
|
+
}
|
|
2038
|
+
let a = URL.createObjectURL(n);
|
|
2039
|
+
l.add(a), sr(t, n), f(t, a);
|
|
2040
|
+
}, t;
|
|
2041
|
+
}, f = (e, t) => {
|
|
2042
|
+
r.has(e) || r.set(e, t);
|
|
2043
|
+
for (let [t, n] of [...s]) n.url === e && v(t, r.get(e));
|
|
2044
|
+
}, p = (e, t) => {
|
|
2045
|
+
let n = () => {
|
|
2046
|
+
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
2047
|
+
};
|
|
2048
|
+
if (!qn()) {
|
|
2049
|
+
n();
|
|
2050
|
+
return;
|
|
2051
|
+
}
|
|
2052
|
+
let r = !1, i = () => {
|
|
2053
|
+
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
2054
|
+
}, o = setTimeout(i, $n);
|
|
2055
|
+
a.add(i), Yn(i);
|
|
2056
|
+
}, m = (e, t) => {
|
|
2057
|
+
let n = () => {
|
|
2058
|
+
if (qn()) {
|
|
2059
|
+
Yn(t);
|
|
2060
|
+
return;
|
|
2061
|
+
}
|
|
2062
|
+
if (!rr(e) || typeof requestAnimationFrame != "function") {
|
|
2063
|
+
t();
|
|
2064
|
+
return;
|
|
2065
|
+
}
|
|
2066
|
+
requestAnimationFrame(n);
|
|
2067
|
+
};
|
|
2068
|
+
n();
|
|
2069
|
+
}, h = (e, t) => {
|
|
2070
|
+
let n = e.style.visibility;
|
|
2071
|
+
e.style.visibility = "hidden";
|
|
2072
|
+
let r = !1, i = () => {
|
|
2073
|
+
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
2074
|
+
}, o = setTimeout(i, $n);
|
|
2075
|
+
a.add(i), m(e, i);
|
|
2076
|
+
}, g = (e, t) => !qn() && !rr(e) ? !1 : (e.setAttribute(q, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2077
|
+
e.setAttribute(q, t), e.src = a, h(e, () => {
|
|
2078
|
+
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
2079
|
+
if (n) return;
|
|
2080
|
+
let a = r.get(t);
|
|
2081
|
+
i(a) && e.getAttribute("data-flemo-image-src") === t && e.getAttribute("src") !== a && (e.src = a);
|
|
2082
|
+
});
|
|
2083
|
+
}, v = (e, t) => {
|
|
2084
|
+
let n = s.get(e);
|
|
2085
|
+
if (n) {
|
|
2086
|
+
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
2087
|
+
if (i(t)) {
|
|
2088
|
+
e.setAttribute(q, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
2089
|
+
let r = e.closest("picture");
|
|
2090
|
+
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
2091
|
+
e.src = t;
|
|
2092
|
+
}
|
|
2093
|
+
} else e.getAttribute("src") === er && (i(t) ? e.src = t : (e.removeAttribute(q), e.src = n.url));
|
|
2094
|
+
p(e, n.previousVisibility);
|
|
2095
|
+
}
|
|
2096
|
+
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
2097
|
+
if (b = !1, n) return;
|
|
2098
|
+
let e = [...y];
|
|
2099
|
+
y.clear();
|
|
2100
|
+
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2101
|
+
}, S = () => {
|
|
2102
|
+
b || (b = !0, Yn(() => {
|
|
2103
|
+
if (n) return;
|
|
2104
|
+
let e = globalThis.requestIdleCallback;
|
|
2105
|
+
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2106
|
+
}));
|
|
2107
|
+
}, C = (e, t, n) => {
|
|
2108
|
+
if (r.has(e) || o.has(e)) return;
|
|
2109
|
+
if (qn() && P()) {
|
|
2110
|
+
y.has(e) || y.set(e, {
|
|
2111
|
+
boxWidth: t,
|
|
2112
|
+
boxHeight: n
|
|
2113
|
+
}), S();
|
|
2114
|
+
return;
|
|
2115
|
+
}
|
|
2116
|
+
let i = d();
|
|
2117
|
+
if (!i) return;
|
|
2118
|
+
o.add(e);
|
|
2119
|
+
let a = Math.round(Math.max(K, t * u()) * Zn), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2120
|
+
i.postMessage({
|
|
2121
|
+
url: e,
|
|
2122
|
+
targetWidth: a,
|
|
2123
|
+
neededArea: s,
|
|
2124
|
+
ratio: 8
|
|
2125
|
+
});
|
|
2126
|
+
}, w = Jn(() => {
|
|
2127
|
+
if (P() && !(!t || o.size === 0)) {
|
|
2128
|
+
t.terminate(), t = null;
|
|
2129
|
+
for (let e of o) {
|
|
2130
|
+
if (y.has(e)) continue;
|
|
2131
|
+
let t = {
|
|
2132
|
+
boxWidth: K,
|
|
2133
|
+
boxHeight: K
|
|
2134
|
+
};
|
|
2135
|
+
for (let [n, r] of s) {
|
|
2136
|
+
if (r.url !== e) continue;
|
|
2137
|
+
let i = n.getBoundingClientRect();
|
|
2138
|
+
t = {
|
|
2139
|
+
boxWidth: i.width || K,
|
|
2140
|
+
boxHeight: i.height || K
|
|
2141
|
+
};
|
|
2142
|
+
break;
|
|
2143
|
+
}
|
|
2144
|
+
y.set(e, t);
|
|
2145
|
+
}
|
|
2146
|
+
o.clear(), y.size > 0 && S();
|
|
2147
|
+
}
|
|
2148
|
+
}), T = (e, t) => {
|
|
2149
|
+
let i = e.complete && e.naturalWidth > 0;
|
|
2150
|
+
if (i && !t) return;
|
|
2151
|
+
let a = {
|
|
2152
|
+
url: "",
|
|
2153
|
+
previousVisibility: e.style.visibility,
|
|
2154
|
+
timeout: setTimeout(() => v(e, null), Qn),
|
|
2155
|
+
responsive: !0
|
|
2156
|
+
}, o = () => {
|
|
2157
|
+
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2158
|
+
here, so the final fallback arm is unreachable. */
|
|
2159
|
+
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2160
|
+
if (!(/^https?:/.test(t) && ir({
|
|
2161
|
+
naturalWidth: e.naturalWidth,
|
|
2162
|
+
naturalHeight: e.naturalHeight,
|
|
2163
|
+
boxWidth: i.width || K,
|
|
2164
|
+
boxHeight: i.height || K,
|
|
2165
|
+
devicePixelRatio: u()
|
|
2166
|
+
}))) {
|
|
2167
|
+
v(e, null);
|
|
2168
|
+
return;
|
|
2169
|
+
}
|
|
2170
|
+
a.url = t;
|
|
2171
|
+
let o = r.get(t);
|
|
2172
|
+
if (o) {
|
|
2173
|
+
v(e, o);
|
|
2174
|
+
return;
|
|
2175
|
+
}
|
|
2176
|
+
cr(t).then((a) => {
|
|
2177
|
+
if (!(n || !s.has(e))) {
|
|
2178
|
+
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2179
|
+
releases every held element of the url first, so a still-held
|
|
2180
|
+
element cannot observe an existing verdict here; kept as a guard
|
|
2181
|
+
against future settle() reorderings. */
|
|
2182
|
+
if (r.has(t)) {
|
|
2183
|
+
v(e, r.get(t));
|
|
2184
|
+
return;
|
|
2185
|
+
}
|
|
2186
|
+
/* v8 ignore stop */
|
|
2187
|
+
if (a) {
|
|
2188
|
+
let e = URL.createObjectURL(a);
|
|
2189
|
+
l.add(e), f(t, e);
|
|
2190
|
+
return;
|
|
2191
|
+
}
|
|
2192
|
+
C(t, i.width || K, i.height || K);
|
|
2193
|
+
}
|
|
2194
|
+
});
|
|
1810
2195
|
};
|
|
1811
|
-
|
|
2196
|
+
if (i) {
|
|
2197
|
+
s.set(e, a), e.style.visibility = "hidden", o();
|
|
2198
|
+
return;
|
|
2199
|
+
}
|
|
2200
|
+
let c = () => v(e, null);
|
|
2201
|
+
a.detachListeners = () => {
|
|
2202
|
+
e.removeEventListener("load", o), e.removeEventListener("error", c);
|
|
2203
|
+
}, e.addEventListener("load", o), e.addEventListener("error", c), s.set(e, a), e.style.visibility = "hidden";
|
|
2204
|
+
}, E = (e, t) => {
|
|
2205
|
+
if (n || c.has(e) || e.getAttribute("data-flemo-image-src") !== null) return;
|
|
2206
|
+
let a = e.getAttribute("src") ?? "";
|
|
2207
|
+
if (!/^https?:/.test(a)) return;
|
|
2208
|
+
if (e.getAttribute("srcset") !== null || e.closest("picture") !== null) {
|
|
2209
|
+
c.add(e), T(e, t);
|
|
2210
|
+
return;
|
|
2211
|
+
}
|
|
2212
|
+
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2213
|
+
if (!t) {
|
|
2214
|
+
let t = e.getBoundingClientRect();
|
|
2215
|
+
C(a, t.width || K, t.height || K);
|
|
2216
|
+
return;
|
|
2217
|
+
}
|
|
2218
|
+
let n = e.getBoundingClientRect();
|
|
2219
|
+
if (!ir({
|
|
2220
|
+
naturalWidth: e.naturalWidth,
|
|
2221
|
+
naturalHeight: e.naturalHeight,
|
|
2222
|
+
boxWidth: n.width || K,
|
|
2223
|
+
boxHeight: n.height || K,
|
|
2224
|
+
devicePixelRatio: u()
|
|
2225
|
+
})) return;
|
|
2226
|
+
let o = r.get(a);
|
|
2227
|
+
if (i(o)) {
|
|
2228
|
+
qn() || rr(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2229
|
+
return;
|
|
2230
|
+
}
|
|
2231
|
+
if (o === "opaque") {
|
|
2232
|
+
g(e, a);
|
|
2233
|
+
return;
|
|
2234
|
+
}
|
|
2235
|
+
if (o === "skip") return;
|
|
2236
|
+
}
|
|
2237
|
+
let o = r.get(a);
|
|
2238
|
+
if (o !== "skip") {
|
|
2239
|
+
if (o === "opaque") {
|
|
2240
|
+
g(e, a);
|
|
2241
|
+
return;
|
|
2242
|
+
}
|
|
2243
|
+
if (o) {
|
|
2244
|
+
qn() || rr(e) ? _(e, a, o) : (e.setAttribute(q, a), e.src = o);
|
|
2245
|
+
return;
|
|
2246
|
+
}
|
|
2247
|
+
s.set(e, {
|
|
2248
|
+
url: a,
|
|
2249
|
+
previousVisibility: e.style.visibility,
|
|
2250
|
+
timeout: setTimeout(() => v(e, null), Qn)
|
|
2251
|
+
}), e.style.visibility = "hidden", e.setAttribute(q, a), e.src = er, cr(a).then((t) => {
|
|
2252
|
+
if (n || r.has(a)) return;
|
|
2253
|
+
if (t) {
|
|
2254
|
+
let e = URL.createObjectURL(t);
|
|
2255
|
+
l.add(e), f(a, e);
|
|
2256
|
+
return;
|
|
2257
|
+
}
|
|
2258
|
+
let i = () => {
|
|
2259
|
+
if (n) return;
|
|
2260
|
+
let t = e.getBoundingClientRect();
|
|
2261
|
+
C(a, t.width || K, t.height || K);
|
|
2262
|
+
};
|
|
2263
|
+
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2264
|
+
});
|
|
2265
|
+
}
|
|
2266
|
+
}, D = (e, t) => {
|
|
2267
|
+
if (e instanceof HTMLImageElement && E(e, t), typeof e.querySelectorAll == "function") for (let n of Array.from(e.querySelectorAll("img"))) E(n, t);
|
|
2268
|
+
}, O = new MutationObserver((e) => {
|
|
2269
|
+
for (let t of e) for (let e of Array.from(t.addedNodes)) e instanceof Element && D(e, !0);
|
|
2270
|
+
});
|
|
2271
|
+
O.observe(e, {
|
|
2272
|
+
childList: !0,
|
|
2273
|
+
subtree: !0
|
|
2274
|
+
}), D(e, !1);
|
|
2275
|
+
let k = (e) => {
|
|
2276
|
+
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2277
|
+
if (n && !n.responsive) {
|
|
2278
|
+
t === n.url && (e.src = er);
|
|
2279
|
+
return;
|
|
2280
|
+
}
|
|
2281
|
+
let a = e.getAttribute(q);
|
|
2282
|
+
if (a) if (t === a) {
|
|
2283
|
+
let t = r.get(a);
|
|
2284
|
+
i(t) && (e.src = t);
|
|
2285
|
+
} else t !== er && !t.startsWith("blob:") && e.removeAttribute(q);
|
|
2286
|
+
}, ee = !1, A = new MutationObserver((t) => {
|
|
2287
|
+
if (!n) {
|
|
2288
|
+
if (qn()) {
|
|
2289
|
+
if (ee) return;
|
|
2290
|
+
ee = !0, Yn(() => {
|
|
2291
|
+
if (ee = !1, !n) {
|
|
2292
|
+
for (let t of Array.from(e.querySelectorAll(`img[${q}]`))) k(t);
|
|
2293
|
+
for (let e of [...s.keys()]) k(e);
|
|
2294
|
+
}
|
|
2295
|
+
});
|
|
2296
|
+
return;
|
|
2297
|
+
}
|
|
2298
|
+
for (let e of t) e.attributeName === "src" && k(e.target);
|
|
2299
|
+
}
|
|
2300
|
+
});
|
|
2301
|
+
return A.observe(e, {
|
|
2302
|
+
subtree: !0,
|
|
2303
|
+
attributes: !0,
|
|
2304
|
+
attributeFilter: ["src"]
|
|
2305
|
+
}), () => {
|
|
2306
|
+
n = !0, w(), O.disconnect(), A.disconnect(), t?.terminate(), t = null;
|
|
2307
|
+
for (let e of [...s.keys()]) v(e, null);
|
|
2308
|
+
for (let e of [...a]) e();
|
|
2309
|
+
o.clear(), r.clear();
|
|
2310
|
+
for (let e of l) URL.revokeObjectURL(e);
|
|
2311
|
+
l.clear();
|
|
2312
|
+
};
|
|
2313
|
+
}
|
|
2314
|
+
var ur = null;
|
|
2315
|
+
function dr() {
|
|
2316
|
+
return typeof document > "u" || !document.body ? () => {} : (ur ? ur.count += 1 : ur = {
|
|
2317
|
+
dispose: lr(document.body),
|
|
2318
|
+
count: 1
|
|
2319
|
+
}, () => {
|
|
2320
|
+
ur && (--ur.count, ur.count <= 0 && (ur.dispose(), ur = null));
|
|
1812
2321
|
});
|
|
1813
|
-
}
|
|
1814
|
-
|
|
2322
|
+
}
|
|
2323
|
+
//#endregion
|
|
2324
|
+
//#region src/core/engine/arrivalHold.ts
|
|
2325
|
+
var fr = "data-flemo-held-arrival";
|
|
2326
|
+
function pr(e) {
|
|
1815
2327
|
if (typeof MutationObserver > "u") return () => {};
|
|
1816
2328
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
1817
2329
|
let n = t instanceof Element ? t : t.parentElement;
|
|
1818
|
-
return !n || n === e || n.closest(`[data-flemo-part-name], [${
|
|
2330
|
+
return !n || n === e || n.closest(`[data-flemo-part-name], [${fr}], [${q}]`) !== null;
|
|
1819
2331
|
}, 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), {
|
|
1820
2332
|
glass: t,
|
|
1821
2333
|
latest: n,
|
|
@@ -1837,7 +2349,7 @@ function jt(e) {
|
|
|
1837
2349
|
}
|
|
1838
2350
|
if (i.type === "attributes") {
|
|
1839
2351
|
let e = i.target, t = i.attributeName;
|
|
1840
|
-
if (t.startsWith("data-flemo") || !e.isConnected || o(e)) continue;
|
|
2352
|
+
if (t.startsWith("data-flemo") || t === "style" && e.hasAttribute("data-flemo-img-hold") || !e.isConnected || o(e)) continue;
|
|
1841
2353
|
let n = d.get(e);
|
|
1842
2354
|
n || d.set(e, n = /* @__PURE__ */ new Map()), n.has(t) || n.set(t, i.oldValue);
|
|
1843
2355
|
continue;
|
|
@@ -1845,12 +2357,12 @@ function jt(e) {
|
|
|
1845
2357
|
if (i.type === "childList") {
|
|
1846
2358
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
1847
2359
|
if (e instanceof Element && t.delete(e)) {
|
|
1848
|
-
e.removeAttribute(
|
|
2360
|
+
e.removeAttribute(fr);
|
|
1849
2361
|
continue;
|
|
1850
2362
|
}
|
|
1851
2363
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
1852
2364
|
}
|
|
1853
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2365
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(fr, ""), t.add(e), l(i.target).added.push(e));
|
|
1854
2366
|
}
|
|
1855
2367
|
}
|
|
1856
2368
|
for (let [e, t] of u) {
|
|
@@ -1885,7 +2397,7 @@ function jt(e) {
|
|
|
1885
2397
|
c.disconnect();
|
|
1886
2398
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
1887
2399
|
n.clear();
|
|
1888
|
-
for (let e of t) e.removeAttribute(
|
|
2400
|
+
for (let e of t) e instanceof HTMLElement && Hn(e), e.removeAttribute(fr);
|
|
1889
2401
|
t.clear();
|
|
1890
2402
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
1891
2403
|
i.clear();
|
|
@@ -1895,52 +2407,99 @@ function jt(e) {
|
|
|
1895
2407
|
}
|
|
1896
2408
|
//#endregion
|
|
1897
2409
|
//#region src/core/engine/compositorWarmUp.ts
|
|
1898
|
-
var
|
|
2410
|
+
var mr = "data-flemo-warm", hr = 3e3, gr = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], _r = {
|
|
1899
2411
|
duration: 500,
|
|
1900
2412
|
iterations: Infinity,
|
|
1901
2413
|
direction: "alternate",
|
|
1902
2414
|
easing: "linear"
|
|
1903
|
-
},
|
|
1904
|
-
|
|
2415
|
+
}, vr = "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;", yr = "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, br = null, Y = null, xr = null, Sr = 0, Cr = () => {
|
|
2416
|
+
Sr = 0, xr?.cancel(), xr = null, Y?.remove(), Y = null;
|
|
1905
2417
|
};
|
|
1906
|
-
function
|
|
2418
|
+
function wr() {
|
|
1907
2419
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
1908
|
-
if (
|
|
1909
|
-
|
|
2420
|
+
if (Sr += 1, !Y) {
|
|
2421
|
+
Y = document.createElement("div"), Y.setAttribute(mr, ""), Y.setAttribute("aria-hidden", "true"), Y.setAttribute("style", vr), document.body.appendChild(Y);
|
|
1910
2422
|
try {
|
|
1911
|
-
|
|
2423
|
+
xr = Y.animate(gr, _r);
|
|
2424
|
+
} catch {
|
|
2425
|
+
xr = null;
|
|
2426
|
+
}
|
|
2427
|
+
if (!J && nt()) try {
|
|
2428
|
+
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 = yr, document.body.appendChild(J), J.play()?.catch?.(() => {});
|
|
2429
|
+
let e = J;
|
|
2430
|
+
br = () => {
|
|
2431
|
+
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2432
|
+
}, document.addEventListener("visibilitychange", br);
|
|
1912
2433
|
} catch {
|
|
1913
|
-
|
|
2434
|
+
J = null;
|
|
1914
2435
|
}
|
|
1915
2436
|
}
|
|
1916
2437
|
let e = !1, t = setTimeout(() => {
|
|
1917
|
-
e || (e = !0, --
|
|
1918
|
-
},
|
|
2438
|
+
e || (e = !0, --Sr, Sr <= 0 && Cr());
|
|
2439
|
+
}, hr);
|
|
2440
|
+
return () => {
|
|
2441
|
+
e || (e = !0, clearTimeout(t), --Sr, Sr <= 0 && Cr());
|
|
2442
|
+
};
|
|
2443
|
+
}
|
|
2444
|
+
//#endregion
|
|
2445
|
+
//#region src/core/engine/emulationNotice.ts
|
|
2446
|
+
var Tr = () => {
|
|
2447
|
+
if (typeof navigator > "u") return !1;
|
|
2448
|
+
let e = navigator.platform ?? "";
|
|
2449
|
+
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2450
|
+
}, Er = !1, Dr = () => {
|
|
2451
|
+
Er || !P() || !Tr() || (Er = !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."));
|
|
2452
|
+
}, Or = "data-flemo-img-hold", kr = (e) => !(e.complete && e.naturalWidth > 0), Ar = 4, jr = (e) => {
|
|
2453
|
+
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2454
|
+
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);
|
|
2455
|
+
return e.naturalWidth * e.naturalHeight > r * Ar;
|
|
2456
|
+
}, Mr = (e, t) => kr(e) || !t && jr(e);
|
|
2457
|
+
function Nr(e, t, n = !1) {
|
|
2458
|
+
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2459
|
+
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2460
|
+
e.getAttribute(Or) === null && (r.has(e) || !Mr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(Or, "")));
|
|
2461
|
+
};
|
|
2462
|
+
for (let t of e.querySelectorAll("img")) i(t);
|
|
2463
|
+
let a = new MutationObserver((e) => {
|
|
2464
|
+
for (let t of e) for (let e of t.addedNodes) if (e instanceof HTMLImageElement) i(e);
|
|
2465
|
+
else if (e instanceof Element) for (let t of e.querySelectorAll("img")) i(t);
|
|
2466
|
+
});
|
|
2467
|
+
a.observe(e, {
|
|
2468
|
+
childList: !0,
|
|
2469
|
+
subtree: !0
|
|
2470
|
+
});
|
|
2471
|
+
let o = !1, s = () => {
|
|
2472
|
+
if (!o) {
|
|
2473
|
+
o = !0, a.disconnect();
|
|
2474
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(Or);
|
|
2475
|
+
r.clear();
|
|
2476
|
+
}
|
|
2477
|
+
}, c = setTimeout(s, Math.max(0, t));
|
|
1919
2478
|
return () => {
|
|
1920
|
-
|
|
2479
|
+
clearTimeout(c), s();
|
|
1921
2480
|
};
|
|
1922
2481
|
}
|
|
1923
2482
|
//#endregion
|
|
1924
2483
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
1925
|
-
var
|
|
2484
|
+
var Pr = () => {}, Fr = .004, Ir = (e, t) => {
|
|
1926
2485
|
let n = e.ownerDocument?.defaultView;
|
|
1927
2486
|
if (!n) return !1;
|
|
1928
2487
|
let r = e;
|
|
1929
2488
|
for (; r;) {
|
|
1930
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2489
|
+
if (Number(n.getComputedStyle(r).opacity) <= Fr) return !0;
|
|
1931
2490
|
if (r === t) break;
|
|
1932
2491
|
r = r.parentElement;
|
|
1933
2492
|
}
|
|
1934
2493
|
return !1;
|
|
1935
2494
|
};
|
|
1936
|
-
function
|
|
1937
|
-
if (typeof e.getAnimations != "function") return
|
|
2495
|
+
function Lr(e) {
|
|
2496
|
+
if (typeof e.getAnimations != "function") return Pr;
|
|
1938
2497
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
1939
2498
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
1940
2499
|
if (t.size >= 128) return;
|
|
1941
2500
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
1942
2501
|
let r = n.effect?.target;
|
|
1943
|
-
if (r instanceof Element &&
|
|
2502
|
+
if (r instanceof Element && Ir(r, e)) try {
|
|
1944
2503
|
n.pause(), t.add(n);
|
|
1945
2504
|
} catch {}
|
|
1946
2505
|
}
|
|
@@ -1969,7 +2528,7 @@ function Wt(e) {
|
|
|
1969
2528
|
}
|
|
1970
2529
|
//#endregion
|
|
1971
2530
|
//#region src/transition/cubicBezier.ts
|
|
1972
|
-
var
|
|
2531
|
+
var Rr = (e, t, n, r) => {
|
|
1973
2532
|
let i = (t) => 3 * (1 - t) * (1 - t) * t * e + 3 * (1 - t) * t * t * n + t ** 3, a = (e) => 3 * (1 - e) * (1 - e) * e * t + 3 * (1 - e) * e * e * r + e ** 3;
|
|
1974
2533
|
return (e) => {
|
|
1975
2534
|
if (e <= 0) return 0;
|
|
@@ -1981,7 +2540,7 @@ var Gt = (e, t, n, r) => {
|
|
|
1981
2540
|
}
|
|
1982
2541
|
return a((t + n) / 2);
|
|
1983
2542
|
};
|
|
1984
|
-
},
|
|
2543
|
+
}, zr = (e) => e, Br = {
|
|
1985
2544
|
ease: [
|
|
1986
2545
|
.25,
|
|
1987
2546
|
.1,
|
|
@@ -2036,20 +2595,20 @@ var Gt = (e, t, n, r) => {
|
|
|
2036
2595
|
.66,
|
|
2037
2596
|
-.56
|
|
2038
2597
|
]
|
|
2039
|
-
},
|
|
2598
|
+
}, Vr = (e) => {
|
|
2040
2599
|
if (Array.isArray(e)) {
|
|
2041
2600
|
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2042
2601
|
let [t, n, r, i] = e;
|
|
2043
|
-
return
|
|
2602
|
+
return Rr(t, n, r, i);
|
|
2044
2603
|
}
|
|
2045
|
-
return
|
|
2604
|
+
return zr;
|
|
2046
2605
|
}
|
|
2047
|
-
return typeof e == "string" ? e === "linear" ?
|
|
2048
|
-
},
|
|
2606
|
+
return typeof e == "string" ? e === "linear" ? zr : Rr(...Br[e] ?? Br.ease) : Rr(...Br.ease);
|
|
2607
|
+
}, Hr = 1 / 255, Ur = 400, Wr = 24, Gr = /* @__PURE__ */ new Set([
|
|
2049
2608
|
"x",
|
|
2050
2609
|
"y",
|
|
2051
2610
|
"opacity"
|
|
2052
|
-
]),
|
|
2611
|
+
]), Kr = (e, t, n) => {
|
|
2053
2612
|
if (!e || typeof e != "object") return;
|
|
2054
2613
|
let r = e[t];
|
|
2055
2614
|
if (r === void 0) return;
|
|
@@ -2067,7 +2626,7 @@ var Gt = (e, t, n, r) => {
|
|
|
2067
2626
|
return Number.isNaN(e) ? null : e;
|
|
2068
2627
|
}
|
|
2069
2628
|
return null;
|
|
2070
|
-
},
|
|
2629
|
+
}, qr = (e, t, n) => {
|
|
2071
2630
|
let r = /* @__PURE__ */ new Set();
|
|
2072
2631
|
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2073
2632
|
if (r.size === 0) return null;
|
|
@@ -2075,37 +2634,409 @@ var Gt = (e, t, n, r) => {
|
|
|
2075
2634
|
for (let a of r) {
|
|
2076
2635
|
let r = e.from && typeof e.from == "object" ? e.from[a] : void 0, o = e.to && typeof e.to == "object" ? e.to[a] : void 0;
|
|
2077
2636
|
if (r !== void 0 && r === o) continue;
|
|
2078
|
-
if (!
|
|
2079
|
-
let s =
|
|
2637
|
+
if (!Gr.has(a)) return null;
|
|
2638
|
+
let s = Kr(e.from, a, t), c = Kr(e.to, a, t);
|
|
2080
2639
|
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2081
2640
|
let l = Math.abs(c - s);
|
|
2082
2641
|
if (l === 0) continue;
|
|
2083
|
-
let u = a === "opacity" ?
|
|
2642
|
+
let u = a === "opacity" ? Hr : 1 / Math.max(1, n);
|
|
2084
2643
|
i = Math.min(i, u / l);
|
|
2085
2644
|
}
|
|
2086
2645
|
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2087
|
-
},
|
|
2646
|
+
}, X = (e, t, n) => {
|
|
2088
2647
|
if (e.duration <= 0) return null;
|
|
2089
|
-
let r =
|
|
2648
|
+
let r = qr(e, t, n);
|
|
2090
2649
|
if (r === null) return null;
|
|
2091
|
-
let i =
|
|
2092
|
-
for (let e =
|
|
2650
|
+
let i = Vr(e.ease), a = Ur;
|
|
2651
|
+
for (let e = Ur; e >= 0 && !(Math.abs(1 - i(e / Ur)) > r); --e) a = e;
|
|
2093
2652
|
if (a === 0) return null;
|
|
2094
|
-
let o = (e.delay + e.duration * (a /
|
|
2095
|
-
return (e.delay + e.duration) * 1e3 - o <
|
|
2096
|
-
},
|
|
2097
|
-
|
|
2098
|
-
|
|
2099
|
-
|
|
2100
|
-
|
|
2101
|
-
|
|
2102
|
-
"
|
|
2103
|
-
|
|
2104
|
-
|
|
2105
|
-
|
|
2106
|
-
|
|
2107
|
-
|
|
2108
|
-
|
|
2653
|
+
let o = (e.delay + e.duration * (a / Ur)) * 1e3;
|
|
2654
|
+
return (e.delay + e.duration) * 1e3 - o < Wr ? null : o;
|
|
2655
|
+
}, Jr = 1e3 / 120, Yr = 4, Z = 400, Xr = 4, Q = (e) => {
|
|
2656
|
+
let t = +e.toFixed(5);
|
|
2657
|
+
return Object.is(t, -0) ? 0 : t;
|
|
2658
|
+
}, Zr = (e, t, n) => {
|
|
2659
|
+
if (e.duration <= 0) return null;
|
|
2660
|
+
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2661
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
2662
|
+
let a = 0;
|
|
2663
|
+
for (let n of i) {
|
|
2664
|
+
let i = e.from && typeof e.from == "object" ? e.from[n] : void 0, o = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2665
|
+
if (i !== void 0 && i === o) continue;
|
|
2666
|
+
if (n !== "x" && n !== "y") return null;
|
|
2667
|
+
let s = Kr(e.from, n, t), c = Kr(e.to, n, t);
|
|
2668
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2669
|
+
a = Math.max(a, Math.abs(c - s) * r);
|
|
2670
|
+
}
|
|
2671
|
+
if (a < Yr) return null;
|
|
2672
|
+
let o = Vr(e.ease), s = Array(401);
|
|
2673
|
+
for (let e = 0; e <= Z; e += 1) s[e] = o(e / Z);
|
|
2674
|
+
let c = e.duration * 1e3 / Z, l = 40 / a * c / Jr, u = Z, d = 0;
|
|
2675
|
+
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2676
|
+
for (let e = u; e < Z; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2677
|
+
let f = (1 - s[u]) * a;
|
|
2678
|
+
if (f <= 1) return null;
|
|
2679
|
+
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2680
|
+
let t = 1 - e / a;
|
|
2681
|
+
for (; m < Z && s[m] < t;) m += 1;
|
|
2682
|
+
if (m === 0) return 0;
|
|
2683
|
+
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2684
|
+
return (m - 1 + i) / Z * 100;
|
|
2685
|
+
}, g = h(p), _ = [];
|
|
2686
|
+
for (let e = 0; 100 / Z * e < g; e += Xr) _.push(`${Q(s[e])} ${Q(e / Z * 100)}%`);
|
|
2687
|
+
let v = g;
|
|
2688
|
+
for (let e = p; e >= 2; --e) {
|
|
2689
|
+
let t = h(e - 1);
|
|
2690
|
+
if (t > v) {
|
|
2691
|
+
let n = Q(1 - e / a);
|
|
2692
|
+
_.push(`${n} ${Q(v)}%`, `${n} ${Q(t)}%`);
|
|
2693
|
+
}
|
|
2694
|
+
v = t;
|
|
2695
|
+
}
|
|
2696
|
+
return _.push(`1 ${Q(v)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2697
|
+
}, Qr = 12, $r = (e, t, n, r) => {
|
|
2698
|
+
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2699
|
+
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2700
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
2701
|
+
let o = 0;
|
|
2702
|
+
for (let n of a) {
|
|
2703
|
+
let r = e.from && typeof e.from == "object" ? e.from[n] : void 0, a = e.to && typeof e.to == "object" ? e.to[n] : void 0;
|
|
2704
|
+
if (r !== void 0 && r === a) continue;
|
|
2705
|
+
if (n !== "x" && n !== "y") return null;
|
|
2706
|
+
let s = Kr(e.from, n, t), c = Kr(e.to, n, t);
|
|
2707
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2708
|
+
o = Math.max(o, Math.abs(c - s) * i);
|
|
2709
|
+
}
|
|
2710
|
+
if (o < Qr) return null;
|
|
2711
|
+
let s = Vr(e.ease), c = Array(401);
|
|
2712
|
+
for (let e = 0; e <= Z; e += 1) c[e] = s(e / Z);
|
|
2713
|
+
let l = e.duration * 1e3, u = l / Z, d = 1 / o * (u / r), f = Z, p = 0;
|
|
2714
|
+
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2715
|
+
if (f === 0 || f >= Z) return null;
|
|
2716
|
+
for (let e = f; e < Z; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2717
|
+
let m = (1 - c[f]) * o;
|
|
2718
|
+
if (m <= 1 || m > Qr) return null;
|
|
2719
|
+
let h = f / Z * 100, g = m * r / l * 100;
|
|
2720
|
+
if (h + g >= 100) return null;
|
|
2721
|
+
let _ = [];
|
|
2722
|
+
for (let e = 0; e <= f; e += Xr) _.push(`${Q(c[e])} ${Q(e / Z * 100)}%`);
|
|
2723
|
+
return _.push(`${Q(c[f])} ${Q(h)}%`), _.push(`1 ${Q(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2724
|
+
};
|
|
2725
|
+
(() => {
|
|
2726
|
+
try {
|
|
2727
|
+
if (typeof location > "u" || typeof sessionStorage > "u") return;
|
|
2728
|
+
/[?&]flemo-layers=resident\b/.test(location.search) ? sessionStorage.setItem("flemo:layers", "resident") : /[?&]flemo-layers=off\b/.test(location.search) && sessionStorage.removeItem("flemo:layers");
|
|
2729
|
+
} catch {}
|
|
2730
|
+
})();
|
|
2731
|
+
var ei = /* @__PURE__ */ new WeakMap(), ti = Symbol("flemo-layer-owner"), ni = (e, t) => {
|
|
2732
|
+
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2733
|
+
}, ri = (e, t) => {
|
|
2734
|
+
let n = e.trim() === "none" ? "" : e.trim();
|
|
2735
|
+
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2736
|
+
}, ii = (e, t) => {
|
|
2737
|
+
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2738
|
+
for (let e of t.willChange.split(",")) {
|
|
2739
|
+
let t = e.trim();
|
|
2740
|
+
t && t !== "auto" && n.add(t);
|
|
2741
|
+
}
|
|
2742
|
+
for (let e of t.owners.values()) {
|
|
2743
|
+
for (let t of e.properties) n.add(t);
|
|
2744
|
+
e.containment && (r = !0);
|
|
2745
|
+
}
|
|
2746
|
+
e.style.willChange = [...n].join(", ");
|
|
2747
|
+
let i = ri(t.contain, r);
|
|
2748
|
+
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2749
|
+
}, ai = (e, t, n = !1, r = ti) => {
|
|
2750
|
+
let i = un(t), a = ei.get(e);
|
|
2751
|
+
if (i.length === 0) {
|
|
2752
|
+
if (!a) return;
|
|
2753
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), ni(e, a), ei.delete(e)) : ii(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), ni(e, a), ei.delete(e));
|
|
2754
|
+
return;
|
|
2755
|
+
}
|
|
2756
|
+
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
2757
|
+
owners: /* @__PURE__ */ new Map(),
|
|
2758
|
+
settleOwner: null,
|
|
2759
|
+
willChange: e.style.willChange,
|
|
2760
|
+
contain: e.style.contain,
|
|
2761
|
+
pending: null
|
|
2762
|
+
}, ei.set(e, a)), a.owners.set(r, {
|
|
2763
|
+
properties: i,
|
|
2764
|
+
containment: n
|
|
2765
|
+
}), a.settleOwner = null, ii(e, a);
|
|
2766
|
+
}, oi = (e, t = ti) => {
|
|
2767
|
+
let n = ei.get(e);
|
|
2768
|
+
if (!(!n || !n.owners.has(t))) {
|
|
2769
|
+
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2770
|
+
ii(e, n);
|
|
2771
|
+
return;
|
|
2772
|
+
}
|
|
2773
|
+
if (St() && typeof e.closest == "function" && e.closest("[data-flemo-screen]")) {
|
|
2774
|
+
n.pending != null && clearTimeout(n.pending), n.pending = null, n.settleOwner = null, e.style.willChange = "transform", n.contain ? e.style.contain = n.contain : e.style.removeProperty("contain");
|
|
2775
|
+
return;
|
|
2776
|
+
}
|
|
2777
|
+
/* v8 ignore next 5 -- setTimeout exists in every runtime under test; the
|
|
2778
|
+
guard shields exotic embedders, where an immediate demotion is simply
|
|
2779
|
+
the pre-hold behavior. */
|
|
2780
|
+
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
2781
|
+
ni(e, n), ei.delete(e);
|
|
2782
|
+
return;
|
|
2783
|
+
}
|
|
2784
|
+
si(e, n);
|
|
2785
|
+
}
|
|
2786
|
+
}, si = (e, t) => {
|
|
2787
|
+
t.pending = setTimeout(() => {
|
|
2788
|
+
if (t.pending = null, qn()) {
|
|
2789
|
+
Yn(() => {
|
|
2790
|
+
ei.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && si(e, t);
|
|
2791
|
+
});
|
|
2792
|
+
return;
|
|
2793
|
+
}
|
|
2794
|
+
ni(e, t), ei.delete(e);
|
|
2795
|
+
}, 300);
|
|
2796
|
+
}, ci = (e, t, n) => {
|
|
2797
|
+
let r = e.driver;
|
|
2798
|
+
return r === "native" || r === "player" ? r : "player";
|
|
2799
|
+
}, li = 1e3 / 60 * 2, ui = "flemo-", di = /* @__PURE__ */ new WeakMap(), fi = (e, t, n) => {
|
|
2800
|
+
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2801
|
+
let e = r.animationName;
|
|
2802
|
+
if (typeof e != "string" || !e.startsWith(ui) || r.playState !== "running" || di.get(r) === n) continue;
|
|
2803
|
+
let i = r.startTime;
|
|
2804
|
+
typeof i == "number" && (r.startTime = i + t, di.set(r, n));
|
|
2805
|
+
}
|
|
2806
|
+
}, pi = /* @__PURE__ */ new WeakSet(), mi = 1e3, hi = 3e3;
|
|
2807
|
+
function gi(e, t, n) {
|
|
2808
|
+
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2809
|
+
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2810
|
+
s !== null && (clearTimeout(s), s = null);
|
|
2811
|
+
}, d = () => {
|
|
2812
|
+
for (let e of c) try {
|
|
2813
|
+
e.playState === "paused" && e.play();
|
|
2814
|
+
} catch {}
|
|
2815
|
+
}, f = () => {
|
|
2816
|
+
a || o || (o = !0, u(), r &&= (cancelAnimationFrame(r), 0), d(), n?.());
|
|
2817
|
+
}, p = () => {
|
|
2818
|
+
i = !0, m.disconnect();
|
|
2819
|
+
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2820
|
+
let e = t.animationName;
|
|
2821
|
+
if (typeof e != "string" || !e.startsWith(ui) || t.playState !== "running" || pi.has(t)) continue;
|
|
2822
|
+
let n = t.currentTime;
|
|
2823
|
+
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2824
|
+
try {
|
|
2825
|
+
t.pause();
|
|
2826
|
+
} catch {
|
|
2827
|
+
continue;
|
|
2828
|
+
}
|
|
2829
|
+
pi.add(t), c.push(t);
|
|
2830
|
+
}
|
|
2831
|
+
}
|
|
2832
|
+
if (c.length === 0) return;
|
|
2833
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, mi));
|
|
2834
|
+
let e = xi(t, () => {
|
|
2835
|
+
a || n?.();
|
|
2836
|
+
});
|
|
2837
|
+
if (l = e, typeof setTimeout == "function") {
|
|
2838
|
+
let t = setTimeout(() => {
|
|
2839
|
+
l === e && (l = null), e();
|
|
2840
|
+
}, hi), n = e;
|
|
2841
|
+
l = () => {
|
|
2842
|
+
clearTimeout(t), n();
|
|
2843
|
+
};
|
|
2844
|
+
}
|
|
2845
|
+
}, m = new MutationObserver(() => {
|
|
2846
|
+
i || e.getAttribute("data-flemo-anim-hold") === "false" && p();
|
|
2847
|
+
});
|
|
2848
|
+
return e.getAttribute("data-flemo-anim-hold") === "false" ? p() : m.observe(e, {
|
|
2849
|
+
attributes: !0,
|
|
2850
|
+
attributeFilter: ["data-flemo-anim-hold"]
|
|
2851
|
+
}), () => {
|
|
2852
|
+
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2853
|
+
};
|
|
2854
|
+
}
|
|
2855
|
+
var _i = 150, vi = 4e3, yi = 400;
|
|
2856
|
+
function bi(e, t, n = !0, r = !1) {
|
|
2857
|
+
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2858
|
+
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2859
|
+
let i = [], a = /* @__PURE__ */ new Map();
|
|
2860
|
+
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2861
|
+
let t = e.animationName;
|
|
2862
|
+
if (typeof t != "string" || !t.startsWith(ui) || e.playState !== "running" || pi.has(e)) continue;
|
|
2863
|
+
let n = e.currentTime;
|
|
2864
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (pi.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2865
|
+
}
|
|
2866
|
+
if (i.length === 0) return () => {};
|
|
2867
|
+
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
2868
|
+
if (u) return 0;
|
|
2869
|
+
u = !0;
|
|
2870
|
+
let t = 0;
|
|
2871
|
+
for (let n of i) {
|
|
2872
|
+
if (n.playState !== "running") continue;
|
|
2873
|
+
let r = n.currentTime, i = n.startTime;
|
|
2874
|
+
if (typeof r != "number" || typeof i != "number") continue;
|
|
2875
|
+
let o = (a.get(n) ?? 0) + e;
|
|
2876
|
+
n.startTime = i + (r - o), a.set(n, o);
|
|
2877
|
+
let s = r + vi;
|
|
2878
|
+
t = Math.max(t, s - o);
|
|
2879
|
+
}
|
|
2880
|
+
return t;
|
|
2881
|
+
}, h = (e) => {
|
|
2882
|
+
if (c) return;
|
|
2883
|
+
if (d === null && (d = e), f !== null) {
|
|
2884
|
+
let t = e - f;
|
|
2885
|
+
p += Math.min(Math.max(0, t), li);
|
|
2886
|
+
}
|
|
2887
|
+
if (f = e, !l) {
|
|
2888
|
+
if (l = !0, r) {
|
|
2889
|
+
u = !0;
|
|
2890
|
+
let e = 0;
|
|
2891
|
+
for (let t of i) {
|
|
2892
|
+
if (t.playState !== "running") continue;
|
|
2893
|
+
let n = t.currentTime, r = t.startTime;
|
|
2894
|
+
if (typeof n != "number" || typeof r != "number") continue;
|
|
2895
|
+
let i = a.get(t) ?? 0;
|
|
2896
|
+
if (n <= i + 33.333333333333336) continue;
|
|
2897
|
+
let o = n - (i + li);
|
|
2898
|
+
t.startTime = r + o, e = Math.max(e, o);
|
|
2899
|
+
}
|
|
2900
|
+
e > 0 && t?.(e);
|
|
2901
|
+
return;
|
|
2902
|
+
}
|
|
2903
|
+
if (!n) {
|
|
2904
|
+
u = !0, o = requestAnimationFrame(h);
|
|
2905
|
+
return;
|
|
2906
|
+
}
|
|
2907
|
+
for (let e of i) {
|
|
2908
|
+
if (e.playState !== "running") continue;
|
|
2909
|
+
let t = e.startTime;
|
|
2910
|
+
if (typeof t == "number") {
|
|
2911
|
+
e.startTime = t + vi;
|
|
2912
|
+
continue;
|
|
2913
|
+
}
|
|
2914
|
+
let n = e.timeline?.currentTime;
|
|
2915
|
+
typeof n == "number" && (e.startTime = n + vi);
|
|
2916
|
+
}
|
|
2917
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + li), yi)), o = requestAnimationFrame(h);
|
|
2918
|
+
return;
|
|
2919
|
+
}
|
|
2920
|
+
if (!u) {
|
|
2921
|
+
s !== null && clearTimeout(s);
|
|
2922
|
+
let e = m(p);
|
|
2923
|
+
p = 0, e > 33.333333333333336 && t?.(e), o = requestAnimationFrame(h);
|
|
2924
|
+
return;
|
|
2925
|
+
}
|
|
2926
|
+
let g = 0;
|
|
2927
|
+
for (let e of i) {
|
|
2928
|
+
if (e.playState !== "running") continue;
|
|
2929
|
+
let t = e.currentTime, n = e.startTime;
|
|
2930
|
+
if (typeof t != "number" || typeof n != "number") continue;
|
|
2931
|
+
let r = a.get(e) ?? 0;
|
|
2932
|
+
if (t <= r + p + 33.333333333333336) continue;
|
|
2933
|
+
let i = t - (r + p);
|
|
2934
|
+
e.startTime = n + i, g = Math.max(g, i);
|
|
2935
|
+
}
|
|
2936
|
+
if (g > 0) {
|
|
2937
|
+
t?.(g);
|
|
2938
|
+
return;
|
|
2939
|
+
}
|
|
2940
|
+
e - d < _i && (o = requestAnimationFrame(h));
|
|
2941
|
+
};
|
|
2942
|
+
return o = requestAnimationFrame(h), () => {
|
|
2943
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + li);
|
|
2944
|
+
};
|
|
2945
|
+
}
|
|
2946
|
+
function xi(e, t) {
|
|
2947
|
+
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2948
|
+
exotic embedders. */
|
|
2949
|
+
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2950
|
+
let n = 0, r = null, i = !1, a = (o) => {
|
|
2951
|
+
if (!i) {
|
|
2952
|
+
if (r !== null) {
|
|
2953
|
+
let n = o - r;
|
|
2954
|
+
if (n > 33.333333333333336) {
|
|
2955
|
+
let r = n - li;
|
|
2956
|
+
for (let t of e()) t && fi(t, r, o);
|
|
2957
|
+
t?.(r);
|
|
2958
|
+
}
|
|
2959
|
+
}
|
|
2960
|
+
r = o, n = requestAnimationFrame(a);
|
|
2961
|
+
}
|
|
2962
|
+
};
|
|
2963
|
+
return n = requestAnimationFrame(a), () => {
|
|
2964
|
+
i = !0, cancelAnimationFrame(n);
|
|
2965
|
+
};
|
|
2966
|
+
}
|
|
2967
|
+
var Si = /* @__PURE__ */ new WeakMap();
|
|
2968
|
+
function Ci(e, t, n, r = !0, i = !1) {
|
|
2969
|
+
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2970
|
+
let a = Si.get(e);
|
|
2971
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => wi(e);
|
|
2972
|
+
let o = null, s = !1, c = !1, l = () => {
|
|
2973
|
+
s || c || (s = !0, u.disconnect(), o = bi(t, n, r, i));
|
|
2974
|
+
}, u = new MutationObserver(() => {
|
|
2975
|
+
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2976
|
+
});
|
|
2977
|
+
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2978
|
+
attributes: !0,
|
|
2979
|
+
attributeFilter: ["data-flemo-anim-hold"]
|
|
2980
|
+
}), Si.set(e, {
|
|
2981
|
+
refs: 1,
|
|
2982
|
+
pendingDrop: null,
|
|
2983
|
+
dispose: () => {
|
|
2984
|
+
c = !0, u.disconnect(), o?.(), Si.delete(e);
|
|
2985
|
+
}
|
|
2986
|
+
}), () => wi(e);
|
|
2987
|
+
}
|
|
2988
|
+
var wi = (e) => {
|
|
2989
|
+
let t = Si.get(e);
|
|
2990
|
+
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2991
|
+
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2992
|
+
if (typeof setTimeout != "function") {
|
|
2993
|
+
t.dispose();
|
|
2994
|
+
return;
|
|
2995
|
+
}
|
|
2996
|
+
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2997
|
+
}
|
|
2998
|
+
}, Ti = !1, Ei = 0, Di = [], Oi = () => {
|
|
2999
|
+
let e = Di;
|
|
3000
|
+
Di = [];
|
|
3001
|
+
for (let t of e) t();
|
|
3002
|
+
}, ki = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), Ai = () => {
|
|
3003
|
+
if (Ti || typeof window > "u" || typeof window.fetch != "function") return;
|
|
3004
|
+
Ti = !0;
|
|
3005
|
+
let e = window.fetch.bind(window);
|
|
3006
|
+
window.fetch = (...t) => e(...t).then((e) => Ei <= 0 || ki(e) ? e : new Promise((t) => {
|
|
3007
|
+
Di.push(() => t(e));
|
|
3008
|
+
}), (e) => {
|
|
3009
|
+
if (Ei <= 0) throw e;
|
|
3010
|
+
return new Promise((t, n) => {
|
|
3011
|
+
Di.push(() => n(e));
|
|
3012
|
+
});
|
|
3013
|
+
});
|
|
3014
|
+
}, ji = 2e3;
|
|
3015
|
+
function Mi(e = ji) {
|
|
3016
|
+
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
3017
|
+
if (Ai(), !Ti) return () => {};
|
|
3018
|
+
Ei += 1;
|
|
3019
|
+
let t = !1, n = null, r = () => {
|
|
3020
|
+
t || (t = !0, n !== null && clearTimeout(n), Ei = Math.max(0, Ei - 1), Ei === 0 && Oi());
|
|
3021
|
+
};
|
|
3022
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(ji, e))), r;
|
|
3023
|
+
}
|
|
3024
|
+
Ai();
|
|
3025
|
+
//#endregion
|
|
3026
|
+
//#region src/core/engine/transitionPlayer.ts
|
|
3027
|
+
var Ni = [
|
|
3028
|
+
"x",
|
|
3029
|
+
"y",
|
|
3030
|
+
"z",
|
|
3031
|
+
"scale",
|
|
3032
|
+
"scaleX",
|
|
3033
|
+
"scaleY",
|
|
3034
|
+
"rotate",
|
|
3035
|
+
"rotateX",
|
|
3036
|
+
"rotateY",
|
|
3037
|
+
"rotateZ"
|
|
3038
|
+
], Pi = new Set(Ni), Fi = {
|
|
3039
|
+
x: 0,
|
|
2109
3040
|
y: 0,
|
|
2110
3041
|
z: 0,
|
|
2111
3042
|
scale: 1,
|
|
@@ -2115,7 +3046,7 @@ var Gt = (e, t, n, r) => {
|
|
|
2115
3046
|
rotateX: 0,
|
|
2116
3047
|
rotateY: 0,
|
|
2117
3048
|
rotateZ: 0
|
|
2118
|
-
},
|
|
3049
|
+
}, Ii = (e, t) => {
|
|
2119
3050
|
if (typeof t == "number") return {
|
|
2120
3051
|
value: t,
|
|
2121
3052
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
@@ -2124,7 +3055,7 @@ var Gt = (e, t, n, r) => {
|
|
|
2124
3055
|
let n = t.trim(), r = /^(-?\d*\.?\d+)(px|%|deg)?$/.exec(n);
|
|
2125
3056
|
if (!r) return null;
|
|
2126
3057
|
let i = parseFloat(r[1]), a = r[2] ?? "";
|
|
2127
|
-
return e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? a !== "deg" &&
|
|
3058
|
+
return e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? a !== "deg" && (a !== "" || i !== 0) ? null : {
|
|
2128
3059
|
value: i,
|
|
2129
3060
|
unit: ""
|
|
2130
3061
|
} : e === "scale" || e === "scaleX" || e === "scaleY" ? a === "" ? {
|
|
@@ -2134,162 +3065,212 @@ var Gt = (e, t, n, r) => {
|
|
|
2134
3065
|
value: i,
|
|
2135
3066
|
unit: a === "" && i === 0 ? "px" : a
|
|
2136
3067
|
};
|
|
2137
|
-
},
|
|
2138
|
-
let n = e.match(
|
|
2139
|
-
if (n.length !== r.length || e.replace(
|
|
3068
|
+
}, Li = /-?\d*\.?\d+/g, Ri = (e, t) => {
|
|
3069
|
+
let n = e.match(Li) ?? [], r = t.match(Li) ?? [];
|
|
3070
|
+
if (n.length !== r.length || e.replace(Li, " ") !== t.replace(Li, " ")) return null;
|
|
2140
3071
|
let i = n.map(Number), a = r.map(Number);
|
|
2141
3072
|
return (t) => {
|
|
2142
3073
|
let n = 0;
|
|
2143
|
-
return e.replace(
|
|
3074
|
+
return e.replace(Li, () => {
|
|
2144
3075
|
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
2145
3076
|
return `${Math.round(r * 1e3) / 1e3}`;
|
|
2146
3077
|
});
|
|
2147
3078
|
};
|
|
2148
|
-
},
|
|
2149
|
-
|
|
2150
|
-
|
|
2151
|
-
|
|
2152
|
-
|
|
2153
|
-
|
|
2154
|
-
|
|
3079
|
+
}, zi = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), Bi = (e) => typeof e == "object" && !!e && !Array.isArray(e), Vi = (e) => Bi(e) ? Object.keys(e) : [], Hi = (e, t) => Bi(e) ? e[t] : void 0, Ui = {
|
|
3080
|
+
x: 0,
|
|
3081
|
+
y: 0,
|
|
3082
|
+
z: 0,
|
|
3083
|
+
scale: 1,
|
|
3084
|
+
scaleX: 1,
|
|
3085
|
+
scaleY: 1,
|
|
3086
|
+
rotate: 2,
|
|
3087
|
+
rotateX: 2,
|
|
3088
|
+
rotateY: 2,
|
|
3089
|
+
rotateZ: 2
|
|
3090
|
+
}, Wi = (e) => {
|
|
3091
|
+
let t = 0, n = -1;
|
|
3092
|
+
for (let r of e) {
|
|
3093
|
+
if (!Pi.has(r)) continue;
|
|
3094
|
+
let e = Ui[r];
|
|
3095
|
+
if (e < t) return !1;
|
|
3096
|
+
if (t = e, e === 2) {
|
|
3097
|
+
let e = Ni.indexOf(r);
|
|
3098
|
+
if (e < n) return !1;
|
|
3099
|
+
n = e;
|
|
3100
|
+
}
|
|
3101
|
+
}
|
|
3102
|
+
return !0;
|
|
3103
|
+
}, Gi = (e) => {
|
|
3104
|
+
let t = [];
|
|
3105
|
+
for (let n of e) {
|
|
3106
|
+
if (!Pi.has(n)) continue;
|
|
3107
|
+
let e = Ui[n] === 0 ? "T" : n;
|
|
3108
|
+
(e !== "T" || t[t.length - 1] !== "T") && t.push(e);
|
|
3109
|
+
}
|
|
3110
|
+
return t;
|
|
3111
|
+
}, Ki = (e, t) => {
|
|
3112
|
+
let n = Gi(e), r = Gi(t), [i, a] = n.length <= r.length ? [n, r] : [r, n];
|
|
3113
|
+
return i.every((e, t) => a[t] === e);
|
|
3114
|
+
}, qi = (e, t) => {
|
|
3115
|
+
let n = Vi(e.from), r = Vi(e.to);
|
|
3116
|
+
if (!Wi(n) || !Wi(r) || !Ki(n, r)) return null;
|
|
3117
|
+
let i = /* @__PURE__ */ new Set([...n, ...r]), a = [], o = null, s = [], c = [];
|
|
3118
|
+
for (let n of i) {
|
|
3119
|
+
let r = Hi(e.from, n), i = Hi(e.to, n);
|
|
3120
|
+
if (Pi.has(n)) {
|
|
3121
|
+
let e = n, o = {
|
|
3122
|
+
value: Fi[e],
|
|
2155
3123
|
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
2156
|
-
},
|
|
2157
|
-
if (!
|
|
2158
|
-
let l =
|
|
2159
|
-
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100),
|
|
3124
|
+
}, s = r === void 0 ? o : Ii(e, r), c = i === void 0 ? o : Ii(e, i);
|
|
3125
|
+
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3126
|
+
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3127
|
+
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
2160
3128
|
prop: e,
|
|
2161
3129
|
from: {
|
|
2162
|
-
value:
|
|
3130
|
+
value: s.value,
|
|
2163
3131
|
unit: l
|
|
2164
3132
|
},
|
|
2165
3133
|
to: {
|
|
2166
|
-
value:
|
|
3134
|
+
value: c.value,
|
|
2167
3135
|
unit: l
|
|
2168
3136
|
},
|
|
2169
3137
|
percentBase: d
|
|
2170
3138
|
});
|
|
2171
3139
|
continue;
|
|
2172
3140
|
}
|
|
2173
|
-
if (
|
|
2174
|
-
let e =
|
|
3141
|
+
if (n === "opacity") {
|
|
3142
|
+
let e = r === void 0 ? 1 : r, t = i === void 0 ? 1 : i;
|
|
2175
3143
|
if (typeof e != "number" || typeof t != "number") return null;
|
|
2176
|
-
|
|
3144
|
+
o = {
|
|
2177
3145
|
from: e,
|
|
2178
3146
|
to: t
|
|
2179
3147
|
};
|
|
2180
3148
|
continue;
|
|
2181
3149
|
}
|
|
2182
|
-
if (
|
|
2183
|
-
let l = typeof
|
|
3150
|
+
if (r === void 0 || i === void 0) return null;
|
|
3151
|
+
let l = typeof r == "number" ? `${r}` : r, u = typeof i == "number" ? `${i}` : i;
|
|
2184
3152
|
if (typeof l != "string" || typeof u != "string") return null;
|
|
2185
3153
|
if (l === u) {
|
|
2186
|
-
|
|
2187
|
-
property:
|
|
3154
|
+
c.push({
|
|
3155
|
+
property: zi(n),
|
|
2188
3156
|
value: l
|
|
2189
3157
|
});
|
|
2190
3158
|
continue;
|
|
2191
3159
|
}
|
|
2192
|
-
let d =
|
|
3160
|
+
let d = Ri(l, u);
|
|
2193
3161
|
if (!d) return null;
|
|
2194
|
-
|
|
2195
|
-
property:
|
|
3162
|
+
s.push({
|
|
3163
|
+
property: zi(n),
|
|
2196
3164
|
mix: d
|
|
2197
3165
|
});
|
|
2198
3166
|
}
|
|
2199
3167
|
return {
|
|
2200
|
-
transforms:
|
|
2201
|
-
opacity:
|
|
2202
|
-
strings:
|
|
2203
|
-
constants:
|
|
3168
|
+
transforms: a,
|
|
3169
|
+
opacity: o,
|
|
3170
|
+
strings: s,
|
|
3171
|
+
constants: c
|
|
2204
3172
|
};
|
|
2205
|
-
},
|
|
2206
|
-
if (
|
|
2207
|
-
|
|
2208
|
-
|
|
2209
|
-
|
|
2210
|
-
|
|
2211
|
-
|
|
3173
|
+
}, Ji = 1, Yi = 1e3 / 60, Xi = (e) => !P() && e > 0 && e < 3, Zi = .6, Qi = 600, $i = (e, t) => {
|
|
3174
|
+
if (!nt()) return !1;
|
|
3175
|
+
for (let n of e.transforms) {
|
|
3176
|
+
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3177
|
+
let e = Math.abs(n.to.value - n.from.value);
|
|
3178
|
+
if (n.from.unit === "%") {
|
|
3179
|
+
if (e / 100 >= Zi) return !1;
|
|
3180
|
+
} else if (e * Math.max(1, t) >= Qi) return !1;
|
|
2212
3181
|
}
|
|
2213
|
-
return
|
|
2214
|
-
},
|
|
2215
|
-
|
|
2216
|
-
|
|
2217
|
-
let
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
|
|
2221
|
-
|
|
2222
|
-
|
|
2223
|
-
|
|
2224
|
-
|
|
2225
|
-
|
|
2226
|
-
|
|
2227
|
-
|
|
2228
|
-
|
|
2229
|
-
if (u.from.unit === "%" && (d *= u.percentBase), l === "x" || l === "y") {
|
|
2230
|
-
let e = l === "x" ? r.x : r.y, t = vn(), s = (t === "always" || t !== "off" && (e === null || Math.abs(d - e) * n >= mn)) && n > 0 ? Math.round(d * n) / n : Math.round(d * 1e3) / 1e3;
|
|
2231
|
-
l === "x" ? (r.x = d, i = s) : (r.y = d, a = s), o = !0, s !== 0 && (c = !1);
|
|
3182
|
+
return !0;
|
|
3183
|
+
}, ea = 12, ta = (e, t, n, r, i = Yi) => {
|
|
3184
|
+
let a = 0, o = 0, s = !1, c = [], l = !0;
|
|
3185
|
+
for (let u of Ni) {
|
|
3186
|
+
let d = e.find((e) => e.prop === u);
|
|
3187
|
+
if (!d) continue;
|
|
3188
|
+
let f = d.from.value + (d.to.value - d.from.value) * t;
|
|
3189
|
+
if (d.from.unit === "%" && (f *= d.percentBase), u === "x" || u === "y") {
|
|
3190
|
+
let e = u === "x" ? r.x : r.y, t = gt(), c = e === null ? Infinity : Math.abs(f - e) * n, p = t === null && r.glide === !0, m = p ? !1 : t === "always" || t === null && Xi(n) ? !0 : t === "off" ? !1 : t === "hybrid" ? c >= vt() : e === null || c * Yi / Math.max(1, i) >= Ji, h = d.to.value;
|
|
3191
|
+
d.from.unit === "%" && (h *= d.percentBase);
|
|
3192
|
+
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 <= ea), x = u === "x" ? "writtenX" : "writtenY", S;
|
|
3193
|
+
if (b) {
|
|
3194
|
+
let e = _ ?? r[x] ?? f, t = 1 / n, i = Math.abs(h - e) <= t + 1e-6 ? h : e + Math.sign(h - e) * t;
|
|
3195
|
+
S = Math.round(i * 1e3) / 1e3, r[g] = i, r[x] = null, i !== h && (r.pendingLanding = !0);
|
|
3196
|
+
} else n > 0 && v < 1 ? (S = Math.round(h * 1e3) / 1e3, r[x] = null) : (S = m && n > 0 ? Math.round(f * n) / n : Math.round(f * 1e3) / 1e3, r[x] = S);
|
|
3197
|
+
u === "x" ? (r.x = f, a = S) : (r.y = f, o = S), s = !0, S !== 0 && (l = !1);
|
|
2232
3198
|
continue;
|
|
2233
3199
|
}
|
|
2234
|
-
let
|
|
2235
|
-
|
|
3200
|
+
let p = Fi[u];
|
|
3201
|
+
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)`);
|
|
2236
3202
|
}
|
|
2237
|
-
return !
|
|
2238
|
-
},
|
|
3203
|
+
return !s && c.length === 0 ? "" : l ? "none" : [...s ? [`translate3d(${a}px, ${o}px, 0)`] : [], ...c].join(" ");
|
|
3204
|
+
}, na = (e) => e.replace(/-([a-z])/g, (e, t) => t.toUpperCase()), ra = (e) => {
|
|
2239
3205
|
let t = {};
|
|
2240
|
-
for (let n of
|
|
3206
|
+
for (let n of dn(e)) t[na(n.property)] = n.value;
|
|
2241
3207
|
return t;
|
|
2242
|
-
},
|
|
3208
|
+
}, ia = (e, t) => {
|
|
2243
3209
|
if (typeof e.animate != "function") return null;
|
|
2244
3210
|
try {
|
|
2245
|
-
let n = e.animate([
|
|
3211
|
+
let n = e.animate([ra(t.from), ra(t.to)], {
|
|
2246
3212
|
duration: Math.max(0, t.duration * 1e3),
|
|
2247
3213
|
delay: Math.max(0, t.delay * 1e3),
|
|
2248
|
-
easing:
|
|
3214
|
+
easing: fn(t.ease),
|
|
2249
3215
|
fill: "both"
|
|
2250
3216
|
});
|
|
2251
3217
|
return n.pause(), n.currentTime = 0, n;
|
|
2252
3218
|
} catch {
|
|
2253
3219
|
return null;
|
|
2254
3220
|
}
|
|
2255
|
-
},
|
|
3221
|
+
}, aa = 1.6, oa = 1e3 / 600, sa = 28, ca = 42, la = Yi, ua = () => la, da = (e) => {
|
|
3222
|
+
Number.isFinite(e) && (e < oa || e > ca || (la = Math.min(Yi, Math.max(oa, e))));
|
|
3223
|
+
}, fa = () => ({
|
|
2256
3224
|
request: (e) => requestAnimationFrame(e),
|
|
2257
3225
|
cancel: (e) => cancelAnimationFrame(e),
|
|
2258
3226
|
devicePixelRatio: () => typeof window < "u" && window.devicePixelRatio || 1
|
|
2259
|
-
}),
|
|
3227
|
+
}), pa = ((e = fa()) => {
|
|
2260
3228
|
let t = /* @__PURE__ */ new Map(), n = {
|
|
2261
3229
|
join: (n, r) => {
|
|
2262
|
-
let i =
|
|
2263
|
-
if (!
|
|
2264
|
-
let
|
|
2265
|
-
|
|
3230
|
+
let i = ft() === "scrub", s = !i && !P() && mt() === "on" && r.status !== "PUSHING" && r.status !== "REPLACING", c = i ? null : qi(r.motion, r.element), l = !c || s ? ia(r.element, r.motion) : null, u = l ? null : c;
|
|
3231
|
+
if (!u && !l) return null;
|
|
3232
|
+
let d = t.get(n);
|
|
3233
|
+
d || (d = {
|
|
2266
3234
|
tracks: [],
|
|
3235
|
+
frameIntervalMs: la,
|
|
3236
|
+
recentGaps: [],
|
|
3237
|
+
navCutMs: null,
|
|
3238
|
+
navComplete: null,
|
|
3239
|
+
navCompleted: !1,
|
|
2267
3240
|
started: !1,
|
|
2268
3241
|
startTime: null,
|
|
2269
3242
|
lastTime: null,
|
|
2270
3243
|
frameHandle: null
|
|
2271
|
-
}, t.set(n,
|
|
2272
|
-
let
|
|
3244
|
+
}, t.set(n, d));
|
|
3245
|
+
let f = X(r.motion, r.element, e.devicePixelRatio() || 1), p = {
|
|
2273
3246
|
...r,
|
|
2274
|
-
|
|
2275
|
-
|
|
3247
|
+
onComplete: void 0,
|
|
3248
|
+
parsed: u,
|
|
3249
|
+
scrub: l,
|
|
3250
|
+
cutMs: f,
|
|
3251
|
+
handoff: s && l !== null && c !== null,
|
|
3252
|
+
handedOff: !1,
|
|
3253
|
+
remainderPlan: s && l !== null ? c : null,
|
|
2276
3254
|
completed: !1,
|
|
2277
3255
|
detached: !1,
|
|
2278
3256
|
snapMemory: {
|
|
2279
3257
|
x: null,
|
|
2280
|
-
y: null
|
|
3258
|
+
y: null,
|
|
3259
|
+
glide: u ? $i(u, e.devicePixelRatio() || 1) : !1
|
|
2281
3260
|
}
|
|
2282
3261
|
};
|
|
2283
|
-
|
|
2284
|
-
|
|
2285
|
-
|
|
2286
|
-
|
|
2287
|
-
|
|
2288
|
-
|
|
2289
|
-
|
|
2290
|
-
|
|
3262
|
+
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3263
|
+
let m = Symbol("flemo-player-track");
|
|
3264
|
+
if (In.takeover(p.element), W(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3265
|
+
u.transforms.length > 0 && W(p.element, "transform", m), u.opacity && W(p.element, "opacity", m);
|
|
3266
|
+
for (let e of u.strings) W(p.element, e.property, m);
|
|
3267
|
+
for (let e of u.constants) W(p.element, e.property, m);
|
|
3268
|
+
a(p, 0);
|
|
3269
|
+
}
|
|
3270
|
+
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3271
|
+
p.detached = !0, p.scrub?.cancel(), G(p.element, void 0, m);
|
|
2291
3272
|
let r = t.get(n);
|
|
2292
|
-
r && (r.tracks = r.tracks.filter((e) => e !==
|
|
3273
|
+
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
2293
3274
|
};
|
|
2294
3275
|
},
|
|
2295
3276
|
dispose: (n) => {
|
|
@@ -2302,56 +3283,95 @@ var Gt = (e, t, n, r) => {
|
|
|
2302
3283
|
}
|
|
2303
3284
|
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
2304
3285
|
let t = r.get(e);
|
|
2305
|
-
return t || (t =
|
|
3286
|
+
return t || (t = Vr(e.motion.ease), r.set(e, t)), t;
|
|
2306
3287
|
};
|
|
2307
|
-
function a(t, n) {
|
|
2308
|
-
let { element:
|
|
2309
|
-
if (!(!
|
|
2310
|
-
if (
|
|
2311
|
-
let
|
|
2312
|
-
|
|
3288
|
+
function a(t, n, r) {
|
|
3289
|
+
let { element: i, parsed: a } = t;
|
|
3290
|
+
if (!(!a || !i.isConnected)) {
|
|
3291
|
+
if (a.transforms.length > 0) {
|
|
3292
|
+
let o = ta(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3293
|
+
o !== "" && (i.style.transform = o);
|
|
2313
3294
|
}
|
|
2314
|
-
if (
|
|
2315
|
-
let { from: e, to: t } =
|
|
2316
|
-
|
|
3295
|
+
if (a.opacity) {
|
|
3296
|
+
let { from: e, to: t } = a.opacity, r = e + (t - e) * n;
|
|
3297
|
+
i.style.opacity = `${Math.round(r * 255) / 255}`;
|
|
2317
3298
|
}
|
|
2318
|
-
for (let e of
|
|
2319
|
-
if (n === 0) for (let e of
|
|
3299
|
+
for (let e of a.strings) i.style.setProperty(e.property, e.mix(n));
|
|
3300
|
+
if (n === 0) for (let e of a.constants) i.style.setProperty(e.property, e.value);
|
|
2320
3301
|
}
|
|
2321
3302
|
}
|
|
2322
3303
|
function o(t, n) {
|
|
2323
3304
|
n.frameHandle = e.request((e) => {
|
|
2324
|
-
n.frameHandle = null,
|
|
3305
|
+
n.frameHandle = null, c(t, n, e);
|
|
2325
3306
|
});
|
|
2326
3307
|
}
|
|
2327
|
-
function s(e, r,
|
|
2328
|
-
let c = r.
|
|
3308
|
+
function s(e, n, r, a) {
|
|
3309
|
+
let o = r.element, s = Math.max(0, r.motion.delay * 1e3), c = Math.max(0, r.motion.duration * 1e3), l = typeof r.scrub?.currentTime == "number" ? r.scrub.currentTime : a, u = Math.max(0, l - s);
|
|
3310
|
+
if (c - u <= 0 || !r.remainderPlan || !(1 - i(r)(c > 0 ? u / c : 0) > .001)) return r.handoff = !1, !1;
|
|
3311
|
+
let d;
|
|
3312
|
+
try {
|
|
3313
|
+
d = o.animate([ra(r.motion.from), ra(r.motion.to)], {
|
|
3314
|
+
duration: c,
|
|
3315
|
+
delay: -u,
|
|
3316
|
+
easing: fn(r.motion.ease),
|
|
3317
|
+
fill: "both"
|
|
3318
|
+
});
|
|
3319
|
+
} catch {
|
|
3320
|
+
return r.handoff = !1, !1;
|
|
3321
|
+
}
|
|
3322
|
+
return r.scrub.cancel(), r.scrub = d, r.handedOff = !0, d.onfinish = () => {
|
|
3323
|
+
r.completed || r.detached || (r.completed = !0, r.onComplete?.(), t.get(e) === n && n.tracks.every((e) => e.completed || e.detached) && (n.navCompleted || (n.navCompleted = !0, n.navComplete?.()), t.delete(e)));
|
|
3324
|
+
}, !0;
|
|
3325
|
+
}
|
|
3326
|
+
function c(e, r, c) {
|
|
3327
|
+
let l = r.startTime ?? c;
|
|
2329
3328
|
if (r.lastTime !== null) {
|
|
2330
|
-
let e =
|
|
2331
|
-
|
|
2332
|
-
|
|
2333
|
-
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2340
|
-
|
|
3329
|
+
let e = c - r.lastTime;
|
|
3330
|
+
if (n.onFrameGap?.(e), e >= oa && e <= ca) {
|
|
3331
|
+
r.recentGaps.push(e), r.recentGaps.length > 7 && r.recentGaps.shift();
|
|
3332
|
+
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 >= sa);
|
|
3333
|
+
r.frameIntervalMs = Math.min(i ? ca : Yi, Math.max(oa, n)), la = r.frameIntervalMs, n < 12 && et(n, t[t.length - 1]);
|
|
3334
|
+
}
|
|
3335
|
+
e > aa * r.frameIntervalMs && (l += e - r.frameIntervalMs);
|
|
3336
|
+
}
|
|
3337
|
+
r.startTime = l, r.lastTime = c;
|
|
3338
|
+
let u = !0, d = !1;
|
|
3339
|
+
for (let t of r.tracks) {
|
|
3340
|
+
if (t.completed || t.detached) continue;
|
|
3341
|
+
let n = t.motion.duration * 1e3, o = t.motion.delay * 1e3, f = c - l;
|
|
3342
|
+
if (r.navCutMs !== null && f >= r.navCutMs) {
|
|
3343
|
+
if (!t.scrub && (t.snapMemory.pendingLanding = !1, a(t, 1, r.frameIntervalMs), t.snapMemory.pendingLanding)) {
|
|
3344
|
+
u = !1, d = !0;
|
|
3345
|
+
continue;
|
|
3346
|
+
}
|
|
3347
|
+
t.completed = !0, t.onComplete?.();
|
|
2341
3348
|
continue;
|
|
2342
3349
|
}
|
|
2343
|
-
|
|
2344
|
-
|
|
3350
|
+
if (t.scrub) {
|
|
3351
|
+
if (t.handedOff) {
|
|
3352
|
+
u = !1;
|
|
3353
|
+
continue;
|
|
3354
|
+
}
|
|
3355
|
+
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3356
|
+
if (t.handoff && f >= bt() && f < i && s(e, r, t, a)) {
|
|
3357
|
+
u = !1;
|
|
3358
|
+
continue;
|
|
3359
|
+
}
|
|
3360
|
+
t.scrub.currentTime = a, f >= i ? (t.completed = !0, t.onComplete?.()) : (u = !1, d = !0);
|
|
3361
|
+
continue;
|
|
3362
|
+
}
|
|
3363
|
+
let p = n <= 0 ? 1 : Math.min(1, Math.max(0, (f - o) / n));
|
|
3364
|
+
p >= 1 && (t.snapMemory.pendingLanding = !1), a(t, i(t)(p), r.frameIntervalMs), p >= 1 && !t.snapMemory.pendingLanding ? (t.completed = !0, t.onComplete?.()) : (u = !1, d = !0);
|
|
2345
3365
|
}
|
|
2346
|
-
if (
|
|
2347
|
-
|
|
3366
|
+
if (u) {
|
|
3367
|
+
r.navCompleted || (r.navCompleted = !0, r.navComplete?.()), t.delete(e);
|
|
2348
3368
|
return;
|
|
2349
3369
|
}
|
|
2350
|
-
o(e, r);
|
|
3370
|
+
d && o(e, r);
|
|
2351
3371
|
}
|
|
2352
3372
|
return n;
|
|
2353
3373
|
})();
|
|
2354
|
-
|
|
3374
|
+
pa.onFrameGap = (e) => {
|
|
2355
3375
|
if (typeof window < "u") {
|
|
2356
3376
|
let t = window.__flemoPlayerGaps ??= [];
|
|
2357
3377
|
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
@@ -2359,121 +3379,138 @@ Tn.onFrameGap = (e) => {
|
|
|
2359
3379
|
};
|
|
2360
3380
|
//#endregion
|
|
2361
3381
|
//#region src/core/engine/types.ts
|
|
2362
|
-
var
|
|
2363
|
-
let n = 0, r = !1;
|
|
2364
|
-
for (let i of ["x", "y"]) {
|
|
2365
|
-
let a = $t(e.from, i, t), o = $t(e.to, i, t);
|
|
2366
|
-
if (!(a === void 0 && o === void 0)) {
|
|
2367
|
-
if (a === null || o === null || a === void 0 || o === void 0) return null;
|
|
2368
|
-
r = !0, n = Math.max(n, Math.abs(o - a));
|
|
2369
|
-
}
|
|
2370
|
-
}
|
|
2371
|
-
if (!r || n === 0) return 0;
|
|
2372
|
-
let i = e.duration * 1e3;
|
|
2373
|
-
/* v8 ignore next 2 -- resolveVariantMotion never yields duration<=0 with a
|
|
2374
|
-
distance; kept so a hand-built motion cannot divide by zero. */
|
|
2375
|
-
if (i <= 0) return 0;
|
|
2376
|
-
let a = i / Dn, o = Jt(e.ease), s = Math.max(1, Math.min(240, Math.ceil(a))), c = 0, l = o(0);
|
|
2377
|
-
for (let e = 1; e <= s; e++) {
|
|
2378
|
-
let t = o(e / s);
|
|
2379
|
-
c = Math.max(c, Math.abs(t - l)), l = t;
|
|
2380
|
-
}
|
|
2381
|
-
return n * c * (s / a);
|
|
2382
|
-
}, kn = (e, t, n) => {
|
|
2383
|
-
let r = e.driver;
|
|
2384
|
-
if (r === "native" || r === "player") return r;
|
|
2385
|
-
let i = 0;
|
|
2386
|
-
for (let r of ["true", "false"]) {
|
|
2387
|
-
let a = U(e, `${t}-${r}`);
|
|
2388
|
-
if (!a) continue;
|
|
2389
|
-
let o = On(a, n);
|
|
2390
|
-
if (o === null) return "player";
|
|
2391
|
-
i = Math.max(i, o);
|
|
2392
|
-
}
|
|
2393
|
-
return i >= 6 ? "native" : "player";
|
|
2394
|
-
}, An = 1e3 / 60 * 2, jn = "flemo-", Mn = /* @__PURE__ */ new WeakMap(), Nn = (e, t, n) => {
|
|
2395
|
-
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2396
|
-
let e = r.animationName;
|
|
2397
|
-
if (typeof e != "string" || !e.startsWith(jn) || r.playState !== "running" || Mn.get(r) === n) continue;
|
|
2398
|
-
let i = r.startTime;
|
|
2399
|
-
typeof i == "number" && (r.startTime = i + t, Mn.set(r, n));
|
|
2400
|
-
}
|
|
2401
|
-
};
|
|
2402
|
-
function Pn(e, t) {
|
|
2403
|
-
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2404
|
-
exotic embedders. */
|
|
2405
|
-
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2406
|
-
let n = 0, r = null, i = !1, a = (o) => {
|
|
2407
|
-
if (!i) {
|
|
2408
|
-
if (r !== null) {
|
|
2409
|
-
let n = o - r;
|
|
2410
|
-
if (n > 33.333333333333336) {
|
|
2411
|
-
let r = n - An;
|
|
2412
|
-
for (let t of e()) t && Nn(t, r, o);
|
|
2413
|
-
t?.(r);
|
|
2414
|
-
}
|
|
2415
|
-
}
|
|
2416
|
-
r = o, n = requestAnimationFrame(a);
|
|
2417
|
-
}
|
|
2418
|
-
};
|
|
2419
|
-
return n = requestAnimationFrame(a), () => {
|
|
2420
|
-
i = !0, cancelAnimationFrame(n);
|
|
2421
|
-
};
|
|
2422
|
-
}
|
|
2423
|
-
//#endregion
|
|
2424
|
-
//#region src/core/engine/createTransitionEngine.ts
|
|
2425
|
-
var Z = () => {}, Fn = 400, In = 4, Ln = 100, Rn = 1500, zn = "data-flemo-part-name", Bn = (e) => {
|
|
3382
|
+
var ma = "data-flemo-skip-animation", $ = () => {}, ha = 400, ga = 4, _a = 100, va = 1500, ya = "data-flemo-part-name", ba = /* @__PURE__ */ new WeakMap(), xa = "data-flemo-anim-hold", Sa = (e) => {
|
|
2426
3383
|
let t = e.parentElement ?? e;
|
|
2427
|
-
return Array.from(t.querySelectorAll(`[${
|
|
3384
|
+
return Array.from(t.querySelectorAll(`[${ya}]`)).filter((n) => {
|
|
2428
3385
|
let r = n.closest("[data-flemo-screen]");
|
|
2429
3386
|
return !r || r === e || !t.contains(r);
|
|
2430
3387
|
});
|
|
2431
|
-
},
|
|
3388
|
+
}, Ca = (e, t) => {
|
|
2432
3389
|
let [n, r] = t.split("-");
|
|
2433
|
-
return
|
|
2434
|
-
},
|
|
2435
|
-
let
|
|
2436
|
-
|
|
2437
|
-
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
3390
|
+
return Sa(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
3391
|
+
}, wa = (e, t) => {
|
|
3392
|
+
let n = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3393
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ya}][data-flemo-status="${t}"]`)).filter((e) => {
|
|
3394
|
+
if (n === null) return !0;
|
|
3395
|
+
let t = e.closest("[data-flemo-router]");
|
|
3396
|
+
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3397
|
+
});
|
|
3398
|
+
}, Ta = (e, t) => wa(e, t).filter((e) => e.parentElement?.closest(`[${xa}]`) == null), Ea = (e) => {
|
|
3399
|
+
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3400
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${ya}][${xa}]`)).filter((e) => {
|
|
3401
|
+
if (e.parentElement?.closest(`[${xa}]`) != null) return !1;
|
|
3402
|
+
if (t === null) return !0;
|
|
3403
|
+
let n = e.closest("[data-flemo-router]");
|
|
3404
|
+
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3405
|
+
});
|
|
3406
|
+
}, Da = (e, t, n) => {
|
|
3407
|
+
let r = 0;
|
|
3408
|
+
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3409
|
+
if (!U(t, e)) continue;
|
|
3410
|
+
let n = V(t, e);
|
|
3411
|
+
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3412
|
+
}
|
|
3413
|
+
for (let t of wa(e, n)) {
|
|
3414
|
+
let e = B.get(t.getAttribute(ya)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3415
|
+
if (!e || !U(e, i)) continue;
|
|
3416
|
+
let a = V(e, i);
|
|
3417
|
+
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3418
|
+
}
|
|
3419
|
+
let i = t.decoratorName ? z.get(t.decoratorName) : void 0;
|
|
3420
|
+
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3421
|
+
if (!U(i, e)) continue;
|
|
3422
|
+
let t = V(i, e);
|
|
3423
|
+
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3424
|
+
}
|
|
3425
|
+
return r;
|
|
3426
|
+
}, Oa = (e) => e === "POPPING" && !st() || e === "PUSHING" && ot() && !st(), ka = 12, Aa = null, ja = () => {
|
|
3427
|
+
Aa = typeof requestAnimationFrame == "function" ? requestAnimationFrame(ja) : null;
|
|
3428
|
+
}, Ma = () => (Aa === null && typeof requestAnimationFrame == "function" && (Aa = requestAnimationFrame(ja)), $), Na = !1, Pa = 0, Fa = () => {
|
|
3429
|
+
Na &&= (Pa += 1, !1);
|
|
3430
|
+
}, Ia = 2, La = 8, Ra = () => {
|
|
3431
|
+
if (Na || typeof requestAnimationFrame != "function") return;
|
|
3432
|
+
Na = !0;
|
|
3433
|
+
let e = ++Pa, t = [], n = Ia, r = null, i = (a) => {
|
|
3434
|
+
if (e !== Pa) return;
|
|
3435
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < La) {
|
|
3436
|
+
requestAnimationFrame(i);
|
|
2443
3437
|
return;
|
|
2444
3438
|
}
|
|
2445
|
-
|
|
2446
|
-
|
|
3439
|
+
Na = !1;
|
|
3440
|
+
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
3441
|
+
da(s), et(s, o[o.length - 1]);
|
|
3442
|
+
};
|
|
3443
|
+
requestAnimationFrame(i);
|
|
3444
|
+
}, za = (e, t, n, r) => {
|
|
3445
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = P() && rt(), u = !l && P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ua() < ka, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? Zr(e, t, d) : u ? $r(e, t, d, ua()) : null : null;
|
|
3446
|
+
if (U(t, n)) {
|
|
3447
|
+
ai(i, t, c, r);
|
|
3448
|
+
let e = f(V(t, n) ?? null, i);
|
|
3449
|
+
e && (W(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3450
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (ai(n, t, c, r), e && (W(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3451
|
+
}
|
|
3452
|
+
if (a && t.decoratorName) {
|
|
3453
|
+
let e = z.get(t.decoratorName);
|
|
3454
|
+
e && U(e, n) && ai(a, e, c, r);
|
|
3455
|
+
}
|
|
3456
|
+
for (let e of Ca(i, n)) {
|
|
3457
|
+
let t = B.get(e.getAttribute(ya));
|
|
3458
|
+
if (t && U(t, n)) {
|
|
3459
|
+
ai(e, t, c, r);
|
|
3460
|
+
let i = f(V(t, n) ?? null, e);
|
|
3461
|
+
i && (W(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3462
|
+
}
|
|
3463
|
+
}
|
|
3464
|
+
}, Ba = (e, t) => {
|
|
3465
|
+
let { scope: n, decorator: r, bars: i } = e;
|
|
3466
|
+
if (n) {
|
|
3467
|
+
oi(n, t);
|
|
3468
|
+
for (let e of Sa(n)) oi(e, t);
|
|
3469
|
+
}
|
|
3470
|
+
r && oi(r, t);
|
|
3471
|
+
for (let e of i ?? []) e && oi(e, t);
|
|
3472
|
+
}, Va = 4, Ha = (e) => `${Math.round(e * 1e3) / 1e3}s`, Ua = (e) => {
|
|
3473
|
+
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
3474
|
+
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" && (W(t, "animation-delay", e.writer), t.style.animationDelay = Ha(n.seconds), a = !0), i = !1;
|
|
3475
|
+
}, s = (a) => {
|
|
3476
|
+
if (i || a.target !== t || a.animationName !== n && a.animationName !== `${n}-lpm`) return;
|
|
3477
|
+
if (!e.isLive() || e.budgetUsed() >= Va) {
|
|
3478
|
+
e.onTerminal();
|
|
2447
3479
|
return;
|
|
2448
3480
|
}
|
|
2449
|
-
let
|
|
2450
|
-
if (c
|
|
3481
|
+
let s = Math.max(0, a.elapsedTime * 1e3), c = r.duration * 1e3;
|
|
3482
|
+
if (c > 0 && s >= c) {
|
|
2451
3483
|
e.onTerminal();
|
|
2452
3484
|
return;
|
|
2453
3485
|
}
|
|
2454
|
-
e.spendBudget(),
|
|
3486
|
+
if (e.spendBudget(), s <= 0) {
|
|
3487
|
+
o({ mode: "keep" });
|
|
3488
|
+
return;
|
|
3489
|
+
}
|
|
3490
|
+
o({
|
|
2455
3491
|
mode: "set",
|
|
2456
|
-
seconds:
|
|
3492
|
+
seconds: -s / 1e3
|
|
2457
3493
|
});
|
|
2458
3494
|
};
|
|
2459
3495
|
return {
|
|
2460
3496
|
attach: () => {
|
|
2461
|
-
t.addEventListener("
|
|
3497
|
+
t.addEventListener("animationcancel", s);
|
|
2462
3498
|
},
|
|
2463
3499
|
detach: () => {
|
|
2464
|
-
t.removeEventListener("
|
|
3500
|
+
t.removeEventListener("animationcancel", s), a &&= (G(t, ["animation-delay"], e.writer), !1);
|
|
2465
3501
|
},
|
|
2466
3502
|
fullRestart: () => {
|
|
2467
|
-
|
|
3503
|
+
o({ mode: "clear" });
|
|
2468
3504
|
}
|
|
2469
3505
|
};
|
|
2470
3506
|
};
|
|
2471
|
-
function
|
|
2472
|
-
|
|
2473
|
-
|
|
2474
|
-
|
|
2475
|
-
|
|
2476
|
-
|
|
3507
|
+
function Wa(e) {
|
|
3508
|
+
Ue();
|
|
3509
|
+
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3510
|
+
if (!c) return;
|
|
3511
|
+
let { land: e, cancel: t } = c;
|
|
3512
|
+
c = null, t(), e();
|
|
3513
|
+
}, u = (e) => {
|
|
2477
3514
|
if (typeof requestAnimationFrame != "function") {
|
|
2478
3515
|
e();
|
|
2479
3516
|
return;
|
|
@@ -2481,78 +3518,108 @@ function Gn(e) {
|
|
|
2481
3518
|
let t = 0;
|
|
2482
3519
|
t = requestAnimationFrame(() => {
|
|
2483
3520
|
t = requestAnimationFrame(() => {
|
|
2484
|
-
|
|
3521
|
+
c = null, e();
|
|
2485
3522
|
});
|
|
2486
|
-
}),
|
|
3523
|
+
}), c = {
|
|
2487
3524
|
land: e,
|
|
2488
3525
|
cancel: () => cancelAnimationFrame(t)
|
|
2489
3526
|
};
|
|
2490
3527
|
};
|
|
2491
3528
|
return {
|
|
2492
|
-
driveScreenLifecycle: (
|
|
2493
|
-
let { getElements:
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
3529
|
+
driveScreenLifecycle: (c) => {
|
|
3530
|
+
let { getElements: d, transitionName: f, prevTransitionName: p, status: m, isActive: h, animHoldReleased: g } = c, _ = m === "PUSHING" || m === "POPPING" || m === "REPLACING";
|
|
3531
|
+
if (h) {
|
|
3532
|
+
let { scope: e } = d();
|
|
3533
|
+
if (e) if (_ && !g) for (let t of Ta(e, m)) t.setAttribute(xa, "true");
|
|
3534
|
+
else for (let t of Ea(e)) t.removeAttribute(xa);
|
|
3535
|
+
}
|
|
3536
|
+
if (_) {
|
|
3537
|
+
let { scope: e, bars: n } = d();
|
|
3538
|
+
if (e) {
|
|
3539
|
+
Hn(e), G(e, ["animation-timing-function", "animation-duration"], t);
|
|
3540
|
+
for (let n of Sa(e)) G(n, ["animation-timing-function", "animation-duration"], t);
|
|
3541
|
+
for (let e of n ?? []) e && G(e, ["animation-timing-function", "animation-duration"], t);
|
|
3542
|
+
}
|
|
3543
|
+
}
|
|
3544
|
+
_ && (Dr(), o &&= (clearTimeout(o), null), a ||= wr()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3545
|
+
o = null, a?.(), a = null;
|
|
3546
|
+
}, ha) : (a(), a = null));
|
|
3547
|
+
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3548
|
+
if (!y && i) {
|
|
3549
|
+
let e = i;
|
|
3550
|
+
i = null, _ ? e() : u(e);
|
|
3551
|
+
}
|
|
3552
|
+
if (!v && r) {
|
|
3553
|
+
let e = r;
|
|
3554
|
+
r = null, _ ? e() : u(e);
|
|
3555
|
+
}
|
|
3556
|
+
if (v && !r && ct()) {
|
|
3557
|
+
l();
|
|
3558
|
+
let { scope: e } = d();
|
|
2505
3559
|
if (e) {
|
|
2506
|
-
|
|
2507
|
-
n = ()
|
|
2508
|
-
|
|
3560
|
+
In.takeover(e);
|
|
3561
|
+
let t = pr(e), n = Lr(e), i = Da(e, R(f), m), a = Mi(i + va), o = it(), s = o === "on" ? Nr(e, i + va) : o === null && nt() ? Nr(e, i + va, !0) : $, c = Kn();
|
|
3562
|
+
r = () => {
|
|
3563
|
+
a(), s(), n(), t(), c();
|
|
2509
3564
|
};
|
|
2510
3565
|
}
|
|
2511
3566
|
}
|
|
2512
|
-
|
|
3567
|
+
if (y && !i && ct()) {
|
|
3568
|
+
l();
|
|
3569
|
+
let { scope: e } = d(), t = it();
|
|
3570
|
+
e && (t === "on" || t === null && nt()) && (i = Nr(e, Da(e, R(f), m) + va, !0));
|
|
3571
|
+
}
|
|
3572
|
+
let b = (t, n, r) => {
|
|
2513
3573
|
let i = e.getTransitionTaskId();
|
|
2514
|
-
if (!i || s.pendingTaskIds.some((e) => e !== i)
|
|
2515
|
-
|
|
3574
|
+
if (!i || (ye.pinnedDriver(), P() && s.pendingTaskIds.some((e) => e !== i))) return null;
|
|
3575
|
+
if (P() && ye.pinnedDriver() !== "raf") return Ra(), null;
|
|
3576
|
+
if (!P() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform ?? "") || !P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Oa(t.split("-")[0])) return null;
|
|
3577
|
+
if (!P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ve() && (m === "REPLACING" || m === "POPPING" || m === "PUSHING")) return He(), null;
|
|
3578
|
+
if (!ye.playerAllowed()) return null;
|
|
3579
|
+
let { scope: a, decorator: o, bars: c } = d();
|
|
2516
3580
|
if (!a) return null;
|
|
2517
|
-
let
|
|
2518
|
-
if (
|
|
3581
|
+
let l = R(f);
|
|
3582
|
+
if (ye.pinnedDriver() !== "raf") {
|
|
2519
3583
|
let e = t.split("-")[0];
|
|
2520
|
-
if (
|
|
3584
|
+
if (ci(l, e, a) === "native") return null;
|
|
2521
3585
|
}
|
|
2522
|
-
let
|
|
2523
|
-
if (!
|
|
2524
|
-
let p = [],
|
|
3586
|
+
let u = V(l, t);
|
|
3587
|
+
if (!u) return null;
|
|
3588
|
+
let p = [], h = pa.join(i, {
|
|
2525
3589
|
element: a,
|
|
2526
|
-
motion:
|
|
3590
|
+
motion: u,
|
|
2527
3591
|
role: n,
|
|
2528
|
-
onComplete: r
|
|
3592
|
+
onComplete: r,
|
|
3593
|
+
status: t.split("-")[0]
|
|
2529
3594
|
});
|
|
2530
|
-
if (!
|
|
2531
|
-
p.push(
|
|
3595
|
+
if (!h) return null;
|
|
3596
|
+
p.push(h);
|
|
2532
3597
|
for (let e of c ?? []) {
|
|
2533
3598
|
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
2534
|
-
let
|
|
3599
|
+
let n = pa.join(i, {
|
|
2535
3600
|
element: e,
|
|
2536
|
-
motion:
|
|
2537
|
-
role: "passive"
|
|
3601
|
+
motion: u,
|
|
3602
|
+
role: "passive",
|
|
3603
|
+
status: t.split("-")[0]
|
|
2538
3604
|
});
|
|
2539
|
-
|
|
3605
|
+
n && p.push(n);
|
|
2540
3606
|
}
|
|
2541
|
-
if (o &&
|
|
2542
|
-
let e =
|
|
3607
|
+
if (o && l.decoratorName) {
|
|
3608
|
+
let e = z.get(l.decoratorName), n = e ? V(e, t) : null;
|
|
2543
3609
|
if (n) {
|
|
2544
|
-
let e =
|
|
3610
|
+
let e = pa.join(i, {
|
|
2545
3611
|
element: o,
|
|
2546
3612
|
motion: n,
|
|
2547
|
-
role: "passive"
|
|
3613
|
+
role: "passive",
|
|
3614
|
+
status: t.split("-")[0]
|
|
2548
3615
|
});
|
|
2549
3616
|
e && p.push(e);
|
|
2550
3617
|
}
|
|
2551
3618
|
}
|
|
2552
|
-
for (let e of
|
|
2553
|
-
let n =
|
|
3619
|
+
for (let e of Ca(a, t)) {
|
|
3620
|
+
let n = B.get(e.getAttribute(ya)), r = n ? V(n, t) : null;
|
|
2554
3621
|
if (!r) continue;
|
|
2555
|
-
let a =
|
|
3622
|
+
let a = pa.join(i, {
|
|
2556
3623
|
element: e,
|
|
2557
3624
|
motion: r,
|
|
2558
3625
|
role: "passive"
|
|
@@ -2560,233 +3627,305 @@ function Gn(e) {
|
|
|
2560
3627
|
a && p.push(a);
|
|
2561
3628
|
}
|
|
2562
3629
|
return () => p.forEach((e) => e());
|
|
2563
|
-
},
|
|
2564
|
-
let
|
|
2565
|
-
let
|
|
3630
|
+
}, x = (e, n) => {
|
|
3631
|
+
let r = [], { decorator: i, bars: a } = d(), o = R(f), s = (e, n, i) => {
|
|
3632
|
+
let a = 0, o = Ua({
|
|
2566
3633
|
element: e,
|
|
2567
|
-
expectedName:
|
|
2568
|
-
motion:
|
|
3634
|
+
expectedName: n,
|
|
3635
|
+
motion: i,
|
|
3636
|
+
writer: t,
|
|
2569
3637
|
isLive: () => e.isConnected,
|
|
2570
|
-
budgetUsed: () =>
|
|
3638
|
+
budgetUsed: () => a,
|
|
2571
3639
|
spendBudget: () => {
|
|
2572
|
-
|
|
3640
|
+
a += 1;
|
|
2573
3641
|
},
|
|
2574
|
-
onTerminal:
|
|
3642
|
+
onTerminal: $
|
|
2575
3643
|
});
|
|
2576
|
-
|
|
2577
|
-
},
|
|
2578
|
-
if (
|
|
2579
|
-
if (
|
|
2580
|
-
let e =
|
|
2581
|
-
|
|
3644
|
+
o.attach(), r.push(o.detach);
|
|
3645
|
+
}, c = _n("screen", f, n), l = V(o, n);
|
|
3646
|
+
if (l) for (let e of a ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || s(e, c, l);
|
|
3647
|
+
if (i && o.decoratorName) {
|
|
3648
|
+
let e = z.get(o.decoratorName), t = e ? V(e, n) : null;
|
|
3649
|
+
t && s(i, _n("decorator", o.decoratorName, n), t);
|
|
2582
3650
|
}
|
|
2583
|
-
for (let
|
|
2584
|
-
let e =
|
|
2585
|
-
i &&
|
|
3651
|
+
for (let t of Ca(e, n)) {
|
|
3652
|
+
let e = t.getAttribute(ya), r = B.get(e), i = r ? V(r, n) : null;
|
|
3653
|
+
i && s(t, _n("part", e, n), i);
|
|
2586
3654
|
}
|
|
2587
|
-
return
|
|
3655
|
+
return r;
|
|
2588
3656
|
};
|
|
2589
|
-
if (!
|
|
2590
|
-
if (
|
|
2591
|
-
let { scope: e, decorator:
|
|
3657
|
+
if (!h) {
|
|
3658
|
+
if (m === "COMPLETED") {
|
|
3659
|
+
let { scope: e, decorator: n, bars: r } = d();
|
|
2592
3660
|
if (e) {
|
|
2593
|
-
|
|
2594
|
-
for (let t of
|
|
3661
|
+
G(e);
|
|
3662
|
+
for (let t of Sa(e)) G(t);
|
|
2595
3663
|
}
|
|
2596
|
-
|
|
2597
|
-
for (let e of
|
|
2598
|
-
return
|
|
3664
|
+
n && G(n);
|
|
3665
|
+
for (let e of r ?? []) e && G(e, void 0, t);
|
|
3666
|
+
return Ba({
|
|
3667
|
+
scope: e,
|
|
3668
|
+
decorator: n,
|
|
3669
|
+
bars: r ?? []
|
|
3670
|
+
}, t), $;
|
|
2599
3671
|
}
|
|
2600
|
-
if (
|
|
2601
|
-
let e
|
|
2602
|
-
|
|
2603
|
-
|
|
2604
|
-
|
|
2605
|
-
|
|
2606
|
-
|
|
2607
|
-
|
|
2608
|
-
|
|
2609
|
-
|
|
2610
|
-
|
|
2611
|
-
|
|
2612
|
-
|
|
3672
|
+
if (m === "REPLACING" && p !== f && e.setReplaceTransitionStatus("PENDING"), _) {
|
|
3673
|
+
let { scope: e, decorator: n, bars: r } = d();
|
|
3674
|
+
e && za({
|
|
3675
|
+
scope: e,
|
|
3676
|
+
decorator: n,
|
|
3677
|
+
bars: r ?? []
|
|
3678
|
+
}, R(f), `${m}-false`, t);
|
|
3679
|
+
}
|
|
3680
|
+
if (_ && g) {
|
|
3681
|
+
let e = `${m}-false`, n = b(e, "passive");
|
|
3682
|
+
if (n) return n;
|
|
3683
|
+
let { scope: r } = d();
|
|
3684
|
+
if (r) {
|
|
3685
|
+
let n = R(f), i = [];
|
|
3686
|
+
if (U(n, e)) {
|
|
3687
|
+
let a = V(n, e), o = 0, s = Ua({
|
|
3688
|
+
element: r,
|
|
3689
|
+
expectedName: _n("screen", f, e),
|
|
3690
|
+
motion: a,
|
|
3691
|
+
writer: t,
|
|
3692
|
+
isLive: () => r.isConnected && r.getAttribute("data-flemo-skip-animation") !== "true",
|
|
3693
|
+
budgetUsed: () => o,
|
|
2613
3694
|
spendBudget: () => {
|
|
2614
|
-
|
|
3695
|
+
o += 1;
|
|
2615
3696
|
},
|
|
2616
|
-
onTerminal:
|
|
3697
|
+
onTerminal: $
|
|
2617
3698
|
});
|
|
2618
|
-
|
|
3699
|
+
s.attach(), i.push(s.detach);
|
|
2619
3700
|
}
|
|
2620
|
-
if (
|
|
3701
|
+
if (i.push(...x(r, e)), i.length > 0) return () => i.forEach((e) => e());
|
|
2621
3702
|
}
|
|
2622
3703
|
}
|
|
2623
|
-
return
|
|
3704
|
+
return $;
|
|
2624
3705
|
}
|
|
2625
|
-
if (
|
|
2626
|
-
e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
2627
|
-
let { scope:
|
|
2628
|
-
if (
|
|
2629
|
-
|
|
2630
|
-
for (let e of
|
|
3706
|
+
if (m === "COMPLETED") {
|
|
3707
|
+
Fa(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3708
|
+
let { scope: n, decorator: r, bars: i } = d();
|
|
3709
|
+
if (n) {
|
|
3710
|
+
G(n), G(n, ["transform", "opacity"]), n.removeAttribute(ma);
|
|
3711
|
+
for (let e of Sa(n)) G(e);
|
|
2631
3712
|
}
|
|
2632
|
-
|
|
2633
|
-
for (let e of
|
|
2634
|
-
return
|
|
2635
|
-
|
|
2636
|
-
|
|
2637
|
-
|
|
2638
|
-
|
|
2639
|
-
|
|
2640
|
-
|
|
2641
|
-
|
|
2642
|
-
|
|
2643
|
-
|
|
2644
|
-
|
|
2645
|
-
|
|
3713
|
+
r && (G(r), r.removeAttribute(ma));
|
|
3714
|
+
for (let e of i ?? []) e && G(e, void 0, t);
|
|
3715
|
+
return Ba({
|
|
3716
|
+
scope: n,
|
|
3717
|
+
decorator: r,
|
|
3718
|
+
bars: i ?? []
|
|
3719
|
+
}, t), $;
|
|
3720
|
+
}
|
|
3721
|
+
if (m === "IDLE") return $;
|
|
3722
|
+
let { scope: S } = d();
|
|
3723
|
+
if (!S) return $;
|
|
3724
|
+
let C = e.getTransitionTaskId(), w = $, T = () => {
|
|
3725
|
+
w(), C && (s.resolveTask(C), n.delete(C));
|
|
3726
|
+
}, E = R(f), D = `${m}-true`, O = S.getAttribute(ma) === "true", k = !O && U(E, D);
|
|
3727
|
+
if (!O) {
|
|
3728
|
+
let { decorator: e, bars: n } = d();
|
|
3729
|
+
za({
|
|
3730
|
+
scope: S,
|
|
3731
|
+
decorator: e,
|
|
3732
|
+
bars: n ?? []
|
|
3733
|
+
}, E, D, t);
|
|
3734
|
+
}
|
|
3735
|
+
k && P() && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || ua() < ka) && (w = Ma());
|
|
3736
|
+
let ee = `${m}-false`, A = U(E, ee) ? V(E, ee) : null, te = [];
|
|
3737
|
+
for (let e of wa(S, m)) {
|
|
3738
|
+
let t = B.get(e.getAttribute(ya)), n = `${m}-${e.getAttribute("data-flemo-active")}`, r = t && U(t, n) ? V(t, n) : null;
|
|
3739
|
+
r && te.push({
|
|
2646
3740
|
element: e,
|
|
2647
3741
|
motion: r
|
|
2648
3742
|
});
|
|
2649
3743
|
}
|
|
2650
|
-
let
|
|
2651
|
-
for (let { motion: e } of
|
|
2652
|
-
|
|
2653
|
-
|
|
2654
|
-
|
|
2655
|
-
|
|
2656
|
-
|
|
2657
|
-
let
|
|
3744
|
+
let j = A ? (A.delay + A.duration) * 1e3 : 0;
|
|
3745
|
+
for (let { motion: e } of te) j = Math.max(j, (e.delay + e.duration) * 1e3);
|
|
3746
|
+
let M = [];
|
|
3747
|
+
{
|
|
3748
|
+
let e = E.decoratorName ? z.get(E.decoratorName) : void 0;
|
|
3749
|
+
if (e) for (let t of [`${m}-true`, `${m}-false`]) {
|
|
3750
|
+
if (!U(e, t)) continue;
|
|
3751
|
+
let n = V(e, t);
|
|
3752
|
+
n && (M.push(n), j = Math.max(j, (n.delay + n.duration) * 1e3));
|
|
3753
|
+
}
|
|
3754
|
+
}
|
|
3755
|
+
if (!k) {
|
|
3756
|
+
if (!O && j > 0) {
|
|
3757
|
+
if (!g) return C && s.markGateHeld(C), $;
|
|
3758
|
+
let e = j + 50;
|
|
3759
|
+
C && s.anchorGate(C, e + va);
|
|
3760
|
+
let t = setTimeout(T, e);
|
|
2658
3761
|
return () => clearTimeout(t);
|
|
2659
3762
|
}
|
|
2660
|
-
return queueMicrotask(
|
|
2661
|
-
}
|
|
2662
|
-
let
|
|
2663
|
-
if (
|
|
2664
|
-
let e = (
|
|
2665
|
-
s.anchorGate(
|
|
2666
|
-
} else s.markGateHeld(
|
|
2667
|
-
let
|
|
2668
|
-
|
|
2669
|
-
|
|
2670
|
-
|
|
2671
|
-
|
|
3763
|
+
return queueMicrotask(T), $;
|
|
3764
|
+
}
|
|
3765
|
+
let N = V(E, D);
|
|
3766
|
+
if (C) if (g) {
|
|
3767
|
+
let e = (N.delay + N.duration) * 1e3;
|
|
3768
|
+
s.anchorGate(C, Math.max(e, j) + va);
|
|
3769
|
+
} else s.markGateHeld(C);
|
|
3770
|
+
let ne = !O && !!N, re = E.driver === "native" && !P(), ie = !P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Ve(), ae = P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ve(), oe = !P() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Oa(m), se = ie || ae || oe, ce = null;
|
|
3771
|
+
ne && !P() && !re && !ie && !oe && (ce = Ci(S, () => [S.ownerDocument.documentElement], () => ba.get(S)?.(), !1));
|
|
3772
|
+
let le = se ? wn[m] ?? 0 : 0, ue = ie && (m === "PUSHING" || m === "POPPING");
|
|
3773
|
+
{
|
|
3774
|
+
let e = S.ownerDocument.documentElement;
|
|
3775
|
+
se ? e.setAttribute("data-flemo-lpm", "true") : e.removeAttribute("data-flemo-lpm");
|
|
3776
|
+
}
|
|
3777
|
+
let de = null;
|
|
3778
|
+
ne && re && (de = gi(S, () => [S.ownerDocument.documentElement], () => ba.get(S)?.()));
|
|
3779
|
+
let fe = _n("screen", f, D), pe, me = () => {
|
|
3780
|
+
pe !== void 0 && (clearTimeout(pe), pe = void 0);
|
|
3781
|
+
}, he = 0, ge, _e = [], be, xe = () => {
|
|
3782
|
+
_e.forEach((e) => cancelAnimationFrame(e)), _e = [], be !== void 0 && clearTimeout(be), be = void 0;
|
|
3783
|
+
}, Se = () => {
|
|
2672
3784
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
2673
3785
|
shields exotic embedders. */
|
|
2674
3786
|
if (typeof requestAnimationFrame != "function") {
|
|
2675
|
-
|
|
3787
|
+
T();
|
|
2676
3788
|
return;
|
|
2677
3789
|
}
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
},
|
|
3790
|
+
be = setTimeout(() => {
|
|
3791
|
+
xe(), T();
|
|
3792
|
+
}, _a);
|
|
2681
3793
|
let e = (t) => {
|
|
2682
3794
|
if (t <= 0) {
|
|
2683
|
-
|
|
3795
|
+
xe(), T();
|
|
2684
3796
|
return;
|
|
2685
3797
|
}
|
|
2686
|
-
|
|
3798
|
+
_e.push(requestAnimationFrame(() => e(t - 1)));
|
|
2687
3799
|
};
|
|
2688
|
-
e(
|
|
2689
|
-
},
|
|
2690
|
-
if (
|
|
2691
|
-
|
|
3800
|
+
e(ga);
|
|
3801
|
+
}, Ce = () => {
|
|
3802
|
+
if (he <= 0) {
|
|
3803
|
+
Se();
|
|
2692
3804
|
return;
|
|
2693
3805
|
}
|
|
2694
|
-
|
|
2695
|
-
},
|
|
2696
|
-
e.target ===
|
|
3806
|
+
ge = setTimeout(Se, he);
|
|
3807
|
+
}, we = $, Te = $, Ee = $, De = (e) => {
|
|
3808
|
+
e.target === S && (e.animationName === fe || e.animationName === `${fe}-lpm`) && (S.removeEventListener("animationend", De), me(), we(), Ce());
|
|
2697
3809
|
};
|
|
2698
|
-
|
|
2699
|
-
let
|
|
2700
|
-
|
|
2701
|
-
let
|
|
2702
|
-
element:
|
|
2703
|
-
expectedName:
|
|
2704
|
-
motion:
|
|
2705
|
-
|
|
2706
|
-
|
|
3810
|
+
S.addEventListener("animationend", De);
|
|
3811
|
+
let Oe = ne && g ? b(D, "active", Se) : null, ke = (N.delay + N.duration) * 1e3, Ae = Math.max(ke, j) + 1500, je = C ? setTimeout(() => void s.resolveTask(C), Ae) : void 0;
|
|
3812
|
+
he = Math.max(0, j - ke);
|
|
3813
|
+
let Me = ke * 1 + le + 250, Ne = () => C !== null && e.getTransitionTaskId() === C && S.isConnected && S.getAttribute("data-flemo-skip-animation") !== "true" && U(E, D), Pe = Ua({
|
|
3814
|
+
element: S,
|
|
3815
|
+
expectedName: fe,
|
|
3816
|
+
motion: N,
|
|
3817
|
+
writer: t,
|
|
3818
|
+
isLive: Ne,
|
|
3819
|
+
budgetUsed: () => n.get(C) ?? 0,
|
|
2707
3820
|
spendBudget: () => {
|
|
2708
|
-
|
|
3821
|
+
Te(), Ee(), n.set(C, (n.get(C) ?? 0) + 1);
|
|
2709
3822
|
},
|
|
2710
|
-
onTerminal:
|
|
3823
|
+
onTerminal: T
|
|
2711
3824
|
});
|
|
2712
|
-
|
|
2713
|
-
let
|
|
2714
|
-
|
|
2715
|
-
},
|
|
2716
|
-
if (
|
|
2717
|
-
|
|
3825
|
+
we = Pe.detach;
|
|
3826
|
+
let Fe = !1, F = () => {
|
|
3827
|
+
me(), pe = setTimeout(Ie, Me);
|
|
3828
|
+
}, Ie = () => {
|
|
3829
|
+
if (me(), Ne() && !Fe) {
|
|
3830
|
+
Fe = !0, Te(), Ee(), Pe.fullRestart(), F();
|
|
2718
3831
|
return;
|
|
2719
3832
|
}
|
|
2720
|
-
|
|
2721
|
-
},
|
|
2722
|
-
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2726
|
-
|
|
3833
|
+
T();
|
|
3834
|
+
}, I = !Oe && g, Le = I ? x(S, D) : [];
|
|
3835
|
+
I && (Pe.attach(), C && F()), I && (re || ie) && ba.set(S, () => {
|
|
3836
|
+
Te(), Ee(), C && pe !== void 0 && F();
|
|
3837
|
+
});
|
|
3838
|
+
let Re = I && re ? xi(() => [S.ownerDocument.documentElement], () => {
|
|
3839
|
+
Te(), Ee(), C && pe !== void 0 && F();
|
|
3840
|
+
}) : null, ze, Be = () => {
|
|
3841
|
+
ze !== void 0 && (clearTimeout(ze), ze = void 0);
|
|
2727
3842
|
};
|
|
2728
|
-
if (
|
|
2729
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
2730
|
-
for (let { element: t, motion: n } of
|
|
2731
|
-
let i =
|
|
3843
|
+
if (Te = Be, I && C && !ue && !oe) {
|
|
3844
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = X(N, S, e), n = A ? X(A, S, e) : 0, r = 0;
|
|
3845
|
+
for (let { element: t, motion: n } of te) {
|
|
3846
|
+
let i = X(n, t, e);
|
|
2732
3847
|
if (i === null) {
|
|
2733
3848
|
r = null;
|
|
2734
3849
|
break;
|
|
2735
3850
|
}
|
|
2736
3851
|
r = Math.max(r, i);
|
|
2737
3852
|
}
|
|
2738
|
-
let i =
|
|
2739
|
-
|
|
2740
|
-
|
|
2741
|
-
|
|
3853
|
+
let i = 0;
|
|
3854
|
+
if (M.length > 0) {
|
|
3855
|
+
let t = d().decorator;
|
|
3856
|
+
if (t) for (let n of M) {
|
|
3857
|
+
let r = X(n, t, e);
|
|
3858
|
+
if (r === null) {
|
|
3859
|
+
i = null;
|
|
3860
|
+
break;
|
|
3861
|
+
}
|
|
3862
|
+
i = Math.max(i, r);
|
|
3863
|
+
}
|
|
3864
|
+
}
|
|
3865
|
+
let a = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3866
|
+
a !== null && a + 17 < ke + he && (ze = setTimeout(() => {
|
|
3867
|
+
ze = void 0, Ne() && (S.removeEventListener("animationend", De), me(), we(), Se());
|
|
3868
|
+
}, a * 1 + 17 + le));
|
|
2742
3869
|
}
|
|
2743
|
-
let
|
|
2744
|
-
|
|
3870
|
+
let Ue, We = () => {
|
|
3871
|
+
Ue !== void 0 && (clearTimeout(Ue), Ue = void 0);
|
|
2745
3872
|
};
|
|
2746
|
-
if (
|
|
2747
|
-
let e =
|
|
2748
|
-
for (let { element: e, motion: t } of
|
|
2749
|
-
let
|
|
2750
|
-
if (
|
|
2751
|
-
|
|
3873
|
+
if (Ee = We, I && r && !ue && !oe && !nt()) {
|
|
3874
|
+
let e = X(N, S, 1), t = A ? X(A, S, 1) : 0, n = 0;
|
|
3875
|
+
for (let { element: e, motion: t } of te) {
|
|
3876
|
+
let r = X(t, e, 1);
|
|
3877
|
+
if (r === null) {
|
|
3878
|
+
n = null;
|
|
2752
3879
|
break;
|
|
2753
3880
|
}
|
|
2754
|
-
|
|
3881
|
+
n = Math.max(n, r);
|
|
3882
|
+
}
|
|
3883
|
+
let i = 0;
|
|
3884
|
+
if (M.length > 0) {
|
|
3885
|
+
let e = d().decorator;
|
|
3886
|
+
if (e) for (let t of M) {
|
|
3887
|
+
let n = X(t, e, 1);
|
|
3888
|
+
if (n === null) {
|
|
3889
|
+
i = null;
|
|
3890
|
+
break;
|
|
3891
|
+
}
|
|
3892
|
+
i = Math.max(i, n);
|
|
3893
|
+
}
|
|
2755
3894
|
}
|
|
2756
|
-
let
|
|
2757
|
-
|
|
2758
|
-
|
|
2759
|
-
let e =
|
|
2760
|
-
e && (
|
|
2761
|
-
},
|
|
3895
|
+
let a = e !== null && t !== null && n !== null && i !== null ? Math.max(e, t, n, i) : null;
|
|
3896
|
+
a !== null && (Ue = setTimeout(() => {
|
|
3897
|
+
Ue = void 0;
|
|
3898
|
+
let e = r;
|
|
3899
|
+
e && (r = null, e());
|
|
3900
|
+
}, a * 1 + le));
|
|
2762
3901
|
}
|
|
2763
3902
|
return () => {
|
|
2764
|
-
if (
|
|
2765
|
-
|
|
2766
|
-
for (let e of
|
|
3903
|
+
if (w(), je !== void 0 && clearTimeout(je), ge !== void 0 && clearTimeout(ge), xe(), de?.(), ce?.(), Re?.(), Be(), We(), S.removeEventListener("animationend", De), I) {
|
|
3904
|
+
Pe.detach();
|
|
3905
|
+
for (let e of Le) e();
|
|
2767
3906
|
}
|
|
2768
|
-
|
|
3907
|
+
me(), Oe?.(), C && e.getTransitionTaskId() !== C && n.delete(C);
|
|
2769
3908
|
};
|
|
2770
3909
|
},
|
|
2771
|
-
activeResumeEntryCount: () =>
|
|
3910
|
+
activeResumeEntryCount: () => n.size
|
|
2772
3911
|
};
|
|
2773
3912
|
}
|
|
2774
3913
|
//#endregion
|
|
2775
3914
|
//#region src/utils/findScrollable.ts
|
|
2776
|
-
function
|
|
2777
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3915
|
+
function Ga(e, t) {
|
|
3916
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Ka(e);
|
|
2778
3917
|
if (!o) return {
|
|
2779
3918
|
element: null,
|
|
2780
3919
|
hasMarker: !1
|
|
2781
3920
|
};
|
|
2782
3921
|
let s = o.closest?.(r);
|
|
2783
|
-
if (s instanceof HTMLElement &&
|
|
3922
|
+
if (s instanceof HTMLElement && qa(s, n) && (!a || Ja(s, n))) return {
|
|
2784
3923
|
element: s,
|
|
2785
3924
|
hasMarker: !0
|
|
2786
3925
|
};
|
|
2787
3926
|
let c = o, l = 0;
|
|
2788
3927
|
for (; c && l < i;) {
|
|
2789
|
-
if (
|
|
3928
|
+
if (qa(c, n) && (!a || Ja(c, n))) return {
|
|
2790
3929
|
element: c,
|
|
2791
3930
|
hasMarker: !1
|
|
2792
3931
|
};
|
|
@@ -2797,7 +3936,7 @@ function Kn(e, t) {
|
|
|
2797
3936
|
hasMarker: !1
|
|
2798
3937
|
};
|
|
2799
3938
|
}
|
|
2800
|
-
function
|
|
3939
|
+
function Ka(e) {
|
|
2801
3940
|
if (!e) return null;
|
|
2802
3941
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
2803
3942
|
if (n && n.length) {
|
|
@@ -2805,262 +3944,315 @@ function qn(e) {
|
|
|
2805
3944
|
}
|
|
2806
3945
|
return e instanceof HTMLElement ? e : null;
|
|
2807
3946
|
}
|
|
2808
|
-
function
|
|
3947
|
+
function qa(e, t) {
|
|
2809
3948
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
2810
3949
|
}
|
|
2811
|
-
function
|
|
2812
|
-
if (!
|
|
3950
|
+
function Ja(e, t) {
|
|
3951
|
+
if (!qa(e, t) || typeof window > "u") return !1;
|
|
2813
3952
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
2814
3953
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
2815
3954
|
}
|
|
2816
3955
|
//#endregion
|
|
3956
|
+
//#region src/screen/computeBarRiding.ts
|
|
3957
|
+
function Ya(e, t) {
|
|
3958
|
+
return !!e && !!t && e.id === t.id;
|
|
3959
|
+
}
|
|
3960
|
+
function Xa(e) {
|
|
3961
|
+
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3962
|
+
app: !1,
|
|
3963
|
+
nav: !1
|
|
3964
|
+
};
|
|
3965
|
+
let t = e.hasTopBar ? { id: e.topBarId } : void 0, n = e.hasNavBar ? { id: e.bottomBarId } : void 0, r = e.partnerMetadata?.topBar ?? (e.partnerBars?.topBar ? {} : void 0), i = e.partnerMetadata?.bottomBar ?? (e.partnerBars?.bottomBar ? {} : void 0);
|
|
3966
|
+
return {
|
|
3967
|
+
app: e.hasTopBar && !Ya(t, r),
|
|
3968
|
+
nav: e.hasNavBar && !Ya(n, i)
|
|
3969
|
+
};
|
|
3970
|
+
}
|
|
3971
|
+
//#endregion
|
|
2817
3972
|
//#region src/core/engine/createSwipeController.ts
|
|
2818
|
-
var
|
|
2819
|
-
function
|
|
2820
|
-
let t =
|
|
3973
|
+
var Za = "data-flemo-skip-animation";
|
|
3974
|
+
function Qa(e) {
|
|
3975
|
+
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
2821
3976
|
current: [],
|
|
2822
3977
|
prev: []
|
|
2823
|
-
},
|
|
3978
|
+
}, a = {
|
|
2824
3979
|
current: [],
|
|
2825
3980
|
prev: []
|
|
2826
|
-
},
|
|
3981
|
+
}, o = !1, s = !1, c = !1, l = null, u = null, d = !1, f = {
|
|
2827
3982
|
x: 0,
|
|
2828
3983
|
y: 0
|
|
2829
|
-
},
|
|
3984
|
+
}, p = {
|
|
2830
3985
|
x: 0,
|
|
2831
3986
|
y: 0
|
|
2832
|
-
},
|
|
3987
|
+
}, m = 0, h = {
|
|
2833
3988
|
x: 0,
|
|
2834
3989
|
y: 0
|
|
2835
|
-
},
|
|
3990
|
+
}, g = {
|
|
2836
3991
|
element: null,
|
|
2837
3992
|
hasMarker: !1
|
|
2838
|
-
},
|
|
3993
|
+
}, _ = {
|
|
2839
3994
|
element: null,
|
|
2840
3995
|
hasMarker: !1
|
|
2841
|
-
},
|
|
3996
|
+
}, v = 0, y = 0, b = (e) => ({
|
|
2842
3997
|
point: {
|
|
2843
3998
|
x: e.clientX,
|
|
2844
3999
|
y: e.clientY
|
|
2845
4000
|
},
|
|
2846
4001
|
offset: {
|
|
2847
|
-
x: e.clientX -
|
|
2848
|
-
y: e.clientY -
|
|
4002
|
+
x: e.clientX - f.x,
|
|
4003
|
+
y: e.clientY - f.y
|
|
2849
4004
|
},
|
|
2850
4005
|
delta: {
|
|
2851
|
-
x: e.clientX -
|
|
2852
|
-
y: e.clientY -
|
|
4006
|
+
x: e.clientX - p.x,
|
|
4007
|
+
y: e.clientY - p.y
|
|
2853
4008
|
},
|
|
2854
|
-
velocity:
|
|
2855
|
-
}),
|
|
2856
|
-
let
|
|
2857
|
-
|
|
2858
|
-
|
|
2859
|
-
|
|
2860
|
-
|
|
4009
|
+
velocity: h
|
|
4010
|
+
}), x = 0, S = (t) => {
|
|
4011
|
+
let { scope: n } = e.getElements();
|
|
4012
|
+
n?.hasPointerCapture(t.pointerId) && n.releasePointerCapture(t.pointerId);
|
|
4013
|
+
}, C = (e) => {
|
|
4014
|
+
let t = e.timeStamp, n = Math.max(1, t - m);
|
|
4015
|
+
h = {
|
|
4016
|
+
x: (e.clientX - p.x) / n * 1e3,
|
|
4017
|
+
y: (e.clientY - p.y) / n * 1e3
|
|
4018
|
+
}, p = {
|
|
2861
4019
|
x: e.clientX,
|
|
2862
4020
|
y: e.clientY
|
|
2863
|
-
},
|
|
2864
|
-
},
|
|
2865
|
-
let
|
|
2866
|
-
if (
|
|
2867
|
-
else if (
|
|
2868
|
-
return
|
|
2869
|
-
},
|
|
2870
|
-
let
|
|
2871
|
-
|
|
2872
|
-
|
|
2873
|
-
|
|
2874
|
-
|
|
2875
|
-
|
|
2876
|
-
|
|
2877
|
-
|
|
2878
|
-
current:
|
|
2879
|
-
prev:
|
|
4021
|
+
}, m = t, x = Math.max(x, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
4022
|
+
}, w = (r, a, o) => {
|
|
4023
|
+
let s = Vn(r, a, o, t);
|
|
4024
|
+
if (r === e.getElements().scope) for (let e of i.current) Vn(e, a, o, t);
|
|
4025
|
+
else if (r === n) for (let e of i.prev) Vn(e, a, o, t);
|
|
4026
|
+
return s;
|
|
4027
|
+
}, T = (n) => {
|
|
4028
|
+
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = n?.querySelector("[data-flemo-bar=\"app\"]"), s = n?.querySelector("[data-flemo-bar=\"nav\"]"), c = (e) => {
|
|
4029
|
+
if (!e) return;
|
|
4030
|
+
let t = e.getAttribute("data-flemo-bar-id");
|
|
4031
|
+
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
4032
|
+
}, l = e.hasSharedTopBar() ? { id: e.getSharedTopBarId?.() } : void 0, u = e.hasSharedBottomBar() ? { id: e.getSharedBottomBarId?.() } : void 0, d = a?.topBar ?? (r?.topBar ? {} : c(o)), f = a?.bottomBar ?? (r?.bottomBar ? {} : c(s)), p = [], { sharedTopBar: m, sharedBottomBar: h } = e.getElements();
|
|
4033
|
+
m && l && !Ya(l, d) && p.push(m), h && u && !Ya(u, f) && p.push(h);
|
|
4034
|
+
let g = [];
|
|
4035
|
+
n && (o && d && !Ya(d, l) && g.push(o), s && f && !Ya(f, u) && g.push(s)), i = {
|
|
4036
|
+
current: p,
|
|
4037
|
+
prev: g
|
|
2880
4038
|
};
|
|
2881
|
-
let
|
|
2882
|
-
for (let
|
|
2883
|
-
|
|
2884
|
-
|
|
2885
|
-
for (let e of
|
|
2886
|
-
|
|
2887
|
-
r = {
|
|
4039
|
+
for (let n of p) ai(n, e.getTransition(), !1, t);
|
|
4040
|
+
for (let n of g) ai(n, e.getTransition(), !1, t);
|
|
4041
|
+
}, E = () => {
|
|
4042
|
+
for (let e of i.current) G(e, void 0, t), oi(e, t);
|
|
4043
|
+
for (let e of i.prev) G(e, void 0, t), oi(e, t);
|
|
4044
|
+
i = {
|
|
2888
4045
|
current: [],
|
|
2889
4046
|
prev: []
|
|
2890
4047
|
};
|
|
2891
|
-
},
|
|
4048
|
+
}, D = (t) => {
|
|
2892
4049
|
let { screenContainer: n } = e.getElements(), r = (e) => Array.from(e.querySelectorAll("[data-flemo-part-name]"));
|
|
2893
|
-
|
|
4050
|
+
a = {
|
|
2894
4051
|
current: r(n),
|
|
2895
4052
|
prev: r(t)
|
|
2896
4053
|
};
|
|
2897
|
-
},
|
|
2898
|
-
let
|
|
2899
|
-
let
|
|
2900
|
-
if (!
|
|
2901
|
-
let
|
|
2902
|
-
animate:
|
|
2903
|
-
element:
|
|
2904
|
-
active:
|
|
4054
|
+
}, O = (e, n, r) => {
|
|
4055
|
+
let i = (i, a) => {
|
|
4056
|
+
let o = B.get(i.getAttribute("data-flemo-part-name"));
|
|
4057
|
+
if (!o) return;
|
|
4058
|
+
let s = {
|
|
4059
|
+
animate: (e, n, r) => Vn(e, n, r, t),
|
|
4060
|
+
element: i,
|
|
4061
|
+
active: a
|
|
2905
4062
|
};
|
|
2906
|
-
e === "swipe" ?
|
|
4063
|
+
e === "swipe" ? o.onSwipe?.(n, r, s) : e === "start" ? o.onSwipeStart?.(n, s) : o.onSwipeEnd?.(n, s);
|
|
2907
4064
|
};
|
|
2908
|
-
for (let e of
|
|
2909
|
-
for (let e of
|
|
2910
|
-
},
|
|
2911
|
-
for (let e of [...
|
|
2912
|
-
|
|
4065
|
+
for (let e of a.current) i(e, !0);
|
|
4066
|
+
for (let e of a.prev) i(e, !1);
|
|
4067
|
+
}, k = () => {
|
|
4068
|
+
for (let e of [...a.current, ...a.prev]) G(e, void 0, t);
|
|
4069
|
+
a = {
|
|
2913
4070
|
current: [],
|
|
2914
4071
|
prev: []
|
|
2915
4072
|
};
|
|
2916
|
-
},
|
|
4073
|
+
}, ee = async (t) => {
|
|
2917
4074
|
let i = e.getTransition();
|
|
2918
|
-
if (!i.swipeDirection || e.getViewportScrollHeight() > 10)
|
|
2919
|
-
|
|
2920
|
-
|
|
2921
|
-
|
|
2922
|
-
|
|
2923
|
-
|
|
2924
|
-
|
|
2925
|
-
|
|
2926
|
-
}
|
|
2927
|
-
|
|
2928
|
-
|
|
2929
|
-
|
|
4075
|
+
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
4076
|
+
s = !1;
|
|
4077
|
+
return;
|
|
4078
|
+
}
|
|
4079
|
+
let { scope: a, screenContainer: o, decorator: l } = e.getElements();
|
|
4080
|
+
if (!a) {
|
|
4081
|
+
s = !1;
|
|
4082
|
+
return;
|
|
4083
|
+
}
|
|
4084
|
+
let u = o?.previousElementSibling ?? null;
|
|
4085
|
+
if (n = u?.querySelector("[data-flemo-screen]") ?? null, r = u?.querySelector("[data-flemo-decorator]") ?? null, !n) {
|
|
4086
|
+
s = !1;
|
|
4087
|
+
return;
|
|
4088
|
+
}
|
|
4089
|
+
c = !0, x = 0, f = {
|
|
4090
|
+
x: t.clientX,
|
|
4091
|
+
y: t.clientY
|
|
4092
|
+
}, p = {
|
|
4093
|
+
x: t.clientX,
|
|
4094
|
+
y: t.clientY
|
|
4095
|
+
}, m = t.timeStamp, h = {
|
|
2930
4096
|
x: 0,
|
|
2931
4097
|
y: 0
|
|
2932
|
-
}, a.setPointerCapture(
|
|
2933
|
-
let
|
|
2934
|
-
|
|
2935
|
-
animate: v,
|
|
4098
|
+
}, a.setPointerCapture(t.pointerId), T(u), D(u);
|
|
4099
|
+
let g = e.getDecorator(), _ = await i.onSwipeStart(t, b(t), {
|
|
4100
|
+
animate: w,
|
|
2936
4101
|
currentScreen: a,
|
|
2937
|
-
prevScreen:
|
|
4102
|
+
prevScreen: n,
|
|
2938
4103
|
onStart: (e) => {
|
|
2939
|
-
|
|
2940
|
-
animate:
|
|
2941
|
-
currentDecorator:
|
|
2942
|
-
prevDecorator:
|
|
2943
|
-
}),
|
|
4104
|
+
g?.onSwipeStart?.(e, {
|
|
4105
|
+
animate: Vn,
|
|
4106
|
+
currentDecorator: l,
|
|
4107
|
+
prevDecorator: r
|
|
4108
|
+
}), O("start", e, 0);
|
|
2944
4109
|
}
|
|
2945
|
-
})
|
|
2946
|
-
|
|
4110
|
+
});
|
|
4111
|
+
_ && !d ? e.setDragStatus("PENDING") : _ || (e.setDragStatus("IDLE"), c = !1, s = !1, S(t), E(), k());
|
|
4112
|
+
}, A = (e) => {
|
|
4113
|
+
let t = ee(e);
|
|
4114
|
+
u = t, t.finally(() => {
|
|
4115
|
+
u = null;
|
|
4116
|
+
});
|
|
4117
|
+
}, te = (t) => {
|
|
2947
4118
|
let i = e.getTransition();
|
|
2948
|
-
if (!i.swipeDirection || !
|
|
2949
|
-
|
|
2950
|
-
let { scope: a, decorator: o } = e.getElements(),
|
|
2951
|
-
i.onSwipe(
|
|
2952
|
-
animate:
|
|
4119
|
+
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4120
|
+
C(t);
|
|
4121
|
+
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
4122
|
+
i.onSwipe(t, b(t), {
|
|
4123
|
+
animate: w,
|
|
2953
4124
|
currentScreen: a,
|
|
2954
|
-
prevScreen:
|
|
4125
|
+
prevScreen: n,
|
|
2955
4126
|
onProgress: (e, t) => {
|
|
2956
|
-
|
|
2957
|
-
animate:
|
|
4127
|
+
s?.onSwipe?.(e, t, {
|
|
4128
|
+
animate: Vn,
|
|
2958
4129
|
currentDecorator: o,
|
|
2959
|
-
prevDecorator:
|
|
2960
|
-
}),
|
|
4130
|
+
prevDecorator: r
|
|
4131
|
+
}), O("swipe", e, t);
|
|
2961
4132
|
}
|
|
2962
4133
|
});
|
|
2963
|
-
},
|
|
2964
|
-
|
|
2965
|
-
|
|
2966
|
-
|
|
2967
|
-
|
|
2968
|
-
|
|
2969
|
-
|
|
2970
|
-
|
|
2971
|
-
|
|
2972
|
-
|
|
2973
|
-
|
|
4134
|
+
}, j = async (o, s = !1) => {
|
|
4135
|
+
u && await u;
|
|
4136
|
+
let l = e.getTransition();
|
|
4137
|
+
if (!l.swipeDirection || !c) return;
|
|
4138
|
+
c = !1;
|
|
4139
|
+
let { scope: d, decorator: f } = e.getElements();
|
|
4140
|
+
S(o);
|
|
4141
|
+
let p = e.getDecorator(), m = s || x < 6 ? (e, t, n) => w(e, t, {
|
|
4142
|
+
...n,
|
|
4143
|
+
duration: 0
|
|
4144
|
+
}) : w, h = s ? {
|
|
4145
|
+
point: {
|
|
4146
|
+
x: o.clientX,
|
|
4147
|
+
y: o.clientY
|
|
4148
|
+
},
|
|
4149
|
+
offset: {
|
|
4150
|
+
x: 0,
|
|
4151
|
+
y: 0
|
|
4152
|
+
},
|
|
4153
|
+
delta: {
|
|
4154
|
+
x: 0,
|
|
4155
|
+
y: 0
|
|
4156
|
+
},
|
|
4157
|
+
velocity: {
|
|
4158
|
+
x: 0,
|
|
4159
|
+
y: 0
|
|
4160
|
+
}
|
|
4161
|
+
} : b(o), g = await l.onSwipeEnd(o, h, {
|
|
4162
|
+
animate: m,
|
|
4163
|
+
currentScreen: d,
|
|
4164
|
+
prevScreen: n,
|
|
2974
4165
|
onStart: (e) => {
|
|
2975
|
-
|
|
2976
|
-
|
|
2977
|
-
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
4166
|
+
let t = !s && e;
|
|
4167
|
+
p?.onSwipeEnd?.(t, {
|
|
4168
|
+
animate: Vn,
|
|
4169
|
+
currentDecorator: f,
|
|
4170
|
+
prevDecorator: r
|
|
4171
|
+
}), O("end", t, 0);
|
|
4172
|
+
}
|
|
4173
|
+
});
|
|
4174
|
+
if (!s && g) {
|
|
4175
|
+
d?.setAttribute(Za, "true"), f?.setAttribute(Za, "true");
|
|
4176
|
+
for (let e of i.current) oi(e, t);
|
|
4177
|
+
for (let e of i.prev) G(e, void 0, t), oi(e, t);
|
|
4178
|
+
i = {
|
|
2986
4179
|
current: [],
|
|
2987
4180
|
prev: []
|
|
2988
|
-
},
|
|
4181
|
+
}, a = {
|
|
2989
4182
|
current: [],
|
|
2990
4183
|
prev: []
|
|
2991
4184
|
}, e.back();
|
|
2992
|
-
} else
|
|
4185
|
+
} else d && G(d, void 0, t), n && G(n, void 0, t), f && G(f), r && G(r), E(), k(), e.setDragStatus("IDLE");
|
|
2993
4186
|
};
|
|
2994
4187
|
return {
|
|
2995
4188
|
pointerDown: (t) => {
|
|
2996
|
-
e.isReadyForDrag() && (
|
|
4189
|
+
!e.isReadyForDrag() || c || t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || (l = t.pointerId, d = !1, o = !0, s = !1, g = Ga(t.target, {
|
|
2997
4190
|
direction: "x",
|
|
2998
4191
|
verifyByScroll: !0
|
|
2999
|
-
}),
|
|
4192
|
+
}), _ = Ga(t.target, {
|
|
3000
4193
|
direction: "y",
|
|
3001
4194
|
verifyByScroll: !0
|
|
3002
|
-
}),
|
|
4195
|
+
}), v = t.clientX, y = t.clientY);
|
|
3003
4196
|
},
|
|
3004
4197
|
pointerMove: (t) => {
|
|
3005
|
-
if (e.getViewportScrollHeight() > 10) return;
|
|
3006
|
-
if (
|
|
3007
|
-
|
|
4198
|
+
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4199
|
+
if (c) {
|
|
4200
|
+
te(t);
|
|
3008
4201
|
return;
|
|
3009
4202
|
}
|
|
3010
|
-
|
|
3011
|
-
if (
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
|
|
4203
|
+
if (!o) return;
|
|
4204
|
+
if (!e.isReadyForDrag()) {
|
|
4205
|
+
o = !1;
|
|
4206
|
+
return;
|
|
4207
|
+
}
|
|
4208
|
+
let n = e.getTransition().swipeDirection;
|
|
4209
|
+
if (!n) {
|
|
4210
|
+
o = !1;
|
|
4211
|
+
return;
|
|
4212
|
+
}
|
|
4213
|
+
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4214
|
+
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, A(t);
|
|
4215
|
+
else {
|
|
4216
|
+
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4217
|
+
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, A(t));
|
|
3018
4218
|
}
|
|
3019
4219
|
},
|
|
3020
4220
|
pointerUp: (e) => {
|
|
3021
|
-
|
|
4221
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && j(e));
|
|
3022
4222
|
},
|
|
3023
|
-
|
|
3024
|
-
|
|
3025
|
-
}
|
|
3026
|
-
|
|
3027
|
-
//#region src/screen/computeBarRiding.ts
|
|
3028
|
-
function Qn(e) {
|
|
3029
|
-
return !(e.status === "PUSHING" || e.status === "POPPING" || e.status === "REPLACING") || !e.isTopOrTopPrev ? {
|
|
3030
|
-
app: !1,
|
|
3031
|
-
nav: !1
|
|
3032
|
-
} : {
|
|
3033
|
-
app: e.hasTopBar && !e.partnerBars?.topBar,
|
|
3034
|
-
nav: e.hasNavBar && !e.partnerBars?.bottomBar
|
|
4223
|
+
pointerCancel: (e) => {
|
|
4224
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && j(e, !0));
|
|
4225
|
+
},
|
|
4226
|
+
shouldPreventTouch: () => s
|
|
3035
4227
|
};
|
|
3036
4228
|
}
|
|
3037
4229
|
//#endregion
|
|
3038
4230
|
//#region src/screen/pendingNetwork.ts
|
|
3039
|
-
var $
|
|
3040
|
-
$
|
|
3041
|
-
},
|
|
3042
|
-
if (!(
|
|
3043
|
-
if (
|
|
4231
|
+
var $a = 0, eo = !1, to = () => {
|
|
4232
|
+
$a = Math.max(0, $a - 1);
|
|
4233
|
+
}, no = () => {
|
|
4234
|
+
if (!(eo || typeof window > "u")) {
|
|
4235
|
+
if (eo = !0, typeof window.fetch == "function") {
|
|
3044
4236
|
let e = window.fetch.bind(window);
|
|
3045
4237
|
window.fetch = (...t) => {
|
|
3046
|
-
$
|
|
4238
|
+
$a += 1;
|
|
3047
4239
|
let n;
|
|
3048
4240
|
try {
|
|
3049
4241
|
n = e(...t);
|
|
3050
4242
|
} catch (e) {
|
|
3051
|
-
throw
|
|
4243
|
+
throw to(), e;
|
|
3052
4244
|
}
|
|
3053
|
-
return n.then((e) => (
|
|
3054
|
-
throw
|
|
4245
|
+
return n.then((e) => (to(), e), (e) => {
|
|
4246
|
+
throw to(), e;
|
|
3055
4247
|
});
|
|
3056
4248
|
};
|
|
3057
4249
|
}
|
|
3058
4250
|
if (typeof XMLHttpRequest == "function") {
|
|
3059
4251
|
let e = XMLHttpRequest.prototype.send;
|
|
3060
4252
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
3061
|
-
$
|
|
4253
|
+
$a += 1;
|
|
3062
4254
|
let n = !1, r = () => {
|
|
3063
|
-
n || (n = !0,
|
|
4255
|
+
n || (n = !0, to());
|
|
3064
4256
|
};
|
|
3065
4257
|
this.addEventListener("loadend", r);
|
|
3066
4258
|
try {
|
|
@@ -3071,28 +4263,28 @@ var $n = 0, er = !1, tr = () => {
|
|
|
3071
4263
|
};
|
|
3072
4264
|
}
|
|
3073
4265
|
}
|
|
3074
|
-
},
|
|
4266
|
+
}, ro = () => (no(), $a > 0);
|
|
3075
4267
|
//#endregion
|
|
3076
4268
|
//#region src/screen/animStartAnchor.ts
|
|
3077
|
-
function
|
|
3078
|
-
return
|
|
4269
|
+
function io(e) {
|
|
4270
|
+
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
3079
4271
|
}
|
|
3080
|
-
var
|
|
3081
|
-
function
|
|
3082
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4272
|
+
var ao = 300, oo = 20;
|
|
4273
|
+
function so(e) {
|
|
4274
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, oo);
|
|
3083
4275
|
}
|
|
3084
|
-
function
|
|
3085
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4276
|
+
function co(e) {
|
|
4277
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of so(e)) t.decode().catch(() => {});
|
|
3086
4278
|
}
|
|
3087
|
-
var
|
|
4279
|
+
var lo = 3, uo = 40, fo = (e) => {
|
|
3088
4280
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
3089
|
-
let t = e.querySelectorAll("*").length;
|
|
4281
|
+
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
3090
4282
|
/* v8 ignore stop */
|
|
3091
|
-
return
|
|
3092
|
-
},
|
|
4283
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * uo) / t < lo;
|
|
4284
|
+
}, po = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
3093
4285
|
let t = e.animationName;
|
|
3094
4286
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
3095
|
-
}),
|
|
4287
|
+
}), mo = (e) => {
|
|
3096
4288
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
3097
4289
|
which already requires querySelectorAll. */
|
|
3098
4290
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -3100,12 +4292,12 @@ var lr = 3, ur = 40, dr = 24, fr = (e) => {
|
|
|
3100
4292
|
the guard shields exotic embedders. */
|
|
3101
4293
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
3102
4294
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
3103
|
-
if (r >=
|
|
4295
|
+
if (r >= oo) break;
|
|
3104
4296
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
3105
4297
|
}
|
|
3106
4298
|
return !1;
|
|
3107
4299
|
};
|
|
3108
|
-
function
|
|
4300
|
+
function ho(e, t = {}) {
|
|
3109
4301
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
3110
4302
|
if (n) return;
|
|
3111
4303
|
let r = t.scope;
|
|
@@ -3113,7 +4305,7 @@ function hr(e, t = {}) {
|
|
|
3113
4305
|
e();
|
|
3114
4306
|
return;
|
|
3115
4307
|
}
|
|
3116
|
-
let i =
|
|
4308
|
+
let i = so(r);
|
|
3117
4309
|
if (i.length === 0) {
|
|
3118
4310
|
e();
|
|
3119
4311
|
return;
|
|
@@ -3130,59 +4322,81 @@ function hr(e, t = {}) {
|
|
|
3130
4322
|
e();
|
|
3131
4323
|
return;
|
|
3132
4324
|
}
|
|
3133
|
-
|
|
4325
|
+
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4326
|
+
if (!n.renderSettleOnly && !fo(r)) {
|
|
3134
4327
|
e();
|
|
3135
4328
|
return;
|
|
3136
4329
|
}
|
|
3137
4330
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
3138
4331
|
the fallback only shields exotic embedders. */
|
|
3139
|
-
let
|
|
3140
|
-
|
|
3141
|
-
},
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
4332
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => fo(r) && po(r), f = () => ro() || mo(r), p = () => {
|
|
4333
|
+
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4334
|
+
}, m = () => n.renderSettleOnly ? 6 : !fo(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4335
|
+
if (!n.renderSettleOnly) {
|
|
4336
|
+
p();
|
|
4337
|
+
return;
|
|
4338
|
+
}
|
|
4339
|
+
if (h || u) return;
|
|
4340
|
+
h = !0;
|
|
4341
|
+
let e = typeof performance < "u" ? performance.now() : null, t = (r) => {
|
|
4342
|
+
if (r <= 0 || s() >= n.capMs) {
|
|
4343
|
+
p();
|
|
4344
|
+
return;
|
|
4345
|
+
}
|
|
4346
|
+
c.push(requestAnimationFrame((n) => {
|
|
4347
|
+
let i = e !== null && n - e > 48;
|
|
4348
|
+
e = n, t(i ? 2 : r - 1);
|
|
4349
|
+
}));
|
|
4350
|
+
};
|
|
4351
|
+
t(2);
|
|
4352
|
+
}, _ = () => {
|
|
4353
|
+
c.forEach((e) => cancelAnimationFrame(e)), c = [];
|
|
4354
|
+
let e = null, t = (r) => {
|
|
4355
|
+
if (r <= 0) {
|
|
4356
|
+
if (i() && s() < n.capMs) {
|
|
4357
|
+
c.push(requestAnimationFrame(() => t(m())));
|
|
3147
4358
|
return;
|
|
3148
4359
|
}
|
|
3149
|
-
|
|
4360
|
+
p();
|
|
3150
4361
|
return;
|
|
3151
4362
|
}
|
|
3152
|
-
|
|
4363
|
+
c.push(requestAnimationFrame((i) => {
|
|
4364
|
+
let a = n.renderSettleOnly && e !== null && i - e > 48 && s() < n.capMs;
|
|
4365
|
+
e = i, t(a ? m() : r - 1);
|
|
4366
|
+
}));
|
|
3153
4367
|
};
|
|
3154
|
-
|
|
3155
|
-
},
|
|
4368
|
+
t(m());
|
|
4369
|
+
}, v = new MutationObserver((e) => {
|
|
3156
4370
|
let t = 0;
|
|
3157
4371
|
for (let n of e) if (n.type === "childList") for (let e of Array.from(n.addedNodes)) t += e instanceof Element ? 1 + e.querySelectorAll("*").length : 1;
|
|
3158
4372
|
if (!(t < n.minNodes)) {
|
|
3159
4373
|
/* v8 ignore start -- the cap timer fires the moment elapsed reaches
|
|
3160
4374
|
capMs, so a delivery can never observe elapsed past the cap first;
|
|
3161
4375
|
kept so a delivery racing the timer can only ever finish early. */
|
|
3162
|
-
if (
|
|
3163
|
-
|
|
4376
|
+
if (l = !0, s() >= n.capMs) {
|
|
4377
|
+
p();
|
|
3164
4378
|
return;
|
|
3165
4379
|
}
|
|
3166
4380
|
/* v8 ignore stop */
|
|
3167
|
-
|
|
4381
|
+
_();
|
|
3168
4382
|
}
|
|
3169
4383
|
});
|
|
3170
|
-
|
|
4384
|
+
v.observe(r, {
|
|
3171
4385
|
childList: !0,
|
|
3172
4386
|
subtree: !0
|
|
3173
4387
|
});
|
|
3174
|
-
let
|
|
3175
|
-
!
|
|
3176
|
-
}, n.graceMs),
|
|
3177
|
-
if (!
|
|
3178
|
-
if ((
|
|
4388
|
+
let y = setTimeout(() => {
|
|
4389
|
+
!l && !i() && g();
|
|
4390
|
+
}, n.graceMs), b = setTimeout(function e() {
|
|
4391
|
+
if (!l) {
|
|
4392
|
+
if (i() && s() < n.capMs) {
|
|
3179
4393
|
setTimeout(e, 100);
|
|
3180
4394
|
return;
|
|
3181
4395
|
}
|
|
3182
|
-
|
|
4396
|
+
g();
|
|
3183
4397
|
}
|
|
3184
|
-
}, n.firstWaitMs),
|
|
3185
|
-
a.push(
|
|
4398
|
+
}, n.firstWaitMs), x = setTimeout(p, n.capMs);
|
|
4399
|
+
a.push(p);
|
|
3186
4400
|
}, c = (e) => {
|
|
3187
4401
|
if (e <= 0) {
|
|
3188
4402
|
s(o);
|
|
@@ -3196,14 +4410,14 @@ function hr(e, t = {}) {
|
|
|
3196
4410
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
3197
4411
|
};
|
|
3198
4412
|
}
|
|
3199
|
-
function
|
|
3200
|
-
let n =
|
|
4413
|
+
function go(e, t = {}) {
|
|
4414
|
+
let n = ho(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
3201
4415
|
return () => {
|
|
3202
4416
|
n(), clearTimeout(i);
|
|
3203
4417
|
};
|
|
3204
4418
|
}
|
|
3205
|
-
var
|
|
3206
|
-
function
|
|
4419
|
+
var _o = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4420
|
+
function vo() {
|
|
3207
4421
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
3208
4422
|
clearTimeout(n.backstop), e.delete(t);
|
|
3209
4423
|
let r = [...n.members];
|
|
@@ -3213,14 +4427,14 @@ function vr() {
|
|
|
3213
4427
|
return { join: (r, i, a) => {
|
|
3214
4428
|
let o = e.get(r);
|
|
3215
4429
|
if (o) {
|
|
3216
|
-
let e =
|
|
4430
|
+
let e = _o(a);
|
|
3217
4431
|
if (e > o.backstopMs) {
|
|
3218
4432
|
clearTimeout(o.backstop);
|
|
3219
4433
|
let n = o;
|
|
3220
4434
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
3221
4435
|
}
|
|
3222
4436
|
} else {
|
|
3223
|
-
let n =
|
|
4437
|
+
let n = _o(a), i = {
|
|
3224
4438
|
members: /* @__PURE__ */ new Set(),
|
|
3225
4439
|
backstop: setTimeout(() => t(r, i), n),
|
|
3226
4440
|
backstopMs: n
|
|
@@ -3230,7 +4444,7 @@ function vr() {
|
|
|
3230
4444
|
let s = o, c = {
|
|
3231
4445
|
release: i,
|
|
3232
4446
|
ready: !1,
|
|
3233
|
-
cancelReadiness:
|
|
4447
|
+
cancelReadiness: ho(() => {
|
|
3234
4448
|
c.ready = !0, n(s) && t(r, s);
|
|
3235
4449
|
}, a)
|
|
3236
4450
|
};
|
|
@@ -3247,7 +4461,7 @@ function vr() {
|
|
|
3247
4461
|
}
|
|
3248
4462
|
//#endregion
|
|
3249
4463
|
//#region src/screen/observeBarHeight.ts
|
|
3250
|
-
function
|
|
4464
|
+
function yo(e, t) {
|
|
3251
4465
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
3252
4466
|
let n = new ResizeObserver(([e]) => {
|
|
3253
4467
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -3258,14 +4472,14 @@ function yr(e, t) {
|
|
|
3258
4472
|
}
|
|
3259
4473
|
//#endregion
|
|
3260
4474
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
3261
|
-
var
|
|
3262
|
-
function
|
|
4475
|
+
var bo = 0;
|
|
4476
|
+
function xo(e) {
|
|
3263
4477
|
let t = 0, n = () => {
|
|
3264
4478
|
cancelAnimationFrame(t), t = requestAnimationFrame(() => {
|
|
3265
4479
|
let t = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
3266
4480
|
t = t < 0 ? 0 : t;
|
|
3267
|
-
let n = t -
|
|
3268
|
-
n = n < 0 ? 0 : n,
|
|
4481
|
+
let n = t - bo;
|
|
4482
|
+
n = n < 0 ? 0 : n, bo ||= t, e(t, n);
|
|
3269
4483
|
});
|
|
3270
4484
|
};
|
|
3271
4485
|
return window.visualViewport?.addEventListener("resize", n), window.visualViewport?.addEventListener("scroll", n), () => {
|
|
@@ -3273,187 +4487,71 @@ function xr(e) {
|
|
|
3273
4487
|
};
|
|
3274
4488
|
}
|
|
3275
4489
|
//#endregion
|
|
3276
|
-
//#region src/core/engine/
|
|
3277
|
-
var
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
}
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
return t ? await t.blob() : null;
|
|
3291
|
-
} catch {
|
|
3292
|
-
return null;
|
|
3293
|
-
}
|
|
3294
|
-
};
|
|
3295
|
-
function Nr(e) {
|
|
3296
|
-
if (!Ar()) return () => {};
|
|
3297
|
-
let t = null, n = !1, r = /* @__PURE__ */ new Map(), i = /* @__PURE__ */ new Set(), a = /* @__PURE__ */ new Map(), o = /* @__PURE__ */ new WeakSet(), s = /* @__PURE__ */ new Set(), c = () => typeof devicePixelRatio == "number" ? devicePixelRatio : 1, l = () => {
|
|
3298
|
-
if (t) return t;
|
|
3299
|
-
try {
|
|
3300
|
-
t = new Worker(URL.createObjectURL(new Blob([kr])));
|
|
3301
|
-
} catch {
|
|
3302
|
-
return null;
|
|
3303
|
-
}
|
|
3304
|
-
return t.onmessage = (e) => {
|
|
3305
|
-
let { url: t, blob: n, error: r, skip: a } = e.data;
|
|
3306
|
-
if (i.delete(t), r || a || !n) {
|
|
3307
|
-
u(t, "skip");
|
|
3308
|
-
return;
|
|
3309
|
-
}
|
|
3310
|
-
let o = URL.createObjectURL(n);
|
|
3311
|
-
s.add(o), jr(t, n), u(t, o);
|
|
3312
|
-
}, t;
|
|
3313
|
-
}, u = (e, t) => {
|
|
3314
|
-
r.has(e) || r.set(e, t);
|
|
3315
|
-
for (let [t, n] of [...a]) n.url === e && d(t, r.get(e));
|
|
3316
|
-
}, d = (e, t) => {
|
|
3317
|
-
let n = a.get(e);
|
|
3318
|
-
if (n) {
|
|
3319
|
-
if (a.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
3320
|
-
if (t && t !== "skip") {
|
|
3321
|
-
e.setAttribute(Er, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
3322
|
-
let r = e.closest("picture");
|
|
3323
|
-
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
3324
|
-
e.src = t;
|
|
3325
|
-
}
|
|
3326
|
-
} else e.getAttribute("src") === Tr && (t && t !== "skip" ? e.src = t : (e.removeAttribute(Er), e.src = n.url));
|
|
3327
|
-
n.previousVisibility ? e.style.visibility = n.previousVisibility : e.style.removeProperty("visibility");
|
|
3328
|
-
}
|
|
3329
|
-
}, f = (e, t, n) => {
|
|
3330
|
-
if (r.has(e) || i.has(e)) return;
|
|
3331
|
-
let a = l();
|
|
3332
|
-
if (!a) return;
|
|
3333
|
-
i.add(e);
|
|
3334
|
-
let o = Math.round(Math.max(Q, t * c()) * Cr), s = Math.max(t * n, Q * Q) * c() ** 2;
|
|
3335
|
-
a.postMessage({
|
|
3336
|
-
url: e,
|
|
3337
|
-
targetWidth: o,
|
|
3338
|
-
neededArea: s,
|
|
3339
|
-
ratio: 8
|
|
3340
|
-
});
|
|
3341
|
-
}, p = (e) => {
|
|
3342
|
-
if (e.complete && e.naturalWidth > 0) return;
|
|
3343
|
-
let t = {
|
|
3344
|
-
url: "",
|
|
3345
|
-
previousVisibility: e.style.visibility,
|
|
3346
|
-
timeout: setTimeout(() => d(e, null), wr),
|
|
3347
|
-
responsive: !0
|
|
3348
|
-
}, i = () => {
|
|
3349
|
-
/* v8 ignore next -- consider() only routes elements with an https src
|
|
3350
|
-
here, so the final fallback arm is unreachable. */
|
|
3351
|
-
let i = e.currentSrc || e.getAttribute("src") || "", o = e.getBoundingClientRect();
|
|
3352
|
-
if (!(/^https?:/.test(i) && Or({
|
|
3353
|
-
naturalWidth: e.naturalWidth,
|
|
3354
|
-
naturalHeight: e.naturalHeight,
|
|
3355
|
-
boxWidth: o.width || Q,
|
|
3356
|
-
boxHeight: o.height || Q,
|
|
3357
|
-
devicePixelRatio: c()
|
|
3358
|
-
}))) {
|
|
3359
|
-
d(e, null);
|
|
3360
|
-
return;
|
|
3361
|
-
}
|
|
3362
|
-
t.url = i;
|
|
3363
|
-
let l = r.get(i);
|
|
3364
|
-
if (l) {
|
|
3365
|
-
d(e, l);
|
|
3366
|
-
return;
|
|
3367
|
-
}
|
|
3368
|
-
Mr(i).then((t) => {
|
|
3369
|
-
if (!(n || !a.has(e))) {
|
|
3370
|
-
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
3371
|
-
releases every held element of the url first, so a still-held
|
|
3372
|
-
element cannot observe an existing verdict here; kept as a guard
|
|
3373
|
-
against future settle() reorderings. */
|
|
3374
|
-
if (r.has(i)) {
|
|
3375
|
-
d(e, r.get(i));
|
|
3376
|
-
return;
|
|
3377
|
-
}
|
|
3378
|
-
/* v8 ignore stop */
|
|
3379
|
-
if (t) {
|
|
3380
|
-
let e = URL.createObjectURL(t);
|
|
3381
|
-
s.add(e), u(i, e);
|
|
3382
|
-
return;
|
|
3383
|
-
}
|
|
3384
|
-
f(i, o.width || Q, o.height || Q);
|
|
3385
|
-
}
|
|
3386
|
-
});
|
|
3387
|
-
}, o = () => d(e, null);
|
|
3388
|
-
t.detachListeners = () => {
|
|
3389
|
-
e.removeEventListener("load", i), e.removeEventListener("error", o);
|
|
3390
|
-
}, e.addEventListener("load", i), e.addEventListener("error", o), a.set(e, t), e.style.visibility = "hidden";
|
|
3391
|
-
}, m = (e) => {
|
|
3392
|
-
if (n || o.has(e) || e.getAttribute("data-flemo-image-src") !== null) return;
|
|
3393
|
-
let t = e.getAttribute("src") ?? "";
|
|
3394
|
-
if (!/^https?:/.test(t)) return;
|
|
3395
|
-
if (e.getAttribute("srcset") !== null || e.closest("picture") !== null) {
|
|
3396
|
-
o.add(e), p(e);
|
|
3397
|
-
return;
|
|
3398
|
-
}
|
|
3399
|
-
if (o.add(e), e.complete && e.naturalWidth > 0) {
|
|
3400
|
-
let n = e.getBoundingClientRect();
|
|
3401
|
-
f(t, n.width || Q, n.height || Q);
|
|
3402
|
-
return;
|
|
3403
|
-
}
|
|
3404
|
-
let i = r.get(t);
|
|
3405
|
-
if (i !== "skip") {
|
|
3406
|
-
if (i) {
|
|
3407
|
-
e.setAttribute(Er, t), e.src = i;
|
|
4490
|
+
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4491
|
+
var So = () => {}, Co = "data-flemo-gpu-prewarm", wo = 2e3, To = 1200, Eo = 120, Do = 3, Oo = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", ko = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", Ao = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", jo = "cold", Mo = 0, No = null;
|
|
4492
|
+
function Po() {
|
|
4493
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !P()) return So;
|
|
4494
|
+
if (Mo += 1, jo === "cold") {
|
|
4495
|
+
jo = "scheduled";
|
|
4496
|
+
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
4497
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: wo }) : null, t = e === null ? setTimeout(n, To) : null;
|
|
4498
|
+
No = () => {
|
|
4499
|
+
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4500
|
+
};
|
|
4501
|
+
}, n = () => {
|
|
4502
|
+
if (e()) {
|
|
4503
|
+
t();
|
|
3408
4504
|
return;
|
|
3409
4505
|
}
|
|
3410
|
-
|
|
3411
|
-
|
|
3412
|
-
|
|
3413
|
-
|
|
3414
|
-
|
|
3415
|
-
|
|
3416
|
-
|
|
3417
|
-
|
|
3418
|
-
|
|
3419
|
-
|
|
4506
|
+
No = null, jo = "done";
|
|
4507
|
+
let n = document.createElement("div");
|
|
4508
|
+
n.setAttribute(Co, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Oo);
|
|
4509
|
+
let r = document.createElement("div");
|
|
4510
|
+
r.setAttribute("style", ko), r.textContent = "flemo";
|
|
4511
|
+
let i = document.createElement("div");
|
|
4512
|
+
i.setAttribute("style", Ao);
|
|
4513
|
+
let a = document.createElement("div");
|
|
4514
|
+
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4515
|
+
let o = document.createElement("div");
|
|
4516
|
+
o.setAttribute("style", "width:24px;height:24px;border-radius:50%;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.3);");
|
|
4517
|
+
try {
|
|
4518
|
+
let e = document.createElement("canvas");
|
|
4519
|
+
e.width = 24, e.height = 24;
|
|
4520
|
+
let t = e.getContext("2d");
|
|
4521
|
+
if (t) {
|
|
4522
|
+
t.fillStyle = "#7a8", t.fillRect(0, 0, 24, 24), t.fillStyle = "#345", t.beginPath(), t.arc(12, 10, 6, 0, Math.PI * 2), t.fill();
|
|
4523
|
+
let n = document.createElement("img");
|
|
4524
|
+
n.src = e.toDataURL(), n.setAttribute("style", "width:24px;height:24px;object-fit:cover;"), o.appendChild(n);
|
|
3420
4525
|
}
|
|
3421
|
-
|
|
3422
|
-
|
|
3423
|
-
|
|
3424
|
-
|
|
3425
|
-
|
|
3426
|
-
|
|
3427
|
-
|
|
3428
|
-
|
|
3429
|
-
|
|
3430
|
-
|
|
3431
|
-
|
|
3432
|
-
|
|
3433
|
-
|
|
3434
|
-
|
|
3435
|
-
|
|
3436
|
-
|
|
3437
|
-
|
|
3438
|
-
|
|
3439
|
-
|
|
3440
|
-
|
|
3441
|
-
|
|
3442
|
-
|
|
3443
|
-
|
|
3444
|
-
|
|
3445
|
-
|
|
3446
|
-
function Pr() {
|
|
3447
|
-
return typeof document > "u" || !document.body ? () => {} : ($ ? $.count += 1 : $ = {
|
|
3448
|
-
dispose: Nr(document.body),
|
|
3449
|
-
count: 1
|
|
3450
|
-
}, () => {
|
|
3451
|
-
$ && (--$.count, $.count <= 0 && ($.dispose(), $ = null));
|
|
3452
|
-
});
|
|
4526
|
+
} catch {}
|
|
4527
|
+
let s = document.createElement("div");
|
|
4528
|
+
s.setAttribute("style", "width:96px;height:10px;background:linear-gradient(90deg,#eee,#bbb,#eee);");
|
|
4529
|
+
let c = document.createElement("div");
|
|
4530
|
+
c.setAttribute("style", "border-top:1px solid #ccd;padding:2px 0;"), c.textContent = "의원 기록 표결 발의 가나다라", a.append(o, s, c), n.append(r, i, a), document.body.appendChild(n);
|
|
4531
|
+
try {
|
|
4532
|
+
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4533
|
+
duration: Eo,
|
|
4534
|
+
iterations: Do
|
|
4535
|
+
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4536
|
+
duration: Eo,
|
|
4537
|
+
iterations: Do
|
|
4538
|
+
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4539
|
+
duration: Eo,
|
|
4540
|
+
iterations: Do
|
|
4541
|
+
});
|
|
4542
|
+
} catch {}
|
|
4543
|
+
setTimeout(() => n.remove(), 450);
|
|
4544
|
+
};
|
|
4545
|
+
t();
|
|
4546
|
+
}
|
|
4547
|
+
let e = !1;
|
|
4548
|
+
return () => {
|
|
4549
|
+
e || (e = !0, Mo = Math.max(0, Mo - 1), Mo === 0 && jo === "scheduled" && (No?.(), No = null, jo = "cold"));
|
|
4550
|
+
};
|
|
3453
4551
|
}
|
|
3454
4552
|
//#endregion
|
|
3455
4553
|
//#region src/utils/isOpaqueColor.ts
|
|
3456
|
-
function
|
|
4554
|
+
function Fo(e) {
|
|
3457
4555
|
let t = e.trim().toLowerCase();
|
|
3458
4556
|
if (t === "transparent" || t === "") return !1;
|
|
3459
4557
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -3464,7 +4562,7 @@ function Fr(e) {
|
|
|
3464
4562
|
}
|
|
3465
4563
|
//#endregion
|
|
3466
4564
|
//#region src/utils/buildRoutePath.ts
|
|
3467
|
-
function
|
|
4565
|
+
function Io(e, n) {
|
|
3468
4566
|
let i = n ?? {}, a = t(e)(Object.fromEntries(Object.entries(i).map(([e, t]) => [e, String(t)]))), o = (typeof e == "string" ? r(e) : e).tokens.filter((e) => e.type === "param").map((e) => e.name), s = Object.fromEntries(Object.entries(i).filter(([e]) => !o.includes(e))), c = new URLSearchParams(s).toString();
|
|
3469
4567
|
return {
|
|
3470
4568
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -3472,4 +4570,4 @@ function Ir(e, n) {
|
|
|
3472
4570
|
};
|
|
3473
4571
|
}
|
|
3474
4572
|
//#endregion
|
|
3475
|
-
export {
|
|
4573
|
+
export { ao as ANIM_HOLD_RELEASE_BACKSTOP_MS, q as OFFLOADED_SRC_ATTR, Xn as OVERSIZE_AREA_RATIO, ma as SKIP_ANIMATION_ATTR, s as TaskManager, s as TaskManger, io as animHoldKey, Vn as animateInline, _n as animationName, ie as appendParamsQuery, En as applyTransitionStyles, Io as buildRoutePath, Ja as canProgrammaticallyScroll, G as clearInlineAnimation, un as collectAnimatedProperties, xn as compileTransitionStyles, Xa as computeBarRiding, Et as computeScreenFreeze, Tt as computeScreenFreezeMode, b as consumeSelfInducedPop, vo as createAnimHoldCoordinator, g as createBrowserHistoryDriver, zt as createDecorator, c as createHistoryStore, x as createHistorySync, lr as createImageDecodeOffloader, A as createMemoryHistoryDriver, te as createNavigateStore, ne as createNavigationController, Ut as createPartTransition, Bt as createRawDecorator, Wt as createRawPartTransition, Ot as createRawTransition, pe as createRouterScope, me as createScreenSelector, ue as createScreenStore, _ as createSelfPopGuard, ae as createStepController, Qa as createSwipeController, Dt as createTransition, Wa as createTransitionEngine, se as createTransitionStore, Nt as cupertino, z as decoratorMap, P as detectBlinkEngine, co as eagerlyDecodeImages, fn as easingToCss, Po as ensureGpuPipelinePrewarm, dr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Nn as enteringInitialStyle, Ga as findScrollable, l as getMatchedPathPattern, u as getParams, Ve as governedCompiledActive, wr as holdCompositorWarm, ve as isLegacyAndroidBlink, Fo as isOpaqueColor, f as isServer, Ft as layout, Be as lowPowerCadenceActive, y as markSelfInducedPop, ce as matchesPathname, It as material, Lt as none, yo as observeBarHeight, xo as observeViewportScrollHeight, qa as overflowsAxis, Ht as overlay, B as partTransitionMap, ut as readImageOffloadOverride, lt as readPrerasterFlag, ot as readSettleGateFlag, re as readStepParams, Mn as registerTransitionDefinitions, ee as releaseScopeHistorySync, R as resolveTransition, go as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, Ya as sharedBarsMatch, ir as shouldOffloadImage, nt as steadySixtyPlayerEligible, oe as subscribeStepParamsRestore, dn as targetToDecls, Rt as transitionMap, U as variantHasAnimation };
|