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