@readerseye2/cr_viewer 1.0.45 → 1.0.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js
CHANGED
|
@@ -3,9 +3,9 @@ var Ui = Object.defineProperty;
|
|
|
3
3
|
var Ki = (e, t, n) => t in e ? Ui(e, t, { enumerable: !0, configurable: !0, writable: !0, value: n }) : e[t] = n;
|
|
4
4
|
var Hr = (e, t, n) => Ki(e, typeof t != "symbol" ? t + "" : t, n);
|
|
5
5
|
import { jsx as x, jsxs as ee, Fragment as wt } from "react/jsx-runtime";
|
|
6
|
-
import * as
|
|
7
|
-
import D, { createContext as Ft, useContext as Ue, useMemo as me, useLayoutEffect as _t, useRef as ie, useEffect as
|
|
8
|
-
import
|
|
6
|
+
import * as Qe from "react";
|
|
7
|
+
import D, { createContext as Ft, useContext as Ue, useMemo as me, useLayoutEffect as _t, useRef as ie, useEffect as fe, useCallback as ne, createElement as hn, useState as pt, memo as Wt, useId as Xi } from "react";
|
|
8
|
+
import Qi from "react-dom";
|
|
9
9
|
const yr = Ft(void 0);
|
|
10
10
|
var an = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
11
11
|
function Uo(e) {
|
|
@@ -22,7 +22,7 @@ var cn = { exports: {} }, Pn = {}, un = { exports: {} }, An = {};
|
|
|
22
22
|
* LICENSE file in the root directory of this source tree.
|
|
23
23
|
*/
|
|
24
24
|
var Nr;
|
|
25
|
-
function
|
|
25
|
+
function Yi() {
|
|
26
26
|
if (Nr) return An;
|
|
27
27
|
Nr = 1;
|
|
28
28
|
var e = D;
|
|
@@ -127,7 +127,7 @@ function Zi() {
|
|
|
127
127
|
}
|
|
128
128
|
var Wr;
|
|
129
129
|
function Ko() {
|
|
130
|
-
return Wr || (Wr = 1, process.env.NODE_ENV === "production" ? un.exports =
|
|
130
|
+
return Wr || (Wr = 1, process.env.NODE_ENV === "production" ? un.exports = Yi() : un.exports = Zi()), un.exports;
|
|
131
131
|
}
|
|
132
132
|
/**
|
|
133
133
|
* @license React
|
|
@@ -155,26 +155,26 @@ function Ji() {
|
|
|
155
155
|
} else y = v.current;
|
|
156
156
|
v = u(
|
|
157
157
|
function() {
|
|
158
|
-
function p(
|
|
158
|
+
function p(O) {
|
|
159
159
|
if (!g) {
|
|
160
|
-
if (g = !0, w =
|
|
160
|
+
if (g = !0, w = O, O = f(O), m !== void 0 && y.hasValue) {
|
|
161
161
|
var b = y.value;
|
|
162
|
-
if (m(b,
|
|
163
|
-
return
|
|
162
|
+
if (m(b, O))
|
|
163
|
+
return C = b;
|
|
164
164
|
}
|
|
165
|
-
return
|
|
165
|
+
return C = O;
|
|
166
166
|
}
|
|
167
|
-
if (b =
|
|
168
|
-
var S = f(
|
|
169
|
-
return m !== void 0 && m(b, S) ? (w =
|
|
167
|
+
if (b = C, r(w, O)) return b;
|
|
168
|
+
var S = f(O);
|
|
169
|
+
return m !== void 0 && m(b, S) ? (w = O, b) : (w = O, C = S);
|
|
170
170
|
}
|
|
171
|
-
var g = !1, w,
|
|
171
|
+
var g = !1, w, C, R = h === void 0 ? null : h;
|
|
172
172
|
return [
|
|
173
173
|
function() {
|
|
174
174
|
return p(d());
|
|
175
175
|
},
|
|
176
|
-
|
|
177
|
-
return p(
|
|
176
|
+
R === null ? void 0 : function() {
|
|
177
|
+
return p(R());
|
|
178
178
|
}
|
|
179
179
|
];
|
|
180
180
|
},
|
|
@@ -215,27 +215,27 @@ function es() {
|
|
|
215
215
|
} else y = v.current;
|
|
216
216
|
v = u(
|
|
217
217
|
function() {
|
|
218
|
-
function p(
|
|
218
|
+
function p(O) {
|
|
219
219
|
if (!g) {
|
|
220
|
-
if (g = !0, w =
|
|
220
|
+
if (g = !0, w = O, O = f(O), m !== void 0 && y.hasValue) {
|
|
221
221
|
var b = y.value;
|
|
222
|
-
if (m(b,
|
|
223
|
-
return
|
|
222
|
+
if (m(b, O))
|
|
223
|
+
return C = b;
|
|
224
224
|
}
|
|
225
|
-
return
|
|
225
|
+
return C = O;
|
|
226
226
|
}
|
|
227
|
-
if (b =
|
|
227
|
+
if (b = C, r(w, O))
|
|
228
228
|
return b;
|
|
229
|
-
var S = f(
|
|
230
|
-
return m !== void 0 && m(b, S) ? (w =
|
|
229
|
+
var S = f(O);
|
|
230
|
+
return m !== void 0 && m(b, S) ? (w = O, b) : (w = O, C = S);
|
|
231
231
|
}
|
|
232
|
-
var g = !1, w,
|
|
232
|
+
var g = !1, w, C, R = h === void 0 ? null : h;
|
|
233
233
|
return [
|
|
234
234
|
function() {
|
|
235
235
|
return p(d());
|
|
236
236
|
},
|
|
237
|
-
|
|
238
|
-
return p(
|
|
237
|
+
R === null ? void 0 : function() {
|
|
238
|
+
return p(R());
|
|
239
239
|
}
|
|
240
240
|
];
|
|
241
241
|
},
|
|
@@ -374,7 +374,7 @@ function as({
|
|
|
374
374
|
shouldIgnoreTarget: r
|
|
375
375
|
}) {
|
|
376
376
|
const o = ie(null);
|
|
377
|
-
|
|
377
|
+
fe(() => () => {
|
|
378
378
|
o.current != null && (clearTimeout(o.current), o.current = null);
|
|
379
379
|
}, []);
|
|
380
380
|
const i = ne(
|
|
@@ -437,7 +437,7 @@ const vn = {
|
|
|
437
437
|
const s = Math.abs(o - e);
|
|
438
438
|
s < r && (r = s, n = i);
|
|
439
439
|
}), n + 1;
|
|
440
|
-
},
|
|
440
|
+
}, Qo = [
|
|
441
441
|
{
|
|
442
442
|
label: "고딕체",
|
|
443
443
|
value: "'Noto Sans KR', sans-serif"
|
|
@@ -453,7 +453,7 @@ const vn = {
|
|
|
453
453
|
], Ve = {
|
|
454
454
|
mode: "page",
|
|
455
455
|
theme: "light",
|
|
456
|
-
fontFamily:
|
|
456
|
+
fontFamily: Qo.find((e) => e.label === "명조체").value,
|
|
457
457
|
// ✅ 기본 글꼴: 바탕체
|
|
458
458
|
fontSizePx: 18,
|
|
459
459
|
lineHeight: 1.8,
|
|
@@ -608,7 +608,7 @@ function us(e) {
|
|
|
608
608
|
setViewportSize: (i, s) => r({ viewportWidth: i, viewportHeight: s })
|
|
609
609
|
}));
|
|
610
610
|
}
|
|
611
|
-
const _n = 0, Ct = 1, Dt = 2,
|
|
611
|
+
const _n = 0, Ct = 1, Dt = 2, Yo = 4;
|
|
612
612
|
function jr(e) {
|
|
613
613
|
return () => e;
|
|
614
614
|
}
|
|
@@ -646,14 +646,14 @@ function Ee(...e) {
|
|
|
646
646
|
function Ie(e, t) {
|
|
647
647
|
return e(Ct, t);
|
|
648
648
|
}
|
|
649
|
-
function
|
|
649
|
+
function pe(e, t) {
|
|
650
650
|
e(_n, t);
|
|
651
651
|
}
|
|
652
652
|
function Ir(e) {
|
|
653
653
|
e(Dt);
|
|
654
654
|
}
|
|
655
655
|
function Pe(e) {
|
|
656
|
-
return e(
|
|
656
|
+
return e(Yo);
|
|
657
657
|
}
|
|
658
658
|
function oe(e, t) {
|
|
659
659
|
return Ie(e, fs(t, _n));
|
|
@@ -686,7 +686,7 @@ function ae(e) {
|
|
|
686
686
|
e(n) && t(n);
|
|
687
687
|
};
|
|
688
688
|
}
|
|
689
|
-
function
|
|
689
|
+
function Y(e) {
|
|
690
690
|
return (t) => Zo(t, e);
|
|
691
691
|
}
|
|
692
692
|
function ft(e) {
|
|
@@ -769,7 +769,7 @@ function W(e) {
|
|
|
769
769
|
o(t);
|
|
770
770
|
break;
|
|
771
771
|
}
|
|
772
|
-
case
|
|
772
|
+
case Yo:
|
|
773
773
|
return t;
|
|
774
774
|
}
|
|
775
775
|
return n(r, o);
|
|
@@ -826,7 +826,7 @@ function Ne(...e) {
|
|
|
826
826
|
return e.forEach((i, s) => {
|
|
827
827
|
const u = Math.pow(2, s);
|
|
828
828
|
Ie(i, (a) => {
|
|
829
|
-
n[s] = a, r = r | u, r === o &&
|
|
829
|
+
n[s] = a, r = r | u, r === o && pe(t, n);
|
|
830
830
|
});
|
|
831
831
|
}), function(i, s) {
|
|
832
832
|
switch (i) {
|
|
@@ -852,7 +852,7 @@ function fr(...e) {
|
|
|
852
852
|
}
|
|
853
853
|
};
|
|
854
854
|
}
|
|
855
|
-
var
|
|
855
|
+
var Ye = /* @__PURE__ */ ((e) => (e[e.DEBUG = 0] = "DEBUG", e[e.INFO = 1] = "INFO", e[e.WARN = 2] = "WARN", e[e.ERROR = 3] = "ERROR", e))(Ye || {});
|
|
856
856
|
const Ss = {
|
|
857
857
|
0: "debug",
|
|
858
858
|
3: "error",
|
|
@@ -933,7 +933,7 @@ function ws(e, t, n, r) {
|
|
|
933
933
|
if (u.dataset.index === void 0)
|
|
934
934
|
continue;
|
|
935
935
|
const a = parseInt(u.dataset.index), l = parseFloat(u.dataset.knownSize), d = t(u, n);
|
|
936
|
-
if (d === 0 && r("Zero-sized element, this should not happen", { child: u },
|
|
936
|
+
if (d === 0 && r("Zero-sized element, this should not happen", { child: u }, Ye.ERROR), d === l)
|
|
937
937
|
continue;
|
|
938
938
|
const h = i[i.length - 1];
|
|
939
939
|
i.length === 0 || h.size !== d || h.endIndex !== a - 1 ? i.push({ endIndex: a, size: d, startIndex: a }) : i[i.length - 1].endIndex++;
|
|
@@ -941,7 +941,7 @@ function ws(e, t, n, r) {
|
|
|
941
941
|
return i;
|
|
942
942
|
}
|
|
943
943
|
function Xr(e, t, n) {
|
|
944
|
-
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t,
|
|
944
|
+
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Ye.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
945
945
|
}
|
|
946
946
|
function ei(e, t, n) {
|
|
947
947
|
const r = D.useRef(null), o = D.useCallback(
|
|
@@ -992,13 +992,13 @@ const Ke = ye(
|
|
|
992
992
|
return oe(
|
|
993
993
|
H(
|
|
994
994
|
e,
|
|
995
|
-
|
|
995
|
+
Y(({ scrollTop: c }) => c)
|
|
996
996
|
),
|
|
997
997
|
t
|
|
998
998
|
), oe(
|
|
999
999
|
H(
|
|
1000
1000
|
e,
|
|
1001
|
-
|
|
1001
|
+
Y(({ scrollHeight: c }) => c)
|
|
1002
1002
|
),
|
|
1003
1003
|
s
|
|
1004
1004
|
), oe(t, o), {
|
|
@@ -1041,9 +1041,9 @@ function ti(e, t) {
|
|
|
1041
1041
|
function Te(e) {
|
|
1042
1042
|
return e === Xt;
|
|
1043
1043
|
}
|
|
1044
|
-
function
|
|
1044
|
+
function Qt(e, t) {
|
|
1045
1045
|
if (!Te(e))
|
|
1046
|
-
return t === e.k ? e.v : t < e.k ?
|
|
1046
|
+
return t === e.k ? e.v : t < e.k ? Qt(e.l, t) : Qt(e.r, t);
|
|
1047
1047
|
}
|
|
1048
1048
|
function ct(e, t, n = "k") {
|
|
1049
1049
|
if (Te(e))
|
|
@@ -1057,7 +1057,7 @@ function ct(e, t, n = "k") {
|
|
|
1057
1057
|
return ct(e.l, t, n);
|
|
1058
1058
|
}
|
|
1059
1059
|
function et(e, t, n) {
|
|
1060
|
-
return Te(e) ? oi(t, n, 1) : t === e.k ? De(e, { k: t, v: n }) : t < e.k ?
|
|
1060
|
+
return Te(e) ? oi(t, n, 1) : t === e.k ? De(e, { k: t, v: n }) : t < e.k ? Qr(De(e, { l: et(e.l, t, n) })) : Qr(De(e, { r: et(e.r, t, n) }));
|
|
1061
1061
|
}
|
|
1062
1062
|
function Lt() {
|
|
1063
1063
|
return Xt;
|
|
@@ -1147,7 +1147,7 @@ function ri(e) {
|
|
|
1147
1147
|
function oi(e, t, n, r = Xt, o = Xt) {
|
|
1148
1148
|
return { k: e, l: r, lvl: n, r: o, v: t };
|
|
1149
1149
|
}
|
|
1150
|
-
function
|
|
1150
|
+
function Qr(e) {
|
|
1151
1151
|
return hr(ii(e));
|
|
1152
1152
|
}
|
|
1153
1153
|
function ii(e) {
|
|
@@ -1164,7 +1164,7 @@ function Is(e) {
|
|
|
1164
1164
|
function si(e, t) {
|
|
1165
1165
|
return !!(e && e.startIndex === t.startIndex && e.endIndex === t.endIndex);
|
|
1166
1166
|
}
|
|
1167
|
-
function
|
|
1167
|
+
function Yt(e, t) {
|
|
1168
1168
|
return !!(e && e[0] === t[0] && e[1] === t[1]);
|
|
1169
1169
|
}
|
|
1170
1170
|
const Tr = ye(
|
|
@@ -1268,7 +1268,7 @@ function Ms(e, t, n, r = 0) {
|
|
|
1268
1268
|
return r > 0 && (t = Math.max(t, li(e, r, kr).offset)), ti(Cs(e, t, n, _s), zs);
|
|
1269
1269
|
}
|
|
1270
1270
|
function Es(e, [t, n, r, o]) {
|
|
1271
|
-
t.length > 0 && r("received item sizes", t,
|
|
1271
|
+
t.length > 0 && r("received item sizes", t, Ye.DEBUG);
|
|
1272
1272
|
const i = e.sizeTree;
|
|
1273
1273
|
let s = i, u = 0;
|
|
1274
1274
|
if (n.length > 0 && Te(i) && t.length === 2) {
|
|
@@ -1295,7 +1295,7 @@ function Os(e) {
|
|
|
1295
1295
|
return { endIndex: i ? i.k - 1 : 1 / 0, size: n, startIndex: t };
|
|
1296
1296
|
});
|
|
1297
1297
|
}
|
|
1298
|
-
function
|
|
1298
|
+
function Yr(e, t) {
|
|
1299
1299
|
let n = 0, r = 0;
|
|
1300
1300
|
for (; n < e; )
|
|
1301
1301
|
n += t[r + 1] - t[r] - 1, r++;
|
|
@@ -1347,7 +1347,7 @@ const As = {
|
|
|
1347
1347
|
current: [],
|
|
1348
1348
|
prev: []
|
|
1349
1349
|
}),
|
|
1350
|
-
|
|
1350
|
+
Y(({ prev: b }) => b)
|
|
1351
1351
|
),
|
|
1352
1352
|
[]
|
|
1353
1353
|
);
|
|
@@ -1356,12 +1356,12 @@ const As = {
|
|
|
1356
1356
|
a,
|
|
1357
1357
|
ae((b) => b.length > 0),
|
|
1358
1358
|
he(p, y),
|
|
1359
|
-
|
|
1360
|
-
const
|
|
1359
|
+
Y(([b, S, k]) => {
|
|
1360
|
+
const T = b.reduce((M, P, I) => et(M, P, Zt(P, S.offsetTree, k) || I), Lt());
|
|
1361
1361
|
return {
|
|
1362
1362
|
...S,
|
|
1363
1363
|
groupIndices: b,
|
|
1364
|
-
groupOffsetTree:
|
|
1364
|
+
groupOffsetTree: T
|
|
1365
1365
|
};
|
|
1366
1366
|
})
|
|
1367
1367
|
),
|
|
@@ -1371,10 +1371,10 @@ const As = {
|
|
|
1371
1371
|
r,
|
|
1372
1372
|
he(p),
|
|
1373
1373
|
ae(([b, { lastIndex: S }]) => b < S),
|
|
1374
|
-
|
|
1374
|
+
Y(([b, { lastIndex: S, lastSize: k }]) => [
|
|
1375
1375
|
{
|
|
1376
1376
|
endIndex: S,
|
|
1377
|
-
size:
|
|
1377
|
+
size: k,
|
|
1378
1378
|
startIndex: b
|
|
1379
1379
|
}
|
|
1380
1380
|
])
|
|
@@ -1384,7 +1384,7 @@ const As = {
|
|
|
1384
1384
|
const w = je(
|
|
1385
1385
|
H(
|
|
1386
1386
|
l,
|
|
1387
|
-
|
|
1387
|
+
Y((b) => b === void 0)
|
|
1388
1388
|
),
|
|
1389
1389
|
!0
|
|
1390
1390
|
);
|
|
@@ -1392,9 +1392,9 @@ const As = {
|
|
|
1392
1392
|
H(
|
|
1393
1393
|
d,
|
|
1394
1394
|
ae((b) => b !== void 0 && Te(Pe(p).sizeTree)),
|
|
1395
|
-
|
|
1396
|
-
const S = Pe(h),
|
|
1397
|
-
return S ?
|
|
1395
|
+
Y((b) => {
|
|
1396
|
+
const S = Pe(h), k = Pe(a).length > 0;
|
|
1397
|
+
return S ? k ? [
|
|
1398
1398
|
{ endIndex: 0, size: S, startIndex: 0 },
|
|
1399
1399
|
{ endIndex: 1, size: b, startIndex: 1 }
|
|
1400
1400
|
] : [] : [{ endIndex: 0, size: b, startIndex: 0 }];
|
|
@@ -1405,21 +1405,21 @@ const As = {
|
|
|
1405
1405
|
H(
|
|
1406
1406
|
f,
|
|
1407
1407
|
ae((b) => b !== void 0 && b.length > 0 && Te(Pe(p).sizeTree)),
|
|
1408
|
-
|
|
1408
|
+
Y((b) => {
|
|
1409
1409
|
const S = [];
|
|
1410
|
-
let
|
|
1411
|
-
for (let
|
|
1412
|
-
const P = b[
|
|
1413
|
-
P !==
|
|
1414
|
-
endIndex:
|
|
1415
|
-
size:
|
|
1416
|
-
startIndex:
|
|
1417
|
-
}),
|
|
1410
|
+
let k = b[0], T = 0;
|
|
1411
|
+
for (let M = 1; M < b.length; M++) {
|
|
1412
|
+
const P = b[M];
|
|
1413
|
+
P !== k && (S.push({
|
|
1414
|
+
endIndex: M - 1,
|
|
1415
|
+
size: k,
|
|
1416
|
+
startIndex: T
|
|
1417
|
+
}), k = P, T = M);
|
|
1418
1418
|
}
|
|
1419
1419
|
return S.push({
|
|
1420
1420
|
endIndex: b.length - 1,
|
|
1421
|
-
size:
|
|
1422
|
-
startIndex:
|
|
1421
|
+
size: k,
|
|
1422
|
+
startIndex: T
|
|
1423
1423
|
}), S;
|
|
1424
1424
|
})
|
|
1425
1425
|
),
|
|
@@ -1429,37 +1429,37 @@ const As = {
|
|
|
1429
1429
|
a,
|
|
1430
1430
|
he(h, d),
|
|
1431
1431
|
ae(([, b, S]) => b !== void 0 && S !== void 0),
|
|
1432
|
-
|
|
1433
|
-
const
|
|
1434
|
-
for (let
|
|
1435
|
-
const P = b[
|
|
1436
|
-
|
|
1432
|
+
Y(([b, S, k]) => {
|
|
1433
|
+
const T = [];
|
|
1434
|
+
for (let M = 0; M < b.length; M++) {
|
|
1435
|
+
const P = b[M], I = b[M + 1];
|
|
1436
|
+
T.push({
|
|
1437
1437
|
startIndex: P,
|
|
1438
1438
|
endIndex: P,
|
|
1439
1439
|
size: S
|
|
1440
|
-
}), I !== void 0 &&
|
|
1440
|
+
}), I !== void 0 && T.push({
|
|
1441
1441
|
startIndex: P + 1,
|
|
1442
1442
|
endIndex: I - 1,
|
|
1443
|
-
size:
|
|
1443
|
+
size: k
|
|
1444
1444
|
});
|
|
1445
1445
|
}
|
|
1446
|
-
return
|
|
1446
|
+
return T;
|
|
1447
1447
|
})
|
|
1448
1448
|
),
|
|
1449
1449
|
n
|
|
1450
1450
|
);
|
|
1451
|
-
const
|
|
1451
|
+
const C = tt(
|
|
1452
1452
|
H(
|
|
1453
1453
|
n,
|
|
1454
1454
|
he(p),
|
|
1455
1455
|
gt(
|
|
1456
|
-
({ sizes: b }, [S,
|
|
1457
|
-
changed:
|
|
1458
|
-
sizes:
|
|
1456
|
+
({ sizes: b }, [S, k]) => ({
|
|
1457
|
+
changed: k !== b,
|
|
1458
|
+
sizes: k
|
|
1459
1459
|
}),
|
|
1460
1460
|
{ changed: !1, sizes: c }
|
|
1461
1461
|
),
|
|
1462
|
-
|
|
1462
|
+
Y((b) => b.changed)
|
|
1463
1463
|
)
|
|
1464
1464
|
);
|
|
1465
1465
|
Ie(
|
|
@@ -1469,45 +1469,45 @@ const As = {
|
|
|
1469
1469
|
(b, S) => ({ diff: b.prev - S, prev: S }),
|
|
1470
1470
|
{ diff: 0, prev: 0 }
|
|
1471
1471
|
),
|
|
1472
|
-
|
|
1472
|
+
Y((b) => b.diff)
|
|
1473
1473
|
),
|
|
1474
1474
|
(b) => {
|
|
1475
1475
|
const { groupIndices: S } = Pe(p);
|
|
1476
1476
|
if (b > 0)
|
|
1477
|
-
|
|
1477
|
+
pe(t, !0), pe(i, b + Yr(b, S));
|
|
1478
1478
|
else if (b < 0) {
|
|
1479
|
-
const
|
|
1480
|
-
|
|
1479
|
+
const k = Pe(g);
|
|
1480
|
+
k.length > 0 && (b -= Yr(-b, k)), pe(s, b);
|
|
1481
1481
|
}
|
|
1482
1482
|
}
|
|
1483
1483
|
), Ie(H(u, he(e)), ([b, S]) => {
|
|
1484
1484
|
b < 0 && S(
|
|
1485
1485
|
"`firstItemIndex` prop should not be set to less than zero. If you don't know the total count, just use a very high value",
|
|
1486
1486
|
{ firstItemIndex: u },
|
|
1487
|
-
|
|
1487
|
+
Ye.ERROR
|
|
1488
1488
|
);
|
|
1489
1489
|
});
|
|
1490
|
-
const
|
|
1490
|
+
const R = tt(i);
|
|
1491
1491
|
oe(
|
|
1492
1492
|
H(
|
|
1493
1493
|
i,
|
|
1494
1494
|
he(p),
|
|
1495
|
-
|
|
1496
|
-
const
|
|
1497
|
-
if (
|
|
1498
|
-
const P =
|
|
1499
|
-
let I = 0,
|
|
1495
|
+
Y(([b, S]) => {
|
|
1496
|
+
const k = S.groupIndices.length > 0, T = [], M = S.lastSize;
|
|
1497
|
+
if (k) {
|
|
1498
|
+
const P = Qt(S.sizeTree, 0);
|
|
1499
|
+
let I = 0, _ = 0;
|
|
1500
1500
|
for (; I < b; ) {
|
|
1501
|
-
const N = S.groupIndices[
|
|
1502
|
-
|
|
1501
|
+
const N = S.groupIndices[_], A = S.groupIndices.length === _ + 1 ? 1 / 0 : S.groupIndices[_ + 1] - N - 1;
|
|
1502
|
+
T.push({
|
|
1503
1503
|
endIndex: N,
|
|
1504
1504
|
size: P,
|
|
1505
1505
|
startIndex: N
|
|
1506
|
-
}),
|
|
1506
|
+
}), T.push({
|
|
1507
1507
|
endIndex: N + 1 + A - 1,
|
|
1508
|
-
size:
|
|
1508
|
+
size: M,
|
|
1509
1509
|
startIndex: N + 1
|
|
1510
|
-
}),
|
|
1510
|
+
}), _++, I += A + 1;
|
|
1511
1511
|
}
|
|
1512
1512
|
const z = Mt(S.sizeTree);
|
|
1513
1513
|
return I !== b && z.shift(), z.reduce(
|
|
@@ -1529,19 +1529,19 @@ const As = {
|
|
|
1529
1529
|
{
|
|
1530
1530
|
prevIndex: b,
|
|
1531
1531
|
prevSize: 0,
|
|
1532
|
-
ranges:
|
|
1532
|
+
ranges: T
|
|
1533
1533
|
}
|
|
1534
1534
|
).ranges;
|
|
1535
1535
|
}
|
|
1536
1536
|
return Mt(S.sizeTree).reduce(
|
|
1537
|
-
(P, { k: I, v:
|
|
1537
|
+
(P, { k: I, v: _ }) => ({
|
|
1538
1538
|
prevIndex: I + b,
|
|
1539
|
-
prevSize:
|
|
1539
|
+
prevSize: _,
|
|
1540
1540
|
ranges: [...P.ranges, { endIndex: I + b - 1, size: P.prevSize, startIndex: P.prevIndex }]
|
|
1541
1541
|
}),
|
|
1542
1542
|
{
|
|
1543
1543
|
prevIndex: 0,
|
|
1544
|
-
prevSize:
|
|
1544
|
+
prevSize: M,
|
|
1545
1545
|
ranges: []
|
|
1546
1546
|
}
|
|
1547
1547
|
).ranges;
|
|
@@ -1549,13 +1549,13 @@ const As = {
|
|
|
1549
1549
|
),
|
|
1550
1550
|
n
|
|
1551
1551
|
);
|
|
1552
|
-
const
|
|
1552
|
+
const O = tt(
|
|
1553
1553
|
H(
|
|
1554
1554
|
s,
|
|
1555
1555
|
he(p, y),
|
|
1556
|
-
|
|
1557
|
-
const
|
|
1558
|
-
return Zt(
|
|
1556
|
+
Y(([b, { offsetTree: S }, k]) => {
|
|
1557
|
+
const T = -b;
|
|
1558
|
+
return Zt(T, S, k);
|
|
1559
1559
|
})
|
|
1560
1560
|
)
|
|
1561
1561
|
);
|
|
@@ -1563,42 +1563,42 @@ const As = {
|
|
|
1563
1563
|
H(
|
|
1564
1564
|
s,
|
|
1565
1565
|
he(p, y),
|
|
1566
|
-
|
|
1566
|
+
Y(([b, S, k]) => {
|
|
1567
1567
|
if (S.groupIndices.length > 0) {
|
|
1568
1568
|
if (Te(S.sizeTree))
|
|
1569
1569
|
return S;
|
|
1570
|
-
let
|
|
1571
|
-
const
|
|
1572
|
-
let P = 0, I = 0,
|
|
1570
|
+
let T = Lt();
|
|
1571
|
+
const M = Pe(g);
|
|
1572
|
+
let P = 0, I = 0, _ = 0;
|
|
1573
1573
|
for (; P < -b; ) {
|
|
1574
|
-
|
|
1575
|
-
const z =
|
|
1574
|
+
_ = M[I];
|
|
1575
|
+
const z = M[I + 1] - _ - 1;
|
|
1576
1576
|
I++, P += z + 1;
|
|
1577
1577
|
}
|
|
1578
|
-
if (
|
|
1579
|
-
const z =
|
|
1580
|
-
|
|
1578
|
+
if (T = Mt(S.sizeTree).reduce((z, { k: N, v: A }) => et(z, Math.max(0, N + b), A), T), P !== -b) {
|
|
1579
|
+
const z = Qt(S.sizeTree, _);
|
|
1580
|
+
T = et(T, 0, z);
|
|
1581
1581
|
const N = ct(S.sizeTree, -b + 1)[1];
|
|
1582
|
-
|
|
1582
|
+
T = et(T, 1, N);
|
|
1583
1583
|
}
|
|
1584
1584
|
return {
|
|
1585
1585
|
...S,
|
|
1586
|
-
sizeTree:
|
|
1587
|
-
...mr(S.offsetTree, 0,
|
|
1586
|
+
sizeTree: T,
|
|
1587
|
+
...mr(S.offsetTree, 0, T, k)
|
|
1588
1588
|
};
|
|
1589
1589
|
} else {
|
|
1590
|
-
const
|
|
1590
|
+
const T = Mt(S.sizeTree).reduce((M, { k: P, v: I }) => et(M, Math.max(0, P + b), I), Lt());
|
|
1591
1591
|
return {
|
|
1592
1592
|
...S,
|
|
1593
|
-
sizeTree:
|
|
1594
|
-
...mr(S.offsetTree, 0,
|
|
1593
|
+
sizeTree: T,
|
|
1594
|
+
...mr(S.offsetTree, 0, T, k)
|
|
1595
1595
|
};
|
|
1596
1596
|
}
|
|
1597
1597
|
})
|
|
1598
1598
|
),
|
|
1599
1599
|
p
|
|
1600
1600
|
), {
|
|
1601
|
-
beforeUnshiftWith:
|
|
1601
|
+
beforeUnshiftWith: R,
|
|
1602
1602
|
// input
|
|
1603
1603
|
data: v,
|
|
1604
1604
|
defaultItemSize: d,
|
|
@@ -1609,9 +1609,9 @@ const As = {
|
|
|
1609
1609
|
groupIndices: a,
|
|
1610
1610
|
heightEstimates: f,
|
|
1611
1611
|
itemSize: m,
|
|
1612
|
-
listRefresh:
|
|
1612
|
+
listRefresh: C,
|
|
1613
1613
|
shiftWith: s,
|
|
1614
|
-
shiftWithOffset:
|
|
1614
|
+
shiftWithOffset: O,
|
|
1615
1615
|
sizeRanges: n,
|
|
1616
1616
|
// output
|
|
1617
1617
|
sizes: p,
|
|
@@ -1635,26 +1635,26 @@ function Bs(e) {
|
|
|
1635
1635
|
}
|
|
1636
1636
|
const ui = ye(
|
|
1637
1637
|
([{ groupIndices: e, sizes: t, totalCount: n }, { headerHeight: r, scrollTop: o }]) => {
|
|
1638
|
-
const i = ve(), s = ve(), u = tt(H(i,
|
|
1638
|
+
const i = ve(), s = ve(), u = tt(H(i, Y(Bs)));
|
|
1639
1639
|
return oe(
|
|
1640
1640
|
H(
|
|
1641
1641
|
u,
|
|
1642
|
-
|
|
1642
|
+
Y((a) => a.totalCount)
|
|
1643
1643
|
),
|
|
1644
1644
|
n
|
|
1645
1645
|
), oe(
|
|
1646
1646
|
H(
|
|
1647
1647
|
u,
|
|
1648
|
-
|
|
1648
|
+
Y((a) => a.groupIndices)
|
|
1649
1649
|
),
|
|
1650
1650
|
e
|
|
1651
1651
|
), oe(
|
|
1652
1652
|
H(
|
|
1653
1653
|
Ne(o, t, r),
|
|
1654
1654
|
ae(([a, l]) => En(l)),
|
|
1655
|
-
|
|
1655
|
+
Y(([a, l, d]) => ct(l.groupOffsetTree, Math.max(a - d, 0), "v")[0]),
|
|
1656
1656
|
Me(),
|
|
1657
|
-
|
|
1657
|
+
Y((a) => [a])
|
|
1658
1658
|
),
|
|
1659
1659
|
s
|
|
1660
1660
|
), { groupCounts: i, topItemsIndexes: s };
|
|
@@ -1670,7 +1670,7 @@ const ui = ye(
|
|
|
1670
1670
|
)
|
|
1671
1671
|
);
|
|
1672
1672
|
return Ie(t, (r) => {
|
|
1673
|
-
r && Pe(e)("props updated", {},
|
|
1673
|
+
r && Pe(e)("props updated", {}, Ye.DEBUG);
|
|
1674
1674
|
}), { didMount: n, propsReady: t };
|
|
1675
1675
|
},
|
|
1676
1676
|
Ee(Tt),
|
|
@@ -1698,25 +1698,25 @@ const on = ye(
|
|
|
1698
1698
|
const m = ve(), v = ve(), y = W(0);
|
|
1699
1699
|
let c = null, p = null, g = null;
|
|
1700
1700
|
function w() {
|
|
1701
|
-
c && (c(), c = null), g && (g(), g = null), p && (clearTimeout(p), p = null),
|
|
1701
|
+
c && (c(), c = null), g && (g(), g = null), p && (clearTimeout(p), p = null), pe(a, !1);
|
|
1702
1702
|
}
|
|
1703
1703
|
return oe(
|
|
1704
1704
|
H(
|
|
1705
1705
|
m,
|
|
1706
1706
|
he(n, h, r, y, u, s, f),
|
|
1707
1707
|
he(e, i, o),
|
|
1708
|
-
|
|
1708
|
+
Y(
|
|
1709
1709
|
([
|
|
1710
|
-
[
|
|
1710
|
+
[C, R, O, b, S, k, T, M],
|
|
1711
1711
|
P,
|
|
1712
1712
|
I,
|
|
1713
|
-
|
|
1713
|
+
_
|
|
1714
1714
|
]) => {
|
|
1715
|
-
const z = di(
|
|
1716
|
-
let Se = Zt(be,
|
|
1717
|
-
N === "end" ? (Se += I + ct(
|
|
1715
|
+
const z = di(C), { align: N, behavior: A, offset: V } = z, re = b - 1, be = ci(z, R, re);
|
|
1716
|
+
let Se = Zt(be, R.offsetTree, P) + k;
|
|
1717
|
+
N === "end" ? (Se += I + ct(R.sizeTree, be)[1] - O + _, be === re && (Se += T)) : N === "center" ? Se += (I + ct(R.sizeTree, be)[1] - O + _) / 2 : Se -= S, V && (Se += V);
|
|
1718
1718
|
const Ce = (xe) => {
|
|
1719
|
-
w(), xe ? (
|
|
1719
|
+
w(), xe ? (M("retrying to scroll to", { location: C }, Ye.DEBUG), pe(m, C)) : (pe(v, !0), M("list did not change, scroll successful", {}, Ye.DEBUG));
|
|
1720
1720
|
};
|
|
1721
1721
|
if (w(), A === "smooth") {
|
|
1722
1722
|
let xe = !1;
|
|
@@ -1729,7 +1729,7 @@ const on = ye(
|
|
|
1729
1729
|
c = at(H(t, Ls(150)), Ce);
|
|
1730
1730
|
return p = setTimeout(() => {
|
|
1731
1731
|
w();
|
|
1732
|
-
}, 1200),
|
|
1732
|
+
}, 1200), pe(a, !0), M("scrolling from index to", { behavior: A, index: be, top: Se }, Ye.DEBUG), { behavior: A, top: Se };
|
|
1733
1733
|
}
|
|
1734
1734
|
)
|
|
1735
1735
|
),
|
|
@@ -1790,11 +1790,11 @@ const sn = ye(
|
|
|
1790
1790
|
),
|
|
1791
1791
|
([, d]) => {
|
|
1792
1792
|
at(o, () => {
|
|
1793
|
-
|
|
1793
|
+
pe(l, !0);
|
|
1794
1794
|
}), Rr(4, () => {
|
|
1795
1795
|
at(r, () => {
|
|
1796
|
-
|
|
1797
|
-
}),
|
|
1796
|
+
pe(u, !0);
|
|
1797
|
+
}), pe(i, d);
|
|
1798
1798
|
});
|
|
1799
1799
|
}
|
|
1800
1800
|
), {
|
|
@@ -1832,7 +1832,7 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1832
1832
|
oe(
|
|
1833
1833
|
H(
|
|
1834
1834
|
Ne(le(o), le(h)),
|
|
1835
|
-
|
|
1835
|
+
Y(([g, w]) => g <= w),
|
|
1836
1836
|
Me()
|
|
1837
1837
|
),
|
|
1838
1838
|
u
|
|
@@ -1840,26 +1840,26 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1840
1840
|
const v = tt(
|
|
1841
1841
|
H(
|
|
1842
1842
|
Ne(r, le(i), le(t), le(e), le(d)),
|
|
1843
|
-
gt((g, [{ scrollHeight: w, scrollTop:
|
|
1844
|
-
const
|
|
1843
|
+
gt((g, [{ scrollHeight: w, scrollTop: C }, R, O, b, S]) => {
|
|
1844
|
+
const k = C + R - w > -S, T = {
|
|
1845
1845
|
scrollHeight: w,
|
|
1846
|
-
scrollTop:
|
|
1847
|
-
viewportHeight:
|
|
1846
|
+
scrollTop: C,
|
|
1847
|
+
viewportHeight: R
|
|
1848
1848
|
};
|
|
1849
|
-
if (
|
|
1849
|
+
if (k) {
|
|
1850
1850
|
let P, I;
|
|
1851
|
-
return
|
|
1851
|
+
return C > g.state.scrollTop ? (P = "SCROLLED_DOWN", I = g.state.scrollTop - C) : (P = "SIZE_DECREASED", I = g.state.scrollTop - C || g.scrollTopDelta), {
|
|
1852
1852
|
atBottom: !0,
|
|
1853
1853
|
atBottomBecause: P,
|
|
1854
1854
|
scrollTopDelta: I,
|
|
1855
|
-
state:
|
|
1855
|
+
state: T
|
|
1856
1856
|
};
|
|
1857
1857
|
}
|
|
1858
|
-
let
|
|
1859
|
-
return
|
|
1858
|
+
let M;
|
|
1859
|
+
return T.scrollHeight > g.state.scrollHeight ? M = "SIZE_INCREASED" : R < g.state.viewportHeight ? M = "VIEWPORT_HEIGHT_DECREASING" : C < g.state.scrollTop ? M = "SCROLLING_UPWARDS" : M = "NOT_FULLY_SCROLLED_TO_LAST_ITEM_BOTTOM", {
|
|
1860
1860
|
atBottom: !1,
|
|
1861
|
-
notAtBottomBecause:
|
|
1862
|
-
state:
|
|
1861
|
+
notAtBottomBecause: M,
|
|
1862
|
+
state: T
|
|
1863
1863
|
};
|
|
1864
1864
|
}, Ns),
|
|
1865
1865
|
Me((g, w) => g && g.atBottom === w.atBottom)
|
|
@@ -1868,40 +1868,40 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1868
1868
|
H(
|
|
1869
1869
|
r,
|
|
1870
1870
|
gt(
|
|
1871
|
-
(g, { scrollHeight: w, scrollTop:
|
|
1871
|
+
(g, { scrollHeight: w, scrollTop: C, viewportHeight: R }) => {
|
|
1872
1872
|
if (fi(g.scrollHeight, w))
|
|
1873
1873
|
return {
|
|
1874
1874
|
changed: !1,
|
|
1875
1875
|
jump: 0,
|
|
1876
1876
|
scrollHeight: w,
|
|
1877
|
-
scrollTop:
|
|
1877
|
+
scrollTop: C
|
|
1878
1878
|
};
|
|
1879
1879
|
{
|
|
1880
|
-
const
|
|
1881
|
-
return g.scrollTop !==
|
|
1880
|
+
const O = w - (C + R) < 1;
|
|
1881
|
+
return g.scrollTop !== C && O ? {
|
|
1882
1882
|
changed: !0,
|
|
1883
|
-
jump: g.scrollTop -
|
|
1883
|
+
jump: g.scrollTop - C,
|
|
1884
1884
|
scrollHeight: w,
|
|
1885
|
-
scrollTop:
|
|
1885
|
+
scrollTop: C
|
|
1886
1886
|
} : {
|
|
1887
1887
|
changed: !0,
|
|
1888
1888
|
jump: 0,
|
|
1889
1889
|
scrollHeight: w,
|
|
1890
|
-
scrollTop:
|
|
1890
|
+
scrollTop: C
|
|
1891
1891
|
};
|
|
1892
1892
|
}
|
|
1893
1893
|
},
|
|
1894
1894
|
{ changed: !1, jump: 0, scrollHeight: 0, scrollTop: 0 }
|
|
1895
1895
|
),
|
|
1896
1896
|
ae((g) => g.changed),
|
|
1897
|
-
|
|
1897
|
+
Y((g) => g.jump)
|
|
1898
1898
|
),
|
|
1899
1899
|
0
|
|
1900
1900
|
);
|
|
1901
1901
|
oe(
|
|
1902
1902
|
H(
|
|
1903
1903
|
v,
|
|
1904
|
-
|
|
1904
|
+
Y((g) => g.atBottom)
|
|
1905
1905
|
),
|
|
1906
1906
|
s
|
|
1907
1907
|
), oe(H(s, mt(50)), a);
|
|
@@ -1909,13 +1909,13 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1909
1909
|
oe(
|
|
1910
1910
|
H(
|
|
1911
1911
|
r,
|
|
1912
|
-
|
|
1912
|
+
Y(({ scrollTop: g }) => g),
|
|
1913
1913
|
Me(),
|
|
1914
1914
|
gt(
|
|
1915
1915
|
(g, w) => Pe(m) ? { direction: g.direction, prevScrollTop: w } : { direction: w < g.prevScrollTop ? Jt : Ut, prevScrollTop: w },
|
|
1916
1916
|
{ direction: Ut, prevScrollTop: 0 }
|
|
1917
1917
|
),
|
|
1918
|
-
|
|
1918
|
+
Y((g) => g.direction)
|
|
1919
1919
|
),
|
|
1920
1920
|
c
|
|
1921
1921
|
), oe(H(r, mt(50), ft(Hs)), c);
|
|
@@ -1933,8 +1933,8 @@ const Jt = "up", Ut = "down", Hs = "none", Ns = {
|
|
|
1933
1933
|
mt(100),
|
|
1934
1934
|
he(f),
|
|
1935
1935
|
ae(([g, w]) => w),
|
|
1936
|
-
gt(([g, w], [
|
|
1937
|
-
|
|
1936
|
+
gt(([g, w], [C]) => [w, C], [0, 0]),
|
|
1937
|
+
Y(([g, w]) => w - g)
|
|
1938
1938
|
),
|
|
1939
1939
|
p
|
|
1940
1940
|
), {
|
|
@@ -1966,14 +1966,14 @@ const Mr = ye(
|
|
|
1966
1966
|
le(r),
|
|
1967
1967
|
le(o),
|
|
1968
1968
|
le(n),
|
|
1969
|
-
le(i,
|
|
1969
|
+
le(i, Yt),
|
|
1970
1970
|
le(a),
|
|
1971
1971
|
le(s),
|
|
1972
1972
|
le(t),
|
|
1973
1973
|
le(e),
|
|
1974
1974
|
le(u)
|
|
1975
1975
|
),
|
|
1976
|
-
|
|
1976
|
+
Y(
|
|
1977
1977
|
([
|
|
1978
1978
|
d,
|
|
1979
1979
|
h,
|
|
@@ -1985,17 +1985,17 @@ const Mr = ye(
|
|
|
1985
1985
|
g,
|
|
1986
1986
|
w
|
|
1987
1987
|
]) => {
|
|
1988
|
-
const
|
|
1988
|
+
const C = d - g, R = c + p, O = Math.max(f - C, 0);
|
|
1989
1989
|
let b = Zr;
|
|
1990
|
-
const S = eo(w, en),
|
|
1991
|
-
return m -= g, m += f + p, v += f + p, v -= g, m > d +
|
|
1992
|
-
Math.max(
|
|
1993
|
-
|
|
1990
|
+
const S = eo(w, en), k = eo(w, tn);
|
|
1991
|
+
return m -= g, m += f + p, v += f + p, v -= g, m > d + R - S && (b = Jt), v < d - O + h + k && (b = Ut), b !== Zr ? [
|
|
1992
|
+
Math.max(C - f - Jr(y, en, b) - S, 0),
|
|
1993
|
+
C - O - p + h + Jr(y, tn, b) + k
|
|
1994
1994
|
] : null;
|
|
1995
1995
|
}
|
|
1996
1996
|
),
|
|
1997
1997
|
ae((d) => d != null),
|
|
1998
|
-
Me(
|
|
1998
|
+
Me(Yt)
|
|
1999
1999
|
),
|
|
2000
2000
|
[0, 0]
|
|
2001
2001
|
);
|
|
@@ -2118,7 +2118,7 @@ const Pt = ye(
|
|
|
2118
2118
|
Ne(
|
|
2119
2119
|
m,
|
|
2120
2120
|
v,
|
|
2121
|
-
le(a,
|
|
2121
|
+
le(a, Yt),
|
|
2122
2122
|
le(o),
|
|
2123
2123
|
le(r),
|
|
2124
2124
|
le(l),
|
|
@@ -2129,73 +2129,73 @@ const Pt = ye(
|
|
|
2129
2129
|
le(g),
|
|
2130
2130
|
e
|
|
2131
2131
|
),
|
|
2132
|
-
ae(([b, S, ,
|
|
2133
|
-
const
|
|
2134
|
-
return b && !S && !
|
|
2132
|
+
ae(([b, S, , k, , , , , , , , T]) => {
|
|
2133
|
+
const M = T && T.length !== k;
|
|
2134
|
+
return b && !S && !M;
|
|
2135
2135
|
}),
|
|
2136
|
-
|
|
2136
|
+
Y(
|
|
2137
2137
|
([
|
|
2138
2138
|
,
|
|
2139
2139
|
,
|
|
2140
2140
|
[b, S],
|
|
2141
|
-
|
|
2142
|
-
|
|
2143
|
-
|
|
2141
|
+
k,
|
|
2142
|
+
T,
|
|
2143
|
+
M,
|
|
2144
2144
|
P,
|
|
2145
2145
|
I,
|
|
2146
|
-
|
|
2146
|
+
_,
|
|
2147
2147
|
z,
|
|
2148
2148
|
N,
|
|
2149
2149
|
A
|
|
2150
2150
|
]) => {
|
|
2151
2151
|
var V, re, be, Se;
|
|
2152
|
-
const Ce =
|
|
2153
|
-
if (
|
|
2154
|
-
return { ...Dn, totalCount:
|
|
2152
|
+
const Ce = T, { offsetTree: xe, sizeTree: Fe } = Ce, K = Pe(c);
|
|
2153
|
+
if (k === 0)
|
|
2154
|
+
return { ...Dn, totalCount: k };
|
|
2155
2155
|
if (b === 0 && S === 0)
|
|
2156
|
-
return K === 0 ? { ...Dn, totalCount:
|
|
2156
|
+
return K === 0 ? { ...Dn, totalCount: k } : pi(K, M, T, _, z, A || []);
|
|
2157
2157
|
if (Te(Fe))
|
|
2158
2158
|
return K > 0 ? null : bn(
|
|
2159
|
-
Ws(_r(
|
|
2159
|
+
Ws(_r(M, k), Ce, A),
|
|
2160
2160
|
[],
|
|
2161
|
-
|
|
2161
|
+
k,
|
|
2162
2162
|
z,
|
|
2163
2163
|
Ce,
|
|
2164
|
-
|
|
2164
|
+
_
|
|
2165
2165
|
);
|
|
2166
2166
|
const $ = [];
|
|
2167
2167
|
if (I.length > 0) {
|
|
2168
|
-
const F = I[0],
|
|
2168
|
+
const F = I[0], Q = I[I.length - 1];
|
|
2169
2169
|
let te = 0;
|
|
2170
|
-
for (const J of Ht(Fe, F,
|
|
2171
|
-
const ce = J.value, se = Math.max(J.start, F), we = Math.min(J.end,
|
|
2170
|
+
for (const J of Ht(Fe, F, Q)) {
|
|
2171
|
+
const ce = J.value, se = Math.max(J.start, F), we = Math.min(J.end, Q);
|
|
2172
2172
|
for (let ge = se; ge <= we; ge++)
|
|
2173
2173
|
$.push({ data: A == null ? void 0 : A[ge], index: ge, offset: te, size: ce }), te += ce;
|
|
2174
2174
|
}
|
|
2175
2175
|
}
|
|
2176
2176
|
if (!P)
|
|
2177
|
-
return bn([], $,
|
|
2177
|
+
return bn([], $, k, z, Ce, _);
|
|
2178
2178
|
const G = I.length > 0 ? I[I.length - 1] + 1 : 0, E = Ms(xe, b, S, G);
|
|
2179
2179
|
if (E.length === 0)
|
|
2180
2180
|
return null;
|
|
2181
|
-
const L =
|
|
2182
|
-
for (const
|
|
2183
|
-
const te =
|
|
2184
|
-
let J = te.offset, ce =
|
|
2181
|
+
const L = k - 1, q = Mn([], (F) => {
|
|
2182
|
+
for (const Q of E) {
|
|
2183
|
+
const te = Q.value;
|
|
2184
|
+
let J = te.offset, ce = Q.start;
|
|
2185
2185
|
const se = te.size;
|
|
2186
2186
|
if (te.offset < b) {
|
|
2187
2187
|
ce += Math.floor((b - te.offset + z) / (se + z));
|
|
2188
|
-
const ge = ce -
|
|
2188
|
+
const ge = ce - Q.start;
|
|
2189
2189
|
J += ge * se + ge * z;
|
|
2190
2190
|
}
|
|
2191
2191
|
ce < G && (J += (G - ce) * se, ce = G);
|
|
2192
|
-
const we = Math.min(
|
|
2192
|
+
const we = Math.min(Q.end, L);
|
|
2193
2193
|
for (let ge = ce; ge <= we && !(J >= S); ge++)
|
|
2194
2194
|
F.push({ data: A == null ? void 0 : A[ge], index: ge, offset: J, size: se }), J += se + z;
|
|
2195
2195
|
}
|
|
2196
2196
|
}), B = no(N, en), Z = no(N, tn);
|
|
2197
2197
|
if (q.length > 0 && (B > 0 || Z > 0)) {
|
|
2198
|
-
const F = q[0],
|
|
2198
|
+
const F = q[0], Q = q[q.length - 1];
|
|
2199
2199
|
if (B > 0 && F.index > G) {
|
|
2200
2200
|
const te = Math.min(B, F.index - G), J = [];
|
|
2201
2201
|
let ce = F.offset;
|
|
@@ -2205,16 +2205,16 @@ const Pt = ye(
|
|
|
2205
2205
|
}
|
|
2206
2206
|
q.unshift(...J);
|
|
2207
2207
|
}
|
|
2208
|
-
if (Z > 0 &&
|
|
2209
|
-
const te = Math.min(Z, L -
|
|
2210
|
-
let J =
|
|
2211
|
-
for (let ce =
|
|
2212
|
-
const se = (Se = (be = Ht(Fe, ce, ce)[0]) == null ? void 0 : be.value) != null ? Se :
|
|
2208
|
+
if (Z > 0 && Q.index < L) {
|
|
2209
|
+
const te = Math.min(Z, L - Q.index);
|
|
2210
|
+
let J = Q.offset + Q.size + z;
|
|
2211
|
+
for (let ce = Q.index + 1; ce <= Q.index + te; ce++) {
|
|
2212
|
+
const se = (Se = (be = Ht(Fe, ce, ce)[0]) == null ? void 0 : be.value) != null ? Se : Q.size;
|
|
2213
2213
|
q.push({ data: A == null ? void 0 : A[ce], index: ce, offset: J, size: se }), J += se + z;
|
|
2214
2214
|
}
|
|
2215
2215
|
}
|
|
2216
2216
|
}
|
|
2217
|
-
return bn(q, $,
|
|
2217
|
+
return bn(q, $, k, z, Ce, _);
|
|
2218
2218
|
}
|
|
2219
2219
|
),
|
|
2220
2220
|
//@ts-expect-error filter needs to be fixed
|
|
@@ -2227,58 +2227,58 @@ const Pt = ye(
|
|
|
2227
2227
|
H(
|
|
2228
2228
|
e,
|
|
2229
2229
|
ae(wr),
|
|
2230
|
-
|
|
2230
|
+
Y((b) => b == null ? void 0 : b.length)
|
|
2231
2231
|
),
|
|
2232
2232
|
o
|
|
2233
2233
|
), oe(
|
|
2234
2234
|
H(
|
|
2235
2235
|
w,
|
|
2236
|
-
|
|
2236
|
+
Y((b) => b.topListHeight)
|
|
2237
2237
|
),
|
|
2238
2238
|
h
|
|
2239
2239
|
), oe(h, u), oe(
|
|
2240
2240
|
H(
|
|
2241
2241
|
w,
|
|
2242
|
-
|
|
2242
|
+
Y((b) => [b.top, b.bottom])
|
|
2243
2243
|
),
|
|
2244
2244
|
s
|
|
2245
2245
|
), oe(
|
|
2246
2246
|
H(
|
|
2247
2247
|
w,
|
|
2248
|
-
|
|
2248
|
+
Y((b) => b.items)
|
|
2249
2249
|
),
|
|
2250
2250
|
p
|
|
2251
2251
|
);
|
|
2252
|
-
const
|
|
2252
|
+
const C = tt(
|
|
2253
2253
|
H(
|
|
2254
2254
|
w,
|
|
2255
2255
|
ae(({ items: b }) => b.length > 0),
|
|
2256
2256
|
he(o, e),
|
|
2257
2257
|
ae(([{ items: b }, S]) => b[b.length - 1].originalIndex === S - 1),
|
|
2258
|
-
|
|
2259
|
-
Me(
|
|
2260
|
-
|
|
2258
|
+
Y(([, b, S]) => [b - 1, S]),
|
|
2259
|
+
Me(Yt),
|
|
2260
|
+
Y(([b]) => b)
|
|
2261
2261
|
)
|
|
2262
|
-
),
|
|
2262
|
+
), R = tt(
|
|
2263
2263
|
H(
|
|
2264
2264
|
w,
|
|
2265
2265
|
mt(200),
|
|
2266
2266
|
ae(({ items: b, topItems: S }) => b.length > 0 && b[0].originalIndex === S.length),
|
|
2267
|
-
|
|
2267
|
+
Y(({ items: b }) => b[0].index),
|
|
2268
2268
|
Me()
|
|
2269
2269
|
)
|
|
2270
|
-
),
|
|
2270
|
+
), O = tt(
|
|
2271
2271
|
H(
|
|
2272
2272
|
w,
|
|
2273
2273
|
ae(({ items: b }) => b.length > 0),
|
|
2274
|
-
|
|
2275
|
-
let S = 0,
|
|
2276
|
-
for (; b[S].type === "group" && S <
|
|
2274
|
+
Y(({ items: b }) => {
|
|
2275
|
+
let S = 0, k = b.length - 1;
|
|
2276
|
+
for (; b[S].type === "group" && S < k; )
|
|
2277
2277
|
S++;
|
|
2278
|
-
for (; b[
|
|
2279
|
-
|
|
2278
|
+
for (; b[k].type === "group" && k > S; )
|
|
2279
|
+
k--;
|
|
2280
2280
|
return {
|
|
2281
|
-
endIndex: b[
|
|
2281
|
+
endIndex: b[k].index,
|
|
2282
2282
|
startIndex: b[S].index
|
|
2283
2283
|
};
|
|
2284
2284
|
}),
|
|
@@ -2286,13 +2286,13 @@ const Pt = ye(
|
|
|
2286
2286
|
)
|
|
2287
2287
|
);
|
|
2288
2288
|
return {
|
|
2289
|
-
endReached:
|
|
2289
|
+
endReached: C,
|
|
2290
2290
|
initialItemCount: c,
|
|
2291
2291
|
itemsRendered: p,
|
|
2292
2292
|
listState: w,
|
|
2293
2293
|
minOverscanItemCount: g,
|
|
2294
|
-
rangeChanged:
|
|
2295
|
-
startReached:
|
|
2294
|
+
rangeChanged: O,
|
|
2295
|
+
startReached: R,
|
|
2296
2296
|
topItemsIndexes: y,
|
|
2297
2297
|
...f
|
|
2298
2298
|
};
|
|
@@ -2313,7 +2313,7 @@ const Pt = ye(
|
|
|
2313
2313
|
const i = ve(), s = je(
|
|
2314
2314
|
H(
|
|
2315
2315
|
Ne(n, e, r, t, o),
|
|
2316
|
-
|
|
2316
|
+
Y(([u, a, l, d, h]) => u + a + l + d + h.offsetBottom + h.bottom)
|
|
2317
2317
|
),
|
|
2318
2318
|
0
|
|
2319
2319
|
);
|
|
@@ -2327,7 +2327,7 @@ const Pt = ye(
|
|
|
2327
2327
|
H(
|
|
2328
2328
|
Ne(n, e, t),
|
|
2329
2329
|
ae(([o]) => o),
|
|
2330
|
-
|
|
2330
|
+
Y(([, o, i]) => Math.max(0, o - i)),
|
|
2331
2331
|
mt(0),
|
|
2332
2332
|
Me()
|
|
2333
2333
|
),
|
|
@@ -2357,15 +2357,15 @@ const Pt = ye(
|
|
|
2357
2357
|
d,
|
|
2358
2358
|
he(t, a, n, i, o, r, u),
|
|
2359
2359
|
he(e),
|
|
2360
|
-
|
|
2361
|
-
const { align:
|
|
2362
|
-
itemBottom:
|
|
2363
|
-
itemTop:
|
|
2364
|
-
locationParams: { align:
|
|
2360
|
+
Y(([[h, f, m, v, y, c, p, g], w]) => {
|
|
2361
|
+
const { align: C, behavior: R, calculateViewLocation: O = $s, done: b, ...S } = h, k = ci(h, f, v - 1), T = Zt(k, f.offsetTree, w) + y + c, M = T + ct(f.sizeTree, k)[1], P = g + c, I = g + m - p, _ = O({
|
|
2362
|
+
itemBottom: M,
|
|
2363
|
+
itemTop: T,
|
|
2364
|
+
locationParams: { align: C, behavior: R, ...S },
|
|
2365
2365
|
viewportBottom: I,
|
|
2366
2366
|
viewportTop: P
|
|
2367
2367
|
});
|
|
2368
|
-
return
|
|
2368
|
+
return _ ? b && at(
|
|
2369
2369
|
H(
|
|
2370
2370
|
s,
|
|
2371
2371
|
ae((z) => !z),
|
|
@@ -2374,7 +2374,7 @@ const Pt = ye(
|
|
|
2374
2374
|
Et(Pe(s) ? 1 : 2)
|
|
2375
2375
|
),
|
|
2376
2376
|
b
|
|
2377
|
-
) : b == null || b(),
|
|
2377
|
+
) : b == null || b(), _;
|
|
2378
2378
|
}),
|
|
2379
2379
|
ae((h) => h !== null)
|
|
2380
2380
|
),
|
|
@@ -2403,10 +2403,10 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2403
2403
|
]) => {
|
|
2404
2404
|
const v = W(!1), y = ve();
|
|
2405
2405
|
let c = null;
|
|
2406
|
-
function p(
|
|
2407
|
-
|
|
2406
|
+
function p(R) {
|
|
2407
|
+
pe(s, {
|
|
2408
2408
|
align: "end",
|
|
2409
|
-
behavior:
|
|
2409
|
+
behavior: R,
|
|
2410
2410
|
index: "LAST"
|
|
2411
2411
|
});
|
|
2412
2412
|
}
|
|
@@ -2414,71 +2414,71 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2414
2414
|
H(
|
|
2415
2415
|
Ne(H(le(t), Et(1)), a),
|
|
2416
2416
|
he(le(v), i, u, h),
|
|
2417
|
-
|
|
2418
|
-
let
|
|
2419
|
-
return
|
|
2417
|
+
Y(([[R, O], b, S, k, T]) => {
|
|
2418
|
+
let M = O && k, P = "auto";
|
|
2419
|
+
return M && (P = Vs(b, S || T), M = M && !!P), { followOutputBehavior: P, shouldFollow: M, totalCount: R };
|
|
2420
2420
|
}),
|
|
2421
|
-
ae(({ shouldFollow:
|
|
2421
|
+
ae(({ shouldFollow: R }) => R)
|
|
2422
2422
|
),
|
|
2423
|
-
({ followOutputBehavior:
|
|
2423
|
+
({ followOutputBehavior: R, totalCount: O }) => {
|
|
2424
2424
|
c && (c(), c = null), Pe(n) ? requestAnimationFrame(() => {
|
|
2425
|
-
Pe(d)("following output to ", { totalCount:
|
|
2425
|
+
Pe(d)("following output to ", { totalCount: O }, Ye.DEBUG), p(R);
|
|
2426
2426
|
}) : c = at(e, () => {
|
|
2427
|
-
Pe(d)("following output to ", { totalCount:
|
|
2427
|
+
Pe(d)("following output to ", { totalCount: O }, Ye.DEBUG), p(R), c = null;
|
|
2428
2428
|
});
|
|
2429
2429
|
}
|
|
2430
2430
|
);
|
|
2431
|
-
function g(
|
|
2432
|
-
const
|
|
2433
|
-
|
|
2431
|
+
function g(R) {
|
|
2432
|
+
const O = at(o, (b) => {
|
|
2433
|
+
R && !b.atBottom && b.notAtBottomBecause === "SIZE_INCREASED" && !c && (Pe(d)("scrolling to bottom due to increased size", {}, Ye.DEBUG), p("auto"));
|
|
2434
2434
|
});
|
|
2435
|
-
setTimeout(
|
|
2435
|
+
setTimeout(O, 100);
|
|
2436
2436
|
}
|
|
2437
2437
|
Ie(
|
|
2438
2438
|
H(
|
|
2439
2439
|
Ne(le(v), t, l),
|
|
2440
|
-
ae(([
|
|
2440
|
+
ae(([R, , O]) => R && O),
|
|
2441
2441
|
gt(
|
|
2442
|
-
({ value:
|
|
2442
|
+
({ value: R }, [, O]) => ({ refreshed: R === O, value: O }),
|
|
2443
2443
|
{ refreshed: !1, value: 0 }
|
|
2444
2444
|
),
|
|
2445
|
-
ae(({ refreshed:
|
|
2445
|
+
ae(({ refreshed: R }) => R),
|
|
2446
2446
|
he(v, t)
|
|
2447
2447
|
),
|
|
2448
|
-
([,
|
|
2449
|
-
Pe(u) && g(
|
|
2448
|
+
([, R]) => {
|
|
2449
|
+
Pe(u) && g(R !== !1);
|
|
2450
2450
|
}
|
|
2451
2451
|
), Ie(y, () => {
|
|
2452
2452
|
g(Pe(v) !== !1);
|
|
2453
|
-
}), Ie(Ne(le(v), o), ([
|
|
2454
|
-
|
|
2453
|
+
}), Ie(Ne(le(v), o), ([R, O]) => {
|
|
2454
|
+
R && !O.atBottom && O.notAtBottomBecause === "VIEWPORT_HEIGHT_DECREASING" && p("auto");
|
|
2455
2455
|
});
|
|
2456
|
-
const w = W(null),
|
|
2456
|
+
const w = W(null), C = ve();
|
|
2457
2457
|
return oe(
|
|
2458
2458
|
fr(
|
|
2459
2459
|
H(
|
|
2460
2460
|
le(r),
|
|
2461
|
-
|
|
2462
|
-
var
|
|
2463
|
-
return (
|
|
2461
|
+
Y((R) => {
|
|
2462
|
+
var O;
|
|
2463
|
+
return (O = R == null ? void 0 : R.length) != null ? O : 0;
|
|
2464
2464
|
})
|
|
2465
2465
|
),
|
|
2466
2466
|
H(le(t))
|
|
2467
2467
|
),
|
|
2468
|
-
|
|
2468
|
+
C
|
|
2469
2469
|
), Ie(
|
|
2470
2470
|
H(
|
|
2471
|
-
Ne(H(
|
|
2471
|
+
Ne(H(C, Et(1)), a),
|
|
2472
2472
|
he(le(w), u, h, f),
|
|
2473
|
-
|
|
2474
|
-
ae((
|
|
2473
|
+
Y(([[R, O], b, S, k, T]) => O && S && (b == null ? void 0 : b({ context: T, totalCount: R, scrollingInProgress: k }))),
|
|
2474
|
+
ae((R) => !!R),
|
|
2475
2475
|
mt(0)
|
|
2476
2476
|
),
|
|
2477
|
-
(
|
|
2477
|
+
(R) => {
|
|
2478
2478
|
c && (c(), c = null), Pe(n) ? requestAnimationFrame(() => {
|
|
2479
|
-
Pe(d)("scrolling into view", {}),
|
|
2479
|
+
Pe(d)("scrolling into view", {}), pe(m, R);
|
|
2480
2480
|
}) : c = at(e, () => {
|
|
2481
|
-
Pe(d)("scrolling into view", {}),
|
|
2481
|
+
Pe(d)("scrolling into view", {}), pe(m, R), c = null;
|
|
2482
2482
|
});
|
|
2483
2483
|
}
|
|
2484
2484
|
), { autoscrollToBottom: y, followOutput: v, scrollIntoViewOnChange: w };
|
|
@@ -2501,7 +2501,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2501
2501
|
he(i),
|
|
2502
2502
|
ae(([, a]) => a !== 0),
|
|
2503
2503
|
he(o, r, t, n, e),
|
|
2504
|
-
|
|
2504
|
+
Y(([[, a], l, d, h, f, m = []]) => pi(a, l, d, h, f, m))
|
|
2505
2505
|
),
|
|
2506
2506
|
s
|
|
2507
2507
|
), {}),
|
|
@@ -2515,7 +2515,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2515
2515
|
e,
|
|
2516
2516
|
he(r),
|
|
2517
2517
|
ae(([, o]) => o !== 0),
|
|
2518
|
-
|
|
2518
|
+
Y(([, o]) => ({ top: o }))
|
|
2519
2519
|
),
|
|
2520
2520
|
(o) => {
|
|
2521
2521
|
at(
|
|
@@ -2526,7 +2526,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2526
2526
|
),
|
|
2527
2527
|
() => {
|
|
2528
2528
|
requestAnimationFrame(() => {
|
|
2529
|
-
|
|
2529
|
+
pe(t, o);
|
|
2530
2530
|
});
|
|
2531
2531
|
}
|
|
2532
2532
|
);
|
|
@@ -2545,7 +2545,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2545
2545
|
e,
|
|
2546
2546
|
he(r, t, n),
|
|
2547
2547
|
ae(([o, i]) => !!i),
|
|
2548
|
-
|
|
2548
|
+
Y(([o, i, s, u]) => {
|
|
2549
2549
|
const { enter: a, exit: l } = i;
|
|
2550
2550
|
if (s) {
|
|
2551
2551
|
if (l(o, u))
|
|
@@ -2571,7 +2571,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2571
2571
|
return oe(
|
|
2572
2572
|
H(
|
|
2573
2573
|
Ne(n, r),
|
|
2574
|
-
|
|
2574
|
+
Y(([{ scrollHeight: u, scrollTop: a, viewportHeight: l }, { offsetTop: d }]) => ({
|
|
2575
2575
|
scrollHeight: u,
|
|
2576
2576
|
scrollTop: Math.max(0, a - d),
|
|
2577
2577
|
viewportHeight: l
|
|
@@ -2582,7 +2582,7 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2582
2582
|
H(
|
|
2583
2583
|
t,
|
|
2584
2584
|
he(r),
|
|
2585
|
-
|
|
2585
|
+
Y(([u, { offsetTop: a }]) => ({
|
|
2586
2586
|
...u,
|
|
2587
2587
|
top: u.top + a
|
|
2588
2588
|
}))
|
|
@@ -2613,16 +2613,16 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2613
2613
|
he(t, r, s, h, f, n)
|
|
2614
2614
|
),
|
|
2615
2615
|
([m, v, y, c, p, g, w]) => {
|
|
2616
|
-
const
|
|
2617
|
-
c && p !== null && g !== null && (y = p.scrollTop - g.offsetTop), y -= w, m({ ranges:
|
|
2616
|
+
const C = Os(v.sizeTree);
|
|
2617
|
+
c && p !== null && g !== null && (y = p.scrollTop - g.offsetTop), y -= w, m({ ranges: C, scrollTop: y });
|
|
2618
2618
|
}
|
|
2619
|
-
), oe(H(d, ae(wr),
|
|
2619
|
+
), oe(H(d, ae(wr), Y(Xs)), o), oe(
|
|
2620
2620
|
H(
|
|
2621
2621
|
i,
|
|
2622
2622
|
he(d),
|
|
2623
2623
|
ae(([, m]) => m !== void 0),
|
|
2624
2624
|
Me(),
|
|
2625
|
-
|
|
2625
|
+
Y(([, m]) => m.ranges)
|
|
2626
2626
|
),
|
|
2627
2627
|
e
|
|
2628
2628
|
), {
|
|
@@ -2635,13 +2635,13 @@ const Vs = (e, t) => typeof e == "function" ? ro(e(t)) : t && ro(e), qs = ye(
|
|
|
2635
2635
|
function Xs(e) {
|
|
2636
2636
|
return { align: "start", index: 0, offset: e.scrollTop };
|
|
2637
2637
|
}
|
|
2638
|
-
const
|
|
2638
|
+
const Qs = ye(([{ topItemsIndexes: e }]) => {
|
|
2639
2639
|
const t = W(0);
|
|
2640
2640
|
return oe(
|
|
2641
2641
|
H(
|
|
2642
2642
|
t,
|
|
2643
2643
|
ae((n) => n >= 0),
|
|
2644
|
-
|
|
2644
|
+
Y((n) => Array.from({ length: n }).map((r, o) => o))
|
|
2645
2645
|
),
|
|
2646
2646
|
e
|
|
2647
2647
|
), { topItemCount: t };
|
|
@@ -2650,7 +2650,7 @@ function vi(e) {
|
|
|
2650
2650
|
let t = !1, n;
|
|
2651
2651
|
return (() => (t || (t = !0, n = e()), n));
|
|
2652
2652
|
}
|
|
2653
|
-
const
|
|
2653
|
+
const Ys = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.test(navigator.userAgent)), Zs = ye(
|
|
2654
2654
|
([
|
|
2655
2655
|
{ deviation: e, scrollBy: t, scrollingInProgress: n, scrollTop: r },
|
|
2656
2656
|
{ isAtBottom: o, isScrolling: i, lastJumpDueToItemResize: s, scrollDirection: u },
|
|
@@ -2664,65 +2664,65 @@ const Qs = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2664
2664
|
a,
|
|
2665
2665
|
he(s),
|
|
2666
2666
|
gt(
|
|
2667
|
-
([, p, g, w], [{ bottom:
|
|
2668
|
-
const
|
|
2669
|
-
let
|
|
2670
|
-
return g === b && p.length > 0 &&
|
|
2667
|
+
([, p, g, w], [{ bottom: C, items: R, offsetBottom: O, totalCount: b }, S]) => {
|
|
2668
|
+
const k = C + O;
|
|
2669
|
+
let T = 0;
|
|
2670
|
+
return g === b && p.length > 0 && R.length > 0 && (R[0].originalIndex === 0 && p[0].originalIndex === 0 || (T = k - w, T !== 0 && (T += S))), [T, R, b, k];
|
|
2671
2671
|
},
|
|
2672
2672
|
[0, [], 0, 0]
|
|
2673
2673
|
),
|
|
2674
2674
|
ae(([p]) => p !== 0),
|
|
2675
2675
|
he(r, u, n, o, m, v),
|
|
2676
|
-
ae(([, p, g, w, , ,
|
|
2677
|
-
|
|
2676
|
+
ae(([, p, g, w, , , C]) => !C && !w && p !== 0 && g === Jt),
|
|
2677
|
+
Y(([[p], , , , , g]) => (g("Upward scrolling compensation", { amount: p }, Ye.DEBUG), p))
|
|
2678
2678
|
)
|
|
2679
2679
|
);
|
|
2680
2680
|
function c(p) {
|
|
2681
|
-
p > 0 ? (
|
|
2681
|
+
p > 0 ? (pe(t, { behavior: "auto", top: -p }), pe(e, 0)) : (pe(e, 0), pe(t, { behavior: "auto", top: -p }));
|
|
2682
2682
|
}
|
|
2683
2683
|
return Ie(H(y, he(e, i)), ([p, g, w]) => {
|
|
2684
|
-
w &&
|
|
2684
|
+
w && Ys() ? pe(e, g - p) : c(-p);
|
|
2685
2685
|
}), Ie(
|
|
2686
2686
|
H(
|
|
2687
2687
|
Ne(je(i, !1), e, v),
|
|
2688
2688
|
ae(([p, g, w]) => !p && !w && g !== 0),
|
|
2689
|
-
|
|
2689
|
+
Y(([p, g]) => g),
|
|
2690
2690
|
mt(1)
|
|
2691
2691
|
),
|
|
2692
2692
|
c
|
|
2693
2693
|
), oe(
|
|
2694
2694
|
H(
|
|
2695
2695
|
h,
|
|
2696
|
-
|
|
2696
|
+
Y((p) => ({ top: -p }))
|
|
2697
2697
|
),
|
|
2698
2698
|
t
|
|
2699
2699
|
), Ie(
|
|
2700
2700
|
H(
|
|
2701
2701
|
l,
|
|
2702
2702
|
he(f, d),
|
|
2703
|
-
|
|
2704
|
-
function
|
|
2705
|
-
return b * (w +
|
|
2703
|
+
Y(([p, { groupIndices: g, lastSize: w, sizeTree: C }, R]) => {
|
|
2704
|
+
function O(b) {
|
|
2705
|
+
return b * (w + R);
|
|
2706
2706
|
}
|
|
2707
2707
|
if (g.length === 0)
|
|
2708
|
-
return
|
|
2708
|
+
return O(p);
|
|
2709
2709
|
{
|
|
2710
2710
|
let b = 0;
|
|
2711
|
-
const S =
|
|
2712
|
-
let
|
|
2713
|
-
for (;
|
|
2714
|
-
|
|
2715
|
-
let
|
|
2716
|
-
|
|
2711
|
+
const S = Qt(C, 0);
|
|
2712
|
+
let k = 0, T = 0;
|
|
2713
|
+
for (; k < p; ) {
|
|
2714
|
+
k++, b += S;
|
|
2715
|
+
let M = g.length === T + 1 ? 1 / 0 : g[T + 1] - g[T] - 1;
|
|
2716
|
+
k + M > p && (b -= S, M = p - k + 1), k += M, b += O(M), T++;
|
|
2717
2717
|
}
|
|
2718
2718
|
return b;
|
|
2719
2719
|
}
|
|
2720
2720
|
})
|
|
2721
2721
|
),
|
|
2722
2722
|
(p) => {
|
|
2723
|
-
|
|
2724
|
-
|
|
2725
|
-
|
|
2723
|
+
pe(e, p), requestAnimationFrame(() => {
|
|
2724
|
+
pe(t, { top: p }), requestAnimationFrame(() => {
|
|
2725
|
+
pe(e, 0), pe(v, !1);
|
|
2726
2726
|
});
|
|
2727
2727
|
});
|
|
2728
2728
|
}
|
|
@@ -2790,18 +2790,18 @@ const Qs = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2790
2790
|
p,
|
|
2791
2791
|
g,
|
|
2792
2792
|
w,
|
|
2793
|
-
|
|
2794
|
-
{ scrollToIndex:
|
|
2795
|
-
|
|
2793
|
+
C,
|
|
2794
|
+
{ scrollToIndex: R },
|
|
2795
|
+
O,
|
|
2796
2796
|
{ topItemCount: b },
|
|
2797
2797
|
{ groupCounts: S },
|
|
2798
|
-
|
|
2798
|
+
k
|
|
2799
2799
|
]) => {
|
|
2800
|
-
const { listState:
|
|
2801
|
-
return oe(I,
|
|
2800
|
+
const { listState: T, minOverscanItemCount: M, topItemsIndexes: P, rangeChanged: I, ..._ } = C;
|
|
2801
|
+
return oe(I, k.scrollSeekRangeChanged), oe(
|
|
2802
2802
|
H(
|
|
2803
|
-
|
|
2804
|
-
|
|
2803
|
+
k.windowViewportRect,
|
|
2804
|
+
Y((z) => z.visibleHeight)
|
|
2805
2805
|
),
|
|
2806
2806
|
p.viewportHeight
|
|
2807
2807
|
), {
|
|
@@ -2824,17 +2824,17 @@ const Qs = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2824
2824
|
...w,
|
|
2825
2825
|
groupIndices: s,
|
|
2826
2826
|
itemSize: a,
|
|
2827
|
-
listState:
|
|
2828
|
-
minOverscanItemCount:
|
|
2829
|
-
scrollToIndex:
|
|
2827
|
+
listState: T,
|
|
2828
|
+
minOverscanItemCount: M,
|
|
2829
|
+
scrollToIndex: R,
|
|
2830
2830
|
// output
|
|
2831
2831
|
statefulTotalCount: h,
|
|
2832
2832
|
trackItemSizes: m,
|
|
2833
2833
|
// exported from stateFlagsSystem
|
|
2834
2834
|
rangeChanged: I,
|
|
2835
|
-
...R,
|
|
2836
|
-
// the bag of IO from featureGroup1System
|
|
2837
2835
|
..._,
|
|
2836
|
+
// the bag of IO from featureGroup1System
|
|
2837
|
+
...k,
|
|
2838
2838
|
...p,
|
|
2839
2839
|
sizes: d,
|
|
2840
2840
|
...g
|
|
@@ -2849,7 +2849,7 @@ const Qs = vi(() => /iP(ad|od|hone)/i.test(navigator.userAgent) && /WebKit/i.tes
|
|
|
2849
2849
|
Pt,
|
|
2850
2850
|
on,
|
|
2851
2851
|
Zs,
|
|
2852
|
-
|
|
2852
|
+
Qs,
|
|
2853
2853
|
ui,
|
|
2854
2854
|
Js
|
|
2855
2855
|
)
|
|
@@ -2868,47 +2868,47 @@ const dn = typeof document < "u" ? D.useLayoutEffect : D.useEffect;
|
|
|
2868
2868
|
function yi(e, t, n) {
|
|
2869
2869
|
const r = Object.keys(t.required || {}), o = Object.keys(t.optional || {}), i = Object.keys(t.methods || {}), s = Object.keys(t.events || {}), u = D.createContext({});
|
|
2870
2870
|
function a(c, p) {
|
|
2871
|
-
c.propsReady &&
|
|
2871
|
+
c.propsReady && pe(c.propsReady, !1);
|
|
2872
2872
|
for (const g of r) {
|
|
2873
2873
|
const w = c[t.required[g]];
|
|
2874
|
-
|
|
2874
|
+
pe(w, p[g]);
|
|
2875
2875
|
}
|
|
2876
2876
|
for (const g of o)
|
|
2877
2877
|
if (g in p) {
|
|
2878
2878
|
const w = c[t.optional[g]];
|
|
2879
|
-
|
|
2879
|
+
pe(w, p[g]);
|
|
2880
2880
|
}
|
|
2881
|
-
c.propsReady &&
|
|
2881
|
+
c.propsReady && pe(c.propsReady, !0);
|
|
2882
2882
|
}
|
|
2883
2883
|
function l(c) {
|
|
2884
2884
|
return i.reduce((p, g) => (p[g] = (w) => {
|
|
2885
|
-
const
|
|
2886
|
-
|
|
2885
|
+
const C = c[t.methods[g]];
|
|
2886
|
+
pe(C, w);
|
|
2887
2887
|
}, p), {});
|
|
2888
2888
|
}
|
|
2889
2889
|
function d(c) {
|
|
2890
2890
|
return s.reduce((p, g) => (p[g] = ms(c[t.events[g]]), p), {});
|
|
2891
2891
|
}
|
|
2892
2892
|
const h = D.forwardRef((c, p) => {
|
|
2893
|
-
const { children: g, ...w } = c, [
|
|
2893
|
+
const { children: g, ...w } = c, [C] = D.useState(() => Mn(vs(e), (b) => {
|
|
2894
2894
|
a(b, w);
|
|
2895
|
-
})), [
|
|
2895
|
+
})), [R] = D.useState(Ur(d, C));
|
|
2896
2896
|
dn(() => {
|
|
2897
2897
|
for (const b of s)
|
|
2898
|
-
b in w && Ie(
|
|
2898
|
+
b in w && Ie(R[b], w[b]);
|
|
2899
2899
|
return () => {
|
|
2900
|
-
Object.values(
|
|
2900
|
+
Object.values(R).map(Ir);
|
|
2901
2901
|
};
|
|
2902
|
-
}, [w,
|
|
2903
|
-
a(
|
|
2904
|
-
}), D.useImperativeHandle(p, jr(l(
|
|
2905
|
-
const
|
|
2906
|
-
return /* @__PURE__ */ x(u.Provider, { value:
|
|
2902
|
+
}, [w, R, C]), dn(() => {
|
|
2903
|
+
a(C, w);
|
|
2904
|
+
}), D.useImperativeHandle(p, jr(l(C)));
|
|
2905
|
+
const O = n;
|
|
2906
|
+
return /* @__PURE__ */ x(u.Provider, { value: C, children: n ? /* @__PURE__ */ x(O, { ...el([...r, ...o, ...s], w), children: g }) : g });
|
|
2907
2907
|
}), f = (c) => {
|
|
2908
2908
|
const p = D.useContext(u);
|
|
2909
2909
|
return D.useCallback(
|
|
2910
2910
|
(g) => {
|
|
2911
|
-
|
|
2911
|
+
pe(p[c], g);
|
|
2912
2912
|
},
|
|
2913
2913
|
[p, c]
|
|
2914
2914
|
);
|
|
@@ -2925,8 +2925,8 @@ function yi(e, t, n) {
|
|
|
2925
2925
|
}, v = (c) => {
|
|
2926
2926
|
const p = D.useContext(u)[c], [g, w] = D.useState(Ur(Pe, p));
|
|
2927
2927
|
return dn(
|
|
2928
|
-
() => Ie(p, (
|
|
2929
|
-
|
|
2928
|
+
() => Ie(p, (C) => {
|
|
2929
|
+
C !== g && w(jr(C));
|
|
2930
2930
|
}),
|
|
2931
2931
|
[p, g]
|
|
2932
2932
|
), g;
|
|
@@ -2965,7 +2965,7 @@ function Ci(e, t, n, r = $t, o, i) {
|
|
|
2965
2965
|
viewportHeight: v
|
|
2966
2966
|
});
|
|
2967
2967
|
};
|
|
2968
|
-
f.suppressFlushSync ? p() :
|
|
2968
|
+
f.suppressFlushSync ? p() : Qi.flushSync(p), u.current !== null && (y === u.current || y <= 0 || y === m - v) && (u.current = null, t(!0), a.current && (clearTimeout(a.current), a.current = null));
|
|
2969
2969
|
},
|
|
2970
2970
|
[e, t, i]
|
|
2971
2971
|
);
|
|
@@ -3012,7 +3012,7 @@ const nl = /* @__PURE__ */ ye(() => {
|
|
|
3012
3012
|
const e = W((u) => `Item ${u}`), t = W((u) => `Group ${u}`), n = W({}), r = W(zr), o = W("div"), i = W($t), s = (u, a = null) => je(
|
|
3013
3013
|
H(
|
|
3014
3014
|
n,
|
|
3015
|
-
|
|
3015
|
+
Y((l) => l[u]),
|
|
3016
3016
|
Me()
|
|
3017
3017
|
),
|
|
3018
3018
|
a
|
|
@@ -3049,68 +3049,68 @@ const nl = /* @__PURE__ */ ye(() => {
|
|
|
3049
3049
|
y,
|
|
3050
3050
|
ue("skipAnimationFrameInResizeObserver")
|
|
3051
3051
|
), [p, g] = D.useState(0);
|
|
3052
|
-
Pr("deviation", (
|
|
3053
|
-
p !==
|
|
3052
|
+
Pr("deviation", (_) => {
|
|
3053
|
+
p !== _ && g(_);
|
|
3054
3054
|
});
|
|
3055
|
-
const w = ue("EmptyPlaceholder"),
|
|
3055
|
+
const w = ue("EmptyPlaceholder"), C = ue("ScrollSeekPlaceholder") || ol, R = ue("ListComponent"), O = ue("ItemComponent"), b = ue("GroupComponent"), S = ue("computeItemKey"), k = ue("isSeeking"), T = ue("groupIndices").length > 0, M = ue("alignToBottom"), P = ue("initialItemFinalLocationReached"), I = e ? {} : {
|
|
3056
3056
|
boxSizing: "border-box",
|
|
3057
3057
|
...y ? {
|
|
3058
3058
|
display: "inline-block",
|
|
3059
3059
|
height: "100%",
|
|
3060
|
-
marginLeft: p !== 0 ? p :
|
|
3060
|
+
marginLeft: p !== 0 ? p : M ? "auto" : 0,
|
|
3061
3061
|
paddingLeft: t.offsetTop,
|
|
3062
3062
|
paddingRight: t.offsetBottom,
|
|
3063
3063
|
whiteSpace: "nowrap"
|
|
3064
3064
|
} : {
|
|
3065
|
-
marginTop: p !== 0 ? p :
|
|
3065
|
+
marginTop: p !== 0 ? p : M ? "auto" : 0,
|
|
3066
3066
|
paddingBottom: t.offsetBottom,
|
|
3067
3067
|
paddingTop: t.offsetTop
|
|
3068
3068
|
},
|
|
3069
3069
|
...P ? {} : { visibility: "hidden" }
|
|
3070
3070
|
};
|
|
3071
3071
|
return !e && t.totalCount === 0 && w ? /* @__PURE__ */ x(w, { ...qe(w, l) }) : /* @__PURE__ */ x(
|
|
3072
|
-
|
|
3072
|
+
R,
|
|
3073
3073
|
{
|
|
3074
|
-
...qe(
|
|
3074
|
+
...qe(R, l),
|
|
3075
3075
|
"data-testid": e ? "virtuoso-top-item-list" : "virtuoso-item-list",
|
|
3076
3076
|
ref: c,
|
|
3077
3077
|
style: I,
|
|
3078
|
-
children: (e ? t.topItems : t.items).map((
|
|
3079
|
-
const z =
|
|
3080
|
-
return
|
|
3081
|
-
|
|
3078
|
+
children: (e ? t.topItems : t.items).map((_) => {
|
|
3079
|
+
const z = _.originalIndex, N = S(z + t.firstItemIndex, _.data, l);
|
|
3080
|
+
return k ? /* @__PURE__ */ hn(
|
|
3081
|
+
C,
|
|
3082
3082
|
{
|
|
3083
|
-
...qe(
|
|
3084
|
-
height:
|
|
3085
|
-
index:
|
|
3083
|
+
...qe(C, l),
|
|
3084
|
+
height: _.size,
|
|
3085
|
+
index: _.index,
|
|
3086
3086
|
key: N,
|
|
3087
|
-
type:
|
|
3088
|
-
...
|
|
3087
|
+
type: _.type || "item",
|
|
3088
|
+
..._.type === "group" ? {} : { groupIndex: _.groupIndex }
|
|
3089
3089
|
}
|
|
3090
|
-
) :
|
|
3090
|
+
) : _.type === "group" ? /* @__PURE__ */ hn(
|
|
3091
3091
|
b,
|
|
3092
3092
|
{
|
|
3093
3093
|
...qe(b, l),
|
|
3094
3094
|
"data-index": z,
|
|
3095
|
-
"data-item-index":
|
|
3096
|
-
"data-known-size":
|
|
3095
|
+
"data-item-index": _.index,
|
|
3096
|
+
"data-known-size": _.size,
|
|
3097
3097
|
key: N,
|
|
3098
3098
|
style: il
|
|
3099
3099
|
},
|
|
3100
|
-
d(
|
|
3100
|
+
d(_.index, l)
|
|
3101
3101
|
) : /* @__PURE__ */ hn(
|
|
3102
|
-
|
|
3102
|
+
O,
|
|
3103
3103
|
{
|
|
3104
|
-
...qe(
|
|
3105
|
-
...ul(
|
|
3104
|
+
...qe(O, l),
|
|
3105
|
+
...ul(O, _.data),
|
|
3106
3106
|
"data-index": z,
|
|
3107
|
-
"data-item-group-index":
|
|
3108
|
-
"data-item-index":
|
|
3109
|
-
"data-known-size":
|
|
3107
|
+
"data-item-group-index": _.groupIndex,
|
|
3108
|
+
"data-item-index": _.index,
|
|
3109
|
+
"data-known-size": _.size,
|
|
3110
3110
|
key: N,
|
|
3111
3111
|
style: y ? sl : Ti
|
|
3112
3112
|
},
|
|
3113
|
-
|
|
3113
|
+
T ? a(_.index, _.groupIndex, _.data, l) : a(_.index, _.data, l)
|
|
3114
3114
|
);
|
|
3115
3115
|
})
|
|
3116
3116
|
}
|
|
@@ -3329,7 +3329,7 @@ const pl = ({ children: e }) => {
|
|
|
3329
3329
|
] })), r = W(null), o = W(null), i = W({}), s = W(zr), u = W($t), a = (l, d = null) => je(
|
|
3330
3330
|
H(
|
|
3331
3331
|
i,
|
|
3332
|
-
|
|
3332
|
+
Y((h) => h[l]),
|
|
3333
3333
|
Me()
|
|
3334
3334
|
),
|
|
3335
3335
|
d
|
|
@@ -3396,10 +3396,10 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3396
3396
|
f,
|
|
3397
3397
|
m,
|
|
3398
3398
|
{ didMount: v, propsReady: y },
|
|
3399
|
-
{ customScrollParent: c, useWindowScroll: p, windowScrollContainerState: g, windowScrollTo: w, windowViewportRect:
|
|
3400
|
-
|
|
3399
|
+
{ customScrollParent: c, useWindowScroll: p, windowScrollContainerState: g, windowScrollTo: w, windowViewportRect: C },
|
|
3400
|
+
R
|
|
3401
3401
|
]) => {
|
|
3402
|
-
const
|
|
3402
|
+
const O = W(0), b = W(0), S = W(so), k = W({ height: 0, width: 0 }), T = W({ height: 0, width: 0 }), M = ve(), P = ve(), I = W(0), _ = W(null), z = W({ column: 0, row: 0 }), N = ve(), A = ve(), V = W(!1), re = W(0), be = W(!0), Se = W(!1), Ce = W(!1);
|
|
3403
3403
|
Ie(
|
|
3404
3404
|
H(
|
|
3405
3405
|
v,
|
|
@@ -3407,18 +3407,18 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3407
3407
|
ae(([E, L]) => !!L)
|
|
3408
3408
|
),
|
|
3409
3409
|
() => {
|
|
3410
|
-
|
|
3410
|
+
pe(be, !1);
|
|
3411
3411
|
}
|
|
3412
3412
|
), Ie(
|
|
3413
3413
|
H(
|
|
3414
|
-
Ne(v, be,
|
|
3414
|
+
Ne(v, be, T, k, re, Se),
|
|
3415
3415
|
ae(([E, L, q, B, , Z]) => E && !L && q.height !== 0 && B.height !== 0 && !Z)
|
|
3416
3416
|
),
|
|
3417
3417
|
([, , , , E]) => {
|
|
3418
|
-
|
|
3419
|
-
|
|
3418
|
+
pe(Se, !0), Rr(1, () => {
|
|
3419
|
+
pe(M, E);
|
|
3420
3420
|
}), at(H(l), () => {
|
|
3421
|
-
|
|
3421
|
+
pe(t, [0, 0]), pe(be, !0);
|
|
3422
3422
|
});
|
|
3423
3423
|
}
|
|
3424
3424
|
), oe(
|
|
@@ -3435,25 +3435,25 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3435
3435
|
ae(([, E]) => E != null)
|
|
3436
3436
|
),
|
|
3437
3437
|
([, E]) => {
|
|
3438
|
-
E && (
|
|
3439
|
-
|
|
3440
|
-
}),
|
|
3438
|
+
E && (pe(k, E.viewport), pe(T, E.item), pe(z, E.gap), E.scrollTop > 0 && (pe(V, !0), at(H(l, Et(1)), (L) => {
|
|
3439
|
+
pe(V, !1);
|
|
3440
|
+
}), pe(a, { top: E.scrollTop })));
|
|
3441
3441
|
}
|
|
3442
3442
|
), oe(
|
|
3443
3443
|
H(
|
|
3444
|
-
|
|
3445
|
-
|
|
3444
|
+
k,
|
|
3445
|
+
Y(({ height: E }) => E)
|
|
3446
3446
|
),
|
|
3447
3447
|
h
|
|
3448
3448
|
), oe(
|
|
3449
3449
|
H(
|
|
3450
3450
|
Ne(
|
|
3451
|
-
le(
|
|
3452
|
-
le(
|
|
3451
|
+
le(k, fn),
|
|
3452
|
+
le(T, fn),
|
|
3453
3453
|
le(z, (E, L) => E && E.column === L.column && E.row === L.row),
|
|
3454
3454
|
le(l)
|
|
3455
3455
|
),
|
|
3456
|
-
|
|
3456
|
+
Y(([E, L, q, B]) => ({
|
|
3457
3457
|
gap: q,
|
|
3458
3458
|
item: L,
|
|
3459
3459
|
scrollTop: B,
|
|
@@ -3464,26 +3464,26 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3464
3464
|
), oe(
|
|
3465
3465
|
H(
|
|
3466
3466
|
Ne(
|
|
3467
|
-
le(
|
|
3467
|
+
le(O),
|
|
3468
3468
|
r,
|
|
3469
3469
|
le(z, Cl),
|
|
3470
|
-
le(
|
|
3471
|
-
le(
|
|
3472
|
-
le(
|
|
3470
|
+
le(T, fn),
|
|
3471
|
+
le(k, fn),
|
|
3472
|
+
le(_),
|
|
3473
3473
|
le(b),
|
|
3474
3474
|
le(V),
|
|
3475
3475
|
le(be),
|
|
3476
3476
|
le(re)
|
|
3477
3477
|
),
|
|
3478
3478
|
ae(([, , , , , , , E]) => !E),
|
|
3479
|
-
|
|
3479
|
+
Y(
|
|
3480
3480
|
([
|
|
3481
3481
|
E,
|
|
3482
3482
|
[L, q],
|
|
3483
3483
|
B,
|
|
3484
3484
|
Z,
|
|
3485
3485
|
F,
|
|
3486
|
-
|
|
3486
|
+
Q,
|
|
3487
3487
|
te,
|
|
3488
3488
|
,
|
|
3489
3489
|
J,
|
|
@@ -3494,12 +3494,12 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3494
3494
|
return so;
|
|
3495
3495
|
if (ke === 0) {
|
|
3496
3496
|
const bt = _r(ce, E), Vt = bt + Math.max(te - 1, 0);
|
|
3497
|
-
return Il(co(bt, Vt,
|
|
3497
|
+
return Il(co(bt, Vt, Q));
|
|
3498
3498
|
}
|
|
3499
3499
|
const He = _i(Oe, ke, se);
|
|
3500
3500
|
let Be, $e;
|
|
3501
3501
|
J ? L === 0 && q === 0 && te > 0 ? (Be = 0, $e = te - 1) : (Be = He * yn((L + we) / (ge + we)), $e = He * lo((q + we) / (ge + we)) - 1, $e = qn(E - 1, Kt($e, He - 1)), Be = qn($e, Kt(0, Be))) : (Be = 0, $e = -1);
|
|
3502
|
-
const ut = co(Be, $e,
|
|
3502
|
+
const ut = co(Be, $e, Q), { bottom: Xe, top: Ge } = uo(F, B, Z, ut), st = lo(E / He), nt = st * ge + (st - 1) * we - Xe;
|
|
3503
3503
|
return { bottom: Xe, itemHeight: ge, items: ut, itemWidth: ke, offsetBottom: nt, offsetTop: Ge, top: Ge };
|
|
3504
3504
|
}
|
|
3505
3505
|
)
|
|
@@ -3507,20 +3507,20 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3507
3507
|
S
|
|
3508
3508
|
), oe(
|
|
3509
3509
|
H(
|
|
3510
|
-
|
|
3510
|
+
_,
|
|
3511
3511
|
ae((E) => E !== null),
|
|
3512
|
-
|
|
3512
|
+
Y((E) => E.length)
|
|
3513
3513
|
),
|
|
3514
|
-
|
|
3514
|
+
O
|
|
3515
3515
|
), oe(
|
|
3516
3516
|
H(
|
|
3517
|
-
Ne(
|
|
3517
|
+
Ne(k, T, S, z),
|
|
3518
3518
|
ae(([E, L, { items: q }]) => q.length > 0 && L.height !== 0 && E.height !== 0),
|
|
3519
|
-
|
|
3519
|
+
Y(([E, L, { items: q }, B]) => {
|
|
3520
3520
|
const { bottom: Z, top: F } = uo(E, B, L, q);
|
|
3521
3521
|
return [F, Z];
|
|
3522
3522
|
}),
|
|
3523
|
-
Me(
|
|
3523
|
+
Me(Yt)
|
|
3524
3524
|
),
|
|
3525
3525
|
t
|
|
3526
3526
|
);
|
|
@@ -3529,20 +3529,20 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3529
3529
|
H(
|
|
3530
3530
|
l,
|
|
3531
3531
|
he(xe),
|
|
3532
|
-
|
|
3532
|
+
Y(([E, L]) => L || E !== 0)
|
|
3533
3533
|
),
|
|
3534
3534
|
xe
|
|
3535
3535
|
);
|
|
3536
3536
|
const Fe = tt(
|
|
3537
3537
|
H(
|
|
3538
|
-
Ne(S,
|
|
3538
|
+
Ne(S, O),
|
|
3539
3539
|
ae(([{ items: E }]) => E.length > 0),
|
|
3540
3540
|
he(xe),
|
|
3541
3541
|
ae(([[E, L], q]) => {
|
|
3542
3542
|
const B = E.items[E.items.length - 1].index === L - 1;
|
|
3543
3543
|
return (q || E.bottom > 0 && E.itemHeight > 0 && E.offsetBottom === 0 && E.items.length === L) && B;
|
|
3544
3544
|
}),
|
|
3545
|
-
|
|
3545
|
+
Y(([[, E]]) => E - 1),
|
|
3546
3546
|
Me()
|
|
3547
3547
|
)
|
|
3548
3548
|
), K = tt(
|
|
@@ -3557,7 +3557,7 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3557
3557
|
le(S),
|
|
3558
3558
|
he(V),
|
|
3559
3559
|
ae(([{ items: E }, L]) => E.length > 0 && !L),
|
|
3560
|
-
|
|
3560
|
+
Y(([{ items: E }]) => ({
|
|
3561
3561
|
endIndex: E[E.length - 1].index,
|
|
3562
3562
|
startIndex: E[0].index
|
|
3563
3563
|
})),
|
|
@@ -3567,14 +3567,14 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3567
3567
|
);
|
|
3568
3568
|
oe($, m.scrollSeekRangeChanged), oe(
|
|
3569
3569
|
H(
|
|
3570
|
-
|
|
3571
|
-
he(
|
|
3572
|
-
|
|
3573
|
-
const F = di(E), { align:
|
|
3570
|
+
M,
|
|
3571
|
+
he(k, T, O, z),
|
|
3572
|
+
Y(([E, L, q, B, Z]) => {
|
|
3573
|
+
const F = di(E), { align: Q, behavior: te, offset: J } = F;
|
|
3574
3574
|
let ce = F.index;
|
|
3575
3575
|
ce === "LAST" && (ce = B - 1), ce = Kt(0, ce, qn(B - 1, ce));
|
|
3576
3576
|
let se = br(L, Z, q, ce);
|
|
3577
|
-
return
|
|
3577
|
+
return Q === "end" ? se = ao(se - L.height + q.height) : Q === "center" && (se = ao(se - L.height / 2 + q.height / 2)), J && (se += J), { behavior: te, top: se };
|
|
3578
3578
|
})
|
|
3579
3579
|
),
|
|
3580
3580
|
a
|
|
@@ -3582,42 +3582,42 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3582
3582
|
const G = je(
|
|
3583
3583
|
H(
|
|
3584
3584
|
S,
|
|
3585
|
-
|
|
3585
|
+
Y((E) => E.offsetBottom + E.bottom)
|
|
3586
3586
|
),
|
|
3587
3587
|
0
|
|
3588
3588
|
);
|
|
3589
3589
|
return oe(
|
|
3590
3590
|
H(
|
|
3591
|
-
|
|
3592
|
-
|
|
3591
|
+
C,
|
|
3592
|
+
Y((E) => ({ height: E.visibleHeight, width: E.visibleWidth }))
|
|
3593
3593
|
),
|
|
3594
|
-
|
|
3594
|
+
k
|
|
3595
3595
|
), {
|
|
3596
3596
|
customScrollParent: c,
|
|
3597
3597
|
// input
|
|
3598
|
-
data:
|
|
3598
|
+
data: _,
|
|
3599
3599
|
deviation: I,
|
|
3600
3600
|
footerHeight: o,
|
|
3601
3601
|
gap: z,
|
|
3602
3602
|
headerHeight: i,
|
|
3603
3603
|
increaseViewportBy: e,
|
|
3604
3604
|
initialItemCount: b,
|
|
3605
|
-
itemDimensions:
|
|
3605
|
+
itemDimensions: T,
|
|
3606
3606
|
overscan: n,
|
|
3607
3607
|
restoreStateFrom: A,
|
|
3608
3608
|
scrollBy: s,
|
|
3609
3609
|
scrollContainerState: u,
|
|
3610
3610
|
scrollHeight: P,
|
|
3611
3611
|
scrollTo: a,
|
|
3612
|
-
scrollToIndex:
|
|
3612
|
+
scrollToIndex: M,
|
|
3613
3613
|
scrollTop: l,
|
|
3614
3614
|
smoothScrollTargetReached: d,
|
|
3615
|
-
totalCount:
|
|
3615
|
+
totalCount: O,
|
|
3616
3616
|
useWindowScroll: p,
|
|
3617
|
-
viewportDimensions:
|
|
3617
|
+
viewportDimensions: k,
|
|
3618
3618
|
windowScrollContainerState: g,
|
|
3619
3619
|
windowScrollTo: w,
|
|
3620
|
-
windowViewportRect:
|
|
3620
|
+
windowViewportRect: C,
|
|
3621
3621
|
...m,
|
|
3622
3622
|
// output
|
|
3623
3623
|
gridState: S,
|
|
@@ -3631,7 +3631,7 @@ const Tl = /* @__PURE__ */ ye(
|
|
|
3631
3631
|
startReached: K,
|
|
3632
3632
|
stateChanged: N,
|
|
3633
3633
|
stateRestoreInProgress: V,
|
|
3634
|
-
...
|
|
3634
|
+
...R
|
|
3635
3635
|
};
|
|
3636
3636
|
},
|
|
3637
3637
|
Ee(Mr, Ke, ln, bi, kt, Er, Tt)
|
|
@@ -3654,7 +3654,7 @@ const kl = /* @__PURE__ */ ye(() => {
|
|
|
3654
3654
|
const e = W((h) => `Item ${h}`), t = W({}), n = W(null), r = W("virtuoso-grid-item"), o = W("virtuoso-grid-list"), i = W(zr), s = W("div"), u = W($t), a = (h, f = null) => je(
|
|
3655
3655
|
H(
|
|
3656
3656
|
t,
|
|
3657
|
-
|
|
3657
|
+
Y((m) => m[h]),
|
|
3658
3658
|
Me()
|
|
3659
3659
|
),
|
|
3660
3660
|
f
|
|
@@ -3688,8 +3688,8 @@ const kl = /* @__PURE__ */ ye(() => {
|
|
|
3688
3688
|
s(g);
|
|
3689
3689
|
const w = p.firstChild;
|
|
3690
3690
|
if (w) {
|
|
3691
|
-
const { height:
|
|
3692
|
-
h({ height:
|
|
3691
|
+
const { height: C, width: R } = w.getBoundingClientRect();
|
|
3692
|
+
h({ height: C, width: R });
|
|
3693
3693
|
}
|
|
3694
3694
|
f({
|
|
3695
3695
|
column: fo("column-gap", getComputedStyle(p).columnGap, m),
|
|
@@ -3832,7 +3832,7 @@ const kl = /* @__PURE__ */ ye(() => {
|
|
|
3832
3832
|
Pl
|
|
3833
3833
|
), Al = /* @__PURE__ */ ki({ useEmitter: Mi, useEmitterValue: ze, usePublisher: it }), Bl = /* @__PURE__ */ Ri({ useEmitter: Mi, useEmitterValue: ze, usePublisher: it });
|
|
3834
3834
|
function fo(e, t, n) {
|
|
3835
|
-
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t,
|
|
3835
|
+
return t !== "normal" && !(t != null && t.endsWith("px")) && n(`${e} was not resolved to pixel value correctly`, t, Ye.WARN), t === "normal" ? 0 : parseInt(t ?? "0", 10);
|
|
3836
3836
|
}
|
|
3837
3837
|
const zn = Ft(void 0);
|
|
3838
3838
|
function _e(e, t) {
|
|
@@ -3858,7 +3858,7 @@ const Hl = ({ containerRef: e }) => {
|
|
|
3858
3858
|
const t = j((c) => c.rangeStartGI), n = j((c) => c.rangeEndGI), r = j((c) => c.setRange), o = It(), i = t != null && n != null, [s, u] = pt(null), [a, l] = pt(null), d = ie(null), h = ie({ startGI: t, endGI: n });
|
|
3859
3859
|
h.current = { startGI: t, endGI: n };
|
|
3860
3860
|
const f = ie(r);
|
|
3861
|
-
f.current = r,
|
|
3861
|
+
f.current = r, fe(() => {
|
|
3862
3862
|
if (!i || t == null || n == null) {
|
|
3863
3863
|
u(null), l(null);
|
|
3864
3864
|
return;
|
|
@@ -3866,20 +3866,20 @@ const Hl = ({ containerRef: e }) => {
|
|
|
3866
3866
|
const c = () => {
|
|
3867
3867
|
const g = e.current;
|
|
3868
3868
|
if (!g) return;
|
|
3869
|
-
const w = g.getBoundingClientRect(),
|
|
3870
|
-
if (
|
|
3871
|
-
const S =
|
|
3869
|
+
const w = g.getBoundingClientRect(), R = 1 / (o.getState().playbackScale || 1), O = g.querySelector(`[data-g="${t}"]`), b = g.querySelector(`[data-g="${n}"]`);
|
|
3870
|
+
if (O) {
|
|
3871
|
+
const S = O.getBoundingClientRect();
|
|
3872
3872
|
u({
|
|
3873
|
-
x: (S.left - w.left) *
|
|
3874
|
-
y: (S.bottom - w.top) *
|
|
3873
|
+
x: (S.left - w.left) * R,
|
|
3874
|
+
y: (S.bottom - w.top) * R
|
|
3875
3875
|
});
|
|
3876
3876
|
} else
|
|
3877
3877
|
u(null);
|
|
3878
3878
|
if (b) {
|
|
3879
3879
|
const S = b.getBoundingClientRect();
|
|
3880
3880
|
l({
|
|
3881
|
-
x: (S.right - w.left) *
|
|
3882
|
-
y: (S.bottom - w.top) *
|
|
3881
|
+
x: (S.right - w.left) * R,
|
|
3882
|
+
y: (S.bottom - w.top) * R
|
|
3883
3883
|
});
|
|
3884
3884
|
} else
|
|
3885
3885
|
l(null);
|
|
@@ -3893,20 +3893,20 @@ const Hl = ({ containerRef: e }) => {
|
|
|
3893
3893
|
const m = ne((c, p) => {
|
|
3894
3894
|
var w;
|
|
3895
3895
|
const g = document.elementsFromPoint(c, p);
|
|
3896
|
-
for (const
|
|
3897
|
-
const
|
|
3898
|
-
if (
|
|
3899
|
-
return parseInt(
|
|
3896
|
+
for (const C of g) {
|
|
3897
|
+
const R = (w = C.getAttribute) == null ? void 0 : w.call(C, "data-g");
|
|
3898
|
+
if (R != null)
|
|
3899
|
+
return parseInt(R, 10);
|
|
3900
3900
|
}
|
|
3901
3901
|
return null;
|
|
3902
3902
|
}, []);
|
|
3903
|
-
|
|
3903
|
+
fe(() => {
|
|
3904
3904
|
const c = (g) => {
|
|
3905
3905
|
if (!d.current) return;
|
|
3906
|
-
const { startGI: w, endGI:
|
|
3907
|
-
if (w == null ||
|
|
3908
|
-
const
|
|
3909
|
-
|
|
3906
|
+
const { startGI: w, endGI: C } = h.current;
|
|
3907
|
+
if (w == null || C == null) return;
|
|
3908
|
+
const R = m(g.clientX, g.clientY);
|
|
3909
|
+
R != null && (d.current === "start" ? R <= C ? f.current(R, C) : (f.current(C, R), d.current = "end") : R >= w ? f.current(w, R) : (f.current(R, w), d.current = "start"));
|
|
3910
3910
|
}, p = () => {
|
|
3911
3911
|
d.current = null, setTimeout(() => {
|
|
3912
3912
|
vr = !1;
|
|
@@ -3980,7 +3980,7 @@ const Hl = ({ containerRef: e }) => {
|
|
|
3980
3980
|
}
|
|
3981
3981
|
return !!o.done && !!i.done;
|
|
3982
3982
|
};
|
|
3983
|
-
function
|
|
3983
|
+
function Ql(e, t) {
|
|
3984
3984
|
return Object.is(e, t) ? !0 : typeof e != "object" || e === null || typeof t != "object" || t === null || Object.getPrototypeOf(e) !== Object.getPrototypeOf(t) ? !1 : go(e) && go(t) ? ho(e) && ho(t) ? mo(e, t) : Xl(e, t) : mo(
|
|
3985
3985
|
{ entries: () => Object.entries(e) },
|
|
3986
3986
|
{ entries: () => Object.entries(t) }
|
|
@@ -3990,10 +3990,10 @@ function nn(e) {
|
|
|
3990
3990
|
const t = D.useRef(void 0);
|
|
3991
3991
|
return (n) => {
|
|
3992
3992
|
const r = e(n);
|
|
3993
|
-
return
|
|
3993
|
+
return Ql(t.current, r) ? t.current : t.current = r;
|
|
3994
3994
|
};
|
|
3995
3995
|
}
|
|
3996
|
-
function
|
|
3996
|
+
function Yl(e) {
|
|
3997
3997
|
const t = e.replace("#", ""), n = parseInt(t.length === 3 ? t.repeat(2) : t, 16), r = n >> 16 & 255, o = n >> 8 & 255, i = n & 255;
|
|
3998
3998
|
return { r, g: o, b: i };
|
|
3999
3999
|
}
|
|
@@ -4007,14 +4007,14 @@ const Jl = Object.freeze({
|
|
|
4007
4007
|
pointerColor: void 0
|
|
4008
4008
|
}), Oi = D.memo(
|
|
4009
4009
|
function({ runs: t, ns: n, baseIndex: r, preGroups: o }) {
|
|
4010
|
-
const i = _e((
|
|
4011
|
-
(
|
|
4010
|
+
const i = _e((M) => M.setClipIndex), s = _e((M) => M.seek), u = j((M) => M.setCurrentGlobalRunIndex), a = xn(), l = j((M) => M.rangeStartGI), d = j((M) => M.rangeEndGI), h = j((M) => M.setRange), f = l != null && d != null, m = ne(
|
|
4011
|
+
(M) => {
|
|
4012
4012
|
var re;
|
|
4013
|
-
const P = (re =
|
|
4013
|
+
const P = (re = M.target) == null ? void 0 : re.closest("[data-g]");
|
|
4014
4014
|
if (!P) return;
|
|
4015
|
-
const I = Number(P.dataset.g),
|
|
4016
|
-
if (
|
|
4017
|
-
const z = t[
|
|
4015
|
+
const I = Number(P.dataset.g), _ = I - r;
|
|
4016
|
+
if (_ < 0 || _ >= t.length) return;
|
|
4017
|
+
const z = t[_], N = z.text ?? "";
|
|
4018
4018
|
if (!N.trim() || !/[가-힣a-zA-Z0-9]/.test(N)) return;
|
|
4019
4019
|
u(I, "program");
|
|
4020
4020
|
const A = z.audioChunkIndex, V = z.audioTimeMs;
|
|
@@ -4022,12 +4022,12 @@ const Jl = Object.freeze({
|
|
|
4022
4022
|
},
|
|
4023
4023
|
[t, r, s, i, u]
|
|
4024
4024
|
), v = ie(null), y = ie(!1), c = ie({ x: 0, y: 0 }), p = ne(
|
|
4025
|
-
(
|
|
4025
|
+
(M) => {
|
|
4026
4026
|
var z;
|
|
4027
|
-
const P = (z =
|
|
4027
|
+
const P = (z = M.target) == null ? void 0 : z.closest("[data-g]");
|
|
4028
4028
|
if (!P) return;
|
|
4029
|
-
const I = Number(P.dataset.g),
|
|
4030
|
-
|
|
4029
|
+
const I = Number(P.dataset.g), _ = I - r;
|
|
4030
|
+
_ < 0 || _ >= t.length || (y.current = !1, c.current = { x: M.clientX, y: M.clientY }, v.current && (window.clearTimeout(v.current), v.current = null), v.current = window.setTimeout(() => {
|
|
4031
4031
|
a.getState().status !== "playing" && (h(I, I), y.current = !0, v.current = null);
|
|
4032
4032
|
}, 800));
|
|
4033
4033
|
},
|
|
@@ -4035,29 +4035,29 @@ const Jl = Object.freeze({
|
|
|
4035
4035
|
), g = ne(() => {
|
|
4036
4036
|
v.current && (window.clearTimeout(v.current), v.current = null);
|
|
4037
4037
|
}, []), w = ne(
|
|
4038
|
-
(
|
|
4038
|
+
(M) => {
|
|
4039
4039
|
if (!v.current) return;
|
|
4040
|
-
const P =
|
|
4040
|
+
const P = M.clientX - c.current.x, I = M.clientY - c.current.y;
|
|
4041
4041
|
(Math.abs(P) > 5 || Math.abs(I) > 5) && g();
|
|
4042
4042
|
},
|
|
4043
4043
|
[g]
|
|
4044
|
-
),
|
|
4044
|
+
), C = ne(() => {
|
|
4045
4045
|
g();
|
|
4046
|
-
}, [g]),
|
|
4047
|
-
(
|
|
4048
|
-
var
|
|
4046
|
+
}, [g]), R = g, O = g, b = j((M) => M.clearRange), S = ne(
|
|
4047
|
+
(M) => {
|
|
4048
|
+
var _;
|
|
4049
4049
|
if (y.current) {
|
|
4050
4050
|
y.current = !1;
|
|
4051
4051
|
return;
|
|
4052
4052
|
}
|
|
4053
4053
|
if (Ei()) return;
|
|
4054
|
-
const P = (
|
|
4054
|
+
const P = (_ = M.target) == null ? void 0 : _.closest("[data-g]");
|
|
4055
4055
|
if (!P) return;
|
|
4056
4056
|
const I = Number(P.dataset.g);
|
|
4057
|
-
isNaN(I) || f && l != null && d != null && (b(),
|
|
4057
|
+
isNaN(I) || f && l != null && d != null && (b(), M.stopPropagation());
|
|
4058
4058
|
},
|
|
4059
4059
|
[f, l, d, b]
|
|
4060
|
-
),
|
|
4060
|
+
), k = o, T = r + t.length - 1;
|
|
4061
4061
|
return /* @__PURE__ */ x(
|
|
4062
4062
|
"span",
|
|
4063
4063
|
{
|
|
@@ -4065,20 +4065,20 @@ const Jl = Object.freeze({
|
|
|
4065
4065
|
onDoubleClick: m,
|
|
4066
4066
|
onPointerDown: p,
|
|
4067
4067
|
onPointerMove: w,
|
|
4068
|
-
onPointerUp:
|
|
4069
|
-
onPointerCancel:
|
|
4070
|
-
onPointerLeave:
|
|
4071
|
-
children:
|
|
4068
|
+
onPointerUp: C,
|
|
4069
|
+
onPointerCancel: R,
|
|
4070
|
+
onPointerLeave: O,
|
|
4071
|
+
children: k.map((M, P) => /* @__PURE__ */ x(
|
|
4072
4072
|
ta,
|
|
4073
4073
|
{
|
|
4074
4074
|
ns: n,
|
|
4075
|
-
group:
|
|
4075
|
+
group: M,
|
|
4076
4076
|
runs: t,
|
|
4077
|
-
paraLastG:
|
|
4077
|
+
paraLastG: T,
|
|
4078
4078
|
rangeStartGI: l,
|
|
4079
4079
|
rangeEndGI: d
|
|
4080
4080
|
},
|
|
4081
|
-
`${n}/grp:${P}-${
|
|
4081
|
+
`${n}/grp:${P}-${M.startG}`
|
|
4082
4082
|
))
|
|
4083
4083
|
}
|
|
4084
4084
|
);
|
|
@@ -4126,22 +4126,22 @@ const Jl = Object.freeze({
|
|
|
4126
4126
|
"--ul-offset": "0.35em"
|
|
4127
4127
|
} : void 0;
|
|
4128
4128
|
return /* @__PURE__ */ x(wt, { children: Array.from({ length: f }).map((c, p) => {
|
|
4129
|
-
const w = r[h + p],
|
|
4129
|
+
const w = r[h + p], C = n.startG + p, R = `${t}/run:${C}`, O = !!w.split && C !== o;
|
|
4130
4130
|
let b = `${dt.runWrap}`;
|
|
4131
4131
|
return m && (f === 1 ? b += ` ${dt.highlight}` : p === 0 ? b += ` ${dt.highlightleft}` : p + 1 === f ? b += ` ${dt.highlightright}` : b += ` ${dt.highlightcenter}`), v && (f === 1 ? b += ` ${dt.underline}` : p === 0 ? b += ` ${dt.underlineleft}` : p + 1 === f ? b += ` ${dt.underlineright}` : b += ` ${dt.underlinecenter}`), /* @__PURE__ */ ee(D.Fragment, { children: [
|
|
4132
4132
|
/* @__PURE__ */ x("span", { className: b, style: y, children: /* @__PURE__ */ x(
|
|
4133
4133
|
na,
|
|
4134
4134
|
{
|
|
4135
4135
|
gi: n.startG,
|
|
4136
|
-
g:
|
|
4136
|
+
g: C,
|
|
4137
4137
|
run: w,
|
|
4138
4138
|
active: a,
|
|
4139
4139
|
pointerCfg: d,
|
|
4140
|
-
isInRange: i != null && s != null &&
|
|
4140
|
+
isInRange: i != null && s != null && C >= i && C <= s
|
|
4141
4141
|
}
|
|
4142
4142
|
) }),
|
|
4143
|
-
|
|
4144
|
-
] },
|
|
4143
|
+
O && /* @__PURE__ */ x(ea, {})
|
|
4144
|
+
] }, R);
|
|
4145
4145
|
}) });
|
|
4146
4146
|
},
|
|
4147
4147
|
(e, t) => e.group === t.group && // 그룹 메타 참조 동일
|
|
@@ -4162,7 +4162,7 @@ const Jl = Object.freeze({
|
|
|
4162
4162
|
const l = i.pointerColor;
|
|
4163
4163
|
if (i.pointerStyle !== "underline") {
|
|
4164
4164
|
a.backgroundColor = l;
|
|
4165
|
-
const d = l.startsWith("#") ?
|
|
4165
|
+
const d = l.startsWith("#") ? Yl(l) : Zl(l);
|
|
4166
4166
|
d && (0.299 * d.r + 0.587 * d.g + 0.114 * d.b) / 255 < 0.6 && (a.color = "#fff");
|
|
4167
4167
|
}
|
|
4168
4168
|
}
|
|
@@ -4731,24 +4731,24 @@ function _a({
|
|
|
4731
4731
|
nsPrefix: n
|
|
4732
4732
|
}) {
|
|
4733
4733
|
const r = me(() => {
|
|
4734
|
-
const
|
|
4735
|
-
return t.forEach((
|
|
4736
|
-
|
|
4737
|
-
}),
|
|
4738
|
-
}, [t]), o = j((
|
|
4739
|
-
var
|
|
4740
|
-
return ((
|
|
4741
|
-
}), i = j((
|
|
4742
|
-
var
|
|
4743
|
-
return ((
|
|
4744
|
-
}), s = X((
|
|
4734
|
+
const k = [], T = Ar();
|
|
4735
|
+
return t.forEach((M, P) => {
|
|
4736
|
+
M.type === "paragraph" && (k[P] = Br(M, T));
|
|
4737
|
+
}), k;
|
|
4738
|
+
}, [t]), o = j((k) => {
|
|
4739
|
+
var T;
|
|
4740
|
+
return ((T = k.layout) == null ? void 0 : T.prefix) ?? [];
|
|
4741
|
+
}), i = j((k) => {
|
|
4742
|
+
var T;
|
|
4743
|
+
return ((T = k.derivedNav) == null ? void 0 : T.splitGroupsPerBlock) ?? [];
|
|
4744
|
+
}), s = X((k) => k.marginX), u = X((k) => k.viewportHeight), a = ie({
|
|
4745
4745
|
start: 0,
|
|
4746
4746
|
end: 0
|
|
4747
4747
|
}), l = ne(
|
|
4748
|
-
(
|
|
4749
|
-
const
|
|
4750
|
-
if (
|
|
4751
|
-
const { src:
|
|
4748
|
+
(k) => {
|
|
4749
|
+
const T = t[k], M = `${n}blk-${T.id}`;
|
|
4750
|
+
if (T.type === "image") {
|
|
4751
|
+
const { src: _, alt: z, width: N, height: A } = T, V = N && A ? `${N} / ${A}` : "4 / 3", re = k >= a.current.start && k <= a.current.end, be = u > 80 ? Math.floor((u - 80) * 0.6) : void 0;
|
|
4752
4752
|
return /* @__PURE__ */ ee("div", { style: { margin: "12px 0", textAlign: "center", width: "100%" }, children: [
|
|
4753
4753
|
/* @__PURE__ */ x(
|
|
4754
4754
|
"div",
|
|
@@ -4762,7 +4762,7 @@ function _a({
|
|
|
4762
4762
|
children: /* @__PURE__ */ x(
|
|
4763
4763
|
"img",
|
|
4764
4764
|
{
|
|
4765
|
-
src:
|
|
4765
|
+
src: _,
|
|
4766
4766
|
alt: z || "",
|
|
4767
4767
|
loading: re ? "eager" : "lazy",
|
|
4768
4768
|
style: {
|
|
@@ -4782,7 +4782,7 @@ function _a({
|
|
|
4782
4782
|
z && /* @__PURE__ */ x("div", { style: { fontSize: 12, color: "#6b7280", marginTop: 4 }, children: z })
|
|
4783
4783
|
] });
|
|
4784
4784
|
}
|
|
4785
|
-
const P = r[
|
|
4785
|
+
const P = r[k] ?? void 0, I = i[k];
|
|
4786
4786
|
return /* @__PURE__ */ x(
|
|
4787
4787
|
"div",
|
|
4788
4788
|
{
|
|
@@ -4793,10 +4793,10 @@ function _a({
|
|
|
4793
4793
|
children: /* @__PURE__ */ x(
|
|
4794
4794
|
oa,
|
|
4795
4795
|
{
|
|
4796
|
-
block:
|
|
4796
|
+
block: T,
|
|
4797
4797
|
computedMarker: P,
|
|
4798
|
-
ns:
|
|
4799
|
-
baseIndex: o[
|
|
4798
|
+
ns: M,
|
|
4799
|
+
baseIndex: o[k],
|
|
4800
4800
|
sectionId: e.section_id,
|
|
4801
4801
|
preGroups: I
|
|
4802
4802
|
}
|
|
@@ -4805,12 +4805,12 @@ function _a({
|
|
|
4805
4805
|
);
|
|
4806
4806
|
},
|
|
4807
4807
|
[t, r, o, n, e, i, u]
|
|
4808
|
-
), d = ie(null), h = ne((
|
|
4809
|
-
d.current =
|
|
4808
|
+
), d = ie(null), h = ne((k) => {
|
|
4809
|
+
d.current = k;
|
|
4810
4810
|
}, []), f = me(
|
|
4811
|
-
() => Wt((
|
|
4812
|
-
const { style:
|
|
4813
|
-
return /* @__PURE__ */ x("div", { ...P, style:
|
|
4811
|
+
() => Wt((k) => {
|
|
4812
|
+
const { style: T, children: M, ...P } = k;
|
|
4813
|
+
return /* @__PURE__ */ x("div", { ...P, style: T, children: /* @__PURE__ */ x(
|
|
4814
4814
|
"div",
|
|
4815
4815
|
{
|
|
4816
4816
|
style: {
|
|
@@ -4824,13 +4824,13 @@ function _a({
|
|
|
4824
4824
|
width: "100%",
|
|
4825
4825
|
height: "100%"
|
|
4826
4826
|
},
|
|
4827
|
-
children:
|
|
4827
|
+
children: M
|
|
4828
4828
|
}
|
|
4829
4829
|
) });
|
|
4830
4830
|
}),
|
|
4831
4831
|
[s]
|
|
4832
|
-
), m = ie(null), v = me(() => t.map((
|
|
4833
|
-
|
|
4832
|
+
), m = ie(null), v = me(() => t.map((k) => k.id), [t]), [y, c] = pt(!1);
|
|
4833
|
+
fe(() => {
|
|
4834
4834
|
c(!1);
|
|
4835
4835
|
}, [t]);
|
|
4836
4836
|
const p = ne(() => {
|
|
@@ -4838,11 +4838,11 @@ function _a({
|
|
|
4838
4838
|
}, []), g = ne(() => {
|
|
4839
4839
|
if (!y)
|
|
4840
4840
|
return /* @__PURE__ */ x("div", { style: { height: 40 } });
|
|
4841
|
-
const
|
|
4842
|
-
return
|
|
4841
|
+
const k = e.quizzes, T = Math.max(80, Math.floor(u * 0.5));
|
|
4842
|
+
return k && k.length ? /* @__PURE__ */ ee("div", { style: { display: "block" }, children: [
|
|
4843
4843
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Ai, {}) }),
|
|
4844
4844
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Tn, { isIcon: !1 }) }),
|
|
4845
|
-
/* @__PURE__ */ x("div", { style: { height:
|
|
4845
|
+
/* @__PURE__ */ x("div", { style: { height: T, width: "100%" } })
|
|
4846
4846
|
] }) : /* @__PURE__ */ ee("div", { children: [
|
|
4847
4847
|
/* @__PURE__ */ x("div", { style: { display: "flex", justifyContent: "center", marginTop: 20 }, children: /* @__PURE__ */ x(Tn, { isIcon: !1 }) }),
|
|
4848
4848
|
/* @__PURE__ */ x("div", { style: { height: 40 } })
|
|
@@ -4861,28 +4861,28 @@ function _a({
|
|
|
4861
4861
|
// , ScrollPlaceholder
|
|
4862
4862
|
]
|
|
4863
4863
|
// CustomScroller는 고정이면 deps에 안 넣어도 OK
|
|
4864
|
-
),
|
|
4864
|
+
), C = ne((k) => v[k], [v]), R = yt(), [O] = pt(() => R.getState().progress.currentGlobalRunIndex ?? 0), b = me(() => {
|
|
4865
4865
|
if (!o.length) return 0;
|
|
4866
|
-
const
|
|
4867
|
-
return Li(o,
|
|
4868
|
-
}, [o,
|
|
4866
|
+
const k = o[o.length - 1], T = Math.max(0, Math.min(O, k));
|
|
4867
|
+
return Li(o, T);
|
|
4868
|
+
}, [o, O]);
|
|
4869
4869
|
console.log("SectionRenderVirtuoso확인");
|
|
4870
4870
|
const S = yt();
|
|
4871
|
-
return
|
|
4872
|
-
let
|
|
4871
|
+
return fe(() => {
|
|
4872
|
+
let k = !1;
|
|
4873
4873
|
return (async () => {
|
|
4874
|
-
let
|
|
4875
|
-
if (!
|
|
4876
|
-
for (let
|
|
4877
|
-
if (await new Promise((z) => setTimeout(z, 50)),
|
|
4878
|
-
if (
|
|
4874
|
+
let T = d.current;
|
|
4875
|
+
if (!T) {
|
|
4876
|
+
for (let _ = 0; _ < 20; _++) {
|
|
4877
|
+
if (await new Promise((z) => setTimeout(z, 50)), k) return;
|
|
4878
|
+
if (T = d.current, T) break;
|
|
4879
4879
|
}
|
|
4880
|
-
if (!
|
|
4880
|
+
if (!T) return;
|
|
4881
4881
|
}
|
|
4882
|
-
const
|
|
4883
|
-
await zi(
|
|
4882
|
+
const M = S.getState().progress.currentGlobalRunIndex, P = S.getState().progress.setSectionLoading, I = M != null && M >= 0 ? M : 0;
|
|
4883
|
+
await zi(T, I), !k && (await St(), await St(), await St(), await St(), !k && P(!1));
|
|
4884
4884
|
})(), () => {
|
|
4885
|
-
|
|
4885
|
+
k = !0;
|
|
4886
4886
|
};
|
|
4887
4887
|
}, [d, S]), /* @__PURE__ */ ee(wt, { children: [
|
|
4888
4888
|
/* @__PURE__ */ x(
|
|
@@ -4897,7 +4897,7 @@ function _a({
|
|
|
4897
4897
|
// padding: `${marginY}px ${marginX}px`,
|
|
4898
4898
|
},
|
|
4899
4899
|
defaultItemHeight: 99,
|
|
4900
|
-
computeItemKey:
|
|
4900
|
+
computeItemKey: C,
|
|
4901
4901
|
totalCount: t.length,
|
|
4902
4902
|
itemContent: l,
|
|
4903
4903
|
initialTopMostItemIndex: b,
|
|
@@ -4927,8 +4927,8 @@ const Ma = ({
|
|
|
4927
4927
|
d.current = null;
|
|
4928
4928
|
const I = h.current;
|
|
4929
4929
|
if (!I) return;
|
|
4930
|
-
const
|
|
4931
|
-
|
|
4930
|
+
const _ = ga(I, 5);
|
|
4931
|
+
_ !== -1 && _ !== m.current && (m.current = _, u(_), r(_, "scroll"));
|
|
4932
4932
|
}, [s, u, r]), y = ne(
|
|
4933
4933
|
(I) => {
|
|
4934
4934
|
h.current = I, d.current == null && (d.current = requestAnimationFrame(v));
|
|
@@ -4938,11 +4938,11 @@ const Ma = ({
|
|
|
4938
4938
|
(I) => {
|
|
4939
4939
|
h.current = I, f.current != null && (window.clearTimeout(f.current), f.current = null), f.current = window.setTimeout(() => {
|
|
4940
4940
|
f.current = null, v();
|
|
4941
|
-
const
|
|
4942
|
-
if (
|
|
4941
|
+
const _ = m.current;
|
|
4942
|
+
if (_ === -1) return;
|
|
4943
4943
|
const z = I.scrollTop, N = I.scrollHeight - I.clientHeight, A = N > 0 ? z / N : 0;
|
|
4944
4944
|
let V = 0;
|
|
4945
|
-
const re = I.querySelector(`[data-g="${
|
|
4945
|
+
const re = I.querySelector(`[data-g="${_}"]`);
|
|
4946
4946
|
if (re) {
|
|
4947
4947
|
const be = I.getBoundingClientRect();
|
|
4948
4948
|
V = (re.getBoundingClientRect().top - be.top) / be.height;
|
|
@@ -4952,7 +4952,7 @@ const Ma = ({
|
|
|
4952
4952
|
payload: {
|
|
4953
4953
|
scrollTop: z,
|
|
4954
4954
|
scrollRatio: A,
|
|
4955
|
-
anchorGI:
|
|
4955
|
+
anchorGI: _,
|
|
4956
4956
|
anchorOffsetRatio: V
|
|
4957
4957
|
}
|
|
4958
4958
|
});
|
|
@@ -4964,23 +4964,23 @@ const Ma = ({
|
|
|
4964
4964
|
s || l.current && (p.current || (y(I), c(I)));
|
|
4965
4965
|
},
|
|
4966
4966
|
[s, y, c]
|
|
4967
|
-
), w = ie(void 0),
|
|
4968
|
-
|
|
4967
|
+
), w = ie(void 0), C = ie(void 0), R = ie(void 0), O = ie(void 0);
|
|
4968
|
+
fe(() => {
|
|
4969
4969
|
const I = e.current;
|
|
4970
4970
|
if (I)
|
|
4971
4971
|
return w.current = () => {
|
|
4972
4972
|
l.current = !0;
|
|
4973
|
-
},
|
|
4973
|
+
}, C.current = () => {
|
|
4974
4974
|
l.current = !0;
|
|
4975
|
-
},
|
|
4975
|
+
}, R.current = () => {
|
|
4976
4976
|
l.current = !0;
|
|
4977
|
-
},
|
|
4978
|
-
I.removeEventListener("wheel", w.current), I.removeEventListener("touchmove",
|
|
4977
|
+
}, O.current = () => g(I), I.addEventListener("wheel", w.current, { passive: !0 }), I.addEventListener("touchmove", C.current, { passive: !0 }), window.addEventListener("keydown", R.current, { passive: !0 }), I.addEventListener("scroll", O.current, { passive: !0 }), () => {
|
|
4978
|
+
I.removeEventListener("wheel", w.current), I.removeEventListener("touchmove", C.current), window.removeEventListener("keydown", R.current), I.removeEventListener("scroll", O.current), d.current != null && cancelAnimationFrame(d.current), f.current != null && (clearTimeout(f.current), f.current = null);
|
|
4979
4979
|
};
|
|
4980
|
-
}, [g, e]),
|
|
4980
|
+
}, [g, e]), fe(() => {
|
|
4981
4981
|
const I = e.current;
|
|
4982
4982
|
if (!I || !s) return;
|
|
4983
|
-
const
|
|
4983
|
+
const _ = (V) => {
|
|
4984
4984
|
V.preventDefault(), V.stopPropagation(), l.current = !1;
|
|
4985
4985
|
}, z = (V) => {
|
|
4986
4986
|
V.preventDefault(), V.stopPropagation(), l.current = !1;
|
|
@@ -4990,39 +4990,39 @@ const Ma = ({
|
|
|
4990
4990
|
overscrollBehavior: I.style.overscrollBehavior,
|
|
4991
4991
|
touchAction: I.style.touchAction
|
|
4992
4992
|
};
|
|
4993
|
-
return I.style.overscrollBehavior = "contain", I.style.touchAction = "none", I.addEventListener("wheel",
|
|
4994
|
-
I.removeEventListener("wheel",
|
|
4993
|
+
return I.style.overscrollBehavior = "contain", I.style.touchAction = "none", I.addEventListener("wheel", _, { passive: !1 }), I.addEventListener("touchmove", z, { passive: !1 }), window.addEventListener("keydown", N, { passive: !1 }), () => {
|
|
4994
|
+
I.removeEventListener("wheel", _), I.removeEventListener("touchmove", z), window.removeEventListener("keydown", N), I.style.overscrollBehavior = A.overscrollBehavior, I.style.touchAction = A.touchAction;
|
|
4995
4995
|
};
|
|
4996
4996
|
}, [s, e]);
|
|
4997
4997
|
const b = ie({
|
|
4998
4998
|
first: -1,
|
|
4999
4999
|
last: -1
|
|
5000
|
-
}), S = ie(!1),
|
|
5000
|
+
}), S = ie(!1), k = ne(() => {
|
|
5001
5001
|
const I = e.current;
|
|
5002
5002
|
if (!I) return;
|
|
5003
|
-
const
|
|
5003
|
+
const _ = So(I), z = (_ == null ? void 0 : _.first) ?? -1, N = (_ == null ? void 0 : _.last) ?? -1;
|
|
5004
5004
|
b.current = { first: z, last: N };
|
|
5005
|
-
}, [e]),
|
|
5005
|
+
}, [e]), T = ie(!1), M = ne(() => {
|
|
5006
5006
|
const I = e.current;
|
|
5007
|
-
if (!I ||
|
|
5008
|
-
|
|
5009
|
-
const
|
|
5007
|
+
if (!I || T.current) return;
|
|
5008
|
+
T.current = !0;
|
|
5009
|
+
const _ = Math.min(
|
|
5010
5010
|
I.scrollTop + Math.floor(I.clientHeight * 0.6),
|
|
5011
5011
|
I.scrollHeight - I.clientHeight
|
|
5012
5012
|
);
|
|
5013
5013
|
requestAnimationFrame(() => {
|
|
5014
|
-
I.scrollTo({ top:
|
|
5014
|
+
I.scrollTo({ top: _, behavior: "instant" });
|
|
5015
5015
|
});
|
|
5016
5016
|
}, [e]);
|
|
5017
|
-
|
|
5018
|
-
!S.current && s && (
|
|
5019
|
-
}, [s,
|
|
5017
|
+
fe(() => {
|
|
5018
|
+
!S.current && s && (T.current = !1, k()), S.current = s;
|
|
5019
|
+
}, [s, k]), fe(() => {
|
|
5020
5020
|
if (s !== !0) return;
|
|
5021
5021
|
const I = e.current;
|
|
5022
5022
|
if (!I) return;
|
|
5023
|
-
const { first:
|
|
5024
|
-
if (
|
|
5025
|
-
|
|
5023
|
+
const { first: _, last: z } = b.current;
|
|
5024
|
+
if (_ === -1 || z === -1) {
|
|
5025
|
+
M();
|
|
5026
5026
|
return;
|
|
5027
5027
|
}
|
|
5028
5028
|
if (I.scrollTop <= 1) {
|
|
@@ -5036,11 +5036,11 @@ const Ma = ({
|
|
|
5036
5036
|
} finally {
|
|
5037
5037
|
p.current = !1;
|
|
5038
5038
|
}
|
|
5039
|
-
|
|
5039
|
+
k();
|
|
5040
5040
|
})();
|
|
5041
5041
|
return;
|
|
5042
5042
|
}
|
|
5043
|
-
if (i <
|
|
5043
|
+
if (i < _ || i > z) {
|
|
5044
5044
|
async function A() {
|
|
5045
5045
|
if (!I) return;
|
|
5046
5046
|
const V = I.scrollTop <= 1 ? 0 : 0.2;
|
|
@@ -5050,26 +5050,26 @@ const Ma = ({
|
|
|
5050
5050
|
});
|
|
5051
5051
|
}
|
|
5052
5052
|
A().then((V) => {
|
|
5053
|
-
V ?
|
|
5053
|
+
V ? k() : M();
|
|
5054
5054
|
});
|
|
5055
5055
|
}
|
|
5056
5056
|
}, [
|
|
5057
5057
|
s,
|
|
5058
5058
|
i,
|
|
5059
|
-
|
|
5060
|
-
|
|
5059
|
+
M,
|
|
5060
|
+
k,
|
|
5061
5061
|
e
|
|
5062
5062
|
]);
|
|
5063
5063
|
const P = ne(() => {
|
|
5064
5064
|
const I = e.current;
|
|
5065
5065
|
if (!I) return;
|
|
5066
|
-
function
|
|
5066
|
+
function _(G, E, L = 0.2, q = 0.8) {
|
|
5067
5067
|
const B = G.querySelector(`[data-g="${E}"]`);
|
|
5068
5068
|
if (!B) return !1;
|
|
5069
5069
|
const Z = G.getBoundingClientRect(), F = B.getBoundingClientRect();
|
|
5070
5070
|
if (F.height <= 0 || Z.height <= 0) return !1;
|
|
5071
|
-
const
|
|
5072
|
-
return
|
|
5071
|
+
const Q = (F.top + F.height / 2 - Z.top) / Z.height;
|
|
5072
|
+
return Q >= L && Q <= q;
|
|
5073
5073
|
}
|
|
5074
5074
|
const z = (G) => G === "instant" ? "auto" : G, N = (G) => {
|
|
5075
5075
|
const E = I.scrollTop, L = I.scrollHeight - I.clientHeight, q = L > 0 ? E / L : 0;
|
|
@@ -5097,7 +5097,7 @@ const Ma = ({
|
|
|
5097
5097
|
behavior: z(E)
|
|
5098
5098
|
}), await zi(I, G);
|
|
5099
5099
|
}, V = () => new Promise((G) => requestAnimationFrame(() => G())), re = async (G) => {
|
|
5100
|
-
if (
|
|
5100
|
+
if (_(I, G, 0.1, 0.7))
|
|
5101
5101
|
return N(G), !0;
|
|
5102
5102
|
p.current = !0;
|
|
5103
5103
|
const E = I.querySelector(`[data-g="${G}"]`), L = I.getBoundingClientRect();
|
|
@@ -5110,7 +5110,7 @@ const Ma = ({
|
|
|
5110
5110
|
return B ? (await jn(I, G, {
|
|
5111
5111
|
behavior: "smooth",
|
|
5112
5112
|
topPaddingRatio: q
|
|
5113
|
-
}), await V()) : B || await A(G, "auto"), p.current = !1, N(G),
|
|
5113
|
+
}), await V()) : B || await A(G, "auto"), p.current = !1, N(G), _(I, G, 0.1, 0.7);
|
|
5114
5114
|
}, be = async (G) => re(G);
|
|
5115
5115
|
return {
|
|
5116
5116
|
ensureVisibleGI: re,
|
|
@@ -5130,7 +5130,7 @@ const Ma = ({
|
|
|
5130
5130
|
await be(G), await new Promise((J) => requestAnimationFrame(() => requestAnimationFrame(J)));
|
|
5131
5131
|
const L = I.querySelector(`[data-g="${G}"]`);
|
|
5132
5132
|
if (!L) return;
|
|
5133
|
-
const q = L.getBoundingClientRect(), B = I.getBoundingClientRect(), Z = B.height > 0 ? B.height / I.clientHeight : 1, F = (q.top - B.top) / Z,
|
|
5133
|
+
const q = L.getBoundingClientRect(), B = I.getBoundingClientRect(), Z = B.height > 0 ? B.height / I.clientHeight : 1, F = (q.top - B.top) / Z, Q = E * I.clientHeight, te = F - Q;
|
|
5134
5134
|
I.scrollTop = I.scrollTop + te;
|
|
5135
5135
|
},
|
|
5136
5136
|
getScrollRatio: () => {
|
|
@@ -5139,7 +5139,7 @@ const Ma = ({
|
|
|
5139
5139
|
}
|
|
5140
5140
|
};
|
|
5141
5141
|
}, [e, t, n, a]);
|
|
5142
|
-
return
|
|
5142
|
+
return fe(() => (console.log("@@@@@빌드스크롤api"), o(P()), () => o(void 0)), [P, o]), null;
|
|
5143
5143
|
};
|
|
5144
5144
|
function Ea(e) {
|
|
5145
5145
|
var r, o;
|
|
@@ -5203,7 +5203,7 @@ function La(e) {
|
|
|
5203
5203
|
function Ha(e) {
|
|
5204
5204
|
return Ze({ attr: { viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: "2", strokeLinecap: "round", strokeLinejoin: "round" }, child: [{ tag: "path", attr: { d: "M12 12m-1 0a1 1 0 1 0 2 0a1 1 0 1 0 -2 0" }, child: [] }, { tag: "path", attr: { d: "M4 8v-2a2 2 0 0 1 2 -2h2" }, child: [] }, { tag: "path", attr: { d: "M4 16v2a2 2 0 0 0 2 2h2" }, child: [] }, { tag: "path", attr: { d: "M16 4h2a2 2 0 0 1 2 2v2" }, child: [] }, { tag: "path", attr: { d: "M16 20h2a2 2 0 0 0 2 -2v-2" }, child: [] }] })(e);
|
|
5205
5205
|
}
|
|
5206
|
-
const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31", Da = "_row2_1hfub_34", $a = "_controls_1hfub_44", Va = "_row1_1hfub_52", qa = "_groupExpand_1hfub_80", ja = "_groupPlayback_1hfub_81", Ua = "_groupSpeed_1hfub_82", Ka = "_groupFeatures_1hfub_83", Xa = "_groupNav_1hfub_84",
|
|
5206
|
+
const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31", Da = "_row2_1hfub_34", $a = "_controls_1hfub_44", Va = "_row1_1hfub_52", qa = "_groupExpand_1hfub_80", ja = "_groupPlayback_1hfub_81", Ua = "_groupSpeed_1hfub_82", Ka = "_groupFeatures_1hfub_83", Xa = "_groupNav_1hfub_84", Qa = "_btn_1hfub_116", Ya = "_btnForbidden_1hfub_141", Za = "_btnActive_1hfub_147", Ja = "_label_1hfub_158", ec = "_compactBtn_1hfub_168", Re = {
|
|
5207
5207
|
wrap: Na,
|
|
5208
5208
|
visible: Fa,
|
|
5209
5209
|
compact: Wa,
|
|
@@ -5215,17 +5215,17 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5215
5215
|
groupSpeed: Ua,
|
|
5216
5216
|
groupFeatures: Ka,
|
|
5217
5217
|
groupNav: Xa,
|
|
5218
|
-
btn:
|
|
5219
|
-
btnForbidden:
|
|
5218
|
+
btn: Qa,
|
|
5219
|
+
btnForbidden: Ya,
|
|
5220
5220
|
btnActive: Za,
|
|
5221
5221
|
label: Ja,
|
|
5222
5222
|
compactBtn: ec
|
|
5223
5223
|
}, tc = Wt(function() {
|
|
5224
|
-
const t = ie(null), n = Ue(Ot), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), u = _e((S) => S.playbackKind), a = X((S) => S.muteAudio), l = X((S) => S.audioSpeed), d = _e((S) => S.getClipSrc), h = _e((S) => S._onTime), f = _e((S) => S._onEnded), m = _e((S) => S._onError), v = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), c = j((S) => S.snapToReadable), p = j((S) => S.edgeReadable), g = ie(null), w = ie(null),
|
|
5225
|
-
|
|
5226
|
-
u === "real" && (
|
|
5224
|
+
const t = ie(null), n = Ue(Ot), r = (n == null ? void 0 : n.getState().isPlaybackMode) ?? !1, o = _e((S) => S.status), i = _e((S) => S.currentTimeMs), s = _e((S) => S.currentClip), u = _e((S) => S.playbackKind), a = X((S) => S.muteAudio), l = X((S) => S.audioSpeed), d = _e((S) => S.getClipSrc), h = _e((S) => S._onTime), f = _e((S) => S._onEnded), m = _e((S) => S._onError), v = j((S) => S.setCurrentGlobalRunIndex), y = j((S) => S.getSectionScrollApi), c = j((S) => S.snapToReadable), p = j((S) => S.edgeReadable), g = ie(null), w = ie(null), C = ie(!1), R = ie(null);
|
|
5225
|
+
fe(() => {
|
|
5226
|
+
u === "real" && (C.current = !0);
|
|
5227
5227
|
}, [u]);
|
|
5228
|
-
const
|
|
5228
|
+
const O = me(() => {
|
|
5229
5229
|
const S = d(s);
|
|
5230
5230
|
if (!S) return null;
|
|
5231
5231
|
try {
|
|
@@ -5234,35 +5234,35 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5234
5234
|
return S;
|
|
5235
5235
|
}
|
|
5236
5236
|
}, [s, d]);
|
|
5237
|
-
|
|
5238
|
-
|
|
5239
|
-
}, [
|
|
5237
|
+
fe(() => {
|
|
5238
|
+
C.current = !0;
|
|
5239
|
+
}, [O]), fe(() => {
|
|
5240
5240
|
const S = t.current;
|
|
5241
5241
|
if (!S) return;
|
|
5242
|
-
const
|
|
5242
|
+
const k = () => {
|
|
5243
5243
|
if (S.paused || S.ended) return;
|
|
5244
5244
|
const P = S.currentTime * 1e3;
|
|
5245
|
-
|
|
5246
|
-
},
|
|
5247
|
-
var I,
|
|
5245
|
+
C.current && P === 0 || (P > 0 && (C.current = !1), h(P));
|
|
5246
|
+
}, T = () => {
|
|
5247
|
+
var I, _;
|
|
5248
5248
|
f();
|
|
5249
5249
|
const P = p(1);
|
|
5250
|
-
typeof P == "number" && P >= 0 && (v(P, "audio"), (
|
|
5251
|
-
},
|
|
5250
|
+
typeof P == "number" && P >= 0 && (v(P, "audio"), (_ = (I = y()) == null ? void 0 : I.ensureVisibleGI) == null || _.call(I, P));
|
|
5251
|
+
}, M = (P) => {
|
|
5252
5252
|
const I = P.currentTarget;
|
|
5253
5253
|
console.warn("Audio error", {
|
|
5254
5254
|
networkState: I.networkState,
|
|
5255
5255
|
readyState: I.readyState
|
|
5256
5256
|
}), m();
|
|
5257
5257
|
};
|
|
5258
|
-
return S.addEventListener("timeupdate",
|
|
5259
|
-
S.removeEventListener("timeupdate",
|
|
5258
|
+
return S.addEventListener("timeupdate", k), S.addEventListener("ended", T), S.addEventListener("error", M), () => {
|
|
5259
|
+
S.removeEventListener("timeupdate", k), S.removeEventListener("ended", T), S.removeEventListener("error", M);
|
|
5260
5260
|
};
|
|
5261
|
-
}, [h, f, m, p, v, y]),
|
|
5261
|
+
}, [h, f, m, p, v, y]), fe(() => {
|
|
5262
5262
|
if (r) return;
|
|
5263
5263
|
const S = t.current;
|
|
5264
5264
|
if (!S) return;
|
|
5265
|
-
if (!
|
|
5265
|
+
if (!O) {
|
|
5266
5266
|
try {
|
|
5267
5267
|
S.pause();
|
|
5268
5268
|
} catch (P) {
|
|
@@ -5271,29 +5271,29 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5271
5271
|
w.current = null;
|
|
5272
5272
|
return;
|
|
5273
5273
|
}
|
|
5274
|
-
const
|
|
5275
|
-
if (
|
|
5274
|
+
const k = S.currentSrc || S.src || null, T = !k || k !== O;
|
|
5275
|
+
if (T) {
|
|
5276
5276
|
try {
|
|
5277
5277
|
S.pause();
|
|
5278
5278
|
} catch (P) {
|
|
5279
5279
|
console.log("pause error", P);
|
|
5280
5280
|
}
|
|
5281
|
-
S.src =
|
|
5281
|
+
S.src = O;
|
|
5282
5282
|
try {
|
|
5283
5283
|
S.load();
|
|
5284
5284
|
} catch (P) {
|
|
5285
5285
|
console.log("load error", P);
|
|
5286
5286
|
}
|
|
5287
|
-
w.current =
|
|
5287
|
+
w.current = O;
|
|
5288
5288
|
}
|
|
5289
5289
|
S.muted = !!a, S.volume = 1, S.playbackRate = typeof l == "number" ? l : 1;
|
|
5290
|
-
const
|
|
5291
|
-
|
|
5290
|
+
const M = async () => {
|
|
5291
|
+
T && await new Promise((P) => {
|
|
5292
5292
|
let I = !1;
|
|
5293
|
-
const
|
|
5294
|
-
I || (I = !0, S.removeEventListener("loadedmetadata",
|
|
5293
|
+
const _ = () => {
|
|
5294
|
+
I || (I = !0, S.removeEventListener("loadedmetadata", _), S.removeEventListener("canplay", _), P());
|
|
5295
5295
|
};
|
|
5296
|
-
S.addEventListener("loadedmetadata",
|
|
5296
|
+
S.addEventListener("loadedmetadata", _), S.addEventListener("canplay", _), S.readyState >= 1 && _();
|
|
5297
5297
|
});
|
|
5298
5298
|
try {
|
|
5299
5299
|
await S.play();
|
|
@@ -5302,52 +5302,52 @@ const Na = "_wrap_1hfub_4", Fa = "_visible_1hfub_25", Wa = "_compact_1hfub_31",
|
|
|
5302
5302
|
}
|
|
5303
5303
|
};
|
|
5304
5304
|
if (o === "loading" || o === "playing")
|
|
5305
|
-
|
|
5305
|
+
M();
|
|
5306
5306
|
else
|
|
5307
5307
|
try {
|
|
5308
5308
|
S.pause();
|
|
5309
5309
|
} catch (P) {
|
|
5310
5310
|
console.log("pause error", P);
|
|
5311
5311
|
}
|
|
5312
|
-
}, [
|
|
5312
|
+
}, [O, a, o, l, r]), fe(() => {
|
|
5313
5313
|
if (r) return;
|
|
5314
5314
|
const S = t.current;
|
|
5315
5315
|
if (!S || u !== "real") return;
|
|
5316
|
-
const
|
|
5317
|
-
if (Number.isFinite(
|
|
5316
|
+
const k = i / 1e3;
|
|
5317
|
+
if (Number.isFinite(k)) {
|
|
5318
5318
|
if (S.readyState < 1) {
|
|
5319
5319
|
g.current = i;
|
|
5320
|
-
const
|
|
5320
|
+
const T = () => {
|
|
5321
5321
|
if (g.current != null) {
|
|
5322
|
-
const
|
|
5322
|
+
const M = g.current / 1e3;
|
|
5323
5323
|
try {
|
|
5324
|
-
S.currentTime =
|
|
5324
|
+
S.currentTime = M;
|
|
5325
5325
|
} catch (P) {
|
|
5326
5326
|
console.log("currentTime보정 오류", P);
|
|
5327
5327
|
}
|
|
5328
5328
|
g.current = null;
|
|
5329
5329
|
}
|
|
5330
|
-
S.removeEventListener("loadedmetadata",
|
|
5330
|
+
S.removeEventListener("loadedmetadata", T), S.removeEventListener("canplay", T);
|
|
5331
5331
|
};
|
|
5332
|
-
S.addEventListener("loadedmetadata",
|
|
5332
|
+
S.addEventListener("loadedmetadata", T), S.addEventListener("canplay", T);
|
|
5333
5333
|
return;
|
|
5334
5334
|
}
|
|
5335
|
-
if (Math.abs(S.currentTime -
|
|
5335
|
+
if (Math.abs(S.currentTime - k) > 0.2)
|
|
5336
5336
|
try {
|
|
5337
|
-
S.currentTime =
|
|
5338
|
-
} catch (
|
|
5339
|
-
console.log("currentTime보정오류",
|
|
5337
|
+
S.currentTime = k;
|
|
5338
|
+
} catch (T) {
|
|
5339
|
+
console.log("currentTime보정오류", T);
|
|
5340
5340
|
}
|
|
5341
5341
|
}
|
|
5342
5342
|
}, [i, u, r]);
|
|
5343
5343
|
const b = _e((S) => S.getGIFromCT);
|
|
5344
|
-
return
|
|
5345
|
-
var
|
|
5344
|
+
return fe(() => {
|
|
5345
|
+
var T, M;
|
|
5346
5346
|
if (r || u !== "real" || o !== "playing" && o !== "loading") return;
|
|
5347
5347
|
const S = b(s, i);
|
|
5348
5348
|
if (S < 0) return;
|
|
5349
|
-
const
|
|
5350
|
-
|
|
5349
|
+
const k = c(S);
|
|
5350
|
+
k !== R.current && (R.current = k, v(k, "audio"), k % 5 === 0 && ((M = (T = y()) == null ? void 0 : T.ensureVisibleGI) == null || M.call(T, k)));
|
|
5351
5351
|
}, [
|
|
5352
5352
|
o,
|
|
5353
5353
|
s,
|
|
@@ -5372,23 +5372,23 @@ const rc = "_scrubberWrap_uw0cd_2", oc = "_labels_uw0cd_9", ic = "_index_uw0cd_1
|
|
|
5372
5372
|
range: ac
|
|
5373
5373
|
};
|
|
5374
5374
|
function cc() {
|
|
5375
|
-
const e = X((
|
|
5376
|
-
|
|
5375
|
+
const e = X((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), u = j((R) => R.snapToReadable), a = _e((R) => R.scrollLock), l = _e((R) => R.pause), d = _e((R) => R.play), h = _e((R) => R.syncToGI), [f, m] = pt(() => i(t || 0));
|
|
5376
|
+
fe(() => {
|
|
5377
5377
|
m(i(t || 0));
|
|
5378
5378
|
}, [t, i]);
|
|
5379
5379
|
const v = ie(!1), y = me(() => Math.max(0, Math.min(t ?? 0, Math.max(0, (n ?? 1) - 1))) + 1, [t, n]), c = ne(() => {
|
|
5380
5380
|
a && (l(), v.current = !0);
|
|
5381
|
-
}, [a, l]), p = ne((
|
|
5382
|
-
m(Number(
|
|
5381
|
+
}, [a, l]), p = ne((R) => {
|
|
5382
|
+
m(Number(R.currentTarget.value));
|
|
5383
5383
|
}, []), g = ne(async () => {
|
|
5384
|
-
const
|
|
5385
|
-
l(), r(
|
|
5384
|
+
const R = s(f), O = u(R);
|
|
5385
|
+
l(), r(O, "scrubber-commit"), h(O);
|
|
5386
5386
|
const b = o();
|
|
5387
|
-
b != null && b.ensureVisibleGI && await b.ensureVisibleGI(
|
|
5387
|
+
b != null && b.ensureVisibleGI && await b.ensureVisibleGI(O), v.current && (v.current = !1, d());
|
|
5388
5388
|
}, [f, s, u, l, r, h, o, d]), w = me(
|
|
5389
5389
|
() => ({ "--pct": `${f}%` }),
|
|
5390
5390
|
[f]
|
|
5391
|
-
),
|
|
5391
|
+
), C = me(() => Math.round(f), [f]);
|
|
5392
5392
|
return /* @__PURE__ */ ee("div", { className: Bt.scrubberWrap, children: [
|
|
5393
5393
|
e && /* @__PURE__ */ x("div", { className: Bt.labels, children: /* @__PURE__ */ ee("span", { className: Bt.index, children: [
|
|
5394
5394
|
y,
|
|
@@ -5415,35 +5415,35 @@ function cc() {
|
|
|
5415
5415
|
onTouchEnd: () => {
|
|
5416
5416
|
g();
|
|
5417
5417
|
},
|
|
5418
|
-
onKeyUp: (
|
|
5418
|
+
onKeyUp: (R) => R.key === "Enter" || R.key === " " ? void g() : void 0,
|
|
5419
5419
|
"aria-label": "진행률"
|
|
5420
5420
|
}
|
|
5421
5421
|
),
|
|
5422
5422
|
/* @__PURE__ */ ee("span", { className: Bt.percent, children: [
|
|
5423
|
-
|
|
5423
|
+
C,
|
|
5424
5424
|
"%"
|
|
5425
5425
|
] })
|
|
5426
5426
|
] })
|
|
5427
5427
|
] });
|
|
5428
5428
|
}
|
|
5429
5429
|
const uc = D.memo(cc), dc = Wt(function() {
|
|
5430
|
-
const t = Ue(Ot), 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 = X((S) => S.audioSpeed), u = _e((S) => S.pause), a = j((S) => S.totalRuns), l = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex), h = j((S) => S.getSectionScrollApi), f = j((S) => S.nextReadableFrom), m = j((S) => S.edgeReadable), v = ie(null), y = ie(null), c = ie(0), p = ie(-1), g = !n && r === "fake" && o === "playing", w = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1),
|
|
5430
|
+
const t = Ue(Ot), 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 = X((S) => S.audioSpeed), u = _e((S) => S.pause), a = j((S) => S.totalRuns), l = j((S) => S.currentGlobalRunIndex), d = j((S) => S.setCurrentGlobalRunIndex), h = j((S) => S.getSectionScrollApi), f = j((S) => S.nextReadableFrom), m = j((S) => S.edgeReadable), v = ie(null), y = ie(null), c = ie(0), p = ie(-1), g = !n && r === "fake" && o === "playing", w = Math.max(1, (i == null ? void 0 : i.totalWords) ?? 1), C = me(() => {
|
|
5431
5431
|
const S = 200 * s;
|
|
5432
5432
|
return w / S * 6e4;
|
|
5433
|
-
}, [w, s]),
|
|
5434
|
-
|
|
5433
|
+
}, [w, s]), R = me(() => !a || a <= 1 || C <= 0 ? 0 : (a - 1) / C, [a, C]);
|
|
5434
|
+
fe(() => {
|
|
5435
5435
|
if (!g) return;
|
|
5436
5436
|
const S = Math.max(0, Math.min(l ?? 0, Math.max(0, (a ?? 1) - 1)));
|
|
5437
5437
|
c.current = S, p.current = S, y.current = null;
|
|
5438
5438
|
}, [g, l, a]);
|
|
5439
|
-
const
|
|
5440
|
-
|
|
5439
|
+
const O = ie(-1);
|
|
5440
|
+
fe(() => {
|
|
5441
5441
|
if (!a) {
|
|
5442
|
-
|
|
5442
|
+
O.current = -1;
|
|
5443
5443
|
return;
|
|
5444
5444
|
}
|
|
5445
5445
|
const S = m(1);
|
|
5446
|
-
|
|
5446
|
+
O.current = S ?? -1;
|
|
5447
5447
|
}, [m, a]);
|
|
5448
5448
|
const b = ne(
|
|
5449
5449
|
(S) => {
|
|
@@ -5453,27 +5453,27 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5453
5453
|
v.current = null;
|
|
5454
5454
|
return;
|
|
5455
5455
|
}
|
|
5456
|
-
if (!a || a <= 1 ||
|
|
5456
|
+
if (!a || a <= 1 || R <= 0) {
|
|
5457
5457
|
v.current = null;
|
|
5458
5458
|
return;
|
|
5459
5459
|
}
|
|
5460
|
-
const
|
|
5460
|
+
const k = y.current;
|
|
5461
5461
|
y.current = S;
|
|
5462
|
-
const
|
|
5463
|
-
c.current = Math.min(
|
|
5464
|
-
const P = Math.floor(c.current), I = h(),
|
|
5465
|
-
if (
|
|
5466
|
-
const V =
|
|
5462
|
+
const T = k == null ? 0 : Math.max(0, S - k), M = a - 1;
|
|
5463
|
+
c.current = Math.min(M, c.current + R * T);
|
|
5464
|
+
const P = Math.floor(c.current), I = h(), _ = f(P, 1);
|
|
5465
|
+
if (_ == null) {
|
|
5466
|
+
const V = O.current >= 0 ? O.current : P;
|
|
5467
5467
|
V !== p.current && (p.current = V, d(V, "audio"), await ((N = I == null ? void 0 : I.ensureVisibleGI) == null ? void 0 : N.call(I, V))), u(), v.current = null;
|
|
5468
5468
|
return;
|
|
5469
5469
|
}
|
|
5470
|
-
const z =
|
|
5470
|
+
const z = _;
|
|
5471
5471
|
z !== p.current && (p.current = z, d(z, "audio"), z % 5 === 0 && await ((A = I == null ? void 0 : I.ensureVisibleGI) == null ? void 0 : A.call(I, z))), v.current = requestAnimationFrame(b);
|
|
5472
5472
|
})().catch(console.error);
|
|
5473
5473
|
},
|
|
5474
|
-
[g, a,
|
|
5474
|
+
[g, a, R, f, d, h, u]
|
|
5475
5475
|
);
|
|
5476
|
-
return
|
|
5476
|
+
return fe(() => (g ? v.current == null && (v.current = requestAnimationFrame(b)) : (v.current && (cancelAnimationFrame(v.current), v.current = null), y.current = null), () => {
|
|
5477
5477
|
v.current && (cancelAnimationFrame(v.current), v.current = null);
|
|
5478
5478
|
}), [g, b]), null;
|
|
5479
5479
|
}), fc = Wt(function() {
|
|
@@ -5512,7 +5512,7 @@ const uc = D.memo(cc), dc = Wt(function() {
|
|
|
5512
5512
|
},
|
|
5513
5513
|
[l, u, a]
|
|
5514
5514
|
);
|
|
5515
|
-
|
|
5515
|
+
fe(() => a, [a]);
|
|
5516
5516
|
const h = `${(t * 100).toFixed(0)}%`;
|
|
5517
5517
|
return /* @__PURE__ */ x(
|
|
5518
5518
|
"div",
|
|
@@ -5627,52 +5627,52 @@ function Ec(e) {
|
|
|
5627
5627
|
return Ze({ attr: { viewBox: "0 0 512 512" }, child: [{ tag: "path", attr: { d: "M256 217.9L383 345c9.4 9.4 24.6 9.4 33.9 0 9.4-9.4 9.3-24.6 0-34L273 167c-9.1-9.1-23.7-9.3-33.1-.7L95 310.9c-4.7 4.7-7 10.9-7 17s2.3 12.3 7 17c9.4 9.4 24.6 9.4 33.9 0l127.1-127z" }, child: [] }] })(e);
|
|
5628
5628
|
}
|
|
5629
5629
|
function Oc() {
|
|
5630
|
-
var
|
|
5631
|
-
const e = X((
|
|
5632
|
-
|
|
5633
|
-
const
|
|
5630
|
+
var k;
|
|
5631
|
+
const e = X((T) => T.showOverlays), t = j((T) => T.section), n = !!t.ast.isAddedSplit, r = !!((k = t.audios) != null && k.length), o = j((T) => T.canTracking), i = j((T) => T.canToggleShowGaze), s = j((T) => T.showGaze), u = j((T) => T.onToggleShowGaze), a = X((T) => T.muteAudio), l = X((T) => T.showPointer), d = X((T) => T.showSplit), h = X((T) => T.toggleMuteAudio), f = X((T) => T.toggleShowPointer), m = X((T) => T.toggleShowSplit), v = X((T) => T.overlayCompactMode), y = X((T) => T.toggleOverlayCompactMode), c = xn(), p = yt();
|
|
5632
|
+
fe(() => {
|
|
5633
|
+
const T = c.getState(), { syncToGI: M, useFake: P, useReal: I } = T, _ = T.playbackKind, z = p.getState().progress.currentGlobalRunIndex ?? 0;
|
|
5634
5634
|
if (!r) {
|
|
5635
|
-
|
|
5635
|
+
_ !== "fake" && P();
|
|
5636
5636
|
return;
|
|
5637
5637
|
}
|
|
5638
|
-
a ?
|
|
5638
|
+
a ? _ !== "fake" && (console.log("이부분일까?"), P()) : _ !== "real" && (M(z), I());
|
|
5639
5639
|
}, [r, a, p, c]);
|
|
5640
|
-
const g = _e((
|
|
5641
|
-
(
|
|
5642
|
-
|
|
5640
|
+
const g = _e((T) => T.play), w = _e((T) => T.pause), C = _e((T) => T.status), R = ne(
|
|
5641
|
+
(T) => {
|
|
5642
|
+
T.stopPropagation(), C === "playing" || C === "loading" ? w() : g();
|
|
5643
5643
|
},
|
|
5644
|
-
[
|
|
5645
|
-
),
|
|
5646
|
-
async (
|
|
5644
|
+
[C, g, w]
|
|
5645
|
+
), O = xn(), b = yt(), S = ne(
|
|
5646
|
+
async (T) => {
|
|
5647
5647
|
var xe, Fe;
|
|
5648
|
-
if (
|
|
5648
|
+
if (T.stopPropagation(), C === "playing" || C === "loading") {
|
|
5649
5649
|
w();
|
|
5650
5650
|
return;
|
|
5651
5651
|
}
|
|
5652
|
-
const { progress:
|
|
5652
|
+
const { progress: M } = b.getState(), {
|
|
5653
5653
|
currentGlobalRunIndex: P,
|
|
5654
5654
|
snapToReadable: I,
|
|
5655
|
-
edgeReadable:
|
|
5655
|
+
edgeReadable: _,
|
|
5656
5656
|
setCurrentGlobalRunIndex: z,
|
|
5657
5657
|
getSectionScrollApi: N
|
|
5658
|
-
} =
|
|
5658
|
+
} = M, A = O.getState(), V = A.currentClip, re = N == null ? void 0 : N(), be = typeof P == "number" ? P : 0, Se = typeof I == "function" ? I(be) : be, Ce = typeof _ == "function" ? _(1) : null;
|
|
5659
5659
|
if (Ce != null && Se >= Ce) {
|
|
5660
5660
|
z == null || z(Ce, "audio"), await ((xe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : xe.call(re, Ce)), A.syncToGI(Ce);
|
|
5661
5661
|
return;
|
|
5662
5662
|
}
|
|
5663
5663
|
z == null || z(Se, "audio"), await ((Fe = re == null ? void 0 : re.ensureVisibleGI) == null ? void 0 : Fe.call(re, Se)), A.syncToGI(Se), g(V);
|
|
5664
5664
|
},
|
|
5665
|
-
[
|
|
5665
|
+
[C, w, g, O, b]
|
|
5666
5666
|
);
|
|
5667
5667
|
return /* @__PURE__ */ ee(
|
|
5668
5668
|
"div",
|
|
5669
5669
|
{
|
|
5670
5670
|
className: `${Re.wrap} ${e ? Re.visible : ""} ${v ? Re.compact : ""}`,
|
|
5671
|
-
onClick: (
|
|
5672
|
-
|
|
5671
|
+
onClick: (T) => {
|
|
5672
|
+
T.stopPropagation();
|
|
5673
5673
|
},
|
|
5674
|
-
onTouchStart: (
|
|
5675
|
-
|
|
5674
|
+
onTouchStart: (T) => {
|
|
5675
|
+
T.stopPropagation();
|
|
5676
5676
|
},
|
|
5677
5677
|
children: [
|
|
5678
5678
|
!v && /* @__PURE__ */ x(uc, {}),
|
|
@@ -5683,8 +5683,8 @@ function Oc() {
|
|
|
5683
5683
|
"button",
|
|
5684
5684
|
{
|
|
5685
5685
|
type: "button",
|
|
5686
|
-
onClick: (
|
|
5687
|
-
|
|
5686
|
+
onClick: (T) => {
|
|
5687
|
+
T.stopPropagation(), y();
|
|
5688
5688
|
},
|
|
5689
5689
|
className: Re.compactBtn,
|
|
5690
5690
|
title: v ? "오버레이 확대" : "오버레이 축소",
|
|
@@ -5697,9 +5697,9 @@ function Oc() {
|
|
|
5697
5697
|
_c,
|
|
5698
5698
|
{
|
|
5699
5699
|
size: 34,
|
|
5700
|
-
isPlaying:
|
|
5701
|
-
onClick: a ? S :
|
|
5702
|
-
title:
|
|
5700
|
+
isPlaying: C === "playing",
|
|
5701
|
+
onClick: a ? S : R,
|
|
5702
|
+
title: C === "playing" ? "일시정지" : "재생"
|
|
5703
5703
|
}
|
|
5704
5704
|
),
|
|
5705
5705
|
/* @__PURE__ */ x(To, { direction: "right" })
|
|
@@ -5712,8 +5712,8 @@ function Oc() {
|
|
|
5712
5712
|
"button",
|
|
5713
5713
|
{
|
|
5714
5714
|
type: "button",
|
|
5715
|
-
onClick: (
|
|
5716
|
-
|
|
5715
|
+
onClick: (T) => {
|
|
5716
|
+
T.stopPropagation(), h();
|
|
5717
5717
|
},
|
|
5718
5718
|
className: `${Re.btn} ${a ? "" : Re.btnActive}`,
|
|
5719
5719
|
title: "오디오북 음소거 전환",
|
|
@@ -5727,8 +5727,8 @@ function Oc() {
|
|
|
5727
5727
|
"button",
|
|
5728
5728
|
{
|
|
5729
5729
|
type: "button",
|
|
5730
|
-
onClick: (
|
|
5731
|
-
|
|
5730
|
+
onClick: (T) => {
|
|
5731
|
+
T.stopPropagation(), f();
|
|
5732
5732
|
},
|
|
5733
5733
|
className: `${Re.btn} ${l ? Re.btnActive : ""}`,
|
|
5734
5734
|
title: "포인터 표시",
|
|
@@ -5742,8 +5742,8 @@ function Oc() {
|
|
|
5742
5742
|
"button",
|
|
5743
5743
|
{
|
|
5744
5744
|
type: "button",
|
|
5745
|
-
onClick: (
|
|
5746
|
-
|
|
5745
|
+
onClick: (T) => {
|
|
5746
|
+
T.stopPropagation(), m();
|
|
5747
5747
|
},
|
|
5748
5748
|
disabled: !n,
|
|
5749
5749
|
className: `${Re.btn} ${d ? Re.btnActive : ""} ${n ? "" : Re.btnForbidden}`,
|
|
@@ -5758,8 +5758,8 @@ function Oc() {
|
|
|
5758
5758
|
"button",
|
|
5759
5759
|
{
|
|
5760
5760
|
type: "button",
|
|
5761
|
-
onClick: (
|
|
5762
|
-
|
|
5761
|
+
onClick: (T) => {
|
|
5762
|
+
T.stopPropagation(), u == null || u();
|
|
5763
5763
|
},
|
|
5764
5764
|
disabled: !o || !i,
|
|
5765
5765
|
className: `${Re.btn} ${o && s ? Re.btnActive : ""} ${o ? "" : Re.btnForbidden}`,
|
|
@@ -5828,15 +5828,15 @@ function Dc() {
|
|
|
5828
5828
|
)
|
|
5829
5829
|
] }) });
|
|
5830
5830
|
}
|
|
5831
|
-
const $c = D.memo(Dc), Vc = "_wrap_62su0_7", qc = "_wrapHidden_62su0_29", jc = "_wrapVisible_62su0_35", Uc = "_scrollArea_62su0_71", Kc = "_row_62su0_81", Xc = "_label_62su0_89",
|
|
5831
|
+
const $c = D.memo(Dc), Vc = "_wrap_62su0_7", qc = "_wrapHidden_62su0_29", jc = "_wrapVisible_62su0_35", Uc = "_scrollArea_62su0_71", Kc = "_row_62su0_81", Xc = "_label_62su0_89", Qc = "_btn_62su0_95", Yc = "_btnActive_62su0_106", Zc = "_btnSmall_62su0_110", Jc = "_pill_62su0_122", eu = "_themeCircle_62su0_133", tu = "_themeCircleActive_62su0_146", nu = "_stepRow_62su0_151", ru = "_stepLabel_62su0_159", ou = "_levelBox_62su0_172", iu = "_inlineFlex_62su0_177", Ae = {
|
|
5832
5832
|
wrap: Vc,
|
|
5833
5833
|
wrapHidden: qc,
|
|
5834
5834
|
wrapVisible: jc,
|
|
5835
5835
|
scrollArea: Uc,
|
|
5836
5836
|
row: Kc,
|
|
5837
5837
|
label: Xc,
|
|
5838
|
-
btn:
|
|
5839
|
-
btnActive:
|
|
5838
|
+
btn: Qc,
|
|
5839
|
+
btnActive: Yc,
|
|
5840
5840
|
btnSmall: Zc,
|
|
5841
5841
|
pill: Jc,
|
|
5842
5842
|
themeCircle: eu,
|
|
@@ -5847,22 +5847,22 @@ const $c = D.memo(Dc), Vc = "_wrap_62su0_7", qc = "_wrapHidden_62su0_29", jc = "
|
|
|
5847
5847
|
inlineFlex: iu
|
|
5848
5848
|
};
|
|
5849
5849
|
function su({ visible: e }) {
|
|
5850
|
-
const t = X((b) => b.mode), n = X((b) => b.setMode), r = X((b) => b.theme), o = X((b) => b.setTheme), i = X((b) => b.fontFamily), s = X((b) => b.setFontFamily), u = X((b) => b.resetToDefaults), a = X((b) => b.getFontLevel()), l = X((b) => b.getLineLevel()), d = X((b) => b.getMarginLevel()), h = X((b) => b.setFontLevel), f = X((b) => b.setLineLevel), m = X((b) => b.setMarginLevel), v = X((b) => b.pointerStyle), y = X((b) => b.setPointerStyle), c = X((b) => b.pointerColor), p = X((b) => b.setPointerColor), g = X((b) => b.breakMarks), w = X((b) => b.toggleBreakMark),
|
|
5851
|
-
return /* @__PURE__ */ ee("div", { className:
|
|
5850
|
+
const t = X((b) => b.mode), n = X((b) => b.setMode), r = X((b) => b.theme), o = X((b) => b.setTheme), i = X((b) => b.fontFamily), s = X((b) => b.setFontFamily), u = X((b) => b.resetToDefaults), a = X((b) => b.getFontLevel()), l = X((b) => b.getLineLevel()), d = X((b) => b.getMarginLevel()), h = X((b) => b.setFontLevel), f = X((b) => b.setLineLevel), m = X((b) => b.setMarginLevel), v = X((b) => b.pointerStyle), y = X((b) => b.setPointerStyle), c = X((b) => b.pointerColor), p = X((b) => b.setPointerColor), g = X((b) => b.breakMarks), w = X((b) => b.toggleBreakMark), C = X((b) => b.getBreakGapLevel()), R = X((b) => b.setBreakGapLevel), O = `${Ae.wrap} ${e ? Ae.wrapVisible : Ae.wrapHidden}`;
|
|
5851
|
+
return /* @__PURE__ */ ee("div", { className: O, role: "dialog", "aria-modal": "true", "aria-label": "뷰어 설정", children: [
|
|
5852
5852
|
/* @__PURE__ */ ee("div", { className: Ae.scrollArea, children: [
|
|
5853
5853
|
/* @__PURE__ */ x(jt, { label: "열람방식", children: /* @__PURE__ */ ee("div", { className: Ae.inlineFlex, children: [
|
|
5854
5854
|
/* @__PURE__ */ x(Gt, { active: t === "page", onClick: () => n("page"), children: "페이지" }),
|
|
5855
5855
|
/* @__PURE__ */ x(Gt, { active: t === "scroll", onClick: () => n("scroll"), children: "스크롤" })
|
|
5856
5856
|
] }) }),
|
|
5857
5857
|
/* @__PURE__ */ x(jt, { label: "테마", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Object.keys(vn).map((b) => {
|
|
5858
|
-
const S = b,
|
|
5858
|
+
const S = b, k = vn[S];
|
|
5859
5859
|
return /* @__PURE__ */ x(
|
|
5860
5860
|
"button",
|
|
5861
5861
|
{
|
|
5862
5862
|
type: "button",
|
|
5863
5863
|
onClick: () => o(S),
|
|
5864
5864
|
className: `${Ae.themeCircle} ${r === b ? Ae.themeCircleActive : ""}`,
|
|
5865
|
-
style: { background:
|
|
5865
|
+
style: { background: k.bg, color: k.fg, fontFamily: i },
|
|
5866
5866
|
title: String(b),
|
|
5867
5867
|
"aria-label": `테마: ${String(b)}`,
|
|
5868
5868
|
children: "A"
|
|
@@ -5870,7 +5870,7 @@ function su({ visible: e }) {
|
|
|
5870
5870
|
`${b}_tc_button`
|
|
5871
5871
|
);
|
|
5872
5872
|
}) }) }),
|
|
5873
|
-
/* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children:
|
|
5873
|
+
/* @__PURE__ */ x(jt, { label: "글꼴", children: /* @__PURE__ */ x("div", { className: Ae.inlineFlex, children: Qo.map((b) => /* @__PURE__ */ x(
|
|
5874
5874
|
Gt,
|
|
5875
5875
|
{
|
|
5876
5876
|
active: i === b.value,
|
|
@@ -5938,11 +5938,11 @@ function su({ visible: e }) {
|
|
|
5938
5938
|
pn,
|
|
5939
5939
|
{
|
|
5940
5940
|
label: "끊기간격",
|
|
5941
|
-
level:
|
|
5941
|
+
level: C,
|
|
5942
5942
|
min: 1,
|
|
5943
5943
|
max: 5,
|
|
5944
|
-
onDec: () =>
|
|
5945
|
-
onInc: () =>
|
|
5944
|
+
onDec: () => R(Math.max(1, C - 1)),
|
|
5945
|
+
onInc: () => R(Math.min(5, C + 1))
|
|
5946
5946
|
}
|
|
5947
5947
|
)
|
|
5948
5948
|
] }),
|
|
@@ -6221,12 +6221,12 @@ function pu(e) {
|
|
|
6221
6221
|
if (!n) return -1;
|
|
6222
6222
|
const p = n.byClip[y];
|
|
6223
6223
|
if (!p || p.length === 0) return -1;
|
|
6224
|
-
let g = 0, w = p.length - 1,
|
|
6224
|
+
let g = 0, w = p.length - 1, C = 0;
|
|
6225
6225
|
for (; g <= w; ) {
|
|
6226
|
-
const
|
|
6227
|
-
p[
|
|
6226
|
+
const R = g + w >> 1;
|
|
6227
|
+
p[R].t <= c ? (C = R, g = R + 1) : w = R - 1;
|
|
6228
6228
|
}
|
|
6229
|
-
return p[Math.max(0, Math.min(
|
|
6229
|
+
return p[Math.max(0, Math.min(C, p.length - 1))].g;
|
|
6230
6230
|
},
|
|
6231
6231
|
// GI -> (clip,time)
|
|
6232
6232
|
getCTFromGI: (y) => {
|
|
@@ -6245,10 +6245,10 @@ function pu(e) {
|
|
|
6245
6245
|
g--;
|
|
6246
6246
|
}
|
|
6247
6247
|
if (!p) {
|
|
6248
|
-
let
|
|
6249
|
-
const
|
|
6250
|
-
for (; c[
|
|
6251
|
-
c[
|
|
6248
|
+
let C = y + 1;
|
|
6249
|
+
const R = y + 100;
|
|
6250
|
+
for (; c[C] == null && C <= R; ) C++;
|
|
6251
|
+
c[C] && (p = c[C]);
|
|
6252
6252
|
}
|
|
6253
6253
|
}
|
|
6254
6254
|
return p ? { clip: p.clip, timeMs: p.t } : null;
|
|
@@ -6326,13 +6326,13 @@ function bu(e) {
|
|
|
6326
6326
|
Sr(g) && (i[f + p] = 1);
|
|
6327
6327
|
}
|
|
6328
6328
|
const y = ca(m, f).map((p) => {
|
|
6329
|
-
var
|
|
6329
|
+
var R;
|
|
6330
6330
|
const g = p.startG - f, w = p.endG - p.startG + 1;
|
|
6331
|
-
let
|
|
6332
|
-
for (let
|
|
6333
|
-
const b = ((
|
|
6331
|
+
let C = -1;
|
|
6332
|
+
for (let O = 0; O < w; O++) {
|
|
6333
|
+
const b = ((R = m[g + O]) == null ? void 0 : R.text) ?? "";
|
|
6334
6334
|
if (Sr(b)) {
|
|
6335
|
-
|
|
6335
|
+
C = p.startG + O;
|
|
6336
6336
|
break;
|
|
6337
6337
|
}
|
|
6338
6338
|
}
|
|
@@ -6341,7 +6341,7 @@ function bu(e) {
|
|
|
6341
6341
|
endG: p.endG,
|
|
6342
6342
|
r0: g,
|
|
6343
6343
|
len: w,
|
|
6344
|
-
firstReadableGI:
|
|
6344
|
+
firstReadableGI: C,
|
|
6345
6345
|
splitIndex: p.splitIndex
|
|
6346
6346
|
};
|
|
6347
6347
|
});
|
|
@@ -6441,9 +6441,9 @@ function Su(e) {
|
|
|
6441
6441
|
return f && queueMicrotask(() => {
|
|
6442
6442
|
f.getState().emit({ type: "render_start", payload: { sectionId: t.section_id } }, c), f.getState().emit({ type: "loading_start", payload: {} }, c);
|
|
6443
6443
|
}), rn((g, w) => {
|
|
6444
|
-
const
|
|
6444
|
+
const C = (K) => {
|
|
6445
6445
|
g(($) => $.progress._scrollApi === K ? $ : { progress: { ...$.progress, _scrollApi: K } });
|
|
6446
|
-
},
|
|
6446
|
+
}, R = () => w().progress._scrollApi, O = (K) => {
|
|
6447
6447
|
g(($) => {
|
|
6448
6448
|
const G = $.progress;
|
|
6449
6449
|
if (G.totalRuns === K) return $;
|
|
@@ -6491,15 +6491,15 @@ function Su(e) {
|
|
|
6491
6491
|
}
|
|
6492
6492
|
})), f && f.getState().emit({ type: "loading_end", payload: { duration: q } });
|
|
6493
6493
|
}
|
|
6494
|
-
},
|
|
6494
|
+
}, k = (K) => {
|
|
6495
6495
|
g(($) => ({
|
|
6496
6496
|
progress: { ...$.progress, pageIndex: K }
|
|
6497
6497
|
}));
|
|
6498
|
-
},
|
|
6498
|
+
}, T = (K) => {
|
|
6499
6499
|
g(($) => ({
|
|
6500
6500
|
progress: { ...$.progress, totalPages: K }
|
|
6501
6501
|
}));
|
|
6502
|
-
},
|
|
6502
|
+
}, M = (K, $) => {
|
|
6503
6503
|
const E = w().progress.rangeStartGI == null;
|
|
6504
6504
|
if (g((L) => ({
|
|
6505
6505
|
progress: {
|
|
@@ -6508,7 +6508,7 @@ function Su(e) {
|
|
|
6508
6508
|
rangeEndGI: Math.max(K, $)
|
|
6509
6509
|
}
|
|
6510
6510
|
})), f) {
|
|
6511
|
-
const L =
|
|
6511
|
+
const L = _();
|
|
6512
6512
|
f.getState().emit({
|
|
6513
6513
|
type: E ? "range_select" : "range_change",
|
|
6514
6514
|
payload: { startGI: Math.min(K, $), endGI: Math.max(K, $), text: L }
|
|
@@ -6529,15 +6529,15 @@ function Su(e) {
|
|
|
6529
6529
|
})) : K > G ? g((E) => ({
|
|
6530
6530
|
progress: { ...E.progress, rangeEndGI: K }
|
|
6531
6531
|
})) : P());
|
|
6532
|
-
},
|
|
6532
|
+
}, _ = () => {
|
|
6533
6533
|
var Z;
|
|
6534
6534
|
const { rangeStartGI: K, rangeEndGI: $, section: G, layout: E } = w().progress;
|
|
6535
6535
|
if (K == null || $ == null || !E) return "";
|
|
6536
6536
|
const L = ((Z = G.ast) == null ? void 0 : Z.blocks) ?? [], q = E.prefix, B = [];
|
|
6537
6537
|
for (let F = 0; F < L.length; F++) {
|
|
6538
|
-
const
|
|
6539
|
-
if (
|
|
6540
|
-
const te =
|
|
6538
|
+
const Q = L[F];
|
|
6539
|
+
if (Q.type !== "paragraph") continue;
|
|
6540
|
+
const te = Q.runs ?? [], J = q[F] ?? 0;
|
|
6541
6541
|
for (let ce = 0; ce < te.length; ce++) {
|
|
6542
6542
|
const se = J + ce;
|
|
6543
6543
|
se >= K && se <= $ && B.push(te[ce].text ?? "");
|
|
@@ -6602,21 +6602,21 @@ function Su(e) {
|
|
|
6602
6602
|
return {
|
|
6603
6603
|
progress: {
|
|
6604
6604
|
...p,
|
|
6605
|
-
registerSectionScrollApi:
|
|
6606
|
-
getSectionScrollApi:
|
|
6607
|
-
setTotalRuns:
|
|
6605
|
+
registerSectionScrollApi: C,
|
|
6606
|
+
getSectionScrollApi: R,
|
|
6607
|
+
setTotalRuns: O,
|
|
6608
6608
|
setCurrentGlobalRunIndex: b,
|
|
6609
6609
|
setSectionLoading: S,
|
|
6610
|
-
setPageIndex:
|
|
6611
|
-
setTotalPages:
|
|
6610
|
+
setPageIndex: k,
|
|
6611
|
+
setTotalPages: T,
|
|
6612
6612
|
// Translate API
|
|
6613
6613
|
setTranslateState: z,
|
|
6614
6614
|
clearTranslate: N,
|
|
6615
6615
|
// Range Selection API
|
|
6616
|
-
setRange:
|
|
6616
|
+
setRange: M,
|
|
6617
6617
|
clearRange: P,
|
|
6618
6618
|
extendRange: I,
|
|
6619
|
-
getRangeText:
|
|
6619
|
+
getRangeText: _,
|
|
6620
6620
|
// 네비 API
|
|
6621
6621
|
snapToReadable: A,
|
|
6622
6622
|
nextReadableFrom: V,
|
|
@@ -6647,8 +6647,8 @@ function Su(e) {
|
|
|
6647
6647
|
F += $;
|
|
6648
6648
|
if (F < 0 || F >= L.length)
|
|
6649
6649
|
return re($) ?? A(K + $);
|
|
6650
|
-
const
|
|
6651
|
-
return
|
|
6650
|
+
const Q = L[F].firstReadableGI;
|
|
6651
|
+
return Q >= 0 ? Q : A(K + $);
|
|
6652
6652
|
},
|
|
6653
6653
|
giToPercentTotal: (K) => {
|
|
6654
6654
|
const $ = w().progress.totalRuns;
|
|
@@ -6678,7 +6678,7 @@ function yu({
|
|
|
6678
6678
|
[t, r]
|
|
6679
6679
|
// eslint-disable-line react-hooks/exhaustive-deps
|
|
6680
6680
|
);
|
|
6681
|
-
return
|
|
6681
|
+
return fe(() => {
|
|
6682
6682
|
if (!n) return;
|
|
6683
6683
|
const i = () => {
|
|
6684
6684
|
const s = n.getSnapshot(), u = o.getState().progress;
|
|
@@ -6720,47 +6720,47 @@ const wu = ({
|
|
|
6720
6720
|
return ((w = g.derivedNav) == null ? void 0 : w.splitGroupsPerBlock) ?? [];
|
|
6721
6721
|
}), f = e[t], m = me(() => {
|
|
6722
6722
|
const g = [];
|
|
6723
|
-
return o.forEach((w,
|
|
6724
|
-
(w.type === "paragraph" || w.type === "image") && g.push(
|
|
6723
|
+
return o.forEach((w, C) => {
|
|
6724
|
+
(w.type === "paragraph" || w.type === "image") && g.push(C);
|
|
6725
6725
|
}), g;
|
|
6726
6726
|
}, [o]), v = me(() => {
|
|
6727
6727
|
if (!f) return [];
|
|
6728
6728
|
const g = [];
|
|
6729
6729
|
for (let w = f.startBlock; w <= f.endBlock; w++) {
|
|
6730
|
-
const
|
|
6731
|
-
|
|
6730
|
+
const C = m[w];
|
|
6731
|
+
C != null && g.push(C);
|
|
6732
6732
|
}
|
|
6733
6733
|
return g;
|
|
6734
6734
|
}, [f, m]), y = me(() => {
|
|
6735
6735
|
const g = [];
|
|
6736
6736
|
for (const w of v) {
|
|
6737
|
-
const
|
|
6738
|
-
(
|
|
6737
|
+
const C = o[w];
|
|
6738
|
+
(C == null ? void 0 : C.type) === "paragraph" && g.push({ b: C, originalBlockIndex: w });
|
|
6739
6739
|
}
|
|
6740
6740
|
return g;
|
|
6741
6741
|
}, [v, o]), c = me(() => {
|
|
6742
6742
|
const g = [], w = Ar();
|
|
6743
|
-
return y.forEach((
|
|
6744
|
-
g[
|
|
6743
|
+
return y.forEach((C, R) => {
|
|
6744
|
+
g[R] = Br(C.b, w);
|
|
6745
6745
|
}), g;
|
|
6746
|
-
}, [y]), p = (g, w,
|
|
6746
|
+
}, [y]), p = (g, w, C) => {
|
|
6747
6747
|
if (!g || g.length === 0) return [];
|
|
6748
|
-
const
|
|
6749
|
-
for (const
|
|
6750
|
-
const b =
|
|
6751
|
-
if (S < w || b >
|
|
6752
|
-
const
|
|
6748
|
+
const R = [];
|
|
6749
|
+
for (const O of g) {
|
|
6750
|
+
const b = O.startG, S = O.endG;
|
|
6751
|
+
if (S < w || b > C) continue;
|
|
6752
|
+
const k = Math.max(b, w), T = Math.min(S, C), M = k - b | 0, P = Math.max(0, T - k + 1);
|
|
6753
6753
|
if (P <= 0) continue;
|
|
6754
|
-
const I = (
|
|
6755
|
-
|
|
6756
|
-
...
|
|
6757
|
-
startG:
|
|
6758
|
-
endG:
|
|
6754
|
+
const I = (O.r0 ?? 0) + M;
|
|
6755
|
+
R.push({
|
|
6756
|
+
...O,
|
|
6757
|
+
startG: k,
|
|
6758
|
+
endG: T,
|
|
6759
6759
|
r0: I,
|
|
6760
6760
|
len: P
|
|
6761
6761
|
});
|
|
6762
6762
|
}
|
|
6763
|
-
return
|
|
6763
|
+
return R;
|
|
6764
6764
|
};
|
|
6765
6765
|
return /* @__PURE__ */ x(
|
|
6766
6766
|
"div",
|
|
@@ -6797,7 +6797,7 @@ const wu = ({
|
|
|
6797
6797
|
/* @__PURE__ */ x("div", { style: { height: 40 } }),
|
|
6798
6798
|
/* @__PURE__ */ x("div", { style: { flex: 1, overflow: "hidden" }, children: v.map((g, w) => {
|
|
6799
6799
|
var G;
|
|
6800
|
-
const
|
|
6800
|
+
const C = o[g], R = w === 0, O = w === v.length - 1, b = {
|
|
6801
6801
|
boxSizing: "border-box",
|
|
6802
6802
|
paddingRight: `${i}px`,
|
|
6803
6803
|
paddingLeft: `${i}px`,
|
|
@@ -6807,9 +6807,9 @@ const wu = ({
|
|
|
6807
6807
|
// justifyContent: 'center',
|
|
6808
6808
|
width: "100%",
|
|
6809
6809
|
height: "auto"
|
|
6810
|
-
}, S = `sec-${r.section_id}/blk-${
|
|
6811
|
-
if (
|
|
6812
|
-
const { src: E, alt: L, width: q, height: B } =
|
|
6810
|
+
}, S = `sec-${r.section_id}/blk-${C.id ?? g}`;
|
|
6811
|
+
if (C.type === "image") {
|
|
6812
|
+
const { src: E, alt: L, width: q, height: B } = C, Z = q && B ? `${q} / ${B}` : "4 / 3", F = l > 80 ? Math.floor((l - 80) * 0.6) : void 0;
|
|
6813
6813
|
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */ ee(
|
|
6814
6814
|
"div",
|
|
6815
6815
|
{
|
|
@@ -6852,17 +6852,17 @@ const wu = ({
|
|
|
6852
6852
|
}
|
|
6853
6853
|
) }, S);
|
|
6854
6854
|
}
|
|
6855
|
-
const
|
|
6855
|
+
const k = C, T = y.findIndex(
|
|
6856
6856
|
(E) => E.originalBlockIndex === g
|
|
6857
|
-
),
|
|
6858
|
-
let
|
|
6859
|
-
|
|
6860
|
-
|
|
6857
|
+
), M = T >= 0 ? c[T] : void 0, P = k.runs ?? [], I = P.length;
|
|
6858
|
+
let _ = 0, z = Math.max(0, I - 1);
|
|
6859
|
+
R && f.startOffsetInBlock != null && (_ = Math.min(Math.max(0, f.startOffsetInBlock), z)), O && f.endOffsetInBlock != null && (z = Math.max(
|
|
6860
|
+
_,
|
|
6861
6861
|
Math.min(f.endOffsetInBlock, z)
|
|
6862
6862
|
));
|
|
6863
|
-
const N =
|
|
6863
|
+
const N = _ > 0, A = d[g] ?? 0, V = h[g] ?? [], re = A + _, be = A + z;
|
|
6864
6864
|
let Se = p(V, re, be);
|
|
6865
|
-
const Ce = A +
|
|
6865
|
+
const Ce = A + _;
|
|
6866
6866
|
Se = Se.map((E) => {
|
|
6867
6867
|
const L = Math.max(0, (E.startG ?? re) - Ce), q = E.len ?? Math.max(1, (E.endG ?? be) - (E.startG ?? re) + 1);
|
|
6868
6868
|
return {
|
|
@@ -6871,7 +6871,7 @@ const wu = ({
|
|
|
6871
6871
|
len: q
|
|
6872
6872
|
};
|
|
6873
6873
|
});
|
|
6874
|
-
const xe =
|
|
6874
|
+
const xe = _ <= z ? P.slice(_, z + 1) : [], Fe = k.list ? k.list.level * 24 : 0, K = ((G = k.list) == null ? void 0 : G.kind) === "bullet" ? k.list.glyph ?? "•" : void 0, $ = N ? void 0 : M ?? K;
|
|
6875
6875
|
return /* @__PURE__ */ x("div", { style: b, children: /* @__PURE__ */ ee(
|
|
6876
6876
|
"p",
|
|
6877
6877
|
{
|
|
@@ -6879,12 +6879,12 @@ const wu = ({
|
|
|
6879
6879
|
width: "100%",
|
|
6880
6880
|
margin: "8px 0",
|
|
6881
6881
|
paddingLeft: Fe,
|
|
6882
|
-
textAlign:
|
|
6882
|
+
textAlign: k.textAlign,
|
|
6883
6883
|
whiteSpace: "pre-wrap",
|
|
6884
6884
|
boxSizing: "border-box"
|
|
6885
6885
|
},
|
|
6886
6886
|
children: [
|
|
6887
|
-
|
|
6887
|
+
k.list && $ ? /* @__PURE__ */ x(
|
|
6888
6888
|
"span",
|
|
6889
6889
|
{
|
|
6890
6890
|
"aria-hidden": !0,
|
|
@@ -6919,7 +6919,7 @@ const wu = ({
|
|
|
6919
6919
|
}, gn = 0.5;
|
|
6920
6920
|
function Iu(e, t) {
|
|
6921
6921
|
const n = ie(null), r = ie(null), o = ie(!1);
|
|
6922
|
-
|
|
6922
|
+
fe(() => {
|
|
6923
6923
|
const i = () => {
|
|
6924
6924
|
n.current == null && (n.current = requestAnimationFrame(() => {
|
|
6925
6925
|
n.current = null, t(), o.current = !0, requestAnimationFrame(() => {
|
|
@@ -6969,7 +6969,7 @@ function Cu(e) {
|
|
|
6969
6969
|
onDragMove: h,
|
|
6970
6970
|
onDragEnd: f,
|
|
6971
6971
|
pageTransitionThreshold: m
|
|
6972
|
-
} = e, v = m ?? u, y = 10, c =
|
|
6972
|
+
} = e, v = m ?? u, y = 10, c = Qe.useRef({
|
|
6973
6973
|
// ── touch ──
|
|
6974
6974
|
touchId: null,
|
|
6975
6975
|
startX: 0,
|
|
@@ -6990,34 +6990,34 @@ function Cu(e) {
|
|
|
6990
6990
|
suppressClick: !1
|
|
6991
6991
|
}), p = () => {
|
|
6992
6992
|
c.current.singleTimer != null && (clearTimeout(c.current.singleTimer), c.current.singleTimer = null);
|
|
6993
|
-
}, g =
|
|
6994
|
-
(
|
|
6995
|
-
if (i != null && i(
|
|
6993
|
+
}, g = Qe.useCallback(
|
|
6994
|
+
(_) => {
|
|
6995
|
+
if (i != null && i(_)) return;
|
|
6996
6996
|
const z = performance.now();
|
|
6997
6997
|
z - c.current.lastTapT <= d && c.current.lastTapT > 0 ? (p(), c.current.lastTapT = 0, o == null || o()) : (p(), r && (c.current.singleTimer = window.setTimeout(() => {
|
|
6998
6998
|
c.current.singleTimer = null, r();
|
|
6999
6999
|
}, l)), c.current.lastTapT = z);
|
|
7000
7000
|
},
|
|
7001
7001
|
[i, d, o, r, l]
|
|
7002
|
-
), w =
|
|
7003
|
-
(
|
|
7004
|
-
const N = Math.abs(
|
|
7005
|
-
Math.abs(
|
|
7002
|
+
), w = Qe.useCallback(
|
|
7003
|
+
(_, z) => {
|
|
7004
|
+
const N = Math.abs(_) / Math.max(1, z);
|
|
7005
|
+
Math.abs(_) >= v || N >= a ? _ < 0 ? n() : t() : f == null || f();
|
|
7006
7006
|
},
|
|
7007
7007
|
[v, a, n, t, f]
|
|
7008
|
-
),
|
|
7009
|
-
(
|
|
7010
|
-
if (
|
|
7008
|
+
), C = Qe.useCallback(
|
|
7009
|
+
(_) => {
|
|
7010
|
+
if (_.touches.length !== 1) return;
|
|
7011
7011
|
const z = s ?? i;
|
|
7012
|
-
if (z != null && z(
|
|
7013
|
-
const N =
|
|
7014
|
-
c.current.touchId = N.identifier, c.current.startX = N.clientX, c.current.startY = N.clientY, c.current.startT =
|
|
7012
|
+
if (z != null && z(_.target)) return;
|
|
7013
|
+
const N = _.touches[0];
|
|
7014
|
+
c.current.touchId = N.identifier, c.current.startX = N.clientX, c.current.startY = N.clientY, c.current.startT = _.timeStamp, c.current.swiping = !1;
|
|
7015
7015
|
},
|
|
7016
7016
|
[s, i]
|
|
7017
|
-
),
|
|
7018
|
-
(
|
|
7017
|
+
), R = Qe.useCallback(
|
|
7018
|
+
(_) => {
|
|
7019
7019
|
if (c.current.touchId == null) return;
|
|
7020
|
-
const z = Array.from(
|
|
7020
|
+
const z = Array.from(_.touches).find((re) => re.identifier === c.current.touchId);
|
|
7021
7021
|
if (!z) return;
|
|
7022
7022
|
const N = z.clientX - c.current.startX, A = Math.abs(N), V = Math.abs(z.clientY - c.current.startY);
|
|
7023
7023
|
if (!c.current.swiping)
|
|
@@ -7028,93 +7028,93 @@ function Cu(e) {
|
|
|
7028
7028
|
h == null || h(N);
|
|
7029
7029
|
},
|
|
7030
7030
|
[h]
|
|
7031
|
-
),
|
|
7032
|
-
(
|
|
7031
|
+
), O = Qe.useCallback(
|
|
7032
|
+
(_) => {
|
|
7033
7033
|
if (c.current.touchId == null) return;
|
|
7034
|
-
const z = Array.from(
|
|
7034
|
+
const z = Array.from(_.changedTouches).find((re) => re.identifier === c.current.touchId);
|
|
7035
7035
|
if (!z) return;
|
|
7036
|
-
const N = z.clientX - c.current.startX, A = z.clientY - c.current.startY, V =
|
|
7037
|
-
c.current.swiping ? w(N, V) : Math.abs(N) < 10 && Math.abs(A) < 10 && g(
|
|
7036
|
+
const N = z.clientX - c.current.startX, A = z.clientY - c.current.startY, V = _.timeStamp - c.current.startT;
|
|
7037
|
+
c.current.swiping ? w(N, V) : Math.abs(N) < 10 && Math.abs(A) < 10 && g(_.target), c.current.suppressClick = !0, c.current.touchId = null, c.current.swiping = !1;
|
|
7038
7038
|
},
|
|
7039
7039
|
[w, g]
|
|
7040
|
-
), b =
|
|
7040
|
+
), b = Qe.useCallback(() => {
|
|
7041
7041
|
c.current.swiping && (f == null || f()), c.current.touchId = null, c.current.swiping = !1;
|
|
7042
|
-
}, [f]), S =
|
|
7043
|
-
(
|
|
7044
|
-
if (
|
|
7042
|
+
}, [f]), S = Qe.useCallback(
|
|
7043
|
+
(_) => {
|
|
7044
|
+
if (_.pointerType === "touch" || c.current.mouseDown) return;
|
|
7045
7045
|
const z = s ?? i;
|
|
7046
|
-
z != null && z(
|
|
7046
|
+
z != null && z(_.target) || (c.current.mouseDown = !0, c.current.mouseSwiping = !1, c.current.mStartX = _.clientX, c.current.mStartY = _.clientY, c.current.mStartT = _.timeStamp, c.current.suppressClick = !1, c.current.capturedEl = _.currentTarget);
|
|
7047
7047
|
},
|
|
7048
7048
|
[s, i]
|
|
7049
|
-
),
|
|
7050
|
-
(
|
|
7051
|
-
if (
|
|
7052
|
-
const z =
|
|
7049
|
+
), k = Qe.useCallback(
|
|
7050
|
+
(_) => {
|
|
7051
|
+
if (_.pointerType === "touch" || !c.current.mouseDown) return;
|
|
7052
|
+
const z = _.clientX - c.current.mStartX, N = Math.abs(z), A = Math.abs(_.clientY - c.current.mStartY);
|
|
7053
7053
|
if (!c.current.mouseSwiping)
|
|
7054
7054
|
if (N >= y && N > A) {
|
|
7055
7055
|
c.current.mouseSwiping = !0, c.current.suppressClick = !0;
|
|
7056
7056
|
const V = c.current.capturedEl;
|
|
7057
7057
|
if (V != null && V.setPointerCapture)
|
|
7058
7058
|
try {
|
|
7059
|
-
V.setPointerCapture(
|
|
7059
|
+
V.setPointerCapture(_.pointerId);
|
|
7060
7060
|
} catch {
|
|
7061
7061
|
}
|
|
7062
|
-
c.current.prevUserSelect = document.body.style.userSelect, document.body.style.userSelect = "none",
|
|
7062
|
+
c.current.prevUserSelect = document.body.style.userSelect, document.body.style.userSelect = "none", _.preventDefault();
|
|
7063
7063
|
} else
|
|
7064
7064
|
return;
|
|
7065
|
-
h == null || h(z),
|
|
7065
|
+
h == null || h(z), _.preventDefault();
|
|
7066
7066
|
},
|
|
7067
7067
|
[h]
|
|
7068
|
-
),
|
|
7069
|
-
(
|
|
7068
|
+
), T = Qe.useCallback(
|
|
7069
|
+
(_) => {
|
|
7070
7070
|
var N;
|
|
7071
|
-
if (
|
|
7071
|
+
if (_.pointerType === "touch" || !c.current.mouseDown) return;
|
|
7072
7072
|
if (c.current.mouseSwiping) {
|
|
7073
|
-
const A =
|
|
7073
|
+
const A = _.clientX - c.current.mStartX, V = _.timeStamp - c.current.mStartT;
|
|
7074
7074
|
w(A, V), document.body.style.userSelect = c.current.prevUserSelect;
|
|
7075
7075
|
}
|
|
7076
7076
|
const z = c.current.capturedEl;
|
|
7077
|
-
if ((N = z == null ? void 0 : z.hasPointerCapture) != null && N.call(z,
|
|
7077
|
+
if ((N = z == null ? void 0 : z.hasPointerCapture) != null && N.call(z, _.pointerId))
|
|
7078
7078
|
try {
|
|
7079
|
-
z.releasePointerCapture(
|
|
7079
|
+
z.releasePointerCapture(_.pointerId);
|
|
7080
7080
|
} catch {
|
|
7081
7081
|
}
|
|
7082
7082
|
c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null;
|
|
7083
7083
|
},
|
|
7084
7084
|
[w]
|
|
7085
|
-
),
|
|
7086
|
-
(
|
|
7087
|
-
|
|
7085
|
+
), M = Qe.useCallback(
|
|
7086
|
+
(_) => {
|
|
7087
|
+
_.pointerType !== "touch" && (c.current.mouseSwiping && (f == null || f(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null);
|
|
7088
7088
|
},
|
|
7089
7089
|
[f]
|
|
7090
|
-
), P =
|
|
7090
|
+
), P = Qe.useCallback(() => {
|
|
7091
7091
|
c.current.mouseSwiping && (f == null || f(), document.body.style.userSelect = c.current.prevUserSelect), c.current.mouseDown = !1, c.current.mouseSwiping = !1, c.current.capturedEl = null;
|
|
7092
|
-
}, [f]), I =
|
|
7093
|
-
(
|
|
7092
|
+
}, [f]), I = Qe.useCallback(
|
|
7093
|
+
(_) => {
|
|
7094
7094
|
if (c.current.suppressClick) {
|
|
7095
7095
|
c.current.suppressClick = !1;
|
|
7096
7096
|
return;
|
|
7097
7097
|
}
|
|
7098
|
-
g(
|
|
7098
|
+
g(_.target);
|
|
7099
7099
|
},
|
|
7100
7100
|
[g]
|
|
7101
7101
|
);
|
|
7102
|
-
return
|
|
7102
|
+
return Qe.useEffect(
|
|
7103
7103
|
() => () => {
|
|
7104
7104
|
p(), document.body.style.userSelect = "";
|
|
7105
7105
|
},
|
|
7106
7106
|
[]
|
|
7107
7107
|
), {
|
|
7108
7108
|
// touch
|
|
7109
|
-
onTouchStart:
|
|
7110
|
-
onTouchMove:
|
|
7111
|
-
onTouchEnd:
|
|
7109
|
+
onTouchStart: C,
|
|
7110
|
+
onTouchMove: R,
|
|
7111
|
+
onTouchEnd: O,
|
|
7112
7112
|
onTouchCancel: b,
|
|
7113
7113
|
// mouse
|
|
7114
7114
|
onPointerDown: S,
|
|
7115
|
-
onPointerMove:
|
|
7116
|
-
onPointerUp:
|
|
7117
|
-
onPointerCancel:
|
|
7115
|
+
onPointerMove: k,
|
|
7116
|
+
onPointerUp: T,
|
|
7117
|
+
onPointerCancel: M,
|
|
7118
7118
|
onLostPointerCapture: P,
|
|
7119
7119
|
// click (mouse only)
|
|
7120
7120
|
onClick: I
|
|
@@ -7144,18 +7144,18 @@ function Ni() {
|
|
|
7144
7144
|
var e = Tu(), t = typeof self == "object" && self && self.Object === Object && self, n = e || t || Function("return this")();
|
|
7145
7145
|
return Xn = n, Xn;
|
|
7146
7146
|
}
|
|
7147
|
-
var
|
|
7147
|
+
var Qn, Eo;
|
|
7148
7148
|
function ku() {
|
|
7149
|
-
if (Eo) return
|
|
7149
|
+
if (Eo) return Qn;
|
|
7150
7150
|
Eo = 1;
|
|
7151
7151
|
var e = Ni(), t = function() {
|
|
7152
7152
|
return e.Date.now();
|
|
7153
7153
|
};
|
|
7154
|
-
return
|
|
7154
|
+
return Qn = t, Qn;
|
|
7155
7155
|
}
|
|
7156
|
-
var
|
|
7156
|
+
var Yn, Oo;
|
|
7157
7157
|
function Ru() {
|
|
7158
|
-
if (Oo) return
|
|
7158
|
+
if (Oo) return Yn;
|
|
7159
7159
|
Oo = 1;
|
|
7160
7160
|
var e = /\s/;
|
|
7161
7161
|
function t(n) {
|
|
@@ -7163,7 +7163,7 @@ function Ru() {
|
|
|
7163
7163
|
;
|
|
7164
7164
|
return r;
|
|
7165
7165
|
}
|
|
7166
|
-
return
|
|
7166
|
+
return Yn = t, Yn;
|
|
7167
7167
|
}
|
|
7168
7168
|
var Zn, zo;
|
|
7169
7169
|
function _u() {
|
|
@@ -7270,47 +7270,47 @@ function Bu() {
|
|
|
7270
7270
|
if (typeof u != "function")
|
|
7271
7271
|
throw new TypeError(r);
|
|
7272
7272
|
a = n(a) || 0, e(l) && (p = !!l.leading, g = "maxWait" in l, f = g ? o(n(l.maxWait) || 0, a) : f, w = "trailing" in l ? !!l.trailing : w);
|
|
7273
|
-
function
|
|
7274
|
-
var
|
|
7275
|
-
return d = h = void 0, c = I, m = u.apply(z,
|
|
7273
|
+
function C(I) {
|
|
7274
|
+
var _ = d, z = h;
|
|
7275
|
+
return d = h = void 0, c = I, m = u.apply(z, _), m;
|
|
7276
7276
|
}
|
|
7277
|
-
function
|
|
7278
|
-
return c = I, v = setTimeout(S, a), p ?
|
|
7277
|
+
function R(I) {
|
|
7278
|
+
return c = I, v = setTimeout(S, a), p ? C(I) : m;
|
|
7279
7279
|
}
|
|
7280
|
-
function
|
|
7281
|
-
var
|
|
7280
|
+
function O(I) {
|
|
7281
|
+
var _ = I - y, z = I - c, N = a - _;
|
|
7282
7282
|
return g ? i(N, f - z) : N;
|
|
7283
7283
|
}
|
|
7284
7284
|
function b(I) {
|
|
7285
|
-
var
|
|
7286
|
-
return y === void 0 ||
|
|
7285
|
+
var _ = I - y, z = I - c;
|
|
7286
|
+
return y === void 0 || _ >= a || _ < 0 || g && z >= f;
|
|
7287
7287
|
}
|
|
7288
7288
|
function S() {
|
|
7289
7289
|
var I = t();
|
|
7290
7290
|
if (b(I))
|
|
7291
|
-
return
|
|
7292
|
-
v = setTimeout(S,
|
|
7291
|
+
return k(I);
|
|
7292
|
+
v = setTimeout(S, O(I));
|
|
7293
7293
|
}
|
|
7294
|
-
function
|
|
7295
|
-
return v = void 0, w && d ?
|
|
7294
|
+
function k(I) {
|
|
7295
|
+
return v = void 0, w && d ? C(I) : (d = h = void 0, m);
|
|
7296
7296
|
}
|
|
7297
|
-
function
|
|
7297
|
+
function T() {
|
|
7298
7298
|
v !== void 0 && clearTimeout(v), c = 0, d = y = h = v = void 0;
|
|
7299
7299
|
}
|
|
7300
|
-
function
|
|
7301
|
-
return v === void 0 ? m :
|
|
7300
|
+
function M() {
|
|
7301
|
+
return v === void 0 ? m : k(t());
|
|
7302
7302
|
}
|
|
7303
7303
|
function P() {
|
|
7304
|
-
var I = t(),
|
|
7305
|
-
if (d = arguments, h = this, y = I,
|
|
7304
|
+
var I = t(), _ = b(I);
|
|
7305
|
+
if (d = arguments, h = this, y = I, _) {
|
|
7306
7306
|
if (v === void 0)
|
|
7307
|
-
return
|
|
7307
|
+
return R(y);
|
|
7308
7308
|
if (g)
|
|
7309
|
-
return clearTimeout(v), v = setTimeout(S, a),
|
|
7309
|
+
return clearTimeout(v), v = setTimeout(S, a), C(y);
|
|
7310
7310
|
}
|
|
7311
7311
|
return v === void 0 && (v = setTimeout(S, a)), m;
|
|
7312
7312
|
}
|
|
7313
|
-
return P.cancel =
|
|
7313
|
+
return P.cancel = T, P.flush = M, P;
|
|
7314
7314
|
}
|
|
7315
7315
|
return sr = s, sr;
|
|
7316
7316
|
}
|
|
@@ -7318,9 +7318,9 @@ var Gu = Bu();
|
|
|
7318
7318
|
const Lu = /* @__PURE__ */ Uo(Gu);
|
|
7319
7319
|
function Hu(e, t = 200, n, r) {
|
|
7320
7320
|
const o = ie(e), i = ie(n);
|
|
7321
|
-
|
|
7321
|
+
fe(() => {
|
|
7322
7322
|
o.current = e;
|
|
7323
|
-
}, [e]),
|
|
7323
|
+
}, [e]), fe(() => {
|
|
7324
7324
|
i.current = n;
|
|
7325
7325
|
}, [n]);
|
|
7326
7326
|
const s = me(() => {
|
|
@@ -7336,7 +7336,7 @@ function Hu(e, t = 200, n, r) {
|
|
|
7336
7336
|
});
|
|
7337
7337
|
return a.cancel = u.cancel.bind(u), a.flush = u.flush.bind(u), a;
|
|
7338
7338
|
}, [t, r]);
|
|
7339
|
-
return
|
|
7339
|
+
return fe(() => () => s.cancel(), [s]), s;
|
|
7340
7340
|
}
|
|
7341
7341
|
const Nu = "https://fonts.googleapis.com/css2?family=Nanum+Myeongjo:wght@400;700&family=Noto+Sans+KR:wght@300;400;500;700&family=Noto+Serif+KR:wght@400;700&display=swap";
|
|
7342
7342
|
let lr = !1;
|
|
@@ -7406,46 +7406,46 @@ async function $u({
|
|
|
7406
7406
|
if (rt(c, y), s && typeof document < "u" && document.fonts) {
|
|
7407
7407
|
Fu();
|
|
7408
7408
|
try {
|
|
7409
|
-
const
|
|
7410
|
-
await document.fonts.load(
|
|
7409
|
+
const C = `${u}px ${s}`;
|
|
7410
|
+
await document.fonts.load(C), document.fonts.check(C) || await document.fonts.ready;
|
|
7411
7411
|
} catch {
|
|
7412
7412
|
}
|
|
7413
7413
|
}
|
|
7414
7414
|
rt(c, y);
|
|
7415
7415
|
try {
|
|
7416
|
-
const
|
|
7417
|
-
|
|
7418
|
-
const
|
|
7416
|
+
const C = Math.abs(m - 1) > 1e-3, R = 1 / m;
|
|
7417
|
+
C && (t.style.transform = `scale(${R})`, t.style.transformOrigin = "top left");
|
|
7418
|
+
const O = Math.max(0, e.offsetWidth || 0), b = Math.max(0, Math.min(O, o));
|
|
7419
7419
|
t.style.maxWidth = `${b}px`, rt(c, y);
|
|
7420
7420
|
let S = Math.round(n.offsetHeight || 0);
|
|
7421
7421
|
S || (S = Math.max(0, n.clientHeight | 0)), console.log(
|
|
7422
7422
|
"[calcPages] playbackScale:",
|
|
7423
7423
|
m.toFixed(4),
|
|
7424
|
-
|
|
7425
|
-
), console.log("[calcPages] viewWidth:",
|
|
7426
|
-
const
|
|
7427
|
-
letterSpacing:
|
|
7428
|
-
wordSpacing:
|
|
7429
|
-
fontKerning:
|
|
7430
|
-
fontVariantLigatures:
|
|
7431
|
-
textTransform:
|
|
7432
|
-
direction:
|
|
7433
|
-
wordBreak:
|
|
7434
|
-
overflowWrap:
|
|
7435
|
-
hyphens:
|
|
7424
|
+
C ? "(scaled, applying inverse)" : "(no scale)"
|
|
7425
|
+
), console.log("[calcPages] viewWidth:", O), console.log("[calcPages] pageBoxWidth:", b), console.log("[calcPages] maxPageHeight:", S), console.log("[calcPages] contentArea rect:", n.getBoundingClientRect()), console.log("[calcPages] measureRoot rect:", t.getBoundingClientRect());
|
|
7426
|
+
const k = 1.5, T = (B, Z) => Z + B <= S - k, M = getComputedStyle(e), P = {
|
|
7427
|
+
letterSpacing: M.letterSpacing,
|
|
7428
|
+
wordSpacing: M.wordSpacing,
|
|
7429
|
+
fontKerning: M.fontKerning || "normal",
|
|
7430
|
+
fontVariantLigatures: M.fontVariantLigatures || "normal",
|
|
7431
|
+
textTransform: M.textTransform || "none",
|
|
7432
|
+
direction: M.direction || "ltr",
|
|
7433
|
+
wordBreak: M.wordBreak || "keep-all",
|
|
7434
|
+
overflowWrap: M.overflowWrap || M.wordWrap || "break-word",
|
|
7435
|
+
hyphens: M.hyphens || "manual"
|
|
7436
7436
|
}, I = (B) => {
|
|
7437
7437
|
B.style.letterSpacing = P.letterSpacing || "", B.style.wordSpacing = P.wordSpacing || "", B.style.fontKerning = P.fontKerning || "", B.style.fontVariantLigatures = P.fontVariantLigatures || "", B.style.textTransform = P.textTransform || "", B.style.direction = P.direction || "", B.style.wordBreak = P.wordBreak || "", B.style.wordWrap = P.overflowWrap || "", B.style.overflowWrap = P.overflowWrap || "", B.style.hyphens = P.hyphens || "";
|
|
7438
|
-
},
|
|
7438
|
+
}, _ = b, z = Math.max(0, _ - 2 * (i || 0));
|
|
7439
7439
|
n.innerHTML = "";
|
|
7440
7440
|
const N = document.createElement("div");
|
|
7441
|
-
N.style.boxSizing = "border-box", N.style.width = `${
|
|
7441
|
+
N.style.boxSizing = "border-box", N.style.width = `${_}px`, N.style.maxWidth = `${_}px`, N.style.margin = "0 auto", N.style.display = "flex", n.appendChild(N);
|
|
7442
7442
|
const A = document.createElement("div");
|
|
7443
|
-
A.style.boxSizing = "border-box", A.style.paddingRight = `${i}px`, A.style.paddingLeft = `${i}px`, A.style.width = `${
|
|
7443
|
+
A.style.boxSizing = "border-box", A.style.paddingRight = `${i}px`, A.style.paddingLeft = `${i}px`, A.style.width = `${_}px`, A.style.maxWidth = `${_}px`, A.style.margin = "0 auto", A.style.display = "flex", A.style.justifyContent = "center", A.style.height = "auto", N.appendChild(A);
|
|
7444
7444
|
const V = /* @__PURE__ */ new Map(), re = {}, be = Du(c, y, r.length), Se = (B, Z) => {
|
|
7445
7445
|
const F = document.createElement("p");
|
|
7446
7446
|
return F.style.margin = "8px 0", F.style.paddingLeft = Z ? `${Z}px` : "0", F.style.textAlign = B.textAlign ?? "start", F.style.whiteSpace = "pre-wrap", F.style.lineHeight = String(a), F.style.fontSize = `${u}px`, F.style.boxSizing = "border-box", F.style.fontFamily = s ?? "", F.style.width = "100%", I(F), F;
|
|
7447
7447
|
}, Ce = (B, Z) => {
|
|
7448
|
-
const F = Z ?? [],
|
|
7448
|
+
const F = Z ?? [], Q = document.createDocumentFragment();
|
|
7449
7449
|
for (let te = 0; te < F.length; te++) {
|
|
7450
7450
|
const J = F[te], ce = document.createElement("span");
|
|
7451
7451
|
ce.dataset.runbox = String(te), ce.style.whiteSpace = "pre-wrap";
|
|
@@ -7460,16 +7460,16 @@ async function $u({
|
|
|
7460
7460
|
}
|
|
7461
7461
|
ce.appendChild(ke);
|
|
7462
7462
|
}
|
|
7463
|
-
|
|
7463
|
+
Q.appendChild(ce);
|
|
7464
7464
|
}
|
|
7465
|
-
B.appendChild(
|
|
7465
|
+
B.appendChild(Q);
|
|
7466
7466
|
}, xe = v > 80 ? Math.floor((v - 80) * 0.6) : void 0, Fe = (B) => {
|
|
7467
7467
|
const Z = B != null && B.width && (B != null && B.height) ? `${B.width} / ${B.height}` : "4 / 3", F = document.createElement("div");
|
|
7468
7468
|
F.style.margin = "12px 0", F.style.textAlign = "center", F.style.width = `${z}px`;
|
|
7469
|
-
const
|
|
7470
|
-
|
|
7469
|
+
const Q = document.createElement("div");
|
|
7470
|
+
Q.style.position = "relative", Q.style.width = "100%", xe && (Q.style.maxHeight = `${xe}px`), Q.style.aspectRatio = Z;
|
|
7471
7471
|
const te = document.createElement("div");
|
|
7472
|
-
if (te.style.position = "absolute", te.style.inset = "0", te.style.width = "100%", te.style.height = "100%",
|
|
7472
|
+
if (te.style.position = "absolute", te.style.inset = "0", te.style.width = "100%", te.style.height = "100%", Q.appendChild(te), F.appendChild(Q), B != null && B.alt) {
|
|
7473
7473
|
const J = document.createElement("div");
|
|
7474
7474
|
J.style.fontSize = "12px", J.style.color = "#6B7280", J.style.marginTop = "4px", J.textContent = String(B.alt), I(J), F.appendChild(J);
|
|
7475
7475
|
}
|
|
@@ -7485,18 +7485,18 @@ async function $u({
|
|
|
7485
7485
|
re[B] = { contentH: Math.ceil(He.height), mt: Be, mb: $e }, await be(24);
|
|
7486
7486
|
continue;
|
|
7487
7487
|
}
|
|
7488
|
-
const F = Z.block,
|
|
7488
|
+
const F = Z.block, Q = F.list ? (F.list.level ?? 0) * 24 : 0, te = Z.paraIndex ?? 0, J = f[te] ?? (((p = F.list) == null ? void 0 : p.kind) === "bullet" ? ((g = F.list) == null ? void 0 : g.glyph) ?? "•" : void 0);
|
|
7489
7489
|
if (!!(F.list && J)) {
|
|
7490
|
-
const ke = Se(F,
|
|
7490
|
+
const ke = Se(F, Q);
|
|
7491
7491
|
ke.dataset.variant = "with";
|
|
7492
|
-
const Oe = Se(F,
|
|
7492
|
+
const Oe = Se(F, Q);
|
|
7493
7493
|
Oe.dataset.variant = "no";
|
|
7494
7494
|
const He = document.createElement("span");
|
|
7495
7495
|
He.textContent = `${J} `, He.style.minWidth = "16px", He.style.display = "inline-block", He.style.whiteSpace = "nowrap", He.style.userSelect = "none", ke.appendChild(He), Ce(ke, F.runs), Ce(Oe, F.runs);
|
|
7496
7496
|
const Be = document.createDocumentFragment();
|
|
7497
7497
|
Be.appendChild(ke), Be.appendChild(Oe), A.appendChild(Be);
|
|
7498
7498
|
} else {
|
|
7499
|
-
const ke = Se(F,
|
|
7499
|
+
const ke = Se(F, Q);
|
|
7500
7500
|
ke.dataset.variant = "with", Ce(ke, F.runs), A.appendChild(ke);
|
|
7501
7501
|
}
|
|
7502
7502
|
const se = A.querySelector('p[data-variant="with"]'), we = A.querySelector('p[data-variant="no"]'), ge = we ?? se;
|
|
@@ -7521,22 +7521,22 @@ async function $u({
|
|
|
7521
7521
|
await be(24);
|
|
7522
7522
|
}
|
|
7523
7523
|
rt(c, y), A.innerHTML = "";
|
|
7524
|
-
const K = (B, Z, F,
|
|
7524
|
+
const K = (B, Z, F, Q) => {
|
|
7525
7525
|
if (Z > F) return { top: 0, content: 0, mb: 0 };
|
|
7526
|
-
const te =
|
|
7526
|
+
const te = Q ? B.lastBottomNo : B.lastBottomWith, J = Q ? B.mtNo : B.mtWith, ce = Q ? B.mbNo : B.mbWith, se = Q ? 0 : J, we = Z > 0 ? te[Z - 1] ?? 0 : 0, ge = Math.max(0, (te[F] ?? 0) - we);
|
|
7527
7527
|
return { top: se, content: ge, mb: ce };
|
|
7528
7528
|
}, $ = [];
|
|
7529
7529
|
let G = 0, E, L = null, q = null;
|
|
7530
7530
|
for (; G < r.length; ) {
|
|
7531
7531
|
rt(c, y);
|
|
7532
7532
|
const B = G;
|
|
7533
|
-
let Z = 0, F = 0,
|
|
7534
|
-
|
|
7533
|
+
let Z = 0, F = 0, Q = E;
|
|
7534
|
+
Q != null && L === G && q != null && (Q = Math.max(Q, q + 1));
|
|
7535
7535
|
let te = -1, J;
|
|
7536
7536
|
for (; G < r.length; ) {
|
|
7537
7537
|
if (rt(c, y), r[G].kind === "image") {
|
|
7538
7538
|
const Ge = re[G] ?? { contentH: 0, mt: 0, mb: 0 }, nt = (Z === 0 ? Ge.mt : F + Ge.mt) + Ge.contentH;
|
|
7539
|
-
if (
|
|
7539
|
+
if (T(nt, Z)) {
|
|
7540
7540
|
Z += nt, te = G, J = void 0, F = Ge.mb, G += 1, E = void 0, L = null, q = null;
|
|
7541
7541
|
continue;
|
|
7542
7542
|
}
|
|
@@ -7544,20 +7544,20 @@ async function $u({
|
|
|
7544
7544
|
$.push({
|
|
7545
7545
|
startBlock: B,
|
|
7546
7546
|
endBlock: G,
|
|
7547
|
-
...
|
|
7547
|
+
...Q != null ? { startOffsetInBlock: Q } : {}
|
|
7548
7548
|
// 이미지에는 run 오프셋 개념이 없어 endOffsetInBlock 생략
|
|
7549
7549
|
}), G += 1, E = void 0, L = null, q = null, F = 0;
|
|
7550
7550
|
break;
|
|
7551
7551
|
}
|
|
7552
7552
|
break;
|
|
7553
7553
|
}
|
|
7554
|
-
const se = V.get(G), we = se.runsLen, ge = G === B &&
|
|
7554
|
+
const se = V.get(G), we = se.runsLen, ge = G === B && Q != null ? Q : 0;
|
|
7555
7555
|
if (ge >= we) {
|
|
7556
7556
|
G += 1, E = void 0, L = null, q = null;
|
|
7557
7557
|
continue;
|
|
7558
7558
|
}
|
|
7559
7559
|
const ke = ge > 0, Oe = K(se, ge, we - 1, ke), Be = (Z === 0 ? Oe.top : F + Oe.top) + Oe.content;
|
|
7560
|
-
if (
|
|
7560
|
+
if (T(Be, Z)) {
|
|
7561
7561
|
Z += Be, te = G, J = we - 1, F = Oe.mb, G += 1, E = void 0, L = null, q = null;
|
|
7562
7562
|
continue;
|
|
7563
7563
|
}
|
|
@@ -7565,13 +7565,13 @@ async function $u({
|
|
|
7565
7565
|
for (; $e <= ut; ) {
|
|
7566
7566
|
rt(c, y);
|
|
7567
7567
|
const Ge = $e + ut >> 1, st = K(se, ge, Ge, ke), nt = (Z === 0 ? st.top : F + st.top) + st.content;
|
|
7568
|
-
|
|
7568
|
+
T(nt, Z) ? (Xe = Ge, $e = Ge + 1) : ut = Ge - 1;
|
|
7569
7569
|
}
|
|
7570
7570
|
if (Xe >= ge) {
|
|
7571
7571
|
$.push({
|
|
7572
7572
|
startBlock: B,
|
|
7573
7573
|
endBlock: G,
|
|
7574
|
-
...
|
|
7574
|
+
...Q != null ? { startOffsetInBlock: Q } : {},
|
|
7575
7575
|
endOffsetInBlock: Xe
|
|
7576
7576
|
}), E = Xe + 1, L = G, q = Xe, F = 0;
|
|
7577
7577
|
break;
|
|
@@ -7580,7 +7580,7 @@ async function $u({
|
|
|
7580
7580
|
$.push({
|
|
7581
7581
|
startBlock: B,
|
|
7582
7582
|
endBlock: te >= 0 ? te : Math.min(G - 1, r.length - 1),
|
|
7583
|
-
...
|
|
7583
|
+
...Q != null ? { startOffsetInBlock: Q } : {},
|
|
7584
7584
|
...J != null ? { endOffsetInBlock: J } : {}
|
|
7585
7585
|
}), F = 0;
|
|
7586
7586
|
break;
|
|
@@ -7589,7 +7589,7 @@ async function $u({
|
|
|
7589
7589
|
$.push({
|
|
7590
7590
|
startBlock: B,
|
|
7591
7591
|
endBlock: G,
|
|
7592
|
-
...
|
|
7592
|
+
...Q != null ? { startOffsetInBlock: Q } : {},
|
|
7593
7593
|
endOffsetInBlock: Ge
|
|
7594
7594
|
}), E = Ge + 1, L = G, q = Ge, F = 0;
|
|
7595
7595
|
break;
|
|
@@ -7598,13 +7598,13 @@ async function $u({
|
|
|
7598
7598
|
($.length === 0 || $[$.length - 1].startBlock !== B) && $.push({
|
|
7599
7599
|
startBlock: B,
|
|
7600
7600
|
endBlock: te >= 0 ? te : Math.min(G - 1, r.length - 1),
|
|
7601
|
-
...
|
|
7601
|
+
...Q != null ? { startOffsetInBlock: Q } : {},
|
|
7602
7602
|
...J != null ? { endOffsetInBlock: J } : {}
|
|
7603
7603
|
});
|
|
7604
7604
|
}
|
|
7605
|
-
return N.remove(),
|
|
7606
|
-
} catch (
|
|
7607
|
-
throw console.error(
|
|
7605
|
+
return N.remove(), C && (t.style.transform = "", t.style.transformOrigin = ""), rt(c, y), { pages: $, pageByRunIndex: null };
|
|
7606
|
+
} catch (C) {
|
|
7607
|
+
throw console.error(C), C;
|
|
7608
7608
|
}
|
|
7609
7609
|
}
|
|
7610
7610
|
function Do(e, t, n) {
|
|
@@ -7664,7 +7664,7 @@ function Uu(e) {
|
|
|
7664
7664
|
function Ku() {
|
|
7665
7665
|
var Lr;
|
|
7666
7666
|
const e = Xi(), t = j((U) => U.section), n = j((U) => U.sectionLoading), r = yt(), o = ie(!1);
|
|
7667
|
-
|
|
7667
|
+
fe(() => r.subscribe((U) => {
|
|
7668
7668
|
o.current = U.progress.rangeStartGI != null && U.progress.rangeEndGI != null;
|
|
7669
7669
|
}), [r]);
|
|
7670
7670
|
const i = o.current, s = It(), u = X((U) => U.theme), a = vn[u], l = X((U) => U.fontFamily), d = X((U) => U.fontSizePx), h = X((U) => U.lineHeight), f = X((U) => U.marginX), m = X((U) => U.viewportHeight), v = 860, y = ie(null), { items: c } = me(() => {
|
|
@@ -7681,7 +7681,7 @@ function Ku() {
|
|
|
7681
7681
|
}, [c]), [g, w] = pt({
|
|
7682
7682
|
pages: [],
|
|
7683
7683
|
pageByRunIndex: null
|
|
7684
|
-
}),
|
|
7684
|
+
}), C = j((U) => U.pageIndex), R = j((U) => U.setPageIndex), O = ie(0), b = ie(null), [S, k] = pt(!1), [T, M] = pt(null), [P, I] = pt(!1), _ = me(
|
|
7685
7685
|
() => ({
|
|
7686
7686
|
flex: 1,
|
|
7687
7687
|
fontFamily: l,
|
|
@@ -7713,7 +7713,7 @@ function Ku() {
|
|
|
7713
7713
|
};
|
|
7714
7714
|
})
|
|
7715
7715
|
), V = yt();
|
|
7716
|
-
|
|
7716
|
+
fe(() => {
|
|
7717
7717
|
g && g.pages.length && (console.log("그래서 총 페이지", g.pages.length), V.getState().progress.setTotalPages(g.pages.length + 1), (async () => {
|
|
7718
7718
|
const U = V.getState().progress.setSectionLoading;
|
|
7719
7719
|
await St(), await St(), await St(), await St(), console.log("recalc종료"), U(!1);
|
|
@@ -7723,7 +7723,7 @@ function Ku() {
|
|
|
7723
7723
|
console.log("@@@@@@recalc호출");
|
|
7724
7724
|
const U = y.current, Le = se.current, We = we.current;
|
|
7725
7725
|
if (console.log("showSplit", z), !U || !Le || !We || c.length === 0) {
|
|
7726
|
-
w({ pages: [], pageByRunIndex: null }),
|
|
7726
|
+
w({ pages: [], pageByRunIndex: null }), R(0), V.getState().progress.setTotalPages(0);
|
|
7727
7727
|
return;
|
|
7728
7728
|
}
|
|
7729
7729
|
(async () => {
|
|
@@ -7749,7 +7749,7 @@ function Ku() {
|
|
|
7749
7749
|
}), ji = performance.now();
|
|
7750
7750
|
console.log(
|
|
7751
7751
|
`✅ calcPages 완료: ${(ji - Rt).toFixed(1)} ms (${At.length} pages)`
|
|
7752
|
-
), w({ pages: At, pageByRunIndex: qi }),
|
|
7752
|
+
), w({ pages: At, pageByRunIndex: qi }), R(0);
|
|
7753
7753
|
} catch (lt) {
|
|
7754
7754
|
if (lt instanceof $i) {
|
|
7755
7755
|
console.log("이젠실행 취소 들어옴!");
|
|
@@ -7759,7 +7759,7 @@ function Ku() {
|
|
|
7759
7759
|
}
|
|
7760
7760
|
})();
|
|
7761
7761
|
}, [
|
|
7762
|
-
|
|
7762
|
+
R,
|
|
7763
7763
|
c,
|
|
7764
7764
|
v,
|
|
7765
7765
|
f,
|
|
@@ -7778,26 +7778,26 @@ function Ku() {
|
|
|
7778
7778
|
return ((Le = U.layout) == null ? void 0 : Le.prefix) ?? [];
|
|
7779
7779
|
}), Ce = _e((U) => U.syncToGI), xe = ne(
|
|
7780
7780
|
(U) => {
|
|
7781
|
-
const Le = g.pages.length + 1, We =
|
|
7781
|
+
const Le = g.pages.length + 1, We = C + U;
|
|
7782
7782
|
if (We < 0 || We >= Le) return;
|
|
7783
|
-
const Rt =
|
|
7783
|
+
const Rt = C === g.pages.length;
|
|
7784
7784
|
if (We === g.pages.length) {
|
|
7785
|
-
|
|
7785
|
+
R(We);
|
|
7786
7786
|
return;
|
|
7787
7787
|
}
|
|
7788
7788
|
if (Rt && U === -1) {
|
|
7789
7789
|
const At = Do(g.pages[We], c, Se);
|
|
7790
|
-
At != null && (be(At, "scrubber-step"), Ce(At)),
|
|
7790
|
+
At != null && (be(At, "scrubber-step"), Ce(At)), R(We);
|
|
7791
7791
|
return;
|
|
7792
7792
|
}
|
|
7793
7793
|
const lt = Do(g.pages[We], c, Se);
|
|
7794
|
-
lt != null ? (be(lt, "scrubber-step"), Ce(lt)) :
|
|
7794
|
+
lt != null ? (be(lt, "scrubber-step"), Ce(lt)) : R(We);
|
|
7795
7795
|
},
|
|
7796
|
-
[
|
|
7796
|
+
[C, g.pages, c, Se, be, R, Ce]
|
|
7797
7797
|
), Fe = ne(() => {
|
|
7798
|
-
S ||
|
|
7798
|
+
S || O.current !== 0 ? (M("prev"), k(!1)) : xe(-1);
|
|
7799
7799
|
}, [S, xe]), K = ne(() => {
|
|
7800
|
-
S ||
|
|
7800
|
+
S || O.current !== 0 ? (M("next"), k(!1)) : xe(1);
|
|
7801
7801
|
}, [S, xe]), $ = Rn(), G = ne(() => {
|
|
7802
7802
|
const { isSettingsOpen: U, setSettingsOpen: Le, toggleOverlays: We } = $.getState();
|
|
7803
7803
|
U ? Le(!1) : We();
|
|
@@ -7809,20 +7809,20 @@ function Ku() {
|
|
|
7809
7809
|
Le.style.transform = `translate3d(${-33.333 + Rt}%, 0, 0)`;
|
|
7810
7810
|
}, []), B = ne(
|
|
7811
7811
|
(U) => {
|
|
7812
|
-
|
|
7812
|
+
C === 0 && U > 0 || C >= E - 1 && U < 0 || (O.current = U, q(U), S || k(!0));
|
|
7813
7813
|
},
|
|
7814
|
-
[
|
|
7814
|
+
[C, E, q, S]
|
|
7815
7815
|
), Z = ne(() => {
|
|
7816
|
-
|
|
7816
|
+
O.current = 0, k(!1);
|
|
7817
7817
|
const U = b.current;
|
|
7818
7818
|
U && (U.style.transition = "transform 250ms ease-out", U.style.transform = "translate3d(-33.333%, 0, 0)");
|
|
7819
7819
|
}, []), F = ne(
|
|
7820
7820
|
(U) => {
|
|
7821
7821
|
if (U.target !== U.currentTarget || U.propertyName !== "transform") return;
|
|
7822
|
-
const Le =
|
|
7823
|
-
I(!0),
|
|
7822
|
+
const Le = T;
|
|
7823
|
+
I(!0), M(null), O.current = 0, Le === "prev" ? xe(-1) : Le === "next" && xe(1);
|
|
7824
7824
|
},
|
|
7825
|
-
[
|
|
7825
|
+
[T, xe]
|
|
7826
7826
|
);
|
|
7827
7827
|
_t(() => {
|
|
7828
7828
|
P && requestAnimationFrame(() => {
|
|
@@ -7831,12 +7831,12 @@ function Ku() {
|
|
|
7831
7831
|
});
|
|
7832
7832
|
});
|
|
7833
7833
|
}, [P]);
|
|
7834
|
-
const
|
|
7834
|
+
const Q = xn(), te = ne(
|
|
7835
7835
|
(U) => i || ju(U) ? !0 : qu(U),
|
|
7836
7836
|
[i]
|
|
7837
7837
|
), J = ne(
|
|
7838
|
-
(U) =>
|
|
7839
|
-
[
|
|
7838
|
+
(U) => Q.getState().status === "playing" ? !0 : te(U),
|
|
7839
|
+
[Q, te]
|
|
7840
7840
|
), ce = Cu({
|
|
7841
7841
|
onPrev: Fe,
|
|
7842
7842
|
onNext: K,
|
|
@@ -7863,7 +7863,7 @@ function Ku() {
|
|
|
7863
7863
|
}),
|
|
7864
7864
|
[]
|
|
7865
7865
|
), Oe = Hu(re, 200, ge, ke), He = ie("");
|
|
7866
|
-
|
|
7866
|
+
fe(() => {
|
|
7867
7867
|
if (m <= 0) return;
|
|
7868
7868
|
const U = `${l}|${d}|${h}|${f}|${z}|${N}|${A}|${m}|${t == null ? void 0 : t.section_id}`;
|
|
7869
7869
|
He.current !== U && (He.current = U, console.log("debounceRecalc 취소"), Oe.cancel(), ge(), re());
|
|
@@ -7882,7 +7882,7 @@ function Ku() {
|
|
|
7882
7882
|
t == null ? void 0 : t.section_id
|
|
7883
7883
|
]), Iu([y], Oe);
|
|
7884
7884
|
const Be = j((U) => U.registerSectionScrollApi);
|
|
7885
|
-
|
|
7885
|
+
fe(() => (Be({
|
|
7886
7886
|
// 페이지 모드에서는 GI 기반 스크롤 불필요 - 더미 구현
|
|
7887
7887
|
ensureVisibleGI: () => Promise.resolve(!0),
|
|
7888
7888
|
scrollToGI: () => Promise.resolve(!0),
|
|
@@ -7895,7 +7895,7 @@ function Ku() {
|
|
|
7895
7895
|
// 페이지 이동 구현
|
|
7896
7896
|
stepPage: xe
|
|
7897
7897
|
}), () => Be(void 0)), [Be, xe]);
|
|
7898
|
-
const $e = t.quizzes && t.quizzes.length > 0, ut = g.pages.length > 0 &&
|
|
7898
|
+
const $e = t.quizzes && t.quizzes.length > 0, ut = g.pages.length > 0 && C === g.pages.length, Xe = C > 0 ? C - 1 : null, Ge = C < E - 1 ? C + 1 : null, st = me(() => T === "prev" ? "translate3d(0%, 0, 0)" : T === "next" ? "translate3d(-66.666%, 0, 0)" : "translate3d(-33.333%, 0, 0)", [T]), nt = (U) => n ? null : U === g.pages.length ? /* @__PURE__ */ ee(
|
|
7899
7899
|
"div",
|
|
7900
7900
|
{
|
|
7901
7901
|
style: {
|
|
@@ -7923,8 +7923,8 @@ function Ku() {
|
|
|
7923
7923
|
boxSizing: "border-box",
|
|
7924
7924
|
backfaceVisibility: "hidden",
|
|
7925
7925
|
WebkitBackfaceVisibility: "hidden"
|
|
7926
|
-
}, Vt = !P && (!S ||
|
|
7927
|
-
return console.log("여기리랜더"), /* @__PURE__ */ ee("div", { ref: y, style: { ...
|
|
7926
|
+
}, Vt = !P && (!S || T !== null);
|
|
7927
|
+
return console.log("여기리랜더"), /* @__PURE__ */ ee("div", { ref: y, style: { ..._, touchAction: "none" }, ...ce, children: [
|
|
7928
7928
|
/* @__PURE__ */ ee(
|
|
7929
7929
|
"div",
|
|
7930
7930
|
{
|
|
@@ -7941,10 +7941,10 @@ function Ku() {
|
|
|
7941
7941
|
backfaceVisibility: "hidden",
|
|
7942
7942
|
WebkitBackfaceVisibility: "hidden"
|
|
7943
7943
|
},
|
|
7944
|
-
onTransitionEnd:
|
|
7944
|
+
onTransitionEnd: T ? F : void 0,
|
|
7945
7945
|
children: [
|
|
7946
7946
|
/* @__PURE__ */ x("div", { style: bt, children: Xe !== null && nt(Xe) }),
|
|
7947
|
-
/* @__PURE__ */ x("div", { style: bt, children: nt(
|
|
7947
|
+
/* @__PURE__ */ x("div", { style: bt, children: nt(C) }),
|
|
7948
7948
|
/* @__PURE__ */ x("div", { style: bt, children: Ge !== null && nt(Ge) })
|
|
7949
7949
|
]
|
|
7950
7950
|
}
|
|
@@ -8017,8 +8017,8 @@ function Ku() {
|
|
|
8017
8017
|
{
|
|
8018
8018
|
pages: g.pages,
|
|
8019
8019
|
items: c,
|
|
8020
|
-
onGotoPage:
|
|
8021
|
-
currentPageIndex:
|
|
8020
|
+
onGotoPage: R,
|
|
8021
|
+
currentPageIndex: C,
|
|
8022
8022
|
isOnExtraPage: ut
|
|
8023
8023
|
}
|
|
8024
8024
|
)
|
|
@@ -8029,15 +8029,15 @@ const Xu = ({ pages: e, items: t, onGotoPage: n, currentPageIndex: r, isOnExtraP
|
|
|
8029
8029
|
var d;
|
|
8030
8030
|
return ((d = l.layout) == null ? void 0 : d.prefix) ?? [];
|
|
8031
8031
|
}), a = D.useRef(null);
|
|
8032
|
-
return
|
|
8032
|
+
return fe(() => {
|
|
8033
8033
|
if (i == null || e.length === 0 || o && !(s === "scrubber-live" || s === "scrubber-commit") || a.current === i) return;
|
|
8034
8034
|
a.current = i;
|
|
8035
8035
|
const l = Vu(i, e, t, u);
|
|
8036
8036
|
l >= 0 && l !== r && n(l);
|
|
8037
8037
|
}, [i, e, t, u, n, r, o, s]), /* @__PURE__ */ x(wt, {});
|
|
8038
|
-
},
|
|
8039
|
-
wrapper:
|
|
8040
|
-
spinner:
|
|
8038
|
+
}, Qu = "_wrapper_dbk3n_1", Yu = "_spinner_dbk3n_10", $o = {
|
|
8039
|
+
wrapper: Qu,
|
|
8040
|
+
spinner: Yu
|
|
8041
8041
|
};
|
|
8042
8042
|
function Zu({ size: e = 28, speed: t = 0.8 }) {
|
|
8043
8043
|
return /* @__PURE__ */ x("div", { className: `${$o.wrapper}`, children: /* @__PURE__ */ x(
|
|
@@ -8103,7 +8103,7 @@ function Md(e) {
|
|
|
8103
8103
|
}
|
|
8104
8104
|
const Ed = Wt(function() {
|
|
8105
8105
|
const t = Je((c) => c.phase), n = Je((c) => c.quizzes), r = Je((c) => c.order), o = Je((c) => c.currentIndex), i = Je((c) => c.answers), s = Je((c) => c.correctCount), u = Je((c) => c.remainingSec), a = Je((c) => c.uiReveal), l = Je((c) => c.startedAt), d = Je((c) => c.finishedAt), h = Je((c) => c.perQ), f = Pi();
|
|
8106
|
-
|
|
8106
|
+
fe(() => {
|
|
8107
8107
|
if (t === "idle" || t !== "doing" || u == null) return;
|
|
8108
8108
|
const c = window.setInterval(() => f.getState().tick(), 1e3);
|
|
8109
8109
|
return () => window.clearInterval(c);
|
|
@@ -8113,20 +8113,20 @@ const Ed = Wt(function() {
|
|
|
8113
8113
|
const c = r.map((A) => n[A]), p = c.length, g = c.reduce((A, V) => A + (V.score ?? 0), 0), w = c.reduce((A, V) => {
|
|
8114
8114
|
const re = h[V.qid];
|
|
8115
8115
|
return A + (re != null && re.isCorrect ? V.score ?? 0 : 0);
|
|
8116
|
-
}, 0),
|
|
8116
|
+
}, 0), C = c.map((A) => h[A.qid]).filter((A) => !!A), R = typeof l == "number" && typeof d == "number" ? Math.max(0, d - l) : C.reduce((A, V) => A + (V.ms ?? 0), 0), O = p > 0 ? Math.round(R / p) : 0, b = [...C].sort((A, V) => A.ms - V.ms), S = b[0], k = b[b.length - 1], T = C.filter((A) => !A.multi), M = C.filter((A) => A.multi), P = T.filter((A) => A.isCorrect).length, I = M.filter((A) => A.isCorrect).length, _ = C.filter((A) => A.timedOut).length, z = C.filter((A) => A.revealed).length, N = C.filter((A) => !A.isCorrect).sort((A, V) => V.ms - A.ms).slice(0, 3);
|
|
8117
8117
|
return {
|
|
8118
8118
|
total: p,
|
|
8119
8119
|
correct: s,
|
|
8120
8120
|
rate: p ? Math.round(s / p * 100) : 0,
|
|
8121
|
-
timeMsTotal:
|
|
8122
|
-
avgMs:
|
|
8121
|
+
timeMsTotal: R,
|
|
8122
|
+
avgMs: O,
|
|
8123
8123
|
totalScore: g,
|
|
8124
8124
|
gainedScore: w,
|
|
8125
8125
|
fastest: S,
|
|
8126
|
-
slowest:
|
|
8127
|
-
singles: { total:
|
|
8128
|
-
multis: { total:
|
|
8129
|
-
timedOut:
|
|
8126
|
+
slowest: k,
|
|
8127
|
+
singles: { total: T.length, correct: P },
|
|
8128
|
+
multis: { total: M.length, correct: I },
|
|
8129
|
+
timedOut: _,
|
|
8130
8130
|
revealed: z,
|
|
8131
8131
|
wrongTop3: N
|
|
8132
8132
|
};
|
|
@@ -8219,7 +8219,7 @@ function Od(e) {
|
|
|
8219
8219
|
),
|
|
8220
8220
|
/* @__PURE__ */ x("div", { className: de.Image, children: m && /* @__PURE__ */ x("img", { src: m, alt: "" }) }),
|
|
8221
8221
|
/* @__PURE__ */ x("div", { className: de.Options, children: f.map(({ opt: c, i: p }) => {
|
|
8222
|
-
const g = o.includes(p), w = v.includes(p),
|
|
8222
|
+
const g = o.includes(p), w = v.includes(p), C = [
|
|
8223
8223
|
de.OptionBtn,
|
|
8224
8224
|
g ? de.OptionBtnActive : "",
|
|
8225
8225
|
i && w ? de.OptionBtnCorrect : ""
|
|
@@ -8229,7 +8229,7 @@ function Od(e) {
|
|
|
8229
8229
|
{
|
|
8230
8230
|
type: "button",
|
|
8231
8231
|
onClick: () => s(p),
|
|
8232
|
-
className:
|
|
8232
|
+
className: C,
|
|
8233
8233
|
disabled: i,
|
|
8234
8234
|
children: c
|
|
8235
8235
|
},
|
|
@@ -8417,7 +8417,7 @@ function Bd(e, t) {
|
|
|
8417
8417
|
submitCurrent: () => {
|
|
8418
8418
|
const l = a();
|
|
8419
8419
|
if (l.phase !== "doing") return;
|
|
8420
|
-
const d = l.order[l.currentIndex], h = l.quizzes[d], f = h.qid, m = (l.answers[f] ?? []).slice().sort((w,
|
|
8420
|
+
const d = l.order[l.currentIndex], h = l.quizzes[d], f = h.qid, m = (l.answers[f] ?? []).slice().sort((w, C) => w - C), v = ur(h), y = Ad(m, v), c = l.questionStartedAt ? Date.now() - l.questionStartedAt : 0, p = l.perQ[f], g = {
|
|
8421
8421
|
qid: f,
|
|
8422
8422
|
index: h.index,
|
|
8423
8423
|
question: h.question,
|
|
@@ -8535,47 +8535,50 @@ function Gd({ children: e, initialState: t }) {
|
|
|
8535
8535
|
previousResult: t.previousQuizResult ?? null
|
|
8536
8536
|
}),
|
|
8537
8537
|
[t]
|
|
8538
|
-
), r = ie(t.onQuizComplete);
|
|
8539
|
-
return
|
|
8540
|
-
r.current = t.
|
|
8541
|
-
}, [t.
|
|
8542
|
-
|
|
8543
|
-
|
|
8544
|
-
|
|
8545
|
-
|
|
8546
|
-
|
|
8547
|
-
|
|
8548
|
-
|
|
8549
|
-
|
|
8550
|
-
|
|
8551
|
-
return
|
|
8552
|
-
}
|
|
8553
|
-
const
|
|
8538
|
+
), r = ie(t.onQuizStart), o = ie(t.onQuizComplete);
|
|
8539
|
+
return fe(() => {
|
|
8540
|
+
r.current = t.onQuizStart;
|
|
8541
|
+
}, [t.onQuizStart]), fe(() => {
|
|
8542
|
+
o.current = t.onQuizComplete;
|
|
8543
|
+
}, [t.onQuizComplete]), fe(() => {
|
|
8544
|
+
const i = n.subscribe((s, u) => {
|
|
8545
|
+
var a;
|
|
8546
|
+
if (u.phase !== "doing" && s.phase === "doing" && ((a = r.current) == null || a.call(r)), u.phase !== "finished" && s.phase === "finished") {
|
|
8547
|
+
const l = o.current;
|
|
8548
|
+
if (!l || !s.retryAllowed && s.previousResult && !s.startedAt) return;
|
|
8549
|
+
const { sectionId: d, quizzes: h, order: f, perQ: m, startedAt: v, finishedAt: y } = s, c = f.map((S) => h[S]), p = c.length, g = c.filter((S) => {
|
|
8550
|
+
var k;
|
|
8551
|
+
return (k = m[S.qid]) == null ? void 0 : k.isCorrect;
|
|
8552
|
+
}).length, w = c.reduce((S, k) => S + (k.score ?? 0), 0), C = c.reduce((S, k) => {
|
|
8553
|
+
const T = m[k.qid];
|
|
8554
|
+
return S + (T != null && T.isCorrect ? k.score ?? 0 : 0);
|
|
8555
|
+
}, 0), R = typeof v == "number" && typeof y == "number" ? Math.max(0, y - v) : 0, O = c.map((S) => {
|
|
8556
|
+
const k = m[S.qid];
|
|
8554
8557
|
return {
|
|
8555
|
-
qid:
|
|
8556
|
-
index:
|
|
8557
|
-
question:
|
|
8558
|
-
score:
|
|
8559
|
-
isCorrect: (
|
|
8560
|
-
selected: (
|
|
8561
|
-
correctIdxes: (
|
|
8562
|
-
ms: (
|
|
8563
|
-
timedOut: (
|
|
8558
|
+
qid: S.qid,
|
|
8559
|
+
index: S.index,
|
|
8560
|
+
question: S.question,
|
|
8561
|
+
score: S.score ?? 0,
|
|
8562
|
+
isCorrect: (k == null ? void 0 : k.isCorrect) ?? !1,
|
|
8563
|
+
selected: (k == null ? void 0 : k.selected) ?? [],
|
|
8564
|
+
correctIdxes: (k == null ? void 0 : k.correctIdxes) ?? [],
|
|
8565
|
+
ms: (k == null ? void 0 : k.ms) ?? 0,
|
|
8566
|
+
timedOut: (k == null ? void 0 : k.timedOut) ?? !1
|
|
8564
8567
|
};
|
|
8565
|
-
}),
|
|
8566
|
-
sectionId:
|
|
8567
|
-
total:
|
|
8568
|
-
correct:
|
|
8569
|
-
rate:
|
|
8570
|
-
totalScore:
|
|
8571
|
-
gainedScore:
|
|
8572
|
-
timeMsTotal:
|
|
8573
|
-
perQuestion:
|
|
8568
|
+
}), b = {
|
|
8569
|
+
sectionId: d ?? "",
|
|
8570
|
+
total: p,
|
|
8571
|
+
correct: g,
|
|
8572
|
+
rate: p > 0 ? Math.round(g / p * 100) : 0,
|
|
8573
|
+
totalScore: w,
|
|
8574
|
+
gainedScore: C,
|
|
8575
|
+
timeMsTotal: R,
|
|
8576
|
+
perQuestion: O
|
|
8574
8577
|
};
|
|
8575
|
-
|
|
8578
|
+
l(b);
|
|
8576
8579
|
}
|
|
8577
8580
|
});
|
|
8578
|
-
return () =>
|
|
8581
|
+
return () => i();
|
|
8579
8582
|
}, [n]), /* @__PURE__ */ x(Gr.Provider, { value: n, children: e });
|
|
8580
8583
|
}
|
|
8581
8584
|
const jo = [
|
|
@@ -8600,7 +8603,7 @@ const jo = [
|
|
|
8600
8603
|
];
|
|
8601
8604
|
function Ld({ containerRef: e }) {
|
|
8602
8605
|
const t = It(), n = Rn(), r = ie(null);
|
|
8603
|
-
return
|
|
8606
|
+
return fe(() => {
|
|
8604
8607
|
const o = e.current;
|
|
8605
8608
|
if (!o) return;
|
|
8606
8609
|
let i = o.clientWidth, s = o.clientHeight;
|
|
@@ -8613,7 +8616,7 @@ function Ld({ containerRef: e }) {
|
|
|
8613
8616
|
}));
|
|
8614
8617
|
});
|
|
8615
8618
|
return u.observe(o), () => u.disconnect();
|
|
8616
|
-
}, [t, n, e]),
|
|
8619
|
+
}, [t, n, e]), fe(() => {
|
|
8617
8620
|
const o = n.getState();
|
|
8618
8621
|
r.current = {};
|
|
8619
8622
|
for (const s of jo)
|
|
@@ -8681,12 +8684,12 @@ function Hd() {
|
|
|
8681
8684
|
},
|
|
8682
8685
|
[t, n, o]
|
|
8683
8686
|
), s = ne(() => {
|
|
8684
|
-
var
|
|
8685
|
-
const a = t.getState(), l = n.getState().progress, d = (
|
|
8687
|
+
var R, O, b, S;
|
|
8688
|
+
const a = t.getState(), l = n.getState().progress, d = (R = l.getSectionScrollApi) == null ? void 0 : R.call(l), h = l.currentGlobalRunIndex ?? 0, f = ((O = d == null ? void 0 : d.getScrollTop) == null ? void 0 : O.call(d)) ?? 0, m = ((b = d == null ? void 0 : d.getAnchorOffsetRatio) == null ? void 0 : b.call(d, h)) ?? 0, v = o == null ? void 0 : o.getState(), y = v ? {
|
|
8686
8689
|
status: v.status,
|
|
8687
8690
|
currentClip: v.currentClip,
|
|
8688
8691
|
currentTimeMs: v.currentTimeMs
|
|
8689
|
-
} : void 0, { rangeStartGI: c, rangeEndGI: p } = l, g = c != null && p != null ? { startGI: c, endGI: p, text: l.getRangeText() } : null, w = ((S = d == null ? void 0 : d.getScrollRatio) == null ? void 0 : S.call(d)) ?? 0,
|
|
8692
|
+
} : void 0, { rangeStartGI: c, rangeEndGI: p } = l, g = c != null && p != null ? { startGI: c, endGI: p, text: l.getRangeText() } : null, w = ((S = d == null ? void 0 : d.getScrollRatio) == null ? void 0 : S.call(d)) ?? 0, C = l.translateOpen ? {
|
|
8690
8693
|
isOpen: !0,
|
|
8691
8694
|
isLoading: l.translateLoading,
|
|
8692
8695
|
text: l.translateText,
|
|
@@ -8729,7 +8732,7 @@ function Hd() {
|
|
|
8729
8732
|
viewportHeight: a.viewportHeight,
|
|
8730
8733
|
audio: y,
|
|
8731
8734
|
range: g,
|
|
8732
|
-
translate:
|
|
8735
|
+
translate: C
|
|
8733
8736
|
};
|
|
8734
8737
|
}, [t, n, o]), u = ne(
|
|
8735
8738
|
(a) => {
|
|
@@ -8867,7 +8870,7 @@ function Fd({
|
|
|
8867
8870
|
containerRef: e
|
|
8868
8871
|
}) {
|
|
8869
8872
|
const t = X((d) => d.fontSizePx), n = X((d) => d.fontFamily), r = X((d) => d.lineHeight), o = X((d) => d.marginX), i = X((d) => d.breakMarks), s = X((d) => d.breakGapPx), u = X((d) => d.showSplit), a = X((d) => d.viewportWidth), l = It();
|
|
8870
|
-
return
|
|
8873
|
+
return fe(() => {
|
|
8871
8874
|
const d = e.current;
|
|
8872
8875
|
if (!d) return;
|
|
8873
8876
|
let h, f;
|
|
@@ -8897,7 +8900,7 @@ const Wd = ({
|
|
|
8897
8900
|
onTranslate: t
|
|
8898
8901
|
}) => {
|
|
8899
8902
|
const n = j((f) => f.rangeStartGI), r = j((f) => f.rangeEndGI), o = j((f) => f.getRangeText), i = j((f) => f.clearRange), s = It(), u = n != null && r != null, [a, l] = pt(null);
|
|
8900
|
-
|
|
8903
|
+
fe(() => {
|
|
8901
8904
|
if (!u) return;
|
|
8902
8905
|
const f = e.current;
|
|
8903
8906
|
if (!f) return;
|
|
@@ -8910,7 +8913,7 @@ const Wd = ({
|
|
|
8910
8913
|
i();
|
|
8911
8914
|
});
|
|
8912
8915
|
return v.observe(f), () => v.disconnect();
|
|
8913
|
-
}, [u, i, e]),
|
|
8916
|
+
}, [u, i, e]), fe(() => {
|
|
8914
8917
|
if (!u || n == null || r == null) {
|
|
8915
8918
|
l(null);
|
|
8916
8919
|
return;
|
|
@@ -8923,15 +8926,15 @@ const Wd = ({
|
|
|
8923
8926
|
l({ x: y.width * p / 2, y: 80 });
|
|
8924
8927
|
return;
|
|
8925
8928
|
}
|
|
8926
|
-
const w = g.getBoundingClientRect(),
|
|
8927
|
-
let
|
|
8928
|
-
|
|
8929
|
-
const b = 160, S = 50,
|
|
8930
|
-
|
|
8931
|
-
Math.min(
|
|
8932
|
-
), I = (((
|
|
8933
|
-
let
|
|
8934
|
-
I <
|
|
8929
|
+
const w = g.getBoundingClientRect(), C = v.querySelector(`[data-g="${n}"]`), R = C == null ? void 0 : C.getBoundingClientRect();
|
|
8930
|
+
let O = (w.left + w.width / 2 - y.left) * p;
|
|
8931
|
+
R && (O = ((R.left + w.right) / 2 - y.left) * p);
|
|
8932
|
+
const b = 160, S = 50, k = 16, T = 12, M = y.width * p, P = Math.max(
|
|
8933
|
+
k + b / 2,
|
|
8934
|
+
Math.min(O, M - k - b / 2)
|
|
8935
|
+
), I = (((R == null ? void 0 : R.top) ?? w.top) - y.top) * p - S - T;
|
|
8936
|
+
let _ = I;
|
|
8937
|
+
I < k && (_ = (w.bottom - y.top) * p + T), l({ x: P, y: _ });
|
|
8935
8938
|
};
|
|
8936
8939
|
f();
|
|
8937
8940
|
const m = e.current;
|
|
@@ -9008,7 +9011,7 @@ const Wd = ({
|
|
|
9008
9011
|
};
|
|
9009
9012
|
function Dd() {
|
|
9010
9013
|
const e = j((o) => o.rangeStartGI), t = j((o) => o.rangeEndGI), n = j((o) => o.clearRange), r = e != null && t != null;
|
|
9011
|
-
return
|
|
9014
|
+
return fe(() => {
|
|
9012
9015
|
if (!r) return;
|
|
9013
9016
|
const o = (i) => {
|
|
9014
9017
|
var u;
|
|
@@ -9178,7 +9181,7 @@ const $d = ({
|
|
|
9178
9181
|
)
|
|
9179
9182
|
}
|
|
9180
9183
|
) : null, Vd = (e, t, n) => Math.min(n, Math.max(t, e));
|
|
9181
|
-
function
|
|
9184
|
+
function Qd({
|
|
9182
9185
|
section: e,
|
|
9183
9186
|
initialViewerState: t,
|
|
9184
9187
|
initialProgressRunIndex: n,
|
|
@@ -9186,58 +9189,59 @@ function Yd({
|
|
|
9186
9189
|
onSectionNav: o,
|
|
9187
9190
|
isCanPrev: i = !1,
|
|
9188
9191
|
isCanNext: s = !1,
|
|
9189
|
-
|
|
9190
|
-
|
|
9191
|
-
|
|
9192
|
-
|
|
9193
|
-
|
|
9194
|
-
|
|
9195
|
-
|
|
9196
|
-
|
|
9197
|
-
|
|
9198
|
-
|
|
9192
|
+
onQuizStart: u,
|
|
9193
|
+
onQuizComplete: a,
|
|
9194
|
+
quizRetryAllowed: l,
|
|
9195
|
+
previousQuizResult: d,
|
|
9196
|
+
onViewerEvent: h,
|
|
9197
|
+
viewerRef: f,
|
|
9198
|
+
gazeSync: m,
|
|
9199
|
+
onRequestTranslate: v,
|
|
9200
|
+
isPlaybackMode: y = !1,
|
|
9201
|
+
playbackScale: c,
|
|
9202
|
+
isDev: p = !1
|
|
9199
9203
|
}) {
|
|
9200
|
-
const
|
|
9201
|
-
var
|
|
9202
|
-
const
|
|
9203
|
-
let
|
|
9204
|
-
for (const
|
|
9205
|
-
(
|
|
9206
|
-
return
|
|
9207
|
-
}, [e]),
|
|
9204
|
+
const g = String((e == null ? void 0 : e.section_id) ?? "0"), w = me(() => {
|
|
9205
|
+
var k, T;
|
|
9206
|
+
const b = ((k = e == null ? void 0 : e.ast) == null ? void 0 : k.blocks) ?? [];
|
|
9207
|
+
let S = 0;
|
|
9208
|
+
for (const M of b)
|
|
9209
|
+
(M == null ? void 0 : M.type) !== "image" && (S += ((T = M == null ? void 0 : M.runs) == null ? void 0 : T.length) ?? 0);
|
|
9210
|
+
return S;
|
|
9211
|
+
}, [e]), C = me(() => typeof n == "number" ? Vd(n, w > 0 ? 0 : -1, Math.max(w - 1, -1)) : (w > 0, 0), [n, w]), R = me(
|
|
9208
9212
|
() => ({
|
|
9209
9213
|
section: e,
|
|
9210
|
-
initialIndex:
|
|
9214
|
+
initialIndex: C,
|
|
9211
9215
|
onViewerClose: r,
|
|
9212
9216
|
onSectionNav: o,
|
|
9213
9217
|
isCanPrev: i,
|
|
9214
9218
|
isCanNext: s
|
|
9215
9219
|
}),
|
|
9216
|
-
[e,
|
|
9217
|
-
),
|
|
9218
|
-
const
|
|
9220
|
+
[e, C, r, o, i, s]
|
|
9221
|
+
), O = me(() => {
|
|
9222
|
+
const b = (e == null ? void 0 : e.audios) ?? [], S = b.length > 0 ? hu(e) : void 0;
|
|
9219
9223
|
return {
|
|
9220
|
-
clips:
|
|
9221
|
-
map:
|
|
9222
|
-
initialIndex:
|
|
9224
|
+
clips: b,
|
|
9225
|
+
map: S,
|
|
9226
|
+
initialIndex: C,
|
|
9223
9227
|
section: e
|
|
9224
9228
|
};
|
|
9225
|
-
}, [e,
|
|
9229
|
+
}, [e, C]);
|
|
9226
9230
|
return /* @__PURE__ */ x(
|
|
9227
9231
|
ls,
|
|
9228
9232
|
{
|
|
9229
|
-
onViewerEvent:
|
|
9230
|
-
isPlaybackMode:
|
|
9231
|
-
playbackScale:
|
|
9232
|
-
viewerRef:
|
|
9233
|
-
children: /* @__PURE__ */ x(xu, { initialState: { ...t, isDev:
|
|
9233
|
+
onViewerEvent: h,
|
|
9234
|
+
isPlaybackMode: y,
|
|
9235
|
+
playbackScale: c,
|
|
9236
|
+
viewerRef: f,
|
|
9237
|
+
children: /* @__PURE__ */ x(xu, { initialState: { ...t, isDev: p }, children: /* @__PURE__ */ x(
|
|
9234
9238
|
yu,
|
|
9235
9239
|
{
|
|
9236
|
-
initialState:
|
|
9237
|
-
gazeSync:
|
|
9238
|
-
children: /* @__PURE__ */ x(gu, { initialState:
|
|
9240
|
+
initialState: R,
|
|
9241
|
+
gazeSync: m,
|
|
9242
|
+
children: /* @__PURE__ */ x(gu, { initialState: O, children: /* @__PURE__ */ x(Gd, { initialState: { section: e, onQuizStart: u, onQuizComplete: a, quizRetryAllowed: l, previousQuizResult: d }, children: /* @__PURE__ */ x(qd, { onRequestTranslate: v }) }, g) }, g)
|
|
9239
9243
|
},
|
|
9240
|
-
|
|
9244
|
+
g
|
|
9241
9245
|
) })
|
|
9242
9246
|
}
|
|
9243
9247
|
);
|
|
@@ -9247,7 +9251,7 @@ function qd({
|
|
|
9247
9251
|
}) {
|
|
9248
9252
|
const t = X((v) => v.mode), n = ie(null), r = It(), o = yt(), i = j((v) => v.translateOpen), s = j((v) => v.translateLoading), u = j((v) => v.translateText), a = j((v) => v.translatedText), l = ie(null), d = ne(
|
|
9249
9253
|
(v) => {
|
|
9250
|
-
var
|
|
9254
|
+
var C;
|
|
9251
9255
|
const { rangeStartGI: y, rangeEndGI: c } = o.getState().progress, p = y ?? 0, g = c ?? 0;
|
|
9252
9256
|
if (r.getState().emit({
|
|
9253
9257
|
type: "translate_request",
|
|
@@ -9268,11 +9272,11 @@ function qd({
|
|
|
9268
9272
|
text: v,
|
|
9269
9273
|
startGI: p,
|
|
9270
9274
|
endGI: g
|
|
9271
|
-
}), (
|
|
9275
|
+
}), (C = l.current) == null || C.abort();
|
|
9272
9276
|
const w = new AbortController();
|
|
9273
|
-
l.current = w, e(v, w.signal).then((
|
|
9277
|
+
l.current = w, e(v, w.signal).then((R) => {
|
|
9274
9278
|
if (!w.signal.aborted) {
|
|
9275
|
-
if (
|
|
9279
|
+
if (R == null) {
|
|
9276
9280
|
o.getState().progress.clearTranslate();
|
|
9277
9281
|
return;
|
|
9278
9282
|
}
|
|
@@ -9280,22 +9284,22 @@ function qd({
|
|
|
9280
9284
|
isOpen: !0,
|
|
9281
9285
|
isLoading: !1,
|
|
9282
9286
|
text: v,
|
|
9283
|
-
translatedText:
|
|
9287
|
+
translatedText: R,
|
|
9284
9288
|
startGI: p,
|
|
9285
9289
|
endGI: g
|
|
9286
9290
|
}), r.getState().emit({
|
|
9287
9291
|
type: "translate_loading_end",
|
|
9288
|
-
payload: { originalText: v, translatedText:
|
|
9292
|
+
payload: { originalText: v, translatedText: R }
|
|
9289
9293
|
});
|
|
9290
9294
|
}
|
|
9291
|
-
}).catch((
|
|
9295
|
+
}).catch((R) => {
|
|
9292
9296
|
if (w.signal.aborted) return;
|
|
9293
|
-
const
|
|
9297
|
+
const O = R instanceof Error ? R.message : "번역 실패";
|
|
9294
9298
|
o.getState().progress.setTranslateState({
|
|
9295
9299
|
isOpen: !0,
|
|
9296
9300
|
isLoading: !1,
|
|
9297
9301
|
text: v,
|
|
9298
|
-
translatedText: `[오류] ${
|
|
9302
|
+
translatedText: `[오류] ${O}`,
|
|
9299
9303
|
startGI: p,
|
|
9300
9304
|
endGI: g
|
|
9301
9305
|
});
|
|
@@ -9358,5 +9362,5 @@ function qd({
|
|
|
9358
9362
|
);
|
|
9359
9363
|
}
|
|
9360
9364
|
export {
|
|
9361
|
-
|
|
9365
|
+
Qd as CRViewer
|
|
9362
9366
|
};
|