@readerseye2/cr_viewer 2.0.5 → 2.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -11,7 +11,7 @@ var an = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : t
11
11
  function Uo(e) {
12
12
  return e && e.__esModule && Object.prototype.hasOwnProperty.call(e, "default") ? e.default : e;
13
13
  }
14
- var cn = { exports: {} }, On = {}, un = { exports: {} }, Pn = {};
14
+ var cn = { exports: {} }, An = {}, un = { exports: {} }, Pn = {};
15
15
  /**
16
16
  * @license React
17
17
  * use-sync-external-store-shim.production.js
@@ -26,17 +26,17 @@ function Zi() {
26
26
  if (Lr) return Pn;
27
27
  Lr = 1;
28
28
  var e = j;
29
- function t(v, g) {
30
- return v === g && (v !== 0 || 1 / v === 1 / g) || v !== v && g !== g;
29
+ function t(v, h) {
30
+ return v === h && (v !== 0 || 1 / v === 1 / h) || v !== v && h !== h;
31
31
  }
32
32
  var n = typeof Object.is == "function" ? Object.is : t, r = e.useState, o = e.useEffect, i = e.useLayoutEffect, s = e.useDebugValue;
33
- function u(v, g) {
34
- var h = g(), b = r({ inst: { value: h, getSnapshot: g } }), y = b[0].inst, c = b[1];
33
+ function u(v, h) {
34
+ var g = h(), b = r({ inst: { value: g, getSnapshot: h } }), y = b[0].inst, c = b[1];
35
35
  return i(
36
36
  function() {
37
- y.value = h, y.getSnapshot = g, a(y) && c({ inst: y });
37
+ y.value = g, y.getSnapshot = h, a(y) && c({ inst: y });
38
38
  },
39
- [v, h, g]
39
+ [v, g, h]
40
40
  ), o(
41
41
  function() {
42
42
  return a(y) && c({ inst: y }), v(function() {
@@ -44,20 +44,20 @@ function Zi() {
44
44
  });
45
45
  },
46
46
  [v]
47
- ), s(h), h;
47
+ ), s(g), g;
48
48
  }
49
49
  function a(v) {
50
- var g = v.getSnapshot;
50
+ var h = v.getSnapshot;
51
51
  v = v.value;
52
52
  try {
53
- var h = g();
54
- return !n(v, h);
53
+ var g = h();
54
+ return !n(v, g);
55
55
  } catch {
56
56
  return !0;
57
57
  }
58
58
  }
59
- function l(v, g) {
60
- return g();
59
+ function l(v, h) {
60
+ return h();
61
61
  }
62
62
  var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? l : u;
63
63
  return Pn.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, Pn;
@@ -75,10 +75,10 @@ var Bn = {};
75
75
  var Hr;
76
76
  function Ji() {
77
77
  return Hr || (Hr = 1, process.env.NODE_ENV !== "production" && (function() {
78
- function e(h, b) {
79
- return h === b && (h !== 0 || 1 / h === 1 / b) || h !== h && b !== b;
78
+ function e(g, b) {
79
+ return g === b && (g !== 0 || 1 / g === 1 / b) || g !== g && b !== b;
80
80
  }
81
- function t(h, b) {
81
+ function t(g, b) {
82
82
  d || o.startTransition === void 0 || (d = !0, console.error(
83
83
  "You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."
84
84
  ));
@@ -97,32 +97,32 @@ function Ji() {
97
97
  function() {
98
98
  f.value = y, f.getSnapshot = b, n(f) && p({ inst: f });
99
99
  },
100
- [h, y, b]
100
+ [g, y, b]
101
101
  ), u(
102
102
  function() {
103
- return n(f) && p({ inst: f }), h(function() {
103
+ return n(f) && p({ inst: f }), g(function() {
104
104
  n(f) && p({ inst: f });
105
105
  });
106
106
  },
107
- [h]
107
+ [g]
108
108
  ), l(y), y;
109
109
  }
110
- function n(h) {
111
- var b = h.getSnapshot;
112
- h = h.value;
110
+ function n(g) {
111
+ var b = g.getSnapshot;
112
+ g = g.value;
113
113
  try {
114
114
  var y = b();
115
- return !i(h, y);
115
+ return !i(g, y);
116
116
  } catch {
117
117
  return !0;
118
118
  }
119
119
  }
120
- function r(h, b) {
120
+ function r(g, b) {
121
121
  return b();
122
122
  }
123
123
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
124
- var o = j, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, u = o.useEffect, a = o.useLayoutEffect, l = o.useDebugValue, d = !1, v = !1, g = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
125
- Bn.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : g, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
124
+ var o = j, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, u = o.useEffect, a = o.useLayoutEffect, l = o.useDebugValue, d = !1, v = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
125
+ Bn.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore : h, typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error());
126
126
  })()), Bn;
127
127
  }
128
128
  var Nr;
@@ -140,14 +140,14 @@ function Ko() {
140
140
  */
141
141
  var Fr;
142
142
  function es() {
143
- if (Fr) return On;
143
+ if (Fr) return An;
144
144
  Fr = 1;
145
145
  var e = j, t = Ko();
146
146
  function n(l, d) {
147
147
  return l === d && (l !== 0 || 1 / l === 1 / d) || l !== l && d !== d;
148
148
  }
149
149
  var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, i = e.useRef, s = e.useEffect, u = e.useMemo, a = e.useDebugValue;
150
- return On.useSyncExternalStoreWithSelector = function(l, d, v, g, h) {
150
+ return An.useSyncExternalStoreWithSelector = function(l, d, v, h, g) {
151
151
  var b = i(null);
152
152
  if (b.current === null) {
153
153
  var y = { hasValue: !1, value: null };
@@ -157,16 +157,16 @@ function es() {
157
157
  function() {
158
158
  function f(E) {
159
159
  if (!p) {
160
- if (p = !0, x = E, E = g(E), h !== void 0 && y.hasValue) {
160
+ if (p = !0, x = E, E = h(E), g !== void 0 && y.hasValue) {
161
161
  var m = y.value;
162
- if (h(m, E))
162
+ if (g(m, E))
163
163
  return C = m;
164
164
  }
165
165
  return C = E;
166
166
  }
167
167
  if (m = C, r(x, E)) return m;
168
- var S = g(E);
169
- return h !== void 0 && h(m, S) ? (x = E, m) : (x = E, C = S);
168
+ var S = h(E);
169
+ return g !== void 0 && g(m, S) ? (x = E, m) : (x = E, C = S);
170
170
  }
171
171
  var p = !1, x, C, I = v === void 0 ? null : v;
172
172
  return [
@@ -178,7 +178,7 @@ function es() {
178
178
  }
179
179
  ];
180
180
  },
181
- [d, v, g, h]
181
+ [d, v, h, g]
182
182
  );
183
183
  var c = o(l, b[0], b[1]);
184
184
  return s(
@@ -187,7 +187,7 @@ function es() {
187
187
  },
188
188
  [c]
189
189
  ), a(c), c;
190
- }, On;
190
+ }, An;
191
191
  }
192
192
  var Gn = {};
193
193
  /**
@@ -207,7 +207,7 @@ function ts() {
207
207
  }
208
208
  typeof __REACT_DEVTOOLS_GLOBAL_HOOK__ < "u" && typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart == "function" && __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());
209
209
  var t = j, n = Ko(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, i = t.useRef, s = t.useEffect, u = t.useMemo, a = t.useDebugValue;
210
- Gn.useSyncExternalStoreWithSelector = function(l, d, v, g, h) {
210
+ Gn.useSyncExternalStoreWithSelector = function(l, d, v, h, g) {
211
211
  var b = i(null);
212
212
  if (b.current === null) {
213
213
  var y = { hasValue: !1, value: null };
@@ -217,17 +217,17 @@ function ts() {
217
217
  function() {
218
218
  function f(E) {
219
219
  if (!p) {
220
- if (p = !0, x = E, E = g(E), h !== void 0 && y.hasValue) {
220
+ if (p = !0, x = E, E = h(E), g !== void 0 && y.hasValue) {
221
221
  var m = y.value;
222
- if (h(m, E))
222
+ if (g(m, E))
223
223
  return C = m;
224
224
  }
225
225
  return C = E;
226
226
  }
227
227
  if (m = C, r(x, E))
228
228
  return m;
229
- var S = g(E);
230
- return h !== void 0 && h(m, S) ? (x = E, m) : (x = E, C = S);
229
+ var S = h(E);
230
+ return g !== void 0 && g(m, S) ? (x = E, m) : (x = E, C = S);
231
231
  }
232
232
  var p = !1, x, C, I = v === void 0 ? null : v;
233
233
  return [
@@ -239,7 +239,7 @@ function ts() {
239
239
  }
240
240
  ];
241
241
  },
242
- [d, v, g, h]
242
+ [d, v, h, g]
243
243
  );
244
244
  var c = o(l, b[0], b[1]);
245
245
  return s(
@@ -261,8 +261,8 @@ const os = /* @__PURE__ */ Uo(rs), Vr = (e) => {
261
261
  const n = /* @__PURE__ */ new Set(), r = (l, d) => {
262
262
  const v = typeof l == "function" ? l(t) : l;
263
263
  if (!Object.is(v, t)) {
264
- const g = t;
265
- t = d ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), n.forEach((h) => h(t, g));
264
+ const h = t;
265
+ t = d ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), n.forEach((g) => g(t, h));
266
266
  }
267
267
  }, o = () => t, u = { setState: r, getState: o, getInitialState: () => a, subscribe: (l) => (n.add(l), () => n.delete(l)) }, a = t = e(r, o, u);
268
268
  return u;
@@ -611,7 +611,10 @@ function ds(e) {
611
611
  toggleShowPointer: () => r({ showPointer: !o().showPointer }),
612
612
  setShowSplit: (i) => r({ showSplit: i }),
613
613
  toggleShowSplit: () => r({ showSplit: !o().showSplit }),
614
- setViewportSize: (i, s) => r({ viewportWidth: i, viewportHeight: s })
614
+ setViewportSize: (i, s) => {
615
+ const { viewportWidth: u, viewportHeight: a } = o();
616
+ u === i && a === s || r({ viewportWidth: i, viewportHeight: s });
617
+ }
615
618
  }));
616
619
  }
617
620
  const Rn = 0, kt = 1, Wt = 2, Zo = 4;
@@ -888,7 +891,7 @@ const ys = {
888
891
  [],
889
892
  { singleton: !0 }
890
893
  );
891
- function At(e, t, n) {
894
+ function Ot(e, t, n) {
892
895
  return wr(e, t, n).callbackRef;
893
896
  }
894
897
  function wr(e, t, n) {
@@ -910,13 +913,13 @@ function ws(e, t, n, r, o, i, s, u, a) {
910
913
  const l = j.useCallback(
911
914
  (d) => {
912
915
  const v = Is(d.children, t, u ? "offsetWidth" : "offsetHeight", o);
913
- let g = d.parentElement;
914
- for (; !g.dataset.virtuosoScroller; )
915
- g = g.parentElement;
916
- const h = g.lastElementChild.dataset.viewportType === "window";
916
+ let h = d.parentElement;
917
+ for (; !h.dataset.virtuosoScroller; )
918
+ h = h.parentElement;
919
+ const g = h.lastElementChild.dataset.viewportType === "window";
917
920
  let b;
918
- h && (b = g.ownerDocument.defaultView);
919
- const y = s ? u ? s.scrollLeft : s.scrollTop : h ? u ? b.scrollX || b.document.documentElement.scrollLeft : b.scrollY || b.document.documentElement.scrollTop : u ? g.scrollLeft : g.scrollTop, c = s ? u ? s.scrollWidth : s.scrollHeight : h ? u ? b.document.documentElement.scrollWidth : b.document.documentElement.scrollHeight : u ? g.scrollWidth : g.scrollHeight, f = s ? u ? s.offsetWidth : s.offsetHeight : h ? u ? b.innerWidth : b.innerHeight : u ? g.offsetWidth : g.offsetHeight;
921
+ g && (b = h.ownerDocument.defaultView);
922
+ const y = s ? u ? s.scrollLeft : s.scrollTop : g ? u ? b.scrollX || b.document.documentElement.scrollLeft : b.scrollY || b.document.documentElement.scrollTop : u ? h.scrollLeft : h.scrollTop, c = s ? u ? s.scrollWidth : s.scrollHeight : g ? u ? b.document.documentElement.scrollWidth : b.document.documentElement.scrollHeight : u ? h.scrollWidth : h.scrollHeight, f = s ? u ? s.offsetWidth : s.offsetHeight : g ? u ? b.innerWidth : b.innerHeight : u ? h.offsetWidth : h.offsetHeight;
920
923
  r({
921
924
  scrollHeight: c,
922
925
  scrollTop: Math.max(y, 0),
@@ -955,17 +958,17 @@ function ti(e, t, n) {
955
958
  if (!(a != null && a.offsetParent))
956
959
  return;
957
960
  const l = a.getBoundingClientRect(), d = l.width;
958
- let v, g;
961
+ let v, h;
959
962
  if (t) {
960
- const h = t.getBoundingClientRect(), b = l.top - h.top;
961
- g = h.height - Math.max(0, b), v = b + t.scrollTop;
963
+ const g = t.getBoundingClientRect(), b = l.top - g.top;
964
+ h = g.height - Math.max(0, b), v = b + t.scrollTop;
962
965
  } else {
963
- const h = s.current.ownerDocument.defaultView;
964
- g = h.innerHeight - Math.max(0, l.top), v = l.top + h.scrollY;
966
+ const g = s.current.ownerDocument.defaultView;
967
+ h = g.innerHeight - Math.max(0, l.top), v = l.top + g.scrollY;
965
968
  }
966
969
  r.current = {
967
970
  offsetTop: v,
968
- visibleHeight: g,
971
+ visibleHeight: h,
969
972
  visibleWidth: d
970
973
  }, e(r.current);
971
974
  },
@@ -994,7 +997,7 @@ function ti(e, t, n) {
994
997
  }
995
998
  const Ke = we(
996
999
  () => {
997
- const e = xe(), t = xe(), n = W(0), r = xe(), o = W(0), i = xe(), s = xe(), u = W(0), a = W(0), l = W(0), d = W(0), v = xe(), g = xe(), h = W(!1), b = W(!1), y = W(!1);
1000
+ const e = xe(), t = xe(), n = W(0), r = xe(), o = W(0), i = xe(), s = xe(), u = W(0), a = W(0), l = W(0), d = W(0), v = xe(), h = xe(), g = W(!1), b = W(!1), y = W(!1);
998
1001
  return ie(
999
1002
  G(
1000
1003
  e,
@@ -1014,11 +1017,11 @@ const Ke = we(
1014
1017
  footerHeight: d,
1015
1018
  headerHeight: u,
1016
1019
  horizontalDirection: b,
1017
- scrollBy: g,
1020
+ scrollBy: h,
1018
1021
  // input
1019
1022
  scrollContainerState: e,
1020
1023
  scrollHeight: s,
1021
- scrollingInProgress: h,
1024
+ scrollingInProgress: g,
1022
1025
  // signals
1023
1026
  scrollTo: v,
1024
1027
  scrollTop: t,
@@ -1235,8 +1238,8 @@ function Rs(e, t) {
1235
1238
  if (u.some(Ps(r)))
1236
1239
  continue;
1237
1240
  let a = !1, l = !1;
1238
- for (const { end: d, start: v, value: g } of u)
1239
- a ? (o >= v || i === g) && (e = fr(e, v)) : (l = g !== i, a = !0), d > o && o >= v && g !== i && (e = et(e, o + 1, g));
1241
+ for (const { end: d, start: v, value: h } of u)
1242
+ a ? (o >= v || i === h) && (e = fr(e, v)) : (l = h !== i, a = !0), d > o && o >= v && h !== i && (e = et(e, o + 1, h));
1240
1243
  l && (e = et(e, s, i));
1241
1244
  }
1242
1245
  return [e, n];
@@ -1271,15 +1274,15 @@ function ui(e, t, n) {
1271
1274
  }
1272
1275
  }
1273
1276
  function Es(e, t, n, r = 0) {
1274
- return r > 0 && (t = Math.max(t, ai(e, r, Cr).offset)), ni(Ts(e, t, n, Ms), Os);
1277
+ return r > 0 && (t = Math.max(t, ai(e, r, Cr).offset)), ni(Ts(e, t, n, Ms), As);
1275
1278
  }
1276
1279
  function zs(e, [t, n, r, o]) {
1277
1280
  t.length > 0 && r("received item sizes", t, Qe.DEBUG);
1278
1281
  const i = e.sizeTree;
1279
1282
  let s = i, u = 0;
1280
1283
  if (n.length > 0 && ke(i) && t.length === 2) {
1281
- const g = t[0].size, h = t[1].size;
1282
- s = n.reduce((b, y) => et(et(b, y, g), y + 1, h), s);
1284
+ const h = t[0].size, g = t[1].size;
1285
+ s = n.reduce((b, y) => et(et(b, y, h), y + 1, g), s);
1283
1286
  } else
1284
1287
  [s, u] = Rs(s, t);
1285
1288
  if (s === i)
@@ -1287,7 +1290,7 @@ function zs(e, [t, n, r, o]) {
1287
1290
  const { lastIndex: a, lastOffset: l, lastSize: d, offsetTree: v } = hr(e.offsetTree, u, s, o);
1288
1291
  return {
1289
1292
  groupIndices: n,
1290
- groupOffsetTree: n.reduce((g, h) => et(g, h, Yt(h, v, o)), Lt()),
1293
+ groupOffsetTree: n.reduce((h, g) => et(h, g, Yt(g, v, o)), Lt()),
1291
1294
  lastIndex: a,
1292
1295
  lastOffset: l,
1293
1296
  lastSize: d,
@@ -1295,7 +1298,7 @@ function zs(e, [t, n, r, o]) {
1295
1298
  sizeTree: s
1296
1299
  };
1297
1300
  }
1298
- function As(e) {
1301
+ function Os(e) {
1299
1302
  return Et(e).map(({ k: t, v: n }, r, o) => {
1300
1303
  const i = o[r + 1];
1301
1304
  return { endIndex: i ? i.k - 1 : 1 / 0, size: n, startIndex: t };
@@ -1316,12 +1319,12 @@ function hr(e, t, n, r) {
1316
1319
  } else
1317
1320
  o = [];
1318
1321
  for (const { start: l, value: d } of Ht(n, t, 1 / 0)) {
1319
- const v = l - i, g = v * s + u + v * r;
1322
+ const v = l - i, h = v * s + u + v * r;
1320
1323
  o.push({
1321
1324
  index: l,
1322
- offset: g,
1325
+ offset: h,
1323
1326
  size: d
1324
- }), i = l, u = g, s = d;
1327
+ }), i = l, u = h, s = d;
1325
1328
  }
1326
1329
  return {
1327
1330
  lastIndex: i,
@@ -1330,7 +1333,7 @@ function hr(e, t, n, r) {
1330
1333
  offsetTree: o
1331
1334
  };
1332
1335
  }
1333
- function Os(e) {
1336
+ function As(e) {
1334
1337
  return { index: e.index, value: e };
1335
1338
  }
1336
1339
  function Ps(e) {
@@ -1342,7 +1345,7 @@ const Bs = {
1342
1345
  offsetWidth: "width"
1343
1346
  }, ht = we(
1344
1347
  ([{ log: e }, { recalcInProgress: t }]) => {
1345
- const n = xe(), r = xe(), o = Ue(r, 0), i = xe(), s = xe(), u = W(0), a = W([]), l = W(void 0), d = W(void 0), v = W(void 0), g = W(void 0), h = W((m, S) => wt(m, Bs[S])), b = W(void 0), y = W(0), c = ks(), f = Ue(
1348
+ const n = xe(), r = xe(), o = Ue(r, 0), i = xe(), s = xe(), u = W(0), a = W([]), l = W(void 0), d = W(void 0), v = W(void 0), h = W(void 0), g = W((m, S) => wt(m, Bs[S])), b = W(void 0), y = W(0), c = ks(), f = Ue(
1346
1349
  G(n, Se(a, e, y), pt(zs, c), Ee()),
1347
1350
  c
1348
1351
  ), p = Ue(
@@ -1363,7 +1366,7 @@ const Bs = {
1363
1366
  de((m) => m.length > 0),
1364
1367
  Se(f, y),
1365
1368
  Y(([m, S, T]) => {
1366
- const k = m.reduce((R, A, B) => et(R, A, Yt(A, S.offsetTree, T) || B), Lt());
1369
+ const k = m.reduce((R, O, B) => et(R, O, Yt(O, S.offsetTree, T) || B), Lt());
1367
1370
  return {
1368
1371
  ...S,
1369
1372
  groupIndices: m,
@@ -1409,18 +1412,18 @@ const Bs = {
1409
1412
  n
1410
1413
  ), ie(
1411
1414
  G(
1412
- g,
1415
+ h,
1413
1416
  de((m) => m !== void 0 && m.length > 0 && ke(Pe(f).sizeTree)),
1414
1417
  Y((m) => {
1415
1418
  const S = [];
1416
1419
  let T = m[0], k = 0;
1417
1420
  for (let R = 1; R < m.length; R++) {
1418
- const A = m[R];
1419
- A !== T && (S.push({
1421
+ const O = m[R];
1422
+ O !== T && (S.push({
1420
1423
  endIndex: R - 1,
1421
1424
  size: T,
1422
1425
  startIndex: k
1423
- }), T = A, k = R);
1426
+ }), T = O, k = R);
1424
1427
  }
1425
1428
  return S.push({
1426
1429
  endIndex: m.length - 1,
@@ -1438,13 +1441,13 @@ const Bs = {
1438
1441
  Y(([m, S, T]) => {
1439
1442
  const k = [];
1440
1443
  for (let R = 0; R < m.length; R++) {
1441
- const A = m[R], B = m[R + 1];
1444
+ const O = m[R], B = m[R + 1];
1442
1445
  k.push({
1443
- startIndex: A,
1444
- endIndex: A,
1446
+ startIndex: O,
1447
+ endIndex: O,
1445
1448
  size: S
1446
1449
  }), B !== void 0 && k.push({
1447
- startIndex: A + 1,
1450
+ startIndex: O + 1,
1448
1451
  endIndex: B - 1,
1449
1452
  size: T
1450
1453
  });
@@ -1501,13 +1504,13 @@ const Bs = {
1501
1504
  Y(([m, S]) => {
1502
1505
  const T = S.groupIndices.length > 0, k = [], R = S.lastSize;
1503
1506
  if (T) {
1504
- const A = Xt(S.sizeTree, 0);
1507
+ const O = Xt(S.sizeTree, 0);
1505
1508
  let B = 0, M = 0;
1506
1509
  for (; B < m; ) {
1507
1510
  const N = S.groupIndices[M], _ = S.groupIndices.length === M + 1 ? 1 / 0 : S.groupIndices[M + 1] - N - 1;
1508
1511
  k.push({
1509
1512
  endIndex: N,
1510
- size: A,
1513
+ size: O,
1511
1514
  startIndex: N
1512
1515
  }), k.push({
1513
1516
  endIndex: N + 1 + _ - 1,
@@ -1540,10 +1543,10 @@ const Bs = {
1540
1543
  ).ranges;
1541
1544
  }
1542
1545
  return Et(S.sizeTree).reduce(
1543
- (A, { k: B, v: M }) => ({
1546
+ (O, { k: B, v: M }) => ({
1544
1547
  prevIndex: B + m,
1545
1548
  prevSize: M,
1546
- ranges: [...A.ranges, { endIndex: B + m - 1, size: A.prevSize, startIndex: A.prevIndex }]
1549
+ ranges: [...O.ranges, { endIndex: B + m - 1, size: O.prevSize, startIndex: O.prevIndex }]
1547
1550
  }),
1548
1551
  {
1549
1552
  prevIndex: 0,
@@ -1575,13 +1578,13 @@ const Bs = {
1575
1578
  return S;
1576
1579
  let k = Lt();
1577
1580
  const R = Pe(p);
1578
- let A = 0, B = 0, M = 0;
1579
- for (; A < -m; ) {
1581
+ let O = 0, B = 0, M = 0;
1582
+ for (; O < -m; ) {
1580
1583
  M = R[B];
1581
1584
  const P = R[B + 1] - M - 1;
1582
- B++, A += P + 1;
1585
+ B++, O += P + 1;
1583
1586
  }
1584
- if (k = Et(S.sizeTree).reduce((P, { k: N, v: _ }) => et(P, Math.max(0, N + m), _), k), A !== -m) {
1587
+ if (k = Et(S.sizeTree).reduce((P, { k: N, v: _ }) => et(P, Math.max(0, N + m), _), k), O !== -m) {
1585
1588
  const P = Xt(S.sizeTree, M);
1586
1589
  k = et(k, 0, P);
1587
1590
  const N = at(S.sizeTree, -m + 1)[1];
@@ -1593,7 +1596,7 @@ const Bs = {
1593
1596
  ...hr(S.offsetTree, 0, k, T)
1594
1597
  };
1595
1598
  } else {
1596
- const k = Et(S.sizeTree).reduce((R, { k: A, v: B }) => et(R, Math.max(0, A + m), B), Lt());
1599
+ const k = Et(S.sizeTree).reduce((R, { k: O, v: B }) => et(R, Math.max(0, O + m), B), Lt());
1597
1600
  return {
1598
1601
  ...S,
1599
1602
  sizeTree: k,
@@ -1613,8 +1616,8 @@ const Bs = {
1613
1616
  fixedGroupSize: v,
1614
1617
  gap: y,
1615
1618
  groupIndices: a,
1616
- heightEstimates: g,
1617
- itemSize: h,
1619
+ heightEstimates: h,
1620
+ itemSize: g,
1618
1621
  listRefresh: C,
1619
1622
  shiftWith: s,
1620
1623
  shiftWithOffset: E,
@@ -1699,30 +1702,30 @@ const on = we(
1699
1702
  smoothScrollTargetReached: d,
1700
1703
  viewportHeight: v
1701
1704
  },
1702
- { log: g }
1705
+ { log: h }
1703
1706
  ]) => {
1704
- const h = xe(), b = xe(), y = W(0);
1707
+ const g = xe(), b = xe(), y = W(0);
1705
1708
  let c = null, f = null, p = null;
1706
1709
  function x() {
1707
1710
  c && (c(), c = null), p && (p(), p = null), f && (clearTimeout(f), f = null), be(a, !1);
1708
1711
  }
1709
1712
  return ie(
1710
1713
  G(
1711
- h,
1712
- Se(n, v, r, y, u, s, g),
1714
+ g,
1715
+ Se(n, v, r, y, u, s, h),
1713
1716
  Se(e, i, o),
1714
1717
  Y(
1715
1718
  ([
1716
1719
  [C, I, E, m, S, T, k, R],
1717
- A,
1720
+ O,
1718
1721
  B,
1719
1722
  M
1720
1723
  ]) => {
1721
1724
  const P = fi(C), { align: N, behavior: _, offset: z } = P, Q = m - 1, se = ui(P, I, Q);
1722
- let le = Yt(se, I.offsetTree, A) + T;
1725
+ let le = Yt(se, I.offsetTree, O) + T;
1723
1726
  N === "end" ? (le += B + at(I.sizeTree, se)[1] - E + M, se === Q && (le += k)) : N === "center" ? le += (B + at(I.sizeTree, se)[1] - E + M) / 2 : le -= S, z && (le += z);
1724
1727
  const ce = (pe) => {
1725
- x(), pe ? (R("retrying to scroll to", { location: C }, Qe.DEBUG), be(h, C)) : (be(b, !0), R("list did not change, scroll successful", {}, Qe.DEBUG));
1728
+ x(), pe ? (R("retrying to scroll to", { location: C }, Qe.DEBUG), be(g, C)) : (be(b, !0), R("list did not change, scroll successful", {}, Qe.DEBUG));
1726
1729
  };
1727
1730
  if (x(), _ === "smooth") {
1728
1731
  let pe = !1;
@@ -1742,7 +1745,7 @@ const on = we(
1742
1745
  l
1743
1746
  ), {
1744
1747
  scrollTargetReached: b,
1745
- scrollToIndex: h,
1748
+ scrollToIndex: g,
1746
1749
  topListHeight: y
1747
1750
  };
1748
1751
  },
@@ -1791,7 +1794,7 @@ const sn = we(
1791
1794
  G(
1792
1795
  Fe(t, s),
1793
1796
  Se(u, n, e, l),
1794
- de(([[, d], v, { sizeTree: g }, h, b]) => d && (!ke(g) || yr(h)) && !v && !b),
1797
+ de(([[, d], v, { sizeTree: h }, g, b]) => d && (!ke(h) || yr(g)) && !v && !b),
1795
1798
  Se(a)
1796
1799
  ),
1797
1800
  ([, d]) => {
@@ -1825,13 +1828,13 @@ const Zt = "up", jt = "down", Ns = "none", Fs = {
1825
1828
  viewportHeight: 0
1826
1829
  }
1827
1830
  }, Ds = 0, ln = we(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: i }]) => {
1828
- const s = W(!1), u = W(!0), a = xe(), l = xe(), d = W(4), v = W(Ds), g = Ue(
1831
+ const s = W(!1), u = W(!0), a = xe(), l = xe(), d = W(4), v = W(Ds), h = Ue(
1829
1832
  G(
1830
1833
  dr(G(ue(o), zt(1), dt(!0)), G(ue(o), zt(1), dt(!1), jr(100))),
1831
1834
  Ee()
1832
1835
  ),
1833
1836
  !1
1834
- ), h = Ue(
1837
+ ), g = Ue(
1835
1838
  G(dr(G(n, dt(!0)), G(n, dt(!1), jr(200))), Ee()),
1836
1839
  !1
1837
1840
  );
@@ -1853,10 +1856,10 @@ const Zt = "up", jt = "down", Ns = "none", Fs = {
1853
1856
  viewportHeight: I
1854
1857
  };
1855
1858
  if (T) {
1856
- let A, B;
1857
- return C > p.state.scrollTop ? (A = "SCROLLED_DOWN", B = p.state.scrollTop - C) : (A = "SIZE_DECREASED", B = p.state.scrollTop - C || p.scrollTopDelta), {
1859
+ let O, B;
1860
+ return C > p.state.scrollTop ? (O = "SCROLLED_DOWN", B = p.state.scrollTop - C) : (O = "SIZE_DECREASED", B = p.state.scrollTop - C || p.scrollTopDelta), {
1858
1861
  atBottom: !0,
1859
- atBottomBecause: A,
1862
+ atBottomBecause: O,
1860
1863
  scrollTopDelta: B,
1861
1864
  state: k
1862
1865
  };
@@ -1918,7 +1921,7 @@ const Zt = "up", jt = "down", Ns = "none", Fs = {
1918
1921
  Y(({ scrollTop: p }) => p),
1919
1922
  Ee(),
1920
1923
  pt(
1921
- (p, x) => Pe(h) ? { direction: p.direction, prevScrollTop: x } : { direction: x < p.prevScrollTop ? Zt : jt, prevScrollTop: x },
1924
+ (p, x) => Pe(g) ? { direction: p.direction, prevScrollTop: x } : { direction: x < p.prevScrollTop ? Zt : jt, prevScrollTop: x },
1922
1925
  { direction: jt, prevScrollTop: 0 }
1923
1926
  ),
1924
1927
  Y((p) => p.direction)
@@ -1928,7 +1931,7 @@ const Zt = "up", jt = "down", Ns = "none", Fs = {
1928
1931
  const f = W(0);
1929
1932
  return ie(
1930
1933
  G(
1931
- g,
1934
+ h,
1932
1935
  de((p) => !p),
1933
1936
  dt(0)
1934
1937
  ),
@@ -1937,7 +1940,7 @@ const Zt = "up", jt = "down", Ns = "none", Fs = {
1937
1940
  G(
1938
1941
  o,
1939
1942
  vt(100),
1940
- Se(g),
1943
+ Se(h),
1941
1944
  de(([p, x]) => x),
1942
1945
  pt(([p, x], [C]) => [x, C], [0, 0]),
1943
1946
  Y(([p, x]) => x - p)
@@ -1951,7 +1954,7 @@ const Zt = "up", jt = "down", Ns = "none", Fs = {
1951
1954
  atTopThreshold: v,
1952
1955
  isAtBottom: s,
1953
1956
  isAtTop: u,
1954
- isScrolling: g,
1957
+ isScrolling: h,
1955
1958
  lastJumpDueToItemResize: y,
1956
1959
  scrollDirection: c,
1957
1960
  scrollVelocity: f
@@ -1983,19 +1986,19 @@ const Rr = we(
1983
1986
  ([
1984
1987
  d,
1985
1988
  v,
1986
- g,
1987
- [h, b],
1989
+ h,
1990
+ [g, b],
1988
1991
  y,
1989
1992
  c,
1990
1993
  f,
1991
1994
  p,
1992
1995
  x
1993
1996
  ]) => {
1994
- const C = d - p, I = c + f, E = Math.max(g - C, 0);
1997
+ const C = d - p, I = c + f, E = Math.max(h - C, 0);
1995
1998
  let m = Qr;
1996
1999
  const S = Zr(x, Jt), T = Zr(x, en);
1997
- return h -= p, h += g + f, b += g + f, b -= p, h > d + I - S && (m = Zt), b < d - E + v + T && (m = jt), m !== Qr ? [
1998
- Math.max(C - g - Yr(y, Jt, m) - S, 0),
2000
+ return g -= p, g += h + f, b += h + f, b -= p, g > d + I - S && (m = Zt), b < d - E + v + T && (m = jt), m !== Qr ? [
2001
+ Math.max(C - h - Yr(y, Jt, m) - S, 0),
1999
2002
  C - E - f + v + Yr(y, en, m) + T
2000
2003
  ] : null;
2001
2004
  }
@@ -2047,14 +2050,14 @@ function bn(e, t, n, r, o, i) {
2047
2050
  const y = e[e.length - 1];
2048
2051
  d = y.offset + y.size;
2049
2052
  }
2050
- const v = n - s, g = u + v * a + (v - 1) * r, h = l, b = g - d;
2053
+ const v = n - s, h = u + v * a + (v - 1) * r, g = l, b = h - d;
2051
2054
  return {
2052
2055
  bottom: d,
2053
2056
  firstItemIndex: i,
2054
2057
  items: Jr(e, o, i),
2055
2058
  offsetBottom: b,
2056
2059
  offsetTop: l,
2057
- top: h,
2060
+ top: g,
2058
2061
  topItems: Jr(t, o, i),
2059
2062
  topListHeight: t.reduce((y, c) => c.size + y, 0),
2060
2063
  totalCount: n
@@ -2106,15 +2109,15 @@ function eo(e, t) {
2106
2109
  var n;
2107
2110
  return e === void 0 ? 0 : typeof e == "number" ? e : (n = e[t]) != null ? n : 0;
2108
2111
  }
2109
- const Ot = we(
2112
+ const At = we(
2110
2113
  ([
2111
2114
  { data: e, firstItemIndex: t, gap: n, sizes: r, totalCount: o },
2112
2115
  i,
2113
2116
  { listBoundary: s, topListHeight: u, visibleRange: a },
2114
2117
  { initialTopMostItemIndex: l, scrolledToInitialItem: d },
2115
2118
  { topListHeight: v },
2116
- g,
2117
- { didMount: h },
2119
+ h,
2120
+ { didMount: g },
2118
2121
  { recalcInProgress: b }
2119
2122
  ]) => {
2120
2123
  const y = W([]), c = W(0), f = xe(), p = W(0);
@@ -2122,7 +2125,7 @@ const Ot = we(
2122
2125
  const x = Ue(
2123
2126
  G(
2124
2127
  Fe(
2125
- h,
2128
+ g,
2126
2129
  b,
2127
2130
  ue(a, Qt),
2128
2131
  ue(o),
@@ -2147,7 +2150,7 @@ const Ot = we(
2147
2150
  T,
2148
2151
  k,
2149
2152
  R,
2150
- A,
2153
+ O,
2151
2154
  B,
2152
2155
  M,
2153
2156
  P,
@@ -2179,13 +2182,13 @@ const Ot = we(
2179
2182
  D.push({ data: _ == null ? void 0 : _[ve], index: ve, offset: ne, size: fe }), ne += fe;
2180
2183
  }
2181
2184
  }
2182
- if (!A)
2185
+ if (!O)
2183
2186
  return bn([], D, T, P, ce, M);
2184
- const V = B.length > 0 ? B[B.length - 1] + 1 : 0, O = Es(pe, m, S, V);
2185
- if (O.length === 0)
2187
+ const V = B.length > 0 ? B[B.length - 1] + 1 : 0, A = Es(pe, m, S, V);
2188
+ if (A.length === 0)
2186
2189
  return null;
2187
2190
  const L = T - 1, K = _n([], (q) => {
2188
- for (const J of O) {
2191
+ for (const J of A) {
2189
2192
  const ne = J.value;
2190
2193
  let ee = ne.offset, fe = J.start;
2191
2194
  const ae = ne.size;
@@ -2300,7 +2303,7 @@ const Ot = we(
2300
2303
  rangeChanged: E,
2301
2304
  startReached: I,
2302
2305
  topItemsIndexes: y,
2303
- ...g
2306
+ ...h
2304
2307
  };
2305
2308
  },
2306
2309
  ze(
@@ -2325,7 +2328,7 @@ const Ot = we(
2325
2328
  );
2326
2329
  return ie(ue(s), i), { totalListHeight: s, totalListHeightChanged: i };
2327
2330
  },
2328
- ze(Ke, Ot),
2331
+ ze(Ke, At),
2329
2332
  { singleton: !0 }
2330
2333
  ), Vs = we(
2331
2334
  ([{ viewportHeight: e }, { totalListHeight: t }]) => {
@@ -2363,13 +2366,13 @@ const Ot = we(
2363
2366
  d,
2364
2367
  Se(t, a, n, i, o, r, u),
2365
2368
  Se(e),
2366
- Y(([[v, g, h, b, y, c, f, p], x]) => {
2367
- const { align: C, behavior: I, calculateViewLocation: E = $s, done: m, ...S } = v, T = ui(v, g, b - 1), k = Yt(T, g.offsetTree, x) + y + c, R = k + at(g.sizeTree, T)[1], A = p + c, B = p + h - f, M = E({
2369
+ Y(([[v, h, g, b, y, c, f, p], x]) => {
2370
+ const { align: C, behavior: I, calculateViewLocation: E = $s, done: m, ...S } = v, T = ui(v, h, b - 1), k = Yt(T, h.offsetTree, x) + y + c, R = k + at(h.sizeTree, T)[1], O = p + c, B = p + g - f, M = E({
2368
2371
  itemBottom: R,
2369
2372
  itemTop: k,
2370
2373
  locationParams: { align: C, behavior: I, ...S },
2371
2374
  viewportBottom: B,
2372
- viewportTop: A
2375
+ viewportTop: O
2373
2376
  });
2374
2377
  return M ? m && lt(
2375
2378
  G(
@@ -2389,7 +2392,7 @@ const Ot = we(
2389
2392
  scrollIntoView: d
2390
2393
  };
2391
2394
  },
2392
- ze(ht, Ke, on, Ot, Rt),
2395
+ ze(ht, Ke, on, At, Rt),
2393
2396
  { singleton: !0 }
2394
2397
  );
2395
2398
  function to(e) {
@@ -2404,8 +2407,8 @@ const qs = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), js = we(
2404
2407
  { didMount: a, propsReady: l },
2405
2408
  { log: d },
2406
2409
  { scrollingInProgress: v },
2407
- { context: g },
2408
- { scrollIntoView: h }
2410
+ { context: h },
2411
+ { scrollIntoView: g }
2409
2412
  ]) => {
2410
2413
  const b = W(!1), y = xe();
2411
2414
  let c = null;
@@ -2421,8 +2424,8 @@ const qs = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), js = we(
2421
2424
  Fe(G(ue(t), zt(1)), a),
2422
2425
  Se(ue(b), i, u, v),
2423
2426
  Y(([[I, E], m, S, T, k]) => {
2424
- let R = E && T, A = "auto";
2425
- return R && (A = qs(m, S || k), R = R && !!A), { followOutputBehavior: A, shouldFollow: R, totalCount: I };
2427
+ let R = E && T, O = "auto";
2428
+ return R && (O = qs(m, S || k), R = R && !!O), { followOutputBehavior: O, shouldFollow: R, totalCount: I };
2426
2429
  }),
2427
2430
  de(({ shouldFollow: I }) => I)
2428
2431
  ),
@@ -2475,16 +2478,16 @@ const qs = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), js = we(
2475
2478
  ), Te(
2476
2479
  G(
2477
2480
  Fe(G(C, zt(1)), a),
2478
- Se(ue(x), u, v, g),
2481
+ Se(ue(x), u, v, h),
2479
2482
  Y(([[I, E], m, S, T, k]) => E && S && (m == null ? void 0 : m({ context: k, totalCount: I, scrollingInProgress: T }))),
2480
2483
  de((I) => !!I),
2481
2484
  vt(0)
2482
2485
  ),
2483
2486
  (I) => {
2484
2487
  c && (c(), c = null), Pe(n) ? requestAnimationFrame(() => {
2485
- Pe(d)("scrolling into view", {}), be(h, I);
2488
+ Pe(d)("scrolling into view", {}), be(g, I);
2486
2489
  }) : c = lt(e, () => {
2487
- Pe(d)("scrolling into view", {}), be(h, I), c = null;
2490
+ Pe(d)("scrolling into view", {}), be(g, I), c = null;
2488
2491
  });
2489
2492
  }
2490
2493
  ), { autoscrollToBottom: y, followOutput: b, scrollIntoViewOnChange: x };
@@ -2507,11 +2510,11 @@ const qs = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), js = we(
2507
2510
  Se(i),
2508
2511
  de(([, a]) => a !== 0),
2509
2512
  Se(o, r, t, n, e),
2510
- Y(([[, a], l, d, v, g, h = []]) => gi(a, l, d, v, g, h))
2513
+ Y(([[, a], l, d, v, h, g = []]) => gi(a, l, d, v, h, g))
2511
2514
  ),
2512
2515
  s
2513
2516
  ), {}),
2514
- ze(ht, sn, Ot, _t),
2517
+ ze(ht, sn, At, _t),
2515
2518
  { singleton: !0 }
2516
2519
  ), Ks = we(
2517
2520
  ([{ didMount: e }, { scrollTo: t }, { listState: n }]) => {
@@ -2541,7 +2544,7 @@ const qs = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), js = we(
2541
2544
  initialScrollTop: r
2542
2545
  };
2543
2546
  },
2544
- ze(_t, Ke, Ot),
2547
+ ze(_t, Ke, At),
2545
2548
  { singleton: !0 }
2546
2549
  ), vi = we(
2547
2550
  ([{ scrollVelocity: e }]) => {
@@ -2612,23 +2615,23 @@ const qs = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), js = we(
2612
2615
  { didMount: i },
2613
2616
  { useWindowScroll: s, windowScrollContainerState: u, windowViewportRect: a }
2614
2617
  ]) => {
2615
- const l = xe(), d = W(void 0), v = W(null), g = W(null);
2616
- return ie(u, v), ie(a, g), Te(
2618
+ const l = xe(), d = W(void 0), v = W(null), h = W(null);
2619
+ return ie(u, v), ie(a, h), Te(
2617
2620
  G(
2618
2621
  l,
2619
- Se(t, r, s, v, g, n)
2622
+ Se(t, r, s, v, h, n)
2620
2623
  ),
2621
- ([h, b, y, c, f, p, x]) => {
2622
- const C = As(b.sizeTree);
2623
- c && f !== null && p !== null && (y = f.scrollTop - p.offsetTop), y -= x, h({ ranges: C, scrollTop: y });
2624
+ ([g, b, y, c, f, p, x]) => {
2625
+ const C = Os(b.sizeTree);
2626
+ c && f !== null && p !== null && (y = f.scrollTop - p.offsetTop), y -= x, g({ ranges: C, scrollTop: y });
2624
2627
  }
2625
2628
  ), ie(G(d, de(yr), Y(Qs)), o), ie(
2626
2629
  G(
2627
2630
  i,
2628
2631
  Se(d),
2629
- de(([, h]) => h !== void 0),
2632
+ de(([, g]) => g !== void 0),
2630
2633
  Ee(),
2631
- Y(([, h]) => h.ranges)
2634
+ Y(([, g]) => g.ranges)
2632
2635
  ),
2633
2636
  e
2634
2637
  ), {
@@ -2651,7 +2654,7 @@ const Ys = we(([{ topItemsIndexes: e }]) => {
2651
2654
  ),
2652
2655
  e
2653
2656
  ), { topItemCount: t };
2654
- }, ze(Ot));
2657
+ }, ze(At));
2655
2658
  function Si(e) {
2656
2659
  let t = !1, n;
2657
2660
  return (() => (t || (t = !0, n = e()), n));
@@ -2661,8 +2664,8 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2661
2664
  { deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
2662
2665
  { isAtBottom: o, isScrolling: i, lastJumpDueToItemResize: s, scrollDirection: u },
2663
2666
  { listState: a },
2664
- { beforeUnshiftWith: l, gap: d, shiftWithOffset: v, sizes: g },
2665
- { log: h },
2667
+ { beforeUnshiftWith: l, gap: d, shiftWithOffset: v, sizes: h },
2668
+ { log: g },
2666
2669
  { recalcInProgress: b }
2667
2670
  ]) => {
2668
2671
  const y = tt(
@@ -2678,7 +2681,7 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2678
2681
  [0, [], 0, 0]
2679
2682
  ),
2680
2683
  de(([f]) => f !== 0),
2681
- Se(r, u, n, o, h, b),
2684
+ Se(r, u, n, o, g, b),
2682
2685
  de(([, f, p, x, , , C]) => !C && !x && f !== 0 && p === Zt),
2683
2686
  Y(([[f], , , , , p]) => (p("Upward scrolling compensation", { amount: f }, Qe.DEBUG), f))
2684
2687
  )
@@ -2705,7 +2708,7 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2705
2708
  ), Te(
2706
2709
  G(
2707
2710
  l,
2708
- Se(g, d),
2711
+ Se(h, d),
2709
2712
  Y(([f, { groupIndices: p, lastSize: x, sizeTree: C }, I]) => {
2710
2713
  function E(m) {
2711
2714
  return m * (x + I);
@@ -2734,7 +2737,7 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2734
2737
  }
2735
2738
  ), { deviation: e };
2736
2739
  },
2737
- ze(Ke, ln, Ot, ht, Rt, Ir)
2740
+ ze(Ke, ln, At, ht, Rt, Ir)
2738
2741
  ), el = we(
2739
2742
  ([
2740
2743
  e,
@@ -2789,8 +2792,8 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2789
2792
  sizeRanges: l,
2790
2793
  sizes: d,
2791
2794
  statefulTotalCount: v,
2792
- totalCount: g,
2793
- trackItemSizes: h
2795
+ totalCount: h,
2796
+ trackItemSizes: g
2794
2797
  },
2795
2798
  { initialItemFinalLocationReached: b, initialTopMostItemIndex: y, scrolledToInitialItem: c },
2796
2799
  f,
@@ -2803,7 +2806,7 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2803
2806
  { groupCounts: S },
2804
2807
  T
2805
2808
  ]) => {
2806
- const { listState: k, minOverscanItemCount: R, topItemsIndexes: A, rangeChanged: B, ...M } = C;
2809
+ const { listState: k, minOverscanItemCount: R, topItemsIndexes: O, rangeChanged: B, ...M } = C;
2807
2810
  return ie(B, T.scrollSeekRangeChanged), ie(
2808
2811
  G(
2809
2812
  T.windowViewportRect,
@@ -2824,9 +2827,9 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2824
2827
  scrolledToInitialItem: c,
2825
2828
  sizeRanges: l,
2826
2829
  topItemCount: m,
2827
- topItemsIndexes: A,
2830
+ topItemsIndexes: O,
2828
2831
  // input
2829
- totalCount: g,
2832
+ totalCount: h,
2830
2833
  ...x,
2831
2834
  groupIndices: s,
2832
2835
  itemSize: a,
@@ -2835,7 +2838,7 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2835
2838
  scrollToIndex: I,
2836
2839
  // output
2837
2840
  statefulTotalCount: v,
2838
- trackItemSizes: h,
2841
+ trackItemSizes: g,
2839
2842
  // exported from stateFlagsSystem
2840
2843
  rangeChanged: B,
2841
2844
  ...M,
@@ -2852,7 +2855,7 @@ const Zs = Si(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
2852
2855
  Ke,
2853
2856
  Xs,
2854
2857
  js,
2855
- Ot,
2858
+ At,
2856
2859
  on,
2857
2860
  Js,
2858
2861
  Ys,
@@ -2910,7 +2913,7 @@ function xi(e, t, n) {
2910
2913
  }), j.useImperativeHandle(f, $r(l(C)));
2911
2914
  const E = n;
2912
2915
  return /* @__PURE__ */ w(u.Provider, { value: C, children: n ? /* @__PURE__ */ w(E, { ...tl([...r, ...o, ...s], x), children: p }) : p });
2913
- }), g = (c) => {
2916
+ }), h = (c) => {
2914
2917
  const f = j.useContext(u);
2915
2918
  return j.useCallback(
2916
2919
  (p) => {
@@ -2918,7 +2921,7 @@ function xi(e, t, n) {
2918
2921
  },
2919
2922
  [f, c]
2920
2923
  );
2921
- }, h = (c) => {
2924
+ }, g = (c) => {
2922
2925
  const f = j.useContext(u)[c], p = j.useCallback(
2923
2926
  (x) => Te(f, x),
2924
2927
  [f]
@@ -2936,7 +2939,7 @@ function xi(e, t, n) {
2936
2939
  }),
2937
2940
  [f, p]
2938
2941
  ), p;
2939
- }, y = j.version.startsWith("18") ? h : b;
2942
+ }, y = j.version.startsWith("18") ? g : b;
2940
2943
  return {
2941
2944
  Component: v,
2942
2945
  useEmitter: (c, f) => {
@@ -2944,7 +2947,7 @@ function xi(e, t, n) {
2944
2947
  dn(() => Te(p, f), [f, p]);
2945
2948
  },
2946
2949
  useEmitterValue: y,
2947
- usePublisher: g
2950
+ usePublisher: h
2948
2951
  };
2949
2952
  }
2950
2953
  const wi = j.createContext(void 0), Ii = j.createContext(void 0), Ci = typeof document < "u" ? j.useLayoutEffect : j.useEffect;
@@ -2956,52 +2959,52 @@ function nl(e) {
2956
2959
  }
2957
2960
  function Ti(e, t, n, r = Vt, o, i) {
2958
2961
  const s = j.useRef(null), u = j.useRef(null), a = j.useRef(null), l = j.useCallback(
2959
- (g) => {
2960
- let h, b, y;
2961
- const c = g.target;
2962
+ (h) => {
2963
+ let g, b, y;
2964
+ const c = h.target;
2962
2965
  if (nl(c) || Vn(c)) {
2963
2966
  const p = Vn(c) ? c : c.defaultView;
2964
- y = i ? p.scrollX : p.scrollY, h = i ? p.document.documentElement.scrollWidth : p.document.documentElement.scrollHeight, b = i ? p.innerWidth : p.innerHeight;
2967
+ y = i ? p.scrollX : p.scrollY, g = i ? p.document.documentElement.scrollWidth : p.document.documentElement.scrollHeight, b = i ? p.innerWidth : p.innerHeight;
2965
2968
  } else
2966
- y = i ? c.scrollLeft : c.scrollTop, h = i ? c.scrollWidth : c.scrollHeight, b = i ? c.offsetWidth : c.offsetHeight;
2969
+ y = i ? c.scrollLeft : c.scrollTop, g = i ? c.scrollWidth : c.scrollHeight, b = i ? c.offsetWidth : c.offsetHeight;
2967
2970
  const f = () => {
2968
2971
  e({
2969
- scrollHeight: h,
2972
+ scrollHeight: g,
2970
2973
  scrollTop: Math.max(y, 0),
2971
2974
  viewportHeight: b
2972
2975
  });
2973
2976
  };
2974
- g.suppressFlushSync ? f() : Yi.flushSync(f), u.current !== null && (y === u.current || y <= 0 || y === h - b) && (u.current = null, t(!0), a.current && (clearTimeout(a.current), a.current = null));
2977
+ h.suppressFlushSync ? f() : Yi.flushSync(f), u.current !== null && (y === u.current || y <= 0 || y === g - b) && (u.current = null, t(!0), a.current && (clearTimeout(a.current), a.current = null));
2975
2978
  },
2976
2979
  [e, t, i]
2977
2980
  );
2978
2981
  j.useEffect(() => {
2979
- const g = o || s.current;
2980
- return r(o || s.current), l({ suppressFlushSync: !0, target: g }), g.addEventListener("scroll", l, { passive: !0 }), () => {
2981
- r(null), g.removeEventListener("scroll", l);
2982
+ const h = o || s.current;
2983
+ return r(o || s.current), l({ suppressFlushSync: !0, target: h }), h.addEventListener("scroll", l, { passive: !0 }), () => {
2984
+ r(null), h.removeEventListener("scroll", l);
2982
2985
  };
2983
2986
  }, [s, l, n, r, o]);
2984
- function d(g) {
2985
- const h = s.current;
2986
- if (!h || (i ? "offsetWidth" in h && h.offsetWidth === 0 : "offsetHeight" in h && h.offsetHeight === 0))
2987
+ function d(h) {
2988
+ const g = s.current;
2989
+ if (!g || (i ? "offsetWidth" in g && g.offsetWidth === 0 : "offsetHeight" in g && g.offsetHeight === 0))
2987
2990
  return;
2988
- const b = g.behavior === "smooth";
2991
+ const b = h.behavior === "smooth";
2989
2992
  let y, c, f;
2990
- Vn(h) ? (c = Math.max(
2991
- wt(h.document.documentElement, i ? "width" : "height"),
2992
- i ? h.document.documentElement.scrollWidth : h.document.documentElement.scrollHeight
2993
- ), y = i ? h.innerWidth : h.innerHeight, f = i ? window.scrollX : window.scrollY) : (c = h[i ? "scrollWidth" : "scrollHeight"], y = wt(h, i ? "width" : "height"), f = h[i ? "scrollLeft" : "scrollTop"]);
2993
+ Vn(g) ? (c = Math.max(
2994
+ wt(g.document.documentElement, i ? "width" : "height"),
2995
+ i ? g.document.documentElement.scrollWidth : g.document.documentElement.scrollHeight
2996
+ ), y = i ? g.innerWidth : g.innerHeight, f = i ? window.scrollX : window.scrollY) : (c = g[i ? "scrollWidth" : "scrollHeight"], y = wt(g, i ? "width" : "height"), f = g[i ? "scrollLeft" : "scrollTop"]);
2994
2997
  const p = c - y;
2995
- if (g.top = Math.ceil(Math.max(Math.min(p, g.top), 0)), pi(y, c) || g.top === f) {
2998
+ if (h.top = Math.ceil(Math.max(Math.min(p, h.top), 0)), pi(y, c) || h.top === f) {
2996
2999
  e({ scrollHeight: c, scrollTop: f, viewportHeight: y }), b && t(!0);
2997
3000
  return;
2998
3001
  }
2999
- b ? (u.current = g.top, a.current && clearTimeout(a.current), a.current = setTimeout(() => {
3002
+ b ? (u.current = h.top, a.current && clearTimeout(a.current), a.current = setTimeout(() => {
3000
3003
  a.current = null, u.current = null, t(!0);
3001
- }, 1e3)) : u.current = null, i && (g = { behavior: g.behavior, left: g.top }), h.scrollTo(g);
3004
+ }, 1e3)) : u.current = null, i && (h = { behavior: h.behavior, left: h.top }), g.scrollTo(h);
3002
3005
  }
3003
- function v(g) {
3004
- i && (g = { behavior: g.behavior, left: g.top }), s.current.scrollBy(g);
3006
+ function v(h) {
3007
+ i && (h = { behavior: h.behavior, left: h.top }), s.current.scrollBy(h);
3005
3008
  }
3006
3009
  return { scrollByCallback: v, scrollerRef: s, scrollToCallback: d };
3007
3010
  }
@@ -3044,12 +3047,12 @@ const rl = /* @__PURE__ */ we(() => {
3044
3047
  ([e, t]) => ({ ...e, ...t }),
3045
3048
  ze(yi, rl)
3046
3049
  ), il = ({ height: e }) => /* @__PURE__ */ w("div", { style: { height: e } }), sl = { overflowAnchor: "none", position: Mr(), zIndex: 1 }, ki = { overflowAnchor: "none" }, ll = { ...ki, display: "inline-block", height: "100%" }, ro = /* @__PURE__ */ j.memo(function({ showTopList: e = !1 }) {
3047
- const t = ge("listState"), n = ot("sizeRanges"), r = ge("useWindowScroll"), o = ge("customScrollParent"), i = ot("windowScrollContainerState"), s = ot("scrollContainerState"), u = o || r ? i : s, a = ge("itemContent"), l = ge("context"), d = ge("groupContent"), v = ge("trackItemSizes"), g = ge("itemSize"), h = ge("log"), b = ot("gap"), y = ge("horizontalDirection"), { callbackRef: c } = ws(
3050
+ const t = ge("listState"), n = ot("sizeRanges"), r = ge("useWindowScroll"), o = ge("customScrollParent"), i = ot("windowScrollContainerState"), s = ot("scrollContainerState"), u = o || r ? i : s, a = ge("itemContent"), l = ge("context"), d = ge("groupContent"), v = ge("trackItemSizes"), h = ge("itemSize"), g = ge("log"), b = ot("gap"), y = ge("horizontalDirection"), { callbackRef: c } = ws(
3048
3051
  n,
3049
- g,
3052
+ h,
3050
3053
  v,
3051
3054
  e ? Vt : u,
3052
- h,
3055
+ g,
3053
3056
  b,
3054
3057
  o,
3055
3058
  y,
@@ -3058,7 +3061,7 @@ const rl = /* @__PURE__ */ we(() => {
3058
3061
  zr("deviation", (M) => {
3059
3062
  f !== M && p(M);
3060
3063
  });
3061
- const x = ge("EmptyPlaceholder"), C = ge("ScrollSeekPlaceholder") || il, I = ge("ListComponent"), E = ge("ItemComponent"), m = ge("GroupComponent"), S = ge("computeItemKey"), T = ge("isSeeking"), k = ge("groupIndices").length > 0, R = ge("alignToBottom"), A = ge("initialItemFinalLocationReached"), B = e ? {} : {
3064
+ const x = ge("EmptyPlaceholder"), C = ge("ScrollSeekPlaceholder") || il, I = ge("ListComponent"), E = ge("ItemComponent"), m = ge("GroupComponent"), S = ge("computeItemKey"), T = ge("isSeeking"), k = ge("groupIndices").length > 0, R = ge("alignToBottom"), O = ge("initialItemFinalLocationReached"), B = e ? {} : {
3062
3065
  boxSizing: "border-box",
3063
3066
  ...y ? {
3064
3067
  display: "inline-block",
@@ -3072,7 +3075,7 @@ const rl = /* @__PURE__ */ we(() => {
3072
3075
  paddingBottom: t.offsetBottom,
3073
3076
  paddingTop: t.offsetTop
3074
3077
  },
3075
- ...A ? {} : { visibility: "hidden" }
3078
+ ...O ? {} : { visibility: "hidden" }
3076
3079
  };
3077
3080
  return !e && t.totalCount === 0 && x ? /* @__PURE__ */ w(x, { ...je(x, l) }) : /* @__PURE__ */ w(
3078
3081
  I,
@@ -3151,7 +3154,7 @@ function dl(e, t) {
3151
3154
  return { item: typeof e == "string" ? void 0 : t };
3152
3155
  }
3153
3156
  const fl = /* @__PURE__ */ j.memo(function() {
3154
- const e = ge("HeaderComponent"), t = ot("headerHeight"), n = ge("HeaderFooterTag"), r = At(
3157
+ const e = ge("HeaderComponent"), t = ot("headerHeight"), n = ge("HeaderFooterTag"), r = Ot(
3155
3158
  j.useMemo(
3156
3159
  () => (i) => {
3157
3160
  t(wt(i, "height"));
@@ -3163,7 +3166,7 @@ const fl = /* @__PURE__ */ j.memo(function() {
3163
3166
  ), o = ge("context");
3164
3167
  return e ? /* @__PURE__ */ w(n, { ref: r, children: /* @__PURE__ */ w(e, { ...je(e, o) }) }) : null;
3165
3168
  }), pl = /* @__PURE__ */ j.memo(function() {
3166
- const e = ge("FooterComponent"), t = ot("footerHeight"), n = ge("HeaderFooterTag"), r = At(
3169
+ const e = ge("FooterComponent"), t = ot("footerHeight"), n = ge("HeaderFooterTag"), r = Ot(
3167
3170
  j.useMemo(
3168
3171
  () => (i) => {
3169
3172
  t(wt(i, "height"));
@@ -3177,7 +3180,7 @@ const fl = /* @__PURE__ */ j.memo(function() {
3177
3180
  });
3178
3181
  function Ri({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
3179
3182
  return j.memo(function({ children: r, style: o, context: i, ...s }) {
3180
- const u = n("scrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("scrollerRef"), v = t("horizontalDirection") || !1, { scrollByCallback: g, scrollerRef: h, scrollToCallback: b } = Ti(
3183
+ const u = n("scrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("scrollerRef"), v = t("horizontalDirection") || !1, { scrollByCallback: h, scrollerRef: g, scrollToCallback: b } = Ti(
3181
3184
  u,
3182
3185
  l,
3183
3186
  a,
@@ -3185,12 +3188,12 @@ function Ri({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
3185
3188
  void 0,
3186
3189
  v
3187
3190
  );
3188
- return e("scrollTo", b), e("scrollBy", g), /* @__PURE__ */ w(
3191
+ return e("scrollTo", b), e("scrollBy", h), /* @__PURE__ */ w(
3189
3192
  a,
3190
3193
  {
3191
3194
  "data-testid": "virtuoso-scroller",
3192
3195
  "data-virtuoso-scroller": !0,
3193
- ref: h,
3196
+ ref: g,
3194
3197
  style: { ...v ? cl : al, ...o },
3195
3198
  tabIndex: 0,
3196
3199
  ...s,
@@ -3202,22 +3205,22 @@ function Ri({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
3202
3205
  }
3203
3206
  function _i({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
3204
3207
  return j.memo(function({ children: r, style: o, context: i, ...s }) {
3205
- const u = n("windowScrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("totalListHeight"), v = t("deviation"), g = t("customScrollParent"), h = j.useRef(null), b = t("scrollerRef"), { scrollByCallback: y, scrollerRef: c, scrollToCallback: f } = Ti(
3208
+ const u = n("windowScrollContainerState"), a = t("ScrollerComponent"), l = n("smoothScrollTargetReached"), d = t("totalListHeight"), v = t("deviation"), h = t("customScrollParent"), g = j.useRef(null), b = t("scrollerRef"), { scrollByCallback: y, scrollerRef: c, scrollToCallback: f } = Ti(
3206
3209
  u,
3207
3210
  l,
3208
3211
  a,
3209
3212
  b,
3210
- g
3213
+ h
3211
3214
  );
3212
3215
  return Ci(() => {
3213
3216
  var p;
3214
- return c.current = g || ((p = h.current) == null ? void 0 : p.ownerDocument.defaultView), () => {
3217
+ return c.current = h || ((p = g.current) == null ? void 0 : p.ownerDocument.defaultView), () => {
3215
3218
  c.current = null;
3216
3219
  };
3217
- }, [c, g]), e("windowScrollTo", f), e("scrollBy", y), /* @__PURE__ */ w(
3220
+ }, [c, h]), e("windowScrollTo", f), e("scrollBy", y), /* @__PURE__ */ w(
3218
3221
  a,
3219
3222
  {
3220
- ref: h,
3223
+ ref: g,
3221
3224
  "data-virtuoso-scroller": !0,
3222
3225
  style: { position: "relative", ...o, ...d !== 0 ? { height: d + v } : {} },
3223
3226
  ...s,
@@ -3231,7 +3234,7 @@ const gl = ({ children: e }) => {
3231
3234
  const t = j.useContext(wi), n = ot("viewportHeight"), r = ot("fixedItemHeight"), o = ge("alignToBottom"), i = ge("horizontalDirection"), s = j.useMemo(
3232
3235
  () => Jo(n, (a) => wt(a, i ? "width" : "height")),
3233
3236
  [n, i]
3234
- ), u = At(s, !0, ge("skipAnimationFrameInResizeObserver"));
3237
+ ), u = Ot(s, !0, ge("skipAnimationFrameInResizeObserver"));
3235
3238
  return j.useEffect(() => {
3236
3239
  t && (n(t.viewportHeight), r(t.itemHeight));
3237
3240
  }, [t, n, r]), /* @__PURE__ */ w("div", { "data-viewport-type": "element", ref: u, style: En(o), children: e });
@@ -3399,18 +3402,18 @@ const kl = /* @__PURE__ */ we(
3399
3402
  ([
3400
3403
  { increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
3401
3404
  { footerHeight: o, headerHeight: i, scrollBy: s, scrollContainerState: u, scrollTo: a, scrollTop: l, smoothScrollTargetReached: d, viewportHeight: v },
3402
- g,
3403
3405
  h,
3406
+ g,
3404
3407
  { didMount: b, propsReady: y },
3405
3408
  { customScrollParent: c, useWindowScroll: f, windowScrollContainerState: p, windowScrollTo: x, windowViewportRect: C },
3406
3409
  I
3407
3410
  ]) => {
3408
- const E = W(0), m = W(0), S = W(oo), T = W({ height: 0, width: 0 }), k = W({ height: 0, width: 0 }), R = xe(), A = xe(), B = W(0), M = W(null), P = W({ column: 0, row: 0 }), N = xe(), _ = xe(), z = W(!1), Q = W(0), se = W(!0), le = W(!1), ce = W(!1);
3411
+ const E = W(0), m = W(0), S = W(oo), T = W({ height: 0, width: 0 }), k = W({ height: 0, width: 0 }), R = xe(), O = xe(), B = W(0), M = W(null), P = W({ column: 0, row: 0 }), N = xe(), _ = xe(), z = W(!1), Q = W(0), se = W(!0), le = W(!1), ce = W(!1);
3409
3412
  Te(
3410
3413
  G(
3411
3414
  b,
3412
3415
  Se(Q),
3413
- de(([O, L]) => !!L)
3416
+ de(([A, L]) => !!L)
3414
3417
  ),
3415
3418
  () => {
3416
3419
  be(se, !1);
@@ -3418,11 +3421,11 @@ const kl = /* @__PURE__ */ we(
3418
3421
  ), Te(
3419
3422
  G(
3420
3423
  Fe(b, se, k, T, Q, le),
3421
- de(([O, L, K, H, , re]) => O && !L && K.height !== 0 && H.height !== 0 && !re)
3424
+ de(([A, L, K, H, , re]) => A && !L && K.height !== 0 && H.height !== 0 && !re)
3422
3425
  ),
3423
- ([, , , , O]) => {
3426
+ ([, , , , A]) => {
3424
3427
  be(le, !0), Tr(1, () => {
3425
- be(R, O);
3428
+ be(R, A);
3426
3429
  }), lt(G(l), () => {
3427
3430
  be(t, [0, 0]), be(se, !0);
3428
3431
  });
@@ -3430,7 +3433,7 @@ const kl = /* @__PURE__ */ we(
3430
3433
  ), ie(
3431
3434
  G(
3432
3435
  _,
3433
- de((O) => O != null && O.scrollTop > 0),
3436
+ de((A) => A != null && A.scrollTop > 0),
3434
3437
  dt(0)
3435
3438
  ),
3436
3439
  m
@@ -3438,17 +3441,17 @@ const kl = /* @__PURE__ */ we(
3438
3441
  G(
3439
3442
  b,
3440
3443
  Se(_),
3441
- de(([, O]) => O != null)
3444
+ de(([, A]) => A != null)
3442
3445
  ),
3443
- ([, O]) => {
3444
- O && (be(T, O.viewport), be(k, O.item), be(P, O.gap), O.scrollTop > 0 && (be(z, !0), lt(G(l, zt(1)), (L) => {
3446
+ ([, A]) => {
3447
+ A && (be(T, A.viewport), be(k, A.item), be(P, A.gap), A.scrollTop > 0 && (be(z, !0), lt(G(l, zt(1)), (L) => {
3445
3448
  be(z, !1);
3446
- }), be(a, { top: O.scrollTop })));
3449
+ }), be(a, { top: A.scrollTop })));
3447
3450
  }
3448
3451
  ), ie(
3449
3452
  G(
3450
3453
  T,
3451
- Y(({ height: O }) => O)
3454
+ Y(({ height: A }) => A)
3452
3455
  ),
3453
3456
  v
3454
3457
  ), ie(
@@ -3456,14 +3459,14 @@ const kl = /* @__PURE__ */ we(
3456
3459
  Fe(
3457
3460
  ue(T, fn),
3458
3461
  ue(k, fn),
3459
- ue(P, (O, L) => O && O.column === L.column && O.row === L.row),
3462
+ ue(P, (A, L) => A && A.column === L.column && A.row === L.row),
3460
3463
  ue(l)
3461
3464
  ),
3462
- Y(([O, L, K, H]) => ({
3465
+ Y(([A, L, K, H]) => ({
3463
3466
  gap: K,
3464
3467
  item: L,
3465
3468
  scrollTop: H,
3466
- viewport: O
3469
+ viewport: A
3467
3470
  }))
3468
3471
  ),
3469
3472
  N
@@ -3481,10 +3484,10 @@ const kl = /* @__PURE__ */ we(
3481
3484
  ue(se),
3482
3485
  ue(Q)
3483
3486
  ),
3484
- de(([, , , , , , , O]) => !O),
3487
+ de(([, , , , , , , A]) => !A),
3485
3488
  Y(
3486
3489
  ([
3487
- O,
3490
+ A,
3488
3491
  [L, K],
3489
3492
  H,
3490
3493
  re,
@@ -3495,17 +3498,17 @@ const kl = /* @__PURE__ */ we(
3495
3498
  ee,
3496
3499
  fe
3497
3500
  ]) => {
3498
- const { column: ae, row: Ce } = H, { height: ve, width: _e } = re, { width: Ae } = q;
3499
- if (ne === 0 && (O === 0 || Ae === 0))
3501
+ const { column: ae, row: Ce } = H, { height: ve, width: _e } = re, { width: Oe } = q;
3502
+ if (ne === 0 && (A === 0 || Oe === 0))
3500
3503
  return oo;
3501
3504
  if (_e === 0) {
3502
- const Pt = kr(fe, O), An = Pt + Math.max(ne - 1, 0);
3503
- return Cl(lo(Pt, An, J));
3505
+ const Pt = kr(fe, A), On = Pt + Math.max(ne - 1, 0);
3506
+ return Cl(lo(Pt, On, J));
3504
3507
  }
3505
- const Ne = Mi(Ae, _e, ae);
3508
+ const Ne = Mi(Oe, _e, ae);
3506
3509
  let Ge, Ve;
3507
- ee ? L === 0 && K === 0 && ne > 0 ? (Ge = 0, Ve = ne - 1) : (Ge = Ne * yn((L + Ce) / (ve + Ce)), Ve = Ne * io((K + Ce) / (ve + Ce)) - 1, Ve = qn(O - 1, Ut(Ve, Ne - 1)), Ge = qn(Ve, Ut(0, Ge))) : (Ge = 0, Ve = -1);
3508
- const ct = lo(Ge, Ve, J), { bottom: Ze, top: Le } = ao(q, H, re, ct), st = io(O / Ne), nt = st * ve + (st - 1) * Ce - Ze;
3510
+ ee ? L === 0 && K === 0 && ne > 0 ? (Ge = 0, Ve = ne - 1) : (Ge = Ne * yn((L + Ce) / (ve + Ce)), Ve = Ne * io((K + Ce) / (ve + Ce)) - 1, Ve = qn(A - 1, Ut(Ve, Ne - 1)), Ge = qn(Ve, Ut(0, Ge))) : (Ge = 0, Ve = -1);
3511
+ const ct = lo(Ge, Ve, J), { bottom: Ze, top: Le } = ao(q, H, re, ct), st = io(A / Ne), nt = st * ve + (st - 1) * Ce - Ze;
3509
3512
  return { bottom: Ze, itemHeight: ve, items: ct, itemWidth: _e, offsetBottom: nt, offsetTop: Le, top: Le };
3510
3513
  }
3511
3514
  )
@@ -3514,16 +3517,16 @@ const kl = /* @__PURE__ */ we(
3514
3517
  ), ie(
3515
3518
  G(
3516
3519
  M,
3517
- de((O) => O !== null),
3518
- Y((O) => O.length)
3520
+ de((A) => A !== null),
3521
+ Y((A) => A.length)
3519
3522
  ),
3520
3523
  E
3521
3524
  ), ie(
3522
3525
  G(
3523
3526
  Fe(T, k, S, P),
3524
- de(([O, L, { items: K }]) => K.length > 0 && L.height !== 0 && O.height !== 0),
3525
- Y(([O, L, { items: K }, H]) => {
3526
- const { bottom: re, top: q } = ao(O, H, L, K);
3527
+ de(([A, L, { items: K }]) => K.length > 0 && L.height !== 0 && A.height !== 0),
3528
+ Y(([A, L, { items: K }, H]) => {
3529
+ const { bottom: re, top: q } = ao(A, H, L, K);
3527
3530
  return [q, re];
3528
3531
  }),
3529
3532
  Ee(Qt)
@@ -3535,26 +3538,26 @@ const kl = /* @__PURE__ */ we(
3535
3538
  G(
3536
3539
  l,
3537
3540
  Se(pe),
3538
- Y(([O, L]) => L || O !== 0)
3541
+ Y(([A, L]) => L || A !== 0)
3539
3542
  ),
3540
3543
  pe
3541
3544
  );
3542
3545
  const Ie = tt(
3543
3546
  G(
3544
3547
  Fe(S, E),
3545
- de(([{ items: O }]) => O.length > 0),
3548
+ de(([{ items: A }]) => A.length > 0),
3546
3549
  Se(pe),
3547
- de(([[O, L], K]) => {
3548
- const H = O.items[O.items.length - 1].index === L - 1;
3549
- return (K || O.bottom > 0 && O.itemHeight > 0 && O.offsetBottom === 0 && O.items.length === L) && H;
3550
+ de(([[A, L], K]) => {
3551
+ const H = A.items[A.items.length - 1].index === L - 1;
3552
+ return (K || A.bottom > 0 && A.itemHeight > 0 && A.offsetBottom === 0 && A.items.length === L) && H;
3550
3553
  }),
3551
- Y(([[, O]]) => O - 1),
3554
+ Y(([[, A]]) => A - 1),
3552
3555
  Ee()
3553
3556
  )
3554
3557
  ), F = tt(
3555
3558
  G(
3556
3559
  ue(S),
3557
- de(({ items: O }) => O.length > 0 && O[0].index === 0),
3560
+ de(({ items: A }) => A.length > 0 && A[0].index === 0),
3558
3561
  dt(0),
3559
3562
  Ee()
3560
3563
  )
@@ -3562,21 +3565,21 @@ const kl = /* @__PURE__ */ we(
3562
3565
  G(
3563
3566
  ue(S),
3564
3567
  Se(z),
3565
- de(([{ items: O }, L]) => O.length > 0 && !L),
3566
- Y(([{ items: O }]) => ({
3567
- endIndex: O[O.length - 1].index,
3568
- startIndex: O[0].index
3568
+ de(([{ items: A }, L]) => A.length > 0 && !L),
3569
+ Y(([{ items: A }]) => ({
3570
+ endIndex: A[A.length - 1].index,
3571
+ startIndex: A[0].index
3569
3572
  })),
3570
3573
  Ee(li),
3571
3574
  vt(0)
3572
3575
  )
3573
3576
  );
3574
- ie(D, h.scrollSeekRangeChanged), ie(
3577
+ ie(D, g.scrollSeekRangeChanged), ie(
3575
3578
  G(
3576
3579
  R,
3577
3580
  Se(T, k, E, P),
3578
- Y(([O, L, K, H, re]) => {
3579
- const q = fi(O), { align: J, behavior: ne, offset: ee } = q;
3581
+ Y(([A, L, K, H, re]) => {
3582
+ const q = fi(A), { align: J, behavior: ne, offset: ee } = q;
3580
3583
  let fe = q.index;
3581
3584
  fe === "LAST" && (fe = H - 1), fe = Ut(0, fe, qn(H - 1, fe));
3582
3585
  let ae = mr(L, re, K, fe);
@@ -3588,14 +3591,14 @@ const kl = /* @__PURE__ */ we(
3588
3591
  const V = Ue(
3589
3592
  G(
3590
3593
  S,
3591
- Y((O) => O.offsetBottom + O.bottom)
3594
+ Y((A) => A.offsetBottom + A.bottom)
3592
3595
  ),
3593
3596
  0
3594
3597
  );
3595
3598
  return ie(
3596
3599
  G(
3597
3600
  C,
3598
- Y((O) => ({ height: O.visibleHeight, width: O.visibleWidth }))
3601
+ Y((A) => ({ height: A.visibleHeight, width: A.visibleWidth }))
3599
3602
  ),
3600
3603
  T
3601
3604
  ), {
@@ -3613,7 +3616,7 @@ const kl = /* @__PURE__ */ we(
3613
3616
  restoreStateFrom: _,
3614
3617
  scrollBy: s,
3615
3618
  scrollContainerState: u,
3616
- scrollHeight: A,
3619
+ scrollHeight: O,
3617
3620
  scrollTo: a,
3618
3621
  scrollToIndex: R,
3619
3622
  scrollTop: l,
@@ -3624,13 +3627,13 @@ const kl = /* @__PURE__ */ we(
3624
3627
  windowScrollContainerState: p,
3625
3628
  windowScrollTo: x,
3626
3629
  windowViewportRect: C,
3627
- ...h,
3630
+ ...g,
3628
3631
  // output
3629
3632
  gridState: S,
3630
3633
  horizontalDirection: ce,
3631
3634
  initialTopMostItemIndex: Q,
3632
3635
  totalListHeight: V,
3633
- ...g,
3636
+ ...h,
3634
3637
  endReached: Ie,
3635
3638
  propsReady: y,
3636
3639
  rangeChanged: D,
@@ -3657,13 +3660,13 @@ function mr(e, t, n, r) {
3657
3660
  return s > 0 ? s + t.row : s;
3658
3661
  }
3659
3662
  const Rl = /* @__PURE__ */ we(() => {
3660
- const e = W((v) => `Item ${v}`), t = W({}), n = W(null), r = W("virtuoso-grid-item"), o = W("virtuoso-grid-list"), i = W(Er), s = W("div"), u = W(Vt), a = (v, g = null) => Ue(
3663
+ const e = W((v) => `Item ${v}`), t = W({}), n = W(null), r = W("virtuoso-grid-item"), o = W("virtuoso-grid-list"), i = W(Er), s = W("div"), u = W(Vt), a = (v, h = null) => Ue(
3661
3664
  G(
3662
3665
  t,
3663
- Y((h) => h[v]),
3666
+ Y((g) => g[v]),
3664
3667
  Ee()
3665
3668
  ),
3666
- g
3669
+ h
3667
3670
  ), l = W(!1), d = W(!1);
3668
3671
  return ie(ue(d), l), {
3669
3672
  components: t,
@@ -3687,7 +3690,7 @@ const Rl = /* @__PURE__ */ we(() => {
3687
3690
  ([e, t]) => ({ ...e, ...t }),
3688
3691
  ze(kl, Rl)
3689
3692
  ), Ml = /* @__PURE__ */ j.memo(function() {
3690
- const e = Oe("gridState"), t = Oe("listClassName"), n = Oe("itemClassName"), r = Oe("itemContent"), o = Oe("computeItemKey"), i = Oe("isSeeking"), s = it("scrollHeight"), u = Oe("ItemComponent"), a = Oe("ListComponent"), l = Oe("ScrollSeekPlaceholder"), d = Oe("context"), v = it("itemDimensions"), g = it("gap"), h = Oe("log"), b = Oe("stateRestoreInProgress"), y = it("reportReadyState"), c = At(
3693
+ const e = Ae("gridState"), t = Ae("listClassName"), n = Ae("itemClassName"), r = Ae("itemContent"), o = Ae("computeItemKey"), i = Ae("isSeeking"), s = it("scrollHeight"), u = Ae("ItemComponent"), a = Ae("ListComponent"), l = Ae("ScrollSeekPlaceholder"), d = Ae("context"), v = it("itemDimensions"), h = it("gap"), g = Ae("log"), b = Ae("stateRestoreInProgress"), y = it("reportReadyState"), c = Ot(
3691
3694
  j.useMemo(
3692
3695
  () => (f) => {
3693
3696
  const p = f.parentElement.parentElement.scrollHeight;
@@ -3697,12 +3700,12 @@ const Rl = /* @__PURE__ */ we(() => {
3697
3700
  const { height: C, width: I } = x.getBoundingClientRect();
3698
3701
  v({ height: C, width: I });
3699
3702
  }
3700
- g({
3701
- column: co("column-gap", getComputedStyle(f).columnGap, h),
3702
- row: co("row-gap", getComputedStyle(f).rowGap, h)
3703
+ h({
3704
+ column: co("column-gap", getComputedStyle(f).columnGap, g),
3705
+ row: co("row-gap", getComputedStyle(f).rowGap, g)
3703
3706
  });
3704
3707
  },
3705
- [s, v, g, h]
3708
+ [s, v, h, g]
3706
3709
  ),
3707
3710
  !0,
3708
3711
  !1
@@ -3742,7 +3745,7 @@ const Rl = /* @__PURE__ */ we(() => {
3742
3745
  }
3743
3746
  );
3744
3747
  }), El = j.memo(function() {
3745
- const e = Oe("HeaderComponent"), t = it("headerHeight"), n = Oe("headerFooterTag"), r = At(
3748
+ const e = Ae("HeaderComponent"), t = it("headerHeight"), n = Ae("headerFooterTag"), r = Ot(
3746
3749
  j.useMemo(
3747
3750
  () => (i) => {
3748
3751
  t(wt(i, "height"));
@@ -3751,10 +3754,10 @@ const Rl = /* @__PURE__ */ we(() => {
3751
3754
  ),
3752
3755
  !0,
3753
3756
  !1
3754
- ), o = Oe("context");
3757
+ ), o = Ae("context");
3755
3758
  return e ? /* @__PURE__ */ w(n, { ref: r, children: /* @__PURE__ */ w(e, { ...je(e, o) }) }) : null;
3756
3759
  }), zl = j.memo(function() {
3757
- const e = Oe("FooterComponent"), t = it("footerHeight"), n = Oe("headerFooterTag"), r = At(
3760
+ const e = Ae("FooterComponent"), t = it("footerHeight"), n = Ae("headerFooterTag"), r = Ot(
3758
3761
  j.useMemo(
3759
3762
  () => (i) => {
3760
3763
  t(wt(i, "height"));
@@ -3763,10 +3766,10 @@ const Rl = /* @__PURE__ */ we(() => {
3763
3766
  ),
3764
3767
  !0,
3765
3768
  !1
3766
- ), o = Oe("context");
3769
+ ), o = Ae("context");
3767
3770
  return e ? /* @__PURE__ */ w(n, { ref: r, children: /* @__PURE__ */ w(e, { ...je(e, o) }) }) : null;
3768
- }), Al = ({ children: e }) => {
3769
- const t = j.useContext(Ii), n = it("itemDimensions"), r = it("viewportDimensions"), o = At(
3771
+ }), Ol = ({ children: e }) => {
3772
+ const t = j.useContext(Ii), n = it("itemDimensions"), r = it("viewportDimensions"), o = Ot(
3770
3773
  j.useMemo(
3771
3774
  () => (i) => {
3772
3775
  r(i.getBoundingClientRect());
@@ -3779,13 +3782,13 @@ const Rl = /* @__PURE__ */ we(() => {
3779
3782
  return j.useEffect(() => {
3780
3783
  t && (r({ height: t.viewportHeight, width: t.viewportWidth }), n({ height: t.itemHeight, width: t.itemWidth }));
3781
3784
  }, [t, r, n]), /* @__PURE__ */ w("div", { ref: o, style: En(!1), children: e });
3782
- }, Ol = ({ children: e }) => {
3783
- const t = j.useContext(Ii), n = it("windowViewportRect"), r = it("itemDimensions"), o = Oe("customScrollParent"), i = ti(n, o, !1);
3785
+ }, Al = ({ children: e }) => {
3786
+ const t = j.useContext(Ii), n = it("windowViewportRect"), r = it("itemDimensions"), o = Ae("customScrollParent"), i = ti(n, o, !1);
3784
3787
  return j.useEffect(() => {
3785
3788
  t && (r({ height: t.itemHeight, width: t.itemWidth }), n({ offsetTop: 0, visibleHeight: t.viewportHeight, visibleWidth: t.viewportWidth }));
3786
3789
  }, [t, n, r]), /* @__PURE__ */ w("div", { ref: i, style: En(!1), children: e });
3787
3790
  }, Pl = /* @__PURE__ */ j.memo(function({ ...e }) {
3788
- const t = Oe("useWindowScroll"), n = Oe("customScrollParent"), r = n || t ? Gl : Bl, o = n || t ? Ol : Al, i = Oe("context");
3791
+ const t = Ae("useWindowScroll"), n = Ae("customScrollParent"), r = n || t ? Gl : Bl, o = n || t ? Al : Ol, i = Ae("context");
3789
3792
  return /* @__PURE__ */ w(r, { ...e, ...je(r, i), children: /* @__PURE__ */ Z(o, { children: [
3790
3793
  /* @__PURE__ */ w(El, {}),
3791
3794
  /* @__PURE__ */ w(Ml, {}),
@@ -3793,7 +3796,7 @@ const Rl = /* @__PURE__ */ we(() => {
3793
3796
  ] }) });
3794
3797
  }), {
3795
3798
  useEmitter: Ei,
3796
- useEmitterValue: Oe,
3799
+ useEmitterValue: Ae,
3797
3800
  usePublisher: it
3798
3801
  } = /* @__PURE__ */ xi(
3799
3802
  _l,
@@ -3836,7 +3839,7 @@ const Rl = /* @__PURE__ */ we(() => {
3836
3839
  }
3837
3840
  },
3838
3841
  Pl
3839
- ), Bl = /* @__PURE__ */ Ri({ useEmitter: Ei, useEmitterValue: Oe, usePublisher: it }), Gl = /* @__PURE__ */ _i({ useEmitter: Ei, useEmitterValue: Oe, usePublisher: it });
3842
+ ), Bl = /* @__PURE__ */ Ri({ useEmitter: Ei, useEmitterValue: Ae, usePublisher: it }), Gl = /* @__PURE__ */ _i({ useEmitter: Ei, useEmitterValue: Ae, usePublisher: it });
3840
3843
  function co(e, t, n) {
3841
3844
  return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Qe.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
3842
3845
  }
@@ -3853,7 +3856,7 @@ function xn() {
3853
3856
  return e;
3854
3857
  }
3855
3858
  let zi = !1;
3856
- function Ai() {
3859
+ function Oi() {
3857
3860
  return zi;
3858
3861
  }
3859
3862
  function uo(e) {
@@ -3916,14 +3919,14 @@ const Yl = Object.freeze({
3916
3919
  showPointer: void 0,
3917
3920
  pointerStyle: void 0,
3918
3921
  pointerColor: void 0
3919
- }), Oi = j.memo(
3922
+ }), Ai = j.memo(
3920
3923
  function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
3921
- const i = Re((R) => R.setClipIndex), s = Re((R) => R.seek), u = $((R) => R.setCurrentGlobalRunIndex), a = xn(), l = $((R) => R.rangeStartGI), d = $((R) => R.rangeEndGI), v = $((R) => R.setRange), g = l != null && d != null, h = te(
3924
+ const i = Re((R) => R.setClipIndex), s = Re((R) => R.seek), u = $((R) => R.setCurrentGlobalRunIndex), a = xn(), l = $((R) => R.rangeStartGI), d = $((R) => R.rangeEndGI), v = $((R) => R.setRange), h = l != null && d != null, g = te(
3922
3925
  (R) => {
3923
3926
  var Q;
3924
- const A = (Q = R.target) == null ? void 0 : Q.closest("[data-g]");
3925
- if (!A) return;
3926
- const B = Number(A.dataset.g), M = B - r;
3927
+ const O = (Q = R.target) == null ? void 0 : Q.closest("[data-g]");
3928
+ if (!O) return;
3929
+ const B = Number(O.dataset.g), M = B - r;
3927
3930
  if (M < 0 || M >= t.length) return;
3928
3931
  const P = t[M], N = P.text ?? "";
3929
3932
  if (!N.trim() || !/[가-힣a-zA-Z0-9]/.test(N)) return;
@@ -3935,9 +3938,9 @@ const Yl = Object.freeze({
3935
3938
  ), b = oe(null), y = oe(!1), c = oe({ x: 0, y: 0 }), f = te(
3936
3939
  (R) => {
3937
3940
  var P;
3938
- const A = (P = R.target) == null ? void 0 : P.closest("[data-g]");
3939
- if (!A) return;
3940
- const B = Number(A.dataset.g), M = B - r;
3941
+ const O = (P = R.target) == null ? void 0 : P.closest("[data-g]");
3942
+ if (!O) return;
3943
+ const B = Number(O.dataset.g), M = B - r;
3941
3944
  M < 0 || M >= t.length || (y.current = !1, c.current = { x: R.clientX, y: R.clientY }, b.current && (window.clearTimeout(b.current), b.current = null), b.current = window.setTimeout(() => {
3942
3945
  a.getState().status !== "playing" && (v(B, B), y.current = !0, b.current = null);
3943
3946
  }, 800));
@@ -3948,8 +3951,8 @@ const Yl = Object.freeze({
3948
3951
  }, []), x = te(
3949
3952
  (R) => {
3950
3953
  if (!b.current) return;
3951
- const A = R.clientX - c.current.x, B = R.clientY - c.current.y;
3952
- (Math.abs(A) > 5 || Math.abs(B) > 5) && p();
3954
+ const O = R.clientX - c.current.x, B = R.clientY - c.current.y;
3955
+ (Math.abs(O) > 5 || Math.abs(B) > 5) && p();
3953
3956
  },
3954
3957
  [p]
3955
3958
  ), C = te(() => {
@@ -3961,25 +3964,25 @@ const Yl = Object.freeze({
3961
3964
  y.current = !1;
3962
3965
  return;
3963
3966
  }
3964
- if (Ai()) return;
3965
- const A = (M = R.target) == null ? void 0 : M.closest("[data-g]");
3966
- if (!A) return;
3967
- const B = Number(A.dataset.g);
3968
- isNaN(B) || g && l != null && d != null && (m(), R.stopPropagation());
3967
+ if (Oi()) return;
3968
+ const O = (M = R.target) == null ? void 0 : M.closest("[data-g]");
3969
+ if (!O) return;
3970
+ const B = Number(O.dataset.g);
3971
+ isNaN(B) || h && l != null && d != null && (m(), R.stopPropagation());
3969
3972
  },
3970
- [g, l, d, m]
3973
+ [h, l, d, m]
3971
3974
  ), T = o, k = r + t.length - 1;
3972
3975
  return /* @__PURE__ */ w(
3973
3976
  "span",
3974
3977
  {
3975
3978
  onClick: S,
3976
- onDoubleClick: h,
3979
+ onDoubleClick: g,
3977
3980
  onPointerDown: f,
3978
3981
  onPointerMove: x,
3979
3982
  onPointerUp: C,
3980
3983
  onPointerCancel: I,
3981
3984
  onPointerLeave: E,
3982
- children: T.map((R, A) => /* @__PURE__ */ w(
3985
+ children: T.map((R, O) => /* @__PURE__ */ w(
3983
3986
  Jl,
3984
3987
  {
3985
3988
  ns: n,
@@ -3989,7 +3992,7 @@ const Yl = Object.freeze({
3989
3992
  rangeStartGI: l,
3990
3993
  rangeEndGI: d
3991
3994
  },
3992
- `${n}/grp:${A}-${R.startG}`
3995
+ `${n}/grp:${O}-${R.startG}`
3993
3996
  ))
3994
3997
  }
3995
3998
  );
@@ -4028,7 +4031,7 @@ const Yl = Object.freeze({
4028
4031
  pointerColor: c.pointerColor
4029
4032
  } : Yl,
4030
4033
  [a]
4031
- ), d = X(tn(l)), v = n.r0 ?? 0, g = n.len ?? Math.max(0, n.endG - n.startG + 1), h = a && d.showPointer && d.pointerStyle !== "underline", b = a && d.showPointer && d.pointerStyle === "underline", y = h || b ? {
4034
+ ), d = X(tn(l)), v = n.r0 ?? 0, h = n.len ?? Math.max(0, n.endG - n.startG + 1), g = a && d.showPointer && d.pointerStyle !== "underline", b = a && d.showPointer && d.pointerStyle === "underline", y = g || b ? {
4032
4035
  // 배경색(하이라이트)
4033
4036
  "--hl-color": d.pointerColor,
4034
4037
  // 밑줄 색/두께/오프셋
@@ -4036,10 +4039,10 @@ const Yl = Object.freeze({
4036
4039
  "--ul-thickness": "0.3em",
4037
4040
  "--ul-offset": "0.35em"
4038
4041
  } : void 0;
4039
- return /* @__PURE__ */ w(It, { children: Array.from({ length: g }).map((c, f) => {
4042
+ return /* @__PURE__ */ w(It, { children: Array.from({ length: h }).map((c, f) => {
4040
4043
  const x = r[v + f], C = n.startG + f, I = `${t}/run:${C}`, E = !!x.split && C !== o;
4041
4044
  let m = `${ut.runWrap}`;
4042
- return h && (g === 1 ? m += ` ${ut.highlight}` : f === 0 ? m += ` ${ut.highlightleft}` : f + 1 === g ? m += ` ${ut.highlightright}` : m += ` ${ut.highlightcenter}`), b && (g === 1 ? m += ` ${ut.underline}` : f === 0 ? m += ` ${ut.underlineleft}` : f + 1 === g ? m += ` ${ut.underlineright}` : m += ` ${ut.underlinecenter}`), /* @__PURE__ */ Z(j.Fragment, { children: [
4045
+ return g && (h === 1 ? m += ` ${ut.highlight}` : f === 0 ? m += ` ${ut.highlightleft}` : f + 1 === h ? m += ` ${ut.highlightright}` : m += ` ${ut.highlightcenter}`), b && (h === 1 ? m += ` ${ut.underline}` : f === 0 ? m += ` ${ut.underlineleft}` : f + 1 === h ? m += ` ${ut.underlineright}` : m += ` ${ut.underlinecenter}`), /* @__PURE__ */ Z(j.Fragment, { children: [
4043
4046
  /* @__PURE__ */ w("span", { className: m, style: y, children: /* @__PURE__ */ w(
4044
4047
  ea,
4045
4048
  {
@@ -4131,7 +4134,7 @@ function ta({
4131
4134
  }
4132
4135
  ) : null,
4133
4136
  /* @__PURE__ */ w(
4134
- Oi,
4137
+ Ai,
4135
4138
  {
4136
4139
  preGroups: i,
4137
4140
  runs: e.runs,
@@ -4200,7 +4203,7 @@ function mo(e, t = !1) {
4200
4203
  n--, r = String.fromCharCode(97 + n % 26) + r, n = Math.floor(n / 26);
4201
4204
  return t ? r.toUpperCase() : r;
4202
4205
  }
4203
- function Ar(e) {
4206
+ function Or(e) {
4204
4207
  const t = /* @__PURE__ */ new Map();
4205
4208
  return {
4206
4209
  next(n, r) {
@@ -4212,7 +4215,7 @@ function Ar(e) {
4212
4215
  }
4213
4216
  };
4214
4217
  }
4215
- function Or(e, t) {
4218
+ function Ar(e, t) {
4216
4219
  const n = e.list;
4217
4220
  if (!n || n.kind !== "ordered") return;
4218
4221
  const r = t.next(n.numId ?? 0, n.level), o = ra(r, n.format), i = (n.format || "").toLowerCase();
@@ -4266,9 +4269,9 @@ function fa(e, t = 12, n = 1.5, r = 0.5) {
4266
4269
  if (!e) return -1;
4267
4270
  const o = e.getBoundingClientRect(), i = o.top + t;
4268
4271
  let s = -1, u = 1 / 0, a = 1 / 0, l = -1, d = 1 / 0, v = 1 / 0;
4269
- const g = e.querySelectorAll("[data-g]");
4270
- for (let h = 0; h < g.length; h++) {
4271
- const b = g[h];
4272
+ const h = e.querySelectorAll("[data-g]");
4273
+ for (let g = 0; g < h.length; g++) {
4274
+ const b = h[g];
4272
4275
  if (!b || !b.isConnected) continue;
4273
4276
  const y = da(b);
4274
4277
  if (!y || !br(y)) continue;
@@ -4708,8 +4711,8 @@ function Ra(e) {
4708
4711
  var E, m;
4709
4712
  const C = t.querySelector(`[data-g="${p}"]`);
4710
4713
  if (C) {
4711
- const S = C.getBoundingClientRect(), T = t.getBoundingClientRect(), k = T.height > 0 ? T.height / t.clientHeight : 1, R = (S.top - T.top) / k, A = x * t.clientHeight;
4712
- if (Math.abs(R - A) <= 3) return;
4714
+ const S = C.getBoundingClientRect(), T = t.getBoundingClientRect(), k = T.height > 0 ? T.height / t.clientHeight : 1, R = (S.top - T.top) / k, O = x * t.clientHeight;
4715
+ if (Math.abs(R - O) <= 3) return;
4713
4716
  }
4714
4717
  const I = ++s.current;
4715
4718
  i.current = !0;
@@ -4721,8 +4724,8 @@ function Ra(e) {
4721
4724
  return { delta: _ - z, cur: _, tgt: z };
4722
4725
  };
4723
4726
  if (I !== s.current || (await a(p, "auto"), I !== s.current) || (await S(), await S(), await S(), I !== s.current)) return;
4724
- const k = T(), R = t.scrollTop >= t.scrollHeight - t.clientHeight - 1, A = t.scrollTop <= 1;
4725
- if (k && Math.abs(k.delta) > 1 && !(R && k.delta > 0) && !(A && k.delta < 0)) {
4727
+ const k = T(), R = t.scrollTop >= t.scrollHeight - t.clientHeight - 1, O = t.scrollTop <= 1;
4728
+ if (k && Math.abs(k.delta) > 1 && !(R && k.delta > 0) && !(O && k.delta < 0)) {
4726
4729
  const B = t.scrollTop;
4727
4730
  if ((E = n.current) == null || E.scrollBy({ top: k.delta }), await S(), I !== s.current) return;
4728
4731
  for (let M = 0; M < 3; M++) {
@@ -4748,22 +4751,22 @@ const _a = ({
4748
4751
  virtRef: t,
4749
4752
  prefix: n
4750
4753
  }) => {
4751
- const r = $((_) => _.setCurrentGlobalRunIndex), o = $((_) => _.registerSectionScrollApi), i = Re((_) => _.scrollLock), s = Re((_) => _.syncToGI), u = Tt(), a = gt(), l = Qo((_) => _.isPlaybackMode), d = oe(!1), v = oe(null), g = oe(null), h = oe(0), b = oe(null), y = oe(-1), c = te(() => {
4754
+ const r = $((_) => _.setCurrentGlobalRunIndex), o = $((_) => _.registerSectionScrollApi), i = Re((_) => _.scrollLock), s = Re((_) => _.syncToGI), u = Tt(), a = gt(), l = Qo((_) => _.isPlaybackMode), d = oe(!1), v = oe(null), h = oe(null), g = oe(0), b = oe(null), y = oe(-1), c = te(() => {
4752
4755
  if (l || i) return;
4753
4756
  v.current = null;
4754
- const _ = g.current;
4757
+ const _ = h.current;
4755
4758
  if (!_) return;
4756
4759
  const z = fa(_, 5);
4757
4760
  z !== -1 && z !== y.current && (y.current = z, s(z));
4758
4761
  }, [l, i, s]), f = te(
4759
4762
  (_) => {
4760
- g.current = _, v.current == null && (v.current = requestAnimationFrame(c));
4763
+ h.current = _, v.current == null && (v.current = requestAnimationFrame(c));
4761
4764
  },
4762
4765
  [c]
4763
4766
  ), p = te(
4764
4767
  (_) => {
4765
4768
  var se;
4766
- g.current = _, (se = b.current) == null || se.abort();
4769
+ h.current = _, (se = b.current) == null || se.abort();
4767
4770
  const z = new AbortController();
4768
4771
  b.current = z, new Promise((le) => {
4769
4772
  "onscrollend" in _ ? _.addEventListener("scrollend", () => le(), { once: !0 }) : setTimeout(le, 150);
@@ -4780,7 +4783,7 @@ const _a = ({
4780
4783
  let D = 0;
4781
4784
  const V = _.querySelector(`[data-g="${ce}"]`);
4782
4785
  if (V) {
4783
- const O = _.getBoundingClientRect(), L = V.getBoundingClientRect(), K = O.height > 0 ? O.height / _.clientHeight : 1, H = (L.top - O.top) / K / _.clientHeight;
4786
+ const A = _.getBoundingClientRect(), L = V.getBoundingClientRect(), K = A.height > 0 ? A.height / _.clientHeight : 1, H = (L.top - A.top) / K / _.clientHeight;
4784
4787
  D = Math.max(0, Math.min(H, 1));
4785
4788
  }
4786
4789
  u.getState().emit({
@@ -4841,10 +4844,10 @@ const _a = ({
4841
4844
  if (!_) return;
4842
4845
  const z = Bi(_), Q = (z == null ? void 0 : z.first) ?? -1, se = (z == null ? void 0 : z.last) ?? -1;
4843
4846
  T.current = { first: Q, last: se };
4844
- }, [e]), A = oe(!1), B = te(() => {
4847
+ }, [e]), O = oe(!1), B = te(() => {
4845
4848
  const _ = e.current;
4846
- if (!_ || A.current) return;
4847
- A.current = !0;
4849
+ if (!_ || O.current) return;
4850
+ O.current = !0;
4848
4851
  const z = Math.min(
4849
4852
  _.scrollTop + Math.floor(_.clientHeight * 0.6),
4850
4853
  _.scrollHeight - _.clientHeight
@@ -4854,7 +4857,7 @@ const _a = ({
4854
4857
  });
4855
4858
  }, [e]);
4856
4859
  me(() => {
4857
- !k.current && i && (A.current = !1, R()), k.current = i;
4860
+ !k.current && i && (O.current = !1, R()), k.current = i;
4858
4861
  }, [i, R]);
4859
4862
  const M = oe(0), P = oe(0);
4860
4863
  me(() => {
@@ -4871,8 +4874,8 @@ const _a = ({
4871
4874
  if (pe) {
4872
4875
  const F = se.getBoundingClientRect(), D = pe.getBoundingClientRect();
4873
4876
  if (F.height > 0) {
4874
- const V = (D.top - F.top) / F.height, O = (D.bottom - F.top) / F.height;
4875
- if (V >= 0.02 && O <= 0.95) {
4877
+ const V = (D.top - F.top) / F.height, A = (D.bottom - F.top) / F.height;
4878
+ if (V >= 0.02 && A <= 0.95) {
4876
4879
  R();
4877
4880
  return;
4878
4881
  }
@@ -4914,7 +4917,7 @@ const _a = ({
4914
4917
  prefix: n,
4915
4918
  recorderStoreApi: u,
4916
4919
  programmaticScrollRef: x,
4917
- scrollToGISeqRef: h
4920
+ scrollToGISeqRef: g
4918
4921
  });
4919
4922
  }, [e, t, n, u]);
4920
4923
  return me(() => (o(N()), () => o(void 0)), [N, o]), null;
@@ -4925,9 +4928,9 @@ function Ma({
4925
4928
  nsPrefix: n
4926
4929
  }) {
4927
4930
  const r = ye(() => {
4928
- const k = [], R = Ar();
4929
- return t.forEach((A, B) => {
4930
- A.type === "paragraph" && (k[B] = Or(A, R));
4931
+ const k = [], R = Or();
4932
+ return t.forEach((O, B) => {
4933
+ O.type === "paragraph" && (k[B] = Ar(O, R));
4931
4934
  }), k;
4932
4935
  }, [t]), o = $((k) => {
4933
4936
  var R;
@@ -4940,7 +4943,7 @@ function Ma({
4940
4943
  end: 0
4941
4944
  }), l = te(
4942
4945
  (k) => {
4943
- const R = t[k], A = `${n}blk-${R.id}`;
4946
+ const R = t[k], O = `${n}blk-${R.id}`;
4944
4947
  if (R.type === "image") {
4945
4948
  const { src: P, alt: N, width: _, height: z } = R, Q = _ && z ? `${_} / ${z}` : "4 / 3", se = k >= a.current.start && k <= a.current.end, le = u > 80 ? Math.floor((u - 80) * 0.6) : void 0;
4946
4949
  return /* @__PURE__ */ Z("div", { style: { margin: "12px 0", textAlign: "center", width: "100%" }, children: [
@@ -4988,7 +4991,7 @@ function Ma({
4988
4991
  {
4989
4992
  block: R,
4990
4993
  computedMarker: B,
4991
- ns: A,
4994
+ ns: O,
4992
4995
  baseIndex: o[k],
4993
4996
  sectionId: e.section_id,
4994
4997
  preGroups: M
@@ -5000,9 +5003,9 @@ function Ma({
5000
5003
  [t, r, o, n, e, i, u]
5001
5004
  ), d = oe(null), v = te((k) => {
5002
5005
  d.current = k;
5003
- }, []), g = ye(
5006
+ }, []), h = ye(
5004
5007
  () => Dt((k) => {
5005
- const { style: R, children: A, ...B } = k;
5008
+ const { style: R, children: O, ...B } = k;
5006
5009
  return /* @__PURE__ */ w("div", { ...B, style: R, children: /* @__PURE__ */ w(
5007
5010
  "div",
5008
5011
  {
@@ -5015,12 +5018,12 @@ function Ma({
5015
5018
  width: "100%",
5016
5019
  height: "100%"
5017
5020
  },
5018
- children: A
5021
+ children: O
5019
5022
  }
5020
5023
  ) });
5021
5024
  }),
5022
5025
  [s]
5023
- ), h = oe(null), b = ye(() => t.map((k) => k.id), [t]), y = Qo((k) => k.isPlaybackMode), [c, f] = ft(!1);
5026
+ ), g = oe(null), b = ye(() => t.map((k) => k.id), [t]), y = Qo((k) => k.isPlaybackMode), [c, f] = ft(!1);
5024
5027
  me(() => {
5025
5028
  f(y);
5026
5029
  }, [t, y]);
@@ -5041,12 +5044,12 @@ function Ma({
5041
5044
  ] });
5042
5045
  }, [c, e, u]), C = ye(
5043
5046
  () => ({
5044
- Item: g,
5047
+ Item: h,
5045
5048
  Header: () => /* @__PURE__ */ w("div", { style: { height: 40 } }),
5046
5049
  Footer: x,
5047
5050
  Scroller: ua
5048
5051
  }),
5049
- [x, g]
5052
+ [x, h]
5050
5053
  ), I = te((k) => b[k], [b]), E = gt(), [m] = ft(() => E.getState().progress.currentGlobalRunIndex ?? 0), S = ye(() => {
5051
5054
  if (!o.length) return 0;
5052
5055
  const k = o[o.length - 1], R = Math.max(0, Math.min(m, k));
@@ -5063,7 +5066,7 @@ function Ma({
5063
5066
  }
5064
5067
  if (!R) return;
5065
5068
  }
5066
- const A = T.getState().progress.currentGlobalRunIndex, B = T.getState().progress.setSectionLoading, M = A != null && A >= 0 ? A : 0;
5069
+ const O = T.getState().progress.currentGlobalRunIndex, B = T.getState().progress.setSectionLoading, M = O != null && O >= 0 ? O : 0;
5067
5070
  await Pi(R, M), !k && (await xt(), await xt(), await xt(), await xt(), !k && B(!1));
5068
5071
  })(), () => {
5069
5072
  k = !0;
@@ -5072,7 +5075,7 @@ function Ma({
5072
5075
  /* @__PURE__ */ w(
5073
5076
  xl,
5074
5077
  {
5075
- ref: h,
5078
+ ref: g,
5076
5079
  style: {
5077
5080
  height: "100%",
5078
5081
  width: "100%",
@@ -5093,7 +5096,7 @@ function Ma({
5093
5096
  _a,
5094
5097
  {
5095
5098
  scrollContainerRef: d,
5096
- virtRef: h,
5099
+ virtRef: g,
5097
5100
  prefix: o
5098
5101
  }
5099
5102
  )
@@ -5120,7 +5123,7 @@ function za() {
5120
5123
  },
5121
5124
  delay: 250,
5122
5125
  shouldIgnoreTarget: Ea
5123
- }), g = ye(
5126
+ }), h = ye(
5124
5127
  () => ({
5125
5128
  flex: 1,
5126
5129
  fontFamily: n,
@@ -5134,16 +5137,16 @@ function za() {
5134
5137
  textSizeAdjust: "none"
5135
5138
  }),
5136
5139
  [n, i.bg, i.fg, r, o]
5137
- ), h = ye(
5140
+ ), g = ye(
5138
5141
  () => ({ margin: "0 auto", width: "100%", height: "100%" }),
5139
5142
  []
5140
5143
  );
5141
- return /* @__PURE__ */ w("div", { onClick: d, onDoubleClick: v, style: g, children: /* @__PURE__ */ w("div", { style: h, children: /* @__PURE__ */ w(Ma, { section: e, blocks: s, nsPrefix: u }) }) });
5144
+ return /* @__PURE__ */ w("div", { onClick: d, onDoubleClick: v, style: h, children: /* @__PURE__ */ w("div", { style: g, children: /* @__PURE__ */ w(Ma, { section: e, blocks: s, nsPrefix: u }) }) });
5142
5145
  }
5143
- function Aa(e) {
5146
+ function Oa(e) {
5144
5147
  return Ye({ attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM12.293 7.293a1 1 0 011.414 0L15 8.586l1.293-1.293a1 1 0 111.414 1.414L16.414 10l1.293 1.293a1 1 0 01-1.414 1.414L15 11.414l-1.293 1.293a1 1 0 01-1.414-1.414L13.586 10l-1.293-1.293a1 1 0 010-1.414z", clipRule: "evenodd" }, child: [] }] })(e);
5145
5148
  }
5146
- function Oa(e) {
5149
+ function Aa(e) {
5147
5150
  return Ye({ attr: { viewBox: "0 0 20 20", fill: "currentColor", "aria-hidden": "true" }, child: [{ tag: "path", attr: { fillRule: "evenodd", d: "M9.383 3.076A1 1 0 0110 4v12a1 1 0 01-1.707.707L4.586 13H2a1 1 0 01-1-1V8a1 1 0 011-1h2.586l3.707-3.707a1 1 0 011.09-.217zM14.657 2.929a1 1 0 011.414 0A9.972 9.972 0 0119 10a9.972 9.972 0 01-2.929 7.071 1 1 0 01-1.414-1.414A7.971 7.971 0 0017 10c0-2.21-.894-4.208-2.343-5.657a1 1 0 010-1.414zm-2.829 2.828a1 1 0 011.415 0A5.983 5.983 0 0115 10a5.984 5.984 0 01-1.757 4.243 1 1 0 01-1.415-1.415A3.984 3.984 0 0013 10a3.983 3.983 0 00-1.172-2.828 1 1 0 010-1.415z", clipRule: "evenodd" }, child: [] }] })(e);
5148
5151
  }
5149
5152
  function Pa(e) {
@@ -5179,7 +5182,7 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Da = "_compact_1hfub_31",
5179
5182
  label: Ja,
5180
5183
  compactBtn: ec
5181
5184
  }, tc = Dt(function() {
5182
- const t = oe(null), n = $e(Ct), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = Re((S) => S.status), i = Re((S) => S.currentTimeMs), s = Re((S) => S.currentClip), u = Re((S) => S.playbackKind), a = X((S) => S.muteAudio), l = X((S) => S.audioSpeed), d = Re((S) => S.getClipSrc), v = Re((S) => S._onTime), g = Re((S) => S._onEnded), h = Re((S) => S._onError), b = $((S) => S.setCurrentGlobalRunIndex), y = $((S) => S.getSectionScrollApi), c = $((S) => S.snapToReadable), f = $((S) => S.edgeReadable), p = oe(null), x = oe(null), C = oe(!1), I = oe(null);
5185
+ const t = oe(null), n = $e(Ct), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = Re((S) => S.status), i = Re((S) => S.currentTimeMs), s = Re((S) => S.currentClip), u = Re((S) => S.playbackKind), a = X((S) => S.muteAudio), l = X((S) => S.audioSpeed), d = Re((S) => S.getClipSrc), v = Re((S) => S._onTime), h = Re((S) => S._onEnded), g = Re((S) => S._onError), b = $((S) => S.setCurrentGlobalRunIndex), y = $((S) => S.getSectionScrollApi), c = $((S) => S.snapToReadable), f = $((S) => S.edgeReadable), p = oe(null), x = oe(null), C = oe(!1), I = oe(null);
5183
5186
  me(() => {
5184
5187
  u === "real" && (C.current = !0);
5185
5188
  }, [u]);
@@ -5199,36 +5202,36 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Da = "_compact_1hfub_31",
5199
5202
  if (!S) return;
5200
5203
  const T = () => {
5201
5204
  if (S.paused || S.ended) return;
5202
- const A = S.currentTime * 1e3;
5203
- C.current && A === 0 || (A > 0 && (C.current = !1), v(A));
5205
+ const O = S.currentTime * 1e3;
5206
+ C.current && O === 0 || (O > 0 && (C.current = !1), v(O));
5204
5207
  }, k = () => {
5205
5208
  var B, M;
5206
- g();
5207
- const A = f(1);
5208
- if (typeof A == "number" && A >= 0) {
5209
- b(A, "audio");
5209
+ h();
5210
+ const O = f(1);
5211
+ if (typeof O == "number" && O >= 0) {
5212
+ b(O, "audio");
5210
5213
  const P = y();
5211
- (B = P == null ? void 0 : P.ensureVisibleGI) == null || B.call(P, A), (M = P == null ? void 0 : P.stepPage) == null || M.call(P, 1);
5214
+ (B = P == null ? void 0 : P.ensureVisibleGI) == null || B.call(P, O), (M = P == null ? void 0 : P.stepPage) == null || M.call(P, 1);
5212
5215
  }
5213
- }, R = (A) => {
5214
- const B = A.currentTarget;
5216
+ }, R = (O) => {
5217
+ const B = O.currentTarget;
5215
5218
  console.warn("Audio error", {
5216
5219
  networkState: B.networkState,
5217
5220
  readyState: B.readyState
5218
- }), h();
5221
+ }), g();
5219
5222
  };
5220
5223
  return S.addEventListener("timeupdate", T), S.addEventListener("ended", k), S.addEventListener("error", R), () => {
5221
5224
  S.removeEventListener("timeupdate", T), S.removeEventListener("ended", k), S.removeEventListener("error", R);
5222
5225
  };
5223
- }, [v, g, h, f, b, y]), me(() => {
5226
+ }, [v, h, g, f, b, y]), me(() => {
5224
5227
  if (r) return;
5225
5228
  const S = t.current;
5226
5229
  if (!S) return;
5227
5230
  if (!E) {
5228
5231
  try {
5229
5232
  S.pause();
5230
- } catch (A) {
5231
- console.log("pause error", A);
5233
+ } catch (O) {
5234
+ console.log("pause error", O);
5232
5235
  }
5233
5236
  x.current = null;
5234
5237
  return;
@@ -5237,30 +5240,30 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Da = "_compact_1hfub_31",
5237
5240
  if (k) {
5238
5241
  try {
5239
5242
  S.pause();
5240
- } catch (A) {
5241
- console.log("pause error", A);
5243
+ } catch (O) {
5244
+ console.log("pause error", O);
5242
5245
  }
5243
5246
  S.src = E;
5244
5247
  try {
5245
5248
  S.load();
5246
- } catch (A) {
5247
- console.log("load error", A);
5249
+ } catch (O) {
5250
+ console.log("load error", O);
5248
5251
  }
5249
5252
  x.current = E;
5250
5253
  }
5251
5254
  S.muted = !!a, S.volume = 1, S.playbackRate = typeof l == "number" ? l : 1;
5252
5255
  const R = async () => {
5253
- k && await new Promise((A) => {
5256
+ k && await new Promise((O) => {
5254
5257
  let B = !1;
5255
5258
  const M = () => {
5256
- B || (B = !0, S.removeEventListener("loadedmetadata", M), S.removeEventListener("canplay", M), A());
5259
+ B || (B = !0, S.removeEventListener("loadedmetadata", M), S.removeEventListener("canplay", M), O());
5257
5260
  };
5258
5261
  S.addEventListener("loadedmetadata", M), S.addEventListener("canplay", M), S.readyState >= 1 && M();
5259
5262
  });
5260
5263
  try {
5261
5264
  await S.play();
5262
- } catch (A) {
5263
- console.warn("el.play() failed", A);
5265
+ } catch (O) {
5266
+ console.warn("el.play() failed", O);
5264
5267
  }
5265
5268
  };
5266
5269
  if (o === "loading" || o === "playing")
@@ -5268,8 +5271,8 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Da = "_compact_1hfub_31",
5268
5271
  else
5269
5272
  try {
5270
5273
  S.pause();
5271
- } catch (A) {
5272
- console.log("pause error", A);
5274
+ } catch (O) {
5275
+ console.log("pause error", O);
5273
5276
  }
5274
5277
  }, [E, a, o, l, r]), me(() => {
5275
5278
  if (r) return;
@@ -5284,8 +5287,8 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Da = "_compact_1hfub_31",
5284
5287
  const R = p.current / 1e3;
5285
5288
  try {
5286
5289
  S.currentTime = R;
5287
- } catch (A) {
5288
- console.log("currentTime보정 오류", A);
5290
+ } catch (O) {
5291
+ console.log("currentTime보정 오류", O);
5289
5292
  }
5290
5293
  p.current = null;
5291
5294
  }
@@ -5334,23 +5337,23 @@ const rc = "_scrubberWrap_uw0cd_2", oc = "_labels_uw0cd_9", ic = "_index_uw0cd_1
5334
5337
  range: ac
5335
5338
  };
5336
5339
  function cc() {
5337
- const e = X((I) => I.isDev), t = $((I) => I.currentGlobalRunIndex), n = $((I) => I.totalRuns), r = $((I) => I.setCurrentGlobalRunIndex), o = $((I) => I.getSectionScrollApi), i = $((I) => I.giToPercentTotal), s = $((I) => I.percentToGITotal), u = $((I) => I.snapToReadable), a = Re((I) => I.scrollLock), l = Re((I) => I.pause), d = Re((I) => I.play), v = Re((I) => I.syncToGI), [g, h] = ft(() => i(t || 0));
5340
+ const e = X((I) => I.isDev), t = $((I) => I.currentGlobalRunIndex), n = $((I) => I.totalRuns), r = $((I) => I.setCurrentGlobalRunIndex), o = $((I) => I.getSectionScrollApi), i = $((I) => I.giToPercentTotal), s = $((I) => I.percentToGITotal), u = $((I) => I.snapToReadable), a = Re((I) => I.scrollLock), l = Re((I) => I.pause), d = Re((I) => I.play), v = Re((I) => I.syncToGI), [h, g] = ft(() => i(t || 0));
5338
5341
  me(() => {
5339
- h(i(t || 0));
5342
+ g(i(t || 0));
5340
5343
  }, [t, i]);
5341
5344
  const b = oe(!1), y = ye(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), c = te(() => {
5342
5345
  a && (l(), b.current = !0);
5343
5346
  }, [a, l]), f = te((I) => {
5344
- h(Number(I.currentTarget.value));
5347
+ g(Number(I.currentTarget.value));
5345
5348
  }, []), p = te(async () => {
5346
- const I = s(g), E = u(I);
5349
+ const I = s(h), E = u(I);
5347
5350
  l(), r(E, "scrubber-commit"), v(E);
5348
5351
  const m = o();
5349
5352
  m != null && m.ensureVisibleGI && await m.ensureVisibleGI(E), b.current && (b.current = !1, d());
5350
- }, [g, s, u, l, r, v, o, d]), x = ye(
5351
- () => ({ "--pct": `${g}%` }),
5352
- [g]
5353
- ), C = ye(() => Math.round(g), [g]);
5353
+ }, [h, s, u, l, r, v, o, d]), x = ye(
5354
+ () => ({ "--pct": `${h}%` }),
5355
+ [h]
5356
+ ), C = ye(() => Math.round(h), [h]);
5354
5357
  return /* @__PURE__ */ Z("div", { className: Bt.scrubberWrap, children: [
5355
5358
  e && /* @__PURE__ */ w("div", { className: Bt.labels, children: /* @__PURE__ */ Z("span", { className: Bt.index, children: [
5356
5359
  y,
@@ -5366,7 +5369,7 @@ function cc() {
5366
5369
  min: 0,
5367
5370
  max: 100,
5368
5371
  step: 0.5,
5369
- value: g,
5372
+ value: h,
5370
5373
  style: x,
5371
5374
  onMouseDown: c,
5372
5375
  onTouchStart: c,
@@ -5389,7 +5392,7 @@ function cc() {
5389
5392
  ] });
5390
5393
  }
5391
5394
  const uc = j.memo(cc), dc = Dt(function() {
5392
- const t = $e(Ct), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = Re((T) => T.playbackKind), o = Re((T) => T.status), i = Re((T) => T.fake), s = X((T) => T.audioSpeed), u = Re((T) => T.pause), a = $((T) => T.totalRuns), l = $((T) => T.currentGlobalRunIndex), d = $((T) => T.setCurrentGlobalRunIndex), v = $((T) => T.getSectionScrollApi), g = $((T) => T.nextReadableFrom), h = $((T) => T.edgeReadable), b = oe(null), y = oe(null), c = oe(0), f = oe(-1), p = oe(!1), x = !n && r === "fake" && o === "playing", C = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), I = ye(() => {
5395
+ const t = $e(Ct), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = Re((T) => T.playbackKind), o = Re((T) => T.status), i = Re((T) => T.fake), s = X((T) => T.audioSpeed), u = Re((T) => T.pause), a = $((T) => T.totalRuns), l = $((T) => T.currentGlobalRunIndex), d = $((T) => T.setCurrentGlobalRunIndex), v = $((T) => T.getSectionScrollApi), h = $((T) => T.nextReadableFrom), g = $((T) => T.edgeReadable), b = oe(null), y = oe(null), c = oe(0), f = oe(-1), p = oe(!1), x = !n && r === "fake" && o === "playing", C = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), I = ye(() => {
5393
5396
  const T = 200 * s;
5394
5397
  return C / T * 6e4;
5395
5398
  }, [C, s]), E = ye(() => !a || a <= 1 || I <= 0 ? 0 : (a - 1) / I, [a, I]);
@@ -5404,9 +5407,9 @@ const uc = j.memo(cc), dc = Dt(function() {
5404
5407
  m.current = -1;
5405
5408
  return;
5406
5409
  }
5407
- const T = h(1);
5410
+ const T = g(1);
5408
5411
  m.current = T ?? -1;
5409
- }, [h, a]);
5412
+ }, [g, a]);
5410
5413
  const S = te(
5411
5414
  (T) => {
5412
5415
  (async () => {
@@ -5421,10 +5424,10 @@ const uc = j.memo(cc), dc = Dt(function() {
5421
5424
  }
5422
5425
  const k = y.current;
5423
5426
  y.current = T;
5424
- const R = k == null ? 0 : Math.max(0, T - k), A = a - 1;
5425
- c.current = Math.min(A, c.current + E * R);
5426
- const B = Math.floor(c.current), M = v(), P = m.current >= 0 ? m.current : A, N = g(B, 1);
5427
- if (N == null || c.current >= A) {
5427
+ const R = k == null ? 0 : Math.max(0, T - k), O = a - 1;
5428
+ c.current = Math.min(O, c.current + E * R);
5429
+ const B = Math.floor(c.current), M = v(), P = m.current >= 0 ? m.current : O, N = h(B, 1);
5430
+ if (N == null || c.current >= O) {
5428
5431
  if (f.current < P) {
5429
5432
  f.current = P, d(P, "audio"), await ((Q = M == null ? void 0 : M.ensureVisibleGI) == null ? void 0 : Q.call(M, P)), b.current = requestAnimationFrame(S);
5430
5433
  return;
@@ -5440,7 +5443,7 @@ const uc = j.memo(cc), dc = Dt(function() {
5440
5443
  z !== f.current && (f.current = z, d(z, "audio"), z % 5 === 0 && await ((le = M == null ? void 0 : M.ensureVisibleGI) == null ? void 0 : le.call(M, z))), b.current = requestAnimationFrame(S);
5441
5444
  })().catch(console.error);
5442
5445
  },
5443
- [x, a, E, g, d, v, u]
5446
+ [x, a, E, h, d, v, u]
5444
5447
  );
5445
5448
  return me(() => (x ? b.current == null && (b.current = requestAnimationFrame(S)) : (b.current && (cancelAnimationFrame(b.current), b.current = null), y.current = null), () => {
5446
5449
  b.current && (cancelAnimationFrame(b.current), b.current = null);
@@ -5453,14 +5456,14 @@ const uc = j.memo(cc), dc = Dt(function() {
5453
5456
  label: bc,
5454
5457
  iconBtn: vc
5455
5458
  }, Io = 350, Sc = 40, yc = 0.85, xc = Dt(function() {
5456
- const t = X((g) => g.audioSpeed), n = X((g) => g.incAudioSpeed), r = X((g) => g.decAudioSpeed), o = oe(null), i = oe(Io), s = oe(null), u = te(
5457
- (g) => {
5458
- const h = t;
5459
- if (g === "inc") {
5460
- if (h >= 2) return !1;
5459
+ const t = X((h) => h.audioSpeed), n = X((h) => h.incAudioSpeed), r = X((h) => h.decAudioSpeed), o = oe(null), i = oe(Io), s = oe(null), u = te(
5460
+ (h) => {
5461
+ const g = t;
5462
+ if (h === "inc") {
5463
+ if (g >= 2) return !1;
5461
5464
  n();
5462
5465
  } else {
5463
- if (h <= 0.3) return !1;
5466
+ if (g <= 0.3) return !1;
5464
5467
  r();
5465
5468
  }
5466
5469
  return !0;
@@ -5473,9 +5476,9 @@ const uc = j.memo(cc), dc = Dt(function() {
5473
5476
  u(s.current) ? l() : a();
5474
5477
  }, i.current));
5475
5478
  }, [u, a]), d = te(
5476
- (g) => {
5479
+ (h) => {
5477
5480
  if (s.current) return;
5478
- s.current = g, i.current = Io, u(g) && l();
5481
+ s.current = h, i.current = Io, u(h) && l();
5479
5482
  const b = () => a();
5480
5483
  window.addEventListener("mouseup", b, { once: !0 }), window.addEventListener("touchend", b, { once: !0 });
5481
5484
  },
@@ -5496,8 +5499,8 @@ const uc = j.memo(cc), dc = Dt(function() {
5496
5499
  type: "button",
5497
5500
  title: "속도 느리게",
5498
5501
  onMouseDown: () => d("dec"),
5499
- onTouchStart: (g) => {
5500
- g.preventDefault(), d("dec");
5502
+ onTouchStart: (h) => {
5503
+ h.preventDefault(), d("dec");
5501
5504
  },
5502
5505
  onMouseUp: a,
5503
5506
  children: /* @__PURE__ */ w("img", { src: pc, alt: "느리게" })
@@ -5511,8 +5514,8 @@ const uc = j.memo(cc), dc = Dt(function() {
5511
5514
  type: "button",
5512
5515
  title: "속도 빠르게",
5513
5516
  onMouseDown: () => d("inc"),
5514
- onTouchStart: (g) => {
5515
- g.preventDefault(), d("inc");
5517
+ onTouchStart: (h) => {
5518
+ h.preventDefault(), d("inc");
5516
5519
  },
5517
5520
  onMouseUp: a,
5518
5521
  children: /* @__PURE__ */ w("img", { src: gc, alt: "빠르게" })
@@ -5531,7 +5534,7 @@ function Tc(e) {
5531
5534
  return Ye({ attr: { viewBox: "0 0 256 256", fill: "currentColor" }, child: [{ tag: "path", attr: { d: "M221.66,133.66l-80,80A8,8,0,0,1,128,208V147.31L61.66,213.66A8,8,0,0,1,48,208V48a8,8,0,0,1,13.66-5.66L128,108.69V48a8,8,0,0,1,13.66-5.66l80,80A8,8,0,0,1,221.66,133.66Z" }, child: [] }] })(e);
5532
5535
  }
5533
5536
  function Co({ direction: e }) {
5534
- const t = $((f) => f.currentGlobalRunIndex), n = $((f) => f.totalRuns), r = $((f) => f.hasReadableInDir), o = $((f) => f.computeStepTarget), i = $((f) => f.edgeReadable), s = $((f) => f.snapToReadable), u = $((f) => f.setCurrentGlobalRunIndex), a = Re((f) => f.syncToGI), l = $((f) => f.getSectionScrollApi), d = gt(), v = $((f) => f.pageIndex), g = $((f) => f.totalPages), h = g > 1 && v >= g - 1, b = te(
5537
+ const t = $((f) => f.currentGlobalRunIndex), n = $((f) => f.totalRuns), r = $((f) => f.hasReadableInDir), o = $((f) => f.computeStepTarget), i = $((f) => f.edgeReadable), s = $((f) => f.snapToReadable), u = $((f) => f.setCurrentGlobalRunIndex), a = Re((f) => f.syncToGI), l = $((f) => f.getSectionScrollApi), d = gt(), v = $((f) => f.pageIndex), h = $((f) => f.totalPages), g = h > 1 && v >= h - 1, b = te(
5535
5538
  async (f) => {
5536
5539
  var S, T, k, R;
5537
5540
  const { progress: p } = d.getState(), x = p.pageIndex, C = p.totalPages, I = C > 1 && x >= C - 1, E = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1)));
@@ -5540,8 +5543,8 @@ function Co({ direction: e }) {
5540
5543
  return;
5541
5544
  }
5542
5545
  if (f === 1) {
5543
- const A = s(E), B = i(1);
5544
- if (B != null && A >= B) {
5546
+ const O = s(E), B = i(1);
5547
+ if (B != null && O >= B) {
5545
5548
  (T = (S = l()) == null ? void 0 : S.stepPage) == null || T.call(S, 1);
5546
5549
  return;
5547
5550
  }
@@ -5561,9 +5564,9 @@ function Co({ direction: e }) {
5561
5564
  d
5562
5565
  ]
5563
5566
  ), y = ye(() => {
5564
- const f = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), p = s(f), x = i(1), C = i(-1), I = g > 0, E = x != null && p >= x, m = C != null && p <= C, S = h || !I && E || !n || !r(f, 1), T = m || !n || !r(f, -1);
5567
+ const f = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), p = s(f), x = i(1), C = i(-1), I = h > 0, E = x != null && p >= x, m = C != null && p <= C, S = g || !I && E || !n || !r(f, 1), T = m || !n || !r(f, -1);
5565
5568
  return e === "left" ? T : S;
5566
- }, [e, n, g, t, r, h, s, i]), c = te(() => {
5569
+ }, [e, n, h, t, r, g, s, i]), c = te(() => {
5567
5570
  b(e === "left" ? -1 : 1);
5568
5571
  }, [e, b]);
5569
5572
  return /* @__PURE__ */ w(
@@ -5616,7 +5619,7 @@ function zc() {
5616
5619
  const e = X((z) => z.showOverlays), t = $((z) => z.section), n = !!t.ast.isAddedSplit, r = !!((_ = t.audios) != null && _.length), o = $((z) => z.pageIndex), i = $((z) => z.totalPages), s = i > 1 && o >= i - 1, u = $((z) => z.currentGlobalRunIndex), a = $((z) => z.snapToReadable), l = $((z) => z.edgeReadable), d = (() => {
5617
5620
  const z = l(1);
5618
5621
  return z == null ? !1 : a(u ?? 0) >= z;
5619
- })(), v = s || d, g = $((z) => z.canTracking), h = $((z) => z.canToggleShowGaze), b = $((z) => z.showGaze), y = $((z) => z.onToggleShowGaze), c = X((z) => z.muteAudio), f = X((z) => z.showPointer), p = X((z) => z.showSplit), x = X((z) => z.toggleMuteAudio), C = X((z) => z.toggleShowPointer), I = X((z) => z.toggleShowSplit), E = X((z) => z.overlayCompactMode), m = X((z) => z.toggleOverlayCompactMode), S = xn(), T = gt();
5622
+ })(), v = s || d, h = $((z) => z.canTracking), g = $((z) => z.canToggleShowGaze), b = $((z) => z.showGaze), y = $((z) => z.onToggleShowGaze), c = X((z) => z.muteAudio), f = X((z) => z.showPointer), p = X((z) => z.showSplit), x = X((z) => z.toggleMuteAudio), C = X((z) => z.toggleShowPointer), I = X((z) => z.toggleShowSplit), E = X((z) => z.overlayCompactMode), m = X((z) => z.toggleOverlayCompactMode), S = xn(), T = gt();
5620
5623
  me(() => {
5621
5624
  const z = S.getState(), { syncToGI: Q, useFake: se, useReal: le } = z, ce = z.playbackKind, pe = T.getState().progress.currentGlobalRunIndex ?? 0;
5622
5625
  if (!r) {
@@ -5625,10 +5628,10 @@ function zc() {
5625
5628
  }
5626
5629
  c ? ce !== "fake" && se() : ce !== "real" && (Q(pe), le());
5627
5630
  }, [r, c, T, S]);
5628
- const k = Re((z) => z.play), R = Re((z) => z.pause), A = Re((z) => z.status), B = xn(), M = gt(), P = te(
5631
+ const k = Re((z) => z.play), R = Re((z) => z.pause), O = Re((z) => z.status), B = xn(), M = gt(), P = te(
5629
5632
  (z) => {
5630
5633
  var pe, Ie, F;
5631
- if (z.stopPropagation(), A === "playing" || A === "loading") {
5634
+ if (z.stopPropagation(), O === "playing" || O === "loading") {
5632
5635
  R();
5633
5636
  return;
5634
5637
  }
@@ -5639,11 +5642,11 @@ function zc() {
5639
5642
  }
5640
5643
  k();
5641
5644
  },
5642
- [A, k, R, M]
5645
+ [O, k, R, M]
5643
5646
  ), N = te(
5644
5647
  async (z) => {
5645
5648
  var H, re;
5646
- if (z.stopPropagation(), A === "playing" || A === "loading") {
5649
+ if (z.stopPropagation(), O === "playing" || O === "loading") {
5647
5650
  R();
5648
5651
  return;
5649
5652
  }
@@ -5653,14 +5656,14 @@ function zc() {
5653
5656
  edgeReadable: ce,
5654
5657
  setCurrentGlobalRunIndex: pe,
5655
5658
  getSectionScrollApi: Ie
5656
- } = Q, F = B.getState(), D = F.currentClip, V = Ie == null ? void 0 : Ie(), O = typeof se == "number" ? se : 0, L = typeof le == "function" ? le(O) : O, K = typeof ce == "function" ? ce(1) : null;
5659
+ } = Q, F = B.getState(), D = F.currentClip, V = Ie == null ? void 0 : Ie(), A = typeof se == "number" ? se : 0, L = typeof le == "function" ? le(A) : A, K = typeof ce == "function" ? ce(1) : null;
5657
5660
  if (K != null && L >= K) {
5658
5661
  pe == null || pe(K, "audio"), (H = V == null ? void 0 : V.stepPage) == null || H.call(V, 1);
5659
5662
  return;
5660
5663
  }
5661
5664
  pe == null || pe(L, "audio"), await ((re = V == null ? void 0 : V.ensureVisibleGI) == null ? void 0 : re.call(V, L)), F.syncToGI(L), k(D);
5662
5665
  },
5663
- [A, R, k, B, M]
5666
+ [O, R, k, B, M]
5664
5667
  );
5665
5668
  return /* @__PURE__ */ Z(
5666
5669
  "div",
@@ -5695,10 +5698,10 @@ function zc() {
5695
5698
  _c,
5696
5699
  {
5697
5700
  size: 34,
5698
- isPlaying: A === "playing",
5701
+ isPlaying: O === "playing",
5699
5702
  disabled: v,
5700
5703
  onClick: c ? N : P,
5701
- title: A === "playing" ? "일시정지" : "재생"
5704
+ title: O === "playing" ? "일시정지" : "재생"
5702
5705
  }
5703
5706
  ),
5704
5707
  /* @__PURE__ */ w(Co, { direction: "right" })
@@ -5717,7 +5720,7 @@ function zc() {
5717
5720
  className: `${Me.btn} ${c ? "" : Me.btnActive}`,
5718
5721
  title: "오디오북 음소거 전환",
5719
5722
  children: [
5720
- c ? /* @__PURE__ */ w(Aa, { size: 18 }) : /* @__PURE__ */ w(Oa, { size: 18 }),
5723
+ c ? /* @__PURE__ */ w(Oa, { size: 18 }) : /* @__PURE__ */ w(Aa, { size: 18 }),
5721
5724
  /* @__PURE__ */ w("span", { className: Me.label, children: "오디오북" })
5722
5725
  ]
5723
5726
  }
@@ -5760,8 +5763,8 @@ function zc() {
5760
5763
  onClick: (z) => {
5761
5764
  z.stopPropagation(), y == null || y();
5762
5765
  },
5763
- disabled: !g || !h,
5764
- className: `${Me.btn} ${g && b ? Me.btnActive : ""} ${g ? "" : Me.btnForbidden}`,
5766
+ disabled: !h || !g,
5767
+ className: `${Me.btn} ${h && b ? Me.btnActive : ""} ${h ? "" : Me.btnForbidden}`,
5765
5768
  title: "시선 표시",
5766
5769
  children: [
5767
5770
  /* @__PURE__ */ w(La, { size: 18 }),
@@ -5780,8 +5783,8 @@ function zc() {
5780
5783
  }
5781
5784
  );
5782
5785
  }
5783
- const Ac = j.memo(zc);
5784
- function Oc(e) {
5786
+ const Oc = j.memo(zc);
5787
+ function Ac(e) {
5785
5788
  return Ye({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { fill: "none", strokeLinecap: "round", strokeLinejoin: "round", strokeWidth: "32", d: "M262.29 192.31a64 64 0 1 0 57.4 57.4 64.13 64.13 0 0 0-57.4-57.4zM416.39 256a154.34 154.34 0 0 1-1.53 20.79l45.21 35.46a10.81 10.81 0 0 1 2.45 13.75l-42.77 74a10.81 10.81 0 0 1-13.14 4.59l-44.9-18.08a16.11 16.11 0 0 0-15.17 1.75A164.48 164.48 0 0 1 325 400.8a15.94 15.94 0 0 0-8.82 12.14l-6.73 47.89a11.08 11.08 0 0 1-10.68 9.17h-85.54a11.11 11.11 0 0 1-10.69-8.87l-6.72-47.82a16.07 16.07 0 0 0-9-12.22 155.3 155.3 0 0 1-21.46-12.57 16 16 0 0 0-15.11-1.71l-44.89 18.07a10.81 10.81 0 0 1-13.14-4.58l-42.77-74a10.8 10.8 0 0 1 2.45-13.75l38.21-30a16.05 16.05 0 0 0 6-14.08c-.36-4.17-.58-8.33-.58-12.5s.21-8.27.58-12.35a16 16 0 0 0-6.07-13.94l-38.19-30A10.81 10.81 0 0 1 49.48 186l42.77-74a10.81 10.81 0 0 1 13.14-4.59l44.9 18.08a16.11 16.11 0 0 0 15.17-1.75A164.48 164.48 0 0 1 187 111.2a15.94 15.94 0 0 0 8.82-12.14l6.73-47.89A11.08 11.08 0 0 1 213.23 42h85.54a11.11 11.11 0 0 1 10.69 8.87l6.72 47.82a16.07 16.07 0 0 0 9 12.22 155.3 155.3 0 0 1 21.46 12.57 16 16 0 0 0 15.11 1.71l44.89-18.07a10.81 10.81 0 0 1 13.14 4.58l42.77 74a10.8 10.8 0 0 1-2.45 13.75l-38.21 30a16.05 16.05 0 0 0-6.05 14.08c.33 4.14.55 8.3.55 12.47z" }, child: [] }] })(e);
5786
5789
  }
5787
5790
  const Pc = "_host_gafql_3", Bc = "_topbar_gafql_11", Gc = "_visible_gafql_32", Lc = "_backBtn_gafql_37", Hc = "_title_gafql_58", Nc = "_calibrationBtn_gafql_67", Fc = "_disabled_gafql_87", Dc = "_settingsBtn_gafql_95", yt = {
@@ -5795,9 +5798,9 @@ const Pc = "_host_gafql_3", Bc = "_topbar_gafql_11", Gc = "_visible_gafql_32", L
5795
5798
  settingsBtn: Dc
5796
5799
  };
5797
5800
  function Wc() {
5798
- const e = X((h) => h.showOverlays), t = X((h) => h.overlayCompactMode), n = $((h) => h.onViewerClose), o = $((h) => h.section).ast.title, i = $((h) => h.canTracking), s = $((h) => h.handleAskCalibration), u = Re((h) => h.status === "playing"), a = i && !u, l = X((h) => h.setSettingsOpen), d = X((h) => h.setShowOverlays), v = te(() => {
5801
+ const e = X((g) => g.showOverlays), t = X((g) => g.overlayCompactMode), n = $((g) => g.onViewerClose), o = $((g) => g.section).ast.title, i = $((g) => g.canTracking), s = $((g) => g.handleAskCalibration), u = Re((g) => g.status === "playing"), a = i && !u, l = X((g) => g.setSettingsOpen), d = X((g) => g.setShowOverlays), v = te(() => {
5799
5802
  n == null || n();
5800
- }, [n]), g = te(() => {
5803
+ }, [n]), h = te(() => {
5801
5804
  l(!0), d(!1);
5802
5805
  }, [l, d]);
5803
5806
  return /* @__PURE__ */ w("div", { className: yt.host, children: /* @__PURE__ */ Z("div", { className: `${yt.topbar} ${e && !t ? yt.visible : ""}`, children: [
@@ -5820,9 +5823,9 @@ function Wc() {
5820
5823
  {
5821
5824
  type: "button",
5822
5825
  className: yt.settingsBtn,
5823
- onClick: g,
5826
+ onClick: h,
5824
5827
  "aria-label": "뷰어 설정",
5825
- children: /* @__PURE__ */ w(Oc, { size: 28 })
5828
+ children: /* @__PURE__ */ w(Ac, { size: 28 })
5826
5829
  }
5827
5830
  )
5828
5831
  ] }) });
@@ -5846,7 +5849,7 @@ const Vc = j.memo(Wc), $c = "_wrap_62su0_7", qc = "_wrapHidden_62su0_29", jc = "
5846
5849
  inlineFlex: iu
5847
5850
  };
5848
5851
  function su({ visible: e }) {
5849
- const t = X((m) => m.mode), n = X((m) => m.setMode), r = X((m) => m.theme), o = X((m) => m.setTheme), i = X((m) => m.fontFamily), s = X((m) => m.setFontFamily), u = X((m) => m.resetToDefaults), a = X((m) => m.getFontLevel()), l = X((m) => m.getLineLevel()), d = X((m) => m.getMarginLevel()), v = X((m) => m.setFontLevel), g = X((m) => m.setLineLevel), h = X((m) => m.setMarginLevel), b = X((m) => m.pointerStyle), y = X((m) => m.setPointerStyle), c = X((m) => m.pointerColor), f = X((m) => m.setPointerColor), p = X((m) => m.breakMarks), x = X((m) => m.toggleBreakMark), C = X((m) => m.getBreakGapLevel()), I = X((m) => m.setBreakGapLevel), E = `${Be.wrap} ${e ? Be.wrapVisible : Be.wrapHidden}`;
5852
+ const t = X((m) => m.mode), n = X((m) => m.setMode), r = X((m) => m.theme), o = X((m) => m.setTheme), i = X((m) => m.fontFamily), s = X((m) => m.setFontFamily), u = X((m) => m.resetToDefaults), a = X((m) => m.getFontLevel()), l = X((m) => m.getLineLevel()), d = X((m) => m.getMarginLevel()), v = X((m) => m.setFontLevel), h = X((m) => m.setLineLevel), g = X((m) => m.setMarginLevel), b = X((m) => m.pointerStyle), y = X((m) => m.setPointerStyle), c = X((m) => m.pointerColor), f = X((m) => m.setPointerColor), p = X((m) => m.breakMarks), x = X((m) => m.toggleBreakMark), C = X((m) => m.getBreakGapLevel()), I = X((m) => m.setBreakGapLevel), E = `${Be.wrap} ${e ? Be.wrapVisible : Be.wrapHidden}`;
5850
5853
  return /* @__PURE__ */ Z("div", { className: E, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
5851
5854
  /* @__PURE__ */ Z("div", { className: Be.scrollArea, children: [
5852
5855
  /* @__PURE__ */ w(qt, { label: "열람방식", children: /* @__PURE__ */ Z("div", { className: Be.inlineFlex, children: [
@@ -5897,8 +5900,8 @@ function su({ visible: e }) {
5897
5900
  level: l,
5898
5901
  min: 1,
5899
5902
  max: 7,
5900
- onDec: () => g(Math.max(1, l - 1)),
5901
- onInc: () => g(Math.min(7, l + 1))
5903
+ onDec: () => h(Math.max(1, l - 1)),
5904
+ onInc: () => h(Math.min(7, l + 1))
5902
5905
  }
5903
5906
  ),
5904
5907
  /* @__PURE__ */ w(
@@ -5908,8 +5911,8 @@ function su({ visible: e }) {
5908
5911
  level: d,
5909
5912
  min: 1,
5910
5913
  max: 5,
5911
- onDec: () => h(Math.max(1, d - 1)),
5912
- onInc: () => h(Math.min(5, d + 1))
5914
+ onDec: () => g(Math.max(1, d - 1)),
5915
+ onInc: () => g(Math.min(5, d + 1))
5913
5916
  }
5914
5917
  ),
5915
5918
  /* @__PURE__ */ w(qt, { label: "포인터", children: /* @__PURE__ */ Z("div", { className: Be.inlineFlex, children: [
@@ -6024,7 +6027,7 @@ const lu = j.memo(function() {
6024
6027
  },
6025
6028
  children: [
6026
6029
  /* @__PURE__ */ w(Vc, {}),
6027
- /* @__PURE__ */ w(Ac, {}),
6030
+ /* @__PURE__ */ w(Oc, {}),
6028
6031
  /* @__PURE__ */ w("div", { style: { pointerEvents: "auto" }, children: /* @__PURE__ */ w(su, { visible: !t && n }) })
6029
6032
  ]
6030
6033
  }
@@ -6036,11 +6039,11 @@ const lu = j.memo(function() {
6036
6039
  if (u) {
6037
6040
  const d = (a == null ? void 0 : a.equalityFn) || Object.is;
6038
6041
  let v = s(r.getState());
6039
- l = (g) => {
6040
- const h = s(g);
6041
- if (!d(v, h)) {
6042
+ l = (h) => {
6043
+ const g = s(h);
6044
+ if (!d(v, g)) {
6042
6045
  const b = v;
6043
- u(v = h, b);
6046
+ u(v = g, b);
6044
6047
  }
6045
6048
  }, a != null && a.fireImmediately && u(v, v);
6046
6049
  }
@@ -6068,18 +6071,18 @@ function fu(e) {
6068
6071
  function pu(e) {
6069
6072
  const t = e == null ? void 0 : e.recorderStore;
6070
6073
  let n = e == null ? void 0 : e.map, r = e == null ? void 0 : e.initialIndex;
6071
- const o = (h) => {
6074
+ const o = (g) => {
6072
6075
  if (!n) return null;
6073
6076
  const { g2ct: b } = n;
6074
6077
  if (!b) return null;
6075
- const y = b[h];
6078
+ const y = b[g];
6076
6079
  if (y) return { clip: y.clip, t: y.t };
6077
- for (let c = 1; c <= 100 && h - c >= 0; c++) {
6078
- const f = b[h - c];
6080
+ for (let c = 1; c <= 100 && g - c >= 0; c++) {
6081
+ const f = b[g - c];
6079
6082
  if (f) return { clip: f.clip, t: f.t };
6080
6083
  }
6081
6084
  for (let c = 1; c <= 100; c++) {
6082
- const f = b[h + c];
6085
+ const f = b[g + c];
6083
6086
  if (f) return { clip: f.clip, t: f.t };
6084
6087
  }
6085
6088
  return null;
@@ -6087,12 +6090,12 @@ function pu(e) {
6087
6090
  let s = 0, u = 0;
6088
6091
  const a = Math.max(1, fu(e.section) || 150);
6089
6092
  if (typeof (e == null ? void 0 : e.initialIndex) == "number" && n) {
6090
- const h = o(e.initialIndex);
6091
- h && (s = h.clip, u = h.t, r = void 0);
6093
+ const g = o(e.initialIndex);
6094
+ g && (s = g.clip, u = g.t, r = void 0);
6092
6095
  }
6093
- const l = i.length > 0, d = l ? "paused" : "idle", v = l ? "real" : "fake", g = l ? null : { totalWords: a };
6096
+ const l = i.length > 0, d = l ? "paused" : "idle", v = l ? "real" : "fake", h = l ? null : { totalWords: a };
6094
6097
  return nn(
6095
- cu((h, b) => ({
6098
+ cu((g, b) => ({
6096
6099
  // 원본/포인터
6097
6100
  clips: i,
6098
6101
  currentClip: Math.max(0, Math.min(s, Math.max(0, i.length - 1))),
@@ -6102,9 +6105,9 @@ function pu(e) {
6102
6105
  scrollLock: !1,
6103
6106
  // 엔진/설정
6104
6107
  playbackKind: v,
6105
- fake: g,
6108
+ fake: h,
6106
6109
  // 엔진 모드 전환
6107
- useFake: () => h((y) => ({
6110
+ useFake: () => g((y) => ({
6108
6111
  playbackKind: "fake",
6109
6112
  // 이전에 fake.totalWords가 있으면 유지, 없으면 선계산값 사용
6110
6113
  // fake: s.fake ?? { totalWords: precomputedWords },
@@ -6112,7 +6115,7 @@ function pu(e) {
6112
6115
  // 잠금은 재생 상태에 맞춤(재생 중이면 유지, 아니면 해제)
6113
6116
  scrollLock: y.status === "playing"
6114
6117
  })),
6115
- useReal: () => h((y) => ({
6118
+ useReal: () => g((y) => ({
6116
6119
  playbackKind: "real",
6117
6120
  fake: { totalWords: a },
6118
6121
  scrollLock: y.status === "playing"
@@ -6121,13 +6124,13 @@ function pu(e) {
6121
6124
  injectMap: (y) => {
6122
6125
  if (n = y, typeof r == "number") {
6123
6126
  const c = o(r);
6124
- c && h((f) => ({
6127
+ c && g((f) => ({
6125
6128
  currentClip: Math.max(0, Math.min(c.clip, Math.max(0, f.clips.length - 1))),
6126
6129
  currentTimeMs: Math.max(0, c.t)
6127
6130
  })), r = void 0;
6128
6131
  }
6129
6132
  },
6130
- setClipAndMs: (y, c) => h((f) => {
6133
+ setClipAndMs: (y, c) => g((f) => {
6131
6134
  const p = Math.max(0, f.clips.length - 1);
6132
6135
  return {
6133
6136
  currentClip: Math.max(0, Math.min(y, p)),
@@ -6139,7 +6142,7 @@ function pu(e) {
6139
6142
  };
6140
6143
  }),
6141
6144
  // 섹션 교체
6142
- setClips: (y) => h((c) => {
6145
+ setClips: (y) => g((c) => {
6143
6146
  const f = Array.isArray(y) ? y : [], p = f.length > 0;
6144
6147
  return {
6145
6148
  clips: f,
@@ -6151,7 +6154,7 @@ function pu(e) {
6151
6154
  scrollLock: !1
6152
6155
  };
6153
6156
  }),
6154
- clear: () => h((y) => ({
6157
+ clear: () => g((y) => ({
6155
6158
  clips: [],
6156
6159
  currentClip: 0,
6157
6160
  currentTimeMs: 0,
@@ -6165,7 +6168,7 @@ function pu(e) {
6165
6168
  t == null || t.getState().emit({
6166
6169
  type: "audio_control",
6167
6170
  payload: { action: "play" }
6168
- }), h((f) => {
6171
+ }), g((f) => {
6169
6172
  if (f.playbackKind === "fake")
6170
6173
  return {
6171
6174
  status: "playing",
@@ -6184,14 +6187,14 @@ function pu(e) {
6184
6187
  t == null || t.getState().emit({
6185
6188
  type: "audio_control",
6186
6189
  payload: { action: "pause" }
6187
- }), h({ status: "paused", scrollLock: !1 });
6190
+ }), g({ status: "paused", scrollLock: !1 });
6188
6191
  },
6189
- seek: (y) => h((c) => ({
6192
+ seek: (y) => g((c) => ({
6190
6193
  currentTimeMs: Math.max(0, y),
6191
6194
  status: c.status
6192
6195
  })),
6193
- stop: () => h({ status: "idle", currentTimeMs: 0, scrollLock: !1 }),
6194
- nextClip: () => h((y) => {
6196
+ stop: () => g({ status: "idle", currentTimeMs: 0, scrollLock: !1 }),
6197
+ nextClip: () => g((y) => {
6195
6198
  if (y.playbackKind === "fake") return y;
6196
6199
  const c = Math.max(0, y.clips.length - 1);
6197
6200
  return {
@@ -6201,13 +6204,13 @@ function pu(e) {
6201
6204
  scrollLock: !0
6202
6205
  };
6203
6206
  }),
6204
- prevClip: () => h((y) => y.playbackKind === "fake" ? y : {
6207
+ prevClip: () => g((y) => y.playbackKind === "fake" ? y : {
6205
6208
  currentClip: Math.max(0, y.currentClip - 1),
6206
6209
  currentTimeMs: 0,
6207
6210
  status: "loading",
6208
6211
  scrollLock: !0
6209
6212
  }),
6210
- setClipIndex: (y) => h((c) => c.playbackKind === "fake" || y < 0 || y >= c.clips.length ? c : { currentClip: y, currentTimeMs: 0 }),
6213
+ setClipIndex: (y) => g((c) => c.playbackKind === "fake" || y < 0 || y >= c.clips.length ? c : { currentClip: y, currentTimeMs: 0 }),
6211
6214
  // 조회
6212
6215
  getClipSrc: (y) => {
6213
6216
  const c = b();
@@ -6262,8 +6265,8 @@ function pu(e) {
6262
6265
  c && b().setClipAndMs(c.clipIndex, c.timeMs);
6263
6266
  },
6264
6267
  // <audio> 이벤트 (real 전용)
6265
- _onTime: (y) => h({ currentTimeMs: y, status: "playing", scrollLock: !0 }),
6266
- _onEnded: () => h((y) => {
6268
+ _onTime: (y) => g({ currentTimeMs: y, status: "playing", scrollLock: !0 }),
6269
+ _onEnded: () => g((y) => {
6267
6270
  if (y.playbackKind === "fake")
6268
6271
  return { status: "ended", scrollLock: !1 };
6269
6272
  const c = Math.max(0, y.clips.length - 1);
@@ -6274,9 +6277,9 @@ function pu(e) {
6274
6277
  scrollLock: !0
6275
6278
  };
6276
6279
  }),
6277
- _onError: () => h({ status: "error", scrollLock: !1 }),
6280
+ _onError: () => g({ status: "error", scrollLock: !1 }),
6278
6281
  // 재생 모드용: 상태만 변경 (실제 재생 안함, emit도 안함)
6279
- _setStatusOnly: (y) => h({ status: y })
6282
+ _setStatusOnly: (y) => g({ status: y })
6280
6283
  }))
6281
6284
  );
6282
6285
  }
@@ -6319,17 +6322,17 @@ function bu(e) {
6319
6322
  return e.forEach((d, v) => {
6320
6323
  var c;
6321
6324
  if (d.type !== "paragraph") return;
6322
- const g = n[v] ?? 0, h = d.runs ?? [];
6323
- for (let f = 0; f < h.length; f++) {
6324
- const p = ((c = h[f]) == null ? void 0 : c.text) || "";
6325
- br(p) && (i[g + f] = 1);
6325
+ const h = n[v] ?? 0, g = d.runs ?? [];
6326
+ for (let f = 0; f < g.length; f++) {
6327
+ const p = ((c = g[f]) == null ? void 0 : c.text) || "";
6328
+ br(p) && (i[h + f] = 1);
6326
6329
  }
6327
- const y = la(h, g).map((f) => {
6330
+ const y = la(g, h).map((f) => {
6328
6331
  var I;
6329
- const p = f.startG - g, x = f.endG - f.startG + 1;
6332
+ const p = f.startG - h, x = f.endG - f.startG + 1;
6330
6333
  let C = -1;
6331
6334
  for (let E = 0; E < x; E++) {
6332
- const m = ((I = h[p + E]) == null ? void 0 : I.text) ?? "";
6335
+ const m = ((I = g[p + E]) == null ? void 0 : I.text) ?? "";
6333
6336
  if (br(m)) {
6334
6337
  C = f.startG + E;
6335
6338
  break;
@@ -6371,10 +6374,10 @@ function vu(e) {
6371
6374
  onToggleShowGaze: l,
6372
6375
  handleAskCalibration: d,
6373
6376
  nav: v,
6374
- layout: g,
6375
- initialIndex: h,
6377
+ layout: h,
6378
+ initialIndex: g,
6376
6379
  mountTime: b
6377
- } = e, y = g.totalRuns ?? 0, c = typeof h == "number" ? h : y > 0 ? 0 : -1, f = c >= 0 ? mu(v.readableGi, c, y) : -1;
6380
+ } = e, y = h.totalRuns ?? 0, c = typeof g == "number" ? g : y > 0 ? 0 : -1, f = c >= 0 ? mu(v.readableGi, c, y) : -1;
6378
6381
  return {
6379
6382
  section: t,
6380
6383
  sectionId: t.section_id,
@@ -6396,7 +6399,7 @@ function vu(e) {
6396
6399
  _loadingStartTime: b,
6397
6400
  _scrollApi: void 0,
6398
6401
  derivedNav: v,
6399
- layout: g,
6402
+ layout: h,
6400
6403
  rangeStartGI: null,
6401
6404
  rangeEndGI: null,
6402
6405
  translateOpen: !1,
@@ -6420,8 +6423,8 @@ function Su(e) {
6420
6423
  showGaze: l,
6421
6424
  onToggleShowGaze: d,
6422
6425
  handleAskCalibration: v,
6423
- eventBridgeStore: g
6424
- } = e, h = t.ast.blocks, { nav: b, layout: y } = bu(h), c = Date.now(), f = vu({
6426
+ eventBridgeStore: h
6427
+ } = e, g = t.ast.blocks, { nav: b, layout: y } = bu(g), c = Date.now(), f = vu({
6425
6428
  section: t,
6426
6429
  onViewerClose: r,
6427
6430
  onSectionNav: o,
@@ -6437,8 +6440,8 @@ function Su(e) {
6437
6440
  initialIndex: n,
6438
6441
  mountTime: c
6439
6442
  });
6440
- return g && queueMicrotask(() => {
6441
- g.getState().emit({ type: "render_start", payload: { sectionId: t.section_id } }, c), g.getState().emit({ type: "loading_start", payload: {} }, c);
6443
+ return h && queueMicrotask(() => {
6444
+ h.getState().emit({ type: "render_start", payload: { sectionId: t.section_id } }, c), h.getState().emit({ type: "loading_start", payload: {} }, c);
6442
6445
  }), nn((p, x) => {
6443
6446
  const C = (F) => {
6444
6447
  p((D) => D.progress._scrollApi === F ? D : { progress: { ...D.progress, _scrollApi: F } });
@@ -6446,49 +6449,49 @@ function Su(e) {
6446
6449
  p((D) => {
6447
6450
  const V = D.progress;
6448
6451
  if (V.totalRuns === F) return D;
6449
- const O = V.currentGlobalRunIndex < 0 && F > 0;
6452
+ const A = V.currentGlobalRunIndex < 0 && F > 0;
6450
6453
  return {
6451
6454
  progress: {
6452
6455
  ...V,
6453
6456
  totalRuns: F,
6454
- currentGlobalRunIndex: O ? 0 : V.currentGlobalRunIndex,
6455
- lastUpdateBy: O ? "program" : V.lastUpdateBy
6457
+ currentGlobalRunIndex: A ? 0 : V.currentGlobalRunIndex,
6458
+ lastUpdateBy: A ? "program" : V.lastUpdateBy
6456
6459
  }
6457
6460
  };
6458
6461
  });
6459
6462
  }, m = (F, D = "program") => {
6460
- const V = x().progress.currentGlobalRunIndex, O = x().progress, L = O.totalRuns > 0 ? Math.max(-1, Math.min(F, O.totalRuns - 1)) : F;
6461
- V === L && O.lastUpdateBy === D || (p((K) => ({
6463
+ const V = x().progress.currentGlobalRunIndex, A = x().progress, L = A.totalRuns > 0 ? Math.max(-1, Math.min(F, A.totalRuns - 1)) : F;
6464
+ V === L && A.lastUpdateBy === D || (p((K) => ({
6462
6465
  progress: {
6463
6466
  ...K.progress,
6464
6467
  currentGlobalRunIndex: L,
6465
6468
  lastUpdateBy: D
6466
6469
  }
6467
- })), V !== L && g && g.getState().emit({
6470
+ })), V !== L && h && h.getState().emit({
6468
6471
  type: "global_index_change",
6469
6472
  payload: { globalIndex: L }
6470
6473
  }));
6471
6474
  }, S = (F) => {
6472
6475
  const { sectionLoading: D, _loadingStartTime: V } = x().progress;
6473
6476
  if (D === F) return;
6474
- const O = Date.now();
6477
+ const A = Date.now();
6475
6478
  if (F)
6476
6479
  p((L) => ({
6477
6480
  progress: {
6478
6481
  ...L.progress,
6479
6482
  sectionLoading: !0,
6480
- _loadingStartTime: O
6483
+ _loadingStartTime: A
6481
6484
  }
6482
- })), g && g.getState().emit({ type: "loading_start", payload: {} });
6485
+ })), h && h.getState().emit({ type: "loading_start", payload: {} });
6483
6486
  else {
6484
- const K = (V ? O - V : 0) / 1e3;
6487
+ const K = (V ? A - V : 0) / 1e3;
6485
6488
  p((H) => ({
6486
6489
  progress: {
6487
6490
  ...H.progress,
6488
6491
  sectionLoading: !1,
6489
6492
  _loadingStartTime: null
6490
6493
  }
6491
- })), g && g.getState().emit({ type: "loading_end", payload: { duration: K } });
6494
+ })), h && h.getState().emit({ type: "loading_end", payload: { duration: K } });
6492
6495
  }
6493
6496
  }, T = (F) => {
6494
6497
  p((D) => ({
@@ -6499,40 +6502,40 @@ function Su(e) {
6499
6502
  progress: { ...D.progress, totalPages: F }
6500
6503
  }));
6501
6504
  }, R = (F, D) => {
6502
- const O = x().progress.rangeStartGI == null;
6505
+ const A = x().progress.rangeStartGI == null;
6503
6506
  if (p((L) => ({
6504
6507
  progress: {
6505
6508
  ...L.progress,
6506
6509
  rangeStartGI: Math.min(F, D),
6507
6510
  rangeEndGI: Math.max(F, D)
6508
6511
  }
6509
- })), g) {
6512
+ })), h) {
6510
6513
  const L = M();
6511
- g.getState().emit({
6512
- type: O ? "range_select" : "range_change",
6514
+ h.getState().emit({
6515
+ type: A ? "range_select" : "range_change",
6513
6516
  payload: { startGI: Math.min(F, D), endGI: Math.max(F, D), text: L }
6514
6517
  });
6515
6518
  }
6516
- }, A = () => {
6519
+ }, O = () => {
6517
6520
  p((F) => ({
6518
6521
  progress: {
6519
6522
  ...F.progress,
6520
6523
  rangeStartGI: null,
6521
6524
  rangeEndGI: null
6522
6525
  }
6523
- })), g && g.getState().emit({ type: "range_clear", payload: {} });
6526
+ })), h && h.getState().emit({ type: "range_clear", payload: {} });
6524
6527
  }, B = (F) => {
6525
6528
  const { rangeStartGI: D, rangeEndGI: V } = x().progress;
6526
- D == null || V == null || (F < D ? p((O) => ({
6527
- progress: { ...O.progress, rangeStartGI: F }
6528
- })) : F > V ? p((O) => ({
6529
- progress: { ...O.progress, rangeEndGI: F }
6530
- })) : A());
6529
+ D == null || V == null || (F < D ? p((A) => ({
6530
+ progress: { ...A.progress, rangeStartGI: F }
6531
+ })) : F > V ? p((A) => ({
6532
+ progress: { ...A.progress, rangeEndGI: F }
6533
+ })) : O());
6531
6534
  }, M = () => {
6532
6535
  var re;
6533
- const { rangeStartGI: F, rangeEndGI: D, section: V, layout: O } = x().progress;
6534
- if (F == null || D == null || !O) return "";
6535
- const L = ((re = V.ast) == null ? void 0 : re.blocks) ?? [], K = O.prefix, H = [];
6536
+ const { rangeStartGI: F, rangeEndGI: D, section: V, layout: A } = x().progress;
6537
+ if (F == null || D == null || !A) return "";
6538
+ const L = ((re = V.ast) == null ? void 0 : re.blocks) ?? [], K = A.prefix, H = [];
6536
6539
  for (let q = 0; q < L.length; q++) {
6537
6540
  const J = L[q];
6538
6541
  if (J.type !== "paragraph") continue;
@@ -6568,19 +6571,19 @@ function Su(e) {
6568
6571
  }
6569
6572
  }));
6570
6573
  }, _ = (F) => {
6571
- const { totalRuns: D, derivedNav: V } = x().progress, O = V == null ? void 0 : V.readableGi;
6572
- if (!O || D <= 0) return F;
6574
+ const { totalRuns: D, derivedNav: V } = x().progress, A = V == null ? void 0 : V.readableGi;
6575
+ if (!A || D <= 0) return F;
6573
6576
  const L = D, K = Math.max(0, Math.min(F, L - 1));
6574
- if (O[K]) return K;
6577
+ if (A[K]) return K;
6575
6578
  let H = K - 1, re = K + 1;
6576
6579
  for (; H >= 0 || re < L; ) {
6577
- if (re < L && O[re]) return re;
6578
- if (H >= 0 && O[H]) return H;
6580
+ if (re < L && A[re]) return re;
6581
+ if (H >= 0 && A[H]) return H;
6579
6582
  re += 1, H -= 1;
6580
6583
  }
6581
6584
  return K;
6582
6585
  }, z = (F, D) => {
6583
- const { totalRuns: V, derivedNav: O } = x().progress, L = O == null ? void 0 : O.readableGi;
6586
+ const { totalRuns: V, derivedNav: A } = x().progress, L = A == null ? void 0 : A.readableGi;
6584
6587
  if (!L || V <= 0) return null;
6585
6588
  if (D > 0) {
6586
6589
  for (let K = Math.min(Math.max(F, 0), V - 1); K < V; K += 1)
@@ -6590,12 +6593,12 @@ function Su(e) {
6590
6593
  if (L[K]) return K;
6591
6594
  return null;
6592
6595
  }, Q = (F) => {
6593
- const { totalRuns: D, derivedNav: V } = x().progress, O = V == null ? void 0 : V.readableGi;
6594
- if (!O || D <= 0) return null;
6596
+ const { totalRuns: D, derivedNav: V } = x().progress, A = V == null ? void 0 : V.readableGi;
6597
+ if (!A || D <= 0) return null;
6595
6598
  if (F > 0) {
6596
- for (let L = D - 1; L >= 0; L -= 1) if (O[L]) return L;
6599
+ for (let L = D - 1; L >= 0; L -= 1) if (A[L]) return L;
6597
6600
  } else
6598
- for (let L = 0; L < D; L += 1) if (O[L]) return L;
6601
+ for (let L = 0; L < D; L += 1) if (A[L]) return L;
6599
6602
  return null;
6600
6603
  };
6601
6604
  return {
@@ -6613,7 +6616,7 @@ function Su(e) {
6613
6616
  clearTranslate: N,
6614
6617
  // Range Selection API
6615
6618
  setRange: R,
6616
- clearRange: A,
6619
+ clearRange: O,
6617
6620
  extendRange: B,
6618
6621
  getRangeText: M,
6619
6622
  // 네비 API
@@ -6622,9 +6625,9 @@ function Su(e) {
6622
6625
  edgeReadable: Q,
6623
6626
  hasReadableInDir: (F, D) => z(F + (D > 0 ? 1 : -1), D) != null,
6624
6627
  computeStepTarget: (F, D) => {
6625
- const { totalRuns: V, derivedNav: O } = x().progress;
6628
+ const { totalRuns: V, derivedNav: A } = x().progress;
6626
6629
  if (!V || V <= 0) return F;
6627
- const L = (O == null ? void 0 : O.groups) ?? [], K = O == null ? void 0 : O.giToGroupIdx;
6630
+ const L = (A == null ? void 0 : A.groups) ?? [], K = A == null ? void 0 : A.giToGroupIdx;
6628
6631
  if (!L.length || !K) {
6629
6632
  const ee = V - 1;
6630
6633
  return _(Math.max(0, Math.min(F + D, ee)));
@@ -6656,8 +6659,8 @@ function Su(e) {
6656
6659
  percentToGITotal: (F) => {
6657
6660
  const D = x().progress.totalRuns;
6658
6661
  if (!D || D <= 1) return 0;
6659
- const V = Math.max(0, Math.min(F, 100)), O = Math.round(V / 100 * (D - 1));
6660
- return Math.max(0, Math.min(O, D - 1));
6662
+ const V = Math.max(0, Math.min(F, 100)), A = Math.round(V / 100 * (D - 1));
6663
+ return Math.max(0, Math.min(A, D - 1));
6661
6664
  }
6662
6665
  }
6663
6666
  };
@@ -6717,20 +6720,20 @@ const wu = ({
6717
6720
  }), v = $((p) => {
6718
6721
  var x;
6719
6722
  return ((x = p.derivedNav) == null ? void 0 : x.splitGroupsPerBlock) ?? [];
6720
- }), g = e[t], h = ye(() => {
6723
+ }), h = e[t], g = ye(() => {
6721
6724
  const p = [];
6722
6725
  return o.forEach((x, C) => {
6723
6726
  (x.type === "paragraph" || x.type === "image") && p.push(C);
6724
6727
  }), p;
6725
6728
  }, [o]), b = ye(() => {
6726
- if (!g) return [];
6729
+ if (!h) return [];
6727
6730
  const p = [];
6728
- for (let x = g.startBlock; x <= g.endBlock; x++) {
6729
- const C = h[x];
6731
+ for (let x = h.startBlock; x <= h.endBlock; x++) {
6732
+ const C = g[x];
6730
6733
  C != null && p.push(C);
6731
6734
  }
6732
6735
  return p;
6733
- }, [g, h]), y = ye(() => {
6736
+ }, [h, g]), y = ye(() => {
6734
6737
  const p = [];
6735
6738
  for (const x of b) {
6736
6739
  const C = o[x];
@@ -6738,11 +6741,11 @@ const wu = ({
6738
6741
  }
6739
6742
  return p;
6740
6743
  }, [b, o]), c = ye(() => {
6741
- const p = /* @__PURE__ */ new Map(), x = Ar();
6744
+ const p = /* @__PURE__ */ new Map(), x = Or();
6742
6745
  return y.forEach((C, I) => {
6743
6746
  p.set(C.originalBlockIndex, {
6744
6747
  idx: I,
6745
- marker: Or(C.b, x)
6748
+ marker: Ar(C.b, x)
6746
6749
  });
6747
6750
  }), p;
6748
6751
  }, [y]), f = (p, x, C) => {
@@ -6751,15 +6754,15 @@ const wu = ({
6751
6754
  for (const E of p) {
6752
6755
  const m = E.startG, S = E.endG;
6753
6756
  if (S < x || m > C) continue;
6754
- const T = Math.max(m, x), k = Math.min(S, C), R = T - m | 0, A = Math.max(0, k - T + 1);
6755
- if (A <= 0) continue;
6757
+ const T = Math.max(m, x), k = Math.min(S, C), R = T - m | 0, O = Math.max(0, k - T + 1);
6758
+ if (O <= 0) continue;
6756
6759
  const B = (E.r0 ?? 0) + R;
6757
6760
  I.push({
6758
6761
  ...E,
6759
6762
  startG: T,
6760
6763
  endG: k,
6761
6764
  r0: B,
6762
- len: A
6765
+ len: O
6763
6766
  });
6764
6767
  }
6765
6768
  return I;
@@ -6811,7 +6814,7 @@ const wu = ({
6811
6814
  height: "auto"
6812
6815
  }, S = `sec-${r.section_id}/blk-${C.id ?? p}`;
6813
6816
  if (C.type === "image") {
6814
- const { src: O, alt: L, width: K, height: H } = C, re = K && H ? `${K} / ${H}` : "4 / 3", q = l > 80 ? Math.floor((l - 80) * 0.6) : void 0;
6817
+ const { src: A, alt: L, width: K, height: H } = C, re = K && H ? `${K} / ${H}` : "4 / 3", q = l > 80 ? Math.floor((l - 80) * 0.6) : void 0;
6815
6818
  return /* @__PURE__ */ w("div", { style: m, children: /* @__PURE__ */ Z(
6816
6819
  "div",
6817
6820
  {
@@ -6833,7 +6836,7 @@ const wu = ({
6833
6836
  children: /* @__PURE__ */ w(
6834
6837
  "img",
6835
6838
  {
6836
- src: O,
6839
+ src: A,
6837
6840
  alt: L || "",
6838
6841
  loading: "eager",
6839
6842
  style: {
@@ -6854,24 +6857,24 @@ const wu = ({
6854
6857
  }
6855
6858
  ) }, S);
6856
6859
  }
6857
- const T = C, k = c.get(p), R = k == null ? void 0 : k.marker, A = T.runs ?? [], B = A.length;
6860
+ const T = C, k = c.get(p), R = k == null ? void 0 : k.marker, O = T.runs ?? [], B = O.length;
6858
6861
  let M = 0, P = Math.max(0, B - 1);
6859
- I && g.startOffsetInBlock != null && (M = Math.min(Math.max(0, g.startOffsetInBlock), P)), E && g.endOffsetInBlock != null && (P = Math.max(
6862
+ I && h.startOffsetInBlock != null && (M = Math.min(Math.max(0, h.startOffsetInBlock), P)), E && h.endOffsetInBlock != null && (P = Math.max(
6860
6863
  M,
6861
- Math.min(g.endOffsetInBlock, P)
6864
+ Math.min(h.endOffsetInBlock, P)
6862
6865
  ));
6863
6866
  const N = M > 0, _ = d[p] ?? 0, z = v[p] ?? [], Q = _ + M, se = _ + P;
6864
6867
  let le = f(z, Q, se);
6865
6868
  const ce = _ + M;
6866
- le = le.map((O) => {
6867
- const L = Math.max(0, (O.startG ?? Q) - ce), K = O.len ?? Math.max(1, (O.endG ?? se) - (O.startG ?? Q) + 1);
6869
+ le = le.map((A) => {
6870
+ const L = Math.max(0, (A.startG ?? Q) - ce), K = A.len ?? Math.max(1, (A.endG ?? se) - (A.startG ?? Q) + 1);
6868
6871
  return {
6869
- ...O,
6872
+ ...A,
6870
6873
  r0: L,
6871
6874
  len: K
6872
6875
  };
6873
6876
  });
6874
- const pe = M <= P ? A.slice(M, P + 1) : [], Ie = T.list ? T.list.level * 24 : 0, F = ((V = T.list) == null ? void 0 : V.kind) === "bullet" ? T.list.glyph ?? "•" : void 0, D = N ? void 0 : R ?? F;
6877
+ const pe = M <= P ? O.slice(M, P + 1) : [], Ie = T.list ? T.list.level * 24 : 0, F = ((V = T.list) == null ? void 0 : V.kind) === "bullet" ? T.list.glyph ?? "•" : void 0, D = N ? void 0 : R ?? F;
6875
6878
  return /* @__PURE__ */ w("div", { style: m, children: /* @__PURE__ */ Z(
6876
6879
  "p",
6877
6880
  {
@@ -6898,7 +6901,7 @@ const wu = ({
6898
6901
  }
6899
6902
  ) : null,
6900
6903
  /* @__PURE__ */ w(
6901
- Oi,
6904
+ Ai,
6902
6905
  {
6903
6906
  preGroups: le,
6904
6907
  runs: pe,
@@ -6928,12 +6931,12 @@ function Iu(e, t) {
6928
6931
  }));
6929
6932
  }, s = new ResizeObserver((a) => {
6930
6933
  if (o.current) return;
6931
- const l = a[0], { width: d, height: v } = l.contentRect, g = r.current;
6932
- if (!g) {
6934
+ const l = a[0], { width: d, height: v } = l.contentRect, h = r.current;
6935
+ if (!h) {
6933
6936
  r.current = { w: d, h: v };
6934
6937
  return;
6935
6938
  }
6936
- Math.abs(g.w - d) < gn && Math.abs(g.h - v) < gn || (r.current = { w: d, h: v }, i());
6939
+ Math.abs(h.w - d) < gn && Math.abs(h.h - v) < gn || (r.current = { w: d, h: v }, i());
6937
6940
  });
6938
6941
  e.forEach((a) => {
6939
6942
  a.current && s.observe(a.current);
@@ -6967,9 +6970,9 @@ function Cu(e) {
6967
6970
  singleDelayMs: l = 250,
6968
6971
  doubleClickWindowMs: d = 300,
6969
6972
  onDragMove: v,
6970
- onDragEnd: g,
6971
- pageTransitionThreshold: h
6972
- } = e, b = h ?? u, y = 10, c = Xe.useRef({
6973
+ onDragEnd: h,
6974
+ pageTransitionThreshold: g
6975
+ } = e, b = g ?? u, y = 10, c = Xe.useRef({
6973
6976
  // ── touch ──
6974
6977
  touchId: null,
6975
6978
  startX: 0,
@@ -7002,9 +7005,9 @@ function Cu(e) {
7002
7005
  ), x = Xe.useCallback(
7003
7006
  (M, P) => {
7004
7007
  const N = Math.abs(M) / Math.max(1, P);
7005
- Math.abs(M) >= b || N >= a ? M < 0 ? n() : t() : g == null || g();
7008
+ Math.abs(M) >= b || N >= a ? M < 0 ? n() : t() : h == null || h();
7006
7009
  },
7007
- [b, a, n, t, g]
7010
+ [b, a, n, t, h]
7008
7011
  ), C = Xe.useCallback(
7009
7012
  (M) => {
7010
7013
  if (M.touches.length !== 1) return;
@@ -7038,8 +7041,8 @@ function Cu(e) {
7038
7041
  },
7039
7042
  [x, p]
7040
7043
  ), m = Xe.useCallback(() => {
7041
- c.current.swiping && (g == null || g()), c.current.touchId = null, c.current.swiping = !1;
7042
- }, [g]), S = Xe.useCallback(
7044
+ c.current.swiping && (h == null || h()), c.current.touchId = null, c.current.swiping = !1;
7045
+ }, [h]), S = Xe.useCallback(
7043
7046
  (M) => {
7044
7047
  if (M.pointerType === "touch" || c.current.mouseDown) return;
7045
7048
  const P = s ?? i;
@@ -7084,12 +7087,12 @@ function Cu(e) {
7084
7087
  [x]
7085
7088
  ), R = Xe.useCallback(
7086
7089
  (M) => {
7087
- M.pointerType !== "touch" && (c.current.mouseSwiping && (g == null || g(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null);
7090
+ M.pointerType !== "touch" && (c.current.mouseSwiping && (h == null || h(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null);
7088
7091
  },
7089
- [g]
7090
- ), A = Xe.useCallback(() => {
7091
- c.current.mouseSwiping && (g == null || g(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null;
7092
- }, [g]), B = Xe.useCallback(
7092
+ [h]
7093
+ ), O = Xe.useCallback(() => {
7094
+ c.current.mouseSwiping && (h == null || h(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null;
7095
+ }, [h]), B = Xe.useCallback(
7093
7096
  (M) => {
7094
7097
  if (c.current.suppressClick) {
7095
7098
  c.current.suppressClick = !1;
@@ -7115,7 +7118,7 @@ function Cu(e) {
7115
7118
  onPointerMove: T,
7116
7119
  onPointerUp: k,
7117
7120
  onPointerCancel: R,
7118
- onLostPointerCapture: A,
7121
+ onLostPointerCapture: O,
7119
7122
  // click (mouse only)
7120
7123
  onClick: B
7121
7124
  };
@@ -7175,17 +7178,17 @@ function _u() {
7175
7178
  }
7176
7179
  return Yn = n, Yn;
7177
7180
  }
7178
- var Zn, Ao;
7181
+ var Zn, Oo;
7179
7182
  function Vi() {
7180
- if (Ao) return Zn;
7181
- Ao = 1;
7183
+ if (Oo) return Zn;
7184
+ Oo = 1;
7182
7185
  var e = Wi(), t = e.Symbol;
7183
7186
  return Zn = t, Zn;
7184
7187
  }
7185
- var Jn, Oo;
7188
+ var Jn, Ao;
7186
7189
  function Mu() {
7187
- if (Oo) return Jn;
7188
- Oo = 1;
7190
+ if (Ao) return Jn;
7191
+ Ao = 1;
7189
7192
  var e = Vi(), t = Object.prototype, n = t.hasOwnProperty, r = t.toString, o = e ? e.toStringTag : void 0;
7190
7193
  function i(s) {
7191
7194
  var u = n.call(s, o), a = s[o];
@@ -7220,7 +7223,7 @@ function zu() {
7220
7223
  return tr = s, tr;
7221
7224
  }
7222
7225
  var nr, Go;
7223
- function Au() {
7226
+ function Ou() {
7224
7227
  if (Go) return nr;
7225
7228
  Go = 1;
7226
7229
  function e(t) {
@@ -7229,10 +7232,10 @@ function Au() {
7229
7232
  return nr = e, nr;
7230
7233
  }
7231
7234
  var rr, Lo;
7232
- function Ou() {
7235
+ function Au() {
7233
7236
  if (Lo) return rr;
7234
7237
  Lo = 1;
7235
- var e = zu(), t = Au(), n = "[object Symbol]";
7238
+ var e = zu(), t = Ou(), n = "[object Symbol]";
7236
7239
  function r(o) {
7237
7240
  return typeof o == "symbol" || t(o) && e(o) == n;
7238
7241
  }
@@ -7242,7 +7245,7 @@ var or, Ho;
7242
7245
  function Pu() {
7243
7246
  if (Ho) return or;
7244
7247
  Ho = 1;
7245
- var e = _u(), t = Di(), n = Ou(), r = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, s = /^0o[0-7]+$/i, u = parseInt;
7248
+ var e = _u(), t = Di(), n = Au(), r = NaN, o = /^[-+]0x[0-9a-f]+$/i, i = /^0b[01]+$/i, s = /^0o[0-7]+$/i, u = parseInt;
7246
7249
  function a(l) {
7247
7250
  if (typeof l == "number")
7248
7251
  return l;
@@ -7266,24 +7269,24 @@ function Bu() {
7266
7269
  No = 1;
7267
7270
  var e = Di(), t = ku(), n = Pu(), r = "Expected a function", o = Math.max, i = Math.min;
7268
7271
  function s(u, a, l) {
7269
- var d, v, g, h, b, y, c = 0, f = !1, p = !1, x = !0;
7272
+ var d, v, h, g, b, y, c = 0, f = !1, p = !1, x = !0;
7270
7273
  if (typeof u != "function")
7271
7274
  throw new TypeError(r);
7272
- a = n(a) || 0, e(l) && (f = !!l.leading, p = "maxWait" in l, g = p ? o(n(l.maxWait) || 0, a) : g, x = "trailing" in l ? !!l.trailing : x);
7275
+ a = n(a) || 0, e(l) && (f = !!l.leading, p = "maxWait" in l, h = p ? o(n(l.maxWait) || 0, a) : h, x = "trailing" in l ? !!l.trailing : x);
7273
7276
  function C(B) {
7274
7277
  var M = d, P = v;
7275
- return d = v = void 0, c = B, h = u.apply(P, M), h;
7278
+ return d = v = void 0, c = B, g = u.apply(P, M), g;
7276
7279
  }
7277
7280
  function I(B) {
7278
- return c = B, b = setTimeout(S, a), f ? C(B) : h;
7281
+ return c = B, b = setTimeout(S, a), f ? C(B) : g;
7279
7282
  }
7280
7283
  function E(B) {
7281
7284
  var M = B - y, P = B - c, N = a - M;
7282
- return p ? i(N, g - P) : N;
7285
+ return p ? i(N, h - P) : N;
7283
7286
  }
7284
7287
  function m(B) {
7285
7288
  var M = B - y, P = B - c;
7286
- return y === void 0 || M >= a || M < 0 || p && P >= g;
7289
+ return y === void 0 || M >= a || M < 0 || p && P >= h;
7287
7290
  }
7288
7291
  function S() {
7289
7292
  var B = t();
@@ -7292,15 +7295,15 @@ function Bu() {
7292
7295
  b = setTimeout(S, E(B));
7293
7296
  }
7294
7297
  function T(B) {
7295
- return b = void 0, x && d ? C(B) : (d = v = void 0, h);
7298
+ return b = void 0, x && d ? C(B) : (d = v = void 0, g);
7296
7299
  }
7297
7300
  function k() {
7298
7301
  b !== void 0 && clearTimeout(b), c = 0, d = y = v = b = void 0;
7299
7302
  }
7300
7303
  function R() {
7301
- return b === void 0 ? h : T(t());
7304
+ return b === void 0 ? g : T(t());
7302
7305
  }
7303
- function A() {
7306
+ function O() {
7304
7307
  var B = t(), M = m(B);
7305
7308
  if (d = arguments, v = this, y = B, M) {
7306
7309
  if (b === void 0)
@@ -7308,9 +7311,9 @@ function Bu() {
7308
7311
  if (p)
7309
7312
  return clearTimeout(b), b = setTimeout(S, a), C(y);
7310
7313
  }
7311
- return b === void 0 && (b = setTimeout(S, a)), h;
7314
+ return b === void 0 && (b = setTimeout(S, a)), g;
7312
7315
  }
7313
- return A.cancel = k, A.flush = R, A;
7316
+ return O.cancel = k, O.flush = R, O;
7314
7317
  }
7315
7318
  return ir = s, ir;
7316
7319
  }
@@ -7394,8 +7397,8 @@ async function Vu({
7394
7397
  showSplit: l,
7395
7398
  breakGapPx: d = 0,
7396
7399
  showSlash: v,
7397
- paragraphMarkers: g,
7398
- playbackScale: h = 1,
7400
+ paragraphMarkers: h,
7401
+ playbackScale: g = 1,
7399
7402
  viewportHeight: b = 0,
7400
7403
  instanceId: y = "default"
7401
7404
  }) {
@@ -7411,13 +7414,13 @@ async function Vu({
7411
7414
  }
7412
7415
  rt(c, y);
7413
7416
  try {
7414
- const C = Math.abs(h - 1) > 1e-3, I = 1 / h;
7417
+ const C = Math.abs(g - 1) > 1e-3, I = 1 / g;
7415
7418
  C && (t.style.transform = `scale(${I})`, t.style.transformOrigin = "top left");
7416
7419
  const E = Math.max(0, e.offsetWidth || 0), m = Math.max(0, Math.min(E, o));
7417
7420
  t.style.maxWidth = `${m}px`, rt(c, y);
7418
7421
  let S = Math.round(n.offsetHeight || 0);
7419
7422
  S || (S = Math.max(0, n.clientHeight | 0));
7420
- const T = 1.5, k = (H, re) => re + H <= S - T, R = getComputedStyle(e), A = {
7423
+ const T = 1.5, k = (H, re) => re + H <= S - T, R = getComputedStyle(e), O = {
7421
7424
  letterSpacing: R.letterSpacing,
7422
7425
  wordSpacing: R.wordSpacing,
7423
7426
  fontKerning: R.fontKerning || "normal",
@@ -7428,7 +7431,7 @@ async function Vu({
7428
7431
  overflowWrap: R.overflowWrap || R.wordWrap || "break-word",
7429
7432
  hyphens: R.hyphens || "manual"
7430
7433
  }, B = (H) => {
7431
- H.style.letterSpacing = A.letterSpacing || "", H.style.wordSpacing = A.wordSpacing || "", H.style.fontKerning = A.fontKerning || "", H.style.fontVariantLigatures = A.fontVariantLigatures || "", H.style.textTransform = A.textTransform || "", H.style.direction = A.direction || "", H.style.wordBreak = A.wordBreak || "", H.style.wordWrap = A.overflowWrap || "", H.style.overflowWrap = A.overflowWrap || "", H.style.hyphens = A.hyphens || "";
7434
+ H.style.letterSpacing = O.letterSpacing || "", H.style.wordSpacing = O.wordSpacing || "", H.style.fontKerning = O.fontKerning || "", H.style.fontVariantLigatures = O.fontVariantLigatures || "", H.style.textTransform = O.textTransform || "", H.style.direction = O.direction || "", H.style.wordBreak = O.wordBreak || "", H.style.wordWrap = O.overflowWrap || "", H.style.overflowWrap = O.overflowWrap || "", H.style.hyphens = O.hyphens || "";
7432
7435
  }, M = m, P = Math.max(0, M - 2 * (i || 0));
7433
7436
  n.innerHTML = "";
7434
7437
  const N = document.createElement("div");
@@ -7449,8 +7452,8 @@ async function Vu({
7449
7452
  ve.style.display = "inline-block", ve.style.width = `${Ce}px`;
7450
7453
  const _e = document.createElement("span");
7451
7454
  if (_e.style.display = "inline-block", _e.style.width = `${Ce}px`, fe.appendChild(ve), v) {
7452
- const Ae = document.createElement("span");
7453
- Ae.textContent = " / ", fe.appendChild(Ae);
7455
+ const Oe = document.createElement("span");
7456
+ Oe.textContent = " / ", fe.appendChild(Oe);
7454
7457
  }
7455
7458
  fe.appendChild(_e);
7456
7459
  }
@@ -7473,29 +7476,29 @@ async function Vu({
7473
7476
  rt(c, y);
7474
7477
  const re = r[H];
7475
7478
  if (_.dataset.block = String(H), _.innerHTML = "", re.kind === "image") {
7476
- const _e = re.block, Ae = Ie(_e);
7477
- _.appendChild(Ae);
7478
- const Ne = Ae.getBoundingClientRect(), { mt: Ge, mb: Ve } = lr(Ae);
7479
+ const _e = re.block, Oe = Ie(_e);
7480
+ _.appendChild(Oe);
7481
+ const Ne = Oe.getBoundingClientRect(), { mt: Ge, mb: Ve } = lr(Oe);
7479
7482
  Q[H] = { contentH: Math.ceil(Ne.height), mt: Ge, mb: Ve }, await se(24);
7480
7483
  continue;
7481
7484
  }
7482
- const q = re.block, J = q.list ? (q.list.level ?? 0) * 24 : 0, ne = re.paraIndex ?? 0, ee = g[ne] ?? (((f = q.list) == null ? void 0 : f.kind) === "bullet" ? ((p = q.list) == null ? void 0 : p.glyph) ?? "•" : void 0);
7485
+ const q = re.block, J = q.list ? (q.list.level ?? 0) * 24 : 0, ne = re.paraIndex ?? 0, ee = h[ne] ?? (((f = q.list) == null ? void 0 : f.kind) === "bullet" ? ((p = q.list) == null ? void 0 : p.glyph) ?? "•" : void 0);
7483
7486
  if (!!(q.list && ee)) {
7484
7487
  const _e = le(q, J);
7485
7488
  _e.dataset.variant = "with";
7486
- const Ae = le(q, J);
7487
- Ae.dataset.variant = "no";
7489
+ const Oe = le(q, J);
7490
+ Oe.dataset.variant = "no";
7488
7491
  const Ne = document.createElement("span");
7489
- Ne.textContent = `${ee} `, Ne.style.minWidth = "16px", Ne.style.display = "inline-block", Ne.style.whiteSpace = "nowrap", Ne.style.userSelect = "none", _e.appendChild(Ne), ce(_e, q.runs), ce(Ae, q.runs);
7492
+ Ne.textContent = `${ee} `, Ne.style.minWidth = "16px", Ne.style.display = "inline-block", Ne.style.whiteSpace = "nowrap", Ne.style.userSelect = "none", _e.appendChild(Ne), ce(_e, q.runs), ce(Oe, q.runs);
7490
7493
  const Ge = document.createDocumentFragment();
7491
- Ge.appendChild(_e), Ge.appendChild(Ae), _.appendChild(Ge);
7494
+ Ge.appendChild(_e), Ge.appendChild(Oe), _.appendChild(Ge);
7492
7495
  } else {
7493
7496
  const _e = le(q, J);
7494
7497
  _e.dataset.variant = "with", ce(_e, q.runs), _.appendChild(_e);
7495
7498
  }
7496
7499
  const ae = _.querySelector('p[data-variant="with"]'), Ce = _.querySelector('p[data-variant="no"]'), ve = Ce ?? ae;
7497
7500
  if (ae && ve) {
7498
- const _e = Fo(ae), Ae = Fo(ve), { mt: Ne, mb: Ge } = lr(ae), { mt: Ve, mb: ct } = lr(ve), Ze = ((x = q.runs) == null ? void 0 : x.length) ?? 0, Le = Ce ? Ae : _e, st = Ce ? Ve : Ne, nt = Ce ? ct : Ge;
7501
+ const _e = Fo(ae), Oe = Fo(ve), { mt: Ne, mb: Ge } = lr(ae), { mt: Ve, mb: ct } = lr(ve), Ze = ((x = q.runs) == null ? void 0 : x.length) ?? 0, Le = Ce ? Oe : _e, st = Ce ? Ve : Ne, nt = Ce ? ct : Ge;
7499
7502
  z.set(H, {
7500
7503
  runsLen: Ze,
7501
7504
  lastBottomWith: _e,
@@ -7514,18 +7517,18 @@ async function Vu({
7514
7517
  const ne = J ? H.lastBottomNo : H.lastBottomWith, ee = J ? H.mtNo : H.mtWith, fe = J ? H.mbNo : H.mbWith, ae = J ? 0 : ee, Ce = re > 0 ? ne[re - 1] ?? 0 : 0, ve = Math.max(0, (ne[q] ?? 0) - Ce);
7515
7518
  return { top: ae, content: ve, mb: fe };
7516
7519
  }, D = [];
7517
- let V = 0, O, L = null, K = null;
7520
+ let V = 0, A, L = null, K = null;
7518
7521
  for (; V < r.length; ) {
7519
7522
  rt(c, y);
7520
7523
  const H = V;
7521
- let re = 0, q = 0, J = O;
7524
+ let re = 0, q = 0, J = A;
7522
7525
  J != null && L === V && K != null && (J = Math.max(J, K + 1));
7523
7526
  let ne = -1, ee;
7524
7527
  for (; V < r.length; ) {
7525
7528
  if (rt(c, y), r[V].kind === "image") {
7526
7529
  const Le = Q[V] ?? { contentH: 0, mt: 0, mb: 0 }, nt = (re === 0 ? Le.mt : q + Le.mt) + Le.contentH;
7527
7530
  if (k(nt, re)) {
7528
- re += nt, ne = V, ee = void 0, q = Le.mb, V += 1, O = void 0, L = null, K = null;
7531
+ re += nt, ne = V, ee = void 0, q = Le.mb, V += 1, A = void 0, L = null, K = null;
7529
7532
  continue;
7530
7533
  }
7531
7534
  if (re === 0) {
@@ -7534,19 +7537,19 @@ async function Vu({
7534
7537
  endBlock: V,
7535
7538
  ...J != null ? { startOffsetInBlock: J } : {}
7536
7539
  // 이미지에는 run 오프셋 개념이 없어 endOffsetInBlock 생략
7537
- }), V += 1, O = void 0, L = null, K = null, q = 0;
7540
+ }), V += 1, A = void 0, L = null, K = null, q = 0;
7538
7541
  break;
7539
7542
  }
7540
7543
  break;
7541
7544
  }
7542
7545
  const ae = z.get(V), Ce = ae.runsLen, ve = V === H && J != null ? J : 0;
7543
7546
  if (ve >= Ce) {
7544
- V += 1, O = void 0, L = null, K = null;
7547
+ V += 1, A = void 0, L = null, K = null;
7545
7548
  continue;
7546
7549
  }
7547
- const _e = ve > 0, Ae = F(ae, ve, Ce - 1, _e), Ge = (re === 0 ? Ae.top : q + Ae.top) + Ae.content;
7550
+ const _e = ve > 0, Oe = F(ae, ve, Ce - 1, _e), Ge = (re === 0 ? Oe.top : q + Oe.top) + Oe.content;
7548
7551
  if (k(Ge, re)) {
7549
- re += Ge, ne = V, ee = Ce - 1, q = Ae.mb, V += 1, O = void 0, L = null, K = null;
7552
+ re += Ge, ne = V, ee = Ce - 1, q = Oe.mb, V += 1, A = void 0, L = null, K = null;
7550
7553
  continue;
7551
7554
  }
7552
7555
  let Ve = ve, ct = Ce - 1, Ze = ve - 1;
@@ -7561,7 +7564,7 @@ async function Vu({
7561
7564
  endBlock: V,
7562
7565
  ...J != null ? { startOffsetInBlock: J } : {},
7563
7566
  endOffsetInBlock: Ze
7564
- }), O = Ze + 1, L = V, K = Ze, q = 0;
7567
+ }), A = Ze + 1, L = V, K = Ze, q = 0;
7565
7568
  break;
7566
7569
  }
7567
7570
  if (re > 0) {
@@ -7579,7 +7582,7 @@ async function Vu({
7579
7582
  endBlock: V,
7580
7583
  ...J != null ? { startOffsetInBlock: J } : {},
7581
7584
  endOffsetInBlock: Le
7582
- }), O = Le + 1, L = V, K = Le, q = 0;
7585
+ }), A = Le + 1, L = V, K = Le, q = 0;
7583
7586
  break;
7584
7587
  }
7585
7588
  }
@@ -7631,8 +7634,8 @@ function qu(e, t, n, r) {
7631
7634
  if (!l) continue;
7632
7635
  let d = 0, v = l - 1;
7633
7636
  u === s.startBlock && s.startOffsetInBlock != null && (d = Math.max(0, Math.min(s.startOffsetInBlock, v))), u === s.endBlock && s.endOffsetInBlock != null && (v = Math.max(d, Math.min(s.endOffsetInBlock, v)));
7634
- const g = r[a.originalIndex] ?? 0, h = g + d, b = g + v;
7635
- if (e >= h && e <= b) return i;
7637
+ const h = r[a.originalIndex] ?? 0, g = h + d, b = h + v;
7638
+ if (e >= g && e <= b) return i;
7636
7639
  }
7637
7640
  }
7638
7641
  return -1;
@@ -7655,21 +7658,21 @@ function Ku() {
7655
7658
  me(() => r.subscribe((U) => {
7656
7659
  o.current = U.progress.rangeStartGI != null && U.progress.rangeEndGI != null;
7657
7660
  }), [r]);
7658
- const i = o.current, s = Tt(), u = X((U) => U.theme), a = vn[u], l = X((U) => U.fontFamily), d = X((U) => U.fontSizePx), v = X((U) => U.lineHeight), g = X((U) => U.marginX), h = X((U) => U.viewportHeight), b = 860, y = oe(null), { items: c } = ye(() => {
7661
+ const i = o.current, s = Tt(), u = X((U) => U.theme), a = vn[u], l = X((U) => U.fontFamily), d = X((U) => U.fontSizePx), v = X((U) => U.lineHeight), h = X((U) => U.marginX), g = X((U) => U.viewportHeight), b = 860, y = oe(null), { items: c } = ye(() => {
7659
7662
  var U;
7660
7663
  return $u(((U = t == null ? void 0 : t.ast) == null ? void 0 : U.blocks) ?? []);
7661
7664
  }, [t]), f = ye(() => {
7662
- const U = [], He = Ar();
7665
+ const U = [], He = Or();
7663
7666
  return c.forEach((De) => {
7664
7667
  if (De.kind === "paragraph") {
7665
7668
  const mt = De.paraIndex;
7666
- U[mt] = Or(De.block, He);
7669
+ U[mt] = Ar(De.block, He);
7667
7670
  }
7668
7671
  }), U;
7669
7672
  }, [c]), [p, x] = ft({
7670
7673
  pages: [],
7671
7674
  pageByRunIndex: null
7672
- }), C = $((U) => U.pageIndex), I = $((U) => U.setPageIndex), E = oe(0), m = oe(null), [S, T] = ft(!1), [k, R] = ft(null), [A, B] = ft(!1), M = ye(
7675
+ }), C = $((U) => U.pageIndex), I = $((U) => U.setPageIndex), E = oe(0), m = oe(null), [S, T] = ft(!1), [k, R] = ft(null), [O, B] = ft(!1), M = ye(
7673
7676
  () => ({
7674
7677
  flex: 1,
7675
7678
  fontFamily: l,
@@ -7722,7 +7725,7 @@ function Ku() {
7722
7725
  contentArea: De,
7723
7726
  items: c,
7724
7727
  cfgMaxWidth: b,
7725
- marginX: g,
7728
+ marginX: h,
7726
7729
  fontFamily: l,
7727
7730
  fontSizePx: d,
7728
7731
  lineHeight: v,
@@ -7731,7 +7734,7 @@ function Ku() {
7731
7734
  showSlash: _,
7732
7735
  paragraphMarkers: f,
7733
7736
  playbackScale: mt,
7734
- viewportHeight: h,
7737
+ viewportHeight: g,
7735
7738
  instanceId: e
7736
7739
  }), Xd = performance.now();
7737
7740
  x({ pages: St, pageByRunIndex: bt }), I(0);
@@ -7744,7 +7747,7 @@ function Ku() {
7744
7747
  I,
7745
7748
  c,
7746
7749
  b,
7747
- g,
7750
+ h,
7748
7751
  l,
7749
7752
  d,
7750
7753
  v,
@@ -7753,7 +7756,7 @@ function Ku() {
7753
7756
  _,
7754
7757
  f,
7755
7758
  s,
7756
- h,
7759
+ g,
7757
7760
  e,
7758
7761
  z
7759
7762
  ]), se = $((U) => U.setCurrentGlobalRunIndex), le = $((U) => {
@@ -7786,7 +7789,7 @@ function Ku() {
7786
7789
  }, [S, pe]), D = kn(), V = te(() => {
7787
7790
  const { isSettingsOpen: U, setSettingsOpen: He, toggleOverlays: De } = D.getState();
7788
7791
  U ? He(!1) : De();
7789
- }, [D]), O = p.pages.length + 1, L = ((Br = y.current) == null ? void 0 : Br.clientWidth) || 400, K = te((U) => {
7792
+ }, [D]), A = p.pages.length + 1, L = ((Br = y.current) == null ? void 0 : Br.clientWidth) || 400, K = te((U) => {
7790
7793
  var St;
7791
7794
  const He = m.current;
7792
7795
  if (!He) return;
@@ -7794,9 +7797,9 @@ function Ku() {
7794
7797
  He.style.transform = `translate3d(${-33.333 + mt}%, 0, 0)`;
7795
7798
  }, []), H = te(
7796
7799
  (U) => {
7797
- C === 0 && U > 0 || C >= O - 1 && U < 0 || (E.current = U, K(U), S || T(!0));
7800
+ C === 0 && U > 0 || C >= A - 1 && U < 0 || (E.current = U, K(U), S || T(!0));
7798
7801
  },
7799
- [C, O, K, S]
7802
+ [C, A, K, S]
7800
7803
  ), re = te(() => {
7801
7804
  E.current = 0, T(!1);
7802
7805
  const U = m.current;
@@ -7810,12 +7813,12 @@ function Ku() {
7810
7813
  [k, pe]
7811
7814
  );
7812
7815
  Mt(() => {
7813
- A && requestAnimationFrame(() => {
7816
+ O && requestAnimationFrame(() => {
7814
7817
  requestAnimationFrame(() => {
7815
7818
  B(!1);
7816
7819
  });
7817
7820
  });
7818
- }, [A]);
7821
+ }, [O]);
7819
7822
  const J = xn(), ne = te(
7820
7823
  (U) => i || Uu(U) ? !0 : ju(U),
7821
7824
  [i]
@@ -7847,25 +7850,25 @@ function Ku() {
7847
7850
  maxWait: 1e3
7848
7851
  }),
7849
7852
  []
7850
- ), Ae = Hu(Q, 200, ve, _e), Ne = oe("");
7853
+ ), Oe = Hu(Q, 200, ve, _e), Ne = oe("");
7851
7854
  me(() => {
7852
- if (h <= 0) return;
7853
- const U = `${l}|${d}|${v}|${g}|${P}|${N}|${_}|${h}|${t == null ? void 0 : t.section_id}`;
7854
- Ne.current !== U && (Ne.current = U, Ae.cancel(), ve(), Q());
7855
+ if (g <= 0) return;
7856
+ const U = `${l}|${d}|${v}|${h}|${P}|${N}|${_}|${g}|${t == null ? void 0 : t.section_id}`;
7857
+ Ne.current !== U && (Ne.current = U, Oe.cancel(), ve(), Q());
7855
7858
  }, [
7856
- Ae,
7859
+ Oe,
7857
7860
  Q,
7858
7861
  ve,
7859
7862
  l,
7860
7863
  d,
7861
7864
  v,
7862
- g,
7865
+ h,
7863
7866
  P,
7864
7867
  N,
7865
7868
  _,
7866
- h,
7869
+ g,
7867
7870
  t == null ? void 0 : t.section_id
7868
- ]), Iu([y], Ae);
7871
+ ]), Iu([y], Oe);
7869
7872
  const Ge = $((U) => U.registerSectionScrollApi);
7870
7873
  me(() => (Ge({
7871
7874
  ensureVisibleGI: () => Promise.resolve(!0),
@@ -7878,7 +7881,7 @@ function Ku() {
7878
7881
  scrollToGIAtOffset: () => Promise.resolve(),
7879
7882
  stepPage: pe
7880
7883
  }), () => Ge(void 0)), [Ge, pe]);
7881
- const Ve = t.quizzes && t.quizzes.length > 0, ct = p.pages.length > 0 && C === p.pages.length, Ze = C > 0 ? C - 1 : null, Le = C < O - 1 ? C + 1 : null, st = ye(() => k === "prev" ? "translate3d(0%, 0, 0)" : k === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [k]), nt = (U) => n ? null : U === p.pages.length ? /* @__PURE__ */ Z(
7884
+ const Ve = t.quizzes && t.quizzes.length > 0, ct = p.pages.length > 0 && C === p.pages.length, Ze = C > 0 ? C - 1 : null, Le = C < A - 1 ? C + 1 : null, st = ye(() => k === "prev" ? "translate3d(0%, 0, 0)" : k === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [k]), nt = (U) => n ? null : U === p.pages.length ? /* @__PURE__ */ Z(
7882
7885
  "div",
7883
7886
  {
7884
7887
  style: {
@@ -7906,7 +7909,7 @@ function Ku() {
7906
7909
  boxSizing: "border-box",
7907
7910
  backfaceVisibility: "hidden",
7908
7911
  WebkitBackfaceVisibility: "hidden"
7909
- }, An = !A && (!S || k !== null);
7912
+ }, On = !O && (!S || k !== null);
7910
7913
  return /* @__PURE__ */ Z("div", { ref: y, style: { ...M, touchAction: "none" }, ...fe, children: [
7911
7914
  /* @__PURE__ */ Z(
7912
7915
  "div",
@@ -7917,7 +7920,7 @@ function Ku() {
7917
7920
  width: "300%",
7918
7921
  height: "100%",
7919
7922
  transform: st,
7920
- transition: An ? "transform 250ms ease-out" : "none",
7923
+ transition: On ? "transform 250ms ease-out" : "none",
7921
7924
  willChange: "transform",
7922
7925
  boxSizing: "border-box",
7923
7926
  backfaceVisibility: "hidden",
@@ -8077,18 +8080,18 @@ function Md(e) {
8077
8080
  }), n.sort((r, o) => r - o);
8078
8081
  }
8079
8082
  const Ed = Dt(function() {
8080
- const t = Je((c) => c.phase), n = Je((c) => c.quizzes), r = Je((c) => c.order), o = Je((c) => c.currentIndex), i = Je((c) => c.answers), s = Je((c) => c.correctCount), u = Je((c) => c.remainingSec), a = Je((c) => c.uiReveal), l = Je((c) => c.startedAt), d = Je((c) => c.finishedAt), v = Je((c) => c.perQ), g = Gi();
8083
+ const t = Je((c) => c.phase), n = Je((c) => c.quizzes), r = Je((c) => c.order), o = Je((c) => c.currentIndex), i = Je((c) => c.answers), s = Je((c) => c.correctCount), u = Je((c) => c.remainingSec), a = Je((c) => c.uiReveal), l = Je((c) => c.startedAt), d = Je((c) => c.finishedAt), v = Je((c) => c.perQ), h = Gi();
8081
8084
  me(() => {
8082
8085
  if (t === "idle" || t !== "doing" || u == null) return;
8083
- const c = window.setInterval(() => g.getState().tick(), 1e3);
8086
+ const c = window.setInterval(() => h.getState().tick(), 1e3);
8084
8087
  return () => window.clearInterval(c);
8085
- }, [t, u, g]);
8086
- const h = t === "doing" ? n[r[o]] : void 0, b = t === "doing" && h ? i[h.qid] ?? [] : [], y = ye(() => {
8088
+ }, [t, u, h]);
8089
+ const g = t === "doing" ? n[r[o]] : void 0, b = t === "doing" && g ? i[g.qid] ?? [] : [], y = ye(() => {
8087
8090
  if (t === "idle" || t !== "finished") return;
8088
8091
  const c = r.map((_) => n[_]), f = c.length, p = c.reduce((_, z) => _ + (z.score ?? 0), 0), x = c.reduce((_, z) => {
8089
8092
  const Q = v[z.qid];
8090
8093
  return _ + (Q != null && Q.isCorrect ? z.score ?? 0 : 0);
8091
- }, 0), C = c.map((_) => v[_.qid]).filter((_) => !!_), I = typeof l == "number" && typeof d == "number" ? Math.max(0, d - l) : C.reduce((_, z) => _ + (z.ms ?? 0), 0), E = f > 0 ? Math.round(I / f) : 0, m = [...C].sort((_, z) => _.ms - z.ms), S = m[0], T = m[m.length - 1], k = C.filter((_) => !_.multi), R = C.filter((_) => _.multi), A = k.filter((_) => _.isCorrect).length, B = R.filter((_) => _.isCorrect).length, M = C.filter((_) => _.timedOut).length, P = C.filter((_) => _.revealed).length, N = C.filter((_) => !_.isCorrect).sort((_, z) => z.ms - _.ms).slice(0, 3);
8094
+ }, 0), C = c.map((_) => v[_.qid]).filter((_) => !!_), I = typeof l == "number" && typeof d == "number" ? Math.max(0, d - l) : C.reduce((_, z) => _ + (z.ms ?? 0), 0), E = f > 0 ? Math.round(I / f) : 0, m = [...C].sort((_, z) => _.ms - z.ms), S = m[0], T = m[m.length - 1], k = C.filter((_) => !_.multi), R = C.filter((_) => _.multi), O = k.filter((_) => _.isCorrect).length, B = R.filter((_) => _.isCorrect).length, M = C.filter((_) => _.timedOut).length, P = C.filter((_) => _.revealed).length, N = C.filter((_) => !_.isCorrect).sort((_, z) => z.ms - _.ms).slice(0, 3);
8092
8095
  return {
8093
8096
  total: f,
8094
8097
  correct: s,
@@ -8099,44 +8102,44 @@ const Ed = Dt(function() {
8099
8102
  gainedScore: x,
8100
8103
  fastest: S,
8101
8104
  slowest: T,
8102
- singles: { total: k.length, correct: A },
8105
+ singles: { total: k.length, correct: O },
8103
8106
  multis: { total: R.length, correct: B },
8104
8107
  timedOut: M,
8105
8108
  revealed: P,
8106
8109
  wrongTop3: N
8107
8110
  };
8108
8111
  }, [t, r, n, v, l, d, s]);
8109
- return t === "idle" ? null : /* @__PURE__ */ w("div", { className: he.Overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ w("div", { className: he.Dialog, children: t === "doing" && h ? /* @__PURE__ */ w(
8112
+ return t === "idle" ? null : /* @__PURE__ */ w("div", { className: he.Overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ w("div", { className: he.Dialog, children: t === "doing" && g ? /* @__PURE__ */ w(
8110
8113
  zd,
8111
8114
  {
8112
- q: h,
8115
+ q: g,
8113
8116
  index: o,
8114
8117
  total: r.length,
8115
8118
  selected: b,
8116
8119
  uiReveal: a,
8117
8120
  onSelect: (c) => {
8118
8121
  if (a) return;
8119
- const f = g.getState();
8120
- Ui(h) ? f.selectToggle(c) : f.selectSingle(c);
8122
+ const f = h.getState();
8123
+ Ui(g) ? f.selectToggle(c) : f.selectSingle(c);
8121
8124
  },
8122
- onBeforeNext: () => g.getState().setReveal(!0),
8123
- onNext: () => g.getState().afterRevealNext(),
8125
+ onBeforeNext: () => h.getState().setReveal(!0),
8126
+ onNext: () => h.getState().afterRevealNext(),
8124
8127
  remainingSec: u,
8125
- onClose: () => g.getState().close()
8128
+ onClose: () => h.getState().close()
8126
8129
  }
8127
8130
  ) : /* @__PURE__ */ w(
8128
- Ad,
8131
+ Od,
8129
8132
  {
8130
8133
  total: r.length,
8131
8134
  correct: s,
8132
8135
  summary: y,
8133
- retryAllowed: g.getState().retryAllowed,
8134
- onClose: () => g.getState().close(),
8136
+ retryAllowed: h.getState().retryAllowed,
8137
+ onClose: () => h.getState().close(),
8135
8138
  onRetry: () => {
8136
- const f = g.getState().quizzes;
8139
+ const f = h.getState().quizzes;
8137
8140
  if (!f.length) return;
8138
8141
  const p = f[0];
8139
- g.setState({
8142
+ h.setState({
8140
8143
  phase: "doing",
8141
8144
  currentIndex: 0,
8142
8145
  answers: {},
@@ -8164,14 +8167,14 @@ function zd(e) {
8164
8167
  onNext: a,
8165
8168
  remainingSec: l,
8166
8169
  onClose: d
8167
- } = e, v = Ui(t), g = ye(() => {
8170
+ } = e, v = Ui(t), h = ye(() => {
8168
8171
  const c = t.options.map((f, p) => ({ opt: f, i: p }));
8169
8172
  for (let f = c.length - 1; f > 0; f--) {
8170
8173
  const p = Math.floor(Math.random() * (f + 1));
8171
8174
  [c[f], c[p]] = [c[p], c[f]];
8172
8175
  }
8173
8176
  return c;
8174
- }, [t.options]), h = ye(() => _d(t), [t]), b = ye(() => Md(t), [t]), y = ye(() => {
8177
+ }, [t.options]), g = ye(() => _d(t), [t]), b = ye(() => Md(t), [t]), y = ye(() => {
8175
8178
  const c = [...o].sort((f, p) => f - p);
8176
8179
  if (c.length !== b.length) return !1;
8177
8180
  for (let f = 0; f < c.length; f++) if (c[f] !== b[f]) return !1;
@@ -8192,8 +8195,8 @@ function zd(e) {
8192
8195
  children: i ? y ? `Correct : +${t.score} point` : "Incorrect : 0 point" : "a"
8193
8196
  }
8194
8197
  ),
8195
- /* @__PURE__ */ w("div", { className: he.Image, children: h && /* @__PURE__ */ w("img", { src: h, alt: "" }) }),
8196
- /* @__PURE__ */ w("div", { className: he.Options, children: g.map(({ opt: c, i: f }) => {
8198
+ /* @__PURE__ */ w("div", { className: he.Image, children: g && /* @__PURE__ */ w("img", { src: g, alt: "" }) }),
8199
+ /* @__PURE__ */ w("div", { className: he.Options, children: h.map(({ opt: c, i: f }) => {
8197
8200
  const p = o.includes(f), x = b.includes(f), C = [
8198
8201
  he.OptionBtn,
8199
8202
  p ? he.OptionBtnActive : "",
@@ -8220,7 +8223,7 @@ function zd(e) {
8220
8223
  function Vo(e) {
8221
8224
  return e == null ? "-" : `${Math.round(e / 1e3)}s`;
8222
8225
  }
8223
- function Ad(e) {
8226
+ function Od(e) {
8224
8227
  const { total: t, correct: n, summary: r, retryAllowed: o, onClose: i, onRetry: s } = e, u = (r == null ? void 0 : r.rate) ?? (t > 0 ? Math.round(n / t * 100) : 0);
8225
8228
  return /* @__PURE__ */ Z("div", { className: he.Body, children: [
8226
8229
  /* @__PURE__ */ w("div", { className: he.ResultHeader, children: "결과 요약" }),
@@ -8255,7 +8258,7 @@ function Ad(e) {
8255
8258
  ] })
8256
8259
  ] });
8257
8260
  }
8258
- function Od(e) {
8261
+ function Ad(e) {
8259
8262
  return e.map((t, n) => n);
8260
8263
  }
8261
8264
  function Pd(e, t) {
@@ -8280,7 +8283,7 @@ function $o(e) {
8280
8283
  return {
8281
8284
  sectionId: e.section_id,
8282
8285
  quizzes: t,
8283
- order: Od(t),
8286
+ order: Ad(t),
8284
8287
  currentIndex: 0,
8285
8288
  answers: {},
8286
8289
  correctCount: 0,
@@ -8325,25 +8328,25 @@ function Bd(e, t) {
8325
8328
  const d = a();
8326
8329
  if (!d.quizzes.length) return;
8327
8330
  if (!d.retryAllowed && d.previousResult) {
8328
- const g = {};
8329
- for (const h of d.previousResult.perQuestion)
8330
- g[h.qid] = {
8331
- qid: h.qid,
8332
- index: h.index,
8333
- question: h.question,
8334
- score: h.score,
8335
- multi: h.correctIdxes.length > 1,
8336
- selected: h.selected,
8337
- correctIdxes: h.correctIdxes,
8338
- isCorrect: h.isCorrect,
8339
- ms: h.ms,
8331
+ const h = {};
8332
+ for (const g of d.previousResult.perQuestion)
8333
+ h[g.qid] = {
8334
+ qid: g.qid,
8335
+ index: g.index,
8336
+ question: g.question,
8337
+ score: g.score,
8338
+ multi: g.correctIdxes.length > 1,
8339
+ selected: g.selected,
8340
+ correctIdxes: g.correctIdxes,
8341
+ isCorrect: g.isCorrect,
8342
+ ms: g.ms,
8340
8343
  revealed: !0,
8341
- timedOut: h.timedOut
8344
+ timedOut: g.timedOut
8342
8345
  };
8343
8346
  u({
8344
8347
  phase: "finished",
8345
8348
  correctCount: d.previousResult.correct,
8346
- perQ: g,
8349
+ perQ: h,
8347
8350
  startedAt: void 0,
8348
8351
  finishedAt: void 0
8349
8352
  });
@@ -8380,25 +8383,25 @@ function Bd(e, t) {
8380
8383
  selectToggle: (l) => {
8381
8384
  const d = a();
8382
8385
  if (d.phase !== "doing" || d.uiReveal) return;
8383
- const g = d.quizzes[d.order[d.currentIndex]].qid, h = d.answers[g] ?? [], b = h.includes(l) ? h.filter((y) => y !== l) : [...h, l].sort((y, c) => y - c);
8384
- u({ answers: { ...d.answers, [g]: b } });
8386
+ const h = d.quizzes[d.order[d.currentIndex]].qid, g = d.answers[h] ?? [], b = g.includes(l) ? g.filter((y) => y !== l) : [...g, l].sort((y, c) => y - c);
8387
+ u({ answers: { ...d.answers, [h]: b } });
8385
8388
  },
8386
8389
  selectSingle: (l) => {
8387
8390
  const d = a();
8388
8391
  if (d.phase !== "doing" || d.uiReveal) return;
8389
- const g = d.quizzes[d.order[d.currentIndex]].qid;
8390
- u({ answers: { ...d.answers, [g]: [l] } });
8392
+ const h = d.quizzes[d.order[d.currentIndex]].qid;
8393
+ u({ answers: { ...d.answers, [h]: [l] } });
8391
8394
  },
8392
8395
  submitCurrent: () => {
8393
8396
  const l = a();
8394
8397
  if (l.phase !== "doing") return;
8395
- const d = l.order[l.currentIndex], v = l.quizzes[d], g = v.qid, h = (l.answers[g] ?? []).slice().sort((x, C) => x - C), b = cr(v), y = Pd(h, b), c = l.questionStartedAt ? Date.now() - l.questionStartedAt : 0, f = l.perQ[g], p = {
8396
- qid: g,
8398
+ const d = l.order[l.currentIndex], v = l.quizzes[d], h = v.qid, g = (l.answers[h] ?? []).slice().sort((x, C) => x - C), b = cr(v), y = Pd(g, b), c = l.questionStartedAt ? Date.now() - l.questionStartedAt : 0, f = l.perQ[h], p = {
8399
+ qid: h,
8397
8400
  index: v.index,
8398
8401
  question: v.question,
8399
8402
  score: v.score ?? 0,
8400
8403
  multi: ar(v),
8401
- selected: h,
8404
+ selected: g,
8402
8405
  correctIdxes: b,
8403
8406
  isCorrect: y,
8404
8407
  ms: c,
@@ -8407,7 +8410,7 @@ function Bd(e, t) {
8407
8410
  };
8408
8411
  if (u({
8409
8412
  correctCount: l.correctCount + (y ? 1 : 0),
8410
- perQ: { ...l.perQ, [g]: p }
8413
+ perQ: { ...l.perQ, [h]: p }
8411
8414
  }), l.currentIndex + 1 >= l.order.length)
8412
8415
  u({ uiReveal: !1, remainingSec: void 0 }), a().finish();
8413
8416
  else {
@@ -8424,20 +8427,20 @@ function Bd(e, t) {
8424
8427
  const d = a();
8425
8428
  if (d.phase === "doing") {
8426
8429
  if (l) {
8427
- const v = d.quizzes[d.order[d.currentIndex]], g = v.qid, h = d.perQ[g], b = {
8428
- qid: g,
8430
+ const v = d.quizzes[d.order[d.currentIndex]], h = v.qid, g = d.perQ[h], b = {
8431
+ qid: h,
8429
8432
  index: v.index,
8430
8433
  question: v.question,
8431
8434
  score: v.score ?? 0,
8432
8435
  multi: ar(v),
8433
- selected: (h == null ? void 0 : h.selected) ?? [],
8434
- correctIdxes: (h == null ? void 0 : h.correctIdxes) ?? cr(v),
8435
- isCorrect: (h == null ? void 0 : h.isCorrect) ?? !1,
8436
- ms: (h == null ? void 0 : h.ms) ?? 0,
8436
+ selected: (g == null ? void 0 : g.selected) ?? [],
8437
+ correctIdxes: (g == null ? void 0 : g.correctIdxes) ?? cr(v),
8438
+ isCorrect: (g == null ? void 0 : g.isCorrect) ?? !1,
8439
+ ms: (g == null ? void 0 : g.ms) ?? 0,
8437
8440
  revealed: !0,
8438
- timedOut: (h == null ? void 0 : h.timedOut) ?? !1
8441
+ timedOut: (g == null ? void 0 : g.timedOut) ?? !1
8439
8442
  };
8440
- u({ perQ: { ...d.perQ, [g]: b } });
8443
+ u({ perQ: { ...d.perQ, [h]: b } });
8441
8444
  }
8442
8445
  u({ uiReveal: l });
8443
8446
  }
@@ -8480,23 +8483,23 @@ function Bd(e, t) {
8480
8483
  if (l.phase !== "doing" || l.remainingSec == null) return;
8481
8484
  const d = l.remainingSec - 1;
8482
8485
  if (d <= 0) {
8483
- const v = l.quizzes[l.order[l.currentIndex]], g = v.qid, h = l.perQ[g], b = {
8484
- qid: g,
8486
+ const v = l.quizzes[l.order[l.currentIndex]], h = v.qid, g = l.perQ[h], b = {
8487
+ qid: h,
8485
8488
  index: v.index,
8486
8489
  question: v.question,
8487
8490
  score: v.score ?? 0,
8488
8491
  multi: ar(v),
8489
- selected: (h == null ? void 0 : h.selected) ?? [],
8490
- correctIdxes: (h == null ? void 0 : h.correctIdxes) ?? cr(v),
8491
- isCorrect: (h == null ? void 0 : h.isCorrect) ?? !1,
8492
- ms: (h == null ? void 0 : h.ms) ?? 0,
8492
+ selected: (g == null ? void 0 : g.selected) ?? [],
8493
+ correctIdxes: (g == null ? void 0 : g.correctIdxes) ?? cr(v),
8494
+ isCorrect: (g == null ? void 0 : g.isCorrect) ?? !1,
8495
+ ms: (g == null ? void 0 : g.ms) ?? 0,
8493
8496
  revealed: !0,
8494
8497
  timedOut: !0
8495
8498
  };
8496
8499
  u({
8497
8500
  remainingSec: 0,
8498
8501
  uiReveal: !0,
8499
- perQ: { ...l.perQ, [g]: b }
8502
+ perQ: { ...l.perQ, [h]: b }
8500
8503
  });
8501
8504
  } else
8502
8505
  u({ remainingSec: d });
@@ -8521,14 +8524,14 @@ function Gd({ children: e, initialState: t }) {
8521
8524
  if (u.phase !== "doing" && s.phase === "doing" && ((a = r.current) == null || a.call(r)), u.phase !== "finished" && s.phase === "finished") {
8522
8525
  const l = o.current;
8523
8526
  if (!l || !s.retryAllowed && s.previousResult && !s.startedAt) return;
8524
- const { sectionId: d, quizzes: v, order: g, perQ: h, startedAt: b, finishedAt: y } = s, c = g.map((S) => v[S]), f = c.length, p = c.filter((S) => {
8527
+ const { sectionId: d, quizzes: v, order: h, perQ: g, startedAt: b, finishedAt: y } = s, c = h.map((S) => v[S]), f = c.length, p = c.filter((S) => {
8525
8528
  var T;
8526
- return (T = h[S.qid]) == null ? void 0 : T.isCorrect;
8529
+ return (T = g[S.qid]) == null ? void 0 : T.isCorrect;
8527
8530
  }).length, x = c.reduce((S, T) => S + (T.score ?? 0), 0), C = c.reduce((S, T) => {
8528
- const k = h[T.qid];
8531
+ const k = g[T.qid];
8529
8532
  return S + (k != null && k.isCorrect ? T.score ?? 0 : 0);
8530
8533
  }, 0), I = typeof b == "number" && typeof y == "number" ? Math.max(0, y - b) : 0, E = c.map((S) => {
8531
- const T = h[S.qid];
8534
+ const T = g[S.qid];
8532
8535
  return {
8533
8536
  qid: S.qid,
8534
8537
  index: S.index,
@@ -8621,28 +8624,30 @@ function Hd() {
8621
8624
  const { viewerState: l } = a;
8622
8625
  if (l) {
8623
8626
  l.mode && t.getState().setMode(l.mode);
8624
- const { ...g } = l;
8625
- t.setState(g);
8627
+ const { mode: h, ...g } = l, b = t.getState(), y = {};
8628
+ for (const [c, f] of Object.entries(g))
8629
+ b[c] !== f && (y[c] = f);
8630
+ Object.keys(y).length > 0 && t.setState(y);
8626
8631
  }
8627
8632
  if (typeof a.globalIndex == "number" && n.getState().progress.setCurrentGlobalRunIndex(a.globalIndex, "playback"), (l == null ? void 0 : l.mode) === "scroll" || !(l != null && l.mode)) {
8628
- const g = () => {
8629
- const h = n.getState().progress.getSectionScrollApi();
8630
- if (!h) return !1;
8633
+ const h = () => {
8634
+ const g = n.getState().progress.getSectionScrollApi();
8635
+ if (!g) return !1;
8631
8636
  if (a.scrollY === 0)
8632
- h.setScrollTop(0);
8633
- else if (h.scrollToGIAtOffset) {
8637
+ g.setScrollTop(0);
8638
+ else if (g.scrollToGIAtOffset) {
8634
8639
  const b = a.anchorGI ?? a.globalIndex;
8635
8640
  if (typeof b == "number") {
8636
8641
  const y = a.anchorOffsetRatio ?? 0;
8637
- h.scrollToGIAtOffset(b, y);
8642
+ g.scrollToGIAtOffset(b, y);
8638
8643
  }
8639
8644
  }
8640
8645
  return !0;
8641
8646
  };
8642
- if (!g()) {
8643
- let h = 0;
8647
+ if (!h()) {
8648
+ let g = 0;
8644
8649
  const b = setInterval(() => {
8645
- (g() || ++h >= 10) && clearInterval(b);
8650
+ (h() || ++g >= 10) && clearInterval(b);
8646
8651
  }, 50);
8647
8652
  }
8648
8653
  }
@@ -8660,7 +8665,7 @@ function Hd() {
8660
8665
  [t, n, o]
8661
8666
  ), s = te(() => {
8662
8667
  var I, E, m, S;
8663
- const a = t.getState(), l = n.getState().progress, d = (I = l.getSectionScrollApi) == null ? void 0 : I.call(l), v = l.currentGlobalRunIndex ?? 0, g = ((E = d == null ? void 0 : d.getScrollTop) == null ? void 0 : E.call(d)) ?? 0, h = ((m = d == null ? void 0 : d.getAnchorOffsetRatio) == null ? void 0 : m.call(d, v)) ?? 0, b = o == null ? void 0 : o.getState(), y = b ? {
8668
+ const a = t.getState(), l = n.getState().progress, d = (I = l.getSectionScrollApi) == null ? void 0 : I.call(l), v = l.currentGlobalRunIndex ?? 0, h = ((E = d == null ? void 0 : d.getScrollTop) == null ? void 0 : E.call(d)) ?? 0, g = ((m = d == null ? void 0 : d.getAnchorOffsetRatio) == null ? void 0 : m.call(d, v)) ?? 0, b = o == null ? void 0 : o.getState(), y = b ? {
8664
8669
  status: b.status,
8665
8670
  currentClip: b.currentClip,
8666
8671
  currentTimeMs: b.currentTimeMs
@@ -8696,10 +8701,10 @@ function Hd() {
8696
8701
  viewportHeight: a.viewportHeight
8697
8702
  },
8698
8703
  globalIndex: v,
8699
- scrollY: g,
8704
+ scrollY: h,
8700
8705
  scrollRatio: x,
8701
8706
  anchorGI: v,
8702
- anchorOffsetRatio: h,
8707
+ anchorOffsetRatio: g,
8703
8708
  currentPage: l.pageIndex ?? 0,
8704
8709
  totalPages: l.totalPages,
8705
8710
  sectionId: l.sectionId ?? "",
@@ -8719,9 +8724,9 @@ function Hd() {
8719
8724
  }
8720
8725
  case "scroll": {
8721
8726
  if (t.getState().mode === "page") break;
8722
- const { scrollTop: d, anchorGI: v, anchorOffsetRatio: g } = a.payload, h = n.getState().progress.getSectionScrollApi();
8723
- if (!h) break;
8724
- d === 0 ? h.setScrollTop(0) : h.scrollToGIAtOffset && typeof v == "number" && h.scrollToGIAtOffset(v, g);
8727
+ const { scrollTop: d, anchorGI: v, anchorOffsetRatio: h } = a.payload, g = n.getState().progress.getSectionScrollApi();
8728
+ if (!g) break;
8729
+ d === 0 ? g.setScrollTop(0) : g.scrollToGIAtOffset && typeof v == "number" && g.scrollToGIAtOffset(v, h);
8725
8730
  break;
8726
8731
  }
8727
8732
  case "settings_change": {
@@ -8851,14 +8856,14 @@ function Fd({
8851
8856
  const d = e.current;
8852
8857
  if (!d) return;
8853
8858
  let v;
8854
- const g = requestAnimationFrame(() => {
8859
+ const h = requestAnimationFrame(() => {
8855
8860
  v = requestAnimationFrame(() => {
8856
- const h = Nd(d);
8857
- l.setState({ wordAvgDistancePx: h });
8861
+ const g = Nd(d);
8862
+ l.setState({ wordAvgDistancePx: g });
8858
8863
  });
8859
8864
  });
8860
8865
  return () => {
8861
- cancelAnimationFrame(g), cancelAnimationFrame(v);
8866
+ cancelAnimationFrame(h), cancelAnimationFrame(v);
8862
8867
  };
8863
8868
  }, [
8864
8869
  e,
@@ -8877,26 +8882,26 @@ const Dd = ({
8877
8882
  containerRef: e,
8878
8883
  onTranslate: t
8879
8884
  }) => {
8880
- const n = $((g) => g.rangeStartGI), r = $((g) => g.rangeEndGI), o = $((g) => g.getRangeText), i = $((g) => g.clearRange), s = Tt(), u = n != null && r != null, [a, l] = ft(null);
8885
+ const n = $((h) => h.rangeStartGI), r = $((h) => h.rangeEndGI), o = $((h) => h.getRangeText), i = $((h) => h.clearRange), s = Tt(), u = n != null && r != null, [a, l] = ft(null);
8881
8886
  me(() => {
8882
8887
  if (!u) return;
8883
- const g = e.current;
8884
- if (!g) return;
8885
- let h = !0;
8888
+ const h = e.current;
8889
+ if (!h) return;
8890
+ let g = !0;
8886
8891
  const b = new ResizeObserver(() => {
8887
- if (h) {
8888
- h = !1;
8892
+ if (g) {
8893
+ g = !1;
8889
8894
  return;
8890
8895
  }
8891
8896
  i();
8892
8897
  });
8893
- return b.observe(g), () => b.disconnect();
8898
+ return b.observe(h), () => b.disconnect();
8894
8899
  }, [u, i, e]), me(() => {
8895
8900
  if (!u || n == null || r == null) {
8896
8901
  l(null);
8897
8902
  return;
8898
8903
  }
8899
- const g = () => {
8904
+ const h = () => {
8900
8905
  const c = e.current;
8901
8906
  if (!c) return;
8902
8907
  const f = c.getBoundingClientRect(), x = 1 / (s.getState().playbackScale || 1), C = c.querySelector(`[data-g="${r}"]`);
@@ -8907,33 +8912,33 @@ const Dd = ({
8907
8912
  const I = C.getBoundingClientRect(), E = c.querySelector(`[data-g="${n}"]`), m = E == null ? void 0 : E.getBoundingClientRect();
8908
8913
  let S = (I.left + I.width / 2 - f.left) * x;
8909
8914
  m && (S = ((m.left + I.right) / 2 - f.left) * x);
8910
- const T = 160, k = 50, R = 16, A = 12, B = f.width * x, M = Math.max(
8915
+ const T = 160, k = 50, R = 16, O = 12, B = f.width * x, M = Math.max(
8911
8916
  R + T / 2,
8912
8917
  Math.min(S, B - R - T / 2)
8913
- ), P = (((m == null ? void 0 : m.top) ?? I.top) - f.top) * x - k - A;
8918
+ ), P = (((m == null ? void 0 : m.top) ?? I.top) - f.top) * x - k - O;
8914
8919
  let N = P;
8915
- P < R && (N = (I.bottom - f.top) * x + A), l({ x: M, y: N });
8920
+ P < R && (N = (I.bottom - f.top) * x + O), l({ x: M, y: N });
8916
8921
  };
8917
- g();
8918
- const h = e.current;
8922
+ h();
8923
+ const g = e.current;
8919
8924
  let b = 0;
8920
8925
  const y = () => {
8921
8926
  b || (b = requestAnimationFrame(() => {
8922
- b = 0, g();
8927
+ b = 0, h();
8923
8928
  }));
8924
8929
  };
8925
- return h && h.addEventListener("scroll", y, !0), () => {
8926
- b && cancelAnimationFrame(b), h && h.removeEventListener("scroll", y, !0);
8930
+ return g && g.addEventListener("scroll", y, !0), () => {
8931
+ b && cancelAnimationFrame(b), g && g.removeEventListener("scroll", y, !0);
8927
8932
  };
8928
8933
  }, [u, n, r, e, s]);
8929
8934
  const d = te(() => {
8930
- const g = o();
8931
- g && navigator.clipboard.writeText(g).catch((h) => {
8932
- console.error("복사 실패:", h);
8935
+ const h = o();
8936
+ h && navigator.clipboard.writeText(h).catch((g) => {
8937
+ console.error("복사 실패:", g);
8933
8938
  }), i();
8934
8939
  }, [o, i]), v = te(() => {
8935
- const g = o();
8936
- g && t && t(g);
8940
+ const h = o();
8941
+ h && t && t(h);
8937
8942
  }, [o, t]);
8938
8943
  return !u || !a ? null : /* @__PURE__ */ Z(
8939
8944
  "div",
@@ -8998,8 +9003,8 @@ const Dd = ({
8998
9003
  }, $d = ({ containerRef: e }) => {
8999
9004
  const t = $((c) => c.rangeStartGI), n = $((c) => c.rangeEndGI), r = $((c) => c.setRange), o = Tt(), i = t != null && n != null, [s, u] = ft(null), [a, l] = ft(null), d = oe(null), v = oe({ startGI: t, endGI: n });
9000
9005
  v.current = { startGI: t, endGI: n };
9001
- const g = oe(r);
9002
- g.current = r, me(() => {
9006
+ const h = oe(r);
9007
+ h.current = r, me(() => {
9003
9008
  if (!i || t == null || n == null) {
9004
9009
  u(null), l(null);
9005
9010
  return;
@@ -9031,7 +9036,7 @@ const Dd = ({
9031
9036
  f && f.removeEventListener("scroll", c, !0), window.removeEventListener("resize", c);
9032
9037
  };
9033
9038
  }, [i, t, n, e, o]);
9034
- const h = te((c, f) => {
9039
+ const g = te((c, f) => {
9035
9040
  var x;
9036
9041
  const p = document.elementsFromPoint(c, f);
9037
9042
  for (const C of p) {
@@ -9046,8 +9051,8 @@ const Dd = ({
9046
9051
  if (!d.current) return;
9047
9052
  const { startGI: x, endGI: C } = v.current;
9048
9053
  if (x == null || C == null) return;
9049
- const I = h(p.clientX, p.clientY);
9050
- I != null && (d.current === "start" ? I <= C ? g.current(I, C) : (g.current(C, I), d.current = "end") : I >= x ? g.current(x, I) : (g.current(I, x), d.current = "start"));
9054
+ const I = g(p.clientX, p.clientY);
9055
+ I != null && (d.current === "start" ? I <= C ? h.current(I, C) : (h.current(C, I), d.current = "end") : I >= x ? h.current(x, I) : (h.current(I, x), d.current = "start"));
9051
9056
  }, f = () => {
9052
9057
  d.current = null, setTimeout(() => {
9053
9058
  uo(!1);
@@ -9056,7 +9061,7 @@ const Dd = ({
9056
9061
  return document.addEventListener("pointermove", c), document.addEventListener("pointerup", f), document.addEventListener("pointercancel", f), () => {
9057
9062
  document.removeEventListener("pointermove", c), document.removeEventListener("pointerup", f), document.removeEventListener("pointercancel", f);
9058
9063
  };
9059
- }, [h]);
9064
+ }, [g]);
9060
9065
  const b = te(
9061
9066
  (c) => (f) => {
9062
9067
  f.preventDefault(), f.stopPropagation(), d.current = c, uo(!0);
@@ -9096,7 +9101,7 @@ function qd() {
9096
9101
  if (!r) return;
9097
9102
  const o = (i) => {
9098
9103
  var u;
9099
- if (Ai()) return;
9104
+ if (Oi()) return;
9100
9105
  const s = i.target;
9101
9106
  if (!(s.closest("[data-range-menu]") || s.closest("[data-range-handle]"))) {
9102
9107
  if (s.closest("[data-g]")) {
@@ -9275,8 +9280,8 @@ function e0({
9275
9280
  quizRetryAllowed: l,
9276
9281
  previousQuizResult: d,
9277
9282
  onViewerEvent: v,
9278
- viewerRef: g,
9279
- gazeSync: h,
9283
+ viewerRef: h,
9284
+ gazeSync: g,
9280
9285
  onRequestTranslate: b,
9281
9286
  isPlaybackMode: y = !1,
9282
9287
  playbackScale: c,
@@ -9314,12 +9319,12 @@ function e0({
9314
9319
  onViewerEvent: v,
9315
9320
  isPlaybackMode: y,
9316
9321
  playbackScale: c,
9317
- viewerRef: g,
9322
+ viewerRef: h,
9318
9323
  children: /* @__PURE__ */ w(xu, { initialState: { ...t, isDev: f }, children: /* @__PURE__ */ w(
9319
9324
  yu,
9320
9325
  {
9321
9326
  initialState: I,
9322
- gazeSync: h,
9327
+ gazeSync: g,
9323
9328
  children: /* @__PURE__ */ w(gu, { initialState: E, children: /* @__PURE__ */ w(
9324
9329
  Gd,
9325
9330
  {