score-viewer 1.0.44 → 1.0.45
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/README.md +15 -0
- package/dist/score-viewer.js +153 -153
- package/dist/score-viewer.js.map +1 -1
- package/dist/score-viewer.umd.cjs +16 -16
- package/dist/score-viewer.umd.cjs.map +1 -1
- package/package.json +1 -1
package/dist/score-viewer.js
CHANGED
|
@@ -6,7 +6,7 @@ import * as h from "react";
|
|
|
6
6
|
import Q, { createContext as io, useContext as An, useCallback as ct, useState as at, useRef as Ae, useEffect as He, isValidElement as uE, version as kN, useLayoutEffect as sp, forwardRef as Ur, useMemo as gt, Children as BN, useImperativeHandle as oo, cloneElement as FN, Component as zN } from "react";
|
|
7
7
|
import * as cE from "react-dom";
|
|
8
8
|
import Qg, { createPortal as dE, unstable_batchedUpdates as tm, flushSync as Wu } from "react-dom";
|
|
9
|
-
const
|
|
9
|
+
const $t = (e) => typeof e == "string", bs = () => {
|
|
10
10
|
let e, t;
|
|
11
11
|
const n = new Promise((r, i) => {
|
|
12
12
|
e = r, t = i;
|
|
@@ -16,8 +16,8 @@ const Mt = (e) => typeof e == "string", bs = () => {
|
|
|
16
16
|
e.forEach((r) => {
|
|
17
17
|
t[r] && (n[r] = t[r]);
|
|
18
18
|
});
|
|
19
|
-
}, jN = /###/g, Jg = (e) => e && e.indexOf("###") > -1 ? e.replace(jN, ".") : e, e0 = (e) => !e ||
|
|
20
|
-
const r =
|
|
19
|
+
}, jN = /###/g, Jg = (e) => e && e.indexOf("###") > -1 ? e.replace(jN, ".") : e, e0 = (e) => !e || $t(e), ks = (e, t, n) => {
|
|
20
|
+
const r = $t(t) ? t.split(".") : t;
|
|
21
21
|
let i = 0;
|
|
22
22
|
for (; i < r.length - 1; ) {
|
|
23
23
|
if (e0(e)) return {};
|
|
@@ -59,7 +59,7 @@ const Mt = (e) => typeof e == "string", bs = () => {
|
|
|
59
59
|
return r !== void 0 ? r : Yu(t, n);
|
|
60
60
|
}, fE = (e, t, n) => {
|
|
61
61
|
for (const r in t)
|
|
62
|
-
r !== "__proto__" && r !== "constructor" && (r in e ?
|
|
62
|
+
r !== "__proto__" && r !== "constructor" && (r in e ? $t(e[r]) || e[r] instanceof String || $t(t[r]) || t[r] instanceof String ? n && (e[r] = t[r]) : fE(e[r], t[r], n) : e[r] = t[r]);
|
|
63
63
|
return e;
|
|
64
64
|
}, ma = (e) => e.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
|
|
65
65
|
var WN = {
|
|
@@ -70,7 +70,7 @@ var WN = {
|
|
|
70
70
|
"'": "'",
|
|
71
71
|
"/": "/"
|
|
72
72
|
};
|
|
73
|
-
const YN = (e) =>
|
|
73
|
+
const YN = (e) => $t(e) ? e.replace(/[&<>"'\/]/g, (t) => WN[t]) : e;
|
|
74
74
|
class qN {
|
|
75
75
|
constructor(t) {
|
|
76
76
|
this.capacity = t, this.regExpMap = /* @__PURE__ */ new Map(), this.regExpQueue = [];
|
|
@@ -150,7 +150,7 @@ class qu {
|
|
|
150
150
|
return this.forward(t, "warn", "WARNING DEPRECATED: ", !0);
|
|
151
151
|
}
|
|
152
152
|
forward(t, n, r, i) {
|
|
153
|
-
return i && !this.debug ? null : (
|
|
153
|
+
return i && !this.debug ? null : ($t(t[0]) && (t[0] = `${r}${this.prefix} ${t[0]}`), this.logger[n](t));
|
|
154
154
|
}
|
|
155
155
|
create(t) {
|
|
156
156
|
return new qu(this.logger, {
|
|
@@ -211,9 +211,9 @@ class n0 extends Ic {
|
|
|
211
211
|
var u, c;
|
|
212
212
|
const o = i.keySeparator !== void 0 ? i.keySeparator : this.options.keySeparator, a = i.ignoreJSONStructure !== void 0 ? i.ignoreJSONStructure : this.options.ignoreJSONStructure;
|
|
213
213
|
let s;
|
|
214
|
-
t.indexOf(".") > -1 ? s = t.split(".") : (s = [t, n], r && (Array.isArray(r) ? s.push(...r) :
|
|
214
|
+
t.indexOf(".") > -1 ? s = t.split(".") : (s = [t, n], r && (Array.isArray(r) ? s.push(...r) : $t(r) && o ? s.push(...r.split(o)) : s.push(r)));
|
|
215
215
|
const l = Yu(this.data, s);
|
|
216
|
-
return !l && !n && !r && t.indexOf(".") > -1 && (t = s[0], n = s[1], r = s.slice(2).join(".")), l || !a ||
|
|
216
|
+
return !l && !n && !r && t.indexOf(".") > -1 && (t = s[0], n = s[1], r = s.slice(2).join(".")), l || !a || !$t(r) ? l : nm((c = (u = this.data) == null ? void 0 : u[t]) == null ? void 0 : c[n], r, o);
|
|
217
217
|
}
|
|
218
218
|
addResource(t, n, r, i, o = {
|
|
219
219
|
silent: !1
|
|
@@ -226,7 +226,7 @@ class n0 extends Ic {
|
|
|
226
226
|
silent: !1
|
|
227
227
|
}) {
|
|
228
228
|
for (const o in r)
|
|
229
|
-
(
|
|
229
|
+
($t(r[o]) || Array.isArray(r[o])) && this.addResource(t, n, o, r[o], {
|
|
230
230
|
silent: !0
|
|
231
231
|
});
|
|
232
232
|
i.silent || this.emit("added", t, n, r);
|
|
@@ -275,7 +275,7 @@ var mE = {
|
|
|
275
275
|
}), t;
|
|
276
276
|
}
|
|
277
277
|
};
|
|
278
|
-
const r0 = {}, i0 = (e) =>
|
|
278
|
+
const r0 = {}, i0 = (e) => !$t(e) && typeof e != "boolean" && typeof e != "number";
|
|
279
279
|
class Xu extends Ic {
|
|
280
280
|
constructor(t, n = {}) {
|
|
281
281
|
super(), HN(["resourceStore", "languageUtils", "pluralResolver", "interpolator", "backendConnector", "i18nFormat", "utils"], t, this), this.options = n, this.options.keySeparator === void 0 && (this.options.keySeparator = "."), this.logger = _i.create("translator");
|
|
@@ -304,14 +304,14 @@ class Xu extends Ic {
|
|
|
304
304
|
if (l && l.length > 0)
|
|
305
305
|
return {
|
|
306
306
|
key: t,
|
|
307
|
-
namespaces:
|
|
307
|
+
namespaces: $t(o) ? [o] : o
|
|
308
308
|
};
|
|
309
309
|
const u = t.split(r);
|
|
310
310
|
(r !== i || r === i && this.options.ns.indexOf(u[0]) > -1) && (o = u.shift()), t = u.join(i);
|
|
311
311
|
}
|
|
312
312
|
return {
|
|
313
313
|
key: t,
|
|
314
|
-
namespaces:
|
|
314
|
+
namespaces: $t(o) ? [o] : o
|
|
315
315
|
};
|
|
316
316
|
}
|
|
317
317
|
translate(t, n, r) {
|
|
@@ -347,13 +347,13 @@ class Xu extends Ic {
|
|
|
347
347
|
} : s;
|
|
348
348
|
const m = this.resolve(t, i);
|
|
349
349
|
let p = m == null ? void 0 : m.res;
|
|
350
|
-
const g = (m == null ? void 0 : m.usedKey) || s, v = (m == null ? void 0 : m.exactUsedKey) || s, b = ["[object Number]", "[object Function]", "[object RegExp]"], y = i.joinArrays !== void 0 ? i.joinArrays : this.options.joinArrays, E = !this.i18nFormat || this.i18nFormat.handleAsObject, w = i.count !== void 0 &&
|
|
350
|
+
const g = (m == null ? void 0 : m.usedKey) || s, v = (m == null ? void 0 : m.exactUsedKey) || s, b = ["[object Number]", "[object Function]", "[object RegExp]"], y = i.joinArrays !== void 0 ? i.joinArrays : this.options.joinArrays, E = !this.i18nFormat || this.i18nFormat.handleAsObject, w = i.count !== void 0 && !$t(i.count), T = Xu.hasDefaultValue(i), S = w ? this.pluralResolver.getSuffix(d, i.count, i) : "", x = i.ordinal && w ? this.pluralResolver.getSuffix(d, i.count, {
|
|
351
351
|
ordinal: !1
|
|
352
352
|
}) : "", _ = w && !i.ordinal && i.count === 0, O = _ && i[`defaultValue${this.options.pluralSeparator}zero`] || i[`defaultValue${S}`] || i[`defaultValue${x}`] || i.defaultValue;
|
|
353
353
|
let N = p;
|
|
354
354
|
E && !p && T && (N = O);
|
|
355
355
|
const I = i0(N), A = Object.prototype.toString.apply(N);
|
|
356
|
-
if (E && N && I && b.indexOf(A) < 0 && !(
|
|
356
|
+
if (E && N && I && b.indexOf(A) < 0 && !($t(y) && Array.isArray(N))) {
|
|
357
357
|
if (!i.returnObjects && !this.options.returnObjects) {
|
|
358
358
|
this.options.returnedObjectHandler || this.logger.warn("accessing an object - but returnObjects options is not enabled!");
|
|
359
359
|
const P = this.options.returnedObjectHandler ? this.options.returnedObjectHandler(g, N, {
|
|
@@ -380,7 +380,7 @@ class Xu extends Ic {
|
|
|
380
380
|
}
|
|
381
381
|
p = $;
|
|
382
382
|
}
|
|
383
|
-
} else if (E &&
|
|
383
|
+
} else if (E && $t(y) && Array.isArray(p))
|
|
384
384
|
p = p.join(y), p && (p = this.extendTranslation(p, t, i, r));
|
|
385
385
|
else {
|
|
386
386
|
let P = !1, $ = !1;
|
|
@@ -433,13 +433,13 @@ class Xu extends Ic {
|
|
|
433
433
|
...r.interpolation
|
|
434
434
|
}
|
|
435
435
|
});
|
|
436
|
-
const c =
|
|
436
|
+
const c = $t(t) && (((u = r == null ? void 0 : r.interpolation) == null ? void 0 : u.skipOnVariables) !== void 0 ? r.interpolation.skipOnVariables : this.options.interpolation.skipOnVariables);
|
|
437
437
|
let d;
|
|
438
438
|
if (c) {
|
|
439
439
|
const m = t.match(this.interpolator.nestingRegexp);
|
|
440
440
|
d = m && m.length;
|
|
441
441
|
}
|
|
442
|
-
let f = r.replace &&
|
|
442
|
+
let f = r.replace && !$t(r.replace) ? r.replace : r;
|
|
443
443
|
if (this.options.interpolation.defaultVariables && (f = {
|
|
444
444
|
...this.options.interpolation.defaultVariables,
|
|
445
445
|
...f
|
|
@@ -449,7 +449,7 @@ class Xu extends Ic {
|
|
|
449
449
|
}
|
|
450
450
|
!r.lng && i && i.res && (r.lng = this.language || i.usedLng), r.nest !== !1 && (t = this.interpolator.nest(t, (...m) => (o == null ? void 0 : o[0]) === m[0] && !r.context ? (this.logger.warn(`It seems you are nesting recursively key: ${m[0]} in key: ${n[0]}`), null) : this.translate(...m, n), r)), r.interpolation && this.interpolator.reset();
|
|
451
451
|
}
|
|
452
|
-
const a = r.postProcess || this.options.postProcess, s =
|
|
452
|
+
const a = r.postProcess || this.options.postProcess, s = $t(a) ? [a] : a;
|
|
453
453
|
return t != null && (s != null && s.length) && r.applyPostProcessor !== !1 && (t = mE.handle(s, t, n, this.options && this.options.postProcessPassResolved ? {
|
|
454
454
|
i18nResolved: {
|
|
455
455
|
...i,
|
|
@@ -460,13 +460,13 @@ class Xu extends Ic {
|
|
|
460
460
|
}
|
|
461
461
|
resolve(t, n = {}) {
|
|
462
462
|
let r, i, o, a, s;
|
|
463
|
-
return
|
|
463
|
+
return $t(t) && (t = [t]), t.forEach((l) => {
|
|
464
464
|
if (this.isValidLookup(r)) return;
|
|
465
465
|
const u = this.extractFromKey(l, n), c = u.key;
|
|
466
466
|
i = c;
|
|
467
467
|
let d = u.namespaces;
|
|
468
468
|
this.options.fallbackNS && (d = d.concat(this.options.fallbackNS));
|
|
469
|
-
const f = n.count !== void 0 &&
|
|
469
|
+
const f = n.count !== void 0 && !$t(n.count), m = f && !n.ordinal && n.count === 0, p = n.context !== void 0 && ($t(n.context) || typeof n.context == "number") && n.context !== "", g = n.lngs ? n.lngs : this.languageUtils.toResolveHierarchy(n.lng || this.language, n.fallbackLng);
|
|
470
470
|
d.forEach((v) => {
|
|
471
471
|
var b, y;
|
|
472
472
|
this.isValidLookup(r) || (s = v, !r0[`${g[0]}-${v}`] && ((b = this.utils) != null && b.hasLoadedNamespace) && !((y = this.utils) != null && y.hasLoadedNamespace(s)) && (r0[`${g[0]}-${v}`] = !0, this.logger.warn(`key "${i}" for languages "${g.join(", ")}" won't get resolved as namespace "${s}" was not yet loaded`, "This means something IS WRONG in your setup. You access the t function before i18next.init / i18next.loadNamespace / i18next.changeLanguage was done. Wait for the callback or Promise to resolve before accessing it!!!")), g.forEach((E) => {
|
|
@@ -506,7 +506,7 @@ class Xu extends Ic {
|
|
|
506
506
|
return (o = this.i18nFormat) != null && o.getResource ? this.i18nFormat.getResource(t, n, r, i) : this.resourceStore.getResource(t, n, r, i);
|
|
507
507
|
}
|
|
508
508
|
getUsedParamsDetails(t = {}) {
|
|
509
|
-
const n = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = t.replace &&
|
|
509
|
+
const n = ["defaultValue", "ordinal", "context", "replace", "lng", "lngs", "fallbackLng", "ns", "keySeparator", "nsSeparator", "returnObjects", "returnDetails", "joinArrays", "postProcess", "interpolation"], r = t.replace && !$t(t.replace);
|
|
510
510
|
let i = r ? t.replace : t;
|
|
511
511
|
if (r && typeof t.count < "u" && (i.count = t.count), this.options.interpolation.defaultVariables && (i = {
|
|
512
512
|
...this.options.interpolation.defaultVariables,
|
|
@@ -543,7 +543,7 @@ class o0 {
|
|
|
543
543
|
return this.formatLanguageCode(n[0]);
|
|
544
544
|
}
|
|
545
545
|
formatLanguageCode(t) {
|
|
546
|
-
if (
|
|
546
|
+
if ($t(t) && t.indexOf("-") > -1) {
|
|
547
547
|
let n;
|
|
548
548
|
try {
|
|
549
549
|
n = Intl.getCanonicalLocales(t)[0];
|
|
@@ -578,7 +578,7 @@ class o0 {
|
|
|
578
578
|
}
|
|
579
579
|
getFallbackCodes(t, n) {
|
|
580
580
|
if (!t) return [];
|
|
581
|
-
if (typeof t == "function" && (t = t(n)),
|
|
581
|
+
if (typeof t == "function" && (t = t(n)), $t(t) && (t = [t]), Array.isArray(t)) return t;
|
|
582
582
|
if (!n) return t.default || [];
|
|
583
583
|
let r = t[n];
|
|
584
584
|
return r || (r = t[this.getScriptPartFromCode(n)]), r || (r = t[this.formatLanguageCode(n)]), r || (r = t[this.getLanguagePartFromCode(n)]), r || (r = t.default), r || [];
|
|
@@ -587,7 +587,7 @@ class o0 {
|
|
|
587
587
|
const r = this.getFallbackCodes((n === !1 ? [] : n) || this.options.fallbackLng || [], t), i = [], o = (a) => {
|
|
588
588
|
a && (this.isSupportedCode(a) ? i.push(a) : this.logger.warn(`rejecting language code not found in supportedLngs: ${a}`));
|
|
589
589
|
};
|
|
590
|
-
return
|
|
590
|
+
return $t(t) && (t.indexOf("-") > -1 || t.indexOf("_") > -1) ? (this.options.load !== "languageOnly" && o(this.formatLanguageCode(t)), this.options.load !== "languageOnly" && this.options.load !== "currentOnly" && o(this.getScriptPartFromCode(t)), this.options.load !== "currentOnly" && o(this.getLanguagePartFromCode(t))) : $t(t) && o(this.formatLanguageCode(t)), r.forEach((a) => {
|
|
591
591
|
i.indexOf(a) < 0 && o(this.formatLanguageCode(a));
|
|
592
592
|
}), i;
|
|
593
593
|
}
|
|
@@ -654,7 +654,7 @@ class ZN {
|
|
|
654
654
|
}
|
|
655
655
|
const l0 = (e, t, n, r = ".", i = !0) => {
|
|
656
656
|
let o = UN(e, t, n);
|
|
657
|
-
return !o && i &&
|
|
657
|
+
return !o && i && $t(n) && (o = nm(e, n, r), o === void 0 && (o = nm(t, n, r))), o;
|
|
658
658
|
}, Fd = (e) => e.replace(/\$/g, "$$$$");
|
|
659
659
|
class JN {
|
|
660
660
|
constructor(t = {}) {
|
|
@@ -726,7 +726,7 @@ class JN {
|
|
|
726
726
|
if (a = u(g), a === void 0)
|
|
727
727
|
if (typeof c == "function") {
|
|
728
728
|
const b = c(t, o, i);
|
|
729
|
-
a =
|
|
729
|
+
a = $t(b) ? b : "";
|
|
730
730
|
} else if (i && Object.prototype.hasOwnProperty.call(i, g))
|
|
731
731
|
a = "";
|
|
732
732
|
else if (d) {
|
|
@@ -734,7 +734,7 @@ class JN {
|
|
|
734
734
|
continue;
|
|
735
735
|
} else
|
|
736
736
|
this.logger.warn(`missed to pass in variable ${g} for interpolating ${t}`), a = "";
|
|
737
|
-
else
|
|
737
|
+
else !$t(a) && !this.useRawValueToEscape && (a = Zg(a));
|
|
738
738
|
const v = p.safeValue(a);
|
|
739
739
|
if (t = t.replace(o[0], v), d ? (p.regex.lastIndex += a.length, p.regex.lastIndex -= o[0].length) : p.regex.lastIndex = 0, s++, s >= this.maxReplaces)
|
|
740
740
|
break;
|
|
@@ -765,10 +765,10 @@ class JN {
|
|
|
765
765
|
let l = [];
|
|
766
766
|
a = {
|
|
767
767
|
...r
|
|
768
|
-
}, a = a.replace &&
|
|
768
|
+
}, a = a.replace && !$t(a.replace) ? a.replace : a, a.applyPostProcessor = !1, delete a.defaultValue;
|
|
769
769
|
const u = /{.*}/.test(i[1]) ? i[1].lastIndexOf("}") + 1 : i[1].indexOf(this.formatSeparator);
|
|
770
|
-
if (u !== -1 && (l = i[1].slice(u).split(this.formatSeparator).map((c) => c.trim()).filter(Boolean), i[1] = i[1].slice(0, u)), o = n(s.call(this, i[1].trim(), a), a), o && i[0] === t &&
|
|
771
|
-
|
|
770
|
+
if (u !== -1 && (l = i[1].slice(u).split(this.formatSeparator).map((c) => c.trim()).filter(Boolean), i[1] = i[1].slice(0, u)), o = n(s.call(this, i[1].trim(), a), a), o && i[0] === t && !$t(o)) return o;
|
|
771
|
+
$t(o) || (o = Zg(o)), o || (this.logger.warn(`missed to resolve ${i[1]} for nesting ${t}`), o = ""), l.length && (o = l.reduce((c, d) => this.format(c, d, r.lng, {
|
|
772
772
|
...r,
|
|
773
773
|
interpolationkey: i[1].trim()
|
|
774
774
|
}), o.trim())), t = t.replace(i[0], o), this.regexp.lastIndex = 0;
|
|
@@ -973,7 +973,7 @@ class i_ extends Ic {
|
|
|
973
973
|
prepareLoading(t, n, r = {}, i) {
|
|
974
974
|
if (!this.backend)
|
|
975
975
|
return this.logger.warn("No backend was added via i18next.use. Will not load resources."), i && i();
|
|
976
|
-
|
|
976
|
+
$t(t) && (t = this.languageUtils.toResolveHierarchy(t)), $t(n) && (n = [n]);
|
|
977
977
|
const o = this.queueLoad(t, n, r, i);
|
|
978
978
|
if (!o.toLoad.length)
|
|
979
979
|
return o.pending.length || i(), null;
|
|
@@ -1057,7 +1057,7 @@ const c0 = () => ({
|
|
|
1057
1057
|
appendNamespaceToCIMode: !1,
|
|
1058
1058
|
overloadTranslationOptionHandler: (e) => {
|
|
1059
1059
|
let t = {};
|
|
1060
|
-
if (typeof e[1] == "object" && (t = e[1]),
|
|
1060
|
+
if (typeof e[1] == "object" && (t = e[1]), $t(e[1]) && (t.defaultValue = e[1]), $t(e[2]) && (t.tDescription = e[2]), typeof e[2] == "object" || typeof e[3] == "object") {
|
|
1061
1061
|
const n = e[3] || e[2];
|
|
1062
1062
|
Object.keys(n).forEach((r) => {
|
|
1063
1063
|
t[r] = n[r];
|
|
@@ -1081,7 +1081,7 @@ const c0 = () => ({
|
|
|
1081
1081
|
cacheInBuiltFormats: !0
|
|
1082
1082
|
}), d0 = (e) => {
|
|
1083
1083
|
var t, n;
|
|
1084
|
-
return
|
|
1084
|
+
return $t(e.ns) && (e.ns = [e.ns]), $t(e.fallbackLng) && (e.fallbackLng = [e.fallbackLng]), $t(e.fallbackNS) && (e.fallbackNS = [e.fallbackNS]), ((n = (t = e.supportedLngs) == null ? void 0 : t.indexOf) == null ? void 0 : n.call(t, "cimode")) < 0 && (e.supportedLngs = e.supportedLngs.concat(["cimode"])), typeof e.initImmediate == "boolean" && (e.initAsync = e.initImmediate), e;
|
|
1085
1085
|
}, Zl = () => {
|
|
1086
1086
|
}, o_ = (e) => {
|
|
1087
1087
|
Object.getOwnPropertyNames(Object.getPrototypeOf(e)).forEach((n) => {
|
|
@@ -1101,7 +1101,7 @@ class Zs extends Ic {
|
|
|
1101
1101
|
}
|
|
1102
1102
|
}
|
|
1103
1103
|
init(t = {}, n) {
|
|
1104
|
-
this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), t.defaultNS == null && t.ns && (
|
|
1104
|
+
this.isInitializing = !0, typeof t == "function" && (n = t, t = {}), t.defaultNS == null && t.ns && ($t(t.ns) ? t.defaultNS = t.ns : t.ns.indexOf("translation") < 0 && (t.defaultNS = t.ns[0]));
|
|
1105
1105
|
const r = c0();
|
|
1106
1106
|
this.options = {
|
|
1107
1107
|
...r,
|
|
@@ -1153,7 +1153,7 @@ class Zs extends Ic {
|
|
|
1153
1153
|
loadResources(t, n = Zl) {
|
|
1154
1154
|
var o, a;
|
|
1155
1155
|
let r = n;
|
|
1156
|
-
const i =
|
|
1156
|
+
const i = $t(t) ? t : this.language;
|
|
1157
1157
|
if (typeof t == "function" && (r = t), !this.options.resources || this.options.partialBundledLanguages) {
|
|
1158
1158
|
if ((i == null ? void 0 : i.toLowerCase()) === "cimode" && (!this.options.preload || this.options.preload.length === 0)) return r();
|
|
1159
1159
|
const s = [], l = (u) => {
|
|
@@ -1202,7 +1202,7 @@ class Zs extends Ic {
|
|
|
1202
1202
|
}, a = (s) => {
|
|
1203
1203
|
var c, d;
|
|
1204
1204
|
!t && !s && this.services.languageDetector && (s = []);
|
|
1205
|
-
const l =
|
|
1205
|
+
const l = $t(s) ? s : s && s[0], u = this.store.hasLanguageSomeTranslations(l) ? l : this.services.languageUtils.getBestMatchFromCodes($t(s) ? [s] : s);
|
|
1206
1206
|
u && (this.language || i(u), this.translator.language || this.translator.changeLanguage(u), (d = (c = this.services.languageDetector) == null ? void 0 : c.cacheUserLanguage) == null || d.call(c, u)), this.loadResources(u, (f) => {
|
|
1207
1207
|
o(f, u);
|
|
1208
1208
|
});
|
|
@@ -1219,7 +1219,7 @@ class Zs extends Ic {
|
|
|
1219
1219
|
let c;
|
|
1220
1220
|
return l.keyPrefix && Array.isArray(o) ? c = o.map((d) => `${l.keyPrefix}${u}${d}`) : c = l.keyPrefix ? `${l.keyPrefix}${u}${o}` : o, this.t(c, l);
|
|
1221
1221
|
};
|
|
1222
|
-
return
|
|
1222
|
+
return $t(t) ? i.lng = t : i.lngs = t, i.ns = n, i.keyPrefix = r, i;
|
|
1223
1223
|
}
|
|
1224
1224
|
t(...t) {
|
|
1225
1225
|
var n;
|
|
@@ -1251,7 +1251,7 @@ class Zs extends Ic {
|
|
|
1251
1251
|
}
|
|
1252
1252
|
loadNamespaces(t, n) {
|
|
1253
1253
|
const r = bs();
|
|
1254
|
-
return this.options.ns ? (
|
|
1254
|
+
return this.options.ns ? ($t(t) && (t = [t]), t.forEach((i) => {
|
|
1255
1255
|
this.options.ns.indexOf(i) < 0 && this.options.ns.push(i);
|
|
1256
1256
|
}), this.loadResources((i) => {
|
|
1257
1257
|
r.resolve(), n && n(i);
|
|
@@ -1259,7 +1259,7 @@ class Zs extends Ic {
|
|
|
1259
1259
|
}
|
|
1260
1260
|
loadLanguages(t, n) {
|
|
1261
1261
|
const r = bs();
|
|
1262
|
-
|
|
1262
|
+
$t(t) && (t = [t]);
|
|
1263
1263
|
const i = this.options.preload || [], o = t.filter((a) => i.indexOf(a) < 0 && this.services.languageUtils.isSupportedCode(a));
|
|
1264
1264
|
return o.length ? (this.options.preload = i.concat(o), this.loadResources((a) => {
|
|
1265
1265
|
r.resolve(), n && n(a);
|
|
@@ -2199,7 +2199,7 @@ class si extends Error {
|
|
|
2199
2199
|
this.type = n, Object.setPrototypeOf(this, si.prototype);
|
|
2200
2200
|
}
|
|
2201
2201
|
}
|
|
2202
|
-
var
|
|
2202
|
+
var Lt = /* @__PURE__ */ ((e) => (e[e.PLAYING = 0] = "PLAYING", e[e.PAUSED = 1] = "PAUSED", e[e.STOPPED = 2] = "STOPPED", e))(Lt || {});
|
|
2203
2203
|
const $A = ia((e) => ({
|
|
2204
2204
|
pendingAction: null,
|
|
2205
2205
|
setPendingAction: (t) => e(() => ({ pendingAction: t }))
|
|
@@ -2276,7 +2276,7 @@ const $A = ia((e) => ({
|
|
|
2276
2276
|
setSplitViewOrientation: (t) => e(() => ({ splitViewOrientation: t })),
|
|
2277
2277
|
setActiveTab: (t) => e(() => ({ activeTab: t }))
|
|
2278
2278
|
})), kA = ia((e) => ({
|
|
2279
|
-
playingState:
|
|
2279
|
+
playingState: Lt.STOPPED,
|
|
2280
2280
|
playingPosition: 0,
|
|
2281
2281
|
seekPosition: -1,
|
|
2282
2282
|
autoScroll: !1,
|
|
@@ -16145,12 +16145,12 @@ function jD(e, t, n, r, i, o, a) {
|
|
|
16145
16145
|
Ct >= Ne) ? (m.current.rl = !0, Xe = Xt, Me = -Me, We.points = [fo(dt, 1), fo(zt, 1)]) : m.current.rl = !1;
|
|
16146
16146
|
}
|
|
16147
16147
|
if (jt && dt[1] === "r" && (vn < K.left || m.current.lr)) {
|
|
16148
|
-
var
|
|
16149
|
-
dn ?
|
|
16150
|
-
var bn = Kr(
|
|
16148
|
+
var Rt = Xe;
|
|
16149
|
+
dn ? Rt += Y - te : Rt = Ke.x - je.x - Me;
|
|
16150
|
+
var bn = Kr(Rt, lt), Mn = Kr(Rt, lt, he);
|
|
16151
16151
|
// Of course use larger one
|
|
16152
16152
|
bn > Re || bn === Re && (!Pe || // Choose recommend one
|
|
16153
|
-
Mn >= Ne) ? (m.current.lr = !0, Xe =
|
|
16153
|
+
Mn >= Ne) ? (m.current.lr = !0, Xe = Rt, Me = -Me, We.points = [fo(dt, 1), fo(zt, 1)]) : m.current.lr = !1;
|
|
16154
16154
|
}
|
|
16155
16155
|
fa();
|
|
16156
16156
|
var Wn = yt === !0 ? 0 : yt;
|
|
@@ -16293,7 +16293,7 @@ function YD() {
|
|
|
16293
16293
|
}, [pt]);
|
|
16294
16294
|
var Et = h.useState(null), wt = oe(Et, 2), yt = wt[0], Nt = wt[1], Dt = h.useState(null), Ut = oe(Dt, 2), an = Ut[0], vn = Ut[1], Kt = function(Pt) {
|
|
16295
16295
|
vn([Pt.clientX, Pt.clientY]);
|
|
16296
|
-
}, Ht = jD(pt, K, V && an !== null ? an : Le, $, D, k, X), rt = oe(Ht, 11), Ve = rt[0], De = rt[1], Oe = rt[2], Je = rt[3], mt = rt[4], St = rt[5], jt = rt[6], dn = rt[7], Xt = rt[8], ot = rt[9], Ct = rt[10],
|
|
16296
|
+
}, Ht = jD(pt, K, V && an !== null ? an : Le, $, D, k, X), rt = oe(Ht, 11), Ve = rt[0], De = rt[1], Oe = rt[2], Je = rt[3], mt = rt[4], St = rt[5], jt = rt[6], dn = rt[7], Xt = rt[8], ot = rt[9], Ct = rt[10], Rt = FD(Ce, l, u, c), bn = oe(Rt, 2), Mn = bn[0], Wn = bn[1], Pr = Mn.has("click"), qr = Wn.has("click") || Wn.has("contextMenu"), Xr = fn(function() {
|
|
16297
16297
|
nt || Ct();
|
|
16298
16298
|
}), yi = function() {
|
|
16299
16299
|
We.current && V && qr && xe(!1);
|
|
@@ -16759,8 +16759,8 @@ var JD = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
|
|
|
16759
16759
|
multiple: Se,
|
|
16760
16760
|
toggleOpen: Ne
|
|
16761
16761
|
});
|
|
16762
|
-
}, [e, p, Re, Xe, r, ve, Se, Ne]), Ct = !!B || y,
|
|
16763
|
-
Ct && (
|
|
16762
|
+
}, [e, p, Re, Xe, r, ve, Se, Ne]), Ct = !!B || y, Rt;
|
|
16763
|
+
Ct && (Rt = /* @__PURE__ */ h.createElement(td, {
|
|
16764
16764
|
className: re("".concat(i, "-arrow"), j({}, "".concat(i, "-arrow-loading"), y)),
|
|
16765
16765
|
customizeIcon: B,
|
|
16766
16766
|
customizeIconProps: {
|
|
@@ -16844,7 +16844,7 @@ var JD = ["id", "prefixCls", "className", "showSearch", "tagRender", "direction"
|
|
|
16844
16844
|
}), /* @__PURE__ */ h.createElement(ZD, {
|
|
16845
16845
|
visible: Me && !Xe,
|
|
16846
16846
|
values: c
|
|
16847
|
-
}), yi,
|
|
16847
|
+
}), yi, Rt, Wn && Pr), /* @__PURE__ */ h.createElement(iw.Provider, {
|
|
16848
16848
|
value: ot
|
|
16849
16849
|
}, Vi);
|
|
16850
16850
|
});
|
|
@@ -21563,12 +21563,12 @@ var N8 = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
21563
21563
|
postState: function(It) {
|
|
21564
21564
|
return Array.isArray(It) ? It : It == null ? Lo : [It];
|
|
21565
21565
|
}
|
|
21566
|
-
}), Ct = oe(ot, 2),
|
|
21566
|
+
}), Ct = oe(ot, 2), Rt = Ct[0], bn = Ct[1], Mn = function(It) {
|
|
21567
21567
|
if ($) {
|
|
21568
|
-
var Bt = It.key, Zt =
|
|
21569
|
-
D ? Zt ? rn =
|
|
21568
|
+
var Bt = It.key, Zt = Rt.includes(Bt), rn;
|
|
21569
|
+
D ? Zt ? rn = Rt.filter(function(er) {
|
|
21570
21570
|
return er !== Bt;
|
|
21571
|
-
}) : rn = [].concat(Qe(
|
|
21571
|
+
}) : rn = [].concat(Qe(Rt), [Bt]) : rn = [Bt], bn(rn);
|
|
21572
21572
|
var Jn = U(U({}, It), {}, {
|
|
21573
21573
|
selectedKeys: rn
|
|
21574
21574
|
});
|
|
@@ -21662,7 +21662,7 @@ var N8 = ["prefixCls", "rootClassName", "style", "className", "tabIndex", "items
|
|
|
21662
21662
|
activeKey: St,
|
|
21663
21663
|
onActive: dn,
|
|
21664
21664
|
onInactive: Xt,
|
|
21665
|
-
selectedKeys:
|
|
21665
|
+
selectedKeys: Rt,
|
|
21666
21666
|
inlineIndent: V,
|
|
21667
21667
|
subMenuOpenDelay: T,
|
|
21668
21668
|
subMenuCloseDelay: x,
|
|
@@ -23908,9 +23908,9 @@ var E5 = function(t) {
|
|
|
23908
23908
|
return E.forEach(function(St) {
|
|
23909
23909
|
var jt, dn = St.key, Xt = (jt = _.current) === null || jt === void 0 ? void 0 : jt.querySelector('[data-node-key="'.concat(ax(dn), '"]'));
|
|
23910
23910
|
if (Xt) {
|
|
23911
|
-
var ot = S5(Xt, mt), Ct = oe(ot, 4),
|
|
23911
|
+
var ot = S5(Xt, mt), Ct = oe(ot, 4), Rt = Ct[0], bn = Ct[1], Mn = Ct[2], Wn = Ct[3];
|
|
23912
23912
|
Je.set(dn, {
|
|
23913
|
-
width:
|
|
23913
|
+
width: Rt,
|
|
23914
23914
|
height: bn,
|
|
23915
23915
|
left: Mn,
|
|
23916
23916
|
top: Wn
|
|
@@ -27054,20 +27054,20 @@ var Ex = /* @__PURE__ */ h.forwardRef(function(e, t) {
|
|
|
27054
27054
|
$e && dn !== 0 && (!pe || At.length < pe) ? (mt.splice(jt + 1, 0, Oe), Xt = jt + 1) : mt[St] = Oe, he && !At.length && O === void 0 && mt.push(Oe);
|
|
27055
27055
|
var ot = qt(mt);
|
|
27056
27056
|
if (I == null || I(ot), zt(mt), Je) {
|
|
27057
|
-
var Ct,
|
|
27058
|
-
(Ct = document.activeElement) === null || Ct === void 0 || (
|
|
27057
|
+
var Ct, Rt;
|
|
27058
|
+
(Ct = document.activeElement) === null || Ct === void 0 || (Rt = Ct.blur) === null || Rt === void 0 || Rt.call(Ct), Se.current.focus(Xt), xe(Je, Xt, mt);
|
|
27059
27059
|
} else
|
|
27060
27060
|
A == null || A(ot), xt(!A, "[rc-slider] `onAfterChange` is deprecated. Please use `onChangeComplete` instead."), P == null || P(ot);
|
|
27061
27061
|
}
|
|
27062
27062
|
}, Ke = function(Oe) {
|
|
27063
27063
|
Oe.preventDefault();
|
|
27064
|
-
var Je = ve.current.getBoundingClientRect(), mt = Je.width, St = Je.height, jt = Je.left, dn = Je.top, Xt = Je.bottom, ot = Je.right, Ct = Oe.clientX,
|
|
27064
|
+
var Je = ve.current.getBoundingClientRect(), mt = Je.width, St = Je.height, jt = Je.left, dn = Je.top, Xt = Je.bottom, ot = Je.right, Ct = Oe.clientX, Rt = Oe.clientY, bn;
|
|
27065
27065
|
switch (me) {
|
|
27066
27066
|
case "btt":
|
|
27067
|
-
bn = (Xt -
|
|
27067
|
+
bn = (Xt - Rt) / St;
|
|
27068
27068
|
break;
|
|
27069
27069
|
case "ttb":
|
|
27070
|
-
bn = (
|
|
27070
|
+
bn = (Rt - dn) / St;
|
|
27071
27071
|
break;
|
|
27072
27072
|
case "rtl":
|
|
27073
27073
|
bn = (ot - Ct) / mt;
|
|
@@ -29033,16 +29033,16 @@ var Lx = function(t) {
|
|
|
29033
29033
|
process.env.NODE_ENV !== "production" && xt(Ie ? Pe : !0, "You provided a `current` prop to a Pagination component without an `onChange` handler. This will render a read-only component.");
|
|
29034
29034
|
var he = Math.max(1, te - (S ? 3 : 5)), $e = Math.min(Do(void 0, G, d), te + (S ? 3 : 5));
|
|
29035
29035
|
function K(ot, Ct) {
|
|
29036
|
-
var
|
|
29036
|
+
var Rt = ot || /* @__PURE__ */ Q.createElement("button", {
|
|
29037
29037
|
type: "button",
|
|
29038
29038
|
"aria-label": Ct,
|
|
29039
29039
|
className: "".concat(r, "-item-link")
|
|
29040
29040
|
});
|
|
29041
|
-
return typeof ot == "function" && (
|
|
29041
|
+
return typeof ot == "function" && (Rt = /* @__PURE__ */ Q.createElement(ot, U({}, t))), Rt;
|
|
29042
29042
|
}
|
|
29043
29043
|
function se(ot) {
|
|
29044
|
-
var Ct = ot.target.value,
|
|
29045
|
-
return Ct === "" ? bn = Ct : Number.isNaN(Number(Ct)) ? bn = ve : Ct >=
|
|
29044
|
+
var Ct = ot.target.value, Rt = Do(void 0, G, d), bn;
|
|
29045
|
+
return Ct === "" ? bn = Ct : Number.isNaN(Number(Ct)) ? bn = ve : Ct >= Rt ? bn = Rt : bn = Number(Ct), bn;
|
|
29046
29046
|
}
|
|
29047
29047
|
function pe(ot) {
|
|
29048
29048
|
return Qb(ot) && ot !== te && Qb(d) && d > 0;
|
|
@@ -29069,13 +29069,13 @@ var Lx = function(t) {
|
|
|
29069
29069
|
Me(se(ot));
|
|
29070
29070
|
}
|
|
29071
29071
|
function we(ot) {
|
|
29072
|
-
var Ct = Do(ot, G, d),
|
|
29073
|
-
ie(ot), me(
|
|
29072
|
+
var Ct = Do(ot, G, d), Rt = te > Ct && Ct !== 0 ? Ct : te;
|
|
29073
|
+
ie(ot), me(Rt), N == null || N(te, ot), be(Rt), v == null || v(Rt, ot);
|
|
29074
29074
|
}
|
|
29075
29075
|
function Me(ot) {
|
|
29076
29076
|
if (pe(ot) && !D) {
|
|
29077
|
-
var Ct = Do(void 0, G, d),
|
|
29078
|
-
return ot > Ct ?
|
|
29077
|
+
var Ct = Do(void 0, G, d), Rt = ot;
|
|
29078
|
+
return ot > Ct ? Rt = Ct : ot < 1 && (Rt = 1), Rt !== ve && me(Rt), be(Rt), v == null || v(Rt, G), Rt;
|
|
29079
29079
|
}
|
|
29080
29080
|
return te;
|
|
29081
29081
|
}
|
|
@@ -29094,7 +29094,7 @@ var Lx = function(t) {
|
|
|
29094
29094
|
}
|
|
29095
29095
|
function kt(ot, Ct) {
|
|
29096
29096
|
if (ot.key === "Enter" || ot.charCode === Ge.ENTER || ot.keyCode === Ge.ENTER) {
|
|
29097
|
-
for (var
|
|
29097
|
+
for (var Rt = arguments.length, bn = new Array(Rt > 2 ? Rt - 2 : 0), Mn = 2; Mn < Rt; Mn++)
|
|
29098
29098
|
bn[Mn - 2] = arguments[Mn];
|
|
29099
29099
|
Ct.apply(void 0, bn);
|
|
29100
29100
|
}
|
|
@@ -32979,7 +32979,7 @@ var ur = {
|
|
|
32979
32979
|
}
|
|
32980
32980
|
}, Gz = function(t) {
|
|
32981
32981
|
return oT(t);
|
|
32982
|
-
},
|
|
32982
|
+
}, Mt = function(t) {
|
|
32983
32983
|
var n = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : "none";
|
|
32984
32984
|
return t || n;
|
|
32985
32985
|
}, fg = function() {
|
|
@@ -32990,60 +32990,60 @@ var ur = {
|
|
|
32990
32990
|
}, Qz = function(t, n, r, i, o) {
|
|
32991
32991
|
return {
|
|
32992
32992
|
isBrowser: t,
|
|
32993
|
-
browserMajorVersion:
|
|
32994
|
-
browserFullVersion:
|
|
32995
|
-
browserName:
|
|
32996
|
-
engineName:
|
|
32997
|
-
engineVersion:
|
|
32998
|
-
osName:
|
|
32999
|
-
osVersion:
|
|
33000
|
-
userAgent:
|
|
32993
|
+
browserMajorVersion: Mt(n.major),
|
|
32994
|
+
browserFullVersion: Mt(n.version),
|
|
32995
|
+
browserName: Mt(n.name),
|
|
32996
|
+
engineName: Mt(r.name),
|
|
32997
|
+
engineVersion: Mt(r.version),
|
|
32998
|
+
osName: Mt(i.name),
|
|
32999
|
+
osVersion: Mt(i.version),
|
|
33000
|
+
userAgent: Mt(o)
|
|
33001
33001
|
};
|
|
33002
33002
|
}, cy = function(t, n, r, i) {
|
|
33003
33003
|
return Lz({}, t, {
|
|
33004
|
-
vendor:
|
|
33005
|
-
model:
|
|
33006
|
-
os:
|
|
33007
|
-
osVersion:
|
|
33008
|
-
ua:
|
|
33004
|
+
vendor: Mt(n.vendor),
|
|
33005
|
+
model: Mt(n.model),
|
|
33006
|
+
os: Mt(r.name),
|
|
33007
|
+
osVersion: Mt(r.version),
|
|
33008
|
+
ua: Mt(i)
|
|
33009
33009
|
});
|
|
33010
33010
|
}, Zz = function(t, n, r, i) {
|
|
33011
33011
|
return {
|
|
33012
33012
|
isSmartTV: t,
|
|
33013
|
-
engineName:
|
|
33014
|
-
engineVersion:
|
|
33015
|
-
osName:
|
|
33016
|
-
osVersion:
|
|
33017
|
-
userAgent:
|
|
33013
|
+
engineName: Mt(n.name),
|
|
33014
|
+
engineVersion: Mt(n.version),
|
|
33015
|
+
osName: Mt(r.name),
|
|
33016
|
+
osVersion: Mt(r.version),
|
|
33017
|
+
userAgent: Mt(i)
|
|
33018
33018
|
};
|
|
33019
33019
|
}, Jz = function(t, n, r, i) {
|
|
33020
33020
|
return {
|
|
33021
33021
|
isConsole: t,
|
|
33022
|
-
engineName:
|
|
33023
|
-
engineVersion:
|
|
33024
|
-
osName:
|
|
33025
|
-
osVersion:
|
|
33026
|
-
userAgent:
|
|
33022
|
+
engineName: Mt(n.name),
|
|
33023
|
+
engineVersion: Mt(n.version),
|
|
33024
|
+
osName: Mt(r.name),
|
|
33025
|
+
osVersion: Mt(r.version),
|
|
33026
|
+
userAgent: Mt(i)
|
|
33027
33027
|
};
|
|
33028
33028
|
}, eH = function(t, n, r, i) {
|
|
33029
33029
|
return {
|
|
33030
33030
|
isWearable: t,
|
|
33031
|
-
engineName:
|
|
33032
|
-
engineVersion:
|
|
33033
|
-
osName:
|
|
33034
|
-
osVersion:
|
|
33035
|
-
userAgent:
|
|
33031
|
+
engineName: Mt(n.name),
|
|
33032
|
+
engineVersion: Mt(n.version),
|
|
33033
|
+
osName: Mt(r.name),
|
|
33034
|
+
osVersion: Mt(r.version),
|
|
33035
|
+
userAgent: Mt(i)
|
|
33036
33036
|
};
|
|
33037
33037
|
}, tH = function(t, n, r, i, o) {
|
|
33038
33038
|
return {
|
|
33039
33039
|
isEmbedded: t,
|
|
33040
|
-
vendor:
|
|
33041
|
-
model:
|
|
33042
|
-
engineName:
|
|
33043
|
-
engineVersion:
|
|
33044
|
-
osName:
|
|
33045
|
-
osVersion:
|
|
33046
|
-
userAgent:
|
|
33040
|
+
vendor: Mt(n.vendor),
|
|
33041
|
+
model: Mt(n.model),
|
|
33042
|
+
engineName: Mt(r.name),
|
|
33043
|
+
engineVersion: Mt(r.version),
|
|
33044
|
+
osName: Mt(i.name),
|
|
33045
|
+
osVersion: Mt(i.version),
|
|
33046
|
+
userAgent: Mt(o)
|
|
33047
33047
|
};
|
|
33048
33048
|
};
|
|
33049
33049
|
function nH(e) {
|
|
@@ -33087,13 +33087,13 @@ var sT = function(t) {
|
|
|
33087
33087
|
return n === ur.Embedded;
|
|
33088
33088
|
}, hT = function(t) {
|
|
33089
33089
|
var n = t.vendor;
|
|
33090
|
-
return
|
|
33090
|
+
return Mt(n);
|
|
33091
33091
|
}, pT = function(t) {
|
|
33092
33092
|
var n = t.model;
|
|
33093
|
-
return
|
|
33093
|
+
return Mt(n);
|
|
33094
33094
|
}, gT = function(t) {
|
|
33095
33095
|
var n = t.type;
|
|
33096
|
-
return
|
|
33096
|
+
return Mt(n, "browser");
|
|
33097
33097
|
}, vT = function(t) {
|
|
33098
33098
|
var n = t.name;
|
|
33099
33099
|
return n === ls.Android;
|
|
@@ -33111,10 +33111,10 @@ var sT = function(t) {
|
|
|
33111
33111
|
return n === ls.IOS;
|
|
33112
33112
|
}, CT = function(t) {
|
|
33113
33113
|
var n = t.version;
|
|
33114
|
-
return
|
|
33114
|
+
return Mt(n);
|
|
33115
33115
|
}, wT = function(t) {
|
|
33116
33116
|
var n = t.name;
|
|
33117
|
-
return
|
|
33117
|
+
return Mt(n);
|
|
33118
33118
|
}, xT = function(t) {
|
|
33119
33119
|
var n = t.name;
|
|
33120
33120
|
return n === _r.Chrome;
|
|
@@ -33150,19 +33150,19 @@ var sT = function(t) {
|
|
|
33150
33150
|
return n === _r.SamsungBrowser;
|
|
33151
33151
|
}, MT = function(t) {
|
|
33152
33152
|
var n = t.version;
|
|
33153
|
-
return
|
|
33153
|
+
return Mt(n);
|
|
33154
33154
|
}, LT = function(t) {
|
|
33155
33155
|
var n = t.major;
|
|
33156
|
-
return
|
|
33156
|
+
return Mt(n);
|
|
33157
33157
|
}, DT = function(t) {
|
|
33158
33158
|
var n = t.name;
|
|
33159
|
-
return
|
|
33159
|
+
return Mt(n);
|
|
33160
33160
|
}, kT = function(t) {
|
|
33161
33161
|
var n = t.name;
|
|
33162
|
-
return
|
|
33162
|
+
return Mt(n);
|
|
33163
33163
|
}, BT = function(t) {
|
|
33164
33164
|
var n = t.version;
|
|
33165
|
-
return
|
|
33165
|
+
return Mt(n);
|
|
33166
33166
|
}, FT = function() {
|
|
33167
33167
|
var t = fg(), n = t && t.userAgent && t.userAgent.toLowerCase();
|
|
33168
33168
|
return typeof n == "string" ? /electron/.test(n) : !1;
|
|
@@ -33178,7 +33178,7 @@ var sT = function(t) {
|
|
|
33178
33178
|
}, jT = function() {
|
|
33179
33179
|
return mg("iPod");
|
|
33180
33180
|
}, VT = function(t) {
|
|
33181
|
-
return
|
|
33181
|
+
return Mt(t);
|
|
33182
33182
|
};
|
|
33183
33183
|
function UT(e) {
|
|
33184
33184
|
var t = e || aT, n = t.device, r = t.browser, i = t.os, o = t.engine, a = t.ua;
|
|
@@ -33681,7 +33681,7 @@ function h7({ timemap: e }) {
|
|
|
33681
33681
|
}
|
|
33682
33682
|
l.current = [...e], u.current = -1;
|
|
33683
33683
|
}, [e]), He(() => {
|
|
33684
|
-
e.length <= 0 && t || n !=
|
|
33684
|
+
e.length <= 0 && t || n != Lt.PLAYING && (f(), r == 0 && g());
|
|
33685
33685
|
}, [n]);
|
|
33686
33686
|
const p = (y) => {
|
|
33687
33687
|
var E, w;
|
|
@@ -33693,7 +33693,7 @@ function h7({ timemap: e }) {
|
|
|
33693
33693
|
});
|
|
33694
33694
|
};
|
|
33695
33695
|
He(() => {
|
|
33696
|
-
n ==
|
|
33696
|
+
n == Lt.PAUSED && p(r);
|
|
33697
33697
|
}, [s]);
|
|
33698
33698
|
const g = () => {
|
|
33699
33699
|
l.current = [...e], u.current = -1;
|
|
@@ -33710,7 +33710,7 @@ function h7({ timemap: e }) {
|
|
|
33710
33710
|
return He(() => {
|
|
33711
33711
|
if (e.length <= 0 && t)
|
|
33712
33712
|
return;
|
|
33713
|
-
if (n ==
|
|
33713
|
+
if (n == Lt.STOPPED) {
|
|
33714
33714
|
g();
|
|
33715
33715
|
return;
|
|
33716
33716
|
}
|
|
@@ -33729,7 +33729,7 @@ function h7({ timemap: e }) {
|
|
|
33729
33729
|
N.classList.remove("note-highlight");
|
|
33730
33730
|
});
|
|
33731
33731
|
}
|
|
33732
|
-
}), n ==
|
|
33732
|
+
}), n == Lt.PLAYING) {
|
|
33733
33733
|
const x = new Set(E.flatMap((_) => _.stavesOn).filter((_) => _ != null));
|
|
33734
33734
|
m([...x]);
|
|
33735
33735
|
}
|
|
@@ -33743,7 +33743,7 @@ function h7({ timemap: e }) {
|
|
|
33743
33743
|
}
|
|
33744
33744
|
});
|
|
33745
33745
|
}, [r]), He(() => {
|
|
33746
|
-
i != -1 && (f(), g(), i > 0 && n ==
|
|
33746
|
+
i != -1 && (f(), g(), i > 0 && n == Lt.PAUSED && p(i));
|
|
33747
33747
|
}, [i]), /* @__PURE__ */ ut("div", { className: "player-highlighter", style: { width: "0px", height: "0px" }, children: [
|
|
33748
33748
|
f7,
|
|
33749
33749
|
/* @__PURE__ */ ce("style", { children: `
|
|
@@ -33796,7 +33796,7 @@ function g7(e, t, n) {
|
|
|
33796
33796
|
}
|
|
33797
33797
|
}
|
|
33798
33798
|
};
|
|
33799
|
-
r !==
|
|
33799
|
+
r !== Lt.STOPPED && (B(), a(Lt.STOPPED)), T(!1), e && X(e);
|
|
33800
33800
|
}, [e, n]), He(() => {
|
|
33801
33801
|
const X = async (W) => {
|
|
33802
33802
|
const ee = O();
|
|
@@ -33825,34 +33825,34 @@ function g7(e, t, n) {
|
|
|
33825
33825
|
const ae = await ee.arrayBuffer();
|
|
33826
33826
|
return await W.decodeAudioData(ae);
|
|
33827
33827
|
}, []), A = async (X) => {
|
|
33828
|
-
if (!c && r !==
|
|
33828
|
+
if (!c && r !== Lt.STOPPED) {
|
|
33829
33829
|
const W = await (m == null ? void 0 : m.getElementsAtTime(X)), ee = W == null ? void 0 : W.page;
|
|
33830
33830
|
ee && ee !== l && u(ee);
|
|
33831
33831
|
}
|
|
33832
33832
|
};
|
|
33833
33833
|
He(() => {
|
|
33834
|
-
i <= 0 || (console.log(`Seeking to position: ${i} ms. Playing state: ${r}`), r ===
|
|
33834
|
+
i <= 0 || (console.log(`Seeking to position: ${i} ms. Playing state: ${r}`), r === Lt.PLAYING ? (B(), A(i), F(i), o(-1)) : (v.current = i, A(i), o(-1)));
|
|
33835
33835
|
}, [i]), He(() => {
|
|
33836
33836
|
switch (r) {
|
|
33837
|
-
case
|
|
33837
|
+
case Lt.PLAYING:
|
|
33838
33838
|
_.current ? N().then((X) => {
|
|
33839
33839
|
X && F(v.current);
|
|
33840
33840
|
}) : F(v.current);
|
|
33841
33841
|
break;
|
|
33842
|
-
case
|
|
33842
|
+
case Lt.PAUSED:
|
|
33843
33843
|
k();
|
|
33844
33844
|
break;
|
|
33845
|
-
case
|
|
33845
|
+
case Lt.STOPPED:
|
|
33846
33846
|
B(), v.current = 0;
|
|
33847
33847
|
break;
|
|
33848
33848
|
}
|
|
33849
33849
|
}, [r, N]);
|
|
33850
33850
|
const P = ct(() => {
|
|
33851
|
-
r ===
|
|
33851
|
+
r === Lt.PLAYING ? a(Lt.PAUSED) : r === Lt.PAUSED && a(Lt.PLAYING);
|
|
33852
33852
|
}, [r, a]), $ = ct(() => {
|
|
33853
|
-
a(
|
|
33853
|
+
a(Lt.PLAYING);
|
|
33854
33854
|
}, [a]), L = ct(() => {
|
|
33855
|
-
a(
|
|
33855
|
+
a(Lt.STOPPED), o(0);
|
|
33856
33856
|
}, [a, o]), D = ct(() => {
|
|
33857
33857
|
const X = O();
|
|
33858
33858
|
if (!X || g.current === 0) return v.current;
|
|
@@ -33880,14 +33880,14 @@ function g7(e, t, n) {
|
|
|
33880
33880
|
}), z();
|
|
33881
33881
|
});
|
|
33882
33882
|
}, [B, O, N, r]), R = gt(() => f != null && f.timemap ? f.timemap : [], [f]), z = ct(() => {
|
|
33883
|
-
if (r !==
|
|
33883
|
+
if (r !== Lt.PLAYING) return;
|
|
33884
33884
|
const X = D();
|
|
33885
33885
|
if (s(X), R && R.length > 0 && X > R[R.length - 1].tstamp + p7) {
|
|
33886
33886
|
B(), L();
|
|
33887
33887
|
return;
|
|
33888
33888
|
}
|
|
33889
33889
|
A(X), b.current = requestAnimationFrame(z);
|
|
33890
|
-
}, [D, s, R, B, L, A, r]), V = ct(() => r ===
|
|
33890
|
+
}, [D, s, R, B, L, A, r]), V = ct(() => r === Lt.PLAYING ? "Pause" : "Play", [r]), M = ct(() => {
|
|
33891
33891
|
B(), L();
|
|
33892
33892
|
}, [r, a, c, d, B]);
|
|
33893
33893
|
return {
|
|
@@ -33917,8 +33917,8 @@ function v7() {
|
|
|
33917
33917
|
[a, l]
|
|
33918
33918
|
), m = gt(
|
|
33919
33919
|
() => e != null && e.audioUrl ? /* @__PURE__ */ ce("div", { style: { position: "absolute", bottom: 0, right: 0, padding: "8px" }, children: /* @__PURE__ */ ut(On, { direction: "horizontal", size: "small", children: [
|
|
33920
|
-
t !==
|
|
33921
|
-
t ===
|
|
33920
|
+
t !== Lt.STOPPED ? d : null,
|
|
33921
|
+
t === Lt.PLAYING ? f : c
|
|
33922
33922
|
] }) }) : null,
|
|
33923
33923
|
[e, t, c, d, f]
|
|
33924
33924
|
);
|
|
@@ -35558,7 +35558,7 @@ function _j(e) {
|
|
|
35558
35558
|
a(), l(!1);
|
|
35559
35559
|
}, v = (S) => {
|
|
35560
35560
|
r(), d(S);
|
|
35561
|
-
}, b = n ===
|
|
35561
|
+
}, b = n === Lt.PLAYING, y = !b && i > am, E = !b && i < sm && !s, w = u > 1;
|
|
35562
35562
|
return {
|
|
35563
35563
|
// State
|
|
35564
35564
|
scoreUrl: t == null ? void 0 : t.url,
|
|
@@ -35603,14 +35603,14 @@ const Aj = ({ style: e, fullScreenElement: t, showDownloadButton: n, audioDurati
|
|
|
35603
35603
|
{
|
|
35604
35604
|
icon: d ? /* @__PURE__ */ ce(Xx, {}) : /* @__PURE__ */ ce(Kx, {}),
|
|
35605
35605
|
onClick: b,
|
|
35606
|
-
disabled: u ===
|
|
35606
|
+
disabled: u === Lt.PLAYING
|
|
35607
35607
|
}
|
|
35608
35608
|
),
|
|
35609
35609
|
n ? /* @__PURE__ */ ce(Kn, { type: "default", icon: /* @__PURE__ */ ce(Ux, {}), download: !0, href: s || "", children: "MEI" }) : null
|
|
35610
35610
|
] }), [f, m, u, d, s, i]), E = gt(() => c ? /* @__PURE__ */ ce(
|
|
35611
35611
|
sg,
|
|
35612
35612
|
{
|
|
35613
|
-
disabled: u ===
|
|
35613
|
+
disabled: u === Lt.PLAYING,
|
|
35614
35614
|
align: "center",
|
|
35615
35615
|
current: a,
|
|
35616
35616
|
defaultPageSize: 1,
|
|
@@ -35622,7 +35622,7 @@ const Aj = ({ style: e, fullScreenElement: t, showDownloadButton: n, audioDurati
|
|
|
35622
35622
|
/* @__PURE__ */ ce(Sn, { xxl: 8, xl: 14, lg: 8, md: 10, sm: 12, xs: 14, children: y }),
|
|
35623
35623
|
/* @__PURE__ */ ce(Sn, { xxl: 12, xl: 10, lg: 14, md: 14, sm: 20, xs: 24, children: E })
|
|
35624
35624
|
] }), [y, E, o]);
|
|
35625
|
-
return /* @__PURE__ */ ce("div", { className: "score-controls", style: e, children: u ===
|
|
35625
|
+
return /* @__PURE__ */ ce("div", { className: "score-controls", style: e, children: u === Lt.STOPPED ? w : /* @__PURE__ */ ce(Nj, { audioDuration: r }) });
|
|
35626
35626
|
};
|
|
35627
35627
|
var Eg = {}, gd = {}, vd = {}, Ij = Ln && Ln.__createBinding || (Object.create ? function(e, t, n, r) {
|
|
35628
35628
|
r === void 0 && (r = n);
|
|
@@ -36468,7 +36468,7 @@ function y2({
|
|
|
36468
36468
|
const m = CSS.escape(f);
|
|
36469
36469
|
return r.current.querySelector(`#${m}`);
|
|
36470
36470
|
}, [r]), d = gt(
|
|
36471
|
-
() => e && n ===
|
|
36471
|
+
() => e && n === Lt.PLAYING,
|
|
36472
36472
|
[e, n]
|
|
36473
36473
|
);
|
|
36474
36474
|
return {
|
|
@@ -36531,7 +36531,7 @@ function nV(e) {
|
|
|
36531
36531
|
const ve = te, { newSvg: me, scale: Pe } = ve, Ie = ((Ce = F.current) == null ? void 0 : Ce.innerHTML) || "", he = { ...me, svgHTML: Ie };
|
|
36532
36532
|
N(he), $(he.page, he);
|
|
36533
36533
|
const $e = (Se = F.current) == null ? void 0 : Se.querySelector("svg");
|
|
36534
|
-
$e &&
|
|
36534
|
+
$e && ($e.style.opacity = "0", $e.style.transition = "opacity 300ms ease-in", setTimeout(() => {
|
|
36535
36535
|
$e.style.opacity = "1";
|
|
36536
36536
|
}, 10)), u7();
|
|
36537
36537
|
const K = Object.values(I).filter((se) => se != "none");
|
|
@@ -36605,7 +36605,7 @@ function nV(e) {
|
|
|
36605
36605
|
}
|
|
36606
36606
|
const J = Jl({
|
|
36607
36607
|
scoreUrl: (l == null ? void 0 : l.url) || "",
|
|
36608
|
-
postLoadTransition:
|
|
36608
|
+
postLoadTransition: Js.FADE_IN,
|
|
36609
36609
|
meiStr: c,
|
|
36610
36610
|
page: 1,
|
|
36611
36611
|
scale: m,
|
|
@@ -36668,7 +36668,7 @@ function nV(e) {
|
|
|
36668
36668
|
}
|
|
36669
36669
|
return;
|
|
36670
36670
|
}
|
|
36671
|
-
((be = F.current) == null ? void 0 : be.querySelector("svg")) &&
|
|
36671
|
+
((be = F.current) == null ? void 0 : be.querySelector("svg")) && Z();
|
|
36672
36672
|
const te = lm({
|
|
36673
36673
|
scoreUrl: O.scoreUrl,
|
|
36674
36674
|
transition: void 0,
|
|
@@ -36680,7 +36680,7 @@ function nV(e) {
|
|
|
36680
36680
|
loadedPagesCount: y
|
|
36681
36681
|
});
|
|
36682
36682
|
s(te);
|
|
36683
|
-
}, [b, P, N, o
|
|
36683
|
+
}, [b, P, N, o]), tV(() => {
|
|
36684
36684
|
if (!r || !F.current || !O || !ue()) return;
|
|
36685
36685
|
const Y = O.page, J = Y + 1, te = Y - 1;
|
|
36686
36686
|
J <= y && !P(J) && (console.log(`[ScoreView] Pre-rendering page ${J}`), ie(J)), te >= 1 && !P(te) && (console.log(`[ScoreView] Pre-rendering page ${te}`), ie(te));
|
|
@@ -36779,7 +36779,7 @@ function rV({
|
|
|
36779
36779
|
if (!r.current)
|
|
36780
36780
|
return;
|
|
36781
36781
|
const l = r.current;
|
|
36782
|
-
e ===
|
|
36782
|
+
e === Lt.PAUSED && l.playState === "running" ? l.pause() : e === Lt.PLAYING && l.playState !== "running" ? l.play() : e === Lt.STOPPED && (l.cancel(), l.currentTime = 0);
|
|
36783
36783
|
}, [e]), He(() => {
|
|
36784
36784
|
!r.current || t == -1 || (r.current.currentTime = t);
|
|
36785
36785
|
}, [t]), He(() => () => {
|
|
@@ -36839,7 +36839,7 @@ function iV(e) {
|
|
|
36839
36839
|
s(R);
|
|
36840
36840
|
else if (s(null), O(!1), z && a.type === "renderAutoScroll") {
|
|
36841
36841
|
const M = z, { newSvg: X } = M;
|
|
36842
|
-
x(X), o(!1), D(), f ==
|
|
36842
|
+
x(X), o(!1), D(), f == Lt.PLAYING ? L(X, d, !1) : f == Lt.PAUSED ? L(X, d, !0) : (L(X, 0, !1), m(Lt.PLAYING));
|
|
36843
36843
|
}
|
|
36844
36844
|
} else
|
|
36845
36845
|
console.error("Action execution failed"), O(!1);
|
|
@@ -36910,21 +36910,21 @@ function uV(e, t) {
|
|
|
36910
36910
|
}));
|
|
36911
36911
|
const S = l7({
|
|
36912
36912
|
onSwipedLeft: (_) => {
|
|
36913
|
-
u !=
|
|
36913
|
+
u != Lt.PLAYING && d < p && (g(), f());
|
|
36914
36914
|
},
|
|
36915
36915
|
onSwipedRight: (_) => {
|
|
36916
|
-
u !=
|
|
36916
|
+
u != Lt.PLAYING && d > 1 && (g(), m());
|
|
36917
36917
|
},
|
|
36918
36918
|
delta: 10,
|
|
36919
36919
|
swipeDuration: 300,
|
|
36920
36920
|
preventScrollOnSwipe: !0
|
|
36921
36921
|
}), x = gt(() => b != null && b.timemap && b.timemap.length > 0 ? lV(b.timemap) : 0, [b]);
|
|
36922
36922
|
return He(() => {
|
|
36923
|
-
!T && u ==
|
|
36923
|
+
!T && u == Lt.PLAYING && c(Lt.PAUSED);
|
|
36924
36924
|
}, [T]), He(() => {
|
|
36925
|
-
u !=
|
|
36925
|
+
u != Lt.STOPPED && c(Lt.STOPPED);
|
|
36926
36926
|
}, [a]), He(() => {
|
|
36927
|
-
u ==
|
|
36927
|
+
u == Lt.STOPPED && s && l(!1);
|
|
36928
36928
|
}, [u]), /* @__PURE__ */ ut(
|
|
36929
36929
|
"div",
|
|
36930
36930
|
{
|
|
@@ -55214,7 +55214,7 @@ function wte({
|
|
|
55214
55214
|
{
|
|
55215
55215
|
icon: /* @__PURE__ */ ce(ml, { component: Zx }),
|
|
55216
55216
|
onClick: l,
|
|
55217
|
-
disabled: d ===
|
|
55217
|
+
disabled: d === Lt.PLAYING,
|
|
55218
55218
|
children: u("scoreControls.settings")
|
|
55219
55219
|
}
|
|
55220
55220
|
) : null
|
|
@@ -55244,7 +55244,7 @@ function xte({
|
|
|
55244
55244
|
}, [s]), He(() => {
|
|
55245
55245
|
u && Object.keys(l).length > 0 && u({ showReconstructions: l });
|
|
55246
55246
|
}, [l]), He(() => {
|
|
55247
|
-
r ==
|
|
55247
|
+
r == Lt.PLAYING && i(Lt.STOPPED);
|
|
55248
55248
|
}, [l]), He(() => {
|
|
55249
55249
|
Ho && f.isLandscape && o == "music" && setTimeout(() => {
|
|
55250
55250
|
var p;
|