@flemo/core 1.29.0 → 1.30.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/TaskManger.d.ts +13 -0
- package/dist/core/engine/__tests__/architectureDoc.test.d.ts +10 -0
- package/dist/core/engine/__tests__/diagnosticRegistry.test.d.ts +10 -0
- package/dist/core/engine/__tests__/participantLayers.test.d.ts +1 -0
- package/dist/core/engine/__tests__/singleResolution.test.d.ts +1 -0
- package/dist/core/engine/arrivalHold.d.ts +1 -1
- package/dist/core/engine/cancelResume.d.ts +17 -0
- package/dist/core/engine/compositorWarmUp.d.ts +1 -1
- package/dist/core/engine/createSwipeController.d.ts +11 -0
- package/dist/core/engine/createTransitionEngine.d.ts +2 -1
- package/dist/core/engine/diagnosticFlags.d.ts +1 -10
- package/dist/core/engine/diagnosticRegistry.d.ts +38 -0
- package/dist/core/engine/flightHolds.d.ts +22 -0
- package/dist/core/engine/flightParticipants.d.ts +8 -0
- package/dist/core/engine/flightRouting.d.ts +70 -0
- package/dist/core/engine/gpuPipelinePrewarm.d.ts +1 -1
- package/dist/core/engine/imageDecodeOffloader.d.ts +1 -1
- package/dist/core/engine/landingGovernor.d.ts +3 -0
- package/dist/core/engine/participantLayers.d.ts +12 -0
- package/dist/core/engine/types.d.ts +1 -1
- package/dist/dom/__tests__/attributes.test.d.ts +10 -0
- package/dist/dom/attributes.d.ts +115 -0
- package/dist/index.d.ts +8 -4
- package/dist/index.mjs +1517 -1658
- package/dist/navigate/store.d.ts +1 -0
- package/dist/platform/__tests__/displayCadence.test.d.ts +1 -0
- package/dist/platform/__tests__/displayProbe.test.d.ts +1 -0
- package/dist/platform/__tests__/engineProbes.test.d.ts +1 -0
- package/dist/platform/__tests__/legacyBlinkGate.test.d.ts +1 -0
- package/dist/platform/__tests__/profile.test.d.ts +1 -0
- package/dist/platform/__tests__/steadySixtyCadence.test.d.ts +1 -0
- package/dist/platform/displayCadence.d.ts +3 -0
- package/dist/platform/displayProbe.d.ts +5 -0
- package/dist/platform/engineProbes.d.ts +4 -0
- package/dist/platform/profile.d.ts +70 -0
- package/dist/{core/engine → platform}/steadySixtyCadence.d.ts +1 -1
- package/dist/runtime/__tests__/flemoRuntime.test.d.ts +1 -0
- package/dist/runtime/flemoRuntime.d.ts +9 -0
- package/dist/transition/compileTransitionStyles.d.ts +0 -1
- package/dist/transition/cubicBezier.d.ts +8 -0
- package/dist/transition/swipeSettle.d.ts +82 -1
- package/dist/transition/typing.d.ts +2 -2
- package/package.json +3 -3
- package/dist/core/engine/driverPolicy.d.ts +0 -12
- package/dist/core/engine/landingPixelSnap.d.ts +0 -10
- package/dist/core/engine/motionDriverKind.d.ts +0 -7
- package/dist/core/engine/transitionPlayer.d.ts +0 -40
- /package/dist/core/engine/__tests__/{driverPolicy.test.d.ts → createSwipeController.stuckGesture.test.d.ts} +0 -0
- /package/dist/core/engine/__tests__/{landingPixelSnap.test.d.ts → createSwipeController.velocity.test.d.ts} +0 -0
- /package/dist/core/engine/__tests__/{motionDriverKind.test.d.ts → flightParticipants.test.d.ts} +0 -0
- /package/dist/core/engine/__tests__/{steadySixtyCadence.test.d.ts → flightRouting.test.d.ts} +0 -0
- /package/dist/core/engine/__tests__/{transitionPlayer.test.d.ts → landingGovernor.test.d.ts} +0 -0
- /package/dist/{core/engine → platform}/governedCompiled.d.ts +0 -0
package/dist/index.mjs
CHANGED
|
@@ -50,6 +50,13 @@ var a = 1200, o = 2, s = new class {
|
|
|
50
50
|
}
|
|
51
51
|
}
|
|
52
52
|
pendingWaiters = /* @__PURE__ */ new Set();
|
|
53
|
+
wakeQueueNextFrame() {
|
|
54
|
+
if (typeof requestAnimationFrame != "function") {
|
|
55
|
+
this.notifyPendingWaiters();
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
requestAnimationFrame(() => this.notifyPendingWaiters());
|
|
59
|
+
}
|
|
53
60
|
notifyPendingWaiters() {
|
|
54
61
|
for (let e of [...this.pendingWaiters]) e();
|
|
55
62
|
}
|
|
@@ -62,7 +69,7 @@ var a = 1200, o = 2, s = new class {
|
|
|
62
69
|
});
|
|
63
70
|
}
|
|
64
71
|
async onTaskStatusChange(e, t) {
|
|
65
|
-
(t === "COMPLETED" || t === "FAILED" || t === "ROLLEDBACK") && (this.gatePhases.delete(e), this.pendingTaskQueue = this.pendingTaskQueue.filter((t) => t.id !== e), await this.processPendingTasks(), this.
|
|
72
|
+
(t === "COMPLETED" || t === "FAILED" || t === "ROLLEDBACK") && (this.gatePhases.delete(e), this.pendingTaskQueue = this.pendingTaskQueue.filter((t) => t.id !== e), await this.processPendingTasks(), queueMicrotask(() => this.wakeQueueNextFrame()));
|
|
66
73
|
}
|
|
67
74
|
async addTask(e, t = {}) {
|
|
68
75
|
let n = t.id || this.generateTaskId();
|
|
@@ -565,7 +572,12 @@ function j(e) {
|
|
|
565
572
|
}
|
|
566
573
|
//#endregion
|
|
567
574
|
//#region src/navigate/store.ts
|
|
568
|
-
|
|
575
|
+
var ee = [
|
|
576
|
+
"PUSHING",
|
|
577
|
+
"POPPING",
|
|
578
|
+
"REPLACING"
|
|
579
|
+
];
|
|
580
|
+
function te() {
|
|
569
581
|
return e((e) => ({
|
|
570
582
|
status: "IDLE",
|
|
571
583
|
transitionTaskId: null,
|
|
@@ -575,11 +587,11 @@ function ee() {
|
|
|
575
587
|
}
|
|
576
588
|
//#endregion
|
|
577
589
|
//#region src/navigate/createNavigationController.ts
|
|
578
|
-
var
|
|
590
|
+
var ne = (e, t, n) => {
|
|
579
591
|
let { regexp: r } = i(e);
|
|
580
592
|
for (let e = t - 1; e >= 0; e--) if (r.test(n[e].pathname)) return t - e;
|
|
581
593
|
return -1;
|
|
582
|
-
},
|
|
594
|
+
}, re = (e, t) => typeof e == "number" && Number.isFinite(e) ? Math.max(0, Math.trunc(e)) : t, M = async (e, t, n, r) => {
|
|
583
595
|
let i, a = new Promise((t) => {
|
|
584
596
|
i = e.subscribe(() => t(!0));
|
|
585
597
|
}), o = new Promise((e) => setTimeout(() => e(!1), 200));
|
|
@@ -587,7 +599,7 @@ var M = (e, t, n) => {
|
|
|
587
599
|
let s = await Promise.race([a, o]);
|
|
588
600
|
i(), s && r();
|
|
589
601
|
};
|
|
590
|
-
function
|
|
602
|
+
function N(e) {
|
|
591
603
|
let { stores: t, buildPathname: n, driver: r = g(), markSelfInduced: i = y } = e, o = () => t.history.getState().bumpTruncationEpoch(), c = () => {
|
|
592
604
|
let e = r.readState();
|
|
593
605
|
if (!e?.id) return null;
|
|
@@ -613,10 +625,10 @@ function F(e) {
|
|
|
613
625
|
}
|
|
614
626
|
let s = c(), { index: d, histories: f, addHistory: g, popHistories: _ } = t.history.getState(), v = (() => {
|
|
615
627
|
if (u?.until != null) {
|
|
616
|
-
let e =
|
|
628
|
+
let e = ne(u.until, d, f);
|
|
617
629
|
return e < 0 ? 0 : e;
|
|
618
630
|
}
|
|
619
|
-
return Math.min(
|
|
631
|
+
return Math.min(re(u?.skip, 0), Math.max(0, d));
|
|
620
632
|
})(), { setStatus: y, setTransitionTaskId: b } = t.navigate.getState();
|
|
621
633
|
y("PUSHING"), b(h);
|
|
622
634
|
let { pathname: x, toPathname: S } = n(e, l ?? {}), C = {
|
|
@@ -643,7 +655,7 @@ function F(e) {
|
|
|
643
655
|
return g({
|
|
644
656
|
...C,
|
|
645
657
|
frameIndex: T + 1
|
|
646
|
-
}), await
|
|
658
|
+
}), await M(r, i, v, () => {
|
|
647
659
|
o(), r.pushState({
|
|
648
660
|
id: h,
|
|
649
661
|
index: T + 1,
|
|
@@ -673,10 +685,10 @@ function F(e) {
|
|
|
673
685
|
}
|
|
674
686
|
let s = c(), { index: d, histories: f, addHistory: g, replaceHistory: _, popHistories: v } = t.history.getState(), y = (() => {
|
|
675
687
|
if (u?.until != null) {
|
|
676
|
-
let e =
|
|
688
|
+
let e = ne(u.until, d, f);
|
|
677
689
|
return e < 0 ? 0 : e + 1;
|
|
678
690
|
}
|
|
679
|
-
return Math.min(
|
|
691
|
+
return Math.min(re(u?.skip, 0) + 1, d + 1);
|
|
680
692
|
})();
|
|
681
693
|
if (y <= 0) {
|
|
682
694
|
a.abort();
|
|
@@ -708,7 +720,7 @@ function F(e) {
|
|
|
708
720
|
return v(y - 1), g({
|
|
709
721
|
...w,
|
|
710
722
|
frameIndex: E
|
|
711
|
-
}), y <= d ? await
|
|
723
|
+
}), y <= d ? await M(r, i, y, () => {
|
|
712
724
|
o(), r.pushState({
|
|
713
725
|
id: h,
|
|
714
726
|
index: E,
|
|
@@ -717,7 +729,7 @@ function F(e) {
|
|
|
717
729
|
transitionName: p,
|
|
718
730
|
layoutId: m
|
|
719
731
|
}, S);
|
|
720
|
-
}) : await
|
|
732
|
+
}) : await M(r, i, d, () => {
|
|
721
733
|
o(), r.replaceState({
|
|
722
734
|
id: h,
|
|
723
735
|
index: E,
|
|
@@ -773,10 +785,10 @@ function F(e) {
|
|
|
773
785
|
pop: async (e) => {
|
|
774
786
|
await d((t, n) => {
|
|
775
787
|
if (e?.until != null) {
|
|
776
|
-
let r =
|
|
788
|
+
let r = ne(e.until, t, n);
|
|
777
789
|
return r < 0 ? 0 : r;
|
|
778
790
|
}
|
|
779
|
-
let r =
|
|
791
|
+
let r = re(e?.skip, 1);
|
|
780
792
|
return r <= 0 ? 0 : Math.min(r, t);
|
|
781
793
|
}, e?.transitionName);
|
|
782
794
|
}
|
|
@@ -784,14 +796,14 @@ function F(e) {
|
|
|
784
796
|
}
|
|
785
797
|
//#endregion
|
|
786
798
|
//#region src/navigate/createStepController.ts
|
|
787
|
-
var
|
|
799
|
+
var ie = (e) => {
|
|
788
800
|
let t = e;
|
|
789
801
|
return t?.step ? t.params ?? {} : null;
|
|
790
|
-
},
|
|
802
|
+
}, ae = (e, t) => {
|
|
791
803
|
let n = new URLSearchParams(Object.fromEntries(Object.entries(t).map(([e, t]) => [e, String(t)]))).toString();
|
|
792
804
|
return n ? `${e}?${n}` : e;
|
|
793
805
|
};
|
|
794
|
-
function
|
|
806
|
+
function oe(e) {
|
|
795
807
|
let { stores: t, driver: n, markSelfInduced: r, buildStepPathname: i, applyParams: o } = e;
|
|
796
808
|
return {
|
|
797
809
|
pushStep: async (e) => {
|
|
@@ -849,7 +861,7 @@ function re(e) {
|
|
|
849
861
|
}
|
|
850
862
|
};
|
|
851
863
|
}
|
|
852
|
-
function
|
|
864
|
+
function se(e, t) {
|
|
853
865
|
return e.subscribe((e) => {
|
|
854
866
|
let n = e.state;
|
|
855
867
|
n?.step && s.addTask(async () => {
|
|
@@ -859,7 +871,7 @@ function ie(e, t) {
|
|
|
859
871
|
}
|
|
860
872
|
//#endregion
|
|
861
873
|
//#region src/transition/store.ts
|
|
862
|
-
function
|
|
874
|
+
function P(t = "cupertino") {
|
|
863
875
|
return e((e) => ({
|
|
864
876
|
defaultTransitionName: t,
|
|
865
877
|
setDefaultTransitionName: (t) => e({ defaultTransitionName: t })
|
|
@@ -867,18 +879,18 @@ function ae(t = "cupertino") {
|
|
|
867
879
|
}
|
|
868
880
|
//#endregion
|
|
869
881
|
//#region src/utils/matchesPathname.ts
|
|
870
|
-
function
|
|
882
|
+
function ce(e, t) {
|
|
871
883
|
return i(e).regexp.test(t);
|
|
872
884
|
}
|
|
873
885
|
//#endregion
|
|
874
886
|
//#region src/screen/store.ts
|
|
875
|
-
var
|
|
887
|
+
var le = (e, t) => {
|
|
876
888
|
if (e) return e.height !== void 0 || e.id !== t?.id ? e : {
|
|
877
889
|
...e,
|
|
878
890
|
height: t?.height
|
|
879
891
|
};
|
|
880
892
|
};
|
|
881
|
-
function
|
|
893
|
+
function ue() {
|
|
882
894
|
return e((e) => ({
|
|
883
895
|
dragStatus: "IDLE",
|
|
884
896
|
replaceTransitionStatus: "IDLE",
|
|
@@ -892,8 +904,8 @@ function ce() {
|
|
|
892
904
|
topBar: n.topBar ? {} : void 0,
|
|
893
905
|
bottomBar: n.bottomBar ? {} : void 0
|
|
894
906
|
}, a = e.sharedBars[t], o = e.sharedBarMetadata[t], s = {
|
|
895
|
-
topBar:
|
|
896
|
-
bottomBar:
|
|
907
|
+
topBar: le(i.topBar, o?.topBar),
|
|
908
|
+
bottomBar: le(i.bottomBar, o?.bottomBar)
|
|
897
909
|
}, 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
910
|
return c && l ? e : {
|
|
899
911
|
sharedBars: {
|
|
@@ -942,14 +954,14 @@ function ce() {
|
|
|
942
954
|
}
|
|
943
955
|
//#endregion
|
|
944
956
|
//#region src/core/createRouterScope.ts
|
|
945
|
-
var
|
|
957
|
+
var de = {
|
|
946
958
|
mark: () => {},
|
|
947
959
|
consume: () => !1
|
|
948
|
-
},
|
|
949
|
-
function
|
|
960
|
+
}, fe = /* @__PURE__ */ new Map();
|
|
961
|
+
function pe(e) {
|
|
950
962
|
let { routePaths: t, pathname: n, search: r, defaultTransitionName: i, memory: a, browserDriver: o } = e, s = f() ? void 0 : e.persistKey;
|
|
951
963
|
if (s) {
|
|
952
|
-
let e =
|
|
964
|
+
let e = fe.get(s);
|
|
953
965
|
if (e) {
|
|
954
966
|
e.life.alive = !0, e.navigate.getState().setStatus("IDLE"), e.navigate.getState().setTransitionTaskId(null);
|
|
955
967
|
let t = e.history.getState();
|
|
@@ -979,25 +991,25 @@ function de(e) {
|
|
|
979
991
|
layoutId: p.layoutId
|
|
980
992
|
},
|
|
981
993
|
url: p.pathname
|
|
982
|
-
}) : o, h = a ?
|
|
994
|
+
}) : o, h = a ? de : _(), g = {
|
|
983
995
|
history: c([p], 0),
|
|
984
|
-
navigate:
|
|
985
|
-
transition:
|
|
986
|
-
screen:
|
|
996
|
+
navigate: te(),
|
|
997
|
+
transition: P(i),
|
|
998
|
+
screen: ue(),
|
|
987
999
|
driver: m,
|
|
988
1000
|
markSelfInduced: h.mark,
|
|
989
1001
|
consume: h.consume,
|
|
990
1002
|
routerKey: e.routerKey,
|
|
991
1003
|
zoneEntryId: e.zoneEntryId,
|
|
992
|
-
ownsPathname: (e) =>
|
|
1004
|
+
ownsPathname: (e) => ce(t, e),
|
|
993
1005
|
persistent: !!s,
|
|
994
1006
|
life: { alive: !0 }
|
|
995
1007
|
};
|
|
996
|
-
return s &&
|
|
1008
|
+
return s && fe.set(s, g), g;
|
|
997
1009
|
}
|
|
998
1010
|
//#endregion
|
|
999
1011
|
//#region src/screen/createScreenSelector.ts
|
|
1000
|
-
function
|
|
1012
|
+
function me(e, t) {
|
|
1001
1013
|
return e.map((n, r) => ({
|
|
1002
1014
|
...n,
|
|
1003
1015
|
isActive: r === t,
|
|
@@ -1009,126 +1021,90 @@ function fe(e, t) {
|
|
|
1009
1021
|
}));
|
|
1010
1022
|
}
|
|
1011
1023
|
//#endregion
|
|
1012
|
-
//#region src/
|
|
1013
|
-
var
|
|
1014
|
-
try {
|
|
1015
|
-
try {
|
|
1016
|
-
typeof localStorage < "u" && localStorage.removeItem(pe);
|
|
1017
|
-
} catch {}
|
|
1018
|
-
if (typeof sessionStorage > "u") return null;
|
|
1019
|
-
let e = sessionStorage.getItem(pe);
|
|
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 ? (!me && typeof console < "u" && (me = !0, console.warn(`[flemo] motion driver pinned to "${t}" via sessionStorage ${pe}; remove the key to restore automatic selection (pins expire after 24h).`)), t) : (sessionStorage.removeItem(pe), null);
|
|
1023
|
-
} catch {
|
|
1024
|
-
return null;
|
|
1025
|
-
}
|
|
1026
|
-
}, I = () => {
|
|
1024
|
+
//#region src/platform/engineProbes.ts
|
|
1025
|
+
var F = () => {
|
|
1027
1026
|
if (typeof navigator > "u") return !1;
|
|
1028
1027
|
let e = navigator.userAgentData?.brands;
|
|
1029
1028
|
if (Array.isArray(e)) return e.some((e) => /chromium/i.test(e?.brand ?? ""));
|
|
1030
1029
|
let t = navigator.userAgent ?? "";
|
|
1031
1030
|
return /Android/i.test(t) && !/Firefox|FxiOS/i.test(t);
|
|
1032
|
-
},
|
|
1031
|
+
}, he = 90, I = () => {
|
|
1033
1032
|
if (typeof navigator > "u") return !1;
|
|
1034
1033
|
let e = navigator.userAgentData?.brands;
|
|
1035
1034
|
if (Array.isArray(e)) return !1;
|
|
1036
1035
|
let t = navigator.userAgent ?? "";
|
|
1037
|
-
return
|
|
1038
|
-
},
|
|
1039
|
-
playerAllowed: () => {
|
|
1040
|
-
let t = he();
|
|
1041
|
-
return t ? t === "raf" : e;
|
|
1042
|
-
},
|
|
1043
|
-
pinnedDriver: he
|
|
1044
|
-
}))(!0), be = () => !I() && typeof navigator < "u" && navigator.maxTouchPoints > 0, xe = 14, Se = 22, Ce = 2, we = 1.5, Te = "flemo:sixty", Ee = () => {
|
|
1036
|
+
return !/Android/i.test(t) || /Firefox|FxiOS/i.test(t) || (navigator.maxTouchPoints ?? 0) <= 0 ? !1 : Number(/Chrom(?:e|ium)\/(\d+)/i.exec(t)?.[1] ?? 0) < he;
|
|
1037
|
+
}, ge = () => typeof navigator > "u" ? !1 : !F() && navigator.maxTouchPoints === 0 && /Mac/.test(navigator.platform), _e = () => F() && typeof navigator < "u" && navigator.maxTouchPoints === 0, ve = () => !F() && typeof navigator < "u" && navigator.maxTouchPoints > 0, ye = 14, be = 22, xe = 2, Se = 1.5, Ce = "flemo:sixty", we = () => {
|
|
1045
1038
|
try {
|
|
1046
|
-
return typeof sessionStorage < "u" ? sessionStorage.getItem(
|
|
1039
|
+
return typeof sessionStorage < "u" ? sessionStorage.getItem(Ce) : null;
|
|
1047
1040
|
} catch {
|
|
1048
1041
|
return null;
|
|
1049
1042
|
}
|
|
1050
|
-
},
|
|
1043
|
+
}, Te = (e) => {
|
|
1051
1044
|
try {
|
|
1052
|
-
typeof sessionStorage < "u" && sessionStorage.setItem(
|
|
1045
|
+
typeof sessionStorage < "u" && sessionStorage.setItem(Ce, e);
|
|
1053
1046
|
} catch {}
|
|
1054
|
-
},
|
|
1055
|
-
if (!(!Number.isFinite(e) || e <= 0) &&
|
|
1047
|
+
}, L = we(), Ee = L === "high", De = L !== null && L !== "high" ? Math.min(xe, Math.max(0, parseInt(L, 10) || 0)) : 0, Oe = () => typeof navigator > "u" || (navigator.maxTouchPoints ?? 0) === 0, ke = (e, t) => {
|
|
1048
|
+
if (!(!Number.isFinite(e) || e <= 0) && Oe()) {
|
|
1056
1049
|
if (e < 12) {
|
|
1057
1050
|
if (t !== void 0 && t > 24) return;
|
|
1058
|
-
|
|
1051
|
+
Ee = !0, De = 0, Te("high");
|
|
1059
1052
|
return;
|
|
1060
1053
|
}
|
|
1061
|
-
if (e >=
|
|
1062
|
-
|
|
1054
|
+
if (e >= ye && e <= be) {
|
|
1055
|
+
De = Math.min(xe, De + 1), Ee || Te(String(De));
|
|
1063
1056
|
return;
|
|
1064
1057
|
}
|
|
1065
|
-
e <
|
|
1058
|
+
e < ye && (De = 0, Ee || Te("0"));
|
|
1066
1059
|
}
|
|
1067
|
-
},
|
|
1060
|
+
}, Ae = () => !Ee && De >= xe, je = () => Ae() && F() && typeof navigator < "u" && navigator.maxTouchPoints === 0 && typeof window < "u" && (window.devicePixelRatio || 1) >= Se, R = (e) => {
|
|
1068
1061
|
try {
|
|
1069
1062
|
return typeof sessionStorage < "u" ? sessionStorage.getItem(e) : null;
|
|
1070
1063
|
} catch {
|
|
1071
1064
|
return null;
|
|
1072
1065
|
}
|
|
1073
|
-
},
|
|
1074
|
-
let e =
|
|
1066
|
+
}, Me = () => {
|
|
1067
|
+
let e = R("flemo:imghold");
|
|
1075
1068
|
return e === "on" || e === "off" ? e : null;
|
|
1076
|
-
},
|
|
1069
|
+
}, Ne = () => F() && (navigator.maxTouchPoints ?? 0) > 0, Pe = () => {
|
|
1077
1070
|
try {
|
|
1078
1071
|
let e = typeof sessionStorage < "u" ? sessionStorage.getItem("flemo:settle-gate") : null;
|
|
1079
|
-
return e === "on" ? !0 : e === "off" ? !1 :
|
|
1072
|
+
return e === "on" ? !0 : e === "off" ? !1 : ve() || je() || Ne() || ge();
|
|
1080
1073
|
} catch {
|
|
1081
1074
|
return !1;
|
|
1082
1075
|
}
|
|
1083
|
-
},
|
|
1084
|
-
let e =
|
|
1085
|
-
return e === "on" || e !== "off" &&
|
|
1086
|
-
},
|
|
1087
|
-
let e =
|
|
1088
|
-
return e === "on" || e !== "off" &&
|
|
1076
|
+
}, Fe = () => R("flemo:arrivalhold") !== "off", Ie = () => {
|
|
1077
|
+
let e = R("flemo:deskflip");
|
|
1078
|
+
return e === "on" || e !== "off" && ge();
|
|
1079
|
+
}, Le = () => {
|
|
1080
|
+
let e = R("flemo:creep");
|
|
1081
|
+
return e === "on" || e !== "off" && ve();
|
|
1082
|
+
}, Re = () => {
|
|
1083
|
+
let e = R("flemo:relcommit");
|
|
1084
|
+
return e === "defer" || e !== "sync" && ve();
|
|
1085
|
+
}, ze = () => {
|
|
1086
|
+
let e = R("flemo:deskhead");
|
|
1087
|
+
return e === "on" || e !== "off" && ge();
|
|
1088
|
+
}, Be = () => R("flemo:preraster") === "on", Ve = () => Be(), He = () => {
|
|
1089
|
+
let e = R("flemo:imgoffload");
|
|
1090
|
+
return e === "on" || e === "off" ? e : null;
|
|
1089
1091
|
}, Ue = () => {
|
|
1090
|
-
let e =
|
|
1091
|
-
return e === "defer" || e !== "sync" && be();
|
|
1092
|
-
}, We = () => {
|
|
1093
|
-
let e = L("flemo:deskhead");
|
|
1094
|
-
return e === "on" || e !== "off" && _e();
|
|
1095
|
-
}, Ge = () => L("flemo:preraster") === "on", Ke = () => Ge(), qe = () => {
|
|
1096
|
-
let e = L("flemo:imgoffload");
|
|
1092
|
+
let e = R("flemo:governed");
|
|
1097
1093
|
return e === "on" || e === "off" ? e : null;
|
|
1098
|
-
},
|
|
1099
|
-
if (Je !== void 0) return Je;
|
|
1100
|
-
let e = L("flemo:apply");
|
|
1101
|
-
return Je = e === "scrub" ? e : null, Je;
|
|
1102
|
-
}, Xe, Ze = () => {
|
|
1103
|
-
if (Xe !== void 0) return Xe;
|
|
1104
|
-
let e = L("flemo:handoff");
|
|
1105
|
-
return Xe = e === "on" ? e : null, Xe;
|
|
1106
|
-
}, Qe, $e = () => {
|
|
1107
|
-
if (Qe !== void 0) return Qe;
|
|
1108
|
-
let e = L("flemo:snap");
|
|
1109
|
-
return Qe = e === "always" || e === "off" || e === "gate" || e === "hybrid" ? e : null, Qe;
|
|
1110
|
-
}, et, tt = () => {
|
|
1111
|
-
if (et !== void 0) return et;
|
|
1112
|
-
let e = L("flemo:snapband"), t = e === null ? NaN : Number(e);
|
|
1113
|
-
return et = Number.isFinite(t) && t > 0 ? t : 4, et;
|
|
1114
|
-
}, nt, rt = () => {
|
|
1115
|
-
if (nt !== void 0) return nt;
|
|
1116
|
-
let e = L("flemo:handoffms"), t = e === null ? NaN : Number(e);
|
|
1117
|
-
return nt = Number.isFinite(t) && t >= 0 ? t : 100, nt;
|
|
1118
|
-
}, it, at = () => (it === void 0 && (it = L("flemo:layers") === "resident"), it), ot, st = () => (ot === void 0 && (ot = L("flemo:freeze") === "shallow"), ot);
|
|
1094
|
+
}, We, Ge = () => (We === void 0 && (We = R("flemo:layers") === "resident"), We), Ke, qe = () => (Ke === void 0 && (Ke = R("flemo:freeze") === "shallow"), Ke);
|
|
1119
1095
|
//#endregion
|
|
1120
1096
|
//#region src/screen/computeScreenFreeze.ts
|
|
1121
|
-
function
|
|
1097
|
+
function Je(e) {
|
|
1122
1098
|
if (e.isPrev && e.index - 2 <= e.zIndex && e.replaceTransitionStatus === "IDLE" || e.isPrev && e.index - 2 > e.zIndex) return "immediate";
|
|
1123
1099
|
let t = e.status === "COMPLETED" && e.dragStatus === "IDLE";
|
|
1124
|
-
return !e.isActive && t ?
|
|
1100
|
+
return !e.isActive && t ? qe() ? "live" : "deferred" : "live";
|
|
1125
1101
|
}
|
|
1126
|
-
function
|
|
1127
|
-
return
|
|
1102
|
+
function Ye(e) {
|
|
1103
|
+
return Je(e) !== "live";
|
|
1128
1104
|
}
|
|
1129
1105
|
//#endregion
|
|
1130
1106
|
//#region src/transition/createTransition.ts
|
|
1131
|
-
function
|
|
1107
|
+
function Xe({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exitBack: o, options: s }) {
|
|
1132
1108
|
return {
|
|
1133
1109
|
name: e,
|
|
1134
1110
|
initial: t,
|
|
@@ -1149,7 +1125,7 @@ function ut({ name: e, initial: t, idle: n, enter: r, enterBack: i, exit: a, exi
|
|
|
1149
1125
|
}
|
|
1150
1126
|
//#endregion
|
|
1151
1127
|
//#region src/transition/createRawTransition.ts
|
|
1152
|
-
function
|
|
1128
|
+
function Ze({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnExit: l, completedOnEnter: u, options: d }) {
|
|
1153
1129
|
return {
|
|
1154
1130
|
name: e,
|
|
1155
1131
|
initial: t,
|
|
@@ -1170,15 +1146,15 @@ function dt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1170
1146
|
}
|
|
1171
1147
|
//#endregion
|
|
1172
1148
|
//#region src/transition/cupertino.ts
|
|
1173
|
-
var
|
|
1149
|
+
var Qe = (e, t, n) => {
|
|
1174
1150
|
let [r, i] = t, [a, o] = n;
|
|
1175
1151
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1176
|
-
},
|
|
1152
|
+
}, $e = 30, et = .7, tt = [
|
|
1177
1153
|
.32,
|
|
1178
1154
|
.72,
|
|
1179
1155
|
0,
|
|
1180
1156
|
1
|
|
1181
|
-
],
|
|
1157
|
+
], nt = Xe({
|
|
1182
1158
|
name: "cupertino",
|
|
1183
1159
|
initial: { x: "100%" },
|
|
1184
1160
|
idle: {
|
|
@@ -1188,29 +1164,29 @@ var ft = (e, t, n) => {
|
|
|
1188
1164
|
enter: {
|
|
1189
1165
|
value: { x: 0 },
|
|
1190
1166
|
options: {
|
|
1191
|
-
duration:
|
|
1192
|
-
ease:
|
|
1167
|
+
duration: et,
|
|
1168
|
+
ease: tt
|
|
1193
1169
|
}
|
|
1194
1170
|
},
|
|
1195
1171
|
enterBack: {
|
|
1196
1172
|
value: { x: "100%" },
|
|
1197
1173
|
options: {
|
|
1198
|
-
duration:
|
|
1199
|
-
ease:
|
|
1174
|
+
duration: et,
|
|
1175
|
+
ease: tt
|
|
1200
1176
|
}
|
|
1201
1177
|
},
|
|
1202
1178
|
exit: {
|
|
1203
|
-
value: { x: `-${
|
|
1179
|
+
value: { x: `-${$e}%` },
|
|
1204
1180
|
options: {
|
|
1205
|
-
duration:
|
|
1206
|
-
ease:
|
|
1181
|
+
duration: et,
|
|
1182
|
+
ease: tt
|
|
1207
1183
|
}
|
|
1208
1184
|
},
|
|
1209
1185
|
exitBack: {
|
|
1210
1186
|
value: { x: 0 },
|
|
1211
1187
|
options: {
|
|
1212
|
-
duration:
|
|
1213
|
-
ease:
|
|
1188
|
+
duration: et,
|
|
1189
|
+
ease: tt
|
|
1214
1190
|
}
|
|
1215
1191
|
},
|
|
1216
1192
|
options: {
|
|
@@ -1218,24 +1194,24 @@ var ft = (e, t, n) => {
|
|
|
1218
1194
|
swipeDirection: "x",
|
|
1219
1195
|
onSwipeStart: async () => !0,
|
|
1220
1196
|
onSwipe: (e, t, { animate: n, currentScreen: r, prevScreen: i, onProgress: a }) => {
|
|
1221
|
-
let { offset: o } = t, s = o.x, c =
|
|
1222
|
-
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 +
|
|
1197
|
+
let { offset: o } = t, s = o.x, c = Qe(s, [0, window.innerWidth], [0, 100]);
|
|
1198
|
+
return a?.(!0, c), n(r, { x: Math.max(0, s) }, { duration: 0 }), n(i, { x: `${-30 + $e / 100 * c}%` }, { duration: 0 }), c;
|
|
1223
1199
|
},
|
|
1224
1200
|
onSwipeEnd: async (e, t, { animate: n, currentScreen: r, prevScreen: i, onStart: a }) => {
|
|
1225
1201
|
let { offset: o, velocity: s } = t, c = o.x > 50 || s.x > 20;
|
|
1226
1202
|
return a?.(c), await Promise.all([n(r, { x: c ? "100%" : 0 }, {
|
|
1227
|
-
duration:
|
|
1228
|
-
ease:
|
|
1229
|
-
}), n(i, { x: c ? 0 : `-${
|
|
1230
|
-
duration:
|
|
1231
|
-
ease:
|
|
1203
|
+
duration: et,
|
|
1204
|
+
ease: tt
|
|
1205
|
+
}), n(i, { x: c ? 0 : `-${$e}%` }, {
|
|
1206
|
+
duration: et,
|
|
1207
|
+
ease: tt
|
|
1232
1208
|
})]), c;
|
|
1233
1209
|
}
|
|
1234
1210
|
}
|
|
1235
|
-
}),
|
|
1211
|
+
}), rt = (e, t, n) => {
|
|
1236
1212
|
let [r, i] = t, [a, o] = n;
|
|
1237
1213
|
return i === r ? a : a + (e - r) / (i - r) * (o - a);
|
|
1238
|
-
},
|
|
1214
|
+
}, it = Xe({
|
|
1239
1215
|
name: "layout",
|
|
1240
1216
|
initial: { opacity: .97 },
|
|
1241
1217
|
idle: {
|
|
@@ -1263,7 +1239,7 @@ var ft = (e, t, n) => {
|
|
|
1263
1239
|
swipeDirection: "y",
|
|
1264
1240
|
onSwipeStart: async () => !0,
|
|
1265
1241
|
onSwipe: (e, t, { animate: n, currentScreen: r, onProgress: i }) => {
|
|
1266
|
-
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c =
|
|
1242
|
+
let { offset: a } = t, o = a.y, s = Math.max(0, Math.min(56, o)), c = rt(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);
|
|
1267
1243
|
return i?.(!0, 100), n(r, {
|
|
1268
1244
|
y: f,
|
|
1269
1245
|
opacity: c
|
|
@@ -1280,7 +1256,7 @@ var ft = (e, t, n) => {
|
|
|
1280
1256
|
}, { duration: .3 })]), c;
|
|
1281
1257
|
}
|
|
1282
1258
|
}
|
|
1283
|
-
}),
|
|
1259
|
+
}), at = Xe({
|
|
1284
1260
|
name: "material",
|
|
1285
1261
|
initial: { y: "100%" },
|
|
1286
1262
|
idle: {
|
|
@@ -1388,7 +1364,7 @@ var ft = (e, t, n) => {
|
|
|
1388
1364
|
})]), c;
|
|
1389
1365
|
}
|
|
1390
1366
|
}
|
|
1391
|
-
}),
|
|
1367
|
+
}), ot = Xe({
|
|
1392
1368
|
name: "none",
|
|
1393
1369
|
initial: {},
|
|
1394
1370
|
idle: {
|
|
@@ -1411,20 +1387,20 @@ var ft = (e, t, n) => {
|
|
|
1411
1387
|
value: {},
|
|
1412
1388
|
options: { duration: 0 }
|
|
1413
1389
|
}
|
|
1414
|
-
}),
|
|
1415
|
-
["none",
|
|
1416
|
-
["cupertino",
|
|
1417
|
-
["material",
|
|
1418
|
-
["layout",
|
|
1390
|
+
}), st = /* @__PURE__ */ new Map([
|
|
1391
|
+
["none", ot],
|
|
1392
|
+
["cupertino", nt],
|
|
1393
|
+
["material", at],
|
|
1394
|
+
["layout", it]
|
|
1419
1395
|
]);
|
|
1420
1396
|
//#endregion
|
|
1421
1397
|
//#region src/transition/resolveTransition.ts
|
|
1422
|
-
function
|
|
1423
|
-
return
|
|
1398
|
+
function ct(e) {
|
|
1399
|
+
return st.get(e) ?? st.get("none");
|
|
1424
1400
|
}
|
|
1425
1401
|
//#endregion
|
|
1426
1402
|
//#region src/transition/decorator/createDecorator.ts
|
|
1427
|
-
function
|
|
1403
|
+
function lt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1428
1404
|
return {
|
|
1429
1405
|
name: e,
|
|
1430
1406
|
initial: t,
|
|
@@ -1445,7 +1421,7 @@ function Ct({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1445
1421
|
}
|
|
1446
1422
|
//#endregion
|
|
1447
1423
|
//#region src/transition/decorator/createRawDecorator.ts
|
|
1448
|
-
function
|
|
1424
|
+
function ut({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1449
1425
|
return {
|
|
1450
1426
|
name: e,
|
|
1451
1427
|
initial: t,
|
|
@@ -1466,30 +1442,30 @@ function wt({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1466
1442
|
}
|
|
1467
1443
|
//#endregion
|
|
1468
1444
|
//#region src/transition/decorator/overlay.ts
|
|
1469
|
-
var
|
|
1445
|
+
var dt = "rgba(0, 0, 0, 0.1)", ft = lt({
|
|
1470
1446
|
name: "overlay",
|
|
1471
1447
|
initial: {
|
|
1472
1448
|
opacity: 0,
|
|
1473
|
-
backgroundColor:
|
|
1449
|
+
backgroundColor: dt
|
|
1474
1450
|
},
|
|
1475
1451
|
idle: {
|
|
1476
1452
|
value: {
|
|
1477
1453
|
opacity: 0,
|
|
1478
|
-
backgroundColor:
|
|
1454
|
+
backgroundColor: dt
|
|
1479
1455
|
},
|
|
1480
1456
|
options: { duration: 0 }
|
|
1481
1457
|
},
|
|
1482
1458
|
enter: {
|
|
1483
1459
|
value: {
|
|
1484
1460
|
opacity: 1,
|
|
1485
|
-
backgroundColor:
|
|
1461
|
+
backgroundColor: dt
|
|
1486
1462
|
},
|
|
1487
1463
|
options: { duration: .7 }
|
|
1488
1464
|
},
|
|
1489
1465
|
exit: {
|
|
1490
1466
|
value: {
|
|
1491
1467
|
opacity: 0,
|
|
1492
|
-
backgroundColor:
|
|
1468
|
+
backgroundColor: dt
|
|
1493
1469
|
},
|
|
1494
1470
|
options: { duration: .7 }
|
|
1495
1471
|
},
|
|
@@ -1498,10 +1474,10 @@ var Tt = "rgba(0, 0, 0, 0.1)", Et = Ct({
|
|
|
1498
1474
|
onSwipe: (e, t, { animate: n, prevDecorator: r }) => n(r, { opacity: Math.max(0, 1 - t / 100) }, { duration: 0 }),
|
|
1499
1475
|
onSwipeEnd: (e, { animate: t, prevDecorator: n }) => t(n, { opacity: +!e }, { duration: .3 })
|
|
1500
1476
|
}
|
|
1501
|
-
}),
|
|
1477
|
+
}), pt = /* @__PURE__ */ new Map([["overlay", ft]]);
|
|
1502
1478
|
//#endregion
|
|
1503
1479
|
//#region src/transition/partTransition/createPartTransition.ts
|
|
1504
|
-
function
|
|
1480
|
+
function mt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
1505
1481
|
return {
|
|
1506
1482
|
name: e,
|
|
1507
1483
|
initial: t,
|
|
@@ -1522,7 +1498,7 @@ function Dt({ name: e, initial: t, idle: n, enter: r, exit: i, options: a }) {
|
|
|
1522
1498
|
}
|
|
1523
1499
|
//#endregion
|
|
1524
1500
|
//#region src/transition/partTransition/createRawPartTransition.ts
|
|
1525
|
-
function
|
|
1501
|
+
function ht({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, replaceOnEnter: a, replaceOnExit: o, popOnEnter: s, popOnExit: c, completedOnEnter: l, completedOnExit: u, options: d }) {
|
|
1526
1502
|
return {
|
|
1527
1503
|
name: e,
|
|
1528
1504
|
initial: t,
|
|
@@ -1543,7 +1519,7 @@ function Ot({ name: e, initial: t, idle: n, pushOnEnter: r, pushOnExit: i, repla
|
|
|
1543
1519
|
}
|
|
1544
1520
|
//#endregion
|
|
1545
1521
|
//#region src/transition/partTransition/partTransition.ts
|
|
1546
|
-
var
|
|
1522
|
+
var gt = /* @__PURE__ */ new Map(), _t = {
|
|
1547
1523
|
"IDLE-true": "self",
|
|
1548
1524
|
"IDLE-false": "self",
|
|
1549
1525
|
"PUSHING-true": "initial",
|
|
@@ -1554,17 +1530,17 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1554
1530
|
"POPPING-false": "PUSHING-false",
|
|
1555
1531
|
"COMPLETED-true": "self",
|
|
1556
1532
|
"COMPLETED-false": "self"
|
|
1557
|
-
},
|
|
1533
|
+
}, vt = Object.keys(_t), yt = (e) => {
|
|
1558
1534
|
if (!e) return 0;
|
|
1559
1535
|
let t = e.duration;
|
|
1560
1536
|
return typeof t == "number" && t >= 0 ? t : 0;
|
|
1561
|
-
},
|
|
1562
|
-
let n =
|
|
1537
|
+
}, bt = (e) => e && typeof e.delay == "number" && e.delay > 0 ? e.delay : 0, xt = (e, t) => {
|
|
1538
|
+
let n = _t[t];
|
|
1563
1539
|
return n === "self" ? null : n === "initial" ? e.initial : e.variants[n].value;
|
|
1564
|
-
},
|
|
1565
|
-
let n =
|
|
1540
|
+
}, z = (e, t) => {
|
|
1541
|
+
let n = xt(e, t);
|
|
1566
1542
|
if (n === null) return null;
|
|
1567
|
-
let r = e.variants[t], i =
|
|
1543
|
+
let r = e.variants[t], i = yt(r.options), a = bt(r.options);
|
|
1568
1544
|
return i <= 0 && a <= 0 ? null : {
|
|
1569
1545
|
from: n,
|
|
1570
1546
|
to: r.value,
|
|
@@ -1572,7 +1548,47 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1572
1548
|
delay: a,
|
|
1573
1549
|
ease: r.options?.ease
|
|
1574
1550
|
};
|
|
1575
|
-
},
|
|
1551
|
+
}, St = "data-flemo-", Ct = "data-flemo-screen", wt = "data-flemo-status", Tt = "data-flemo-active", Et = "data-flemo-transition", Dt = "data-flemo-router", Ot = "data-flemo-skip-animation", kt = "data-flemo-bar", At = "data-flemo-bar-active", jt = "data-flemo-bar-status", Mt = "data-flemo-bar-riding", Nt = "data-flemo-bar-id", Pt = "data-flemo-bar-id-type", Ft = "data-flemo-bar-transition", It = "data-flemo-bar-spacer", Lt = "data-flemo-decorator", Rt = "data-flemo-decorator-name", B = "data-flemo-part-name", V = "data-flemo-anim-hold", zt = {
|
|
1552
|
+
HELD: "true",
|
|
1553
|
+
RELEASED: "false",
|
|
1554
|
+
PARK: "park",
|
|
1555
|
+
PARK_UNDER: "park-under",
|
|
1556
|
+
PARK_OVER: "park-over"
|
|
1557
|
+
}, Bt = [
|
|
1558
|
+
zt.HELD,
|
|
1559
|
+
zt.PARK,
|
|
1560
|
+
zt.PARK_UNDER,
|
|
1561
|
+
zt.PARK_OVER
|
|
1562
|
+
], Vt = "data-flemo-held-arrival", Ht = "data-flemo-img-hold", Ut = "data-flemo-governed", Wt = "data-flemo-creep", Gt = "data-flemo-desk-head", Kt = "data-flemo-warm", qt = "data-flemo-warm-video", Jt = "data-flemo-gpu-prewarm", H = "data-flemo-image-src", Yt = "data-flemo-devtools-panel", U = (e) => `[${e}]`, W = (e, t) => `[${e}="${t}"]`, Xt = [
|
|
1563
|
+
Ct,
|
|
1564
|
+
wt,
|
|
1565
|
+
Tt,
|
|
1566
|
+
Et,
|
|
1567
|
+
Dt,
|
|
1568
|
+
Ot,
|
|
1569
|
+
kt,
|
|
1570
|
+
At,
|
|
1571
|
+
jt,
|
|
1572
|
+
Mt,
|
|
1573
|
+
Nt,
|
|
1574
|
+
Pt,
|
|
1575
|
+
Ft,
|
|
1576
|
+
It,
|
|
1577
|
+
Lt,
|
|
1578
|
+
Rt,
|
|
1579
|
+
B,
|
|
1580
|
+
V,
|
|
1581
|
+
Vt,
|
|
1582
|
+
Ht,
|
|
1583
|
+
Ut,
|
|
1584
|
+
Wt,
|
|
1585
|
+
Gt,
|
|
1586
|
+
Kt,
|
|
1587
|
+
qt,
|
|
1588
|
+
Jt,
|
|
1589
|
+
H,
|
|
1590
|
+
Yt
|
|
1591
|
+
], Zt = vt, Qt = "translateZ(0.02px)", $t = (e) => e.replace(/[^a-zA-Z0-9_-]/g, "_"), en = (e) => typeof e == "object" && !!e && !Array.isArray(e), tn = /* @__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(".")), nn = (e, t) => t.startsWith("--") || tn.has(t) ? `${e}` : t === "rotate" || t === "rotateX" || t === "rotateY" || t === "rotateZ" ? `${e}deg` : `${e}px`, rn = (e, t) => typeof t == "number" ? nn(t, e) : typeof t == "string" ? t : "", an = (e) => e.replace(/[A-Z]/g, (e) => `-${e.toLowerCase()}`), on = /* @__PURE__ */ new Set([
|
|
1576
1592
|
"x",
|
|
1577
1593
|
"y",
|
|
1578
1594
|
"z",
|
|
@@ -1583,7 +1599,7 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1583
1599
|
"rotateX",
|
|
1584
1600
|
"rotateY",
|
|
1585
1601
|
"rotateZ"
|
|
1586
|
-
]),
|
|
1602
|
+
]), sn = /^-?0(\.0+)?(px|%|em|rem|vh|vw|vmin|vmax)?$/, cn = /^-?0(\.0+)?(deg|rad|grad|turn)?$/, ln = /^1(\.0+)?$/, un = (e, t) => e === "scale" || e === "scaleX" || e === "scaleY" ? t === 1 || typeof t == "string" && ln.test(t.trim()) : e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? t === 0 || typeof t == "string" && cn.test(t.trim()) : t === 0 || typeof t == "string" && sn.test(t.trim()), dn = (e, t) => {
|
|
1587
1603
|
switch (e) {
|
|
1588
1604
|
case "x": return `translate3d(${t}, 0, 0)`;
|
|
1589
1605
|
case "y": return `translate3d(0, ${t}, 0)`;
|
|
@@ -1597,16 +1613,16 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1597
1613
|
case "rotateY": return `rotateY(${t})`;
|
|
1598
1614
|
default: return "";
|
|
1599
1615
|
}
|
|
1600
|
-
},
|
|
1616
|
+
}, fn = (e) => {
|
|
1601
1617
|
let t = /* @__PURE__ */ new Map(), n = !1, r = /* @__PURE__ */ new Set(), i = (e) => {
|
|
1602
|
-
if (!
|
|
1618
|
+
if (!en(e)) return;
|
|
1603
1619
|
let n = [];
|
|
1604
1620
|
for (let r of Object.keys(e)) {
|
|
1605
|
-
let i = e[r], a =
|
|
1606
|
-
if (a !== "") if (
|
|
1621
|
+
let i = e[r], a = rn(r, i);
|
|
1622
|
+
if (a !== "") if (on.has(r)) n.push(`${r}:${a}`);
|
|
1607
1623
|
else {
|
|
1608
|
-
let e = t.get(
|
|
1609
|
-
e.add(a), t.set(
|
|
1624
|
+
let e = t.get(an(r)) ?? /* @__PURE__ */ new Set();
|
|
1625
|
+
e.add(a), t.set(an(r), e);
|
|
1610
1626
|
}
|
|
1611
1627
|
}
|
|
1612
1628
|
r.add(n.sort().join("|"));
|
|
@@ -1616,13 +1632,13 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1616
1632
|
n = r.size > 1;
|
|
1617
1633
|
let a = Array.from(t.entries()).filter(([, e]) => e.size > 1).map(([e]) => e);
|
|
1618
1634
|
return n && a.push("transform"), a;
|
|
1619
|
-
},
|
|
1620
|
-
if (!
|
|
1635
|
+
}, pn = (e) => {
|
|
1636
|
+
if (!en(e)) return [];
|
|
1621
1637
|
let t = [], n = !0, r = [];
|
|
1622
1638
|
for (let i of Object.keys(e)) {
|
|
1623
|
-
let a = e[i], o =
|
|
1624
|
-
o !== "" && (
|
|
1625
|
-
property:
|
|
1639
|
+
let a = e[i], o = rn(i, a);
|
|
1640
|
+
o !== "" && (on.has(i) ? (t.push(dn(i, o)), un(i, a) || (n = !1)) : r.push({
|
|
1641
|
+
property: an(i),
|
|
1626
1642
|
value: o
|
|
1627
1643
|
}));
|
|
1628
1644
|
}
|
|
@@ -1630,7 +1646,7 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1630
1646
|
property: "transform",
|
|
1631
1647
|
value: n ? "none" : t.join(" ")
|
|
1632
1648
|
}), r;
|
|
1633
|
-
},
|
|
1649
|
+
}, G = (e) => e.map((e) => ` ${e.property}: ${e.value};`).join("\n"), mn = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? `cubic-bezier(${e.join(", ")})` : "linear" : typeof e == "string" ? {
|
|
1634
1650
|
linear: "linear",
|
|
1635
1651
|
easeIn: "ease-in",
|
|
1636
1652
|
easeOut: "ease-out",
|
|
@@ -1640,33 +1656,33 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1640
1656
|
backIn: "cubic-bezier(0.31, 0.01, 0.66, -0.59)",
|
|
1641
1657
|
backOut: "cubic-bezier(0.33, 1.53, 0.69, 0.99)",
|
|
1642
1658
|
anticipate: "cubic-bezier(0.36, 0, 0.66, -0.56)"
|
|
1643
|
-
}[e] ?? "ease" : "ease",
|
|
1659
|
+
}[e] ?? "ease" : "ease", hn = (e, t) => {
|
|
1644
1660
|
let [n, r] = t.split("-");
|
|
1645
|
-
return
|
|
1646
|
-
},
|
|
1661
|
+
return U(Ct) + W(Et, e) + W(wt, n) + W(Tt, r);
|
|
1662
|
+
}, gn = (e, t) => {
|
|
1647
1663
|
let [n, r] = t.split("-");
|
|
1648
|
-
return
|
|
1649
|
-
},
|
|
1664
|
+
return U(Lt) + W(Rt, e) + W(wt, n) + W(Tt, r);
|
|
1665
|
+
}, _n = (e, t) => {
|
|
1650
1666
|
let [n, r] = t.split("-");
|
|
1651
|
-
return
|
|
1652
|
-
},
|
|
1667
|
+
return U(kt) + W(Ft, e) + W(jt, n) + W(At, r) + W(Mt, "true");
|
|
1668
|
+
}, vn = (e, t) => {
|
|
1653
1669
|
let [n, r] = t.split("-");
|
|
1654
|
-
return
|
|
1655
|
-
},
|
|
1670
|
+
return W(B, e) + W(wt, n) + W(Tt, r);
|
|
1671
|
+
}, yn = (e, t, n) => `flemo-${e}-${$t(t)}-${n}`, bn = [
|
|
1656
1672
|
"-gov",
|
|
1657
1673
|
"-deskhead",
|
|
1658
1674
|
"-govcreep"
|
|
1659
|
-
],
|
|
1660
|
-
let o =
|
|
1675
|
+
], xn = (e, t) => e === t || bn.some((n) => e === `${t}${n}`), Sn = (e, t, n, r, i, a) => {
|
|
1676
|
+
let o = pn(r), s = pn(i.value), c = new Set(o.filter((e) => s.some((t) => t.property === e.property && t.value === e.value)).map((e) => e.property)), l = o.filter((e) => c.has(e.property)), u = o.filter((e) => !c.has(e.property)), d = s.filter((e) => !c.has(e.property)), f = yt(i.options), p = bt(i.options), m = mn(i.options?.ease), h = a(t, n), g = e === "screen" ? `${h},\n${_n(t, n)}` : h;
|
|
1661
1677
|
if (s.length === 0 && o.length === 0) return "";
|
|
1662
|
-
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${
|
|
1663
|
-
let _ =
|
|
1678
|
+
if (f <= 0 && p <= 0) return s.length === 0 ? "" : `${g} {\n${G(s)}\n animation: none;\n}`;
|
|
1679
|
+
let _ = yn(e, t, n), v = [
|
|
1664
1680
|
`@keyframes ${_} {`,
|
|
1665
1681
|
" from {",
|
|
1666
|
-
|
|
1682
|
+
G(u).replace(/^/gm, " "),
|
|
1667
1683
|
" }",
|
|
1668
1684
|
" to {",
|
|
1669
|
-
|
|
1685
|
+
G(d).replace(/^/gm, " "),
|
|
1670
1686
|
" }",
|
|
1671
1687
|
"}"
|
|
1672
1688
|
].join("\n"), y = [
|
|
@@ -1678,7 +1694,7 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1678
1694
|
].filter(Boolean).join(" "), b = (e) => e.startsWith("REPLACING") ? .18 : e.startsWith("PUSHING") ? .1 : e.startsWith("POPPING") ? .08 : 0, x = (e) => e.startsWith("REPLACING") || e.startsWith("PUSHING") ? .033 : e.startsWith("POPPING") ? .017 : 0, S = (t, n, r, i) => {
|
|
1679
1695
|
if (e === "part" || r <= 0 || f <= 0 || o.length === 0 && s.length === 0) return "";
|
|
1680
1696
|
let a = f + r, c = (r / a * 100).toFixed(3), l = `${_}-${n}`, m = g.split(",\n").map((e) => `:root[${t}] ${e}`).join(",\n");
|
|
1681
|
-
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${
|
|
1697
|
+
return `\n@keyframes ${l} {\n 0%, ${c}% {\n${G(u).replace(/^/gm, " ")}\n }\n 100% {\n${G(d).replace(/^/gm, " ")}\n }\n}\n${m} {\n animation-name: ${l};\n animation-duration: ${a.toFixed(3)}s;\n animation-delay: ${(i ? p + r : p).toFixed(3)}s;\n}`;
|
|
1682
1698
|
}, C = (t, n) => e !== "part" || n <= 0 || f <= 0 ? "" : `\n${((e = "") => g.split(",\n").map((n) => `:root[${t}]${e} ${n}`).join(",\n"))()} {\n animation-delay: ${(p + n).toFixed(3)}s;\n}`, w = (() => {
|
|
1683
1699
|
/* v8 ignore next */
|
|
1684
1700
|
if (e === "part") return "";
|
|
@@ -1690,126 +1706,119 @@ var z = /* @__PURE__ */ new Map(), kt = {
|
|
|
1690
1706
|
let e = u.find((e) => e.property === "transform");
|
|
1691
1707
|
if (!e) return [...u, {
|
|
1692
1708
|
property: "transform",
|
|
1693
|
-
value:
|
|
1709
|
+
value: Qt
|
|
1694
1710
|
}];
|
|
1695
1711
|
let t = e.value === "none" ? "" : `${e.value} `;
|
|
1696
1712
|
return u.map((e) => e.property === "transform" ? {
|
|
1697
1713
|
property: "transform",
|
|
1698
|
-
value: `${t}${
|
|
1714
|
+
value: `${t}${Qt}`
|
|
1699
1715
|
} : e);
|
|
1700
|
-
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-govcreep`, l = g.split(",\n").map((e) => `:root
|
|
1701
|
-
return `\n@keyframes ${c} {\n 0% {\n${
|
|
1702
|
-
})(), T = S(
|
|
1703
|
-
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${
|
|
1704
|
-
},
|
|
1716
|
+
})(), i = f + t, a = (t / i * 100).toFixed(3), c = `${_}-govcreep`, l = g.split(",\n").map((e) => `:root${U(Ut)}${U(Wt)} ${e}`).join(",\n");
|
|
1717
|
+
return `\n@keyframes ${c} {\n 0% {\n${G(u).replace(/^/gm, " ")}\n }\n ${a}% {\n${G(r).replace(/^/gm, " ")}\n }\n 100% {\n${G(d).replace(/^/gm, " ")}\n }\n}\n${l} {\n animation-name: ${c};\n animation-duration: ${i.toFixed(3)}s;\n animation-delay: ${(p + t).toFixed(3)}s;\n}`;
|
|
1718
|
+
})(), T = S(Ut, "gov", b(n), !0), E = C(Ut, b(n)), D = S(Gt, "deskhead", x(n), !1), O = C(Gt, x(n)), k = new Map(u.map((e) => [e.property, e.value])), A = new Map(d.map((e) => [e.property, e.value])), j = Array.from(/* @__PURE__ */ new Set([...k.keys(), ...A.keys()])).filter((e) => k.get(e) !== A.get(e)), ee = j.length > 0 ? ` will-change: ${j.join(", ")};\n` : "", te = n.split("-")[0], ne = te === "PUSHING" || te === "REPLACING" ? " contain: layout;\n" : "";
|
|
1719
|
+
return `${v}\n${`${g} {\n animation: ${y};\n${l.length > 0 ? `${G(l)}\n` : ""}${ee}${ne}}`}${T}${E}${w}${D}${O}${e === "screen" && n.endsWith("-false") && Cn(r) && s.length > 0 ? `\n${h}${W(V, zt.PARK)} {\n animation: none;\n${G(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && Cn(r) && s.length > 0 ? `\n${h}${W(V, zt.PARK_UNDER)} {\n animation: none;\n${G(s)}\n}` : ""}${e === "screen" && n.endsWith("-true") && (n.startsWith("PUSHING") || n.startsWith("REPLACING")) && Cn(r) && s.length > 0 ? `\n${h}${W(V, zt.PARK_OVER)} {\n animation: none;\n${G(s)}\n opacity: 0.02;\n}` : ""}`;
|
|
1720
|
+
}, Cn = (e) => {
|
|
1705
1721
|
if (!e) return !1;
|
|
1706
1722
|
if (e.opacity === 0) return !0;
|
|
1707
1723
|
let t = (e) => typeof e == "string" && e.trim().endsWith("%") && Math.abs(parseFloat(e)) >= 100;
|
|
1708
1724
|
return t(e.x) || t(e.y);
|
|
1709
|
-
},
|
|
1710
|
-
let i =
|
|
1711
|
-
return i.length === 0 ? "" : `${e(t, n)} {\n${
|
|
1712
|
-
},
|
|
1725
|
+
}, wn = (e, t, n, r) => {
|
|
1726
|
+
let i = pn(r.value);
|
|
1727
|
+
return i.length === 0 ? "" : `${e(t, n)} {\n${G(i)}\n}`;
|
|
1728
|
+
}, Tn = (e, t, n = []) => {
|
|
1713
1729
|
let r = [];
|
|
1714
1730
|
for (let t of e) {
|
|
1715
1731
|
let e = t.name;
|
|
1716
|
-
for (let n of
|
|
1717
|
-
let i = t.variants[n], a =
|
|
1732
|
+
for (let n of vt) {
|
|
1733
|
+
let i = t.variants[n], a = _t[n];
|
|
1718
1734
|
if (a === "self") {
|
|
1719
|
-
r.push(
|
|
1735
|
+
r.push(wn(hn, e, n, i));
|
|
1720
1736
|
continue;
|
|
1721
1737
|
}
|
|
1722
1738
|
let o = a === "initial" ? t.initial : t.variants[a].value;
|
|
1723
|
-
r.push(
|
|
1739
|
+
r.push(Sn("screen", e, n, o, i, hn));
|
|
1724
1740
|
}
|
|
1725
1741
|
}
|
|
1726
1742
|
for (let e of t) {
|
|
1727
1743
|
let t = e.name;
|
|
1728
|
-
for (let n of
|
|
1729
|
-
let i = e.variants[n], a =
|
|
1744
|
+
for (let n of Zt) {
|
|
1745
|
+
let i = e.variants[n], a = _t[n];
|
|
1730
1746
|
if (a === "self") {
|
|
1731
|
-
r.push(
|
|
1747
|
+
r.push(wn(gn, t, n, i));
|
|
1732
1748
|
continue;
|
|
1733
1749
|
}
|
|
1734
1750
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1735
|
-
r.push(
|
|
1751
|
+
r.push(Sn("decorator", t, n, o, i, gn));
|
|
1736
1752
|
}
|
|
1737
1753
|
}
|
|
1738
1754
|
for (let e of n) {
|
|
1739
1755
|
let t = e.name;
|
|
1740
|
-
for (let n of
|
|
1741
|
-
let i = e.variants[n], a =
|
|
1756
|
+
for (let n of Zt) {
|
|
1757
|
+
let i = e.variants[n], a = _t[n];
|
|
1742
1758
|
if (a === "self") {
|
|
1743
|
-
r.push(
|
|
1759
|
+
r.push(wn(vn, t, n, i));
|
|
1744
1760
|
continue;
|
|
1745
1761
|
}
|
|
1746
1762
|
let o = a === "initial" ? e.initial : e.variants[a].value;
|
|
1747
|
-
r.push(
|
|
1763
|
+
r.push(Sn("part", t, n, o, i, vn));
|
|
1748
1764
|
}
|
|
1749
1765
|
}
|
|
1750
1766
|
return [
|
|
1751
1767
|
...r.filter((e) => e.length > 0),
|
|
1752
|
-
|
|
1753
|
-
|
|
1768
|
+
En,
|
|
1769
|
+
Dn
|
|
1754
1770
|
].join("\n\n");
|
|
1755
|
-
},
|
|
1756
|
-
|
|
1757
|
-
"[data-flemo-anim-hold=\"park\"],",
|
|
1758
|
-
"[data-flemo-anim-hold=\"park-under\"],",
|
|
1759
|
-
"[data-flemo-anim-hold=\"park-over\"],",
|
|
1760
|
-
"[data-flemo-anim-hold=\"true\"] [data-flemo-part-name],",
|
|
1761
|
-
"[data-flemo-anim-hold=\"park\"] [data-flemo-part-name],",
|
|
1762
|
-
"[data-flemo-anim-hold=\"park-under\"] [data-flemo-part-name],",
|
|
1763
|
-
"[data-flemo-anim-hold=\"park-over\"] [data-flemo-part-name] {",
|
|
1771
|
+
}, En = [
|
|
1772
|
+
[...Bt.map((e) => W(V, e)), ...Bt.map((e) => `${W(V, e)} ${U(B)}`)].join(",\n") + " {",
|
|
1764
1773
|
" animation-play-state: paused !important;",
|
|
1765
1774
|
"}"
|
|
1766
|
-
].join("\n"),
|
|
1767
|
-
|
|
1775
|
+
].join("\n"), Dn = [
|
|
1776
|
+
`${U(Vt)} {`,
|
|
1768
1777
|
" display: none !important;",
|
|
1769
1778
|
"}"
|
|
1770
|
-
].join("\n"),
|
|
1771
|
-
let n =
|
|
1779
|
+
].join("\n"), K = (e, t) => {
|
|
1780
|
+
let n = _t[t];
|
|
1772
1781
|
if (n === "self") return !1;
|
|
1773
|
-
let r = e.variants[t], i =
|
|
1782
|
+
let r = e.variants[t], i = yt(r.options), a = bt(r.options);
|
|
1774
1783
|
if (i <= 0 && a <= 0) return !1;
|
|
1775
|
-
let o =
|
|
1784
|
+
let o = pn(n === "initial" ? e.initial : e.variants[n].value), s = pn(r.value);
|
|
1776
1785
|
return o.length > 0 || s.length > 0;
|
|
1777
|
-
},
|
|
1786
|
+
}, On = {
|
|
1778
1787
|
REPLACING: 33,
|
|
1779
1788
|
PUSHING: 33,
|
|
1780
1789
|
POPPING: 17
|
|
1781
|
-
},
|
|
1790
|
+
}, kn = {
|
|
1782
1791
|
REPLACING: 180,
|
|
1783
1792
|
PUSHING: 100,
|
|
1784
1793
|
POPPING: 80
|
|
1785
|
-
},
|
|
1786
|
-
function
|
|
1794
|
+
}, An = "data-flemo";
|
|
1795
|
+
function jn() {
|
|
1787
1796
|
if (f()) return;
|
|
1788
|
-
let e =
|
|
1789
|
-
t || (t = document.createElement("style"), t.setAttribute(
|
|
1797
|
+
let e = Tn(st.values(), pt.values(), gt.values()), t = document.head.querySelector(`style[${An}]`);
|
|
1798
|
+
t || (t = document.createElement("style"), t.setAttribute(An, ""), document.head.appendChild(t)), t.textContent !== e && (t.textContent = e);
|
|
1790
1799
|
}
|
|
1791
1800
|
//#endregion
|
|
1792
1801
|
//#region src/transition/registerTransitionDefinitions.ts
|
|
1793
|
-
var
|
|
1802
|
+
var Mn = /* @__PURE__ */ new Map(), Nn = /* @__PURE__ */ new Map(), Pn = /* @__PURE__ */ new Map(), Fn = (e, t) => {
|
|
1794
1803
|
e.set(t, (e.get(t) ?? 0) + 1);
|
|
1795
|
-
},
|
|
1804
|
+
}, In = (e, t) => {
|
|
1796
1805
|
let n = (e.get(t) ?? 1) - 1;
|
|
1797
1806
|
return n <= 0 ? (e.delete(t), !0) : (e.set(t, n), !1);
|
|
1798
1807
|
};
|
|
1799
|
-
function
|
|
1800
|
-
for (let t of e)
|
|
1801
|
-
for (let e of t)
|
|
1802
|
-
for (let e of n)
|
|
1803
|
-
return
|
|
1804
|
-
for (let t of e)
|
|
1805
|
-
for (let e of t)
|
|
1806
|
-
for (let e of n)
|
|
1807
|
-
|
|
1808
|
+
function Ln(e, t, n = []) {
|
|
1809
|
+
for (let t of e) st.set(t.name, t), Fn(Mn, t.name);
|
|
1810
|
+
for (let e of t) pt.set(e.name, e), Fn(Nn, e.name);
|
|
1811
|
+
for (let e of n) gt.set(e.name, e), Fn(Pn, e.name);
|
|
1812
|
+
return jn(), () => {
|
|
1813
|
+
for (let t of e) In(Mn, t.name) && st.delete(t.name);
|
|
1814
|
+
for (let e of t) In(Nn, e.name) && pt.delete(e.name);
|
|
1815
|
+
for (let e of n) In(Pn, e.name) && gt.delete(e.name);
|
|
1816
|
+
jn();
|
|
1808
1817
|
};
|
|
1809
1818
|
}
|
|
1810
1819
|
//#endregion
|
|
1811
1820
|
//#region src/transition/enteringInitialStyle.ts
|
|
1812
|
-
function
|
|
1821
|
+
function Rn(e) {
|
|
1813
1822
|
let { initial: t, isActive: n, status: r } = e;
|
|
1814
1823
|
if (!n || r !== "PUSHING" && r !== "REPLACING") return {};
|
|
1815
1824
|
let i = {};
|
|
@@ -1817,19 +1826,19 @@ function xn(e) {
|
|
|
1817
1826
|
}
|
|
1818
1827
|
//#endregion
|
|
1819
1828
|
//#region src/transition/animateInline.ts
|
|
1820
|
-
var
|
|
1821
|
-
let r =
|
|
1822
|
-
r || (r = /* @__PURE__ */ new Map(),
|
|
1829
|
+
var zn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Bn = /* @__PURE__ */ new WeakMap(), Vn = Symbol("flemo-inline-writer"), Hn = /* @__PURE__ */ new WeakMap(), Un = (e, t, n = Vn) => {
|
|
1830
|
+
let r = Bn.get(e);
|
|
1831
|
+
r || (r = /* @__PURE__ */ new Map(), Bn.set(e, r));
|
|
1823
1832
|
let i = r.get(t);
|
|
1824
1833
|
i || (i = {
|
|
1825
1834
|
original: e.style.getPropertyValue(t),
|
|
1826
1835
|
owners: /* @__PURE__ */ new Set()
|
|
1827
1836
|
}, r.set(t, i)), i.owners.add(n);
|
|
1828
|
-
},
|
|
1829
|
-
|
|
1830
|
-
},
|
|
1831
|
-
let r =
|
|
1832
|
-
(!n ||
|
|
1837
|
+
}, Wn = (e, t) => {
|
|
1838
|
+
zn(e) && (Un(e, "transition", t), e.style.transition = "none", Hn.set(e, t));
|
|
1839
|
+
}, q = (e, t, n) => {
|
|
1840
|
+
let r = Bn.get(e);
|
|
1841
|
+
(!n || Hn.get(e) === n) && (e.style.transition = "", Hn.delete(e));
|
|
1833
1842
|
let i = (t) => {
|
|
1834
1843
|
let i = r?.get(t);
|
|
1835
1844
|
if (!i) {
|
|
@@ -1847,19 +1856,19 @@ var Sn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Cn = /* @_
|
|
|
1847
1856
|
return;
|
|
1848
1857
|
}
|
|
1849
1858
|
n || (e.style.removeProperty("transform"), e.style.removeProperty("opacity"));
|
|
1850
|
-
},
|
|
1851
|
-
if (!
|
|
1852
|
-
let i = e, a =
|
|
1859
|
+
}, J = (e, t, n = {}, r) => {
|
|
1860
|
+
if (!zn(e)) return Promise.resolve();
|
|
1861
|
+
let i = e, a = pn(t);
|
|
1853
1862
|
if (a.length === 0) return Promise.resolve();
|
|
1854
|
-
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c =
|
|
1863
|
+
let o = typeof n.duration == "number" ? n.duration : 0, s = typeof n.delay == "number" && n.delay > 0 ? n.delay : 0, c = mn(n.ease);
|
|
1855
1864
|
if (o <= 0 && s <= 0) {
|
|
1856
|
-
i.style.transition = "none",
|
|
1857
|
-
for (let e of a)
|
|
1865
|
+
i.style.transition = "none", Hn.set(i, r);
|
|
1866
|
+
for (let e of a) Un(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1858
1867
|
return Promise.resolve();
|
|
1859
1868
|
}
|
|
1860
1869
|
let l = a.map((e) => `${e.property} ${o}s ${c} ${s}s`).join(", ");
|
|
1861
|
-
i.style.transition = l,
|
|
1862
|
-
for (let e of a)
|
|
1870
|
+
i.style.transition = l, Hn.set(i, r), i.offsetWidth;
|
|
1871
|
+
for (let e of a) Un(i, e.property, r), i.style.setProperty(e.property, e.value);
|
|
1863
1872
|
return new Promise((e) => {
|
|
1864
1873
|
let t = !1, n = () => {
|
|
1865
1874
|
t || (t = !0, i.removeEventListener("transitionend", r), e());
|
|
@@ -1868,65 +1877,95 @@ var Sn = (e) => typeof HTMLElement < "u" && e instanceof HTMLElement, Cn = /* @_
|
|
|
1868
1877
|
};
|
|
1869
1878
|
i.addEventListener("transitionend", r), setTimeout(n, (o + s) * 1e3 + 60);
|
|
1870
1879
|
});
|
|
1871
|
-
},
|
|
1880
|
+
}, Gn = (e) => `${Math.round(e * 1e3) / 1e3}s`, Kn = (e) => {
|
|
1881
|
+
let { element: t, expectedName: n, motion: r } = e, i = !1, a = !1, o = (n) => {
|
|
1882
|
+
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" && (Un(t, "animation-delay", e.writer), t.style.animationDelay = Gn(n.seconds), a = !0), i = !1;
|
|
1883
|
+
}, s = (a) => {
|
|
1884
|
+
if (i || a.target !== t || !xn(a.animationName, n)) return;
|
|
1885
|
+
if (!e.isLive() || e.budgetUsed() >= 4) {
|
|
1886
|
+
e.onTerminal();
|
|
1887
|
+
return;
|
|
1888
|
+
}
|
|
1889
|
+
let s = Math.max(0, a.elapsedTime * 1e3), c = r.duration * 1e3;
|
|
1890
|
+
if (c > 0 && s >= c) {
|
|
1891
|
+
e.onTerminal();
|
|
1892
|
+
return;
|
|
1893
|
+
}
|
|
1894
|
+
if (e.spendBudget(), s <= 0) {
|
|
1895
|
+
o({ mode: "keep" });
|
|
1896
|
+
return;
|
|
1897
|
+
}
|
|
1898
|
+
o({
|
|
1899
|
+
mode: "set",
|
|
1900
|
+
seconds: -s / 1e3
|
|
1901
|
+
});
|
|
1902
|
+
};
|
|
1903
|
+
return {
|
|
1904
|
+
attach: () => {
|
|
1905
|
+
t.addEventListener("animationcancel", s);
|
|
1906
|
+
},
|
|
1907
|
+
detach: () => {
|
|
1908
|
+
t.removeEventListener("animationcancel", s), a &&= (q(t, ["animation-delay"], e.writer), !1);
|
|
1909
|
+
},
|
|
1910
|
+
fullRestart: () => {
|
|
1911
|
+
o({ mode: "clear" });
|
|
1912
|
+
}
|
|
1913
|
+
};
|
|
1914
|
+
}, qn = (e) => {
|
|
1872
1915
|
if (typeof e.querySelectorAll == "function") {
|
|
1873
1916
|
e.tagName === "IMG" && !e.hasAttribute("decoding") && e.setAttribute("decoding", "async");
|
|
1874
1917
|
for (let t of Array.from(e.querySelectorAll("img:not([decoding])"))) t.setAttribute("decoding", "async");
|
|
1875
1918
|
}
|
|
1876
|
-
},
|
|
1877
|
-
function
|
|
1878
|
-
let e =
|
|
1879
|
-
if (
|
|
1919
|
+
}, Jn = 0, Yn = [], Xn = [];
|
|
1920
|
+
function Zn() {
|
|
1921
|
+
let e = Jn === 0;
|
|
1922
|
+
if (Jn += 1, e) for (let e of Xn) e();
|
|
1880
1923
|
let t = !1;
|
|
1881
1924
|
return () => {
|
|
1882
|
-
if (t || (t = !0, --
|
|
1883
|
-
let e =
|
|
1884
|
-
|
|
1925
|
+
if (t || (t = !0, --Jn, Jn > 0)) return;
|
|
1926
|
+
let e = Yn;
|
|
1927
|
+
Yn = [];
|
|
1885
1928
|
for (let t of e) t();
|
|
1886
1929
|
};
|
|
1887
1930
|
}
|
|
1888
|
-
var
|
|
1889
|
-
function
|
|
1890
|
-
return
|
|
1891
|
-
|
|
1931
|
+
var Qn = () => Jn > 0;
|
|
1932
|
+
function $n(e) {
|
|
1933
|
+
return Xn.push(e), () => {
|
|
1934
|
+
Xn = Xn.filter((t) => t !== e);
|
|
1892
1935
|
};
|
|
1893
1936
|
}
|
|
1894
|
-
function
|
|
1895
|
-
|
|
1937
|
+
function er(e) {
|
|
1938
|
+
Jn === 0 ? e() : Yn.push(e);
|
|
1896
1939
|
}
|
|
1897
1940
|
//#endregion
|
|
1898
1941
|
//#region src/core/engine/imageDecodeOffloader.ts
|
|
1899
|
-
var
|
|
1900
|
-
|
|
1901
|
-
"
|
|
1902
|
-
|
|
1903
|
-
]), Hn = (e) => {
|
|
1904
|
-
let t = e.closest("[data-flemo-screen]");
|
|
1905
|
-
return !!t && Vn.has(t.getAttribute("data-flemo-status") ?? "");
|
|
1906
|
-
}, Un = (e) => {
|
|
1942
|
+
var tr = 8, nr = 2, Y = 96, rr = 15e3, ir = 3e3, ar = "data:image/gif;base64,R0lGODlhAQABAIAAAAAAAP///yH5BAEAAAAALAAAAAABAAEAAAIBRAA7", or = "flemo-image-scale-v1", sr = new Set(ee), cr = (e) => {
|
|
1943
|
+
let t = e.closest(U(Ct));
|
|
1944
|
+
return !!t && sr.has(t.getAttribute("data-flemo-status") ?? "");
|
|
1945
|
+
}, lr = (e) => {
|
|
1907
1946
|
if (e.naturalWidth <= 0 || e.naturalHeight <= 0 || e.boxWidth <= 0 || e.boxHeight <= 0) return !1;
|
|
1908
1947
|
let t = e.boxWidth * e.boxHeight * e.devicePixelRatio * e.devicePixelRatio;
|
|
1909
1948
|
return e.naturalWidth * e.naturalHeight > t * 8;
|
|
1910
|
-
},
|
|
1949
|
+
}, ur = "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};", dr = () => typeof Worker < "u" && typeof OffscreenCanvas < "u" && typeof createImageBitmap == "function" && typeof MutationObserver < "u" && typeof URL < "u" && typeof URL.createObjectURL == "function", fr = async (e, t) => {
|
|
1911
1950
|
try {
|
|
1912
1951
|
if (typeof caches > "u") return;
|
|
1913
|
-
await (await caches.open(
|
|
1952
|
+
await (await caches.open(or)).put(e, new Response(t, { headers: { "content-type": t.type } }));
|
|
1914
1953
|
} catch {}
|
|
1915
|
-
},
|
|
1954
|
+
}, pr = async (e) => {
|
|
1916
1955
|
try {
|
|
1917
1956
|
if (typeof caches > "u") return null;
|
|
1918
|
-
let t = await (await caches.open(
|
|
1957
|
+
let t = await (await caches.open(or)).match(e);
|
|
1919
1958
|
return t ? await t.blob() : null;
|
|
1920
1959
|
} catch {
|
|
1921
1960
|
return null;
|
|
1922
1961
|
}
|
|
1923
1962
|
};
|
|
1924
|
-
function
|
|
1925
|
-
if (!
|
|
1963
|
+
function mr(e) {
|
|
1964
|
+
if (!dr()) return () => {};
|
|
1926
1965
|
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 = () => {
|
|
1927
1966
|
if (t) return t;
|
|
1928
1967
|
try {
|
|
1929
|
-
t = new Worker(URL.createObjectURL(new Blob([
|
|
1968
|
+
t = new Worker(URL.createObjectURL(new Blob([ur])));
|
|
1930
1969
|
} catch {
|
|
1931
1970
|
return null;
|
|
1932
1971
|
}
|
|
@@ -1941,7 +1980,7 @@ function Jn(e) {
|
|
|
1941
1980
|
return;
|
|
1942
1981
|
}
|
|
1943
1982
|
let a = URL.createObjectURL(n);
|
|
1944
|
-
l.add(a),
|
|
1983
|
+
l.add(a), fr(t, n), f(t, a);
|
|
1945
1984
|
}, t;
|
|
1946
1985
|
}, f = (e, t) => {
|
|
1947
1986
|
r.has(e) || r.set(e, t);
|
|
@@ -1950,21 +1989,21 @@ function Jn(e) {
|
|
|
1950
1989
|
let n = () => {
|
|
1951
1990
|
t ? e.style.visibility = t : e.style.removeProperty("visibility");
|
|
1952
1991
|
};
|
|
1953
|
-
if (!
|
|
1992
|
+
if (!Qn()) {
|
|
1954
1993
|
n();
|
|
1955
1994
|
return;
|
|
1956
1995
|
}
|
|
1957
1996
|
let r = !1, i = () => {
|
|
1958
1997
|
r || (r = !0, clearTimeout(o), a.delete(i), n());
|
|
1959
|
-
}, o = setTimeout(i,
|
|
1960
|
-
a.add(i),
|
|
1998
|
+
}, o = setTimeout(i, ir);
|
|
1999
|
+
a.add(i), er(i);
|
|
1961
2000
|
}, m = (e, t) => {
|
|
1962
2001
|
let n = () => {
|
|
1963
|
-
if (
|
|
1964
|
-
|
|
2002
|
+
if (Qn()) {
|
|
2003
|
+
er(t);
|
|
1965
2004
|
return;
|
|
1966
2005
|
}
|
|
1967
|
-
if (!
|
|
2006
|
+
if (!cr(e) || typeof requestAnimationFrame != "function") {
|
|
1968
2007
|
t();
|
|
1969
2008
|
return;
|
|
1970
2009
|
}
|
|
@@ -1976,10 +2015,10 @@ function Jn(e) {
|
|
|
1976
2015
|
e.style.visibility = "hidden";
|
|
1977
2016
|
let r = !1, i = () => {
|
|
1978
2017
|
r || (r = !0, clearTimeout(o), a.delete(i), t(), n ? e.style.visibility = n : e.style.removeProperty("visibility"));
|
|
1979
|
-
}, o = setTimeout(i,
|
|
2018
|
+
}, o = setTimeout(i, ir);
|
|
1980
2019
|
a.add(i), m(e, i);
|
|
1981
|
-
}, g = (e, t) => !
|
|
1982
|
-
e.setAttribute(
|
|
2020
|
+
}, g = (e, t) => !Qn() && !cr(e) ? !1 : (e.setAttribute(H, t), h(e, () => {}), !0), _ = (e, t, a) => {
|
|
2021
|
+
e.setAttribute(H, t), e.src = a, h(e, () => {
|
|
1983
2022
|
/* v8 ignore next -- disposal runs pending reveals; nothing to repair. */
|
|
1984
2023
|
if (n) return;
|
|
1985
2024
|
let a = r.get(t);
|
|
@@ -1990,12 +2029,12 @@ function Jn(e) {
|
|
|
1990
2029
|
if (n) {
|
|
1991
2030
|
if (s.delete(e), clearTimeout(n.timeout), n.detachListeners?.(), n.responsive) {
|
|
1992
2031
|
if (i(t)) {
|
|
1993
|
-
e.setAttribute(
|
|
2032
|
+
e.setAttribute(H, n.url), e.removeAttribute("srcset"), e.removeAttribute("sizes");
|
|
1994
2033
|
let r = e.closest("picture");
|
|
1995
2034
|
if (r) for (let e of Array.from(r.querySelectorAll("source"))) e.removeAttribute("srcset");
|
|
1996
2035
|
e.src = t;
|
|
1997
2036
|
}
|
|
1998
|
-
} else e.getAttribute("src") ===
|
|
2037
|
+
} else e.getAttribute("src") === ar && (i(t) ? e.src = t : (e.removeAttribute(H), e.src = n.url));
|
|
1999
2038
|
p(e, n.previousVisibility);
|
|
2000
2039
|
}
|
|
2001
2040
|
}, y = /* @__PURE__ */ new Map(), b = !1, x = () => {
|
|
@@ -2004,14 +2043,14 @@ function Jn(e) {
|
|
|
2004
2043
|
y.clear();
|
|
2005
2044
|
for (let [t, n] of e) C(t, n.boxWidth, n.boxHeight);
|
|
2006
2045
|
}, S = () => {
|
|
2007
|
-
b || (b = !0,
|
|
2046
|
+
b || (b = !0, er(() => {
|
|
2008
2047
|
if (n) return;
|
|
2009
2048
|
let e = globalThis.requestIdleCallback;
|
|
2010
2049
|
typeof e == "function" ? e(() => x()) : typeof setTimeout == "function" ? setTimeout(x, 400) : x();
|
|
2011
2050
|
}));
|
|
2012
2051
|
}, C = (e, t, n) => {
|
|
2013
2052
|
if (r.has(e) || o.has(e)) return;
|
|
2014
|
-
if (
|
|
2053
|
+
if (Qn() && F()) {
|
|
2015
2054
|
y.has(e) || y.set(e, {
|
|
2016
2055
|
boxWidth: t,
|
|
2017
2056
|
boxHeight: n
|
|
@@ -2021,28 +2060,28 @@ function Jn(e) {
|
|
|
2021
2060
|
let i = d();
|
|
2022
2061
|
if (!i) return;
|
|
2023
2062
|
o.add(e);
|
|
2024
|
-
let a = Math.round(Math.max(
|
|
2063
|
+
let a = Math.round(Math.max(Y, t * u()) * nr), s = Math.max(t * n, 9216) * u() ** 2;
|
|
2025
2064
|
i.postMessage({
|
|
2026
2065
|
url: e,
|
|
2027
2066
|
targetWidth: a,
|
|
2028
2067
|
neededArea: s,
|
|
2029
2068
|
ratio: 8
|
|
2030
2069
|
});
|
|
2031
|
-
}, w =
|
|
2032
|
-
if (
|
|
2070
|
+
}, w = $n(() => {
|
|
2071
|
+
if (F() && !(!t || o.size === 0)) {
|
|
2033
2072
|
t.terminate(), t = null;
|
|
2034
2073
|
for (let e of o) {
|
|
2035
2074
|
if (y.has(e)) continue;
|
|
2036
2075
|
let t = {
|
|
2037
|
-
boxWidth:
|
|
2038
|
-
boxHeight:
|
|
2076
|
+
boxWidth: Y,
|
|
2077
|
+
boxHeight: Y
|
|
2039
2078
|
};
|
|
2040
2079
|
for (let [n, r] of s) {
|
|
2041
2080
|
if (r.url !== e) continue;
|
|
2042
2081
|
let i = n.getBoundingClientRect();
|
|
2043
2082
|
t = {
|
|
2044
|
-
boxWidth: i.width ||
|
|
2045
|
-
boxHeight: i.height ||
|
|
2083
|
+
boxWidth: i.width || Y,
|
|
2084
|
+
boxHeight: i.height || Y
|
|
2046
2085
|
};
|
|
2047
2086
|
break;
|
|
2048
2087
|
}
|
|
@@ -2056,17 +2095,17 @@ function Jn(e) {
|
|
|
2056
2095
|
let a = {
|
|
2057
2096
|
url: "",
|
|
2058
2097
|
previousVisibility: e.style.visibility,
|
|
2059
|
-
timeout: setTimeout(() => v(e, null),
|
|
2098
|
+
timeout: setTimeout(() => v(e, null), rr),
|
|
2060
2099
|
responsive: !0
|
|
2061
2100
|
}, o = () => {
|
|
2062
2101
|
/* v8 ignore next -- consider() only routes elements with an https src
|
|
2063
2102
|
here, so the final fallback arm is unreachable. */
|
|
2064
2103
|
let t = e.currentSrc || e.getAttribute("src") || "", i = e.getBoundingClientRect();
|
|
2065
|
-
if (!(/^https?:/.test(t) &&
|
|
2104
|
+
if (!(/^https?:/.test(t) && lr({
|
|
2066
2105
|
naturalWidth: e.naturalWidth,
|
|
2067
2106
|
naturalHeight: e.naturalHeight,
|
|
2068
|
-
boxWidth: i.width ||
|
|
2069
|
-
boxHeight: i.height ||
|
|
2107
|
+
boxWidth: i.width || Y,
|
|
2108
|
+
boxHeight: i.height || Y,
|
|
2070
2109
|
devicePixelRatio: u()
|
|
2071
2110
|
}))) {
|
|
2072
2111
|
v(e, null);
|
|
@@ -2078,7 +2117,7 @@ function Jn(e) {
|
|
|
2078
2117
|
v(e, o);
|
|
2079
2118
|
return;
|
|
2080
2119
|
}
|
|
2081
|
-
|
|
2120
|
+
pr(t).then((a) => {
|
|
2082
2121
|
if (!(n || !s.has(e))) {
|
|
2083
2122
|
/* v8 ignore start -- a verdict can only appear via settle(), which
|
|
2084
2123
|
releases every held element of the url first, so a still-held
|
|
@@ -2094,7 +2133,7 @@ function Jn(e) {
|
|
|
2094
2133
|
l.add(e), f(t, e);
|
|
2095
2134
|
return;
|
|
2096
2135
|
}
|
|
2097
|
-
C(t, i.width ||
|
|
2136
|
+
C(t, i.width || Y, i.height || Y);
|
|
2098
2137
|
}
|
|
2099
2138
|
});
|
|
2100
2139
|
};
|
|
@@ -2117,20 +2156,20 @@ function Jn(e) {
|
|
|
2117
2156
|
if (c.add(e), e.complete && e.naturalWidth > 0) {
|
|
2118
2157
|
if (!t) {
|
|
2119
2158
|
let t = e.getBoundingClientRect();
|
|
2120
|
-
C(a, t.width ||
|
|
2159
|
+
C(a, t.width || Y, t.height || Y);
|
|
2121
2160
|
return;
|
|
2122
2161
|
}
|
|
2123
2162
|
let n = e.getBoundingClientRect();
|
|
2124
|
-
if (!
|
|
2163
|
+
if (!lr({
|
|
2125
2164
|
naturalWidth: e.naturalWidth,
|
|
2126
2165
|
naturalHeight: e.naturalHeight,
|
|
2127
|
-
boxWidth: n.width ||
|
|
2128
|
-
boxHeight: n.height ||
|
|
2166
|
+
boxWidth: n.width || Y,
|
|
2167
|
+
boxHeight: n.height || Y,
|
|
2129
2168
|
devicePixelRatio: u()
|
|
2130
2169
|
})) return;
|
|
2131
2170
|
let o = r.get(a);
|
|
2132
2171
|
if (i(o)) {
|
|
2133
|
-
|
|
2172
|
+
Qn() || cr(e) ? _(e, a, o) : (e.setAttribute(H, a), e.src = o);
|
|
2134
2173
|
return;
|
|
2135
2174
|
}
|
|
2136
2175
|
if (o === "opaque") {
|
|
@@ -2146,14 +2185,14 @@ function Jn(e) {
|
|
|
2146
2185
|
return;
|
|
2147
2186
|
}
|
|
2148
2187
|
if (o) {
|
|
2149
|
-
|
|
2188
|
+
Qn() || cr(e) ? _(e, a, o) : (e.setAttribute(H, a), e.src = o);
|
|
2150
2189
|
return;
|
|
2151
2190
|
}
|
|
2152
2191
|
s.set(e, {
|
|
2153
2192
|
url: a,
|
|
2154
2193
|
previousVisibility: e.style.visibility,
|
|
2155
|
-
timeout: setTimeout(() => v(e, null),
|
|
2156
|
-
}), e.style.visibility = "hidden", e.setAttribute(
|
|
2194
|
+
timeout: setTimeout(() => v(e, null), rr)
|
|
2195
|
+
}), e.style.visibility = "hidden", e.setAttribute(H, a), e.src = ar, pr(a).then((t) => {
|
|
2157
2196
|
if (n || r.has(a)) return;
|
|
2158
2197
|
if (t) {
|
|
2159
2198
|
let e = URL.createObjectURL(t);
|
|
@@ -2163,7 +2202,7 @@ function Jn(e) {
|
|
|
2163
2202
|
let i = () => {
|
|
2164
2203
|
if (n) return;
|
|
2165
2204
|
let t = e.getBoundingClientRect();
|
|
2166
|
-
C(a, t.width ||
|
|
2205
|
+
C(a, t.width || Y, t.height || Y);
|
|
2167
2206
|
};
|
|
2168
2207
|
typeof requestAnimationFrame == "function" ? requestAnimationFrame(i) : i();
|
|
2169
2208
|
});
|
|
@@ -2180,21 +2219,21 @@ function Jn(e) {
|
|
|
2180
2219
|
let k = (e) => {
|
|
2181
2220
|
let t = e.getAttribute("src") ?? "", n = s.get(e);
|
|
2182
2221
|
if (n && !n.responsive) {
|
|
2183
|
-
t === n.url && (e.src =
|
|
2222
|
+
t === n.url && (e.src = ar);
|
|
2184
2223
|
return;
|
|
2185
2224
|
}
|
|
2186
|
-
let a = e.getAttribute(
|
|
2225
|
+
let a = e.getAttribute(H);
|
|
2187
2226
|
if (a) if (t === a) {
|
|
2188
2227
|
let t = r.get(a);
|
|
2189
2228
|
i(t) && (e.src = t);
|
|
2190
|
-
} else t !==
|
|
2229
|
+
} else t !== ar && !t.startsWith("blob:") && e.removeAttribute(H);
|
|
2191
2230
|
}, A = !1, j = new MutationObserver((t) => {
|
|
2192
2231
|
if (!n) {
|
|
2193
|
-
if (
|
|
2232
|
+
if (Qn()) {
|
|
2194
2233
|
if (A) return;
|
|
2195
|
-
A = !0,
|
|
2234
|
+
A = !0, er(() => {
|
|
2196
2235
|
if (A = !1, !n) {
|
|
2197
|
-
for (let t of Array.from(e.querySelectorAll(`img[${
|
|
2236
|
+
for (let t of Array.from(e.querySelectorAll(`img[${H}]`))) k(t);
|
|
2198
2237
|
for (let e of [...s.keys()]) k(e);
|
|
2199
2238
|
}
|
|
2200
2239
|
});
|
|
@@ -2216,23 +2255,22 @@ function Jn(e) {
|
|
|
2216
2255
|
l.clear();
|
|
2217
2256
|
};
|
|
2218
2257
|
}
|
|
2219
|
-
var
|
|
2220
|
-
function
|
|
2221
|
-
return typeof document > "u" || !document.body ? () => {} : (
|
|
2222
|
-
dispose:
|
|
2258
|
+
var hr = null;
|
|
2259
|
+
function gr() {
|
|
2260
|
+
return typeof document > "u" || !document.body ? () => {} : (hr ? hr.count += 1 : hr = {
|
|
2261
|
+
dispose: mr(document.body),
|
|
2223
2262
|
count: 1
|
|
2224
2263
|
}, () => {
|
|
2225
|
-
|
|
2264
|
+
hr && (--hr.count, hr.count <= 0 && (hr.dispose(), hr = null));
|
|
2226
2265
|
});
|
|
2227
2266
|
}
|
|
2228
2267
|
//#endregion
|
|
2229
2268
|
//#region src/core/engine/arrivalHold.ts
|
|
2230
|
-
|
|
2231
|
-
function Qn(e) {
|
|
2269
|
+
function _r(e) {
|
|
2232
2270
|
if (typeof MutationObserver > "u") return () => {};
|
|
2233
2271
|
let t = /* @__PURE__ */ new Set(), n = /* @__PURE__ */ new Set(), r = /* @__PURE__ */ new Set(), i = /* @__PURE__ */ new Map(), a = /* @__PURE__ */ new Map(), o = (t) => {
|
|
2234
2272
|
let n = t instanceof Element ? t : t.parentElement;
|
|
2235
|
-
return !n || n === e || n.closest(
|
|
2273
|
+
return !n || n === e || n.closest(`${U(B)}, ${U(Vt)}, ${U(H)}`) !== null;
|
|
2236
2274
|
}, 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), {
|
|
2237
2275
|
glass: t,
|
|
2238
2276
|
latest: n,
|
|
@@ -2262,12 +2300,12 @@ function Qn(e) {
|
|
|
2262
2300
|
if (i.type === "childList") {
|
|
2263
2301
|
for (let e of Array.from(i.removedNodes)) if (!n.has(e)) {
|
|
2264
2302
|
if (e instanceof Element && t.delete(e)) {
|
|
2265
|
-
e.removeAttribute(
|
|
2303
|
+
e.removeAttribute(Vt);
|
|
2266
2304
|
continue;
|
|
2267
2305
|
}
|
|
2268
2306
|
(e instanceof Element || e.nodeType === Node.TEXT_NODE) && l(i.target).removed.push(e);
|
|
2269
2307
|
}
|
|
2270
|
-
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(
|
|
2308
|
+
for (let e of Array.from(i.addedNodes)) r.delete(e) || e instanceof Element && (e.setAttribute(Vt, ""), t.add(e), l(i.target).added.push(e));
|
|
2271
2309
|
}
|
|
2272
2310
|
}
|
|
2273
2311
|
for (let [e, t] of u) {
|
|
@@ -2302,7 +2340,7 @@ function Qn(e) {
|
|
|
2302
2340
|
c.disconnect();
|
|
2303
2341
|
for (let e of n) e.parentNode?.removeChild(e);
|
|
2304
2342
|
n.clear();
|
|
2305
|
-
for (let e of t) e instanceof HTMLElement &&
|
|
2343
|
+
for (let e of t) e instanceof HTMLElement && qn(e), e.removeAttribute(Vt);
|
|
2306
2344
|
t.clear();
|
|
2307
2345
|
for (let [e, t] of i) e.isConnected && (e.nodeValue = t.latest);
|
|
2308
2346
|
i.clear();
|
|
@@ -2312,57 +2350,103 @@ function Qn(e) {
|
|
|
2312
2350
|
}
|
|
2313
2351
|
//#endregion
|
|
2314
2352
|
//#region src/core/engine/compositorWarmUp.ts
|
|
2315
|
-
var
|
|
2353
|
+
var vr = 3e3, yr = [{ backgroundPosition: "0px 0px" }, { backgroundPosition: "48px 0px" }], br = {
|
|
2316
2354
|
duration: 500,
|
|
2317
2355
|
iterations: Infinity,
|
|
2318
2356
|
direction: "alternate",
|
|
2319
2357
|
easing: "linear"
|
|
2320
|
-
},
|
|
2321
|
-
|
|
2358
|
+
}, xr = "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;", Sr = "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==", X = null, Cr = null, wr = null, Tr = null, Er = 0, Dr = () => {
|
|
2359
|
+
Er = 0, Tr?.cancel(), Tr = null, wr?.remove(), wr = null;
|
|
2322
2360
|
};
|
|
2323
|
-
function
|
|
2361
|
+
function Or() {
|
|
2324
2362
|
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function") return () => {};
|
|
2325
|
-
if (
|
|
2326
|
-
|
|
2363
|
+
if (Er += 1, !wr) {
|
|
2364
|
+
wr = document.createElement("div"), wr.setAttribute(Kt, ""), wr.setAttribute("aria-hidden", "true"), wr.setAttribute("style", xr), document.body.appendChild(wr);
|
|
2327
2365
|
try {
|
|
2328
|
-
|
|
2366
|
+
Tr = wr.animate(yr, br);
|
|
2329
2367
|
} catch {
|
|
2330
|
-
|
|
2368
|
+
Tr = null;
|
|
2331
2369
|
}
|
|
2332
|
-
if (!
|
|
2333
|
-
|
|
2334
|
-
let e =
|
|
2335
|
-
|
|
2370
|
+
if (!X && je()) try {
|
|
2371
|
+
X = document.createElement("video"), X.muted = !0, X.loop = !0, X.playsInline = !0, X.setAttribute("aria-hidden", "true"), X.setAttribute(qt, ""), X.setAttribute("style", "position:fixed;top:0;left:52px;width:8px;height:8px;pointer-events:none;opacity:0.02;"), X.src = Sr, document.body.appendChild(X), X.play()?.catch?.(() => {});
|
|
2372
|
+
let e = X;
|
|
2373
|
+
Cr = () => {
|
|
2336
2374
|
document.visibilityState === "hidden" ? e.pause() : e.play()?.catch?.(() => {});
|
|
2337
|
-
}, document.addEventListener("visibilitychange",
|
|
2375
|
+
}, document.addEventListener("visibilitychange", Cr);
|
|
2338
2376
|
} catch {
|
|
2339
|
-
|
|
2377
|
+
X = null;
|
|
2340
2378
|
}
|
|
2341
2379
|
}
|
|
2342
2380
|
let e = !1, t = setTimeout(() => {
|
|
2343
|
-
e || (e = !0, --
|
|
2344
|
-
},
|
|
2381
|
+
e || (e = !0, --Er, Er <= 0 && Dr());
|
|
2382
|
+
}, vr);
|
|
2345
2383
|
return () => {
|
|
2346
|
-
e || (e = !0, clearTimeout(t), --
|
|
2384
|
+
e || (e = !0, clearTimeout(t), --Er, Er <= 0 && Dr());
|
|
2347
2385
|
};
|
|
2348
2386
|
}
|
|
2349
2387
|
//#endregion
|
|
2350
2388
|
//#region src/core/engine/emulationNotice.ts
|
|
2351
|
-
var
|
|
2389
|
+
var kr = () => {
|
|
2352
2390
|
if (typeof navigator > "u") return !1;
|
|
2353
2391
|
let e = navigator.platform ?? "";
|
|
2354
2392
|
return /Mac/i.test(e) ? (navigator.maxTouchPoints ?? 0) > 0 : !1;
|
|
2355
|
-
},
|
|
2356
|
-
|
|
2357
|
-
},
|
|
2393
|
+
}, Ar = !1, jr = () => {
|
|
2394
|
+
Ar || !F() || !kr() || (Ar = !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."));
|
|
2395
|
+
}, Mr = (e) => {
|
|
2396
|
+
let t = e.parentElement ?? e;
|
|
2397
|
+
return Array.from(t.querySelectorAll(`[${B}]`)).filter((n) => {
|
|
2398
|
+
let r = n.closest(U(Ct));
|
|
2399
|
+
return !r || r === e || !t.contains(r);
|
|
2400
|
+
});
|
|
2401
|
+
}, Nr = (e, t) => {
|
|
2402
|
+
let [n, r] = t.split("-");
|
|
2403
|
+
return Mr(e).filter((e) => e.getAttribute("data-flemo-status") === n && e.getAttribute("data-flemo-active") === r);
|
|
2404
|
+
}, Pr = (e, t) => {
|
|
2405
|
+
let n = e.closest(U("data-flemo-router"))?.getAttribute("data-flemo-router") ?? null;
|
|
2406
|
+
return Array.from(e.ownerDocument.querySelectorAll(`${U(B)}${W(wt, t)}`)).filter((e) => {
|
|
2407
|
+
if (n === null) return !0;
|
|
2408
|
+
let t = e.closest(U(Dt));
|
|
2409
|
+
return !t || t.getAttribute(Dt) === n;
|
|
2410
|
+
});
|
|
2411
|
+
}, Fr = (e, t) => Pr(e, t).filter((e) => e.parentElement?.closest(`[${V}]`) == null), Ir = (e) => {
|
|
2412
|
+
let t = e.closest(U("data-flemo-router"))?.getAttribute("data-flemo-router") ?? null;
|
|
2413
|
+
return Array.from(e.ownerDocument.querySelectorAll(`[${B}][${V}]`)).filter((e) => {
|
|
2414
|
+
/* v8 ignore next -- a part reached by a document query always has a parent;
|
|
2415
|
+
the optional chain is a guard against a detached caller, not a path. */
|
|
2416
|
+
if (e.parentElement?.closest("[data-flemo-anim-hold]") != null) return !1;
|
|
2417
|
+
if (t === null) return !0;
|
|
2418
|
+
let n = e.closest(U(Dt));
|
|
2419
|
+
return !n || n.getAttribute("data-flemo-router") === t;
|
|
2420
|
+
});
|
|
2421
|
+
}, Lr = (e, t, n) => {
|
|
2422
|
+
let r = 0;
|
|
2423
|
+
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2424
|
+
if (!K(t, e)) continue;
|
|
2425
|
+
let n = z(t, e);
|
|
2426
|
+
r = Math.max(r, (n.delay + n.duration) * 1e3);
|
|
2427
|
+
}
|
|
2428
|
+
for (let t of Pr(e, n)) {
|
|
2429
|
+
let e = gt.get(t.getAttribute(B)), i = `${n}-${t.getAttribute(Tt)}`;
|
|
2430
|
+
if (!e || !K(e, i)) continue;
|
|
2431
|
+
let a = z(e, i);
|
|
2432
|
+
r = Math.max(r, (a.delay + a.duration) * 1e3);
|
|
2433
|
+
}
|
|
2434
|
+
let i = t.decoratorName ? pt.get(t.decoratorName) : void 0;
|
|
2435
|
+
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
2436
|
+
if (!K(i, e)) continue;
|
|
2437
|
+
let t = z(i, e);
|
|
2438
|
+
r = Math.max(r, (t.delay + t.duration) * 1e3);
|
|
2439
|
+
}
|
|
2440
|
+
return r;
|
|
2441
|
+
}, Rr = Ht, zr = (e) => !(e.complete && e.naturalWidth > 0), Br = 4, Vr = (e) => {
|
|
2358
2442
|
if (!(e.complete && e.naturalWidth > 0)) return !1;
|
|
2359
2443
|
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);
|
|
2360
|
-
return e.naturalWidth * e.naturalHeight > r *
|
|
2361
|
-
},
|
|
2362
|
-
function
|
|
2444
|
+
return e.naturalWidth * e.naturalHeight > r * Br;
|
|
2445
|
+
}, Hr = (e, t) => zr(e) || !t && Vr(e);
|
|
2446
|
+
function Ur(e, t, n = !1) {
|
|
2363
2447
|
if (!e || typeof document > "u" || typeof MutationObserver != "function" || typeof setTimeout != "function") return () => {};
|
|
2364
2448
|
let r = /* @__PURE__ */ new Map(), i = (e) => {
|
|
2365
|
-
e.getAttribute(
|
|
2449
|
+
e.getAttribute(Rr) === null && (r.has(e) || !Hr(e, n) || (r.set(e, e.style.display), e.style.display = "none", e.setAttribute(Rr, "")));
|
|
2366
2450
|
};
|
|
2367
2451
|
for (let t of e.querySelectorAll("img")) i(t);
|
|
2368
2452
|
let a = new MutationObserver((e) => {
|
|
@@ -2376,7 +2460,7 @@ function yr(e, t, n = !1) {
|
|
|
2376
2460
|
let o = !1, s = () => {
|
|
2377
2461
|
if (!o) {
|
|
2378
2462
|
o = !0, a.disconnect();
|
|
2379
|
-
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(
|
|
2463
|
+
for (let [e, t] of r) t ? e.style.display = t : e.style.removeProperty("display"), e.removeAttribute(Rr);
|
|
2380
2464
|
r.clear();
|
|
2381
2465
|
}
|
|
2382
2466
|
}, c = setTimeout(s, Math.max(0, t));
|
|
@@ -2386,25 +2470,25 @@ function yr(e, t, n = !1) {
|
|
|
2386
2470
|
}
|
|
2387
2471
|
//#endregion
|
|
2388
2472
|
//#region src/core/engine/invisibleAnimationHold.ts
|
|
2389
|
-
var
|
|
2473
|
+
var Wr = () => {}, Gr = .004, Kr = (e, t) => {
|
|
2390
2474
|
let n = e.ownerDocument?.defaultView;
|
|
2391
2475
|
if (!n) return !1;
|
|
2392
2476
|
let r = e;
|
|
2393
2477
|
for (; r;) {
|
|
2394
|
-
if (Number(n.getComputedStyle(r).opacity) <=
|
|
2478
|
+
if (Number(n.getComputedStyle(r).opacity) <= Gr) return !0;
|
|
2395
2479
|
if (r === t) break;
|
|
2396
2480
|
r = r.parentElement;
|
|
2397
2481
|
}
|
|
2398
2482
|
return !1;
|
|
2399
2483
|
};
|
|
2400
|
-
function
|
|
2401
|
-
if (typeof e.getAnimations != "function") return
|
|
2484
|
+
function qr(e) {
|
|
2485
|
+
if (typeof e.getAnimations != "function") return Wr;
|
|
2402
2486
|
let t = /* @__PURE__ */ new Set(), n = () => {
|
|
2403
2487
|
for (let n of e.getAnimations({ subtree: !0 })) {
|
|
2404
2488
|
if (t.size >= 128) return;
|
|
2405
2489
|
if (t.has(n) || (n.animationName ?? "").startsWith("flemo-") || n.playState !== "running") continue;
|
|
2406
2490
|
let r = n.effect?.target;
|
|
2407
|
-
if (r instanceof Element &&
|
|
2491
|
+
if (r instanceof Element && Kr(r, e)) try {
|
|
2408
2492
|
n.pause(), t.add(n);
|
|
2409
2493
|
} catch {}
|
|
2410
2494
|
}
|
|
@@ -2432,277 +2516,113 @@ function Cr(e) {
|
|
|
2432
2516
|
};
|
|
2433
2517
|
}
|
|
2434
2518
|
//#endregion
|
|
2435
|
-
//#region src/
|
|
2436
|
-
var
|
|
2437
|
-
let
|
|
2438
|
-
|
|
2439
|
-
|
|
2440
|
-
|
|
2441
|
-
|
|
2442
|
-
|
|
2443
|
-
|
|
2444
|
-
|
|
2445
|
-
|
|
2446
|
-
|
|
2519
|
+
//#region src/core/engine/responseHold.ts
|
|
2520
|
+
var Jr = !1, Yr = 0, Xr = [], Zr = () => {
|
|
2521
|
+
let e = Xr;
|
|
2522
|
+
Xr = [];
|
|
2523
|
+
for (let t of e) t();
|
|
2524
|
+
}, Qr = (e) => /event-stream/i.test(e.headers.get("content-type") ?? ""), $r = () => {
|
|
2525
|
+
if (Jr || typeof window > "u" || typeof window.fetch != "function") return;
|
|
2526
|
+
Jr = !0;
|
|
2527
|
+
let e = window.fetch.bind(window);
|
|
2528
|
+
window.fetch = (...t) => e(...t).then((e) => Yr <= 0 || Qr(e) ? e : new Promise((t) => {
|
|
2529
|
+
Xr.push(() => t(e));
|
|
2530
|
+
}), (e) => {
|
|
2531
|
+
if (Yr <= 0) throw e;
|
|
2532
|
+
return new Promise((t, n) => {
|
|
2533
|
+
Xr.push(() => n(e));
|
|
2534
|
+
});
|
|
2535
|
+
});
|
|
2536
|
+
}, ei = 2e3;
|
|
2537
|
+
function ti(e = ei) {
|
|
2538
|
+
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
2539
|
+
if ($r(), !Jr) return () => {};
|
|
2540
|
+
Yr += 1;
|
|
2541
|
+
let t = !1, n = null, r = () => {
|
|
2542
|
+
t || (t = !0, n !== null && clearTimeout(n), Yr = Math.max(0, Yr - 1), Yr === 0 && Zr());
|
|
2447
2543
|
};
|
|
2448
|
-
|
|
2449
|
-
|
|
2450
|
-
|
|
2451
|
-
|
|
2452
|
-
|
|
2453
|
-
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
|
|
2457
|
-
|
|
2458
|
-
|
|
2459
|
-
|
|
2460
|
-
|
|
2461
|
-
|
|
2462
|
-
|
|
2463
|
-
0,
|
|
2464
|
-
.58,
|
|
2465
|
-
1
|
|
2466
|
-
],
|
|
2467
|
-
easeInOut: [
|
|
2468
|
-
.42,
|
|
2469
|
-
0,
|
|
2470
|
-
.58,
|
|
2471
|
-
1
|
|
2472
|
-
],
|
|
2473
|
-
circIn: [
|
|
2474
|
-
0,
|
|
2475
|
-
.55,
|
|
2476
|
-
.45,
|
|
2477
|
-
1
|
|
2478
|
-
],
|
|
2479
|
-
circOut: [
|
|
2480
|
-
.55,
|
|
2481
|
-
0,
|
|
2482
|
-
1,
|
|
2483
|
-
.45
|
|
2484
|
-
],
|
|
2485
|
-
backIn: [
|
|
2486
|
-
.31,
|
|
2487
|
-
.01,
|
|
2488
|
-
.66,
|
|
2489
|
-
-.59
|
|
2490
|
-
],
|
|
2491
|
-
backOut: [
|
|
2492
|
-
.33,
|
|
2493
|
-
1.53,
|
|
2494
|
-
.69,
|
|
2495
|
-
.99
|
|
2496
|
-
],
|
|
2497
|
-
anticipate: [
|
|
2498
|
-
.36,
|
|
2499
|
-
0,
|
|
2500
|
-
.66,
|
|
2501
|
-
-.56
|
|
2502
|
-
]
|
|
2503
|
-
}, Dr = (e) => {
|
|
2504
|
-
if (Array.isArray(e)) {
|
|
2505
|
-
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2506
|
-
let [t, n, r, i] = e;
|
|
2507
|
-
return wr(t, n, r, i);
|
|
2508
|
-
}
|
|
2509
|
-
return Tr;
|
|
2510
|
-
}
|
|
2511
|
-
return typeof e == "string" ? e === "linear" ? Tr : wr(...Er[e] ?? Er.ease) : wr(...Er.ease);
|
|
2512
|
-
}, Or = 1 / 255, kr = 400, Ar = 24, jr = /* @__PURE__ */ new Set([
|
|
2513
|
-
"x",
|
|
2514
|
-
"y",
|
|
2515
|
-
"opacity"
|
|
2516
|
-
]), Mr = (e, t, n) => {
|
|
2517
|
-
if (!e || typeof e != "object") return;
|
|
2518
|
-
let r = e[t];
|
|
2519
|
-
if (r === void 0) return;
|
|
2520
|
-
if (typeof r == "number") return r;
|
|
2521
|
-
if (typeof r != "string") return null;
|
|
2522
|
-
let i = r.trim();
|
|
2523
|
-
if (i.endsWith("%")) {
|
|
2524
|
-
let e = Number(i.slice(0, -1));
|
|
2525
|
-
if (Number.isNaN(e)) return null;
|
|
2526
|
-
let r = t === "y" ? n.clientHeight : n.clientWidth;
|
|
2527
|
-
return e / 100 * r;
|
|
2528
|
-
}
|
|
2529
|
-
if (i.endsWith("px")) {
|
|
2530
|
-
let e = Number(i.slice(0, -2));
|
|
2531
|
-
return Number.isNaN(e) ? null : e;
|
|
2532
|
-
}
|
|
2533
|
-
return null;
|
|
2534
|
-
}, Nr = (e, t, n) => {
|
|
2535
|
-
let r = /* @__PURE__ */ new Set();
|
|
2536
|
-
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2537
|
-
if (r.size === 0) return null;
|
|
2538
|
-
let i = Infinity;
|
|
2539
|
-
for (let a of r) {
|
|
2540
|
-
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;
|
|
2541
|
-
if (r !== void 0 && r === o) continue;
|
|
2542
|
-
if (!jr.has(a)) return null;
|
|
2543
|
-
let s = Mr(e.from, a, t), c = Mr(e.to, a, t);
|
|
2544
|
-
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2545
|
-
let l = Math.abs(c - s);
|
|
2546
|
-
if (l === 0) continue;
|
|
2547
|
-
let u = a === "opacity" ? Or : 1 / Math.max(1, n);
|
|
2548
|
-
i = Math.min(i, u / l);
|
|
2549
|
-
}
|
|
2550
|
-
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2551
|
-
}, Pr = (e, t, n) => {
|
|
2552
|
-
if (e.duration <= 0) return null;
|
|
2553
|
-
let r = Nr(e, t, n);
|
|
2554
|
-
if (r === null) return null;
|
|
2555
|
-
let i = Dr(e.ease), a = kr;
|
|
2556
|
-
for (let e = kr; e >= 0 && !(Math.abs(1 - i(e / kr)) > r); --e) a = e;
|
|
2557
|
-
if (a === 0) return null;
|
|
2558
|
-
let o = (e.delay + e.duration * (a / kr)) * 1e3;
|
|
2559
|
-
return (e.delay + e.duration) * 1e3 - o < Ar ? null : o;
|
|
2560
|
-
}, Fr = 1e3 / 120, Ir = 4, Y = 400, Lr = 4, X = (e) => {
|
|
2561
|
-
let t = +e.toFixed(5);
|
|
2562
|
-
return Object.is(t, -0) ? 0 : t;
|
|
2563
|
-
}, Rr = (e, t, n) => {
|
|
2564
|
-
if (e.duration <= 0) return null;
|
|
2565
|
-
let r = Number.isFinite(n) && n > 0 ? n : 1, i = /* @__PURE__ */ new Set();
|
|
2566
|
-
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) i.add(e);
|
|
2567
|
-
let a = 0;
|
|
2568
|
-
for (let n of i) {
|
|
2569
|
-
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;
|
|
2570
|
-
if (i !== void 0 && i === o) continue;
|
|
2571
|
-
if (n !== "x" && n !== "y") return null;
|
|
2572
|
-
let s = Mr(e.from, n, t), c = Mr(e.to, n, t);
|
|
2573
|
-
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2574
|
-
a = Math.max(a, Math.abs(c - s) * r);
|
|
2575
|
-
}
|
|
2576
|
-
if (a < Ir) return null;
|
|
2577
|
-
let o = Dr(e.ease), s = Array(401);
|
|
2578
|
-
for (let e = 0; e <= Y; e += 1) s[e] = o(e / Y);
|
|
2579
|
-
let c = e.duration * 1e3 / Y, l = 40 / a * c / Fr, u = Y, d = 0;
|
|
2580
|
-
for (let e = 399; e >= 0 && (d = Math.max(d, Math.abs(s[e + 1] - s[e])), !(d > l)); --e) u = e;
|
|
2581
|
-
for (let e = u; e < Y; e += 1) if (s[e + 1] < s[e] || s[e] > 1) return null;
|
|
2582
|
-
let f = (1 - s[u]) * a;
|
|
2583
|
-
if (f <= 1) return null;
|
|
2584
|
-
let p = Math.min(480, Math.floor(f)), m = u, h = (e) => {
|
|
2585
|
-
let t = 1 - e / a;
|
|
2586
|
-
for (; m < Y && s[m] < t;) m += 1;
|
|
2587
|
-
if (m === 0) return 0;
|
|
2588
|
-
let n = s[m - 1], r = s[m], i = r === n ? 1 : Math.max(0, Math.min(1, (t - n) / (r - n)));
|
|
2589
|
-
return (m - 1 + i) / Y * 100;
|
|
2590
|
-
}, g = h(p), _ = [];
|
|
2591
|
-
for (let e = 0; 100 / Y * e < g; e += Lr) _.push(`${X(s[e])} ${X(e / Y * 100)}%`);
|
|
2592
|
-
let v = g;
|
|
2593
|
-
for (let e = p; e >= 2; --e) {
|
|
2594
|
-
let t = h(e - 1);
|
|
2595
|
-
if (t > v) {
|
|
2596
|
-
let n = X(1 - e / a);
|
|
2597
|
-
_.push(`${n} ${X(v)}%`, `${n} ${X(t)}%`);
|
|
2544
|
+
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(ei, e))), r;
|
|
2545
|
+
}
|
|
2546
|
+
$r();
|
|
2547
|
+
//#endregion
|
|
2548
|
+
//#region src/core/engine/flightHolds.ts
|
|
2549
|
+
var ni = () => {}, ri = 1500, ii = 400, ai = (e) => {
|
|
2550
|
+
let t = null, n = null, r = null, i = null;
|
|
2551
|
+
return { sync: ({ isTransitional: a, isActive: o, status: s, transitionName: c, getScope: l }) => {
|
|
2552
|
+
a && (jr(), i &&= (clearTimeout(i), null), r ||= Or()), !a && r && !i && (typeof setTimeout == "function" ? i = setTimeout(() => {
|
|
2553
|
+
i = null, r?.(), r = null;
|
|
2554
|
+
}, ii) : (r(), r = null));
|
|
2555
|
+
let u = a && (o ? s === "PUSHING" || s === "REPLACING" : s === "POPPING"), d = a && !u;
|
|
2556
|
+
if (!d && n) {
|
|
2557
|
+
let t = n;
|
|
2558
|
+
n = null, a ? t() : e.scheduleLanding(t);
|
|
2598
2559
|
}
|
|
2599
|
-
|
|
2600
|
-
|
|
2601
|
-
|
|
2602
|
-
}, zr = 12, Br = (e, t, n, r) => {
|
|
2603
|
-
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2604
|
-
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2605
|
-
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
2606
|
-
let o = 0;
|
|
2607
|
-
for (let n of a) {
|
|
2608
|
-
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;
|
|
2609
|
-
if (r !== void 0 && r === a) continue;
|
|
2610
|
-
if (n !== "x" && n !== "y") return null;
|
|
2611
|
-
let s = Mr(e.from, n, t), c = Mr(e.to, n, t);
|
|
2612
|
-
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2613
|
-
o = Math.max(o, Math.abs(c - s) * i);
|
|
2614
|
-
}
|
|
2615
|
-
if (o < zr) return null;
|
|
2616
|
-
let s = Dr(e.ease), c = Array(401);
|
|
2617
|
-
for (let e = 0; e <= Y; e += 1) c[e] = s(e / Y);
|
|
2618
|
-
let l = e.duration * 1e3, u = l / Y, d = 1 / o * (u / r), f = Y, p = 0;
|
|
2619
|
-
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2620
|
-
if (f === 0 || f >= Y) return null;
|
|
2621
|
-
for (let e = f; e < Y; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2622
|
-
let m = (1 - c[f]) * o;
|
|
2623
|
-
if (m <= 1 || m > zr) return null;
|
|
2624
|
-
let h = f / Y * 100, g = m * r / l * 100;
|
|
2625
|
-
if (h + g >= 100) return null;
|
|
2626
|
-
let _ = [];
|
|
2627
|
-
for (let e = 0; e <= f; e += Lr) _.push(`${X(c[e])} ${X(e / Y * 100)}%`);
|
|
2628
|
-
return _.push(`${X(c[f])} ${X(h)}%`), _.push(`1 ${X(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2629
|
-
}, Vr = /* @__PURE__ */ new WeakMap(), Hr = Symbol("flemo-layer-owner"), Ur = (e, t) => {
|
|
2630
|
-
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2631
|
-
}, Wr = (e, t) => {
|
|
2632
|
-
let n = e.trim() === "none" ? "" : e.trim();
|
|
2633
|
-
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2634
|
-
}, Gr = (e, t) => {
|
|
2635
|
-
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2636
|
-
for (let e of t.willChange.split(",")) {
|
|
2637
|
-
let t = e.trim();
|
|
2638
|
-
t && t !== "auto" && n.add(t);
|
|
2639
|
-
}
|
|
2640
|
-
for (let e of t.owners.values()) {
|
|
2641
|
-
for (let t of e.properties) n.add(t);
|
|
2642
|
-
e.containment && (r = !0);
|
|
2643
|
-
}
|
|
2644
|
-
e.style.willChange = [...n].join(", ");
|
|
2645
|
-
let i = Wr(t.contain, r);
|
|
2646
|
-
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2647
|
-
}, Z = (e, t, n = !1, r = Hr) => {
|
|
2648
|
-
let i = Jt(t), a = Vr.get(e);
|
|
2649
|
-
if (i.length === 0) {
|
|
2650
|
-
if (!a) return;
|
|
2651
|
-
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), Ur(e, a), Vr.delete(e)) : Gr(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), Ur(e, a), Vr.delete(e));
|
|
2652
|
-
return;
|
|
2653
|
-
}
|
|
2654
|
-
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
2655
|
-
owners: /* @__PURE__ */ new Map(),
|
|
2656
|
-
settleOwner: null,
|
|
2657
|
-
willChange: e.style.willChange,
|
|
2658
|
-
contain: e.style.contain,
|
|
2659
|
-
pending: null
|
|
2660
|
-
}, Vr.set(e, a)), a.owners.set(r, {
|
|
2661
|
-
properties: i,
|
|
2662
|
-
containment: n
|
|
2663
|
-
}), a.settleOwner = null, Gr(e, a);
|
|
2664
|
-
}, Q = (e, t = Hr) => {
|
|
2665
|
-
let n = Vr.get(e);
|
|
2666
|
-
if (!(!n || !n.owners.has(t))) {
|
|
2667
|
-
if (n.owners.delete(t), n.owners.size > 0) {
|
|
2668
|
-
Gr(e, n);
|
|
2669
|
-
return;
|
|
2560
|
+
if (!u && t) {
|
|
2561
|
+
let n = t;
|
|
2562
|
+
t = null, a ? n() : e.scheduleLanding(n);
|
|
2670
2563
|
}
|
|
2671
|
-
if (
|
|
2672
|
-
|
|
2673
|
-
|
|
2564
|
+
if (u && !t && Fe()) {
|
|
2565
|
+
e.landNow();
|
|
2566
|
+
let n = l();
|
|
2567
|
+
if (n) {
|
|
2568
|
+
Wn(n);
|
|
2569
|
+
let e = _r(n), r = qr(n), i = Lr(n, ct(c), s), a = ti(i + ri), o = Me() === "on" ? Ur(n, i + ri) : ni, l = Zn();
|
|
2570
|
+
t = () => {
|
|
2571
|
+
a(), o(), r(), e(), l();
|
|
2572
|
+
};
|
|
2573
|
+
}
|
|
2674
2574
|
}
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
Ur(e, n), Vr.delete(e);
|
|
2680
|
-
return;
|
|
2575
|
+
if (d && !n && Fe()) {
|
|
2576
|
+
e.landNow();
|
|
2577
|
+
let t = l();
|
|
2578
|
+
t && Me() === "on" && (n = Ur(t, Lr(t, ct(c), s) + ri, !0));
|
|
2681
2579
|
}
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2688
|
-
|
|
2689
|
-
|
|
2580
|
+
} };
|
|
2581
|
+
}, oi = 1e3 / 60, si = 1e3 / 600, ci = 42, li = oi, ui = () => li, di = (e) => {
|
|
2582
|
+
Number.isFinite(e) && (e < si || e > ci || (li = Math.min(oi, Math.max(si, e))));
|
|
2583
|
+
}, fi = () => {}, pi = null, mi = () => {
|
|
2584
|
+
/* v8 ignore next 2 -- the loop only runs where rAF existed to start it; the
|
|
2585
|
+
re-check covers an environment that removes it mid-session. */
|
|
2586
|
+
pi = typeof requestAnimationFrame == "function" ? requestAnimationFrame(mi) : null;
|
|
2587
|
+
}, hi = () => (pi === null && typeof requestAnimationFrame == "function" && (pi = requestAnimationFrame(mi)), fi), gi = !1, _i = 0, vi = () => {
|
|
2588
|
+
gi &&= (_i += 1, !1);
|
|
2589
|
+
}, yi = 2, bi = 8, xi = () => {
|
|
2590
|
+
if (gi || typeof requestAnimationFrame != "function") return;
|
|
2591
|
+
gi = !0;
|
|
2592
|
+
let e = ++_i, t = [], n = yi, r = null, i = (a) => {
|
|
2593
|
+
if (e !== _i) return;
|
|
2594
|
+
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < bi) {
|
|
2595
|
+
requestAnimationFrame(i);
|
|
2690
2596
|
return;
|
|
2691
2597
|
}
|
|
2692
|
-
|
|
2693
|
-
|
|
2694
|
-
|
|
2695
|
-
|
|
2696
|
-
|
|
2697
|
-
},
|
|
2598
|
+
gi = !1;
|
|
2599
|
+
let o = [...t].sort((e, t) => e - t), s = o[Math.floor(o.length / 2)];
|
|
2600
|
+
di(s), ke(s, o[o.length - 1]);
|
|
2601
|
+
};
|
|
2602
|
+
requestAnimationFrame(i);
|
|
2603
|
+
}, Si = () => typeof navigator < "u" && navigator.maxTouchPoints > 0, Ci = (e) => {
|
|
2604
|
+
let { status: t, transition: n, skipAnimation: r, hasActiveMotion: i, hasAnimation: a } = e, o = F(), s = Si(), c = !o && s && ve(), l = Ue(), u = o && s && (l === "on" || l !== "off" && I()), d = !o && s && (t === "POPPING" || t === "PUSHING" && Pe()), f = c || u || d, p = ge() && ze();
|
|
2605
|
+
return {
|
|
2606
|
+
hasDrivableMotion: !r && i,
|
|
2607
|
+
nativeSurgeryAllowed: n.driver === "native" && !o,
|
|
2608
|
+
touchGoverned: c,
|
|
2609
|
+
forceCompiled: d,
|
|
2610
|
+
governedHead: f,
|
|
2611
|
+
desktopHead: p,
|
|
2612
|
+
birthHoldMs: f ? kn[t] ?? 0 : p ? On[t] ?? 0 : 0,
|
|
2613
|
+
governedSlide: c && (t === "PUSHING" || t === "POPPING"),
|
|
2614
|
+
framePacingKeepalive: a && o && (typeof navigator < "u" && navigator.maxTouchPoints === 0 || ui() < 12),
|
|
2615
|
+
creepHead: f && Le()
|
|
2616
|
+
};
|
|
2617
|
+
}, wi = 1e3 / 60 * 2, Ti = "flemo-", Ei = /* @__PURE__ */ new WeakMap(), Di = (e, t, n) => {
|
|
2698
2618
|
if (typeof e.getAnimations == "function") for (let r of e.getAnimations({ subtree: !0 })) {
|
|
2699
2619
|
let e = r.animationName;
|
|
2700
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2620
|
+
if (typeof e != "string" || !e.startsWith(Ti) || r.playState !== "running" || Ei.get(r) === n) continue;
|
|
2701
2621
|
let i = r.startTime;
|
|
2702
|
-
typeof i == "number" && (r.startTime = i + t,
|
|
2622
|
+
typeof i == "number" && (r.startTime = i + t, Ei.set(r, n));
|
|
2703
2623
|
}
|
|
2704
|
-
},
|
|
2705
|
-
function
|
|
2624
|
+
}, Oi = /* @__PURE__ */ new WeakSet(), ki = 1e3, Ai = 3e3;
|
|
2625
|
+
function ji(e, t, n) {
|
|
2706
2626
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2707
2627
|
let r = 0, i = !1, a = !1, o = !1, s = null, c = [], l = null, u = () => {
|
|
2708
2628
|
s !== null && (clearTimeout(s), s = null);
|
|
@@ -2716,7 +2636,7 @@ function ti(e, t, n) {
|
|
|
2716
2636
|
i = !0, m.disconnect();
|
|
2717
2637
|
for (let e of t()) if (!(!e || typeof e.getAnimations != "function")) for (let t of e.getAnimations({ subtree: !0 })) {
|
|
2718
2638
|
let e = t.animationName;
|
|
2719
|
-
if (typeof e != "string" || !e.startsWith(
|
|
2639
|
+
if (typeof e != "string" || !e.startsWith(Ti) || t.playState !== "running" || Oi.has(t)) continue;
|
|
2720
2640
|
let n = t.currentTime;
|
|
2721
2641
|
if (!(typeof n == "number" && n > 33.333333333333336)) {
|
|
2722
2642
|
try {
|
|
@@ -2724,18 +2644,18 @@ function ti(e, t, n) {
|
|
|
2724
2644
|
} catch {
|
|
2725
2645
|
continue;
|
|
2726
2646
|
}
|
|
2727
|
-
|
|
2647
|
+
Oi.add(t), c.push(t);
|
|
2728
2648
|
}
|
|
2729
2649
|
}
|
|
2730
2650
|
if (c.length === 0) return;
|
|
2731
|
-
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f,
|
|
2732
|
-
let e =
|
|
2651
|
+
r = requestAnimationFrame(f), typeof setTimeout == "function" && (s = setTimeout(f, ki));
|
|
2652
|
+
let e = Ii(t, () => {
|
|
2733
2653
|
a || n?.();
|
|
2734
2654
|
});
|
|
2735
2655
|
if (l = e, typeof setTimeout == "function") {
|
|
2736
2656
|
let t = setTimeout(() => {
|
|
2737
2657
|
l === e && (l = null), e();
|
|
2738
|
-
},
|
|
2658
|
+
}, Ai), n = e;
|
|
2739
2659
|
l = () => {
|
|
2740
2660
|
clearTimeout(t), n();
|
|
2741
2661
|
};
|
|
@@ -2745,21 +2665,21 @@ function ti(e, t, n) {
|
|
|
2745
2665
|
});
|
|
2746
2666
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? p() : m.observe(e, {
|
|
2747
2667
|
attributes: !0,
|
|
2748
|
-
attributeFilter: [
|
|
2668
|
+
attributeFilter: [V]
|
|
2749
2669
|
}), () => {
|
|
2750
2670
|
a = !0, m.disconnect(), r &&= (cancelAnimationFrame(r), 0), u(), l?.(), l = null, i && !o && d();
|
|
2751
2671
|
};
|
|
2752
2672
|
}
|
|
2753
|
-
var
|
|
2754
|
-
function
|
|
2673
|
+
var Mi = 150, Ni = 4e3, Pi = 400;
|
|
2674
|
+
function Fi(e, t, n = !0, r = !1) {
|
|
2755
2675
|
/* v8 ignore next -- same rAF guard as the watcher below. */
|
|
2756
2676
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
2757
2677
|
let i = [], a = /* @__PURE__ */ new Map();
|
|
2758
2678
|
for (let t of e()) if (!(!t || typeof t.getAnimations != "function")) for (let e of t.getAnimations({ subtree: !0 })) {
|
|
2759
2679
|
let t = e.animationName;
|
|
2760
|
-
if (typeof t != "string" || !t.startsWith(
|
|
2680
|
+
if (typeof t != "string" || !t.startsWith(Ti) || e.playState !== "running" || Oi.has(e)) continue;
|
|
2761
2681
|
let n = e.currentTime;
|
|
2762
|
-
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (
|
|
2682
|
+
typeof n == "number" && n > 33.333333333333336 || (n === null || typeof n == "number") && (Oi.add(e), i.push(e), a.set(e, typeof n == "number" ? n : 0));
|
|
2763
2683
|
}
|
|
2764
2684
|
if (i.length === 0) return () => {};
|
|
2765
2685
|
let o = 0, s = null, c = !1, l = !1, u = !1, d = null, f = null, p = 0, m = (e) => {
|
|
@@ -2772,7 +2692,7 @@ function ai(e, t, n = !0, r = !1) {
|
|
|
2772
2692
|
if (typeof r != "number" || typeof i != "number") continue;
|
|
2773
2693
|
let o = (a.get(n) ?? 0) + e;
|
|
2774
2694
|
n.startTime = i + (r - o), a.set(n, o);
|
|
2775
|
-
let s = r +
|
|
2695
|
+
let s = r + Ni;
|
|
2776
2696
|
t = Math.max(t, s - o);
|
|
2777
2697
|
}
|
|
2778
2698
|
return t;
|
|
@@ -2780,7 +2700,7 @@ function ai(e, t, n = !0, r = !1) {
|
|
|
2780
2700
|
if (c) return;
|
|
2781
2701
|
if (d === null && (d = e), f !== null) {
|
|
2782
2702
|
let t = e - f;
|
|
2783
|
-
p += Math.min(Math.max(0, t),
|
|
2703
|
+
p += Math.min(Math.max(0, t), wi);
|
|
2784
2704
|
}
|
|
2785
2705
|
if (f = e, !l) {
|
|
2786
2706
|
if (l = !0, r) {
|
|
@@ -2792,7 +2712,7 @@ function ai(e, t, n = !0, r = !1) {
|
|
|
2792
2712
|
if (typeof n != "number" || typeof r != "number") continue;
|
|
2793
2713
|
let i = a.get(t) ?? 0;
|
|
2794
2714
|
if (n <= i + 33.333333333333336) continue;
|
|
2795
|
-
let o = n - (i +
|
|
2715
|
+
let o = n - (i + wi);
|
|
2796
2716
|
t.startTime = r + o, e = Math.max(e, o);
|
|
2797
2717
|
}
|
|
2798
2718
|
e > 0 && t?.(e);
|
|
@@ -2806,13 +2726,13 @@ function ai(e, t, n = !0, r = !1) {
|
|
|
2806
2726
|
if (e.playState !== "running") continue;
|
|
2807
2727
|
let t = e.startTime;
|
|
2808
2728
|
if (typeof t == "number") {
|
|
2809
|
-
e.startTime = t +
|
|
2729
|
+
e.startTime = t + Ni;
|
|
2810
2730
|
continue;
|
|
2811
2731
|
}
|
|
2812
2732
|
let n = e.timeline?.currentTime;
|
|
2813
|
-
typeof n == "number" && (e.startTime = n +
|
|
2733
|
+
typeof n == "number" && (e.startTime = n + Ni);
|
|
2814
2734
|
}
|
|
2815
|
-
typeof setTimeout == "function" && (s = setTimeout(() => m(p +
|
|
2735
|
+
typeof setTimeout == "function" && (s = setTimeout(() => m(p + wi), Pi)), o = requestAnimationFrame(h);
|
|
2816
2736
|
return;
|
|
2817
2737
|
}
|
|
2818
2738
|
if (!u) {
|
|
@@ -2835,13 +2755,13 @@ function ai(e, t, n = !0, r = !1) {
|
|
|
2835
2755
|
t?.(g);
|
|
2836
2756
|
return;
|
|
2837
2757
|
}
|
|
2838
|
-
e - d <
|
|
2758
|
+
e - d < Mi && (o = requestAnimationFrame(h));
|
|
2839
2759
|
};
|
|
2840
2760
|
return o = requestAnimationFrame(h), () => {
|
|
2841
|
-
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p +
|
|
2761
|
+
c = !0, cancelAnimationFrame(o), s !== null && clearTimeout(s), l && !u && m(p + wi);
|
|
2842
2762
|
};
|
|
2843
2763
|
}
|
|
2844
|
-
function
|
|
2764
|
+
function Ii(e, t) {
|
|
2845
2765
|
/* v8 ignore next -- every runtime under test has rAF; the guard shields
|
|
2846
2766
|
exotic embedders. */
|
|
2847
2767
|
if (typeof requestAnimationFrame != "function") return () => {};
|
|
@@ -2850,8 +2770,8 @@ function oi(e, t) {
|
|
|
2850
2770
|
if (r !== null) {
|
|
2851
2771
|
let n = o - r;
|
|
2852
2772
|
if (n > 33.333333333333336) {
|
|
2853
|
-
let r = n -
|
|
2854
|
-
for (let t of e()) t &&
|
|
2773
|
+
let r = n - wi;
|
|
2774
|
+
for (let t of e()) t && Di(t, r, o);
|
|
2855
2775
|
t?.(r);
|
|
2856
2776
|
}
|
|
2857
2777
|
}
|
|
@@ -2862,29 +2782,29 @@ function oi(e, t) {
|
|
|
2862
2782
|
i = !0, cancelAnimationFrame(n);
|
|
2863
2783
|
};
|
|
2864
2784
|
}
|
|
2865
|
-
var
|
|
2866
|
-
function
|
|
2785
|
+
var Li = /* @__PURE__ */ new WeakMap();
|
|
2786
|
+
function Ri(e, t, n, r = !0, i = !1) {
|
|
2867
2787
|
if (typeof MutationObserver > "u" || typeof requestAnimationFrame != "function") return () => {};
|
|
2868
|
-
let a =
|
|
2869
|
-
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () =>
|
|
2788
|
+
let a = Li.get(e);
|
|
2789
|
+
if (a) return a.refs += 1, a.pendingDrop !== null && (clearTimeout(a.pendingDrop), a.pendingDrop = null), () => zi(e);
|
|
2870
2790
|
let o = null, s = !1, c = !1, l = () => {
|
|
2871
|
-
s || c || (s = !0, u.disconnect(), o =
|
|
2791
|
+
s || c || (s = !0, u.disconnect(), o = Fi(t, n, r, i));
|
|
2872
2792
|
}, u = new MutationObserver(() => {
|
|
2873
2793
|
e.getAttribute("data-flemo-anim-hold") === "false" && l();
|
|
2874
2794
|
});
|
|
2875
2795
|
return e.getAttribute("data-flemo-anim-hold") === "false" ? l() : u.observe(e, {
|
|
2876
2796
|
attributes: !0,
|
|
2877
|
-
attributeFilter: [
|
|
2878
|
-
}),
|
|
2797
|
+
attributeFilter: [V]
|
|
2798
|
+
}), Li.set(e, {
|
|
2879
2799
|
refs: 1,
|
|
2880
2800
|
pendingDrop: null,
|
|
2881
2801
|
dispose: () => {
|
|
2882
|
-
c = !0, u.disconnect(), o?.(),
|
|
2802
|
+
c = !0, u.disconnect(), o?.(), Li.delete(e);
|
|
2883
2803
|
}
|
|
2884
|
-
}), () =>
|
|
2804
|
+
}), () => zi(e);
|
|
2885
2805
|
}
|
|
2886
|
-
var
|
|
2887
|
-
let t =
|
|
2806
|
+
var zi = (e) => {
|
|
2807
|
+
let t = Li.get(e);
|
|
2888
2808
|
if (t && (--t.refs, !(t.refs > 0))) {
|
|
2889
2809
|
/* v8 ignore next 4 -- setTimeout exists in every runtime under test. */
|
|
2890
2810
|
if (typeof setTimeout != "function") {
|
|
@@ -2893,521 +2813,270 @@ var li = (e) => {
|
|
|
2893
2813
|
}
|
|
2894
2814
|
t.pendingDrop !== null && clearTimeout(t.pendingDrop), t.pendingDrop = setTimeout(t.dispose, 0);
|
|
2895
2815
|
}
|
|
2896
|
-
},
|
|
2897
|
-
let e =
|
|
2898
|
-
|
|
2899
|
-
|
|
2900
|
-
|
|
2901
|
-
|
|
2902
|
-
|
|
2903
|
-
|
|
2904
|
-
|
|
2905
|
-
|
|
2906
|
-
|
|
2907
|
-
if (di <= 0) throw e;
|
|
2908
|
-
return new Promise((t, n) => {
|
|
2909
|
-
fi.push(() => n(e));
|
|
2910
|
-
});
|
|
2911
|
-
});
|
|
2912
|
-
}, gi = 2e3;
|
|
2913
|
-
function _i(e = gi) {
|
|
2914
|
-
/* v8 ignore next -- SSR guard: without fetch there is nothing to hold. */
|
|
2915
|
-
if (hi(), !ui) return () => {};
|
|
2916
|
-
di += 1;
|
|
2917
|
-
let t = !1, n = null, r = () => {
|
|
2918
|
-
t || (t = !0, n !== null && clearTimeout(n), di = Math.max(0, di - 1), di === 0 && pi());
|
|
2919
|
-
};
|
|
2920
|
-
return typeof setTimeout == "function" && (n = setTimeout(r, Math.max(gi, e))), r;
|
|
2921
|
-
}
|
|
2922
|
-
hi();
|
|
2923
|
-
//#endregion
|
|
2924
|
-
//#region src/core/engine/transitionPlayer.ts
|
|
2925
|
-
var vi = [
|
|
2926
|
-
"x",
|
|
2927
|
-
"y",
|
|
2928
|
-
"z",
|
|
2929
|
-
"scale",
|
|
2930
|
-
"scaleX",
|
|
2931
|
-
"scaleY",
|
|
2932
|
-
"rotate",
|
|
2933
|
-
"rotateX",
|
|
2934
|
-
"rotateY",
|
|
2935
|
-
"rotateZ"
|
|
2936
|
-
], yi = new Set(vi), bi = {
|
|
2937
|
-
x: 0,
|
|
2938
|
-
y: 0,
|
|
2939
|
-
z: 0,
|
|
2940
|
-
scale: 1,
|
|
2941
|
-
scaleX: 1,
|
|
2942
|
-
scaleY: 1,
|
|
2943
|
-
rotate: 0,
|
|
2944
|
-
rotateX: 0,
|
|
2945
|
-
rotateY: 0,
|
|
2946
|
-
rotateZ: 0
|
|
2947
|
-
}, xi = (e, t) => {
|
|
2948
|
-
if (typeof t == "number") return {
|
|
2949
|
-
value: t,
|
|
2950
|
-
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
2951
|
-
};
|
|
2952
|
-
if (typeof t != "string") return null;
|
|
2953
|
-
let n = t.trim(), r = /^(-?\d*\.?\d+)(px|%|deg)?$/.exec(n);
|
|
2954
|
-
if (!r) return null;
|
|
2955
|
-
let i = parseFloat(r[1]), a = r[2] ?? "";
|
|
2956
|
-
return e === "rotate" || e === "rotateX" || e === "rotateY" || e === "rotateZ" ? a !== "deg" && (a !== "" || i !== 0) ? null : {
|
|
2957
|
-
value: i,
|
|
2958
|
-
unit: ""
|
|
2959
|
-
} : e === "scale" || e === "scaleX" || e === "scaleY" ? a === "" ? {
|
|
2960
|
-
value: i,
|
|
2961
|
-
unit: ""
|
|
2962
|
-
} : null : a === "deg" ? null : {
|
|
2963
|
-
value: i,
|
|
2964
|
-
unit: a === "" && i === 0 ? "px" : a
|
|
2965
|
-
};
|
|
2966
|
-
}, Si = /-?\d*\.?\d+/g, Ci = (e, t) => {
|
|
2967
|
-
let n = e.match(Si) ?? [], r = t.match(Si) ?? [];
|
|
2968
|
-
if (n.length !== r.length || e.replace(Si, " ") !== t.replace(Si, " ")) return null;
|
|
2969
|
-
let i = n.map(Number), a = r.map(Number);
|
|
2970
|
-
return (t) => {
|
|
2971
|
-
let n = 0;
|
|
2972
|
-
return e.replace(Si, () => {
|
|
2973
|
-
let e = n++, r = i[e] + (a[e] - i[e]) * t;
|
|
2974
|
-
return `${Math.round(r * 1e3) / 1e3}`;
|
|
2975
|
-
});
|
|
2816
|
+
}, Bi = (e, t, n, r) => {
|
|
2817
|
+
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;
|
|
2818
|
+
return (e) => {
|
|
2819
|
+
if (e <= 0) return 0;
|
|
2820
|
+
if (e >= 1) return 1;
|
|
2821
|
+
let t = 0, n = 1;
|
|
2822
|
+
for (let r = 0; r < 40; r++) {
|
|
2823
|
+
let r = (t + n) / 2;
|
|
2824
|
+
i(r) < e ? t = r : n = r;
|
|
2825
|
+
}
|
|
2826
|
+
return a((t + n) / 2);
|
|
2976
2827
|
};
|
|
2977
|
-
},
|
|
2978
|
-
|
|
2979
|
-
|
|
2980
|
-
|
|
2981
|
-
|
|
2982
|
-
|
|
2983
|
-
|
|
2984
|
-
|
|
2985
|
-
|
|
2986
|
-
|
|
2987
|
-
|
|
2988
|
-
|
|
2989
|
-
|
|
2990
|
-
|
|
2991
|
-
|
|
2992
|
-
|
|
2993
|
-
|
|
2994
|
-
|
|
2995
|
-
|
|
2996
|
-
|
|
2997
|
-
|
|
2828
|
+
}, Vi = (e) => e, Hi = {
|
|
2829
|
+
ease: [
|
|
2830
|
+
.25,
|
|
2831
|
+
.1,
|
|
2832
|
+
.25,
|
|
2833
|
+
1
|
|
2834
|
+
],
|
|
2835
|
+
easeIn: [
|
|
2836
|
+
.42,
|
|
2837
|
+
0,
|
|
2838
|
+
1,
|
|
2839
|
+
1
|
|
2840
|
+
],
|
|
2841
|
+
easeOut: [
|
|
2842
|
+
0,
|
|
2843
|
+
0,
|
|
2844
|
+
.58,
|
|
2845
|
+
1
|
|
2846
|
+
],
|
|
2847
|
+
easeInOut: [
|
|
2848
|
+
.42,
|
|
2849
|
+
0,
|
|
2850
|
+
.58,
|
|
2851
|
+
1
|
|
2852
|
+
],
|
|
2853
|
+
circIn: [
|
|
2854
|
+
0,
|
|
2855
|
+
.55,
|
|
2856
|
+
.45,
|
|
2857
|
+
1
|
|
2858
|
+
],
|
|
2859
|
+
circOut: [
|
|
2860
|
+
.55,
|
|
2861
|
+
0,
|
|
2862
|
+
1,
|
|
2863
|
+
.45
|
|
2864
|
+
],
|
|
2865
|
+
backIn: [
|
|
2866
|
+
.31,
|
|
2867
|
+
.01,
|
|
2868
|
+
.66,
|
|
2869
|
+
-.59
|
|
2870
|
+
],
|
|
2871
|
+
backOut: [
|
|
2872
|
+
.33,
|
|
2873
|
+
1.53,
|
|
2874
|
+
.69,
|
|
2875
|
+
.99
|
|
2876
|
+
],
|
|
2877
|
+
anticipate: [
|
|
2878
|
+
.36,
|
|
2879
|
+
0,
|
|
2880
|
+
.66,
|
|
2881
|
+
-.56
|
|
2882
|
+
]
|
|
2883
|
+
}, Ui = (e) => Array.isArray(e) ? e.length === 4 && e.every((e) => typeof e == "number") ? [...e] : null : typeof e == "string" ? e === "linear" ? null : [...Hi[e] ?? Hi.ease] : [...Hi.ease], Wi = (e) => {
|
|
2884
|
+
if (Array.isArray(e)) {
|
|
2885
|
+
if (e.length === 4 && e.every((e) => typeof e == "number")) {
|
|
2886
|
+
let [t, n, r, i] = e;
|
|
2887
|
+
return Bi(t, n, r, i);
|
|
2998
2888
|
}
|
|
2889
|
+
return Vi;
|
|
2999
2890
|
}
|
|
3000
|
-
return
|
|
3001
|
-
},
|
|
3002
|
-
|
|
3003
|
-
|
|
3004
|
-
|
|
3005
|
-
|
|
3006
|
-
|
|
3007
|
-
|
|
3008
|
-
return
|
|
3009
|
-
|
|
3010
|
-
|
|
3011
|
-
|
|
3012
|
-
|
|
3013
|
-
|
|
3014
|
-
|
|
3015
|
-
|
|
3016
|
-
|
|
3017
|
-
let r = Di(e.from, n), i = Di(e.to, n);
|
|
3018
|
-
if (yi.has(n)) {
|
|
3019
|
-
let e = n, o = {
|
|
3020
|
-
value: bi[e],
|
|
3021
|
-
unit: e === "x" || e === "y" || e === "z" ? "px" : ""
|
|
3022
|
-
}, s = r === void 0 ? o : xi(e, r), c = i === void 0 ? o : xi(e, i);
|
|
3023
|
-
if (!s || !c || s.unit !== c.unit && s.value !== 0 && c.value !== 0) return null;
|
|
3024
|
-
let l = s.value === 0 && s.unit !== c.unit ? c.unit : s.unit, u = l === "%", d = 0;
|
|
3025
|
-
u && t && (d = e === "y" ? t.offsetHeight / 100 : t.offsetWidth / 100), a.push({
|
|
3026
|
-
prop: e,
|
|
3027
|
-
from: {
|
|
3028
|
-
value: s.value,
|
|
3029
|
-
unit: l
|
|
3030
|
-
},
|
|
3031
|
-
to: {
|
|
3032
|
-
value: c.value,
|
|
3033
|
-
unit: l
|
|
3034
|
-
},
|
|
3035
|
-
percentBase: d
|
|
3036
|
-
});
|
|
3037
|
-
continue;
|
|
3038
|
-
}
|
|
3039
|
-
if (n === "opacity") {
|
|
3040
|
-
let e = r === void 0 ? 1 : r, t = i === void 0 ? 1 : i;
|
|
3041
|
-
if (typeof e != "number" || typeof t != "number") return null;
|
|
3042
|
-
o = {
|
|
3043
|
-
from: e,
|
|
3044
|
-
to: t
|
|
3045
|
-
};
|
|
3046
|
-
continue;
|
|
3047
|
-
}
|
|
3048
|
-
if (r === void 0 || i === void 0) return null;
|
|
3049
|
-
let l = typeof r == "number" ? `${r}` : r, u = typeof i == "number" ? `${i}` : i;
|
|
3050
|
-
if (typeof l != "string" || typeof u != "string") return null;
|
|
3051
|
-
if (l === u) {
|
|
3052
|
-
c.push({
|
|
3053
|
-
property: wi(n),
|
|
3054
|
-
value: l
|
|
3055
|
-
});
|
|
3056
|
-
continue;
|
|
3057
|
-
}
|
|
3058
|
-
let d = Ci(l, u);
|
|
3059
|
-
if (!d) return null;
|
|
3060
|
-
s.push({
|
|
3061
|
-
property: wi(n),
|
|
3062
|
-
mix: d
|
|
3063
|
-
});
|
|
2891
|
+
return typeof e == "string" ? e === "linear" ? Vi : Bi(...Hi[e] ?? Hi.ease) : Bi(...Hi.ease);
|
|
2892
|
+
}, Gi = 1 / 255, Ki = 400, qi = 24, Ji = /* @__PURE__ */ new Set([
|
|
2893
|
+
"x",
|
|
2894
|
+
"y",
|
|
2895
|
+
"opacity"
|
|
2896
|
+
]), Yi = (e, t, n) => {
|
|
2897
|
+
if (!e || typeof e != "object") return;
|
|
2898
|
+
let r = e[t];
|
|
2899
|
+
if (r === void 0) return;
|
|
2900
|
+
if (typeof r == "number") return r;
|
|
2901
|
+
if (typeof r != "string") return null;
|
|
2902
|
+
let i = r.trim();
|
|
2903
|
+
if (i.endsWith("%")) {
|
|
2904
|
+
let e = Number(i.slice(0, -1));
|
|
2905
|
+
if (Number.isNaN(e)) return null;
|
|
2906
|
+
let r = t === "y" ? n.clientHeight : n.clientWidth;
|
|
2907
|
+
return e / 100 * r;
|
|
3064
2908
|
}
|
|
3065
|
-
|
|
3066
|
-
|
|
3067
|
-
|
|
3068
|
-
strings: s,
|
|
3069
|
-
constants: c
|
|
3070
|
-
};
|
|
3071
|
-
}, Ni = 1, Pi = 1e3 / 60, Fi = (e) => !I() && e > 0 && e < 3, Ii = .6, Li = 600, Ri = (e, t) => {
|
|
3072
|
-
if (!Pe()) return !1;
|
|
3073
|
-
for (let n of e.transforms) {
|
|
3074
|
-
if (n.prop !== "x" && n.prop !== "y") continue;
|
|
3075
|
-
let e = Math.abs(n.to.value - n.from.value);
|
|
3076
|
-
if (n.from.unit === "%") {
|
|
3077
|
-
if (e / 100 >= Ii) return !1;
|
|
3078
|
-
} else if (e * Math.max(1, t) >= Li) return !1;
|
|
2909
|
+
if (i.endsWith("px")) {
|
|
2910
|
+
let e = Number(i.slice(0, -2));
|
|
2911
|
+
return Number.isNaN(e) ? null : e;
|
|
3079
2912
|
}
|
|
3080
|
-
return
|
|
3081
|
-
},
|
|
3082
|
-
let
|
|
3083
|
-
for (let
|
|
3084
|
-
|
|
3085
|
-
|
|
3086
|
-
|
|
3087
|
-
|
|
3088
|
-
|
|
3089
|
-
|
|
3090
|
-
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
continue;
|
|
3097
|
-
}
|
|
3098
|
-
let p = bi[u];
|
|
3099
|
-
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)`);
|
|
2913
|
+
return null;
|
|
2914
|
+
}, Xi = (e, t, n) => {
|
|
2915
|
+
let r = /* @__PURE__ */ new Set();
|
|
2916
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) r.add(e);
|
|
2917
|
+
if (r.size === 0) return null;
|
|
2918
|
+
let i = Infinity;
|
|
2919
|
+
for (let a of r) {
|
|
2920
|
+
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;
|
|
2921
|
+
if (r !== void 0 && r === o) continue;
|
|
2922
|
+
if (!Ji.has(a)) return null;
|
|
2923
|
+
let s = Yi(e.from, a, t), c = Yi(e.to, a, t);
|
|
2924
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2925
|
+
let l = Math.abs(c - s);
|
|
2926
|
+
if (l === 0) continue;
|
|
2927
|
+
let u = a === "opacity" ? Gi : 1 / Math.max(1, n);
|
|
2928
|
+
i = Math.min(i, u / l);
|
|
3100
2929
|
}
|
|
3101
|
-
return !
|
|
3102
|
-
},
|
|
3103
|
-
|
|
3104
|
-
|
|
3105
|
-
return
|
|
3106
|
-
|
|
3107
|
-
|
|
3108
|
-
|
|
3109
|
-
|
|
3110
|
-
|
|
3111
|
-
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
2930
|
+
return !Number.isFinite(i) || i <= 0 || i >= 1 ? null : i;
|
|
2931
|
+
}, Zi = (e, t, n) => {
|
|
2932
|
+
if (e.duration <= 0) return null;
|
|
2933
|
+
let r = Xi(e, t, n);
|
|
2934
|
+
if (r === null) return null;
|
|
2935
|
+
let i = Wi(e.ease), a = Ki;
|
|
2936
|
+
for (let e = Ki; e >= 0 && !(Math.abs(1 - i(e / Ki)) > r); --e) a = e;
|
|
2937
|
+
if (a === 0) return null;
|
|
2938
|
+
let o = (e.delay + e.duration * (a / Ki)) * 1e3;
|
|
2939
|
+
return (e.delay + e.duration) * 1e3 - o < qi ? null : o;
|
|
2940
|
+
}, Qi = 400, $i = 4, ea = (e) => +e.toFixed(5) + 0, ta = 12, na = (e, t, n, r) => {
|
|
2941
|
+
if (e.duration <= 0 || !Number.isFinite(r) || r <= 0) return null;
|
|
2942
|
+
let i = Number.isFinite(n) && n > 0 ? n : 1, a = /* @__PURE__ */ new Set();
|
|
2943
|
+
for (let t of [e.from, e.to]) if (!(!t || typeof t != "object")) for (let e of Object.keys(t)) a.add(e);
|
|
2944
|
+
let o = 0;
|
|
2945
|
+
for (let n of a) {
|
|
2946
|
+
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;
|
|
2947
|
+
if (r !== void 0 && r === a) continue;
|
|
2948
|
+
if (n !== "x" && n !== "y") return null;
|
|
2949
|
+
let s = Yi(e.from, n, t), c = Yi(e.to, n, t);
|
|
2950
|
+
if (s === null || c === null || s === void 0 || c === void 0) return null;
|
|
2951
|
+
o = Math.max(o, Math.abs(c - s) * i);
|
|
3118
2952
|
}
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
|
|
3123
|
-
|
|
3124
|
-
|
|
3125
|
-
|
|
3126
|
-
let
|
|
3127
|
-
|
|
3128
|
-
|
|
3129
|
-
|
|
3130
|
-
|
|
3131
|
-
|
|
3132
|
-
|
|
3133
|
-
|
|
3134
|
-
|
|
3135
|
-
|
|
3136
|
-
|
|
3137
|
-
|
|
3138
|
-
|
|
3139
|
-
|
|
3140
|
-
|
|
3141
|
-
|
|
3142
|
-
|
|
3143
|
-
|
|
3144
|
-
|
|
3145
|
-
|
|
3146
|
-
|
|
3147
|
-
|
|
3148
|
-
|
|
3149
|
-
|
|
3150
|
-
|
|
3151
|
-
|
|
3152
|
-
|
|
3153
|
-
detached: !1,
|
|
3154
|
-
snapMemory: {
|
|
3155
|
-
x: null,
|
|
3156
|
-
y: null,
|
|
3157
|
-
glide: u ? Ri(u, e.devicePixelRatio() || 1) : !1
|
|
3158
|
-
}
|
|
3159
|
-
};
|
|
3160
|
-
d.tracks.push(p), d.navCutMs = d.tracks.some((e) => e.cutMs === null) ? null : Math.max(...d.tracks.map((e) => e.cutMs));
|
|
3161
|
-
let m = Symbol("flemo-player-track");
|
|
3162
|
-
if (En(p.element, m), U(p.element, "animation", m), p.element.style.animation = "none", u) {
|
|
3163
|
-
u.transforms.length > 0 && U(p.element, "transform", m), u.opacity && U(p.element, "opacity", m);
|
|
3164
|
-
for (let e of u.strings) U(p.element, e.property, m);
|
|
3165
|
-
for (let e of u.constants) U(p.element, e.property, m);
|
|
3166
|
-
a(p, 0);
|
|
3167
|
-
}
|
|
3168
|
-
return r.role === "active" && (r.onComplete && (d.navComplete = r.onComplete), d.started || (d.started = !0, o(n, d))), () => {
|
|
3169
|
-
p.detached = !0, p.scrub?.cancel(), W(p.element, void 0, m);
|
|
3170
|
-
let r = t.get(n);
|
|
3171
|
-
r && (r.tracks = r.tracks.filter((e) => e !== p), r.tracks.length === 0 && (r.frameHandle !== null && e.cancel(r.frameHandle), t.delete(n)));
|
|
3172
|
-
};
|
|
3173
|
-
},
|
|
3174
|
-
dispose: (n) => {
|
|
3175
|
-
let r = t.get(n);
|
|
3176
|
-
if (r) {
|
|
3177
|
-
r.frameHandle !== null && e.cancel(r.frameHandle);
|
|
3178
|
-
for (let e of r.tracks) e.scrub?.cancel();
|
|
3179
|
-
t.delete(n);
|
|
3180
|
-
}
|
|
3181
|
-
}
|
|
3182
|
-
}, r = /* @__PURE__ */ new WeakMap(), i = (e) => {
|
|
3183
|
-
let t = r.get(e);
|
|
3184
|
-
return t || (t = Dr(e.motion.ease), r.set(e, t)), t;
|
|
3185
|
-
};
|
|
3186
|
-
function a(t, n, r) {
|
|
3187
|
-
let { element: i, parsed: a } = t;
|
|
3188
|
-
if (!(!a || !i.isConnected)) {
|
|
3189
|
-
if (a.transforms.length > 0) {
|
|
3190
|
-
let o = Bi(a.transforms, n, e.devicePixelRatio(), t.snapMemory, r);
|
|
3191
|
-
o !== "" && (i.style.transform = o);
|
|
3192
|
-
}
|
|
3193
|
-
if (a.opacity) {
|
|
3194
|
-
let { from: e, to: t } = a.opacity, r = e + (t - e) * n;
|
|
3195
|
-
i.style.opacity = `${Math.round(r * 255) / 255}`;
|
|
3196
|
-
}
|
|
3197
|
-
for (let e of a.strings) i.style.setProperty(e.property, e.mix(n));
|
|
3198
|
-
if (n === 0) for (let e of a.constants) i.style.setProperty(e.property, e.value);
|
|
3199
|
-
}
|
|
2953
|
+
if (o < ta) return null;
|
|
2954
|
+
let s = Wi(e.ease), c = Array(401);
|
|
2955
|
+
for (let e = 0; e <= Qi; e += 1) c[e] = s(e / Qi);
|
|
2956
|
+
let l = e.duration * 1e3, u = l / Qi, d = 1 / o * (u / r), f = Qi, p = 0;
|
|
2957
|
+
for (let e = 399; e >= 0 && (p = Math.max(p, Math.abs(c[e + 1] - c[e])), !(p > d)); --e) f = e;
|
|
2958
|
+
if (f === 0 || f >= Qi) return null;
|
|
2959
|
+
for (let e = f; e < Qi; e += 1) if (c[e + 1] < c[e] || c[e] > 1) return null;
|
|
2960
|
+
let m = (1 - c[f]) * o;
|
|
2961
|
+
if (m <= 1 || m > ta) return null;
|
|
2962
|
+
let h = f / Qi * 100, g = m * r / l * 100;
|
|
2963
|
+
/* v8 ignore next 2 -- unreachable for a decelerating cubic bezier, and kept
|
|
2964
|
+
anyway. The sprint's share of the timeline works out to roughly (samples
|
|
2965
|
+
of travel remaining at the engagement velocity) / 4 percent, independent
|
|
2966
|
+
of box, duration and cadence — a few percent. Reaching 100 therefore needs
|
|
2967
|
+
an engagement past ~95%, which only happens when the per-frame limit is
|
|
2968
|
+
tiny, which is exactly when the remainder has already fallen under one
|
|
2969
|
+
device pixel and the check above has bailed. The two conditions pull
|
|
2970
|
+
against each other, so no bezier satisfies both. A hand-built motion or a
|
|
2971
|
+
future easing type is not bound by that geometry, and this is the guard
|
|
2972
|
+
that keeps one from emitting a curve that lands past its own end. */
|
|
2973
|
+
if (h + g >= 100) return null;
|
|
2974
|
+
let _ = [];
|
|
2975
|
+
for (let e = 0; e <= f; e += $i) _.push(`${ea(c[e])} ${ea(e / Qi * 100)}%`);
|
|
2976
|
+
return _.push(`${ea(c[f])} ${ea(h)}%`), _.push(`1 ${ea(h + g)}%`, "1 100%"), `linear(${_.join(", ")})`;
|
|
2977
|
+
}, ra = /* @__PURE__ */ new WeakMap(), ia = Symbol("flemo-layer-owner"), aa = (e, t) => {
|
|
2978
|
+
t.willChange ? e.style.willChange = t.willChange : e.style.removeProperty("will-change"), t.contain ? e.style.contain = t.contain : e.style.removeProperty("contain");
|
|
2979
|
+
}, oa = (e, t) => {
|
|
2980
|
+
let n = e.trim() === "none" ? "" : e.trim();
|
|
2981
|
+
return t ? n ? /\b(layout|strict|content)\b/.test(n) ? n : `${n} layout` : "layout" : n;
|
|
2982
|
+
}, sa = (e, t) => {
|
|
2983
|
+
let n = /* @__PURE__ */ new Set(), r = !1;
|
|
2984
|
+
for (let e of t.willChange.split(",")) {
|
|
2985
|
+
let t = e.trim();
|
|
2986
|
+
t && t !== "auto" && n.add(t);
|
|
3200
2987
|
}
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
});
|
|
2988
|
+
for (let e of t.owners.values()) {
|
|
2989
|
+
for (let t of e.properties) n.add(t);
|
|
2990
|
+
e.containment && (r = !0);
|
|
3205
2991
|
}
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
fill: "both"
|
|
3216
|
-
});
|
|
3217
|
-
} catch {
|
|
3218
|
-
return r.handoff = !1, !1;
|
|
3219
|
-
}
|
|
3220
|
-
return r.scrub.cancel(), r.scrub = d, r.handedOff = !0, d.onfinish = () => {
|
|
3221
|
-
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)));
|
|
3222
|
-
}, !0;
|
|
2992
|
+
e.style.willChange = [...n].join(", ");
|
|
2993
|
+
let i = oa(t.contain, r);
|
|
2994
|
+
i ? e.style.contain = i : e.style.removeProperty("contain");
|
|
2995
|
+
}, Z = (e, t, n = !1, r = ia) => {
|
|
2996
|
+
let i = fn(t), a = ra.get(e);
|
|
2997
|
+
if (i.length === 0) {
|
|
2998
|
+
if (!a) return;
|
|
2999
|
+
a.owners.has(r) ? (a.owners.delete(r), a.owners.size === 0 ? (a.pending != null && clearTimeout(a.pending), aa(e, a), ra.delete(e)) : sa(e, a)) : r === a.settleOwner && a.owners.size === 0 && (a.pending != null && clearTimeout(a.pending), aa(e, a), ra.delete(e));
|
|
3000
|
+
return;
|
|
3223
3001
|
}
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3227
|
-
|
|
3228
|
-
|
|
3229
|
-
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3002
|
+
a?.pending != null && (clearTimeout(a.pending), a.pending = null), a || (a = {
|
|
3003
|
+
owners: /* @__PURE__ */ new Map(),
|
|
3004
|
+
settleOwner: null,
|
|
3005
|
+
willChange: e.style.willChange,
|
|
3006
|
+
contain: e.style.contain,
|
|
3007
|
+
pending: null
|
|
3008
|
+
}, ra.set(e, a)), a.owners.set(r, {
|
|
3009
|
+
properties: i,
|
|
3010
|
+
containment: n
|
|
3011
|
+
}), a.settleOwner = null, sa(e, a);
|
|
3012
|
+
}, Q = (e, t = ia) => {
|
|
3013
|
+
let n = ra.get(e);
|
|
3014
|
+
if (!(!n || !n.owners.has(t))) {
|
|
3015
|
+
if (n.owners.delete(t), n.owners.size > 0) {
|
|
3016
|
+
sa(e, n);
|
|
3017
|
+
return;
|
|
3234
3018
|
}
|
|
3235
|
-
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
if (t.completed || t.detached) continue;
|
|
3239
|
-
let n = t.motion.duration * 1e3, o = t.motion.delay * 1e3, f = c - l;
|
|
3240
|
-
if (r.navCutMs !== null && f >= r.navCutMs) {
|
|
3241
|
-
if (!t.scrub && (t.snapMemory.pendingLanding = !1, a(t, 1, r.frameIntervalMs), t.snapMemory.pendingLanding)) {
|
|
3242
|
-
u = !1, d = !0;
|
|
3243
|
-
continue;
|
|
3244
|
-
}
|
|
3245
|
-
t.completed = !0, t.onComplete?.();
|
|
3246
|
-
continue;
|
|
3247
|
-
}
|
|
3248
|
-
if (t.scrub) {
|
|
3249
|
-
if (t.handedOff) {
|
|
3250
|
-
u = !1;
|
|
3251
|
-
continue;
|
|
3252
|
-
}
|
|
3253
|
-
let i = o + n, a = Math.min(Math.max(0, f), i);
|
|
3254
|
-
if (t.handoff && f >= rt() && f < i && s(e, r, t, a)) {
|
|
3255
|
-
u = !1;
|
|
3256
|
-
continue;
|
|
3257
|
-
}
|
|
3258
|
-
t.scrub.currentTime = a, f >= i ? (t.completed = !0, t.onComplete?.()) : (u = !1, d = !0);
|
|
3259
|
-
continue;
|
|
3260
|
-
}
|
|
3261
|
-
let p = n <= 0 ? 1 : Math.min(1, Math.max(0, (f - o) / n));
|
|
3262
|
-
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);
|
|
3019
|
+
if (Ge() && typeof e.closest == "function" && e.closest(U("data-flemo-screen"))) {
|
|
3020
|
+
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");
|
|
3021
|
+
return;
|
|
3263
3022
|
}
|
|
3264
|
-
|
|
3265
|
-
|
|
3023
|
+
/* v8 ignore next 5 -- setTimeout exists in every runtime under test; the
|
|
3024
|
+
guard shields exotic embedders, where an immediate demotion is simply
|
|
3025
|
+
the pre-hold behavior. */
|
|
3026
|
+
if (n.settleOwner = t, n.pending != null && clearTimeout(n.pending), typeof setTimeout != "function") {
|
|
3027
|
+
aa(e, n), ra.delete(e);
|
|
3266
3028
|
return;
|
|
3267
3029
|
}
|
|
3268
|
-
|
|
3269
|
-
}
|
|
3270
|
-
return n;
|
|
3271
|
-
})();
|
|
3272
|
-
Qi.onFrameGap = (e) => {
|
|
3273
|
-
if (typeof window < "u") {
|
|
3274
|
-
let t = window.__flemoPlayerGaps ??= [];
|
|
3275
|
-
t.push(Math.round(e * 10) / 10), t.length > 600 && t.splice(0, t.length - 600);
|
|
3030
|
+
ca(e, n);
|
|
3276
3031
|
}
|
|
3277
|
-
};
|
|
3278
|
-
//#endregion
|
|
3279
|
-
//#region src/core/engine/types.ts
|
|
3280
|
-
var $i = "data-flemo-skip-animation", $ = () => {}, ea = 400, ta = 4, na = 100, ra = 1500, ia = "data-flemo-part-name", aa = /* @__PURE__ */ new WeakMap(), oa = "data-flemo-anim-hold", sa = (e) => {
|
|
3281
|
-
let t = e.parentElement ?? e;
|
|
3282
|
-
return Array.from(t.querySelectorAll(`[${ia}]`)).filter((n) => {
|
|
3283
|
-
let r = n.closest("[data-flemo-screen]");
|
|
3284
|
-
return !r || r === e || !t.contains(r);
|
|
3285
|
-
});
|
|
3286
3032
|
}, ca = (e, t) => {
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
if (n === null) return !0;
|
|
3293
|
-
let t = e.closest("[data-flemo-router]");
|
|
3294
|
-
return !t || t.getAttribute("data-flemo-router") === n;
|
|
3295
|
-
});
|
|
3296
|
-
}, ua = (e, t) => la(e, t).filter((e) => e.parentElement?.closest(`[${oa}]`) == null), da = (e) => {
|
|
3297
|
-
let t = e.closest("[data-flemo-router]")?.getAttribute("data-flemo-router") ?? null;
|
|
3298
|
-
return Array.from(e.ownerDocument.querySelectorAll(`[${ia}][${oa}]`)).filter((e) => {
|
|
3299
|
-
if (e.parentElement?.closest(`[${oa}]`) != null) return !1;
|
|
3300
|
-
if (t === null) return !0;
|
|
3301
|
-
let n = e.closest("[data-flemo-router]");
|
|
3302
|
-
return !n || n.getAttribute("data-flemo-router") === t;
|
|
3303
|
-
});
|
|
3304
|
-
}, fa = (e, t, n) => {
|
|
3305
|
-
let r = 0;
|
|
3306
|
-
for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3307
|
-
if (!H(t, e)) continue;
|
|
3308
|
-
let n = B(t, e);
|
|
3309
|
-
n && (r = Math.max(r, (n.delay + n.duration) * 1e3));
|
|
3310
|
-
}
|
|
3311
|
-
for (let t of la(e, n)) {
|
|
3312
|
-
let e = z.get(t.getAttribute(ia)), i = `${n}-${t.getAttribute("data-flemo-active")}`;
|
|
3313
|
-
if (!e || !H(e, i)) continue;
|
|
3314
|
-
let a = B(e, i);
|
|
3315
|
-
a && (r = Math.max(r, (a.delay + a.duration) * 1e3));
|
|
3316
|
-
}
|
|
3317
|
-
let i = t.decoratorName ? R.get(t.decoratorName) : void 0;
|
|
3318
|
-
if (i) for (let e of [`${n}-true`, `${n}-false`]) {
|
|
3319
|
-
if (!H(i, e)) continue;
|
|
3320
|
-
let t = B(i, e);
|
|
3321
|
-
t && (r = Math.max(r, (t.delay + t.duration) * 1e3));
|
|
3322
|
-
}
|
|
3323
|
-
return r;
|
|
3324
|
-
}, pa = (e) => e === "POPPING" && !ze() || e === "PUSHING" && Re() && !ze(), ma = 12, ha = null, ga = () => {
|
|
3325
|
-
ha = typeof requestAnimationFrame == "function" ? requestAnimationFrame(ga) : null;
|
|
3326
|
-
}, _a = () => (ha === null && typeof requestAnimationFrame == "function" && (ha = requestAnimationFrame(ga)), $), va = !1, ya = 0, ba = () => {
|
|
3327
|
-
va &&= (ya += 1, !1);
|
|
3328
|
-
}, xa = 2, Sa = 8, Ca = () => {
|
|
3329
|
-
if (va || typeof requestAnimationFrame != "function") return;
|
|
3330
|
-
va = !0;
|
|
3331
|
-
let e = ++ya, t = [], n = xa, r = null, i = (a) => {
|
|
3332
|
-
if (e !== ya) return;
|
|
3333
|
-
if (r !== null && (n > 0 ? --n : t.push(a - r)), r = a, t.length < Sa) {
|
|
3334
|
-
requestAnimationFrame(i);
|
|
3033
|
+
t.pending = setTimeout(() => {
|
|
3034
|
+
if (t.pending = null, Qn()) {
|
|
3035
|
+
er(() => {
|
|
3036
|
+
ra.get(e) === t && t.owners.size === 0 && t.settleOwner !== null && t.pending === null && ca(e, t);
|
|
3037
|
+
});
|
|
3335
3038
|
return;
|
|
3336
3039
|
}
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
};
|
|
3341
|
-
|
|
3342
|
-
}, wa = (e, t, n, r) => {
|
|
3343
|
-
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = I() && Fe(), u = !l && I() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && Yi() < ma, d = (l || u) && typeof window < "u" && window.devicePixelRatio || 1, f = (e, t) => e ? l ? Rr(e, t, d) : u ? Br(e, t, d, Yi()) : null : null;
|
|
3344
|
-
if (H(t, n)) {
|
|
3040
|
+
aa(e, t), ra.delete(e);
|
|
3041
|
+
}, 300);
|
|
3042
|
+
}, la = (e, t, n, r) => {
|
|
3043
|
+
let { scope: i, decorator: a, bars: o } = e, s = n.split("-")[0], c = s === "PUSHING" || s === "REPLACING", l = F() && typeof navigator < "u" && navigator.maxTouchPoints > 0 && ui() < 12, u = l && typeof window < "u" && window.devicePixelRatio || 1, d = (e, t) => !e || !l ? null : na(e, t, u, ui());
|
|
3044
|
+
if (K(t, n)) {
|
|
3345
3045
|
Z(i, t, c, r);
|
|
3346
|
-
let e =
|
|
3347
|
-
e && (
|
|
3348
|
-
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (Z(n, t, c, r), e && (
|
|
3046
|
+
let e = d(z(t, n), i);
|
|
3047
|
+
e && (Un(i, "animation-timing-function", r), i.style.animationTimingFunction = e);
|
|
3048
|
+
for (let n of o ?? []) n?.getAttribute("data-flemo-bar-riding") === "true" && (Z(n, t, c, r), e && (Un(n, "animation-timing-function", r), n.style.animationTimingFunction = e));
|
|
3349
3049
|
}
|
|
3350
3050
|
if (a && t.decoratorName) {
|
|
3351
|
-
let e =
|
|
3352
|
-
e &&
|
|
3051
|
+
let e = pt.get(t.decoratorName);
|
|
3052
|
+
e && K(e, n) && Z(a, e, c, r);
|
|
3353
3053
|
}
|
|
3354
|
-
for (let e of
|
|
3355
|
-
let t =
|
|
3356
|
-
if (t &&
|
|
3054
|
+
for (let e of Nr(i, n)) {
|
|
3055
|
+
let t = gt.get(e.getAttribute(B));
|
|
3056
|
+
if (t && K(t, n)) {
|
|
3357
3057
|
Z(e, t, c, r);
|
|
3358
|
-
let i =
|
|
3359
|
-
i && (
|
|
3058
|
+
let i = d(z(t, n), e);
|
|
3059
|
+
i && (Un(e, "animation-timing-function", r), e.style.animationTimingFunction = i);
|
|
3360
3060
|
}
|
|
3361
3061
|
}
|
|
3362
|
-
},
|
|
3062
|
+
}, ua = (e, t) => {
|
|
3363
3063
|
let { scope: n, decorator: r, bars: i } = e;
|
|
3364
3064
|
if (n) {
|
|
3365
3065
|
Q(n, t);
|
|
3366
|
-
for (let e of
|
|
3066
|
+
for (let e of Mr(n)) Q(e, t);
|
|
3367
3067
|
}
|
|
3368
3068
|
r && Q(r, t);
|
|
3369
3069
|
for (let e of i ?? []) e && Q(e, t);
|
|
3370
|
-
},
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3374
|
-
|
|
3375
|
-
|
|
3376
|
-
|
|
3377
|
-
|
|
3378
|
-
|
|
3379
|
-
|
|
3380
|
-
if (c > 0 && s >= c) {
|
|
3381
|
-
e.onTerminal();
|
|
3382
|
-
return;
|
|
3383
|
-
}
|
|
3384
|
-
if (e.spendBudget(), s <= 0) {
|
|
3385
|
-
o({ mode: "keep" });
|
|
3386
|
-
return;
|
|
3387
|
-
}
|
|
3388
|
-
o({
|
|
3389
|
-
mode: "set",
|
|
3390
|
-
seconds: -s / 1e3
|
|
3391
|
-
});
|
|
3392
|
-
};
|
|
3393
|
-
return {
|
|
3394
|
-
attach: () => {
|
|
3395
|
-
t.addEventListener("animationcancel", s);
|
|
3396
|
-
},
|
|
3397
|
-
detach: () => {
|
|
3398
|
-
t.removeEventListener("animationcancel", s), a &&= (W(t, ["animation-delay"], e.writer), !1);
|
|
3399
|
-
},
|
|
3400
|
-
fullRestart: () => {
|
|
3401
|
-
o({ mode: "clear" });
|
|
3402
|
-
}
|
|
3403
|
-
};
|
|
3404
|
-
};
|
|
3405
|
-
function ka(e) {
|
|
3406
|
-
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = null, i = null, a = null, o = null, c = null, l = () => {
|
|
3407
|
-
if (!c) return;
|
|
3408
|
-
let { land: e, cancel: t } = c;
|
|
3409
|
-
c = null, t(), e();
|
|
3410
|
-
}, u = (e) => {
|
|
3070
|
+
}, $ = () => {}, da = 4, fa = 100, pa = 1500, ma = /* @__PURE__ */ new WeakMap();
|
|
3071
|
+
function ha(e) {
|
|
3072
|
+
let t = Symbol("flemo-engine-layer"), n = /* @__PURE__ */ new Map(), r = ai({
|
|
3073
|
+
landNow: () => a(),
|
|
3074
|
+
scheduleLanding: (e) => o(e)
|
|
3075
|
+
}), i = null, a = () => {
|
|
3076
|
+
if (!i) return;
|
|
3077
|
+
let { land: e, cancel: t } = i;
|
|
3078
|
+
i = null, t(), e();
|
|
3079
|
+
}, o = (e) => {
|
|
3411
3080
|
if (typeof requestAnimationFrame != "function") {
|
|
3412
3081
|
e();
|
|
3413
3082
|
return;
|
|
@@ -3415,116 +3084,43 @@ function ka(e) {
|
|
|
3415
3084
|
let t = 0;
|
|
3416
3085
|
t = requestAnimationFrame(() => {
|
|
3417
3086
|
t = requestAnimationFrame(() => {
|
|
3418
|
-
|
|
3087
|
+
i = null, e();
|
|
3419
3088
|
});
|
|
3420
|
-
}),
|
|
3089
|
+
}), i = {
|
|
3421
3090
|
land: e,
|
|
3422
3091
|
cancel: () => cancelAnimationFrame(t)
|
|
3423
3092
|
};
|
|
3424
3093
|
};
|
|
3425
3094
|
return {
|
|
3426
|
-
driveScreenLifecycle: (
|
|
3427
|
-
let { getElements:
|
|
3428
|
-
if (
|
|
3429
|
-
let { scope: e } =
|
|
3430
|
-
if (e) if (
|
|
3431
|
-
else for (let t of
|
|
3432
|
-
}
|
|
3433
|
-
if (_) {
|
|
3434
|
-
let { scope: e, bars: n } = d();
|
|
3435
|
-
if (e) {
|
|
3436
|
-
Dn(e), W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3437
|
-
for (let n of sa(e)) W(n, ["animation-timing-function", "animation-duration"], t);
|
|
3438
|
-
for (let e of n ?? []) e && W(e, ["animation-timing-function", "animation-duration"], t);
|
|
3439
|
-
}
|
|
3440
|
-
}
|
|
3441
|
-
_ && (pr(), o &&= (clearTimeout(o), null), a ||= ur()), !_ && a && !o && (typeof setTimeout == "function" ? o = setTimeout(() => {
|
|
3442
|
-
o = null, a?.(), a = null;
|
|
3443
|
-
}, ea) : (a(), a = null));
|
|
3444
|
-
let v = _ && (h ? m === "PUSHING" || m === "REPLACING" : m === "POPPING"), y = _ && !v;
|
|
3445
|
-
if (!y && i) {
|
|
3446
|
-
let e = i;
|
|
3447
|
-
i = null, _ ? e() : u(e);
|
|
3448
|
-
}
|
|
3449
|
-
if (!v && r) {
|
|
3450
|
-
let e = r;
|
|
3451
|
-
r = null, _ ? e() : u(e);
|
|
3095
|
+
driveScreenLifecycle: (i) => {
|
|
3096
|
+
let { getElements: a, transitionName: o, prevTransitionName: c, status: l, isActive: u, animHoldReleased: d } = i, f = l === "PUSHING" || l === "POPPING" || l === "REPLACING";
|
|
3097
|
+
if (u) {
|
|
3098
|
+
let { scope: e } = a();
|
|
3099
|
+
if (e) if (f && !d) for (let t of Fr(e, l)) t.setAttribute(V, "true");
|
|
3100
|
+
else for (let t of Ir(e)) t.removeAttribute(V);
|
|
3452
3101
|
}
|
|
3453
|
-
if (
|
|
3454
|
-
|
|
3455
|
-
let { scope: e } = d();
|
|
3102
|
+
if (f) {
|
|
3103
|
+
let { scope: e, bars: n } = a();
|
|
3456
3104
|
if (e) {
|
|
3457
|
-
|
|
3458
|
-
|
|
3459
|
-
|
|
3460
|
-
a(), o(), n(), t(), s();
|
|
3461
|
-
};
|
|
3105
|
+
qn(e), q(e, ["animation-timing-function", "animation-duration"], t);
|
|
3106
|
+
for (let n of Mr(e)) q(n, ["animation-timing-function", "animation-duration"], t);
|
|
3107
|
+
for (let e of n ?? []) e && q(e, ["animation-timing-function", "animation-duration"], t);
|
|
3462
3108
|
}
|
|
3463
3109
|
}
|
|
3464
|
-
|
|
3465
|
-
|
|
3466
|
-
|
|
3467
|
-
|
|
3468
|
-
|
|
3469
|
-
|
|
3470
|
-
|
|
3471
|
-
|
|
3472
|
-
if (
|
|
3473
|
-
|
|
3474
|
-
|
|
3475
|
-
|
|
3476
|
-
let l =
|
|
3477
|
-
|
|
3478
|
-
let e = t.split("-")[0];
|
|
3479
|
-
if (qr(l, e, a) === "native") return null;
|
|
3480
|
-
}
|
|
3481
|
-
let u = B(l, t);
|
|
3482
|
-
if (!u) return null;
|
|
3483
|
-
let p = [], h = Qi.join(i, {
|
|
3484
|
-
element: a,
|
|
3485
|
-
motion: u,
|
|
3486
|
-
role: n,
|
|
3487
|
-
onComplete: r,
|
|
3488
|
-
status: t.split("-")[0]
|
|
3489
|
-
});
|
|
3490
|
-
if (!h) return null;
|
|
3491
|
-
p.push(h);
|
|
3492
|
-
for (let e of c ?? []) {
|
|
3493
|
-
if (!e || e.getAttribute("data-flemo-bar-riding") !== "true") continue;
|
|
3494
|
-
let n = Qi.join(i, {
|
|
3495
|
-
element: e,
|
|
3496
|
-
motion: u,
|
|
3497
|
-
role: "passive",
|
|
3498
|
-
status: t.split("-")[0]
|
|
3499
|
-
});
|
|
3500
|
-
n && p.push(n);
|
|
3501
|
-
}
|
|
3502
|
-
if (o && l.decoratorName) {
|
|
3503
|
-
let e = R.get(l.decoratorName), n = e ? B(e, t) : null;
|
|
3504
|
-
if (n) {
|
|
3505
|
-
let e = Qi.join(i, {
|
|
3506
|
-
element: o,
|
|
3507
|
-
motion: n,
|
|
3508
|
-
role: "passive",
|
|
3509
|
-
status: t.split("-")[0]
|
|
3510
|
-
});
|
|
3511
|
-
e && p.push(e);
|
|
3512
|
-
}
|
|
3513
|
-
}
|
|
3514
|
-
for (let e of ca(a, t)) {
|
|
3515
|
-
let n = z.get(e.getAttribute(ia)), r = n ? B(n, t) : null;
|
|
3516
|
-
if (!r) continue;
|
|
3517
|
-
let a = Qi.join(i, {
|
|
3518
|
-
element: e,
|
|
3519
|
-
motion: r,
|
|
3520
|
-
role: "passive"
|
|
3521
|
-
});
|
|
3522
|
-
a && p.push(a);
|
|
3523
|
-
}
|
|
3524
|
-
return () => p.forEach((e) => e());
|
|
3525
|
-
}, x = (e, n) => {
|
|
3526
|
-
let r = [], { decorator: i, bars: a } = d(), o = St(f), s = (e, n, i) => {
|
|
3527
|
-
let a = 0, o = Oa({
|
|
3110
|
+
r.sync({
|
|
3111
|
+
isTransitional: f,
|
|
3112
|
+
isActive: u,
|
|
3113
|
+
status: l,
|
|
3114
|
+
transitionName: o,
|
|
3115
|
+
getScope: () => a().scope
|
|
3116
|
+
});
|
|
3117
|
+
let p = () => {
|
|
3118
|
+
if (!F()) return;
|
|
3119
|
+
let t = e.getTransitionTaskId();
|
|
3120
|
+
t && (s.pendingTaskIds.some((e) => e !== t) || xi());
|
|
3121
|
+
}, m = (e, n) => {
|
|
3122
|
+
let r = [], { decorator: i, bars: s } = a(), c = ct(o), l = (e, n, i) => {
|
|
3123
|
+
let a = 0, o = Kn({
|
|
3528
3124
|
element: e,
|
|
3529
3125
|
expectedName: n,
|
|
3530
3126
|
motion: i,
|
|
@@ -3537,208 +3133,214 @@ function ka(e) {
|
|
|
3537
3133
|
onTerminal: $
|
|
3538
3134
|
});
|
|
3539
3135
|
o.attach(), r.push(o.detach);
|
|
3540
|
-
},
|
|
3541
|
-
if (
|
|
3542
|
-
if (i &&
|
|
3543
|
-
let e =
|
|
3544
|
-
t &&
|
|
3136
|
+
}, u = yn("screen", o, n), d = z(c, n);
|
|
3137
|
+
if (d) for (let e of s ?? []) !e || e.getAttribute("data-flemo-bar-riding") !== "true" || l(e, u, d);
|
|
3138
|
+
if (i && c.decoratorName) {
|
|
3139
|
+
let e = pt.get(c.decoratorName), t = e ? z(e, n) : null;
|
|
3140
|
+
t && l(i, yn("decorator", c.decoratorName, n), t);
|
|
3545
3141
|
}
|
|
3546
|
-
for (let t of
|
|
3547
|
-
let e = t.getAttribute(
|
|
3548
|
-
i &&
|
|
3142
|
+
for (let t of Nr(e, n)) {
|
|
3143
|
+
let e = t.getAttribute(B), r = gt.get(e), i = r ? z(r, n) : null;
|
|
3144
|
+
i && l(t, yn("part", e, n), i);
|
|
3549
3145
|
}
|
|
3550
3146
|
return r;
|
|
3551
3147
|
};
|
|
3552
|
-
if (!
|
|
3553
|
-
if (
|
|
3554
|
-
let { scope: e, decorator: n, bars: r } =
|
|
3148
|
+
if (!u) {
|
|
3149
|
+
if (l === "COMPLETED") {
|
|
3150
|
+
let { scope: e, decorator: n, bars: r } = a();
|
|
3555
3151
|
if (e) {
|
|
3556
|
-
|
|
3557
|
-
for (let t of
|
|
3152
|
+
q(e);
|
|
3153
|
+
for (let t of Mr(e)) q(t);
|
|
3558
3154
|
}
|
|
3559
|
-
n &&
|
|
3560
|
-
for (let e of r ?? []) e &&
|
|
3561
|
-
return
|
|
3155
|
+
n && q(n);
|
|
3156
|
+
for (let e of r ?? []) e && q(e, void 0, t);
|
|
3157
|
+
return ua({
|
|
3562
3158
|
scope: e,
|
|
3563
3159
|
decorator: n,
|
|
3564
3160
|
bars: r ?? []
|
|
3565
3161
|
}, t), $;
|
|
3566
3162
|
}
|
|
3567
|
-
if (
|
|
3568
|
-
let { scope: e, decorator: n, bars: r } =
|
|
3569
|
-
e &&
|
|
3163
|
+
if (l === "REPLACING" && c !== o && e.setReplaceTransitionStatus("PENDING"), f) {
|
|
3164
|
+
let { scope: e, decorator: n, bars: r } = a();
|
|
3165
|
+
e && la({
|
|
3570
3166
|
scope: e,
|
|
3571
3167
|
decorator: n,
|
|
3572
3168
|
bars: r ?? []
|
|
3573
|
-
},
|
|
3169
|
+
}, ct(o), `${l}-false`, t);
|
|
3574
3170
|
}
|
|
3575
|
-
if (
|
|
3576
|
-
let e = `${
|
|
3577
|
-
|
|
3578
|
-
let { scope:
|
|
3579
|
-
if (
|
|
3580
|
-
let
|
|
3581
|
-
if (
|
|
3582
|
-
let a =
|
|
3583
|
-
element:
|
|
3584
|
-
expectedName:
|
|
3171
|
+
if (f && d) {
|
|
3172
|
+
let e = `${l}-false`;
|
|
3173
|
+
p();
|
|
3174
|
+
let { scope: n } = a();
|
|
3175
|
+
if (n) {
|
|
3176
|
+
let r = ct(o), i = [];
|
|
3177
|
+
if (K(r, e)) {
|
|
3178
|
+
let a = z(r, e), s = 0, c = Kn({
|
|
3179
|
+
element: n,
|
|
3180
|
+
expectedName: yn("screen", o, e),
|
|
3585
3181
|
motion: a,
|
|
3586
3182
|
writer: t,
|
|
3587
|
-
isLive: () =>
|
|
3588
|
-
budgetUsed: () =>
|
|
3183
|
+
isLive: () => n.isConnected && n.getAttribute("data-flemo-skip-animation") !== "true",
|
|
3184
|
+
budgetUsed: () => s,
|
|
3589
3185
|
spendBudget: () => {
|
|
3590
|
-
|
|
3186
|
+
s += 1;
|
|
3591
3187
|
},
|
|
3592
3188
|
onTerminal: $
|
|
3593
3189
|
});
|
|
3594
|
-
|
|
3190
|
+
c.attach(), i.push(c.detach);
|
|
3595
3191
|
}
|
|
3596
|
-
if (i.push(...
|
|
3192
|
+
if (i.push(...m(n, e)), i.length > 0) return () => i.forEach((e) => e());
|
|
3597
3193
|
}
|
|
3598
3194
|
}
|
|
3599
3195
|
return $;
|
|
3600
3196
|
}
|
|
3601
|
-
if (
|
|
3602
|
-
|
|
3603
|
-
let { scope: n, decorator: r, bars: i } =
|
|
3197
|
+
if (l === "COMPLETED") {
|
|
3198
|
+
vi(), e.setDragStatus("IDLE"), e.setReplaceTransitionStatus("IDLE");
|
|
3199
|
+
let { scope: n, decorator: r, bars: i } = a();
|
|
3604
3200
|
if (n) {
|
|
3605
|
-
|
|
3606
|
-
for (let e of
|
|
3201
|
+
q(n), q(n, ["transform", "opacity"]), n.removeAttribute(Ot);
|
|
3202
|
+
for (let e of Mr(n)) q(e);
|
|
3607
3203
|
}
|
|
3608
|
-
r && (
|
|
3609
|
-
for (let e of i ?? []) e &&
|
|
3610
|
-
return
|
|
3204
|
+
r && (q(r), r.removeAttribute(Ot));
|
|
3205
|
+
for (let e of i ?? []) e && q(e, void 0, t);
|
|
3206
|
+
return ua({
|
|
3611
3207
|
scope: n,
|
|
3612
3208
|
decorator: r,
|
|
3613
3209
|
bars: i ?? []
|
|
3614
3210
|
}, t), $;
|
|
3615
3211
|
}
|
|
3616
|
-
if (
|
|
3617
|
-
let { scope:
|
|
3618
|
-
if (!
|
|
3619
|
-
let
|
|
3620
|
-
|
|
3621
|
-
},
|
|
3622
|
-
if (!
|
|
3623
|
-
let { decorator: e, bars: n } =
|
|
3624
|
-
|
|
3625
|
-
scope:
|
|
3212
|
+
if (l === "IDLE") return $;
|
|
3213
|
+
let { scope: h } = a();
|
|
3214
|
+
if (!h) return $;
|
|
3215
|
+
let g = e.getTransitionTaskId(), _ = $, v = () => {
|
|
3216
|
+
_(), g && (s.resolveTask(g), n.delete(g));
|
|
3217
|
+
}, y = ct(o), b = `${l}-true`, x = h.getAttribute(Ot) === "true", S = !x && K(y, b);
|
|
3218
|
+
if (!x) {
|
|
3219
|
+
let { decorator: e, bars: n } = a();
|
|
3220
|
+
la({
|
|
3221
|
+
scope: h,
|
|
3626
3222
|
decorator: e,
|
|
3627
3223
|
bars: n ?? []
|
|
3628
|
-
},
|
|
3224
|
+
}, y, b, t);
|
|
3629
3225
|
}
|
|
3630
|
-
|
|
3631
|
-
|
|
3632
|
-
|
|
3633
|
-
|
|
3634
|
-
r && ee.push({
|
|
3226
|
+
let C = `${l}-false`, w = K(y, C) ? z(y, C) : null, T = [];
|
|
3227
|
+
for (let e of Pr(h, l)) {
|
|
3228
|
+
let t = gt.get(e.getAttribute(B)), n = `${l}-${e.getAttribute(Tt)}`, r = t && K(t, n) ? z(t, n) : null;
|
|
3229
|
+
r && T.push({
|
|
3635
3230
|
element: e,
|
|
3636
3231
|
motion: r
|
|
3637
3232
|
});
|
|
3638
3233
|
}
|
|
3639
|
-
let
|
|
3640
|
-
for (let { motion: e } of
|
|
3641
|
-
let
|
|
3234
|
+
let E = w ? (w.delay + w.duration) * 1e3 : 0;
|
|
3235
|
+
for (let { motion: e } of T) E = Math.max(E, (e.delay + e.duration) * 1e3);
|
|
3236
|
+
let D = [];
|
|
3642
3237
|
{
|
|
3643
|
-
let e =
|
|
3644
|
-
if (e) for (let t of [`${
|
|
3645
|
-
if (!
|
|
3646
|
-
let n =
|
|
3647
|
-
n && (
|
|
3238
|
+
let e = y.decoratorName ? pt.get(y.decoratorName) : void 0;
|
|
3239
|
+
if (e) for (let t of [`${l}-true`, `${l}-false`]) {
|
|
3240
|
+
if (!K(e, t)) continue;
|
|
3241
|
+
let n = z(e, t);
|
|
3242
|
+
n && (D.push(n), E = Math.max(E, (n.delay + n.duration) * 1e3));
|
|
3648
3243
|
}
|
|
3649
3244
|
}
|
|
3650
|
-
if (!
|
|
3651
|
-
if (!
|
|
3652
|
-
if (!
|
|
3653
|
-
let e =
|
|
3654
|
-
|
|
3655
|
-
let t = setTimeout(
|
|
3245
|
+
if (!S) {
|
|
3246
|
+
if (!x && E > 0) {
|
|
3247
|
+
if (!d) return g && s.markGateHeld(g), $;
|
|
3248
|
+
let e = E + 50;
|
|
3249
|
+
g && s.anchorGate(g, e + pa);
|
|
3250
|
+
let t = setTimeout(v, e);
|
|
3656
3251
|
return () => clearTimeout(t);
|
|
3657
3252
|
}
|
|
3658
|
-
return queueMicrotask(
|
|
3253
|
+
return queueMicrotask(v), $;
|
|
3659
3254
|
}
|
|
3660
|
-
let
|
|
3661
|
-
if (
|
|
3662
|
-
let e = (
|
|
3663
|
-
s.anchorGate(
|
|
3664
|
-
} else s.markGateHeld(
|
|
3665
|
-
let
|
|
3666
|
-
|
|
3667
|
-
|
|
3255
|
+
let O = z(y, b);
|
|
3256
|
+
if (g) if (d) {
|
|
3257
|
+
let e = (O.delay + O.duration) * 1e3;
|
|
3258
|
+
s.anchorGate(g, Math.max(e, E) + pa);
|
|
3259
|
+
} else s.markGateHeld(g);
|
|
3260
|
+
let k = Ci({
|
|
3261
|
+
status: l,
|
|
3262
|
+
transition: y,
|
|
3263
|
+
skipAnimation: x,
|
|
3264
|
+
hasActiveMotion: !!O,
|
|
3265
|
+
hasAnimation: S
|
|
3266
|
+
}), { hasDrivableMotion: A, nativeSurgeryAllowed: j, touchGoverned: ee, forceCompiled: te, governedHead: ne, desktopHead: re, governedSlide: M, birthHoldMs: N } = k;
|
|
3267
|
+
k.framePacingKeepalive && (_ = hi());
|
|
3268
|
+
let ie = null;
|
|
3269
|
+
A && !F() && !j && !ee && !te && !re && (ie = Ri(h, () => [h.ownerDocument.documentElement], () => ma.get(h)?.(), !1));
|
|
3668
3270
|
{
|
|
3669
|
-
let e =
|
|
3670
|
-
|
|
3271
|
+
let e = h.ownerDocument.documentElement;
|
|
3272
|
+
k.creepHead ? e.setAttribute(Wt, "true") : e.removeAttribute(Wt), ne ? e.setAttribute(Ut, "true") : e.removeAttribute(Ut), re ? e.setAttribute(Gt, "true") : e.removeAttribute(Gt);
|
|
3671
3273
|
}
|
|
3672
|
-
let
|
|
3673
|
-
|
|
3674
|
-
let
|
|
3675
|
-
|
|
3676
|
-
},
|
|
3677
|
-
|
|
3678
|
-
},
|
|
3274
|
+
let ae = null;
|
|
3275
|
+
A && j && (ae = ji(h, () => [h.ownerDocument.documentElement], () => ma.get(h)?.()));
|
|
3276
|
+
let oe = yn("screen", o, b), se, P = () => {
|
|
3277
|
+
se !== void 0 && (clearTimeout(se), se = void 0);
|
|
3278
|
+
}, ce = 0, le, ue = [], de, fe = () => {
|
|
3279
|
+
ue.forEach((e) => cancelAnimationFrame(e)), ue = [], de !== void 0 && clearTimeout(de), de = void 0;
|
|
3280
|
+
}, pe = () => {
|
|
3679
3281
|
/* v8 ignore next 4 -- every runtime under test has rAF; the guard
|
|
3680
3282
|
shields exotic embedders. */
|
|
3681
3283
|
if (typeof requestAnimationFrame != "function") {
|
|
3682
|
-
|
|
3284
|
+
v();
|
|
3683
3285
|
return;
|
|
3684
3286
|
}
|
|
3685
|
-
|
|
3686
|
-
|
|
3687
|
-
},
|
|
3287
|
+
de = setTimeout(() => {
|
|
3288
|
+
fe(), v();
|
|
3289
|
+
}, fa);
|
|
3688
3290
|
let e = (t) => {
|
|
3689
3291
|
if (t <= 0) {
|
|
3690
|
-
|
|
3292
|
+
fe(), v();
|
|
3691
3293
|
return;
|
|
3692
3294
|
}
|
|
3693
|
-
|
|
3295
|
+
ue.push(requestAnimationFrame(() => e(t - 1)));
|
|
3694
3296
|
};
|
|
3695
|
-
e(
|
|
3696
|
-
},
|
|
3697
|
-
if (
|
|
3698
|
-
|
|
3297
|
+
e(da);
|
|
3298
|
+
}, me = () => {
|
|
3299
|
+
if (ce <= 0) {
|
|
3300
|
+
pe();
|
|
3699
3301
|
return;
|
|
3700
3302
|
}
|
|
3701
|
-
|
|
3702
|
-
},
|
|
3703
|
-
e.target ===
|
|
3303
|
+
le = setTimeout(pe, ce);
|
|
3304
|
+
}, he = $, I = $, ge = (e) => {
|
|
3305
|
+
e.target === h && xn(e.animationName, oe) && (h.removeEventListener("animationend", ge), P(), he(), me());
|
|
3704
3306
|
};
|
|
3705
|
-
|
|
3706
|
-
let
|
|
3707
|
-
|
|
3708
|
-
let
|
|
3709
|
-
element:
|
|
3710
|
-
expectedName:
|
|
3711
|
-
motion:
|
|
3307
|
+
h.addEventListener("animationend", ge), A && d && p();
|
|
3308
|
+
let _e = (O.delay + O.duration) * 1e3, ve = Math.max(_e, E) + 1500, ye = g ? setTimeout(() => void s.resolveTask(g), ve) : void 0;
|
|
3309
|
+
ce = Math.max(0, E - _e);
|
|
3310
|
+
let be = _e + N + 250, xe = () => g !== null && e.getTransitionTaskId() === g && h.isConnected && h.getAttribute("data-flemo-skip-animation") !== "true" && K(y, b), Se = Kn({
|
|
3311
|
+
element: h,
|
|
3312
|
+
expectedName: oe,
|
|
3313
|
+
motion: O,
|
|
3712
3314
|
writer: t,
|
|
3713
|
-
isLive:
|
|
3714
|
-
budgetUsed: () => n.get(
|
|
3315
|
+
isLive: xe,
|
|
3316
|
+
budgetUsed: () => n.get(g) ?? 0,
|
|
3715
3317
|
spendBudget: () => {
|
|
3716
|
-
|
|
3318
|
+
I(), n.set(g, (n.get(g) ?? 0) + 1);
|
|
3717
3319
|
},
|
|
3718
|
-
onTerminal:
|
|
3320
|
+
onTerminal: v
|
|
3719
3321
|
});
|
|
3720
|
-
|
|
3721
|
-
let
|
|
3722
|
-
|
|
3723
|
-
},
|
|
3724
|
-
if (
|
|
3725
|
-
|
|
3322
|
+
he = Se.detach;
|
|
3323
|
+
let Ce = !1, we = () => {
|
|
3324
|
+
P(), se = setTimeout(Te, be);
|
|
3325
|
+
}, Te = () => {
|
|
3326
|
+
if (P(), xe() && !Ce) {
|
|
3327
|
+
Ce = !0, I(), Se.fullRestart(), we();
|
|
3726
3328
|
return;
|
|
3727
3329
|
}
|
|
3728
|
-
|
|
3729
|
-
},
|
|
3730
|
-
|
|
3731
|
-
|
|
3330
|
+
v();
|
|
3331
|
+
}, L = d, Ee = L ? m(h, b) : [];
|
|
3332
|
+
L && (Se.attach(), g && we()), L && (j || ee) && ma.set(h, () => {
|
|
3333
|
+
I(), g && se !== void 0 && we();
|
|
3732
3334
|
});
|
|
3733
|
-
let
|
|
3734
|
-
|
|
3735
|
-
}) : null,
|
|
3736
|
-
|
|
3335
|
+
let De = L && j ? Ii(() => [h.ownerDocument.documentElement], () => {
|
|
3336
|
+
I(), g && se !== void 0 && we();
|
|
3337
|
+
}) : null, Oe, ke = () => {
|
|
3338
|
+
Oe !== void 0 && (clearTimeout(Oe), Oe = void 0);
|
|
3737
3339
|
};
|
|
3738
|
-
if (
|
|
3739
|
-
let e = typeof window < "u" && window.devicePixelRatio || 1, t =
|
|
3740
|
-
for (let { element: t, motion: n } of
|
|
3741
|
-
let i =
|
|
3340
|
+
if (I = ke, L && g && !M && !te) {
|
|
3341
|
+
let e = typeof window < "u" && window.devicePixelRatio || 1, t = Zi(O, h, e), n = w ? Zi(w, h, e) : 0, r = 0;
|
|
3342
|
+
for (let { element: t, motion: n } of T) {
|
|
3343
|
+
let i = Zi(n, t, e);
|
|
3742
3344
|
if (i === null) {
|
|
3743
3345
|
r = null;
|
|
3744
3346
|
break;
|
|
@@ -3746,10 +3348,10 @@ function ka(e) {
|
|
|
3746
3348
|
r = Math.max(r, i);
|
|
3747
3349
|
}
|
|
3748
3350
|
let i = 0;
|
|
3749
|
-
if (
|
|
3750
|
-
let t =
|
|
3751
|
-
if (t) for (let n of
|
|
3752
|
-
let r =
|
|
3351
|
+
if (D.length > 0) {
|
|
3352
|
+
let t = a().decorator;
|
|
3353
|
+
if (t) for (let n of D) {
|
|
3354
|
+
let r = Zi(n, t, e);
|
|
3753
3355
|
if (r === null) {
|
|
3754
3356
|
i = null;
|
|
3755
3357
|
break;
|
|
@@ -3757,46 +3359,334 @@ function ka(e) {
|
|
|
3757
3359
|
i = Math.max(i, r);
|
|
3758
3360
|
}
|
|
3759
3361
|
}
|
|
3760
|
-
let
|
|
3761
|
-
|
|
3762
|
-
|
|
3763
|
-
},
|
|
3362
|
+
let o = t !== null && n !== null && r !== null && i !== null ? Math.max(t, n, r, i) : null;
|
|
3363
|
+
o !== null && o + 17 < _e + ce && (Oe = setTimeout(() => {
|
|
3364
|
+
Oe = void 0, xe() && (h.removeEventListener("animationend", ge), P(), he(), pe());
|
|
3365
|
+
}, o + 17 + N));
|
|
3764
3366
|
}
|
|
3765
3367
|
return () => {
|
|
3766
|
-
if (
|
|
3767
|
-
|
|
3768
|
-
for (let e of
|
|
3368
|
+
if (_(), ye !== void 0 && clearTimeout(ye), le !== void 0 && clearTimeout(le), fe(), ae?.(), ie?.(), De?.(), ke(), h.removeEventListener("animationend", ge), L) {
|
|
3369
|
+
Se.detach();
|
|
3370
|
+
for (let e of Ee) e();
|
|
3769
3371
|
}
|
|
3770
|
-
|
|
3372
|
+
P(), g && e.getTransitionTaskId() !== g && n.delete(g);
|
|
3771
3373
|
};
|
|
3772
3374
|
},
|
|
3773
3375
|
activeResumeEntryCount: () => n.size
|
|
3774
3376
|
};
|
|
3775
3377
|
}
|
|
3776
3378
|
//#endregion
|
|
3777
|
-
//#region src/
|
|
3778
|
-
var
|
|
3779
|
-
|
|
3780
|
-
if (
|
|
3781
|
-
|
|
3782
|
-
|
|
3379
|
+
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
3380
|
+
var ga = () => {}, _a = 2e3, va = 1200, ya = 120, ba = 3, xa = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", Sa = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", Ca = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", wa = "cold", Ta = 0, Ea = null;
|
|
3381
|
+
function Da() {
|
|
3382
|
+
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !F()) return ga;
|
|
3383
|
+
if (Ta += 1, wa === "cold") {
|
|
3384
|
+
wa = "scheduled";
|
|
3385
|
+
let e = () => document.querySelector(ee.map((e) => W(wt, e)).join(",")) !== null, t = () => {
|
|
3386
|
+
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: _a }) : null, t = e === null ? setTimeout(n, va) : null;
|
|
3387
|
+
Ea = () => {
|
|
3388
|
+
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
3389
|
+
};
|
|
3390
|
+
}, n = () => {
|
|
3391
|
+
if (e()) {
|
|
3392
|
+
t();
|
|
3393
|
+
return;
|
|
3394
|
+
}
|
|
3395
|
+
Ea = null, wa = "done";
|
|
3396
|
+
let n = document.createElement("div");
|
|
3397
|
+
n.setAttribute(Jt, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", xa);
|
|
3398
|
+
let r = document.createElement("div");
|
|
3399
|
+
r.setAttribute("style", Sa), r.textContent = "flemo";
|
|
3400
|
+
let i = document.createElement("div");
|
|
3401
|
+
i.setAttribute("style", Ca);
|
|
3402
|
+
let a = document.createElement("div");
|
|
3403
|
+
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
3404
|
+
let o = document.createElement("div");
|
|
3405
|
+
o.setAttribute("style", "width:24px;height:24px;border-radius:50%;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.3);");
|
|
3406
|
+
try {
|
|
3407
|
+
let e = document.createElement("canvas");
|
|
3408
|
+
e.width = 24, e.height = 24;
|
|
3409
|
+
let t = e.getContext("2d");
|
|
3410
|
+
if (t) {
|
|
3411
|
+
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();
|
|
3412
|
+
let n = document.createElement("img");
|
|
3413
|
+
n.src = e.toDataURL(), n.setAttribute("style", "width:24px;height:24px;object-fit:cover;"), o.appendChild(n);
|
|
3414
|
+
}
|
|
3415
|
+
} catch {}
|
|
3416
|
+
let s = document.createElement("div");
|
|
3417
|
+
s.setAttribute("style", "width:96px;height:10px;background:linear-gradient(90deg,#eee,#bbb,#eee);");
|
|
3418
|
+
let c = document.createElement("div");
|
|
3419
|
+
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);
|
|
3420
|
+
try {
|
|
3421
|
+
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
3422
|
+
duration: ya,
|
|
3423
|
+
iterations: ba
|
|
3424
|
+
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
3425
|
+
duration: ya,
|
|
3426
|
+
iterations: ba
|
|
3427
|
+
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
3428
|
+
duration: ya,
|
|
3429
|
+
iterations: ba
|
|
3430
|
+
});
|
|
3431
|
+
} catch {}
|
|
3432
|
+
setTimeout(() => n.remove(), 450);
|
|
3433
|
+
};
|
|
3434
|
+
t();
|
|
3435
|
+
}
|
|
3436
|
+
let e = !1;
|
|
3437
|
+
return () => {
|
|
3438
|
+
e || (e = !0, Ta = Math.max(0, Ta - 1), Ta === 0 && wa === "scheduled" && (Ea?.(), Ea = null, wa = "cold"));
|
|
3439
|
+
};
|
|
3440
|
+
}
|
|
3441
|
+
//#endregion
|
|
3442
|
+
//#region src/platform/profile.ts
|
|
3443
|
+
var Oa = (e = {}) => {
|
|
3444
|
+
let t = !F(), n = ve();
|
|
3445
|
+
return {
|
|
3446
|
+
mainThreadPresented: t,
|
|
3447
|
+
atomicReleaseFlip: t && (e.authoredNativeDriver === !0 || n || Ie()),
|
|
3448
|
+
deferReleaseCommit: Re(),
|
|
3449
|
+
renderSettleGate: Pe(),
|
|
3450
|
+
parkOver: Be() || n,
|
|
3451
|
+
restLayerPromotion: Ve(),
|
|
3452
|
+
imageDecodeOffload: typeof navigator < "u" && He() !== "off"
|
|
3453
|
+
};
|
|
3454
|
+
}, ka = () => Oa().restLayerPromotion, Aa = 500, ja = 3e3, Ma = [
|
|
3455
|
+
"pointerdown",
|
|
3456
|
+
"pointermove",
|
|
3457
|
+
"wheel",
|
|
3458
|
+
"touchstart",
|
|
3459
|
+
"keydown"
|
|
3460
|
+
], Na = () => {
|
|
3461
|
+
if (typeof document > "u") return () => {};
|
|
3462
|
+
let e = null, t = null, n = 0, r = () => {
|
|
3463
|
+
let r = Date.now();
|
|
3464
|
+
if (r - n < Aa) return;
|
|
3465
|
+
n = r, t && clearTimeout(t);
|
|
3466
|
+
let i = e;
|
|
3467
|
+
e = Or(), i?.(), t = setTimeout(() => {
|
|
3468
|
+
t = null, e?.(), e = null;
|
|
3469
|
+
}, ja);
|
|
3470
|
+
};
|
|
3471
|
+
for (let e of Ma) document.addEventListener(e, r, { passive: !0 });
|
|
3472
|
+
return () => {
|
|
3473
|
+
for (let e of Ma) document.removeEventListener(e, r);
|
|
3474
|
+
t && clearTimeout(t), e?.();
|
|
3475
|
+
};
|
|
3476
|
+
}, Pa = 0, Fa = null, Ia = () => {
|
|
3477
|
+
let e = [Na(), Da()];
|
|
3478
|
+
return Oa().imageDecodeOffload && e.push(gr()), () => {
|
|
3479
|
+
for (let t of e) t();
|
|
3480
|
+
};
|
|
3481
|
+
}, La = () => {
|
|
3482
|
+
Pa === 0 && (Fa = Ia()), Pa += 1;
|
|
3483
|
+
let e = !1;
|
|
3484
|
+
return () => {
|
|
3485
|
+
e || (e = !0, --Pa, !(Pa > 0) && (Fa?.(), Fa = null));
|
|
3486
|
+
};
|
|
3487
|
+
}, Ra = [
|
|
3488
|
+
{
|
|
3489
|
+
key: "flemo:sixty",
|
|
3490
|
+
storage: "session",
|
|
3491
|
+
kind: "production-state",
|
|
3492
|
+
values: "\"high\" / a streak count",
|
|
3493
|
+
fallback: "(learned)",
|
|
3494
|
+
effect: "steady-60 desktop verdict seed — owned by steadySixtyCadence.ts"
|
|
3495
|
+
},
|
|
3496
|
+
{
|
|
3497
|
+
key: "flemo:settle-gate",
|
|
3498
|
+
storage: "session",
|
|
3499
|
+
kind: "production-default-with-override",
|
|
3500
|
+
values: "\"on\" / \"off\"",
|
|
3501
|
+
fallback: "touch WebKit + touch Blink + desktop macOS WebKit + steady-60 desktop",
|
|
3502
|
+
effect: "render-settle entry gate, shared by the engine's routing and the binding"
|
|
3503
|
+
},
|
|
3504
|
+
{
|
|
3505
|
+
key: "flemo:arrivalhold",
|
|
3506
|
+
storage: "session",
|
|
3507
|
+
kind: "production-default-with-override",
|
|
3508
|
+
values: "\"off\"",
|
|
3509
|
+
fallback: "on",
|
|
3510
|
+
effect: "the whole in-flight hold set (arrival, response, invisible animations, images)"
|
|
3511
|
+
},
|
|
3512
|
+
{
|
|
3513
|
+
key: "flemo:deskflip",
|
|
3514
|
+
storage: "session",
|
|
3515
|
+
kind: "production-default-with-override",
|
|
3516
|
+
values: "\"on\" / \"off\"",
|
|
3517
|
+
fallback: "desktop macOS WebKit",
|
|
3518
|
+
effect: "atomic release flip: the hold attribute flips on the DOM inside the readiness rAF"
|
|
3519
|
+
},
|
|
3520
|
+
{
|
|
3521
|
+
key: "flemo:deskhead",
|
|
3522
|
+
storage: "session",
|
|
3523
|
+
kind: "production-default-with-override",
|
|
3524
|
+
values: "\"on\" / \"off\"",
|
|
3525
|
+
fallback: "desktop macOS WebKit",
|
|
3526
|
+
effect: "desktop flat-head keyframes; arming it retires the desktop birth anchor"
|
|
3527
|
+
},
|
|
3528
|
+
{
|
|
3529
|
+
key: "flemo:creep",
|
|
3530
|
+
storage: "session",
|
|
3531
|
+
kind: "production-default-with-override",
|
|
3532
|
+
values: "\"on\" / \"off\"",
|
|
3533
|
+
fallback: "touch WebKit",
|
|
3534
|
+
effect: "creep head: its end keyframe carries a hair of motion, so the compositor is already carrying the animation at the boundary"
|
|
3535
|
+
},
|
|
3536
|
+
{
|
|
3537
|
+
key: "flemo:relcommit",
|
|
3538
|
+
storage: "session",
|
|
3539
|
+
kind: "production-default-with-override",
|
|
3540
|
+
values: "\"defer\" / \"sync\"",
|
|
3541
|
+
fallback: "touch WebKit",
|
|
3542
|
+
effect: "the release's reconcile lands next frame instead of synchronously"
|
|
3543
|
+
},
|
|
3544
|
+
{
|
|
3545
|
+
key: "flemo:imgoffload",
|
|
3546
|
+
storage: "session",
|
|
3547
|
+
kind: "production-default-with-override",
|
|
3548
|
+
values: "\"on\" / \"off\"",
|
|
3549
|
+
fallback: "on — the offloader decides per image, from the source's own size",
|
|
3550
|
+
effect: "image decode offloader: an oversized source is fetched and downscaled in a worker so its decode never lands in a paint"
|
|
3551
|
+
},
|
|
3552
|
+
{
|
|
3553
|
+
key: "flemo:governed",
|
|
3554
|
+
storage: "session",
|
|
3555
|
+
kind: "production-default-with-override",
|
|
3556
|
+
values: "\"on\" / \"off\"",
|
|
3557
|
+
fallback: "legacy Android Blink (an old browser, not a slow device)",
|
|
3558
|
+
effect: "the governed head kit on touch Blink — a flat head covering a compiled flight's opening. The auto-detection reads browser AGE, so a modern-but-weak phone falls through it; this is how such a device gets measured"
|
|
3559
|
+
},
|
|
3560
|
+
{
|
|
3561
|
+
key: "flemo:imghold",
|
|
3562
|
+
storage: "session",
|
|
3563
|
+
kind: "opt-in-diagnostic",
|
|
3564
|
+
values: "\"on\" / \"off\"",
|
|
3565
|
+
fallback: "off",
|
|
3566
|
+
effect: "flight-scoped <img> reveal hold"
|
|
3567
|
+
},
|
|
3568
|
+
{
|
|
3569
|
+
key: "flemo:preraster",
|
|
3570
|
+
storage: "session",
|
|
3571
|
+
kind: "opt-in-diagnostic",
|
|
3572
|
+
values: "\"on\"",
|
|
3573
|
+
fallback: "off",
|
|
3574
|
+
effect: "REST-time scope promotion, and the park-over hold variant. Flight-time promotion is the engine's own stamp and needs no flag"
|
|
3575
|
+
},
|
|
3576
|
+
{
|
|
3577
|
+
key: "flemo:layers",
|
|
3578
|
+
storage: "session",
|
|
3579
|
+
kind: "opt-in-diagnostic",
|
|
3580
|
+
values: "\"resident\" / \"off\"",
|
|
3581
|
+
fallback: "off",
|
|
3582
|
+
effect: "keep screen layers resident at rest — a resident layer is a PERMANENT stacking context over the consumer's screen"
|
|
3583
|
+
},
|
|
3584
|
+
{
|
|
3585
|
+
key: "flemo:freeze",
|
|
3586
|
+
storage: "session",
|
|
3587
|
+
kind: "opt-in-diagnostic",
|
|
3588
|
+
values: "\"shallow\"",
|
|
3589
|
+
fallback: "off",
|
|
3590
|
+
effect: "keep the direct prev screen live instead of freezing it"
|
|
3591
|
+
}
|
|
3592
|
+
], za = [
|
|
3593
|
+
{
|
|
3594
|
+
key: "flemo:motion-driver",
|
|
3595
|
+
storage: "local",
|
|
3596
|
+
retiredWith: "the per-origin driver demotion ledger (2026-08-19)"
|
|
3597
|
+
},
|
|
3598
|
+
{
|
|
3599
|
+
key: "flemo:motion-driver-force",
|
|
3600
|
+
storage: "session",
|
|
3601
|
+
retiredWith: "the hard driver pin, with the rAF player (2026-08-22)"
|
|
3602
|
+
},
|
|
3603
|
+
{
|
|
3604
|
+
key: "flemo:landing-snap",
|
|
3605
|
+
storage: "session",
|
|
3606
|
+
retiredWith: "the integer-device-pixel landing snap, falsified on device (2026-08-22)"
|
|
3607
|
+
},
|
|
3608
|
+
{
|
|
3609
|
+
key: "flemo:handoff",
|
|
3610
|
+
storage: "session",
|
|
3611
|
+
retiredWith: "the player's anchored-opening handoff (2026-08-22)"
|
|
3612
|
+
},
|
|
3613
|
+
{
|
|
3614
|
+
key: "flemo:handoffms",
|
|
3615
|
+
storage: "session",
|
|
3616
|
+
retiredWith: "the player's anchored-opening handoff (2026-08-22)"
|
|
3617
|
+
},
|
|
3618
|
+
{
|
|
3619
|
+
key: "flemo:apply",
|
|
3620
|
+
storage: "session",
|
|
3621
|
+
retiredWith: "the scrub-WAAPI value-application tier (2026-08-22)"
|
|
3622
|
+
},
|
|
3623
|
+
{
|
|
3624
|
+
key: "flemo:snap",
|
|
3625
|
+
storage: "session",
|
|
3626
|
+
retiredWith: "the player's device-pixel snap policy (2026-08-22)"
|
|
3627
|
+
},
|
|
3628
|
+
{
|
|
3629
|
+
key: "flemo:snapband",
|
|
3630
|
+
storage: "session",
|
|
3631
|
+
retiredWith: "the player's device-pixel snap policy (2026-08-22)"
|
|
3632
|
+
},
|
|
3633
|
+
{
|
|
3634
|
+
key: "flemo:lat",
|
|
3635
|
+
storage: "session",
|
|
3636
|
+
retiredWith: "the Low Power Mode release-latency probe (2026-08-22)"
|
|
3637
|
+
}
|
|
3638
|
+
], Ba = .12, Va = 1.6, Ha = .5, Ua = .28, Wa = (e, t, n) => {
|
|
3639
|
+
if (!(e > 0)) return t;
|
|
3640
|
+
if (e >= 1) return 0;
|
|
3641
|
+
let [r, i, a, o] = n, s = (e) => 3 * (1 - e) ** 2 * e * r + 3 * (1 - e) * e * e * a + e ** 3, c = (e) => 3 * (1 - e) ** 2 * e * i + 3 * (1 - e) * e * e * o + e ** 3, l = 0, u = 1;
|
|
3642
|
+
for (let t = 0; t < 40; t += 1) {
|
|
3643
|
+
let t = (l + u) / 2;
|
|
3644
|
+
c(t) < e ? l = t : u = t;
|
|
3645
|
+
}
|
|
3646
|
+
let d = s((l + u) / 2);
|
|
3647
|
+
return t * Math.min(1, Math.max(0, 1 - d));
|
|
3648
|
+
}, Ga = ({ remainingPx: e, spanPx: t, velocityPxPerSecond: n, authoredSeconds: r, authoredEase: i, reversing: a = !1, minSeconds: o = a ? Ua : Ba }) => {
|
|
3649
|
+
let s = Math.abs(e);
|
|
3650
|
+
if (s <= .5) return 0;
|
|
3651
|
+
let c = Math.abs(t), l = c > 0 ? Math.min(1, s / c) : 1, u = i && !a ? Wa(1 - l, r, i) : r * l, d = Math.abs(n), f = !a && d > 0 ? Va * s / d : Infinity;
|
|
3652
|
+
return Math.min(r, Math.max(o, Math.min(u, f)));
|
|
3653
|
+
}, Ka = ({ remainingPx: e, velocityPxPerSecond: t, seconds: n, authoredSlope: r, reversing: i = !1 }) => {
|
|
3654
|
+
let a = Math.abs(e);
|
|
3655
|
+
if (!Number.isFinite(a) || a <= .5 || !Number.isFinite(n) || n <= 0 || !i && !Number.isFinite(t)) return null;
|
|
3656
|
+
let o = i ? 0 : Math.abs(t) * n / a;
|
|
3657
|
+
return Math.min(Va, Math.max(typeof r == "number" && r >= 0 ? Math.min(Ha, r) : Ha, o));
|
|
3658
|
+
}, qa = (e, t) => {
|
|
3659
|
+
let [n, r, i, a] = e;
|
|
3660
|
+
if (!Number.isFinite(t) || n <= 0 || t <= 0) return [
|
|
3661
|
+
n,
|
|
3662
|
+
r,
|
|
3663
|
+
i,
|
|
3664
|
+
a
|
|
3665
|
+
];
|
|
3666
|
+
let o = .95, s = Math.min(n, o / t);
|
|
3667
|
+
return [
|
|
3668
|
+
s,
|
|
3669
|
+
Math.min(o, t * s),
|
|
3670
|
+
i,
|
|
3671
|
+
a
|
|
3672
|
+
];
|
|
3783
3673
|
};
|
|
3784
3674
|
//#endregion
|
|
3785
3675
|
//#region src/utils/findScrollable.ts
|
|
3786
|
-
function
|
|
3787
|
-
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o =
|
|
3676
|
+
function Ja(e, t) {
|
|
3677
|
+
let { direction: n = "x", markerSelector: r = "[data-swipe-at-edge]", depthLimit: i = 24, verifyByScroll: a = !1 } = t ?? {}, o = Ya(e);
|
|
3788
3678
|
if (!o) return {
|
|
3789
3679
|
element: null,
|
|
3790
3680
|
hasMarker: !1
|
|
3791
3681
|
};
|
|
3792
3682
|
let s = o.closest?.(r);
|
|
3793
|
-
if (s instanceof HTMLElement &&
|
|
3683
|
+
if (s instanceof HTMLElement && Xa(s, n) && (!a || Za(s, n))) return {
|
|
3794
3684
|
element: s,
|
|
3795
3685
|
hasMarker: !0
|
|
3796
3686
|
};
|
|
3797
3687
|
let c = o, l = 0;
|
|
3798
3688
|
for (; c && l < i;) {
|
|
3799
|
-
if (
|
|
3689
|
+
if (Xa(c, n) && (!a || Za(c, n))) return {
|
|
3800
3690
|
element: c,
|
|
3801
3691
|
hasMarker: !1
|
|
3802
3692
|
};
|
|
@@ -3807,7 +3697,7 @@ function Na(e, t) {
|
|
|
3807
3697
|
hasMarker: !1
|
|
3808
3698
|
};
|
|
3809
3699
|
}
|
|
3810
|
-
function
|
|
3700
|
+
function Ya(e) {
|
|
3811
3701
|
if (!e) return null;
|
|
3812
3702
|
let t = e, n = typeof t.composedPath == "function" ? t.composedPath() : void 0;
|
|
3813
3703
|
if (n && n.length) {
|
|
@@ -3815,34 +3705,33 @@ function Pa(e) {
|
|
|
3815
3705
|
}
|
|
3816
3706
|
return e instanceof HTMLElement ? e : null;
|
|
3817
3707
|
}
|
|
3818
|
-
function
|
|
3708
|
+
function Xa(e, t) {
|
|
3819
3709
|
return t === "y" ? e.scrollHeight - e.clientHeight > 1 : e.scrollWidth - e.clientWidth > 1;
|
|
3820
3710
|
}
|
|
3821
|
-
function
|
|
3822
|
-
if (!
|
|
3711
|
+
function Za(e, t) {
|
|
3712
|
+
if (!Xa(e, t) || typeof window > "u") return !1;
|
|
3823
3713
|
let n = window.getComputedStyle(e), r = t === "y" ? n.overflowY : n.overflowX;
|
|
3824
3714
|
return r === "auto" || r === "scroll" || r === "overlay";
|
|
3825
3715
|
}
|
|
3826
3716
|
//#endregion
|
|
3827
3717
|
//#region src/screen/computeBarRiding.ts
|
|
3828
|
-
function
|
|
3718
|
+
function Qa(e, t) {
|
|
3829
3719
|
return !!e && !!t && e.id === t.id;
|
|
3830
3720
|
}
|
|
3831
|
-
function
|
|
3721
|
+
function $a(e) {
|
|
3832
3722
|
if (e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev) return {
|
|
3833
3723
|
app: !1,
|
|
3834
3724
|
nav: !1
|
|
3835
3725
|
};
|
|
3836
3726
|
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);
|
|
3837
3727
|
return {
|
|
3838
|
-
app: e.hasTopBar && !
|
|
3839
|
-
nav: e.hasNavBar && !
|
|
3728
|
+
app: e.hasTopBar && !Qa(t, r),
|
|
3729
|
+
nav: e.hasNavBar && !Qa(n, i)
|
|
3840
3730
|
};
|
|
3841
3731
|
}
|
|
3842
3732
|
//#endregion
|
|
3843
3733
|
//#region src/core/engine/createSwipeController.ts
|
|
3844
|
-
|
|
3845
|
-
function Ba(e) {
|
|
3734
|
+
function eo(e) {
|
|
3846
3735
|
let t = Symbol("flemo-swipe-layer"), n = null, r = null, i = {
|
|
3847
3736
|
current: [],
|
|
3848
3737
|
prev: []
|
|
@@ -3858,13 +3747,13 @@ function Ba(e) {
|
|
|
3858
3747
|
}, m = 0, h = {
|
|
3859
3748
|
x: 0,
|
|
3860
3749
|
y: 0
|
|
3861
|
-
}, g = {
|
|
3750
|
+
}, g = [], _ = {
|
|
3862
3751
|
element: null,
|
|
3863
3752
|
hasMarker: !1
|
|
3864
|
-
},
|
|
3753
|
+
}, v = {
|
|
3865
3754
|
element: null,
|
|
3866
3755
|
hasMarker: !1
|
|
3867
|
-
},
|
|
3756
|
+
}, y = 0, b = 0, x = (e) => ({
|
|
3868
3757
|
point: {
|
|
3869
3758
|
x: e.clientX,
|
|
3870
3759
|
y: e.clientY
|
|
@@ -3878,64 +3767,70 @@ function Ba(e) {
|
|
|
3878
3767
|
y: e.clientY - p.y
|
|
3879
3768
|
},
|
|
3880
3769
|
velocity: h
|
|
3881
|
-
}),
|
|
3770
|
+
}), S = 0, C = (t) => {
|
|
3882
3771
|
let { scope: n } = e.getElements();
|
|
3883
3772
|
n?.hasPointerCapture(t.pointerId) && n.releasePointerCapture(t.pointerId);
|
|
3884
|
-
},
|
|
3885
|
-
let t = e.timeStamp
|
|
3773
|
+
}, w = (e) => {
|
|
3774
|
+
let t = e.timeStamp;
|
|
3775
|
+
for (g.push({
|
|
3776
|
+
t,
|
|
3777
|
+
x: e.clientX,
|
|
3778
|
+
y: e.clientY
|
|
3779
|
+
}); g.length > 2 && t - g[0].t > 80;) g.shift();
|
|
3780
|
+
let n = g[0], r = Math.max(1, t - n.t);
|
|
3886
3781
|
h = {
|
|
3887
|
-
x: (e.clientX -
|
|
3888
|
-
y: (e.clientY -
|
|
3782
|
+
x: (e.clientX - n.x) / r * 1e3,
|
|
3783
|
+
y: (e.clientY - n.y) / r * 1e3
|
|
3889
3784
|
}, p = {
|
|
3890
3785
|
x: e.clientX,
|
|
3891
3786
|
y: e.clientY
|
|
3892
|
-
}, m = t,
|
|
3893
|
-
},
|
|
3894
|
-
let s =
|
|
3895
|
-
if (r === e.getElements().scope) for (let e of i.current)
|
|
3896
|
-
else if (r === n) for (let e of i.prev)
|
|
3787
|
+
}, m = t, S = Math.max(S, Math.abs(e.clientX - f.x), Math.abs(e.clientY - f.y));
|
|
3788
|
+
}, T = (r, a, o) => {
|
|
3789
|
+
let s = J(r, a, o, t);
|
|
3790
|
+
if (r === e.getElements().scope) for (let e of i.current) J(e, a, o, t);
|
|
3791
|
+
else if (r === n) for (let e of i.prev) J(e, a, o, t);
|
|
3897
3792
|
return s;
|
|
3898
|
-
},
|
|
3793
|
+
}, E = (e, t) => {
|
|
3899
3794
|
if (!e) return null;
|
|
3900
3795
|
for (let n of Array.from(e.children)) {
|
|
3901
3796
|
let e = n;
|
|
3902
3797
|
if (typeof e.matches == "function" && e.matches(t)) return e;
|
|
3903
3798
|
}
|
|
3904
3799
|
return null;
|
|
3905
|
-
},
|
|
3906
|
-
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o =
|
|
3800
|
+
}, D = (n) => {
|
|
3801
|
+
let r = e.getPartnerBars(), a = e.getPartnerBarMetadata?.(), o = E(n, W(kt, "app")), s = E(n, W(kt, "nav")), c = (e) => {
|
|
3907
3802
|
if (!e) return;
|
|
3908
|
-
let t = e.getAttribute(
|
|
3803
|
+
let t = e.getAttribute(Nt);
|
|
3909
3804
|
return t === null ? {} : { id: e.getAttribute("data-flemo-bar-id-type") === "number" ? Number(t) : t };
|
|
3910
3805
|
}, 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();
|
|
3911
|
-
m && l && !
|
|
3806
|
+
m && l && !Qa(l, d) && p.push(m), h && u && !Qa(u, f) && p.push(h);
|
|
3912
3807
|
let g = [];
|
|
3913
|
-
n && (o && d && !
|
|
3808
|
+
n && (o && d && !Qa(d, l) && g.push(o), s && f && !Qa(f, u) && g.push(s)), i = {
|
|
3914
3809
|
current: p,
|
|
3915
3810
|
prev: g
|
|
3916
3811
|
};
|
|
3917
3812
|
for (let n of p) Z(n, e.getTransition(), !1, t);
|
|
3918
3813
|
for (let n of g) Z(n, e.getTransition(), !1, t);
|
|
3919
|
-
},
|
|
3814
|
+
}, O = () => {
|
|
3920
3815
|
let { scope: i, decorator: a } = e.getElements(), o = e.getTransition();
|
|
3921
3816
|
i && Z(i, o, !1, t), n && Z(n, o, !1, t);
|
|
3922
3817
|
let s = e.getDecorator();
|
|
3923
3818
|
s && (a && Z(a, s, !1, t), r && Z(r, s, !1, t));
|
|
3924
|
-
},
|
|
3819
|
+
}, k = () => {
|
|
3925
3820
|
let { scope: i, decorator: a } = e.getElements();
|
|
3926
3821
|
i && Q(i, t), n && Q(n, t), a && Q(a, t), r && Q(r, t);
|
|
3927
|
-
},
|
|
3928
|
-
for (let e of i.current)
|
|
3929
|
-
for (let e of i.prev)
|
|
3822
|
+
}, A = () => {
|
|
3823
|
+
for (let e of i.current) q(e, void 0, t), Q(e, t);
|
|
3824
|
+
for (let e of i.prev) q(e, void 0, t), Q(e, t);
|
|
3930
3825
|
i = {
|
|
3931
3826
|
current: [],
|
|
3932
3827
|
prev: []
|
|
3933
3828
|
};
|
|
3934
|
-
},
|
|
3829
|
+
}, j = (t) => {
|
|
3935
3830
|
let { screenContainer: n } = e.getElements(), r = (e) => {
|
|
3936
|
-
let t =
|
|
3937
|
-
return Array.from(e.querySelectorAll(
|
|
3938
|
-
let n = e.closest(
|
|
3831
|
+
let t = E(e, U(Ct));
|
|
3832
|
+
return Array.from(e.querySelectorAll(U(B))).filter((e) => {
|
|
3833
|
+
let n = e.closest(U(Ct));
|
|
3939
3834
|
return n === null || n === t;
|
|
3940
3835
|
});
|
|
3941
3836
|
};
|
|
@@ -3943,12 +3838,12 @@ function Ba(e) {
|
|
|
3943
3838
|
current: r(n),
|
|
3944
3839
|
prev: r(t)
|
|
3945
3840
|
};
|
|
3946
|
-
},
|
|
3841
|
+
}, ee = (e, n, r, i) => {
|
|
3947
3842
|
let o = (a, o) => {
|
|
3948
|
-
let s =
|
|
3843
|
+
let s = gt.get(a.getAttribute(B));
|
|
3949
3844
|
if (!s) return;
|
|
3950
3845
|
let c = {
|
|
3951
|
-
animate: i ?? ((e, n, r) =>
|
|
3846
|
+
animate: i ?? ((e, n, r) => J(e, n, r, t)),
|
|
3952
3847
|
element: a,
|
|
3953
3848
|
active: o
|
|
3954
3849
|
};
|
|
@@ -3956,13 +3851,13 @@ function Ba(e) {
|
|
|
3956
3851
|
};
|
|
3957
3852
|
for (let e of a.current) o(e, !0);
|
|
3958
3853
|
for (let e of a.prev) o(e, !1);
|
|
3959
|
-
},
|
|
3960
|
-
for (let e of [...a.current, ...a.prev])
|
|
3854
|
+
}, te = () => {
|
|
3855
|
+
for (let e of [...a.current, ...a.prev]) q(e, void 0, t);
|
|
3961
3856
|
a = {
|
|
3962
3857
|
current: [],
|
|
3963
3858
|
prev: []
|
|
3964
3859
|
};
|
|
3965
|
-
},
|
|
3860
|
+
}, ne = async (t) => {
|
|
3966
3861
|
let i = e.getTransition();
|
|
3967
3862
|
if (!i.swipeDirection || e.getViewportScrollHeight() > 10) {
|
|
3968
3863
|
s = !1;
|
|
@@ -3974,11 +3869,11 @@ function Ba(e) {
|
|
|
3974
3869
|
return;
|
|
3975
3870
|
}
|
|
3976
3871
|
let u = o?.previousElementSibling ?? null;
|
|
3977
|
-
if (n =
|
|
3872
|
+
if (n = E(u, U(Ct)), r = E(u, U(Lt)), !n) {
|
|
3978
3873
|
s = !1;
|
|
3979
3874
|
return;
|
|
3980
3875
|
}
|
|
3981
|
-
c = !0,
|
|
3876
|
+
c = !0, oe = se(), P = 0, ae = (typeof performance > "u" ? Date.now() : performance.now()) + ie, S = 0, f = {
|
|
3982
3877
|
x: t.clientX,
|
|
3983
3878
|
y: t.clientY
|
|
3984
3879
|
}, p = {
|
|
@@ -3987,71 +3882,75 @@ function Ba(e) {
|
|
|
3987
3882
|
}, m = t.timeStamp, h = {
|
|
3988
3883
|
x: 0,
|
|
3989
3884
|
y: 0
|
|
3990
|
-
},
|
|
3991
|
-
|
|
3992
|
-
|
|
3885
|
+
}, g = [{
|
|
3886
|
+
t: t.timeStamp,
|
|
3887
|
+
x: t.clientX,
|
|
3888
|
+
y: t.clientY
|
|
3889
|
+
}], a.setPointerCapture(t.pointerId), D(u), j(u), O();
|
|
3890
|
+
let _ = e.getDecorator(), v = await i.onSwipeStart(t, x(t), {
|
|
3891
|
+
animate: T,
|
|
3993
3892
|
currentScreen: a,
|
|
3994
3893
|
prevScreen: n,
|
|
3995
3894
|
onStart: (e) => {
|
|
3996
|
-
|
|
3997
|
-
animate:
|
|
3895
|
+
_?.onSwipeStart?.(e, {
|
|
3896
|
+
animate: J,
|
|
3998
3897
|
currentDecorator: l,
|
|
3999
3898
|
prevDecorator: r
|
|
4000
|
-
}),
|
|
3899
|
+
}), ee("start", e, 0);
|
|
4001
3900
|
}
|
|
4002
3901
|
});
|
|
4003
|
-
|
|
4004
|
-
},
|
|
4005
|
-
let t =
|
|
3902
|
+
v && !d ? e.setDragStatus("PENDING") : v || (e.setDragStatus("IDLE"), c = !1, s = !1, C(t), A(), k(), te());
|
|
3903
|
+
}, re = (e) => {
|
|
3904
|
+
let t = ne(e);
|
|
4006
3905
|
u = t, t.finally(() => {
|
|
4007
3906
|
u = null;
|
|
4008
3907
|
});
|
|
4009
|
-
},
|
|
3908
|
+
}, M = null, N = 0, ie = 200, ae = 0, oe = !0, se = () => {
|
|
4010
3909
|
let e = n?.parentElement;
|
|
4011
3910
|
return !e || !e.isConnected || typeof getComputedStyle != "function" || getComputedStyle(e).display !== "none";
|
|
4012
|
-
},
|
|
4013
|
-
|
|
4014
|
-
let e =
|
|
4015
|
-
|
|
4016
|
-
},
|
|
4017
|
-
if (
|
|
4018
|
-
|
|
3911
|
+
}, P = 0, ce = (e) => oe ? !0 : e >= ae ? (oe = !0, !0) : se() ? P ? (oe = !0, !0) : (P = e, !1) : (P = 0, !1), le = () => {
|
|
3912
|
+
N && typeof cancelAnimationFrame == "function" && cancelAnimationFrame(N), N = 0, oe = !0;
|
|
3913
|
+
let e = M;
|
|
3914
|
+
M = null, e && fe(e);
|
|
3915
|
+
}, ue = (e = typeof performance > "u" ? Date.now() : performance.now()) => {
|
|
3916
|
+
if (N = 0, !ce(e)) {
|
|
3917
|
+
M && typeof requestAnimationFrame == "function" && (N = requestAnimationFrame(ue));
|
|
4019
3918
|
return;
|
|
4020
3919
|
}
|
|
4021
|
-
let t =
|
|
4022
|
-
|
|
4023
|
-
},
|
|
4024
|
-
if (
|
|
3920
|
+
let t = M;
|
|
3921
|
+
M = null, t && fe(t);
|
|
3922
|
+
}, de = (e) => {
|
|
3923
|
+
if (M = e, !N) {
|
|
4025
3924
|
if (typeof requestAnimationFrame != "function") {
|
|
4026
|
-
|
|
3925
|
+
ue();
|
|
4027
3926
|
return;
|
|
4028
3927
|
}
|
|
4029
|
-
|
|
3928
|
+
N = requestAnimationFrame(ue);
|
|
4030
3929
|
}
|
|
4031
|
-
},
|
|
3930
|
+
}, fe = (t) => {
|
|
4032
3931
|
let i = e.getTransition();
|
|
4033
3932
|
if (!i.swipeDirection || !c || u || e.getViewportScrollHeight() > 10) return;
|
|
4034
3933
|
let { scope: a, decorator: o } = e.getElements(), s = e.getDecorator();
|
|
4035
|
-
i.onSwipe(t,
|
|
4036
|
-
animate:
|
|
3934
|
+
i.onSwipe(t, x(t), {
|
|
3935
|
+
animate: T,
|
|
4037
3936
|
currentScreen: a,
|
|
4038
3937
|
prevScreen: n,
|
|
4039
3938
|
onProgress: (e, t) => {
|
|
4040
3939
|
s?.onSwipe?.(e, t, {
|
|
4041
|
-
animate:
|
|
3940
|
+
animate: J,
|
|
4042
3941
|
currentDecorator: o,
|
|
4043
3942
|
prevDecorator: r
|
|
4044
|
-
}),
|
|
3943
|
+
}), ee("swipe", e, t);
|
|
4045
3944
|
}
|
|
4046
3945
|
});
|
|
4047
|
-
},
|
|
3946
|
+
}, pe = async (o, s = !1) => {
|
|
4048
3947
|
u && await u;
|
|
4049
3948
|
let l = e.getTransition();
|
|
4050
3949
|
if (!l.swipeDirection || !c) return;
|
|
4051
|
-
|
|
3950
|
+
le(), c = !1;
|
|
4052
3951
|
let { scope: d, decorator: f } = e.getElements();
|
|
4053
|
-
|
|
4054
|
-
let p = e.getDecorator(), m = s ||
|
|
3952
|
+
C(o);
|
|
3953
|
+
let p = e.getDecorator(), m = s || S < 6, h = s ? {
|
|
4055
3954
|
point: {
|
|
4056
3955
|
x: o.clientX,
|
|
4057
3956
|
y: o.clientY
|
|
@@ -4068,44 +3967,54 @@ function Ba(e) {
|
|
|
4068
3967
|
x: 0,
|
|
4069
3968
|
y: 0
|
|
4070
3969
|
}
|
|
4071
|
-
} :
|
|
3970
|
+
} : x(o), g = l.swipeDirection, _ = d?.getBoundingClientRect(), v = (g === "y" ? _?.height : _?.width) || (typeof window > "u" ? 0 : g === "y" ? window.innerHeight : window.innerWidth), y = g === "y" ? h.offset.y : h.offset.x, b = g === "y" ? h.velocity.y : h.velocity.x, w = Math.abs(y), E = Math.abs(b), D = Math.sign(y), O = D !== 0 && Math.sign(b) === -D && E >= 300, j = !1, ne = (e) => ((t, n, r) => {
|
|
4072
3971
|
let i = typeof r?.duration == "number" ? r.duration : 0;
|
|
4073
|
-
|
|
3972
|
+
if (i <= 0) return e(t, n, r);
|
|
3973
|
+
let a = j ? v - w : w, o = !j && !O, s = Ui(r?.ease), c = Ga({
|
|
3974
|
+
remainingPx: a,
|
|
3975
|
+
spanPx: v,
|
|
3976
|
+
velocityPxPerSecond: E,
|
|
3977
|
+
authoredSeconds: i,
|
|
3978
|
+
authoredEase: s ?? void 0,
|
|
3979
|
+
reversing: o
|
|
3980
|
+
}), l = s ? Ka({
|
|
3981
|
+
remainingPx: a,
|
|
3982
|
+
velocityPxPerSecond: E,
|
|
3983
|
+
seconds: c,
|
|
3984
|
+
authoredSlope: s[0] > 0 ? s[1] / s[0] : void 0,
|
|
3985
|
+
reversing: o
|
|
3986
|
+
}) : null;
|
|
3987
|
+
return e(t, n, {
|
|
4074
3988
|
...r,
|
|
4075
|
-
duration:
|
|
4076
|
-
|
|
4077
|
-
spanPx: v,
|
|
4078
|
-
velocityPxPerSecond: E,
|
|
4079
|
-
authoredSeconds: i,
|
|
4080
|
-
reversing: !M && !A
|
|
4081
|
-
})
|
|
3989
|
+
duration: c,
|
|
3990
|
+
...s && l !== null ? { ease: qa(s, l) } : {}
|
|
4082
3991
|
});
|
|
4083
|
-
}),
|
|
3992
|
+
}), re = m ? (e, t, n) => T(e, t, {
|
|
4084
3993
|
...n,
|
|
4085
3994
|
duration: 0
|
|
4086
|
-
}) :
|
|
3995
|
+
}) : ne(T), M = m ? (e, t, n) => J(e, t, {
|
|
4087
3996
|
...n,
|
|
4088
3997
|
duration: 0
|
|
4089
|
-
}) :
|
|
3998
|
+
}) : ne(J), N = m ? (e, n, r) => J(e, n, {
|
|
4090
3999
|
...r,
|
|
4091
4000
|
duration: 0
|
|
4092
|
-
}, t) :
|
|
4093
|
-
animate:
|
|
4001
|
+
}, t) : ne((e, n, r) => J(e, n, r, t)), ie = await l.onSwipeEnd(o, h, {
|
|
4002
|
+
animate: re,
|
|
4094
4003
|
currentScreen: d,
|
|
4095
4004
|
prevScreen: n,
|
|
4096
4005
|
onStart: (e) => {
|
|
4097
4006
|
let t = !s && e;
|
|
4098
|
-
|
|
4099
|
-
animate:
|
|
4007
|
+
j = t, p?.onSwipeEnd?.(t, {
|
|
4008
|
+
animate: M,
|
|
4100
4009
|
currentDecorator: f,
|
|
4101
4010
|
prevDecorator: r
|
|
4102
|
-
}),
|
|
4011
|
+
}), ee("end", t, 0, N);
|
|
4103
4012
|
}
|
|
4104
4013
|
});
|
|
4105
|
-
if (!s &&
|
|
4106
|
-
d?.setAttribute(
|
|
4014
|
+
if (!s && ie) {
|
|
4015
|
+
d?.setAttribute(Ot, "true"), f?.setAttribute(Ot, "true");
|
|
4107
4016
|
for (let e of i.current) Q(e, t);
|
|
4108
|
-
for (let e of i.prev)
|
|
4017
|
+
for (let e of i.prev) q(e, void 0, t), Q(e, t);
|
|
4109
4018
|
i = {
|
|
4110
4019
|
current: [],
|
|
4111
4020
|
prev: []
|
|
@@ -4113,77 +4022,90 @@ function Ba(e) {
|
|
|
4113
4022
|
current: [],
|
|
4114
4023
|
prev: []
|
|
4115
4024
|
}, e.back();
|
|
4116
|
-
} else d &&
|
|
4025
|
+
} else d && q(d, void 0, t), n && q(n, void 0, t), f && q(f), r && q(r), A(), k(), te(), e.setDragStatus("IDLE");
|
|
4026
|
+
}, me = (t) => {
|
|
4027
|
+
t.isPrimary === !1 || t.pointerType === "mouse" && t.button !== 0 || ((c || l !== null) && _e(), e.isReadyForDrag() && (l = t.pointerId, d = !1, o = !0, s = !1, _ = Ja(t.target, {
|
|
4028
|
+
direction: "x",
|
|
4029
|
+
verifyByScroll: !0
|
|
4030
|
+
}), v = Ja(t.target, {
|
|
4031
|
+
direction: "y",
|
|
4032
|
+
verifyByScroll: !0
|
|
4033
|
+
}), y = t.clientX, b = t.clientY));
|
|
4034
|
+
}, F = (t) => {
|
|
4035
|
+
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4036
|
+
if (c) {
|
|
4037
|
+
w(t), de(t);
|
|
4038
|
+
return;
|
|
4039
|
+
}
|
|
4040
|
+
if (!o) return;
|
|
4041
|
+
if (!e.isReadyForDrag()) {
|
|
4042
|
+
o = !1;
|
|
4043
|
+
return;
|
|
4044
|
+
}
|
|
4045
|
+
let n = e.getTransition().swipeDirection;
|
|
4046
|
+
if (!n) {
|
|
4047
|
+
o = !1;
|
|
4048
|
+
return;
|
|
4049
|
+
}
|
|
4050
|
+
let r = !_.element && !v.element, i = t.clientX - y, a = t.clientY - b, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4051
|
+
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, re(t);
|
|
4052
|
+
else {
|
|
4053
|
+
let e = v.element && v.element.scrollTop <= 0, r = _.element && _.element.scrollLeft <= 0 && _.hasMarker;
|
|
4054
|
+
(n === "y" && (e || _.element) || n === "x" && (r || v.element)) && (s = !0, re(t));
|
|
4055
|
+
}
|
|
4056
|
+
}, he = (e) => {
|
|
4057
|
+
e.pointerId === l && (o = !1, s = !1, l = null, c && pe(e));
|
|
4058
|
+
}, I = (e) => {
|
|
4059
|
+
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && pe(e, !0));
|
|
4060
|
+
}, ge = (t) => {
|
|
4061
|
+
t.pointerId !== l || !c || t.target === e.getElements().scope && I(t);
|
|
4117
4062
|
};
|
|
4063
|
+
function _e() {
|
|
4064
|
+
let e = l;
|
|
4065
|
+
o = !1, s = !1, e !== null && (I({
|
|
4066
|
+
pointerId: e,
|
|
4067
|
+
clientX: p.x,
|
|
4068
|
+
clientY: p.y,
|
|
4069
|
+
timeStamp: m
|
|
4070
|
+
}), l = null);
|
|
4071
|
+
}
|
|
4118
4072
|
return {
|
|
4119
|
-
pointerDown:
|
|
4120
|
-
|
|
4121
|
-
|
|
4122
|
-
|
|
4123
|
-
|
|
4124
|
-
|
|
4125
|
-
verifyByScroll: !0
|
|
4126
|
-
}), v = t.clientX, y = t.clientY);
|
|
4127
|
-
},
|
|
4128
|
-
pointerMove: (t) => {
|
|
4129
|
-
if (t.pointerId !== l || e.getViewportScrollHeight() > 10) return;
|
|
4130
|
-
if (c) {
|
|
4131
|
-
C(t), le(t);
|
|
4132
|
-
return;
|
|
4133
|
-
}
|
|
4134
|
-
if (!o) return;
|
|
4135
|
-
if (!e.isReadyForDrag()) {
|
|
4136
|
-
o = !1;
|
|
4137
|
-
return;
|
|
4138
|
-
}
|
|
4139
|
-
let n = e.getTransition().swipeDirection;
|
|
4140
|
-
if (!n) {
|
|
4141
|
-
o = !1;
|
|
4142
|
-
return;
|
|
4143
|
-
}
|
|
4144
|
-
let r = !g.element && !_.element, i = t.clientX - v, a = t.clientY - y, u = n === "x" ? i : a, d = n === "x" ? a : i;
|
|
4145
|
-
if (!(Math.max(Math.abs(u), Math.abs(d)) < 8) && (o = !1, !(u <= 0 || Math.abs(u) <= Math.abs(d) * 3))) if (r) s = !0, N(t);
|
|
4146
|
-
else {
|
|
4147
|
-
let e = _.element && _.element.scrollTop <= 0, r = g.element && g.element.scrollLeft <= 0 && g.hasMarker;
|
|
4148
|
-
(n === "y" && (e || g.element) || n === "x" && (r || _.element)) && (s = !0, N(t));
|
|
4149
|
-
}
|
|
4150
|
-
},
|
|
4151
|
-
pointerUp: (e) => {
|
|
4152
|
-
e.pointerId === l && (o = !1, s = !1, l = null, c && de(e));
|
|
4153
|
-
},
|
|
4154
|
-
pointerCancel: (e) => {
|
|
4155
|
-
e.pointerId === l && (o = !1, s = !1, l = null, d = !0, c && de(e, !0));
|
|
4156
|
-
},
|
|
4073
|
+
pointerDown: me,
|
|
4074
|
+
pointerMove: F,
|
|
4075
|
+
pointerUp: he,
|
|
4076
|
+
pointerCancel: I,
|
|
4077
|
+
lostPointerCapture: ge,
|
|
4078
|
+
abandon: _e,
|
|
4157
4079
|
shouldPreventTouch: () => s
|
|
4158
4080
|
};
|
|
4159
4081
|
}
|
|
4160
4082
|
//#endregion
|
|
4161
4083
|
//#region src/screen/pendingNetwork.ts
|
|
4162
|
-
var
|
|
4163
|
-
|
|
4164
|
-
},
|
|
4165
|
-
if (!(
|
|
4166
|
-
if (
|
|
4084
|
+
var to = 0, no = !1, ro = () => {
|
|
4085
|
+
to = Math.max(0, to - 1);
|
|
4086
|
+
}, io = () => {
|
|
4087
|
+
if (!(no || typeof window > "u")) {
|
|
4088
|
+
if (no = !0, typeof window.fetch == "function") {
|
|
4167
4089
|
let e = window.fetch.bind(window);
|
|
4168
4090
|
window.fetch = (...t) => {
|
|
4169
|
-
|
|
4091
|
+
to += 1;
|
|
4170
4092
|
let n;
|
|
4171
4093
|
try {
|
|
4172
4094
|
n = e(...t);
|
|
4173
4095
|
} catch (e) {
|
|
4174
|
-
throw
|
|
4096
|
+
throw ro(), e;
|
|
4175
4097
|
}
|
|
4176
|
-
return n.then((e) => (
|
|
4177
|
-
throw
|
|
4098
|
+
return n.then((e) => (ro(), e), (e) => {
|
|
4099
|
+
throw ro(), e;
|
|
4178
4100
|
});
|
|
4179
4101
|
};
|
|
4180
4102
|
}
|
|
4181
4103
|
if (typeof XMLHttpRequest == "function") {
|
|
4182
4104
|
let e = XMLHttpRequest.prototype.send;
|
|
4183
4105
|
XMLHttpRequest.prototype.send = function(...t) {
|
|
4184
|
-
|
|
4106
|
+
to += 1;
|
|
4185
4107
|
let n = !1, r = () => {
|
|
4186
|
-
n || (n = !0,
|
|
4108
|
+
n || (n = !0, ro());
|
|
4187
4109
|
};
|
|
4188
4110
|
this.addEventListener("loadend", r);
|
|
4189
4111
|
try {
|
|
@@ -4194,28 +4116,28 @@ var Va = 0, Ha = !1, Ua = () => {
|
|
|
4194
4116
|
};
|
|
4195
4117
|
}
|
|
4196
4118
|
}
|
|
4197
|
-
},
|
|
4119
|
+
}, ao = () => (io(), to > 0);
|
|
4198
4120
|
//#endregion
|
|
4199
4121
|
//#region src/screen/animStartAnchor.ts
|
|
4200
|
-
function
|
|
4122
|
+
function oo(e) {
|
|
4201
4123
|
return e.status !== "PUSHING" && e.status !== "POPPING" && e.status !== "REPLACING" || !e.isTopOrTopPrev ? null : `${e.status}:${e.transitionName}`;
|
|
4202
4124
|
}
|
|
4203
|
-
var
|
|
4204
|
-
function
|
|
4205
|
-
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0,
|
|
4125
|
+
var so = 300, co = 20;
|
|
4126
|
+
function lo(e) {
|
|
4127
|
+
return Array.from(e.querySelectorAll("img")).filter((e) => e.complete && typeof e.decode == "function").slice(0, co);
|
|
4206
4128
|
}
|
|
4207
|
-
function
|
|
4208
|
-
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of
|
|
4129
|
+
function uo(e) {
|
|
4130
|
+
if (!(!e || typeof e.querySelectorAll != "function")) for (let t of lo(e)) t.decode().catch(() => {});
|
|
4209
4131
|
}
|
|
4210
|
-
var
|
|
4132
|
+
var fo = 3, po = 40, mo = (e) => {
|
|
4211
4133
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
4212
4134
|
let t = Math.max(1, e.querySelectorAll("*").length);
|
|
4213
4135
|
/* v8 ignore stop */
|
|
4214
|
-
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length *
|
|
4215
|
-
},
|
|
4136
|
+
return ((e.textContent ?? "").trim().length + e.querySelectorAll("img").length * po) / t < fo;
|
|
4137
|
+
}, ho = (e) => typeof e.getAnimations == "function" && e.getAnimations({ subtree: !0 }).some((e) => {
|
|
4216
4138
|
let t = e.animationName;
|
|
4217
4139
|
return typeof t != "string" || !t.startsWith("flemo-");
|
|
4218
|
-
}),
|
|
4140
|
+
}), go = (e) => {
|
|
4219
4141
|
/* v8 ignore next -- the settle gate only runs a scope past looksLikeShell,
|
|
4220
4142
|
which already requires querySelectorAll. */
|
|
4221
4143
|
if (typeof e.querySelectorAll != "function") return !1;
|
|
@@ -4223,12 +4145,12 @@ var Za = 3, Qa = 40, $a = (e) => {
|
|
|
4223
4145
|
the guard shields exotic embedders. */
|
|
4224
4146
|
let t = typeof e.getBoundingClientRect == "function" ? e.getBoundingClientRect() : null, n = t && t.height > 0 ? t : null, r = 0;
|
|
4225
4147
|
for (let t of Array.from(e.querySelectorAll("img"))) {
|
|
4226
|
-
if (r >=
|
|
4148
|
+
if (r >= co) break;
|
|
4227
4149
|
if (!(t.loading === "lazy" && !t.currentSrc) && !(n && t.getBoundingClientRect().top - n.top >= n.height) && (r += 1, !t.complete)) return !0;
|
|
4228
4150
|
}
|
|
4229
4151
|
return !1;
|
|
4230
4152
|
};
|
|
4231
|
-
function
|
|
4153
|
+
function _o(e, t = {}) {
|
|
4232
4154
|
let n = !1, r = 0, i = [], a = [], o = () => {
|
|
4233
4155
|
if (n) return;
|
|
4234
4156
|
let r = t.scope;
|
|
@@ -4236,7 +4158,7 @@ function no(e, t = {}) {
|
|
|
4236
4158
|
e();
|
|
4237
4159
|
return;
|
|
4238
4160
|
}
|
|
4239
|
-
let i =
|
|
4161
|
+
let i = lo(r);
|
|
4240
4162
|
if (i.length === 0) {
|
|
4241
4163
|
e();
|
|
4242
4164
|
return;
|
|
@@ -4254,15 +4176,15 @@ function no(e, t = {}) {
|
|
|
4254
4176
|
return;
|
|
4255
4177
|
}
|
|
4256
4178
|
let i = () => !n.renderSettleOnly && (f() || d());
|
|
4257
|
-
if (!n.renderSettleOnly &&
|
|
4179
|
+
if (!n.renderSettleOnly && !mo(r)) {
|
|
4258
4180
|
e();
|
|
4259
4181
|
return;
|
|
4260
4182
|
}
|
|
4261
4183
|
/* v8 ignore start -- performance exists in every runtime under test;
|
|
4262
4184
|
the fallback only shields exotic embedders. */
|
|
4263
|
-
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () =>
|
|
4185
|
+
let o = typeof performance < "u" ? performance.now() : 0, s = () => (typeof performance < "u" ? performance.now() : 0) - o, c = [], l = !1, u = !1, d = () => mo(r) && ho(r), f = () => ao() || go(r), p = () => {
|
|
4264
4186
|
u || (u = !0, v.disconnect(), clearTimeout(y), clearTimeout(b), clearTimeout(x), c.forEach((e) => cancelAnimationFrame(e)), c = [], e());
|
|
4265
|
-
}, m = () => n.renderSettleOnly ? 6 :
|
|
4187
|
+
}, m = () => n.renderSettleOnly ? 6 : !mo(r) && !i() ? 2 : 6, h = !1, g = () => {
|
|
4266
4188
|
if (!n.renderSettleOnly) {
|
|
4267
4189
|
p();
|
|
4268
4190
|
return;
|
|
@@ -4341,14 +4263,14 @@ function no(e, t = {}) {
|
|
|
4341
4263
|
n = !0, cancelAnimationFrame(l), r && cancelAnimationFrame(r), i.forEach((e) => cancelAnimationFrame(e)), a.forEach((e) => e());
|
|
4342
4264
|
};
|
|
4343
4265
|
}
|
|
4344
|
-
function
|
|
4345
|
-
let n =
|
|
4266
|
+
function vo(e, t = {}) {
|
|
4267
|
+
let n = _o(e, t), r = t.contentSettle?.capMs ?? 0, i = setTimeout(e, 300 + r);
|
|
4346
4268
|
return () => {
|
|
4347
4269
|
n(), clearTimeout(i);
|
|
4348
4270
|
};
|
|
4349
4271
|
}
|
|
4350
|
-
var
|
|
4351
|
-
function
|
|
4272
|
+
var yo = (e) => 300 + (e?.contentSettle?.capMs ?? 0);
|
|
4273
|
+
function bo() {
|
|
4352
4274
|
let e = /* @__PURE__ */ new Map(), t = (t, n) => {
|
|
4353
4275
|
clearTimeout(n.backstop), e.delete(t);
|
|
4354
4276
|
let r = [...n.members];
|
|
@@ -4358,14 +4280,14 @@ function ao() {
|
|
|
4358
4280
|
return { join: (r, i, a) => {
|
|
4359
4281
|
let o = e.get(r);
|
|
4360
4282
|
if (o) {
|
|
4361
|
-
let e =
|
|
4283
|
+
let e = yo(a);
|
|
4362
4284
|
if (e > o.backstopMs) {
|
|
4363
4285
|
clearTimeout(o.backstop);
|
|
4364
4286
|
let n = o;
|
|
4365
4287
|
n.backstopMs = e, n.backstop = setTimeout(() => t(r, n), e);
|
|
4366
4288
|
}
|
|
4367
4289
|
} else {
|
|
4368
|
-
let n =
|
|
4290
|
+
let n = yo(a), i = {
|
|
4369
4291
|
members: /* @__PURE__ */ new Set(),
|
|
4370
4292
|
backstop: setTimeout(() => t(r, i), n),
|
|
4371
4293
|
backstopMs: n
|
|
@@ -4375,7 +4297,7 @@ function ao() {
|
|
|
4375
4297
|
let s = o, c = {
|
|
4376
4298
|
release: i,
|
|
4377
4299
|
ready: !1,
|
|
4378
|
-
cancelReadiness:
|
|
4300
|
+
cancelReadiness: _o(() => {
|
|
4379
4301
|
c.ready = !0, n(s) && t(r, s);
|
|
4380
4302
|
}, a)
|
|
4381
4303
|
};
|
|
@@ -4392,7 +4314,7 @@ function ao() {
|
|
|
4392
4314
|
}
|
|
4393
4315
|
//#endregion
|
|
4394
4316
|
//#region src/screen/observeBarHeight.ts
|
|
4395
|
-
function
|
|
4317
|
+
function xo(e, t) {
|
|
4396
4318
|
e.offsetHeight > 0 && t(e.offsetHeight);
|
|
4397
4319
|
let n = new ResizeObserver(([e]) => {
|
|
4398
4320
|
e.contentRect.height > 0 && t(e.contentRect.height);
|
|
@@ -4403,87 +4325,24 @@ function oo(e, t) {
|
|
|
4403
4325
|
}
|
|
4404
4326
|
//#endregion
|
|
4405
4327
|
//#region src/screen/observeViewportScrollHeight.ts
|
|
4406
|
-
var
|
|
4328
|
+
var So = 0, Co = 0, wo = 0, To = !1, Eo = /* @__PURE__ */ new Set(), Do = 0, Oo = () => {
|
|
4407
4329
|
let e = document.documentElement.scrollHeight - (window.visualViewport?.height || 0);
|
|
4408
4330
|
e = e < 0 ? 0 : e;
|
|
4409
|
-
let t = e -
|
|
4410
|
-
t = t < 0 ? 0 : t,
|
|
4411
|
-
for (let n of [...
|
|
4412
|
-
},
|
|
4413
|
-
cancelAnimationFrame(
|
|
4331
|
+
let t = e - So;
|
|
4332
|
+
t = t < 0 ? 0 : t, So ||= e, Co = e, wo = t, To = !0;
|
|
4333
|
+
for (let n of [...Eo]) n(e, t);
|
|
4334
|
+
}, ko = () => {
|
|
4335
|
+
cancelAnimationFrame(Do), Do = requestAnimationFrame(Oo);
|
|
4414
4336
|
};
|
|
4415
|
-
function
|
|
4416
|
-
let t =
|
|
4417
|
-
return
|
|
4418
|
-
|
|
4419
|
-
};
|
|
4420
|
-
}
|
|
4421
|
-
//#endregion
|
|
4422
|
-
//#region src/core/engine/gpuPipelinePrewarm.ts
|
|
4423
|
-
var _o = () => {}, vo = "data-flemo-gpu-prewarm", yo = 2e3, bo = 1200, xo = 120, So = 3, Co = "position:fixed;top:0;left:0;pointer-events:none;opacity:0.02;", wo = "width:64px;height:64px;background:#888;color:#000;font-size:10px;will-change:transform;transform:translate3d(1px,0,0);", To = "width:64px;height:64px;background:#000;will-change:opacity;opacity:0.5;", Eo = "cold", Do = 0, Oo = null;
|
|
4424
|
-
function ko() {
|
|
4425
|
-
if (typeof document > "u" || !document.body || typeof Element > "u" || typeof Element.prototype.animate != "function" || !I()) return _o;
|
|
4426
|
-
if (Do += 1, Eo === "cold") {
|
|
4427
|
-
Eo = "scheduled";
|
|
4428
|
-
let e = () => document.querySelector("[data-flemo-status=\"PUSHING\"],[data-flemo-status=\"POPPING\"],[data-flemo-status=\"REPLACING\"]") !== null, t = () => {
|
|
4429
|
-
let e = typeof requestIdleCallback == "function" ? requestIdleCallback(n, { timeout: yo }) : null, t = e === null ? setTimeout(n, bo) : null;
|
|
4430
|
-
Oo = () => {
|
|
4431
|
-
e !== null && typeof cancelIdleCallback == "function" && cancelIdleCallback(e), t !== null && clearTimeout(t);
|
|
4432
|
-
};
|
|
4433
|
-
}, n = () => {
|
|
4434
|
-
if (e()) {
|
|
4435
|
-
t();
|
|
4436
|
-
return;
|
|
4437
|
-
}
|
|
4438
|
-
Oo = null, Eo = "done";
|
|
4439
|
-
let n = document.createElement("div");
|
|
4440
|
-
n.setAttribute(vo, ""), n.setAttribute("aria-hidden", "true"), n.setAttribute("style", Co);
|
|
4441
|
-
let r = document.createElement("div");
|
|
4442
|
-
r.setAttribute("style", wo), r.textContent = "flemo";
|
|
4443
|
-
let i = document.createElement("div");
|
|
4444
|
-
i.setAttribute("style", To);
|
|
4445
|
-
let a = document.createElement("div");
|
|
4446
|
-
a.setAttribute("style", "width:96px;font-size:11px;color:#123;will-change:transform;transform:translate3d(0,0,0);");
|
|
4447
|
-
let o = document.createElement("div");
|
|
4448
|
-
o.setAttribute("style", "width:24px;height:24px;border-radius:50%;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.3);");
|
|
4449
|
-
try {
|
|
4450
|
-
let e = document.createElement("canvas");
|
|
4451
|
-
e.width = 24, e.height = 24;
|
|
4452
|
-
let t = e.getContext("2d");
|
|
4453
|
-
if (t) {
|
|
4454
|
-
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();
|
|
4455
|
-
let n = document.createElement("img");
|
|
4456
|
-
n.src = e.toDataURL(), n.setAttribute("style", "width:24px;height:24px;object-fit:cover;"), o.appendChild(n);
|
|
4457
|
-
}
|
|
4458
|
-
} catch {}
|
|
4459
|
-
let s = document.createElement("div");
|
|
4460
|
-
s.setAttribute("style", "width:96px;height:10px;background:linear-gradient(90deg,#eee,#bbb,#eee);");
|
|
4461
|
-
let c = document.createElement("div");
|
|
4462
|
-
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);
|
|
4463
|
-
try {
|
|
4464
|
-
r.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4465
|
-
duration: xo,
|
|
4466
|
-
iterations: So
|
|
4467
|
-
}), i.animate([{ opacity: .4 }, { opacity: .6 }], {
|
|
4468
|
-
duration: xo,
|
|
4469
|
-
iterations: So
|
|
4470
|
-
}), a.animate([{ transform: "translate3d(0,0,0)" }, { transform: "translate3d(2px,0,0)" }], {
|
|
4471
|
-
duration: xo,
|
|
4472
|
-
iterations: So
|
|
4473
|
-
});
|
|
4474
|
-
} catch {}
|
|
4475
|
-
setTimeout(() => n.remove(), 450);
|
|
4476
|
-
};
|
|
4477
|
-
t();
|
|
4478
|
-
}
|
|
4479
|
-
let e = !1;
|
|
4480
|
-
return () => {
|
|
4481
|
-
e || (e = !0, Do = Math.max(0, Do - 1), Do === 0 && Eo === "scheduled" && (Oo?.(), Oo = null, Eo = "cold"));
|
|
4337
|
+
function Ao(e) {
|
|
4338
|
+
let t = Eo.size === 0;
|
|
4339
|
+
return Eo.add(e), t && (window.visualViewport?.addEventListener("resize", ko), window.visualViewport?.addEventListener("scroll", ko)), To && (e(Co, wo), t && ko()), () => {
|
|
4340
|
+
Eo.delete(e), !(Eo.size > 0) && (cancelAnimationFrame(Do), window.visualViewport?.removeEventListener("resize", ko), window.visualViewport?.removeEventListener("scroll", ko));
|
|
4482
4341
|
};
|
|
4483
4342
|
}
|
|
4484
4343
|
//#endregion
|
|
4485
4344
|
//#region src/utils/isOpaqueColor.ts
|
|
4486
|
-
function
|
|
4345
|
+
function jo(e) {
|
|
4487
4346
|
let t = e.trim().toLowerCase();
|
|
4488
4347
|
if (t === "transparent" || t === "") return !1;
|
|
4489
4348
|
if (t.match(/^rgb\(\s*\d+[\s,]+\d+[\s,]+\d+\s*\)$/)) return !0;
|
|
@@ -4494,7 +4353,7 @@ function Ao(e) {
|
|
|
4494
4353
|
}
|
|
4495
4354
|
//#endregion
|
|
4496
4355
|
//#region src/utils/buildRoutePath.ts
|
|
4497
|
-
function
|
|
4356
|
+
function Mo(e, n) {
|
|
4498
4357
|
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();
|
|
4499
4358
|
return {
|
|
4500
4359
|
pathname: `${a}${c ? `?${c}` : ""}`,
|
|
@@ -4502,4 +4361,4 @@ function jo(e, n) {
|
|
|
4502
4361
|
};
|
|
4503
4362
|
}
|
|
4504
4363
|
//#endregion
|
|
4505
|
-
export {
|
|
4364
|
+
export { Tt as ACTIVE_ATTR, zt as ANIM_HOLD, V as ANIM_HOLD_ATTR, Bt as ANIM_HOLD_PAUSED_VALUES, so as ANIM_HOLD_RELEASE_BACKSTOP_MS, At as BAR_ACTIVE_ATTR, kt as BAR_ATTR, Nt as BAR_ID_ATTR, Pt as BAR_ID_TYPE_ATTR, Mt as BAR_RIDING_ATTR, It as BAR_SPACER_ATTR, jt as BAR_STATUS_ATTR, Ft as BAR_TRANSITION_ATTR, Wt as CREEP_ATTR, Lt as DECORATOR_ATTR, Rt as DECORATOR_NAME_ATTR, Gt as DESK_HEAD_ATTR, Yt as DEVTOOLS_PANEL_ATTR, Ra as DIAGNOSTIC_FLAGS, Xt as FLEMO_ATTRIBUTES, St as FLEMO_ATTR_PREFIX, Ut as GOVERNED_ATTR, Jt as GPU_PREWARM_ATTR, Vt as HELD_ARRIVAL_ATTR, Ht as IMAGE_HOLD_ATTR, Ba as MIN_SETTLE_SECONDS, H as OFFLOADED_SRC_ATTR, tr as OVERSIZE_AREA_RATIO, B as PART_NAME_ATTR, za as RETIRED_DIAGNOSTIC_FLAGS, Dt as ROUTER_ATTR, Ct as SCREEN_ATTR, Ot as SKIP_ANIMATION_ATTR, wt as STATUS_ATTR, ee as TRANSITIONAL_STATUS_VALUES, Et as TRANSITION_ATTR, s as TaskManager, s as TaskManger, Kt as WARM_ATTR, qt as WARM_VIDEO_ATTR, oo as animHoldKey, J as animateInline, yn as animationName, ae as appendParamsQuery, jn as applyTransitionStyles, U as attrSelector, W as attrValueSelector, Mo as buildRoutePath, Za as canProgrammaticallyScroll, q as clearInlineAnimation, fn as collectAnimatedProperties, Tn as compileTransitionStyles, $a as computeBarRiding, Ye as computeScreenFreeze, Je as computeScreenFreezeMode, b as consumeSelfInducedPop, bo as createAnimHoldCoordinator, g as createBrowserHistoryDriver, lt as createDecorator, c as createHistoryStore, x as createHistorySync, mr as createImageDecodeOffloader, j as createMemoryHistoryDriver, te as createNavigateStore, N as createNavigationController, mt as createPartTransition, ut as createRawDecorator, ht as createRawPartTransition, Ze as createRawTransition, pe as createRouterScope, me as createScreenSelector, ue as createScreenStore, _ as createSelfPopGuard, oe as createStepController, eo as createSwipeController, Xe as createTransition, ha as createTransitionEngine, P as createTransitionStore, nt as cupertino, pt as decoratorMap, F as detectBlinkEngine, uo as eagerlyDecodeImages, mn as easingToCss, Da as ensureGpuPipelinePrewarm, gr as ensureImageDecodeOffloader, k as ensureScopeHistorySync, p as ensureWindowHistoryState, Rn as enteringInitialStyle, Ja as findScrollable, l as getMatchedPathPattern, u as getParams, ve as governedCompiledActive, Or as holdCompositorWarm, _e as isDesktopBlink, I as isLegacyAndroidBlink, jo as isOpaqueColor, f as isServer, it as layout, y as markSelfInducedPop, ce as matchesPathname, at as material, ot as none, xo as observeBarHeight, Ao as observeViewportScrollHeight, Xa as overflowsAxis, ft as overlay, gt as partTransitionMap, ie as readStepParams, Ln as registerTransitionDefinitions, A as releaseScopeHistorySync, Oa as resolvePlatformProfile, ct as resolveTransition, ka as restLayerPromotionEnabled, vo as scheduleAnimHoldRelease, d as seedInitialHistory, m as seedRouterEntry, Qa as sharedBarsMatch, lr as shouldOffloadImage, La as startFlemoRuntime, je as steadySixtyDesktopProfile, se as subscribeStepParamsRestore, Ga as swipeSettleSeconds, pn as targetToDecls, st as transitionMap, K as variantHasAnimation };
|