@readerseye2/cr_viewer 1.0.27 → 1.0.28
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.cjs +4 -4
- package/dist/index.js +986 -977
- package/dist/recording/DirectPlaybackController.d.ts.map +1 -1
- package/package.json +70 -70
package/dist/index.js
CHANGED
|
@@ -26,38 +26,38 @@ function Xi() {
|
|
|
26
26
|
if (Gr) return Bn;
|
|
27
27
|
Gr = 1;
|
|
28
28
|
var e = W;
|
|
29
|
-
function t(
|
|
30
|
-
return
|
|
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 c(
|
|
34
|
-
var b =
|
|
33
|
+
function c(v, h) {
|
|
34
|
+
var b = h(), m = r({ inst: { value: b, getSnapshot: h } }), y = m[0].inst, u = m[1];
|
|
35
35
|
return i(
|
|
36
36
|
function() {
|
|
37
|
-
y.value = b, y.getSnapshot =
|
|
37
|
+
y.value = b, y.getSnapshot = h, l(y) && u({ inst: y });
|
|
38
38
|
},
|
|
39
|
-
[
|
|
39
|
+
[v, b, h]
|
|
40
40
|
), o(
|
|
41
41
|
function() {
|
|
42
|
-
return l(y) && u({ inst: y }),
|
|
42
|
+
return l(y) && u({ inst: y }), v(function() {
|
|
43
43
|
l(y) && u({ inst: y });
|
|
44
44
|
});
|
|
45
45
|
},
|
|
46
|
-
[
|
|
46
|
+
[v]
|
|
47
47
|
), s(b), b;
|
|
48
48
|
}
|
|
49
|
-
function l(
|
|
50
|
-
var
|
|
51
|
-
|
|
49
|
+
function l(v) {
|
|
50
|
+
var h = v.getSnapshot;
|
|
51
|
+
v = v.value;
|
|
52
52
|
try {
|
|
53
|
-
var b =
|
|
54
|
-
return !n(
|
|
53
|
+
var b = h();
|
|
54
|
+
return !n(v, b);
|
|
55
55
|
} catch {
|
|
56
56
|
return !0;
|
|
57
57
|
}
|
|
58
58
|
}
|
|
59
|
-
function a(
|
|
60
|
-
return
|
|
59
|
+
function a(v, h) {
|
|
60
|
+
return h();
|
|
61
61
|
}
|
|
62
62
|
var d = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? a : c;
|
|
63
63
|
return Bn.useSyncExternalStore = e.useSyncExternalStore !== void 0 ? e.useSyncExternalStore : d, Bn;
|
|
@@ -75,29 +75,29 @@ var zn = {};
|
|
|
75
75
|
var Hr;
|
|
76
76
|
function Yi() {
|
|
77
77
|
return Hr || (Hr = 1, process.env.NODE_ENV !== "production" && (function() {
|
|
78
|
-
function e(b,
|
|
79
|
-
return b ===
|
|
78
|
+
function e(b, m) {
|
|
79
|
+
return b === m && (b !== 0 || 1 / b === 1 / m) || b !== b && m !== m;
|
|
80
80
|
}
|
|
81
|
-
function t(b,
|
|
81
|
+
function t(b, m) {
|
|
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
|
));
|
|
85
|
-
var y =
|
|
86
|
-
if (!
|
|
87
|
-
var u =
|
|
85
|
+
var y = m();
|
|
86
|
+
if (!v) {
|
|
87
|
+
var u = m();
|
|
88
88
|
i(y, u) || (console.error(
|
|
89
89
|
"The result of getSnapshot should be cached to avoid an infinite loop"
|
|
90
|
-
),
|
|
90
|
+
), v = !0);
|
|
91
91
|
}
|
|
92
92
|
u = s({
|
|
93
|
-
inst: { value: y, getSnapshot:
|
|
93
|
+
inst: { value: y, getSnapshot: m }
|
|
94
94
|
});
|
|
95
95
|
var f = u[0].inst, g = u[1];
|
|
96
96
|
return l(
|
|
97
97
|
function() {
|
|
98
|
-
f.value = y, f.getSnapshot =
|
|
98
|
+
f.value = y, f.getSnapshot = m, n(f) && g({ inst: f });
|
|
99
99
|
},
|
|
100
|
-
[b, y,
|
|
100
|
+
[b, y, m]
|
|
101
101
|
), c(
|
|
102
102
|
function() {
|
|
103
103
|
return n(f) && g({ inst: f }), b(function() {
|
|
@@ -108,21 +108,21 @@ function Yi() {
|
|
|
108
108
|
), a(y), y;
|
|
109
109
|
}
|
|
110
110
|
function n(b) {
|
|
111
|
-
var
|
|
111
|
+
var m = b.getSnapshot;
|
|
112
112
|
b = b.value;
|
|
113
113
|
try {
|
|
114
|
-
var y =
|
|
114
|
+
var y = m();
|
|
115
115
|
return !i(b, y);
|
|
116
116
|
} catch {
|
|
117
117
|
return !0;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
120
|
-
function r(b,
|
|
121
|
-
return
|
|
120
|
+
function r(b, m) {
|
|
121
|
+
return m();
|
|
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 = W, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, c = o.useEffect, l = o.useLayoutEffect, a = o.useDebugValue, d = !1,
|
|
125
|
-
zn.useSyncExternalStore = o.useSyncExternalStore !== void 0 ? o.useSyncExternalStore :
|
|
124
|
+
var o = W, i = typeof Object.is == "function" ? Object.is : e, s = o.useState, c = o.useEffect, l = o.useLayoutEffect, a = o.useDebugValue, d = !1, v = !1, h = typeof window > "u" || typeof window.document > "u" || typeof window.document.createElement > "u" ? r : t;
|
|
125
|
+
zn.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
|
})()), zn;
|
|
127
127
|
}
|
|
128
128
|
var Nr;
|
|
@@ -147,28 +147,28 @@ function Qi() {
|
|
|
147
147
|
return a === d && (a !== 0 || 1 / a === 1 / d) || a !== a && d !== d;
|
|
148
148
|
}
|
|
149
149
|
var r = typeof Object.is == "function" ? Object.is : n, o = t.useSyncExternalStore, i = e.useRef, s = e.useEffect, c = e.useMemo, l = e.useDebugValue;
|
|
150
|
-
return Pn.useSyncExternalStoreWithSelector = function(a, d,
|
|
151
|
-
var
|
|
152
|
-
if (
|
|
150
|
+
return Pn.useSyncExternalStoreWithSelector = function(a, d, v, h, b) {
|
|
151
|
+
var m = i(null);
|
|
152
|
+
if (m.current === null) {
|
|
153
153
|
var y = { hasValue: !1, value: null };
|
|
154
|
-
|
|
155
|
-
} else y =
|
|
156
|
-
|
|
154
|
+
m.current = y;
|
|
155
|
+
} else y = m.current;
|
|
156
|
+
m = c(
|
|
157
157
|
function() {
|
|
158
158
|
function f(I) {
|
|
159
159
|
if (!g) {
|
|
160
|
-
if (g = !0, C = I, I =
|
|
161
|
-
var
|
|
162
|
-
if (b(
|
|
163
|
-
return
|
|
160
|
+
if (g = !0, C = I, I = h(I), b !== void 0 && y.hasValue) {
|
|
161
|
+
var p = y.value;
|
|
162
|
+
if (b(p, I))
|
|
163
|
+
return T = p;
|
|
164
164
|
}
|
|
165
|
-
return
|
|
165
|
+
return T = I;
|
|
166
166
|
}
|
|
167
|
-
if (
|
|
168
|
-
var S =
|
|
169
|
-
return b !== void 0 && b(
|
|
167
|
+
if (p = T, r(C, I)) return p;
|
|
168
|
+
var S = h(I);
|
|
169
|
+
return b !== void 0 && b(p, S) ? (C = I, p) : (C = I, T = S);
|
|
170
170
|
}
|
|
171
|
-
var g = !1, C,
|
|
171
|
+
var g = !1, C, T, R = v === void 0 ? null : v;
|
|
172
172
|
return [
|
|
173
173
|
function() {
|
|
174
174
|
return f(d());
|
|
@@ -178,9 +178,9 @@ function Qi() {
|
|
|
178
178
|
}
|
|
179
179
|
];
|
|
180
180
|
},
|
|
181
|
-
[d,
|
|
181
|
+
[d, v, h, b]
|
|
182
182
|
);
|
|
183
|
-
var u = o(a,
|
|
183
|
+
var u = o(a, m[0], m[1]);
|
|
184
184
|
return s(
|
|
185
185
|
function() {
|
|
186
186
|
y.hasValue = !0, y.value = u;
|
|
@@ -207,29 +207,29 @@ function Zi() {
|
|
|
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 = W, n = Uo(), r = typeof Object.is == "function" ? Object.is : e, o = n.useSyncExternalStore, i = t.useRef, s = t.useEffect, c = t.useMemo, l = t.useDebugValue;
|
|
210
|
-
An.useSyncExternalStoreWithSelector = function(a, d,
|
|
211
|
-
var
|
|
212
|
-
if (
|
|
210
|
+
An.useSyncExternalStoreWithSelector = function(a, d, v, h, b) {
|
|
211
|
+
var m = i(null);
|
|
212
|
+
if (m.current === null) {
|
|
213
213
|
var y = { hasValue: !1, value: null };
|
|
214
|
-
|
|
215
|
-
} else y =
|
|
216
|
-
|
|
214
|
+
m.current = y;
|
|
215
|
+
} else y = m.current;
|
|
216
|
+
m = c(
|
|
217
217
|
function() {
|
|
218
218
|
function f(I) {
|
|
219
219
|
if (!g) {
|
|
220
|
-
if (g = !0, C = I, I =
|
|
221
|
-
var
|
|
222
|
-
if (b(
|
|
223
|
-
return
|
|
220
|
+
if (g = !0, C = I, I = h(I), b !== void 0 && y.hasValue) {
|
|
221
|
+
var p = y.value;
|
|
222
|
+
if (b(p, I))
|
|
223
|
+
return T = p;
|
|
224
224
|
}
|
|
225
|
-
return
|
|
225
|
+
return T = I;
|
|
226
226
|
}
|
|
227
|
-
if (
|
|
228
|
-
return
|
|
229
|
-
var S =
|
|
230
|
-
return b !== void 0 && b(
|
|
227
|
+
if (p = T, r(C, I))
|
|
228
|
+
return p;
|
|
229
|
+
var S = h(I);
|
|
230
|
+
return b !== void 0 && b(p, S) ? (C = I, p) : (C = I, T = S);
|
|
231
231
|
}
|
|
232
|
-
var g = !1, C,
|
|
232
|
+
var g = !1, C, T, R = v === void 0 ? null : v;
|
|
233
233
|
return [
|
|
234
234
|
function() {
|
|
235
235
|
return f(d());
|
|
@@ -239,9 +239,9 @@ function Zi() {
|
|
|
239
239
|
}
|
|
240
240
|
];
|
|
241
241
|
},
|
|
242
|
-
[d,
|
|
242
|
+
[d, v, h, b]
|
|
243
243
|
);
|
|
244
|
-
var u = o(a,
|
|
244
|
+
var u = o(a, m[0], m[1]);
|
|
245
245
|
return s(
|
|
246
246
|
function() {
|
|
247
247
|
y.hasValue = !0, y.value = u;
|
|
@@ -259,10 +259,10 @@ var es = Ji();
|
|
|
259
259
|
const ts = /* @__PURE__ */ jo(es), $r = (e) => {
|
|
260
260
|
let t;
|
|
261
261
|
const n = /* @__PURE__ */ new Set(), r = (a, d) => {
|
|
262
|
-
const
|
|
263
|
-
if (!Object.is(
|
|
264
|
-
const
|
|
265
|
-
t = d ?? (typeof
|
|
262
|
+
const v = typeof a == "function" ? a(t) : a;
|
|
263
|
+
if (!Object.is(v, t)) {
|
|
264
|
+
const h = t;
|
|
265
|
+
t = d ?? (typeof v != "object" || v === null) ? v : Object.assign({}, t, v), n.forEach((b) => b(t, h));
|
|
266
266
|
}
|
|
267
267
|
}, o = () => t, c = { setState: r, getState: o, getInitialState: () => l, subscribe: (a) => (n.add(a), () => n.delete(a)) }, l = t = e(r, o, c);
|
|
268
268
|
return c;
|
|
@@ -902,21 +902,21 @@ function wr(e, t, n) {
|
|
|
902
902
|
function Ss(e, t, n, r, o, i, s, c, l) {
|
|
903
903
|
const a = W.useCallback(
|
|
904
904
|
(d) => {
|
|
905
|
-
const
|
|
906
|
-
let
|
|
907
|
-
for (; !
|
|
908
|
-
|
|
909
|
-
const b =
|
|
910
|
-
let
|
|
911
|
-
b && (
|
|
912
|
-
const y = s ? c ? s.scrollLeft : s.scrollTop : b ? c ?
|
|
905
|
+
const v = ys(d.children, t, c ? "offsetWidth" : "offsetHeight", o);
|
|
906
|
+
let h = d.parentElement;
|
|
907
|
+
for (; !h.dataset.virtuosoScroller; )
|
|
908
|
+
h = h.parentElement;
|
|
909
|
+
const b = h.lastElementChild.dataset.viewportType === "window";
|
|
910
|
+
let m;
|
|
911
|
+
b && (m = h.ownerDocument.defaultView);
|
|
912
|
+
const y = s ? c ? s.scrollLeft : s.scrollTop : b ? c ? m.scrollX || m.document.documentElement.scrollLeft : m.scrollY || m.document.documentElement.scrollTop : c ? h.scrollLeft : h.scrollTop, u = s ? c ? s.scrollWidth : s.scrollHeight : b ? c ? m.document.documentElement.scrollWidth : m.document.documentElement.scrollHeight : c ? h.scrollWidth : h.scrollHeight, f = s ? c ? s.offsetWidth : s.offsetHeight : b ? c ? m.innerWidth : m.innerHeight : c ? h.offsetWidth : h.offsetHeight;
|
|
913
913
|
r({
|
|
914
914
|
scrollHeight: u,
|
|
915
915
|
scrollTop: Math.max(y, 0),
|
|
916
916
|
viewportHeight: f
|
|
917
917
|
}), i == null || i(
|
|
918
918
|
c ? Ur("column-gap", getComputedStyle(d).columnGap, o) : Ur("row-gap", getComputedStyle(d).rowGap, o)
|
|
919
|
-
),
|
|
919
|
+
), v !== null && e(v);
|
|
920
920
|
},
|
|
921
921
|
[e, t, o, i, s, r, c]
|
|
922
922
|
);
|
|
@@ -934,8 +934,8 @@ function ys(e, t, n, r) {
|
|
|
934
934
|
const l = parseInt(c.dataset.index), a = parseFloat(c.dataset.knownSize), d = t(c, n);
|
|
935
935
|
if (d === 0 && r("Zero-sized element, this should not happen", { child: c }, Qe.ERROR), d === a)
|
|
936
936
|
continue;
|
|
937
|
-
const
|
|
938
|
-
i.length === 0 ||
|
|
937
|
+
const v = i[i.length - 1];
|
|
938
|
+
i.length === 0 || v.size !== d || v.endIndex !== l - 1 ? i.push({ endIndex: l, size: d, startIndex: l }) : i[i.length - 1].endIndex++;
|
|
939
939
|
}
|
|
940
940
|
return i;
|
|
941
941
|
}
|
|
@@ -948,17 +948,17 @@ function Jo(e, t, n) {
|
|
|
948
948
|
if (!(l != null && l.offsetParent))
|
|
949
949
|
return;
|
|
950
950
|
const a = l.getBoundingClientRect(), d = a.width;
|
|
951
|
-
let
|
|
951
|
+
let v, h;
|
|
952
952
|
if (t) {
|
|
953
|
-
const b = t.getBoundingClientRect(),
|
|
954
|
-
|
|
953
|
+
const b = t.getBoundingClientRect(), m = a.top - b.top;
|
|
954
|
+
h = b.height - Math.max(0, m), v = m + t.scrollTop;
|
|
955
955
|
} else {
|
|
956
956
|
const b = s.current.ownerDocument.defaultView;
|
|
957
|
-
|
|
957
|
+
h = b.innerHeight - Math.max(0, a.top), v = a.top + b.scrollY;
|
|
958
958
|
}
|
|
959
959
|
r.current = {
|
|
960
|
-
offsetTop:
|
|
961
|
-
visibleHeight:
|
|
960
|
+
offsetTop: v,
|
|
961
|
+
visibleHeight: h,
|
|
962
962
|
visibleWidth: d
|
|
963
963
|
}, e(r.current);
|
|
964
964
|
},
|
|
@@ -987,7 +987,7 @@ function Jo(e, t, n) {
|
|
|
987
987
|
}
|
|
988
988
|
const Ke = xe(
|
|
989
989
|
() => {
|
|
990
|
-
const e = ye(), t = ye(), n = H(0), r = ye(), o = H(0), i = ye(), s = ye(), c = H(0), l = H(0), a = H(0), d = H(0),
|
|
990
|
+
const e = ye(), t = ye(), n = H(0), r = ye(), o = H(0), i = ye(), s = ye(), c = H(0), l = H(0), a = H(0), d = H(0), v = ye(), h = ye(), b = H(!1), m = H(!1), y = H(!1);
|
|
991
991
|
return te(
|
|
992
992
|
L(
|
|
993
993
|
e,
|
|
@@ -1006,14 +1006,14 @@ const Ke = xe(
|
|
|
1006
1006
|
fixedHeaderHeight: l,
|
|
1007
1007
|
footerHeight: d,
|
|
1008
1008
|
headerHeight: c,
|
|
1009
|
-
horizontalDirection:
|
|
1010
|
-
scrollBy:
|
|
1009
|
+
horizontalDirection: m,
|
|
1010
|
+
scrollBy: h,
|
|
1011
1011
|
// input
|
|
1012
1012
|
scrollContainerState: e,
|
|
1013
1013
|
scrollHeight: s,
|
|
1014
1014
|
scrollingInProgress: b,
|
|
1015
1015
|
// signals
|
|
1016
|
-
scrollTo:
|
|
1016
|
+
scrollTo: v,
|
|
1017
1017
|
scrollTop: t,
|
|
1018
1018
|
skipAnimationFrameInResizeObserver: y,
|
|
1019
1019
|
smoothScrollTargetReached: r,
|
|
@@ -1228,8 +1228,8 @@ function Cs(e, t) {
|
|
|
1228
1228
|
if (c.some(Os(r)))
|
|
1229
1229
|
continue;
|
|
1230
1230
|
let l = !1, a = !1;
|
|
1231
|
-
for (const { end: d, start:
|
|
1232
|
-
l ? (o >=
|
|
1231
|
+
for (const { end: d, start: v, value: h } of c)
|
|
1232
|
+
l ? (o >= v || i === h) && (e = fr(e, v)) : (a = h !== i, l = !0), d > o && o >= v && h !== i && (e = Ze(e, o + 1, h));
|
|
1233
1233
|
a && (e = Ze(e, s, i));
|
|
1234
1234
|
}
|
|
1235
1235
|
return [e, n];
|
|
@@ -1271,20 +1271,20 @@ function _s(e, [t, n, r, o]) {
|
|
|
1271
1271
|
const i = e.sizeTree;
|
|
1272
1272
|
let s = i, c = 0;
|
|
1273
1273
|
if (n.length > 0 && Ce(i) && t.length === 2) {
|
|
1274
|
-
const
|
|
1275
|
-
s = n.reduce((
|
|
1274
|
+
const h = t[0].size, b = t[1].size;
|
|
1275
|
+
s = n.reduce((m, y) => Ze(Ze(m, y, h), y + 1, b), s);
|
|
1276
1276
|
} else
|
|
1277
1277
|
[s, c] = Cs(s, t);
|
|
1278
1278
|
if (s === i)
|
|
1279
1279
|
return e;
|
|
1280
|
-
const { lastIndex: l, lastOffset: a, lastSize: d, offsetTree:
|
|
1280
|
+
const { lastIndex: l, lastOffset: a, lastSize: d, offsetTree: v } = gr(e.offsetTree, c, s, o);
|
|
1281
1281
|
return {
|
|
1282
1282
|
groupIndices: n,
|
|
1283
|
-
groupOffsetTree: n.reduce((
|
|
1283
|
+
groupOffsetTree: n.reduce((h, b) => Ze(h, b, Zt(b, v, o)), Gt()),
|
|
1284
1284
|
lastIndex: l,
|
|
1285
1285
|
lastOffset: a,
|
|
1286
1286
|
lastSize: d,
|
|
1287
|
-
offsetTree:
|
|
1287
|
+
offsetTree: v,
|
|
1288
1288
|
sizeTree: s
|
|
1289
1289
|
};
|
|
1290
1290
|
}
|
|
@@ -1309,12 +1309,12 @@ function gr(e, t, n, r) {
|
|
|
1309
1309
|
} else
|
|
1310
1310
|
o = [];
|
|
1311
1311
|
for (const { start: a, value: d } of Ht(n, t, 1 / 0)) {
|
|
1312
|
-
const
|
|
1312
|
+
const v = a - i, h = v * s + c + v * r;
|
|
1313
1313
|
o.push({
|
|
1314
1314
|
index: a,
|
|
1315
|
-
offset:
|
|
1315
|
+
offset: h,
|
|
1316
1316
|
size: d
|
|
1317
|
-
}), i = a, c =
|
|
1317
|
+
}), i = a, c = h, s = d;
|
|
1318
1318
|
}
|
|
1319
1319
|
return {
|
|
1320
1320
|
lastIndex: i,
|
|
@@ -1335,31 +1335,31 @@ const Ps = {
|
|
|
1335
1335
|
offsetWidth: "width"
|
|
1336
1336
|
}, gt = xe(
|
|
1337
1337
|
([{ log: e }, { recalcInProgress: t }]) => {
|
|
1338
|
-
const n = ye(), r = ye(), o = je(r, 0), i = ye(), s = ye(), c = H(0), l = H([]), a = H(void 0), d = H(void 0),
|
|
1338
|
+
const n = ye(), r = ye(), o = je(r, 0), i = ye(), s = ye(), c = H(0), l = H([]), a = H(void 0), d = H(void 0), v = H(void 0), h = H(void 0), b = H((p, S) => St(p, Ps[S])), m = H(void 0), y = H(0), u = Is(), f = je(
|
|
1339
1339
|
L(n, be(l, e, y), ht(_s, u), Me()),
|
|
1340
1340
|
u
|
|
1341
1341
|
), g = je(
|
|
1342
1342
|
L(
|
|
1343
1343
|
l,
|
|
1344
1344
|
Me(),
|
|
1345
|
-
ht((
|
|
1345
|
+
ht((p, S) => ({ current: S, prev: p.current }), {
|
|
1346
1346
|
current: [],
|
|
1347
1347
|
prev: []
|
|
1348
1348
|
}),
|
|
1349
|
-
U(({ prev:
|
|
1349
|
+
U(({ prev: p }) => p)
|
|
1350
1350
|
),
|
|
1351
1351
|
[]
|
|
1352
1352
|
);
|
|
1353
1353
|
te(
|
|
1354
1354
|
L(
|
|
1355
1355
|
l,
|
|
1356
|
-
ce((
|
|
1356
|
+
ce((p) => p.length > 0),
|
|
1357
1357
|
be(f, y),
|
|
1358
|
-
U(([
|
|
1359
|
-
const E =
|
|
1358
|
+
U(([p, S, k]) => {
|
|
1359
|
+
const E = p.reduce((O, z, w) => Ze(O, z, Zt(z, S.offsetTree, k) || w), Gt());
|
|
1360
1360
|
return {
|
|
1361
1361
|
...S,
|
|
1362
|
-
groupIndices:
|
|
1362
|
+
groupIndices: p,
|
|
1363
1363
|
groupOffsetTree: E
|
|
1364
1364
|
};
|
|
1365
1365
|
})
|
|
@@ -1369,12 +1369,12 @@ const Ps = {
|
|
|
1369
1369
|
L(
|
|
1370
1370
|
r,
|
|
1371
1371
|
be(f),
|
|
1372
|
-
ce(([
|
|
1373
|
-
U(([
|
|
1372
|
+
ce(([p, { lastIndex: S }]) => p < S),
|
|
1373
|
+
U(([p, { lastIndex: S, lastSize: k }]) => [
|
|
1374
1374
|
{
|
|
1375
1375
|
endIndex: S,
|
|
1376
|
-
size:
|
|
1377
|
-
startIndex:
|
|
1376
|
+
size: k,
|
|
1377
|
+
startIndex: p
|
|
1378
1378
|
}
|
|
1379
1379
|
])
|
|
1380
1380
|
),
|
|
@@ -1383,41 +1383,41 @@ const Ps = {
|
|
|
1383
1383
|
const C = je(
|
|
1384
1384
|
L(
|
|
1385
1385
|
a,
|
|
1386
|
-
U((
|
|
1386
|
+
U((p) => p === void 0)
|
|
1387
1387
|
),
|
|
1388
1388
|
!0
|
|
1389
1389
|
);
|
|
1390
1390
|
te(
|
|
1391
1391
|
L(
|
|
1392
1392
|
d,
|
|
1393
|
-
ce((
|
|
1394
|
-
U((
|
|
1395
|
-
const S = Be(
|
|
1396
|
-
return S ?
|
|
1393
|
+
ce((p) => p !== void 0 && Ce(Be(f).sizeTree)),
|
|
1394
|
+
U((p) => {
|
|
1395
|
+
const S = Be(v), k = Be(l).length > 0;
|
|
1396
|
+
return S ? k ? [
|
|
1397
1397
|
{ endIndex: 0, size: S, startIndex: 0 },
|
|
1398
|
-
{ endIndex: 1, size:
|
|
1399
|
-
] : [] : [{ endIndex: 0, size:
|
|
1398
|
+
{ endIndex: 1, size: p, startIndex: 1 }
|
|
1399
|
+
] : [] : [{ endIndex: 0, size: p, startIndex: 0 }];
|
|
1400
1400
|
})
|
|
1401
1401
|
),
|
|
1402
1402
|
n
|
|
1403
1403
|
), te(
|
|
1404
1404
|
L(
|
|
1405
|
-
|
|
1406
|
-
ce((
|
|
1407
|
-
U((
|
|
1405
|
+
h,
|
|
1406
|
+
ce((p) => p !== void 0 && p.length > 0 && Ce(Be(f).sizeTree)),
|
|
1407
|
+
U((p) => {
|
|
1408
1408
|
const S = [];
|
|
1409
|
-
let
|
|
1410
|
-
for (let O = 1; O <
|
|
1411
|
-
const z =
|
|
1412
|
-
z !==
|
|
1409
|
+
let k = p[0], E = 0;
|
|
1410
|
+
for (let O = 1; O < p.length; O++) {
|
|
1411
|
+
const z = p[O];
|
|
1412
|
+
z !== k && (S.push({
|
|
1413
1413
|
endIndex: O - 1,
|
|
1414
|
-
size:
|
|
1414
|
+
size: k,
|
|
1415
1415
|
startIndex: E
|
|
1416
|
-
}),
|
|
1416
|
+
}), k = z, E = O);
|
|
1417
1417
|
}
|
|
1418
1418
|
return S.push({
|
|
1419
|
-
endIndex:
|
|
1420
|
-
size:
|
|
1419
|
+
endIndex: p.length - 1,
|
|
1420
|
+
size: k,
|
|
1421
1421
|
startIndex: E
|
|
1422
1422
|
}), S;
|
|
1423
1423
|
})
|
|
@@ -1426,12 +1426,12 @@ const Ps = {
|
|
|
1426
1426
|
), te(
|
|
1427
1427
|
L(
|
|
1428
1428
|
l,
|
|
1429
|
-
be(
|
|
1430
|
-
ce(([,
|
|
1431
|
-
U(([
|
|
1429
|
+
be(v, d),
|
|
1430
|
+
ce(([, p, S]) => p !== void 0 && S !== void 0),
|
|
1431
|
+
U(([p, S, k]) => {
|
|
1432
1432
|
const E = [];
|
|
1433
|
-
for (let O = 0; O <
|
|
1434
|
-
const z =
|
|
1433
|
+
for (let O = 0; O < p.length; O++) {
|
|
1434
|
+
const z = p[O], w = p[O + 1];
|
|
1435
1435
|
E.push({
|
|
1436
1436
|
startIndex: z,
|
|
1437
1437
|
endIndex: z,
|
|
@@ -1439,7 +1439,7 @@ const Ps = {
|
|
|
1439
1439
|
}), w !== void 0 && E.push({
|
|
1440
1440
|
startIndex: z + 1,
|
|
1441
1441
|
endIndex: w - 1,
|
|
1442
|
-
size:
|
|
1442
|
+
size: k
|
|
1443
1443
|
});
|
|
1444
1444
|
}
|
|
1445
1445
|
return E;
|
|
@@ -1447,40 +1447,40 @@ const Ps = {
|
|
|
1447
1447
|
),
|
|
1448
1448
|
n
|
|
1449
1449
|
);
|
|
1450
|
-
const
|
|
1450
|
+
const T = Je(
|
|
1451
1451
|
L(
|
|
1452
1452
|
n,
|
|
1453
1453
|
be(f),
|
|
1454
1454
|
ht(
|
|
1455
|
-
({ sizes:
|
|
1456
|
-
changed:
|
|
1457
|
-
sizes:
|
|
1455
|
+
({ sizes: p }, [S, k]) => ({
|
|
1456
|
+
changed: k !== p,
|
|
1457
|
+
sizes: k
|
|
1458
1458
|
}),
|
|
1459
1459
|
{ changed: !1, sizes: u }
|
|
1460
1460
|
),
|
|
1461
|
-
U((
|
|
1461
|
+
U((p) => p.changed)
|
|
1462
1462
|
)
|
|
1463
1463
|
);
|
|
1464
1464
|
Ie(
|
|
1465
1465
|
L(
|
|
1466
1466
|
c,
|
|
1467
1467
|
ht(
|
|
1468
|
-
(
|
|
1468
|
+
(p, S) => ({ diff: p.prev - S, prev: S }),
|
|
1469
1469
|
{ diff: 0, prev: 0 }
|
|
1470
1470
|
),
|
|
1471
|
-
U((
|
|
1471
|
+
U((p) => p.diff)
|
|
1472
1472
|
),
|
|
1473
|
-
(
|
|
1473
|
+
(p) => {
|
|
1474
1474
|
const { groupIndices: S } = Be(f);
|
|
1475
|
-
if (
|
|
1476
|
-
ge(t, !0), ge(i,
|
|
1477
|
-
else if (
|
|
1478
|
-
const
|
|
1479
|
-
|
|
1475
|
+
if (p > 0)
|
|
1476
|
+
ge(t, !0), ge(i, p + Xr(p, S));
|
|
1477
|
+
else if (p < 0) {
|
|
1478
|
+
const k = Be(g);
|
|
1479
|
+
k.length > 0 && (p -= Xr(-p, k)), ge(s, p);
|
|
1480
1480
|
}
|
|
1481
1481
|
}
|
|
1482
|
-
), Ie(L(c, be(e)), ([
|
|
1483
|
-
|
|
1482
|
+
), Ie(L(c, be(e)), ([p, S]) => {
|
|
1483
|
+
p < 0 && S(
|
|
1484
1484
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
1485
1485
|
{ firstItemIndex: c },
|
|
1486
1486
|
Qe.ERROR
|
|
@@ -1491,12 +1491,12 @@ const Ps = {
|
|
|
1491
1491
|
L(
|
|
1492
1492
|
i,
|
|
1493
1493
|
be(f),
|
|
1494
|
-
U(([
|
|
1495
|
-
const
|
|
1496
|
-
if (
|
|
1494
|
+
U(([p, S]) => {
|
|
1495
|
+
const k = S.groupIndices.length > 0, E = [], O = S.lastSize;
|
|
1496
|
+
if (k) {
|
|
1497
1497
|
const z = Yt(S.sizeTree, 0);
|
|
1498
1498
|
let w = 0, _ = 0;
|
|
1499
|
-
for (; w <
|
|
1499
|
+
for (; w < p; ) {
|
|
1500
1500
|
const G = S.groupIndices[_], M = S.groupIndices.length === _ + 1 ? 1 / 0 : S.groupIndices[_ + 1] - G - 1;
|
|
1501
1501
|
E.push({
|
|
1502
1502
|
endIndex: G,
|
|
@@ -1509,24 +1509,24 @@ const Ps = {
|
|
|
1509
1509
|
}), _++, w += M + 1;
|
|
1510
1510
|
}
|
|
1511
1511
|
const P = kt(S.sizeTree);
|
|
1512
|
-
return w !==
|
|
1512
|
+
return w !== p && P.shift(), P.reduce(
|
|
1513
1513
|
(G, { k: M, v: B }) => {
|
|
1514
1514
|
let F = G.ranges;
|
|
1515
1515
|
return G.prevSize !== 0 && (F = [
|
|
1516
1516
|
...G.ranges,
|
|
1517
1517
|
{
|
|
1518
|
-
endIndex: M +
|
|
1518
|
+
endIndex: M + p - 1,
|
|
1519
1519
|
size: G.prevSize,
|
|
1520
1520
|
startIndex: G.prevIndex
|
|
1521
1521
|
}
|
|
1522
1522
|
]), {
|
|
1523
|
-
prevIndex: M +
|
|
1523
|
+
prevIndex: M + p,
|
|
1524
1524
|
prevSize: B,
|
|
1525
1525
|
ranges: F
|
|
1526
1526
|
};
|
|
1527
1527
|
},
|
|
1528
1528
|
{
|
|
1529
|
-
prevIndex:
|
|
1529
|
+
prevIndex: p,
|
|
1530
1530
|
prevSize: 0,
|
|
1531
1531
|
ranges: E
|
|
1532
1532
|
}
|
|
@@ -1534,9 +1534,9 @@ const Ps = {
|
|
|
1534
1534
|
}
|
|
1535
1535
|
return kt(S.sizeTree).reduce(
|
|
1536
1536
|
(z, { k: w, v: _ }) => ({
|
|
1537
|
-
prevIndex: w +
|
|
1537
|
+
prevIndex: w + p,
|
|
1538
1538
|
prevSize: _,
|
|
1539
|
-
ranges: [...z.ranges, { endIndex: w +
|
|
1539
|
+
ranges: [...z.ranges, { endIndex: w + p - 1, size: z.prevSize, startIndex: z.prevIndex }]
|
|
1540
1540
|
}),
|
|
1541
1541
|
{
|
|
1542
1542
|
prevIndex: 0,
|
|
@@ -1552,9 +1552,9 @@ const Ps = {
|
|
|
1552
1552
|
L(
|
|
1553
1553
|
s,
|
|
1554
1554
|
be(f, y),
|
|
1555
|
-
U(([
|
|
1556
|
-
const E = -
|
|
1557
|
-
return Zt(E, S,
|
|
1555
|
+
U(([p, { offsetTree: S }, k]) => {
|
|
1556
|
+
const E = -p;
|
|
1557
|
+
return Zt(E, S, k);
|
|
1558
1558
|
})
|
|
1559
1559
|
)
|
|
1560
1560
|
);
|
|
@@ -1562,35 +1562,35 @@ const Ps = {
|
|
|
1562
1562
|
L(
|
|
1563
1563
|
s,
|
|
1564
1564
|
be(f, y),
|
|
1565
|
-
U(([
|
|
1565
|
+
U(([p, S, k]) => {
|
|
1566
1566
|
if (S.groupIndices.length > 0) {
|
|
1567
1567
|
if (Ce(S.sizeTree))
|
|
1568
1568
|
return S;
|
|
1569
1569
|
let E = Gt();
|
|
1570
1570
|
const O = Be(g);
|
|
1571
1571
|
let z = 0, w = 0, _ = 0;
|
|
1572
|
-
for (; z < -
|
|
1572
|
+
for (; z < -p; ) {
|
|
1573
1573
|
_ = O[w];
|
|
1574
1574
|
const P = O[w + 1] - _ - 1;
|
|
1575
1575
|
w++, z += P + 1;
|
|
1576
1576
|
}
|
|
1577
|
-
if (E = kt(S.sizeTree).reduce((P, { k: G, v: M }) => Ze(P, Math.max(0, G +
|
|
1577
|
+
if (E = kt(S.sizeTree).reduce((P, { k: G, v: M }) => Ze(P, Math.max(0, G + p), M), E), z !== -p) {
|
|
1578
1578
|
const P = Yt(S.sizeTree, _);
|
|
1579
1579
|
E = Ze(E, 0, P);
|
|
1580
|
-
const G = ut(S.sizeTree, -
|
|
1580
|
+
const G = ut(S.sizeTree, -p + 1)[1];
|
|
1581
1581
|
E = Ze(E, 1, G);
|
|
1582
1582
|
}
|
|
1583
1583
|
return {
|
|
1584
1584
|
...S,
|
|
1585
1585
|
sizeTree: E,
|
|
1586
|
-
...gr(S.offsetTree, 0, E,
|
|
1586
|
+
...gr(S.offsetTree, 0, E, k)
|
|
1587
1587
|
};
|
|
1588
1588
|
} else {
|
|
1589
|
-
const E = kt(S.sizeTree).reduce((O, { k: z, v: w }) => Ze(O, Math.max(0, z +
|
|
1589
|
+
const E = kt(S.sizeTree).reduce((O, { k: z, v: w }) => Ze(O, Math.max(0, z + p), w), Gt());
|
|
1590
1590
|
return {
|
|
1591
1591
|
...S,
|
|
1592
1592
|
sizeTree: E,
|
|
1593
|
-
...gr(S.offsetTree, 0, E,
|
|
1593
|
+
...gr(S.offsetTree, 0, E, k)
|
|
1594
1594
|
};
|
|
1595
1595
|
}
|
|
1596
1596
|
})
|
|
@@ -1599,16 +1599,16 @@ const Ps = {
|
|
|
1599
1599
|
), {
|
|
1600
1600
|
beforeUnshiftWith: R,
|
|
1601
1601
|
// input
|
|
1602
|
-
data:
|
|
1602
|
+
data: m,
|
|
1603
1603
|
defaultItemSize: d,
|
|
1604
1604
|
firstItemIndex: c,
|
|
1605
1605
|
fixedItemSize: a,
|
|
1606
|
-
fixedGroupSize:
|
|
1606
|
+
fixedGroupSize: v,
|
|
1607
1607
|
gap: y,
|
|
1608
1608
|
groupIndices: l,
|
|
1609
|
-
heightEstimates:
|
|
1609
|
+
heightEstimates: h,
|
|
1610
1610
|
itemSize: b,
|
|
1611
|
-
listRefresh:
|
|
1611
|
+
listRefresh: T,
|
|
1612
1612
|
shiftWith: s,
|
|
1613
1613
|
shiftWithOffset: I,
|
|
1614
1614
|
sizeRanges: n,
|
|
@@ -1690,11 +1690,11 @@ const on = xe(
|
|
|
1690
1690
|
scrollingInProgress: l,
|
|
1691
1691
|
scrollTo: a,
|
|
1692
1692
|
smoothScrollTargetReached: d,
|
|
1693
|
-
viewportHeight:
|
|
1693
|
+
viewportHeight: v
|
|
1694
1694
|
},
|
|
1695
|
-
{ log:
|
|
1695
|
+
{ log: h }
|
|
1696
1696
|
]) => {
|
|
1697
|
-
const b = ye(),
|
|
1697
|
+
const b = ye(), m = ye(), y = H(0);
|
|
1698
1698
|
let u = null, f = null, g = null;
|
|
1699
1699
|
function C() {
|
|
1700
1700
|
u && (u(), u = null), g && (g(), g = null), f && (clearTimeout(f), f = null), ge(l, !1);
|
|
@@ -1702,20 +1702,20 @@ const on = xe(
|
|
|
1702
1702
|
return te(
|
|
1703
1703
|
L(
|
|
1704
1704
|
b,
|
|
1705
|
-
be(n,
|
|
1705
|
+
be(n, v, r, y, c, s, h),
|
|
1706
1706
|
be(e, i, o),
|
|
1707
1707
|
U(
|
|
1708
1708
|
([
|
|
1709
|
-
[
|
|
1709
|
+
[T, R, I, p, S, k, E, O],
|
|
1710
1710
|
z,
|
|
1711
1711
|
w,
|
|
1712
1712
|
_
|
|
1713
1713
|
]) => {
|
|
1714
|
-
const P = ui(
|
|
1715
|
-
let q = Zt(V, R.offsetTree, z) +
|
|
1714
|
+
const P = ui(T), { align: G, behavior: M, offset: B } = P, F = p - 1, V = ai(P, R, F);
|
|
1715
|
+
let q = Zt(V, R.offsetTree, z) + k;
|
|
1716
1716
|
G === "end" ? (q += w + ut(R.sizeTree, V)[1] - I + _, V === F && (q += E)) : G === "center" ? q += (w + ut(R.sizeTree, V)[1] - I + _) / 2 : q -= S, B && (q += B);
|
|
1717
1717
|
const ue = (de) => {
|
|
1718
|
-
C(), de ? (O("retrying to scroll to", { location:
|
|
1718
|
+
C(), de ? (O("retrying to scroll to", { location: T }, Qe.DEBUG), ge(b, T)) : (ge(m, !0), O("list did not change, scroll successful", {}, Qe.DEBUG));
|
|
1719
1719
|
};
|
|
1720
1720
|
if (C(), M === "smooth") {
|
|
1721
1721
|
let de = !1;
|
|
@@ -1734,7 +1734,7 @@ const on = xe(
|
|
|
1734
1734
|
),
|
|
1735
1735
|
a
|
|
1736
1736
|
), {
|
|
1737
|
-
scrollTargetReached:
|
|
1737
|
+
scrollTargetReached: m,
|
|
1738
1738
|
scrollToIndex: b,
|
|
1739
1739
|
topListHeight: y
|
|
1740
1740
|
};
|
|
@@ -1768,7 +1768,7 @@ const sn = xe(
|
|
|
1768
1768
|
L(
|
|
1769
1769
|
s,
|
|
1770
1770
|
be(l),
|
|
1771
|
-
ce(([d,
|
|
1771
|
+
ce(([d, v]) => !!v),
|
|
1772
1772
|
pt(!1)
|
|
1773
1773
|
),
|
|
1774
1774
|
c
|
|
@@ -1776,7 +1776,7 @@ const sn = xe(
|
|
|
1776
1776
|
L(
|
|
1777
1777
|
s,
|
|
1778
1778
|
be(l),
|
|
1779
|
-
ce(([d,
|
|
1779
|
+
ce(([d, v]) => !!v),
|
|
1780
1780
|
pt(!1)
|
|
1781
1781
|
),
|
|
1782
1782
|
a
|
|
@@ -1784,7 +1784,7 @@ const sn = xe(
|
|
|
1784
1784
|
L(
|
|
1785
1785
|
Fe(t, s),
|
|
1786
1786
|
be(c, n, e, a),
|
|
1787
|
-
ce(([[, d],
|
|
1787
|
+
ce(([[, d], v, { sizeTree: h }, b, m]) => d && (!Ce(h) || yr(b)) && !v && !m),
|
|
1788
1788
|
be(l)
|
|
1789
1789
|
),
|
|
1790
1790
|
([, d]) => {
|
|
@@ -1818,7 +1818,7 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1818
1818
|
viewportHeight: 0
|
|
1819
1819
|
}
|
|
1820
1820
|
}, Hs = 0, ln = xe(([{ footerHeight: e, headerHeight: t, scrollBy: n, scrollContainerState: r, scrollTop: o, viewportHeight: i }]) => {
|
|
1821
|
-
const s = H(!1), c = H(!0), l = ye(), a = ye(), d = H(4),
|
|
1821
|
+
const s = H(!1), c = H(!0), l = ye(), a = ye(), d = H(4), v = H(Hs), h = je(
|
|
1822
1822
|
L(
|
|
1823
1823
|
dr(L(ae(o), _t(1), pt(!0)), L(ae(o), _t(1), pt(!1), jr(100))),
|
|
1824
1824
|
Me()
|
|
@@ -1830,24 +1830,24 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1830
1830
|
);
|
|
1831
1831
|
te(
|
|
1832
1832
|
L(
|
|
1833
|
-
Fe(ae(o), ae(
|
|
1833
|
+
Fe(ae(o), ae(v)),
|
|
1834
1834
|
U(([g, C]) => g <= C),
|
|
1835
1835
|
Me()
|
|
1836
1836
|
),
|
|
1837
1837
|
c
|
|
1838
1838
|
), te(L(c, mt(50)), a);
|
|
1839
|
-
const
|
|
1839
|
+
const m = Je(
|
|
1840
1840
|
L(
|
|
1841
1841
|
Fe(r, ae(i), ae(t), ae(e), ae(d)),
|
|
1842
|
-
ht((g, [{ scrollHeight: C, scrollTop:
|
|
1843
|
-
const
|
|
1842
|
+
ht((g, [{ scrollHeight: C, scrollTop: T }, R, I, p, S]) => {
|
|
1843
|
+
const k = T + R - C > -S, E = {
|
|
1844
1844
|
scrollHeight: C,
|
|
1845
|
-
scrollTop:
|
|
1845
|
+
scrollTop: T,
|
|
1846
1846
|
viewportHeight: R
|
|
1847
1847
|
};
|
|
1848
|
-
if (
|
|
1848
|
+
if (k) {
|
|
1849
1849
|
let z, w;
|
|
1850
|
-
return
|
|
1850
|
+
return T > g.state.scrollTop ? (z = "SCROLLED_DOWN", w = g.state.scrollTop - T) : (z = "SIZE_DECREASED", w = g.state.scrollTop - T || g.scrollTopDelta), {
|
|
1851
1851
|
atBottom: !0,
|
|
1852
1852
|
atBottomBecause: z,
|
|
1853
1853
|
scrollTopDelta: w,
|
|
@@ -1855,7 +1855,7 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1855
1855
|
};
|
|
1856
1856
|
}
|
|
1857
1857
|
let O;
|
|
1858
|
-
return E.scrollHeight > g.state.scrollHeight ? O = "SIZE_INCREASED" : R < g.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" :
|
|
1858
|
+
return E.scrollHeight > g.state.scrollHeight ? O = "SIZE_INCREASED" : R < g.state.viewportHeight ? O = "VIEWPORT_HEIGHT_DECREASING" : T < g.state.scrollTop ? O = "SCROLLING_UPWARDS" : O = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1859
1859
|
atBottom: !1,
|
|
1860
1860
|
notAtBottomBecause: O,
|
|
1861
1861
|
state: E
|
|
@@ -1867,26 +1867,26 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1867
1867
|
L(
|
|
1868
1868
|
r,
|
|
1869
1869
|
ht(
|
|
1870
|
-
(g, { scrollHeight: C, scrollTop:
|
|
1870
|
+
(g, { scrollHeight: C, scrollTop: T, viewportHeight: R }) => {
|
|
1871
1871
|
if (di(g.scrollHeight, C))
|
|
1872
1872
|
return {
|
|
1873
1873
|
changed: !1,
|
|
1874
1874
|
jump: 0,
|
|
1875
1875
|
scrollHeight: C,
|
|
1876
|
-
scrollTop:
|
|
1876
|
+
scrollTop: T
|
|
1877
1877
|
};
|
|
1878
1878
|
{
|
|
1879
|
-
const I = C - (
|
|
1880
|
-
return g.scrollTop !==
|
|
1879
|
+
const I = C - (T + R) < 1;
|
|
1880
|
+
return g.scrollTop !== T && I ? {
|
|
1881
1881
|
changed: !0,
|
|
1882
|
-
jump: g.scrollTop -
|
|
1882
|
+
jump: g.scrollTop - T,
|
|
1883
1883
|
scrollHeight: C,
|
|
1884
|
-
scrollTop:
|
|
1884
|
+
scrollTop: T
|
|
1885
1885
|
} : {
|
|
1886
1886
|
changed: !0,
|
|
1887
1887
|
jump: 0,
|
|
1888
1888
|
scrollHeight: C,
|
|
1889
|
-
scrollTop:
|
|
1889
|
+
scrollTop: T
|
|
1890
1890
|
};
|
|
1891
1891
|
}
|
|
1892
1892
|
},
|
|
@@ -1899,7 +1899,7 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1899
1899
|
);
|
|
1900
1900
|
te(
|
|
1901
1901
|
L(
|
|
1902
|
-
|
|
1902
|
+
m,
|
|
1903
1903
|
U((g) => g.atBottom)
|
|
1904
1904
|
),
|
|
1905
1905
|
s
|
|
@@ -1921,7 +1921,7 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1921
1921
|
const f = H(0);
|
|
1922
1922
|
return te(
|
|
1923
1923
|
L(
|
|
1924
|
-
|
|
1924
|
+
h,
|
|
1925
1925
|
ce((g) => !g),
|
|
1926
1926
|
pt(0)
|
|
1927
1927
|
),
|
|
@@ -1930,21 +1930,21 @@ const Jt = "up", Ut = "down", Ls = "none", Gs = {
|
|
|
1930
1930
|
L(
|
|
1931
1931
|
o,
|
|
1932
1932
|
mt(100),
|
|
1933
|
-
be(
|
|
1933
|
+
be(h),
|
|
1934
1934
|
ce(([g, C]) => C),
|
|
1935
|
-
ht(([g, C], [
|
|
1935
|
+
ht(([g, C], [T]) => [C, T], [0, 0]),
|
|
1936
1936
|
U(([g, C]) => C - g)
|
|
1937
1937
|
),
|
|
1938
1938
|
f
|
|
1939
1939
|
), {
|
|
1940
|
-
atBottomState:
|
|
1940
|
+
atBottomState: m,
|
|
1941
1941
|
atBottomStateChange: l,
|
|
1942
1942
|
atBottomThreshold: d,
|
|
1943
1943
|
atTopStateChange: a,
|
|
1944
|
-
atTopThreshold:
|
|
1944
|
+
atTopThreshold: v,
|
|
1945
1945
|
isAtBottom: s,
|
|
1946
1946
|
isAtTop: c,
|
|
1947
|
-
isScrolling:
|
|
1947
|
+
isScrolling: h,
|
|
1948
1948
|
lastJumpDueToItemResize: y,
|
|
1949
1949
|
scrollDirection: u,
|
|
1950
1950
|
scrollVelocity: f
|
|
@@ -1975,21 +1975,21 @@ const Rr = xe(
|
|
|
1975
1975
|
U(
|
|
1976
1976
|
([
|
|
1977
1977
|
d,
|
|
1978
|
-
|
|
1979
|
-
|
|
1980
|
-
[b,
|
|
1978
|
+
v,
|
|
1979
|
+
h,
|
|
1980
|
+
[b, m],
|
|
1981
1981
|
y,
|
|
1982
1982
|
u,
|
|
1983
1983
|
f,
|
|
1984
1984
|
g,
|
|
1985
1985
|
C
|
|
1986
1986
|
]) => {
|
|
1987
|
-
const
|
|
1988
|
-
let
|
|
1989
|
-
const S = Zr(C, en),
|
|
1990
|
-
return b -= g, b +=
|
|
1991
|
-
Math.max(
|
|
1992
|
-
|
|
1987
|
+
const T = d - g, R = u + f, I = Math.max(h - T, 0);
|
|
1988
|
+
let p = Yr;
|
|
1989
|
+
const S = Zr(C, en), k = Zr(C, tn);
|
|
1990
|
+
return b -= g, b += h + f, m += h + f, m -= g, b > d + R - S && (p = Jt), m < d - I + v + k && (p = Ut), p !== Yr ? [
|
|
1991
|
+
Math.max(T - h - Qr(y, en, p) - S, 0),
|
|
1992
|
+
T - I - f + v + Qr(y, tn, p) + k
|
|
1993
1993
|
] : null;
|
|
1994
1994
|
}
|
|
1995
1995
|
),
|
|
@@ -2040,12 +2040,12 @@ function mn(e, t, n, r, o, i) {
|
|
|
2040
2040
|
const y = e[e.length - 1];
|
|
2041
2041
|
d = y.offset + y.size;
|
|
2042
2042
|
}
|
|
2043
|
-
const
|
|
2043
|
+
const v = n - s, h = c + v * l + (v - 1) * r, b = a, m = h - d;
|
|
2044
2044
|
return {
|
|
2045
2045
|
bottom: d,
|
|
2046
2046
|
firstItemIndex: i,
|
|
2047
2047
|
items: Jr(e, o, i),
|
|
2048
|
-
offsetBottom:
|
|
2048
|
+
offsetBottom: m,
|
|
2049
2049
|
offsetTop: a,
|
|
2050
2050
|
top: b,
|
|
2051
2051
|
topItems: Jr(t, o, i),
|
|
@@ -2061,9 +2061,9 @@ function fi(e, t, n, r, o, i) {
|
|
|
2061
2061
|
break;
|
|
2062
2062
|
s++;
|
|
2063
2063
|
}
|
|
2064
|
-
const c = e + s, l = kr(t, c), a = Array.from({ length: c }).map((d,
|
|
2065
|
-
data: i[
|
|
2066
|
-
index:
|
|
2064
|
+
const c = e + s, l = kr(t, c), a = Array.from({ length: c }).map((d, v) => ({
|
|
2065
|
+
data: i[v + l],
|
|
2066
|
+
index: v + l,
|
|
2067
2067
|
offset: 0,
|
|
2068
2068
|
size: 0
|
|
2069
2069
|
}));
|
|
@@ -2105,10 +2105,10 @@ const Pt = xe(
|
|
|
2105
2105
|
i,
|
|
2106
2106
|
{ listBoundary: s, topListHeight: c, visibleRange: l },
|
|
2107
2107
|
{ initialTopMostItemIndex: a, scrolledToInitialItem: d },
|
|
2108
|
-
{ topListHeight:
|
|
2109
|
-
|
|
2108
|
+
{ topListHeight: v },
|
|
2109
|
+
h,
|
|
2110
2110
|
{ didMount: b },
|
|
2111
|
-
{ recalcInProgress:
|
|
2111
|
+
{ recalcInProgress: m }
|
|
2112
2112
|
]) => {
|
|
2113
2113
|
const y = H([]), u = H(0), f = ye(), g = H(0);
|
|
2114
2114
|
te(i.topItemsIndexes, y);
|
|
@@ -2116,7 +2116,7 @@ const Pt = xe(
|
|
|
2116
2116
|
L(
|
|
2117
2117
|
Fe(
|
|
2118
2118
|
b,
|
|
2119
|
-
|
|
2119
|
+
m,
|
|
2120
2120
|
ae(l, Qt),
|
|
2121
2121
|
ae(o),
|
|
2122
2122
|
ae(r),
|
|
@@ -2128,16 +2128,16 @@ const Pt = xe(
|
|
|
2128
2128
|
ae(g),
|
|
2129
2129
|
e
|
|
2130
2130
|
),
|
|
2131
|
-
ce(([
|
|
2132
|
-
const O = E && E.length !==
|
|
2133
|
-
return
|
|
2131
|
+
ce(([p, S, , k, , , , , , , , E]) => {
|
|
2132
|
+
const O = E && E.length !== k;
|
|
2133
|
+
return p && !S && !O;
|
|
2134
2134
|
}),
|
|
2135
2135
|
U(
|
|
2136
2136
|
([
|
|
2137
2137
|
,
|
|
2138
2138
|
,
|
|
2139
|
-
[
|
|
2140
|
-
|
|
2139
|
+
[p, S],
|
|
2140
|
+
k,
|
|
2141
2141
|
E,
|
|
2142
2142
|
O,
|
|
2143
2143
|
z,
|
|
@@ -2149,15 +2149,15 @@ const Pt = xe(
|
|
|
2149
2149
|
]) => {
|
|
2150
2150
|
var B, F, V, q;
|
|
2151
2151
|
const ue = E, { offsetTree: de, sizeTree: ke } = ue, Re = Be(u);
|
|
2152
|
-
if (
|
|
2153
|
-
return { ...Wn, totalCount:
|
|
2154
|
-
if (
|
|
2155
|
-
return Re === 0 ? { ...Wn, totalCount:
|
|
2152
|
+
if (k === 0)
|
|
2153
|
+
return { ...Wn, totalCount: k };
|
|
2154
|
+
if (p === 0 && S === 0)
|
|
2155
|
+
return Re === 0 ? { ...Wn, totalCount: k } : fi(Re, O, E, _, P, M || []);
|
|
2156
2156
|
if (Ce(ke))
|
|
2157
2157
|
return Re > 0 ? null : mn(
|
|
2158
|
-
Ns(kr(O,
|
|
2158
|
+
Ns(kr(O, k), ue, M),
|
|
2159
2159
|
[],
|
|
2160
|
-
|
|
2160
|
+
k,
|
|
2161
2161
|
P,
|
|
2162
2162
|
ue,
|
|
2163
2163
|
_
|
|
@@ -2173,17 +2173,17 @@ const Pt = xe(
|
|
|
2173
2173
|
}
|
|
2174
2174
|
}
|
|
2175
2175
|
if (!z)
|
|
2176
|
-
return mn([], ee,
|
|
2177
|
-
const X = w.length > 0 ? w[w.length - 1] + 1 : 0, A = Rs(de,
|
|
2176
|
+
return mn([], ee, k, P, ue, _);
|
|
2177
|
+
const X = w.length > 0 ? w[w.length - 1] + 1 : 0, A = Rs(de, p, S, X);
|
|
2178
2178
|
if (A.length === 0)
|
|
2179
2179
|
return null;
|
|
2180
|
-
const K =
|
|
2180
|
+
const K = k - 1, ne = _n([], ($) => {
|
|
2181
2181
|
for (const J of A) {
|
|
2182
2182
|
const se = J.value;
|
|
2183
2183
|
let re = se.offset, pe = J.start;
|
|
2184
2184
|
const le = se.size;
|
|
2185
|
-
if (se.offset <
|
|
2186
|
-
pe += Math.floor((
|
|
2185
|
+
if (se.offset < p) {
|
|
2186
|
+
pe += Math.floor((p - se.offset + P) / (le + P));
|
|
2187
2187
|
const me = pe - J.start;
|
|
2188
2188
|
re += me * le + me * P;
|
|
2189
2189
|
}
|
|
@@ -2213,11 +2213,11 @@ const Pt = xe(
|
|
|
2213
2213
|
}
|
|
2214
2214
|
}
|
|
2215
2215
|
}
|
|
2216
|
-
return mn(ne, ee,
|
|
2216
|
+
return mn(ne, ee, k, P, ue, _);
|
|
2217
2217
|
}
|
|
2218
2218
|
),
|
|
2219
2219
|
//@ts-expect-error filter needs to be fixed
|
|
2220
|
-
ce((
|
|
2220
|
+
ce((p) => p !== null),
|
|
2221
2221
|
Me()
|
|
2222
2222
|
),
|
|
2223
2223
|
Wn
|
|
@@ -2226,66 +2226,66 @@ const Pt = xe(
|
|
|
2226
2226
|
L(
|
|
2227
2227
|
e,
|
|
2228
2228
|
ce(yr),
|
|
2229
|
-
U((
|
|
2229
|
+
U((p) => p == null ? void 0 : p.length)
|
|
2230
2230
|
),
|
|
2231
2231
|
o
|
|
2232
2232
|
), te(
|
|
2233
2233
|
L(
|
|
2234
2234
|
C,
|
|
2235
|
-
U((
|
|
2235
|
+
U((p) => p.topListHeight)
|
|
2236
2236
|
),
|
|
2237
|
-
|
|
2238
|
-
), te(
|
|
2237
|
+
v
|
|
2238
|
+
), te(v, c), te(
|
|
2239
2239
|
L(
|
|
2240
2240
|
C,
|
|
2241
|
-
U((
|
|
2241
|
+
U((p) => [p.top, p.bottom])
|
|
2242
2242
|
),
|
|
2243
2243
|
s
|
|
2244
2244
|
), te(
|
|
2245
2245
|
L(
|
|
2246
2246
|
C,
|
|
2247
|
-
U((
|
|
2247
|
+
U((p) => p.items)
|
|
2248
2248
|
),
|
|
2249
2249
|
f
|
|
2250
2250
|
);
|
|
2251
|
-
const
|
|
2251
|
+
const T = Je(
|
|
2252
2252
|
L(
|
|
2253
2253
|
C,
|
|
2254
|
-
ce(({ items:
|
|
2254
|
+
ce(({ items: p }) => p.length > 0),
|
|
2255
2255
|
be(o, e),
|
|
2256
|
-
ce(([{ items:
|
|
2257
|
-
U(([,
|
|
2256
|
+
ce(([{ items: p }, S]) => p[p.length - 1].originalIndex === S - 1),
|
|
2257
|
+
U(([, p, S]) => [p - 1, S]),
|
|
2258
2258
|
Me(Qt),
|
|
2259
|
-
U(([
|
|
2259
|
+
U(([p]) => p)
|
|
2260
2260
|
)
|
|
2261
2261
|
), R = Je(
|
|
2262
2262
|
L(
|
|
2263
2263
|
C,
|
|
2264
2264
|
mt(200),
|
|
2265
|
-
ce(({ items:
|
|
2266
|
-
U(({ items:
|
|
2265
|
+
ce(({ items: p, topItems: S }) => p.length > 0 && p[0].originalIndex === S.length),
|
|
2266
|
+
U(({ items: p }) => p[0].index),
|
|
2267
2267
|
Me()
|
|
2268
2268
|
)
|
|
2269
2269
|
), I = Je(
|
|
2270
2270
|
L(
|
|
2271
2271
|
C,
|
|
2272
|
-
ce(({ items:
|
|
2273
|
-
U(({ items:
|
|
2274
|
-
let S = 0,
|
|
2275
|
-
for (;
|
|
2272
|
+
ce(({ items: p }) => p.length > 0),
|
|
2273
|
+
U(({ items: p }) => {
|
|
2274
|
+
let S = 0, k = p.length - 1;
|
|
2275
|
+
for (; p[S].type === "group" && S < k; )
|
|
2276
2276
|
S++;
|
|
2277
|
-
for (;
|
|
2278
|
-
|
|
2277
|
+
for (; p[k].type === "group" && k > S; )
|
|
2278
|
+
k--;
|
|
2279
2279
|
return {
|
|
2280
|
-
endIndex:
|
|
2281
|
-
startIndex:
|
|
2280
|
+
endIndex: p[k].index,
|
|
2281
|
+
startIndex: p[S].index
|
|
2282
2282
|
};
|
|
2283
2283
|
}),
|
|
2284
2284
|
Me(ii)
|
|
2285
2285
|
)
|
|
2286
2286
|
);
|
|
2287
2287
|
return {
|
|
2288
|
-
endReached:
|
|
2288
|
+
endReached: T,
|
|
2289
2289
|
initialItemCount: u,
|
|
2290
2290
|
itemsRendered: f,
|
|
2291
2291
|
listState: C,
|
|
@@ -2293,7 +2293,7 @@ const Pt = xe(
|
|
|
2293
2293
|
rangeChanged: I,
|
|
2294
2294
|
startReached: R,
|
|
2295
2295
|
topItemsIndexes: y,
|
|
2296
|
-
...
|
|
2296
|
+
...h
|
|
2297
2297
|
};
|
|
2298
2298
|
},
|
|
2299
2299
|
Ee(
|
|
@@ -2312,7 +2312,7 @@ const Pt = xe(
|
|
|
2312
2312
|
const i = ye(), s = je(
|
|
2313
2313
|
L(
|
|
2314
2314
|
Fe(n, e, r, t, o),
|
|
2315
|
-
U(([c, l, a, d,
|
|
2315
|
+
U(([c, l, a, d, v]) => c + l + a + d + v.offsetBottom + v.bottom)
|
|
2316
2316
|
),
|
|
2317
2317
|
0
|
|
2318
2318
|
);
|
|
@@ -2356,15 +2356,15 @@ const Pt = xe(
|
|
|
2356
2356
|
d,
|
|
2357
2357
|
be(t, l, n, i, o, r, c),
|
|
2358
2358
|
be(e),
|
|
2359
|
-
U(([[
|
|
2360
|
-
const { align:
|
|
2359
|
+
U(([[v, h, b, m, y, u, f, g], C]) => {
|
|
2360
|
+
const { align: T, behavior: R, calculateViewLocation: I = Ws, done: p, ...S } = v, k = ai(v, h, m - 1), E = Zt(k, h.offsetTree, C) + y + u, O = E + ut(h.sizeTree, k)[1], z = g + u, w = g + b - f, _ = I({
|
|
2361
2361
|
itemBottom: O,
|
|
2362
2362
|
itemTop: E,
|
|
2363
|
-
locationParams: { align:
|
|
2363
|
+
locationParams: { align: T, behavior: R, ...S },
|
|
2364
2364
|
viewportBottom: w,
|
|
2365
2365
|
viewportTop: z
|
|
2366
2366
|
});
|
|
2367
|
-
return _ ?
|
|
2367
|
+
return _ ? p && ct(
|
|
2368
2368
|
L(
|
|
2369
2369
|
s,
|
|
2370
2370
|
ce((P) => !P),
|
|
@@ -2372,10 +2372,10 @@ const Pt = xe(
|
|
|
2372
2372
|
// but if scrollingInProgress is true, we skip the initial publish.
|
|
2373
2373
|
_t(Be(s) ? 1 : 2)
|
|
2374
2374
|
),
|
|
2375
|
-
|
|
2376
|
-
) :
|
|
2375
|
+
p
|
|
2376
|
+
) : p == null || p(), _;
|
|
2377
2377
|
}),
|
|
2378
|
-
ce((
|
|
2378
|
+
ce((v) => v !== null)
|
|
2379
2379
|
),
|
|
2380
2380
|
a
|
|
2381
2381
|
), {
|
|
@@ -2396,11 +2396,11 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2396
2396
|
{ scrolledToInitialItem: c },
|
|
2397
2397
|
{ didMount: l, propsReady: a },
|
|
2398
2398
|
{ log: d },
|
|
2399
|
-
{ scrollingInProgress:
|
|
2400
|
-
{ context:
|
|
2399
|
+
{ scrollingInProgress: v },
|
|
2400
|
+
{ context: h },
|
|
2401
2401
|
{ scrollIntoView: b }
|
|
2402
2402
|
]) => {
|
|
2403
|
-
const
|
|
2403
|
+
const m = H(!1), y = ye();
|
|
2404
2404
|
let u = null;
|
|
2405
2405
|
function f(R) {
|
|
2406
2406
|
ge(s, {
|
|
@@ -2412,10 +2412,10 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2412
2412
|
Ie(
|
|
2413
2413
|
L(
|
|
2414
2414
|
Fe(L(ae(t), _t(1)), l),
|
|
2415
|
-
be(ae(
|
|
2416
|
-
U(([[R, I],
|
|
2417
|
-
let O = I &&
|
|
2418
|
-
return O && (z = Ds(
|
|
2415
|
+
be(ae(m), i, c, v),
|
|
2416
|
+
U(([[R, I], p, S, k, E]) => {
|
|
2417
|
+
let O = I && k, z = "auto";
|
|
2418
|
+
return O && (z = Ds(p, S || E), O = O && !!z), { followOutputBehavior: z, shouldFollow: O, totalCount: R };
|
|
2419
2419
|
}),
|
|
2420
2420
|
ce(({ shouldFollow: R }) => R)
|
|
2421
2421
|
),
|
|
@@ -2428,31 +2428,31 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2428
2428
|
}
|
|
2429
2429
|
);
|
|
2430
2430
|
function g(R) {
|
|
2431
|
-
const I = ct(o, (
|
|
2432
|
-
R && !
|
|
2431
|
+
const I = ct(o, (p) => {
|
|
2432
|
+
R && !p.atBottom && p.notAtBottomBecause === "SIZE_INCREASED" && !u && (Be(d)("scrolling to bottom due to increased size", {}, Qe.DEBUG), f("auto"));
|
|
2433
2433
|
});
|
|
2434
2434
|
setTimeout(I, 100);
|
|
2435
2435
|
}
|
|
2436
2436
|
Ie(
|
|
2437
2437
|
L(
|
|
2438
|
-
Fe(ae(
|
|
2438
|
+
Fe(ae(m), t, a),
|
|
2439
2439
|
ce(([R, , I]) => R && I),
|
|
2440
2440
|
ht(
|
|
2441
2441
|
({ value: R }, [, I]) => ({ refreshed: R === I, value: I }),
|
|
2442
2442
|
{ refreshed: !1, value: 0 }
|
|
2443
2443
|
),
|
|
2444
2444
|
ce(({ refreshed: R }) => R),
|
|
2445
|
-
be(
|
|
2445
|
+
be(m, t)
|
|
2446
2446
|
),
|
|
2447
2447
|
([, R]) => {
|
|
2448
2448
|
Be(c) && g(R !== !1);
|
|
2449
2449
|
}
|
|
2450
2450
|
), Ie(y, () => {
|
|
2451
|
-
g(Be(
|
|
2452
|
-
}), Ie(Fe(ae(
|
|
2451
|
+
g(Be(m) !== !1);
|
|
2452
|
+
}), Ie(Fe(ae(m), o), ([R, I]) => {
|
|
2453
2453
|
R && !I.atBottom && I.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && f("auto");
|
|
2454
2454
|
});
|
|
2455
|
-
const C = H(null),
|
|
2455
|
+
const C = H(null), T = ye();
|
|
2456
2456
|
return te(
|
|
2457
2457
|
dr(
|
|
2458
2458
|
L(
|
|
@@ -2464,12 +2464,12 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2464
2464
|
),
|
|
2465
2465
|
L(ae(t))
|
|
2466
2466
|
),
|
|
2467
|
-
|
|
2467
|
+
T
|
|
2468
2468
|
), Ie(
|
|
2469
2469
|
L(
|
|
2470
|
-
Fe(L(
|
|
2471
|
-
be(ae(C), c,
|
|
2472
|
-
U(([[R, I],
|
|
2470
|
+
Fe(L(T, _t(1)), l),
|
|
2471
|
+
be(ae(C), c, v, h),
|
|
2472
|
+
U(([[R, I], p, S, k, E]) => I && S && (p == null ? void 0 : p({ context: E, totalCount: R, scrollingInProgress: k }))),
|
|
2473
2473
|
ce((R) => !!R),
|
|
2474
2474
|
mt(0)
|
|
2475
2475
|
),
|
|
@@ -2480,7 +2480,7 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2480
2480
|
Be(d)("scrolling into view", {}), ge(b, R), u = null;
|
|
2481
2481
|
});
|
|
2482
2482
|
}
|
|
2483
|
-
), { autoscrollToBottom: y, followOutput:
|
|
2483
|
+
), { autoscrollToBottom: y, followOutput: m, scrollIntoViewOnChange: C };
|
|
2484
2484
|
},
|
|
2485
2485
|
Ee(
|
|
2486
2486
|
gt,
|
|
@@ -2500,7 +2500,7 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2500
2500
|
be(i),
|
|
2501
2501
|
ce(([, l]) => l !== 0),
|
|
2502
2502
|
be(o, r, t, n, e),
|
|
2503
|
-
U(([[, l], a, d,
|
|
2503
|
+
U(([[, l], a, d, v, h, b = []]) => fi(l, a, d, v, h, b))
|
|
2504
2504
|
),
|
|
2505
2505
|
s
|
|
2506
2506
|
), {}),
|
|
@@ -2605,15 +2605,15 @@ const Ds = (e, t) => typeof e == "function" ? to(e(t)) : t && to(e), $s = xe(
|
|
|
2605
2605
|
{ didMount: i },
|
|
2606
2606
|
{ useWindowScroll: s, windowScrollContainerState: c, windowViewportRect: l }
|
|
2607
2607
|
]) => {
|
|
2608
|
-
const a = ye(), d = H(void 0),
|
|
2609
|
-
return te(c,
|
|
2608
|
+
const a = ye(), d = H(void 0), v = H(null), h = H(null);
|
|
2609
|
+
return te(c, v), te(l, h), Ie(
|
|
2610
2610
|
L(
|
|
2611
2611
|
a,
|
|
2612
|
-
be(t, r, s,
|
|
2612
|
+
be(t, r, s, v, h, n)
|
|
2613
2613
|
),
|
|
2614
|
-
([b,
|
|
2615
|
-
const
|
|
2616
|
-
u && f !== null && g !== null && (y = f.scrollTop - g.offsetTop), y -= C, b({ ranges:
|
|
2614
|
+
([b, m, y, u, f, g, C]) => {
|
|
2615
|
+
const T = Ms(m.sizeTree);
|
|
2616
|
+
u && f !== null && g !== null && (y = f.scrollTop - g.offsetTop), y -= C, b({ ranges: T, scrollTop: y });
|
|
2617
2617
|
}
|
|
2618
2618
|
), te(L(d, ce(yr), U(Us)), o), te(
|
|
2619
2619
|
L(
|
|
@@ -2654,25 +2654,25 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2654
2654
|
{ deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
|
|
2655
2655
|
{ isAtBottom: o, isScrolling: i, lastJumpDueToItemResize: s, scrollDirection: c },
|
|
2656
2656
|
{ listState: l },
|
|
2657
|
-
{ beforeUnshiftWith: a, gap: d, shiftWithOffset:
|
|
2657
|
+
{ beforeUnshiftWith: a, gap: d, shiftWithOffset: v, sizes: h },
|
|
2658
2658
|
{ log: b },
|
|
2659
|
-
{ recalcInProgress:
|
|
2659
|
+
{ recalcInProgress: m }
|
|
2660
2660
|
]) => {
|
|
2661
2661
|
const y = Je(
|
|
2662
2662
|
L(
|
|
2663
2663
|
l,
|
|
2664
2664
|
be(s),
|
|
2665
2665
|
ht(
|
|
2666
|
-
([, f, g, C], [{ bottom:
|
|
2667
|
-
const
|
|
2666
|
+
([, f, g, C], [{ bottom: T, items: R, offsetBottom: I, totalCount: p }, S]) => {
|
|
2667
|
+
const k = T + I;
|
|
2668
2668
|
let E = 0;
|
|
2669
|
-
return g ===
|
|
2669
|
+
return g === p && f.length > 0 && R.length > 0 && (R[0].originalIndex === 0 && f[0].originalIndex === 0 || (E = k - C, E !== 0 && (E += S))), [E, R, p, k];
|
|
2670
2670
|
},
|
|
2671
2671
|
[0, [], 0, 0]
|
|
2672
2672
|
),
|
|
2673
2673
|
ce(([f]) => f !== 0),
|
|
2674
|
-
be(r, c, n, o, b,
|
|
2675
|
-
ce(([, f, g, C, , ,
|
|
2674
|
+
be(r, c, n, o, b, m),
|
|
2675
|
+
ce(([, f, g, C, , , T]) => !T && !C && f !== 0 && g === Jt),
|
|
2676
2676
|
U(([[f], , , , , g]) => (g("Upward scrolling compensation", { amount: f }, Qe.DEBUG), f))
|
|
2677
2677
|
)
|
|
2678
2678
|
);
|
|
@@ -2683,7 +2683,7 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2683
2683
|
C && Xs() ? ge(e, g - f) : u(-f);
|
|
2684
2684
|
}), Ie(
|
|
2685
2685
|
L(
|
|
2686
|
-
Fe(je(i, !1), e,
|
|
2686
|
+
Fe(je(i, !1), e, m),
|
|
2687
2687
|
ce(([f, g, C]) => !f && !C && g !== 0),
|
|
2688
2688
|
U(([f, g]) => g),
|
|
2689
2689
|
mt(1)
|
|
@@ -2691,37 +2691,37 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2691
2691
|
u
|
|
2692
2692
|
), te(
|
|
2693
2693
|
L(
|
|
2694
|
-
|
|
2694
|
+
v,
|
|
2695
2695
|
U((f) => ({ top: -f }))
|
|
2696
2696
|
),
|
|
2697
2697
|
t
|
|
2698
2698
|
), Ie(
|
|
2699
2699
|
L(
|
|
2700
2700
|
a,
|
|
2701
|
-
be(
|
|
2702
|
-
U(([f, { groupIndices: g, lastSize: C, sizeTree:
|
|
2703
|
-
function I(
|
|
2704
|
-
return
|
|
2701
|
+
be(h, d),
|
|
2702
|
+
U(([f, { groupIndices: g, lastSize: C, sizeTree: T }, R]) => {
|
|
2703
|
+
function I(p) {
|
|
2704
|
+
return p * (C + R);
|
|
2705
2705
|
}
|
|
2706
2706
|
if (g.length === 0)
|
|
2707
2707
|
return I(f);
|
|
2708
2708
|
{
|
|
2709
|
-
let
|
|
2710
|
-
const S = Yt(
|
|
2711
|
-
let
|
|
2712
|
-
for (;
|
|
2713
|
-
|
|
2709
|
+
let p = 0;
|
|
2710
|
+
const S = Yt(T, 0);
|
|
2711
|
+
let k = 0, E = 0;
|
|
2712
|
+
for (; k < f; ) {
|
|
2713
|
+
k++, p += S;
|
|
2714
2714
|
let O = g.length === E + 1 ? 1 / 0 : g[E + 1] - g[E] - 1;
|
|
2715
|
-
|
|
2715
|
+
k + O > f && (p -= S, O = f - k + 1), k += O, p += I(O), E++;
|
|
2716
2716
|
}
|
|
2717
|
-
return
|
|
2717
|
+
return p;
|
|
2718
2718
|
}
|
|
2719
2719
|
})
|
|
2720
2720
|
),
|
|
2721
2721
|
(f) => {
|
|
2722
2722
|
ge(e, f), requestAnimationFrame(() => {
|
|
2723
2723
|
ge(t, { top: f }), requestAnimationFrame(() => {
|
|
2724
|
-
ge(e, 0), ge(
|
|
2724
|
+
ge(e, 0), ge(m, !1);
|
|
2725
2725
|
});
|
|
2726
2726
|
});
|
|
2727
2727
|
}
|
|
@@ -2781,25 +2781,25 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2781
2781
|
itemSize: l,
|
|
2782
2782
|
sizeRanges: a,
|
|
2783
2783
|
sizes: d,
|
|
2784
|
-
statefulTotalCount:
|
|
2785
|
-
totalCount:
|
|
2784
|
+
statefulTotalCount: v,
|
|
2785
|
+
totalCount: h,
|
|
2786
2786
|
trackItemSizes: b
|
|
2787
2787
|
},
|
|
2788
|
-
{ initialItemFinalLocationReached:
|
|
2788
|
+
{ initialItemFinalLocationReached: m, initialTopMostItemIndex: y, scrolledToInitialItem: u },
|
|
2789
2789
|
f,
|
|
2790
2790
|
g,
|
|
2791
2791
|
C,
|
|
2792
|
-
|
|
2792
|
+
T,
|
|
2793
2793
|
{ scrollToIndex: R },
|
|
2794
2794
|
I,
|
|
2795
|
-
{ topItemCount:
|
|
2795
|
+
{ topItemCount: p },
|
|
2796
2796
|
{ groupCounts: S },
|
|
2797
|
-
|
|
2797
|
+
k
|
|
2798
2798
|
]) => {
|
|
2799
|
-
const { listState: E, minOverscanItemCount: O, topItemsIndexes: z, rangeChanged: w, ..._ } =
|
|
2800
|
-
return te(w,
|
|
2799
|
+
const { listState: E, minOverscanItemCount: O, topItemsIndexes: z, rangeChanged: w, ..._ } = T;
|
|
2800
|
+
return te(w, k.scrollSeekRangeChanged), te(
|
|
2801
2801
|
L(
|
|
2802
|
-
|
|
2802
|
+
k.windowViewportRect,
|
|
2803
2803
|
U((P) => P.visibleHeight)
|
|
2804
2804
|
),
|
|
2805
2805
|
f.viewportHeight
|
|
@@ -2812,14 +2812,14 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2812
2812
|
gap: i,
|
|
2813
2813
|
groupCounts: S,
|
|
2814
2814
|
heightEstimates: c,
|
|
2815
|
-
initialItemFinalLocationReached:
|
|
2815
|
+
initialItemFinalLocationReached: m,
|
|
2816
2816
|
initialTopMostItemIndex: y,
|
|
2817
2817
|
scrolledToInitialItem: u,
|
|
2818
2818
|
sizeRanges: a,
|
|
2819
|
-
topItemCount:
|
|
2819
|
+
topItemCount: p,
|
|
2820
2820
|
topItemsIndexes: z,
|
|
2821
2821
|
// input
|
|
2822
|
-
totalCount:
|
|
2822
|
+
totalCount: h,
|
|
2823
2823
|
...C,
|
|
2824
2824
|
groupIndices: s,
|
|
2825
2825
|
itemSize: l,
|
|
@@ -2827,13 +2827,13 @@ const Xs = bi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2827
2827
|
minOverscanItemCount: O,
|
|
2828
2828
|
scrollToIndex: R,
|
|
2829
2829
|
// output
|
|
2830
|
-
statefulTotalCount:
|
|
2830
|
+
statefulTotalCount: v,
|
|
2831
2831
|
trackItemSizes: b,
|
|
2832
2832
|
// exported from stateFlagsSystem
|
|
2833
2833
|
rangeChanged: w,
|
|
2834
2834
|
..._,
|
|
2835
2835
|
// the bag of IO from featureGroup1System
|
|
2836
|
-
...
|
|
2836
|
+
...k,
|
|
2837
2837
|
...f,
|
|
2838
2838
|
sizes: d,
|
|
2839
2839
|
...g
|
|
@@ -2881,29 +2881,29 @@ function Si(e, t, n) {
|
|
|
2881
2881
|
}
|
|
2882
2882
|
function a(u) {
|
|
2883
2883
|
return i.reduce((f, g) => (f[g] = (C) => {
|
|
2884
|
-
const
|
|
2885
|
-
ge(
|
|
2884
|
+
const T = u[t.methods[g]];
|
|
2885
|
+
ge(T, C);
|
|
2886
2886
|
}, f), {});
|
|
2887
2887
|
}
|
|
2888
2888
|
function d(u) {
|
|
2889
2889
|
return s.reduce((f, g) => (f[g] = hs(u[t.events[g]]), f), {});
|
|
2890
2890
|
}
|
|
2891
|
-
const
|
|
2892
|
-
const { children: g, ...C } = u, [
|
|
2893
|
-
l(
|
|
2894
|
-
})), [R] = W.useState(qr(d,
|
|
2891
|
+
const v = W.forwardRef((u, f) => {
|
|
2892
|
+
const { children: g, ...C } = u, [T] = W.useState(() => _n(ms(e), (p) => {
|
|
2893
|
+
l(p, C);
|
|
2894
|
+
})), [R] = W.useState(qr(d, T));
|
|
2895
2895
|
dn(() => {
|
|
2896
|
-
for (const
|
|
2897
|
-
|
|
2896
|
+
for (const p of s)
|
|
2897
|
+
p in C && Ie(R[p], C[p]);
|
|
2898
2898
|
return () => {
|
|
2899
2899
|
Object.values(R).map(xr);
|
|
2900
2900
|
};
|
|
2901
|
-
}, [C, R,
|
|
2902
|
-
l(
|
|
2903
|
-
}), W.useImperativeHandle(f, Vr(a(
|
|
2901
|
+
}, [C, R, T]), dn(() => {
|
|
2902
|
+
l(T, C);
|
|
2903
|
+
}), W.useImperativeHandle(f, Vr(a(T)));
|
|
2904
2904
|
const I = n;
|
|
2905
|
-
return /* @__PURE__ */ x(c.Provider, { value:
|
|
2906
|
-
}),
|
|
2905
|
+
return /* @__PURE__ */ x(c.Provider, { value: T, children: n ? /* @__PURE__ */ x(I, { ...Zs([...r, ...o, ...s], C), children: g }) : g });
|
|
2906
|
+
}), h = (u) => {
|
|
2907
2907
|
const f = W.useContext(c);
|
|
2908
2908
|
return W.useCallback(
|
|
2909
2909
|
(g) => {
|
|
@@ -2921,23 +2921,23 @@ function Si(e, t, n) {
|
|
|
2921
2921
|
() => Be(f),
|
|
2922
2922
|
() => Be(f)
|
|
2923
2923
|
);
|
|
2924
|
-
},
|
|
2924
|
+
}, m = (u) => {
|
|
2925
2925
|
const f = W.useContext(c)[u], [g, C] = W.useState(qr(Be, f));
|
|
2926
2926
|
return dn(
|
|
2927
|
-
() => Ie(f, (
|
|
2928
|
-
|
|
2927
|
+
() => Ie(f, (T) => {
|
|
2928
|
+
T !== g && C(Vr(T));
|
|
2929
2929
|
}),
|
|
2930
2930
|
[f, g]
|
|
2931
2931
|
), g;
|
|
2932
|
-
}, y = W.version.startsWith("18") ? b :
|
|
2932
|
+
}, y = W.version.startsWith("18") ? b : m;
|
|
2933
2933
|
return {
|
|
2934
|
-
Component:
|
|
2934
|
+
Component: v,
|
|
2935
2935
|
useEmitter: (u, f) => {
|
|
2936
2936
|
const g = W.useContext(c)[u];
|
|
2937
2937
|
dn(() => Ie(g, f), [f, g]);
|
|
2938
2938
|
},
|
|
2939
2939
|
useEmitterValue: y,
|
|
2940
|
-
usePublisher:
|
|
2940
|
+
usePublisher: h
|
|
2941
2941
|
};
|
|
2942
2942
|
}
|
|
2943
2943
|
const yi = W.createContext(void 0), xi = W.createContext(void 0), wi = typeof document < "u" ? W.useLayoutEffect : W.useEffect;
|
|
@@ -2949,54 +2949,54 @@ function Js(e) {
|
|
|
2949
2949
|
}
|
|
2950
2950
|
function Ii(e, t, n, r = $t, o, i) {
|
|
2951
2951
|
const s = W.useRef(null), c = W.useRef(null), l = W.useRef(null), a = W.useCallback(
|
|
2952
|
-
(
|
|
2953
|
-
let b,
|
|
2954
|
-
const u =
|
|
2952
|
+
(h) => {
|
|
2953
|
+
let b, m, y;
|
|
2954
|
+
const u = h.target;
|
|
2955
2955
|
if (Js(u) || Dn(u)) {
|
|
2956
2956
|
const g = Dn(u) ? u : u.defaultView;
|
|
2957
|
-
y = i ? g.scrollX : g.scrollY, b = i ? g.document.documentElement.scrollWidth : g.document.documentElement.scrollHeight,
|
|
2957
|
+
y = i ? g.scrollX : g.scrollY, b = i ? g.document.documentElement.scrollWidth : g.document.documentElement.scrollHeight, m = i ? g.innerWidth : g.innerHeight;
|
|
2958
2958
|
} else
|
|
2959
|
-
y = i ? u.scrollLeft : u.scrollTop, b = i ? u.scrollWidth : u.scrollHeight,
|
|
2959
|
+
y = i ? u.scrollLeft : u.scrollTop, b = i ? u.scrollWidth : u.scrollHeight, m = i ? u.offsetWidth : u.offsetHeight;
|
|
2960
2960
|
const f = () => {
|
|
2961
2961
|
e({
|
|
2962
2962
|
scrollHeight: b,
|
|
2963
2963
|
scrollTop: Math.max(y, 0),
|
|
2964
|
-
viewportHeight:
|
|
2964
|
+
viewportHeight: m
|
|
2965
2965
|
});
|
|
2966
2966
|
};
|
|
2967
|
-
|
|
2967
|
+
h.suppressFlushSync ? f() : Ki.flushSync(f), c.current !== null && (y === c.current || y <= 0 || y === b - m) && (c.current = null, t(!0), l.current && (clearTimeout(l.current), l.current = null));
|
|
2968
2968
|
},
|
|
2969
2969
|
[e, t, i]
|
|
2970
2970
|
);
|
|
2971
2971
|
W.useEffect(() => {
|
|
2972
|
-
const
|
|
2973
|
-
return r(o || s.current), a({ suppressFlushSync: !0, target:
|
|
2974
|
-
r(null),
|
|
2972
|
+
const h = o || s.current;
|
|
2973
|
+
return r(o || s.current), a({ suppressFlushSync: !0, target: h }), h.addEventListener("scroll", a, { passive: !0 }), () => {
|
|
2974
|
+
r(null), h.removeEventListener("scroll", a);
|
|
2975
2975
|
};
|
|
2976
2976
|
}, [s, a, n, r, o]);
|
|
2977
|
-
function d(
|
|
2977
|
+
function d(h) {
|
|
2978
2978
|
const b = s.current;
|
|
2979
2979
|
if (!b || (i ? "offsetWidth" in b && b.offsetWidth === 0 : "offsetHeight" in b && b.offsetHeight === 0))
|
|
2980
2980
|
return;
|
|
2981
|
-
const
|
|
2981
|
+
const m = h.behavior === "smooth";
|
|
2982
2982
|
let y, u, f;
|
|
2983
2983
|
Dn(b) ? (u = Math.max(
|
|
2984
2984
|
St(b.document.documentElement, i ? "width" : "height"),
|
|
2985
2985
|
i ? b.document.documentElement.scrollWidth : b.document.documentElement.scrollHeight
|
|
2986
2986
|
), y = i ? b.innerWidth : b.innerHeight, f = i ? window.scrollX : window.scrollY) : (u = b[i ? "scrollWidth" : "scrollHeight"], y = St(b, i ? "width" : "height"), f = b[i ? "scrollLeft" : "scrollTop"]);
|
|
2987
2987
|
const g = u - y;
|
|
2988
|
-
if (
|
|
2989
|
-
e({ scrollHeight: u, scrollTop: f, viewportHeight: y }),
|
|
2988
|
+
if (h.top = Math.ceil(Math.max(Math.min(g, h.top), 0)), di(y, u) || h.top === f) {
|
|
2989
|
+
e({ scrollHeight: u, scrollTop: f, viewportHeight: y }), m && t(!0);
|
|
2990
2990
|
return;
|
|
2991
2991
|
}
|
|
2992
|
-
|
|
2992
|
+
m ? (c.current = h.top, l.current && clearTimeout(l.current), l.current = setTimeout(() => {
|
|
2993
2993
|
l.current = null, c.current = null, t(!0);
|
|
2994
|
-
}, 1e3)) : c.current = null, i && (
|
|
2994
|
+
}, 1e3)) : c.current = null, i && (h = { behavior: h.behavior, left: h.top }), b.scrollTo(h);
|
|
2995
2995
|
}
|
|
2996
|
-
function
|
|
2997
|
-
i && (
|
|
2996
|
+
function v(h) {
|
|
2997
|
+
i && (h = { behavior: h.behavior, left: h.top }), s.current.scrollBy(h);
|
|
2998
2998
|
}
|
|
2999
|
-
return { scrollByCallback:
|
|
2999
|
+
return { scrollByCallback: v, scrollerRef: s, scrollToCallback: d };
|
|
3000
3000
|
}
|
|
3001
3001
|
const $n = "-webkit-sticky", no = "sticky", Mr = bi(() => {
|
|
3002
3002
|
if (typeof document > "u")
|
|
@@ -3037,13 +3037,13 @@ const el = /* @__PURE__ */ xe(() => {
|
|
|
3037
3037
|
([e, t]) => ({ ...e, ...t }),
|
|
3038
3038
|
Ee(vi, el)
|
|
3039
3039
|
), nl = ({ height: e }) => /* @__PURE__ */ x("div", { style: { height: e } }), rl = { overflowAnchor: "none", position: Mr(), zIndex: 1 }, Ci = { overflowAnchor: "none" }, ol = { ...Ci, display: "inline-block", height: "100%" }, ro = /* @__PURE__ */ W.memo(function({ showTopList: e = !1 }) {
|
|
3040
|
-
const t = fe("listState"), n = rt("sizeRanges"), r = fe("useWindowScroll"), o = fe("customScrollParent"), i = rt("windowScrollContainerState"), s = rt("scrollContainerState"), c = o || r ? i : s, l = fe("itemContent"), a = fe("context"), d = fe("groupContent"),
|
|
3040
|
+
const t = fe("listState"), n = rt("sizeRanges"), r = fe("useWindowScroll"), o = fe("customScrollParent"), i = rt("windowScrollContainerState"), s = rt("scrollContainerState"), c = o || r ? i : s, l = fe("itemContent"), a = fe("context"), d = fe("groupContent"), v = fe("trackItemSizes"), h = fe("itemSize"), b = fe("log"), m = rt("gap"), y = fe("horizontalDirection"), { callbackRef: u } = Ss(
|
|
3041
3041
|
n,
|
|
3042
|
-
|
|
3043
|
-
|
|
3042
|
+
h,
|
|
3043
|
+
v,
|
|
3044
3044
|
e ? $t : c,
|
|
3045
3045
|
b,
|
|
3046
|
-
|
|
3046
|
+
m,
|
|
3047
3047
|
o,
|
|
3048
3048
|
y,
|
|
3049
3049
|
fe("skipAnimationFrameInResizeObserver")
|
|
@@ -3051,7 +3051,7 @@ const el = /* @__PURE__ */ xe(() => {
|
|
|
3051
3051
|
Or("deviation", (_) => {
|
|
3052
3052
|
f !== _ && g(_);
|
|
3053
3053
|
});
|
|
3054
|
-
const C = fe("EmptyPlaceholder"),
|
|
3054
|
+
const C = fe("EmptyPlaceholder"), T = fe("ScrollSeekPlaceholder") || nl, R = fe("ListComponent"), I = fe("ItemComponent"), p = fe("GroupComponent"), S = fe("computeItemKey"), k = fe("isSeeking"), E = fe("groupIndices").length > 0, O = fe("alignToBottom"), z = fe("initialItemFinalLocationReached"), w = e ? {} : {
|
|
3055
3055
|
boxSizing: "border-box",
|
|
3056
3056
|
...y ? {
|
|
3057
3057
|
display: "inline-block",
|
|
@@ -3076,10 +3076,10 @@ const el = /* @__PURE__ */ xe(() => {
|
|
|
3076
3076
|
style: w,
|
|
3077
3077
|
children: (e ? t.topItems : t.items).map((_) => {
|
|
3078
3078
|
const P = _.originalIndex, G = S(P + t.firstItemIndex, _.data, a);
|
|
3079
|
-
return
|
|
3080
|
-
|
|
3079
|
+
return k ? /* @__PURE__ */ hn(
|
|
3080
|
+
T,
|
|
3081
3081
|
{
|
|
3082
|
-
...qe(
|
|
3082
|
+
...qe(T, a),
|
|
3083
3083
|
height: _.size,
|
|
3084
3084
|
index: _.index,
|
|
3085
3085
|
key: G,
|
|
@@ -3087,9 +3087,9 @@ const el = /* @__PURE__ */ xe(() => {
|
|
|
3087
3087
|
..._.type === "group" ? {} : { groupIndex: _.groupIndex }
|
|
3088
3088
|
}
|
|
3089
3089
|
) : _.type === "group" ? /* @__PURE__ */ hn(
|
|
3090
|
-
|
|
3090
|
+
p,
|
|
3091
3091
|
{
|
|
3092
|
-
...qe(
|
|
3092
|
+
...qe(p, a),
|
|
3093
3093
|
"data-index": P,
|
|
3094
3094
|
"data-item-index": _.index,
|
|
3095
3095
|
"data-known-size": _.size,
|
|
@@ -3170,21 +3170,21 @@ const cl = /* @__PURE__ */ W.memo(function() {
|
|
|
3170
3170
|
});
|
|
3171
3171
|
function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3172
3172
|
return W.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3173
|
-
const c = n("scrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("scrollerRef"),
|
|
3173
|
+
const c = n("scrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("scrollerRef"), v = t("horizontalDirection") || !1, { scrollByCallback: h, scrollerRef: b, scrollToCallback: m } = Ii(
|
|
3174
3174
|
c,
|
|
3175
3175
|
a,
|
|
3176
3176
|
l,
|
|
3177
3177
|
d,
|
|
3178
3178
|
void 0,
|
|
3179
|
-
|
|
3179
|
+
v
|
|
3180
3180
|
);
|
|
3181
|
-
return e("scrollTo",
|
|
3181
|
+
return e("scrollTo", m), e("scrollBy", h), /* @__PURE__ */ x(
|
|
3182
3182
|
l,
|
|
3183
3183
|
{
|
|
3184
3184
|
"data-testid": "virtuoso-scroller",
|
|
3185
3185
|
"data-virtuoso-scroller": !0,
|
|
3186
3186
|
ref: b,
|
|
3187
|
-
style: { ...
|
|
3187
|
+
style: { ...v ? sl : il, ...o },
|
|
3188
3188
|
tabIndex: 0,
|
|
3189
3189
|
...s,
|
|
3190
3190
|
...qe(l, i),
|
|
@@ -3195,24 +3195,24 @@ function Ti({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
|
3195
3195
|
}
|
|
3196
3196
|
function ki({ useEmitter: e, useEmitterValue: t, usePublisher: n }) {
|
|
3197
3197
|
return W.memo(function({ children: r, style: o, context: i, ...s }) {
|
|
3198
|
-
const c = n("windowScrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("totalListHeight"),
|
|
3198
|
+
const c = n("windowScrollContainerState"), l = t("ScrollerComponent"), a = n("smoothScrollTargetReached"), d = t("totalListHeight"), v = t("deviation"), h = t("customScrollParent"), b = W.useRef(null), m = t("scrollerRef"), { scrollByCallback: y, scrollerRef: u, scrollToCallback: f } = Ii(
|
|
3199
3199
|
c,
|
|
3200
3200
|
a,
|
|
3201
3201
|
l,
|
|
3202
|
-
|
|
3203
|
-
|
|
3202
|
+
m,
|
|
3203
|
+
h
|
|
3204
3204
|
);
|
|
3205
3205
|
return wi(() => {
|
|
3206
3206
|
var g;
|
|
3207
|
-
return u.current =
|
|
3207
|
+
return u.current = h || ((g = b.current) == null ? void 0 : g.ownerDocument.defaultView), () => {
|
|
3208
3208
|
u.current = null;
|
|
3209
3209
|
};
|
|
3210
|
-
}, [u,
|
|
3210
|
+
}, [u, h]), e("windowScrollTo", f), e("scrollBy", y), /* @__PURE__ */ x(
|
|
3211
3211
|
l,
|
|
3212
3212
|
{
|
|
3213
3213
|
ref: b,
|
|
3214
3214
|
"data-virtuoso-scroller": !0,
|
|
3215
|
-
style: { position: "relative", ...o, ...d !== 0 ? { height: d +
|
|
3215
|
+
style: { position: "relative", ...o, ...d !== 0 ? { height: d + v } : {} },
|
|
3216
3216
|
...s,
|
|
3217
3217
|
...qe(l, i),
|
|
3218
3218
|
children: r
|
|
@@ -3328,7 +3328,7 @@ const dl = ({ children: e }) => {
|
|
|
3328
3328
|
] })), r = H(null), o = H(null), i = H({}), s = H(Er), c = H($t), l = (a, d = null) => je(
|
|
3329
3329
|
L(
|
|
3330
3330
|
i,
|
|
3331
|
-
U((
|
|
3331
|
+
U((v) => v[a]),
|
|
3332
3332
|
Me()
|
|
3333
3333
|
),
|
|
3334
3334
|
d
|
|
@@ -3391,17 +3391,17 @@ function wl(e, t) {
|
|
|
3391
3391
|
const Il = /* @__PURE__ */ xe(
|
|
3392
3392
|
([
|
|
3393
3393
|
{ increaseViewportBy: e, listBoundary: t, overscan: n, visibleRange: r },
|
|
3394
|
-
{ footerHeight: o, headerHeight: i, scrollBy: s, scrollContainerState: c, scrollTo: l, scrollTop: a, smoothScrollTargetReached: d, viewportHeight:
|
|
3395
|
-
|
|
3394
|
+
{ footerHeight: o, headerHeight: i, scrollBy: s, scrollContainerState: c, scrollTo: l, scrollTop: a, smoothScrollTargetReached: d, viewportHeight: v },
|
|
3395
|
+
h,
|
|
3396
3396
|
b,
|
|
3397
|
-
{ didMount:
|
|
3398
|
-
{ customScrollParent: u, useWindowScroll: f, windowScrollContainerState: g, windowScrollTo: C, windowViewportRect:
|
|
3397
|
+
{ didMount: m, propsReady: y },
|
|
3398
|
+
{ customScrollParent: u, useWindowScroll: f, windowScrollContainerState: g, windowScrollTo: C, windowViewportRect: T },
|
|
3399
3399
|
R
|
|
3400
3400
|
]) => {
|
|
3401
|
-
const I = H(0),
|
|
3401
|
+
const I = H(0), p = H(0), S = H(oo), k = H({ height: 0, width: 0 }), E = H({ height: 0, width: 0 }), O = ye(), z = ye(), w = H(0), _ = H(null), P = H({ column: 0, row: 0 }), G = ye(), M = ye(), B = H(!1), F = H(0), V = H(!0), q = H(!1), ue = H(!1);
|
|
3402
3402
|
Ie(
|
|
3403
3403
|
L(
|
|
3404
|
-
|
|
3404
|
+
m,
|
|
3405
3405
|
be(F),
|
|
3406
3406
|
ce(([A, K]) => !!K)
|
|
3407
3407
|
),
|
|
@@ -3410,7 +3410,7 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3410
3410
|
}
|
|
3411
3411
|
), Ie(
|
|
3412
3412
|
L(
|
|
3413
|
-
Fe(
|
|
3413
|
+
Fe(m, V, E, k, F, q),
|
|
3414
3414
|
ce(([A, K, ne, N, , oe]) => A && !K && ne.height !== 0 && N.height !== 0 && !oe)
|
|
3415
3415
|
),
|
|
3416
3416
|
([, , , , A]) => {
|
|
@@ -3426,28 +3426,28 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3426
3426
|
ce((A) => A != null && A.scrollTop > 0),
|
|
3427
3427
|
pt(0)
|
|
3428
3428
|
),
|
|
3429
|
-
|
|
3429
|
+
p
|
|
3430
3430
|
), Ie(
|
|
3431
3431
|
L(
|
|
3432
|
-
|
|
3432
|
+
m,
|
|
3433
3433
|
be(M),
|
|
3434
3434
|
ce(([, A]) => A != null)
|
|
3435
3435
|
),
|
|
3436
3436
|
([, A]) => {
|
|
3437
|
-
A && (ge(
|
|
3437
|
+
A && (ge(k, A.viewport), ge(E, A.item), ge(P, A.gap), A.scrollTop > 0 && (ge(B, !0), ct(L(a, _t(1)), (K) => {
|
|
3438
3438
|
ge(B, !1);
|
|
3439
3439
|
}), ge(l, { top: A.scrollTop })));
|
|
3440
3440
|
}
|
|
3441
3441
|
), te(
|
|
3442
3442
|
L(
|
|
3443
|
-
|
|
3443
|
+
k,
|
|
3444
3444
|
U(({ height: A }) => A)
|
|
3445
3445
|
),
|
|
3446
|
-
|
|
3446
|
+
v
|
|
3447
3447
|
), te(
|
|
3448
3448
|
L(
|
|
3449
3449
|
Fe(
|
|
3450
|
-
ae(
|
|
3450
|
+
ae(k, fn),
|
|
3451
3451
|
ae(E, fn),
|
|
3452
3452
|
ae(P, (A, K) => A && A.column === K.column && A.row === K.row),
|
|
3453
3453
|
ae(a)
|
|
@@ -3467,9 +3467,9 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3467
3467
|
r,
|
|
3468
3468
|
ae(P, wl),
|
|
3469
3469
|
ae(E, fn),
|
|
3470
|
-
ae(
|
|
3470
|
+
ae(k, fn),
|
|
3471
3471
|
ae(_),
|
|
3472
|
-
ae(
|
|
3472
|
+
ae(p),
|
|
3473
3473
|
ae(B),
|
|
3474
3474
|
ae(V),
|
|
3475
3475
|
ae(F)
|
|
@@ -3513,7 +3513,7 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3513
3513
|
I
|
|
3514
3514
|
), te(
|
|
3515
3515
|
L(
|
|
3516
|
-
Fe(
|
|
3516
|
+
Fe(k, E, S, P),
|
|
3517
3517
|
ce(([A, K, { items: ne }]) => ne.length > 0 && K.height !== 0 && A.height !== 0),
|
|
3518
3518
|
U(([A, K, { items: ne }, N]) => {
|
|
3519
3519
|
const { bottom: oe, top: $ } = ao(A, N, K, ne);
|
|
@@ -3567,7 +3567,7 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3567
3567
|
te(ee, b.scrollSeekRangeChanged), te(
|
|
3568
3568
|
L(
|
|
3569
3569
|
O,
|
|
3570
|
-
be(
|
|
3570
|
+
be(k, E, I, P),
|
|
3571
3571
|
U(([A, K, ne, N, oe]) => {
|
|
3572
3572
|
const $ = ui(A), { align: J, behavior: se, offset: re } = $;
|
|
3573
3573
|
let pe = $.index;
|
|
@@ -3587,10 +3587,10 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3587
3587
|
);
|
|
3588
3588
|
return te(
|
|
3589
3589
|
L(
|
|
3590
|
-
|
|
3590
|
+
T,
|
|
3591
3591
|
U((A) => ({ height: A.visibleHeight, width: A.visibleWidth }))
|
|
3592
3592
|
),
|
|
3593
|
-
|
|
3593
|
+
k
|
|
3594
3594
|
), {
|
|
3595
3595
|
customScrollParent: u,
|
|
3596
3596
|
// input
|
|
@@ -3600,7 +3600,7 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3600
3600
|
gap: P,
|
|
3601
3601
|
headerHeight: i,
|
|
3602
3602
|
increaseViewportBy: e,
|
|
3603
|
-
initialItemCount:
|
|
3603
|
+
initialItemCount: p,
|
|
3604
3604
|
itemDimensions: E,
|
|
3605
3605
|
overscan: n,
|
|
3606
3606
|
restoreStateFrom: M,
|
|
@@ -3613,17 +3613,17 @@ const Il = /* @__PURE__ */ xe(
|
|
|
3613
3613
|
smoothScrollTargetReached: d,
|
|
3614
3614
|
totalCount: I,
|
|
3615
3615
|
useWindowScroll: f,
|
|
3616
|
-
viewportDimensions:
|
|
3616
|
+
viewportDimensions: k,
|
|
3617
3617
|
windowScrollContainerState: g,
|
|
3618
3618
|
windowScrollTo: C,
|
|
3619
|
-
windowViewportRect:
|
|
3619
|
+
windowViewportRect: T,
|
|
3620
3620
|
...b,
|
|
3621
3621
|
// output
|
|
3622
3622
|
gridState: S,
|
|
3623
3623
|
horizontalDirection: ue,
|
|
3624
3624
|
initialTopMostItemIndex: F,
|
|
3625
3625
|
totalListHeight: X,
|
|
3626
|
-
...
|
|
3626
|
+
...h,
|
|
3627
3627
|
endReached: ke,
|
|
3628
3628
|
propsReady: y,
|
|
3629
3629
|
rangeChanged: ee,
|
|
@@ -3650,13 +3650,13 @@ function mr(e, t, n, r) {
|
|
|
3650
3650
|
return s > 0 ? s + t.row : s;
|
|
3651
3651
|
}
|
|
3652
3652
|
const Cl = /* @__PURE__ */ xe(() => {
|
|
3653
|
-
const e = H((
|
|
3653
|
+
const e = H((v) => `Item ${v}`), t = H({}), n = H(null), r = H("virtuoso-grid-item"), o = H("virtuoso-grid-list"), i = H(Er), s = H("div"), c = H($t), l = (v, h = null) => je(
|
|
3654
3654
|
L(
|
|
3655
3655
|
t,
|
|
3656
|
-
U((b) => b[
|
|
3656
|
+
U((b) => b[v]),
|
|
3657
3657
|
Me()
|
|
3658
3658
|
),
|
|
3659
|
-
|
|
3659
|
+
h
|
|
3660
3660
|
), a = H(!1), d = H(!1);
|
|
3661
3661
|
return te(ae(d), a), {
|
|
3662
3662
|
components: t,
|
|
@@ -3680,29 +3680,29 @@ const Cl = /* @__PURE__ */ xe(() => {
|
|
|
3680
3680
|
([e, t]) => ({ ...e, ...t }),
|
|
3681
3681
|
Ee(Il, Cl)
|
|
3682
3682
|
), kl = /* @__PURE__ */ W.memo(function() {
|
|
3683
|
-
const e = Pe("gridState"), t = Pe("listClassName"), n = Pe("itemClassName"), r = Pe("itemContent"), o = Pe("computeItemKey"), i = Pe("isSeeking"), s = ot("scrollHeight"), c = Pe("ItemComponent"), l = Pe("ListComponent"), a = Pe("ScrollSeekPlaceholder"), d = Pe("context"),
|
|
3683
|
+
const e = Pe("gridState"), t = Pe("listClassName"), n = Pe("itemClassName"), r = Pe("itemContent"), o = Pe("computeItemKey"), i = Pe("isSeeking"), s = ot("scrollHeight"), c = Pe("ItemComponent"), l = Pe("ListComponent"), a = Pe("ScrollSeekPlaceholder"), d = Pe("context"), v = ot("itemDimensions"), h = ot("gap"), b = Pe("log"), m = Pe("stateRestoreInProgress"), y = ot("reportReadyState"), u = Ot(
|
|
3684
3684
|
W.useMemo(
|
|
3685
3685
|
() => (f) => {
|
|
3686
3686
|
const g = f.parentElement.parentElement.scrollHeight;
|
|
3687
3687
|
s(g);
|
|
3688
3688
|
const C = f.firstChild;
|
|
3689
3689
|
if (C) {
|
|
3690
|
-
const { height:
|
|
3691
|
-
|
|
3690
|
+
const { height: T, width: R } = C.getBoundingClientRect();
|
|
3691
|
+
v({ height: T, width: R });
|
|
3692
3692
|
}
|
|
3693
|
-
|
|
3693
|
+
h({
|
|
3694
3694
|
column: co("column-gap", getComputedStyle(f).columnGap, b),
|
|
3695
3695
|
row: co("row-gap", getComputedStyle(f).rowGap, b)
|
|
3696
3696
|
});
|
|
3697
3697
|
},
|
|
3698
|
-
[s,
|
|
3698
|
+
[s, v, h, b]
|
|
3699
3699
|
),
|
|
3700
3700
|
!0,
|
|
3701
3701
|
!1
|
|
3702
3702
|
);
|
|
3703
3703
|
return wi(() => {
|
|
3704
3704
|
e.itemHeight > 0 && e.itemWidth > 0 && y(!0);
|
|
3705
|
-
}, [e]),
|
|
3705
|
+
}, [e]), m ? null : /* @__PURE__ */ x(
|
|
3706
3706
|
l,
|
|
3707
3707
|
{
|
|
3708
3708
|
className: t,
|
|
@@ -3904,7 +3904,7 @@ const Kl = Object.freeze({
|
|
|
3904
3904
|
pointerColor: void 0
|
|
3905
3905
|
}), Mi = W.memo(
|
|
3906
3906
|
function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
|
|
3907
|
-
const i = _e((O) => O.setClipIndex), s = _e((O) => O.seek), c = j((O) => O.setCurrentGlobalRunIndex), l = yn(), a = j((O) => O.rangeStartGI), d = j((O) => O.rangeEndGI),
|
|
3907
|
+
const i = _e((O) => O.setClipIndex), s = _e((O) => O.seek), c = j((O) => O.setCurrentGlobalRunIndex), l = yn(), a = j((O) => O.rangeStartGI), d = j((O) => O.rangeEndGI), v = j((O) => O.setRange), h = a != null && d != null, b = Q(
|
|
3908
3908
|
(O) => {
|
|
3909
3909
|
var F;
|
|
3910
3910
|
const z = (F = O.target) == null ? void 0 : F.closest("[data-g]");
|
|
@@ -3918,29 +3918,29 @@ const Kl = Object.freeze({
|
|
|
3918
3918
|
M != null && B != null && (i(M), s(B));
|
|
3919
3919
|
},
|
|
3920
3920
|
[t, r, s, i, c]
|
|
3921
|
-
),
|
|
3921
|
+
), m = ie(null), y = ie(!1), u = ie({ x: 0, y: 0 }), f = Q(
|
|
3922
3922
|
(O) => {
|
|
3923
3923
|
var P;
|
|
3924
3924
|
const z = (P = O.target) == null ? void 0 : P.closest("[data-g]");
|
|
3925
3925
|
if (!z) return;
|
|
3926
3926
|
const w = Number(z.dataset.g), _ = w - r;
|
|
3927
|
-
_ < 0 || _ >= t.length || (y.current = !1, u.current = { x: O.clientX, y: O.clientY },
|
|
3928
|
-
l.getState().status !== "playing" && (
|
|
3927
|
+
_ < 0 || _ >= t.length || (y.current = !1, u.current = { x: O.clientX, y: O.clientY }, m.current && (window.clearTimeout(m.current), m.current = null), m.current = window.setTimeout(() => {
|
|
3928
|
+
l.getState().status !== "playing" && (v(w, w), y.current = !0, m.current = null);
|
|
3929
3929
|
}, 800));
|
|
3930
3930
|
},
|
|
3931
|
-
[t, r,
|
|
3931
|
+
[t, r, v, l]
|
|
3932
3932
|
), g = Q(() => {
|
|
3933
|
-
|
|
3933
|
+
m.current && (window.clearTimeout(m.current), m.current = null);
|
|
3934
3934
|
}, []), C = Q(
|
|
3935
3935
|
(O) => {
|
|
3936
|
-
if (!
|
|
3936
|
+
if (!m.current) return;
|
|
3937
3937
|
const z = O.clientX - u.current.x, w = O.clientY - u.current.y;
|
|
3938
3938
|
(Math.abs(z) > 5 || Math.abs(w) > 5) && g();
|
|
3939
3939
|
},
|
|
3940
3940
|
[g]
|
|
3941
|
-
),
|
|
3941
|
+
), T = Q(() => {
|
|
3942
3942
|
g();
|
|
3943
|
-
}, [g]), R = g, I = g,
|
|
3943
|
+
}, [g]), R = g, I = g, p = j((O) => O.clearRange), S = Q(
|
|
3944
3944
|
(O) => {
|
|
3945
3945
|
var _;
|
|
3946
3946
|
if (y.current) {
|
|
@@ -3950,10 +3950,10 @@ const Kl = Object.freeze({
|
|
|
3950
3950
|
const z = (_ = O.target) == null ? void 0 : _.closest("[data-g]");
|
|
3951
3951
|
if (!z) return;
|
|
3952
3952
|
const w = Number(z.dataset.g);
|
|
3953
|
-
isNaN(w) ||
|
|
3953
|
+
isNaN(w) || h && a != null && d != null && (p(), O.stopPropagation());
|
|
3954
3954
|
},
|
|
3955
|
-
[
|
|
3956
|
-
),
|
|
3955
|
+
[h, a, d, p]
|
|
3956
|
+
), k = o, E = r + t.length - 1;
|
|
3957
3957
|
return /* @__PURE__ */ x(
|
|
3958
3958
|
"span",
|
|
3959
3959
|
{
|
|
@@ -3961,10 +3961,10 @@ const Kl = Object.freeze({
|
|
|
3961
3961
|
onDoubleClick: b,
|
|
3962
3962
|
onPointerDown: f,
|
|
3963
3963
|
onPointerMove: C,
|
|
3964
|
-
onPointerUp:
|
|
3964
|
+
onPointerUp: T,
|
|
3965
3965
|
onPointerCancel: R,
|
|
3966
3966
|
onPointerLeave: I,
|
|
3967
|
-
children:
|
|
3967
|
+
children: k.map((O, z) => /* @__PURE__ */ x(
|
|
3968
3968
|
Yl,
|
|
3969
3969
|
{
|
|
3970
3970
|
ns: n,
|
|
@@ -4013,7 +4013,7 @@ const Kl = Object.freeze({
|
|
|
4013
4013
|
pointerColor: u.pointerColor
|
|
4014
4014
|
} : Kl,
|
|
4015
4015
|
[l]
|
|
4016
|
-
), d = Y(nn(a)),
|
|
4016
|
+
), d = Y(nn(a)), v = n.r0 ?? 0, h = n.len ?? Math.max(0, n.endG - n.startG + 1), b = l && d.showPointer && d.pointerStyle !== "underline", m = l && d.showPointer && d.pointerStyle === "underline", y = b || m ? {
|
|
4017
4017
|
// 배경색(하이라이트)
|
|
4018
4018
|
"--hl-color": d.pointerColor,
|
|
4019
4019
|
// 밑줄 색/두께/오프셋
|
|
@@ -4021,19 +4021,19 @@ const Kl = Object.freeze({
|
|
|
4021
4021
|
"--ul-thickness": "0.3em",
|
|
4022
4022
|
"--ul-offset": "0.35em"
|
|
4023
4023
|
} : void 0;
|
|
4024
|
-
return /* @__PURE__ */ x(yt, { children: Array.from({ length:
|
|
4025
|
-
const C = r[
|
|
4026
|
-
let
|
|
4027
|
-
return b && (
|
|
4028
|
-
/* @__PURE__ */ x("span", { className:
|
|
4024
|
+
return /* @__PURE__ */ x(yt, { children: Array.from({ length: h }).map((u, f) => {
|
|
4025
|
+
const C = r[v + f], T = n.startG + f, R = `${t}/run:${T}`, I = !!C.split && T !== o;
|
|
4026
|
+
let p = `${ft.runWrap}`;
|
|
4027
|
+
return b && (h === 1 ? p += ` ${ft.highlight}` : f === 0 ? p += ` ${ft.highlightleft}` : f + 1 === h ? p += ` ${ft.highlightright}` : p += ` ${ft.highlightcenter}`), m && (h === 1 ? p += ` ${ft.underline}` : f === 0 ? p += ` ${ft.underlineleft}` : f + 1 === h ? p += ` ${ft.underlineright}` : p += ` ${ft.underlinecenter}`), /* @__PURE__ */ Z(W.Fragment, { children: [
|
|
4028
|
+
/* @__PURE__ */ x("span", { className: p, style: y, children: /* @__PURE__ */ x(
|
|
4029
4029
|
Ql,
|
|
4030
4030
|
{
|
|
4031
4031
|
gi: n.startG,
|
|
4032
|
-
g:
|
|
4032
|
+
g: T,
|
|
4033
4033
|
run: C,
|
|
4034
4034
|
active: l,
|
|
4035
4035
|
pointerCfg: d,
|
|
4036
|
-
isInRange: i != null && s != null &&
|
|
4036
|
+
isInRange: i != null && s != null && T >= i && T <= s
|
|
4037
4037
|
}
|
|
4038
4038
|
) }),
|
|
4039
4039
|
I && /* @__PURE__ */ x(Xl, {})
|
|
@@ -4250,25 +4250,25 @@ const ia = "_scroller_kqkmq_3", sa = {
|
|
|
4250
4250
|
function ca(e, t = 12, n = 1.5, r = 0.5) {
|
|
4251
4251
|
if (!e) return -1;
|
|
4252
4252
|
const o = e.getBoundingClientRect(), i = o.top + t;
|
|
4253
|
-
let s = -1, c = 1 / 0, l = 1 / 0, a = -1, d = 1 / 0,
|
|
4254
|
-
const
|
|
4255
|
-
for (let b = 0; b <
|
|
4256
|
-
const
|
|
4257
|
-
if (!
|
|
4258
|
-
const y = aa(
|
|
4253
|
+
let s = -1, c = 1 / 0, l = 1 / 0, a = -1, d = 1 / 0, v = 1 / 0;
|
|
4254
|
+
const h = e.querySelectorAll("[data-g]");
|
|
4255
|
+
for (let b = 0; b < h.length; b++) {
|
|
4256
|
+
const m = h[b];
|
|
4257
|
+
if (!m || !m.isConnected) continue;
|
|
4258
|
+
const y = aa(m);
|
|
4259
4259
|
if (!y || !br(y)) continue;
|
|
4260
|
-
const u =
|
|
4260
|
+
const u = m.getBoundingClientRect();
|
|
4261
4261
|
if (u.height <= r || u.width <= r || u.bottom <= o.top || u.top >= o.bottom) continue;
|
|
4262
4262
|
if (u.top < i) {
|
|
4263
4263
|
const C = Math.abs(u.top - i);
|
|
4264
|
-
(C < d || C === d && (u.top <
|
|
4264
|
+
(C < d || C === d && (u.top < v || a !== -1 && Number(m.dataset.g) < a)) && (d = C, a = Number(m.dataset.g), v = u.top);
|
|
4265
4265
|
continue;
|
|
4266
4266
|
}
|
|
4267
|
-
const f = Number(
|
|
4267
|
+
const f = Number(m.dataset.g);
|
|
4268
4268
|
if (Number.isNaN(f)) continue;
|
|
4269
4269
|
u.top < l - n ? (l = u.top, c = u.top, s = f) : u.top <= l + n && (u.top < c || u.top === c && (s === -1 || f < s)) && (c = u.top, s = f);
|
|
4270
4270
|
const g = Math.abs(u.top - i);
|
|
4271
|
-
(g < d || g === d && (u.top <
|
|
4271
|
+
(g < d || g === d && (u.top < v || a !== -1 && f < a)) && (d = g, a = f, v = u.top);
|
|
4272
4272
|
}
|
|
4273
4273
|
return s !== -1 ? s : a;
|
|
4274
4274
|
}
|
|
@@ -4312,8 +4312,8 @@ const qn = async (e, t, { topPaddingRatio: n = 0.15, behavior: r = "smooth", qui
|
|
|
4312
4312
|
await da(e, o);
|
|
4313
4313
|
const s = xn(e, t);
|
|
4314
4314
|
if (!s) return !1;
|
|
4315
|
-
const c = e.getBoundingClientRect(), l = s.getBoundingClientRect(), a = c.height * n, d = c.top + a,
|
|
4316
|
-
return Math.abs(
|
|
4315
|
+
const c = e.getBoundingClientRect(), l = s.getBoundingClientRect(), a = c.height * n, d = c.top + a, v = l.top - d;
|
|
4316
|
+
return Math.abs(v) <= 1;
|
|
4317
4317
|
}, vt = () => new Promise((e) => {
|
|
4318
4318
|
requestAnimationFrame(() => {
|
|
4319
4319
|
requestAnimationFrame(() => e());
|
|
@@ -4622,24 +4622,24 @@ function Ia({
|
|
|
4622
4622
|
nsPrefix: n
|
|
4623
4623
|
}) {
|
|
4624
4624
|
const r = ve(() => {
|
|
4625
|
-
const
|
|
4625
|
+
const k = [], E = Pr();
|
|
4626
4626
|
return t.forEach((O, z) => {
|
|
4627
|
-
O.type === "paragraph" && (
|
|
4628
|
-
}),
|
|
4629
|
-
}, [t]), o = j((
|
|
4627
|
+
O.type === "paragraph" && (k[z] = Br(O, E));
|
|
4628
|
+
}), k;
|
|
4629
|
+
}, [t]), o = j((k) => {
|
|
4630
4630
|
var E;
|
|
4631
|
-
return ((E =
|
|
4632
|
-
}), i = j((
|
|
4631
|
+
return ((E = k.layout) == null ? void 0 : E.prefix) ?? [];
|
|
4632
|
+
}), i = j((k) => {
|
|
4633
4633
|
var E;
|
|
4634
|
-
return ((E =
|
|
4635
|
-
}), s = Y((
|
|
4634
|
+
return ((E = k.derivedNav) == null ? void 0 : E.splitGroupsPerBlock) ?? [];
|
|
4635
|
+
}), s = Y((k) => k.marginX), c = Y((k) => k.viewportHeight), l = ie({
|
|
4636
4636
|
start: 0,
|
|
4637
4637
|
end: 0
|
|
4638
4638
|
}), a = Q(
|
|
4639
|
-
(
|
|
4640
|
-
const E = t[
|
|
4639
|
+
(k) => {
|
|
4640
|
+
const E = t[k], O = `${n}blk-${E.id}`;
|
|
4641
4641
|
if (E.type === "image") {
|
|
4642
|
-
const { src: _, alt: P, width: G, height: M } = E, B = G && M ? `${G} / ${M}` : "4 / 3", F =
|
|
4642
|
+
const { src: _, alt: P, width: G, height: M } = E, B = G && M ? `${G} / ${M}` : "4 / 3", F = k >= l.current.start && k <= l.current.end, V = c > 80 ? Math.floor((c - 80) * 0.6) : void 0;
|
|
4643
4643
|
return /* @__PURE__ */ Z("div", { style: { margin: "12px 0", textAlign: "center", width: "100%" }, children: [
|
|
4644
4644
|
/* @__PURE__ */ x(
|
|
4645
4645
|
"div",
|
|
@@ -4673,7 +4673,7 @@ function Ia({
|
|
|
4673
4673
|
P && /* @__PURE__ */ x("div", { style: { fontSize: 12, color: "#6b7280", marginTop: 4 }, children: P })
|
|
4674
4674
|
] });
|
|
4675
4675
|
}
|
|
4676
|
-
const z = r[
|
|
4676
|
+
const z = r[k] ?? void 0, w = i[k];
|
|
4677
4677
|
return /* @__PURE__ */ x(
|
|
4678
4678
|
"div",
|
|
4679
4679
|
{
|
|
@@ -4687,7 +4687,7 @@ function Ia({
|
|
|
4687
4687
|
block: E,
|
|
4688
4688
|
computedMarker: z,
|
|
4689
4689
|
ns: O,
|
|
4690
|
-
baseIndex: o[
|
|
4690
|
+
baseIndex: o[k],
|
|
4691
4691
|
sectionId: e.section_id,
|
|
4692
4692
|
preGroups: w
|
|
4693
4693
|
}
|
|
@@ -4696,11 +4696,11 @@ function Ia({
|
|
|
4696
4696
|
);
|
|
4697
4697
|
},
|
|
4698
4698
|
[t, r, o, n, e, i, c]
|
|
4699
|
-
), d = ie(null),
|
|
4700
|
-
d.current =
|
|
4701
|
-
}, []),
|
|
4702
|
-
() => Wt((
|
|
4703
|
-
const { style: E, children: O, ...z } =
|
|
4699
|
+
), d = ie(null), v = Q((k) => {
|
|
4700
|
+
d.current = k;
|
|
4701
|
+
}, []), h = ve(
|
|
4702
|
+
() => Wt((k) => {
|
|
4703
|
+
const { style: E, children: O, ...z } = k;
|
|
4704
4704
|
return /* @__PURE__ */ x("div", { ...z, style: E, children: /* @__PURE__ */ x(
|
|
4705
4705
|
"div",
|
|
4706
4706
|
{
|
|
@@ -4720,7 +4720,7 @@ function Ia({
|
|
|
4720
4720
|
) });
|
|
4721
4721
|
}),
|
|
4722
4722
|
[s]
|
|
4723
|
-
), b = ie(null),
|
|
4723
|
+
), b = ie(null), m = ve(() => t.map((k) => k.id), [t]), [y, u] = nt(!1);
|
|
4724
4724
|
Se(() => {
|
|
4725
4725
|
u(!1);
|
|
4726
4726
|
}, [t]);
|
|
@@ -4729,8 +4729,8 @@ function Ia({
|
|
|
4729
4729
|
}, []), g = Q(() => {
|
|
4730
4730
|
if (!y)
|
|
4731
4731
|
return /* @__PURE__ */ x("div", { style: { height: 40 } });
|
|
4732
|
-
const
|
|
4733
|
-
return
|
|
4732
|
+
const k = e.quizzes, E = Math.max(80, Math.floor(c * 0.5));
|
|
4733
|
+
return k && k.length ? /* @__PURE__ */ Z("div", { style: { display: "block" }, children: [
|
|
4734
4734
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Pi, {}) }),
|
|
4735
4735
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Cn, { isIcon: !1 }) }),
|
|
4736
4736
|
/* @__PURE__ */ x("div", { style: { height: E, width: "100%" } })
|
|
@@ -4740,7 +4740,7 @@ function Ia({
|
|
|
4740
4740
|
] });
|
|
4741
4741
|
}, [y, e, c]), C = ve(
|
|
4742
4742
|
() => ({
|
|
4743
|
-
Item:
|
|
4743
|
+
Item: h,
|
|
4744
4744
|
Header: () => /* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
4745
4745
|
Footer: g,
|
|
4746
4746
|
Scroller: la
|
|
@@ -4748,32 +4748,32 @@ function Ia({
|
|
|
4748
4748
|
}),
|
|
4749
4749
|
[
|
|
4750
4750
|
g,
|
|
4751
|
-
|
|
4751
|
+
h
|
|
4752
4752
|
// , ScrollPlaceholder
|
|
4753
4753
|
]
|
|
4754
4754
|
// CustomScroller는 고정이면 deps에 안 넣어도 OK
|
|
4755
|
-
),
|
|
4755
|
+
), T = Q((k) => m[k], [m]), R = Rt(), [I] = nt(() => R.getState().progress.currentGlobalRunIndex ?? 0), p = ve(() => {
|
|
4756
4756
|
if (!o.length) return 0;
|
|
4757
|
-
const
|
|
4757
|
+
const k = o[o.length - 1], E = Math.max(0, Math.min(I, k));
|
|
4758
4758
|
return Ai(o, E);
|
|
4759
4759
|
}, [o, I]);
|
|
4760
4760
|
console.log("SectionRenderVirtuoso확인");
|
|
4761
4761
|
const S = Rt();
|
|
4762
4762
|
return Se(() => {
|
|
4763
|
-
let
|
|
4763
|
+
let k = !1;
|
|
4764
4764
|
return (async () => {
|
|
4765
4765
|
let E = d.current;
|
|
4766
4766
|
if (!E) {
|
|
4767
4767
|
for (let _ = 0; _ < 20; _++) {
|
|
4768
|
-
if (await new Promise((P) => setTimeout(P, 50)),
|
|
4768
|
+
if (await new Promise((P) => setTimeout(P, 50)), k) return;
|
|
4769
4769
|
if (E = d.current, E) break;
|
|
4770
4770
|
}
|
|
4771
4771
|
if (!E) return;
|
|
4772
4772
|
}
|
|
4773
4773
|
const O = S.getState().progress.currentGlobalRunIndex, z = S.getState().progress.setSectionLoading, w = O != null && O >= 0 ? O : 0;
|
|
4774
|
-
await Ei(E, w), !
|
|
4774
|
+
await Ei(E, w), !k && (await vt(), await vt(), await vt(), await vt(), !k && z(!1));
|
|
4775
4775
|
})(), () => {
|
|
4776
|
-
|
|
4776
|
+
k = !0;
|
|
4777
4777
|
};
|
|
4778
4778
|
}, [d, S]), /* @__PURE__ */ Z(yt, { children: [
|
|
4779
4779
|
/* @__PURE__ */ x(
|
|
@@ -4788,14 +4788,14 @@ function Ia({
|
|
|
4788
4788
|
// padding: `${marginY}px ${marginX}px`,
|
|
4789
4789
|
},
|
|
4790
4790
|
defaultItemHeight: 99,
|
|
4791
|
-
computeItemKey:
|
|
4791
|
+
computeItemKey: T,
|
|
4792
4792
|
totalCount: t.length,
|
|
4793
4793
|
itemContent: a,
|
|
4794
|
-
initialTopMostItemIndex:
|
|
4794
|
+
initialTopMostItemIndex: p,
|
|
4795
4795
|
increaseViewportBy: { top: 200, bottom: 200 },
|
|
4796
4796
|
endReached: f,
|
|
4797
4797
|
components: C,
|
|
4798
|
-
scrollerRef:
|
|
4798
|
+
scrollerRef: v
|
|
4799
4799
|
}
|
|
4800
4800
|
),
|
|
4801
4801
|
/* @__PURE__ */ x(
|
|
@@ -4813,22 +4813,22 @@ const Ca = ({
|
|
|
4813
4813
|
virtRef: t,
|
|
4814
4814
|
prefix: n
|
|
4815
4815
|
}) => {
|
|
4816
|
-
const r = j((w) => w.setCurrentGlobalRunIndex), o = j((w) => w.registerSectionScrollApi), i = j((w) => w.currentGlobalRunIndex), s = _e((w) => w.scrollLock), c = _e((w) => w.syncToGI), l = Et(), a = ie(!1), d = ie(null),
|
|
4816
|
+
const r = j((w) => w.setCurrentGlobalRunIndex), o = j((w) => w.registerSectionScrollApi), i = j((w) => w.currentGlobalRunIndex), s = _e((w) => w.scrollLock), c = _e((w) => w.syncToGI), l = Et(), a = ie(!1), d = ie(null), v = ie(null), h = ie(null), b = ie(-1), m = Q(() => {
|
|
4817
4817
|
if (s) return;
|
|
4818
4818
|
d.current = null;
|
|
4819
|
-
const w =
|
|
4819
|
+
const w = v.current;
|
|
4820
4820
|
if (!w) return;
|
|
4821
4821
|
const _ = ca(w, 5);
|
|
4822
4822
|
_ !== -1 && _ !== b.current && (b.current = _, c(_), r(_, "scroll"));
|
|
4823
4823
|
}, [s, c, r]), y = Q(
|
|
4824
4824
|
(w) => {
|
|
4825
|
-
|
|
4825
|
+
v.current = w, d.current == null && (d.current = requestAnimationFrame(m));
|
|
4826
4826
|
},
|
|
4827
|
-
[
|
|
4827
|
+
[m]
|
|
4828
4828
|
), u = Q(
|
|
4829
4829
|
(w) => {
|
|
4830
|
-
|
|
4831
|
-
|
|
4830
|
+
v.current = w, h.current != null && (window.clearTimeout(h.current), h.current = null), h.current = window.setTimeout(() => {
|
|
4831
|
+
h.current = null, m();
|
|
4832
4832
|
const _ = b.current;
|
|
4833
4833
|
if (_ === -1) return;
|
|
4834
4834
|
const P = w.scrollTop, G = w.scrollHeight - w.clientHeight, M = G > 0 ? P / G : 0;
|
|
@@ -4849,24 +4849,24 @@ const Ca = ({
|
|
|
4849
4849
|
});
|
|
4850
4850
|
}, 100);
|
|
4851
4851
|
},
|
|
4852
|
-
[
|
|
4852
|
+
[m, l]
|
|
4853
4853
|
), f = ie(!1), g = Q(
|
|
4854
4854
|
(w) => {
|
|
4855
4855
|
s || a.current && (f.current || (y(w), u(w)));
|
|
4856
4856
|
},
|
|
4857
4857
|
[s, y, u]
|
|
4858
|
-
), C = ie(void 0),
|
|
4858
|
+
), C = ie(void 0), T = ie(void 0), R = ie(void 0), I = ie(void 0);
|
|
4859
4859
|
Se(() => {
|
|
4860
4860
|
const w = e.current;
|
|
4861
4861
|
if (w)
|
|
4862
4862
|
return C.current = () => {
|
|
4863
4863
|
a.current = !0;
|
|
4864
|
-
},
|
|
4864
|
+
}, T.current = () => {
|
|
4865
4865
|
a.current = !0;
|
|
4866
4866
|
}, R.current = () => {
|
|
4867
4867
|
a.current = !0;
|
|
4868
|
-
}, I.current = () => g(w), w.addEventListener("wheel", C.current, { passive: !0 }), w.addEventListener("touchmove",
|
|
4869
|
-
w.removeEventListener("wheel", C.current), w.removeEventListener("touchmove",
|
|
4868
|
+
}, I.current = () => g(w), w.addEventListener("wheel", C.current, { passive: !0 }), w.addEventListener("touchmove", T.current, { passive: !0 }), window.addEventListener("keydown", R.current, { passive: !0 }), w.addEventListener("scroll", I.current, { passive: !0 }), () => {
|
|
4869
|
+
w.removeEventListener("wheel", C.current), w.removeEventListener("touchmove", T.current), window.removeEventListener("keydown", R.current), w.removeEventListener("scroll", I.current), d.current != null && cancelAnimationFrame(d.current), h.current != null && (clearTimeout(h.current), h.current = null);
|
|
4870
4870
|
};
|
|
4871
4871
|
}, [g, e]), Se(() => {
|
|
4872
4872
|
const w = e.current;
|
|
@@ -4885,14 +4885,14 @@ const Ca = ({
|
|
|
4885
4885
|
w.removeEventListener("wheel", _), w.removeEventListener("touchmove", P), window.removeEventListener("keydown", G), w.style.overscrollBehavior = M.overscrollBehavior, w.style.touchAction = M.touchAction;
|
|
4886
4886
|
};
|
|
4887
4887
|
}, [s, e]);
|
|
4888
|
-
const
|
|
4888
|
+
const p = ie({
|
|
4889
4889
|
first: -1,
|
|
4890
4890
|
last: -1
|
|
4891
|
-
}), S = ie(!1),
|
|
4891
|
+
}), S = ie(!1), k = Q(() => {
|
|
4892
4892
|
const w = e.current;
|
|
4893
4893
|
if (!w) return;
|
|
4894
4894
|
const _ = mo(w), P = (_ == null ? void 0 : _.first) ?? -1, G = (_ == null ? void 0 : _.last) ?? -1;
|
|
4895
|
-
|
|
4895
|
+
p.current = { first: P, last: G };
|
|
4896
4896
|
}, [e]), E = ie(!1), O = Q(() => {
|
|
4897
4897
|
const w = e.current;
|
|
4898
4898
|
if (!w || E.current) return;
|
|
@@ -4906,12 +4906,12 @@ const Ca = ({
|
|
|
4906
4906
|
});
|
|
4907
4907
|
}, [e]);
|
|
4908
4908
|
Se(() => {
|
|
4909
|
-
!S.current && s && (E.current = !1,
|
|
4910
|
-
}, [s,
|
|
4909
|
+
!S.current && s && (E.current = !1, k()), S.current = s;
|
|
4910
|
+
}, [s, k]), Se(() => {
|
|
4911
4911
|
if (s !== !0) return;
|
|
4912
4912
|
const w = e.current;
|
|
4913
4913
|
if (!w) return;
|
|
4914
|
-
const { first: _, last: P } =
|
|
4914
|
+
const { first: _, last: P } = p.current;
|
|
4915
4915
|
if (_ === -1 || P === -1) {
|
|
4916
4916
|
O();
|
|
4917
4917
|
return;
|
|
@@ -4927,7 +4927,7 @@ const Ca = ({
|
|
|
4927
4927
|
} finally {
|
|
4928
4928
|
f.current = !1;
|
|
4929
4929
|
}
|
|
4930
|
-
|
|
4930
|
+
k();
|
|
4931
4931
|
})();
|
|
4932
4932
|
return;
|
|
4933
4933
|
}
|
|
@@ -4941,14 +4941,14 @@ const Ca = ({
|
|
|
4941
4941
|
});
|
|
4942
4942
|
}
|
|
4943
4943
|
M().then((B) => {
|
|
4944
|
-
B ?
|
|
4944
|
+
B ? k() : O();
|
|
4945
4945
|
});
|
|
4946
4946
|
}
|
|
4947
4947
|
}, [
|
|
4948
4948
|
s,
|
|
4949
4949
|
i,
|
|
4950
4950
|
O,
|
|
4951
|
-
|
|
4951
|
+
k,
|
|
4952
4952
|
e
|
|
4953
4953
|
]);
|
|
4954
4954
|
const z = Q(() => {
|
|
@@ -5036,20 +5036,20 @@ function Ta(e) {
|
|
|
5036
5036
|
return !!(["a", "button", "input", "textarea", "select", "label"].includes(n) || t.isContentEditable);
|
|
5037
5037
|
}
|
|
5038
5038
|
function ka() {
|
|
5039
|
-
const e = j((
|
|
5039
|
+
const e = j((m) => m.section), t = Y((m) => m.theme), n = Y((m) => m.fontFamily), r = Y((m) => m.fontSizePx), o = Y((m) => m.lineHeight), i = bn[t], { blocks: s, nsPrefix: c } = ve(() => ({
|
|
5040
5040
|
sectionId: e.section_id,
|
|
5041
5041
|
blocks: e.ast.blocks,
|
|
5042
5042
|
nsPrefix: `sec-${e.section_id ?? "0"}/`
|
|
5043
5043
|
}), [e]), l = kn(), a = Q(() => {
|
|
5044
|
-
const { isSettingsOpen:
|
|
5045
|
-
|
|
5046
|
-
}, [l]), { onClick: d, onDoubleClick:
|
|
5044
|
+
const { isSettingsOpen: m, setSettingsOpen: y, toggleOverlays: u } = l.getState();
|
|
5045
|
+
m ? y(!1) : u();
|
|
5046
|
+
}, [l]), { onClick: d, onDoubleClick: v } = ss({
|
|
5047
5047
|
onSingle: a,
|
|
5048
5048
|
onDouble: () => {
|
|
5049
5049
|
},
|
|
5050
5050
|
delay: 250,
|
|
5051
5051
|
shouldIgnoreTarget: Ta
|
|
5052
|
-
}),
|
|
5052
|
+
}), h = ve(
|
|
5053
5053
|
() => ({
|
|
5054
5054
|
flex: 1,
|
|
5055
5055
|
fontFamily: n,
|
|
@@ -5067,7 +5067,7 @@ function ka() {
|
|
|
5067
5067
|
() => ({ margin: "0 auto", width: "100%", height: "100%" }),
|
|
5068
5068
|
[]
|
|
5069
5069
|
);
|
|
5070
|
-
return console.log("ScrollSectionWrap render"), /* @__PURE__ */ x("div", { onClick: d, onDoubleClick:
|
|
5070
|
+
return console.log("ScrollSectionWrap render"), /* @__PURE__ */ x("div", { onClick: d, onDoubleClick: v, style: h, children: /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */ x(Ia, { section: e, blocks: s, nsPrefix: c }) }) });
|
|
5071
5071
|
}
|
|
5072
5072
|
function Ra(e) {
|
|
5073
5073
|
return it({ 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);
|
|
@@ -5102,9 +5102,9 @@ const Pa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", za = "_compact_1hfub_31",
|
|
|
5102
5102
|
label: ja,
|
|
5103
5103
|
compactBtn: Ua
|
|
5104
5104
|
}, Ka = Wt(function() {
|
|
5105
|
-
const t = ie(null), n = Ue(Mt), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), c = _e((S) => S.playbackKind), l = Y((S) => S.muteAudio), a = Y((S) => S.audioSpeed), d = _e((S) => S.getClipSrc),
|
|
5105
|
+
const t = ie(null), n = Ue(Mt), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), c = _e((S) => S.playbackKind), l = Y((S) => S.muteAudio), a = Y((S) => S.audioSpeed), d = _e((S) => S.getClipSrc), v = _e((S) => S._onTime), h = _e((S) => S._onEnded), b = _e((S) => S._onError), m = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), u = j((S) => S.snapToReadable), f = j((S) => S.edgeReadable), g = ie(null), C = ie(null), T = ie(!1), R = ie(null);
|
|
5106
5106
|
Se(() => {
|
|
5107
|
-
c === "real" && (
|
|
5107
|
+
c === "real" && (T.current = !0);
|
|
5108
5108
|
}, [c]);
|
|
5109
5109
|
const I = ve(() => {
|
|
5110
5110
|
const S = d(s);
|
|
@@ -5116,19 +5116,19 @@ const Pa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", za = "_compact_1hfub_31",
|
|
|
5116
5116
|
}
|
|
5117
5117
|
}, [s, d]);
|
|
5118
5118
|
Se(() => {
|
|
5119
|
-
|
|
5119
|
+
T.current = !0;
|
|
5120
5120
|
}, [I]), Se(() => {
|
|
5121
5121
|
const S = t.current;
|
|
5122
5122
|
if (!S) return;
|
|
5123
|
-
const
|
|
5123
|
+
const k = () => {
|
|
5124
5124
|
if (S.paused || S.ended) return;
|
|
5125
5125
|
const z = S.currentTime * 1e3;
|
|
5126
|
-
|
|
5126
|
+
T.current && z === 0 || (z > 0 && (T.current = !1), v(z));
|
|
5127
5127
|
}, E = () => {
|
|
5128
5128
|
var w, _;
|
|
5129
|
-
|
|
5129
|
+
h();
|
|
5130
5130
|
const z = f(1);
|
|
5131
|
-
typeof z == "number" && z >= 0 && (
|
|
5131
|
+
typeof z == "number" && z >= 0 && (m(z, "audio"), (_ = (w = y()) == null ? void 0 : w.ensureVisibleGI) == null || _.call(w, z));
|
|
5132
5132
|
}, O = (z) => {
|
|
5133
5133
|
const w = z.currentTarget;
|
|
5134
5134
|
console.warn("Audio error", {
|
|
@@ -5136,10 +5136,10 @@ const Pa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", za = "_compact_1hfub_31",
|
|
|
5136
5136
|
readyState: w.readyState
|
|
5137
5137
|
}), b();
|
|
5138
5138
|
};
|
|
5139
|
-
return S.addEventListener("timeupdate",
|
|
5140
|
-
S.removeEventListener("timeupdate",
|
|
5139
|
+
return S.addEventListener("timeupdate", k), S.addEventListener("ended", E), S.addEventListener("error", O), () => {
|
|
5140
|
+
S.removeEventListener("timeupdate", k), S.removeEventListener("ended", E), S.removeEventListener("error", O);
|
|
5141
5141
|
};
|
|
5142
|
-
}, [
|
|
5142
|
+
}, [v, h, b, f, m, y]), Se(() => {
|
|
5143
5143
|
if (r) return;
|
|
5144
5144
|
const S = t.current;
|
|
5145
5145
|
if (!S) return;
|
|
@@ -5152,7 +5152,7 @@ const Pa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", za = "_compact_1hfub_31",
|
|
|
5152
5152
|
C.current = null;
|
|
5153
5153
|
return;
|
|
5154
5154
|
}
|
|
5155
|
-
const
|
|
5155
|
+
const k = S.currentSrc || S.src || null, E = !k || k !== I;
|
|
5156
5156
|
if (E) {
|
|
5157
5157
|
try {
|
|
5158
5158
|
S.pause();
|
|
@@ -5194,8 +5194,8 @@ const Pa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", za = "_compact_1hfub_31",
|
|
|
5194
5194
|
if (r) return;
|
|
5195
5195
|
const S = t.current;
|
|
5196
5196
|
if (!S || c !== "real") return;
|
|
5197
|
-
const
|
|
5198
|
-
if (Number.isFinite(
|
|
5197
|
+
const k = i / 1e3;
|
|
5198
|
+
if (Number.isFinite(k)) {
|
|
5199
5199
|
if (S.readyState < 1) {
|
|
5200
5200
|
g.current = i;
|
|
5201
5201
|
const E = () => {
|
|
@@ -5213,30 +5213,30 @@ const Pa = "_wrap_1hfub_4", Ba = "_visible_1hfub_25", za = "_compact_1hfub_31",
|
|
|
5213
5213
|
S.addEventListener("loadedmetadata", E), S.addEventListener("canplay", E);
|
|
5214
5214
|
return;
|
|
5215
5215
|
}
|
|
5216
|
-
if (Math.abs(S.currentTime -
|
|
5216
|
+
if (Math.abs(S.currentTime - k) > 0.2)
|
|
5217
5217
|
try {
|
|
5218
|
-
S.currentTime =
|
|
5218
|
+
S.currentTime = k;
|
|
5219
5219
|
} catch (E) {
|
|
5220
5220
|
console.log("currentTime보정오류", E);
|
|
5221
5221
|
}
|
|
5222
5222
|
}
|
|
5223
5223
|
}, [i, c, r]);
|
|
5224
|
-
const
|
|
5224
|
+
const p = _e((S) => S.getGIFromCT);
|
|
5225
5225
|
return Se(() => {
|
|
5226
5226
|
var E, O;
|
|
5227
5227
|
if (r || c !== "real" || o !== "playing" && o !== "loading") return;
|
|
5228
|
-
const S =
|
|
5228
|
+
const S = p(s, i);
|
|
5229
5229
|
if (S < 0) return;
|
|
5230
|
-
const
|
|
5231
|
-
|
|
5230
|
+
const k = u(S);
|
|
5231
|
+
k !== R.current && (R.current = k, m(k, "audio"), k % 5 === 0 && ((O = (E = y()) == null ? void 0 : E.ensureVisibleGI) == null || O.call(E, k)));
|
|
5232
5232
|
}, [
|
|
5233
5233
|
o,
|
|
5234
5234
|
s,
|
|
5235
5235
|
i,
|
|
5236
5236
|
c,
|
|
5237
|
-
|
|
5237
|
+
p,
|
|
5238
5238
|
u,
|
|
5239
|
-
|
|
5239
|
+
m,
|
|
5240
5240
|
y,
|
|
5241
5241
|
r
|
|
5242
5242
|
]), /* @__PURE__ */ x("audio", { ref: t, preload: "auto", style: { display: "none" } });
|
|
@@ -5253,23 +5253,23 @@ const Ya = "_scrubberWrap_uw0cd_2", Qa = "_labels_uw0cd_9", Za = "_index_uw0cd_1
|
|
|
5253
5253
|
range: tc
|
|
5254
5254
|
};
|
|
5255
5255
|
function nc() {
|
|
5256
|
-
const e = Y((R) => R.isDev), t = j((R) => R.currentGlobalRunIndex), n = j((R) => R.totalRuns), r = j((R) => R.setCurrentGlobalRunIndex), o = j((R) => R.getSectionScrollApi), i = j((R) => R.giToPercentTotal), s = j((R) => R.percentToGITotal), c = j((R) => R.snapToReadable), l = _e((R) => R.scrollLock), a = _e((R) => R.pause), d = _e((R) => R.play),
|
|
5256
|
+
const e = Y((R) => R.isDev), t = j((R) => R.currentGlobalRunIndex), n = j((R) => R.totalRuns), r = j((R) => R.setCurrentGlobalRunIndex), o = j((R) => R.getSectionScrollApi), i = j((R) => R.giToPercentTotal), s = j((R) => R.percentToGITotal), c = j((R) => R.snapToReadable), l = _e((R) => R.scrollLock), a = _e((R) => R.pause), d = _e((R) => R.play), v = _e((R) => R.syncToGI), [h, b] = nt(() => i(t || 0));
|
|
5257
5257
|
Se(() => {
|
|
5258
5258
|
b(i(t || 0));
|
|
5259
5259
|
}, [t, i]);
|
|
5260
|
-
const
|
|
5261
|
-
l && (a(),
|
|
5260
|
+
const m = ie(!1), y = ve(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), u = Q(() => {
|
|
5261
|
+
l && (a(), m.current = !0);
|
|
5262
5262
|
}, [l, a]), f = Q((R) => {
|
|
5263
5263
|
b(Number(R.currentTarget.value));
|
|
5264
5264
|
}, []), g = Q(async () => {
|
|
5265
|
-
const R = s(
|
|
5266
|
-
a(), r(I, "scrubber-commit"),
|
|
5267
|
-
const
|
|
5268
|
-
|
|
5269
|
-
}, [
|
|
5270
|
-
() => ({ "--pct": `${
|
|
5271
|
-
[
|
|
5272
|
-
),
|
|
5265
|
+
const R = s(h), I = c(R);
|
|
5266
|
+
a(), r(I, "scrubber-commit"), v(I);
|
|
5267
|
+
const p = o();
|
|
5268
|
+
p != null && p.ensureVisibleGI && await p.ensureVisibleGI(I), m.current && (m.current = !1, d());
|
|
5269
|
+
}, [h, s, c, a, r, v, o, d]), C = ve(
|
|
5270
|
+
() => ({ "--pct": `${h}%` }),
|
|
5271
|
+
[h]
|
|
5272
|
+
), T = ve(() => Math.round(h), [h]);
|
|
5273
5273
|
return /* @__PURE__ */ Z("div", { className: zt.scrubberWrap, children: [
|
|
5274
5274
|
e && /* @__PURE__ */ x("div", { className: zt.labels, children: /* @__PURE__ */ Z("span", { className: zt.index, children: [
|
|
5275
5275
|
y,
|
|
@@ -5285,7 +5285,7 @@ function nc() {
|
|
|
5285
5285
|
min: 0,
|
|
5286
5286
|
max: 100,
|
|
5287
5287
|
step: 0.5,
|
|
5288
|
-
value:
|
|
5288
|
+
value: h,
|
|
5289
5289
|
style: C,
|
|
5290
5290
|
onMouseDown: u,
|
|
5291
5291
|
onTouchStart: u,
|
|
@@ -5301,17 +5301,17 @@ function nc() {
|
|
|
5301
5301
|
}
|
|
5302
5302
|
),
|
|
5303
5303
|
/* @__PURE__ */ Z("span", { className: zt.percent, children: [
|
|
5304
|
-
|
|
5304
|
+
T,
|
|
5305
5305
|
"%"
|
|
5306
5306
|
] })
|
|
5307
5307
|
] })
|
|
5308
5308
|
] });
|
|
5309
5309
|
}
|
|
5310
5310
|
const rc = W.memo(nc), oc = Wt(function() {
|
|
5311
|
-
const t = Ue(Mt), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = _e((S) => S.playbackKind), o = _e((S) => S.status), i = _e((S) => S.fake), s = Y((S) => S.audioSpeed), c = _e((S) => S.pause), l = j((S) => S.totalRuns), a = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex),
|
|
5311
|
+
const t = Ue(Mt), n = (t == null ? void 0 : t.getState().isPlaybackMode) ?? !1, r = _e((S) => S.playbackKind), o = _e((S) => S.status), i = _e((S) => S.fake), s = Y((S) => S.audioSpeed), c = _e((S) => S.pause), l = j((S) => S.totalRuns), a = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex), v = j((S) => S.getSectionScrollApi), h = j((S) => S.nextReadableFrom), b = j((S) => S.edgeReadable), m = ie(null), y = ie(null), u = ie(0), f = ie(-1), g = !n && r === "fake" && o === "playing", C = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), T = ve(() => {
|
|
5312
5312
|
const S = 200 * s;
|
|
5313
5313
|
return C / S * 6e4;
|
|
5314
|
-
}, [C, s]), R = ve(() => !l || l <= 1 ||
|
|
5314
|
+
}, [C, s]), R = ve(() => !l || l <= 1 || T <= 0 ? 0 : (l - 1) / T, [l, T]);
|
|
5315
5315
|
Se(() => {
|
|
5316
5316
|
if (!g) return;
|
|
5317
5317
|
const S = Math.max(0, Math.min(a ?? 0, Math.max(0, (l ?? 1) - 1)));
|
|
@@ -5326,37 +5326,37 @@ const rc = W.memo(nc), oc = Wt(function() {
|
|
|
5326
5326
|
const S = b(1);
|
|
5327
5327
|
I.current = S ?? -1;
|
|
5328
5328
|
}, [b, l]);
|
|
5329
|
-
const
|
|
5329
|
+
const p = Q(
|
|
5330
5330
|
(S) => {
|
|
5331
5331
|
(async () => {
|
|
5332
5332
|
var G, M;
|
|
5333
5333
|
if (!g) {
|
|
5334
|
-
|
|
5334
|
+
m.current = null;
|
|
5335
5335
|
return;
|
|
5336
5336
|
}
|
|
5337
5337
|
if (!l || l <= 1 || R <= 0) {
|
|
5338
|
-
|
|
5338
|
+
m.current = null;
|
|
5339
5339
|
return;
|
|
5340
5340
|
}
|
|
5341
|
-
const
|
|
5341
|
+
const k = y.current;
|
|
5342
5342
|
y.current = S;
|
|
5343
|
-
const E =
|
|
5343
|
+
const E = k == null ? 0 : Math.max(0, S - k), O = l - 1;
|
|
5344
5344
|
u.current = Math.min(O, u.current + R * E);
|
|
5345
|
-
const z = Math.floor(u.current), w =
|
|
5345
|
+
const z = Math.floor(u.current), w = v(), _ = h(z, 1);
|
|
5346
5346
|
if (_ == null) {
|
|
5347
5347
|
const B = I.current >= 0 ? I.current : z;
|
|
5348
|
-
B !== f.current && (f.current = B, d(B, "audio"), await ((G = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : G.call(w, B))), c(),
|
|
5348
|
+
B !== f.current && (f.current = B, d(B, "audio"), await ((G = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : G.call(w, B))), c(), m.current = null;
|
|
5349
5349
|
return;
|
|
5350
5350
|
}
|
|
5351
5351
|
const P = _;
|
|
5352
|
-
P !== f.current && (f.current = P, d(P, "audio"), P % 5 === 0 && await ((M = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : M.call(w, P))),
|
|
5352
|
+
P !== f.current && (f.current = P, d(P, "audio"), P % 5 === 0 && await ((M = w == null ? void 0 : w.ensureVisibleGI) == null ? void 0 : M.call(w, P))), m.current = requestAnimationFrame(p);
|
|
5353
5353
|
})().catch(console.error);
|
|
5354
5354
|
},
|
|
5355
|
-
[g, l, R,
|
|
5355
|
+
[g, l, R, h, d, v, c]
|
|
5356
5356
|
);
|
|
5357
|
-
return Se(() => (g ?
|
|
5358
|
-
|
|
5359
|
-
}), [g,
|
|
5357
|
+
return Se(() => (g ? m.current == null && (m.current = requestAnimationFrame(p)) : (m.current && (cancelAnimationFrame(m.current), m.current = null), y.current = null), () => {
|
|
5358
|
+
m.current && (cancelAnimationFrame(m.current), m.current = null);
|
|
5359
|
+
}), [g, p]), null;
|
|
5360
5360
|
}), ic = Wt(function() {
|
|
5361
5361
|
return /* @__PURE__ */ x(oc, {});
|
|
5362
5362
|
}), sc = "data:image/svg+xml,%3csvg%20width='111'%20height='111'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20overflow='hidden'%3e%3cg%20transform='translate(-435%2011)'%3e%3cpath%20d='M532.723%2046.8125C530.242%2046.8292%20527.8%2047.4292%20525.593%2048.5642%20523.298%2049.7713%20520.952%2050.8767%20518.608%2051.8815%20517.451%2031.9953%20500.391%2016.8128%20480.505%2017.9704%20462.359%2019.0268%20447.834%2033.4215%20446.615%2051.5578L438.476%2048.1353%20438.476%2049.9344C438.473%2054.7251%20441.432%2059.0185%20445.91%2060.721%20446.509%2060.9604%20447.138%2061.1708%20447.767%2061.3801%20448.053%2061.4761%20448.339%2061.5709%20448.622%2061.6692L447.745%2066.7254C447.463%2068.2415%20447.818%2069.8071%20448.728%2071.0521%20449.635%2072.2874%20450.984%2073.1242%20452.493%2073.3877L452.768%2073.4282C453.011%2073.488%20453.259%2073.5198%20453.509%2073.523%20456.31%2073.5182%20458.699%2071.4953%20459.166%2068.7338L459.781%2064.8673C468.886%2066.8727%20478.184%2067.875%20487.508%2067.8562%20493.267%2067.8674%20499.021%2067.5125%20504.736%2066.7937%20504.893%2066.7613%20505.041%2066.7405%20505.184%2066.7231L505.562%2068.8379C505.986%2071.6231%20508.396%2073.6706%20511.213%2073.6375%20511.583%2073.648%20511.953%2073.5977%20512.307%2073.4883%20515.422%2072.958%20517.518%2070.0024%20516.988%2066.8869%20516.984%2066.8688%20516.981%2066.8509%20516.978%2066.833L516.758%2065.6767C522.066%2065.3125%20527.42%2065.3125%20532.607%2065.3125L532.723%2065.3125C537.831%2065.6255%20542.226%2061.7378%20542.539%2056.6292%20542.852%2051.5205%20538.965%2047.1255%20533.856%2046.8125%20533.479%2046.7894%20533.1%2046.7894%20532.723%2046.8125ZM516.326%2052.7256C511.914%2054.5082%20507.352%2055.8913%20502.693%2056.858L492.697%2041.007%20501.916%2026.3469C510.579%2032.4029%20515.911%2042.1631%20516.326%2052.7256ZM500.254%2057.3217C497.133%2057.8531%20493.977%2058.1542%20490.811%2058.2224L487.449%2058.2224C480.061%2058.2766%20472.682%2057.6921%20465.394%2056.4753L474.504%2042.1644%20490.692%2042.1644ZM482.602%2020.2188C488.73%2020.2155%20494.742%2021.8953%20499.981%2025.075L490.693%2039.8507%20474.491%2039.8195%20465.194%2025.0415C470.449%2021.8782%20476.468%2020.2107%20482.602%2020.2188ZM463.254%2026.2995%20472.504%2041.0023%20462.938%2056.0267C458.169%2055.1133%20453.47%2053.8672%20448.875%2052.2977%20449.378%2041.8709%20454.689%2032.2672%20463.254%2026.2995ZM456.876%2068.3719C456.595%2070.0115%20455.173%2071.2097%20453.509%2071.2094%20453.431%2071.2042%20453.354%2071.191%20453.278%2071.1701%20453.133%2071.1343%20452.984%2071.1101%20452.835%2071.0972%20451.94%2070.9264%20451.142%2070.4243%20450.601%2069.6912%20450.063%2068.9533%20449.853%2068.0254%20450.023%2067.1278L450.844%2062.3872%20457.525%2064.2962ZM514.123%2069.8103C513.566%2070.5637%20512.74%2071.0728%20511.817%2071.2313L511.657%2071.2718C511.514%2071.32%20511.363%2071.3392%20511.213%2071.3285%20509.525%2071.3698%20508.075%2070.1378%20507.844%2068.4656L507.486%2066.4688%20514.501%2065.8548%20514.701%2067.2527C514.87%2068.1485%20514.661%2069.0742%20514.123%2069.8103ZM532.723%2063%20532.607%2063C526.955%2063%20521.113%2063%20515.284%2063.4625L515.276%2063.4625%20515.276%2063.4625%20505.9%2064.2904%20504.36%2064.5078C498.77%2065.2064%20493.141%2065.5509%20487.508%2065.5391%20477.952%2065.5601%20468.425%2064.4858%20459.114%2062.3375L450.263%2059.8168%20446.738%2058.5658C443.792%2057.4525%20441.62%2054.9086%20440.982%2051.8237%20454.33%2057.5309%20470.023%2060.5383%20486.577%2060.5383%20486.868%2060.5383%20487.161%2060.5383%20487.452%2060.5383L490.828%2060.5383C500.421%2060.2575%20509.874%2058.1665%20518.689%2054.3755L518.797%2054.3304C521.437%2053.2216%20524.086%2051.9728%20526.649%2050.6235%20528.526%2049.6491%20530.608%2049.1354%20532.723%2049.125%20536.554%2048.8199%20539.908%2051.6785%20540.213%2055.5099%20540.518%2059.3414%20537.659%2062.6949%20533.828%2063%20533.46%2063.0293%20533.091%2063.0293%20532.723%2063Z'/%3e%3cpath%20d='M534.442%2053.75C534.442%2055.0272%20533.407%2056.0625%20532.13%2056.0625%20530.852%2056.0625%20529.817%2055.0272%20529.817%2053.75%20529.817%2052.4728%20530.852%2051.4375%20532.13%2051.4375%20533.407%2051.4375%20534.442%2052.4728%20534.442%2053.75Z'/%3e%3c/g%3e%3c/svg%3e", lc = "data:image/svg+xml,%3csvg%20width='159'%20height='159'%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%20xml:space='preserve'%20overflow='hidden'%3e%3cg%20transform='translate(-392%20-84)'%3e%3cpath%20d='M496.776%20189.601C496.122%20189.934%20495.77%20190.663%20495.916%20191.383L499.911%20210.219C500.074%20210.985%20500.75%20211.532%20501.533%20211.531L501.929%20211.531C503.729%20211.515%20505.222%20212.919%20505.319%20214.716%20505.389%20216.544%20503.964%20218.083%20502.136%20218.154%20502.093%20218.155%20502.05%20218.156%20502.006%20218.156L497.503%20218.156C495.941%20218.15%20494.594%20217.058%20494.263%20215.531L490.363%20197.147C490.174%20196.252%20489.294%20195.68%20488.4%20195.87%20488.399%20195.87%20488.399%20195.87%20488.399%20195.87%20488.174%20195.918%20487.962%20196.014%20487.776%20196.15L481.184%20200.898C479.925%20201.758%20478.809%20202.45%20477.776%20203.015%20476.998%20203.429%20476.669%20204.372%20477.022%20205.18%20477.402%20206.011%20478.385%20206.378%20479.217%20205.998%20479.253%20205.981%20479.288%20205.964%20479.322%20205.945%20480.618%20205.229%20481.877%20204.447%20483.094%20203.604L487.657%20200.313%20491.031%20216.213C491.677%20219.273%20494.376%20221.464%20497.503%20221.469L501.882%20221.469C505.577%20221.473%20508.587%20218.502%20508.631%20214.807%20508.608%20211.503%20506.158%20208.719%20502.883%20208.277L499.416%20191.93C502.051%20190.581%20506.719%20188.344%20509.619%20188.344%20515.225%20188.346%20520.812%20187.662%20526.252%20186.307%20530.081%20185.36%20533.152%20182.51%20534.381%20178.762L534.535%20178.295C535.676%20175.09%20535.323%20171.542%20533.573%20168.624L525.126%20154.2C522.254%20149.369%20517.625%20145.835%20512.207%20144.337%20512.364%20138.624%20511.516%20132.927%20509.7%20127.508%20504.714%20113.244%20488.452%20105.977%20487.761%20105.669%20487.336%20105.48%20486.851%20105.48%20486.426%20105.669%20485.959%20105.876%20484.987%20106.308%20483.1%20111.962%20482.811%20112.832%20483.281%20113.77%20484.15%20114.059%20485.019%20114.348%20485.958%20113.878%20486.247%20113.009%20486.649%20111.744%20487.129%20110.505%20487.685%20109.299%20491.474%20111.245%20502.818%20117.831%20506.566%20128.543%20508.418%20133.972%20509.183%20139.713%20508.815%20145.437%20508.734%20146.277%20509.297%20147.043%20510.122%20147.217%20515.212%20148.269%20519.626%20151.41%20522.287%20155.875L530.744%20170.299C532.007%20172.379%20532.256%20174.921%20531.42%20177.207L531.254%20177.727C530.378%20180.388%20528.194%20182.41%20525.474%20183.079%20520.288%20184.375%20514.964%20185.031%20509.619%20185.031%20505.93%20185.031%20501.061%20187.35%20496.776%20189.601Z'/%3e%3cpath%20d='M422.439%20192.966C421.946%20190.791%20421.681%20188.571%20421.649%20186.341%20421.7%20185.427%20421.001%20184.643%20420.086%20184.592%20419.171%20184.54%20418.388%20185.239%20418.336%20186.154%20418.324%20187.879%20418.47%20189.602%20418.772%20191.3%20412.577%20189.633%20408.907%20183.26%20410.574%20177.065%20411.942%20171.981%20416.559%20168.453%20421.824%20168.469%20422.661%20168.473%20423.491%20168.611%20424.284%20168.88%20425.056%20169.133%20425.898%20168.787%20426.271%20168.065%20435.26%20150.783%20455.639%20142.806%20473.971%20149.392%20474.837%20150.636%20475.5%20151.557%20475.559%20151.638%20476.094%20152.38%20477.129%20152.549%20477.872%20152.014%20478.614%20151.479%20478.782%20150.444%20478.248%20149.702%20478.216%20149.657%20475.101%20145.338%20473.444%20142.62%20467.845%20132.798%20470.283%20120.115%20471.358%20115.817%20475.617%20117.014%20487.816%20121.194%20493.442%20131.039%20496.082%20135.531%20497.921%20140.449%20498.876%20145.571%20499.017%20146.361%20499.705%20146.936%20500.508%20146.936L503.929%20146.936C504.816%20146.948%20505.561%20146.274%20505.639%20145.391%20505.7%20144.478%20505.01%20143.688%20504.097%20143.627%20504.059%20143.624%20504.021%20143.623%20503.982%20143.623L501.871%20143.623C500.778%20138.613%20498.902%20133.806%20496.312%20129.38%20488.742%20116.13%20471.271%20112.337%20470.533%20112.183%20469.704%20112.01%20468.879%20112.489%20468.618%20113.294%20468.385%20114.011%20463.013%20131.036%20470.568%20144.256%20470.579%20144.276%20470.745%20144.576%20470.978%20144.973%20470.99%20144.991%20470.978%20145.003%20470.96%20144.998%20452.498%20140.481%20433.287%20148.811%20423.966%20165.375%20423.261%20165.231%20422.543%20165.158%20421.824%20165.156%20413.582%20165.183%20406.923%20171.886%20406.95%20180.128%20406.974%20187.414%20412.256%20193.618%20419.446%20194.803L419.446%20194.803C419.532%20195.194%20419.611%20195.585%20419.706%20195.972L419.8%20196.329C422.428%20206.56%20428.796%20215.436%20437.646%20221.204%20437.917%20221.379%20438.232%20221.473%20438.554%20221.474L473.068%20221.474C476.748%20221.495%20479.756%20218.542%20479.801%20214.862%20479.847%20211.242%20476.95%20208.27%20473.329%20208.224%20473.278%20208.223%20473.227%20208.223%20473.176%20208.224L465.158%20208.224C474.765%20201.216%20476.873%20187.747%20469.866%20178.14%20465.812%20172.583%20459.348%20169.297%20452.47%20169.297%20450.573%20169.261%20448.682%20169.507%20446.858%20170.029%20445.981%20170.293%20445.484%20171.219%20445.749%20172.096%20446.013%20172.973%20446.938%20173.47%20447.816%20173.206%20449.328%20172.775%20450.897%20172.574%20452.47%20172.609%20462.532%20172.632%20470.67%20180.807%20470.648%20190.869%20470.63%20198.914%20465.337%20205.995%20457.626%20208.29%20456.784%20208.543%20456.286%20209.408%20456.491%20210.263%20456.686%20211.016%20457.369%20211.54%20458.147%20211.533L473.107%20211.533C474.951%20211.521%20476.458%20213.001%20476.48%20214.845%20476.52%20216.635%20475.102%20218.118%20473.312%20218.158%20473.264%20218.159%20473.216%20218.159%20473.168%20218.158L439.054%20218.158C431.004%20212.776%20425.251%20204.584%20422.922%20195.184%20422.853%20194.889%20422.795%20194.619%20422.733%20194.339Z'/%3e%3cpath%20d='M519.521%20163.831C519.708%20162.011%20518.383%20160.385%20516.563%20160.199%20514.743%20160.012%20513.117%20161.337%20512.931%20163.157%20512.744%20164.977%20514.069%20166.603%20515.889%20166.789%20516.113%20166.812%20516.339%20166.812%20516.563%20166.789%20518.126%20166.629%20519.361%20165.394%20519.521%20163.831Z'/%3e%3c/g%3e%3c/svg%3e", ac = "_WPMSpeedButtonsWrap_r3byt_1", cc = "_btnWrap_r3byt_7", uc = "_label_r3byt_14", dc = "_iconBtn_r3byt_22", qt = {
|
|
@@ -5365,10 +5365,10 @@ const rc = W.memo(nc), oc = Wt(function() {
|
|
|
5365
5365
|
label: uc,
|
|
5366
5366
|
iconBtn: dc
|
|
5367
5367
|
}, xo = 350, fc = 40, pc = 0.85, hc = Wt(function() {
|
|
5368
|
-
const t = Y((
|
|
5369
|
-
(
|
|
5368
|
+
const t = Y((h) => h.audioSpeed), n = Y((h) => h.incAudioSpeed), r = Y((h) => h.decAudioSpeed), o = ie(null), i = ie(xo), s = ie(null), c = Q(
|
|
5369
|
+
(h) => {
|
|
5370
5370
|
const b = t;
|
|
5371
|
-
if (
|
|
5371
|
+
if (h === "inc") {
|
|
5372
5372
|
if (b >= 2) return !1;
|
|
5373
5373
|
n();
|
|
5374
5374
|
} else {
|
|
@@ -5385,16 +5385,16 @@ const rc = W.memo(nc), oc = Wt(function() {
|
|
|
5385
5385
|
c(s.current) ? a() : l();
|
|
5386
5386
|
}, i.current));
|
|
5387
5387
|
}, [c, l]), d = Q(
|
|
5388
|
-
(
|
|
5388
|
+
(h) => {
|
|
5389
5389
|
if (s.current) return;
|
|
5390
|
-
s.current =
|
|
5391
|
-
const
|
|
5392
|
-
window.addEventListener("mouseup",
|
|
5390
|
+
s.current = h, i.current = xo, c(h) && a();
|
|
5391
|
+
const m = () => l();
|
|
5392
|
+
window.addEventListener("mouseup", m, { once: !0 }), window.addEventListener("touchend", m, { once: !0 });
|
|
5393
5393
|
},
|
|
5394
5394
|
[a, c, l]
|
|
5395
5395
|
);
|
|
5396
5396
|
Se(() => l, [l]);
|
|
5397
|
-
const
|
|
5397
|
+
const v = `${(t * 100).toFixed(0)}%`;
|
|
5398
5398
|
return /* @__PURE__ */ x(
|
|
5399
5399
|
"div",
|
|
5400
5400
|
{
|
|
@@ -5408,14 +5408,14 @@ const rc = W.memo(nc), oc = Wt(function() {
|
|
|
5408
5408
|
type: "button",
|
|
5409
5409
|
title: "속도 느리게",
|
|
5410
5410
|
onMouseDown: () => d("dec"),
|
|
5411
|
-
onTouchStart: (
|
|
5412
|
-
|
|
5411
|
+
onTouchStart: (h) => {
|
|
5412
|
+
h.preventDefault(), d("dec");
|
|
5413
5413
|
},
|
|
5414
5414
|
onMouseUp: l,
|
|
5415
5415
|
children: /* @__PURE__ */ x("img", { src: sc, alt: "느리게" })
|
|
5416
5416
|
}
|
|
5417
5417
|
),
|
|
5418
|
-
/* @__PURE__ */ x("div", { className: qt.label, style: { minWidth: "44px", textAlign: "center" }, children: /* @__PURE__ */ x("div", { children:
|
|
5418
|
+
/* @__PURE__ */ x("div", { className: qt.label, style: { minWidth: "44px", textAlign: "center" }, children: /* @__PURE__ */ x("div", { children: v }) }),
|
|
5419
5419
|
/* @__PURE__ */ x(
|
|
5420
5420
|
"button",
|
|
5421
5421
|
{
|
|
@@ -5423,8 +5423,8 @@ const rc = W.memo(nc), oc = Wt(function() {
|
|
|
5423
5423
|
type: "button",
|
|
5424
5424
|
title: "속도 빠르게",
|
|
5425
5425
|
onMouseDown: () => d("inc"),
|
|
5426
|
-
onTouchStart: (
|
|
5427
|
-
|
|
5426
|
+
onTouchStart: (h) => {
|
|
5427
|
+
h.preventDefault(), d("inc");
|
|
5428
5428
|
},
|
|
5429
5429
|
onMouseUp: l,
|
|
5430
5430
|
children: /* @__PURE__ */ x("img", { src: lc, alt: "빠르게" })
|
|
@@ -5443,11 +5443,11 @@ function vc(e) {
|
|
|
5443
5443
|
return it({ 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);
|
|
5444
5444
|
}
|
|
5445
5445
|
function wo({ direction: e }) {
|
|
5446
|
-
const t = j((
|
|
5447
|
-
async (
|
|
5448
|
-
var
|
|
5449
|
-
const
|
|
5450
|
-
i(b, "scrubber-step"), s(b), await ((y = (
|
|
5446
|
+
const t = j((v) => v.currentGlobalRunIndex), n = j((v) => v.totalRuns), r = j((v) => v.hasReadableInDir), o = j((v) => v.computeStepTarget), i = j((v) => v.setCurrentGlobalRunIndex), s = _e((v) => v.syncToGI), c = j((v) => v.getSectionScrollApi), l = Q(
|
|
5447
|
+
async (v) => {
|
|
5448
|
+
var m, y;
|
|
5449
|
+
const h = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), b = o(h, v);
|
|
5450
|
+
i(b, "scrubber-step"), s(b), await ((y = (m = c()) == null ? void 0 : m.ensureVisibleGI) == null ? void 0 : y.call(m, b));
|
|
5451
5451
|
},
|
|
5452
5452
|
[
|
|
5453
5453
|
t,
|
|
@@ -5459,8 +5459,8 @@ function wo({ direction: e }) {
|
|
|
5459
5459
|
c
|
|
5460
5460
|
]
|
|
5461
5461
|
), a = ve(() => {
|
|
5462
|
-
const
|
|
5463
|
-
return e === "left" ? b :
|
|
5462
|
+
const v = Math.max(t, Math.min(0, Math.max(0, (n ?? 1) - 1))), h = !n || !r(v, 1), b = !n || !r(v, -1);
|
|
5463
|
+
return e === "left" ? b : h;
|
|
5464
5464
|
}, [e, n, t, r]), d = Q(() => {
|
|
5465
5465
|
l(e === "left" ? -1 : 1);
|
|
5466
5466
|
}, [e, l]);
|
|
@@ -5509,41 +5509,41 @@ function Ic(e) {
|
|
|
5509
5509
|
}
|
|
5510
5510
|
function Cc() {
|
|
5511
5511
|
var R;
|
|
5512
|
-
const e = Y((I) => I.showOverlays), t = j((I) => I.section), n = !!t.ast.isAddedSplit, r = !!((R = t.audios) != null && R.length), o = Y((I) => I.muteAudio), i = Y((I) => I.showPointer), s = Y((I) => I.showSplit), c = Y((I) => I.toggleMuteAudio), l = Y((I) => I.toggleShowPointer), a = Y((I) => I.toggleShowSplit), d = Y((I) => I.overlayCompactMode),
|
|
5512
|
+
const e = Y((I) => I.showOverlays), t = j((I) => I.section), n = !!t.ast.isAddedSplit, r = !!((R = t.audios) != null && R.length), o = Y((I) => I.muteAudio), i = Y((I) => I.showPointer), s = Y((I) => I.showSplit), c = Y((I) => I.toggleMuteAudio), l = Y((I) => I.toggleShowPointer), a = Y((I) => I.toggleShowSplit), d = Y((I) => I.overlayCompactMode), v = Y((I) => I.toggleOverlayCompactMode), h = yn(), b = Rt();
|
|
5513
5513
|
Se(() => {
|
|
5514
|
-
const I =
|
|
5514
|
+
const I = h.getState(), { syncToGI: p, useFake: S, useReal: k } = I, E = I.playbackKind, O = b.getState().progress.currentGlobalRunIndex ?? 0;
|
|
5515
5515
|
if (!r) {
|
|
5516
5516
|
E !== "fake" && S();
|
|
5517
5517
|
return;
|
|
5518
5518
|
}
|
|
5519
|
-
o ? E !== "fake" && (console.log("이부분일까?"), S()) : E !== "real" && (
|
|
5520
|
-
}, [r, o, b,
|
|
5521
|
-
const
|
|
5519
|
+
o ? E !== "fake" && (console.log("이부분일까?"), S()) : E !== "real" && (p(O), k());
|
|
5520
|
+
}, [r, o, b, h]);
|
|
5521
|
+
const m = _e((I) => I.play), y = _e((I) => I.pause), u = _e((I) => I.status), f = Q(
|
|
5522
5522
|
(I) => {
|
|
5523
|
-
I.stopPropagation(), u === "playing" || u === "loading" ? y() :
|
|
5523
|
+
I.stopPropagation(), u === "playing" || u === "loading" ? y() : m();
|
|
5524
5524
|
},
|
|
5525
|
-
[u,
|
|
5526
|
-
), g = yn(), C = Rt(),
|
|
5525
|
+
[u, m, y]
|
|
5526
|
+
), g = yn(), C = Rt(), T = Q(
|
|
5527
5527
|
async (I) => {
|
|
5528
5528
|
var F, V;
|
|
5529
5529
|
if (I.stopPropagation(), u === "playing" || u === "loading") {
|
|
5530
5530
|
y();
|
|
5531
5531
|
return;
|
|
5532
5532
|
}
|
|
5533
|
-
const { progress:
|
|
5533
|
+
const { progress: p } = C.getState(), {
|
|
5534
5534
|
currentGlobalRunIndex: S,
|
|
5535
|
-
snapToReadable:
|
|
5535
|
+
snapToReadable: k,
|
|
5536
5536
|
edgeReadable: E,
|
|
5537
5537
|
setCurrentGlobalRunIndex: O,
|
|
5538
5538
|
getSectionScrollApi: z
|
|
5539
|
-
} =
|
|
5539
|
+
} = p, w = g.getState(), _ = w.currentClip, P = z == null ? void 0 : z(), G = typeof S == "number" ? S : 0, M = typeof k == "function" ? k(G) : G, B = typeof E == "function" ? E(1) : null;
|
|
5540
5540
|
if (B != null && M >= B) {
|
|
5541
5541
|
O == null || O(B, "audio"), await ((F = P == null ? void 0 : P.ensureVisibleGI) == null ? void 0 : F.call(P, B)), w.syncToGI(B);
|
|
5542
5542
|
return;
|
|
5543
5543
|
}
|
|
5544
|
-
O == null || O(M, "audio"), await ((V = P == null ? void 0 : P.ensureVisibleGI) == null ? void 0 : V.call(P, M)), w.syncToGI(M),
|
|
5544
|
+
O == null || O(M, "audio"), await ((V = P == null ? void 0 : P.ensureVisibleGI) == null ? void 0 : V.call(P, M)), w.syncToGI(M), m(_);
|
|
5545
5545
|
},
|
|
5546
|
-
[u, y,
|
|
5546
|
+
[u, y, m, g, C]
|
|
5547
5547
|
);
|
|
5548
5548
|
return /* @__PURE__ */ Z(
|
|
5549
5549
|
"div",
|
|
@@ -5565,7 +5565,7 @@ function Cc() {
|
|
|
5565
5565
|
{
|
|
5566
5566
|
type: "button",
|
|
5567
5567
|
onClick: (I) => {
|
|
5568
|
-
I.stopPropagation(),
|
|
5568
|
+
I.stopPropagation(), v();
|
|
5569
5569
|
},
|
|
5570
5570
|
className: Le.compactBtn,
|
|
5571
5571
|
title: d ? "오버레이 확대" : "오버레이 축소",
|
|
@@ -5579,7 +5579,7 @@ function Cc() {
|
|
|
5579
5579
|
{
|
|
5580
5580
|
size: 34,
|
|
5581
5581
|
isPlaying: u === "playing",
|
|
5582
|
-
onClick: o ?
|
|
5582
|
+
onClick: o ? T : f,
|
|
5583
5583
|
title: u === "playing" ? "일시정지" : "재생"
|
|
5584
5584
|
}
|
|
5585
5585
|
),
|
|
@@ -5698,38 +5698,38 @@ const zc = W.memo(Bc), Ac = "_wrap_62su0_7", Lc = "_wrapHidden_62su0_29", Gc = "
|
|
|
5698
5698
|
inlineFlex: Yc
|
|
5699
5699
|
};
|
|
5700
5700
|
function Qc({ visible: e }) {
|
|
5701
|
-
const t = Y((
|
|
5701
|
+
const t = Y((p) => p.mode), n = Y((p) => p.setMode), r = Y((p) => p.theme), o = Y((p) => p.setTheme), i = Y((p) => p.fontFamily), s = Y((p) => p.setFontFamily), c = Y((p) => p.resetToDefaults), l = Y((p) => p.getFontLevel()), a = Y((p) => p.getLineLevel()), d = Y((p) => p.getMarginLevel()), v = Y((p) => p.setFontLevel), h = Y((p) => p.setLineLevel), b = Y((p) => p.setMarginLevel), m = Y((p) => p.pointerStyle), y = Y((p) => p.setPointerStyle), u = Y((p) => p.pointerColor), f = Y((p) => p.setPointerColor), g = Y((p) => p.breakMarks), C = Y((p) => p.toggleBreakMark), T = Y((p) => p.getBreakGapLevel()), R = Y((p) => p.setBreakGapLevel), I = `${ze.wrap} ${e ? ze.wrapVisible : ze.wrapHidden}`;
|
|
5702
5702
|
return /* @__PURE__ */ Z("div", { className: I, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
|
|
5703
5703
|
/* @__PURE__ */ Z("div", { className: ze.scrollArea, children: [
|
|
5704
5704
|
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ Z("div", { className: ze.inlineFlex, children: [
|
|
5705
5705
|
/* @__PURE__ */ x(Lt, { active: t === "page", onClick: () => n("page"), children: "페이지" }),
|
|
5706
5706
|
/* @__PURE__ */ x(Lt, { active: t === "scroll", onClick: () => n("scroll"), children: "스크롤" })
|
|
5707
5707
|
] }) }),
|
|
5708
|
-
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Object.keys(bn).map((
|
|
5709
|
-
const S =
|
|
5708
|
+
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Object.keys(bn).map((p) => {
|
|
5709
|
+
const S = p, k = bn[S];
|
|
5710
5710
|
return /* @__PURE__ */ x(
|
|
5711
5711
|
"button",
|
|
5712
5712
|
{
|
|
5713
5713
|
type: "button",
|
|
5714
5714
|
onClick: () => o(S),
|
|
5715
|
-
className: `${ze.themeCircle} ${r ===
|
|
5716
|
-
style: { background:
|
|
5717
|
-
title: String(
|
|
5718
|
-
"aria-label": `테마: ${String(
|
|
5715
|
+
className: `${ze.themeCircle} ${r === p ? ze.themeCircleActive : ""}`,
|
|
5716
|
+
style: { background: k.bg, color: k.fg, fontFamily: i },
|
|
5717
|
+
title: String(p),
|
|
5718
|
+
"aria-label": `테마: ${String(p)}`,
|
|
5719
5719
|
children: "A"
|
|
5720
5720
|
},
|
|
5721
|
-
`${
|
|
5721
|
+
`${p}_tc_button`
|
|
5722
5722
|
);
|
|
5723
5723
|
}) }) }),
|
|
5724
|
-
/* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Xo.map((
|
|
5724
|
+
/* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: ze.inlineFlex, children: Xo.map((p) => /* @__PURE__ */ x(
|
|
5725
5725
|
Lt,
|
|
5726
5726
|
{
|
|
5727
|
-
active: i ===
|
|
5728
|
-
onClick: () => s(
|
|
5729
|
-
title:
|
|
5730
|
-
children:
|
|
5727
|
+
active: i === p.value,
|
|
5728
|
+
onClick: () => s(p.value),
|
|
5729
|
+
title: p.value,
|
|
5730
|
+
children: p.label
|
|
5731
5731
|
},
|
|
5732
|
-
|
|
5732
|
+
p.label
|
|
5733
5733
|
)) }) }),
|
|
5734
5734
|
/* @__PURE__ */ x(
|
|
5735
5735
|
pn,
|
|
@@ -5738,8 +5738,8 @@ function Qc({ visible: e }) {
|
|
|
5738
5738
|
level: l,
|
|
5739
5739
|
min: 1,
|
|
5740
5740
|
max: 12,
|
|
5741
|
-
onDec: () =>
|
|
5742
|
-
onInc: () =>
|
|
5741
|
+
onDec: () => v(Math.max(1, l - 1)),
|
|
5742
|
+
onInc: () => v(Math.min(12, l + 1))
|
|
5743
5743
|
}
|
|
5744
5744
|
),
|
|
5745
5745
|
/* @__PURE__ */ x(
|
|
@@ -5749,8 +5749,8 @@ function Qc({ visible: e }) {
|
|
|
5749
5749
|
level: a,
|
|
5750
5750
|
min: 1,
|
|
5751
5751
|
max: 7,
|
|
5752
|
-
onDec: () =>
|
|
5753
|
-
onInc: () =>
|
|
5752
|
+
onDec: () => h(Math.max(1, a - 1)),
|
|
5753
|
+
onInc: () => h(Math.min(7, a + 1))
|
|
5754
5754
|
}
|
|
5755
5755
|
),
|
|
5756
5756
|
/* @__PURE__ */ x(
|
|
@@ -5765,14 +5765,14 @@ function Qc({ visible: e }) {
|
|
|
5765
5765
|
}
|
|
5766
5766
|
),
|
|
5767
5767
|
/* @__PURE__ */ x(jt, { label: "포인터", children: /* @__PURE__ */ Z("div", { className: ze.inlineFlex, children: [
|
|
5768
|
-
/* @__PURE__ */ x(Lt, { active:
|
|
5769
|
-
/* @__PURE__ */ x(Lt, { active:
|
|
5768
|
+
/* @__PURE__ */ x(Lt, { active: m === "highlight", onClick: () => y("highlight"), children: "형광펜" }),
|
|
5769
|
+
/* @__PURE__ */ x(Lt, { active: m === "underline", onClick: () => y("underline"), children: "밑줄" }),
|
|
5770
5770
|
/* @__PURE__ */ x(
|
|
5771
5771
|
"input",
|
|
5772
5772
|
{
|
|
5773
5773
|
type: "color",
|
|
5774
5774
|
value: u,
|
|
5775
|
-
onChange: (
|
|
5775
|
+
onChange: (p) => f(p.target.value),
|
|
5776
5776
|
"aria-label": "포인터 색상",
|
|
5777
5777
|
style: {
|
|
5778
5778
|
width: 36,
|
|
@@ -5789,11 +5789,11 @@ function Qc({ visible: e }) {
|
|
|
5789
5789
|
pn,
|
|
5790
5790
|
{
|
|
5791
5791
|
label: "끊기간격",
|
|
5792
|
-
level:
|
|
5792
|
+
level: T,
|
|
5793
5793
|
min: 1,
|
|
5794
5794
|
max: 5,
|
|
5795
|
-
onDec: () => R(Math.max(1,
|
|
5796
|
-
onInc: () => R(Math.min(5,
|
|
5795
|
+
onDec: () => R(Math.max(1, T - 1)),
|
|
5796
|
+
onInc: () => R(Math.min(5, T + 1))
|
|
5797
5797
|
}
|
|
5798
5798
|
)
|
|
5799
5799
|
] }),
|
|
@@ -5887,14 +5887,14 @@ const Zc = W.memo(function() {
|
|
|
5887
5887
|
let a = s;
|
|
5888
5888
|
if (c) {
|
|
5889
5889
|
const d = (l == null ? void 0 : l.equalityFn) || Object.is;
|
|
5890
|
-
let
|
|
5891
|
-
a = (
|
|
5892
|
-
const b = s(
|
|
5893
|
-
if (!d(
|
|
5894
|
-
const
|
|
5895
|
-
c(
|
|
5890
|
+
let v = s(r.getState());
|
|
5891
|
+
a = (h) => {
|
|
5892
|
+
const b = s(h);
|
|
5893
|
+
if (!d(v, b)) {
|
|
5894
|
+
const m = v;
|
|
5895
|
+
c(v = b, m);
|
|
5896
5896
|
}
|
|
5897
|
-
}, l != null && l.fireImmediately && c(
|
|
5897
|
+
}, l != null && l.fireImmediately && c(v, v);
|
|
5898
5898
|
}
|
|
5899
5899
|
return o(a);
|
|
5900
5900
|
}), e(t, n, r);
|
|
@@ -5922,16 +5922,16 @@ function ou(e) {
|
|
|
5922
5922
|
let n = e == null ? void 0 : e.map, r = e == null ? void 0 : e.initialIndex;
|
|
5923
5923
|
const o = (b) => {
|
|
5924
5924
|
if (!n) return null;
|
|
5925
|
-
const { g2ct:
|
|
5926
|
-
if (!
|
|
5927
|
-
const y =
|
|
5925
|
+
const { g2ct: m } = n;
|
|
5926
|
+
if (!m) return null;
|
|
5927
|
+
const y = m[b];
|
|
5928
5928
|
if (y) return { clip: y.clip, t: y.t };
|
|
5929
5929
|
for (let u = 1; u <= 100 && b - u >= 0; u++) {
|
|
5930
|
-
const f =
|
|
5930
|
+
const f = m[b - u];
|
|
5931
5931
|
if (f) return { clip: f.clip, t: f.t };
|
|
5932
5932
|
}
|
|
5933
5933
|
for (let u = 1; u <= 100; u++) {
|
|
5934
|
-
const f =
|
|
5934
|
+
const f = m[b + u];
|
|
5935
5935
|
if (f) return { clip: f.clip, t: f.t };
|
|
5936
5936
|
}
|
|
5937
5937
|
return null;
|
|
@@ -5942,9 +5942,9 @@ function ou(e) {
|
|
|
5942
5942
|
const b = o(e.initialIndex);
|
|
5943
5943
|
b && (s = b.clip, c = b.t, r = void 0);
|
|
5944
5944
|
}
|
|
5945
|
-
const a = i.length > 0, d = a ? "paused" : "idle",
|
|
5945
|
+
const a = i.length > 0, d = a ? "paused" : "idle", v = a ? "real" : "fake", h = a ? null : { totalWords: l };
|
|
5946
5946
|
return rn(
|
|
5947
|
-
eu((b,
|
|
5947
|
+
eu((b, m) => ({
|
|
5948
5948
|
// 원본/포인터
|
|
5949
5949
|
clips: i,
|
|
5950
5950
|
currentClip: Math.max(0, Math.min(s, Math.max(0, i.length - 1))),
|
|
@@ -5953,8 +5953,8 @@ function ou(e) {
|
|
|
5953
5953
|
status: d,
|
|
5954
5954
|
scrollLock: !1,
|
|
5955
5955
|
// 엔진/설정
|
|
5956
|
-
playbackKind:
|
|
5957
|
-
fake:
|
|
5956
|
+
playbackKind: v,
|
|
5957
|
+
fake: h,
|
|
5958
5958
|
// 엔진 모드 전환
|
|
5959
5959
|
useFake: () => b((y) => ({
|
|
5960
5960
|
playbackKind: "fake",
|
|
@@ -6062,7 +6062,7 @@ function ou(e) {
|
|
|
6062
6062
|
setClipIndex: (y) => b((u) => u.playbackKind === "fake" || y < 0 || y >= u.clips.length ? u : { currentClip: y, currentTimeMs: 0 }),
|
|
6063
6063
|
// 조회
|
|
6064
6064
|
getClipSrc: (y) => {
|
|
6065
|
-
const u =
|
|
6065
|
+
const u = m();
|
|
6066
6066
|
if (!u.clips.length) return null;
|
|
6067
6067
|
const f = typeof y == "number" ? y : u.currentClip;
|
|
6068
6068
|
return tu(u.clips[f]);
|
|
@@ -6072,12 +6072,12 @@ function ou(e) {
|
|
|
6072
6072
|
if (!n) return -1;
|
|
6073
6073
|
const f = n.byClip[y];
|
|
6074
6074
|
if (!f || f.length === 0) return -1;
|
|
6075
|
-
let g = 0, C = f.length - 1,
|
|
6075
|
+
let g = 0, C = f.length - 1, T = 0;
|
|
6076
6076
|
for (; g <= C; ) {
|
|
6077
6077
|
const R = g + C >> 1;
|
|
6078
|
-
f[R].t <= u ? (
|
|
6078
|
+
f[R].t <= u ? (T = R, g = R + 1) : C = R - 1;
|
|
6079
6079
|
}
|
|
6080
|
-
return f[Math.max(0, Math.min(
|
|
6080
|
+
return f[Math.max(0, Math.min(T, f.length - 1))].g;
|
|
6081
6081
|
},
|
|
6082
6082
|
// GI -> (clip,time)
|
|
6083
6083
|
getCTFromGI: (y) => {
|
|
@@ -6096,22 +6096,22 @@ function ou(e) {
|
|
|
6096
6096
|
g--;
|
|
6097
6097
|
}
|
|
6098
6098
|
if (!f) {
|
|
6099
|
-
let
|
|
6099
|
+
let T = y + 1;
|
|
6100
6100
|
const R = y + 100;
|
|
6101
|
-
for (; u[
|
|
6102
|
-
u[
|
|
6101
|
+
for (; u[T] == null && T <= R; ) T++;
|
|
6102
|
+
u[T] && (f = u[T]);
|
|
6103
6103
|
}
|
|
6104
6104
|
}
|
|
6105
6105
|
return f ? { clip: f.clip, timeMs: f.t } : null;
|
|
6106
6106
|
},
|
|
6107
6107
|
// 편의
|
|
6108
6108
|
getMetaByGI: (y) => {
|
|
6109
|
-
const u =
|
|
6109
|
+
const u = m().getCTFromGI(y);
|
|
6110
6110
|
return u ? { clipIndex: u.clip, timeMs: u.timeMs } : null;
|
|
6111
6111
|
},
|
|
6112
6112
|
syncToGI: (y) => {
|
|
6113
|
-
const u =
|
|
6114
|
-
u &&
|
|
6113
|
+
const u = m().getMetaByGI(y);
|
|
6114
|
+
u && m().setClipAndMs(u.clipIndex, u.timeMs);
|
|
6115
6115
|
},
|
|
6116
6116
|
// <audio> 이벤트 (real 전용)
|
|
6117
6117
|
_onTime: (y) => b({ currentTimeMs: y, status: "playing", scrollLock: !0 }),
|
|
@@ -6147,8 +6147,8 @@ function su(e) {
|
|
|
6147
6147
|
if ((c == null ? void 0 : c.type) === "image") continue;
|
|
6148
6148
|
const l = (c == null ? void 0 : c.runs) ?? [];
|
|
6149
6149
|
for (let a = 0; a < l.length; a++) {
|
|
6150
|
-
const d = l[a],
|
|
6151
|
-
d.audioChunkIndex != null && d.audioTimeMs != null && ((t[s = d.audioChunkIndex] || (t[s] = [])).push({ t: d.audioTimeMs, g:
|
|
6150
|
+
const d = l[a], v = o + a;
|
|
6151
|
+
d.audioChunkIndex != null && d.audioTimeMs != null && ((t[s = d.audioChunkIndex] || (t[s] = [])).push({ t: d.audioTimeMs, g: v }), n[v] = { clip: d.audioChunkIndex, t: d.audioTimeMs });
|
|
6152
6152
|
}
|
|
6153
6153
|
o += l.length;
|
|
6154
6154
|
}
|
|
@@ -6167,23 +6167,23 @@ function lu(e, t, n) {
|
|
|
6167
6167
|
return -1;
|
|
6168
6168
|
}
|
|
6169
6169
|
function au(e) {
|
|
6170
|
-
const t = na(e), n = ra(t), r = t.reduce((d,
|
|
6171
|
-
return e.forEach((d,
|
|
6170
|
+
const t = na(e), n = ra(t), r = t.reduce((d, v) => d + (v || 0), 0), o = new Int32Array(Math.max(1, r)).fill(-1), i = new Uint8Array(Math.max(1, r)).fill(0), s = [], c = [];
|
|
6171
|
+
return e.forEach((d, v) => {
|
|
6172
6172
|
var u;
|
|
6173
6173
|
if (d.type !== "paragraph") return;
|
|
6174
|
-
const
|
|
6174
|
+
const h = n[v] ?? 0, b = d.runs ?? [];
|
|
6175
6175
|
for (let f = 0; f < b.length; f++) {
|
|
6176
6176
|
const g = ((u = b[f]) == null ? void 0 : u.text) || "";
|
|
6177
|
-
br(g) && (i[
|
|
6177
|
+
br(g) && (i[h + f] = 1);
|
|
6178
6178
|
}
|
|
6179
|
-
const y = oa(b,
|
|
6179
|
+
const y = oa(b, h).map((f) => {
|
|
6180
6180
|
var R;
|
|
6181
|
-
const g = f.startG -
|
|
6182
|
-
let
|
|
6181
|
+
const g = f.startG - h, C = f.endG - f.startG + 1;
|
|
6182
|
+
let T = -1;
|
|
6183
6183
|
for (let I = 0; I < C; I++) {
|
|
6184
|
-
const
|
|
6185
|
-
if (br(
|
|
6186
|
-
|
|
6184
|
+
const p = ((R = b[g + I]) == null ? void 0 : R.text) ?? "";
|
|
6185
|
+
if (br(p)) {
|
|
6186
|
+
T = f.startG + I;
|
|
6187
6187
|
break;
|
|
6188
6188
|
}
|
|
6189
6189
|
}
|
|
@@ -6192,11 +6192,11 @@ function au(e) {
|
|
|
6192
6192
|
endG: f.endG,
|
|
6193
6193
|
r0: g,
|
|
6194
6194
|
len: C,
|
|
6195
|
-
firstReadableGI:
|
|
6195
|
+
firstReadableGI: T,
|
|
6196
6196
|
splitIndex: f.splitIndex
|
|
6197
6197
|
};
|
|
6198
6198
|
});
|
|
6199
|
-
c[
|
|
6199
|
+
c[v] = y;
|
|
6200
6200
|
for (const f of y) {
|
|
6201
6201
|
const g = s.length;
|
|
6202
6202
|
for (let C = f.startG; C <= f.endG; C++)
|
|
@@ -6221,7 +6221,7 @@ function cu(e) {
|
|
|
6221
6221
|
layout: c,
|
|
6222
6222
|
initialIndex: l,
|
|
6223
6223
|
mountTime: a
|
|
6224
|
-
} = e, d = c.totalRuns ?? 0,
|
|
6224
|
+
} = e, d = c.totalRuns ?? 0, v = typeof l == "number" ? l : d > 0 ? 0 : -1, h = v >= 0 ? lu(s.readableGi, v, d) : -1;
|
|
6225
6225
|
return {
|
|
6226
6226
|
section: t,
|
|
6227
6227
|
sectionId: t.section_id,
|
|
@@ -6229,7 +6229,7 @@ function cu(e) {
|
|
|
6229
6229
|
onSectionNav: r,
|
|
6230
6230
|
isCanPrev: o ?? !1,
|
|
6231
6231
|
isCanNext: i ?? !1,
|
|
6232
|
-
currentGlobalRunIndex:
|
|
6232
|
+
currentGlobalRunIndex: h,
|
|
6233
6233
|
lastUpdateBy: "program",
|
|
6234
6234
|
totalRuns: d,
|
|
6235
6235
|
pageIndex: 0,
|
|
@@ -6251,7 +6251,7 @@ function uu(e) {
|
|
|
6251
6251
|
isCanPrev: i,
|
|
6252
6252
|
isCanNext: s,
|
|
6253
6253
|
eventBridgeStore: c
|
|
6254
|
-
} = e, l = t.ast.blocks, { nav: a, layout: d } = au(l),
|
|
6254
|
+
} = e, l = t.ast.blocks, { nav: a, layout: d } = au(l), v = Date.now(), h = cu({
|
|
6255
6255
|
section: t,
|
|
6256
6256
|
onViewerClose: r,
|
|
6257
6257
|
onSectionNav: o,
|
|
@@ -6260,14 +6260,14 @@ function uu(e) {
|
|
|
6260
6260
|
nav: a,
|
|
6261
6261
|
layout: d,
|
|
6262
6262
|
initialIndex: n,
|
|
6263
|
-
mountTime:
|
|
6263
|
+
mountTime: v
|
|
6264
6264
|
});
|
|
6265
6265
|
return c && queueMicrotask(() => {
|
|
6266
|
-
c.getState().emit({ type: "render_start", payload: { sectionId: t.section_id } },
|
|
6267
|
-
}), rn((b,
|
|
6266
|
+
c.getState().emit({ type: "render_start", payload: { sectionId: t.section_id } }, v), c.getState().emit({ type: "loading_start", payload: {} }, v);
|
|
6267
|
+
}), rn((b, m) => {
|
|
6268
6268
|
const y = (M) => {
|
|
6269
6269
|
b((B) => B.progress._scrollApi === M ? B : { progress: { ...B.progress, _scrollApi: M } });
|
|
6270
|
-
}, u = () =>
|
|
6270
|
+
}, u = () => m().progress._scrollApi, f = (M) => {
|
|
6271
6271
|
b((B) => {
|
|
6272
6272
|
const F = B.progress;
|
|
6273
6273
|
if (F.totalRuns === M) return B;
|
|
@@ -6282,7 +6282,7 @@ function uu(e) {
|
|
|
6282
6282
|
};
|
|
6283
6283
|
});
|
|
6284
6284
|
}, g = (M, B = "program") => {
|
|
6285
|
-
const F =
|
|
6285
|
+
const F = m().progress.currentGlobalRunIndex, V = m().progress, q = V.totalRuns > 0 ? Math.max(-1, Math.min(M, V.totalRuns - 1)) : M;
|
|
6286
6286
|
F === q && V.lastUpdateBy === B || (b((ue) => ({
|
|
6287
6287
|
progress: {
|
|
6288
6288
|
...ue.progress,
|
|
@@ -6294,7 +6294,7 @@ function uu(e) {
|
|
|
6294
6294
|
payload: { globalIndex: q }
|
|
6295
6295
|
}));
|
|
6296
6296
|
}, C = (M) => {
|
|
6297
|
-
const { sectionLoading: B, _loadingStartTime: F } =
|
|
6297
|
+
const { sectionLoading: B, _loadingStartTime: F } = m().progress;
|
|
6298
6298
|
if (B === M) return;
|
|
6299
6299
|
const V = Date.now();
|
|
6300
6300
|
if (M)
|
|
@@ -6315,12 +6315,12 @@ function uu(e) {
|
|
|
6315
6315
|
}
|
|
6316
6316
|
})), c && c.getState().emit({ type: "loading_end", payload: { duration: ue } });
|
|
6317
6317
|
}
|
|
6318
|
-
},
|
|
6318
|
+
}, T = (M) => {
|
|
6319
6319
|
b((B) => ({
|
|
6320
6320
|
progress: { ...B.progress, pageIndex: M }
|
|
6321
6321
|
}));
|
|
6322
6322
|
}, R = (M, B) => {
|
|
6323
|
-
const V =
|
|
6323
|
+
const V = m().progress.rangeStartGI == null;
|
|
6324
6324
|
if (b((q) => ({
|
|
6325
6325
|
progress: {
|
|
6326
6326
|
...q.progress,
|
|
@@ -6342,8 +6342,8 @@ function uu(e) {
|
|
|
6342
6342
|
rangeEndGI: null
|
|
6343
6343
|
}
|
|
6344
6344
|
})), c && c.getState().emit({ type: "range_clear", payload: {} });
|
|
6345
|
-
},
|
|
6346
|
-
const { rangeStartGI: B, rangeEndGI: F } =
|
|
6345
|
+
}, p = (M) => {
|
|
6346
|
+
const { rangeStartGI: B, rangeEndGI: F } = m().progress;
|
|
6347
6347
|
B == null || F == null || (M < B ? b((V) => ({
|
|
6348
6348
|
progress: { ...V.progress, rangeStartGI: M }
|
|
6349
6349
|
})) : M > F ? b((V) => ({
|
|
@@ -6351,7 +6351,7 @@ function uu(e) {
|
|
|
6351
6351
|
})) : I());
|
|
6352
6352
|
}, S = () => {
|
|
6353
6353
|
var ke;
|
|
6354
|
-
const { rangeStartGI: M, rangeEndGI: B, section: F, layout: V } =
|
|
6354
|
+
const { rangeStartGI: M, rangeEndGI: B, section: F, layout: V } = m().progress;
|
|
6355
6355
|
if (M == null || B == null || !V) return "";
|
|
6356
6356
|
const q = ((ke = F.ast) == null ? void 0 : ke.blocks) ?? [], ue = V.prefix, de = [];
|
|
6357
6357
|
for (let Re = 0; Re < q.length; Re++) {
|
|
@@ -6364,8 +6364,8 @@ function uu(e) {
|
|
|
6364
6364
|
}
|
|
6365
6365
|
}
|
|
6366
6366
|
return de.join("");
|
|
6367
|
-
},
|
|
6368
|
-
const { totalRuns: B, derivedNav: F } =
|
|
6367
|
+
}, k = (M) => {
|
|
6368
|
+
const { totalRuns: B, derivedNav: F } = m().progress, V = F == null ? void 0 : F.readableGi;
|
|
6369
6369
|
if (!V || B <= 0) return M;
|
|
6370
6370
|
const q = B, ue = Math.max(0, Math.min(M, q - 1));
|
|
6371
6371
|
if (V[ue]) return ue;
|
|
@@ -6377,7 +6377,7 @@ function uu(e) {
|
|
|
6377
6377
|
}
|
|
6378
6378
|
return ue;
|
|
6379
6379
|
}, E = (M, B) => {
|
|
6380
|
-
const { totalRuns: F, derivedNav: V } =
|
|
6380
|
+
const { totalRuns: F, derivedNav: V } = m().progress, q = V == null ? void 0 : V.readableGi;
|
|
6381
6381
|
if (!q || F <= 0) return null;
|
|
6382
6382
|
if (B > 0) {
|
|
6383
6383
|
for (let ue = Math.min(Math.max(M, 0), F - 1); ue < F; ue += 1)
|
|
@@ -6387,7 +6387,7 @@ function uu(e) {
|
|
|
6387
6387
|
if (q[ue]) return ue;
|
|
6388
6388
|
return null;
|
|
6389
6389
|
}, O = (M) => {
|
|
6390
|
-
const { totalRuns: B, derivedNav: F } =
|
|
6390
|
+
const { totalRuns: B, derivedNav: F } = m().progress, V = F == null ? void 0 : F.readableGi;
|
|
6391
6391
|
if (!V || B <= 0) return null;
|
|
6392
6392
|
if (M > 0) {
|
|
6393
6393
|
for (let q = B - 1; q >= 0; q -= 1) if (V[q]) return q;
|
|
@@ -6397,30 +6397,30 @@ function uu(e) {
|
|
|
6397
6397
|
};
|
|
6398
6398
|
return {
|
|
6399
6399
|
progress: {
|
|
6400
|
-
...
|
|
6400
|
+
...h,
|
|
6401
6401
|
registerSectionScrollApi: y,
|
|
6402
6402
|
getSectionScrollApi: u,
|
|
6403
6403
|
setTotalRuns: f,
|
|
6404
6404
|
setCurrentGlobalRunIndex: g,
|
|
6405
6405
|
setSectionLoading: C,
|
|
6406
|
-
setPageIndex:
|
|
6406
|
+
setPageIndex: T,
|
|
6407
6407
|
// Range Selection API
|
|
6408
6408
|
setRange: R,
|
|
6409
6409
|
clearRange: I,
|
|
6410
|
-
extendRange:
|
|
6410
|
+
extendRange: p,
|
|
6411
6411
|
getRangeText: S,
|
|
6412
6412
|
// 네비 API
|
|
6413
|
-
snapToReadable:
|
|
6413
|
+
snapToReadable: k,
|
|
6414
6414
|
nextReadableFrom: E,
|
|
6415
6415
|
edgeReadable: O,
|
|
6416
6416
|
hasReadableInDir: (M, B) => E(M + (B > 0 ? 1 : -1), B) != null,
|
|
6417
6417
|
computeStepTarget: (M, B) => {
|
|
6418
|
-
const { totalRuns: F, derivedNav: V } =
|
|
6418
|
+
const { totalRuns: F, derivedNav: V } = m().progress;
|
|
6419
6419
|
if (!F || F <= 0) return M;
|
|
6420
6420
|
const q = (V == null ? void 0 : V.groups) ?? [], ue = V == null ? void 0 : V.giToGroupIdx;
|
|
6421
6421
|
if (!q.length || !ue) {
|
|
6422
6422
|
const A = F - 1;
|
|
6423
|
-
return
|
|
6423
|
+
return k(Math.max(0, Math.min(M + B, A)));
|
|
6424
6424
|
}
|
|
6425
6425
|
let de = ue[M] ?? -1;
|
|
6426
6426
|
if (de < 0 || de >= q.length)
|
|
@@ -6432,22 +6432,22 @@ function uu(e) {
|
|
|
6432
6432
|
}
|
|
6433
6433
|
}
|
|
6434
6434
|
if (de < 0 || de >= q.length)
|
|
6435
|
-
return O(B) ??
|
|
6435
|
+
return O(B) ?? k(M);
|
|
6436
6436
|
const ke = (X) => X >= 0 && X < q.length && (q[X].firstReadableGI ?? -1) >= 0;
|
|
6437
6437
|
let Re = de + B;
|
|
6438
6438
|
for (; Re >= 0 && Re < q.length && !ke(Re); )
|
|
6439
6439
|
Re += B;
|
|
6440
6440
|
if (Re < 0 || Re >= q.length)
|
|
6441
|
-
return O(B) ??
|
|
6441
|
+
return O(B) ?? k(M + B);
|
|
6442
6442
|
const ee = q[Re].firstReadableGI;
|
|
6443
|
-
return ee >= 0 ? ee :
|
|
6443
|
+
return ee >= 0 ? ee : k(M + B);
|
|
6444
6444
|
},
|
|
6445
6445
|
giToPercentTotal: (M) => {
|
|
6446
|
-
const B =
|
|
6446
|
+
const B = m().progress.totalRuns;
|
|
6447
6447
|
return !B || B <= 1 ? 0 : Math.max(0, Math.min(M, B - 1)) / (B - 1) * 100;
|
|
6448
6448
|
},
|
|
6449
6449
|
percentToGITotal: (M) => {
|
|
6450
|
-
const B =
|
|
6450
|
+
const B = m().progress.totalRuns;
|
|
6451
6451
|
if (!B || B <= 1) return 0;
|
|
6452
6452
|
const F = Math.max(0, Math.min(M, 100)), V = Math.round(F / 100 * (B - 1));
|
|
6453
6453
|
return Math.max(0, Math.min(V, B - 1));
|
|
@@ -6485,46 +6485,46 @@ const pu = ({
|
|
|
6485
6485
|
}, [r]), i = Y((g) => g.marginX), s = Y((g) => g.lineHeight), c = Y((g) => g.fontSizePx), l = Y((g) => g.fontFamily), a = Y((g) => g.viewportHeight), d = j((g) => {
|
|
6486
6486
|
var C;
|
|
6487
6487
|
return ((C = g.layout) == null ? void 0 : C.prefix) ?? [];
|
|
6488
|
-
}),
|
|
6488
|
+
}), v = j((g) => {
|
|
6489
6489
|
var C;
|
|
6490
6490
|
return ((C = g.derivedNav) == null ? void 0 : C.splitGroupsPerBlock) ?? [];
|
|
6491
|
-
}),
|
|
6491
|
+
}), h = e[t], b = ve(() => {
|
|
6492
6492
|
const g = [];
|
|
6493
|
-
return o.forEach((C,
|
|
6494
|
-
(C.type === "paragraph" || C.type === "image") && g.push(
|
|
6493
|
+
return o.forEach((C, T) => {
|
|
6494
|
+
(C.type === "paragraph" || C.type === "image") && g.push(T);
|
|
6495
6495
|
}), g;
|
|
6496
|
-
}, [o]),
|
|
6497
|
-
if (!
|
|
6496
|
+
}, [o]), m = ve(() => {
|
|
6497
|
+
if (!h) return [];
|
|
6498
6498
|
const g = [];
|
|
6499
|
-
for (let C =
|
|
6500
|
-
const
|
|
6501
|
-
|
|
6499
|
+
for (let C = h.startBlock; C <= h.endBlock; C++) {
|
|
6500
|
+
const T = b[C];
|
|
6501
|
+
T != null && g.push(T);
|
|
6502
6502
|
}
|
|
6503
6503
|
return g;
|
|
6504
|
-
}, [
|
|
6504
|
+
}, [h, b]), y = ve(() => {
|
|
6505
6505
|
const g = [];
|
|
6506
|
-
for (const C of
|
|
6507
|
-
const
|
|
6508
|
-
(
|
|
6506
|
+
for (const C of m) {
|
|
6507
|
+
const T = o[C];
|
|
6508
|
+
(T == null ? void 0 : T.type) === "paragraph" && g.push({ b: T, originalBlockIndex: C });
|
|
6509
6509
|
}
|
|
6510
6510
|
return g;
|
|
6511
|
-
}, [
|
|
6511
|
+
}, [m, o]), u = ve(() => {
|
|
6512
6512
|
const g = [], C = Pr();
|
|
6513
|
-
return y.forEach((
|
|
6514
|
-
g[R] = Br(
|
|
6513
|
+
return y.forEach((T, R) => {
|
|
6514
|
+
g[R] = Br(T.b, C);
|
|
6515
6515
|
}), g;
|
|
6516
|
-
}, [y]), f = (g, C,
|
|
6516
|
+
}, [y]), f = (g, C, T) => {
|
|
6517
6517
|
if (!g || g.length === 0) return [];
|
|
6518
6518
|
const R = [];
|
|
6519
6519
|
for (const I of g) {
|
|
6520
|
-
const
|
|
6521
|
-
if (S < C ||
|
|
6522
|
-
const
|
|
6520
|
+
const p = I.startG, S = I.endG;
|
|
6521
|
+
if (S < C || p > T) continue;
|
|
6522
|
+
const k = Math.max(p, C), E = Math.min(S, T), O = k - p | 0, z = Math.max(0, E - k + 1);
|
|
6523
6523
|
if (z <= 0) continue;
|
|
6524
6524
|
const w = (I.r0 ?? 0) + O;
|
|
6525
6525
|
R.push({
|
|
6526
6526
|
...I,
|
|
6527
|
-
startG:
|
|
6527
|
+
startG: k,
|
|
6528
6528
|
endG: E,
|
|
6529
6529
|
r0: w,
|
|
6530
6530
|
len: z
|
|
@@ -6565,9 +6565,9 @@ const pu = ({
|
|
|
6565
6565
|
},
|
|
6566
6566
|
children: [
|
|
6567
6567
|
/* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
6568
|
-
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children:
|
|
6568
|
+
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: m.map((g, C) => {
|
|
6569
6569
|
var X;
|
|
6570
|
-
const
|
|
6570
|
+
const T = o[g], R = C === 0, I = C === m.length - 1, p = {
|
|
6571
6571
|
boxSizing: "border-box",
|
|
6572
6572
|
paddingRight: `${i}px`,
|
|
6573
6573
|
paddingLeft: `${i}px`,
|
|
@@ -6577,10 +6577,10 @@ const pu = ({
|
|
|
6577
6577
|
// justifyContent: 'center',
|
|
6578
6578
|
width: "100%",
|
|
6579
6579
|
height: "auto"
|
|
6580
|
-
}, S = `sec-${r.section_id}/blk-${
|
|
6581
|
-
if (
|
|
6582
|
-
const { src: A, alt: K, width: ne, height: N } =
|
|
6583
|
-
return /* @__PURE__ */ x("div", { style:
|
|
6580
|
+
}, S = `sec-${r.section_id}/blk-${T.id ?? g}`;
|
|
6581
|
+
if (T.type === "image") {
|
|
6582
|
+
const { src: A, alt: K, width: ne, height: N } = T, oe = ne && N ? `${ne} / ${N}` : "4 / 3", $ = a > 80 ? Math.floor((a - 80) * 0.6) : void 0;
|
|
6583
|
+
return /* @__PURE__ */ x("div", { style: p, children: /* @__PURE__ */ Z(
|
|
6584
6584
|
"div",
|
|
6585
6585
|
{
|
|
6586
6586
|
style: {
|
|
@@ -6622,15 +6622,15 @@ const pu = ({
|
|
|
6622
6622
|
}
|
|
6623
6623
|
) }, S);
|
|
6624
6624
|
}
|
|
6625
|
-
const
|
|
6625
|
+
const k = T, E = y.findIndex(
|
|
6626
6626
|
(A) => A.originalBlockIndex === g
|
|
6627
|
-
), O = E >= 0 ? u[E] : void 0, z =
|
|
6627
|
+
), O = E >= 0 ? u[E] : void 0, z = k.runs ?? [], w = z.length;
|
|
6628
6628
|
let _ = 0, P = Math.max(0, w - 1);
|
|
6629
|
-
R &&
|
|
6629
|
+
R && h.startOffsetInBlock != null && (_ = Math.min(Math.max(0, h.startOffsetInBlock), P)), I && h.endOffsetInBlock != null && (P = Math.max(
|
|
6630
6630
|
_,
|
|
6631
|
-
Math.min(
|
|
6631
|
+
Math.min(h.endOffsetInBlock, P)
|
|
6632
6632
|
));
|
|
6633
|
-
const G = _ > 0, M = d[g] ?? 0, B =
|
|
6633
|
+
const G = _ > 0, M = d[g] ?? 0, B = v[g] ?? [], F = M + _, V = M + P;
|
|
6634
6634
|
let q = f(B, F, V);
|
|
6635
6635
|
const ue = M + _;
|
|
6636
6636
|
q = q.map((A) => {
|
|
@@ -6641,20 +6641,20 @@ const pu = ({
|
|
|
6641
6641
|
len: ne
|
|
6642
6642
|
};
|
|
6643
6643
|
});
|
|
6644
|
-
const de = _ <= P ? z.slice(_, P + 1) : [], ke =
|
|
6645
|
-
return /* @__PURE__ */ x("div", { style:
|
|
6644
|
+
const de = _ <= P ? z.slice(_, P + 1) : [], ke = k.list ? k.list.level * 24 : 0, Re = ((X = k.list) == null ? void 0 : X.kind) === "bullet" ? k.list.glyph ?? "•" : void 0, ee = G ? void 0 : O ?? Re;
|
|
6645
|
+
return /* @__PURE__ */ x("div", { style: p, children: /* @__PURE__ */ Z(
|
|
6646
6646
|
"p",
|
|
6647
6647
|
{
|
|
6648
6648
|
style: {
|
|
6649
6649
|
width: "100%",
|
|
6650
6650
|
margin: "8px 0",
|
|
6651
6651
|
paddingLeft: ke,
|
|
6652
|
-
textAlign:
|
|
6652
|
+
textAlign: k.textAlign,
|
|
6653
6653
|
whiteSpace: "pre-wrap",
|
|
6654
6654
|
boxSizing: "border-box"
|
|
6655
6655
|
},
|
|
6656
6656
|
children: [
|
|
6657
|
-
|
|
6657
|
+
k.list && ee ? /* @__PURE__ */ x(
|
|
6658
6658
|
"span",
|
|
6659
6659
|
{
|
|
6660
6660
|
"aria-hidden": !0,
|
|
@@ -6698,12 +6698,12 @@ function hu(e, t) {
|
|
|
6698
6698
|
}));
|
|
6699
6699
|
}, s = new ResizeObserver((l) => {
|
|
6700
6700
|
if (o.current) return;
|
|
6701
|
-
const a = l[0], { width: d, height:
|
|
6702
|
-
if (!
|
|
6703
|
-
r.current = { w: d, h:
|
|
6701
|
+
const a = l[0], { width: d, height: v } = a.contentRect, h = r.current;
|
|
6702
|
+
if (!h) {
|
|
6703
|
+
r.current = { w: d, h: v };
|
|
6704
6704
|
return;
|
|
6705
6705
|
}
|
|
6706
|
-
Math.abs(
|
|
6706
|
+
Math.abs(h.w - d) < Co && Math.abs(h.h - v) < Co || (r.current = { w: d, h: v }, i());
|
|
6707
6707
|
});
|
|
6708
6708
|
e.forEach((l) => {
|
|
6709
6709
|
l.current && s.observe(l.current);
|
|
@@ -6726,10 +6726,10 @@ function gu(e) {
|
|
|
6726
6726
|
velocityThreshold: l = 0.6,
|
|
6727
6727
|
singleDelayMs: a = 250,
|
|
6728
6728
|
doubleClickWindowMs: d = 300,
|
|
6729
|
-
onDragMove:
|
|
6730
|
-
onDragEnd:
|
|
6729
|
+
onDragMove: v,
|
|
6730
|
+
onDragEnd: h,
|
|
6731
6731
|
pageTransitionThreshold: b
|
|
6732
|
-
} = e,
|
|
6732
|
+
} = e, m = b ?? c, y = 10, u = Ye.useRef({
|
|
6733
6733
|
// ── touch ──
|
|
6734
6734
|
touchId: null,
|
|
6735
6735
|
startX: 0,
|
|
@@ -6762,10 +6762,10 @@ function gu(e) {
|
|
|
6762
6762
|
), C = Ye.useCallback(
|
|
6763
6763
|
(_, P) => {
|
|
6764
6764
|
const G = Math.abs(_) / Math.max(1, P);
|
|
6765
|
-
Math.abs(_) >=
|
|
6765
|
+
Math.abs(_) >= m || G >= l ? _ < 0 ? n() : t() : h == null || h();
|
|
6766
6766
|
},
|
|
6767
|
-
[
|
|
6768
|
-
),
|
|
6767
|
+
[m, l, n, t, h]
|
|
6768
|
+
), T = Ye.useCallback(
|
|
6769
6769
|
(_) => {
|
|
6770
6770
|
if (_.touches.length !== 1) return;
|
|
6771
6771
|
const P = s ?? i;
|
|
@@ -6785,9 +6785,9 @@ function gu(e) {
|
|
|
6785
6785
|
u.current.swiping = !0;
|
|
6786
6786
|
else
|
|
6787
6787
|
return;
|
|
6788
|
-
|
|
6788
|
+
v == null || v(G);
|
|
6789
6789
|
},
|
|
6790
|
-
[
|
|
6790
|
+
[v]
|
|
6791
6791
|
), I = Ye.useCallback(
|
|
6792
6792
|
(_) => {
|
|
6793
6793
|
if (u.current.touchId == null) return;
|
|
@@ -6797,16 +6797,16 @@ function gu(e) {
|
|
|
6797
6797
|
u.current.swiping ? C(G, B) : Math.abs(G) < 10 && Math.abs(M) < 10 && g(_.target), u.current.suppressClick = !0, u.current.touchId = null, u.current.swiping = !1;
|
|
6798
6798
|
},
|
|
6799
6799
|
[C, g]
|
|
6800
|
-
),
|
|
6801
|
-
u.current.swiping && (
|
|
6802
|
-
}, [
|
|
6800
|
+
), p = Ye.useCallback(() => {
|
|
6801
|
+
u.current.swiping && (h == null || h()), u.current.touchId = null, u.current.swiping = !1;
|
|
6802
|
+
}, [h]), S = Ye.useCallback(
|
|
6803
6803
|
(_) => {
|
|
6804
6804
|
if (_.pointerType === "touch" || u.current.mouseDown) return;
|
|
6805
6805
|
const P = s ?? i;
|
|
6806
6806
|
P != null && P(_.target) || (u.current.mouseDown = !0, u.current.mouseSwiping = !1, u.current.mStartX = _.clientX, u.current.mStartY = _.clientY, u.current.mStartT = _.timeStamp, u.current.suppressClick = !1, u.current.capturedEl = _.currentTarget);
|
|
6807
6807
|
},
|
|
6808
6808
|
[s, i]
|
|
6809
|
-
),
|
|
6809
|
+
), k = Ye.useCallback(
|
|
6810
6810
|
(_) => {
|
|
6811
6811
|
if (_.pointerType === "touch" || !u.current.mouseDown) return;
|
|
6812
6812
|
const P = _.clientX - u.current.mStartX, G = Math.abs(P), M = Math.abs(_.clientY - u.current.mStartY);
|
|
@@ -6822,9 +6822,9 @@ function gu(e) {
|
|
|
6822
6822
|
u.current.prevUserSelect = document.body.style.userSelect, document.body.style.userSelect = "none", _.preventDefault();
|
|
6823
6823
|
} else
|
|
6824
6824
|
return;
|
|
6825
|
-
|
|
6825
|
+
v == null || v(P), _.preventDefault();
|
|
6826
6826
|
},
|
|
6827
|
-
[
|
|
6827
|
+
[v]
|
|
6828
6828
|
), E = Ye.useCallback(
|
|
6829
6829
|
(_) => {
|
|
6830
6830
|
var G;
|
|
@@ -6844,12 +6844,12 @@ function gu(e) {
|
|
|
6844
6844
|
[C]
|
|
6845
6845
|
), O = Ye.useCallback(
|
|
6846
6846
|
(_) => {
|
|
6847
|
-
_.pointerType !== "touch" && (u.current.mouseSwiping && (
|
|
6847
|
+
_.pointerType !== "touch" && (u.current.mouseSwiping && (h == null || h(), document.body.style.userSelect = u.current.prevUserSelect), u.current.mouseDown = !1, u.current.mouseSwiping = !1, u.current.capturedEl = null);
|
|
6848
6848
|
},
|
|
6849
|
-
[
|
|
6849
|
+
[h]
|
|
6850
6850
|
), z = Ye.useCallback(() => {
|
|
6851
|
-
u.current.mouseSwiping && (
|
|
6852
|
-
}, [
|
|
6851
|
+
u.current.mouseSwiping && (h == null || h(), document.body.style.userSelect = u.current.prevUserSelect), u.current.mouseDown = !1, u.current.mouseSwiping = !1, u.current.capturedEl = null;
|
|
6852
|
+
}, [h]), w = Ye.useCallback(
|
|
6853
6853
|
(_) => {
|
|
6854
6854
|
if (u.current.suppressClick) {
|
|
6855
6855
|
u.current.suppressClick = !1;
|
|
@@ -6866,13 +6866,13 @@ function gu(e) {
|
|
|
6866
6866
|
[]
|
|
6867
6867
|
), {
|
|
6868
6868
|
// touch
|
|
6869
|
-
onTouchStart:
|
|
6869
|
+
onTouchStart: T,
|
|
6870
6870
|
onTouchMove: R,
|
|
6871
6871
|
onTouchEnd: I,
|
|
6872
|
-
onTouchCancel:
|
|
6872
|
+
onTouchCancel: p,
|
|
6873
6873
|
// mouse
|
|
6874
6874
|
onPointerDown: S,
|
|
6875
|
-
onPointerMove:
|
|
6875
|
+
onPointerMove: k,
|
|
6876
6876
|
onPointerUp: E,
|
|
6877
6877
|
onPointerCancel: O,
|
|
6878
6878
|
onLostPointerCapture: z,
|
|
@@ -7015,8 +7015,8 @@ function Tu() {
|
|
|
7015
7015
|
if (typeof a != "string")
|
|
7016
7016
|
return a === 0 ? a : +a;
|
|
7017
7017
|
a = e(a);
|
|
7018
|
-
var
|
|
7019
|
-
return
|
|
7018
|
+
var v = i.test(a);
|
|
7019
|
+
return v || s.test(a) ? c(a.slice(2), v ? 2 : 8) : o.test(a) ? r : +a;
|
|
7020
7020
|
}
|
|
7021
7021
|
return or = l, or;
|
|
7022
7022
|
}
|
|
@@ -7026,49 +7026,49 @@ function ku() {
|
|
|
7026
7026
|
Ho = 1;
|
|
7027
7027
|
var e = Li(), t = bu(), n = Tu(), r = "Expected a function", o = Math.max, i = Math.min;
|
|
7028
7028
|
function s(c, l, a) {
|
|
7029
|
-
var d,
|
|
7029
|
+
var d, v, h, b, m, y, u = 0, f = !1, g = !1, C = !0;
|
|
7030
7030
|
if (typeof c != "function")
|
|
7031
7031
|
throw new TypeError(r);
|
|
7032
|
-
l = n(l) || 0, e(a) && (f = !!a.leading, g = "maxWait" in a,
|
|
7033
|
-
function
|
|
7034
|
-
var _ = d, P =
|
|
7035
|
-
return d =
|
|
7032
|
+
l = n(l) || 0, e(a) && (f = !!a.leading, g = "maxWait" in a, h = g ? o(n(a.maxWait) || 0, l) : h, C = "trailing" in a ? !!a.trailing : C);
|
|
7033
|
+
function T(w) {
|
|
7034
|
+
var _ = d, P = v;
|
|
7035
|
+
return d = v = void 0, u = w, b = c.apply(P, _), b;
|
|
7036
7036
|
}
|
|
7037
7037
|
function R(w) {
|
|
7038
|
-
return u = w,
|
|
7038
|
+
return u = w, m = setTimeout(S, l), f ? T(w) : b;
|
|
7039
7039
|
}
|
|
7040
7040
|
function I(w) {
|
|
7041
7041
|
var _ = w - y, P = w - u, G = l - _;
|
|
7042
|
-
return g ? i(G,
|
|
7042
|
+
return g ? i(G, h - P) : G;
|
|
7043
7043
|
}
|
|
7044
|
-
function
|
|
7044
|
+
function p(w) {
|
|
7045
7045
|
var _ = w - y, P = w - u;
|
|
7046
|
-
return y === void 0 || _ >= l || _ < 0 || g && P >=
|
|
7046
|
+
return y === void 0 || _ >= l || _ < 0 || g && P >= h;
|
|
7047
7047
|
}
|
|
7048
7048
|
function S() {
|
|
7049
7049
|
var w = t();
|
|
7050
|
-
if (
|
|
7051
|
-
return
|
|
7052
|
-
|
|
7050
|
+
if (p(w))
|
|
7051
|
+
return k(w);
|
|
7052
|
+
m = setTimeout(S, I(w));
|
|
7053
7053
|
}
|
|
7054
|
-
function
|
|
7055
|
-
return
|
|
7054
|
+
function k(w) {
|
|
7055
|
+
return m = void 0, C && d ? T(w) : (d = v = void 0, b);
|
|
7056
7056
|
}
|
|
7057
7057
|
function E() {
|
|
7058
|
-
|
|
7058
|
+
m !== void 0 && clearTimeout(m), u = 0, d = y = v = m = void 0;
|
|
7059
7059
|
}
|
|
7060
7060
|
function O() {
|
|
7061
|
-
return
|
|
7061
|
+
return m === void 0 ? b : k(t());
|
|
7062
7062
|
}
|
|
7063
7063
|
function z() {
|
|
7064
|
-
var w = t(), _ =
|
|
7065
|
-
if (d = arguments,
|
|
7066
|
-
if (
|
|
7064
|
+
var w = t(), _ = p(w);
|
|
7065
|
+
if (d = arguments, v = this, y = w, _) {
|
|
7066
|
+
if (m === void 0)
|
|
7067
7067
|
return R(y);
|
|
7068
7068
|
if (g)
|
|
7069
|
-
return clearTimeout(
|
|
7069
|
+
return clearTimeout(m), m = setTimeout(S, l), T(y);
|
|
7070
7070
|
}
|
|
7071
|
-
return
|
|
7071
|
+
return m === void 0 && (m = setTimeout(S, l)), b;
|
|
7072
7072
|
}
|
|
7073
7073
|
return z.cancel = E, z.flush = O, z;
|
|
7074
7074
|
}
|
|
@@ -7155,10 +7155,10 @@ async function zu({
|
|
|
7155
7155
|
lineHeight: l,
|
|
7156
7156
|
showSplit: a,
|
|
7157
7157
|
breakGapPx: d = 0,
|
|
7158
|
-
showSlash:
|
|
7159
|
-
paragraphMarkers:
|
|
7158
|
+
showSlash: v,
|
|
7159
|
+
paragraphMarkers: h,
|
|
7160
7160
|
playbackScale: b = 1,
|
|
7161
|
-
viewportHeight:
|
|
7161
|
+
viewportHeight: m = 0,
|
|
7162
7162
|
instanceId: y = "default"
|
|
7163
7163
|
}) {
|
|
7164
7164
|
var f, g, C;
|
|
@@ -7166,24 +7166,24 @@ async function zu({
|
|
|
7166
7166
|
if (tt(u, y), s && typeof document < "u" && document.fonts) {
|
|
7167
7167
|
Ou();
|
|
7168
7168
|
try {
|
|
7169
|
-
const
|
|
7170
|
-
await document.fonts.load(
|
|
7169
|
+
const T = `${c}px ${s}`;
|
|
7170
|
+
await document.fonts.load(T), document.fonts.check(T) || await document.fonts.ready;
|
|
7171
7171
|
} catch {
|
|
7172
7172
|
}
|
|
7173
7173
|
}
|
|
7174
7174
|
tt(u, y);
|
|
7175
7175
|
try {
|
|
7176
|
-
const
|
|
7177
|
-
|
|
7178
|
-
const I = Math.max(0, e.offsetWidth || 0),
|
|
7179
|
-
t.style.maxWidth = `${
|
|
7176
|
+
const T = Math.abs(b - 1) > 1e-3, R = 1 / b;
|
|
7177
|
+
T && (t.style.transform = `scale(${R})`, t.style.transformOrigin = "top left");
|
|
7178
|
+
const I = Math.max(0, e.offsetWidth || 0), p = Math.max(0, Math.min(I, o));
|
|
7179
|
+
t.style.maxWidth = `${p}px`, tt(u, y);
|
|
7180
7180
|
let S = Math.round(n.offsetHeight || 0);
|
|
7181
7181
|
S || (S = Math.max(0, n.clientHeight | 0)), console.log(
|
|
7182
7182
|
"[calcPages] playbackScale:",
|
|
7183
7183
|
b.toFixed(4),
|
|
7184
|
-
|
|
7185
|
-
), console.log("[calcPages] viewWidth:", I), console.log("[calcPages] pageBoxWidth:",
|
|
7186
|
-
const
|
|
7184
|
+
T ? "(scaled, applying inverse)" : "(no scale)"
|
|
7185
|
+
), console.log("[calcPages] viewWidth:", I), console.log("[calcPages] pageBoxWidth:", p), console.log("[calcPages] maxPageHeight:", S), console.log("[calcPages] contentArea rect:", n.getBoundingClientRect()), console.log("[calcPages] measureRoot rect:", t.getBoundingClientRect());
|
|
7186
|
+
const k = 1.5, E = (N, oe) => oe + N <= S - k, O = getComputedStyle(e), z = {
|
|
7187
7187
|
letterSpacing: O.letterSpacing,
|
|
7188
7188
|
wordSpacing: O.wordSpacing,
|
|
7189
7189
|
fontKerning: O.fontKerning || "normal",
|
|
@@ -7195,7 +7195,7 @@ async function zu({
|
|
|
7195
7195
|
hyphens: O.hyphens || "manual"
|
|
7196
7196
|
}, w = (N) => {
|
|
7197
7197
|
N.style.letterSpacing = z.letterSpacing || "", N.style.wordSpacing = z.wordSpacing || "", N.style.fontKerning = z.fontKerning || "", N.style.fontVariantLigatures = z.fontVariantLigatures || "", N.style.textTransform = z.textTransform || "", N.style.direction = z.direction || "", N.style.wordBreak = z.wordBreak || "", N.style.wordWrap = z.overflowWrap || "", N.style.overflowWrap = z.overflowWrap || "", N.style.hyphens = z.hyphens || "";
|
|
7198
|
-
}, _ =
|
|
7198
|
+
}, _ = p, P = Math.max(0, _ - 2 * (i || 0));
|
|
7199
7199
|
n.innerHTML = "";
|
|
7200
7200
|
const G = document.createElement("div");
|
|
7201
7201
|
G.style.boxSizing = "border-box", G.style.width = `${_}px`, G.style.maxWidth = `${_}px`, G.style.margin = "0 auto", G.style.display = "flex", n.appendChild(G);
|
|
@@ -7214,7 +7214,7 @@ async function zu({
|
|
|
7214
7214
|
const we = Math.max(0, (d ?? 0) / 2), me = document.createElement("span");
|
|
7215
7215
|
me.style.display = "inline-block", me.style.width = `${we}px`;
|
|
7216
7216
|
const Te = document.createElement("span");
|
|
7217
|
-
if (Te.style.display = "inline-block", Te.style.width = `${we}px`, pe.appendChild(me),
|
|
7217
|
+
if (Te.style.display = "inline-block", Te.style.width = `${we}px`, pe.appendChild(me), v) {
|
|
7218
7218
|
const Oe = document.createElement("span");
|
|
7219
7219
|
Oe.textContent = " / ", pe.appendChild(Oe);
|
|
7220
7220
|
}
|
|
@@ -7223,7 +7223,7 @@ async function zu({
|
|
|
7223
7223
|
J.appendChild(pe);
|
|
7224
7224
|
}
|
|
7225
7225
|
N.appendChild(J);
|
|
7226
|
-
}, de =
|
|
7226
|
+
}, de = m > 80 ? Math.floor((m - 80) * 0.6) : void 0, ke = (N) => {
|
|
7227
7227
|
const oe = N != null && N.width && (N != null && N.height) ? `${N.width} / ${N.height}` : "4 / 3", $ = document.createElement("div");
|
|
7228
7228
|
$.style.margin = "12px 0", $.style.textAlign = "center", $.style.width = `${P}px`;
|
|
7229
7229
|
const J = document.createElement("div");
|
|
@@ -7245,7 +7245,7 @@ async function zu({
|
|
|
7245
7245
|
F[N] = { contentH: Math.ceil(Ne.height), mt: Ae, mb: $e }, await V(24);
|
|
7246
7246
|
continue;
|
|
7247
7247
|
}
|
|
7248
|
-
const $ = oe.block, J = $.list ? ($.list.level ?? 0) * 24 : 0, se = oe.paraIndex ?? 0, re =
|
|
7248
|
+
const $ = oe.block, J = $.list ? ($.list.level ?? 0) * 24 : 0, se = oe.paraIndex ?? 0, re = h[se] ?? (((f = $.list) == null ? void 0 : f.kind) === "bullet" ? ((g = $.list) == null ? void 0 : g.glyph) ?? "•" : void 0);
|
|
7249
7249
|
if (!!($.list && re)) {
|
|
7250
7250
|
const Te = q($, J);
|
|
7251
7251
|
Te.dataset.variant = "with";
|
|
@@ -7362,9 +7362,9 @@ async function zu({
|
|
|
7362
7362
|
...re != null ? { endOffsetInBlock: re } : {}
|
|
7363
7363
|
});
|
|
7364
7364
|
}
|
|
7365
|
-
return G.remove(),
|
|
7366
|
-
} catch (
|
|
7367
|
-
throw console.error(
|
|
7365
|
+
return G.remove(), T && (t.style.transform = "", t.style.transformOrigin = ""), tt(u, y), { pages: ee, pageByRunIndex: null };
|
|
7366
|
+
} catch (T) {
|
|
7367
|
+
throw console.error(T), T;
|
|
7368
7368
|
}
|
|
7369
7369
|
}
|
|
7370
7370
|
function Fo(e, t, n) {
|
|
@@ -7389,10 +7389,10 @@ function Au(e, t, n, r) {
|
|
|
7389
7389
|
if (!l || l.kind !== "paragraph") continue;
|
|
7390
7390
|
const a = ((o = l.block.runs) == null ? void 0 : o.length) ?? 0;
|
|
7391
7391
|
if (!a) continue;
|
|
7392
|
-
let d = 0,
|
|
7393
|
-
c === s.startBlock && s.startOffsetInBlock != null && (d = Math.max(0, Math.min(s.startOffsetInBlock,
|
|
7394
|
-
const
|
|
7395
|
-
if (e >= b && e <=
|
|
7392
|
+
let d = 0, v = a - 1;
|
|
7393
|
+
c === s.startBlock && s.startOffsetInBlock != null && (d = Math.max(0, Math.min(s.startOffsetInBlock, v))), c === s.endBlock && s.endOffsetInBlock != null && (v = Math.max(d, Math.min(s.endOffsetInBlock, v)));
|
|
7394
|
+
const h = r[l.originalIndex] ?? 0, b = h + d, m = h + v;
|
|
7395
|
+
if (e >= b && e <= m) return i;
|
|
7396
7396
|
}
|
|
7397
7397
|
}
|
|
7398
7398
|
return -1;
|
|
@@ -7423,7 +7423,7 @@ function Hu(e) {
|
|
|
7423
7423
|
}
|
|
7424
7424
|
function Nu() {
|
|
7425
7425
|
var Ar;
|
|
7426
|
-
const e = Ui(), t = j((D) => D.section), n = j((D) => D.sectionLoading), r = j((D) => D.rangeStartGI), o = j((D) => D.rangeEndGI), i = r != null && o != null, s = Et(), c = Y((D) => D.theme), l = bn[c], a = Y((D) => D.fontFamily), d = Y((D) => D.fontSizePx),
|
|
7426
|
+
const e = Ui(), t = j((D) => D.section), n = j((D) => D.sectionLoading), r = j((D) => D.rangeStartGI), o = j((D) => D.rangeEndGI), i = r != null && o != null, s = Et(), c = Y((D) => D.theme), l = bn[c], a = Y((D) => D.fontFamily), d = Y((D) => D.fontSizePx), v = Y((D) => D.lineHeight), h = Y((D) => D.marginX), b = Y((D) => D.viewportHeight), m = 860, y = ie(null), { items: u } = ve(() => {
|
|
7427
7427
|
var D;
|
|
7428
7428
|
return Hu(((D = t == null ? void 0 : t.ast) == null ? void 0 : D.blocks) ?? []);
|
|
7429
7429
|
}, [t]), f = ve(() => {
|
|
@@ -7437,14 +7437,14 @@ function Nu() {
|
|
|
7437
7437
|
}, [u]), [g, C] = nt({
|
|
7438
7438
|
pages: [],
|
|
7439
7439
|
pageByRunIndex: null
|
|
7440
|
-
}),
|
|
7440
|
+
}), T = j((D) => D.pageIndex), R = j((D) => D.setPageIndex), I = ie(0), p = ie(null), [S, k] = nt(!1), [E, O] = nt(null), [z, w] = nt(!1), _ = ve(
|
|
7441
7441
|
() => ({
|
|
7442
7442
|
flex: 1,
|
|
7443
7443
|
fontFamily: a,
|
|
7444
7444
|
background: l.bg,
|
|
7445
7445
|
color: l.fg,
|
|
7446
7446
|
fontSize: d,
|
|
7447
|
-
lineHeight:
|
|
7447
|
+
lineHeight: v,
|
|
7448
7448
|
overflow: "hidden",
|
|
7449
7449
|
width: "100%",
|
|
7450
7450
|
height: "100%",
|
|
@@ -7454,7 +7454,7 @@ function Nu() {
|
|
|
7454
7454
|
MozTextSizeAdjust: "none",
|
|
7455
7455
|
textSizeAdjust: "none"
|
|
7456
7456
|
}),
|
|
7457
|
-
[a, l.bg, l.fg, d,
|
|
7457
|
+
[a, l.bg, l.fg, d, v]
|
|
7458
7458
|
), {
|
|
7459
7459
|
showSplit: P,
|
|
7460
7460
|
breakGapPx: G,
|
|
@@ -7490,11 +7490,11 @@ function Nu() {
|
|
|
7490
7490
|
measureRoot: He,
|
|
7491
7491
|
contentArea: We,
|
|
7492
7492
|
items: u,
|
|
7493
|
-
cfgMaxWidth:
|
|
7494
|
-
marginX:
|
|
7493
|
+
cfgMaxWidth: m,
|
|
7494
|
+
marginX: h,
|
|
7495
7495
|
fontFamily: a,
|
|
7496
7496
|
fontSizePx: d,
|
|
7497
|
-
lineHeight:
|
|
7497
|
+
lineHeight: v,
|
|
7498
7498
|
showSplit: P,
|
|
7499
7499
|
breakGapPx: G,
|
|
7500
7500
|
showSlash: M,
|
|
@@ -7517,11 +7517,11 @@ function Nu() {
|
|
|
7517
7517
|
}, [
|
|
7518
7518
|
R,
|
|
7519
7519
|
u,
|
|
7520
|
-
|
|
7521
|
-
|
|
7520
|
+
m,
|
|
7521
|
+
h,
|
|
7522
7522
|
a,
|
|
7523
7523
|
d,
|
|
7524
|
-
|
|
7524
|
+
v,
|
|
7525
7525
|
P,
|
|
7526
7526
|
G,
|
|
7527
7527
|
M,
|
|
@@ -7534,9 +7534,9 @@ function Nu() {
|
|
|
7534
7534
|
return ((He = D.layout) == null ? void 0 : He.prefix) ?? [];
|
|
7535
7535
|
}), ue = _e((D) => D.syncToGI), de = Q(
|
|
7536
7536
|
(D) => {
|
|
7537
|
-
const He = g.pages.length + 1, We =
|
|
7537
|
+
const He = g.pages.length + 1, We = T + D;
|
|
7538
7538
|
if (We < 0 || We >= He) return;
|
|
7539
|
-
const Ct =
|
|
7539
|
+
const Ct = T === g.pages.length;
|
|
7540
7540
|
if (We === g.pages.length) {
|
|
7541
7541
|
R(We);
|
|
7542
7542
|
return;
|
|
@@ -7549,28 +7549,28 @@ function Nu() {
|
|
|
7549
7549
|
const lt = Fo(g.pages[We], u, q);
|
|
7550
7550
|
lt != null ? (V(lt, "scrubber-step"), ue(lt)) : R(We);
|
|
7551
7551
|
},
|
|
7552
|
-
[
|
|
7552
|
+
[T, g.pages, u, q, V, R, ue]
|
|
7553
7553
|
), ke = Q(() => {
|
|
7554
|
-
S || I.current !== 0 ? (O("prev"),
|
|
7554
|
+
S || I.current !== 0 ? (O("prev"), k(!1)) : de(-1);
|
|
7555
7555
|
}, [S, de]), Re = Q(() => {
|
|
7556
|
-
S || I.current !== 0 ? (O("next"),
|
|
7556
|
+
S || I.current !== 0 ? (O("next"), k(!1)) : de(1);
|
|
7557
7557
|
}, [S, de]), ee = kn(), X = Q(() => {
|
|
7558
7558
|
const { isSettingsOpen: D, setSettingsOpen: He, toggleOverlays: We } = ee.getState();
|
|
7559
7559
|
D ? He(!1) : We();
|
|
7560
7560
|
}, [ee]), A = g.pages.length + 1, K = ((Ar = y.current) == null ? void 0 : Ar.clientWidth) || 400, ne = Q((D) => {
|
|
7561
7561
|
var lt;
|
|
7562
|
-
const He =
|
|
7562
|
+
const He = p.current;
|
|
7563
7563
|
if (!He) return;
|
|
7564
7564
|
const We = ((lt = y.current) == null ? void 0 : lt.clientWidth) || 1, Ct = D / We * 33.333;
|
|
7565
7565
|
He.style.transform = `translate3d(${-33.333 + Ct}%, 0, 0)`;
|
|
7566
7566
|
}, []), N = Q(
|
|
7567
7567
|
(D) => {
|
|
7568
|
-
|
|
7568
|
+
T === 0 && D > 0 || T >= A - 1 && D < 0 || (I.current = D, ne(D), S || k(!0));
|
|
7569
7569
|
},
|
|
7570
|
-
[
|
|
7570
|
+
[T, A, ne, S]
|
|
7571
7571
|
), oe = Q(() => {
|
|
7572
|
-
I.current = 0,
|
|
7573
|
-
const D =
|
|
7572
|
+
I.current = 0, k(!1);
|
|
7573
|
+
const D = p.current;
|
|
7574
7574
|
D && (D.style.transition = "transform 250ms ease-out", D.style.transform = "translate3d(-33.333%, 0, 0)");
|
|
7575
7575
|
}, []), $ = Q(
|
|
7576
7576
|
(D) => {
|
|
@@ -7621,7 +7621,7 @@ function Nu() {
|
|
|
7621
7621
|
), Oe = Mu(F, 200, me, Te), Ne = ie("");
|
|
7622
7622
|
Se(() => {
|
|
7623
7623
|
if (b <= 0) return;
|
|
7624
|
-
const D = `${a}|${d}|${
|
|
7624
|
+
const D = `${a}|${d}|${v}|${h}|${P}|${G}|${M}|${b}|${t == null ? void 0 : t.section_id}`;
|
|
7625
7625
|
Ne.current !== D && (Ne.current = D, console.log("debounceRecalc 취소"), Oe.cancel(), me(), F());
|
|
7626
7626
|
}, [
|
|
7627
7627
|
Oe,
|
|
@@ -7629,8 +7629,8 @@ function Nu() {
|
|
|
7629
7629
|
me,
|
|
7630
7630
|
a,
|
|
7631
7631
|
d,
|
|
7632
|
-
|
|
7633
|
-
|
|
7632
|
+
v,
|
|
7633
|
+
h,
|
|
7634
7634
|
P,
|
|
7635
7635
|
G,
|
|
7636
7636
|
M,
|
|
@@ -7651,7 +7651,7 @@ function Nu() {
|
|
|
7651
7651
|
// 페이지 이동 구현
|
|
7652
7652
|
stepPage: de
|
|
7653
7653
|
}), () => Ae(void 0)), [Ae, de]);
|
|
7654
|
-
const $e = t.quizzes && t.quizzes.length > 0, dt = g.pages.length > 0 &&
|
|
7654
|
+
const $e = t.quizzes && t.quizzes.length > 0, dt = g.pages.length > 0 && T === g.pages.length, Xe = T > 0 ? T - 1 : null, Ge = T < A - 1 ? T + 1 : null, st = ve(() => E === "prev" ? "translate3d(0%, 0, 0)" : E === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [E]), et = (D) => n ? null : D === g.pages.length ? /* @__PURE__ */ Z(
|
|
7655
7655
|
"div",
|
|
7656
7656
|
{
|
|
7657
7657
|
style: {
|
|
@@ -7668,7 +7668,7 @@ function Nu() {
|
|
|
7668
7668
|
/* @__PURE__ */ x(Cn, { isIcon: !1 })
|
|
7669
7669
|
]
|
|
7670
7670
|
}
|
|
7671
|
-
) : /* @__PURE__ */ x(pu, { pages: g.pages, pageIndex: D, maxWidth:
|
|
7671
|
+
) : /* @__PURE__ */ x(pu, { pages: g.pages, pageIndex: D, maxWidth: m }), bt = {
|
|
7672
7672
|
width: "33.333%",
|
|
7673
7673
|
height: "100%",
|
|
7674
7674
|
flexShrink: 0,
|
|
@@ -7684,7 +7684,7 @@ function Nu() {
|
|
|
7684
7684
|
/* @__PURE__ */ Z(
|
|
7685
7685
|
"div",
|
|
7686
7686
|
{
|
|
7687
|
-
ref:
|
|
7687
|
+
ref: p,
|
|
7688
7688
|
style: {
|
|
7689
7689
|
display: "flex",
|
|
7690
7690
|
width: "300%",
|
|
@@ -7700,7 +7700,7 @@ function Nu() {
|
|
|
7700
7700
|
onTransitionEnd: E ? $ : void 0,
|
|
7701
7701
|
children: [
|
|
7702
7702
|
/* @__PURE__ */ x("div", { style: bt, children: Xe !== null && et(Xe) }),
|
|
7703
|
-
/* @__PURE__ */ x("div", { style: bt, children: et(
|
|
7703
|
+
/* @__PURE__ */ x("div", { style: bt, children: et(T) }),
|
|
7704
7704
|
/* @__PURE__ */ x("div", { style: bt, children: Ge !== null && et(Ge) })
|
|
7705
7705
|
]
|
|
7706
7706
|
}
|
|
@@ -7722,14 +7722,14 @@ function Nu() {
|
|
|
7722
7722
|
zIndex: -999999,
|
|
7723
7723
|
opacity: 0,
|
|
7724
7724
|
width: "100%",
|
|
7725
|
-
maxWidth:
|
|
7725
|
+
maxWidth: m,
|
|
7726
7726
|
height: "100%",
|
|
7727
7727
|
minHeight: 0,
|
|
7728
7728
|
boxSizing: "border-box",
|
|
7729
7729
|
overflow: "hidden",
|
|
7730
7730
|
fontFamily: a,
|
|
7731
7731
|
fontSize: d,
|
|
7732
|
-
lineHeight:
|
|
7732
|
+
lineHeight: v,
|
|
7733
7733
|
pointerEvents: "none",
|
|
7734
7734
|
background: "pink"
|
|
7735
7735
|
},
|
|
@@ -7738,7 +7738,7 @@ function Nu() {
|
|
|
7738
7738
|
{
|
|
7739
7739
|
style: {
|
|
7740
7740
|
width: "100%",
|
|
7741
|
-
maxWidth:
|
|
7741
|
+
maxWidth: m,
|
|
7742
7742
|
height: "100%",
|
|
7743
7743
|
boxSizing: "border-box",
|
|
7744
7744
|
display: "flex",
|
|
@@ -7774,7 +7774,7 @@ function Nu() {
|
|
|
7774
7774
|
pages: g.pages,
|
|
7775
7775
|
items: u,
|
|
7776
7776
|
onGotoPage: R,
|
|
7777
|
-
currentPageIndex:
|
|
7777
|
+
currentPageIndex: T,
|
|
7778
7778
|
isOnExtraPage: dt
|
|
7779
7779
|
}
|
|
7780
7780
|
)
|
|
@@ -7858,18 +7858,18 @@ function yd(e) {
|
|
|
7858
7858
|
}), n.sort((r, o) => r - o);
|
|
7859
7859
|
}
|
|
7860
7860
|
const xd = Wt(function() {
|
|
7861
|
-
const t = at((u) => u.phase), n = at((u) => u.quizzes), r = at((u) => u.order), o = at((u) => u.currentIndex), i = at((u) => u.answers), s = at((u) => u.correctCount), c = at((u) => u.remainingSec), l = at((u) => u.uiReveal), a = at((u) => u.startedAt), d = at((u) => u.finishedAt),
|
|
7861
|
+
const t = at((u) => u.phase), n = at((u) => u.quizzes), r = at((u) => u.order), o = at((u) => u.currentIndex), i = at((u) => u.answers), s = at((u) => u.correctCount), c = at((u) => u.remainingSec), l = at((u) => u.uiReveal), a = at((u) => u.startedAt), d = at((u) => u.finishedAt), v = at((u) => u.perQ), h = Oi();
|
|
7862
7862
|
Se(() => {
|
|
7863
7863
|
if (t === "idle" || t !== "doing" || c == null) return;
|
|
7864
|
-
const u = window.setInterval(() =>
|
|
7864
|
+
const u = window.setInterval(() => h.getState().tick(), 1e3);
|
|
7865
7865
|
return () => window.clearInterval(u);
|
|
7866
|
-
}, [t, c,
|
|
7867
|
-
const b = t === "doing" ? n[r[o]] : void 0,
|
|
7866
|
+
}, [t, c, h]);
|
|
7867
|
+
const b = t === "doing" ? n[r[o]] : void 0, m = t === "doing" && b ? i[b.qid] ?? [] : [], y = ve(() => {
|
|
7868
7868
|
if (t === "idle" || t !== "finished") return;
|
|
7869
7869
|
const u = r.map((M) => n[M]), f = u.length, g = u.reduce((M, B) => M + (B.score ?? 0), 0), C = u.reduce((M, B) => {
|
|
7870
|
-
const F =
|
|
7870
|
+
const F = v[B.qid];
|
|
7871
7871
|
return M + (F != null && F.isCorrect ? B.score ?? 0 : 0);
|
|
7872
|
-
}, 0),
|
|
7872
|
+
}, 0), T = u.map((M) => v[M.qid]).filter((M) => !!M), R = typeof a == "number" && typeof d == "number" ? Math.max(0, d - a) : T.reduce((M, B) => M + (B.ms ?? 0), 0), I = f > 0 ? Math.round(R / f) : 0, p = [...T].sort((M, B) => M.ms - B.ms), S = p[0], k = p[p.length - 1], E = T.filter((M) => !M.multi), O = T.filter((M) => M.multi), z = E.filter((M) => M.isCorrect).length, w = O.filter((M) => M.isCorrect).length, _ = T.filter((M) => M.timedOut).length, P = T.filter((M) => M.revealed).length, G = T.filter((M) => !M.isCorrect).sort((M, B) => B.ms - M.ms).slice(0, 3);
|
|
7873
7873
|
return {
|
|
7874
7874
|
total: f,
|
|
7875
7875
|
correct: s,
|
|
@@ -7879,31 +7879,31 @@ const xd = Wt(function() {
|
|
|
7879
7879
|
totalScore: g,
|
|
7880
7880
|
gainedScore: C,
|
|
7881
7881
|
fastest: S,
|
|
7882
|
-
slowest:
|
|
7882
|
+
slowest: k,
|
|
7883
7883
|
singles: { total: E.length, correct: z },
|
|
7884
7884
|
multis: { total: O.length, correct: w },
|
|
7885
7885
|
timedOut: _,
|
|
7886
7886
|
revealed: P,
|
|
7887
7887
|
wrongTop3: G
|
|
7888
7888
|
};
|
|
7889
|
-
}, [t, r, n,
|
|
7889
|
+
}, [t, r, n, v, a, d, s]);
|
|
7890
7890
|
return t === "idle" ? null : /* @__PURE__ */ x("div", { className: he.Overlay, role: "dialog", "aria-modal": "true", children: /* @__PURE__ */ x("div", { className: he.Dialog, children: t === "doing" && b ? /* @__PURE__ */ x(
|
|
7891
7891
|
wd,
|
|
7892
7892
|
{
|
|
7893
7893
|
q: b,
|
|
7894
7894
|
index: o,
|
|
7895
7895
|
total: r.length,
|
|
7896
|
-
selected:
|
|
7896
|
+
selected: m,
|
|
7897
7897
|
uiReveal: l,
|
|
7898
7898
|
onSelect: (u) => {
|
|
7899
7899
|
if (l) return;
|
|
7900
|
-
const f =
|
|
7900
|
+
const f = h.getState();
|
|
7901
7901
|
Di(b) ? f.selectToggle(u) : f.selectSingle(u);
|
|
7902
7902
|
},
|
|
7903
|
-
onBeforeNext: () =>
|
|
7904
|
-
onNext: () =>
|
|
7903
|
+
onBeforeNext: () => h.getState().setReveal(!0),
|
|
7904
|
+
onNext: () => h.getState().afterRevealNext(),
|
|
7905
7905
|
remainingSec: c,
|
|
7906
|
-
onClose: () =>
|
|
7906
|
+
onClose: () => h.getState().close()
|
|
7907
7907
|
}
|
|
7908
7908
|
) : /* @__PURE__ */ x(
|
|
7909
7909
|
Id,
|
|
@@ -7911,7 +7911,7 @@ const xd = Wt(function() {
|
|
|
7911
7911
|
total: r.length,
|
|
7912
7912
|
correct: s,
|
|
7913
7913
|
summary: y,
|
|
7914
|
-
onClose: () =>
|
|
7914
|
+
onClose: () => h.getState().close()
|
|
7915
7915
|
}
|
|
7916
7916
|
) }) });
|
|
7917
7917
|
});
|
|
@@ -7927,26 +7927,26 @@ function wd(e) {
|
|
|
7927
7927
|
onNext: l,
|
|
7928
7928
|
remainingSec: a,
|
|
7929
7929
|
onClose: d
|
|
7930
|
-
} = e,
|
|
7930
|
+
} = e, v = Di(t), h = ve(() => {
|
|
7931
7931
|
const u = t.options.map((f, g) => ({ opt: f, i: g }));
|
|
7932
7932
|
for (let f = u.length - 1; f > 0; f--) {
|
|
7933
7933
|
const g = Math.floor(Math.random() * (f + 1));
|
|
7934
7934
|
[u[f], u[g]] = [u[g], u[f]];
|
|
7935
7935
|
}
|
|
7936
7936
|
return u;
|
|
7937
|
-
}, [t.options]), b = ve(() => Sd(t), [t]),
|
|
7937
|
+
}, [t.options]), b = ve(() => Sd(t), [t]), m = ve(() => yd(t), [t]), y = ve(() => {
|
|
7938
7938
|
const u = [...o].sort((f, g) => f - g);
|
|
7939
|
-
if (u.length !==
|
|
7940
|
-
for (let f = 0; f < u.length; f++) if (u[f] !==
|
|
7939
|
+
if (u.length !== m.length) return !1;
|
|
7940
|
+
for (let f = 0; f < u.length; f++) if (u[f] !== m[f]) return !1;
|
|
7941
7941
|
return !0;
|
|
7942
|
-
}, [o,
|
|
7942
|
+
}, [o, m]);
|
|
7943
7943
|
return /* @__PURE__ */ Z("div", { className: he.Body, children: [
|
|
7944
7944
|
/* @__PURE__ */ Z("div", { className: he.Header, children: [
|
|
7945
7945
|
/* @__PURE__ */ x("div", { className: he.Paging, children: `Quiz (${n + 1}/${r})` }),
|
|
7946
7946
|
/* @__PURE__ */ x("button", { type: "button", onClick: d, className: he.CloseBtn, children: "X" })
|
|
7947
7947
|
] }),
|
|
7948
7948
|
/* @__PURE__ */ x("div", { className: he.Question, children: t.question }),
|
|
7949
|
-
/* @__PURE__ */ x("div", { className: he.Score, children: ` (${t.score}점${
|
|
7949
|
+
/* @__PURE__ */ x("div", { className: he.Score, children: ` (${t.score}점${v ? " ,모두선택" : ""})` }),
|
|
7950
7950
|
/* @__PURE__ */ x(
|
|
7951
7951
|
"div",
|
|
7952
7952
|
{
|
|
@@ -7956,8 +7956,8 @@ function wd(e) {
|
|
|
7956
7956
|
}
|
|
7957
7957
|
),
|
|
7958
7958
|
/* @__PURE__ */ x("div", { className: he.Image, children: b && /* @__PURE__ */ x("img", { src: b, alt: "" }) }),
|
|
7959
|
-
/* @__PURE__ */ x("div", { className: he.Options, children:
|
|
7960
|
-
const g = o.includes(f), C =
|
|
7959
|
+
/* @__PURE__ */ x("div", { className: he.Options, children: h.map(({ opt: u, i: f }) => {
|
|
7960
|
+
const g = o.includes(f), C = m.includes(f), T = [
|
|
7961
7961
|
he.OptionBtn,
|
|
7962
7962
|
g ? he.OptionBtnActive : "",
|
|
7963
7963
|
i && C ? he.OptionBtnCorrect : ""
|
|
@@ -7967,7 +7967,7 @@ function wd(e) {
|
|
|
7967
7967
|
{
|
|
7968
7968
|
type: "button",
|
|
7969
7969
|
onClick: () => s(f),
|
|
7970
|
-
className:
|
|
7970
|
+
className: T,
|
|
7971
7971
|
disabled: i,
|
|
7972
7972
|
children: u
|
|
7973
7973
|
},
|
|
@@ -8113,8 +8113,8 @@ function kd(e) {
|
|
|
8113
8113
|
selectToggle: (s) => {
|
|
8114
8114
|
const c = i();
|
|
8115
8115
|
if (c.phase !== "doing" || c.uiReveal) return;
|
|
8116
|
-
const a = c.quizzes[c.order[c.currentIndex]].qid, d = c.answers[a] ?? [],
|
|
8117
|
-
o({ answers: { ...c.answers, [a]:
|
|
8116
|
+
const a = c.quizzes[c.order[c.currentIndex]].qid, d = c.answers[a] ?? [], v = d.includes(s) ? d.filter((h) => h !== s) : [...d, s].sort((h, b) => h - b);
|
|
8117
|
+
o({ answers: { ...c.answers, [a]: v } });
|
|
8118
8118
|
},
|
|
8119
8119
|
selectSingle: (s) => {
|
|
8120
8120
|
const c = i();
|
|
@@ -8125,21 +8125,21 @@ function kd(e) {
|
|
|
8125
8125
|
submitCurrent: () => {
|
|
8126
8126
|
const s = i();
|
|
8127
8127
|
if (s.phase !== "doing") return;
|
|
8128
|
-
const c = s.order[s.currentIndex], l = s.quizzes[c], a = l.qid, d = (s.answers[a] ?? []).slice().sort((u, f) => u - f),
|
|
8128
|
+
const c = s.order[s.currentIndex], l = s.quizzes[c], a = l.qid, d = (s.answers[a] ?? []).slice().sort((u, f) => u - f), v = cr(l), h = Td(d, v), b = s.questionStartedAt ? Date.now() - s.questionStartedAt : 0, m = s.perQ[a], y = {
|
|
8129
8129
|
qid: a,
|
|
8130
8130
|
index: l.index,
|
|
8131
8131
|
question: l.question,
|
|
8132
8132
|
score: l.score ?? 0,
|
|
8133
8133
|
multi: ar(l),
|
|
8134
8134
|
selected: d,
|
|
8135
|
-
correctIdxes:
|
|
8136
|
-
isCorrect:
|
|
8135
|
+
correctIdxes: v,
|
|
8136
|
+
isCorrect: h,
|
|
8137
8137
|
ms: b,
|
|
8138
|
-
revealed: (
|
|
8139
|
-
timedOut: (
|
|
8138
|
+
revealed: (m == null ? void 0 : m.revealed) ?? !1,
|
|
8139
|
+
timedOut: (m == null ? void 0 : m.timedOut) ?? !1
|
|
8140
8140
|
};
|
|
8141
8141
|
if (o({
|
|
8142
|
-
correctCount: s.correctCount + (
|
|
8142
|
+
correctCount: s.correctCount + (h ? 1 : 0),
|
|
8143
8143
|
perQ: { ...s.perQ, [a]: y }
|
|
8144
8144
|
}), s.currentIndex + 1 >= s.order.length)
|
|
8145
8145
|
o({ uiReveal: !1, remainingSec: void 0 }), i().finish();
|
|
@@ -8157,7 +8157,7 @@ function kd(e) {
|
|
|
8157
8157
|
const c = i();
|
|
8158
8158
|
if (c.phase === "doing") {
|
|
8159
8159
|
if (s) {
|
|
8160
|
-
const l = c.quizzes[c.order[c.currentIndex]], a = l.qid, d = c.perQ[a],
|
|
8160
|
+
const l = c.quizzes[c.order[c.currentIndex]], a = l.qid, d = c.perQ[a], v = {
|
|
8161
8161
|
qid: a,
|
|
8162
8162
|
index: l.index,
|
|
8163
8163
|
question: l.question,
|
|
@@ -8170,7 +8170,7 @@ function kd(e) {
|
|
|
8170
8170
|
revealed: !0,
|
|
8171
8171
|
timedOut: (d == null ? void 0 : d.timedOut) ?? !1
|
|
8172
8172
|
};
|
|
8173
|
-
o({ perQ: { ...c.perQ, [a]:
|
|
8173
|
+
o({ perQ: { ...c.perQ, [a]: v } });
|
|
8174
8174
|
}
|
|
8175
8175
|
o({ uiReveal: s });
|
|
8176
8176
|
}
|
|
@@ -8213,7 +8213,7 @@ function kd(e) {
|
|
|
8213
8213
|
if (s.phase !== "doing" || s.remainingSec == null) return;
|
|
8214
8214
|
const c = s.remainingSec - 1;
|
|
8215
8215
|
if (c <= 0) {
|
|
8216
|
-
const l = s.quizzes[s.order[s.currentIndex]], a = l.qid, d = s.perQ[a],
|
|
8216
|
+
const l = s.quizzes[s.order[s.currentIndex]], a = l.qid, d = s.perQ[a], v = {
|
|
8217
8217
|
qid: a,
|
|
8218
8218
|
index: l.index,
|
|
8219
8219
|
question: l.question,
|
|
@@ -8229,7 +8229,7 @@ function kd(e) {
|
|
|
8229
8229
|
o({
|
|
8230
8230
|
remainingSec: 0,
|
|
8231
8231
|
uiReveal: !0,
|
|
8232
|
-
perQ: { ...s.perQ, [a]:
|
|
8232
|
+
perQ: { ...s.perQ, [a]: v }
|
|
8233
8233
|
});
|
|
8234
8234
|
} else
|
|
8235
8235
|
o({ remainingSec: c });
|
|
@@ -8248,24 +8248,24 @@ function Rd({ children: e, initialState: t }) {
|
|
|
8248
8248
|
if (s.phase !== "finished" && i.phase === "finished") {
|
|
8249
8249
|
const c = r.current;
|
|
8250
8250
|
if (!c) return;
|
|
8251
|
-
const { sectionId: l, quizzes: a, order: d, perQ:
|
|
8252
|
-
var
|
|
8253
|
-
return (
|
|
8254
|
-
}).length, f =
|
|
8255
|
-
const S =
|
|
8256
|
-
return I + (S != null && S.isCorrect ?
|
|
8257
|
-
}, 0), C = typeof
|
|
8258
|
-
const
|
|
8251
|
+
const { sectionId: l, quizzes: a, order: d, perQ: v, startedAt: h, finishedAt: b } = i, m = d.map((I) => a[I]), y = m.length, u = m.filter((I) => {
|
|
8252
|
+
var p;
|
|
8253
|
+
return (p = v[I.qid]) == null ? void 0 : p.isCorrect;
|
|
8254
|
+
}).length, f = m.reduce((I, p) => I + (p.score ?? 0), 0), g = m.reduce((I, p) => {
|
|
8255
|
+
const S = v[p.qid];
|
|
8256
|
+
return I + (S != null && S.isCorrect ? p.score ?? 0 : 0);
|
|
8257
|
+
}, 0), C = typeof h == "number" && typeof b == "number" ? Math.max(0, b - h) : 0, T = m.map((I) => {
|
|
8258
|
+
const p = v[I.qid];
|
|
8259
8259
|
return {
|
|
8260
8260
|
qid: I.qid,
|
|
8261
8261
|
index: I.index,
|
|
8262
8262
|
question: I.question,
|
|
8263
8263
|
score: I.score ?? 0,
|
|
8264
|
-
isCorrect: (
|
|
8265
|
-
selected: (
|
|
8266
|
-
correctIdxes: (
|
|
8267
|
-
ms: (
|
|
8268
|
-
timedOut: (
|
|
8264
|
+
isCorrect: (p == null ? void 0 : p.isCorrect) ?? !1,
|
|
8265
|
+
selected: (p == null ? void 0 : p.selected) ?? [],
|
|
8266
|
+
correctIdxes: (p == null ? void 0 : p.correctIdxes) ?? [],
|
|
8267
|
+
ms: (p == null ? void 0 : p.ms) ?? 0,
|
|
8268
|
+
timedOut: (p == null ? void 0 : p.timedOut) ?? !1
|
|
8269
8269
|
};
|
|
8270
8270
|
}), R = {
|
|
8271
8271
|
sectionId: l ?? "",
|
|
@@ -8275,7 +8275,7 @@ function Rd({ children: e, initialState: t }) {
|
|
|
8275
8275
|
totalScore: f,
|
|
8276
8276
|
gainedScore: g,
|
|
8277
8277
|
timeMsTotal: C,
|
|
8278
|
-
perQuestion:
|
|
8278
|
+
perQuestion: T
|
|
8279
8279
|
};
|
|
8280
8280
|
c(R);
|
|
8281
8281
|
}
|
|
@@ -8348,36 +8348,43 @@ function Md() {
|
|
|
8348
8348
|
const { viewerState: a } = l;
|
|
8349
8349
|
if (a) {
|
|
8350
8350
|
a.mode && t.getState().setMode(a.mode);
|
|
8351
|
-
const { ...
|
|
8352
|
-
t.setState(
|
|
8351
|
+
const { ...h } = a;
|
|
8352
|
+
t.setState(h);
|
|
8353
8353
|
}
|
|
8354
8354
|
if (typeof l.globalIndex == "number" && n.getState().progress.setCurrentGlobalRunIndex(l.globalIndex, "playback"), (a == null ? void 0 : a.mode) === "scroll" || !(a != null && a.mode)) {
|
|
8355
|
-
const
|
|
8356
|
-
const
|
|
8357
|
-
if (!
|
|
8355
|
+
const h = () => {
|
|
8356
|
+
const b = n.getState().progress.getSectionScrollApi();
|
|
8357
|
+
if (!b) return !1;
|
|
8358
8358
|
if (l.scrollY === 0)
|
|
8359
|
-
|
|
8360
|
-
else if (
|
|
8361
|
-
const
|
|
8362
|
-
if (typeof
|
|
8363
|
-
const
|
|
8364
|
-
|
|
8359
|
+
b.setScrollTop(0);
|
|
8360
|
+
else if (b.scrollToGIAtOffset) {
|
|
8361
|
+
const m = l.anchorGI ?? l.globalIndex;
|
|
8362
|
+
if (typeof m == "number") {
|
|
8363
|
+
const y = l.anchorOffsetRatio ?? 0;
|
|
8364
|
+
b.scrollToGIAtOffset(m, y);
|
|
8365
8365
|
}
|
|
8366
8366
|
}
|
|
8367
8367
|
return !0;
|
|
8368
8368
|
};
|
|
8369
|
-
if (!
|
|
8370
|
-
let
|
|
8371
|
-
const
|
|
8372
|
-
(
|
|
8369
|
+
if (!h()) {
|
|
8370
|
+
let b = 0;
|
|
8371
|
+
const m = setInterval(() => {
|
|
8372
|
+
(h() || ++b >= 10) && clearInterval(m);
|
|
8373
8373
|
}, 50);
|
|
8374
8374
|
}
|
|
8375
8375
|
}
|
|
8376
|
+
l.audio && o && o.getState()._setStatusOnly(l.audio.status);
|
|
8377
|
+
const v = n.getState().progress;
|
|
8378
|
+
l.range ? v.setRange(l.range.startGI, l.range.endGI) : v.clearRange();
|
|
8376
8379
|
},
|
|
8377
|
-
[t, n]
|
|
8380
|
+
[t, n, o]
|
|
8378
8381
|
), s = Q(() => {
|
|
8379
|
-
var
|
|
8380
|
-
const l = t.getState(), a = n.getState().progress, d = (
|
|
8382
|
+
var C, T, R;
|
|
8383
|
+
const l = t.getState(), a = n.getState().progress, d = (C = a.getSectionScrollApi) == null ? void 0 : C.call(a), v = a.currentGlobalRunIndex ?? 0, h = ((T = d == null ? void 0 : d.getScrollTop) == null ? void 0 : T.call(d)) ?? 0, b = ((R = d == null ? void 0 : d.getAnchorOffsetRatio) == null ? void 0 : R.call(d, v)) ?? 0, m = o == null ? void 0 : o.getState(), y = m ? {
|
|
8384
|
+
status: m.status,
|
|
8385
|
+
currentClip: m.currentClip,
|
|
8386
|
+
currentTimeMs: m.currentTimeMs
|
|
8387
|
+
} : void 0, { rangeStartGI: u, rangeEndGI: f } = a, g = u != null && f != null ? { startGI: u, endGI: f, text: a.getRangeText() } : null;
|
|
8381
8388
|
return {
|
|
8382
8389
|
viewerState: {
|
|
8383
8390
|
mode: l.mode,
|
|
@@ -8401,16 +8408,18 @@ function Md() {
|
|
|
8401
8408
|
viewportWidth: l.viewportWidth,
|
|
8402
8409
|
viewportHeight: l.viewportHeight
|
|
8403
8410
|
},
|
|
8404
|
-
globalIndex:
|
|
8405
|
-
scrollY:
|
|
8406
|
-
anchorGI:
|
|
8411
|
+
globalIndex: v,
|
|
8412
|
+
scrollY: h,
|
|
8413
|
+
anchorGI: v,
|
|
8407
8414
|
anchorOffsetRatio: b,
|
|
8408
8415
|
currentPage: a.pageIndex ?? 0,
|
|
8409
8416
|
sectionId: a.sectionId ?? "",
|
|
8410
8417
|
viewportWidth: l.viewportWidth,
|
|
8411
|
-
viewportHeight: l.viewportHeight
|
|
8418
|
+
viewportHeight: l.viewportHeight,
|
|
8419
|
+
audio: y,
|
|
8420
|
+
range: g
|
|
8412
8421
|
};
|
|
8413
|
-
}, [t, n]), c = Q(
|
|
8422
|
+
}, [t, n, o]), c = Q(
|
|
8414
8423
|
(l) => {
|
|
8415
8424
|
switch (l.type) {
|
|
8416
8425
|
case "global_index_change": {
|
|
@@ -8420,13 +8429,13 @@ function Md() {
|
|
|
8420
8429
|
}
|
|
8421
8430
|
case "scroll": {
|
|
8422
8431
|
if (t.getState().mode === "page") break;
|
|
8423
|
-
const { scrollTop: d, anchorGI:
|
|
8424
|
-
b && (d === 0 ? b.setScrollTop(0) : b.scrollToGIAtOffset && typeof
|
|
8432
|
+
const { scrollTop: d, anchorGI: v, anchorOffsetRatio: h } = l.payload, b = n.getState().progress.getSectionScrollApi();
|
|
8433
|
+
b && (d === 0 ? b.setScrollTop(0) : b.scrollToGIAtOffset && typeof v == "number" && b.scrollToGIAtOffset(v, h));
|
|
8425
8434
|
break;
|
|
8426
8435
|
}
|
|
8427
8436
|
case "settings_change": {
|
|
8428
|
-
const { key: a, value: d } = l.payload,
|
|
8429
|
-
a in
|
|
8437
|
+
const { key: a, value: d } = l.payload, v = t.getState();
|
|
8438
|
+
a in v && typeof v[a] != "function" && t.setState({ [a]: d });
|
|
8430
8439
|
break;
|
|
8431
8440
|
}
|
|
8432
8441
|
case "mode_change": {
|
|
@@ -8459,9 +8468,9 @@ function Md() {
|
|
|
8459
8468
|
case "range_change": {
|
|
8460
8469
|
const { startGI: a, endGI: d } = l.payload;
|
|
8461
8470
|
console.log(`[DirectPlayback] ${l.type}: GI ${a}~${d}`), n.getState().progress.setRange(a, d);
|
|
8462
|
-
const
|
|
8471
|
+
const v = n.getState().progress;
|
|
8463
8472
|
console.log(
|
|
8464
|
-
`[DirectPlayback] after setRange: rangeStartGI=${
|
|
8473
|
+
`[DirectPlayback] after setRange: rangeStartGI=${v.rangeStartGI}, rangeEndGI=${v.rangeEndGI}`
|
|
8465
8474
|
);
|
|
8466
8475
|
break;
|
|
8467
8476
|
}
|
|
@@ -8497,8 +8506,8 @@ function Md() {
|
|
|
8497
8506
|
a();
|
|
8498
8507
|
return;
|
|
8499
8508
|
}
|
|
8500
|
-
const d = n.subscribe((
|
|
8501
|
-
|
|
8509
|
+
const d = n.subscribe((v) => {
|
|
8510
|
+
v.progress.sectionLoading || (d(), a());
|
|
8502
8511
|
});
|
|
8503
8512
|
})
|
|
8504
8513
|
}, e.getState().isPlaybackMode && (e.getState().setDispatchHandler(c), e.getState().setApplySnapshotHandler(i)), () => {
|
|
@@ -8518,57 +8527,57 @@ const Ed = ({
|
|
|
8518
8527
|
containerRef: e,
|
|
8519
8528
|
onTranslate: t
|
|
8520
8529
|
}) => {
|
|
8521
|
-
const n = j((
|
|
8530
|
+
const n = j((h) => h.rangeStartGI), r = j((h) => h.rangeEndGI), o = j((h) => h.getRangeText), i = j((h) => h.clearRange), s = Et(), c = n != null && r != null, [l, a] = nt(null);
|
|
8522
8531
|
Se(() => {
|
|
8523
8532
|
if (!c) return;
|
|
8524
|
-
const
|
|
8525
|
-
if (!
|
|
8533
|
+
const h = e.current;
|
|
8534
|
+
if (!h) return;
|
|
8526
8535
|
let b = !0;
|
|
8527
|
-
const
|
|
8536
|
+
const m = new ResizeObserver(() => {
|
|
8528
8537
|
if (b) {
|
|
8529
8538
|
b = !1;
|
|
8530
8539
|
return;
|
|
8531
8540
|
}
|
|
8532
8541
|
i();
|
|
8533
8542
|
});
|
|
8534
|
-
return
|
|
8543
|
+
return m.observe(h), () => m.disconnect();
|
|
8535
8544
|
}, [c, i, e]), Se(() => {
|
|
8536
8545
|
if (!c || n == null || r == null) {
|
|
8537
8546
|
a(null);
|
|
8538
8547
|
return;
|
|
8539
8548
|
}
|
|
8540
|
-
const
|
|
8541
|
-
const
|
|
8542
|
-
if (!
|
|
8543
|
-
const y =
|
|
8549
|
+
const h = () => {
|
|
8550
|
+
const m = e.current;
|
|
8551
|
+
if (!m) return;
|
|
8552
|
+
const y = m.getBoundingClientRect(), f = 1 / (s.getState().playbackScale || 1), g = m.querySelector(`[data-g="${r}"]`);
|
|
8544
8553
|
if (!g) {
|
|
8545
8554
|
a({ x: y.width * f / 2, y: 80 });
|
|
8546
8555
|
return;
|
|
8547
8556
|
}
|
|
8548
|
-
const C = g.getBoundingClientRect(),
|
|
8557
|
+
const C = g.getBoundingClientRect(), T = m.querySelector(`[data-g="${n}"]`), R = T == null ? void 0 : T.getBoundingClientRect();
|
|
8549
8558
|
let I = (C.left + C.width / 2 - y.left) * f;
|
|
8550
8559
|
R && (I = ((R.left + C.right) / 2 - y.left) * f);
|
|
8551
|
-
const
|
|
8552
|
-
|
|
8553
|
-
Math.min(I, O -
|
|
8560
|
+
const p = 160, S = 50, k = 16, E = 12, O = y.width * f, z = Math.max(
|
|
8561
|
+
k + p / 2,
|
|
8562
|
+
Math.min(I, O - k - p / 2)
|
|
8554
8563
|
), w = (((R == null ? void 0 : R.top) ?? C.top) - y.top) * f - S - E;
|
|
8555
8564
|
let _ = w;
|
|
8556
|
-
w <
|
|
8565
|
+
w < k && (_ = (C.bottom - y.top) * f + E), a({ x: z, y: _ });
|
|
8557
8566
|
};
|
|
8558
|
-
|
|
8567
|
+
h();
|
|
8559
8568
|
const b = e.current;
|
|
8560
|
-
return b && b.addEventListener("scroll",
|
|
8561
|
-
b && b.removeEventListener("scroll",
|
|
8569
|
+
return b && b.addEventListener("scroll", h, !0), () => {
|
|
8570
|
+
b && b.removeEventListener("scroll", h, !0);
|
|
8562
8571
|
};
|
|
8563
8572
|
}, [c, n, r, e, s]);
|
|
8564
8573
|
const d = Q(() => {
|
|
8565
|
-
const
|
|
8566
|
-
|
|
8574
|
+
const h = o();
|
|
8575
|
+
h && navigator.clipboard.writeText(h).catch((b) => {
|
|
8567
8576
|
console.error("복사 실패:", b);
|
|
8568
8577
|
}), i();
|
|
8569
|
-
}, [o, i]),
|
|
8570
|
-
const
|
|
8571
|
-
|
|
8578
|
+
}, [o, i]), v = Q(() => {
|
|
8579
|
+
const h = o();
|
|
8580
|
+
h && t && t(h);
|
|
8572
8581
|
}, [o, t]);
|
|
8573
8582
|
return !c || !l ? null : /* @__PURE__ */ Z(
|
|
8574
8583
|
"div",
|
|
@@ -8608,7 +8617,7 @@ const Ed = ({
|
|
|
8608
8617
|
/* @__PURE__ */ x(
|
|
8609
8618
|
"button",
|
|
8610
8619
|
{
|
|
8611
|
-
onClick:
|
|
8620
|
+
onClick: v,
|
|
8612
8621
|
style: {
|
|
8613
8622
|
padding: "8px 16px",
|
|
8614
8623
|
backgroundColor: "#10b981",
|
|
@@ -8629,7 +8638,7 @@ const Ed = ({
|
|
|
8629
8638
|
handleStart: Od,
|
|
8630
8639
|
handleEnd: Pd
|
|
8631
8640
|
}, Bd = ({ containerRef: e }) => {
|
|
8632
|
-
const t = j((f) => f.rangeStartGI), n = j((f) => f.rangeEndGI), r = j((f) => f.setRange), o = Et(), i = t != null && n != null, [s, c] = nt(null), [l, a] = nt(null), d = ie(null),
|
|
8641
|
+
const t = j((f) => f.rangeStartGI), n = j((f) => f.rangeEndGI), r = j((f) => f.setRange), o = Et(), i = t != null && n != null, [s, c] = nt(null), [l, a] = nt(null), d = ie(null), v = ie(null);
|
|
8633
8642
|
Se(() => {
|
|
8634
8643
|
if (!i || t == null || n == null) {
|
|
8635
8644
|
c(null), a(null);
|
|
@@ -8638,20 +8647,20 @@ const Ed = ({
|
|
|
8638
8647
|
const f = () => {
|
|
8639
8648
|
const C = e.current;
|
|
8640
8649
|
if (!C) return;
|
|
8641
|
-
const
|
|
8642
|
-
if (
|
|
8643
|
-
const
|
|
8650
|
+
const T = C.getBoundingClientRect(), I = 1 / (o.getState().playbackScale || 1), p = C.querySelector(`[data-g="${t}"]`), S = C.querySelector(`[data-g="${n}"]`);
|
|
8651
|
+
if (p) {
|
|
8652
|
+
const k = p.getBoundingClientRect();
|
|
8644
8653
|
c({
|
|
8645
|
-
x: (
|
|
8646
|
-
y: (
|
|
8654
|
+
x: (k.left - T.left) * I,
|
|
8655
|
+
y: (k.bottom - T.top) * I
|
|
8647
8656
|
});
|
|
8648
8657
|
} else
|
|
8649
8658
|
c(null);
|
|
8650
8659
|
if (S) {
|
|
8651
|
-
const
|
|
8660
|
+
const k = S.getBoundingClientRect();
|
|
8652
8661
|
a({
|
|
8653
|
-
x: (
|
|
8654
|
-
y: (
|
|
8662
|
+
x: (k.right - T.left) * I,
|
|
8663
|
+
y: (k.bottom - T.top) * I
|
|
8655
8664
|
});
|
|
8656
8665
|
} else
|
|
8657
8666
|
a(null);
|
|
@@ -8662,29 +8671,29 @@ const Ed = ({
|
|
|
8662
8671
|
g && g.removeEventListener("scroll", f, !0), window.removeEventListener("resize", f);
|
|
8663
8672
|
};
|
|
8664
8673
|
}, [i, t, n, e, o]);
|
|
8665
|
-
const
|
|
8666
|
-
var
|
|
8674
|
+
const h = Q((f, g) => {
|
|
8675
|
+
var T;
|
|
8667
8676
|
const C = document.elementsFromPoint(f, g);
|
|
8668
8677
|
for (const R of C) {
|
|
8669
|
-
const I = (
|
|
8678
|
+
const I = (T = R.getAttribute) == null ? void 0 : T.call(R, "data-g");
|
|
8670
8679
|
if (I != null)
|
|
8671
8680
|
return parseInt(I, 10);
|
|
8672
8681
|
}
|
|
8673
8682
|
return null;
|
|
8674
8683
|
}, []), b = Q(
|
|
8675
8684
|
(f) => (g) => {
|
|
8676
|
-
g.preventDefault(), g.stopPropagation(), d.current = f,
|
|
8685
|
+
g.preventDefault(), g.stopPropagation(), d.current = f, v.current = f === "start" ? t : n, g.target.setPointerCapture(g.pointerId);
|
|
8677
8686
|
},
|
|
8678
8687
|
[t, n]
|
|
8679
|
-
),
|
|
8688
|
+
), m = Q(
|
|
8680
8689
|
(f) => {
|
|
8681
8690
|
if (!d.current || t == null || n == null) return;
|
|
8682
|
-
const g =
|
|
8691
|
+
const g = h(f.clientX, f.clientY);
|
|
8683
8692
|
g != null && (d.current === "start" ? g <= n ? r(g, n) : (r(n, g), d.current = "end") : g >= t ? r(t, g) : (r(g, t), d.current = "start"));
|
|
8684
8693
|
},
|
|
8685
|
-
[t, n, r,
|
|
8694
|
+
[t, n, r, h]
|
|
8686
8695
|
), y = Q((f) => {
|
|
8687
|
-
d.current = null,
|
|
8696
|
+
d.current = null, v.current = null, f.target.releasePointerCapture(f.pointerId);
|
|
8688
8697
|
}, []);
|
|
8689
8698
|
return i ? /* @__PURE__ */ Z(yt, { children: [
|
|
8690
8699
|
s && /* @__PURE__ */ x(
|
|
@@ -8697,7 +8706,7 @@ const Ed = ({
|
|
|
8697
8706
|
top: s.y
|
|
8698
8707
|
},
|
|
8699
8708
|
onPointerDown: b("start"),
|
|
8700
|
-
onPointerMove:
|
|
8709
|
+
onPointerMove: m,
|
|
8701
8710
|
onPointerUp: y,
|
|
8702
8711
|
onPointerCancel: y
|
|
8703
8712
|
}
|
|
@@ -8712,7 +8721,7 @@ const Ed = ({
|
|
|
8712
8721
|
top: l.y
|
|
8713
8722
|
},
|
|
8714
8723
|
onPointerDown: b("end"),
|
|
8715
|
-
onPointerMove:
|
|
8724
|
+
onPointerMove: m,
|
|
8716
8725
|
onPointerUp: y,
|
|
8717
8726
|
onPointerCancel: y
|
|
8718
8727
|
}
|
|
@@ -8730,8 +8739,8 @@ function zd() {
|
|
|
8730
8739
|
if (s.closest("[data-g]")) {
|
|
8731
8740
|
const l = (c = s.closest("[data-g]")) == null ? void 0 : c.getAttribute("data-g");
|
|
8732
8741
|
if (l) {
|
|
8733
|
-
const a = parseInt(l, 10), d = Math.min(e, t),
|
|
8734
|
-
if (a >= d && a <=
|
|
8742
|
+
const a = parseInt(l, 10), d = Math.min(e, t), v = Math.max(e, t);
|
|
8743
|
+
if (a >= d && a <= v)
|
|
8735
8744
|
return;
|
|
8736
8745
|
}
|
|
8737
8746
|
}
|
|
@@ -8853,17 +8862,17 @@ function Dd({
|
|
|
8853
8862
|
onViewerEvent: l,
|
|
8854
8863
|
viewerRef: a,
|
|
8855
8864
|
isPlaybackMode: d = !1,
|
|
8856
|
-
playbackScale:
|
|
8857
|
-
isDev:
|
|
8865
|
+
playbackScale: v,
|
|
8866
|
+
isDev: h = !1
|
|
8858
8867
|
}) {
|
|
8859
|
-
const b = String((e == null ? void 0 : e.section_id) ?? "0"),
|
|
8860
|
-
var
|
|
8861
|
-
const g = ((
|
|
8868
|
+
const b = String((e == null ? void 0 : e.section_id) ?? "0"), m = ve(() => {
|
|
8869
|
+
var T, R;
|
|
8870
|
+
const g = ((T = e == null ? void 0 : e.ast) == null ? void 0 : T.blocks) ?? [];
|
|
8862
8871
|
let C = 0;
|
|
8863
8872
|
for (const I of g)
|
|
8864
8873
|
(I == null ? void 0 : I.type) !== "image" && (C += ((R = I == null ? void 0 : I.runs) == null ? void 0 : R.length) ?? 0);
|
|
8865
8874
|
return C;
|
|
8866
|
-
}, [e]), y = ve(() => typeof n == "number" ? Ld(n,
|
|
8875
|
+
}, [e]), y = ve(() => typeof n == "number" ? Ld(n, m > 0 ? 0 : -1, Math.max(m - 1, -1)) : (m > 0, 0), [n, m]), u = ve(
|
|
8867
8876
|
() => ({
|
|
8868
8877
|
section: e,
|
|
8869
8878
|
initialIndex: y,
|
|
@@ -8887,23 +8896,23 @@ function Dd({
|
|
|
8887
8896
|
{
|
|
8888
8897
|
onViewerEvent: l,
|
|
8889
8898
|
isPlaybackMode: d,
|
|
8890
|
-
playbackScale:
|
|
8899
|
+
playbackScale: v,
|
|
8891
8900
|
viewerRef: a,
|
|
8892
|
-
children: /* @__PURE__ */ x(fu, { initialState: { ...t, isDev:
|
|
8901
|
+
children: /* @__PURE__ */ x(fu, { initialState: { ...t, isDev: h }, children: /* @__PURE__ */ x(du, { initialState: u, children: /* @__PURE__ */ x(iu, { initialState: f, children: /* @__PURE__ */ x(Rd, { initialState: { section: e, onQuizComplete: c }, children: /* @__PURE__ */ x(Gd, {}) }, b) }, b) }, b) })
|
|
8893
8902
|
}
|
|
8894
8903
|
);
|
|
8895
8904
|
}
|
|
8896
8905
|
function Gd() {
|
|
8897
|
-
const e = Y((
|
|
8898
|
-
(
|
|
8899
|
-
c(
|
|
8900
|
-
const { rangeStartGI: b, rangeEndGI:
|
|
8906
|
+
const e = Y((h) => h.mode), t = ie(null), n = Et(), r = Rt(), [o, i] = nt(!1), [s, c] = nt(), l = Q(
|
|
8907
|
+
(h) => {
|
|
8908
|
+
c(h), i(!0);
|
|
8909
|
+
const { rangeStartGI: b, rangeEndGI: m } = r.getState().progress;
|
|
8901
8910
|
n.getState().emit({
|
|
8902
8911
|
type: "translate_request",
|
|
8903
8912
|
payload: {
|
|
8904
|
-
text:
|
|
8913
|
+
text: h,
|
|
8905
8914
|
startGI: b ?? 0,
|
|
8906
|
-
endGI:
|
|
8915
|
+
endGI: m ?? 0
|
|
8907
8916
|
}
|
|
8908
8917
|
});
|
|
8909
8918
|
},
|
|
@@ -8918,11 +8927,11 @@ function Gd() {
|
|
|
8918
8927
|
"div",
|
|
8919
8928
|
{
|
|
8920
8929
|
ref: t,
|
|
8921
|
-
onContextMenu: (
|
|
8922
|
-
|
|
8930
|
+
onContextMenu: (h) => {
|
|
8931
|
+
h.preventDefault();
|
|
8923
8932
|
},
|
|
8924
|
-
onDragStart: (
|
|
8925
|
-
|
|
8933
|
+
onDragStart: (h) => {
|
|
8934
|
+
h.preventDefault();
|
|
8926
8935
|
},
|
|
8927
8936
|
style: {
|
|
8928
8937
|
position: "relative",
|