@aim-packages/subtitle 0.0.14 → 0.0.16
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs.js +3 -3
- package/dist/index.d.ts +1 -0
- package/dist/index.es.js +171 -174
- package/package.json +1 -1
package/dist/index.es.js
CHANGED
|
@@ -179,30 +179,30 @@ function x0(e, n) {
|
|
|
179
179
|
const d = e.split(`
|
|
180
180
|
`);
|
|
181
181
|
d.forEach((h, N) => {
|
|
182
|
-
h.replace(a, "") === " " || h.replace(a, "") === "" || (h.indexOf("-->") !== -1 ? (l = !0, typeof r.start == "number" && r.start >= 0 && B.push(
|
|
183
|
-
start:
|
|
184
|
-
end:
|
|
182
|
+
h.replace(a, "") === " " || h.replace(a, "") === "" || (h.indexOf("-->") !== -1 ? (l = !0, typeof r.start == "number" && r.start >= 0 && B.push(O1(r)), r = {
|
|
183
|
+
start: h1(h.split("-->")[0].trimRight().split(" ").pop()),
|
|
184
|
+
end: h1(h.split("-->")[1].trimLeft().split(" ").shift()),
|
|
185
185
|
part: ""
|
|
186
186
|
}) : l && (B.length !== 0 ? (B[B.length - 1].part.replace(a, ""), h.replace(a, ""), r.part.length === 0 ? r.part = h : r.part = `${r.part}
|
|
187
|
-
${h}`, N === d.length - 1 && B.push(
|
|
187
|
+
${h}`, N === d.length - 1 && B.push(O1(r))) : (r.part = h, B.push(O1(r)), r.part = "")));
|
|
188
188
|
}), r = [];
|
|
189
189
|
const O = /(<([0-9:.>]+)>)/ig;
|
|
190
190
|
B.forEach((h) => {
|
|
191
191
|
const u = h.part.split().map(function(c) {
|
|
192
|
-
return c.replace(O, function(
|
|
193
|
-
return
|
|
194
|
-
return `==${
|
|
192
|
+
return c.replace(O, function(C) {
|
|
193
|
+
return C.split("").reduce(function(v, y) {
|
|
194
|
+
return `==${C.replace("<", "").replace(">", "")}`;
|
|
195
195
|
}, 0);
|
|
196
196
|
});
|
|
197
197
|
})[0].replace(a, "").split(" "), g = [];
|
|
198
198
|
u.forEach(function(c) {
|
|
199
199
|
if (c.indexOf("==") > -1) {
|
|
200
|
-
const
|
|
201
|
-
if (
|
|
200
|
+
const C = c.split("=="), v = C[0];
|
|
201
|
+
if (C[1], v == "" || v == "##")
|
|
202
202
|
return;
|
|
203
203
|
g.push({
|
|
204
204
|
word: b1(c.split("==")[0]),
|
|
205
|
-
time:
|
|
205
|
+
time: h1(c.split("==")[1])
|
|
206
206
|
});
|
|
207
207
|
} else
|
|
208
208
|
g.push({
|
|
@@ -213,14 +213,14 @@ ${h}`, N === d.length - 1 && B.push(h1(r))) : (r.part = h, B.push(h1(r)), r.part
|
|
|
213
213
|
}), t(B);
|
|
214
214
|
});
|
|
215
215
|
}
|
|
216
|
-
function
|
|
216
|
+
function h1(e) {
|
|
217
217
|
const n = e.split(":"), a = n[n.length - 3] ? +n[n.length - 3] : 0, t = n[n.length - 2] ? +n[n.length - 2] : 0, i = +n[n.length - 1];
|
|
218
218
|
return a * 3600 + t * 60 + i;
|
|
219
219
|
}
|
|
220
220
|
function b1(e) {
|
|
221
221
|
return e.replace(/[^0-9a-z'-]/gi, "").toLowerCase();
|
|
222
222
|
}
|
|
223
|
-
function
|
|
223
|
+
function O1(e) {
|
|
224
224
|
if (e == null || typeof e != "object")
|
|
225
225
|
return e;
|
|
226
226
|
const n = e.constructor();
|
|
@@ -313,71 +313,68 @@ function $0(e) {
|
|
|
313
313
|
} else
|
|
314
314
|
return [];
|
|
315
315
|
}
|
|
316
|
-
const O1 = {
|
|
317
|
-
padding: [0.4, 0]
|
|
318
|
-
};
|
|
319
316
|
function e2(e) {
|
|
320
317
|
let n, a, t, i, r, B, l, d, O, h;
|
|
321
|
-
const N = !!(e && e.vad && e.vad.length > 0), m = "[--end--]",
|
|
322
|
-
let
|
|
323
|
-
return
|
|
324
|
-
function
|
|
318
|
+
const N = !!(e && e.vad && e.vad.length > 0), m = (e == null ? void 0 : e.vadPadding) || [0.4, 0], M = "[--end--]", u = "[--Single--]", g = "[--Full--]", c = /\[(\d{2}:\d{2}:\d{2}\.\d{3}) --> (\d{2}:\d{2}:\d{2}\.\d{3})\]/;
|
|
319
|
+
let C = !1, v = !1, y = "";
|
|
320
|
+
return Q(), { feed: U, reset: Q, end: P };
|
|
321
|
+
function Q() {
|
|
325
322
|
n = !0, a = "", t = !1, i = "", r = !1, B = void 0, l = 0, d = !1, O = 0, h = 0;
|
|
326
323
|
}
|
|
327
|
-
function
|
|
324
|
+
function P() {
|
|
328
325
|
if (d) {
|
|
329
326
|
console.log("whisper parser is already end");
|
|
330
327
|
return;
|
|
331
328
|
}
|
|
332
|
-
|
|
329
|
+
U(M);
|
|
333
330
|
}
|
|
334
|
-
function
|
|
335
|
-
|
|
331
|
+
function k(V) {
|
|
332
|
+
C || (y += V), !C && !v && C1(y) && (v = !0), !C && y.length > 50 && (C = !0);
|
|
336
333
|
}
|
|
337
|
-
function
|
|
338
|
-
var
|
|
339
|
-
|
|
340
|
-
const
|
|
341
|
-
a +=
|
|
334
|
+
function U(V) {
|
|
335
|
+
var o, D, A, F, T;
|
|
336
|
+
k(V);
|
|
337
|
+
const s = [];
|
|
338
|
+
a += V, n && ((o = e == null ? void 0 : e.onStart) == null || o.call(e, {
|
|
342
339
|
type: "event",
|
|
343
340
|
event: "start",
|
|
344
341
|
data: []
|
|
345
342
|
})), n && n2(a) && (a = a.slice(L0.length)), n = !1;
|
|
346
|
-
const
|
|
347
|
-
for (; l <
|
|
348
|
-
const
|
|
349
|
-
if (++l, r && B &&
|
|
350
|
-
if (i +=
|
|
343
|
+
const L = a.length;
|
|
344
|
+
for (; l < L; ) {
|
|
345
|
+
const R = a[l];
|
|
346
|
+
if (++l, r && B && R !== "[" && (B.text += R), R === "[" && (t && i.length && B && (B.text += i), i = "", t = !0, r = !1), t) {
|
|
347
|
+
if (i += R, i === g && (i = ""), i === u && (i = "", B && (s.push(B), B = void 0), s.length ? ((D = e == null ? void 0 : e.onParse) == null || D.call(e, {
|
|
351
348
|
type: "event",
|
|
352
349
|
event: "message",
|
|
353
|
-
data:
|
|
354
|
-
}),
|
|
350
|
+
data: s
|
|
351
|
+
}), s.length = 0) : (A = e == null ? void 0 : e.onParse) == null || A.call(e, {
|
|
355
352
|
type: "event",
|
|
356
353
|
event: "end",
|
|
357
354
|
data: []
|
|
358
|
-
}), h++, N && O++), i ===
|
|
359
|
-
B &&
|
|
355
|
+
}), h++, N && O++), i === M) {
|
|
356
|
+
B && s.push(B), d = !0;
|
|
360
357
|
break;
|
|
361
358
|
}
|
|
362
|
-
if (
|
|
363
|
-
const
|
|
364
|
-
if (B &&
|
|
359
|
+
if (c.test(i)) {
|
|
360
|
+
const Z = c.exec(i), G = Z == null ? void 0 : Z[1], L1 = Z == null ? void 0 : Z[2];
|
|
361
|
+
if (B && s.push(B), G && L1) {
|
|
365
362
|
if (N && (e != null && e.vad) && e.vad.length > 0) {
|
|
366
363
|
let r1 = 0;
|
|
367
|
-
r1 = e.vad[O].start -
|
|
368
|
-
const E0 =
|
|
369
|
-
let p1 = b(H(
|
|
370
|
-
O > 0 && E0 && (p1 = b(H(
|
|
364
|
+
r1 = e.vad[O].start - m[0] < 0 ? 0 : e.vad[O].start - m[0];
|
|
365
|
+
const E0 = G === "00:00:00.000";
|
|
366
|
+
let p1 = b(H(G) + r1);
|
|
367
|
+
O > 0 && E0 && (p1 = b(H(G) + r1 + m[0])), B = {
|
|
371
368
|
st: p1,
|
|
372
|
-
et: b(H(
|
|
369
|
+
et: b(H(L1) + r1),
|
|
373
370
|
text: "",
|
|
374
371
|
children: [],
|
|
375
372
|
f: h
|
|
376
373
|
};
|
|
377
374
|
} else
|
|
378
375
|
B = {
|
|
379
|
-
st:
|
|
380
|
-
et:
|
|
376
|
+
st: G,
|
|
377
|
+
et: L1,
|
|
381
378
|
text: "",
|
|
382
379
|
children: [],
|
|
383
380
|
f: h
|
|
@@ -387,15 +384,15 @@ function e2(e) {
|
|
|
387
384
|
}
|
|
388
385
|
}
|
|
389
386
|
}
|
|
390
|
-
|
|
387
|
+
s.length && ((F = e == null ? void 0 : e.onParse) == null || F.call(e, {
|
|
391
388
|
type: "event",
|
|
392
389
|
event: "message",
|
|
393
|
-
data:
|
|
394
|
-
})), d && ((
|
|
390
|
+
data: s
|
|
391
|
+
})), d && ((T = e == null ? void 0 : e.onEnd) == null || T.call(e, {
|
|
395
392
|
type: "event",
|
|
396
393
|
event: "end",
|
|
397
394
|
data: a
|
|
398
|
-
}),
|
|
395
|
+
}), Q());
|
|
399
396
|
}
|
|
400
397
|
}
|
|
401
398
|
const L0 = [239, 187, 191];
|
|
@@ -413,9 +410,9 @@ function a2(e) {
|
|
|
413
410
|
M(h);
|
|
414
411
|
}
|
|
415
412
|
function M(u) {
|
|
416
|
-
var
|
|
413
|
+
var C, v, y, Q, P;
|
|
417
414
|
const g = [];
|
|
418
|
-
a += u, n && ((
|
|
415
|
+
a += u, n && ((C = e == null ? void 0 : e.onStart) == null || C.call(e, {
|
|
419
416
|
type: "event",
|
|
420
417
|
event: "start",
|
|
421
418
|
data: []
|
|
@@ -437,7 +434,7 @@ function a2(e) {
|
|
|
437
434
|
break;
|
|
438
435
|
}
|
|
439
436
|
if (O.test(B)) {
|
|
440
|
-
const
|
|
437
|
+
const U = O.exec(B), V = U == null ? void 0 : U[1];
|
|
441
438
|
i && g.push(i), V && (i = {
|
|
442
439
|
index: Number(V),
|
|
443
440
|
text: ""
|
|
@@ -460,7 +457,7 @@ const h0 = [239, 187, 191];
|
|
|
460
457
|
function i2(e) {
|
|
461
458
|
return h0.every((n, a) => e.charCodeAt(a) === n);
|
|
462
459
|
}
|
|
463
|
-
var O0 = typeof global == "object" && global && global.Object === Object && global, t2 = typeof self == "object" && self && self.Object === Object && self, S = O0 || t2 || Function("return this")(),
|
|
460
|
+
var O0 = typeof global == "object" && global && global.Object === Object && global, t2 = typeof self == "object" && self && self.Object === Object && self, S = O0 || t2 || Function("return this")(), w = S.Symbol, m0 = Object.prototype, r2 = m0.hasOwnProperty, o2 = m0.toString, _ = w ? w.toStringTag : void 0;
|
|
464
461
|
function s2(e) {
|
|
465
462
|
var n = r2.call(e, _), a = e[_];
|
|
466
463
|
try {
|
|
@@ -475,7 +472,7 @@ var l2 = Object.prototype, u2 = l2.toString;
|
|
|
475
472
|
function B2(e) {
|
|
476
473
|
return u2.call(e);
|
|
477
474
|
}
|
|
478
|
-
var d2 = "[object Null]", L2 = "[object Undefined]", v1 =
|
|
475
|
+
var d2 = "[object Null]", L2 = "[object Undefined]", v1 = w ? w.toStringTag : void 0;
|
|
479
476
|
function i1(e) {
|
|
480
477
|
return e == null ? e === void 0 ? L2 : d2 : v1 && v1 in Object(e) ? s2(e) : B2(e);
|
|
481
478
|
}
|
|
@@ -502,7 +499,7 @@ function M2(e) {
|
|
|
502
499
|
return !!y1 && y1 in e;
|
|
503
500
|
}
|
|
504
501
|
var A2 = Function.prototype, N2 = A2.toString;
|
|
505
|
-
function
|
|
502
|
+
function J(e) {
|
|
506
503
|
if (e != null) {
|
|
507
504
|
try {
|
|
508
505
|
return N2.call(e);
|
|
@@ -522,16 +519,16 @@ function C2(e) {
|
|
|
522
519
|
if (!u1(e) || M2(e))
|
|
523
520
|
return !1;
|
|
524
521
|
var n = D0(e) ? Q2 : c2;
|
|
525
|
-
return n.test(
|
|
522
|
+
return n.test(J(e));
|
|
526
523
|
}
|
|
527
524
|
function T2(e, n) {
|
|
528
525
|
return e == null ? void 0 : e[n];
|
|
529
526
|
}
|
|
530
|
-
function
|
|
527
|
+
function K(e, n) {
|
|
531
528
|
var a = T2(e, n);
|
|
532
529
|
return C2(a) ? a : void 0;
|
|
533
530
|
}
|
|
534
|
-
var g1 =
|
|
531
|
+
var g1 = K(S, "WeakMap"), Z1 = Object.create, R2 = /* @__PURE__ */ function() {
|
|
535
532
|
function e() {
|
|
536
533
|
}
|
|
537
534
|
return function(n) {
|
|
@@ -545,7 +542,7 @@ var g1 = J(S, "WeakMap"), Z1 = Object.create, R2 = /* @__PURE__ */ function() {
|
|
|
545
542
|
};
|
|
546
543
|
}(), f1 = function() {
|
|
547
544
|
try {
|
|
548
|
-
var e =
|
|
545
|
+
var e = K(Object, "defineProperty");
|
|
549
546
|
return e({}, "", {}), e;
|
|
550
547
|
} catch {
|
|
551
548
|
}
|
|
@@ -616,13 +613,13 @@ function X1(e) {
|
|
|
616
613
|
return e(n);
|
|
617
614
|
};
|
|
618
615
|
}
|
|
619
|
-
var V0 = typeof exports == "object" && exports && !exports.nodeType && exports, e1 = V0 && typeof module == "object" && module && !module.nodeType && module, g3 = e1 && e1.exports === V0, D1 = g3 && O0.process,
|
|
616
|
+
var V0 = typeof exports == "object" && exports && !exports.nodeType && exports, e1 = V0 && typeof module == "object" && module && !module.nodeType && module, g3 = e1 && e1.exports === V0, D1 = g3 && O0.process, q = function() {
|
|
620
617
|
try {
|
|
621
618
|
var e = e1 && e1.require && e1.require("util").types;
|
|
622
619
|
return e || D1 && D1.binding && D1.binding("util");
|
|
623
620
|
} catch {
|
|
624
621
|
}
|
|
625
|
-
}(), E1 =
|
|
622
|
+
}(), E1 = q && q.isTypedArray, c3 = E1 ? X1(E1) : N3, P3 = Object.prototype, V3 = P3.hasOwnProperty;
|
|
626
623
|
function F3(e, n) {
|
|
627
624
|
var a = R1(e), t = !a && z2(e), i = !a && !t && P0(e), r = !a && !t && !i && c3(e), B = a || t || i || r, l = B ? E2(e.length, String) : [], d = l.length;
|
|
628
625
|
for (var O in e)
|
|
@@ -650,7 +647,7 @@ function T3(e) {
|
|
|
650
647
|
function R3(e) {
|
|
651
648
|
return S2(e) ? F3(e) : T3(e);
|
|
652
649
|
}
|
|
653
|
-
var n1 =
|
|
650
|
+
var n1 = K(Object, "create");
|
|
654
651
|
function X3() {
|
|
655
652
|
this.__data__ = n1 ? n1(null) : {}, this.size = 0;
|
|
656
653
|
}
|
|
@@ -677,18 +674,18 @@ function j3(e, n) {
|
|
|
677
674
|
var a = this.__data__;
|
|
678
675
|
return this.size += this.has(e) ? 0 : 1, a[e] = n1 && n === void 0 ? S3 : n, this;
|
|
679
676
|
}
|
|
680
|
-
function
|
|
677
|
+
function z(e) {
|
|
681
678
|
var n = -1, a = e == null ? 0 : e.length;
|
|
682
679
|
for (this.clear(); ++n < a; ) {
|
|
683
680
|
var t = e[n];
|
|
684
681
|
this.set(t[0], t[1]);
|
|
685
682
|
}
|
|
686
683
|
}
|
|
687
|
-
|
|
688
|
-
|
|
689
|
-
|
|
690
|
-
|
|
691
|
-
|
|
684
|
+
z.prototype.clear = X3;
|
|
685
|
+
z.prototype.delete = U3;
|
|
686
|
+
z.prototype.get = y3;
|
|
687
|
+
z.prototype.has = Y3;
|
|
688
|
+
z.prototype.set = j3;
|
|
692
689
|
function E3() {
|
|
693
690
|
this.__data__ = [], this.size = 0;
|
|
694
691
|
}
|
|
@@ -729,12 +726,12 @@ E.prototype.delete = I3;
|
|
|
729
726
|
E.prototype.get = z3;
|
|
730
727
|
E.prototype.has = J3;
|
|
731
728
|
E.prototype.set = K3;
|
|
732
|
-
var a1 =
|
|
729
|
+
var a1 = K(S, "Map");
|
|
733
730
|
function w3() {
|
|
734
731
|
this.size = 0, this.__data__ = {
|
|
735
|
-
hash: new
|
|
732
|
+
hash: new z(),
|
|
736
733
|
map: new (a1 || E)(),
|
|
737
|
-
string: new
|
|
734
|
+
string: new z()
|
|
738
735
|
};
|
|
739
736
|
}
|
|
740
737
|
function q3(e) {
|
|
@@ -759,18 +756,18 @@ function $3(e, n) {
|
|
|
759
756
|
var a = d1(this, e), t = a.size;
|
|
760
757
|
return a.set(e, n), this.size += a.size == t ? 0 : 1, this;
|
|
761
758
|
}
|
|
762
|
-
function
|
|
759
|
+
function W(e) {
|
|
763
760
|
var n = -1, a = e == null ? 0 : e.length;
|
|
764
761
|
for (this.clear(); ++n < a; ) {
|
|
765
762
|
var t = e[n];
|
|
766
763
|
this.set(t[0], t[1]);
|
|
767
764
|
}
|
|
768
765
|
}
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
766
|
+
W.prototype.clear = w3;
|
|
767
|
+
W.prototype.delete = W3;
|
|
768
|
+
W.prototype.get = x3;
|
|
769
|
+
W.prototype.has = _3;
|
|
770
|
+
W.prototype.set = $3;
|
|
774
771
|
function e4(e, n) {
|
|
775
772
|
for (var a = -1, t = n.length, i = e.length; ++a < t; )
|
|
776
773
|
e[i + a] = n[a];
|
|
@@ -797,19 +794,19 @@ function s4(e, n) {
|
|
|
797
794
|
var t = a.__data__;
|
|
798
795
|
if (!a1 || t.length < o4 - 1)
|
|
799
796
|
return t.push([e, n]), this.size = ++a.size, this;
|
|
800
|
-
a = this.__data__ = new
|
|
797
|
+
a = this.__data__ = new W(t);
|
|
801
798
|
}
|
|
802
799
|
return a.set(e, n), this.size = a.size, this;
|
|
803
800
|
}
|
|
804
|
-
function
|
|
801
|
+
function x(e) {
|
|
805
802
|
var n = this.__data__ = new E(e);
|
|
806
803
|
this.size = n.size;
|
|
807
804
|
}
|
|
808
|
-
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
|
|
812
|
-
|
|
805
|
+
x.prototype.clear = a4;
|
|
806
|
+
x.prototype.delete = i4;
|
|
807
|
+
x.prototype.get = t4;
|
|
808
|
+
x.prototype.has = r4;
|
|
809
|
+
x.prototype.set = s4;
|
|
813
810
|
var k0 = typeof exports == "object" && exports && !exports.nodeType && exports, H1 = k0 && typeof module == "object" && module && !module.nodeType && module, l4 = H1 && H1.exports === k0, G1 = l4 ? S.Buffer : void 0;
|
|
814
811
|
G1 && G1.allocUnsafe;
|
|
815
812
|
function u4(e, n) {
|
|
@@ -837,9 +834,9 @@ function m4(e, n, a) {
|
|
|
837
834
|
function D4(e) {
|
|
838
835
|
return m4(e, R3, O4);
|
|
839
836
|
}
|
|
840
|
-
var c1 =
|
|
837
|
+
var c1 = K(S, "DataView"), P1 = K(S, "Promise"), V1 = K(S, "Set"), z1 = "[object Map]", M4 = "[object Object]", J1 = "[object Promise]", K1 = "[object Set]", w1 = "[object WeakMap]", q1 = "[object DataView]", A4 = J(c1), N4 = J(a1), g4 = J(P1), c4 = J(V1), P4 = J(g1), j = i1;
|
|
841
838
|
(c1 && j(new c1(new ArrayBuffer(1))) != q1 || a1 && j(new a1()) != z1 || P1 && j(P1.resolve()) != J1 || V1 && j(new V1()) != K1 || g1 && j(new g1()) != w1) && (j = function(e) {
|
|
842
|
-
var n = i1(e), a = n == M4 ? e.constructor : void 0, t = a ?
|
|
839
|
+
var n = i1(e), a = n == M4 ? e.constructor : void 0, t = a ? J(a) : "";
|
|
843
840
|
if (t)
|
|
844
841
|
switch (t) {
|
|
845
842
|
case A4:
|
|
@@ -874,7 +871,7 @@ function T4(e) {
|
|
|
874
871
|
var n = new e.constructor(e.source, C4.exec(e));
|
|
875
872
|
return n.lastIndex = e.lastIndex, n;
|
|
876
873
|
}
|
|
877
|
-
var x1 =
|
|
874
|
+
var x1 = w ? w.prototype : void 0, _1 = x1 ? x1.valueOf : void 0;
|
|
878
875
|
function R4(e) {
|
|
879
876
|
return _1 ? Object(_1.call(e)) : {};
|
|
880
877
|
}
|
|
@@ -923,13 +920,13 @@ var _4 = "[object Map]";
|
|
|
923
920
|
function $4(e) {
|
|
924
921
|
return t1(e) && j(e) == _4;
|
|
925
922
|
}
|
|
926
|
-
var $1 =
|
|
923
|
+
var $1 = q && q.isMap, e6 = $1 ? X1($1) : $4, n6 = "[object Set]";
|
|
927
924
|
function a6(e) {
|
|
928
925
|
return t1(e) && j(e) == n6;
|
|
929
926
|
}
|
|
930
|
-
var e0 =
|
|
931
|
-
|
|
932
|
-
|
|
927
|
+
var e0 = q && q.isSet, i6 = e0 ? X1(e0) : a6, Q0 = "[object Arguments]", t6 = "[object Array]", r6 = "[object Boolean]", o6 = "[object Date]", s6 = "[object Error]", C0 = "[object Function]", l6 = "[object GeneratorFunction]", u6 = "[object Map]", B6 = "[object Number]", T0 = "[object Object]", d6 = "[object RegExp]", L6 = "[object Set]", h6 = "[object String]", O6 = "[object Symbol]", m6 = "[object WeakMap]", D6 = "[object ArrayBuffer]", M6 = "[object DataView]", A6 = "[object Float32Array]", N6 = "[object Float64Array]", g6 = "[object Int8Array]", c6 = "[object Int16Array]", P6 = "[object Int32Array]", V6 = "[object Uint8Array]", F6 = "[object Uint8ClampedArray]", k6 = "[object Uint16Array]", Q6 = "[object Uint32Array]", X = {};
|
|
928
|
+
X[Q0] = X[t6] = X[D6] = X[M6] = X[r6] = X[o6] = X[A6] = X[N6] = X[g6] = X[c6] = X[P6] = X[u6] = X[B6] = X[T0] = X[d6] = X[L6] = X[h6] = X[O6] = X[V6] = X[F6] = X[k6] = X[Q6] = !0;
|
|
929
|
+
X[s6] = X[C0] = X[m6] = !1;
|
|
933
930
|
function l1(e, n, a, t, i, r) {
|
|
934
931
|
var B;
|
|
935
932
|
if (B !== void 0)
|
|
@@ -946,12 +943,12 @@ function l1(e, n, a, t, i, r) {
|
|
|
946
943
|
if (d == T0 || d == Q0 || O && !i)
|
|
947
944
|
B = O ? {} : x4(e);
|
|
948
945
|
else {
|
|
949
|
-
if (!
|
|
946
|
+
if (!X[d])
|
|
950
947
|
return i ? e : {};
|
|
951
948
|
B = W4(e, d);
|
|
952
949
|
}
|
|
953
950
|
}
|
|
954
|
-
r || (r = new
|
|
951
|
+
r || (r = new x());
|
|
955
952
|
var h = r.get(e);
|
|
956
953
|
if (h)
|
|
957
954
|
return h;
|
|
@@ -981,7 +978,7 @@ class X0 {
|
|
|
981
978
|
}
|
|
982
979
|
push(n) {
|
|
983
980
|
var a, t;
|
|
984
|
-
this.hitSegment && this.hitSegment.text !== n.text && (this.hitSegmentList.push(this.hitSegment), this.reset()), this.prevSegment && n.text === this.prevSegment.text ? (this.hit++, this.hit === 1 && (this.hitSegment = R0(this.prevSegment)), this.threshold <= this.hit && this.hitSegment && (this.hitSegment.et = n.et, this.hitSegment.hit = this.hit, (t = (a = this.options).onHit) == null || t.call(a, this.hitSegmentList))) : this.hit = 0, this.prevSegment = n;
|
|
981
|
+
this.hitSegment && this.hitSegment.text !== n.text && (this.hitSegmentList.push(this.hitSegment), this.reset()), this.prevSegment && n.text === this.prevSegment.text ? (this.hit++, this.hit === 1 && (this.hitSegment = R0(this.prevSegment), this.hitSegment.et = n.et, this.hitSegment.hit = 1), this.threshold <= this.hit && this.hitSegment && (this.hitSegment.et = n.et, this.hitSegment.hit = this.hit, (t = (a = this.options).onHit) == null || t.call(a, this.hitSegmentList))) : this.hit = 0, this.prevSegment = n;
|
|
985
982
|
}
|
|
986
983
|
end() {
|
|
987
984
|
var n, a;
|
|
@@ -991,7 +988,7 @@ class X0 {
|
|
|
991
988
|
this.hit = 0, this.prevSegment = void 0, this.hitSegment = void 0;
|
|
992
989
|
}
|
|
993
990
|
}
|
|
994
|
-
const
|
|
991
|
+
const I = {
|
|
995
992
|
punc: /[.,?!\],。!?…]{1}/,
|
|
996
993
|
// 是否存在句子分割符号
|
|
997
994
|
em: /[.?!\]。!?…]{1}/,
|
|
@@ -1019,8 +1016,8 @@ function R6(e, n) {
|
|
|
1019
1016
|
space: []
|
|
1020
1017
|
}, l = [];
|
|
1021
1018
|
return e.forEach((d, O) => {
|
|
1022
|
-
const h =
|
|
1023
|
-
t.push(d), d.punc = h ? 1 : 0, h && B.punc.push(O), d.em = N ? 1 : 0, N && B.em.push(O), d.space = m ? 1 : 0, m && (n != null && n.space ? d.text = d.text.replace(
|
|
1019
|
+
const h = I.punc.test(d.text), N = I.em.test(d.text), m = I.space.test(d.text), M = i(d.text), u = r(d), g = I.ep.test(d.text);
|
|
1020
|
+
t.push(d), d.punc = h ? 1 : 0, h && B.punc.push(O), d.em = N ? 1 : 0, N && B.em.push(O), d.space = m ? 1 : 0, m && (n != null && n.space ? d.text = d.text.replace(I.space, " ").trim() : B.space.push(O)), d.emt = i(d.text) ? 1 : 0, M && (n != null && n.emt || B.emt.push(O)), d.zf = r(d) ? 1 : 0, u && (n != null && n.zf || B.zf.push(O)), d.ep = g ? 1 : 0, g && (n != null && n.ep ? d.text = d.text.replace(I.ep, "") : B.ep.push(O)), !(n != null && n.zf && d.zf) && (n != null && n.emt && d.emt || l.push(d));
|
|
1024
1021
|
}), t.end(), {
|
|
1025
1022
|
result: B,
|
|
1026
1023
|
repeat: a,
|
|
@@ -1164,9 +1161,9 @@ function n7() {
|
|
|
1164
1161
|
return n.slice(n.length - a.length) === a;
|
|
1165
1162
|
}), o1;
|
|
1166
1163
|
}
|
|
1167
|
-
var
|
|
1164
|
+
var f = {}, s0;
|
|
1168
1165
|
function a7() {
|
|
1169
|
-
if (s0) return
|
|
1166
|
+
if (s0) return f;
|
|
1170
1167
|
s0 = 1;
|
|
1171
1168
|
var e, n = [
|
|
1172
1169
|
"al",
|
|
@@ -1275,30 +1272,30 @@ function a7() {
|
|
|
1275
1272
|
"vs",
|
|
1276
1273
|
"v"
|
|
1277
1274
|
];
|
|
1278
|
-
|
|
1275
|
+
f.setAbbreviations = function(i) {
|
|
1279
1276
|
i ? e = i : e = n;
|
|
1280
1277
|
};
|
|
1281
|
-
var a =
|
|
1278
|
+
var a = f.isCapitalized = function(i) {
|
|
1282
1279
|
return /^[A-Z][a-z].*/.test(i) || t(i);
|
|
1283
1280
|
};
|
|
1284
|
-
|
|
1281
|
+
f.isSentenceStarter = function(i) {
|
|
1285
1282
|
return a(i) || /``|"|'/.test(i.substring(0, 2));
|
|
1286
|
-
},
|
|
1283
|
+
}, f.isCommonAbbreviation = function(i) {
|
|
1287
1284
|
var r = i.replace(/[-'`~!@#$%^&*()_|+=?;:'",.<>\{\}\[\]\\\/]/gi, "");
|
|
1288
1285
|
return ~e.indexOf(r);
|
|
1289
|
-
},
|
|
1286
|
+
}, f.isTimeAbbreviation = function(i, r) {
|
|
1290
1287
|
if (i === "a.m." || i === "p.m.") {
|
|
1291
1288
|
var B = r.replace(/\W+/g, "").slice(-3).toLowerCase();
|
|
1292
1289
|
if (B === "day")
|
|
1293
1290
|
return !0;
|
|
1294
1291
|
}
|
|
1295
1292
|
return !1;
|
|
1296
|
-
},
|
|
1293
|
+
}, f.isDottedAbbreviation = function(i) {
|
|
1297
1294
|
var r = i.replace(/[\(\)\[\]\{\}]/g, "").match(/(.\.)*/);
|
|
1298
1295
|
return r && r[0].length > 0;
|
|
1299
|
-
},
|
|
1296
|
+
}, f.isCustomAbbreviation = function(i) {
|
|
1300
1297
|
return i.length <= 3 ? !0 : a(i);
|
|
1301
|
-
},
|
|
1298
|
+
}, f.isNameAbbreviation = function(i, r) {
|
|
1302
1299
|
if (r.length > 0) {
|
|
1303
1300
|
if (i < 5 && r[0].length < 6 && a(r[0]))
|
|
1304
1301
|
return !0;
|
|
@@ -1309,14 +1306,14 @@ function a7() {
|
|
|
1309
1306
|
}
|
|
1310
1307
|
return !1;
|
|
1311
1308
|
};
|
|
1312
|
-
var t =
|
|
1309
|
+
var t = f.isNumber = function(i, r) {
|
|
1313
1310
|
return r && (i = i.slice(r - 1, r + 2)), !isNaN(i);
|
|
1314
1311
|
};
|
|
1315
|
-
return
|
|
1312
|
+
return f.isPhoneNr = function(i) {
|
|
1316
1313
|
return i.match(/^(?:(?:\+?1\s*(?:[.-]\s*)?)?(?:\(\s*([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9])\s*\)|([2-9]1[02-9]|[2-9][02-8]1|[2-9][02-8][02-9]))\s*(?:[.-]\s*)?)?([2-9]1[02-9]|[2-9][02-9]1|[2-9][02-9]{2})\s*(?:[.-]\s*)?([0-9]{4})(?:\s*(?:#|x\.?|ext\.?|extension)\s*(\d+))?$/);
|
|
1317
|
-
},
|
|
1314
|
+
}, f.isURL = function(i) {
|
|
1318
1315
|
return i.match(/[-a-zA-Z0-9@:%._\+~#=]{2,256}\.[a-z]{2,6}\b([-a-zA-Z0-9@:%_\+.~#?&//=]*)/);
|
|
1319
|
-
},
|
|
1316
|
+
}, f.isConcatenated = function(i) {
|
|
1320
1317
|
var r = 0;
|
|
1321
1318
|
if ((r = i.indexOf(".")) > -1 || (r = i.indexOf("!")) > -1 || (r = i.indexOf("?")) > -1) {
|
|
1322
1319
|
var B = i.charAt(r + 1);
|
|
@@ -1324,9 +1321,9 @@ function a7() {
|
|
|
1324
1321
|
return [i.slice(0, r), i.slice(r + 1)];
|
|
1325
1322
|
}
|
|
1326
1323
|
return !1;
|
|
1327
|
-
},
|
|
1324
|
+
}, f.isBoundaryChar = function(i) {
|
|
1328
1325
|
return i === "." || i === "!" || i === "?";
|
|
1329
|
-
},
|
|
1326
|
+
}, f;
|
|
1330
1327
|
}
|
|
1331
1328
|
var l0;
|
|
1332
1329
|
function i7() {
|
|
@@ -1361,7 +1358,7 @@ function i7() {
|
|
|
1361
1358
|
h.preserve_whitespace ? (g = d.split(/(<br\s*\/?>|\S+|\n+)/), u = g.filter(function(V, s) {
|
|
1362
1359
|
return s % 2;
|
|
1363
1360
|
})) : u = d.trim().match(l);
|
|
1364
|
-
var c = 0,
|
|
1361
|
+
var c = 0, C = 0, v = [], y = [], Q = [];
|
|
1365
1362
|
if (!u || !u.length)
|
|
1366
1363
|
return [];
|
|
1367
1364
|
for (var P = 0, k = u.length; P < k; P++) {
|
|
@@ -1382,16 +1379,16 @@ function i7() {
|
|
|
1382
1379
|
y.push(Q), Q = [], c = 0;
|
|
1383
1380
|
continue;
|
|
1384
1381
|
}
|
|
1385
|
-
(
|
|
1382
|
+
(C = u[P].indexOf(".")) > -1 && (a.isNumber(u[P], C) || a.isDottedAbbreviation(u[P]) || a.isURL(u[P]) || a.isPhoneNr(u[P])) || (v = a.isConcatenated(u[P])) && (Q.pop(), Q.push(v[0]), y.push(Q), Q = [], c = 0, Q.push(v[1]));
|
|
1386
1383
|
}
|
|
1387
1384
|
Q.length && y.push(Q), y = y.filter(function(V) {
|
|
1388
1385
|
return V.length > 0;
|
|
1389
1386
|
});
|
|
1390
|
-
var
|
|
1387
|
+
var U = y.slice(1).reduce(function(V, s) {
|
|
1391
1388
|
var L = V[V.length - 1];
|
|
1392
1389
|
return L.length === 1 && /^.{1,2}[.]$/.test(L[0]) && !/[.]/.test(s[0]) ? (V.pop(), V.push(L.concat(s)), V) : (V.push(s), V);
|
|
1393
1390
|
}, [y[0]]);
|
|
1394
|
-
return
|
|
1391
|
+
return U.map(function(V, s) {
|
|
1395
1392
|
if (h.preserve_whitespace && !h.newline_boundaries && !h.html_boundaries) {
|
|
1396
1393
|
var L = V.length * 2;
|
|
1397
1394
|
return s === 0 && (L += 1), g.splice(0, L).join("");
|
|
@@ -1431,8 +1428,8 @@ function o7() {
|
|
|
1431
1428
|
return NaN;
|
|
1432
1429
|
var g = m.charCodeAt(u);
|
|
1433
1430
|
if (55296 <= g && g <= 56319) {
|
|
1434
|
-
var c = g,
|
|
1435
|
-
return (c - 55296) * 1024 + (
|
|
1431
|
+
var c = g, C = m.charCodeAt(u + 1);
|
|
1432
|
+
return (c - 55296) * 1024 + (C - 56320) + 65536;
|
|
1436
1433
|
}
|
|
1437
1434
|
return g;
|
|
1438
1435
|
}, i.fromCharCode = function(m) {
|
|
@@ -1481,8 +1478,8 @@ function o7() {
|
|
|
1481
1478
|
return M;
|
|
1482
1479
|
}, i.bytesToString = function(m) {
|
|
1483
1480
|
for (var M = [], u = 0; u < m.length; u += 2) {
|
|
1484
|
-
var g = m[u], c = m[u + 1],
|
|
1485
|
-
M.push(String.fromCharCode(
|
|
1481
|
+
var g = m[u], c = m[u + 1], C = g << 8 | c;
|
|
1482
|
+
M.push(String.fromCharCode(C));
|
|
1486
1483
|
}
|
|
1487
1484
|
return M.join("");
|
|
1488
1485
|
}, i.stringToCharArray = function(m) {
|
|
@@ -1502,17 +1499,17 @@ function o7() {
|
|
|
1502
1499
|
if (!d(m))
|
|
1503
1500
|
return u;
|
|
1504
1501
|
for (var g = 0, c = 0; ; ) {
|
|
1505
|
-
var
|
|
1506
|
-
for (
|
|
1502
|
+
var C = M.exec(m), v;
|
|
1503
|
+
for (C ? v = C.index : v = m.length; c < u; ) {
|
|
1507
1504
|
if (g == v) {
|
|
1508
|
-
c < u && (c++,
|
|
1505
|
+
c < u && (c++, C ? g += C[0].length : g++);
|
|
1509
1506
|
break;
|
|
1510
1507
|
}
|
|
1511
1508
|
g++, c++;
|
|
1512
1509
|
}
|
|
1513
1510
|
if (c == u)
|
|
1514
1511
|
break;
|
|
1515
|
-
if (g >= m.length || !
|
|
1512
|
+
if (g >= m.length || !C)
|
|
1516
1513
|
return -1;
|
|
1517
1514
|
}
|
|
1518
1515
|
return g;
|
|
@@ -1599,13 +1596,13 @@ function s7() {
|
|
|
1599
1596
|
}, {
|
|
1600
1597
|
key: "eachBoundary",
|
|
1601
1598
|
value: function(o, D, A) {
|
|
1602
|
-
var F = void 0,
|
|
1603
|
-
o.eachBoundary(D, function(
|
|
1599
|
+
var F = void 0, T = void 0;
|
|
1600
|
+
o.eachBoundary(D, function(R) {
|
|
1604
1601
|
if (F == null) {
|
|
1605
|
-
F =
|
|
1602
|
+
F = R;
|
|
1606
1603
|
return;
|
|
1607
|
-
} else
|
|
1608
|
-
A(D.substring(F,
|
|
1604
|
+
} else T == null || (F = T), T = R;
|
|
1605
|
+
A(D.substring(F, T), F, T);
|
|
1609
1606
|
});
|
|
1610
1607
|
}
|
|
1611
1608
|
}, {
|
|
@@ -1633,13 +1630,13 @@ function s7() {
|
|
|
1633
1630
|
key: "find",
|
|
1634
1631
|
value: function(o) {
|
|
1635
1632
|
for (var D = 0, A = this.values.length; D <= A; ) {
|
|
1636
|
-
var F = Math.floor((A + D) / 2),
|
|
1637
|
-
if (o <
|
|
1633
|
+
var F = Math.floor((A + D) / 2), T = this.values[F];
|
|
1634
|
+
if (o < T[0])
|
|
1638
1635
|
A = F - 1;
|
|
1639
|
-
else if (o >
|
|
1636
|
+
else if (o > T[1])
|
|
1640
1637
|
D = F + 1;
|
|
1641
1638
|
else
|
|
1642
|
-
return
|
|
1639
|
+
return T;
|
|
1643
1640
|
}
|
|
1644
1641
|
return null;
|
|
1645
1642
|
}
|
|
@@ -1713,7 +1710,7 @@ function s7() {
|
|
|
1713
1710
|
r(s, null, [{
|
|
1714
1711
|
key: "create",
|
|
1715
1712
|
value: function(o, D) {
|
|
1716
|
-
return new s(
|
|
1713
|
+
return new s(C.getInstance(o), D);
|
|
1717
1714
|
}
|
|
1718
1715
|
}]);
|
|
1719
1716
|
function s(L, o) {
|
|
@@ -4526,7 +4523,7 @@ function s7() {
|
|
|
4526
4523
|
};
|
|
4527
4524
|
var m = function(L, o, D) {
|
|
4528
4525
|
var A = [];
|
|
4529
|
-
return L[o](D, function(F,
|
|
4526
|
+
return L[o](D, function(F, T, R) {
|
|
4530
4527
|
A.push(F);
|
|
4531
4528
|
}), A;
|
|
4532
4529
|
};
|
|
@@ -4539,7 +4536,7 @@ function s7() {
|
|
|
4539
4536
|
}, n.lineSplit = function(L, o) {
|
|
4540
4537
|
return m(new B(o), "eachLine", L);
|
|
4541
4538
|
};
|
|
4542
|
-
var M = 1, u = 0, g = 4, c = 0,
|
|
4539
|
+
var M = 1, u = 0, g = 4, c = 0, C = function() {
|
|
4543
4540
|
r(s, null, [{
|
|
4544
4541
|
key: "getInstance",
|
|
4545
4542
|
value: function(o) {
|
|
@@ -4562,14 +4559,14 @@ function s7() {
|
|
|
4562
4559
|
return r(s, [{
|
|
4563
4560
|
key: "handleNext",
|
|
4564
4561
|
value: function(o) {
|
|
4565
|
-
var D = o.actualPosition, A = o.actualPosition, F = M,
|
|
4566
|
-
for (this.ftable.isBofRequired() && (
|
|
4562
|
+
var D = o.actualPosition, A = o.actualPosition, F = M, T = this.getRowIndex(F), R = 3, Z = "run";
|
|
4563
|
+
for (this.ftable.isBofRequired() && (R = 2, Z = "start"); F != u; ) {
|
|
4567
4564
|
if (o.isEos()) {
|
|
4568
|
-
if (
|
|
4565
|
+
if (Z === "stop")
|
|
4569
4566
|
break;
|
|
4570
|
-
|
|
4571
|
-
} else
|
|
4572
|
-
F = this.ftable.get(
|
|
4567
|
+
Z = "stop", R = 1;
|
|
4568
|
+
} else Z === "run" ? (R = this.categoryTable.get(o.getCodePoint()), R & 16384 && (R &= -16385), o.advance()) : Z = "run";
|
|
4569
|
+
F = this.ftable.get(T + g + R), T = this.getRowIndex(F), this.ftable.get(T + c) == -1 && (A = o.actualPosition);
|
|
4573
4570
|
}
|
|
4574
4571
|
for (; o.actualPosition != A; )
|
|
4575
4572
|
o.retreat();
|
|
@@ -4641,12 +4638,12 @@ function s7() {
|
|
|
4641
4638
|
if (this.locked)
|
|
4642
4639
|
throw "Cannot add items to a locked trie";
|
|
4643
4640
|
for (var A = this.root, F = 0; F < o.length; F++) {
|
|
4644
|
-
var
|
|
4645
|
-
if (
|
|
4646
|
-
A =
|
|
4641
|
+
var T = A.getChild(o[F]);
|
|
4642
|
+
if (T)
|
|
4643
|
+
A = T;
|
|
4647
4644
|
else {
|
|
4648
|
-
var
|
|
4649
|
-
A.setChild(o[F],
|
|
4645
|
+
var R = new Q();
|
|
4646
|
+
A.setChild(o[F], R), A = R;
|
|
4650
4647
|
}
|
|
4651
4648
|
}
|
|
4652
4649
|
A.value = D;
|
|
@@ -4675,14 +4672,14 @@ function s7() {
|
|
|
4675
4672
|
}), D;
|
|
4676
4673
|
}
|
|
4677
4674
|
}]), s;
|
|
4678
|
-
}(), k = n.suppressions = {},
|
|
4675
|
+
}(), k = n.suppressions = {}, U = n.Suppressions = function() {
|
|
4679
4676
|
r(s, null, [{
|
|
4680
4677
|
key: "create",
|
|
4681
4678
|
value: function(o) {
|
|
4682
4679
|
var D = new P(), A = new P();
|
|
4683
4680
|
return o.forEach(function(F) {
|
|
4684
|
-
var
|
|
4685
|
-
D.add(
|
|
4681
|
+
var T = a.stringToCodePoints(F);
|
|
4682
|
+
D.add(T, !0), A.add(T.reverse(), !0);
|
|
4686
4683
|
}), new s(D, A, o);
|
|
4687
4684
|
}
|
|
4688
4685
|
}]);
|
|
@@ -4731,33 +4728,33 @@ function s7() {
|
|
|
4731
4728
|
}
|
|
4732
4729
|
}]), s;
|
|
4733
4730
|
}(), V = n.customSuppressions = {
|
|
4734
|
-
en:
|
|
4731
|
+
en: U.create(["Dr."])
|
|
4735
4732
|
};
|
|
4736
4733
|
k.de = function() {
|
|
4737
|
-
var s =
|
|
4734
|
+
var s = U.create(["Port.", "Prot.", "Proz.", "Pfd.", "P.", "Phys.", "PIN.", "Alt.", "Allg.", "Ausg.", "Ausschl.", "Aug.", "Akt.", "Abs.", "Abt.", "Abw.", "A.", "Adr.", "Adj.", "App.", "Apr.", "Art.", "Di.", "Dipl.-Ing.", "Dipl.-Kfm.", "Dir.", "Dim.", "Dez.", "D.", "Dr.", "Dtzd.", "Dat.", "Do.", "Ges.", "Gesch.", "Gebr.", "Gem.", "Geograph.", "G.", "Ggf.", "frz.", "entspr.", "erw.", "evtl.", "ev.", "eigtl.", "einschl.", "e.h.", "e.Wz.", "e.V.", "exkl.", "ehem.", "Frl.", "Fr.", "Folg.", "Forts. f.", "Fa.", "Fam.", "Fn.", "Feb.", "F.", "Inh.", "Ing.", "Int.", "Inc.", "I.", "k.u.k.", "k. u. k.", "kgl.", "kath.", "kfm.", "Ca.", "Chr.", "Chin.", "C.", "Co.", "J.", "Jahrh.", "Jan.", "Jr.", "So.", "Sept.", "Sep.", "Sek.", "Sa.", "Spezif.", "St.", "Std.", "Str.", "StR.", "S.A.", "Schr.", "i.B.", "i.R.", "i.J.", "i.A.", "i.H.", "i.V.", "inkl.", "s.", "schwäb.", "schweiz.", "schles.", "sog.", "südd.", "o.B.", "o.A.", "o.g.", "od.", "am.", "amtl.", "a.a.O.", "a.a.S.", "a.Rh.", "a.M.", "a.D.", "u.", "z.", "zzgl.", "Kl.", "Kap.", "Kfm.", "Konv.", "Kop.", "Obj.", "Op.", "O.", "Okt.", "Msp.", "Mo.", "Mod.", "Mrd.", "M.", "Max.", "Mind.", "Min.", "Mi.", "Mio.", "U.", "Urspr.", "Ursprüngl.", "R.", "Rd.", "Rel.", "Reg.", "Rep.", "Einh.", "Erf.", "Evtl.", "Vgl.", "Verf.", "W.", "Wg.", "B.", "Bibl.", "Bed.", "Best.", "Ben.", "Ber.", "n.u.Z.", "n. Chr.", "näml.", "Hr.", "Hrn.", "Hrsg.", "Hbf.", "Hptst.", "Ztr.", "Z.", "d.Ä.", "d.J.", "b.", "beil.", "v.R.w.", "v.T.", "v. Chr.", "v. u. Z.", "v. H.", "v.u.Z.", "v.Chr.", "v.H.", "verh.", "verw.", "vgl.", "möbl.", "m.W.", "m.E.", "mtl.", "tägl.", "gest.", "gesch.", "gek.", "gedr.", "geb.", "ggf.", "ggfs.", "Nov.", "N.", "Nr.", "p.Adr.", "r.", "röm.", "jew.", "jhrl.", "Qu.", "hpts.", "Ltd.", "L.", "led.", "Test.", "Temp.", "Tel.", "Tägl.", "Trans.", "T.", "Y.", "österr."]);
|
|
4738
4735
|
return V.de && (s = s.merge(V.de)), s.lock(), s;
|
|
4739
4736
|
}(), k.en = function() {
|
|
4740
|
-
var s =
|
|
4737
|
+
var s = U.create(["L.", "Long.", "Link.", "Lib.", "Lt.", "Lev.", "Alt.", "All.", "Approx.", "Act.", "Aug.", "Abs.", "A.", "Adj.", "Adv.", "AD.", "AB.", "AA.", "As.", "E.", "Ex.", "Exec.", "Est.", "Ed.", "Etc.", "O.", "Ok.", "Org.", "Or.", "OK.", "Op.", "On.", "Maj.", "Mart.", "Mar.", "Misc.", "Min.", "MR.", "M.", "Mrs.", "Mr.", "Md.", "Mt.", "Mgr.", "Ms.", "Mb.", "P.O.", "P.M.", "P.V.", "Prof.", "Pro.", "Ph.D.", "Phys.", "PC.", "Pvt.", "PP.", "J.D.", "J.K.", "J.B.", "Jam.", "Jan.", "Job.", "Joe.", "Jun.", "Card.", "Cap.", "Capt.", "Cont.", "Conn.", "Col.", "Comm.", "C.O.D.", "C.F.", "Dec.", "Def.", "Dept.", "DC.", "D.", "Do.", "Diff.", "Sept.", "Sep.", "S.", "Sgt.", "Sq.", "Hat.", "Hz.", "Hon.B.A.", "G.", "Gb.", "Go.", "By.", "B.", "Var.", "VS.", "N.V.", "N.Y.", "Num.", "Nov.", "Nr.", "Up.", "U.", "Fn.", "Feb.", "Fri.", "F.", "Z.", "Kb.", "K.", "I.", "In.", "Id.", "Is.", "exec.", "X.", "vs.", "R.L.", "R.T.", "Rev.", "Rep.", "Yr.", "pp.", "To.", "T.", "Q.", "a.m."]);
|
|
4741
4738
|
return V.en && (s = s.merge(V.en)), s.lock(), s;
|
|
4742
4739
|
}(), k.es = function() {
|
|
4743
|
-
var s =
|
|
4740
|
+
var s = U.create(["Rdos.", "Rdo.", "RR.HH.", "Rvdos.", "Rvdo.", "Rvdmos.", "Rvdmo.", "RAM.", "Rol.", "R.D.", "R.U.", "Rev.", "Reg.", "JJ.OO.", "Sres.", "Srtas.", "Srta.", "Sra.", "Sras.", "Sr.", "SA.", "SS.MM.", "SS.AA.", "Sol.", "Seg.", "Sta.", "Sto.", "Sdad.", "fig.", "figs.", "feb.", "fund.", "may.", "mar.", "mié.", "mss.", "ms.", "mtro.", "oct.", "cap.", "col.", "cf.", "cfr.", "c/c.", "doc.", "dom.", "dic.", "dtor.", "dptos.", "dpto.", "depto.", "deptos.", "d. C.", "Excmo.", "Excmos.", "Excma.", "Excmas.", "Exc.", "Exmo.", "Exmos.", "Exma.", "Exmas.", "Emm.", "Em.", "Trab.", "Kit.", "Korn.", "K.", "Inc.", "Ilmas.", "Ilma.", "Ilmos.", "Ilmo.", "Id.", "FF.CC.", "Fabric.", "Fr.", "DC.", "Da.", "Dr.", "Drs.", "Dra.", "Desv.", "Desc.", "D.", "Dña.", "Dª.", "Dto.", "ago.", "abr.", "a. C.", "a. e. c.", "afma.", "afmas.", "afmo.", "afmos.", "trad.", "ed.", "ene.", "ej.", "e. c.", "e.g.", "jul.", "jue.", "jun.", "Comm.", "Col.", "Corp.", "C.", "Cía.", "CA.", "vid.", "vie.", "v.gr.", "vs.", "ss.", "sáb.", "sras.", "sres.", "srs.", "sept.", "ntra.", "ntro.", "nov.", "prov.", "prof.", "p.ej.", "licdo.", "licda.", "lun.", "bol.", "bco.", "Vda.", "Var.", "O.M.", "Ldo.", "Lda.", "Ltda.", "Ltd.", "Ltdo.", "Lcda.", "Lcdo.", "Lic.", "L.", "U.S.", "hnos.", "MM.", "Mons.", "M.", "Mr.", "Mrs.", "A.C.", "Av.", "Avda.", "Ant.", "All.", "AA.", "H.P.", "PP.", "Bien."]);
|
|
4744
4741
|
return V.es && (s = s.merge(V.es)), s.lock(), s;
|
|
4745
4742
|
}(), k.fr = function() {
|
|
4746
|
-
var s =
|
|
4743
|
+
var s = U.create(["aux.", "adr.", "anc.", "anon.", "ann.", "acoust.", "avr.", "av. J.-C.", "append.", "ap. J.-C.", "config.", "collab.", "coll.", "cam.", "categ.", "M.", "MM.", "Mart.", "dim.", "dir.", "dict.", "doc.", "dest.", "déc.", "imprim.", "imm.", "indus.", "illustr.", "ill.", "oct.", "syst.", "symb.", "synth.", "sept.", "sam.", "bull.", "broch.", "P.", "Prof.", "hôp.", "juil.", "jeu.", "janv.", "C.", "Comm.", "voit.", "ven.", "Jr.", "graph.", "gouv.", "éd.", "édit.", "éval.", "équiv.", "fig.", "févr.", "niv.", "nov.", "quart.", "réf.", "DC.", "Desc.", "D.", "L.", "All.", "U.", "S.M.A.R.T.", "S.A.", "encycl.", "exempl.", "mer.", "mar.", "lun.", "Inc.", "Var.", "W.", "Op.", "trav. publ."]);
|
|
4747
4744
|
return V.fr && (s = s.merge(V.fr)), s.lock(), s;
|
|
4748
4745
|
}(), k.it = function() {
|
|
4749
|
-
var s =
|
|
4746
|
+
var s = U.create(["N.B.", "N.d.A.", "N.d.T.", "N.d.E.", "div.", "d.p.R.", "d.C.", "dott.", "dr.", "a.C.", "arch.", "ag.", "avv.", "all.", "fig.", "c.c.p.", "Cfr.", "C.P.", "vol.", "ver.", "Geom.", "O.d.G.", "S.p.A.", "S.M.A.R.T.", "S.A.R.", "Sig.", "rag.", "Mod.", "pag.", "p.", "tav.", "tab.", "DC.", "D.", "mitt.", "Ing.", "int.", "on.", "L.", "Ltd.", "Liv.", "U.S.", "sez."]);
|
|
4750
4747
|
return V.it && (s = s.merge(V.it)), s.lock(), s;
|
|
4751
4748
|
}(), k.pt = function() {
|
|
4752
|
-
var s =
|
|
4749
|
+
var s = U.create(["psicol.", "port.", "pol.", "p.", "pág.", "pal.", "profa.", "prof.", "pron.", "prod.", "próx.", "pq.", "pp.", "fig.", "fisiol.", "filos.", "fil.", "ff.", "fev.", "fem.", "fot.", "fís.", "fasc.", "fac.", "fl.", "fr.", "f.", "compl.", "comp.", "com.", "col.", "cont.", "contab.", "cap.", "caps.", "cat.", "cf.", "créd.", "cel.", "cx.", "círc.", "cód.", "rep.", "res.", "relat.", "rel.", "ref.", "rementente", "r.s.v.p.", "rod.", "doc.", "dipl.", "dir.", "div.", "dez.", "des.", "desc.", "déb.", "d.C.", "astron.", "ago.", "agric.", "arquit.", "arqueol.", "arit.", "apt.", "ap.", "apart.", "abr.", "abrev.", "adm.", "anat.", "aux.", "autom.", "aer.", "a.C.", "a.m.", "eletrôn.", "eletr.", "elem.", "ed.", "educ.", "end.", "eng.", "esp.", "ex.", "geom.", "gên.", "gram.", "mov.", "matem.", "mat.", "mai.", "mar.", "méd.", "mús.", "máq.", "trad.", "transp.", "tecnol.", "tec.", "tel.", "Exmo.", "Exma.", "E.", "Est.", "univ.", "R.", "D.C", "Dir.", "Drs.", "Dra.", "Dras.", "Dr.", "l.", "liter.", "lit.", "lin.", "lat.", "long.", "P.M.", "Pe.", "Ph.D.", "jur.", "jul.", "jun.", "jan.", "neol.", "nov.", "náut.", "índ.", "Ltda.", "Ltd.", "ingl.", "ind.", "Mar.", "símb.", "sup.", "séc.", "set.", "sociol.", "V.T.", "vs.", "vol.", "S.", "Sta.", "Sto.", "N.Sra.", "N.T.", "out.", "odontol.", "odont.", "org.", "organiz.", "obs.", "A.C.", "A.M", "Av.", "Alm.", "álg.", "hist.", "Fr.", "Ilmo.", "Ilma.", "quím.", "W.C.", "bras.", "biogr.", "Jr."]);
|
|
4753
4750
|
return V.pt && (s = s.merge(V.pt)), s.lock(), s;
|
|
4754
4751
|
}(), k.ru = function() {
|
|
4755
|
-
var s =
|
|
4752
|
+
var s = U.create(["руб.", "янв.", "до н. э.", "дек.", "сент.", "тел.", "тыс.", "февр.", "нояб.", "н. э.", "н.э.", "апр.", "авг.", "окт.", "отд.", "проф.", "кв.", "ул."]);
|
|
4756
4753
|
return V.ru && (s = s.merge(V.ru)), s.lock(), s;
|
|
4757
4754
|
}(), k.tr = function() {
|
|
4758
|
-
var s =
|
|
4755
|
+
var s = U.create(["age.", "agm.", "agy.", "Alb.", "Alm.", "anat.", "ant.", "Apt.", "Ar.", "ark.", "Arş.", "As.", "Asb.", "astr.", "astrol.", "Atğm.", "atm.", "Av.", "b.", "bağ.", "Bçvş.", "bit.", "biy.", "bk.", "bl.", "Bl.", "Bnb.", "bot.", "Böl.", "bs.", "Bşk.", "Bul.", "Bulg.", "çev.", "Çvş.", "db.", "dk.", "Doç.", "doğ.", "Dr.", "drl.", "Dz.", "dzl.", "Ecz.", "ed.", "ekon.", "Ens.", "f.", "Fak.", "fel.", "fiz.", "fizy.", "Gen.", "geom.", "gn.", "Gnkur.", "Gön.", "gr.", "hay.", "haz.", "hek.", "hlk.", "Hs.", "huk.", "Hv.", "Hz.", "İng.", "is.", "İsp.", "işl.", "İt.", "İz.", "Jap.", "jeol.", "K.", "kim.", "koor.", "Kor.", "Kora.", "Korg.", "kr.", "krş.", "Kuv.", "Lat.", "Mac.", "Mah.", "man.", "mat.", "mec.", "Mim.", "mim.", "min.", "Müh.", "Mür.", "müz.", "No.", "Nö.", "Okt.", "Onb.", "Or.", "Ora.", "Ord.", "Org.", "Ort.", "Osm.", "öl.", "ör.", "öz.", "ped.", "Port.", "Prof.", "psikol.", "Rum.", "Rus.", "s.", "sa.", "Sb.", "sf.", "Sl.", "Sn.", "sn.", "snt.", "Sok.", "sos.", "sp.", "Srp.", "Şb.", "T.", "T.C.", "tar.", "Tb.", "tek.", "tel.", "telg.", "Tğm.", "tiy.", "tlks.", "tls.", "Top.", "Tug.", "Tuğa.", "Tuğg.", "Tüm.", "Tüma.", "Tümg.", "Uzm.", "Üçvş.", "ünl.", "Ütğm.", "vb.", "vd.", "Vet.", "vs.", "Y.", "Yay.", "Yb.", "Yd.", "Yrd.", "Yun.", "yy.", "Yzb.", "zf.", "zm.", "zool."]);
|
|
4759
4756
|
return V.tr && (s = s.merge(V.tr)), s.lock(), s;
|
|
4760
|
-
}(), k.all =
|
|
4757
|
+
}(), k.all = U.create(function() {
|
|
4761
4758
|
var s = [];
|
|
4762
4759
|
for (var L in k)
|
|
4763
4760
|
s = s.concat(k[L].list);
|
|
@@ -4777,7 +4774,7 @@ const P7 = /* @__PURE__ */ Object.freeze(/* @__PURE__ */ Object.defineProperty({
|
|
|
4777
4774
|
detectLanguage: Y0,
|
|
4778
4775
|
splitToSentences: Q1,
|
|
4779
4776
|
subtitleOptimization: R6,
|
|
4780
|
-
subtitleOptimizationRegExp:
|
|
4777
|
+
subtitleOptimizationRegExp: I
|
|
4781
4778
|
}, Symbol.toStringTag, { value: "Module" }));
|
|
4782
4779
|
function u7(e, n) {
|
|
4783
4780
|
const a = new RegExp(`(\\s*${n}\\s*){2,}`, "gi"), t = [];
|
|
@@ -4866,14 +4863,14 @@ function O7(e) {
|
|
|
4866
4863
|
text: "[--end--]"
|
|
4867
4864
|
}]);
|
|
4868
4865
|
}
|
|
4869
|
-
function
|
|
4866
|
+
function C(Q) {
|
|
4870
4867
|
N || (M += Q.map((P) => P.text).join("")), !N && !m && C1(M) && (m = !0), M.length > 50 && (N = !0), !u && N && (u = Y0(M), console.log("detect language", M, u), console.log(u));
|
|
4871
4868
|
}
|
|
4872
4869
|
function v() {
|
|
4873
4870
|
var Q, P;
|
|
4874
4871
|
d.length && ((Q = e == null ? void 0 : e.repeatString) != null && Q.length && d.forEach((k) => {
|
|
4875
|
-
var
|
|
4876
|
-
(
|
|
4872
|
+
var U;
|
|
4873
|
+
(U = e.repeatString) == null || U.forEach((V) => {
|
|
4877
4874
|
const s = u7(k.text, V);
|
|
4878
4875
|
if (s.length) {
|
|
4879
4876
|
console.log("===================================="), console.log(k.text), console.log(s);
|
|
@@ -4885,10 +4882,10 @@ function O7(e) {
|
|
|
4885
4882
|
L += d0(k, 0, F + 1), console.log(L);
|
|
4886
4883
|
}
|
|
4887
4884
|
if (o.start > 0) {
|
|
4888
|
-
const F = D > 0 ? o.start - s[D - 1].end + L : o.start,
|
|
4889
|
-
console.log(F,
|
|
4890
|
-
const
|
|
4891
|
-
console.log((A = k.children) == null ? void 0 : A.map((
|
|
4885
|
+
const F = D > 0 ? o.start - s[D - 1].end + L : o.start, T = D > 0 ? o.end - s[D - 1].end + L : o.end;
|
|
4886
|
+
console.log(F, T, "=============================");
|
|
4887
|
+
const R = d7(k, F, T);
|
|
4888
|
+
console.log((A = k.children) == null ? void 0 : A.map((Z, G) => Z.text + "--" + Z.text.length + " " + G).join("||")), console.log(R), R && R.start !== void 0 && R.end !== void 0 && (L += d0(k, R.start, R.end - R.start + 1), console.log(L), console.log(k.text));
|
|
4892
4889
|
}
|
|
4893
4890
|
}), console.log("----------"), console.log(k.text), console.log("----------");
|
|
4894
4891
|
}
|
|
@@ -4900,8 +4897,8 @@ function O7(e) {
|
|
|
4900
4897
|
}));
|
|
4901
4898
|
}
|
|
4902
4899
|
function y(Q) {
|
|
4903
|
-
var k,
|
|
4904
|
-
|
|
4900
|
+
var k, U, V, s;
|
|
4901
|
+
C(Q), i.push(...Q), t && ((k = e == null ? void 0 : e.onStart) == null || k.call(e, {
|
|
4905
4902
|
type: "event",
|
|
4906
4903
|
event: "start",
|
|
4907
4904
|
data: []
|
|
@@ -4913,7 +4910,7 @@ function O7(e) {
|
|
|
4913
4910
|
l && d.push(l), B = !0;
|
|
4914
4911
|
break;
|
|
4915
4912
|
}
|
|
4916
|
-
if (l ? (l.et = L.et, l.text = l.text + L.text, l.em = l.em || L.em, l.punc = l.punc || L.punc, (
|
|
4913
|
+
if (l ? (l.et = L.et, l.text = l.text + L.text, l.em = l.em || L.em, l.punc = l.punc || L.punc, (U = l.children) == null || U.push({ ...L })) : l = {
|
|
4917
4914
|
...L,
|
|
4918
4915
|
children: [{
|
|
4919
4916
|
...L
|